Explorar o código

修复门诊登记时耗材医保编码不显示的问题

lighter hai 2 meses
pai
achega
6eae49ed35

+ 1 - 1
pom.xml

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

+ 5 - 2
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiMzDao.java

@@ -134,8 +134,11 @@ public interface SiMzDao {
             "and charge_item_code!='BILL99' and isnull(cash_id,'')!='99998'")
     List<MzReceipt> selectMzCharge(String patNo, int times, int receipt);
 
-    @Select("select max(national_code) from ${table} where code=#{code}")
-    String selectNationalCode(String code, String table);
+    @Select("select top 1 national_code from yp_zd_dict where code=#{code}")
+    String selectYpNationalCode(String code);
+
+    @Select("select isnull(national_code_27,national_code) from zd_charge_item where code=#{code}")
+    String selectXmNationalCode(String code);
 
     @Select("select max(yb_comment_new) from yp_zd_dict where code=#{code} ")
     String selectYbComment(String code);

+ 7 - 2
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiMzService.java

@@ -264,8 +264,13 @@ public class SiMzService {
         receipt.setChargeDate(detail.get("priceTime").toString().split("\\+")[0].replace("T", " "));
         receipt.setBillItemCode(detail.get("billItemCode").toString());
         receipt.setChargeBillCode(detail.get("chargeBillCode").toString());
-        String table = receipt.getGroupNo().trim().equals("00") ? "zd_charge_item" : "yp_zd_dict";
-        receipt.setNationalCode(dao.selectNationalCode(receipt.getChargeItemCode(), table));
+
+        if (receipt.getGroupNo().trim().equals("00")) {
+            receipt.setNationalCode(dao.selectXmNationalCode(receipt.getChargeItemCode()));
+        } else {
+            receipt.setNationalCode(dao.selectYpNationalCode(receipt.getChargeItemCode()));
+        }
+
         receipt.setChecked(StringUtil.notBlank(receipt.getNationalCode()));
         if (null != detail.get("hospApprFlag")) {
             receipt.setHospApprFlag(detail.get("hospApprFlag").toString());