bing преди 2 години
родител
ревизия
e98b09e220

+ 21 - 1
common/common-entity/sql记录

@ -1621,4 +1621,24 @@ CREATE TABLE `t_mediicine_device_param` (
  `device_ip` varchar(20) DEFAULT NULL COMMENT '设备ip地址',
  `yb_strin` varchar(500) DEFAULT NULL COMMENT '医保固定参数值',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='药柜接口参数配置';
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='药柜接口参数配置';
-- 2022-06-28
ALTER table base_ylz_medical_relation modify column `med_type` varchar(10) DEFAULT NULL COMMENT '医疗类别'
ALTER table base_ylz_medical_relation add column psn_no VARCHAR(30) default null COMMENT'人员编码 医保';
ALTER table base_ylz_medical_relation add column apply_time VARCHAR(30) default null COMMENT'开单时间';
ALTER table base_ylz_medical_icd add column diag_dept VARCHAR(30) default null COMMENT'诊断科室';
ALTER table base_ylz_medical_icd add column dise_dor_no VARCHAR(30) default null COMMENT'诊断医生编码';
ALTER table base_ylz_medical_icd add column dise_dor_name VARCHAR(30) default null COMMENT'诊断医生姓名';
ALTER table base_ylz_medical_mx add column psn_setlway VARCHAR(10) default null COMMENT'个人结算方式';
ALTER table base_ylz_medical_mx add column rx_circ_flag VARCHAR(10) default null COMMENT'外购处方标志';
ALTER table base_ylz_medical_mx add column bilg_dept_codg VARCHAR(30) default null COMMENT'开单科室编码';
ALTER table base_ylz_medical_mx add column bilg_dept_name VARCHAR(100) default null COMMENT'开单科室名称';
ALTER table base_ylz_medical_mx add column bilg_dr_codg VARCHAR(30) default null COMMENT'开单医生编码';
ALTER table base_ylz_medical_mx add column bilg_dr_name VARCHAR(50) default null COMMENT'开单医师姓名';
ALTER table base_ylz_medical_mx add column hosp_appr_flag VARCHAR(3) default null COMMENT'医院审批标志';
ALTER table base_ylz_medical_mx add column rxno VARCHAR(30) default null COMMENT'单据号(对应基线接口:rxno)';
ALTER table base_ylz_medical_mx add column charge_unit_name VARCHAR(30) default null COMMENT'医保项目单位名称【对应基线接口:prcunt】';

+ 39 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/healthCare/YlzMedicalIcdDO.java

@ -18,10 +18,15 @@ public class YlzMedicalIcdDO extends UuidIdentityEntity {
    private String diseaseCodeIcd10;
    private String diseaseNameIcd10;
    private String diseaseType;
    private String diseaseOrder;
    private Integer del;
    private String diseaseOrder; //诊断排序号
    private Integer del; //有效标志
    private Date createTime;
    private String diagDept;//诊断科室
    private String diseDorNo; //诊断医生编码
    private String diseDorName;//诊断医生姓名
    private String diagTime;//诊断时间
    //自助机字段
    private String diseMsgid; //发送方报文ID【用于门诊就诊信息上传接口】
@ -90,4 +95,36 @@ public class YlzMedicalIcdDO extends UuidIdentityEntity {
    public void setDiseMsgid(String diseMsgid) {
        this.diseMsgid = diseMsgid;
    }
    public String getDiagDept() {
        return diagDept;
    }
    public void setDiagDept(String diagDept) {
        this.diagDept = diagDept;
    }
    public String getDiseDorNo() {
        return diseDorNo;
    }
    public void setDiseDorNo(String diseDorNo) {
        this.diseDorNo = diseDorNo;
    }
    public String getDiseDorName() {
        return diseDorName;
    }
    public void setDiseDorName(String diseDorName) {
        this.diseDorName = diseDorName;
    }
    public String getDiagTime() {
        return diagTime;
    }
    public void setDiagTime(String diagTime) {
        this.diagTime = diagTime;
    }
}

+ 82 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/healthCare/YlzMedicalMxDO.java

@ -52,6 +52,16 @@ public class YlzMedicalMxDO extends UuidIdentityEntity {
    private String chrgBchno;//收费批次号
    private String insurSettleSort;//医保结算序号
    private String medType;//医保结算序号
    private String psnSetlway;//医保结算序号
    private String rxCircFlag;//外购处方标志
    private String bilgDeptCodg;  //开单科室编码
    private String bilgDeptName;  //开单科室名称
    private String bilgDrCodg;    //开单医生编码
    private String bilgDrName;    //开单医师姓名
    private String hospApprFlag;  //医院审批标志
    private String rxno;    //rxno
    private String chargeUnitName;    //单位名称医保项目单位名称【对应基线接口:prcunt】
    public String getMedicalId() {
        return medicalId;
@ -348,4 +358,76 @@ public class YlzMedicalMxDO extends UuidIdentityEntity {
    public void setMedType(String medType) {
        this.medType = medType;
    }
    public String getPsnSetlway() {
        return psnSetlway;
    }
    public void setPsnSetlway(String psnSetlway) {
        this.psnSetlway = psnSetlway;
    }
    public String getRxCircFlag() {
        return rxCircFlag;
    }
    public void setRxCircFlag(String rxCircFlag) {
        this.rxCircFlag = rxCircFlag;
    }
    public String getBilgDeptCodg() {
        return bilgDeptCodg;
    }
    public void setBilgDeptCodg(String bilgDeptCodg) {
        this.bilgDeptCodg = bilgDeptCodg;
    }
    public String getBilgDeptName() {
        return bilgDeptName;
    }
    public void setBilgDeptName(String bilgDeptName) {
        this.bilgDeptName = bilgDeptName;
    }
    public String getBilgDrCodg() {
        return bilgDrCodg;
    }
    public void setBilgDrCodg(String bilgDrCodg) {
        this.bilgDrCodg = bilgDrCodg;
    }
    public String getBilgDrName() {
        return bilgDrName;
    }
    public void setBilgDrName(String bilgDrName) {
        this.bilgDrName = bilgDrName;
    }
    public String getHospApprFlag() {
        return hospApprFlag;
    }
    public void setHospApprFlag(String hospApprFlag) {
        this.hospApprFlag = hospApprFlag;
    }
    public String getRxno() {
        return rxno;
    }
    public void setRxno(String rxno) {
        this.rxno = rxno;
    }
    public String getChargeUnitName() {
        return chargeUnitName;
    }
    public void setChargeUnitName(String chargeUnitName) {
        this.chargeUnitName = chargeUnitName;
    }
}

+ 62 - 4
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/healthCare/YlzMedicalRelationDO.java

@ -19,7 +19,7 @@ import java.util.List;
public class YlzMedicalRelationDO extends UuidIdentityEntity {
    private String insuranceSerial;//医保收费流水号,
    private String billSerial;//医保收费流水号,
    private String billSerial;//医保收费流水号,s
    private String hisBillSerial;//his收费流水号',
    private String medicalMode;//医疗就诊方式,
    private String medicalType;//医疗类别,
@ -43,12 +43,12 @@ public class YlzMedicalRelationDO extends UuidIdentityEntity {
    private String invoiceJj;//发票打印基金应支付
    private String invoiceXj;//发票打印现金应支付
    private String invoiceZh;//发票打印账户应支付
    private String logNo;//系统跟踪号
    private String logNo;//系统跟踪号   //处方号
    private String orgCode;//医院编码
    private String regionCode;//参保地区划代码
    private String idcard;//证件号码
    private String certType;//证件类型
    private String hisSerial;//his流水号
    private String hisSerial;//his流水号 //就诊id
    private String hisSettleNo;//his結算流水号
    private String deptCode;//标准科室编码
    private String deptName;//标准科室名称
@ -94,6 +94,12 @@ public class YlzMedicalRelationDO extends UuidIdentityEntity {
    //自助机字段
    private String medType; //医疗类别
    private String caty; //科别【挂号】
    private String atddrNo; //医师编码【挂号】
    private String drName; //医师姓名【挂号】
    private String visitMsgid; //挂号发送方报文ID【挂号】
    private String psnNo; //人员编码 医保
    private String applyTime; //开单时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    @Column(name="settle_date")
@ -337,7 +343,7 @@ public class YlzMedicalRelationDO extends UuidIdentityEntity {
        return fundPrice;
    }
    public void setFundPrice(String fundPrice) {
    public void setFundPrice(String s) {
        this.fundPrice = fundPrice;
    }
@ -740,4 +746,56 @@ public class YlzMedicalRelationDO extends UuidIdentityEntity {
    public void setMedType(String medType) {
        this.medType = medType;
    }
    @Transient
    public String getCaty() {
        return caty;
    }
    public void setCaty(String caty) {
        this.caty = caty;
    }
    @Transient
    public String getAtddrNo() {
        return atddrNo;
    }
    public void setAtddrNo(String atddrNo) {
        this.atddrNo = atddrNo;
    }
    @Transient
    public String getDrName() {
        return drName;
    }
    public void setDrName(String drName) {
        this.drName = drName;
    }
    @Transient
    public String getVisitMsgid() {
        return visitMsgid;
    }
    public void setVisitMsgid(String visitMsgid) {
        this.visitMsgid = visitMsgid;
    }
    public String getPsnNo() {
        return psnNo;
    }
    public void setPsnNo(String psnNo) {
        this.psnNo = psnNo;
    }
    public String getApplyTime() {
        return applyTime;
    }
    public void setApplyTime(String applyTime) {
        this.applyTime = applyTime;
    }
}

+ 1 - 0
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/BasicZuulFilter.java

@ -127,6 +127,7 @@ public class BasicZuulFilter extends ZuulFilter {
        //内部微服务有不需要认证的地址请在URL上追加/open/来进行过滤,如/api/v1.0/open/**,不要在此继续追加!!!
        if (url.contains("/auth/")//验证服务
                ||url.contains("/authygTest/")//验证服务
                || url.contains("/base/wechat")//微信
                || url.contains("/patient/wxBase/")//微信
                || url.contains("/patient/wx/")//微信页面不拦截

+ 8 - 0
gateway/ag-basic/src/main/resources/application.yml

@ -79,6 +79,14 @@ zuul:
    svr-authentication:
      path: /cityihealth/auth/**
      serviceId: svr-authentication
#药柜预发布环境
    svr-base-yg:
      path: /cityihealth/baseygTest/**
      serviceId: svr-base-yg
#药柜后台预发布
    svr-authentication-yg:
      path: /cityihealth/authygTest/**
      serviceId: svr-authentication-yg
    svr-healthy-house:
      path: /cityihealth/healthyHouse/**
      serviceId: svr-healthy-house

+ 53 - 5
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/a4endpoint/MedicineOrderDrugsEndpoint.java

@ -38,23 +38,71 @@ public class MedicineOrderDrugsEndpoint extends EnvelopRestEndpoint {
        return failed(map.get("failed").toString());
    }
    @GetMapping("/getSettlementInfo")
    @ApiOperation(value = "获取患者待结算信息页面", notes = "获取患者待结算信息页面")
    public Envelop getSettlementInfo(
    @GetMapping("/open/getSettlementInfoList")
    @ApiOperation(value = "获取患者待结算信息", notes = "获取患者待结算信息")
    public Envelop getSettlementInfoList(
            @ApiParam(name = "cardNo", value = "cardNo")
            @RequestParam(value = "cardNo", required = true) String cardNo,
            @ApiParam(name = "orgCode", value = "orgCode")
            @RequestParam(value = "orgCode", required = true) String orgCode){
        try {
            return success("操作成功", medOrderService.getSettlementInfo(cardNo,orgCode));
            return success("操作成功", medOrderService.getSettlementInfoList(cardNo,orgCode));
        } catch (Exception e) {
            e.getMessage();
            return Envelop.getError(e.getMessage());
        }
    }
    @GetMapping("/open/getSettlementInfoFirst")
    @ApiOperation(value = "获取患者待结算--个人信息、挂号接口封装", notes = "挂号接口封装")
    public Envelop getSettlementInfoFirst(
            @ApiParam(name = "recipe_no", value = "recipe_no")
            @RequestParam(value = "recipe_no", required = true) String recipe_no){
        try {
            return success("操作成功", medOrderService.getSettlementInfoFirst(recipe_no));
        } catch (Exception e) {
            e.getMessage();
            return Envelop.getError(e.getMessage());
        }
    }
    @GetMapping("/open/getSettlementInfoSecode")
    @ApiOperation(value = "获取患者待结算--费用明细上传接口封装", notes = "费用明细上传接口封装")
    public Envelop getSettlementInfoSecode(
            @ApiParam(name = "recipe_no", value = "recipe_no")
            @RequestParam(value = "recipe_no", required = true) String recipe_no,
            @ApiParam(name = "readcardResult", value = "readcardResult")
            @RequestParam(value = "readcardResult", required = true) String readcardResult,
            @ApiParam(name = "registerResult", value = "registerResult")
            @RequestParam(value = "registerResult", required = false) String registerResult){
        try {
            return success("操作成功", medOrderService.getSettlementInfoSecond(recipe_no,readcardResult,registerResult));
        } catch (Exception e) {
            e.getMessage();
            return Envelop.getError(e.getMessage());
        }
    }
    @GetMapping("/open/getSettlementInfo")
    @ApiOperation(value = "获取患者待His结算信息页面", notes = "获取患者待His结算信息页面")
    public Envelop getSettlementInfo(
            @ApiParam(name = "chargeArr", value = "chargeArr")
            @RequestParam(value = "chargeArr", required = false) String chargeArr,
            @ApiParam(name = "recipe_no", value = "recipe_no")
            @RequestParam(value = "recipe_no", required = true) String recipe_no){
        try {
            return success("操作成功", medOrderService.getSettlementInfo(chargeArr,recipe_no));
        } catch (Exception e) {
            e.getMessage();
            return Envelop.getError(e.getMessage());
        }
    }
    @GetMapping("/executeSickSettleMultiNew")
    @GetMapping("/open/executeSickSettleMultiNew")
    @ApiOperation(value = "续方确认结算-智业", notes = "续方确认结算-智业")
    public Envelop getSettlementInfo(
            @ApiParam(name = "recipe_no", value = "处方号")

+ 13 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/common/CommonEndpoint.java

@ -37,4 +37,17 @@ public class CommonEndpoint extends EnvelopRestEndpoint {
            return failedObjEnvelopException(e);
        }
    }
    @RequestMapping(value = "/readcardParamTest",method = RequestMethod.GET)
    @ApiOperation("医保人员基本信息获取接口参数封装")
    public ObjEnvelop readcardParamTest( @ApiParam(name = "cardNo", value = "cardNo")
                                         @RequestParam(value = "cardNo", required = true) String cardNo,
                                         @ApiParam(name = "orgCode", value = "orgCode")
                                         @RequestParam(value = "orgCode", required = true) String orgCode){
        try {
            return ObjEnvelop.getSuccess("success",ylzService.readcardParamTest(cardNo,orgCode));
        }catch (Exception e){
            return failedObjEnvelopException(e);
        }
    }
}

+ 34 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/service/a3service/JwService.java

@ -16,6 +16,7 @@ import com.yihu.jw.wlyy.wlyyhttp.WlyyHttpService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -39,6 +40,8 @@ public class JwService {
    private YlzMedicailIcdDao ylzMedicailIcdDao;
    @Autowired
    private YlzMedicailMxDao ylzMedicailMxDao;
    @Value("${spring.profiles}")
    private String springProfiles;
    /**
     * 获取智业待结算数据接口--自助机
@ -66,6 +69,36 @@ public class JwService {
        return re;
    }
    /**
     * 获取预缴金余额
     * @param cardNo 卡号
     * @param orgCode 机构编码
     * @return
     */
    public JSONObject getSickDispBalance(String cardNo,String orgCode){
        Map<String,String> param = new HashMap<>();
        param.put("interfaceStr","getSickDispBalance");//接口方法
        param.put("orgCode",orgCode);
        JSONObject msgBody = new JSONObject();
        msgBody.put("cardNo",cardNo);
        param.put("msgBody",msgBody.toJSONString());
        JSONObject re = null;
        if ("jwtest".equals(springProfiles)){
            re = JSONObject.parseObject("{\"msg\":\"success\",\"data\":{\"CODE\":\"1\",\"returnData\":[{\"result\":\"1\"}],\"byRefParaData\":[{\"dispBalance\":\"100\"}]},\"status\":200}\n");
        }else {
            re = wlyyHttpService.sendWlyyMes("callEhrInterfaceYG", null,param);
        }
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setCode("callEhrInterfaceYG");
        wlyyHttpLogDO.setRequest(param.toString());
        wlyyHttpLogDO.setResponse(re.toJSONString());
        wlyyHttpLogDO.setName("获取预缴金余额");
        wlyyHttpLogDO.setStatus("1");
        wlyyHttpLogDO.setCreateTime(new Date());
        httpLogDao.save(wlyyHttpLogDO);
        return re;
    }
    /**
     * 确认结算-智业--自助机
     * @param
@ -117,7 +150,7 @@ public class JwService {
                insurResultTmp.put("naty",""); //民族 todo
                insurResultTmp.put("brdy",""); //出生日期 todo
                insurResultTmp.put("age",""); //年龄 todo
                insurResultTmp.put("insutype","1"); //险种类型
                insurResultTmp.put("insutype","310"); //险种类型
                insurResultTmp.put("psn_type","11"); //人员类别"
                insurResultTmp.put("cvlserv_flag","0"); //公务员标志
                insurResultTmp.put("setl_time", DateUtil.getStringDateShort());    //结算时间

Файловите разлики са ограничени, защото са твърде много
+ 696 - 65
svr/svr-base/src/main/java/com/yihu/jw/base/service/a3service/MedOrderService.java


+ 85 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/a3service/YlzService.java

@ -1,9 +1,12 @@
package com.yihu.jw.base.service.a3service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalRelationDO;
import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import com.yihu.jw.entity.util.AesEncryptUtils;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.jw.wlyy.wlyyhttp.WlyyHttpService;
import org.apache.commons.lang3.StringUtils;
@ -171,4 +174,86 @@ public class YlzService {
            }
        }
    }
    /**
     *  医保人员信息接口参数封装测试
     */
    public com.alibaba.fastjson.JSONArray readcardParamTest(String cardNo,String orgCode) throws Exception {
        JSONArray result = new JSONArray();
        String sql = " select dp.* from t_mediicine_device de INNER JOIN t_mediicine_device_param dp on de.id = dp.device_id  " +
                "where de.del=1 and dp.del=1 and de.belong_community='"+orgCode+"' ";
        List<Map<String,Object>> deviceParams =  jdbcTemplate.queryForList(sql);
        if (deviceParams.size()==0){
            throw new Exception("药柜参数获取错误");
        }
        Map<String,Object> deviceParam = deviceParams.get(0);
        JSONObject settleTmp = new JSONObject();
        /**
         * 封装医保人员信息获取接口
         **/
        JSONObject strinObj = JSONObject.parseObject(deviceParam.get("yb_strin").toString());
        JSONObject netData = new JSONObject();
        netData.put("opter","010XXX");
        netData.put("msgid",strinObj.getString("outBizNo")+ DateUtil.getYyyymmddhhmmss(new Date()));
        netData.put("opmsgidter","123123");
        netData.put("fixmedins_code",strinObj.getString("outBizNo"));
        netData.put("opter_name","XX");
        netData.put("infver","V1.0");
        netData.put("opter_type","1");
        netData.put("mdtrtarea_admvs","350200");
        netData.put("fixmedins_name","XX");
        netData.put("signtype","SM2");
        netData.put("recer_sys_code","0");
        netData.put("dev_no",strinObj.getString("serialNo"));
        JSONObject input = new JSONObject();
        JSONObject inputDetail = new JSONObject();
        JSONObject dataDetail = new JSONObject();
        inputDetail.put("mdtrt_cert_type","03");
        inputDetail.put("mdtrt_cert_no",cardNo);
        input.put("data",inputDetail);
        dataDetail.put("input",input);
        dataDetail.put("net_data",netData);
        strinObj.put("func","fsi.terminal.readcard");
        strinObj.put("data",dataDetail);
        settleTmp.put("readcardParam",strinObj.toJSONString());
        if ("jwtest".equals(springProfiles)){//测试线返回模拟数据
            JSONObject readcardResult = new JSONObject();
            readcardResult.put("func","fsi.terminal.readcard");
            readcardResult.put("retCode","0000");
            readcardResult.put("retMsg","操作成功");
            readcardResult.put("data",new JSONObject());
            readcardResult.put("net_data",new JSONObject());
            readcardResult.put("inf_refmsgid",strinObj.getString("outBizNo")+ DateUtil.getYyyymmddhhmmss(new Date()));
            readcardResult.put("refmsg_time",DateUtil.getYyyymmddhhmmss(new Date()));
            readcardResult.put("respond_time",DateUtil.getYyyymmddhhmmss(new Date()));
            JSONObject output = new JSONObject();
            JSONObject baseinfo = new JSONObject();
            baseinfo.put("psn_no",cardNo+cardNo);
            baseinfo.put("psn_cert_type","03");
            baseinfo.put("certno",cardNo);
            baseinfo.put("psn_name","XXX");
            baseinfo.put("gend","未知");
            baseinfo.put("age",1);
            JSONObject insuinfo = new JSONObject();
            insuinfo.put("balc",16.20);
            insuinfo.put("insutype","310");
            insuinfo.put("psn_type","11");
            insuinfo.put("psn_insu_stas","1");
            insuinfo.put("psn_insu_date",DateUtil.getStringDateShort());
            insuinfo.put("paus_insu_date",DateUtil.getStringDateShort());
            insuinfo.put("cvlserv_flag","1");
            insuinfo.put("insuplc_admdvs","350200");
            JSONObject idetinfo = new JSONObject();
            idetinfo.put("psn_idet_type","");
            idetinfo.put("begntime",DateUtil.getStringDate());
            output.put("baseinfo",baseinfo);
            output.put("insuinfo",insuinfo);
            output.put("idetinfo",idetinfo);
            readcardResult.put("output",output);
            settleTmp.put("readcardResult",readcardResult.toJSONString());
        }
        result.add(settleTmp);
        return result;
    }
}

+ 1 - 1
svr/svr-base/src/main/resources/application.yml

@ -813,7 +813,7 @@ spring:
  redis:
    host: 10.95.22.142 # Redis server host.
    port: 6380 # Redis server port.
    password: jkzlehr
    password: o!a1#B74&m
fastDFS:
  fastdfs_file_url: http://172.26.0.222:8888/
demo: