弹弓根据勾选设备进行下发
This commit is contained in:
parent
8d734b46f7
commit
7e71847287
@ -150,6 +150,9 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
ISafeEducationQuestionService safeEducationQuestionService;
|
ISafeEducationQuestionService safeEducationQuestionService;
|
||||||
@Lazy
|
@Lazy
|
||||||
@Autowired
|
@Autowired
|
||||||
|
IUfaceDevToGroupService ufaceDevToGroupService;
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
private IDictionaryItemService dictionaryItemService;
|
private IDictionaryItemService dictionaryItemService;
|
||||||
@Lazy
|
@Lazy
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -2175,34 +2178,6 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
return personnelSituation;
|
return personnelSituation;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public DeclareAgeVO getDeclareAge(HashMap<String, Object> map) {
|
|
||||||
String projectSn = MapUtils.getString(map, "projectSn");
|
|
||||||
String startDate = MapUtils.getString(map, "startDate");
|
|
||||||
String endDate = MapUtils.getString(map, "endDate");
|
|
||||||
String projectSns = MapUtils.getString(map, "projectSns");
|
|
||||||
if (StringUtils.isNotBlank(projectSn)) {
|
|
||||||
return getDeclareAgeVO(map);
|
|
||||||
}
|
|
||||||
if (StringUtils.isBlank(projectSns)) {
|
|
||||||
throw new OpenAlertException("项目projectSns不能为空");
|
|
||||||
}
|
|
||||||
List<String> snList = new ArrayList<>();
|
|
||||||
String[] snArr = StringUtils.split(projectSns, ",");
|
|
||||||
Collections.addAll(snList, snArr);
|
|
||||||
DeclareAgeVO vo = new DeclareAgeVO();
|
|
||||||
for (String sn : snList) {
|
|
||||||
map.put("projectSn", sn);
|
|
||||||
DeclareAgeVO v1 = getDeclareAgeVO(map);
|
|
||||||
vo.setEighteenToTwentyFour(vo.getEighteenToTwentyFour() + v1.getEighteenToTwentyFour());
|
|
||||||
vo.setTwentyFiveToThirtyFour(vo.getTwentyFiveToThirtyFour() + v1.getTwentyFiveToThirtyFour());
|
|
||||||
vo.setThirtyFiveToFortyNine(vo.getThirtyFiveToFortyNine() + v1.getThirtyFiveToFortyNine());
|
|
||||||
vo.setFiftyToFiftyFive(vo.getFiftyToFiftyFive() + v1.getFiftyToFiftyFive());
|
|
||||||
vo.setNotRegistered(vo.getNotRegistered() + v1.getNotRegistered());
|
|
||||||
}
|
|
||||||
return vo;
|
|
||||||
}
|
|
||||||
|
|
||||||
///*
|
///*
|
||||||
//全量和增量更新
|
//全量和增量更新
|
||||||
// */
|
// */
|
||||||
@ -2252,6 +2227,34 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
// return JSON.toJSONString(getWorkerInfoByDevVo);
|
// return JSON.toJSONString(getWorkerInfoByDevVo);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeclareAgeVO getDeclareAge(HashMap<String, Object> map) {
|
||||||
|
String projectSn = MapUtils.getString(map, "projectSn");
|
||||||
|
String startDate = MapUtils.getString(map, "startDate");
|
||||||
|
String endDate = MapUtils.getString(map, "endDate");
|
||||||
|
String projectSns = MapUtils.getString(map, "projectSns");
|
||||||
|
if (StringUtils.isNotBlank(projectSn)) {
|
||||||
|
return getDeclareAgeVO(map);
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(projectSns)) {
|
||||||
|
throw new OpenAlertException("项目projectSns不能为空");
|
||||||
|
}
|
||||||
|
List<String> snList = new ArrayList<>();
|
||||||
|
String[] snArr = StringUtils.split(projectSns, ",");
|
||||||
|
Collections.addAll(snList, snArr);
|
||||||
|
DeclareAgeVO vo = new DeclareAgeVO();
|
||||||
|
for (String sn : snList) {
|
||||||
|
map.put("projectSn", sn);
|
||||||
|
DeclareAgeVO v1 = getDeclareAgeVO(map);
|
||||||
|
vo.setEighteenToTwentyFour(vo.getEighteenToTwentyFour() + v1.getEighteenToTwentyFour());
|
||||||
|
vo.setTwentyFiveToThirtyFour(vo.getTwentyFiveToThirtyFour() + v1.getTwentyFiveToThirtyFour());
|
||||||
|
vo.setThirtyFiveToFortyNine(vo.getThirtyFiveToFortyNine() + v1.getThirtyFiveToFortyNine());
|
||||||
|
vo.setFiftyToFiftyFive(vo.getFiftyToFiftyFive() + v1.getFiftyToFiftyFive());
|
||||||
|
vo.setNotRegistered(vo.getNotRegistered() + v1.getNotRegistered());
|
||||||
|
}
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private DeclareAgeVO getDeclareAgeVO(HashMap<String, Object> map) {
|
private DeclareAgeVO getDeclareAgeVO(HashMap<String, Object> map) {
|
||||||
List<String> ageList = workerInfoMapper.getDeclareAge(map);
|
List<String> ageList = workerInfoMapper.getDeclareAge(map);
|
||||||
@ -2382,17 +2385,28 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
.eq(WorkerInfo::getProjectSn, projectSn)
|
.eq(WorkerInfo::getProjectSn, projectSn)
|
||||||
.eq(WorkerInfo::getInserviceType, 1)
|
.eq(WorkerInfo::getInserviceType, 1)
|
||||||
);
|
);
|
||||||
// workerInfos = workerInfos.stream().filter(workerInfo -> {
|
List<Long> groupIds = ufaceDevToGroupService.list(new LambdaQueryWrapper<UfaceDevToGroup>()
|
||||||
// Integer devType = workerInfo.getDevType();
|
.eq(UfaceDevToGroup::getUfaceDevId, dev.getId())
|
||||||
// if (Objects.equals(devType, 1)) {
|
).stream().map(UfaceDevToGroup::getUfaceDevGroupId).collect(Collectors.toList());
|
||||||
// if (workerInfo.getUfaceDevId() != null) {
|
workerInfos = workerInfos.stream().filter(workerInfo -> {
|
||||||
// return workerInfo.getUfaceDevId().contains(dev.getId() + "");
|
if (NumberUtils.lt(workerInfo.getSafeScore(), PropertiesUtil.getWorkerInfoRedScore())) {
|
||||||
// } else {
|
return false;
|
||||||
// return false;
|
}
|
||||||
// }
|
Integer devType = workerInfo.getDevType();
|
||||||
// }
|
if (Objects.equals(devType, 1)) {
|
||||||
// return true;
|
if (workerInfo.getUfaceDevId() != null) {
|
||||||
// }).collect(Collectors.toList());
|
return workerInfo.getUfaceDevId().contains(dev.getId() + "");
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (workerInfo.getUfaceDevGroupId() != null) {
|
||||||
|
return StrUtil.split(workerInfo.getUfaceDevGroupId(), ",").stream().anyMatch(wgid -> groupIds.contains(Convert.toLong(wgid)));
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
//添加人员
|
//添加人员
|
||||||
ArrayList<GetWorkerInfoByDevVo.Worker> datas = new ArrayList<>();
|
ArrayList<GetWorkerInfoByDevVo.Worker> datas = new ArrayList<>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user