Browse Source

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/prescription/service/PrescriptionService.java
wangzhinan 4 years ago
parent
commit
e3b75d3e0f
16 changed files with 169 additions and 41 deletions
  1. 6 0
      business/base-service/src/main/java/com/yihu/jw/hospital/mapping/service/PatientMappingService.java
  2. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java
  3. 67 5
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java
  4. 5 1
      business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java
  5. 2 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java
  6. 12 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/prescription/WlyyOutpatientVO.java
  7. 2 2
      gateway/ag-basic/src/main/resources/bootstrap.yml
  8. 1 1
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java
  9. 1 1
      server/svr-authentication/src/main/resources/bootstrap.yml
  10. 4 8
      svr/svr-internet-hospital-entrance/src/main/resources/application.yml
  11. 1 1
      svr/svr-internet-hospital-entrance/src/main/resources/bootstrap.yml
  12. 8 13
      svr/svr-internet-hospital-job/src/main/resources/application.yml
  13. 1 1
      svr/svr-internet-hospital-job/src/main/resources/bootstrap.yml
  14. 16 0
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java
  15. 41 6
      svr/svr-internet-hospital/src/main/resources/application.yml
  16. 1 1
      svr/svr-internet-hospital/src/main/resources/bootstrap.yml

+ 6 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/mapping/service/PatientMappingService.java

@ -140,4 +140,10 @@ public class PatientMappingService {
            return null;
        }
    }
    public PatientMappingDO findPatientNoByPatientCode(String code){
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(code);
        return patientMappingDO;
    }
}

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

@ -1334,7 +1334,7 @@ public class XzzxEntranceService{
        response = httpClientUtil.get(url,"GBK");
        logger.info("处方response:"+response+"===="+url);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
        if (object!=null&&object.getInteger("status")==200){
            JSONArray array = new JSONArray();
            array = JSONArray.parseArray(object.getString("obj")).getJSONArray(0);
            for (int i=0;i<array.size();i++){

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

@ -32,10 +32,7 @@ import com.yihu.jw.hospital.prescription.dao.PrescriptionInfoDao;
import com.yihu.jw.hospital.ykyy.service.YkyyService;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientMedicareCardDao;
import com.yihu.jw.restmodel.hospital.prescription.WlyyOutpatientVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionDiagnosisVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionInfoVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
import com.yihu.jw.restmodel.hospital.prescription.*;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.http.HttpClientUtil;
@ -445,6 +442,26 @@ public class YkyyEntranceService {
                wlyyOutpatientVO.setAdmDate(DateUtil.strToDate(admDate, DateUtil.YYYY_MM_DD_HH_MM_SS_));
                wlyyOutpatientVO.setConDate(DateUtil.strToDate(conDate, DateUtil.YYYY_MM_DD_HH_MM_SS_));
                wlyyOutpatientVOS.add(wlyyOutpatientVO);
                List<WlyyInspectionVO> inspectionVOList = new ArrayList<>();
                JSONArray array = findV_ZKSG_JCCX(PAT_NO,wlyyOutpatientVO.getAdmNo());
                for (int j=0;j<array.size();j++){
                    JSONObject object = array.getJSONObject(j);
                    String ksdm = object.getString("ksdm");//科室代码
                    String fymc = object.getString("fymc");//费用名称
                    String fydj = object.getString("fydj");//单价
                    String fysl = object.getString("fysl");//数量
                    String fyhj = object.getString("fyhj");//金额
                    String jzxh = object.getString("jzxh");//就诊序号
                    String zxks = object.getString("zxks");//执行科室
                    WlyyInspectionVO wlyyInspectionVO = new WlyyInspectionVO();
                    wlyyInspectionVO.setName(fymc);
                    wlyyInspectionVO.setDeptName(zxks);
                    wlyyInspectionVO.setDept(ksdm);
                    wlyyInspectionVO.setQuantity(Integer.parseInt(fysl));
                    inspectionVOList.add(wlyyInspectionVO);
                }
                wlyyOutpatientVO.setInspectionVOS(inspectionVOList);
            }
        }
        return wlyyOutpatientVOS;
@ -528,6 +545,51 @@ public class YkyyEntranceService {
    }
    /**
     * HIS就诊患者历史查询
     * @throws Exception
     */
    public JSONArray findV_ZKSG_JCCX(String brid,String conNo) throws Exception{
        String sql = "SELECT\n" +
                "\tz.BRID AS \"brid\",\n" +
                "\tz.BRXM AS \"brxm\",\n" +
                "\tto_char (\n" +
                "\t\tz.KDRQ,\n" +
                "\t\t'yyyy/MM/dd hh24:mi:ss'\n" +
                "\t) AS \"kdrq\",\n" +
                "\tto_char (\n" +
                "\t\tz.ZXRQ,\n" +
                "\t\t'yyyy/MM/dd hh24:mi:ss'\n" +
                "\t) AS \"zxrq\",\n" +
                "\tz.YSDM AS \"ysdm\",\n" +
                "\tz.KSDM AS \"ksdm\",\n" +
                "\tz.FYMC AS \"fymc\",\n" +
                "\tz.FYDJ AS \"fydj\",\n" +
                "\tz.FYSL AS \"fysl\",\n" +
                "\tz.FYHJ AS \"fyhj\",\n" +
                "\tz.YBLB AS \"yblb\",\n" +
                "\tz.JZXH AS \"jzxh\",\n" +
                "\tz.YJXH AS \"yjxh\",\n" +
                "\tz.ZXKS AS \"zxks\"\n" +
                "FROM\n" +
                "\tV_ZKSG_JCCX z\n" +
                "WHERE\n" +
                "\tz.JZXH = '"+conNo+"'\n" +
                "AND z.brid = '"+brid+"'";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if(status!=null&&status == 200){
            return rs.getJSONArray("detailModelList");
        }
        return new JSONArray();
    }
    /**
     * HIS处方记录
     * @throws Exception
@ -1196,7 +1258,7 @@ public class YkyyEntranceService {
                "FROM\n" +
                "\tV_ZKSG_JCXM_MZ mz where 1=1 ";
        if (StringUtils.isNoneBlank(pydm)){
            sql+=" and lower(pydm) = '%"+pydm.toLowerCase()+"%'";
            sql+=" and lower(pydm) like '%"+pydm.toLowerCase()+"%'";
        }
        /*List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);*/
        JSONArray array = new JSONArray();

+ 5 - 1
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -57,6 +57,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.InputStream;
import java.math.BigDecimal;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.text.SimpleDateFormat;
@ -149,7 +150,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                businessOrderDO.setDoctor(wlyyPrescriptionDO.getDoctor());
                businessOrderDO.setPatient(wlyyPrescriptionDO.getPatientCode());
                businessOrderDO.setPatientName(wlyyPrescriptionDO.getPatientName());
                businessOrderDO.setPayPrice(wlyyPrescriptionDO.getDrugFee()*100);
                BigDecimal b = new BigDecimal(String.valueOf(wlyyPrescriptionDO.getDrugFee()));
                BigDecimal c = new BigDecimal(String.valueOf(100));
                BigDecimal bc = b.multiply(c);
                businessOrderDO.setPayPrice(bc.doubleValue());
                businessOrderDO.setDescription("处方结算");
                businessOrderDO = businessOrderDao.save(businessOrderDO);
                businessOrderDOS.add(businessOrderDO);

+ 2 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -479,6 +479,8 @@ public class BaseHospitalRequestMapping {
        public static final String updatePayStatus = "/updatePayStatus";
        public static final String findPatNoByPatient = "/findPatNoByPatient";

+ 12 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/prescription/WlyyOutpatientVO.java

@ -214,6 +214,10 @@ public class WlyyOutpatientVO extends UuidIdentityVO {
    private Integer payStatus;
    @ApiModelProperty(value = "检查项目", example = "检查项目")
    private List<WlyyInspectionVO> inspectionVOS;
    public String getAdmNo() {
        return admNo;
@ -477,4 +481,12 @@ public class WlyyOutpatientVO extends UuidIdentityVO {
    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }
    public List<WlyyInspectionVO> getInspectionVOS() {
        return inspectionVOS;
    }
    public void setInspectionVOS(List<WlyyInspectionVO> inspectionVOS) {
        this.inspectionVOS = inspectionVOS;
    }
}

+ 2 - 2
gateway/ag-basic/src/main/resources/bootstrap.yml

@ -52,7 +52,7 @@ spring:
  profiles: jwprod
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://172.16.1.42:1221}
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
@ -96,4 +96,4 @@ spring:
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://192.168.120.216:1221}
      label: ${wlyy.spring.config.label:master}
      label: ${wlyy.spring.config.label:master}

+ 1 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -1435,7 +1435,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
                                    if (list!=null&&list.size()!=0){
                                        for (int i=0;i<list.size();i++){
                                            JSONObject family = list.getJSONObject(i);
                                            if (family.getString("ILLNESS").equalsIgnoreCase("本人")){
                                            if (family.getString("ILLNESS").equalsIgnoreCase("本人")||tel.equalsIgnoreCase(family.getString("TEL"))){
                                                basePatientDO.setDel("1");
                                                basePatientDO.setName(family.getString("NAME"));
                                                basePatientDO.setCreateTime(new Date());

+ 1 - 1
server/svr-authentication/src/main/resources/bootstrap.yml

@ -47,7 +47,7 @@ spring:
  profiles: jwprod
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.16.1.42:1221}
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:

+ 4 - 8
svr/svr-internet-hospital-entrance/src/main/resources/application.yml

@ -48,10 +48,6 @@ fast-dfs:
configDefault: # 默认配置
  saasId: xmjkzl_saasId
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
# 上传文件临时路径配置
FileTempPath:
  upload_temp_path : /var/local/temp
@ -217,8 +213,8 @@ wechat:
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code:
  sf_check_word:
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
# 眼科医院前置机
spring:
@ -262,8 +258,8 @@ wechat:
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code:
  sf_check_word:
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
#心脏中心前置机配置
spring:

+ 1 - 1
svr/svr-internet-hospital-entrance/src/main/resources/bootstrap.yml

@ -28,7 +28,7 @@ spring:
  profiles: jwprod
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.16.1.42:1221}
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---

+ 8 - 13
svr/svr-internet-hospital-job/src/main/resources/application.yml

@ -38,11 +38,6 @@ fast-dfs:
configDefault: # 默认配置
  saasId: xmjkzl_saasId
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
quartz:
  name: schedulerFactoryBean
# 上传文件临时路径配置
@ -165,8 +160,8 @@ wechat:
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
spring:
  profiles: jwOracleProd
@ -205,7 +200,7 @@ wechat:
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
  sf_check_word: SFAHKAOFAAITyjt7890
---
spring:
@ -237,7 +232,7 @@ wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_code: WH000091
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
@ -271,8 +266,8 @@ wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
  sf_code:
  sf_check_word:
---
spring:
@ -304,5 +299,5 @@ wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
  sf_code:
  sf_check_word:

+ 1 - 1
svr/svr-internet-hospital-job/src/main/resources/bootstrap.yml

@ -41,7 +41,7 @@ spring:
  profiles: jwprod
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.16.1.42:1221}
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---

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

@ -14,6 +14,7 @@ import com.yihu.jw.entity.base.area.BaseTownDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.hospital.mapping.service.PatientMappingService;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDiagnosisDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionInfoDao;
@ -108,6 +109,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    private BaseProvinceService baseProvinceService;
    @Autowired
    private BaseCityService baseCityService;
    @Autowired
    private PatientMappingService patientMappingService;
    @Value("${demo.flag}")
    private boolean demoFlag;
@ -1891,4 +1894,17 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findPatNoByPatient)
    @ApiOperation(value = "patient映射信息")
    public ObjEnvelop findPatNoByPatient (
            @ApiParam(name = "code", value = "code")
            @RequestParam(value = "code", required = false) String code) throws Exception {
        try {
            return ObjEnvelop.getSuccess("ok",patientMappingService.findPatientNoByPatientCode(code));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
}

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

@ -73,11 +73,6 @@ fast-dfs:
configDefault: # 默认配置
  saasId: xmjkzl_saasId
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
---
spring:
  profiles: jwdev
@ -154,6 +149,11 @@ FileTempPath:
qywx:
  url: 2
  id: 2
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
---
spring:
  profiles: jwtest
@ -228,6 +228,11 @@ wlyy:
qywx:
  url: 2
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
---
spring:
  profiles: jwprod
@ -304,6 +309,11 @@ wlyy:
qywx:
  url: https://hlwyy.xmzsh.com/hlwyy
  id: zsyy
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
---
spring:
  profiles: jwOracleTest
@ -386,6 +396,11 @@ wlyy:
qywx:
  url: 2
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
spring:
  profiles: jwOracleProd
@ -468,6 +483,11 @@ qywx:
  url: 2
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
##==心脏中心 ===============================================================================
spring:
@ -543,6 +563,11 @@ wlyy:
qywx:
  url: https://ih.xmheart.com/hlwyy/
  id: xm_xzzx_wx
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
##==心脏中心外 ===============================================================================
spring:
@ -620,6 +645,11 @@ wlyy:
qywx:
  url: https://ih.xmheart.com/hlwyy/
  id: xm_xzzx_wx
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
##==厦门卫计委 ===============================================================================
spring:
@ -695,4 +725,9 @@ es:
qywx:
  url: 1
  id: 2
  id: 2
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890

+ 1 - 1
svr/svr-internet-hospital/src/main/resources/bootstrap.yml

@ -35,7 +35,7 @@ spring:
  profiles: jwprod
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.16.1.42:1221}
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---