瀏覽代碼

Merge branch 'dev' of liubing/wlyy2.0 into dev

liubing 3 年之前
父節點
當前提交
5d8f8d4153

+ 2 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/device/PatientDeviceService.java

@ -915,7 +915,8 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
                result.put(ResponseContant.resultMsg,"居民未绑定该设备");
            }else {
                String sql = "select dd.photo,GROUP_CONCAT( p.name) as patientName,pd.device_sn,dd.brands,dd.category_code,dd.model,pd.device_name,date_format(pd.czrq,'%Y-%m-%d %H:%i:%S' ) deviceTime " +
                        "from dm_device dd INNER JOIN wlyy_patient_device pd on dd.category_code = pd.category_code INNER JOIN base_patient p on p.id = pd.user \n" +
                        "from dm_device dd INNER JOIN wlyy_patient_device pd on dd.category_code = pd.category_code INNER JOIN base_patient p on p.id = pd.user " +
                        " INNER JOIN wlyy_devices wd on dd.model = wd.device_model and pd.device_sn = wd.device_code " +
                        "where 1=1 and  pd.del=0 and pd.device_sn ='"+deviceSn+"' group by pd.device_sn";
                Map<String,Object> devInfo = jdbcTemplate.queryForMap(sql);
                devInfo.put("patient",patient);

+ 10 - 9
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/statistics/StatisticsService.java

@ -676,16 +676,17 @@ public class StatisticsService {
    public JSONArray capacityAssessment(String endDate, String area, int level) throws Exception{
        //评估类型
        JSONArray jsonArray = new JSONArray();
        List<SaveModel> list = statisticsUtilService.findDateAllQuotaLevel1Sort(endDate,endDate,area,level,"37",SaveModel.timeLevel_DDL,null,null);
        for(int i=0;i<list.size();i++){
            SaveModel saveModel = list.get(i);
        String sql = " select dict.dict_code,dict_value,count(DISTINCT lab.patient) total from wlyy_hospital_sys_dict dict \n" +
                "LEFT JOIN wlyy_patient_label lab  on  dict.dict_code = lab.label_code\n" +
                "where  dict.dict_name='service_type' and  dict.dict_code is not null and dict_code<>5  \n" +
                " GROUP BY dict.dict_code; ";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
//        List<SaveModel> list = statisticsUtilService.findDateAllQuotaLevel1Sort(endDate,endDate,area,level,"37",SaveModel.timeLevel_DDL,null,null);
        for(Map<String,Object> map:list){
            JSONObject json = new JSONObject();
            if (saveModel.getResult2().longValue()==0&&StringUtils.isBlank(saveModel.getSlaveKey1())){
                continue;
            }
            json.put("num",saveModel.getResult2().longValue());
            json.put("code",saveModel.getSlaveKey1());
            json.put("name",saveModel.getSlaveKey1Name());
            json.put("num",Integer.parseInt(map.get("total").toString()) );
            json.put("code",map.get("dict_code").toString());
            json.put("name",map.get("dict_value").toString());
            jsonArray.add(json);
        }
        return jsonArray;