浏览代码

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

esb 8 年之前
父节点
当前提交
d8f9c8696b

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/record/HealthDataService.java

@ -41,7 +41,7 @@ public class HealthDataService extends BaseService {
            if (status == 200){
                String xmlData = jsonObject.getString("data");
                if (!StringUtils.isEmpty(xmlData)){
                    String xmlJson = XMLUtil.xml2JSON(xmlData);
                    String xmlJson = XMLUtil.xml2json(xmlData);
                    result = new JSONObject(xmlJson);
                }
            }

+ 0 - 10
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/record/InspectionService.java

@ -196,14 +196,4 @@ public class InspectionService extends BaseService {
        return result;
    }
    public static void main(String[] args) {
        InspectionService service = new InspectionService();
        try {
            service.getHealthData("BSGML0000963","86A1F1109D5E48F9BFE659CE2677E2F1","0101","1");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

文件差异内容过多而无法显示
+ 5 - 5
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/record/OutpatientService.java


+ 8 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/scheduling/DoctorWorkTimeService.java

@ -57,7 +57,14 @@ public class DoctorWorkTimeService extends BaseService {
        result.put("workTime", workTime != null ? new JSONObject(workTime) : "");
        result.put("workWeeks", workWeekList != null ? new JSONArray(workWeekList) : "");
        result.put("doctor", doc != null ? new JSONObject(doc) : "");
        JSONObject docJson = new JSONObject(doc);
        if(docJson.has("password")) {
            docJson.remove("password");
        }
        if(docJson.has("salt")) {
            docJson.remove("salt");
        }
        result.put("doctor", doc != null ? docJson : "");
        return result;
    }

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

@ -1325,6 +1325,12 @@ public class FamilyContractService extends BaseService {
        if (p != null) {
            JSONObject pJson = new JSONObject(p);
            if (pJson.has("password")) {
                pJson.remove("password");
            }
            if (pJson.has("salt")) {
                pJson.remove("salt");
            }
            result.put("patient", pJson);
        }

+ 21 - 12
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

@ -206,7 +206,7 @@ public class StatisticsService extends BaseService {
        if (result != null && result.size() > 0) {
            return (result.get(0).get("amount") != null ? (Long.valueOf(result.get(0).get("amount").toString()) + todayAmount) : todayAmount);
        } else {
            return 0;
            return todayAmount;
        }
    }
@ -256,7 +256,7 @@ public class StatisticsService extends BaseService {
        // 截止日期包含当天,则从redis查询当天统计数据
        if (endDate.compareTo(new SimpleDateFormat("yyyy-MM-dd").format(new Date())) >= 0) {
            String val = redisTemplate.opsForValue().get("quota:16:" + level + ":" + area);
            String val = redisTemplate.opsForValue().get("quota:16:" + level + ":0:" + area);
            if (!StringUtils.isEmpty(val)) {
                JSONObject valJson = new JSONObject(val);
                if (valJson.has("num")) {
@ -270,7 +270,7 @@ public class StatisticsService extends BaseService {
        if (result != null && result.size() > 0) {
            return (result.get(0).get("amount") != null ? (Long.valueOf(result.get(0).get("amount").toString()) + todayAmount) : todayAmount);
        } else {
            return 0;
            return todayAmount;
        }
    }
@ -1855,6 +1855,9 @@ public class StatisticsService extends BaseService {
                        List<Hospital> hospitals = hospitalDao.findByTownCode(town.getCode());
                        for (Hospital hos : hospitals) {
                            if(hos.getCode().length() > 10){
                                continue;
                            }
                            Map<String, Object> obj = new HashMap<>();
                            obj.put("code", hos.getCode());
                            obj.put("name", hos.getName());
@ -1878,6 +1881,9 @@ public class StatisticsService extends BaseService {
                if (hospitals != null && hospitals.size() > 0) {
                    for (Hospital hos : hospitals) {
                        if(hos.getCode().length() > 10){
                            continue;
                        }
                        List<AdminTeam> teams = adminTeamDao.findByOrgCode(hos.getCode());
                        for (AdminTeam team : teams) {
@ -1918,6 +1924,8 @@ public class StatisticsService extends BaseService {
                        PopulationBase peopleNum = peopleNumDao.findByCodeAndYear(map.get("code").toString(), Calendar.getInstance().get(Calendar.YEAR));
                        if (peopleNum != null) {
                            map.put("rate", df.format(((long) map.get("amount") * 1.0000) / peopleNum.getNum() * 100));
                            map.put("taskRate", df.format(((long) map.get("amount") * 1.0000) / peopleNum.getTaskNum() * 100));
                            map.put("targetRate",  df.format(peopleNum.getTaskNum() * 1.0000/ peopleNum.getNum() * 100));
                            map.put("num", peopleNum.getNum());
                            map.put("task", peopleNum.getTaskNum());
                        }
@ -1925,11 +1933,12 @@ public class StatisticsService extends BaseService {
                        JSONObject peopleNum = new JSONObject(redisNum);
                        if (peopleNum != null) {
                            map.put("rate", df.format(((long) map.get("amount") * 1.0000) / peopleNum.getInt("num") * 100));
                            map.put("taskRate", df.format(((long) map.get("amount") * 1.0000) / peopleNum.getInt("taskNum") * 100));
                            map.put("targetRate", df.format(peopleNum.getInt("taskNum") * 1.0000 / peopleNum.getInt("num") * 100));
                            map.put("num", peopleNum.getInt("num"));
                            map.put("task", peopleNum.getInt("taskNum"));
                        }
                    }
                }
            }
@ -2506,7 +2515,7 @@ public class StatisticsService extends BaseService {
                "     quato_code = '" + index + "' " +
                "   and level1_type = '" + level + "' and del = '1' " +
                "   and quota_date >= '" + startDate + "' " +
                "   and quota_date <= '" + endDate + "' " +
                "   and quota_date <= '" + dateCon + "' " +
                "   and " + areaField + " = '" + area + "' ";
        List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql);
@ -2650,7 +2659,7 @@ public class StatisticsService extends BaseService {
                Map<String, Object> manbing = new HashMap<>();
                manbing.put("code", "2");
                manbing.put("name", "慢病人群");
                manbing.put("name", "慢病人群65岁以下");
                manbing.put("amount", Double.valueOf("0.0"));
                resultList.add(manbing);
@ -2678,11 +2687,11 @@ public class StatisticsService extends BaseService {
                tnbGxy.put("amount", Double.valueOf("0.0"));
                resultList.add(tnb);
//                Map<String, Object> mn65LowGxy = new HashMap<>();
//                mn65LowGxy.put("code", "7");
//                mn65LowGxy.put("name", "慢病人群65岁以上");
//                mn65LowGxy.put("amount", Double.valueOf("0.0"));
//                resultList.add(mn65LowGxy);
                Map<String, Object> mb65UpGxy = new HashMap<>();
                mb65UpGxy.put("code", "7");
                mb65UpGxy.put("name", "慢病人群65岁以上");
                mb65UpGxy.put("amount", Double.valueOf("0.0"));
                resultList.add(mb65UpGxy);
            } else if (index.equals(AGE)) {
                Map<String, Object> map1 = new HashMap<>();
                map1.put("code", "1");
@ -2791,7 +2800,7 @@ public class StatisticsService extends BaseService {
                if (index.equals(GROUP)) {
                    // 分组指标总数算法
                    String code = map.get("code") != null ? String.valueOf(map.get("code")) : "";
                    if (code.equals("0") || code.equals("1") || code.equals("2") || code.equals("3")) {
                    if (code.equals("0") || code.equals("1") || code.equals("2") || code.equals("3") || code.equals("7")) {
                        total += (long) map.get("amount");
                    }
                } else if (index.equals("16")) {

+ 4 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/util/XMLUtil.java

@ -308,6 +308,10 @@ public class XMLUtil {
            jp = xmlMapper.getFactory().createParser(xml);
            JsonGenerator jg = objectMapper.getFactory().createGenerator(w);
            while (jp.nextToken() != null) {
                String name = jp.getParsingContext().getCurrentName();
                if ("".equals(name)){
                    jp.overrideCurrentName("text");
                }
                jg.copyCurrentEvent(jp);
            }
            jp.close();