Commit 53ead1ee authored by 李秀明's avatar 李秀明

更改orgCode取值

parent 9dcf0504
...@@ -168,7 +168,7 @@ public class PlanController extends AbstractBaseController { ...@@ -168,7 +168,7 @@ public class PlanController extends AbstractBaseController {
List<UserDetailsDto> resultList = response.getResult(); List<UserDetailsDto> resultList = response.getResult();
for (UserDetailsDto udd : resultList) { for (UserDetailsDto udd : resultList) {
userIdSB.append(",").append(udd.getUserId()); userIdSB.append(",").append(udd.getUserId());
userDeptSB.append(",").append(udd.getUserId()).append("@").append(udd.getSuperviseOrgCode()).append("@").append(udd.getSuperviseOrgName()); userDeptSB.append(",").append(udd.getUserId()).append("@").append(udd.getUnitOrgCode()).append("@").append(udd.getUnitName());
userNameSB.append(",").append(udd.getUserName()); userNameSB.append(",").append(udd.getUserName());
} }
} }
......
...@@ -28,14 +28,8 @@ public class UserDetailsDto { ...@@ -28,14 +28,8 @@ public class UserDetailsDto {
* 企业Code * 企业Code
*/ */
private String unitCode; private String unitCode;
/**
* 组织名称 private String unitOrgCode;
*/
private String superviseOrgName;
/**
* 组织Code
*/
private String superviseOrgCode;
/** /**
* 用户id * 用户id
*/ */
......
...@@ -520,7 +520,7 @@ public static List<HashMap<String, Object>> genWholeExeData(List<HashMap<String, ...@@ -520,7 +520,7 @@ public static List<HashMap<String, Object>> genWholeExeData(List<HashMap<String,
if (!CollectionUtils.isEmpty(userDetailsDtoList)) { if (!CollectionUtils.isEmpty(userDetailsDtoList)) {
Map<String, List<UserDetailsDto>> userDetailsDtoMap = userDetailsDtoList.stream(). Map<String, List<UserDetailsDto>> userDetailsDtoMap = userDetailsDtoList.stream().
filter(obj -> obj.getEquipCategoryCode().contains(deviceType) && obj.getUnitTypeCode().contains(unitType)) filter(obj -> obj.getEquipCategoryCode().contains(deviceType) && obj.getUnitTypeCode().contains(unitType))
.collect(Collectors.groupingBy(UserDetailsDto::getSuperviseOrgCode)); .collect(Collectors.groupingBy(UserDetailsDto::getUnitOrgCode));
for (HashMap<String, Object> stringObjectHashMap : timeList) { for (HashMap<String, Object> stringObjectHashMap : timeList) {
HashMap<String, Object> tempMap = new HashMap<>(); HashMap<String, Object> tempMap = new HashMap<>();
Object strBeginTime = stringObjectHashMap.get("BEGIN_TIME"); Object strBeginTime = stringObjectHashMap.get("BEGIN_TIME");
...@@ -531,15 +531,15 @@ public static List<HashMap<String, Object>> genWholeExeData(List<HashMap<String, ...@@ -531,15 +531,15 @@ public static List<HashMap<String, Object>> genWholeExeData(List<HashMap<String,
tempMap.put("NEXT_GEN_DATE", nextGenDate); tempMap.put("NEXT_GEN_DATE", nextGenDate);
List<HashMap<String, Object>> finalWholeList = wholeList; List<HashMap<String, Object>> finalWholeList = wholeList;
userDetailsDtoMap.forEach((superviseOrgCode, userDetailsDto) -> { userDetailsDtoMap.forEach((unitOrgCode, userDetailsDto) -> {
if (!plan.getIsSingleExecution()) { if (!plan.getIsSingleExecution()) {
HashMap<String, Object> temp; HashMap<String, Object> temp;
temp = (HashMap<String, Object>) tempMap.clone(); temp = (HashMap<String, Object>) tempMap.clone();
String userIds = userDetailsDto.stream().map(UserDetailsDto::getUserId).filter(Objects::nonNull).collect(Collectors.joining(",")); String userIds = userDetailsDto.stream().map(UserDetailsDto::getUserId).filter(Objects::nonNull).collect(Collectors.joining(","));
String userNames = userDetailsDto.stream().map(UserDetailsDto::getUserName).filter(Objects::nonNull).collect(Collectors.joining(",")); String userNames = userDetailsDto.stream().map(UserDetailsDto::getUserName).filter(Objects::nonNull).collect(Collectors.joining(","));
String userDept = userDetailsDto.stream().map(dto-> dto.getUserId() + "@" + superviseOrgCode + "@" + dto.getSuperviseOrgName()).collect(Collectors.joining(",")); String userDept = userDetailsDto.stream().map(dto-> dto.getUserId() + "@" + unitOrgCode + "@" + dto.getUnitName()).collect(Collectors.joining(","));
String orgCodes = userDetailsDto.stream().map(UserDetailsDto::getSuperviseOrgCode).filter(Objects::nonNull).collect(Collectors.joining(",")); String orgCodes = userDetailsDto.stream().map(UserDetailsDto::getUnitOrgCode).filter(Objects::nonNull).collect(Collectors.joining(","));
temp.put("USER_ID", userIds); temp.put("USER_ID", userIds);
temp.put("USER_NAME", userNames); temp.put("USER_NAME", userNames);
temp.put("ORG_CODE", orgCodes); temp.put("ORG_CODE", orgCodes);
...@@ -551,7 +551,7 @@ public static List<HashMap<String, Object>> genWholeExeData(List<HashMap<String, ...@@ -551,7 +551,7 @@ public static List<HashMap<String, Object>> genWholeExeData(List<HashMap<String,
temp = (HashMap<String, Object>) tempMap.clone(); temp = (HashMap<String, Object>) tempMap.clone();
temp.put("USER_ID", dto.getUserId()); temp.put("USER_ID", dto.getUserId());
temp.put("USER_NAME", dto.getUserName()); temp.put("USER_NAME", dto.getUserName());
temp.put("ORG_CODE", dto.getUserId() + "@" + superviseOrgCode + "@" + dto.getSuperviseOrgName()); temp.put("ORG_CODE", dto.getUserId() + "@" + unitOrgCode + "@" + dto.getUnitName());
finalWholeList.add(temp); finalWholeList.add(temp);
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment