问题管理-列表数据
This commit is contained in:
+37
-7
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -33,6 +34,7 @@ import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -301,15 +303,17 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
||||
}
|
||||
}
|
||||
}
|
||||
List<ProblemManagementEO> managementEOList = problemManagementEOService.list();
|
||||
List<NcrTrackVO> ncrTrackVOList = new ArrayList<>();
|
||||
for (ProblemManagementEO problemManagementEO : managementEOList) {
|
||||
NcrTrackVO ncrTrackVOTemp = new NcrTrackVO();
|
||||
BeanUtils.copyProperties(problemManagementEO,ncrTrackVOTemp);
|
||||
ncrTrackVOList.add(ncrTrackVOTemp);
|
||||
}
|
||||
List<NcrTrackVO> ncrTrackVOList = getProblemManagementData(ncrTrackVOListTemp);
|
||||
|
||||
if(trackVOListTemp.size() != 0){
|
||||
//旧数据处理
|
||||
for (NcrTrackVO trackVO : trackVOListTemp) {
|
||||
String problemType = trackVO.getProblemType();
|
||||
trackVO.setTitle(trackVO.getFlowType()+problemType);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(!ncrTrackVOList.isEmpty()){
|
||||
trackVOListTemp.addAll(ncrTrackVOList);
|
||||
}
|
||||
@@ -322,6 +326,32 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private List<NcrTrackVO> getProblemManagementData(List<NcrTrackVO> ncrTrackVOListTemp) {
|
||||
List<String> idList = new ArrayList<>();
|
||||
if(!ncrTrackVOListTemp.isEmpty()){
|
||||
//处理导出时勾选数据
|
||||
idList = ncrTrackVOListTemp.stream().filter(e -> StringUtils.isNotBlank(e.getFlowType())).map(NcrTrackVO::getId).collect(Collectors.toList());
|
||||
}
|
||||
List<ProblemManagementEO> managementEOList = new ArrayList<>();
|
||||
if(!idList.isEmpty()){
|
||||
LambdaQueryWrapper<ProblemManagementEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(ProblemManagementEO::getId,idList);
|
||||
managementEOList = problemManagementEOService.list(wrapper);
|
||||
}else{
|
||||
managementEOList = problemManagementEOService.list();
|
||||
}
|
||||
List<NcrTrackVO> ncrTrackVOList = new ArrayList<>();
|
||||
for (ProblemManagementEO problemManagementEO : managementEOList) {
|
||||
NcrTrackVO ncrTrackVOTemp = new NcrTrackVO();
|
||||
BeanUtils.copyProperties(problemManagementEO,ncrTrackVOTemp);
|
||||
ncrTrackVOTemp.setUuid(ncrTrackVOTemp.getId());
|
||||
ncrTrackVOTemp.setFlag(DataEnum.NEW.getValue());
|
||||
ncrTrackVOList.add(ncrTrackVOTemp);
|
||||
}
|
||||
return ncrTrackVOList;
|
||||
}
|
||||
|
||||
private String getMarket(List<DictModel> targetMarketList, NcrTrackVO trackVO,String cut) {
|
||||
//目标市场
|
||||
List<DictModel> dictModelList = new ArrayList<>();
|
||||
|
||||
+3
-2
@@ -1,7 +1,7 @@
|
||||
package com.jero.modules.project.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -59,7 +59,7 @@ public class NcrTrackVO implements Serializable {
|
||||
private String flowType;
|
||||
|
||||
//责任领域 duty_territory
|
||||
// @Dict(dicCode ="duty_territory")
|
||||
@Dict(dicCode ="duty_territory")
|
||||
@Excel(name = "责任领域", width = 20,dicCode ="duty_territory")
|
||||
private String dutyTerritory;
|
||||
|
||||
@@ -80,6 +80,7 @@ public class NcrTrackVO implements Serializable {
|
||||
private String projectVersion;
|
||||
|
||||
//问题类型
|
||||
@Dict(dicCode ="wen4_ti2_lei4_xing2")
|
||||
@Excel(name = "问题类型", width = 20)
|
||||
private String problemType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user