数据回显

This commit is contained in:
zhn
2023-09-20 17:55:43 +08:00
parent 46fc2db7a5
commit bc305082d6
2 changed files with 21 additions and 3 deletions
@@ -1827,7 +1827,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
}
private String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
public String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
StringBuilder sb = new StringBuilder();
for (String technologyTerritory : technologyTerritoryList) {
List<SysCategory> collect = categoryList.stream().filter(e -> technologyTerritory.equals(e.getId())).collect(Collectors.toList());
@@ -61,6 +61,7 @@ import com.jero.modules.project.service.IProjectLibraryRoleRelEOService;
import com.jero.modules.project.service.IProjectLibraryStatisticsService;
import com.jero.modules.project.service.IProjectUserPermissionService;
import com.jero.modules.project.vo.TimeNodeVO;
import com.jero.modules.system.entity.SysCategory;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.enums.DicCodeEnum;
@@ -70,6 +71,7 @@ import com.jero.modules.system.mapper.SysUserMapper;
import com.jero.modules.system.service.IProjectUserBrandService;
import com.jero.modules.system.service.ISysDictService;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import com.jero.modules.system.util.StringUtils;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
@@ -206,6 +208,8 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
private OtaManageApplyEOServiceImpl otaManageApplyEOService;
@Autowired
private LawsInventoryPlatformEOServiceImpl lawsInventoryPlatformEOService;
@Autowired
private SysCategoryServiceImpl sysCategoryService;
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
private static DecimalFormat df = new DecimalFormat("#.00");
@@ -1296,9 +1300,9 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
//普通数据字典
List<SysDictItem> sysDictItemList = sysDictItemMapper.selectItemsByDictCode(DictCodeEnum.DUTY_TERRITORY.getValue());
List<SysCategory> categoryList = sysCategoryService.list();
List<Map<String,Object>> mapList = new ArrayList<>();
List<Map<String,Object>> mapListOne = new ArrayList<>();
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = new ArrayList<>();
for (ProjectLawsInventoryEO projectLawsInventoryEO : lawsInventoryEOList) {
Map<String,Object> map = new HashMap<>();
List<ProjectLawsInventoryEO> projectLawsInventoryEOS = new ArrayList<>();
@@ -1323,6 +1327,19 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
if(!list.isEmpty()){
dutyTerritoryNew = StringUtils.join(list, ",");
}
//设计-交付物类型
String designDeliverableTypeName = "";
String verifyDeliverableTypeName = "";
String designDeliverableType = projectLawsInventoryEO.getDesignDeliverableType();
if(StringUtils.isNotBlank(designDeliverableType)){
designDeliverableTypeName = projectLawsInventoryEOService.getTreeName(cut, categoryList, Arrays.asList(designDeliverableType.split(",")));
}
//验证-交付物类型
String verifyDeliverableType = projectLawsInventoryEO.getVerifyDeliverableType();
if(StringUtils.isNotBlank(verifyDeliverableType)){
verifyDeliverableTypeName = projectLawsInventoryEOService.getTreeName(cut, categoryList, Arrays.asList(verifyDeliverableType.split(",")));
}
for (ProjectLawsInventoryEO lawsInventoryEO : lawsInventoryEOS) {
String serialNumberTemp = lawsInventoryEO.getSerialNumber();
@@ -1335,11 +1352,12 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
if(!list.isEmpty()){
lawsInventoryEO.setDutyTerritory_dictText(dutyTerritoryNew);
}
lawsInventoryEO.setDesignDeliverableTypeName(designDeliverableTypeName);
lawsInventoryEO.setVerifyDeliverableTypeName(verifyDeliverableTypeName);
projectLawsInventoryEOS.add(lawsInventoryEO);
}
}
if(!projectLawsInventoryEOS.isEmpty() && projectLawsInventoryEOS.size() > 1){
map.put("lawsInventoryId",projectLawsInventoryEO.getId());
map.put("title",serialNumber+" "+dutyTerritoryNew+" "+subtitle+"在平台件项目中包含多条匹配内容,请选择关联");