Преглед изворни кода

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

# Conflicts:
#	svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/wechat/WechatMenuController.java
wangzhinan пре 4 година
родитељ
комит
23f4f46ac2

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

@ -4443,7 +4443,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "outpatient.consumer_name as \"consumerName\"," +
                "outpatient.consumer_mobile as \"consumerMobile\", ";
        if ("xm_ykyy_wx".equals(wechatId)) {
            flag =true;
            if(flag){
                sql += "date_format(room.reservation_time ,'yyyy-MM-dd hh24:mi:ss' ) AS \"timedate_format\",";
            }else {

+ 22 - 14
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -3405,20 +3405,24 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
        List<WlyyPrescriptionEmrDO> wlyyPrescriptionEmrDOList = new ArrayList<>();
        if(object.getInteger("status")==200){
            String obj = object.getString("obj");
            logger.info("obj:"+obj);
            JSONArray array = JSONArray.parseArray(obj.replace("[]","\"\"")).getJSONArray(0);
            logger.info("arrayResponse:"+array.toJSONString());
            for (int i=0;i<array.size();i++){
                JSONObject jsonObject = array.getJSONObject(i);
                logger.info("jsonObject:"+jsonObject);
                WlyyPrescriptionEmrDO wlyyPrescriptionEmrDO = new WlyyPrescriptionEmrDO();
                wlyyPrescriptionEmrDO.setComplaint(null==jsonObject.get("CHIEF_COMPLAINT")?"":jsonObject.get("CHIEF_COMPLAINT").toString());
                wlyyPrescriptionEmrDO.setMedicalHistory(null==jsonObject.get("PRESENT_ILLNESS")?"":jsonObject.get("PRESENT_ILLNESS").toString());
                wlyyPrescriptionEmrDO.setPastHistory(null==jsonObject.get("PAST_HISTORY")?"":jsonObject.get("PAST_HISTORY").toString());
                wlyyPrescriptionEmrDO.setPhysicalExamination(null==jsonObject.get("PHYSICAL_EXAMINATION")?"":jsonObject.get("PHYSICAL_EXAMINATION").toString());
                wlyyPrescriptionEmrDO.setAssistExamination(null==jsonObject.get("OBSERVE_RESULT")?"":jsonObject.get("OBSERVE_RESULT").toString());
                wlyyPrescriptionEmrDO.setAllergicHistory(null==jsonObject.get("ALLERGY_HISTORY")?"":jsonObject.get("ALLERGY_HISTORY").toString());
                wlyyPrescriptionEmrDOList.add(wlyyPrescriptionEmrDO);
            if("[[]]".equalsIgnoreCase(obj)||"[]".equalsIgnoreCase(obj)||StringUtils.isBlank(obj)){
                return null;
            }else {
                logger.info("obj:" + obj);
                JSONArray array = JSONArray.parseArray(obj.replace("[]", "\"\"")).getJSONArray(0);
                logger.info("arrayResponse:" + array.toJSONString());
                for (int i = 0; i < array.size(); i++) {
                    JSONObject jsonObject = array.getJSONObject(i);
                    logger.info("jsonObject:" + jsonObject);
                    WlyyPrescriptionEmrDO wlyyPrescriptionEmrDO = new WlyyPrescriptionEmrDO();
                    wlyyPrescriptionEmrDO.setComplaint(null == jsonObject.get("CHIEF_COMPLAINT") ? "" : jsonObject.get("CHIEF_COMPLAINT").toString());
                    wlyyPrescriptionEmrDO.setMedicalHistory(null == jsonObject.get("PRESENT_ILLNESS") ? "" : jsonObject.get("PRESENT_ILLNESS").toString());
                    wlyyPrescriptionEmrDO.setPastHistory(null == jsonObject.get("PAST_HISTORY") ? "" : jsonObject.get("PAST_HISTORY").toString());
                    wlyyPrescriptionEmrDO.setPhysicalExamination(null == jsonObject.get("PHYSICAL_EXAMINATION") ? "" : jsonObject.get("PHYSICAL_EXAMINATION").toString());
                    wlyyPrescriptionEmrDO.setAssistExamination(null == jsonObject.get("OBSERVE_RESULT") ? "" : jsonObject.get("OBSERVE_RESULT").toString());
                    wlyyPrescriptionEmrDO.setAllergicHistory(null == jsonObject.get("ALLERGY_HISTORY") ? "" : jsonObject.get("ALLERGY_HISTORY").toString());
                    wlyyPrescriptionEmrDOList.add(wlyyPrescriptionEmrDO);
                }
            }
        }
        return wlyyPrescriptionEmrDOList;
@ -3457,6 +3461,9 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
        List<WlyyPrescriptionEmrDO> wlyyPrescriptionEmrDOList = new ArrayList<>();
        if(object.getInteger("status")==200){
            String obj = object.getString("obj");
            if("[[]]".equalsIgnoreCase(obj)||"[]".equalsIgnoreCase(obj)||StringUtils.isBlank(obj)){
                return null;
            }else {
            logger.info("obj:"+obj);
            JSONArray array = JSONArray.parseArray(obj.replace("[]","\"\"")).getJSONArray(0);
            logger.info("arrayResponse:"+array.toJSONString());
@ -3475,6 +3482,7 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
                jsonArray.add(jsonObject);
            }
            return jsonArray;
            }
        }else {
            return null;
        }

+ 2 - 5
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java

@ -445,11 +445,10 @@ public class YkyyEntranceService {
        }
        List<WlyyOutpatientVO> wlyyOutpatientVOS = new ArrayList<>();
        WlyyOutpatientVO wlyyOutpatientVO;
        for (int i = 0; i < jsonArray.size(); i++) {
            JSONObject jsonObjectMgsInfo = jsonArray.getJSONObject(i);
            if (null != jsonObjectMgsInfo) {
                wlyyOutpatientVO = new WlyyOutpatientVO();
                WlyyOutpatientVO wlyyOutpatientVO = new WlyyOutpatientVO();
                wlyyOutpatientVO.setHospital(orgCode);
                wlyyOutpatientVO.setHospitalName(orgName);
                wlyyOutpatientVO.setWinNo("6");
@ -484,7 +483,6 @@ public class YkyyEntranceService {
                String conDate = null == jsonObjectMgsInfo.get("KSSJ") ? "" : jsonObjectMgsInfo.get("KSSJ") + "";
                wlyyOutpatientVO.setAdmDate(DateUtil.strToDate(admDate, DateUtil.YYYY_MM_DD_HH_MM_SS_));
                wlyyOutpatientVO.setConDate(DateUtil.strToDate(conDate, DateUtil.YYYY_MM_DD_HH_MM_SS_));
                wlyyOutpatientVOS.add(wlyyOutpatientVO);
                List<WlyyInspectionVO> inspectionVOList = new ArrayList<>();
                JSONArray array = findV_ZKSG_JCCX(PAT_NO,wlyyOutpatientVO.getAdmNo(),demoFlag);
                for (int j=0;j<array.size();j++){
@ -504,7 +502,7 @@ public class YkyyEntranceService {
                    inspectionVOList.add(wlyyInspectionVO);
                }
                wlyyOutpatientVO.setInspectionVOS(inspectionVOList);
                wlyyOutpatientVOS.add(wlyyOutpatientVO);
            }
        }
        return wlyyOutpatientVOS;
@ -532,7 +530,6 @@ public class YkyyEntranceService {
        return new JSONArray();
    }
    /**
     * 查找眼科his 审方失败
     * @throws Exception

+ 127 - 4
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -2159,7 +2159,7 @@ public class ImService {
		String  sql = "";
		//专家咨询
		if("1".equals(type) || "15".equals(type) || type.contains(",")){
		if("1".equals(type) || "15".equals(type) || type.contains(",")||"17".equals(type)){
			sql = "SELECT " +
					"a.id AS \"id\"," +
					"a.type AS \"type\"," +
@ -2194,7 +2194,62 @@ public class ImService {
			else if(status ==1){
				sql +=" and b.status = 10 ";
			}
			if (org.apache.commons.lang.StringUtils.isNotBlank(doctor)) {
				sql += " AND b.doctor='" + doctor + "' ";
			}
			if (!StringUtils.isEmpty(title)) {
				title = "%" + title + "%";
				sql += " and a.symptoms like '" + title + "'";
			}
			if (!StringUtils.isEmpty(start_time)) {
				if ("xm_ykyy_wx".equals(wxId)) {
					if (flag) {
						sql += " and a.czrq >= str_to_date('" + start_time + "','YYYY-MM-DD HH24:MI:SS')";
					} else {
						sql += " and a.czrq >= to_date('" + start_time + "','YYYY-MM-DD HH24:MI:SS')";
					}
				} else {
					sql += " and a.czrq >= '" + start_time + "'";
				}
			}
			if (!StringUtils.isEmpty(end_time)) {
				if ("xm_ykyy_wx".equals(wxId)) {
					if (flag) {
						sql += " and a.czrq <= str_to_date('" + end_time + "','YYYY-MM-DD HH24:MI:SS')";
					} else {
						sql += " and a.czrq <= to_date('" + end_time + "','YYYY-MM-DD HH24:MI:SS')";
					}
				} else {
					sql += " and a.czrq <= '" + end_time + "'";
				}
			}
			//咨询状态
			if (status != 0) {
				if (status == 2) {//就诊中
					sql += " and b.status = 0 ";
				} else if (status == 3) {
					sql += " and b.status = 1 ";
				} else {
				}
			}
			//咨询类型
			if (!StringUtils.isEmpty(type) && !type.equalsIgnoreCase("0")) {
				sql += " AND a.type in (" + type + ")";
			}
			if (!StringUtils.isEmpty(id)) {
				sql += " and a.id = '" + id + "'";
			}
			sql += " ORDER BY a.czrq desc ";
		}else {
			if (-1 == status&&(type.equalsIgnoreCase("0")||type.equalsIgnoreCase("9"))) {
				sql = "SELECT " +
@ -2391,7 +2446,11 @@ public class ImService {
				//咨询类型
				if (!StringUtils.isEmpty(type) && !type.equalsIgnoreCase("0")) {
					sql += " AND a.type in (" + type + ")";
					if("9".equalsIgnoreCase(type)){
						sql +=" AND a.type in (9,16)" ;
					}else {
						sql +=" AND a.type in ("+type+")" ;
					}
				}
				if (!StringUtils.isEmpty(id)) {
@ -2522,7 +2581,7 @@ public class ImService {
		}*/
		String  sql = "";
		//专家咨询
		if("1".equals(type) || "15".equals(type) || type.contains(",")){
		if("1".equals(type) || "15".equals(type) || type.contains(",")||"17".equals(type)){
			sql = "SELECT " +
					" COUNT(1) AS \"total\" "+
					"FROM wlyy_consult a," +
@ -2536,6 +2595,64 @@ public class ImService {
			else if(status ==1){
				sql +=" and b.status = 10 ";
			}
			if (org.apache.commons.lang.StringUtils.isNotBlank(doctor)){
				sql+=" AND b.doctor='"+doctor+"' ";
			}
			if(!StringUtils.isEmpty(title)){
				title="%"+title+"%";
				sql +=" and a.symptoms like '"+title+"'";
			}
			if(!StringUtils.isEmpty(start_time)){
				if("xm_ykyy_wx".equals(wxId)){
					if (flag){
						sql +=" and a.czrq >= str_to_date('"+start_time+"','YYYY-MM-DD HH24:MI:SS')";
					}else {
						sql +=" and a.czrq >= to_date('"+start_time+"','YYYY-MM-DD HH24:MI:SS')";
					}
				}else {
					sql +=" and a.czrq >= '"+start_time+"'";
				}
			}
			if(!StringUtils.isEmpty(end_time)){
				if("xm_ykyy_wx".equals(wxId)){
					if (flag){
						sql +=" and a.czrq <= str_to_date('"+end_time+"','YYYY-MM-DD HH24:MI:SS')";
					}else {
						sql +=" and a.czrq <= to_date('"+end_time+"','YYYY-MM-DD HH24:MI:SS')";
					}
				}else {
					sql +=" and a.czrq <= '"+end_time+"'";
				}
			}
			//咨询状态
			if(status != 0){
				if(status ==2 ){//就诊中
					sql +=" and b.status = 0 ";
				}else if(status ==3 ){
					sql +=" and b.status = 1 ";
				}else{}
			}
			//咨询类型
			if(!StringUtils.isEmpty(type)&&!type.equalsIgnoreCase("0")){
				sql +=" AND a.type in ("+type+")" ;
			}
			if (!StringUtils.isEmpty(id)) {
				sql += " and a.id = '" + id + "'";
			}
			sql += " ORDER BY a.czrq desc ";
		}else{
			if (-1 == status&&(type.equalsIgnoreCase("0")||type.equalsIgnoreCase("9"))) {
@ -2676,9 +2793,15 @@ public class ImService {
				//咨询类型
				if(!StringUtils.isEmpty(type)&&!type.equalsIgnoreCase("0")){
					sql +=" AND a.type in ("+type+")" ;
					if("9".equalsIgnoreCase(type)){
						sql +=" AND a.type in (9,16)" ;
					}else {
						sql +=" AND a.type in ("+type+")" ;
					}
				}
				if (!StringUtils.isEmpty(id)) {
					sql += " and a.id = '" + id + "'";
				}

+ 9 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/BasePatientDO.java

@ -242,6 +242,15 @@ public class BasePatientDO extends UuidIdentityEntityWithOperator {
    private String register;
    private String phone;
    private String openid;
    @Column(name = "openid")
    public String getOpenid() {
        return openid;
    }
    public void setOpenid(String openid) {
        this.openid = openid;
    }
    /**
     * 上线下线状态

+ 7 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -998,5 +998,12 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
            }
        }
    }
    @PostMapping(value = "/getWXUserInfo")
    @ApiOperation(value = "获取微信用户信息")
    public ObjEnvelop getWXUserInfo(
            @ApiParam(name = "patient", value = "病人id")
            @RequestParam(value = "patient", required = false) String patient) throws Exception {
        return qrcodeService.getWXUserInfo(patient);
    }
}

Разлика између датотеке није приказан због своје велике величине
+ 72 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/QrcodeService.java