浏览代码

优化门特费用标记

lighter 4 年之前
父节点
当前提交
8019073808

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

@@ -54,10 +54,10 @@ public interface MarkMtFeesDao {
 
     @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) values (" +
+            "input_staff, input_man, serial_no, yb_trans_flag, charge_type, bill_item_code) values (" +
             "#{patientId},#{times},#{receiptNo},#{orderNo},#{itemNo},#{drugName},#{chargeItemCode}," +
-            "#{priceTime},getdate(),#{billItemCode},#{chargeFee},#{unitPrice},#{quantity},#{drugWin}," +
-            "#{doctorCode},#{doctorName},#{serialNo},0, #{groupNo})")
+            "#{priceTime},getdate(),#{mediItemType},#{chargeFee},#{unitPrice},#{quantity},#{drugWin}," +
+            "#{doctorCode},#{doctorName},#{serialNo},0, #{groupNo},#{billItemCode})")
     void insertBatchedMtFeeInfo(MzReceipt param);
 
     @Delete("delete from t_mt_receipt where patient_id=#{patientId} and times=#{times} and " +

+ 6 - 1
src/main/java/thyyxxk/webserver/pojo/markmtfees/MzReceipt.java

@@ -29,6 +29,7 @@ public class MzReceipt {
     private Integer drugWin;
     private Date priceTime;
     private String dosage;
+    private String mediItemType;
     private String billItemCode;
     private String doctorCode;
     private String doctorName;
@@ -95,7 +96,7 @@ public class MzReceipt {
         return null == tcName ? "" : (tcName).trim();
     }
 
-    public String getBillItemCode() {
+    public String getMediItemType() {
         if (billItemCode.trim().equals("TC")) {
             return "TC";
         }
@@ -114,6 +115,10 @@ public class MzReceipt {
         }
     }
 
+    public String getBillItemCode() {
+        return null == billItemCode ? "" : (billItemCode).trim();
+    }
+
     public BigDecimal getChargeFee() {
         BigDecimal price= (getUnitPrice() == null ? BigDecimal.ZERO : getUnitPrice()).setScale(2, BigDecimal.ROUND_HALF_UP);
         if(BigDecimal.ZERO.compareTo(price)==0){

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

@@ -1,5 +1,6 @@
 package thyyxxk.webserver.service.markmtfees;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -110,12 +111,12 @@ public class MarkMtFeesService {
         }
         map.put("mzPatient", mzPatients.get(0));
         map.put("mzVisit", mzVisit);
-
         List<MzReceipt> mzReceipts = dao.selectMzReceipts(patientId, times, mzVisit.getReceiptNo());
         mzReceipts.removeIf(item -> item.getBillItemCode().equals("TC") || item.getPayMark() != 5 || item.getChargeItemCode().equals("BILL99"));
         Map<Integer, List<MzReceipt>> temp = new HashMap<>();
         mzReceipts.forEach(item -> {
             item.setChecked(true);
+            log.info("费用:{}", JSON.toJSONString(item));
             if (!temp.containsKey(item.getOrderNo())) {
                 List<MzReceipt> list = new ArrayList<>();
                 list.add(item);
@@ -149,7 +150,6 @@ public class MarkMtFeesService {
         if (param.getResponceType().equals("02")) {
             param.setYbType("13");
         }
-        log.info("recep: {}", param.getReceipts());
         MzReceipt receipt = param.getReceipts().get(0);
         int count = dao.selectFeeCount(receipt.getPatientId(), receipt.getTimes(),
                 receipt.getReceiptNo(), receipt.getOrderNo());