Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

wangzhinan 4 months ago
parent
commit
d903ee1493

+ 4 - 4
svr/svr-iot/src/main/java/com/yihu/iot/datainput/service/DataInputService.java

@ -183,9 +183,9 @@ public class DataInputService {
        if(StringUtils.isBlank(data)){
            throw new ServiceException("设备数据data不能为空");
        }
//        if(data.length()>60000){
//            throw new ServiceException("设备数据data超过最大允许字符");
//        }
        if(json.length()>60000){
            throw new ServiceException("jsonData超过最大允许字符");
        }
//        String categoryCode = jsonObject.getString("categoryCode");
//        if(StringUtils.isBlank(categoryCode)){
//            throw new ServiceException("设备类型不能为空");
@ -198,7 +198,7 @@ public class DataInputService {
            IotDeviceUploadRecordDO recordDO = new IotDeviceUploadRecordDO();
            recordDO.setDeviceSn(deviceSn);
            recordDO.setHospital(hospital);
            recordDO.setJsonData(data);
            recordDO.setJsonData(json);
            recordDO.setCategoryCode("uploadDeviceData");
            recordDO.setStatus(0);
            recordDO.setCreateTime(new Date());

+ 2 - 2
svr/svr-iot/src/main/java/com/yihu/iot/service/monitorPlatform/MonitorPlatformService.java

@ -1119,8 +1119,8 @@ public class MonitorPlatformService {
            }
        }
        if (tz_type.toString().contains("1")||tz_type.toString().contains("2")){
            StringBuffer sql = new StringBuffer("select  A.*,d.name from ( SELECT  m.sender,m.sender_name,m.create_time,m.value1,m.value2,m.tz_type,p.address," +
                    "p.photo,m.receiver  ");
            StringBuffer sql = new StringBuffer("select  A.*,d.name from ( SELECT  m.sender,m.sender_name,date_format(m.create_time ,'%Y-%m-%d %H:%i:%S' ) create_time" +
                    ",m.value1,m.value2,m.tz_type,p.address,p.photo,m.receiver  ");
            sql.append("from wlyy.wlyy_message m INNER JOIN wlyy.wlyy_patient p on m.sender=p.code ");
            if(!StringUtils.isEmpty(area)||!StringUtils.isEmpty(hospital)){
                sql.append("INNER join wlyy.wlyy_sign_family f on f.`status`>0 and f.patient = m.sender ");

+ 9 - 17
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

@ -137,7 +137,7 @@ public class RehabilitationManageService {
//                resultMap.put("age",age);
                resultMap.put("hospitalName", one.get("hospital_name"));
//                resultMap.put("sex","1".equals(sex)?"男":("2".equals(sex)?"女":"未知"));
                resultMap.put("patientName", one.get("patientName"));
                resultMap.put("patientName", one.get("name"));
                resultMap.put("patientCode", one.get("patient"));
                resultMap.put("id", one.get("id"));
                resultMap.put("status", one.get("status"));//康复计划状态
@ -491,7 +491,9 @@ public class RehabilitationManageService {
        for (int i = 1; i < planIdlist.length; i++) {
            planCondition.append(",'" + planIdlist[i] + "'");
        }
        String sql = " select d.*,DATE_FORMAT(d.execute_time,'%Y/%m/%d %H:%i') as executeTime ,i.code,IF(d.followup_detail_type=1,'社区随访(厦心)',i.name) name,1 as flag from wlyy_specialist.wlyy_rehabilitation_plan_detail d " +
        String sql = " select d.*,DATE_FORMAT(d.execute_time,'%Y/%m/%d %H:%i') as executeTime ,i.code,IF(d.followup_detail_type=1,'社区随访(厦心)',i.name) name,1 as flag,p.disease " +
                " from wlyy_specialist.wlyy_rehabilitation_plan_detail d " +
                " LEFT JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p on p.id = d.plan_id  " +
                " LEFT JOIN wlyy_rehabilitation_service_item i on i.code = d.hospital_service_item_id  " +
                " where  d.plan_id in (" + planCondition + " )AND  d.execute_time IS NOT NULL  and d.execute_time <>'' ";
        if (searchTask != null) {
@ -575,16 +577,14 @@ public class RehabilitationManageService {
        }
        String planDetailResult = StringUtils.isNotEmpty(planDetailList) ? planDetailList.substring(1) : "";
        String sql = "select i.name,i.code,i.content,d.execute_time,d.hospital_name,d.id,d.status,d.type as detailType,d.expense,d.doctor as executeDoctor," +
                " d.doctor_name as executeDoctorName,p.patient ,p.id AS planId,p.create_user as createDoctor,p.create_user_name as createDoctorName, p.status as planStatus  " +
                " d.doctor_name as executeDoctorName,p.patient ,p.id AS planId,p.create_user as createDoctor,p.create_user_name as createDoctorName, p.status as planStatus" +
                " ,pa.idcard,pa.birthday  " +
                " from wlyy_specialist.wlyy_rehabilitation_plan_detail d " +
                " LEFT JOIN wlyy_specialist.wlyy_rehabilitation_service_item i on i.code = d.hospital_service_item_id " +
                " LEFT JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p on d.plan_id=p.id " +
                " LEFT JOIN wlyy.wlyy_patient pa on pa.code=p.patient " +
                " where d.id in (" + planDetailResult + ") order BY d.execute_time ASC ";
        sql = TransforSqlUtl.wlyy_patient_rehabilitation_planCreateName(sql);
        sql = TransforSqlUtl.wlyy_rehabilitation_plan_detailDoctorName(sql);
        List<Map<String, Object>> serviceItemList = jdbcTemplate.queryForList(sql);
//        if(serviceItemList.size()>0){
//            Map<String,Object> serviceItem = serviceItemList.get(0);
        List<Map<String, Object>> resultList = new ArrayList<>();
        for (Map<String, Object> one : serviceItemList) {
            Map<String, Object> resultMap = new HashMap<>();
@ -593,9 +593,6 @@ public class RehabilitationManageService {
                isMyTask = 1;
            }
            resultMap.put("isMyTask", isMyTask);//0不是自己的任务,1是自己的任务
//            if(!(one.get("specialistDoctor")+"").equals((one.get("create_user")+""))){
//                executeDoctorList.add(one.get("create_user_name")+"");
//            }
            List<String> executeDoctorList = new ArrayList<>();
            executeDoctorList.add(one.get("executeDoctorName") + "");
            resultMap.put("executeDoctorList", executeDoctorList);//执行医生名称列表
@ -603,6 +600,8 @@ public class RehabilitationManageService {
            resultMap.put("executeDoctorName", one.get("executeDoctorName") + "");//执行医生code
            resultMap.put("specialistDoctorCode", one.get("createDoctor") + "");//创建人(专科)医生code
            resultMap.put("specialistDoctorName", one.get("createDoctorName") + "");//创建人(专科)医生名字
            String birthday = one.get("birthday")==null?"":one.get("birthday")+"";
            resultMap.put("age", IdCardUtil.getAgeByBirthdayStrOrIdcard(one.get("idcard")+"",birthday));//年龄
            resultMap.put("title", one.get("name"));//项目标题
            resultMap.put("planDetaiId", one.get("id"));//计划服务项目id
            resultMap.put("planId", one.get("planId"));//计划id
@ -653,7 +652,6 @@ public class RehabilitationManageService {
            List<RehabilitationOperateRecordsDO> operateList = rehabilitationOperateRecordsDao.findByRehabilitationDetailId(one.get("id").toString());
            Integer operate = 0;
            if (operateList.size() > 0) {
                operate = 1;
                RehabilitationOperateRecordsDO temp = operateList.get(0);
                operate = 1;
                Date completeTime = temp.getCompleteTime();
@ -669,8 +667,6 @@ public class RehabilitationManageService {
            resultList.add(resultMap);
        }
        return ObjEnvelop.getSuccess(SpecialistMapping.api_success, resultList);
//        }
//        return MixEnvelop.getError("没有该服务项详情信息!");
    }
    /**
@ -690,10 +686,6 @@ public class RehabilitationManageService {
                " LEFT JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p on d.plan_id=p.id " +
                " LEFT JOIN wlyy_specialist.wlyy_plan_detail_appointment a on d.id=.a.rehabilitation_plan_detail_id " +
                " where d.id = '" + planDetailId + "'";
        sql = TransforSqlUtl.wlyy_patient_rehabilitation_planName2(sql);
        sql = TransforSqlUtl.wlyy_patient_rehabilitation_planCreateName(sql);
        sql = TransforSqlUtl.wlyy_plan_detail_appointmentAppDoctorName(sql);
        sql = TransforSqlUtl.wlyy_rehabilitation_plan_detailDoctorName(sql);
        List<Map<String, Object>> serviceItemList = jdbcTemplate.queryForList(sql);
        if (serviceItemList.size() == 0) {
            return ObjEnvelop.getSuccess(SpecialistMapping.api_success, new HashMap<>());