Procházet zdrojové kódy

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

wangzhinan před 4 roky
rodič
revize
22d0478951

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

@ -4438,6 +4438,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "room.outpatient_id AS \"id\"," +
                "room.patient_id AS \"patient_id\"," +
                "room.patient_name AS \"name\"," +
                "outpatient.patient_name AS \"outPatientName\"," +
                "outpatient.patient AS \"outPatient\"," +
                "patient.sex AS \"sex\"," +
                "patient.idcard AS \"idcard\"," +
                "patient.photo AS \"photo\"," +
@ -4527,6 +4529,20 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            //根据身份证计算年龄
            for (Map<String, Object> outpatient : list) {
                String idcard = (String) outpatient.get("idcard");
                int patientAge = 0;
                int patientSex = 3;
                if (null!=outpatient.get("outPatient")){
                   BasePatientDO basePatientDO = basePatientDao.findById(outpatient.get("outPatient").toString());
                   if (null!=basePatientDO){
                       if (StringUtils.isNotBlank(basePatientDO.getIdcard())){
                           patientAge = DateUtil.getAgeForIdcard(basePatientDO.getIdcard());
                           outpatient.put("patientAge", DateUtil.getAgeForIdcard(basePatientDO.getIdcard()));
                       }
                       patientSex =basePatientDO.getSex();
                   }
                }
                outpatient.put("patientAge", patientAge);
                outpatient.put("patientSex", patientSex);
                outpatient.put("age", DateUtil.getAgeForIdcard(idcard));
            }
        }
@ -8905,7 +8921,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public MixEnvelop prescriptionManage(String keyWord,String doctorId,String startTime,String endTime,String checkStatus,Integer page,Integer pageSize){
        String sql = " select p.create_time as \"createTime\"," +
                " p.patient_name as \"patientName\"," +
                " p.idcard as \"idcard\"," +
                " o.idcard as \"idcard\"," +
                " o.card_no as \"cardNo\"," +
                " p.check_status as \"checkStatus\"," +
                " p.id as \"id\"," +

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/YkyyPrescriptionService.java

@ -252,7 +252,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                expressageDO.setProvinceName(baseDrugStoreDO.getProvinceName());
                expressageDO.setTownCode(baseDrugStoreDO.getTownCode());
                expressageDO.setTownName(baseDrugStoreDO.getTownName());
                expressageDO.setHospitalCode(baseDrugStoreDO.getHospitalCode());
                expressageDO.setHospitalCode(baseDrugStoreDO.getDrugStoreCode());
                expressageDO.setHospitalName(baseDrugStoreDO.getHospitalName());
                expressageDO.setHospitalAddress(baseDrugStoreDO.getAddress());
            }

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

@ -1361,6 +1361,15 @@ public class ImService {
		jsonObject.put("age",DateUtil.getAgeForIdcard(p.getIdcard()));
		jsonObject.put("sex",p.getSex());
		jsonObject.put("name",p.getName());
		if (null!=wlyyOutpatientDO){
			BasePatientDO outPatient = basePatientDao.findById(wlyyOutpatientDO.getPatient());
			if (null!=outPatient){
				jsonObject.put("age",DateUtil.getAgeForIdcard(outPatient.getIdcard()));
				jsonObject.put("sex",outPatient.getSex());
				jsonObject.put("name",outPatient.getName());
			}
		}
		//4、创建咨询
		JSONObject users = new JSONObject();//咨询参与者
@ -1594,7 +1603,7 @@ public class ImService {
			throw new RuntimeException("IM消息结束异常!");
		}
		if (obj.getInteger("status") == -1) {
			throw new RuntimeException(String.valueOf(obj.get("message")));
			throw new RuntimeException(String.valueOf(null==obj.get("message")?"无失败信息":obj.get("message")));
		}
//		//推送给IM文字消息

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

@ -707,7 +707,10 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            String consultCode = imService.getConsultCodeByOutpatientId(outPatientId);
            System.out.println("consultCode"+consultCode);
            if(StringUtils.isNoneBlank(consultCode)) {
                imService.cancelRevisit(consultCode, "admin", 2);
                ConsultDo consultDo = consultDao.findByRelationCode(outPatientId);
                if(null!=consultDo){
                    imService.cancelRevisit(consultCode, consultDo.getPatient(), 1);
                }
            }
        }catch (Exception e){
            System.out.println("居民取消复诊失败");