Pārlūkot izejas kodu

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

hzp 8 gadi atpakaļ
vecāks
revīzija
2e4787f28f

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/consult/ConsultTeamDao.java

@ -239,11 +239,11 @@ public interface ConsultTeamDao extends PagingAndSortingRepository<ConsultTeam,
	Page<ConsultTeam> findFamousDoctorIngNoTitleList(String uid, Pageable pageRequest);
	//三师家庭咨询 -全部 进行中
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type= 1 or a.type = 2) and b.to = ?1 and a.id < ?2 and a.status = 0 and  b.reply = 1 and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type= 1 or a.type = 2) and b.to = ?1 and a.id < ?2 and a.status = 0 and a.del = '1' and b.del = '1'")
	Page<ConsultTeam> findDoctorIngNoTitleList(String uid, long id, Pageable pageRequest);
	//三师家庭咨询 -全部 进行中
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type= 1 or a.type = 2) and b.to = ?1 and a.status = 0 and b.reply = 1 and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type= 1 or a.type = 2) and b.to = ?1 and a.status = 0 and a.del = '1' and b.del = '1'")
	Page<ConsultTeam> findDoctorIngNoTitleList(String uid, Pageable pageRequest);
    // 更新超过24小时未回复的项目,多加一分钟,防止过于频繁更新

+ 1 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/doctor/SignPatientLabelInfoDao.java

@ -62,6 +62,7 @@ public interface SignPatientLabelInfoDao extends
    int deleteByPatientAndLabelTypeAndStatus(String patient, String labelType, Integer status);
    @Modifying
    @Query("update SignPatientLabelInfo set status = 0 where label = ?1 and status = 1")
    int deleteByLabel(String labelCode);
    /**

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

@ -222,7 +222,7 @@ public class SignPatientLabelInfoService extends BaseService {
                        " FROM " +
                        "    wlyy_sign_family t1 " +
                        " left join " +
                        "    (select repl.patient,repl.label,repl.label_type,repl.label_name from wlyy_sign_family repf left join wlyy_sign_patient_label_info repl on repf.patient = repl.patient where repf.repdoctor = '" + doctor + "' and repf.status > 0 and repl.label_type = ?) t2 " +
                        "    (select repl.patient,repl.label,repl.label_type,repl.label_name from wlyy_sign_family repf left join wlyy_sign_patient_label_info repl on repf.patient = repl.patient where repf.repdoctor = '" + doctor + "' and repf.status > 0 and repl.label_type = ? and repl.status = 1) t2 " +
                        " on t1.patient = t2.patient " +
                        " WHERE " +
                        "    t2.patient is null " +
@ -592,7 +592,7 @@ public class SignPatientLabelInfoService extends BaseService {
                                " FROM" +
                                "     wlyy_sign_family t1 " +
                                " left join " +
                                "    (select repl.patient,repl.label,repl.label_type,repl.label_name from wlyy_sign_family repf left join wlyy_sign_patient_label_info repl on repf.patient = repl.patient where  repf.repdoctor = '" + doctor + "' and repf.status > 0 and repl.label_type = ?) t2 " +
                                "    (select repl.patient,repl.label,repl.label_type,repl.label_name from wlyy_sign_family repf left join wlyy_sign_patient_label_info repl on repf.patient = repl.patient where  repf.repdoctor = '" + doctor + "' and repf.status > 0 and repl.label_type = ? and repl.status = 1) t2 " +
                                " on t1.patient = t2.patient " +
                                " WHERE" +
                                "     t2.patient is null " +
@ -746,7 +746,7 @@ public class SignPatientLabelInfoService extends BaseService {
                                " FROM" +
                                "     wlyy_sign_family t1 " +
                                " left join " +
                                "    (select repl.patient,repl.label,repl.label_type,repl.label_name from wlyy_sign_family repf left join wlyy_sign_patient_label_info repl on repf.patient = repl.patient where  repf.status > 0 and repl.label_type = ?) t2 " +
                                "    (select repl.patient,repl.label,repl.label_type,repl.label_name from wlyy_sign_family repf left join wlyy_sign_patient_label_info repl on repf.patient = repl.patient where  repf.status > 0 and repl.label_type = ? and repl.status = 1) t2 " +
                                " on t1.patient = t2.patient " +
                                " WHERE" +
                                "     t2.patient is null " +
@ -1475,7 +1475,9 @@ public class SignPatientLabelInfoService extends BaseService {
            return -1;
        }
        labelInfoDao.delete(labelInfo);
        labelInfo.setStatus(0);
        labelInfoDao.save(labelInfo);
        return 1;
    }

+ 1 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -843,6 +843,7 @@ public class FamilyContractService extends BaseService {
            patient.setPassword(MD5.GetMD5Code(password + salt));
            patient.setStatus(1);
            patient.setDisease(0);
            patient.setPhoto("");
        }
        // 保存用户信息

+ 67 - 7
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsAllService.java

@ -325,7 +325,7 @@ public class StatisticsAllService extends BaseService {
        String redisNum = "";
        try {
            redisNum = redisTemplate.opsForValue().get("people:num:" + area);
        }catch (Exception e){
        } catch (Exception e) {
            redisNum = "";
        }
        if (StringUtils.isEmpty(redisNum)) {
@ -365,12 +365,12 @@ public class StatisticsAllService extends BaseService {
        signRate.put("sign", total);
        signRate.put("people", num);
        signRate.put("rate", df.format((total * 1.0000) / num * 100));
        json.put("signRate",signRate);
        json.put("signRate", signRate);
        JSONObject signTaskRate = new JSONObject();
        signTaskRate.put("sign", total);
        signTaskRate.put("people", taskNum);
        signTaskRate.put("rate", df.format((total * 1.0000) / taskNum * 100));
        json.put("signTaskRate",signTaskRate);
        json.put("signTaskRate", signTaskRate);
        return json;
    }
@ -412,7 +412,7 @@ public class StatisticsAllService extends BaseService {
                    String redisNum = "";
                    try {
                        redisNum = redisTemplate.opsForValue().get("people:num:" + map.get("code").toString());
                    }catch (Exception e){
                    } catch (Exception e) {
                        redisNum = "";
                    }
                    if (StringUtils.isEmpty(redisNum)) {
@ -521,7 +521,7 @@ public class StatisticsAllService extends BaseService {
                    String redisNum = "";
                    try {
                        redisNum = redisTemplate.opsForValue().get("people:num:" + map.get("code").toString());
                    }catch (Exception e){
                    } catch (Exception e) {
                        redisNum = "";
                    }
                    if (StringUtils.isEmpty(redisNum)) {
@ -567,6 +567,66 @@ public class StatisticsAllService extends BaseService {
        }
    }
    public JSONArray getLowLevelTotalSpecial(String date, String area, int level, String index, int sort, String lowLevel) throws Exception {
        JSONArray result = new JSONArray();
        List<Map<String, Object>> resultList = new ArrayList<>();
        String low_level = String.valueOf(StringUtils.isEmpty(lowLevel) ? (level - 1) : lowLevel);
        String areaField = "";
        String lowLevelField = "";
        String lowLevelName = "";
        if (level == 4) {
            // 市级别
            areaField = "city";
        } else if (level == 3) {
            // 区、城镇级别
            areaField = "town";
        } else if (level == 2) {
            // 机构级别
            areaField = "org_code";
        } else if (level == 1) {
            throw new Exception("param level error");
        }
        if (low_level.equals("3")) {
            lowLevelField = "town";
            lowLevelName = "town_name";
        } else if (low_level.equals("2")) {
            lowLevelField = "org_code";
            lowLevelName = "org_name";
        } else if (low_level.equals("1")) {
            lowLevelField = "qkdoctor_code";
            lowLevelName = "qkdoctor_name";
        } else {
            throw new Exception("param lowLevel error");
        }
        // 查询语句
        String sql = " select " +
                "     ifnull(" + lowLevelField + ",'') code " +
                "     ,ifnull(" + lowLevelName + ",'') 'name' " +
                "     ,ifnull(result,'0/0') amount" +
                " from  " +
                "     wlyy_quota_result " +
                " where " +
                "     quato_code = '" + index + "' " +
                "   and level1_type = ? and del = '1'" +
                "   and quota_date = ? " +
                "   and " + areaField + " = ? ";
        resultList = jdbcTemplate.queryForList(sql, new Object[]{low_level, date, area});
        if (resultList != null && resultList.size() > 0) {
        } else {
            resultList = getLowLevelMapKey(level, low_level, area);
        }
        return result;
    }
    /**
     * 获取过去某个日期某个区域一级指标的下级统计
     *
@ -1430,7 +1490,7 @@ public class StatisticsAllService extends BaseService {
            String redisNum = "";
            try {
                redisNum = redisTemplate.opsForValue().get("people:num:" + area);
            }catch (Exception e){
            } catch (Exception e) {
                redisNum = "";
            }
@ -1450,7 +1510,7 @@ public class StatisticsAllService extends BaseService {
            String redisNum = "";
            try {
                redisNum = redisTemplate.opsForValue().get("people:num:" + area);
            }catch (Exception e){
            } catch (Exception e) {
                redisNum = "";
            }
            if (StringUtils.isEmpty(redisNum)) {

+ 1 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/WechatController.java

@ -296,6 +296,7 @@ public class WechatController extends WeixinBaseController {
            patient.setName(name);
            patient.setIdcard(idcard);
            patient.setMobile(mobile);
            patient.setPhoto("");
            //增加密码
            String salt= UUID.randomUUID().toString().replace("-","");
            patient.setSalt(salt);

+ 1 - 1
patient-co-wlyy/src/main/resources/system.properties

@ -64,7 +64,7 @@ wechat_token=27eb3bb24f149a7760cf1bb154b08040
#是否签约检查和签约数据上传
sign_check_upload=http://172.19.103.87:8011/wlyy_service
#im一对一列表获取
im_list_get=http://localhost:3000/
im_list_get=http://172.19.103.76:3000/
#-------------测试------------#
#server_ip=ehr.yihu.com