bug
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package com.peanut.config;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class TGDZ {
|
||||
|
||||
@@ -17,6 +19,25 @@ public class TGDZ {
|
||||
|
||||
public static final String[] lq = {"厥阴","少阴","太阴","少阳","阳明","太阳"};
|
||||
|
||||
public static final Map<String,List<String>> ngf=new HashMap<String,List<String>>(){{
|
||||
put("甲丑",Arrays.asList("行间"));
|
||||
put("甲卯",Arrays.asList("神门","太溪*","大陵*"));
|
||||
put("甲巳",Arrays.asList("商丘"));
|
||||
put("甲未",Arrays.asList("尺泽"));
|
||||
put("甲酉",Arrays.asList("中冲"));
|
||||
put("甲戌",Arrays.asList("窍阴"));
|
||||
put("己子",Arrays.asList("阳辅"));
|
||||
put("己寅",Arrays.asList("小海"));
|
||||
put("己辰",Arrays.asList("支沟"));
|
||||
put("己巳",Arrays.asList("隐白"));
|
||||
put("己午",Arrays.asList("(阳溪)"));
|
||||
put("己未",Arrays.asList("鱼际"));
|
||||
put("己酉",Arrays.asList("太溪","太白*"));
|
||||
put("己亥",Arrays.asList("中封"));
|
||||
put("乙子",Arrays.asList("前谷"));
|
||||
|
||||
}};
|
||||
|
||||
|
||||
public static final List<String> tianfu = Arrays.asList("己丑","己未","戊寅","戊申","戊子","戊午","乙卯","乙酉","丁巳","丁亥","丙辰","丙戍");
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user