法规清单导出(用户查询)

This commit is contained in:
zhn
2022-09-14 09:20:37 +08:00
parent 2e2373691a
commit 30e500670e
@@ -4007,8 +4007,23 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//文件
List<OSSFile> fileInfos = getOssFiles(dataList);
//用户
List<String> userIdList = new ArrayList<>();
for (ProjectLawsInventoryEO lawsInventoryEO : dataList) {
getUserIdList(userIdList, lawsInventoryEO);
}
List<SysUser> sysUserList = new ArrayList<>();
if(CollectionUtils.isNotEmpty(userIdList)){
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>();
sysUserQueryWrapper.select("id,username");
sysUserQueryWrapper.lambda().in(SysUser::getId,userIdList);
sysUserList = sysUserMapper.selectList(sysUserQueryWrapper);
}
//所有用户
List<SysUser> sysUserList = sysUserService.list();
// List<SysUser> sysUserList = sysUserService.list();
//数据转换(文件名称,对应标准)
dataTransition(dataList, fileInfos,sysUserList,projectLawsInventoryEO);
@@ -4076,6 +4091,51 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
private void getUserIdList(List<String> userIdList, ProjectLawsInventoryEO lawsInventoryEO) {
//认证工程师id
if (StringUtils.isNotEmpty(lawsInventoryEO.getHomologationEngineerId())) {
userIdList.add(lawsInventoryEO.getHomologationEngineerId());
}
//法规工程师id
if (StringUtils.isNotEmpty(lawsInventoryEO.getRegulationOwnerId())) {
userIdList.add(lawsInventoryEO.getRegulationOwnerId());
}
//工程接口人id
if (StringUtils.isNotEmpty(lawsInventoryEO.getEngineeringInterfacePerson())) {
userIdList.add(lawsInventoryEO.getEngineeringInterfacePerson());
}
//设计符合性确认
//发起人
if (StringUtils.isNotEmpty(lawsInventoryEO.getDesignInitiatorId())) {
userIdList.add(lawsInventoryEO.getDesignInitiatorId());
}
//责任人
if (StringUtils.isNotEmpty(lawsInventoryEO.getDesignDutyId())) {
userIdList.add(lawsInventoryEO.getDesignDutyId());
}
//prehomo确认
//发起人
if (StringUtils.isNotEmpty(lawsInventoryEO.getPrehomoInitiatorId())) {
userIdList.add(lawsInventoryEO.getPrehomoInitiatorId());
}
//责任人
if (StringUtils.isNotEmpty(lawsInventoryEO.getPrehomoDutyId())) {
userIdList.add(lawsInventoryEO.getPrehomoDutyId());
}
//验证符合性确认
//发起人
if (StringUtils.isNotEmpty(lawsInventoryEO.getVerifyInitiatorId())) {
userIdList.add(lawsInventoryEO.getVerifyInitiatorId());
}
//责任人
if (StringUtils.isNotEmpty(lawsInventoryEO.getVerifyDutyId())) {
userIdList.add(lawsInventoryEO.getVerifyDutyId());
}
}
private void transition(List<ProjectLawsInventoryEOEn> dataListEn,ProjectLawsInventoryEO projectLawsInventoryEOTemp){
//下拉选数据字典