Browse Source

1阀控规则数组

Xiaojh 4 years ago
parent
commit
1c607be132

+ 17 - 1
smart-city-platform/src/main/java/com/bz/smart_city/dto/pay/PayCustomerDto.java

@@ -73,6 +73,22 @@ public class PayCustomerDto {
 
     @ApiModelProperty(value = "阀控规则数组名称",position = 25)
     public String valveRuleName;
-    @ApiModelProperty(value = "阀控规则数组Id",position = 26)
+    @ApiModelProperty(value = "阀控规则数组Id字符串",position = 26)
     public String valveRuleId;
+    @ApiModelProperty(value = "阀控规则数组Id",position = 26)
+    public String[] valveRuleIds;
+
+    public String[] getValveRuleIds() {
+        if(this.getValveRuleId() != null){
+            valveRuleIds = this.getValveRuleId().split(",");
+        }
+        return valveRuleIds;
+    }
+    public void setValveRuleIds(String[] valveRuleIds) {
+        if(this.getValveRuleId() != null){
+            valveRuleIds = this.getValveRuleId().split(",");
+        }
+        this.valveRuleIds = valveRuleIds;
+    }
+
 }

+ 1 - 1
smart-city-platform/src/main/java/com/bz/smart_city/dto/pay/PaySaveCustomerDto.java

@@ -49,6 +49,6 @@ public class PaySaveCustomerDto extends PayBaseCustomerandmeterrela {
     private String installAddress;
     @ApiModelProperty(value = "阀控规则ID数组", position = 15)
     private String[] valveRuleIds;
-    @ApiModelProperty(value = "阀控规则名称数组", position = 15)
+    @ApiModelProperty(value = "阀控规则名称数组", position = 16)
     private String[] valveRuleNames;
 }

+ 3 - 0
smart-city-platform/src/main/java/com/bz/smart_city/service/pay/archives/impl/PayBaseCustomerandmeterrelaServiceImpl.java

@@ -401,6 +401,7 @@ public class PayBaseCustomerandmeterrelaServiceImpl implements PayBaseCustomeran
                         String name = dao.getName();
                         RName = RName + name +",";
                     }
+                    RName = RName.substring(0,RName.length()-1);
                 }
             }
             customer.setValveRuleName(RName);
@@ -443,6 +444,7 @@ public class PayBaseCustomerandmeterrelaServiceImpl implements PayBaseCustomeran
                         String name = dao.getName();
                         RName = RName + name +",";
                     }
+                    RName = RName.substring(0,RName.length()-1);
                 }
             }
             customer.setValveRuleName(RName);
@@ -795,6 +797,7 @@ public class PayBaseCustomerandmeterrelaServiceImpl implements PayBaseCustomeran
                         String name = dao.getName();
                         RName = RName + name +",";
                     }
+                    RName = RName.substring(0,RName.length()-1);
                 }
             }
             customer.setValveRuleName(RName);