Browse Source

中药房发药产生费用开发完成

WANGJIALIANG 2 years ago
parent
commit
b17eb608b8

+ 1 - 1
src/main/java/cn/hnthyy/thmz/entity/his/yz/YzActOrderCyDetail.java

@@ -41,7 +41,7 @@ public class YzActOrderCyDetail {
 	 */
   private String supplyCode;
 	/**
-	 * null
+	 * 医嘱说明
 	 */
   private String instruction;
 }

+ 4 - 3
src/main/java/cn/hnthyy/thmz/service/impl/his/yf/YfWardPrescriptionServiceImpl.java

@@ -601,7 +601,7 @@ public class YfWardPrescriptionServiceImpl implements YfWardPrescriptionService
         for (int i = 0; i < yzActOrderCyDetails.size(); i++) {
             YzActOrderCyDetail yzActOrderCyDetail = yzActOrderCyDetails.get(i);
             YpZyPatient ypZyPatient = new YpZyPatient();
-            ypZyPatient.setOrderDate(yzActOrderCy.getChargeDate());
+            ypZyPatient.setOrderDate(yzActOrderCy.getSourceFlag() == 1?now:yzActOrderCy.getChargeDate());
             ypZyPatient.setOutSeri(i + 1);
             ypZyPatient.setDeptCode(yzActOrderCy.getDeptCode());
             ypZyPatient.setWardCode(yzActOrderCy.getWardCode());
@@ -640,7 +640,7 @@ public class YfWardPrescriptionServiceImpl implements YfWardPrescriptionService
             ypZyPatient.setZySerialNo(zyDetailCharges.get(0).getZySerialNo());
             ypZyPatientMapper.insertYpZyPatient(ypZyPatient);
             yzActOrderCyMapper.updateChargeStatus(now, userCode, "4", pageNo);
-            if(yzActOrderCy.getSourceFlag() == 1){
+            if(yzActOrderCy.getSourceFlag() == 1 && isTy == 0){
                 ZyDetailCharge zyDetailChargeNew = new ZyDetailCharge();
                 zyDetailChargeNew.setInpatientNo(yzActOrderCy.getInpatientNo()).setAdmissTimes(yzActOrderCy.getAdmissTimes());
                 zyDetailChargeNew.setLedgerSn(zyLedgerFileMapper.selectMaxLedgerSn(yzActOrderCy.getInpatientNo(), yzActOrderCy.getAdmissTimes()));
@@ -657,9 +657,10 @@ public class YfWardPrescriptionServiceImpl implements YfWardPrescriptionService
                 zyDetailChargeNew.setWardCode(yzActOrderCy.getWardCode());
                 zyDetailChargeNew.setDeptCode(yzActOrderCy.getDeptCode());
                 zyDetailChargeNew.setExecUnit(yzActOrderCy.getExecDept());
-                zyDetailChargeNew.setChargeCode(yzActOrderCyDetail.getChargeCode()).setSerial(yzActOrderCyDetail.getSerial());
+                zyDetailChargeNew.setChargeCodeMx(yzActOrderCyDetail.getChargeCode()).setSerial(yzActOrderCyDetail.getSerial());
                 zyDetailChargeNew.setZySerialNo(zyActpatient.getZySerialNo()).setReferPhysician(zyActpatient.getReferPhysician());
                 zyDetailChargeMapper.insertZyDetailCharge(zyDetailChargeNew);
+                log.info("确认药单{},插入费用成功[{}]", ypZyPatient.getPageNo(),JSONObject.valueToString(zyDetailChargeNew));
             }
         }
         resultMap.put("code", 0);

+ 4 - 0
src/main/java/cn/hnthyy/thmz/vo/YzActOrderCyDetailVo.java

@@ -111,4 +111,8 @@ public class YzActOrderCyDetailVo extends YzActOrderCyDetail {
      * 单价
      */
     private double retprice;
+    /**
+     * 医嘱说明
+     */
+    private String instruction;
 }

+ 5 - 4
src/main/resources/static/js/yf/ward_prescription.js

@@ -606,7 +606,7 @@ function initSummarizingTable() {
             groupCollapse: false,//是否收起
         },
         colNames: ['发药', '拒退', '单号', '批号', '住院号', '床号', '姓名', '货位号', '药品编码', '药品名称', '规格', '数量/剂数', '代煎剂数', '处方金额', '代煎单价',
-            '每天剂数', '煎药说明', '加水量', '煮取量', '复煎次数', '几次服用', '服用说明', '医生', '每剂数量', '发药量', '原发药量', '库存量', '零售价', '金额', '生产厂家', '药单类型', '规格编号', '医保编码'],
+            '每天剂数', '煎药说明', '加水量', '煮取量', '复煎次数', '几次服用', '服用说明', '医生', '每剂数量', '发药量', '原发药量', '库存量', '零售价', '金额', '生产厂家', '药单类型', '规格编号', '医保编码','草药医嘱说明'],
         colModel: [
             {
                 name: 'fybz',
@@ -729,7 +729,8 @@ function initSummarizingTable() {
                 formatter: function (cellvalue, options, rowObject) {
                     return cellvalue == null ? "-" : cellvalue;
                 }
-            }
+            },
+            {name: 'instruction', index: 'instruction', align: 'center', width: 40, hidden: true}
         ],
         jsonReader: {
             root: "data", repeatitems: false
@@ -1158,12 +1159,12 @@ function printCyCount(flag) {
         html += '<td class="xtd" style="text-align: center;">' + data.drugName + '</td>';
         html += '<td class="xtd" style="text-align: center;">' + data.specification + '</td>';
         html += '<td class="xtd" style="text-align: center;">' + data.minAmount + '</td>';
-        html += '<td class="xtd" style="text-align: left;">' + '' + '</td>';
+        html += '<td class="xtd" style="text-align: left;">' + data.instruction + '</td>';
         if (i !== datas.length - 1) {
             html += '<td class="xtd" style="text-align: center;">' + datas[i + 1].drugName + '</td>';
             html += '<td class="xtd" style="text-align: center;">' + datas[i + 1].specification + '</td>';
             html += '<td class="xtd" style="text-align: center;">' + datas[i + 1].minAmount + '</td>';
-            html += '<td class="xtd" style="text-align: left;">' + '' + '</td>';
+            html += '<td class="xtd" style="text-align: left;">' + datas[i + 1].instruction + '</td>';
             html += '</tr>';
         }
         i += 2;