ソースを参照

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

# Conflicts:
#	common/common-entity/src/main/java/com/yihu/jw/entity/hospital/dict/BaseHospitalParameterDO.java
humingfen 3 年 前
コミット
08dd44ce57

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

@ -4327,16 +4327,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    msgUrl="/ims-wx/index.html#/returnVisit/preChat?type=17&outpatientId="+outpatientId;
                    if (StringUtils.isNoneBlank(outpatientDO.getDoctorName())){
                        first = "您的视频咨询已预约成功。";
                        contentMsg = "预计" + outpatientDO.getDoctorName() + "医生将于" + DateUtil.dateToStrLong(consultTeam.getCzrq()) + " 与您进行视频咨询。请留意微信公众号消息。";
                        contentMsg = "预计" + outpatientDO.getDoctorName() + "医生将于" + DateUtil.dateToStrLong(outpatientDO.getRegisterDate()) + " 与您进行视频咨询。请留意微信公众号消息。";
                    }else{
                        first = outpatientDO.getPatientName()+"您好!您已成功发起快速视频咨询。";
                        contentMsg = "您已预约" + DateUtil.dateToStrLong(consultTeam.getCzrq()) +  "的视频咨询 与您进行视频咨询。请留意微信公众号消息。请耐心等待医生接单。如长时间无医生接单,建议选择医生发起视频咨询";
                        contentMsg = "您已预约" + DateUtil.dateToStrLong(outpatientDO.getRegisterDate()) +  "的视频咨询 与您进行视频咨询。请留意微信公众号消息。请耐心等待医生接单。如长时间无医生接单,建议选择医生发起视频咨询";
                    }
                }else{
                    msgUrl="/ims-wx/index.html#/zx/prechat?consultCode="+consultTeam.getConsult();
                    contentMsg = "预计" + consDoctorDO.getName() + "医生将于" + DateUtil.dateToStrLong(consultTeam.getCzrq()) + " 与您进行视频咨询。请留意微信公众号消息。";
                    contentMsg = "预计" + consDoctorDO.getName() + "医生将于" + DateUtil.dateToStrLong(outpatientDO.getRegisterDate()) + " 与您进行视频咨询。请留意微信公众号消息。";
                }
                logger.info("视频咨询已预约成功微信消息模板推送开始");
