瀏覽代碼

医技发药记录医嘱号固定为3和医生id取值修改

WANGJIALIANG 2 年之前
父節點
當前提交
94b65b6a76

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

@@ -284,6 +284,7 @@ public class YfWardPrescriptionServiceImpl implements YfWardPrescriptionService
             YfWardVo vo = new YfWardVo();
             BeanUtils.copyProperties(zyDrug, vo);
             vo.setOccTime(zyDrug.getChargeDate());
+            vo.setDrawer(zyDrug.getOpIdCode());
             yfWardVos.add(vo);
         });
         return yfWardVos;
@@ -408,6 +409,7 @@ public class YfWardPrescriptionServiceImpl implements YfWardPrescriptionService
                 if (yzYpZyOrder.getPageClass().equals("A")) {
                     ypZyPatient.setSectionCode(yzYpZyOrder.getExecUnit());
                     ypZyPatient.setAcctSign("2");
+                    ypZyPatient.setActOrderNo(3);
                 } else {
                     ypZyPatient.setAcctSign((yzYpZyOrder.getAmount() == 0 || yzYpZyOrder.getPageClass().equals("HT")) ? "2" : "0");
                     ypZyPatient.setSectionCode("");//必须为空或null,会导致医嘱查不到已发药单

+ 8 - 1
src/main/java/cn/hnthyy/thmz/service/impl/his/yp/YpBaseYfServiceImpl.java

@@ -16,6 +16,8 @@ import cn.hnthyy.thmz.service.his.yp.YpZdManufactoryService;
 import cn.hnthyy.thmz.vo.YpBaseYfVo;
 import cn.hnthyy.thmz.vo.YpOutDetlVo;
 import cn.hnthyy.thmz.vo.YpZdDictVo;
+import lombok.extern.slf4j.Slf4j;
+import org.json.JSONObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Isolation;
@@ -34,6 +36,7 @@ import java.util.List;
  * @time: 2021/7/28 17:09
  */
 @Service
+@Slf4j
 public class YpBaseYfServiceImpl implements YpBaseYfService {
     @SuppressWarnings("all")
     @Autowired
@@ -131,12 +134,16 @@ public class YpBaseYfServiceImpl implements YpBaseYfService {
                 ypBaseYf.setSplitPercent(ypOutDetlVo.getSplitPercent());
                 if(ypBaseYfMapper.insertYpBaseYf(ypBaseYf) == 0){
                     throw new MzException("药品编码"+ypBaseYf.getChargeCode()+"入库出错");
+                }else{
+                    log.info("接收入库{},新增药房药品库存成功[{}]", ypOutDetlVo.getDrawNo(), JSONObject.valueToString(ypBaseYf));
                 }
             }else{//更新药房药品库存
-                stockValue = packRetprice.multiply(new BigDecimal(amount));
+                stockValue = packRetprice.multiply(new BigDecimal(amount)).setScale(2,BigDecimal.ROUND_HALF_UP);
                 if(ypBaseYfMapper.updateStockAmount(ypOutDetlVo.getChargeCode(),serial
                         ,ypOutDetlVo.getGroupNoOut(),amount, stockValue) == 0){
                     throw new MzException("药品编码"+ypOutDetlVo.getChargeCode()+"入库出错");
+                }else{
+                    log.info("接收入库{},更新药房药品库存成功,药品编码{},规格{},数量{}", ypOutDetlVo.getDrawNo(), ypOutDetlVo.getChargeCode(), serial, amount);
                 }
                 ypBaseYfMapper.updateResetVirtual(ypOutDetlVo.getChargeCode(), serial, ypOutDetlVo.getGroupNoOut());
             }