فهرست منبع

第三医院版本开发

wangzhinan 1 سال پیش
والد
کامیت
99301c9e90

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

@ -39,6 +39,7 @@ import com.yihu.jw.util.entity.ServiceException;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.jw.util.network.HttpResponse;
import com.yihu.jw.util.network.HttpUtils;
import lombok.Synchronized;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@ -796,6 +797,7 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     * @param orderNo
     * @throws Exception
     */
    public JSONObject rechargeHis(String orderNo) throws Exception {
        JSONObject jsonObject1 = new JSONObject();
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderNo);

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

@ -2846,6 +2846,14 @@ public class DsyyEntranceService {
                    infoDO.getUsageName()+"|"+infoDO.getDays()+"|"+infoDO.getQuantity()+"|"+infoDO.getPackUnit()+"|";
            info = info.substring(0,info.length()-1);
        }
        BasePatientDO patientDO = patientDao.findById(prescriptionDO.getPatientCode()).get();
        String sexName="未知";
        if (patientDO.getSex()==1){
            sexName="男";
        }else if (patientDO.getSex()==2){
            sexName="女";
        }
        Integer age = DateUtil.getAgeForIdcard(patientDO.getIdcard());
        String condition = "<MESSAGE><PATIENT_ID>"+patientMappingDO.getMappingCode()+"</PATIENT_ID>" +
                "<HIS_REGISTER_PK>"+outpatientDO.getRegisterNo()+"</HIS_REGISTER_PK>" +
                "<VISIT_ID>"+(visitId==0?"":visitId)+"</VISIT_ID>"+
