This commit is contained in:
wangjinlei
2023-12-05 11:27:19 +08:00
parent 6b59e8539f
commit 22fc01a40f
4 changed files with 55 additions and 2 deletions

View File

@@ -172,20 +172,40 @@ public class PointController {
return R.ok().put("points",pointEntities);
}
public R SCQX(@RequestBody Map<String,Object> map) throws ParseException {
String date = map.get("date").toString();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat();
simpleDateFormat.applyPattern("yyyy-MM-dd hh:mm:ss");
Date parse = simpleDateFormat.parse(date);
pointService.ZWLZ(parse);
return null;
}
/**
* 获取天干地支
* @param map
* @return
* @throws ParseException
*/
@RequestMapping("/TGDZForYear")
public R TGDZForYear(@RequestBody Map<String,Object> map) throws ParseException {
String date = map.get("date").toString();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat();
simpleDateFormat.applyPattern("yyyy-MM-dd hh:mm:ss");
Date parse = simpleDateFormat.parse(date);
Map<String, Object> stringStringMap = pointService.TGDZForDate(parse);
return R.ok().put("tgdz",stringStringMap);
}
/**
* 获取时间的五运六气
* @param map
* @return
* @throws ParseException
*/
@RequestMapping("/WYLQForYear")
public R WYLQForYear(@RequestBody Map<String,Object> map) throws ParseException {
String date = map.get("date").toString();

View File

@@ -19,5 +19,7 @@ public interface PointService extends IService<PointEntity> {
Map<String,Object> TGDZForDate(Date date);
List<String> ZWLZ(Date parse);
Map<String,Object> WYLQForDate(Date date);
}

View File

@@ -132,6 +132,16 @@ public class PointServiceImpl extends ServiceImpl<PointDao, PointEntity> impleme
return flagMap;
}
@Override
public List<String> ZWLZ(Date parse) {
Map<String, Object> stringObjectMap = TGDZForDate(parse);
char dt = stringObjectMap.get("day").toString().charAt(0);
char hd = stringObjectMap.get("hour").toString().charAt(1);
String check = ""+dt+hd;
return null;
}
@Override
public Map<String, Object> WYLQForDate(Date date) {
Calendar calendar = Calendar.getInstance();