wuxw пре 3 година
родитељ
комит
34e5974bef

+ 0 - 1
java110-db/src/main/resources/mapper/fee/FeeReceiptDetailServiceDaoImplMapper.xml

@@ -40,7 +40,6 @@
         LEFT JOIN meter_water mw on t.fee_id = mw.fee_id and mw.status_cd = '0' and t.community_id = mw.community_id
         left join t_dict d on pfd.prime_rate = d.status_cd and d.table_name="pay_fee_detail" and  d.table_columns='prime_rate'
         where 1 =1
-
         <if test="area !=null and area != ''">
             and t.area= #{area}
         </if>

+ 16 - 0
service-fee/src/main/java/com/java110/fee/smo/impl/FeeDiscountInnerServiceSMOImpl.java

@@ -18,6 +18,7 @@ import com.java110.utils.cache.MappingCache;
 import com.java110.utils.factory.ApplicationContextFactory;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.MoneyUtil;
 import com.java110.utils.util.StringUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -171,6 +172,14 @@ public class FeeDiscountInnerServiceSMOImpl extends BaseServiceSMO implements IF
             List<ComputeDiscountDto> computeDiscountDtoList = new ArrayList<>();
             for (ComputeDiscountDto computeDiscountDto : computeDiscountDtos) {
                 computeDiscountDto.setValue(value);
+
+                computeDiscountDto.setDiscountPrice(
+                        MoneyUtil.computePriceScale(
+                                computeDiscountDto.getDiscountPrice(),
+                                feeDtos.get(0).getScale(),
+                                Integer.parseInt(feeDtos.get(0).getDecimalPlace())
+                        )
+                );
                 if (!StringUtil.isEmpty(computeDiscountDto.getDiscountType()) && "3003".equals(computeDiscountDto.getDiscountType())) {
                     computeDiscountDto.setArdId(feeDetailDto.getArdId());
                 }
@@ -225,6 +234,13 @@ public class FeeDiscountInnerServiceSMOImpl extends BaseServiceSMO implements IF
         List<ComputeDiscountDto> computeDiscountDtoList = new ArrayList<>();
         for (ComputeDiscountDto computeDiscountDto : computeDiscountDtos) {
             computeDiscountDto.setValue(value);
+            computeDiscountDto.setDiscountPrice(
+                    MoneyUtil.computePriceScale(
+                            computeDiscountDto.getDiscountPrice(),
+                            feeDtos.get(0).getScale(),
+                            Integer.parseInt(feeDtos.get(0).getDecimalPlace())
+                    )
+            );
             if (!StringUtil.isEmpty(computeDiscountDto.getDiscountType()) && "3003".equals(computeDiscountDto.getDiscountType())) {
                 computeDiscountDto.setArdId(feeDetailDto.getArdId());
             }

+ 5 - 0
service-job/src/main/java/com/java110/job/adapt/payment/receipt/PayFeeReceiptAdapt.java

@@ -158,6 +158,11 @@ public class PayFeeReceiptAdapt extends DatabusAdaptImpl {
             feeReceiptDetailPo.setFeeName(StringUtil.isEmpty(feeDto.getImportFeeName()) ? feeDto.getFeeName() : feeDto.getImportFeeName());
             feeReceiptDetailPo.setStartTime(businessPayFeeDetail.getString("startTime"));
             feeReceiptDetailPo.setReceiptId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_receiptId));
+
+            //处理 小数点后 0
+            feeDto.setSquarePrice(Double.parseDouble(feeDto.getSquarePrice()) + "");
+            feeDto.setAdditionalAmount(Double.parseDouble(feeDto.getAdditionalAmount()) + "");
+
             computeFeeSMOImpl.freshFeeReceiptDetail(feeDto, feeReceiptDetailPo);
             feeReceiptPo.setAmount(feeReceiptDetailPo.getAmount());
             feeReceiptPo.setCommunityId(feeReceiptDetailPo.getCommunityId());