@ -2872,6 +2880,14 @@ public class DsyyEntranceService {
                "<门诊处置>"+info+"</门诊处置>" +
                "<检验></检验>" +
                "<检查></检查>" +
                "<姓名>"+outpatientDO.getPatientName()+"</姓名>" +
                "<性别>"+sexName+"</性别>" +
                "<年龄>"+age+"岁</年龄>" +
                "<科室>"+outpatientDO.getDeptName()+"</科室>" +
                "<ID号>"+outpatientDO.getRegisterNo()+"</ID号>" +
                "<就诊状态>复诊</就诊状态>" +
                "<就诊时间>"+DateUtil.dateToStrShort(outpatientDO.getRegisterDate())+"</就诊时间>" +
                "<起草医师>"+outpatientDO.getDoctorName()+"</起草医师>"+
                "</Structured_medical>" +
                "</MESSAGE>";
        String str  = StringEscapeUtils.escapeXml(condition);
@ -2884,7 +2900,6 @@ public class DsyyEntranceService {
            hashType = data.getString("hashType");
        }
        String baseSign="";
        BasePatientDO patientDO = patientDao.findById(outpatientDO.getPatient()).get();
        if (patientDO!=null&&doctorDO!=null){
            String patientName = patientDO.getName();
            Integer patientAge = IdCardUtil.getAgeForIdcard(patientDO.getIdcard());
@ -3032,7 +3047,7 @@ public class DsyyEntranceService {
        }
        String condition = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" +
                "  <MESSAGE>\n" +
                "    <PATIENT_ID>"+patientMappingDO.getMappingCode()+"1</PATIENT_ID>\n" +
                "    <PATIENT_ID>"+patientMappingDO.getMappingCode()+"</PATIENT_ID>\n" +
                "    <VISIT_ID>"+visitId+"</VISIT_ID>\n" +
                "    <NAME>"+outpatientDO.getPatientName()+"</NAME>\n" +
                "    <NAME_PHONETIC></NAME_PHONETIC>\n" +
@ -3111,6 +3126,14 @@ public class DsyyEntranceService {
                    infoDO.getUsageName()+"|"+infoDO.getDays()+"|"+infoDO.getQuantity()+"|"+infoDO.getPackUnit()+"|";
            info = info.substring(0,info.length()-1);
        }
        BasePatientDO patientDO = patientDao.findById(prescriptionDO.getPatientCode()).get();
        String sexName="未知";
        if (patientDO.getSex()==1){
            sexName="男";
        }else if (patientDO.getSex()==2){
            sexName="女";
        }
        Integer age = DateUtil.getAgeForIdcard(patientDO.getIdcard());
        String condition = "<MESSAGE>\n" +
                "    <PATIENT_ID>"+patientMappingDO.getMappingCode()+"</PATIENT_ID>\n" +
                "    <HIS_REGISTER_PK>"+outpatientDO.getRegisterNo()+"</HIS_REGISTER_PK>\n" +
@ -3141,6 +3164,14 @@ public class DsyyEntranceService {
                "      <门诊处置>"+info+"</门诊处置>\n" +
                "      <检验></检验>\n" +
                "      <检查></检查>\n" +
                "      <姓名>"+outpatientDO.getPatientName()+"</姓名>\n" +
                "      <性别>"+sexName+"</性别>\n" +
                "      <年龄>"+age+"岁</年龄>\n" +
                "      <科室>"+outpatientDO.getDeptName()+"</科室>\n" +
                "      <ID号>"+outpatientDO.getRegisterNo()+"</ID号>\n" +
                "      <就诊状态>复诊</就诊状态>\n" +
                "      <就诊时间>"+DateUtil.dateToStrShort(outpatientDO.getRegisterDate())+"</就诊时间>\n" +
                "      <起草医师>"+outpatientDO.getDoctorName()+"</起草医师>"+
                "    </Structured_medical>\n" +
                "  </MESSAGE>";
        String pInput=condition;

+ 8 - 9
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -64,6 +64,7 @@ import com.yihu.jw.wechat.enterprise.EnterpriseService;
import com.yihu.jw.mysql.query.BaseJpaService;
import com.yihu.jw.util.network.HttpResponse;
import com.yihu.jw.util.network.HttpUtils;
import lombok.Synchronized;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
@ -1443,6 +1444,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
     * @param tradeType
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    public JSONObject tradeQuery(String relationCode,String tradeType) throws Exception {
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        String operatorId = "";
@ -1456,12 +1458,12 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if (object.getString("respCode").equalsIgnoreCase("000000")){
            JSONObject param = object.getJSONObject("param");
            if (param.getString("result").equalsIgnoreCase("succ")){
                if(wechatId.equalsIgnoreCase("xm_dsyy_wx")){
                    logger.info("his充值开始");
                    dsyyPrescriptionService.rechargeHis(businessOrderDO.getOrderNo());
                    logger.info("his充值结束");
                }
                if (businessOrderDO.getStatus()!=1){
                    if(wechatId.equalsIgnoreCase("xm_dsyy_wx")){
                        logger.info("his充值开始");
                        dsyyPrescriptionService.rechargeHis(businessOrderDO.getOrderNo());
                        logger.info("his充值结束");
                    }
                    WlyyOutpatientDO wlyyOutpatientDO = new WlyyOutpatientDO();
                    if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
                        wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
@ -1551,10 +1553,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                    }
                }
                businessOrderDO.setUpdateTime(new Date());
                businessOrderDO.setStatus(1);
                businessOrderDO.setPayTime(new Date());
                businessOrderDao.save(businessOrderDO);
                updatePayStatus(businessOrderDO.getOrderNo());
            }
        }
        return object;

+ 3 - 1
business/im-service/src/main/java/com/yihu/jw/im/service/RobotService.java

@ -106,6 +106,7 @@ public class RobotService {
    public void sendReplyMap(Map<String,JSONObject> map){
        try {
            System.out.println("map"+map);
            WlyyHospitalSysDictDO dictDO = getSender();
            for (JSONObject json:map.values()){
                imService.patientGuaidenceAppend(dictDO.getDictCode(),dictDO.getDictValue(),json.getString("session_id"),
@ -348,7 +349,8 @@ public class RobotService {
    public void welcome(String session_id,Map<String,BaseSystemDialogSetting> mapSetting,Map<String,JSONObject> map){
        try {
            Integer sessionStatus = imUtil.sessionStatus(session_id);
            if(sessionStatus==null||sessionStatus==1){
            System.out.println("mapSetting==="+mapSetting+"==sessionStatus=="+sessionStatus);
            if(sessionStatus==null||sessionStatus==0){
                //系统客服tip
                JSONObject tip = new JSONObject();
                tip.put("content","1");

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

@ -717,7 +717,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
     * @throws IOException
     * @throws PayException
     */
    @RequestMapping(value = "/ylzReceiveNotify")
    @RequestMapping(value = "/ylzReceiveNotify1")
    public String mmpReceiveNotify(HttpServletRequest request, HttpServletResponse response) throws IOException, PayException {
        response.setContentType("text/html;charset=utf-8");
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_pay_config").orElse(null);
@ -756,12 +756,12 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                    String traceNo = param.getString("outChargeNo");
                    //im处方发消息
                    BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(traceNo);
                    if(wxId.equalsIgnoreCase("xm_dsyy_wx")){
                        logger.info("his充值开始");
                        dsyyPrescriptionService.rechargeHis(businessOrderDO.getOrderNo());
                        logger.info("his充值结束");
                    }
                    if (businessOrderDO.getStatus()!=1){
                        if(wxId.equalsIgnoreCase("xm_dsyy_wx")){
                            logger.info("his充值开始");
                            dsyyPrescriptionService.rechargeHis(businessOrderDO.getOrderNo());
                            logger.info("his充值结束");
                        }
                        WlyyOutpatientDO wlyyOutpatientDO = new WlyyOutpatientDO();
                        if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("4")){
                            WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findById(businessOrderDO.getRelationCode()).orElse(null);
@ -870,7 +870,6 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                            systemMessageDao.save(systemMessageDO);
                        }
                    }
                    businessOrderService.updatePayStatus(traceNo);
                    return "SUCCESS";
                }