oppadmin 4 lat temu
rodzic
commit
66135f8e16

+ 1 - 1
smart-city-platform/src/main/java/com/bz/smart_city/dao/pay/PayControlRuleMapper.java

@@ -35,7 +35,7 @@ public interface PayControlRuleMapper {
     //用户欠户天数
     Integer findDebtDay(@Param("accountId") String accountId);
 
-    //用水
+    //用水
     BigDecimal findUseMoeny(@Param("accountId") String accountId);
 
     //开户状态

+ 15 - 8
smart-city-platform/src/main/java/com/bz/smart_city/service/impl/pay/PayControlRuleServiceImpl.java

@@ -91,9 +91,9 @@ public class PayControlRuleServiceImpl implements PayControlRuleService {
         if(ExitsData(payControlRule.getId().toString(),payControlRule.getName(),new BigInteger(String.valueOf(loginUser.getCustomerId()))))
             throw new ServiceException(-99,"该阀控规则已存在!");
 
-        if(IsUsed(payControlRule.getId().intValue(),new BigInteger(loginUser.getCustomerId().toString()))){
+        /*if(IsUsed(payControlRule.getId().intValue(),new BigInteger(loginUser.getCustomerId().toString()))){
             throw new ServiceException(-99,"该阀控规则已有客户使用,如编辑会对应用客户有影响,是否继续?");
-        }
+        }*/
         payControlRule.setCustomerId(new BigInteger(loginUser.getCustomerId().toString()));
         Integer result = payControlRuleMapper.edit(payControlRule);
         return  result;
@@ -273,7 +273,7 @@ public class PayControlRuleServiceImpl implements PayControlRuleService {
     }
 
     /**
-     * 预存
+     * 预存
      * @param accountId 用户编号
      * @param condition 条件
      * @param value 判断值
@@ -510,23 +510,30 @@ public class PayControlRuleServiceImpl implements PayControlRuleService {
             String value = payControlRules.get(0).getValue();
             boolean bl = false;
             switch (payControlRules.get(0).getConditionId()){
-                case 1:{
+                case 1:{  //欠费天数
                     bl =   ConditionDebtDay(accountId,condition,value);
                     break;
                 }
-                case 2:{
+                case 2:{ //欠费金额
                     bl = ConditionDebtMoney(accountId,condition,value);
                     break;
                 }
-                case 3:{
+                case 3:{ //预存金额
                     bl = ConditionRecharge(accountId,condition,value);
                     break;
                 }
-                case 4:{
+                case 4:{ //用水余额
+                    bl = ConditionUsedMoney(accountId,condition,value);
+                }
+                case 5:{ //开户状态
                     bl = ConditionOpenUsed(accountId,condition,value);
                     break;
                 }
-                case 5:{
+                case 6:{ //用水量
+
+                    break;
+                }
+                case 7:{//预存与欠费差额
                     bl= ConditionRechargeAndDebt(accountId,condition,value);
                     break;
                 }