Explorar o código

解决原价没有设置的问题

hurugang %!s(int64=4) %!d(string=hai) anos
pai
achega
ec550e9633

+ 4 - 1
src/main/java/cn/hnthyy/thmz/service/impl/his/MzChargeDetailServiceImpl.java

@@ -667,6 +667,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                     mzChargeDetail.setAmount(mzChargeDetail.getAmount().setScale(1, BigDecimal.ROUND_HALF_UP));
                     if(mzChargeDetail.getNotDiscountAmount()!=null){
                         mzChargeDetail.setDiscountAmount(mzChargeDetail.getNotDiscountAmount().subtract(mzChargeDetail.getAmount()).setScale(1, BigDecimal.ROUND_HALF_UP));
+                        mzChargeDetail.setNotDiscountAmount(mzChargeDetail.getNotDiscountAmount().setScale(1, BigDecimal.ROUND_HALF_UP));
                     }
                 }
             }
@@ -2091,9 +2092,11 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                     unitPrice = BigDecimal.valueOf(0.01D);
                     mzChargeDetail.setUnitPrice(unitPrice);
                 }
+                if(mzChargeDetail.getOrigPrice()==null){
+                    mzChargeDetail.setOrigPrice(unitPrice);
+                }
                 //进行营销折扣计算并写入库 优先申请科室的折扣率  医生系统做完移走开始
                 if(needDiscount){
-                    mzChargeDetail.setOrigPrice(unitPrice);
                     Discount discount=null;
                     if(StringUtils.isNotBlank(mzChargeDetail.getWarnDept())){
                         discount= discountService.getDiscountRate(YesNoEnum.NO.code,mzChargeDetail.getWarnDept(),mzChargeDetail.getChargeItemCode());