Jelajahi Sumber

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

# Conflicts:
#	business/base-service/src/main/java/com/yihu/jw/hospital/doctor/dao/DoctorWorkTimeDao.java
#	business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
#	gateway/ag-basic/src/main/resources/bootstrap.yml
#	svr/svr-internet-hospital/src/main/resources/application.yml
wangzhinan 5 tahun lalu
induk
melakukan
8e3b37a75f

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

@ -5274,7 +5274,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param outpatient
     * @return
     */
    public SystemMessageDO sendOutPatientMes(WlyyOutpatientDO outpatient) {
    public SystemMessageDO sendOutPatientMes(WlyyOutpatientDO outpatient,boolean payFlag) {
        SystemMessageDO systemMessageDO = new SystemMessageDO();
        String msg = "";
        JSONObject data = new JSONObject();
@ -5288,11 +5288,15 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                if ("1".equals(outpatient.getType())) {
                    systemMessageDO.setTitle("图文复诊");
                    systemMessageDO.setType("1");
                    saveInquirySystemMessage(outpatient,null);
                    if (payFlag){
                        saveInquirySystemMessage(outpatient,null);
                    }
                } else {
                    systemMessageDO.setTitle("视频复诊预约成功");
                    systemMessageDO.setType("2");
                    saveInquirySystemMessage(outpatient,null);
                    if (payFlag){
                        saveInquirySystemMessage(outpatient,null);
                    }
                    msg = "您的视频复诊已预约成功。\n" +
                            "预计" + outpatient.getDoctorName() + "医生将于" + outpatient.getRegisterDate() + " 与您进行视频咨询。请留意系统消息或微信公众号消息。咨询开始时,医生将邀请您进行视频通话,请您关注消息提醒,及时接受医生视频邀请。";
                    systemMessageDO.setReceiver(outpatient.getDoctor());

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

@ -354,7 +354,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
    }
    public Map<String,Object> selectOrderByRelationCode(String relationCode,String tradeType,String wechatId) throws Exception {
    public Map<String,Object> selectOrderByRelationCode(String relationCode,String tradeType,String wechatId,boolean payFlag) throws Exception {
        WxWechatDO wxWechatDO = wechatDao.findById(wechatId);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        String body = businessOrderDO.getDescription();
@ -374,7 +374,12 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        String url = wxWechatDO.getBaseUrl();
        String notifyUrl =url;
        Map<String,Object> map = unifiedorder(wechatId,body,totalFee,tradeType,openid,ourTradeNo,notifyUrl);
        Map<String,Object> map = new HashedMap();
        if (payFlag){
            map = unifiedorder(wechatId,body,totalFee,tradeType,openid,ourTradeNo,notifyUrl);
        }else {
            updatePayStatusByRelation(relationCode);
        }
        return map;
    }

+ 6 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -116,6 +116,9 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
	@Value("${wechat.id}")
	private String wxId;
	@Value("${pay.flag}")
	private boolean payFlag;
	
	@Autowired
	private FileUtil fileUtil;
@ -444,7 +447,9 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
				}else {
					msg=re.getString("patientName")+",您好!您有一个图文咨询订单待支付,请及时支付。点击完成支付,如您已支付请忽略本条信息。";
				}
				prescriptionService.saveInquirySystemMessage(null,consult);
				if (payFlag){
					prescriptionService.saveInquirySystemMessage(null,consult);
				}
				data.put("msg",msg);
				systemMessageDO.setData(data.toString());
				systemMessageService.saveMessage(systemMessageDO);

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

@ -117,6 +117,9 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    
    @Value("${wechat.id}")
    private String wxId;
    @Value("${pay.flag}")
    private boolean payFlag;
    
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findOutpatientList)
    @ApiOperation(value = " 查询某个时间段的患者门诊就诊记录")
@ -340,7 +343,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        WlyyOutpatientDO wlyyOutpatientDO = prescriptionService.appointmentRevisit(outpatientJson,expressageJson,registerJson,chargeType);
        
        //发送系统消息
        SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO);
        SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO,payFlag);
        //发送IM消息
        hospitalSystemMessageService.sendImMessage(systemMessageDO);
        
@ -847,7 +850,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        WlyyOutpatientDO wlyyOutpatientDO = prescriptionService.cooperativeOutpatient(outpatientJson,registerJson,chargeType);
        
        //构建系统消息
        SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO);
        SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO,payFlag);
        //发送系统消息
        hospitalSystemMessageService.sendImMessage(systemMessageDO);
        

+ 3 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/ykyy/YkyyController.java

@ -47,6 +47,8 @@ public class YkyyController extends EnvelopRestEndpoint {
    @Value("${demo.flag}")
    private boolean demoFlag;
    @Value("${pay.flag}")
    private boolean payFlag;
    @GetMapping(value = "/selectCardList")
    @ApiOperation(value = "查询就诊卡")
@ -327,7 +329,7 @@ public class YkyyController extends EnvelopRestEndpoint {
            @ApiParam(name = "tradeType", value = "tradeType", required = false)
            @RequestParam(required = false)String tradeType) throws Exception {
        try {
            return ObjEnvelop.getSuccess("ok",businessOrderService.selectOrderByRelationCode(relationCode,tradeType,wxId));
            return ObjEnvelop.getSuccess("ok",businessOrderService.selectOrderByRelationCode(relationCode,tradeType,wxId,payFlag));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }

+ 3 - 0
svr/svr-internet-hospital/src/main/resources/application.yml

@ -780,6 +780,9 @@ myFamily:
# mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: true
#支付支付
pay:
  flag: true
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL