|
@@ -249,8 +249,22 @@ public class AsyncTaskImportService {
|
|
|
PayBaseCustomerandmeterrela device = payBaseCustomerandmeterrelaMapper.getDeviceId(loginUser.getSiteId(),loginUser.getCustomerId(),metercode);
|
|
|
//根据用水性质名称寻找用水性质id
|
|
|
PayBaseCustomerandmeterrela property = payBaseCustomerandmeterrelaMapper.getWaterPropertyId(loginUser.getSiteId(),loginUser.getCustomerId(),propertyName);
|
|
|
+ List<PayControlRule> contollList = newArrayList();
|
|
|
+ if(StringUtils.isNotBlank(contollName)){
|
|
|
+ //根据阀控规则查找ID
|
|
|
+ contollList =payControlRuleMapper.findList(null,contollName,customerId);
|
|
|
+ if(contollList != null && contollList.size() > 0){
|
|
|
+ if(contollList.get(0).getConditionId() == 5){
|
|
|
+ //插入阀控记录
|
|
|
+ valve.setDeviceId(device.getId());
|
|
|
+ valve.setControlState(1);
|
|
|
+ valve.setControlTime(LocalDateTime.now());
|
|
|
+ valve.setControlRuleId(contollList.get(0).getId().intValue());
|
|
|
+ valveList.add(valve);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
//根据阀控规则名称寻找阀控ID
|
|
|
- List<PayControlRule> contollList = payControlRuleMapper.findList(null,contollName,customerId);
|
|
|
//根据机构名称寻找机构id
|
|
|
Organization office = null;
|
|
|
if(StringUtils.isNotBlank(officeName)){
|
|
@@ -396,11 +410,7 @@ public class AsyncTaskImportService {
|
|
|
customerList.add(customer);
|
|
|
}
|
|
|
|
|
|
- //插入阀控记录
|
|
|
- valve.setDeviceId(device.getId());
|
|
|
- valve.setControlState(1);
|
|
|
- valve.setControlTime(LocalDateTime.now());
|
|
|
- valveList.add(valve);
|
|
|
+
|
|
|
|
|
|
//计算可用水量
|
|
|
if(property.getWaterPropertyId() != null){
|