bug51773相关人员责任领域更新
This commit is contained in:
+8
-4
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
//重新查询列表
|
||||
|
||||
Reference in New Issue
Block a user