危大工程修改
This commit is contained in:
parent
74eba49e13
commit
f256f5ee25
@ -192,7 +192,11 @@ public class DataScopeHandler implements DataPermissionHandler {
|
||||
Table table = (Table) fromItem;
|
||||
String name = table.getName();
|
||||
if (tables.contains(name)) {
|
||||
String aliasName = table.getAlias().getName();
|
||||
String aliasName = null;
|
||||
Alias alias = table.getAlias();
|
||||
if (alias != null) {
|
||||
aliasName = alias.getName();
|
||||
}
|
||||
rtList.add((StringUtils.isEmpty(aliasName) ? name : aliasName) + "." + field);
|
||||
}
|
||||
}
|
||||
@ -206,7 +210,11 @@ public class DataScopeHandler implements DataPermissionHandler {
|
||||
if (rightItem instanceof Table) {
|
||||
Table joinTable = (Table) rightItem;
|
||||
if (tables.contains(joinTable.getName())) {
|
||||
String aliasName = joinTable.getAlias().getName();
|
||||
String aliasName = null;
|
||||
Alias alias = joinTable.getAlias();
|
||||
if (alias != null) {
|
||||
aliasName = alias.getName();
|
||||
}
|
||||
rtList.add((StringUtils.isEmpty(aliasName) ? joinTable.getName() : aliasName) + "." + field);
|
||||
}
|
||||
}
|
||||
|
||||
@ -141,42 +141,54 @@ public class DangerousEngineeringRecordController {
|
||||
dangerousEngineeringRecord.setEngineeringTypeName(engineeringType.getTypeName());
|
||||
dangerousEngineeringRecord.setBuildStartTime(buildTime.get(0));
|
||||
dangerousEngineeringRecord.setBuildEndTime(buildTime.get(1));
|
||||
dangerousEngineeringRecord.setPlanStartTime(planTime.get(0));
|
||||
dangerousEngineeringRecord.setPlanEndTime(planTime.get(1));
|
||||
dangerousEngineeringRecord.setPlanStartTime(planTime== null ? null : planTime.get(0));
|
||||
dangerousEngineeringRecord.setPlanEndTime(planTime == null ? null : planTime.get(1));
|
||||
dangerousEngineeringRecord.setResponsibilityCompanyId(enterpriseInfo.getId());
|
||||
dangerousEngineeringRecord.setSecurityConstructionSchemeType(MapUtils.getString(map, "securityConstructionSchemeType").equals("未完成") ? 1 : 2);
|
||||
dangerousEngineeringRecord.setSpecialConstructionSchemeType(MapUtils.getString(map, "specialConstructionSchemeType").equals("未完成") ? 1 : 2);
|
||||
dangerousEngineeringRecord.setTechnicalDisclosureType(MapUtils.getString(map, "technicalDisclosureType").equals("未完成") ? 1 : 2);
|
||||
String securityConstructionSchemeType = MapUtils.getString(map, "securityConstructionSchemeType");
|
||||
securityConstructionSchemeType = securityConstructionSchemeType == null ? "未完成" : securityConstructionSchemeType;
|
||||
String specialConstructionSchemeType = MapUtils.getString(map, "specialConstructionSchemeType");
|
||||
specialConstructionSchemeType = specialConstructionSchemeType == null ? "未完成" : specialConstructionSchemeType;
|
||||
String technicalDisclosureType = MapUtils.getString(map, "technicalDisclosureType");
|
||||
technicalDisclosureType = technicalDisclosureType == null ? "未完成" : technicalDisclosureType;
|
||||
dangerousEngineeringRecord.setSecurityConstructionSchemeType(securityConstructionSchemeType.equals("未完成") ? 1 : 2);
|
||||
dangerousEngineeringRecord.setSpecialConstructionSchemeType(specialConstructionSchemeType.equals("未完成") ? 1 : 2);
|
||||
dangerousEngineeringRecord.setTechnicalDisclosureType(technicalDisclosureType.equals("未完成") ? 1 : 2);
|
||||
dangerousEngineeringRecord.setTypeDescribeList(typeDescribeList);
|
||||
dangerousEngineeringRecord.setControlItemList(controlIds);
|
||||
List<Map<String, Object>> teFiles = (List<Map<String, Object>>) map.get("technicalDisclosureFile");
|
||||
List<Map<String, Object>> teFile = new ArrayList<>();
|
||||
for (Map<String, Object> file : teFiles) {
|
||||
Map<String, Object> teMap = new HashMap<>();
|
||||
teMap.put("name", file.get("name"));
|
||||
teMap.put("url", file.get("url"));
|
||||
teMap.put("iconType", file.get("contentType"));
|
||||
teFile.add(teMap);
|
||||
if (teFiles != null) {
|
||||
for (Map<String, Object> file : teFiles) {
|
||||
Map<String, Object> teMap = new HashMap<>();
|
||||
teMap.put("name", file.get("name"));
|
||||
teMap.put("url", file.get("url"));
|
||||
teMap.put("iconType", file.get("contentType"));
|
||||
teFile.add(teMap);
|
||||
}
|
||||
}
|
||||
dangerousEngineeringRecord.setTechnicalDisclosureFile(JSON.toJSONString(teFile));
|
||||
List<Map<String, Object>> seFiles = (List<Map<String, Object>>) map.get("securityConstructionSchemeFile");
|
||||
List<Map<String, Object>> seFile = new ArrayList<>();
|
||||
for (Map<String, Object> file : seFiles) {
|
||||
Map<String, Object> seMap = new HashMap<>();
|
||||
seMap.put("name", file.get("name"));
|
||||
seMap.put("url", file.get("url"));
|
||||
seMap.put("iconType", file.get("contentType"));
|
||||
seFile.add(seMap);
|
||||
if (seFiles != null) {
|
||||
for (Map<String, Object> file : seFiles) {
|
||||
Map<String, Object> seMap = new HashMap<>();
|
||||
seMap.put("name", file.get("name"));
|
||||
seMap.put("url", file.get("url"));
|
||||
seMap.put("iconType", file.get("contentType"));
|
||||
seFile.add(seMap);
|
||||
}
|
||||
}
|
||||
dangerousEngineeringRecord.setSecurityConstructionSchemeFile(JSON.toJSONString(seFile));
|
||||
List<Map<String, Object>> spFiles = (List<Map<String, Object>>) map.get("specialConstructionSchemeFile");
|
||||
List<Map<String, Object>> spFile = new ArrayList<>();
|
||||
for (Map<String, Object> file : spFiles) {
|
||||
Map<String, Object> spMap = new HashMap<>();
|
||||
spMap.put("name", file.get("name"));
|
||||
spMap.put("url", file.get("url"));
|
||||
spMap.put("iconType", file.get("contentType"));
|
||||
spFile.add(spMap);
|
||||
if (spFiles != null) {
|
||||
for (Map<String, Object> file : spFiles) {
|
||||
Map<String, Object> spMap = new HashMap<>();
|
||||
spMap.put("name", file.get("name"));
|
||||
spMap.put("url", file.get("url"));
|
||||
spMap.put("iconType", file.get("contentType"));
|
||||
spFile.add(spMap);
|
||||
}
|
||||
}
|
||||
dangerousEngineeringRecord.setSpecialConstructionSchemeFile(JSON.toJSONString(spFile));
|
||||
dangerousEngineeringRecord.setResponsibilityCompany(enterpriseInfo.getEnterpriseName());
|
||||
|
||||
@ -84,16 +84,21 @@ public class ProjectEnterpriseController {
|
||||
})
|
||||
@PostMapping(value = "/selectDetailList")
|
||||
public Result<List<Map<String, Object>>> selectDetailList(@RequestBody Map<String,Object> map) {
|
||||
List<EntityMap> pageList = projectEnterpriseService.selectProjectEnterpriseList(map);
|
||||
List<String> enterpriseIds = pageList.stream().map(e -> e.get("id").toString()).collect(Collectors.toList());
|
||||
List<WorkerInfo> workerInfoList = workerInfoService.list(Wrappers.<WorkerInfo>lambdaQuery()
|
||||
.in(WorkerInfo::getEnterpriseId, enterpriseIds));
|
||||
map.put("pageNo", -1);
|
||||
map.put("pageSize", 10);
|
||||
IPage<EnterpriseInfo> pageList = projectEnterpriseService.selectProjectEnterprisePage(map);
|
||||
List<Long> enterpriseIds = pageList.getRecords().stream().map(e -> e.getId()).collect(Collectors.toList());
|
||||
Map<String, Object> userMap = new HashMap<>();
|
||||
userMap.put("projectSn", map.get("projectSn").toString());
|
||||
List<SystemUser> systemUserList = systemUserService.getProjectChilderSystemUserList(userMap);
|
||||
List<WorkerInfo> workerInfoList = workerInfoService.listByIds(systemUserList.stream().map(u -> u.getWorkerId()).collect(Collectors.toList()));
|
||||
workerInfoList = workerInfoList.stream().filter(w -> enterpriseIds.contains(w.getEnterpriseId())).collect(Collectors.toList());
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (EntityMap entityMap : pageList) {
|
||||
for (EnterpriseInfo enterpriseInfo : pageList.getRecords()) {
|
||||
for (WorkerInfo workerInfo : workerInfoList) {
|
||||
if (workerInfo.getEnterpriseId().equals(entityMap.get("id"))) {
|
||||
if (workerInfo.getEnterpriseId().toString().equals(enterpriseInfo.getId().toString())) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put("name", workerInfo.getWorkerName() + " —— " + entityMap.get("enterpriseName"));
|
||||
resultMap.put("name", workerInfo.getWorkerName() + " —— " + enterpriseInfo.getEnterpriseName());
|
||||
resultMap.put("id", workerInfo.getId());
|
||||
list.add(resultMap);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user