Sfoglia il codice sorgente

发药处理增加输出更新库存日志

WANGJIALIANG 3 anni fa
parent
commit
8d6d275f6e

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

@@ -17,6 +17,7 @@ import cn.hnthyy.thmz.service.his.mz.MzPharmacyService;
 import cn.hnthyy.thmz.vo.*;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
+import org.json.JSONObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -119,7 +120,9 @@ public class MzPharmacyServiceImpl implements MzPharmacyService {
                 mzPharmacyMapper.updateFytjConfirmFlag(mzRefundMedicineVo);
             }
             mzPharmacyMapper.updateChargeDetailConfirmFlag(mzRefundMedicineVo);
-            mzPharmacyMapper.updateBaseYf(mzRefundMedicineVo);
+            if(mzPharmacyMapper.updateBaseYf(mzRefundMedicineVo) > 0){
+                log.info("更新药房库存数据成功{}", JSONObject.valueToString(mzRefundMedicineVo));
+            }
         }
         resultMap.put("code", 0);
         resultMap.put("message", "退药处理成功");
@@ -208,6 +211,8 @@ public class MzPharmacyServiceImpl implements MzPharmacyService {
             mzRefundMedicineVo.setUnitPrice(ypMzFytj.getUnitPrice());
             if(mzPharmacyMapper.updateBaseYf(mzRefundMedicineVo) < 1){
                 throw new MzException("更新药房库存数据为空,发药处理失败");
+            }else{
+                log.info("更新药房库存数据成功{}", JSONObject.valueToString(mzRefundMedicineVo));
             }
         }
         resultMap.put("code", 0);
@@ -278,7 +283,9 @@ public class MzPharmacyServiceImpl implements MzPharmacyService {
             mzRefundMedicineVo.setGroupNo("71");
             mzRefundMedicineVo.setDecAmount(-mzChargeDetail.getQuantity());
             mzRefundMedicineVo.setUnitPrice(mzChargeDetail.getUnitPrice());
-            mzPharmacyMapper.updateBaseYf(mzRefundMedicineVo);
+            if(mzPharmacyMapper.updateBaseYf(mzRefundMedicineVo) > 0){
+                log.info("更新药房库存数据成功{}", JSONObject.valueToString(mzRefundMedicineVo));
+            }
         }
         return number;
     }