liubing 3 lat temu
rodzic
commit
08dadd205e

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

@ -210,7 +210,7 @@ public class SecurityMonitoringOrderEndpoint extends EnvelopRestEndpoint {
            @RequestParam(value = "conclusion_img", required = false) String conclusion_img
            ) {
        try {
            JSONObject result = securityMonitoringOrderService.updateDoorConclusion(emergency_reason,treatment_status, orderId,conclusion,conclusion_img);
            JSONObject result = securityMonitoringOrderService.updateDoorConclusion(emergency_reason,treatment_status, orderId,conclusion,conclusion_img,getUID());
            if (result.getIntValue("resultFlag") == 0) {
                return ObjEnvelop.getError(result.getString("resultMsg"));
            }
@ -227,7 +227,7 @@ public class SecurityMonitoringOrderEndpoint extends EnvelopRestEndpoint {
    @ApiOperation("取消登记服务小结")
    public ObjEnvelop cancelConclusion(@ApiParam(name = "orderId", value = "工单id", required = true) @RequestParam String orderId) {
        try {
            JSONObject result = securityMonitoringOrderService.cancelConclusion(orderId);
            JSONObject result = securityMonitoringOrderService.cancelConclusion(orderId,getUID());
            if (result.getIntValue("resultFlag") == 0) {
                return ObjEnvelop.getError(result.getString("resultMsg"));
            }

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

@ -310,7 +310,7 @@ public class ConsultTeamService {
        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 imResponseJson = imUtill.createTopics(sessionId, consult.getId(), content, participants, messages, ImUtil.SESSION_TYPE_DOOR_COACH);

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

@ -827,11 +827,20 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
     * @return
     * @throws Exception
     */
    public JSONObject updateDoorConclusion(Integer emergency_reason,Integer treatment_status,String orderId,String conclusion,String conclusion_img) throws Exception {
    public JSONObject updateDoorConclusion(Integer emergency_reason,Integer treatment_status,String orderId,String conclusion,String conclusion_img,String doctor) throws Exception {
        JSONObject result = new JSONObject();
        ObjectMapper objectMapper = new ObjectMapper();
        objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd"));
        SecurityMonitoringOrderDO one = securityMonitoringOrderDao.findOne(orderId);
        if (StringUtils.isNotBlank(doctor)){
            BaseDoctorDO doctorDO = baseDoctorDao.findById(doctor);
            if (doctorDO!=null){
                one.setDoctor(doctor);
                one.setDoctorName(doctorDO.getName());
                one.setUpdateUser(doctor);
                one.setUpdateUserName(doctorDO.getName());
            }
        }
        if (one==null){
            String failMsg = "工单不存在" ;
            result.put("resultFlag", 0);
@ -877,9 +886,18 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
     * 跳过登记服务小结
     * @param orderId
     */
    public JSONObject cancelConclusion(String orderId) throws Exception {
    public JSONObject cancelConclusion(String orderId,String doctor) throws Exception {
        JSONObject result = new JSONObject();
        SecurityMonitoringOrderDO one = securityMonitoringOrderDao.findOne(orderId);
        if (StringUtils.isNotBlank(doctor)){
            BaseDoctorDO doctorDO = baseDoctorDao.findById(doctor);
            if (doctorDO!=null){
                one.setDoctor(doctor);
                one.setDoctorName(doctorDO.getName());
                one.setUpdateUser(doctor);
                one.setUpdateUserName(doctorDO.getName());
            }
        }
        if (one==null){
            String failMsg = "工单不存在" ;
            result.put("resultFlag", 0);
@ -890,7 +908,10 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
            String failMsg = "咨询结束失败 无法结束工单";
            throw new Exception(failMsg);
        }
        securityMonitoringOrderDao.updateConclusionStatus(orderId);
        one.setStatus(0);
        one.setUpdateTime(new Date());
        securityMonitoringOrderDao.save(one);
        return getSecurityOrderDetail(orderId,null);
    }