Commit 0c62f539 authored by chenzhao's avatar chenzhao

需求 1752

parent fc2a8b29
...@@ -4,15 +4,7 @@ import java.text.ParseException; ...@@ -4,15 +4,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import java.util.ArrayList; import java.util.*;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
...@@ -572,14 +564,45 @@ public class DutyCommonServiceImpl implements IDutyCommonService { ...@@ -572,14 +564,45 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
List<Map<String, Object>> orgUsrList = orgUsrService.selectForShowByListId(ids); List<Map<String, Object>> orgUsrList = orgUsrService.selectForShowByListId(ids);
maps.forEach(item -> { maps.forEach(item -> {
String userId = String.valueOf(item.get("userId")); String userId = String.valueOf(item.get("userId"));
//此处是用来给119日常值班首页值班岗位排序用
String sort = "";
switch ( item.get("postType").toString() ){
case "826" :
sort = "4";
break;
case "824" :
sort = "3";
break;
case "825" :
sort = "2";
break;
case "827" :
sort = "1";
break;
}
item.put("postSort",sort);
for (Map<String, Object> usr : orgUsrList) { for (Map<String, Object> usr : orgUsrList) {
if (userId.equals(String.valueOf(usr.get("sequenceNbr")))) { if (userId.equals(String.valueOf(usr.get("sequenceNbr")))) {
item.put("personImg", usr.get("personImg")); item.put("personImg", usr.get("personImg"));
item.put("telephone", usr.get("telephone")); item.put("telephone", usr.get("telephone"));
item.put("companyId", usr.get("companyId"));
item.put("bizOrgType", usr.get("bizOrgType"));
item.put("parentId", usr.get("parentId"));
break; break;
} }
} }
}); });
maps= maps.stream().sorted((map1,map2)->{
if (map1.get("companyId").toString().equals(map2.get("companyId").toString())){
if (map1.get("deptId").toString().equals(map2.get("deptId").toString())){
return map2.get("postSort").toString().compareTo(map1.get("postSort").toString());
}else {
return map1.get("deptId").toString().compareTo(map2.get("deptId").toString());
}
}else {
return map1.get("companyId").toString().compareTo(map2.get("companyId").toString());
}
}).collect(Collectors.toList());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -1489,6 +1489,11 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1489,6 +1489,11 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
for (int i = 0; i < ids.size(); i++) { for (int i = 0; i < ids.size(); i++) {
OrgUsr orgUsr = getById(ids.get(i)); OrgUsr orgUsr = getById(ids.get(i));
Map<String, Object> result = selectForShowById(orgUsr, ids.get(i)); Map<String, Object> result = selectForShowById(orgUsr, ids.get(i));
result.put("parentId",orgUsr.getParentId());
orgUsr = getById(orgUsr.getParentId());
result.put("bizOrgType",orgUsr.getBizOrgType() == "DEPARTMENT" ? 1 : 0);
orgUsr =iOrgUsrService.selectParentOrgUsr(orgUsr);
result.put("companyId",orgUsr.getSequenceNbr());
personResult.add(result); personResult.add(result);
} }
return personResult; return personResult;
......
...@@ -1476,7 +1476,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al ...@@ -1476,7 +1476,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
instructionsZHDto.setType(item.getInfoType()); instructionsZHDto.setType(item.getInfoType());
instructionsZHDto.setContent(item.getInfo()); instructionsZHDto.setContent(item.getInfo());
if ("车辆反馈".equals(item.getInfoType())) { if ("车辆反馈".equals(item.getInfoType())) {
if (item.getInfo().contains("/photo:")){ if (item.getInfo().contains("/photos:")){
String[] info = item.getInfo().split("/photos:"); String[] info = item.getInfo().split("/photos:");
String photoUrl = info[1]; String photoUrl = info[1];
StringBuffer stringBuffer = new StringBuffer(); StringBuffer stringBuffer = new StringBuffer();
......
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