|
@@ -7,6 +7,7 @@ import com.ruoyi.common.utils.StringUtils;
|
|
import com.ruoyi.gas.domain.GNetworkRelation;
|
|
import com.ruoyi.gas.domain.GNetworkRelation;
|
|
import com.ruoyi.gas.domain.GRegulatorBoxRelation;
|
|
import com.ruoyi.gas.domain.GRegulatorBoxRelation;
|
|
import com.ruoyi.gas.domain.GValveWellPosition;
|
|
import com.ruoyi.gas.domain.GValveWellPosition;
|
|
|
|
+import com.ruoyi.gas.domain.GValvewellRelation;
|
|
import com.ruoyi.gas.domain.bo.GAreaBo;
|
|
import com.ruoyi.gas.domain.bo.GAreaBo;
|
|
import com.ruoyi.gas.domain.bo.GNetworkRelationBo;
|
|
import com.ruoyi.gas.domain.bo.GNetworkRelationBo;
|
|
import com.ruoyi.gas.domain.bo.GPressureRegulatingBoxBo;
|
|
import com.ruoyi.gas.domain.bo.GPressureRegulatingBoxBo;
|
|
@@ -110,6 +111,8 @@ public class GCommonController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private IGValveWellPositionService valveWellPositionService;
|
|
private IGValveWellPositionService valveWellPositionService;
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private IGValvewellRelationService relationService;
|
|
|
|
+ @Autowired
|
|
private IGUserService igUserService;
|
|
private IGUserService igUserService;
|
|
|
|
|
|
@GetMapping("/refreshC")
|
|
@GetMapping("/refreshC")
|
|
@@ -117,7 +120,7 @@ public class GCommonController extends BaseController {
|
|
GValveWellPositionBo valveWellPositionBo = new GValveWellPositionBo();
|
|
GValveWellPositionBo valveWellPositionBo = new GValveWellPositionBo();
|
|
//查询所有调压箱
|
|
//查询所有调压箱
|
|
List<GValveWellPositionVo> list = valveWellPositionService.queryList(valveWellPositionBo);
|
|
List<GValveWellPositionVo> list = valveWellPositionService.queryList(valveWellPositionBo);
|
|
- List<GNetworkRelation> relations = new ArrayList<>();
|
|
|
|
|
|
+ List<GValvewellRelation> relations = new ArrayList<>();
|
|
list.forEach(item->{
|
|
list.forEach(item->{
|
|
if (StringUtils.isNotBlank(item.getTeam())){
|
|
if (StringUtils.isNotBlank(item.getTeam())){
|
|
//该队的所有人员
|
|
//该队的所有人员
|
|
@@ -128,7 +131,7 @@ public class GCommonController extends BaseController {
|
|
Date createTime = item.getCreateTime();
|
|
Date createTime = item.getCreateTime();
|
|
if (!ObjectUtils.isEmpty(inspectors)){
|
|
if (!ObjectUtils.isEmpty(inspectors)){
|
|
inspectors.forEach(o->{
|
|
inspectors.forEach(o->{
|
|
- GNetworkRelation entity = new GNetworkRelation();
|
|
|
|
|
|
+ GValvewellRelation entity = new GValvewellRelation();
|
|
entity.setRegulatorBoxId(boxId);
|
|
entity.setRegulatorBoxId(boxId);
|
|
entity.setUserId(String.valueOf(o));
|
|
entity.setUserId(String.valueOf(o));
|
|
entity.setCreateBy(String.valueOf(o));
|
|
entity.setCreateBy(String.valueOf(o));
|
|
@@ -139,7 +142,7 @@ public class GCommonController extends BaseController {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
if (!ObjectUtils.isEmpty(relations)){
|
|
if (!ObjectUtils.isEmpty(relations)){
|
|
- networkRelationService.saveBatch(relations);
|
|
|
|
|
|
+ relationService.saveBatch(relations);
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|