ソースを参照

处方驳回消息

huangwenjie 4 年 前
コミット
e45dd034a5

+ 4 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -584,6 +584,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        return rs;
        return rs;
    }
    }
    public WlyyPrescriptionDO findPrescriptionDo(String prescriptionId){
        return prescriptionDao.findOne(prescriptionId);
    }
    
    public Map<String,Object> findPrescriptionInfo(String prescriptionId){
    public Map<String,Object> findPrescriptionInfo(String prescriptionId){
        //续方信息
        //续方信息
        Map<String,Object> rs = new HashedMap();
        Map<String,Object> rs = new HashedMap();

+ 21 - 1
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -1688,7 +1688,27 @@ public class ImService {
		}else{
		}else{
			return null;
			return null;
		}
		}
	}
	
	
	/**
	 * 发送处方驳回消息
	 * @param jsonObject
	 * @param doctor
	 * @param doctorName
	 * @param outpatientId
	 * @param patient
	 * @return
	 * @throws Exception
	 */
	public String pushPrescriptionBackMsg(com.alibaba.fastjson.JSONObject jsonObject,String doctor,String doctorName,String outpatientId,String patient,String outpatientType) throws Exception {
		if("1".equals(outpatientType)){
			return imUtil.sendImMsg(doctor, doctorName, patient+"_"+outpatientId+"_9", "33",jsonObject.toString(),"1");
		}else if("2".equals(outpatientType)){
			return imUtil.sendImMsg(doctor, doctorName, patient+"_"+outpatientId+"_12", "33",jsonObject.toString(),"1");
		}else{
			return null;
		}
	}
	}
	
	
	/**
	/**

+ 17 - 4
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -5,6 +5,8 @@ import com.yihu.jw.doctor.service.excel.DoctorWorkTimeMainExcelDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionCheckDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDiagnosisDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDiagnosisDO;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.service.InspectionService;
import com.yihu.jw.hospital.prescription.service.InspectionService;
@ -1283,12 +1285,23 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            @RequestParam(required = true)Integer status,
            @RequestParam(required = true)Integer status,
            @ApiParam(name = "prescriptionId", value = "prescriptionId", required = true)
            @ApiParam(name = "prescriptionId", value = "prescriptionId", required = true)
            @RequestParam(required = true)String prescriptionId) throws Exception {
            @RequestParam(required = true)String prescriptionId) throws Exception {
    
        WlyyPrescriptionCheckDO wlyyPrescriptionCheckDO = prescriptionService.saveCheck(operate,operateName,reason,status,prescriptionId,wxId);
        try {
        try {
            //String operate,String operateName,String reason,Integer status,String prescriptionId
            return ObjEnvelop.getSuccess("ok",prescriptionService.saveCheck(operate,operateName,reason,status,prescriptionId,wxId));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
            WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionService.findPrescriptionDo(prescriptionId);
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findOne(wlyyPrescriptionDO.getOutpatientId());
            com.alibaba.fastjson.JSONObject msgObj = new com.alibaba.fastjson.JSONObject();
            msgObj.put("outpatientid",wlyyPrescriptionDO.getOutpatientId());
            msgObj.put("prescriptionId",prescriptionId);
            msgObj.put("reason",reason);
            String immsg = imService.pushPrescriptionBackMsg(msgObj,operate,operateName,wlyyPrescriptionDO.getOutpatientId(),wlyyOutpatientDO.getPatient(),wlyyOutpatientDO.getOutpatientType());
            System.out.println("发送诊断消息成功:"+immsg);
        }catch (Exception e){
            System.out.println("发送诊断消息失败:"+e.getMessage());
//            e.printStackTrace();
        }
        }
    
        return ObjEnvelop.getSuccess("ok",wlyyPrescriptionCheckDO);
    }
    }