Browse Source

Merge branch 'dev' of lyr/patient-co-management into dev

lyr 8 years ago
parent
commit
a68c8c5c81

+ 33 - 13
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java

@ -183,7 +183,7 @@ public class SignPatientLabelInfoService extends BaseService {
        if (StringUtils.isEmpty(epTime)) {
            json.put("wechatFocusRemind", 0);
        } else {
            json.put("wechatFocusRemind",  new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
            json.put("wechatFocusRemind", new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
        }
        return json;
@ -324,7 +324,7 @@ public class SignPatientLabelInfoService extends BaseService {
                        if (StringUtils.isEmpty(epTime)) {
                            jsonP.put("wechatFocusRemind", 0);
                        } else {
                            jsonP.put("wechatFocusRemind",  new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                            jsonP.put("wechatFocusRemind", new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                        }
                    }
@ -394,7 +394,7 @@ public class SignPatientLabelInfoService extends BaseService {
                if (StringUtils.isEmpty(epTime)) {
                    json.put("wechatFocusRemind", 0);
                } else {
                    json.put("wechatFocusRemind",  new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                    json.put("wechatFocusRemind", new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                }
                // 患者标签
                //json.put("labels", labels == null ? "" : labels);
@ -478,7 +478,7 @@ public class SignPatientLabelInfoService extends BaseService {
                        if (StringUtils.isEmpty(epTime)) {
                            jsonP.put("wechatFocusRemind", 0);
                        } else {
                            jsonP.put("wechatFocusRemind",  new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                            jsonP.put("wechatFocusRemind", new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                        }
                    }
                    continue;
@ -561,7 +561,7 @@ public class SignPatientLabelInfoService extends BaseService {
                if (StringUtils.isEmpty(epTime)) {
                    json.put("wechatFocusRemind", 0);
                } else {
                    json.put("wechatFocusRemind",  new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                    json.put("wechatFocusRemind", new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                }
                // 患者标签
                json.put("labels", labels == null ? "" : labels);
@ -700,6 +700,16 @@ public class SignPatientLabelInfoService extends BaseService {
                json.put("amount", amount);
                int focusAmount = 0;
                sql += labelType.equals("5") ? " AND LENGTH(TRIM(IFNULL(openid,''))) > 0 " : " AND LENGTH(TRIM(IFNULL(t1.openid,''))) > 0 ";
                List<Map<String, Object>> focusCount = jdbcTemplate.queryForList(sql, args);
                if (focusCount != null && focusCount.size() > 0 && focusCount.get(0).containsKey("count")) {
                    focusAmount = Integer.valueOf(String.valueOf(focusCount.get(0).get("count")));
                }
                json.put("focusAmount", focusAmount);
                if (label.getLabelCode().equals("0") && labelType.equals("1") && amount < 1) {
                    continue;
                }
@ -857,6 +867,16 @@ public class SignPatientLabelInfoService extends BaseService {
                json.put("amount", amount);
                int focusAmount = 0;
                sql += labelType.equals("5") ? " AND LENGTH(TRIM(IFNULL(openid,''))) > 0 " : " AND LENGTH(TRIM(IFNULL(t1.openid,''))) > 0 ";
                List<Map<String, Object>> focusCount = jdbcTemplate.queryForList(sql, args);
                if (focusCount != null && focusCount.size() > 0 && focusCount.get(0).containsKey("count")) {
                    focusAmount = Integer.valueOf(String.valueOf(focusCount.get(0).get("count")));
                }
                json.put("focusAmount", focusAmount);
                if (label.getLabelCode().equals("0") && labelType.equals("1") && amount < 1) {
                    continue;
                }
@ -1303,7 +1323,7 @@ public class SignPatientLabelInfoService extends BaseService {
                        if (StringUtils.isEmpty(epTime)) {
                            jsonP.put("wechatFocusRemind", 0);
                        } else {
                            jsonP.put("wechatFocusRemind",  new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                            jsonP.put("wechatFocusRemind", new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                        }
                    }
@ -1396,7 +1416,7 @@ public class SignPatientLabelInfoService extends BaseService {
                if (StringUtils.isEmpty(epTime)) {
                    json.put("wechatFocusRemind", 0);
                } else {
                    json.put("wechatFocusRemind",  new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                    json.put("wechatFocusRemind", new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                }
                // 患者标签
                json.put("labels", labels == null ? "" : labels);
@ -1767,7 +1787,7 @@ public class SignPatientLabelInfoService extends BaseService {
                        if (StringUtils.isEmpty(epTime)) {
                            jsonP.put("wechatFocusRemind", 0);
                        } else {
                            jsonP.put("wechatFocusRemind",  new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                            jsonP.put("wechatFocusRemind", new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                        }
                    }
@ -1857,7 +1877,7 @@ public class SignPatientLabelInfoService extends BaseService {
                if (StringUtils.isEmpty(epTime)) {
                    json.put("wechatFocusRemind", 0);
                } else {
                    json.put("wechatFocusRemind",  new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                    json.put("wechatFocusRemind", new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                }
                // 患者标签
                json.put("labels", labels == null ? "" : labels);
@ -1946,7 +1966,7 @@ public class SignPatientLabelInfoService extends BaseService {
                        if (StringUtils.isEmpty(epTime)) {
                            jsonP.put("wechatFocusRemind", 0);
                        } else {
                            jsonP.put("wechatFocusRemind",  new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                            jsonP.put("wechatFocusRemind", new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                        }
                    }
@ -2022,7 +2042,7 @@ public class SignPatientLabelInfoService extends BaseService {
                if (StringUtils.isEmpty(epTime)) {
                    json.put("wechatFocusRemind", 0);
                } else {
                    json.put("wechatFocusRemind",  new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                    json.put("wechatFocusRemind", new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                }
                // 患者标签
                json.put("labels", labels == null ? "" : labels);
@ -2164,7 +2184,7 @@ public class SignPatientLabelInfoService extends BaseService {
                        if (StringUtils.isEmpty(epTime)) {
                            jsonP.put("wechatFocusRemind", 0);
                        } else {
                            jsonP.put("wechatFocusRemind",  new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                            jsonP.put("wechatFocusRemind", new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                        }
                    }
@ -2234,7 +2254,7 @@ public class SignPatientLabelInfoService extends BaseService {
                if (StringUtils.isEmpty(epTime)) {
                    json.put("wechatFocusRemind", 0);
                } else {
                    json.put("wechatFocusRemind",  new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                    json.put("wechatFocusRemind", new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0);
                }
                // 患者标签
                //json.put("labels", labels == null ? "" : labels);