|
@@ -16,10 +16,7 @@ import com.bz.smart_city.dto.OrganizationDto;
|
|
|
import com.bz.smart_city.dto.pay.*;
|
|
|
import com.bz.smart_city.entity.Organization;
|
|
|
import com.bz.smart_city.entity.ProgramItem;
|
|
|
-import com.bz.smart_city.entity.pay.PayBaseAccount;
|
|
|
-import com.bz.smart_city.entity.pay.PayBaseWaterprice;
|
|
|
-import com.bz.smart_city.entity.pay.PayMeter;
|
|
|
-import com.bz.smart_city.entity.pay.PayPayRechargeaccount;
|
|
|
+import com.bz.smart_city.entity.pay.*;
|
|
|
import com.bz.smart_city.entity.pay.archives.*;
|
|
|
import com.bz.smart_city.service.pay.PayBaseAccountService;
|
|
|
import com.bz.smart_city.service.pay.PaySysDictService;
|
|
@@ -393,6 +390,20 @@ public class PayBaseCustomerandmeterrelaServiceImpl implements PayBaseCustomeran
|
|
|
customer.setOpendate(LocalDateTime.now());
|
|
|
customer.setWaterPropertyId(paySaveCustomerDto.waterPropertyId);
|
|
|
customer.setVatno(paySaveCustomerDto.getVatno()); //公司税号
|
|
|
+ customer.setValveRuleId(paySaveCustomerDto != null && paySaveCustomerDto.getValveRuleIds() != null ? StringUtils.join(paySaveCustomerDto.getValveRuleIds(),",") : "");
|
|
|
+ String[] valveIds = paySaveCustomerDto.getValveRuleIds();
|
|
|
+ String RName = "";
|
|
|
+ if(valveIds != null && valveIds.length >0){
|
|
|
+ List<String> list = Arrays.asList(valveIds);
|
|
|
+ List<PayControlRule> RList = payBaseCustomerandmeterrelaMapper.getRuleNames(loginUser.getSiteId(),loginUser.getCustomerId(),list);
|
|
|
+ if (RList != null && RList.size() >0){
|
|
|
+ for(PayControlRule dao:RList){
|
|
|
+ String name = dao.getName();
|
|
|
+ RName = RName + name +",";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ customer.setValveRuleName(RName);
|
|
|
payBaseCustomerandmeterrelaMapper.update(customer);
|
|
|
|
|
|
//重修开户修改其它地方客户名称
|
|
@@ -421,6 +432,20 @@ public class PayBaseCustomerandmeterrelaServiceImpl implements PayBaseCustomeran
|
|
|
customer.setOpendate(LocalDateTime.now());
|
|
|
customer.setWaterPropertyId(paySaveCustomerDto.waterPropertyId);
|
|
|
customer.setVatno(paySaveCustomerDto.getVatno()); //公司税号
|
|
|
+ customer.setValveRuleId(paySaveCustomerDto != null && paySaveCustomerDto.getValveRuleIds() != null ? StringUtils.join(paySaveCustomerDto.getValveRuleIds(),",") : "");
|
|
|
+ String[] valveIds = paySaveCustomerDto.getValveRuleIds();
|
|
|
+ String RName = "";
|
|
|
+ if(valveIds != null && valveIds.length >0){
|
|
|
+ List<String> list = Arrays.asList(valveIds);
|
|
|
+ List<PayControlRule> RList = payBaseCustomerandmeterrelaMapper.getRuleNames(loginUser.getSiteId(),loginUser.getCustomerId(),list);
|
|
|
+ if (RList != null && RList.size() >0){
|
|
|
+ for(PayControlRule dao:RList){
|
|
|
+ String name = dao.getName();
|
|
|
+ RName = RName + name +",";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ customer.setValveRuleName(RName);
|
|
|
customerList.add(customer);
|
|
|
}
|
|
|
|
|
@@ -759,6 +784,20 @@ public class PayBaseCustomerandmeterrelaServiceImpl implements PayBaseCustomeran
|
|
|
customer.setId(payBaseCustomerandmeterrela.getId());
|
|
|
customer.setVatno(payBaseCustomerandmeterrela.getVatno());
|
|
|
customer.setWaterPropertyId(newWaterPropertyId);
|
|
|
+ customer.setValveRuleId(payBaseCustomerandmeterrela != null && payBaseCustomerandmeterrela.getValveRuleIds() != null ? StringUtils.join(payBaseCustomerandmeterrela.getValveRuleIds(),",") : "");
|
|
|
+ String[] valveIds = payBaseCustomerandmeterrela.getValveRuleIds();
|
|
|
+ String RName = "";
|
|
|
+ if(valveIds != null && valveIds.length >0){
|
|
|
+ List<String> list = Arrays.asList(valveIds);
|
|
|
+ List<PayControlRule> RList = payBaseCustomerandmeterrelaMapper.getRuleNames(loginUser.getSiteId(),loginUser.getCustomerId(),list);
|
|
|
+ if (RList != null && RList.size() >0){
|
|
|
+ for(PayControlRule dao:RList){
|
|
|
+ String name = dao.getName();
|
|
|
+ RName = RName + name +",";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ customer.setValveRuleName(RName);
|
|
|
payBaseCustomerandmeterrelaMapper.update(customer);
|
|
|
|
|
|
//编辑开户修改其它地方客户名称
|