法规意见收集-评估人

This commit is contained in:
zhn
2024-01-16 18:02:46 +08:00
parent 2851d76cf2
commit ccd412b963
4 changed files with 111 additions and 0 deletions
@@ -19,6 +19,7 @@ import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
import com.jero.modules.project.vo.ProjectTaskUrgVo;
import com.jero.modules.system.entity.SysRole;
import com.jero.modules.system.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@@ -587,4 +588,12 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
List<ProjectLawsInventoryEO> list = projectLawsInventoryEOService.queryPlatformList(lawsInventoryId,flowFlag,cut);
return Result.OK(list);
}
@AutoLog(value = "法规意见收集-评估人")
@ApiOperation(value="法规意见收集-评估人", notes="法规意见收集-评估人")
@GetMapping(value = "/getEvaluatorList")
public Result<List<SysUser>> getEvaluatorList(String documentId) {
List<SysUser> userList = projectLawsInventoryEOService.getEvaluatorList(documentId);
return Result.OK(userList);
}
}
@@ -14,6 +14,7 @@ import com.jero.modules.project.vo.ProjectTaskUrgVo;
import com.jero.modules.system.entity.SysCategory;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.entity.SysRole;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
import org.springframework.web.multipart.MultipartFile;
@@ -353,4 +354,6 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
int checkUserRole(String projectLibraryId, String currentUserId, String lawsInventoryId);
List<ProjectLawsInventoryEO> queryPlatformList(String lawsInventoryId,String flowFlag,String cut);
List<SysUser> getEvaluatorList(String documentId);
}
@@ -13139,5 +13139,54 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
return projectLawsInventoryEOList;
}
/**
*
* @param documentId 文档库id
* @return
*/
@Override
public List<SysUser> getEvaluatorList(String documentId) {
LambdaQueryWrapper<ProjectLawsInventoryEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(ProjectLawsInventoryEO::getStandId,documentId);
List<ProjectLawsInventoryEO> lawsInventoryEOList = this.list(wrapper);
//dutyTerritory
if(ObjectUtils.isEmpty(lawsInventoryEOList)){
return new ArrayList<>();
}
List<String> userIdList = new ArrayList<>();
for (ProjectLawsInventoryEO projectLawsInventoryEO : lawsInventoryEOList) {
String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
List<ProjectRelatedPersonnel> personnelList = projectRelatedPersonnelService.getPersonnelList(projectLawsInventoryEO.getProjectLibraryId(),null,null, null, null, null, null, null, null);
if(ObjectUtils.isNotEmpty(personnelList) && StringUtils.isNotBlank(dutyTerritory)){
personnelList = personnelList.stream().filter(e->dutyTerritory.equals(e.getDutyTerritory())).collect(Collectors.toList());
//lawEngineer engineeringInterfacePerson engineerLawSet engineerAttSet
List<String> collect1 = personnelList.stream().filter(e -> StringUtils.isNotBlank(e.getLawEngineer())).map(ProjectRelatedPersonnel::getLawEngineer).collect(Collectors.toList());
List<String> collect2 = personnelList.stream().filter(e -> StringUtils.isNotBlank(e.getEngineeringInterfacePerson())).map(ProjectRelatedPersonnel::getEngineeringInterfacePerson).collect(Collectors.toList());
List<String> collect3 = personnelList.stream().filter(e -> StringUtils.isNotBlank(e.getEngineerLawSet())).map(ProjectRelatedPersonnel::getEngineerLawSet).collect(Collectors.toList());
List<String> collect4 = personnelList.stream().filter(e -> StringUtils.isNotBlank(e.getEngineerLawSet())).map(ProjectRelatedPersonnel::getEngineerAttSet).collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(collect1)){
userIdList.addAll(collect1);
}
if(ObjectUtils.isNotEmpty(collect2)){
userIdList.addAll(collect2);
}
if(ObjectUtils.isNotEmpty(collect3)){
userIdList.addAll(collect3);
}
if(ObjectUtils.isNotEmpty(collect4)){
userIdList.addAll(collect4);
}
}
}
List<SysUser> sysUserList = new ArrayList<>();
if(ObjectUtils.isNotEmpty(userIdList)){
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
sysUserList = sysUserService.querySysUserListByIdList(userIdList);
}
return sysUserList;
}
}
@@ -371,6 +371,56 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
}
return result;
}
public List<ProjectRelatedPersonnel> getPersonnelList(String projectId,
String dutyTerritoryTemp,
String lawEngineer,
String engineeringInterfacePerson,
String engineerLawSet,String engineerAttSet,
String firstLevelDutyTerritory,
String orderBy,
String orderByField) {
//查询数据
List<ProjectRelatedPersonnel> result = projectRelatedPersonnelMapper.queryPageList(projectId,
DictCodeEnum.DUTY_TERRITORY.getValue(),
dutyTerritoryTemp,
lawEngineer,
engineeringInterfacePerson,
// certificationEngineer
engineerLawSet,
engineerAttSet);
//查询数据里的责任领域
List<String> dutyTerritory = result.stream().map(e -> e.getDutyTerritory()).collect(Collectors.toList());
//查标签内容里的责任领域数据
List<String> sysDictItemValueList = sysDictItemMapper.selectItemValueByDictCode(DictCodeEnum.DUTY_TERRITORY.getValue());
//没有数据->新增所有责任领域,查询
if(StringUtils.isBlank(dutyTerritoryTemp)
&& StringUtils.isBlank(lawEngineer)
&& StringUtils.isBlank(engineeringInterfacePerson)
// && StringUtils.isBlank(certificationEngineer)
&& StringUtils.isBlank(engineerLawSet)
&& StringUtils.isBlank(engineerLawSet)){
if(result.size() != sysDictItemValueList.size()){
//更新相关人员表里的责任领域数据
if (CollectionUtils.isNotEmpty(sysDictItemValueList)) {
for (String sysDictItemValue : sysDictItemValueList) {
if(!dutyTerritory.contains(sysDictItemValue)) {
setDutyTerritoryValue(sysDictItemValue, projectId);
}
}
}
//重新查询列表
result = projectRelatedPersonnelMapper.queryPageList(projectId,
DictCodeEnum.DUTY_TERRITORY.getValue(),
dutyTerritoryTemp,
lawEngineer,
engineeringInterfacePerson,
engineerLawSet,
engineerAttSet);
}
}
return result;
}
private void hearSort(String orderBy, String orderByField, List<ProjectRelatedPersonnel> result) {
Collator comparator = Collator.getInstance(Locale.CHINESE);