소스 검색

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

liubing 4 년 전
부모
커밋
1fc2078273

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/assistance/EmergencyAssistanceEndpoint.java

@ -197,7 +197,7 @@ public class EmergencyAssistanceEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "updateConclusion")
    @PostMapping(value = "updateConclusion")
    @ApiOperation(value = "医生编辑救助服务小结")
    @ApiOperation(value = "医生编辑救助服务小结")
    @ObserverRequired
    @ObserverRequired
    public ObjEnvelop updateConclusion(@ApiParam(value = "字典emergency_reason值",name = "treatment_status",required = true)
    public ObjEnvelop updateConclusion(@ApiParam(value = "字典emergency_reason值",name = "emergency_reason",required = true)
                                       @RequestParam Integer emergency_reason,
                                       @RequestParam Integer emergency_reason,
                                       @ApiParam(value = "字典emergency_treatment_status值",name = "treatment_status",required = true)
                                       @ApiParam(value = "字典emergency_treatment_status值",name = "treatment_status",required = true)
                                       @RequestParam Integer treatment_status,
                                       @RequestParam Integer treatment_status,

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/device/DoctorHealthController.java

@ -208,7 +208,7 @@ public class DoctorHealthController extends BaseController {
				map.put("xl", xl);
				map.put("xl", xl);
			}
			}
			DevicePatientHealthIndex tw = healthIndexService.findLastByPatienIot(patient, 6);
			DevicePatientHealthIndex tw = healthIndexService.findLastByPatienIot(patient, 6);
			if (xl != null) {
			if (tw != null) {
				map.put("tw", tw);
				map.put("tw", tw);
			}
			}
			return write(200, "查询成功", "data", map);
			return write(200, "查询成功", "data", map);

+ 15 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/lifeCare/DoctorLifeCareEndpoint.java

@ -100,4 +100,19 @@ public class DoctorLifeCareEndpoint extends EnvelopRestEndpoint {
            return Envelop.getError( "记录失败" ,-1);
            return Envelop.getError( "记录失败" ,-1);
        }
        }
    }
    }
    @GetMapping(value = "getPatientOrderList")
    @ApiOperation(value = "医生查看居民工单列表")
    public PageEnvelop getPatientOrderList(
            @ApiParam(name = "patient", value = "居民code") @RequestParam(value = "patient", required = true) String patient,
            @ApiParam(name = "status", value = "工单状态") @RequestParam(value = "status", required = false) Integer status,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1") @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15") @RequestParam(value = "size") int size) {
        try{
            return lifeCareOrderService.getPatientOrderList(patient, status, page, size);
        }catch (Exception e){
            e.printStackTrace();
        }
        return PageEnvelop.getError("查询失败");
    }
}
}

+ 2 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/security/SecurityMonitoringOrderEndpoint.java

