|
@@ -1,6 +1,7 @@
|
|
|
package com.persagy.bdtp.adm.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.fasterxml.jackson.databind.node.ArrayNode;
|
|
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
|
@@ -10,7 +11,9 @@ import com.persagy.bdtp.adm.service.IConfigService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
@Service
|
|
|
public class ConfigServiceImpl implements IConfigService {
|
|
@@ -43,7 +46,30 @@ public class ConfigServiceImpl implements IConfigService {
|
|
|
|
|
|
@Override
|
|
|
public List<AdmInfosConfig> queryInfosConfig(String projectId) {
|
|
|
- return infosConfigMapper.selectList(null);
|
|
|
+ List<AdmInfosConfig> cfgs = infosConfigMapper.selectList(null);
|
|
|
+
|
|
|
+ //TODO 临时:统一处理一些固定的信息点配置
|
|
|
+ for(AdmInfosConfig cfg : cfgs) {
|
|
|
+ if(cfg.getInfos() != null) {
|
|
|
+ HashMap<String, Object> map = new HashMap<>();
|
|
|
+ cfg.getInfos().forEach(item -> map.put((String)((Map)item).get("code"), item));
|
|
|
+ if(!map.containsKey("digitalDeliveryID"))//数字化交付编码
|
|
|
+ addInfoCfg("digitalDeliveryID", "数字化交付编码", "静态信息", "digitalDeliveryCode", cfg.getInfos());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return cfgs;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void addInfoCfg(String code, String label, String group, String inputType, List<Object> cfgInfos){
|
|
|
+ HashMap<String, Object> item = new HashMap<>();
|
|
|
+ item.put("code", code);
|
|
|
+ item.put("label", label);
|
|
|
+ if(StrUtil.isNotBlank(group))
|
|
|
+ item.put("group", group);
|
|
|
+ if(StrUtil.isNotBlank(inputType))
|
|
|
+ item.put("inputType", inputType);
|
|
|
+ cfgInfos.add(item);
|
|
|
}
|
|
|
|
|
|
@Override
|