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

更改orgCode取值

parent 9dcf0504
......@@ -168,7 +168,7 @@ public class PlanController extends AbstractBaseController {
List<UserDetailsDto> resultList = response.getResult();
for (UserDetailsDto udd : resultList) {
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());
}
}
......
......@@ -28,14 +28,8 @@ public class UserDetailsDto {
* 企业Code
*/
private String unitCode;
/**
* 组织名称
*/
private String superviseOrgName;
/**
* 组织Code
*/
private String superviseOrgCode;
private String unitOrgCode;
/**
* 用户id
*/
......
......@@ -520,7 +520,7 @@ public static List<HashMap<String, Object>> genWholeExeData(List<HashMap<String,
if (!CollectionUtils.isEmpty(userDetailsDtoList)) {
Map<String, List<UserDetailsDto>> userDetailsDtoMap = userDetailsDtoList.stream().
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) {
HashMap<String, Object> tempMap = new HashMap<>();
Object strBeginTime = stringObjectHashMap.get("BEGIN_TIME");
......@@ -531,15 +531,15 @@ public static List<HashMap<String, Object>> genWholeExeData(List<HashMap<String,
tempMap.put("NEXT_GEN_DATE", nextGenDate);
List<HashMap<String, Object>> finalWholeList = wholeList;
userDetailsDtoMap.forEach((superviseOrgCode, userDetailsDto) -> {
userDetailsDtoMap.forEach((unitOrgCode, userDetailsDto) -> {
if (!plan.getIsSingleExecution()) {
HashMap<String, Object> temp;
temp = (HashMap<String, Object>) tempMap.clone();
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 userDept = userDetailsDto.stream().map(dto-> dto.getUserId() + "@" + superviseOrgCode + "@" + dto.getSuperviseOrgName()).collect(Collectors.joining(","));
String orgCodes = userDetailsDto.stream().map(UserDetailsDto::getSuperviseOrgCode).filter(Objects::nonNull).collect(Collectors.joining(","));
String userDept = userDetailsDto.stream().map(dto-> dto.getUserId() + "@" + unitOrgCode + "@" + dto.getUnitName()).collect(Collectors.joining(","));
String orgCodes = userDetailsDto.stream().map(UserDetailsDto::getUnitOrgCode).filter(Objects::nonNull).collect(Collectors.joining(","));
temp.put("USER_ID", userIds);
temp.put("USER_NAME", userNames);
temp.put("ORG_CODE", orgCodes);
......@@ -551,7 +551,7 @@ public static List<HashMap<String, Object>> genWholeExeData(List<HashMap<String,
temp = (HashMap<String, Object>) tempMap.clone();
temp.put("USER_ID", dto.getUserId());
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);
});
}
......
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