bug51773相关人员责任领域更新

This commit is contained in:
xiejunyu
2022-05-12 11:37:48 +08:00
parent 06282107e0
commit 8a73500a50
@@ -171,15 +171,19 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
public List<ProjectRelatedPersonnel> queryPageList(String projectId) {
//查询数据
List<ProjectRelatedPersonnel> result = projectRelatedPersonnelMapper.queryPageList(projectId);
//查询数据里的责任领域
List<String> dutyTerritory = result.stream().map(e -> e.getDutyTerritory()).collect(Collectors.toList());
//查标签内容里的责任领域数据
List<String> sysDictItemValueList = sysDictItemMapper.selectItemValueByDictCode(DictCodeEnum.DUTY_TERRITORY.getValue());
//没有数据->新增所有责任领域,查询
if(result.size()<sysDictItemValueList.size()){
// if(CollectionUtils.isEmpty(result)){
//新相关人员表里的责任领域数据
if(result.size() != sysDictItemValueList.size()){
//新相关人员表里的责任领域数据
if (CollectionUtils.isNotEmpty(sysDictItemValueList)) {
for (String sysDictItemValue : sysDictItemValueList) {
setDutyTerritoryValue(sysDictItemValue,projectId);
if(!dutyTerritory.contains(sysDictItemValue)) {
setDutyTerritoryValue(sysDictItemValue, projectId);
}
}
}
//重新查询列表