参数项收集清单-表头排序
This commit is contained in:
+1
@@ -32,6 +32,7 @@ public interface ParamsCollectManifestEOMapper extends BaseMapper<ParamsCollectM
|
||||
List<ParamsCollectManifestEO> queryByParamManifestId(@Param("paramsManifestId") String paramsManifestIdString);
|
||||
|
||||
IPage selectpage(@Param("page") IPage page, @Param("sqlJoin") String sqlJoin, @Param("paramsManifestEO")ParamsManifestEO paramsManifestEO);
|
||||
List<ParamsCollectManifestEO> selectList(@Param("sqlJoin") String sqlJoin, @Param("paramsManifestEO")ParamsManifestEO paramsManifestEO);
|
||||
|
||||
List<ParamsCollectManifestEO> queryByProjectId(@Param("projectId") String projectId);
|
||||
|
||||
|
||||
+9
@@ -149,6 +149,15 @@
|
||||
) temp
|
||||
${sqlJoin}
|
||||
</select>
|
||||
<select id="selectList" resultMap="ParamsCollectManifestEOResultMap">
|
||||
select *
|
||||
from (
|
||||
select pcm.*
|
||||
from params_collect_manifest pcm
|
||||
where pcm.params_manifest_id = #{paramsManifestEO.id}
|
||||
) temp
|
||||
${sqlJoin}
|
||||
</select>
|
||||
<select id="queryByProjectId" resultMap="ParamsCollectManifestEOResultMap">
|
||||
SELECT * from params_collect_manifest pcm LEFT JOIN params_manifest pm ON pm.id = pcm.params_manifest_id WHERE pm.project_id = #{projectId}
|
||||
</select>
|
||||
|
||||
+377
-17
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jero.common.api.vo.Result;
|
||||
@@ -23,6 +24,7 @@ import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.query.QueryRuleEnum;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.PageUtil;
|
||||
import com.jero.common.util.oss.CosBootUtil;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
@@ -72,6 +74,7 @@ import com.jero.modules.cert.template.service.ICertCategoryParamsInfoPublishEOSe
|
||||
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
||||
import com.jero.modules.cert.template.service.impl.CertCategoryParamsInfoEOServiceImpl;
|
||||
import com.jero.modules.document.vo.QueryConditionVO;
|
||||
import com.jero.modules.dummy.enums.OrderEnum;
|
||||
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||
@@ -151,6 +154,7 @@ import java.lang.reflect.Modifier;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.text.Collator;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -161,6 +165,7 @@ import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Objects;
|
||||
@@ -791,32 +796,46 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
List<QueryConditionVO> queryConditionVOList = JSONObject.parseArray(paramsCollectManifestVO.getQueryConditionVOListStr(), QueryConditionVO.class);
|
||||
this.createAdvanceedSearchCondition(queryConditionVOList, sqlJoinSb);
|
||||
}
|
||||
|
||||
List<String> categoryListtoHump = new ArrayList<>();
|
||||
if (StringUtils.isEmpty(paramsCollectManifestVO.getOrderByField())) {
|
||||
sqlJoinSb.append(" ORDER BY del_flag DESC")
|
||||
.append(", add_flag DESC")
|
||||
.append(", change_flag DESC")
|
||||
.append(", nio_number ASC");
|
||||
} else {
|
||||
// 拼接动态排序字段
|
||||
sqlJoinSb.append(" ORDER BY ").append(paramsCollectManifestVO.getOrderByField());
|
||||
// 拼接排序方式
|
||||
if (StringUtils.equals(paramsCollectManifestVO.getOrderBy(), "1")) {
|
||||
sqlJoinSb.append(" ASC");
|
||||
} else {
|
||||
sqlJoinSb.append(" DESC");
|
||||
List<String> categoryList = new ArrayList<>();
|
||||
List<SysDictItem> sysDictItemList = sysDictItemService.selectItemsByDictCode("cert_category");
|
||||
if(ObjectUtil.isNotEmpty(sysDictItemList)){
|
||||
categoryList = sysDictItemList.stream().map(SysDictItem::getItemValue).collect(Collectors.toList());
|
||||
if(ObjectUtil.isNotEmpty(categoryList)){
|
||||
for (String s : categoryList) {
|
||||
String toHump = LineHumpUtil.lineToHump(s);
|
||||
categoryListtoHump.add(toHump);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ObjectUtil.isEmpty(categoryListtoHump)
|
||||
||(ObjectUtil.isNotEmpty(categoryListtoHump) && !categoryListtoHump.contains(paramsCollectManifestVO.getOrderByField()))){
|
||||
// 拼接动态排序字段
|
||||
sqlJoinSb.append(" ORDER BY ").append(paramsCollectManifestVO.getOrderByField());
|
||||
// 拼接排序方式
|
||||
if (StringUtils.equals(paramsCollectManifestVO.getOrderBy(), "1")) {
|
||||
sqlJoinSb.append(" ASC");
|
||||
} else {
|
||||
sqlJoinSb.append(" DESC");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IPage pageInfo = paramsCollectManifestEOMapper.selectpage(page, sqlJoinSb.toString(), paramsManifestEO); // 查询固定列
|
||||
List<ParamsCollectManifestEO> list = pageInfo.getRecords(); // 查询固定列
|
||||
List<ParamsCollectManifestEO> paramsCollectManifestEOS = paramsCollectManifestEOMapper.selectList(sqlJoinSb.toString(), paramsManifestEO);// 查询固定列
|
||||
// IPage pageInfo = paramsCollectManifestEOMapper.selectpage(page, sqlJoinSb.toString(), paramsManifestEO); // 查询固定列
|
||||
// List<ParamsCollectManifestEO> list = pageInfo.getRecords(); // 查询固定列
|
||||
List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询配置列
|
||||
List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
||||
List<ParamsConfigDataEO> paramsConfigDataEOList = paramsConfigDataEOService.queryListByConfigIdList(paramsConfigIdList); // 查询所有配置数据
|
||||
|
||||
List<CertCategoryParamsInfoEO> categoryParamsInfoEOList = new ArrayList<>();
|
||||
if(ObjectUtil.isNotEmpty(list)){
|
||||
String paramsTemplateId = list.get(0).getParamsTemplateId();//模板id
|
||||
if(ObjectUtil.isNotEmpty(paramsCollectManifestEOS)){
|
||||
String paramsTemplateId = paramsCollectManifestEOS.get(0).getParamsTemplateId();//模板id
|
||||
LambdaQueryWrapper<CertCategoryParamsInfoEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(CertCategoryParamsInfoEO::getParamsTemplateId,paramsTemplateId);
|
||||
categoryParamsInfoEOList = certCategoryParamsInfoEOService.list(wrapper);
|
||||
@@ -834,7 +853,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
List<Map<String, Object>> listMap = new ArrayList<>();
|
||||
List<CertCategoryParamsInfoEO> finalCategoryParamsInfoEOList = categoryParamsInfoEOList;
|
||||
list.forEach(collectManifestEO -> { // 参数收集清单
|
||||
paramsCollectManifestEOS.forEach(collectManifestEO -> { // 参数收集清单
|
||||
// 处理数据字典字段 中英文切换 认证类型,责任领域
|
||||
List<String> certCategory = Arrays.asList(collectManifestEO.getCertCategory().split(","));
|
||||
List<String> dutyTerritory = Arrays.asList(collectManifestEO.getDutyTerritory().split(",")); // 单选
|
||||
@@ -982,11 +1001,352 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
listMap.add(manifestMap);
|
||||
});
|
||||
|
||||
pageInfo.setRecords(listMap);
|
||||
return pageInfo;
|
||||
//表头排序(认证类型)
|
||||
headSort(paramsCollectManifestVO, categoryListtoHump, listMap);
|
||||
Page pages = PageUtil.getPages((int)page.getCurrent(), (int)page.getSize(), listMap);
|
||||
return pages;
|
||||
}
|
||||
|
||||
private void headSort(ParamsCollectManifestVO paramsCollectManifestVO, List<String> categoryListtoHump, List<Map<String, Object>> listMap) {
|
||||
if(ObjectUtil.isNotEmpty(categoryListtoHump)
|
||||
&& StringUtils.isNotBlank(paramsCollectManifestVO.getOrderByField())
|
||||
&& categoryListtoHump.contains(paramsCollectManifestVO.getOrderByField())){
|
||||
Collator comparator = Collator.getInstance(Locale.CHINESE);
|
||||
if (OrderEnum.POSITIVE.getValue().equals(paramsCollectManifestVO.getOrderBy())) {
|
||||
Collections.sort(listMap, (e1, e2) -> {
|
||||
String e1ReleaseName = StringUtils.isNotBlank((String) e1.get(paramsCollectManifestVO.getOrderByField())) ? (String) e1.get(paramsCollectManifestVO.getOrderByField()) : "";
|
||||
String e2ReleaseName = StringUtils.isNotBlank((String) e2.get(paramsCollectManifestVO.getOrderByField())) ? (String) e2.get(paramsCollectManifestVO.getOrderByField()) : "";
|
||||
return comparator.compare(e1ReleaseName, e2ReleaseName);
|
||||
});
|
||||
} else if (OrderEnum.REVERSE.getValue().equals(paramsCollectManifestVO.getOrderBy())) {
|
||||
Collections.sort(listMap, (e1, e2) -> {
|
||||
String e1ReleaseName = StringUtils.isNotBlank((String) e1.get(paramsCollectManifestVO.getOrderByField())) ? (String) e1.get(paramsCollectManifestVO.getOrderByField()) : "";
|
||||
String e2ReleaseName = StringUtils.isNotBlank((String) e2.get(paramsCollectManifestVO.getOrderByField())) ? (String) e2.get(paramsCollectManifestVO.getOrderByField()) : "";
|
||||
return comparator.compare(e2ReleaseName, e1ReleaseName);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
// public IPage queryList(IPage page, ParamsCollectManifestVO paramsCollectManifestVO, String cut) {
|
||||
// String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
|
||||
// ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId);
|
||||
//
|
||||
// String userTypes = paramsCollectManifestVO.getUserTypes();
|
||||
// if (StringUtils.isBlank(userTypes)) {
|
||||
// if (CutEnum.CN.getValue().equals(cut)) {
|
||||
// throw new JeroBootException("用户类型参数不能为空!");
|
||||
// } else {
|
||||
// throw new JeroBootException("User type can not be null!");
|
||||
// }
|
||||
// }
|
||||
// if (!CollectManifestUserTypeEnum.doesValueExist(userTypes)) {
|
||||
// if (CutEnum.CN.getValue().equals(cut)) {
|
||||
// throw new JeroBootException("用户类型不存在!");
|
||||
// } else {
|
||||
// throw new JeroBootException("User type is not exist!");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// StringBuilder sqlJoinSb = new StringBuilder();
|
||||
// sqlJoinSb.append("where control_type not in ").append("('").append(ControlTypeEnum.Title.getValue()).append("')");
|
||||
//
|
||||
// LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录用户
|
||||
// if ("sdt".equals(userTypes)) {
|
||||
// sqlJoinSb.append(" and sdt = '").append(loginUser.getUsername()).append("'");
|
||||
// sqlJoinSb.append(" and state in ('2','4','5','6','7','8')");
|
||||
// } else if ("dre".equals(userTypes)) {
|
||||
// sqlJoinSb.append(" and dre = '").append(loginUser.getUsername()).append("'");
|
||||
// sqlJoinSb.append(" and state in ('4','6','7','8')");
|
||||
// } else if ("guest".equals(userTypes)) {
|
||||
// return page;
|
||||
// } else if (CollectManifestUserTypeEnum.VIEWER.getValue().equals(userTypes)) {
|
||||
// List<String> dutyTerritoryList = projectUserDutyTerritoryService.queryDutyTerritoryByUserId(loginUser.getId());
|
||||
// StringBuilder dutyTerritorySb = new StringBuilder();
|
||||
// for (int i = 0; i < dutyTerritoryList.size(); i++) {
|
||||
// dutyTerritorySb.append("'").append(dutyTerritoryList.get(i)).append("'");
|
||||
// // 如果还有下一条
|
||||
// if (i + 1 < dutyTerritoryList.size()) {
|
||||
// dutyTerritorySb.append(",");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// sqlJoinSb.append(" and (").append("sdt = '").append(loginUser.getUsername()).append("'")
|
||||
// .append(" or dre = '").append(loginUser.getUsername()).append("'")
|
||||
// .append(" or duty_territory in (").append(dutyTerritorySb.toString()).append(")")
|
||||
// .append(")");
|
||||
// }
|
||||
// // 搜索NIO编号或认证类别编号 精确搜索
|
||||
// if (StringUtils.isNotEmpty(paramsCollectManifestVO.getAllNumber())) {
|
||||
// paramsCollectManifestVO.setAllNumber(paramsCollectManifestVO.getAllNumber().replaceAll("'", "\'"));
|
||||
// sqlJoinSb.append(" and (").append("nio_number = '").append(paramsCollectManifestVO.getAllNumber()).append("'");
|
||||
// sqlJoinSb.append(" or nio_number in (")
|
||||
// .append("select nio_number from cert_category_params_info_publish where params_number = '").append(paramsCollectManifestVO.getAllNumber()).append("'")
|
||||
// .append(")");
|
||||
// sqlJoinSb.append(")");
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty(paramsCollectManifestVO.getDutyTerritory())) {
|
||||
// List<String> dutyTerritoryList = Arrays.asList(paramsCollectManifestVO.getDutyTerritory().split(","));
|
||||
// StringBuilder dutyTerritoryListSb = new StringBuilder();
|
||||
// for (int i = 0; i < dutyTerritoryList.size(); i++) {
|
||||
// dutyTerritoryListSb.append("'").append(dutyTerritoryList.get(i)).append("'");
|
||||
// if (i + 1 < dutyTerritoryList.size()) {
|
||||
// dutyTerritoryListSb.append(",");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// sqlJoinSb.append(" and duty_territory in (").append(dutyTerritoryListSb.toString()).append(")");
|
||||
// }
|
||||
//
|
||||
// if (StringUtils.isNotEmpty(paramsCollectManifestVO.getParamsName())) {
|
||||
// paramsCollectManifestVO.setParamsName(paramsCollectManifestVO.getParamsName().replaceAll("'", "\'"));
|
||||
// sqlJoinSb.append(" and params_name like '%").append(paramsCollectManifestVO.getParamsName()).append("%'");
|
||||
// }
|
||||
//
|
||||
// if (StringUtils.isNotEmpty(paramsCollectManifestVO.getSdt())) {
|
||||
// paramsCollectManifestVO.setSdt(paramsCollectManifestVO.getSdt().replaceAll("'", "\'"));
|
||||
// sqlJoinSb.append(" and sdt like '%").append(paramsCollectManifestVO.getSdt()).append("%'");
|
||||
// }
|
||||
//
|
||||
// if (StringUtils.isNotEmpty(paramsCollectManifestVO.getDre())) {
|
||||
// paramsCollectManifestVO.setDre(paramsCollectManifestVO.getDre().replaceAll("'", "\'"));
|
||||
// sqlJoinSb.append(" and dre like '%").append(paramsCollectManifestVO.getDre()).append("%'");
|
||||
// }
|
||||
//
|
||||
// if (StringUtils.isNotEmpty(paramsCollectManifestVO.getState())) {
|
||||
// paramsCollectManifestVO.setDre(paramsCollectManifestVO.getState().replaceAll("'", "\'"));
|
||||
// String state = paramsCollectManifestVO.getState().replaceAll("'", "\'");
|
||||
//// state = "1,2,3,9";
|
||||
// StringBuilder sb = new StringBuilder();
|
||||
// for (String s : Arrays.asList(state.split(","))) {
|
||||
// sb.append("'"+s+"',");
|
||||
// }
|
||||
// String substring = sb.substring(0,sb.length() - 1);
|
||||
// sqlJoinSb.append(" and state in ( ").append(substring).append(" )");
|
||||
// }
|
||||
//// if (StringUtils.isNotEmpty(paramsCollectManifestVO.getState())) {
|
||||
//// paramsCollectManifestVO.setDre(paramsCollectManifestVO.getState().replaceAll("'", "\'"));
|
||||
//// sqlJoinSb.append(" and state = '").append(paramsCollectManifestVO.getDre()).append("'");
|
||||
//// }
|
||||
// if (StringUtils.isNotEmpty(paramsCollectManifestVO.getCertCategory())) {
|
||||
// sqlJoinSb.append(" and cert_category like '%").append(paramsCollectManifestVO.getCertCategory()).append("%'");
|
||||
// }
|
||||
//
|
||||
// // 如果高级查询条件不为空,拼接参数
|
||||
// if (StringUtils.isNotEmpty(paramsCollectManifestVO.getQueryConditionVOListStr())) {
|
||||
// List<QueryConditionVO> queryConditionVOList = JSONObject.parseArray(paramsCollectManifestVO.getQueryConditionVOListStr(), QueryConditionVO.class);
|
||||
// this.createAdvanceedSearchCondition(queryConditionVOList, sqlJoinSb);
|
||||
// }
|
||||
//
|
||||
// if (StringUtils.isEmpty(paramsCollectManifestVO.getOrderByField())) {
|
||||
// sqlJoinSb.append(" ORDER BY del_flag DESC")
|
||||
// .append(", add_flag DESC")
|
||||
// .append(", change_flag DESC")
|
||||
// .append(", nio_number ASC");
|
||||
// } else {
|
||||
// List<String> categoryList = new ArrayList<>();
|
||||
// List<String> categoryListtoHump = new ArrayList<>();
|
||||
// List<SysDictItem> sysDictItemList = sysDictItemService.selectItemsByDictCode("cert_category");
|
||||
// if(ObjectUtil.isNotEmpty(sysDictItemList)){
|
||||
// categoryList = sysDictItemList.stream().map(SysDictItem::getItemValue).collect(Collectors.toList());
|
||||
// if(ObjectUtil.isNotEmpty(categoryList)){
|
||||
// for (String s : categoryList) {
|
||||
// String toHump = LineHumpUtil.lineToHump(s);
|
||||
// categoryListtoHump.add(toHump);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if(ObjectUtil.isEmpty(categoryListtoHump)
|
||||
// ||(ObjectUtil.isNotEmpty(categoryListtoHump) && !categoryListtoHump.contains(paramsCollectManifestVO.getOrderByField()))){
|
||||
// // 拼接动态排序字段
|
||||
// sqlJoinSb.append(" ORDER BY ").append(paramsCollectManifestVO.getOrderByField());
|
||||
// // 拼接排序方式
|
||||
// if (StringUtils.equals(paramsCollectManifestVO.getOrderBy(), "1")) {
|
||||
// sqlJoinSb.append(" ASC");
|
||||
// } else {
|
||||
// sqlJoinSb.append(" DESC");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// IPage pageInfo = paramsCollectManifestEOMapper.selectpage(page, sqlJoinSb.toString(), paramsManifestEO); // 查询固定列
|
||||
// List<ParamsCollectManifestEO> list = pageInfo.getRecords(); // 查询固定列
|
||||
// List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询配置列
|
||||
// List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
||||
// List<ParamsConfigDataEO> paramsConfigDataEOList = paramsConfigDataEOService.queryListByConfigIdList(paramsConfigIdList); // 查询所有配置数据
|
||||
//
|
||||
// List<CertCategoryParamsInfoEO> categoryParamsInfoEOList = new ArrayList<>();
|
||||
// if(ObjectUtil.isNotEmpty(list)){
|
||||
// String paramsTemplateId = list.get(0).getParamsTemplateId();//模板id
|
||||
// LambdaQueryWrapper<CertCategoryParamsInfoEO> wrapper = new LambdaQueryWrapper<>();
|
||||
// wrapper.eq(CertCategoryParamsInfoEO::getParamsTemplateId,paramsTemplateId);
|
||||
// categoryParamsInfoEOList = certCategoryParamsInfoEOService.list(wrapper);
|
||||
// }
|
||||
//
|
||||
// // 普通数据字典
|
||||
// List<SysDictItem> dictItemList = new ArrayList<>();
|
||||
// List<String> dictCodeList = new ArrayList<>();
|
||||
// dictCodeList.add("duty_territory");
|
||||
// dictCodeList.add("cert_category");
|
||||
// for (String dictCode : dictCodeList) {
|
||||
// List<SysDictItem> dictItems = sysDictItemService.selectItemsByDictCode(dictCode);
|
||||
// dictItemList.addAll(dictItems);
|
||||
// }
|
||||
//
|
||||
// List<Map<String, Object>> listMap = new ArrayList<>();
|
||||
// List<CertCategoryParamsInfoEO> finalCategoryParamsInfoEOList = categoryParamsInfoEOList;
|
||||
// list.forEach(collectManifestEO -> { // 参数收集清单
|
||||
// // 处理数据字典字段 中英文切换 认证类型,责任领域
|
||||
// List<String> certCategory = Arrays.asList(collectManifestEO.getCertCategory().split(","));
|
||||
// List<String> dutyTerritory = Arrays.asList(collectManifestEO.getDutyTerritory().split(",")); // 单选
|
||||
// String certCategoryName = "";
|
||||
// String dutyTerritoryName = "";
|
||||
// if (CutEnum.CN.getValue().equals(cut)) {
|
||||
// certCategoryName = dictItemList.stream()
|
||||
// .filter(e -> certCategory.contains(e.getItemValue()))
|
||||
// .map(SysDictItem::getItemText)
|
||||
// .collect(Collectors.joining(","));
|
||||
//
|
||||
// dutyTerritoryName = dictItemList.stream()
|
||||
// .filter(e -> dutyTerritory.contains(e.getItemValue()))
|
||||
// .map(SysDictItem::getItemText)
|
||||
// .collect(Collectors.joining(","));
|
||||
//
|
||||
// } else if (CutEnum.EN.getValue().equals(cut)) {
|
||||
// certCategoryName = dictItemList.stream()
|
||||
// .filter(e -> certCategory.contains(e.getItemValue()))
|
||||
// .map(SysDictItem::getEnName)
|
||||
// .collect(Collectors.joining(","));
|
||||
//
|
||||
// dutyTerritoryName = dictItemList.stream()
|
||||
// .filter(e -> dutyTerritory.contains(e.getItemValue()))
|
||||
// .map(SysDictItem::getEnName)
|
||||
// .collect(Collectors.joining(","));
|
||||
//
|
||||
// }
|
||||
//
|
||||
// collectManifestEO.setCertCategory(certCategoryName);
|
||||
// collectManifestEO.setDutyTerritory(dutyTerritoryName);
|
||||
//
|
||||
// // 处理状态字段
|
||||
// Map<String, String> collectManifestStateMap = CollectManifestStateEnum.toMap(cut);
|
||||
// String stateName = collectManifestStateMap.get(collectManifestEO.getState());
|
||||
// collectManifestEO.setState(stateName);
|
||||
//
|
||||
// List<String> configIdList = new ArrayList<>(); // 配置列名
|
||||
//
|
||||
// Map<String, Object> manifestMap = objectToMap(collectManifestEO); // 对象转map
|
||||
// String controlType = collectManifestEO.getControlType();
|
||||
// String paramsCollectManifestId = collectManifestEO.getId();
|
||||
//
|
||||
// //认证类型
|
||||
// List<CertCategoryParamsInfoEO> certCategoryParamsInfoEOS = finalCategoryParamsInfoEOList.stream()
|
||||
// .filter(e -> e.getParamsTemplateId().equals(collectManifestEO.getParamsTemplateId())
|
||||
// && e.getNioNumber().equals(collectManifestEO.getNioNumber())).collect(Collectors.toList());
|
||||
// if(ObjectUtil.isNotEmpty(certCategoryParamsInfoEOS)){
|
||||
// for (CertCategoryParamsInfoEO certCategoryParamsInfoEO : certCategoryParamsInfoEOS) {
|
||||
// String toHump = LineHumpUtil.lineToHump(certCategoryParamsInfoEO.getCertCategory());
|
||||
// manifestMap.put(toHump,certCategoryParamsInfoEO.getParamsNumber());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (StringUtils.isNotEmpty(paramsManifestEO.getReferencesColName())) {
|
||||
// Map<String, Object> referencesColMap = new HashMap<>();
|
||||
// referencesColMap.put("referencesColFlag",true);
|
||||
// Map<String,Object> referencesColConfigDataVOMap = new HashMap<>();
|
||||
// String referencesCol = collectManifestEO.getReferencesCol();
|
||||
// if (StringUtils.isNotBlank(referencesCol)) {
|
||||
// String[] referencesColArr = referencesCol.split("</br>");
|
||||
// int index = 0;
|
||||
// for (String col : referencesColArr) {
|
||||
// List<ParamsConfigDataVO> referencesColVOList = getReferencesColList(controlType, col, collectManifestEO, userTypes); // 重新组合配置数据
|
||||
// String key = index+"+"+UUID.randomUUID().toString().replaceAll("-","");
|
||||
// referencesColConfigDataVOMap.put(key,referencesColVOList);
|
||||
// index++;
|
||||
// }
|
||||
//
|
||||
// referencesColMap.put("controlType", controlType);
|
||||
// referencesColMap.put("paramsConfigData", referencesColConfigDataVOMap);
|
||||
// manifestMap.put("referencesCol", referencesColMap);
|
||||
// } else {
|
||||
// List<ParamsConfigDataVO> referencesColVOList = getReferencesColList(controlType, " # # #", collectManifestEO, userTypes); // 重新组合配置数据
|
||||
// referencesColMap.put("controlType", controlType);
|
||||
//
|
||||
// String key = "0+"+UUID.randomUUID().toString().replaceAll("-","");
|
||||
// referencesColConfigDataVOMap.put(key,referencesColVOList);
|
||||
// referencesColMap.put("paramsConfigData", referencesColConfigDataVOMap);
|
||||
// manifestMap.put("referencesCol", referencesColMap);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
|
||||
// paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
|
||||
// Map<String, Object> paramsConfigDataVO = new HashMap<>();
|
||||
// Map<String, Object> configMap = new HashMap<>();
|
||||
// String paramsConfigId = paramsConfigEO.getId();
|
||||
// List<ParamsConfigDataEO> paramsConfigDatas = this.getConfigDataEOListByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId, paramsConfigDataEOList); // 参数配置数据
|
||||
// if(CollectionUtils.isNotEmpty(paramsConfigDatas)){
|
||||
// // 匿名比较器排序
|
||||
// Collections.sort(paramsConfigDatas, new Comparator<ParamsConfigDataEO>() {
|
||||
// @Override
|
||||
// public int compare(ParamsConfigDataEO p1, ParamsConfigDataEO p2) {
|
||||
// if (p2.getOrderNum() == null || p1.getOrderNum() == null) {
|
||||
// return 0;
|
||||
// }
|
||||
// return p1.getOrderNum().compareTo(p2.getOrderNum());
|
||||
// }
|
||||
// });
|
||||
// for (ParamsConfigDataEO paramsConfigDataEO : paramsConfigDatas) {
|
||||
// List<ParamsConfigDataVO> paramsConfigDataVOList = this.getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
|
||||
// String num = "0";
|
||||
// if(ObjectUtil.isNotEmpty(paramsConfigDataEO.getOrderNum())){
|
||||
// num = String.valueOf(paramsConfigDataEO.getOrderNum());
|
||||
// }
|
||||
// paramsConfigDataVO.put(num + "+" + paramsConfigDataEO.getId(), paramsConfigDataVOList);
|
||||
// }
|
||||
// }else{
|
||||
// ParamsConfigDataEO paramsConfigDataEO = this.getConfigDataEOByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId, paramsConfigDataEOList); // 参数配置数据
|
||||
// List<ParamsConfigDataVO> paramsConfigDataVOList = this.getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
|
||||
// String key = UUID.randomUUID().toString().replaceAll("-", "");
|
||||
// paramsConfigDataVO.put("0+" + key, paramsConfigDataVOList);
|
||||
// }
|
||||
// configMap.put("controlType",controlType);
|
||||
// configMap.put("paramsConfigData",paramsConfigDataVO);
|
||||
// configMap.put("configId",paramsConfigEO.getId());
|
||||
// manifestMap.put(paramsConfigEO.getId(),configMap);
|
||||
//
|
||||
// configIdList.add(paramsConfigEO.getId());
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// // 处理负责领域
|
||||
// Map<String, Object> dutyTerritoryMap = new HashMap<>();
|
||||
// dutyTerritoryMap.put("id", collectManifestEO.getId());
|
||||
// dutyTerritoryMap.put("state", collectManifestEO.getState());
|
||||
// dutyTerritoryMap.put("dataValue", collectManifestEO.getDutyTerritory());
|
||||
// manifestMap.put("dutyTerritory", dutyTerritoryMap);
|
||||
//
|
||||
// // 处理工程接口人
|
||||
// Map<String, Object> sdtMap = new HashMap<>();
|
||||
// sdtMap.put("id", collectManifestEO.getId());
|
||||
// sdtMap.put("state", collectManifestEO.getState());
|
||||
// sdtMap.put("dutyTerritory", StringUtils.join(dutyTerritory, ","));
|
||||
// if (StringUtils.isNotBlank(collectManifestEO.getSdt())) {
|
||||
// sdtMap.put("dataValue", collectManifestEO.getSdt());
|
||||
// } else {
|
||||
// sdtMap.put("dataValue", null);
|
||||
// }
|
||||
// manifestMap.put("sdt", sdtMap);
|
||||
//
|
||||
// // 配置列名数组
|
||||
// manifestMap.put("configIds", configIdList);
|
||||
//
|
||||
// listMap.add(manifestMap);
|
||||
// });
|
||||
//
|
||||
// pageInfo.setRecords(listMap);
|
||||
// return pageInfo;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 重新组装配置数据 用于返回前端
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user