소스 검색

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

mengkang 4 년 전
부모
커밋
c80d0edd16

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

@ -486,6 +486,57 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
        }
    }
    /**
     * 解析顺丰推送过来的路由信息,和本地数据匹配并进行增量更新)
     * @param waybillRoute
     * @return
     * @throws Exception
     */
    public void SFRoutePushServiceNew(String waybillRoute) throws Exception{
        JSONObject object = JSONObject.parseObject(waybillRoute);
        Map<String,List<WlyyPrescriptionExpressageLogDO>> wayroutlsit = new HashMap<>();
        logger.info("顺丰入参:"+object);
        WlyyPrescriptionExpressageLogDO sflog = new WlyyPrescriptionExpressageLogDO();
        String accept_time = object.getString("acceptTime");
        String accept_address = object.getString("acceptAddress");
        String accept_remark = object.getString("remark");
        String opcode = object.getString("opCode");
        String mailno = object.getString("mailNo");
        String orderid = object.getString("orderId");
        String id = object.getString("id");
        String signStr = "id="+id+"&mailNo="+mailno+"&orderId="+orderid+"&opCode="+opcode+"&secretKey="+sf_check_word;
        String signLocal = SHAUtils.SHA512(signStr);
        logger.info("signStr"+signLocal);
        String sign = object.getString("sign");
        if (signLocal.equalsIgnoreCase(sign)){
            sflog.setAcceptTime(DateUtil.strToDate(accept_time));
            sflog.setAcceptAddress(accept_address);
            sflog.setAcceptRemark(accept_remark);
            sflog.setOpCode(opcode);
            sflog.setExpressageId(orderid);
            sflog.setId(UUID.randomUUID().toString());
            sflog.setCreateTime(new Date());
            if(wayroutlsit.keySet().contains(mailno)){
                wayroutlsit.get(mailno).add(sflog);
            }else{
                List<WlyyPrescriptionExpressageLogDO> newsflogs = new ArrayList<>();
                newsflogs.add(sflog);
                wayroutlsit.put(mailno,newsflogs);
            }
            if(!wayroutlsit.keySet().isEmpty()){
                for (String mailNo1:wayroutlsit.keySet()) {
                    List<WlyyPrescriptionExpressageLogDO> pushSFLogs = wayroutlsit.get(mailNo1);
                    //同一个快递单号的执行一个事务操作
                    this.saveSFPushRoutInfos(mailNo1,pushSFLogs);
                }
            }
        }else {
            throw new Exception("签名无效");
        }
    }
    /**
     * 同一个快递单号的执行一个事务操作
     * @param mailno
@ -770,7 +821,8 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
     */
    private String SFExpressPostV2(JSONObject params)throws Exception{
        params.put("version","1.0");
        params.put("timestamp",new Date().getTime());
        params.put("timestamp","4070916000000");
        logger.info("timestamp"+params.getString("timestamp"));
        String sign = SHAUtils.SHA512(params.toJSONString()+sf_check_word);
        String url =sf_url+"/api/open/api/addOrder?hospitalCode="+sf_code+"&sign="+sign;
    
@ -793,7 +845,7 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
      /*  params.put("version","1.0");
        params.put("timestamp",new Date().getTime());*/
        String sign = SHAUtils.SHA512(params+sf_check_word);
        String url =sf_url+"/api/open/api/listSelfPrintDO?hospitalCode="+sf_code+"&sign="+sign+"&version=1.0"+"&timestamp="+new Date().getTime()+"&orderNo="+params;
        String url =sf_url+"/api/open/api/listSelfPrintDO?hospitalCode="+sf_code+"&sign="+sign+"&version=1.0"+"&timestamp=4070916000000&orderNo="+params;
        logger.info("顺丰快递面单查询:sf_url"+url);
        logger.info("顺丰快递面单查询:params"+params.toString());

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

@ -5457,7 +5457,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        //根据门诊唯一号取就诊记录
//        List<WlyyOutpatientDO> wlyyOutpatientDOs = outpatientDao.findByAdmNo(admNo);
        WlyyPrescriptionDO wlyyPrescriptionDOS = prescriptionDao.findByAdmNoAndRealOrder(admNo, realOrder);
        WlyyPrescriptionDO wlyyPrescriptionDOS = prescriptionDao.findByAdmNoAndRealOrder(admNo,realOrder);
        Object result = "";
@ -5561,7 +5561,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "base_patient patient " +
                "WHERE " +
                "outpatient.patient=patient.id " +
                "AND outpatient.status in (0,1) " +
                "AND outpatient.status in (0,1,2) " +
                "AND outpatient.doctor='" + doctor + "' " +
                "AND outpatient.pay_status = 1 " +
                "AND outpatient.outpatient_type= '" + outpatient_type + "'  ";

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

@ -113,6 +113,9 @@ public class XzzxEntranceService{
    public static String entranceUrl = "http://172.16.100.240:10023/xzzx/";
    public static String entranceUrlLocal = "http://localhost:10023/xzzx/";
    public static String hospitalUrl = "http://192.168.118.240:10022/";//172.16.100.63
    public String getSelectUrl(){
@ -980,8 +983,8 @@ public class XzzxEntranceService{
            String rs = HttpUtil.sendPost(sendMessageUrl,params.toJSONString());
            logger.info("rs :"+rs);
            JSONObject rsJson = JSON.parseObject(rs);
            String resCode = rsJson.getString("resCode");
            if("000".equals(resCode)){
            String resCode = rsJson.getString("respCode");
            if("000000".equals(resCode)){
                return "1";
            }
            return "0";
@ -1021,8 +1024,8 @@ public class XzzxEntranceService{
            String rs = HttpUtil.sendPost(sendMessageUrl,params.toJSONString());
            logger.info("rs :"+rs);
            JSONObject rsJson = JSON.parseObject(rs);
            String resCode = rsJson.getString("resCode");
            if("000".equals(resCode)){
            String resCode = rsJson.getString("respCode");
            if("000000".equals(resCode)){
                return "1";
            }
            return "0";
@ -1972,4 +1975,33 @@ public class XzzxEntranceService{
//============================hospital业务层==================start====================
//===========================entrance访问hospital============start=======================
    /**
     *
     * @param admNo
     * @param realOrder
     * @return
     */
    public JSONObject getSFExpressInfoToHospital(String admNo, String realOrder) throws Exception {
        String response="";
        String url = hospitalUrl+"open/noLogin/getSFExpressInfoNew";
        Map<String,String> map = new HashedMap();
        map.put("admNo",admNo);
        map.put("realOrder",realOrder);
        logger.info("jsonobject"+map.toString());
        response = httpClientUtil.httpPost(url,map);
        JSONObject object = JSONObject.parseObject(response);
        JSONObject jsonObject1 = new JSONObject();
        logger.info("object"+object.toJSONString());
        if(object.getInteger("status")==200){
            String obj = object.getString("obj");
            object = JSONObject.parseObject(obj);
            jsonObject1.put("mailNo",object.getString("mailNo"));
        }
        return jsonObject1;
    }
//===========================entrance访问hospital============end=======================
}

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

@ -97,7 +97,7 @@ public class YkyyService {
            map.put("HospitalId",HospitalId);
        }
        logger.info("眼科获取充值订单号接口入参:"+map.toString());
        String url=yktUrl_90+"api/His/GetNewSerialNumber";
        String url=yktUrl_90+"api/His/GetNewSerialNumber4Jkzl";
        try {
            response=httpClientUtil.httpPost(url,map);
        } catch (Exception e) {

+ 11 - 11
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/YkyyController.java

@ -123,8 +123,8 @@ public class YkyyController extends EnvelopRestEndpoint {
        JSONObject object = JSONObject.parseObject(json);
        if (table.equalsIgnoreCase("HLW_CF01")){
            HlwCf01DO hlwCf01VO =  JSONObject.toJavaObject(object,HlwCf01DO.class);
            String cfsbSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@xec_link where bmc = 'MS_CF01'";
            String cfhmSql="select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@xec_link where bmc = 'MS_CF01_CFHM'";
            String cfsbSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@ykzxtest where bmc = 'MS_CF01'";
            String cfhmSql="select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@ykzxtest where bmc = 'MS_CF01_CFHM'";
            List<Map<String,Object>> cfsbList = hibenateUtils.createSQLQuery(cfsbSql);
            List<Map<String,Object>> cfhmList = hibenateUtils.createSQLQuery(cfhmSql);
            Long cfsb = 0L;
@ -132,14 +132,14 @@ public class YkyyController extends EnvelopRestEndpoint {
            if (cfsbList!=null&&cfsbList.size()!=0){
                cfsb = Long.parseLong(cfsbList.get(0).get("total").toString());
                System.out.println("cfsb:"+cfsb);
                String updateCfsb = "update portal_his.gy_identity_ms@xec_link set dqz=dqz+1 where bmc = 'MS_CF01'";
                String updateCfsb = "update portal_his.gy_identity_ms@ykzxtest set dqz=dqz+1 where bmc = 'MS_CF01'";
                hibenateUtils.updateBySql(updateCfsb);
            }
            if (cfhmList!=null&&cfhmList.size()!=0){
                cfhm = Long.parseLong(cfhmList.get(0).get("total").toString());
                System.out.println("cfhm:"+cfhm);
                String updateCfhm = "update portal_his.gy_identity_ms@xec_link set dqz=dqz+1 where bmc = 'MS_CF01_CFHM'";
                String updateCfhm = "update portal_his.gy_identity_ms@ykzxtest set dqz=dqz+1 where bmc = 'MS_CF01_CFHM'";
                hibenateUtils.updateBySql(updateCfhm);
            }
            hlwCf01VO.setCFSB(cfsb.intValue());
@ -152,12 +152,12 @@ public class YkyyController extends EnvelopRestEndpoint {
            envelop.setObj(object1);
        }else if (table.equalsIgnoreCase("HLW_CF02")){
            HlwCf02DO hlwCf02VO =  JSONObject.toJavaObject(object,HlwCf02DO.class);
            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@xec_link where bmc = 'MS_CF02'";
            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@ykzxtest where bmc = 'MS_CF02'";
            List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql);
            Long sbxh = 0L;
            if (sbxhList!=null&&sbxhList.size()!=0){
                sbxh = Long.parseLong(sbxhList.get(0).get("total").toString());
                String updateSbxh = "update portal_his.gy_identity_ms@xec_link set dqz=dqz+1 where bmc = 'MS_CF02'";
                String updateSbxh = "update portal_his.gy_identity_ms@ykzxtest set dqz=dqz+1 where bmc = 'MS_CF02'";
                hibenateUtils.updateBySql(updateSbxh);
            }
            JSONObject object1 = new JSONObject();
@ -169,12 +169,12 @@ public class YkyyController extends EnvelopRestEndpoint {
        }else if(table.equalsIgnoreCase("HlwYsMzJbzdDO")){
            // portal_his.gy_identity_ms@xec_link
            HlwYsMzJbzdDO hlwYsMzJbzdDO =  JSONObject.toJavaObject(object,HlwYsMzJbzdDO.class);
            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ys@xec_link where bmc = 'YS_MZ_JBZD'";
            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ys@ykzxtest where bmc = 'YS_MZ_JBZD'";
            List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql);
            Long jlbh = 0L;
            if (sbxhList!=null&&sbxhList.size()!=0){
                jlbh = Long.parseLong(sbxhList.get(0).get("total").toString());
                String updateJlbh = "update portal_his.gy_identity_ms@xec_link set dqz=dqz+1 where bmc = 'YS_MZ_JBZD'";
                String updateJlbh = "update portal_his.gy_identity_ms@ykzxtest set dqz=dqz+1 where bmc = 'YS_MZ_JBZD'";
                hibenateUtils.updateBySql(updateJlbh);
            }
            JSONObject object1 = new JSONObject();
@ -185,12 +185,12 @@ public class YkyyController extends EnvelopRestEndpoint {
        }else if(table.equalsIgnoreCase("HlwGhmxDO")){
            // portal_his.gy_identity_ms@xec_link
            HlwGhmxDO hlwGhmxDO =  JSONObject.toJavaObject(object,HlwGhmxDO.class);
            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@xec_link where bmc = 'MS_GHMX'";
            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@ykzxtest where bmc = 'MS_GHMX'";
            List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql);
            Long sbxh = 0L;
            if (sbxhList!=null&&sbxhList.size()!=0){
                sbxh = Long.parseLong(sbxhList.get(0).get("total").toString());
                String updateSbxh = "update portal_his.gy_identity_ms@xec_link set dqz=dqz+1 where bmc = 'MS_GHMX'";
                String updateSbxh = "update portal_his.gy_identity_ms@ykzxtest set dqz=dqz+1 where bmc = 'MS_GHMX'";
                hibenateUtils.updateBySql(updateSbxh);
            }
            JSONObject object1 = new JSONObject();
@ -207,7 +207,7 @@ public class YkyyController extends EnvelopRestEndpoint {
            Long jzxh = 0L;
            if (sbxhList!=null&&sbxhList.size()!=0){
                jzxh = Long.parseLong(sbxhList.get(0).get("total").toString());
                String updateJzxh = "update portal_his.gy_identity_ms@xec_link set dqz=dqz+1 where bmc = 'YS_MZ_JZLS'";
                String updateJzxh = "update portal_his.gy_identity_ms@ykzxtest set dqz=dqz+1 where bmc = 'YS_MZ_JZLS'";
                hibenateUtils.updateBySql(updateJzxh);
            }
            JSONObject object1 = new JSONObject();

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 60 - 0
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/third/PrescriptionUpdateController.java


+ 18 - 2
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/third/SfRoutePushController.java

@ -31,8 +31,8 @@ public class SfRoutePushController extends EnvelopRestEndpoint {
    @Autowired
    private PrescriptionExpressageService sfexpressService;
    private String successxml = "<Response service='RoutePushService'><Head>OK</Head></Response>";
    private String failedxml = "<Response service='RoutePushService'><Head>ERR</Head><ERROR code='4001'>系统发生数据错误或运行时异常</ERROR></Response>";
    private String successxml = "SUCCESS";
    private String failedxml = "FALSE";
    @RequestMapping(value="/routepushservice",method = RequestMethod.POST)
    @ApiOperation("顺丰路由信息推送")
@ -51,5 +51,21 @@ public class SfRoutePushController extends EnvelopRestEndpoint {
        }
    }
    @RequestMapping(value="/sfroutepushservice",method = RequestMethod.POST)
    @ApiOperation("顺丰路由信息推送")
    public String SFRoutePushServiceNew(
            @ApiParam(name="WaybillRoute", value="入参报文") @RequestParam(value = "WaybillRoute",required = true) String WaybillRoute){
        try {
            logger.info("顺丰路由信息推送,WaybillRoute="+WaybillRoute);
            sfexpressService.SFRoutePushServiceNew(WaybillRoute);
            return successxml;
        }catch (Exception e){
            logger.error("接收顺丰路由信息推送失败,入参WaybillRoute:"+WaybillRoute);
            //日志文件中记录异常信息
            //返回接口异常信息处理结果
            return failedxml;
        }
    }
}

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 64 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java


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

@ -155,7 +155,7 @@ qywx:
  id: 2
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
---
@ -238,9 +238,9 @@ qywx:
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
  sf_url: http://mrds-admin-ci.sit.sf-express.com:45478
  sf_code: HD000001
  sf_check_word: AAAABBBBCCCCDDDD
---
spring:
  profiles: jwprod
@ -323,7 +323,7 @@ qywx:
  id: zsyy
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: WH000102
  sf_check_word: TGUQASFNAZyjt9112
---
@ -414,7 +414,7 @@ qywx:
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
@ -504,7 +504,7 @@ qywx:
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
@ -589,9 +589,9 @@ qywx:
  id: xm_xzzx_wx
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000061
  sf_check_word: BEWFSCXSyjt4314rz
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: WH000101
  sf_check_word: EDSAFWFAQWyjt8099
---
##==心脏中心外 ===============================================================================
spring:
@ -675,9 +675,9 @@ qywx:
  id: xm_xzzx_wx
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000061
  sf_check_word: BEWFSCXSyjt4314rz
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: WH000101
  sf_check_word: EDSAFWFAQWyjt8099
---
##==厦门卫计委 ===============================================================================
spring:
@ -760,7 +760,7 @@ qywx:
  id: 2
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code:
  sf_check_word:
@ -846,7 +846,7 @@ qywx:
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk