lighter il y a 3 ans
Parent
commit
e05049944f

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>10.6.5</version>
+    <version>10.6.6</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>

+ 7 - 16
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiMzDao.java

@@ -24,13 +24,13 @@ public interface SiMzDao {
                                @Param("times") int times,
                                @Param("ledgerSn") int ledgerSn);
 
-    @Select("SELECT patient_id,times,visit_dept_code, " +
-            "visitDeptName=(select rtrim(name) from zd_unit_code where code=visit_dept_code), " +
-            "doctor_code,visit_date,icd_code,receipt_no,order_no,op_id,op_day,windows_no," +
-            "doctorName=(select rtrim(name) from a_employee_mi where code=doctor_code)," +
-            "receive_flag,sick_date,icd_text,symptom,jz_flag,first_or_not,group_type,rz_flag," +
-            "responce_type,bear_no,weight,hight,pressure,dept_no FROM mz_visit_table " +
-            "WHERE patient_id = #{patientId} AND times = #{times}")
+    @Select("SELECT a.patient_id,a.times,a.visit_dept_code,b.adress,b.phone_no, " +
+            "b.name,b.age,sex=case when b.sex='1' then '男' else '女' end, " +
+            "visitDeptName=(select rtrim(name) from zd_unit_code where code=a.visit_dept_code), " +
+            "a.doctor_code,a.visit_date,a.receipt_no,a.order_no,a.op_day, " +
+            "doctorName=(select rtrim(name) from a_employee_mi where code=a.doctor_code), " +
+            "a.icd_text FROM mz_visit_table a, mz_patient_mi b " +
+            "WHERE a.patient_id=#{patientId} AND a.times=#{times} and a.patient_id=b.patient_id")
     MzVisit selectMzVisit(@Param("patientId") String patientId,
                           @Param("times") Integer times);
 
@@ -62,15 +62,6 @@ public interface SiMzDao {
             "#{secondIcdCode},#{thirdIcdCode},#{mzSerialNo},getdate())")
     void insertMtPartInfo(CssybApplyInfo info);
 
-    @Insert("insert into mz_charge_detail_yb (patient_id, times, receipt_no, order_no, response_type, yb_type) "+
-            "values (#{patientId}, #{times}, #{receiptNo}, #{orderNo}, #{insutype}, #{medType})")
-    void insertMzChargeYb(@Param("patientId") String patientId,
-                          @Param("times") Integer times,
-                          @Param("receiptNo") Integer receiptNo,
-                          @Param("orderNo") Integer orderNo,
-                          @Param("insutype") String insutype,
-                          @Param("medType") String medType);
-
     @Insert("insert into t_mt_receipt (patient_id, times, receipt_no, order_no, item_no, his_item_name, " +
             "his_item_code, fee_date, input_date, medi_item_type, charge_fee, price, quantity, drug_win, " +
             "input_staff, input_man, serial_no, yb_trans_flag, charge_type, bill_item_code) values (" +

+ 4 - 0
src/main/java/thyyxxk/webserver/entity/markmtfees/MzVisit.java

@@ -6,6 +6,10 @@ import java.util.Date;
 
 @Data
 public class MzVisit {
+    private String name;
+    private String sex;
+    private String address;
+    private String phoneNo;
     private String patientId;
     private Integer times;
     private String visitDeptCode;

+ 1 - 0
src/main/java/thyyxxk/webserver/service/externalhttp/SiMzSrvc.java

@@ -10,6 +10,7 @@ import thyyxxk.webserver.entity.medicalinsurance.query.SiPatInfo;
 import thyyxxk.webserver.entity.medicalinsurance.setlinfo.FundDetail;
 
 @BaseRequest(baseURL = "http://172.16.32.166:1100/mzFee")
+//@BaseRequest(baseURL = "http://localhost:1000/mzFee")
 public interface SiMzSrvc {
 
     @Post("/outpatientRegistration")

+ 1 - 19
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiMzService.java

@@ -33,14 +33,12 @@ import java.util.Map;
 @Service
 public class SiMzService {
     private final SiMzDao dao;
-    private final SiQueryDao queryDao;
     private final ThmzSystem thmz;
     private final SiMzSrvc mzSrvc;
 
     @Autowired
-    public SiMzService(SiMzDao dao, SiQueryDao queryDao, ThmzSystem thmz, SiMzSrvc mzSrvc) {
+    public SiMzService(SiMzDao dao, ThmzSystem thmz, SiMzSrvc mzSrvc) {
         this.dao = dao;
-        this.queryDao = queryDao;
         this.thmz = thmz;
         this.mzSrvc = mzSrvc;
     }
@@ -57,19 +55,11 @@ public class SiMzService {
 
     public ResultVo<List<Map<String, Object>>> getMzReceipts(MzPatientInfo p) {
         String patNo = p.getPatNo();
-        if (null == p.getTimes()) {
-            p.setTimes(dao.selectMaxTimes(patNo));
-        }
-        SiPatInfo siPatInfo = queryDao.selectSiPatInfoForMz(patNo, p.getTimes());
-        if (null == siPatInfo || StringUtil.isBlank(siPatInfo.getMdtrtId())) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "【门诊号:" + patNo + "】未找到此患者的医保挂号信息,请核实。");
-        }
         JSONObject queryMzChargeListParam = new JSONObject();
         queryMzChargeListParam.put("patCardType", 21);
         queryMzChargeListParam.put("patCardNo", patNo);
         queryMzChargeListParam.put("hisOrdNum", "");
         Map<String, Object> mzChargeListMap = thmz.getMzChargeDetailForUnPaid(queryMzChargeListParam);
-        log.info("mz: {}", mzChargeListMap);
         if (null == mzChargeListMap) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -89,7 +79,6 @@ public class SiMzService {
                 }
                 Map<String, Object> childResult = new HashMap<>(Capacity.FIVE);
                 childResult.put("times", tempTimes);
-                childResult.put("mzPatient", siPatInfo);
                 childResult.put("mzVisit", mzVisit);
                 JSONObject queryMzChargeDetailParam = new JSONObject();
                 queryMzChargeDetailParam.put("patientId", patNo);
@@ -221,18 +210,11 @@ public class SiMzService {
             return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "请选择至少一条处方明细!");
         }
         MzReceipt receipt = receipts.get(0);
-        SiPatInfo siPatInfo = queryDao.selectSiPatInfoForMz(receipt.getPatientId(), receipt.getTimes());
-        if (null == siPatInfo || StringUtil.isBlank(siPatInfo.getMdtrtId())) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "【门诊号:" + receipt.getPatientId() +
-                    "】未找到此患者的医保挂号信息,请核实。");
-        }
         int count = dao.selectFeeCount(receipt.getPatientId(), receipt.getTimes(),
                 receipt.getReceiptNo(), receipt.getOrderNo());
         if (count > 0) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "该处方已生成过门特费用,请勿重复操作。");
         }
-        dao.insertMzChargeYb(receipt.getPatientId(), receipt.getTimes(), receipt.getReceiptNo(),
-                receipt.getOrderNo(), siPatInfo.getInsutype(), siPatInfo.getMedType());
         receipts.forEach(item -> {
             if (item.getChecked()) {
                 dao.insertBatchedMtFeeInfo(item);