Browse Source

优化门特处方。

lighter 4 years ago
parent
commit
c046cc21cf

+ 12 - 0
src/main/java/thyyxxk/webserver/dao/his/markmtfees/MarkMtFeesDao.java

@@ -108,4 +108,16 @@ public interface MarkMtFeesDao {
 
     @Select("select rtrim(name) from a_employee_mi where code=#{code}")
     String selectDoctorName(@Param("code") String code);
+
+    @Select("select rtrim(specification) from yp_zd_dict where code=#{code} and serial=#{serial}")
+    String selectSpecification(@Param("code") String code, @Param("serial") String serial);
+
+    @Select("select rtrim(supply_name) from mz_zd_supply_type where supply_code=#{code}")
+    String selectSupplyName(@Param("code") String code);
+
+    @Select("select rtrim(charge_unit) from zd_charge_item where code=#{code}")
+    String selectXmChargeUnit(@Param("code") String code);
+
+    @Select("select rtrim(name) from yp_zd_unit where code=#{code}")
+    String selectDrugUnit(@Param("code") String code);
 }

+ 5 - 0
src/main/java/thyyxxk/webserver/entity/markmtfees/MzReceipt.java

@@ -23,6 +23,11 @@ public class MzReceipt {
     private Integer payMark;
     private String serial;
     private String serialNo;
+    private String frequency;
+    private Double drugQuan;
+    private String drugUnit;
+    private String supplyCode;
+    private Integer orderDays;
     private Date chargeDate;
     /**
      * 00 项目,其他 药品

+ 30 - 0
src/main/java/thyyxxk/webserver/service/markmtfees/MarkMtFeesService.java

@@ -187,6 +187,36 @@ public class MarkMtFeesService {
             receipt.setGroupNo(item.get("groupNo").toString());
             receipt.setBillItemCode(item.get("billItemCode").toString());
             receipt.setChargeBillCode(item.get("chargeBillCode").toString());
+            if (null != item.get("instructionText")) {
+                receipt.setInstructionText(item.get("instructionText").toString());
+            }
+            if (null != item.get("specification")) {
+                receipt.setSpecification(item.get("specification").toString());
+            }
+            if (null != item.get("frequency")) {
+                receipt.setFrequency(item.get("frequency").toString());
+            }
+            if (null != item.get("drugQuan")) {
+                receipt.setDrugQuan((Double) item.get("drugQuan"));
+            }
+            if (null != item.get("orderDays")) {
+                receipt.setOrderDays((Integer) item.get("orderDays"));
+            }
+            // groupNo:00-项目;其他-药品
+            if ("00".equals(receipt.getGroupNo())) {
+                receipt.setDrugUnit(dao.selectXmChargeUnit(receipt.getChargeItemCode()));
+            } else {
+                if (null != item.get("serial")) {
+                    receipt.setSerial(item.get("serial").toString());
+                    receipt.setSpecification(dao.selectSpecification(receipt.getChargeItemCode(), receipt.getSerial()));
+                }
+                if (null != item.get("supplyCode")) {
+                    receipt.setSupplyCode(dao.selectSupplyName(item.get("supplyCode").toString()));
+                }
+                if (null != item.get("drugUnit")) {
+                    receipt.setDrugUnit(dao.selectDrugUnit(item.get("drugUnit").toString()));
+                }
+            }
             if (!orderReceiptsMap.containsKey(receipt.getOrderNo())) {
                 List<MzReceipt> list = new ArrayList<>();
                 list.add(receipt);