@ -148,7 +148,7 @@ public class SecurityMonitoringOrderEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "reason", value = "取消理由") @RequestParam(value = "reason", required = false) String reason,
            @ApiParam(name = "reason", value = "取消理由") @RequestParam(value = "reason", required = false) String reason,
            @ApiParam(name = "doctor", value = "doctor") @RequestParam(value = "doctor", required = true) String doctor,
            @ApiParam(name = "doctor", value = "doctor") @RequestParam(value = "doctor", required = true) String doctor,
            @ApiParam(name = "cancel_type", value = "取消类型 1-调度员取消,2-居民取消 3 医生取消")
            @ApiParam(name = "cancel_type", value = "取消类型 1-调度员取消,2-居民取消 3 医生取消")
            @RequestParam(value = "cancel_type",required = false) Integer cancel_type) {
            @RequestParam(value = "cancel_type",required = false,defaultValue = "3") Integer cancel_type) {
        JSONObject result = new JSONObject();
        JSONObject result = new JSONObject();
        try{
        try{
            result = securityMonitoringOrderService.cancelOrder(orderId, cancel_type, reason,doctor);
            result = securityMonitoringOrderService.cancelOrder(orderId, cancel_type, reason,doctor);
@ -195,7 +195,7 @@ public class SecurityMonitoringOrderEndpoint extends EnvelopRestEndpoint {
    @ObserverRequired
    @ObserverRequired
    @ApiOperation("编辑保存服务工单小结")
    @ApiOperation("编辑保存服务工单小结")
    public ObjEnvelop updateDoorConclusion(
    public ObjEnvelop updateDoorConclusion(
            @ApiParam(value = "字典emergency_reason值",name = "treatment_status",required = true)
            @ApiParam(value = "字典emergency_reason值",name = "emergency_reason",required = true)
            @RequestParam Integer emergency_reason,
            @RequestParam Integer emergency_reason,
            @ApiParam(value = "字典emergency_treatment_status值",name = "treatment_status",required = true)
            @ApiParam(value = "字典emergency_treatment_status值",name = "treatment_status",required = true)
            @RequestParam Integer treatment_status,
            @RequestParam Integer treatment_status,

+ 3 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/sign/SignEndpoint.java

@ -253,12 +253,14 @@ public class SignEndpoint extends EnvelopRestEndpoint {
            @RequestParam(value = "levelConclusion",required = false) Integer levelConclusion,
            @RequestParam(value = "levelConclusion",required = false) Integer levelConclusion,
            @ApiParam(name = "servicePackageStatus", value = "服务包分配(0未分配,1已分配)", required = false)
            @ApiParam(name = "servicePackageStatus", value = "服务包分配(0未分配,1已分配)", required = false)
            @RequestParam(value = "servicePackageStatus",required = false) Integer servicePackageStatus,
            @RequestParam(value = "servicePackageStatus",required = false) Integer servicePackageStatus,
            @ApiParam(name = "type", value = "type 0当年 1全部", required = false)
            @RequestParam(value = "type",required = false,defaultValue = "0") Integer type,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
            @RequestParam(value = "size") int size) throws Exception {
        try{
        try{
            return capacityAssessmentRecordService.assessmentPage(doctorId, name, page, size, status, levelConclusion, servicePackageStatus);
            return capacityAssessmentRecordService.assessmentPage(doctorId, name, type,page, size, status, levelConclusion, servicePackageStatus);
        }catch (Exception e){
        }catch (Exception e){
            e.printStackTrace();
            e.printStackTrace();
            return PageEnvelop.getError("查询失败");
            return PageEnvelop.getError("查询失败");

+ 8 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/assistance/EmergencyAssistanceService.java

@ -11,9 +11,11 @@ import com.yihu.jw.care.dao.security.EmergencyWarnDoctorResponseDao;
import com.yihu.jw.care.dao.sign.ServicePackageItemDao;
import com.yihu.jw.care.dao.sign.ServicePackageItemDao;
import com.yihu.jw.care.dao.sign.ServicePackageSignRecordDao;
import com.yihu.jw.care.dao.sign.ServicePackageSignRecordDao;
import com.yihu.jw.care.dao.team.BaseTeamMemberDao;
import com.yihu.jw.care.dao.team.BaseTeamMemberDao;
import com.yihu.jw.care.service.common.DictService;
import com.yihu.jw.care.service.consult.ConsultTeamService;
import com.yihu.jw.care.service.consult.ConsultTeamService;
import com.yihu.jw.care.service.device.PatientDeviceService;
import com.yihu.jw.care.service.device.PatientDeviceService;
import com.yihu.jw.care.service.family.PatientFamilyMemberService;
import com.yihu.jw.care.service.family.PatientFamilyMemberService;
import com.yihu.jw.care.util.ConstantUtil;
import com.yihu.jw.care.util.CountDistance;
import com.yihu.jw.care.util.CountDistance;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
@ -93,6 +95,8 @@ public class EmergencyAssistanceService extends BaseJpaService<EmergencyAssistan
    private SystemMessageDao systemMessageDao;
    private SystemMessageDao systemMessageDao;
    @Autowired
    @Autowired
    private ConsultDao consultDao;
    private ConsultDao consultDao;
    @Autowired
    private DictService dictService;
    /**
    /**
     * 新建居民紧急救助
     * 新建居民紧急救助
@ -292,6 +296,8 @@ public class EmergencyAssistanceService extends BaseJpaService<EmergencyAssistan
        if (assistanceDO.getStatus()==0){
        if (assistanceDO.getStatus()==0){
            EmergencyWarnConclusionDO conclusionDO = emergencyWarnConclusionDao.findByOrderId(assistanceDO.getId());
            EmergencyWarnConclusionDO conclusionDO = emergencyWarnConclusionDao.findByOrderId(assistanceDO.getId());
            if (conclusionDO!=null){
            if (conclusionDO!=null){
                conclusionDO.setReasonName(dictService.fingByNameAndCode(ConstantUtil.DICT_EMERGENCY_REASON,String.valueOf(conclusionDO.getEmergencyReason())));
                conclusionDO.setTreatmentStatusName(dictService.fingByNameAndCode(ConstantUtil.DICT_EMERGENCY_TREATMENT_STATUS,String.valueOf(conclusionDO.getEmergencyTreatmentStatus())));
                emergencyOrderVO.setEmergencyWarnConclusionDO(conclusionDO);
                emergencyOrderVO.setEmergencyWarnConclusionDO(conclusionDO);
            }
            }
        }
        }
@ -621,7 +627,7 @@ public class EmergencyAssistanceService extends BaseJpaService<EmergencyAssistan
        emergencyAssistanceDao.save(assistanceDO);
        emergencyAssistanceDao.save(assistanceDO);
        String failMsg = "当前救助工单已取消";
        String failMsg = "当前救助工单已取消";
        result.put(ResponseContant.resultFlag, ResponseContant.success);
        result.put(ResponseContant.resultFlag, ResponseContant.success);
        result.put(ResponseContant.resultMsg,assistanceDO);
        result.put(ResponseContant.resultMsg,JSONObject.parseObject(JSON.toJSONStringWithDateFormat(assistanceDO,"yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteMapNullValue)));
        return result;
        return result;
    }
    }
@ -768,6 +774,7 @@ public class EmergencyAssistanceService extends BaseJpaService<EmergencyAssistan
            return result;
            return result;
        }
        }
        BaseDoctorDO doctorDO = doctorDao.findById(doctor);
        BaseDoctorDO doctorDO = doctorDao.findById(doctor);
        assistanceDO.setStatus(-2);
        assistanceDO.setUpdateTime(new Date());
        assistanceDO.setUpdateTime(new Date());
        assistanceDO.setUpdateUserName(doctorDO.getName());
        assistanceDO.setUpdateUserName(doctorDO.getName());
        assistanceDO.setUpdateUser(doctorDO.getId());
        assistanceDO.setUpdateUser(doctorDO.getId());

+ 9 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/consult/ConsultTeamService.java

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.dao.doorCoach.BaseDoorCoachOrderDao;
import com.yihu.jw.care.dao.doorCoach.BaseDoorCoachOrderDao;
import com.yihu.jw.care.dao.sign.ServicePackageSignRecordDao;
import com.yihu.jw.care.dao.sign.ServicePackageSignRecordDao;
import com.yihu.jw.care.service.doorCoach.PatientDoorCoachOrderService;
import com.yihu.jw.care.service.family.PatientFamilyMemberService;
import com.yihu.jw.care.service.family.PatientFamilyMemberService;
import com.yihu.jw.care.service.sign.ServicePackageService;
import com.yihu.jw.care.service.sign.ServicePackageService;
import com.yihu.jw.care.util.MessageUtil;
import com.yihu.jw.care.util.MessageUtil;
@ -62,6 +63,8 @@ public class ConsultTeamService {
    private PatientFamilyMemberService familyMemberService;
    private PatientFamilyMemberService familyMemberService;
    @Autowired
    @Autowired
    private SystemMessageDao systemMessageDao;
    private SystemMessageDao systemMessageDao;
    @Autowired
    private PatientDoorCoachOrderService doorCoachOrderService;
    public JSONObject updateIMMsg(String sessionId,String sessionType,String msgId,String content){
    public JSONObject updateIMMsg(String sessionId,String sessionType,String msgId,String content){
@ -299,7 +302,12 @@ public class ConsultTeamService {
        //4、 上门服务咨询-参与者
        //4、 上门服务咨询-参与者
        JSONObject participants = new JSONObject();
        JSONObject participants = new JSONObject();
        participants.put(patient, 0);
        participants.put(patient, 0);
        //调度员加入
        String orderHospital = doorServiceOrderDO.getHospital();
        List<Map<String,Object>> dispatcherInfoList =  doorCoachOrderService.queryDispatcherInfoByHospital(orderHospital);
        for (Map<String,Object> tmp:dispatcherInfoList){
            participants.put(tmp.get("code").toString(), 0);
        }
        String content = patientDO.getName() + "-上门辅导服务咨询";
        String content = patientDO.getName() + "-上门辅导服务咨询";
        JSONObject messages = imUtill.getCreateTopicMessage(patient, patientDO.getName(), consult.getTitle(), content, consult.getImages(), "");
        JSONObject messages = imUtill.getCreateTopicMessage(patient, patientDO.getName(), consult.getTitle(), content, consult.getImages(), "");

+ 20 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/lifeCare/LifeCareOrderService.java

@ -19,6 +19,7 @@ import com.yihu.jw.entity.care.lifeCare.LifeCareOrderDO;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.entity.EntityUtils;
import com.yihu.jw.util.entity.EntityUtils;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
@ -541,4 +542,23 @@ public class LifeCareOrderService extends BaseJpaService<LifeCareOrderDO, LifeCa
        return false;
        return false;
    }
    }
    public PageEnvelop getPatientOrderList(String patient, Integer status, int page, int size) {
        page = page>0?page-1:0;
        String sqlCount = "select count(ord.id) from  base_life_care_order ord where ord.patient = '"+patient+"' ";
        String sql = "select ord.id,DATE_FORMAT(ord.create_time,'%Y-%m-%d %H:%i:%S') createTime,DATE_FORMAT(ord.patient_expected_serve_time,'%Y-%m-%d %H:%i:%S') serveTime,ord.status,ord.hospital,ord.hospital_name hospitalName" +
                ",ord.doctor,ord.doctor_name doctorName,ord.expected_doctor_name expectedDoctorName,group_concat(Distinct fee.name SEPARATOR '、') serveItems" +
                " from base_life_care_order ord LEFT JOIN base_life_care_fee_detail fee on ord.id = fee.order_id " +
                "and fee.`status`<>3 where ord.patient = '"+patient+"' ";
        String fliter = "";
       if (status != null){
           fliter += " and ord.status = "+status;
       }
       Long count = jdbcTemplate.queryForObject(sqlCount+fliter,Long.class);
       fliter += " group by ord.id order by ord.create_time desc limit "+page*size+","+size;
       List<Map<String,Object>> result = jdbcTemplate.queryForList(sql+fliter);
       return PageEnvelop.getSuccessListWithPage("查询成功",result,page,size,count);
    }
}
}

+ 2 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/message/PatientMessageService.java

@ -75,7 +75,7 @@ public class PatientMessageService {
     */
     */
    public List<Map<String,Object>> getSystemMessage(String patient){
    public List<Map<String,Object>> getSystemMessage(String patient){
        String sql = " select A.*,B.notRead from " +
        String sql = " select A.*,B.notRead from " +
                "(select  count(1) as 'all',type,create_time  " +
                "(select  count(1) as 'all',type,DATE_FORMAT(create_time,'%Y-%m-%d %H:%i:%S') create_time " +
                "from base_system_message where receiver = '"+patient+"' and del=1 and type='50' GROUP BY type ORDER BY create_time desc)A " +
                "from base_system_message where receiver = '"+patient+"' and del=1 and type='50' GROUP BY type ORDER BY create_time desc)A " +
                "LEFT JOIN (select count(1) notRead,type " +
                "LEFT JOIN (select count(1) notRead,type " +
                "from base_system_message where receiver = '"+patient+"' and is_read=0 and del=1 and type='50' GROUP BY type)B on A.type = B.type " +
                "from base_system_message where receiver = '"+patient+"' and is_read=0 and del=1 and type='50' GROUP BY type)B on A.type = B.type " +
@ -84,7 +84,7 @@ public class PatientMessageService {
    }
    }
    public List<Map<String,Object>> getSystemMessageList(String patient,String type){
    public List<Map<String,Object>> getSystemMessageList(String patient,String type){
        String sql = " select id,title,type,relation_code,sender,sender_name,is_read,code,create_time " +
        String sql = " select id,title,type,relation_code,sender,sender_name,is_read,code,DATE_FORMAT(create_time,'%Y-%m-%d %H:%i:%S') create_time " +
                "from base_system_message where receiver = '"+patient+"' and del=1 and type='"+type+"'  ORDER BY create_time desc";
                "from base_system_message where receiver = '"+patient+"' and del=1 and type='"+type+"'  ORDER BY create_time desc";
        return jdbcTemplate.queryForList(sql);
        return jdbcTemplate.queryForList(sql);
    }
    }

+ 7 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/security/SecurityMonitoringOrderService.java

@ -266,6 +266,8 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
        if (conclusionStatus==2){
        if (conclusionStatus==2){
            EmergencyWarnConclusionDO conclusionDO = emergencyWarnConclusionDao.findByOrderId(orderDO.getId());
            EmergencyWarnConclusionDO conclusionDO = emergencyWarnConclusionDao.findByOrderId(orderDO.getId());
            if (conclusionDO!=null){
            if (conclusionDO!=null){
                conclusionDO.setReasonName(dictService.fingByNameAndCode(ConstantUtil.DICT_EMERGENCY_REASON,String.valueOf(conclusionDO.getEmergencyReason())));
                conclusionDO.setTreatmentStatusName(dictService.fingByNameAndCode(ConstantUtil.DICT_EMERGENCY_TREATMENT_STATUS,String.valueOf(conclusionDO.getEmergencyTreatmentStatus())));
                emergencyOrderVO.setEmergencyWarnConclusionDO(conclusionDO);
                emergencyOrderVO.setEmergencyWarnConclusionDO(conclusionDO);
            }
            }
        }
        }
@ -335,17 +337,19 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
                if (StringUtils.isBlank(doc.getDoctorLat()) || StringUtils.isBlank(doc.getDoctorLon())) {
                if (StringUtils.isBlank(doc.getDoctorLat()) || StringUtils.isBlank(doc.getDoctorLon())) {
                    continue;
                    continue;
                }
                }
                double distanceTmp = countDistance.getDistance(Double.parseDouble(orderDO.getServeLat()),Double.parseDouble(orderDO.getServeLon()),Double.parseDouble(doc.getDoctorLat()),Double.parseDouble(doc.getDoctorLon()));
                otherDoctorDistanceObj = new JSONObject();
                otherDoctorDistanceObj = new JSONObject();
                otherDoctorDistanceObj.put("doctor",doc.getId());
                otherDoctorDistanceObj.put("doctor",doc.getId());
                otherDoctorDistanceObj.put("doctorName",doc.getName());
                otherDoctorDistanceObj.put("doctorName",doc.getName());
                otherDoctorDistanceObj.put("doctorAddress",doc.getDoctorLocateAddress());
                otherDoctorDistanceObj.put("doctorAddress",doc.getDoctorLocateAddress());
                otherDoctorDistanceObj.put("doctorLon",doc.getDoctorLon());
                otherDoctorDistanceObj.put("doctorLon",doc.getDoctorLon());
                otherDoctorDistanceObj.put("doctorLat",doc.getDoctorLat());
                otherDoctorDistanceObj.put("doctorLat",doc.getDoctorLat());
                otherDoctorDistanceObj.put("distance",doc);//两点距离
                otherDoctorDistanceObj.put("distance",distanceTmp);//两点距离
                otherDoctorDistance.add(otherDoctorDistanceObj);
                otherDoctorDistance.add(otherDoctorDistanceObj);
            }
            }
            emergencyOrderVO.setOtherDoctorDistance(otherDoctorDistance.toJSONString());
            emergencyOrderVO.setOtherDoctorDistance(otherDoctorDistance.toJSONString());
        }
        }
        emergencyOrderVO.setNoticePersons(noticePersons);
        JSONObject jsonObject = JSON.parseObject(JSON.toJSONStringWithDateFormat(emergencyOrderVO,"yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteMapNullValue));
        JSONObject jsonObject = JSON.parseObject(JSON.toJSONStringWithDateFormat(emergencyOrderVO,"yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteMapNullValue));
        //获取咨询
        //获取咨询
@ -375,6 +379,7 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
            return result;
            return result;
        }
        }
        BaseDoctorDO doctorDO = baseDoctorDao.findById(doctor);
        BaseDoctorDO doctorDO = baseDoctorDao.findById(doctor);
        orderDO.setStatus(-2);
        orderDO.setCancelTime(new Date());
        orderDO.setCancelTime(new Date());
        orderDO.setUpdateTime(new Date());
        orderDO.setUpdateTime(new Date());
        orderDO.setUpdateUserName(doctorDO.getName());
        orderDO.setUpdateUserName(doctorDO.getName());
@ -662,7 +667,7 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
            logger.error(failMsg);
            logger.error(failMsg);
            return result;
            return result;
        }
        }
        if(orderDO.getStatus() != SecurityMonitoringOrderDO.Status.complete.getType()){
        if(orderDO.getStatus() == SecurityMonitoringOrderDO.Status.complete.getType()){
            String failMsg = "当前工单已结束";
            String failMsg = "当前工单已结束";
            result.put("resultFlag", 0);
            result.put("resultFlag", 0);
            result.put("resultMsg", failMsg);
            result.put("resultMsg", failMsg);

+ 5 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/sign/CapacityAssessmentRecordService.java

@ -149,14 +149,17 @@ public class CapacityAssessmentRecordService extends BaseJpaService<CapacityAsse
        return res;
        return res;
    }
    }
    public PageEnvelop<List<Map<String,Object>>> assessmentPage(String doctorId,String name, int page, int size,
    public PageEnvelop<List<Map<String,Object>>> assessmentPage(String doctorId,String name,int type, int page, int size,
                    Integer status,Integer levelConclusion,Integer servicePackageStatus){
                    Integer status,Integer levelConclusion,Integer servicePackageStatus){
        String sql = "SELECT c.id,c.patient,c.assessment_time,c.service_package_status servicePackageStatus, " +
        String sql = "SELECT c.id,c.patient,c.assessment_time,c.service_package_status servicePackageStatus, " +
                "c.`status`,c.level_conclusion levelConclusion,c.org_code orgCode,c.org_name orgName,p.name,p.photo,p.mobile,p.sex,p.idcard  ";
                "c.`status`,c.level_conclusion levelConclusion,c.org_code orgCode,c.org_name orgName,p.name,p.photo,p.mobile,p.sex,p.idcard  ";
        String countSql = "SELECT count(*) ";
        String countSql = "SELECT count(*) ";
        String filters = "from base_capacity_assessment_record c left join base_capacity_doctor d on c.id =d.capacity_id ,base_patient p " +
        String filters = "from base_capacity_assessment_record c left join base_capacity_doctor d on c.id =d.capacity_id ,base_patient p " +
                "WHERE  c.patient = p.id  and c.assessment_time>='" + DateUtil.getNowYear() + "-01-01'";
                "WHERE  c.patient = p.id  " ;
        if(type==0){
            filters += " and c.assessment_time>='" + DateUtil.getNowYear() + "-01-01' ";
        }
        if(StringUtils.isNoneBlank(doctorId)){
        if(StringUtils.isNoneBlank(doctorId)){
            filters += " and (c.doctor = '"+doctorId+"' or d.doctor_id = '"+doctorId+"')";
            filters += " and (c.doctor = '"+doctorId+"' or d.doctor_id = '"+doctorId+"')";