Browse Source

Merge branch 'dev-1.1.4' of https://172.16.32.165/hurugang/thmz_system into dev-1.1.4

hurugang 2 years ago
parent
commit
a1e3a80afd

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

@@ -844,7 +844,7 @@ public class YfWardPrescriptionServiceImpl implements YfWardPrescriptionService
             if (null == zyActpatient) {
                 zyActpatient = zyActpatientMapper.selectByInpatientNo(ZyActpatient.ZY_INACTPATIENT, yfWardVo.getInpatientNo(), yfWardVo.getAdmissTimes());
             }
-            if (!pageClass.equals("A")) {//非医技科室领药
+            if (!(pageClass.equals("A")||pageClass.equals("HT"))) {//非医技科室领药
                 YzActOrder yzActOrder = yzActOrderMapper.selectYzActOrderByActOrderNo(yfWardVo.getActOrderNo());
                 if (null == yzActOrder) {
                     yzActOrder = yzActOrderMapper.selectYzInactOrderByActOrderNo(yfWardVo.getActOrderNo());

+ 17 - 2
src/main/java/cn/hnthyy/thmz/service/impl/his/yp/YpOutDetlServiceImpl.java

@@ -288,7 +288,7 @@ public class YpOutDetlServiceImpl implements YpOutDetlService {
      *
      * @param map
      */
-    private void editYpOutDetlList(Map<String, Object> map, Map<String, Object> nmap) {
+    private void editYpOutDetlList(Map<String, Object> map, Map<String, Object> nmap)throws MzException {
         List<Map<String, Object>> list = (List) map.get("list");
         YpInPlan ypInPlan = new YpInPlan();
         String drawYf = ypOutDetlMapper.selectDrawYf(map.get("drawNo").toString());
@@ -307,7 +307,10 @@ public class YpOutDetlServiceImpl implements YpOutDetlService {
                 ypInPlan.setChargeCode(ypOutDetl.getChargeCode());
                 ypInPlan.setSerial(ypOutDetl.getSerial());
                 ypInPlan.setAmountOut(Double.parseDouble(nmap.get(ypInPlan.getChargeCode()).toString()));
-                ypInPlanMapper.updateYpInPlan(ypInPlan);
+                int num = ypInPlanMapper.updateYpInPlan(ypInPlan);
+                if (num <= 0) {
+                    throw new MzException("更新请领单记录异常!");
+                }
             }
         }
         List<Map<String, Object>> delList = (List) map.get("delList");
@@ -409,5 +412,17 @@ public class YpOutDetlServiceImpl implements YpOutDetlService {
                 ypOutDetlMapper.insertYpOutDetl(ypOutDetl);
             }
         }
+        //删除的药品,更新药房请领单
+        List<Map<String, Object>> delList = (List) map.get("delList");
+        for (int i = 0; i < delList.size(); i++) {
+            Map<String, Object> data = delList.get(i);
+            YpInPlan ypInPlan = new YpInPlan();
+            ypInPlan.setAmountOut(0.0);
+            ypInPlan.setStatusFlag("2");
+            ypInPlan.setDrawNo(map.get("drawNo").toString());
+            ypInPlan.setChargeCode(data.get("chargeCode").toString());
+            ypInPlan.setSerial(data.get("serial").toString());
+            ypInPlanMapper.updateYpInPlan(ypInPlan);
+        }
     }
 }

+ 1 - 1
src/main/resources/static/js/yf/ward_prescription.js

@@ -315,7 +315,7 @@ function initTbTable() {
             },
             columns: initColumns(),
             rowStyle: function (row, index) {
-                if (row.pageClass == "T") {
+                if (row.pageClass == "T" || row.pageClass == "HT") {
                     return {css: {'color': 'red', 'padding': '0px'}};
                 }
                 return {css: {'padding': '0px'}};