huangpeng преди 5 месеца
родител
ревизия
425283964d

+ 12 - 8
zhsw-common/src/main/java/com/rongwei/zhsw/sys/service/impl/SwBillingRecordServiceImpl.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.rongwe.zhsw.domain.SwUserManagement;
 import com.rongwe.zhsw.dto.PaymentRequestDTO;
+import com.rongwei.rwadmincommon.system.vo.SysUserVo;
 import com.rongwei.rwcommon.base.R;
 import com.rongwei.rwcommon.utils.SecurityUtil;
 import com.rongwei.zhsw.sys.dao.SwBillManagementUnpaidDao;
@@ -15,6 +16,7 @@ import com.rongwe.zhsw.domain.SwBillManagementPaidDo;
 import com.rongwe.zhsw.domain.SwBillManagementUnpaidDo;
 import com.rongwe.zhsw.domain.SwBillingRecordDo;
 import com.rongwei.zhsw.sys.service.SwUserManagementService;
+import com.rongwei.zhsw.utils.ZhswCommonUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -131,20 +133,22 @@ public class SwBillingRecordServiceImpl extends ServiceImpl<SwBillingRecordDao,
         add.setAddress(list.get(0).getAddress());
         add.setPayfeesstatus(PAIDSTATUS); // 已缴费
         add.setYear(Calendar.getInstance().get(Calendar.YEAR));
-        //     SysUserVo currentUser = CXCommonUtils.getCurrentUser();
-//        add.setTollcollectorid(currentUser.getId());
-//        add.setTollcollectorname(currentUser.getName());
-//        add.setTenantid(currentUser.getTenantid());
+
+        //当前用户
+        SysUserVo currentUser = ZhswCommonUtils.getCurrentUser();
+        add.setTollcollectorid(currentUser.getId());
+        add.setTollcollectorname(currentUser.getName());
+        add.setTenantid(currentUser.getTenantid());
 
         // list 汇总计算
         BigDecimal allfeewaiver =new BigDecimal(0);
         BigDecimal oughttohavepaid =new BigDecimal("0");
-        BigDecimal overduepaymentfine =new BigDecimal(0);
+        BigDecimal latefees =new BigDecimal(0);
         List<SwBillManagementPaidDo> paidDos =new ArrayList<>();
         for (SwBillManagementUnpaidDo unpaidDo : list) {
             allfeewaiver = allfeewaiver.add(unpaidDo.getFeewaiver()==null?BigDecimal.ZERO:unpaidDo.getFeewaiver());
             oughttohavepaid =oughttohavepaid.add(unpaidDo.getOughttohavepaid()==null?BigDecimal.ZERO:unpaidDo.getOughttohavepaid());
-            overduepaymentfine = overduepaymentfine.add(unpaidDo.getOverduepaymentfine()==null?BigDecimal.ZERO:unpaidDo.getOverduepaymentfine());
+            latefees = latefees.add(unpaidDo.getLatefees()==null?BigDecimal.ZERO:unpaidDo.getLatefees());
 
             SwBillManagementPaidDo paidDo = new SwBillManagementPaidDo();
             BeanUtils.copyProperties(unpaidDo,paidDo);
@@ -158,7 +162,7 @@ public class SwBillingRecordServiceImpl extends ServiceImpl<SwBillingRecordDao,
 
         add.setAllfeewaiver(allfeewaiver); //总减免
         add.setOughttohavepaid(oughttohavepaid); //原应缴
-        add.setOverduepaymentfine(overduepaymentfine); //滞纳金
+        add.setLatefees(latefees); //滞纳金
 
         //根据户号获取 用户记录
         SwUserManagement swUserManagement = swUserManagementService.getBaseMapper().
@@ -171,7 +175,7 @@ public class SwBillingRecordServiceImpl extends ServiceImpl<SwBillingRecordDao,
 
         add.setPaidin(paidin);  //实缴
 
-        add.setActualdue(oughttohavepaid.subtract(allfeewaiver).subtract(overduepaymentfine));  //实际应缴(元)     =  原应缴 - 总减免 - 滞纳金
+        add.setActualdue(oughttohavepaid.subtract(allfeewaiver).subtract(latefees));  //实际应缴(元)     =  原应缴 - 总减免 - 滞纳金
         add.setAfterpaymentbalance(paidin.subtract(add.getActualdue())); //缴费后余额 =  实缴 - 实际应缴(元)
         add.setDatasource(datasource); //数据来源
         //1、当 【余额】 >=【原应缴(元)】-【总减免(元)】 -【滞纳金(元)】  时,【余额】字段=【原应缴(元)】-【总减免(元)】 -【滞纳金(元)】

+ 1 - 1
zhsw-common/src/main/resources/mybatis/SwUserManagementDao.xml

@@ -5,7 +5,7 @@
 <mapper namespace="com.rongwei.zhsw.sys.dao.SwUserManagementMapper">
 
     <update id="balanceAdd">
-        update sw_user_management set ACCOUNTBALANCE = ACCOUNTBALANCE + ${balanceAdd}
+        update sw_user_management set ACCOUNTBALANCE = ACCOUNTBALANCE + #{balanceAdd}
         where  ID = #{id}
     </update>
 </mapper>

+ 1 - 4
zhsw-entity/src/main/java/com/rongwe/zhsw/domain/SwBillManagementPaidDo.java

@@ -176,10 +176,7 @@ public class SwBillManagementPaidDo implements Serializable {
      * 余额划扣金额
      */
     private BigDecimal balancedebitamount;
-/**
-     * 滞纳金
-     */
-    private BigDecimal overduepaymentfine;
+
 
 
 

+ 1 - 4
zhsw-entity/src/main/java/com/rongwe/zhsw/domain/SwBillManagementUnpaidDo.java

@@ -176,10 +176,7 @@ public class SwBillManagementUnpaidDo implements Serializable {
      * 余额划扣金额
      */
     private BigDecimal balancedebitamount;
-/**
-     * 滞纳金
-     */
-    private BigDecimal overduepaymentfine;
+
 
 
 }

+ 1 - 1
zhsw-entity/src/main/java/com/rongwe/zhsw/domain/SwBillingRecordDo.java

@@ -174,7 +174,7 @@ public class SwBillingRecordDo implements Serializable {
 /**
      * 滞纳金
      */
-    private BigDecimal overduepaymentfine;
+    private BigDecimal latefees;
 /**
      * 余额抵扣
      */