@ -7002,7 +7002,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        saveInquirySystemMessage(outpatient,null);
                    }
                }else {
                    systemMessageDO.setTitle("视频咨询预约成功");
                    systemMessageDO.setTitle("视频咨询");
                    systemMessageDO.setType("17");
                    if (payFlag){
                        saveInquirySystemMessage(outpatient,null);
@ -7026,6 +7026,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                systemMessageDO.setData(data.toString());
                logger.info("添加模板消息4");
                systemMessageService.saveMessage(systemMessageDO);
                BasePatientDO patient = basePatientDao.findById(outpatient.getPatient());
                if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) {
                    ykyyService.pushNotificationToYktPatient(patient.getYktId(), systemMessageDO.getTitle(), data.get("msg").toString());
                }
            } else if ("1".equals(outpatient.getOutpatientType()))  {//在线复诊
                //1.图文 2.视频
                if ("1".equals(outpatient.getType())) {

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

@ -665,7 +665,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            jsonObject.put("ypyf",64);
            mapList.add(jsonObject);
        }else {
            mapList = ykyyEntranceService.findYpyf(pyKey);
            mapList = ykyyEntranceService.findYpyf(pyKey,"");
        }
        JSONArray array = new JSONArray();
        for (int i=0;i<mapList.size();i++){

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

@ -767,7 +767,7 @@ public class YkyyEntranceService {
                        "\td.YYTS as \"yyts\",\n" +
                        "\td.YFGG as \"yfgg\"\n" +
                        "FROM\n" +
                        "\tV_MS_DD02 d\n" +
                        "\tV_MS_DD02 d  \n" +
                        "WHERE\n" +
                        "\td.cfsb = '"+wlyyPrescriptionVO.getRealOrder()+"'";
@ -847,8 +847,20 @@ public class YkyyEntranceService {
                        prescriptionInfoVO.setUnitName(object1.getString("yfdw"));
                        prescriptionInfoVO.setDosage(object1.getString("mrcs"));
                        prescriptionInfoVO.setSupplyCode(object1.getString("gytj"));
                        prescriptionInfoVO.setPackQuantity(object1.getInteger("yfbz"));
                        JSONArray ypyfList = findYpyf("",object1.getString("gytj"));
                        if (ypyfList!=null&&ypyfList.size()>0){
                            JSONObject map = ypyfList.getJSONObject(0);
                            logger.info("setSupplyName+++"+map.get("xmmc").toString());
                            prescriptionInfoVO.setSupplyName(map.get("xmmc").toString());
                        }
                        prescriptionInfoVO.setUsageCode(object1.getString("ypyf"));
                        JSONArray sypcList = findSypc(object1.getString("ypyf"));
                        if (sypcList!=null&&sypcList.size()>0){
                            JSONObject sypcmap = sypcList.getJSONObject(0);
                            logger.info("setUsageName+++"+sypcmap.get("pcmc1").toString());
                            prescriptionInfoVO.setUsageName(sypcmap.get("pcmc1").toString());
                        }
                        prescriptionInfoVO.setPackQuantity(object1.getInteger("yfbz"));
                        prescriptionInfoVO.setDays(object1.getString("yyts"));
                     /*   prescriptionInfoVO.setYpyf(object1.getInteger("ypyf"));*/
                        prescriptionInfoVO.setHisCode(object1.getInteger("sbxh"));
@ -1508,11 +1520,14 @@ public class YkyyEntranceService {
     * 获取用法
     * @return
     */
    public JSONArray findYpyf(String pydm) throws Exception {
    public JSONArray findYpyf(String pydm,String ypyf) throws Exception {
        String sql = "select y.ypyf as \"ypyf\",y.pydm as \"pydm\",y.xmmc as \"xmmc\" from v_hlw_ypyf y where 1=1  and y.pydm is not null";
        if (StringUtils.isNoneBlank(pydm)){
            sql+=" and lower(y.pydm)='"+pydm.toLowerCase()+"' ";
        }
        if (StringUtils.isNoneBlank(ypyf)){
            sql+=" and lower(y.ypyf)="+ypyf.toLowerCase()+" ";
        }
        /*List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);
        return list;*/
        JSONArray array = new JSONArray();

+ 3 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/ykyy/service/YkyyService.java

@ -237,6 +237,9 @@ public class YkyyService {
     */
    public String addYktOrder(String orderNo,String patientId,String orderAmout,String description,String state,String orderType,String doctorId,String payType,String payAccount,String patientTel,String orderCategory,String pcCallbackUrl,String appCallbackUrl){
        String response="";
        if ("17".equalsIgnoreCase(orderType)){
            orderType = "3";
        }
        String url = yktUrl+"doc_jkzl/add_inquiry_order?order_no="+orderNo+"&patient_id="+patientId+"&order_amout="+orderAmout+"&description="+description+
                "&state="+state+"&order_type="+orderType+"&doctor_id="+doctorId+"&pay_type="+payType+"&patient_tel="+patientTel+"&order_category="+orderCategory;
        if (StringUtils.isNoneBlank(payAccount)){

+ 11 - 2
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -255,9 +255,18 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        businessOrderDO.setUpdateTime(new Date());
        businessOrderDO.setStatus(0);
        if (StringUtils.isNoneBlank(businessOrderDO.getDoctor())){
            businessOrderDO.setOrderNo("HLWYY"+businessOrderDO.getOrderType()+System.currentTimeMillis()+(int)(Math.random()*900)+100);
            if (businessOrderDO.getOrderType()==17){
                businessOrderDO.setOrderNo("HLWYY3"+System.currentTimeMillis()+(int)(Math.random()*900)+100);
            }else {
                businessOrderDO.setOrderNo("HLWYY"+businessOrderDO.getOrderType()+System.currentTimeMillis()+(int)(Math.random()*900)+100);
            }
        }else {
            businessOrderDO.setOrderNo("HLWYYQD"+businessOrderDO.getOrderType()+System.currentTimeMillis()+(int)(Math.random()*900)+100);
            if (businessOrderDO.getOrderType()==17){
                businessOrderDO.setOrderNo("HLWYYQD3"+System.currentTimeMillis()+(int)(Math.random()*900)+100);
            }else {
                businessOrderDO.setOrderNo("HLWYYQD"+businessOrderDO.getOrderType()+System.currentTimeMillis()+(int)(Math.random()*900)+100);
            }
        }
        businessOrderDO.setUploadStatus(0);
        businessOrderDO.setPayType(1);

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

@ -1364,9 +1364,9 @@ public class ImService {
				// 添加医生咨询日志
				addLogs(ct);
				//只有勾选同同时发起视频邀请的时候才发送模板消息
				if("2".equalsIgnoreCase(wlyyOutpatientDO.getType())){
				/*if("2".equalsIgnoreCase(wlyyOutpatientDO.getType())){
					wxTemplateService.sendWeTempMesMiniProgram(wlyyOutpatientDO.getDoctor(),wlyyOutpatientDO.getDoctorName(),wlyyOutpatientDO.getConsumer(),wlyyOutpatientDO.getConsumerName(),consult.getId());
				}
				}*/
			}
			String sessionIds = patient + "_" + outpatientCode + "_" + ct.getType();
			JSONObject result = imUtil.getSingleSessionInfo(sessionIds,doctorCode);

+ 36 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/org/BaseOrgDO.java

@ -165,7 +165,42 @@ public class BaseOrgDO extends UuidIdentityEntityWithOperator {
     * 医院code
     */
    private String hisId;
	
    /**
     * 资格证书
     */
    private String credentials;
    /**
     * 报告单专用章
     */
    private String reportChapter;
    /**
     * 机构logo
     */
    private String logo;
    @Column(name = "credentials")
    public String getCredentials() {
        return credentials;
    }
    public void setCredentials(String credentials) {
        this.credentials = credentials;
    }
    @Column(name = "report_chapter")
    public String getReportChapter() {
        return reportChapter;
    }
    public void setReportChapter(String reportChapter) {
        this.reportChapter = reportChapter;
    }
    @Column(name = "logo")
    public String getLogo() {
        return logo;
    }
    public void setLogo(String logo) {
        this.logo = logo;
    }
//	/**
//	 * 排序
//	 */

+ 0 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/dict/BaseHospitalParameterDO.java


+ 2 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/dict/DiseaseManageEndpoint.java

@ -58,9 +58,9 @@ public Envelop create (
    @ApiParam(name = "id", value = "id", required = true)
    @RequestParam(value = "id") String id,
    @ApiParam(name = "isDel", value = "1正常0删除", required = false)
    @RequestParam(value = "isDel") String isDel,
    @RequestParam(value = "isDel", required = false) String isDel,
    @ApiParam(name = "status", value = "1正常0弃用", required = false)
    @RequestParam(value = "status") String status) {
    @RequestParam(value = "status", required = false) String status) {
    return success(diseaseManageService.deleteById(id,isDel,status));
    }

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/service/dict/DiseaseManageService.java

@ -119,7 +119,7 @@ public class DiseaseManageService extends BaseJpaService<DiseaseManageDO, Diseas
                "b.name as \"orgName\"," +
                "a.is_del as \"isDel\" from disease_manage a left join base_org b on a.org_code = b.code where is_del = '1' " ;
        if (StringUtils.isNoneBlank(orgCode)){
            sql+=" and a.code = '"+orgCode+"'";
            sql+=" and a.org_code = '"+orgCode+"'";
        }
        if (StringUtils.isNoneBlank(status)){
            sql+=" and a.status = '"+status+"'";

+ 22 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/BaseDoctorService.java

@ -580,7 +580,8 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
        JSONObject jsonObject = JSONObject.parseObject(jsonData);
        JSONObject doctor = jsonObject.getJSONObject("doctor");
        JSONArray role = jsonObject.getJSONArray("role");
            JSONArray hospital = jsonObject.getJSONArray("hospital");
        String doctorMappingCode = jsonObject.getString("doctorMappingCode");
        JSONArray hospital = jsonObject.getJSONArray("hospital");
        if(null == doctor){
            result.put("msg","parameter doctor of jsonData is null");
            result.put("response", ConstantUtils.FAIL);
@ -614,6 +615,19 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
            return result.toJSONString();
        }
        this.save(baseDoctorDO);
        DoctorMappingDO doctorMappingDO = null;
        if (!StringUtils.isEmpty(doctorMappingCode)){
            doctorMappingDO = doctorMappingDao.findByIdcard(baseDoctorDO.getIdcard());
            if (doctorMappingDO==null){
                doctorMappingDO = new DoctorMappingDO();
            }
            doctorMappingDO.setMappingCode(doctorMappingCode);
            doctorMappingDO.setDoctor(baseDoctorDO.getId());
            doctorMappingDO.setDoctorName(baseDoctorDO.getName());
            doctorMappingDO.setIdcard(baseDoctorDO.getId());
            doctorMappingDO.setCreateTime(new Date());
            doctorMappingDO= doctorMappingDao.save(doctorMappingDO);
        }
        //修改医生角色关联关系,医生默认可以没有角色,前端不修改就不做任何操作
        if(!CollectionUtils.isEmpty(role)){
@ -647,6 +661,8 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
         if(!CollectionUtils.isEmpty(hospital)){
             BaseDoctorHospitalDO baseDoctorHospitalDO = null;
             Set<Object> hospitalIdList = baseDoctorHospitalService.findDocHospIdList(baseDoctorDO.getId());
             String orgCode = "";
             String orgName="";
             try {
                 for(Object object : hospital){
                     baseDoctorHospitalDO = objectMapper.readValue(object.toString(),BaseDoctorHospitalDO.class);
@ -659,8 +675,13 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
                     if (dictHospitalDeptDO!=null){
                         baseDoctorHospitalDO.setDeptName(dictHospitalDeptDO.getName());
                     }
                     orgCode = baseDoctorHospitalDO.getOrgCode();
                     orgName = baseDoctorHospitalDO.getOrgName();
                     baseDoctorHospitalService.save(baseDoctorHospitalDO);
                 }
                 doctorMappingDO.setOrgCode(orgCode);
                 doctorMappingDO.setOrgName(orgName);
                 doctorMappingDao.save(doctorMappingDO);
             } catch (IOException e) {
                 result.put("msg","convert hospital jsonObject to baseDoctorHospitalDO failed," + e.getCause());
                 result.put("response",ConstantUtils.FAIL);