|
@@ -938,9 +938,8 @@ public class GanZhiServiceImpl extends ServiceImpl<GanZhiMapper, GanZhi> impleme
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public Map<String, Integer> getShiShenCount(List<GanZhiRowVo> list) {
|
|
|
-
|
|
|
- Map<String, Integer> shiShenCount = new TreeMap<String, Integer>();
|
|
|
+ public Map<String, Object> getShiShenCount(List<GanZhiRowVo> list) {
|
|
|
+ Map<String, Object> shiShenCount = new TreeMap<String, Object>();
|
|
|
shiShenCount.put("正印", 0);
|
|
|
shiShenCount.put("食神", 0);
|
|
|
shiShenCount.put("正官", 0);
|
|
@@ -958,153 +957,153 @@ public class GanZhiServiceImpl extends ServiceImpl<GanZhiMapper, GanZhi> impleme
|
|
|
String shiShen3 = list.get(i).getShiShen3();
|
|
|
//正印
|
|
|
if (shiShen1 != null && shiShen1.contains("正印")) {
|
|
|
- Integer count = shiShenCount.get("正印") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("正印") + 1;
|
|
|
shiShenCount.put("正印", count);
|
|
|
}
|
|
|
if (shiShen2 != null && shiShen2.contains("正印")) {
|
|
|
- Integer count = shiShenCount.get("正印") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("正印") + 1;
|
|
|
shiShenCount.put("正印", count);
|
|
|
}
|
|
|
if (shiShen3 != null && shiShen3.contains("正印")) {
|
|
|
- Integer count = shiShenCount.get("正印") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("正印") + 1;
|
|
|
shiShenCount.put("正印", count);
|
|
|
}
|
|
|
//食神
|
|
|
if (shiShen1 != null && shiShen1.contains("食神")) {
|
|
|
- Integer count = shiShenCount.get("食神") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("食神") + 1;
|
|
|
shiShenCount.put("食神", count);
|
|
|
}
|
|
|
if (shiShen2 != null && shiShen2.contains("食神")) {
|
|
|
- Integer count = shiShenCount.get("食神") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("食神") + 1;
|
|
|
shiShenCount.put("食神", count);
|
|
|
}
|
|
|
if (shiShen3 != null && shiShen3.contains("食神")) {
|
|
|
- Integer count = shiShenCount.get("食神") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("食神") + 1;
|
|
|
shiShenCount.put("食神", count);
|
|
|
}
|
|
|
|
|
|
//正官
|
|
|
if (shiShen1 != null && shiShen1.contains("正官")) {
|
|
|
- Integer count = shiShenCount.get("正官") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("正官") + 1;
|
|
|
shiShenCount.put("正官", count);
|
|
|
}
|
|
|
if (shiShen2 != null && shiShen2.contains("正官")) {
|
|
|
- Integer count = shiShenCount.get("正官") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("正官") + 1;
|
|
|
shiShenCount.put("正官", count);
|
|
|
}
|
|
|
if (shiShen3 != null && shiShen3.contains("正官")) {
|
|
|
- Integer count = shiShenCount.get("正官") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("正官") + 1;
|
|
|
shiShenCount.put("正官", count);
|
|
|
}
|
|
|
|
|
|
//正财
|
|
|
if (shiShen1 != null && shiShen1.contains("正财")) {
|
|
|
- Integer count = shiShenCount.get("正财") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("正财") + 1;
|
|
|
shiShenCount.put("正财", count);
|
|
|
}
|
|
|
if (shiShen2 != null && shiShen2.contains("正财")) {
|
|
|
- Integer count = shiShenCount.get("正财") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("正财") + 1;
|
|
|
shiShenCount.put("正财", count);
|
|
|
}
|
|
|
if (shiShen3 != null && shiShen3.contains("正财")) {
|
|
|
- Integer count = shiShenCount.get("正财") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("正财") + 1;
|
|
|
shiShenCount.put("正财", count);
|
|
|
}
|
|
|
|
|
|
//七杀
|
|
|
if (shiShen1 != null && shiShen1.contains("七杀")) {
|
|
|
- Integer count = shiShenCount.get("七杀") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("七杀") + 1;
|
|
|
shiShenCount.put("七杀", count);
|
|
|
}
|
|
|
if (shiShen2 != null && shiShen2.contains("七杀")) {
|
|
|
- Integer count = shiShenCount.get("七杀") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("七杀") + 1;
|
|
|
shiShenCount.put("七杀", count);
|
|
|
}
|
|
|
if (shiShen3 != null && shiShen3.contains("七杀")) {
|
|
|
- Integer count = shiShenCount.get("七杀") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("七杀") + 1;
|
|
|
shiShenCount.put("七杀", count);
|
|
|
}
|
|
|
|
|
|
//偏印
|
|
|
if (shiShen1 != null && shiShen1.contains("偏印")) {
|
|
|
- Integer count = shiShenCount.get("偏印") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("偏印") + 1;
|
|
|
shiShenCount.put("偏印", count);
|
|
|
}
|
|
|
if (shiShen2 != null && shiShen2.contains("偏印")) {
|
|
|
- Integer count = shiShenCount.get("偏印") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("偏印") + 1;
|
|
|
shiShenCount.put("偏印", count);
|
|
|
}
|
|
|
if (shiShen3 != null && shiShen3.contains("偏印")) {
|
|
|
- Integer count = shiShenCount.get("偏印") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("偏印") + 1;
|
|
|
shiShenCount.put("偏印", count);
|
|
|
}
|
|
|
|
|
|
//偏财
|
|
|
if (shiShen1 != null && shiShen1.contains("偏财")) {
|
|
|
- Integer count = shiShenCount.get("偏财") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("偏财") + 1;
|
|
|
shiShenCount.put("偏财", count);
|
|
|
}
|
|
|
if (shiShen2 != null && shiShen2.contains("偏财")) {
|
|
|
- Integer count = shiShenCount.get("偏财") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("偏财") + 1;
|
|
|
shiShenCount.put("偏财", count);
|
|
|
}
|
|
|
if (shiShen3 != null && shiShen3.contains("偏财")) {
|
|
|
- Integer count = shiShenCount.get("偏财") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("偏财") + 1;
|
|
|
shiShenCount.put("偏财", count);
|
|
|
}
|
|
|
|
|
|
//伤官
|
|
|
if (shiShen1 != null && shiShen1.contains("伤官")) {
|
|
|
- Integer count = shiShenCount.get("伤官") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("伤官") + 1;
|
|
|
shiShenCount.put("伤官", count);
|
|
|
}
|
|
|
if (shiShen2 != null && shiShen2.contains("伤官")) {
|
|
|
- Integer count = shiShenCount.get("伤官") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("伤官") + 1;
|
|
|
shiShenCount.put("伤官", count);
|
|
|
}
|
|
|
if (shiShen3 != null && shiShen3.contains("伤官")) {
|
|
|
- Integer count = shiShenCount.get("伤官") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("伤官") + 1;
|
|
|
shiShenCount.put("伤官", count);
|
|
|
}
|
|
|
|
|
|
//劫财
|
|
|
if (shiShen1 != null && shiShen1.contains("劫财")) {
|
|
|
- Integer count = shiShenCount.get("劫财") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("劫财") + 1;
|
|
|
shiShenCount.put("劫财", count);
|
|
|
}
|
|
|
if (shiShen2 != null && shiShen2.contains("劫财")) {
|
|
|
- Integer count = shiShenCount.get("劫财") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("劫财") + 1;
|
|
|
shiShenCount.put("劫财", count);
|
|
|
}
|
|
|
if (shiShen3 != null && shiShen3.contains("劫财")) {
|
|
|
- Integer count = shiShenCount.get("劫财") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("劫财") + 1;
|
|
|
shiShenCount.put("劫财", count);
|
|
|
}
|
|
|
|
|
|
//比肩
|
|
|
if (shiShen1 != null && shiShen1.contains("比肩")) {
|
|
|
- Integer count = shiShenCount.get("比肩") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("比肩") + 1;
|
|
|
shiShenCount.put("比肩", count);
|
|
|
}
|
|
|
if (shiShen2 != null && shiShen2.contains("比肩")) {
|
|
|
- Integer count = shiShenCount.get("比肩") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("比肩") + 1;
|
|
|
shiShenCount.put("比肩", count);
|
|
|
}
|
|
|
if (shiShen3 != null && shiShen3.contains("比肩")) {
|
|
|
- Integer count = shiShenCount.get("比肩") + 1;
|
|
|
+ Integer count = (Integer)shiShenCount.get("比肩") + 1;
|
|
|
shiShenCount.put("比肩", count);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
StringBuffer zeroCotent = new StringBuffer();
|
|
|
shiShenCount.forEach((key, value) -> {
|
|
|
- if (value == 0) {
|
|
|
+ if (value instanceof Integer && (Integer) value == 0) {
|
|
|
zeroCotent.append(shiShenConfig.getZeroShiShen().get(key));
|
|
|
zeroCotent.append(";");
|
|
|
}
|
|
|
});
|
|
|
- System.out.println(zeroCotent.toString());
|
|
|
-
|
|
|
+ zeroCotent.deleteCharAt(zeroCotent.length() - 1);
|
|
|
+ shiShenCount.put("缺失十神评语",zeroCotent.toString());
|
|
|
return shiShenCount;
|
|
|
}
|
|
|
|
|
@@ -1639,22 +1638,27 @@ public class GanZhiServiceImpl extends ServiceImpl<GanZhiMapper, GanZhi> impleme
|
|
|
String[] s = str.split(" ");
|
|
|
StringBuffer fangWei = new StringBuffer();
|
|
|
|
|
|
- System.out.println(str);
|
|
|
str = str.substring(str.indexOf("喜神方位"));
|
|
|
|
|
|
System.out.println(str);
|
|
|
|
|
|
- fangWei.append(s[14]).append(";");
|
|
|
- fangWei.append(s[15]).append(";");
|
|
|
- fangWei.append(s[16]).append(";");
|
|
|
- fangWei.append(s[17]).append(";");
|
|
|
- fangWei.append(s[18]).append(";");
|
|
|
- fangWei.append(s[19]).append(";");
|
|
|
- fangWei.append(s[20]);
|
|
|
- System.out.println(fangWei.toString());
|
|
|
return str;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
+ public Map<String, String> getIndustry(Map<String, Object> riYuanQrMap) {
|
|
|
+
|
|
|
+ List<String> xiYongList = (List)riYuanQrMap.get("xiYong");
|
|
|
+ System.out.println(xiYongList);
|
|
|
+
|
|
|
+ for (int i = 0; i < xiYongList.size(); i++) {
|
|
|
+ xiYongList.get(i);
|
|
|
+ }
|
|
|
+
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|