Browse Source

中药房发药库存未算上副数修改

WANGJIALIANG 3 years ago
parent
commit
509d175cc3

+ 1 - 1
src/main/java/cn/hnthyy/thmz/controller/mz/MzPharmacyController.java

@@ -679,7 +679,7 @@ public class MzPharmacyController {
                         map.put("cyFysm",zdCommon.getName());
                     }
                 }
-                totalPrice = totalPrice.add(chargeDetail.getUnitPrice().multiply(BigDecimal.valueOf(chargeDetail.getQuantity())));
+                totalPrice = totalPrice.add(chargeDetail.getUnitPrice().multiply(BigDecimal.valueOf(chargeDetail.getQuantity()*chargeDetail.getDrugWin())));
                 map.put("quantity", chargeDetail.getQuantity());//数量
                 map.put("paySelf", chargeDetail.getPaySelf());//自备药
                 map.put("drugQuan", chargeDetail.getDrugQuan());//一次剂量

+ 2 - 8
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzPharmacyServiceImpl.java

@@ -109,17 +109,10 @@ public class MzPharmacyServiceImpl implements MzPharmacyService {
                 resultMap.put("code", -1);
                 resultMap.put("message", "流水号不能为空");
             }
-            if (mzRefundMedicineVo.getRealNo() == null) {
-                resultMap.put("code", -1);
-                resultMap.put("message", "流水号不能为空");
-            }
             mzRefundMedicineVo.setConfirmFlag(3);
             mzRefundMedicineVo.setConfirmTime(date);
             mzRefundMedicineVo.setInputTime(date);
             mzRefundMedicineVo.setConfirmId(userIdCode);
-            mzRefundMedicineVo.setPatientId(mzRefundMedicineVo.getPatientId());
-            mzRefundMedicineVo.setTimes(mzRefundMedicineVo.getTimes());
-            mzRefundMedicineVo.setOrderNo(mzRefundMedicineVo.getOrderNo());
             flag++;
             if (flag == 1) {
                 mzPharmacyMapper.updateFytjConfirmFlag(mzRefundMedicineVo);
@@ -218,6 +211,7 @@ public class MzPharmacyServiceImpl implements MzPharmacyService {
                 ypMzFytj.setDoctorId(mzSendMedicineVo.getDoctorCode());
                 ypMzFytj.setWinNo(mzChargeDetail.getWindowsNoYf());
                 ypMzFytj.setDoctorName(employee.getEmployeeName());
+                ypMzFytj.setCyFy(mzSendMedicineVo.getDrugWin());
                 ypMzFytjs.add(ypMzFytj);
             }
         }
@@ -233,7 +227,7 @@ public class MzPharmacyServiceImpl implements MzPharmacyService {
             mzRefundMedicineVo.setChargeCode(ypMzFytj.getChargeItemCode());
             mzRefundMedicineVo.setSerial(ypMzFytj.getSerial());
             mzRefundMedicineVo.setGroupNo(ypMzFytj.getGroupNo());
-            mzRefundMedicineVo.setDecAmount(-ypMzFytj.getQuantity());
+            mzRefundMedicineVo.setDecAmount(-ypMzFytj.getQuantity()*ypMzFytj.getCyFy());
             mzRefundMedicineVo.setUnitPrice(ypMzFytj.getUnitPrice());
             mzRefundMedicineVo.setPatientId(ypMzFytj.getPatientId());
             mzRefundMedicineVo.setTimes(ypMzFytj.getTimes());

+ 2 - 0
src/main/java/cn/hnthyy/thmz/vo/MzRefundMedicineVo.java

@@ -49,4 +49,6 @@ public class MzRefundMedicineVo implements Serializable {
     private Integer confirmFlag;
     //流水号
     private Integer realNo;
+    //中药副数
+    private Integer drugWin;
 }