فهرست منبع

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

hurugang 2 سال پیش
والد
کامیت
6015ef457a

+ 1 - 1
src/main/java/cn/hnthyy/thmz/entity/his/zy/Prescription.java

@@ -29,7 +29,7 @@ public class Prescription {
 	 */
   private Integer machineNo;
 	/**
-	 * null
+	 * 0 初始值  1 已摆药 2 错误
 	 */
   private Integer procFlg;
 	/**

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

@@ -556,6 +556,7 @@ public class YfWardPrescriptionServiceImpl implements YfWardPrescriptionService
             }
             if (i == count || pageClass.equals("T") || pageClass.equals("HT")) {
                 yzYpPageNoMapper.updateYzYpPageNo(Integer.parseInt(pageNoStr), 3, userCode);
+                log.info("药单药品已全部确认成功{}",pageNoStr);
             }
             if (pageClass.equals("5") || pageClass.equals("6")) {
                 resultMap.put("data", ypZyPatients);
@@ -603,7 +604,7 @@ public class YfWardPrescriptionServiceImpl implements YfWardPrescriptionService
         if (yzActOrderCyMapper.updateChargeStatus(now, userCode, "4", pageNo) == 0) {
             throw new MzException("确认发药失败,更新药单状态异常"+pageNo);
         }else{
-            log.info("确认药单成功{}", pageNo);
+            log.info("确认药单成功,药单号:{}", pageNo);
         }
         for (int i = 0; i < yzActOrderCyDetails.size(); i++) {
             YzActOrderCyDetail yzActOrderCyDetail = yzActOrderCyDetails.get(i);
@@ -739,7 +740,8 @@ public class YfWardPrescriptionServiceImpl implements YfWardPrescriptionService
                     String confirmTime = smf.format(ypZyPatient.getConfirmTime());
                     prescription.setPrescriptionNo(confirmTime.split(" ")[0].replace("-", "") +
                             confirmTime.split(" ")[1].replace(":", "").replace(".", ""));
-                    prescription.setSeqNo(seqNo++);
+                    seqNo = seqNo+1;
+                    prescription.setSeqNo(seqNo);
                     prescription.setPatientId(ypZyPatient.getInpatientNo());
                     prescription.setWardCd(ypZyPatient.getDeptCode());
                     prescription.setBedNo(ypZyPatient.getBedNo());
@@ -763,9 +765,14 @@ public class YfWardPrescriptionServiceImpl implements YfWardPrescriptionService
                     prescription.setPrescriptionDate(yzActOrder.getStartTime());
                     prescription.setDrugName(yzActOrder.getOrderName());
                     prescription.setPrescriptionDose(yzActOrder.getDose());
+
                     prescription.setPrescriptionUnit(mzPharmacyMapper.selectYpUnitName(yzActOrder.getDoseUnit()));
                     prescription.setDispensedUnit(mzPharmacyMapper.selectYpUnitName(yzActOrder.getMiniUnit()));
-                    prescription.setAmountPerPackage(null==ypZdDict.getWeight()?1.0:ypZdDict.getWeight().doubleValue());
+                    if(yzActOrder.getDoseUnit().equals(yzActOrder.getMiniUnit())){
+                        prescription.setAmountPerPackage(1.0);
+                    }else{
+                        prescription.setAmountPerPackage(null==ypZdDict.getWeight()?1.0:ypZdDict.getWeight().doubleValue());
+                    }
                     prescription.setDispenseDays(1);
                     prescription.setFreqDesc(yzActOrder.getFrequCode());
                     prescription.setAdministrationName(yzSupplyTypeMapper.selectSupplyNameByCode(yzActOrder.getSupplyCode()));