Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
@@ -399,3 +399,10 @@ INSERT INTO `sys_category` (`id`, `pid`, `name`, `code`, `create_by`, `create_ti
|
|||||||
ALTER TABLE `project_laws_inventory`
|
ALTER TABLE `project_laws_inventory`
|
||||||
ADD COLUMN `design_flow_status` varchar(255) NULL COMMENT '设计符合性确认-流程状态' AFTER `design_due_date`,
|
ADD COLUMN `design_flow_status` varchar(255) NULL COMMENT '设计符合性确认-流程状态' AFTER `design_due_date`,
|
||||||
ADD COLUMN `verify_flow_status` varchar(255) NULL COMMENT '验证符合性确认-流程状态' AFTER `verify_due_date`;
|
ADD COLUMN `verify_flow_status` varchar(255) NULL COMMENT '验证符合性确认-流程状态' AFTER `verify_due_date`;
|
||||||
|
-- 参数配置数据表,增加排序号字段sql 2023-1-31 未同步生产环境
|
||||||
|
ALTER TABLE `laws_weilai`.`params_config_data`
|
||||||
|
ADD COLUMN `order_num` int(10) NULL COMMENT '排序号' AFTER `params_collect_manifest_id`;
|
||||||
|
|
||||||
|
-- 上报库参数配置数据表,增加排序号字段sql 2023-2-1 未同步生产环境
|
||||||
|
ALTER TABLE `laws_weilai`.`params_report_config_data`
|
||||||
|
ADD COLUMN `order_num` int(10) NULL COMMENT '排序号' AFTER `params_collect_manifest_id`;
|
||||||
|
|||||||
+2
@@ -88,4 +88,6 @@ public class ParamsConfigDataEO implements Serializable {
|
|||||||
@ApiModelProperty(value = "参数收集清单id")
|
@ApiModelProperty(value = "参数收集清单id")
|
||||||
private String paramsCollectManifestId;
|
private String paramsCollectManifestId;
|
||||||
|
|
||||||
|
/**排序号**/
|
||||||
|
private Integer orderNum;
|
||||||
}
|
}
|
||||||
|
|||||||
+9
@@ -56,6 +56,15 @@ public interface IParamsConfigDataEOService extends IService<ParamsConfigDataEO>
|
|||||||
*/
|
*/
|
||||||
ParamsConfigDataEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
|
ParamsConfigDataEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param paramsConfigId
|
||||||
|
* @param paramsCollectManifestId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ParamsConfigDataEO> queryListByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
|
|||||||
+429
-57
@@ -95,6 +95,7 @@ import java.lang.reflect.Modifier;
|
|||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.nio.file.StandardOpenOption;
|
import java.nio.file.StandardOpenOption;
|
||||||
|
import java.text.Collator;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -168,7 +169,6 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
private String uploadpath;
|
private String uploadpath;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Value(value = "${jero.backUrl}")
|
@Value(value = "${jero.backUrl}")
|
||||||
private String backUrl;
|
private String backUrl;
|
||||||
|
|
||||||
@@ -328,6 +328,14 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<ParamsConfigDataEO> getConfigDataEOListByConfigIdAndCollectManifestId(String configId, String collectManifestId, List<ParamsConfigDataEO> paramsConfigDataEOList) {
|
||||||
|
List<ParamsConfigDataEO> configDataEOList = paramsConfigDataEOList.stream().filter(e -> configId.equals(e.getParamsConfigId()) && collectManifestId.equals(e.getParamsCollectManifestId())).collect(Collectors.toList());
|
||||||
|
if (CollectionUtil.isNotEmpty(configDataEOList)) {
|
||||||
|
return configDataEOList;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
@@ -482,31 +490,80 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
if (StringUtils.isNotEmpty(paramsManifestEO.getReferencesColName())) {
|
if (StringUtils.isNotEmpty(paramsManifestEO.getReferencesColName())) {
|
||||||
Map<String, Object> referencesColMap = new HashMap<>();
|
Map<String, Object> referencesColMap = new HashMap<>();
|
||||||
|
referencesColMap.put("referencesColFlag",true);
|
||||||
|
Map<String,Object> referencesColConfigDataVOMap = new HashMap<>();
|
||||||
String referencesCol = collectManifestEO.getReferencesCol();
|
String referencesCol = collectManifestEO.getReferencesCol();
|
||||||
if (StringUtils.isNotBlank(referencesCol)) {
|
if (StringUtils.isNotBlank(referencesCol)) {
|
||||||
List<ParamsConfigDataVO> referencesColVOList = getReferencesColList(controlType, referencesCol, collectManifestEO, userTypes); // 重新组合配置数据
|
String[] referencesColArr = referencesCol.split("</br>");
|
||||||
|
for (String col : referencesColArr) {
|
||||||
|
List<ParamsConfigDataVO> referencesColVOList = getReferencesColList(controlType, col, collectManifestEO, userTypes); // 重新组合配置数据
|
||||||
|
String key = UUID.randomUUID().toString().replaceAll("-","");
|
||||||
|
referencesColConfigDataVOMap.put(key,referencesColVOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
referencesColMap.put("controlType", controlType);
|
referencesColMap.put("controlType", controlType);
|
||||||
referencesColMap.put("list", referencesColVOList);
|
referencesColMap.put("paramsConfigData", referencesColConfigDataVOMap);
|
||||||
|
|
||||||
|
//referencesColMap.put("list", referencesColVOList);
|
||||||
manifestMap.put("referencesCol", referencesColMap);
|
manifestMap.put("referencesCol", referencesColMap);
|
||||||
} else {
|
} else {
|
||||||
List<ParamsConfigDataVO> referencesColVOList = getReferencesColList(controlType, " # # #", collectManifestEO, userTypes); // 重新组合配置数据
|
List<ParamsConfigDataVO> referencesColVOList = getReferencesColList(controlType, " # # #", collectManifestEO, userTypes); // 重新组合配置数据
|
||||||
referencesColMap.put("controlType", controlType);
|
referencesColMap.put("controlType", controlType);
|
||||||
referencesColMap.put("list", referencesColVOList);
|
|
||||||
|
String key = UUID.randomUUID().toString().replaceAll("-","");
|
||||||
|
referencesColConfigDataVOMap.put(key,referencesColVOList);
|
||||||
|
referencesColMap.put("paramsConfigData", referencesColConfigDataVOMap);
|
||||||
|
|
||||||
|
//referencesColMap.put("list", referencesColVOList);
|
||||||
manifestMap.put("referencesCol", referencesColMap);
|
manifestMap.put("referencesCol", referencesColMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
|
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
|
||||||
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
|
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
|
||||||
Map<String, Object> configMap = new HashMap<>();
|
/*Map<String, Object> configMap = new HashMap<>();
|
||||||
String paramsConfigId = paramsConfigEO.getId();
|
String paramsConfigId = paramsConfigEO.getId();
|
||||||
// ParamsConfigDataEO paramsConfigDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
|
|
||||||
ParamsConfigDataEO paramsConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId, paramsConfigDataEOList); // 参数配置数据
|
ParamsConfigDataEO paramsConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId, paramsConfigDataEOList); // 参数配置数据
|
||||||
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
|
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
|
||||||
configMap.put("controlType", controlType);
|
configMap.put("controlType", controlType);
|
||||||
configMap.put("list", paramsConfigDataVOList);
|
configMap.put("list", paramsConfigDataVOList);
|
||||||
manifestMap.put(paramsConfigEO.getId(), configMap);
|
manifestMap.put(paramsConfigEO.getId(), configMap);
|
||||||
|
|
||||||
|
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); // 重新组合配置数据
|
||||||
|
paramsConfigDataVO.put(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(key, paramsConfigDataVOList);
|
||||||
|
}
|
||||||
|
configMap.put("controlType",controlType);
|
||||||
|
configMap.put("paramsConfigData",paramsConfigDataVO);
|
||||||
|
configMap.put("configId",paramsConfigEO.getId());
|
||||||
|
manifestMap.put(paramsConfigEO.getId(),configMap);
|
||||||
|
|
||||||
configIdList.add(paramsConfigEO.getId());
|
configIdList.add(paramsConfigEO.getId());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -775,6 +832,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 重新组装配置数据 用于返回前端
|
* 重新组装配置数据 用于返回前端
|
||||||
|
*
|
||||||
* @param controlType
|
* @param controlType
|
||||||
* @param paramsConfigDataEO
|
* @param paramsConfigDataEO
|
||||||
* @param paramsCollectManifestEO
|
* @param paramsCollectManifestEO
|
||||||
@@ -1042,6 +1100,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 重新组装配置数据 用于返回前端
|
* 重新组装配置数据 用于返回前端
|
||||||
|
*
|
||||||
* @param controlType
|
* @param controlType
|
||||||
* @param referencesCol
|
* @param referencesCol
|
||||||
* @param paramsCollectManifestEO
|
* @param paramsCollectManifestEO
|
||||||
@@ -1476,7 +1535,6 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
// 添加配置数据
|
// 添加配置数据
|
||||||
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||||
ParamsConfigDataEO paramsConfigDataEO = new ParamsConfigDataEO();
|
|
||||||
if ("id".equals(entry.getKey())) {
|
if ("id".equals(entry.getKey())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -1485,21 +1543,42 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
String paramsConfigEOId = entry.getKey();
|
String paramsConfigEOId = entry.getKey();
|
||||||
Map<String, Object> paramsConfigDataMap = (Map<String, Object>) entry.getValue();
|
Map<String, Object> paramsConfigDataMap = (Map<String, Object>) entry.getValue();
|
||||||
// 无法转ParamsConfigDataVO(遍历会出现该异常 : LinkedHashMap cannot be cast to ParamsConfigDataVO)
|
// 无法转ParamsConfigDataVO(遍历会出现该异常 : LinkedHashMap cannot be cast to ParamsConfigDataVO)
|
||||||
List<Map<String, Object>> paramsConfigDataVOList = (List<Map<String, Object>>) paramsConfigDataMap.get("list");
|
// List<Map<String, Object>> paramsConfigDataVOList = (List<Map<String, Object>>) paramsConfigDataMap.get("list");
|
||||||
|
Map<String, Object> paramsConfigDataVOMap = (Map<String, Object>) paramsConfigDataMap.get("paramsConfigData");
|
||||||
|
|
||||||
// 判断是新增还是修改
|
// 判断是新增还是修改
|
||||||
ParamsConfigDataEO oldConfigDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigEOId, paramsCollectManifestId);
|
// ParamsConfigDataEO oldConfigDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigEOId, paramsCollectManifestId);
|
||||||
if (ObjectUtil.isNotEmpty(oldConfigDataEO)) {
|
List<ParamsConfigDataEO> oldConfigDataEOList = this.paramsConfigDataEOService.queryListByConfigIdAndCollectManifestId(paramsConfigEOId, paramsCollectManifestId);
|
||||||
paramsConfigDataEO.setId(oldConfigDataEO.getId());
|
|
||||||
|
|
||||||
}
|
|
||||||
paramsConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
|
|
||||||
paramsConfigDataEO.setParamsConfigId(paramsConfigEOId);
|
|
||||||
ParamsConfigEO paramsConfigEO = this.paramsConfigEOService.queryById(paramsConfigEOId);
|
ParamsConfigEO paramsConfigEO = this.paramsConfigEOService.queryById(paramsConfigEOId);
|
||||||
if (Objects.isNull(paramsConfigEO)) {
|
if (Objects.isNull(paramsConfigEO)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 拼接历史记录信息
|
||||||
|
for (Map.Entry<String, Object> configDataMap : paramsConfigDataVOMap.entrySet()) {
|
||||||
|
List<Map<String, Object>> paramsConfigDataVOList = (List<Map<String, Object>>) configDataMap.getValue();
|
||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(paramsConfigDataVOList)) {
|
if (CollectionUtil.isNotEmpty(paramsConfigDataVOList)) {
|
||||||
|
|
||||||
|
ParamsConfigDataEO paramsConfigDataEO = new ParamsConfigDataEO();
|
||||||
|
if (CollectionUtils.isNotEmpty(oldConfigDataEOList)) {
|
||||||
|
List<ParamsConfigDataEO> oldConfigDataEOs = oldConfigDataEOList.stream().filter(configData -> {
|
||||||
|
boolean flag = false;
|
||||||
|
if (StringUtils.equals(configDataMap.getKey(), configData.getId())) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(oldConfigDataEOs)) {
|
||||||
|
paramsConfigDataEO.setId(oldConfigDataEOs.get(0).getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
paramsConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
|
||||||
|
paramsConfigDataEO.setParamsConfigId(paramsConfigEOId);
|
||||||
|
|
||||||
boolean appendFlag = false; // 拼接标识
|
boolean appendFlag = false; // 拼接标识
|
||||||
for (Map<String, Object> paramsConfigDataVO : paramsConfigDataVOList) {
|
for (Map<String, Object> paramsConfigDataVO : paramsConfigDataVOList) {
|
||||||
String dataValue = (String) paramsConfigDataVO.get("dataValue");
|
String dataValue = (String) paramsConfigDataVO.get("dataValue");
|
||||||
@@ -1571,6 +1650,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
logEnContentSb.append("\"").append(fileNames).append("\"");
|
logEnContentSb.append("\"").append(fileNames).append("\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
newConfigDataEOList.add(paramsConfigDataEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (appendFlag) {
|
if (appendFlag) {
|
||||||
@@ -1578,7 +1658,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
logEnContentSb.append(" and ");
|
logEnContentSb.append(" and ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newConfigDataEOList.add(paramsConfigDataEO);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ParamsCollectManifestLogEO paramsCollectManifestLogEO = new ParamsCollectManifestLogEO();
|
ParamsCollectManifestLogEO paramsCollectManifestLogEO = new ParamsCollectManifestLogEO();
|
||||||
@@ -1601,9 +1681,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
@Override
|
@Override
|
||||||
public boolean save(List<Map<String, Object>> configDataList, String paramsManifestId) {
|
public boolean save(List<Map<String, Object>> configDataList, String paramsManifestId) {
|
||||||
List<ParamsConfigDataEO> newConfigDataEOList = new ArrayList<>();
|
List<ParamsConfigDataEO> newConfigDataEOList = new ArrayList<>();
|
||||||
List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询配置列
|
List<String> paramsCollectManifestIdList = new ArrayList<>();
|
||||||
List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
|
||||||
List<ParamsConfigDataEO> paramsConfigDataEOList = paramsConfigDataEOService.queryListByConfigIdList(paramsConfigIdList); // 查询所有配置数据
|
|
||||||
|
|
||||||
// 处理数据
|
// 处理数据
|
||||||
for (Map<String, Object> map : configDataList) {
|
for (Map<String, Object> map : configDataList) {
|
||||||
@@ -1611,7 +1689,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
// 添加配置数据
|
// 添加配置数据
|
||||||
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||||
ParamsConfigDataEO paramsConfigDataEO = new ParamsConfigDataEO();
|
|
||||||
if ("id".equals(entry.getKey())) {
|
if ("id".equals(entry.getKey())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -1620,19 +1698,17 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
String paramsConfigEOId = entry.getKey();
|
String paramsConfigEOId = entry.getKey();
|
||||||
Map<String, Object> paramsConfigDataMap = (Map<String, Object>) entry.getValue();
|
Map<String, Object> paramsConfigDataMap = (Map<String, Object>) entry.getValue();
|
||||||
// 无法转ParamsConfigDataVO(遍历会出现该异常 : LinkedHashMap cannot be cast to ParamsConfigDataVO)
|
// 无法转ParamsConfigDataVO(遍历会出现该异常 : LinkedHashMap cannot be cast to ParamsConfigDataVO)
|
||||||
List<Map<String, Object>> paramsConfigDataVOList = (List<Map<String, Object>>) paramsConfigDataMap.get("list");
|
// List<Map<String, Object>> paramsConfigDataVOList = (List<Map<String, Object>>) paramsConfigDataMap.get("list");
|
||||||
|
Map<String, Object> paramsConfigDataVOMap = (Map<String, Object>) paramsConfigDataMap.get("paramsConfigData");
|
||||||
|
|
||||||
// 判断是新增还是修改
|
for (Map.Entry<String, Object> configDataMap : paramsConfigDataVOMap.entrySet()) {
|
||||||
// ParamsConfigDataEO oldConfigDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigEOId, paramsCollectManifestId);
|
List<Map<String, Object>> paramsConfigDataVOList = (List<Map<String, Object>>) configDataMap.getValue();
|
||||||
ParamsConfigDataEO oldConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsConfigEOId, paramsCollectManifestId,paramsConfigDataEOList);
|
Integer orderNum = (Integer) paramsConfigDataVOList.get(0).get("orderNum");
|
||||||
if (ObjectUtil.isNotEmpty(oldConfigDataEO)) {
|
|
||||||
paramsConfigDataEO.setId(oldConfigDataEO.getId());
|
|
||||||
|
|
||||||
}
|
|
||||||
paramsConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
|
|
||||||
paramsConfigDataEO.setParamsConfigId(paramsConfigEOId);
|
|
||||||
if (CollectionUtil.isNotEmpty(paramsConfigDataVOList)) {
|
if (CollectionUtil.isNotEmpty(paramsConfigDataVOList)) {
|
||||||
|
ParamsConfigDataEO paramsConfigDataEO = new ParamsConfigDataEO();
|
||||||
|
|
||||||
for (Map<String, Object> paramsConfigDataVO : paramsConfigDataVOList) {
|
for (Map<String, Object> paramsConfigDataVO : paramsConfigDataVOList) {
|
||||||
|
|
||||||
String type = (String) paramsConfigDataVO.get("type");
|
String type = (String) paramsConfigDataVO.get("type");
|
||||||
String dataValue = (String) paramsConfigDataVO.get("dataValue");
|
String dataValue = (String) paramsConfigDataVO.get("dataValue");
|
||||||
|
|
||||||
@@ -1677,17 +1753,32 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
paramsConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
|
||||||
|
paramsConfigDataEO.setParamsConfigId(paramsConfigEOId);
|
||||||
|
paramsConfigDataEO.setOrderNum(orderNum);
|
||||||
|
|
||||||
newConfigDataEOList.add(paramsConfigDataEO);
|
newConfigDataEOList.add(paramsConfigDataEO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
paramsCollectManifestIdList.add(paramsCollectManifestId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(paramsCollectManifestIdList)) {
|
||||||
|
QueryWrapper<ParamsConfigDataEO> configDataRemoveWrap = new QueryWrapper<>();
|
||||||
|
configDataRemoveWrap.lambda().in(ParamsConfigDataEO::getParamsCollectManifestId, paramsCollectManifestIdList);
|
||||||
|
this.paramsConfigDataEOService.remove(configDataRemoveWrap);
|
||||||
|
}
|
||||||
|
|
||||||
// 批量更新
|
// 批量更新
|
||||||
return paramsConfigDataEOService.saveOrUpdateBatch(newConfigDataEOList);
|
return paramsConfigDataEOService.saveBatch(newConfigDataEOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询清单所用模版参数项列表(过滤清单已添加的参数项)
|
* 查询清单所用模版参数项列表(过滤清单已添加的参数项)
|
||||||
|
*
|
||||||
* @param paramsCollectManifestVO
|
* @param paramsCollectManifestVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -2034,8 +2125,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
// 添加配置数据
|
// 添加配置数据
|
||||||
int paramsConfigLenth = 1;
|
int paramsConfigLenth = 1;
|
||||||
for (ParamsConfigEO configEO : paramsConfigEOList) {
|
for (ParamsConfigEO configEO : paramsConfigEOList) {
|
||||||
ParamsConfigDataEO configDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(configEO.getId(), paramsCollectManifestEO.getId());
|
// ParamsConfigDataEO configDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(configEO.getId(), paramsCollectManifestEO.getId());
|
||||||
|
List<ParamsConfigDataEO> configDataEOList = this.paramsConfigDataEOService.queryListByConfigIdAndCollectManifestId(configEO.getId(), paramsCollectManifestEO.getId());
|
||||||
|
for (ParamsConfigDataEO configDataEO : configDataEOList) {
|
||||||
if (StringUtils.isNotEmpty(configDataEO.getPullData()) || StringUtils.isNotEmpty(configDataEO.getTextData()) || StringUtils.isNotEmpty(configDataEO.getFileConnectId())) {
|
if (StringUtils.isNotEmpty(configDataEO.getPullData()) || StringUtils.isNotEmpty(configDataEO.getTextData()) || StringUtils.isNotEmpty(configDataEO.getFileConnectId())) {
|
||||||
logCnContentSb.append(configEO.getConfigName());
|
logCnContentSb.append(configEO.getConfigName());
|
||||||
logCnContentSb.append(" 的");
|
logCnContentSb.append(" 的");
|
||||||
@@ -2065,6 +2157,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
logEnContentSb.append(" and ");
|
logEnContentSb.append(" and ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
paramsConfigLenth++;
|
paramsConfigLenth++;
|
||||||
}
|
}
|
||||||
@@ -2970,10 +3063,29 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
List<ParamsConfigDataEO> updateConfigDataEOList = new ArrayList<>();
|
List<ParamsConfigDataEO> updateConfigDataEOList = new ArrayList<>();
|
||||||
List<ParamsConfigDataEO> addConfigDataEOList = new ArrayList<>();
|
List<ParamsConfigDataEO> addConfigDataEOList = new ArrayList<>();
|
||||||
for (int i = 0; i < paramsCollectManifestIdStr.length; i++) {
|
for (int i = 0; i < paramsCollectManifestIdStr.length; i++) {
|
||||||
ParamsConfigDataEO sourceConfigDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(sourceConfigId, paramsCollectManifestIdStr[i]);
|
// ParamsConfigDataEO sourceConfigDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(sourceConfigId, paramsCollectManifestIdStr[i]);
|
||||||
|
List<ParamsConfigDataEO> sourceConfigDataEOList = this.paramsConfigDataEOService.queryListByConfigIdAndCollectManifestId(sourceConfigId, paramsCollectManifestIdStr[i]);
|
||||||
|
if (CollectionUtils.isNotEmpty(sourceConfigDataEOList)) {
|
||||||
|
for (ParamsConfigDataEO sourceConfigDataEO : sourceConfigDataEOList) {
|
||||||
if (ObjectUtil.isNotEmpty(sourceConfigDataEO)) {
|
if (ObjectUtil.isNotEmpty(sourceConfigDataEO)) {
|
||||||
for (int j = 0; j < targetConfigIdStr.length; j++) {
|
for (int j = 0; j < targetConfigIdStr.length; j++) {
|
||||||
ParamsConfigDataEO targetConfigDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(targetConfigIdStr[j], paramsCollectManifestIdStr[i]);
|
// 根据配置id、参数清单id,将被引用参数列的数据删掉,重新加
|
||||||
|
QueryWrapper<ParamsConfigDataEO> targetConfigDataRemoveWrap = new QueryWrapper<>();
|
||||||
|
targetConfigDataRemoveWrap.lambda().eq(ParamsConfigDataEO::getParamsConfigId, targetConfigIdStr[j]);
|
||||||
|
targetConfigDataRemoveWrap.lambda().eq(ParamsConfigDataEO::getParamsCollectManifestId, paramsCollectManifestIdStr[i]);
|
||||||
|
this.paramsConfigDataEOService.remove(targetConfigDataRemoveWrap);
|
||||||
|
|
||||||
|
ParamsConfigDataEO targetConfigDataEO = new ParamsConfigDataEO();
|
||||||
|
BeanUtils.copyProperties(sourceConfigDataEO, targetConfigDataEO);
|
||||||
|
targetConfigDataEO.setId(null);
|
||||||
|
targetConfigDataEO.setParamsConfigId(targetConfigIdStr[j]);
|
||||||
|
targetConfigDataEO.setParamsCollectManifestId(paramsCollectManifestIdStr[i]);
|
||||||
|
addConfigDataEOList.add(targetConfigDataEO);
|
||||||
|
|
||||||
|
/* ParamsConfigDataEO targetConfigDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(targetConfigIdStr[j], paramsCollectManifestIdStr[i]);
|
||||||
|
List<ParamsConfigDataEO> targetConfigDataEOList = this.paramsConfigDataEOService.queryListByConfigIdAndCollectManifestId(targetConfigIdStr[j], paramsCollectManifestIdStr[i]);
|
||||||
|
if(CollectionUtils.isNotEmpty(targetConfigDataEOList)){
|
||||||
|
for (ParamsConfigDataEO targetConfigDataEO : targetConfigDataEOList) {
|
||||||
if (ObjectUtil.isNotEmpty(targetConfigDataEO)) {
|
if (ObjectUtil.isNotEmpty(targetConfigDataEO)) {
|
||||||
ParamsConfigDataEO updateConfigDataEO = new ParamsConfigDataEO();
|
ParamsConfigDataEO updateConfigDataEO = new ParamsConfigDataEO();
|
||||||
updateConfigDataEO.setId(targetConfigDataEO.getId());
|
updateConfigDataEO.setId(targetConfigDataEO.getId());
|
||||||
@@ -2991,10 +3103,33 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
addConfigDataEOList.add(addConfigDataEO);
|
addConfigDataEOList.add(addConfigDataEO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(targetConfigDataEO)) {
|
||||||
|
ParamsConfigDataEO updateConfigDataEO = new ParamsConfigDataEO();
|
||||||
|
updateConfigDataEO.setId(targetConfigDataEO.getId());
|
||||||
|
updateConfigDataEO.setTextData(sourceConfigDataEO.getTextData());
|
||||||
|
updateConfigDataEO.setPullData(sourceConfigDataEO.getPullData());
|
||||||
|
updateConfigDataEO.setFileConnectId(sourceConfigDataEO.getFileConnectId());
|
||||||
|
updateConfigDataEOList.add(updateConfigDataEO);
|
||||||
|
} else {
|
||||||
|
ParamsConfigDataEO addConfigDataEO = new ParamsConfigDataEO();
|
||||||
|
addConfigDataEO.setParamsConfigId(targetConfigIdStr[j]);
|
||||||
|
addConfigDataEO.setParamsCollectManifestId(paramsCollectManifestIdStr[i]);
|
||||||
|
addConfigDataEO.setTextData(sourceConfigDataEO.getTextData());
|
||||||
|
addConfigDataEO.setPullData(sourceConfigDataEO.getPullData());
|
||||||
|
addConfigDataEO.setFileConnectId(sourceConfigDataEO.getFileConnectId());
|
||||||
|
addConfigDataEOList.add(addConfigDataEO);
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// 清空引用到的配置的数据
|
// 清空引用到的配置的数据
|
||||||
for (int j = 0; j < targetConfigIdStr.length; j++) {
|
for (int j = 0; j < targetConfigIdStr.length; j++) {
|
||||||
ParamsConfigDataEO targetConfigDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(targetConfigIdStr[j], paramsCollectManifestIdStr[i]);
|
// ParamsConfigDataEO targetConfigDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(targetConfigIdStr[j], paramsCollectManifestIdStr[i]);
|
||||||
|
List<ParamsConfigDataEO> targetConfigDataEOList = this.paramsConfigDataEOService.queryListByConfigIdAndCollectManifestId(targetConfigIdStr[j], paramsCollectManifestIdStr[i]);
|
||||||
|
if (CollectionUtils.isNotEmpty(targetConfigDataEOList)) {
|
||||||
|
for (ParamsConfigDataEO targetConfigDataEO : targetConfigDataEOList) {
|
||||||
if (ObjectUtil.isNotEmpty(targetConfigDataEO)) {
|
if (ObjectUtil.isNotEmpty(targetConfigDataEO)) {
|
||||||
ParamsConfigDataEO updateConfigDataEO = new ParamsConfigDataEO();
|
ParamsConfigDataEO updateConfigDataEO = new ParamsConfigDataEO();
|
||||||
updateConfigDataEO.setId(targetConfigDataEO.getId());
|
updateConfigDataEO.setId(targetConfigDataEO.getId());
|
||||||
@@ -3006,9 +3141,11 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
paramsConfigDataEOService.saveBatch(addConfigDataEOList);
|
paramsConfigDataEOService.saveBatch(addConfigDataEOList);
|
||||||
paramsConfigDataEOService.updateBatchById(updateConfigDataEOList);
|
// paramsConfigDataEOService.updateBatchById(updateConfigDataEOList);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3081,8 +3218,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
// 添加配置数据
|
// 添加配置数据
|
||||||
int paramsConfigLenth = 1;
|
int paramsConfigLenth = 1;
|
||||||
for (ParamsConfigEO configEO : paramsConfigEOList) {
|
for (ParamsConfigEO configEO : paramsConfigEOList) {
|
||||||
ParamsConfigDataEO configDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId());
|
// ParamsConfigDataEO configDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId());
|
||||||
|
List<ParamsConfigDataEO> configDataEOList = this.paramsConfigDataEOService.queryListByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId());
|
||||||
|
for (ParamsConfigDataEO configDataEO : configDataEOList) {
|
||||||
ParamsReportConfigDataEO addReportConfigDataEO = new ParamsReportConfigDataEO();
|
ParamsReportConfigDataEO addReportConfigDataEO = new ParamsReportConfigDataEO();
|
||||||
BeanUtils.copyProperties(configDataEO, addReportConfigDataEO);
|
BeanUtils.copyProperties(configDataEO, addReportConfigDataEO);
|
||||||
addReportConfigDataEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
addReportConfigDataEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||||
@@ -3119,6 +3257,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
logEnContentSb.append(" and ");
|
logEnContentSb.append(" and ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
paramsConfigLenth++;
|
paramsConfigLenth++;
|
||||||
}
|
}
|
||||||
@@ -3797,6 +3936,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
if (checkObjAllFieldsIsNull(importDto)) {
|
if (checkObjAllFieldsIsNull(importDto)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 如果id为空,不做处理
|
||||||
|
if (StringUtils.isEmpty(importDto.getId())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// 处理文件
|
// 处理文件
|
||||||
if (StringUtils.isNotBlank(importDto.getFileConnectId())) { // 判空,否则报空指针异常
|
if (StringUtils.isNotBlank(importDto.getFileConnectId())) { // 判空,否则报空指针异常
|
||||||
List<File> nowFileList = FileUnZip.readFileByFilename(unzipfilepath, importDto.getFileConnectId(), null, null, null, null, null);
|
List<File> nowFileList = FileUnZip.readFileByFilename(unzipfilepath, importDto.getFileConnectId(), null, null, null, null, null);
|
||||||
@@ -3941,6 +4086,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据责任领域code,获取责任领域名称,包含中英文切换。
|
* 根据责任领域code,获取责任领域名称,包含中英文切换。
|
||||||
|
*
|
||||||
* @param dutyTerritoryList
|
* @param dutyTerritoryList
|
||||||
* @param dutyTerritoryCode
|
* @param dutyTerritoryCode
|
||||||
* @param cut
|
* @param cut
|
||||||
@@ -4338,12 +4484,58 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
||||||
List<ParamsConfigDataEO> paramsConfigDataEOList = paramsConfigDataEOService.queryListByConfigIdList(paramsConfigIdList); // 查询所有配置数据
|
List<ParamsConfigDataEO> paramsConfigDataEOList = paramsConfigDataEOService.queryListByConfigIdList(paramsConfigIdList); // 查询所有配置数据
|
||||||
|
|
||||||
|
List<ParamsCollectManifestEO> exportDataList = new ArrayList<>();
|
||||||
|
// 配置列多行数据处理
|
||||||
|
for (ParamsCollectManifestEO collectManifestEO : dataList) {
|
||||||
|
String id = collectManifestEO.getId();
|
||||||
|
|
||||||
|
Map<String, List<ParamsConfigDataEO>> paramsConfigDataMap = paramsConfigDataEOList.stream().filter(configDataEO -> {
|
||||||
|
boolean flag = false;
|
||||||
|
if (StringUtils.equals(configDataEO.getParamsCollectManifestId(), id)) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).collect(Collectors.groupingBy(configDataEO -> configDataEO.getParamsConfigId()));
|
||||||
|
|
||||||
|
List<Map<String, Object>> paramsConfigDataCountList = new ArrayList<>();
|
||||||
|
|
||||||
|
for (Map.Entry<String, List<ParamsConfigDataEO>> map : paramsConfigDataMap.entrySet()) {
|
||||||
|
Map<String, Object> paramsConfigDataCountMap = new HashMap<>();
|
||||||
|
paramsConfigDataCountMap.put("key", map.getKey());
|
||||||
|
paramsConfigDataCountMap.put("paramsConfigDataCount", map.getValue().size());
|
||||||
|
paramsConfigDataCountMap.put("value", map.getValue());
|
||||||
|
paramsConfigDataCountList.add(paramsConfigDataCountMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 排序 配置数据总数倒序排序
|
||||||
|
Collections.sort(paramsConfigDataCountList, new Comparator<Map<String, Object>>() {
|
||||||
|
@Override
|
||||||
|
public int compare(Map<String, Object> o1, Map<String, Object> o2) {
|
||||||
|
return o2.get("paramsConfigDataCount").toString().compareTo(o1.get("paramsConfigDataCount").toString());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 获取出最多行的配置列。
|
||||||
|
if (!paramsConfigDataCountList.isEmpty()) {
|
||||||
|
Map<String, Object> paramsConfigDataMaxCountMap = paramsConfigDataCountList.get(0);
|
||||||
|
String key = (String) paramsConfigDataMaxCountMap.get("key");
|
||||||
|
List<ParamsConfigDataEO> paramsConfigDataEOs = paramsConfigDataMap.get(key);
|
||||||
|
for (ParamsConfigDataEO paramsConfigDataEO : paramsConfigDataEOs) {
|
||||||
|
ParamsCollectManifestEO paramsCollectManifestEOTemp = new ParamsCollectManifestEO();
|
||||||
|
BeanUtils.copyProperties(collectManifestEO, paramsCollectManifestEOTemp);
|
||||||
|
exportDataList.add(paramsCollectManifestEOTemp);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
exportDataList.add(collectManifestEO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Map<String, String> isMustMap = ParamsIsMustEnum.toMapForExport(cut);
|
Map<String, String> isMustMap = ParamsIsMustEnum.toMapForExport(cut);
|
||||||
Map<String, String> controlVerifyMap = ControlVerifyEnum.toMapForExport(cut);
|
Map<String, String> controlVerifyMap = ControlVerifyEnum.toMapForExport(cut);
|
||||||
Map<String, String> controlTypeMap = ControlTypeEnum.toMapForExport(cut);
|
Map<String, String> controlTypeMap = ControlTypeEnum.toMapForExport(cut);
|
||||||
// 插入配置列和认证类别列数据
|
// 插入配置列和认证类别列数据
|
||||||
List<Map<String, Object>> result = new ArrayList<>();
|
List<Map<String, Object>> result = new ArrayList<>();
|
||||||
for (ParamsCollectManifestEO collectManifestEO: dataList) {
|
/*for (ParamsCollectManifestEO collectManifestEO: exportDataList) {
|
||||||
Map<String, Object> record1 = objectToMapDre(collectManifestEO);
|
Map<String, Object> record1 = objectToMapDre(collectManifestEO);
|
||||||
String controlType = (String) record1.get("control_type");
|
String controlType = (String) record1.get("control_type");
|
||||||
String controlVerify = (String) record1.get("control_verify");
|
String controlVerify = (String) record1.get("control_verify");
|
||||||
@@ -4496,6 +4688,169 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
result.add(record1);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
for (ParamsCollectManifestEO collectManifestEO : exportDataList) {
|
||||||
|
Map<String, Object> record1 = objectToMapDre(collectManifestEO);
|
||||||
|
String controlType = (String) record1.get("control_type");
|
||||||
|
String controlVerify = (String) record1.get("control_verify");
|
||||||
|
String isMust = (String) record1.get("is_must");
|
||||||
|
String paramsCollectManifestId = (String) record1.get("id");
|
||||||
|
String nioNumber = (String) record1.get("nio_number");
|
||||||
|
|
||||||
|
record1.put("is_must", isMustMap.get(isMust));
|
||||||
|
record1.put("control_type", controlTypeMap.get(controlType));
|
||||||
|
record1.put("control_verify", controlVerifyMap.get(controlVerify));
|
||||||
|
|
||||||
|
// 处理参考列,没引用过则不显示该列
|
||||||
|
if (StringUtils.isNotEmpty(paramsManifestEO.getReferencesColName()) && StringUtils.isNotEmpty(collectManifestEO.getReferencesCol())) {
|
||||||
|
List<String> referencesColList = Arrays.asList(collectManifestEO.getReferencesCol().split("#"));
|
||||||
|
StringBuilder referencesColBuilder = new StringBuilder();
|
||||||
|
if (!" ".equals(referencesColList.get(0))) {
|
||||||
|
referencesColBuilder.append(referencesColList.get(0)).append("#");
|
||||||
|
}
|
||||||
|
if (!" ".equals(referencesColList.get(1))) {
|
||||||
|
referencesColBuilder.append(referencesColList.get(1).replaceAll(",", "!")).append("#");
|
||||||
|
}
|
||||||
|
if (!" ".equals(referencesColList.get(2))) {
|
||||||
|
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(referencesColList.get(2));
|
||||||
|
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||||
|
referencesColBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName()).append("#");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String referencesCol = referencesColBuilder.toString();
|
||||||
|
if (referencesCol.endsWith("#")) {
|
||||||
|
referencesCol = referencesCol.substring(0, referencesCol.lastIndexOf("#"));
|
||||||
|
}
|
||||||
|
record1.put("references_col", referencesCol);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
record1.remove("references_col");
|
||||||
|
}
|
||||||
|
// 配置列
|
||||||
|
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
|
||||||
|
List<OSSFile> fileList = new ArrayList<>();
|
||||||
|
|
||||||
|
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
|
||||||
|
|
||||||
|
String paramsConfigId = paramsConfigEO.getId();
|
||||||
|
// 参数配置数据
|
||||||
|
List<ParamsConfigDataEO> paramsConfigDataEOS = paramsConfigDataEOList.stream().filter(e -> {
|
||||||
|
boolean flag = false;
|
||||||
|
// && StringUtils.equals(e.getId(),paramsConfigDataId)
|
||||||
|
if (paramsConfigId.equals(e.getParamsConfigId()) && paramsCollectManifestId.equals(e.getParamsCollectManifestId())) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||||
|
if (CollectionUtil.isNotEmpty(paramsConfigDataEOS)) {
|
||||||
|
ParamsConfigDataEO paramsConfigDataEO = paramsConfigDataEOS.get(0);
|
||||||
|
|
||||||
|
if (ControlTypeEnum.TEXT.getValue().equals(controlType)) {
|
||||||
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||||
|
configDataBuilder.append(paramsConfigDataEO.getTextData());
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (ControlTypeEnum.PULL_SINGLE.getValue().equals(controlType)
|
||||||
|
|| ControlTypeEnum.PULL_MORE.getValue().equals(controlType)) {
|
||||||
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||||
|
configDataBuilder.append(paramsConfigDataEO.getPullData().replaceAll(",", "!"));
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (ControlTypeEnum.FILE.getValue().equals(controlType)) {
|
||||||
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||||
|
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||||
|
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||||
|
configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName());
|
||||||
|
|
||||||
|
fileList.addAll(ossFileList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (ControlTypeEnum.TEXT_PULL_SINGLE.getValue().equals(controlType)
|
||||||
|
|| ControlTypeEnum.TEXT_PULL_MORE.getValue().equals(controlType)) {
|
||||||
|
|
||||||
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||||
|
configDataBuilder.append(paramsConfigDataEO.getTextData());
|
||||||
|
}
|
||||||
|
|
||||||
|
configDataBuilder.append("#");
|
||||||
|
|
||||||
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||||
|
configDataBuilder.append(paramsConfigDataEO.getPullData().replaceAll(",", "!"));
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)) {
|
||||||
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||||
|
configDataBuilder.append(paramsConfigDataEO.getTextData());
|
||||||
|
}
|
||||||
|
|
||||||
|
configDataBuilder.append("#");
|
||||||
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||||
|
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||||
|
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||||
|
configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName());
|
||||||
|
|
||||||
|
fileList.addAll(ossFileList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)
|
||||||
|
|| ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)) {
|
||||||
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||||
|
configDataBuilder.append(paramsConfigDataEO.getPullData().replaceAll(",", "!"));
|
||||||
|
}
|
||||||
|
|
||||||
|
configDataBuilder.append("#");
|
||||||
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||||
|
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||||
|
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||||
|
configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName());
|
||||||
|
|
||||||
|
fileList.addAll(ossFileList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||||
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||||
|
configDataBuilder.append(paramsConfigDataEO.getTextData());
|
||||||
|
}
|
||||||
|
configDataBuilder.append("#");
|
||||||
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||||
|
configDataBuilder.append(paramsConfigDataEO.getPullData().replaceAll(",", "!"));
|
||||||
|
}
|
||||||
|
configDataBuilder.append("#");
|
||||||
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||||
|
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||||
|
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||||
|
configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName());
|
||||||
|
|
||||||
|
fileList.addAll(ossFileList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
paramsConfigDataEOList.remove(paramsConfigDataEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
String configData = configDataBuilder.toString();
|
||||||
|
if (StringUtils.isNotEmpty(configData) && "".equals(configData.replace("#", ""))) {
|
||||||
|
configData = configData.replace("#", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
record1.put(paramsConfigEO.getId(), configData);
|
||||||
|
});
|
||||||
|
|
||||||
|
record1.put("fileList", fileList);
|
||||||
|
}
|
||||||
|
|
||||||
result.add(record1);
|
result.add(record1);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@@ -4570,6 +4925,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 将对象转Map
|
* 将对象转Map
|
||||||
|
*
|
||||||
* @param obj 待转对象
|
* @param obj 待转对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -4618,6 +4974,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 将对象转Map
|
* 将对象转Map
|
||||||
|
*
|
||||||
* @param obj 待转对象
|
* @param obj 待转对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -4941,7 +5298,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!verifyNioNumber.contains(nioNumber)) {
|
/*if (!verifyNioNumber.contains(nioNumber)) {
|
||||||
verifyNioNumber.add(nioNumber);
|
verifyNioNumber.add(nioNumber);
|
||||||
} else{
|
} else{
|
||||||
if (CutEnum.EN.getValue().equals(cut)) {
|
if (CutEnum.EN.getValue().equals(cut)) {
|
||||||
@@ -4952,7 +5309,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
countError ++;
|
countError ++;
|
||||||
stringMessage.add(errorMsg);
|
stringMessage.add(errorMsg);
|
||||||
continue;
|
continue;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
ParamsCollectManifestEO paramsCollectManifestEO = listPCM.get(0);
|
ParamsCollectManifestEO paramsCollectManifestEO = listPCM.get(0);
|
||||||
String state = paramsCollectManifestEO.getState();
|
String state = paramsCollectManifestEO.getState();
|
||||||
@@ -4984,6 +5341,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
&& key.equals(e.getParamsConfigId())).collect(Collectors.toList());
|
&& key.equals(e.getParamsConfigId())).collect(Collectors.toList());
|
||||||
if (CollectionUtil.isNotEmpty(list)) {
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
configDataEO.setId(list.get(0).getId());
|
configDataEO.setId(list.get(0).getId());
|
||||||
|
paramsConfigDataEOList.remove(list.get(0));
|
||||||
}
|
}
|
||||||
configDataEO.setParamsCollectManifestId(collectManifestMap.get(nioNumber));
|
configDataEO.setParamsCollectManifestId(collectManifestMap.get(nioNumber));
|
||||||
configDataEO.setParamsConfigId(key);
|
configDataEO.setParamsConfigId(key);
|
||||||
@@ -5305,8 +5663,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
countError++;
|
countError++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotEmpty(configDataEO.getId())) {
|
||||||
configDataList.add(configDataEO);
|
configDataList.add(configDataEO);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (countError > 0) {
|
if (countError > 0) {
|
||||||
stringMessage.add(errorMsg);
|
stringMessage.add(errorMsg);
|
||||||
@@ -5743,14 +6103,18 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
for (ParamsCollectManifestEO paramsCollectManifestEO : paramsCollectManifestEOList) {
|
for (ParamsCollectManifestEO paramsCollectManifestEO : paramsCollectManifestEOList) {
|
||||||
|
StringBuilder referencesColBuilder = new StringBuilder();
|
||||||
|
|
||||||
// 参考列值设置为空标识
|
// 参考列值设置为空标识
|
||||||
boolean referencesColIsNullFlag = true;
|
boolean referencesColIsNullFlag = true;
|
||||||
for (ParamsReportConfigDataEO paramsReportConfigDataEO : paramsReportConfigDataEOList) {
|
for (ParamsReportConfigDataEO paramsReportConfigDataEO : paramsReportConfigDataEOList) {
|
||||||
if (StringUtils.equals(paramsCollectManifestEO.getNioNumber(), paramsReportConfigDataEO.getNioNumber())) {
|
if (StringUtils.equals(paramsCollectManifestEO.getNioNumber(), paramsReportConfigDataEO.getNioNumber())) {
|
||||||
// 控件类型相同 才能引用
|
// 控件类型相同 才能引用
|
||||||
if (paramsCollectManifestEO.getControlType().equals(paramsReportConfigDataEO.getControlType())) {
|
if (paramsCollectManifestEO.getControlType().equals(paramsReportConfigDataEO.getControlType())) {
|
||||||
|
// 如果拼接不为空 则是匹配到了多个 拼接换行符 </br>
|
||||||
StringBuilder referencesColBuilder = new StringBuilder();
|
if (StringUtils.isNotEmpty(referencesColBuilder.toString())) {
|
||||||
|
referencesColBuilder.append("</br>");
|
||||||
|
}
|
||||||
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getTextData())) {
|
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getTextData())) {
|
||||||
referencesColBuilder.append(paramsReportConfigDataEO.getTextData()).append("#");
|
referencesColBuilder.append(paramsReportConfigDataEO.getTextData()).append("#");
|
||||||
} else {
|
} else {
|
||||||
@@ -5769,6 +6133,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
referencesColBuilder.append(" ").append("#");
|
referencesColBuilder.append(" ").append("#");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
referencesColIsNullFlag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String referencesCol = referencesColBuilder.toString();
|
String referencesCol = referencesColBuilder.toString();
|
||||||
ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO();
|
ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO();
|
||||||
|
|
||||||
@@ -5776,12 +6146,6 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
updateCollectManifestEO.setReferencesCol(referencesCol);
|
updateCollectManifestEO.setReferencesCol(referencesCol);
|
||||||
updateEOList.add(updateCollectManifestEO);
|
updateEOList.add(updateCollectManifestEO);
|
||||||
|
|
||||||
referencesColIsNullFlag = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (referencesColIsNullFlag) {
|
if (referencesColIsNullFlag) {
|
||||||
// 如果根据nio编号没有匹配到数据,将参考列的值设置为空
|
// 如果根据nio编号没有匹配到数据,将参考列的值设置为空
|
||||||
LambdaUpdateWrapper<ParamsCollectManifestEO> manifestUpdateWrap = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<ParamsCollectManifestEO> manifestUpdateWrap = new LambdaUpdateWrapper<>();
|
||||||
@@ -5817,19 +6181,27 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
for (Map<String, Object> map : configDataList) {
|
for (Map<String, Object> map : configDataList) {
|
||||||
String paramsCollectManifestId = (String) map.get("id");
|
String paramsCollectManifestId = (String) map.get("id");
|
||||||
|
|
||||||
|
StringBuilder referncesColBuilder = new StringBuilder();
|
||||||
|
|
||||||
// 添加配置数据
|
// 添加配置数据
|
||||||
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||||
StringBuilder referncesColBuilder = new StringBuilder();
|
|
||||||
if ("id".equals(entry.getKey())) {
|
if ("id".equals(entry.getKey())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取值
|
// 取值
|
||||||
Map<String, Object> paramsConfigDataMap = (Map<String, Object>) entry.getValue();
|
// Map<String, Object> paramsConfigDataMap = (Map<String, Object>) entry.getValue();
|
||||||
String controlType = (String) paramsConfigDataMap.get("controlType");
|
// String controlType = (String) paramsConfigDataMap.get("controlType");
|
||||||
// 无法转ParamsConfigDataVO(遍历会出现该异常 : LinkedHashMap cannot be cast to ParamsConfigDataVO)
|
// 无法转ParamsConfigDataVO(遍历会出现该异常 : LinkedHashMap cannot be cast to ParamsConfigDataVO)
|
||||||
List<Map<String, Object>> paramsConfigDataVOList = (List<Map<String, Object>>) paramsConfigDataMap.get("list");
|
List<Map<String, Object>> paramsConfigDataVOList = (List<Map<String, Object>>) entry.getValue();
|
||||||
if (CollectionUtil.isNotEmpty(paramsConfigDataVOList)) {
|
if (CollectionUtil.isNotEmpty(paramsConfigDataVOList)) {
|
||||||
|
|
||||||
|
// 如果拼接不为空 则是匹配到了多个 拼接换行符 </br>
|
||||||
|
if (StringUtils.isNotEmpty(referncesColBuilder.toString())) {
|
||||||
|
referncesColBuilder.append("</br>");
|
||||||
|
}
|
||||||
|
|
||||||
// TEXT
|
// TEXT
|
||||||
List<Map<String, Object>> textList = paramsConfigDataVOList.stream()
|
List<Map<String, Object>> textList = paramsConfigDataVOList.stream()
|
||||||
.filter(e -> e.get("type").equals(ConfigDataTypeEnum.TEXT.getValue())).collect(Collectors.toList());
|
.filter(e -> e.get("type").equals(ConfigDataTypeEnum.TEXT.getValue())).collect(Collectors.toList());
|
||||||
@@ -5904,6 +6276,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
String referencesCol = referncesColBuilder.toString();
|
String referencesCol = referncesColBuilder.toString();
|
||||||
if (StringUtils.isNotEmpty(referencesCol)) {
|
if (StringUtils.isNotEmpty(referencesCol)) {
|
||||||
ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO();
|
ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO();
|
||||||
@@ -5911,9 +6284,6 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
updateEO.setReferencesCol(referencesCol);
|
updateEO.setReferencesCol(referencesCol);
|
||||||
updateEOList.add(updateEO);
|
updateEOList.add(updateEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6059,6 +6429,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送变更消息
|
* 发送变更消息
|
||||||
|
*
|
||||||
* @param paramsCollectManifestMapList
|
* @param paramsCollectManifestMapList
|
||||||
* @param paramsManifestEO 清单信息
|
* @param paramsManifestEO 清单信息
|
||||||
* @param projectInfo
|
* @param projectInfo
|
||||||
@@ -6212,6 +6583,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建高级查询条件
|
* 创建高级查询条件
|
||||||
|
*
|
||||||
* @param queryConditionVOList
|
* @param queryConditionVOList
|
||||||
* @param sqlJoinSb
|
* @param sqlJoinSb
|
||||||
*/
|
*/
|
||||||
|
|||||||
+15
@@ -99,6 +99,21 @@ public class ParamsConfigDataEOServiceImpl extends ServiceImpl<ParamsConfigDataE
|
|||||||
return getOne(queryWrapper);
|
return getOne(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param paramsConfigId
|
||||||
|
* @param paramsCollectManifestId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ParamsConfigDataEO> queryListByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId) {
|
||||||
|
LambdaQueryWrapper<ParamsConfigDataEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ParamsConfigDataEO::getParamsConfigId, paramsConfigId);
|
||||||
|
queryWrapper.eq(ParamsConfigDataEO::getParamsCollectManifestId, paramsCollectManifestId);
|
||||||
|
return this.list(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
|
|||||||
+7
-2
@@ -43,6 +43,7 @@ import com.jero.modules.system.enums.DicCodeEnum;
|
|||||||
import com.jero.modules.system.mapper.SysDictMapper;
|
import com.jero.modules.system.mapper.SysDictMapper;
|
||||||
import com.jero.modules.system.service.ISysDictService;
|
import com.jero.modules.system.service.ISysDictService;
|
||||||
import com.jero.modules.system.service.ISysUserService;
|
import com.jero.modules.system.service.ISysUserService;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -700,8 +701,11 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
|||||||
|
|
||||||
// 配置数据: nio编号,控件类型,控件备选值,控件校验 均一致时 将清单参数项项复制到模板参数项,否则不复制
|
// 配置数据: nio编号,控件类型,控件备选值,控件校验 均一致时 将清单参数项项复制到模板参数项,否则不复制
|
||||||
for (ParamsConfigEO configEO : paramsConfigEOList) {
|
for (ParamsConfigEO configEO : paramsConfigEOList) {
|
||||||
ParamsConfigDataEO configDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId());
|
// ParamsConfigDataEO configDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId());
|
||||||
|
|
||||||
|
List<ParamsConfigDataEO> configDataEOList = this.paramsConfigDataEOService.queryListByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId());
|
||||||
|
if(CollectionUtils.isNotEmpty(configDataEOList)){
|
||||||
|
for (ParamsConfigDataEO configDataEO : configDataEOList) {
|
||||||
ParamsConfigDataEO addConfigDataEO = new ParamsConfigDataEO();
|
ParamsConfigDataEO addConfigDataEO = new ParamsConfigDataEO();
|
||||||
if (ObjectUtil.isNotEmpty(configDataEO)) {
|
if (ObjectUtil.isNotEmpty(configDataEO)) {
|
||||||
BeanUtils.copyProperties(configDataEO, addConfigDataEO);
|
BeanUtils.copyProperties(configDataEO, addConfigDataEO);
|
||||||
@@ -716,7 +720,8 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
|||||||
addConfigDataEO.setParamsCollectManifestId(addCollectManifestId);
|
addConfigDataEO.setParamsCollectManifestId(addCollectManifestId);
|
||||||
addConfigDataEOList.add(addConfigDataEO);
|
addConfigDataEOList.add(addConfigDataEO);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -22,6 +22,8 @@ public interface IParamsReportConfigDataEOService extends IService<ParamsReportC
|
|||||||
*/
|
*/
|
||||||
ParamsReportConfigDataEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
|
ParamsReportConfigDataEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
|
||||||
|
|
||||||
|
List<ParamsReportConfigDataEO> queryListByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
|
||||||
|
|
||||||
List<ParamsReportConfigDataEO> queryByConfigIdListAndCollectManifestId(List<String> paramsConfigIdList, String paramsCollectManifestId);
|
List<ParamsReportConfigDataEO> queryByConfigIdListAndCollectManifestId(List<String> paramsConfigIdList, String paramsCollectManifestId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+16
@@ -35,6 +35,22 @@ public class ParamsReportConfigDataEOServiceImpl extends ServiceImpl<ParamsRepor
|
|||||||
return getOne(queryWrapper);
|
return getOne(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param paramsConfigId
|
||||||
|
* @param paramsCollectManifestId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ParamsReportConfigDataEO> queryListByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId) {
|
||||||
|
LambdaQueryWrapper<ParamsReportConfigDataEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ParamsReportConfigDataEO::getParamsConfigId, paramsConfigId);
|
||||||
|
queryWrapper.eq(ParamsReportConfigDataEO::getParamsCollectManifestId, paramsCollectManifestId);
|
||||||
|
queryWrapper.orderByDesc(ParamsReportConfigDataEO::getOrderNum);
|
||||||
|
return this.list(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ParamsReportConfigDataEO> queryByConfigIdListAndCollectManifestId(List<String> paramsConfigIdList, String paramsCollectManifestId) {
|
public List<ParamsReportConfigDataEO> queryByConfigIdListAndCollectManifestId(List<String> paramsConfigIdList, String paramsCollectManifestId) {
|
||||||
return baseMapper.selectByConfigIdListAndCollectManifestId(paramsConfigIdList, paramsCollectManifestId);
|
return baseMapper.selectByConfigIdListAndCollectManifestId(paramsConfigIdList, paramsCollectManifestId);
|
||||||
|
|||||||
+175
-70
@@ -210,12 +210,38 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
|
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
|
||||||
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
|
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
|
||||||
Map<String, Object> configMap = new HashMap<>();
|
/*Map<String, Object> configMap = new HashMap<>();
|
||||||
String paramsConfigId = paramsConfigEO.getId();
|
String paramsConfigId = paramsConfigEO.getId();
|
||||||
ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
|
ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
|
||||||
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
|
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
|
||||||
configMap.put("controlType", controlType);
|
configMap.put("controlType", controlType);
|
||||||
configMap.put("list", paramsConfigDataVOList);
|
configMap.put("list", paramsConfigDataVOList);
|
||||||
|
manifestMap.put(paramsConfigEO.getId(), configMap);*/
|
||||||
|
|
||||||
|
Map<String,Object> paramsConfigDataVO = new HashMap<>();
|
||||||
|
Map<String, Object> configMap = new HashMap<>();
|
||||||
|
|
||||||
|
String paramsConfigId = paramsConfigEO.getId();
|
||||||
|
List<ParamsReportConfigDataEO> paramsConfigDataEOList = this.paramsReportConfigDataEOService.queryListByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
|
||||||
|
if(CollectionUtils.isNotEmpty(paramsConfigDataEOList)){
|
||||||
|
// 匿名比较器排序
|
||||||
|
Collections.sort(paramsConfigDataEOList, new Comparator<ParamsReportConfigDataEO>() {
|
||||||
|
@Override
|
||||||
|
public int compare(ParamsReportConfigDataEO p1, ParamsReportConfigDataEO p2) {
|
||||||
|
if(p2.getOrderNum() == null || p1.getOrderNum() == null){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return p1.getOrderNum().compareTo(p2.getOrderNum());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
for (ParamsReportConfigDataEO paramsConfigDataEO : paramsConfigDataEOList) {
|
||||||
|
List<ParamsConfigDataVO> paramsConfigDataVOList = this.getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
|
||||||
|
paramsConfigDataVO.put(paramsConfigDataEO.getId(),paramsConfigDataVOList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
configMap.put("paramsConfigData", paramsConfigDataVO);
|
||||||
|
configMap.put("controlType", controlType);
|
||||||
manifestMap.put(paramsConfigEO.getId(), configMap);
|
manifestMap.put(paramsConfigEO.getId(), configMap);
|
||||||
|
|
||||||
configIdList.add(paramsConfigEO.getId());
|
configIdList.add(paramsConfigEO.getId());
|
||||||
@@ -1319,14 +1345,20 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
if (ControlTypeEnum.Title.getValue().equals(controlType)) {
|
if (ControlTypeEnum.Title.getValue().equals(controlType)) {
|
||||||
record1.put(paramsConfigEO.getId(), titleDefaultValue);
|
record1.put(paramsConfigEO.getId(), titleDefaultValue);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
String paramsConfigId = paramsConfigEO.getId();
|
String paramsConfigId = paramsConfigEO.getId();
|
||||||
ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
|
List<ParamsReportConfigDataEO> paramsConfigDataEOList = this.paramsReportConfigDataEOService.queryListByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
|
||||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||||
|
if(CollectionUtils.isNotEmpty(paramsConfigDataEOList)){
|
||||||
|
for (ParamsReportConfigDataEO paramsConfigDataEO : paramsConfigDataEOList) {
|
||||||
|
|
||||||
|
StringBuilder configDataBuilderTemp = new StringBuilder(); // 重新组合配置数据
|
||||||
|
|
||||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||||
configDataBuilder.append(paramsConfigDataEO.getPullData()).append("#");
|
configDataBuilderTemp.append(paramsConfigDataEO.getPullData()).append("#");
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||||
configDataBuilder.append(paramsConfigDataEO.getTextData()).append("#");
|
configDataBuilderTemp.append(paramsConfigDataEO.getTextData()).append("#");
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||||
@@ -1335,28 +1367,37 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
String fileName = ossFileList.get(0).getFileName();
|
String fileName = ossFileList.get(0).getFileName();
|
||||||
String newFileName = isRepeat(fileListAll, ossFileList.get(0));
|
String newFileName = isRepeat(fileListAll, ossFileList.get(0));
|
||||||
if (!"".equals(newFileName) && !"old".equals(newFileName)) { // 文件名称重复 且文件内容不同
|
if (!"".equals(newFileName) && !"old".equals(newFileName)) { // 文件名称重复 且文件内容不同
|
||||||
configDataBuilder.append(newFileName).append("#");
|
configDataBuilderTemp.append(newFileName).append("#");
|
||||||
ossFileList.get(0).setFileName(newFileName);
|
ossFileList.get(0).setFileName(newFileName);
|
||||||
fileList.addAll(ossFileList);
|
fileList.addAll(ossFileList);
|
||||||
fileListAll.addAll(ossFileList);
|
fileListAll.addAll(ossFileList);
|
||||||
|
|
||||||
} else if ("old".equals(newFileName)) { // 文件名称重复 且文件内容相同
|
} else if ("old".equals(newFileName)) { // 文件名称重复 且文件内容相同
|
||||||
configDataBuilder.append(fileName).append("#");
|
configDataBuilderTemp.append(fileName).append("#");
|
||||||
fileList.addAll(ossFileList);
|
fileList.addAll(ossFileList);
|
||||||
} else {
|
} else {
|
||||||
configDataBuilder.append(fileName).append("#");
|
configDataBuilderTemp.append(fileName).append("#");
|
||||||
fileList.addAll(ossFileList);
|
fileList.addAll(ossFileList);
|
||||||
fileListAll.addAll(ossFileList);
|
fileListAll.addAll(ossFileList);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String configData = configDataBuilder.toString();
|
String configData = configDataBuilderTemp.toString();
|
||||||
if (configData.contains("#")) {
|
if (configData.contains("#")) {
|
||||||
configData = configData.substring(0, configData.lastIndexOf("#"));
|
configData = configData.substring(0, configData.lastIndexOf("#"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configDataBuilder.append(configData).append(paramsReportDetailVO.getSeparator());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String configData = configDataBuilder.toString();
|
||||||
|
if (configData.contains(paramsReportDetailVO.getSeparator())) {
|
||||||
|
configData = configData.substring(0, configData.lastIndexOf(paramsReportDetailVO.getSeparator()));
|
||||||
|
}
|
||||||
|
|
||||||
record1.put(paramsConfigEO.getId(), configData);
|
record1.put(paramsConfigEO.getId(), configData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1368,66 +1409,53 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
} else {
|
} else {
|
||||||
List<ParamsReportConfigDataEO> paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId);
|
List<ParamsReportConfigDataEO> paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId);
|
||||||
|
|
||||||
String textDatas = paramsReportConfigDataEOS.stream().filter(e -> StringUtils.isNotEmpty(e.getTextData()))
|
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||||
.map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator()));
|
|
||||||
|
|
||||||
String pullDatas = paramsReportConfigDataEOS.stream().filter(e -> StringUtils.isNotEmpty(e.getPullData()))
|
for (ParamsReportConfigDataEO paramsConfigDataEO : paramsReportConfigDataEOS) {
|
||||||
.map(ParamsReportConfigDataEO::getPullData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator()));
|
StringBuilder configDataBuilderTemp = new StringBuilder(); // 重新组合配置数据
|
||||||
|
|
||||||
List<String> fileNameList = new ArrayList<>();
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||||
for(ParamsReportConfigDataEO paramsReportConfigDataEO : paramsReportConfigDataEOS) {
|
configDataBuilderTemp.append(paramsConfigDataEO.getPullData()).append("#");
|
||||||
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) {
|
}
|
||||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId());
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||||
|
configDataBuilderTemp.append(paramsConfigDataEO.getTextData()).append("#");
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||||
|
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||||
// 合并导出时 验证文件名是否相同,相同进一步验证文件内容是否形同,不同时重命名文件
|
// 不合并导出时 验证文件名是否相同,相同进一步验证文件内容是否相同,不同时重命名文件
|
||||||
String fileName = ossFileList.get(0).getFileName();
|
String fileName = ossFileList.get(0).getFileName();
|
||||||
String newFileName = isRepeat(fileListAll, ossFileList.get(0));
|
String newFileName = isRepeat(fileListAll, ossFileList.get(0));
|
||||||
if (!"".equals(newFileName) && !"old".equals(newFileName)) { // 文件名称重复 且文件内容不同
|
if (!"".equals(newFileName) && !"old".equals(newFileName)) { // 文件名称重复 且文件内容不同
|
||||||
// 判断 新文件名是不是当前参数下 配置间的 重复
|
configDataBuilderTemp.append(newFileName).append("#");
|
||||||
int count = (int) fileList.stream().filter(e->newFileName.equals(e.getFileName())).count();
|
|
||||||
if (count <= 0) { // 不是 (如果是,不做任何操作)
|
|
||||||
fileNameList.add(newFileName);
|
|
||||||
ossFileList.get(0).setFileName(newFileName);
|
ossFileList.get(0).setFileName(newFileName);
|
||||||
fileList.addAll(ossFileList);
|
fileList.addAll(ossFileList);
|
||||||
fileListAll.addAll(ossFileList);
|
fileListAll.addAll(ossFileList);
|
||||||
}
|
|
||||||
|
|
||||||
} else if ("old".equals(newFileName)) { // 文件名称重复 且文件内容相同
|
} else if ("old".equals(newFileName)) { // 文件名称重复 且文件内容相同
|
||||||
|
configDataBuilderTemp.append(fileName).append("#");
|
||||||
// 判断这种重复是不是当前参数下 配置间的
|
fileList.addAll(ossFileList);
|
||||||
int count = (int) fileList.stream().filter(e->fileName.equals(e.getFileName())).count();
|
} else {
|
||||||
if (count <= 0) { // 不是 (如果是,不做任何操作)
|
configDataBuilderTemp.append(fileName).append("#");
|
||||||
fileNameList.add(fileName);
|
|
||||||
fileList.addAll(ossFileList);
|
fileList.addAll(ossFileList);
|
||||||
fileListAll.addAll(ossFileList);
|
fileListAll.addAll(ossFileList);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else { // 文件名称不重复
|
|
||||||
fileNameList.add(fileName);
|
|
||||||
fileList.addAll(ossFileList);
|
|
||||||
fileListAll.addAll(ossFileList);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
configData = configDataBuilderTemp.toString();
|
||||||
if (StringUtils.isNotEmpty(pullDatas)) {
|
|
||||||
configDataBuilder.append(pullDatas).append("#");
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotEmpty(textDatas)) {
|
|
||||||
configDataBuilder.append(textDatas).append("#");
|
|
||||||
}
|
|
||||||
if (CollectionUtil.isNotEmpty(fileNameList)) {
|
|
||||||
// fileNameList = fileNameList.stream().distinct().collect(Collectors.toList());
|
|
||||||
configDataBuilder.append(StringUtils.join(fileNameList, paramsReportDetailVO.getSeparator())).append("#");
|
|
||||||
}
|
|
||||||
configData = configDataBuilder.toString();
|
|
||||||
if (configData.contains("#")) {
|
if (configData.contains("#")) {
|
||||||
configData = configData.substring(0, configData.lastIndexOf("#"));
|
configData = configData.substring(0, configData.lastIndexOf("#"));
|
||||||
}
|
}
|
||||||
record1.put("params_value", configData);
|
|
||||||
|
configDataBuilder.append(configData).append(paramsReportDetailVO.getSeparator());
|
||||||
|
}
|
||||||
|
|
||||||
|
String configDataStr = configDataBuilder.toString();
|
||||||
|
if (configDataStr.contains(paramsReportDetailVO.getSeparator())) {
|
||||||
|
configDataStr = configDataStr.substring(0, configDataStr.lastIndexOf(paramsReportDetailVO.getSeparator()));
|
||||||
|
}
|
||||||
|
record1.put("params_value", configDataStr);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1473,6 +1501,18 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
String configData = "";
|
String configData = "";
|
||||||
List<ParamsReportConfigDataEO> paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId);
|
List<ParamsReportConfigDataEO> paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId);
|
||||||
|
|
||||||
|
// 匿名比较器排序
|
||||||
|
Collections.sort(paramsReportConfigDataEOS, new Comparator<ParamsReportConfigDataEO>() {
|
||||||
|
@Override
|
||||||
|
public int compare(ParamsReportConfigDataEO p1, ParamsReportConfigDataEO p2) {
|
||||||
|
if(p2.getOrderNum() == null || p1.getOrderNum() == null){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// 倒序
|
||||||
|
return p2.getOrderNum().compareTo(p1.getOrderNum());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
String textDatas = paramsReportConfigDataEOS.stream().filter(e->StringUtils.isNotEmpty(e.getTextData()))
|
String textDatas = paramsReportConfigDataEOS.stream().filter(e->StringUtils.isNotEmpty(e.getTextData()))
|
||||||
.map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); // 整合文本数据
|
.map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); // 整合文本数据
|
||||||
|
|
||||||
@@ -1777,34 +1817,36 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
ParamsReportConfigDataEO paramsReportConfigDataEO = new ParamsReportConfigDataEO();
|
|
||||||
// 取值
|
// 取值
|
||||||
String paramsReportConfigEOId = entry.getKey();
|
String paramsReportConfigEOId = entry.getKey();
|
||||||
ParamsReportConfigEO paramsReportConfigEO = paramsReportConfigEOService.getById(paramsReportConfigEOId);
|
ParamsReportConfigEO paramsReportConfigEO = paramsReportConfigEOService.getById(paramsReportConfigEOId);
|
||||||
Map<String, Object> paramsReportConfigDataMap = (Map<String, Object>) entry.getValue();
|
Map<String, Object> paramsReportConfigDataMap = (Map<String, Object>) entry.getValue();
|
||||||
// 无法转ParamsConfigDataVO(遍历会出现该异常 : LinkedHashMap cannot be cast to ParamsConfigDataVO)
|
// 无法转ParamsConfigDataVO(遍历会出现该异常 : LinkedHashMap cannot be cast to ParamsConfigDataVO)
|
||||||
List<Map<String, Object>> configDataVOList = (List<Map<String, Object>>) paramsReportConfigDataMap.get("list");
|
// List<Map<String, Object>> configDataVOList = (List<Map<String, Object>>) paramsReportConfigDataMap.get("list");
|
||||||
|
|
||||||
// 判断是新增还是修改
|
|
||||||
ParamsConfigDataEO oldConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsReportConfigEOId, paramsCollectManifestId, paramsReportConfigDataEOList);
|
|
||||||
if (ObjectUtil.isNotEmpty(oldConfigDataEO)) {
|
|
||||||
paramsReportConfigDataEO.setId(oldConfigDataEO.getId());
|
|
||||||
}
|
|
||||||
//******************配置2被添加了**********************
|
|
||||||
logCnContent.append(paramsReportConfigEO.getConfigName()).append("的");
|
|
||||||
logEnContent.append(paramsReportConfigEO.getConfigName());
|
|
||||||
configNameCn = paramsReportConfigEO.getConfigName()+"的";
|
|
||||||
configNameEn = paramsReportConfigEO.getConfigName();
|
|
||||||
|
|
||||||
paramsReportConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
|
Map<String, Object> paramsConfigDataVOMap = (Map<String, Object>) paramsReportConfigDataMap.get("paramsConfigData");
|
||||||
paramsReportConfigDataEO.setParamsConfigId(paramsReportConfigEOId);
|
|
||||||
|
for (Map.Entry<String, Object> paramsConfigDataMap : paramsConfigDataVOMap.entrySet()) {
|
||||||
|
String configDataId = paramsConfigDataMap.getKey();
|
||||||
|
List<Map<String, Object>> configDataVOList = (List<Map<String, Object>>) paramsConfigDataMap.getValue();
|
||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(configDataVOList)) {
|
if (CollectionUtil.isNotEmpty(configDataVOList)) {
|
||||||
|
Integer orderNum = (Integer) configDataVOList.get(0).get("orderNum");
|
||||||
|
|
||||||
|
ParamsReportConfigDataEO paramsReportConfigDataEO = new ParamsReportConfigDataEO();
|
||||||
|
paramsReportConfigDataEO.setOrderNum(orderNum);
|
||||||
for (Map<String, Object> paramsConfigDataVO : configDataVOList) {
|
for (Map<String, Object> paramsConfigDataVO : configDataVOList) {
|
||||||
String type = (String) paramsConfigDataVO.get("type");
|
String type = (String) paramsConfigDataVO.get("type");
|
||||||
String dataValue = (String) paramsConfigDataVO.get("dataValue");
|
String dataValue = (String) paramsConfigDataVO.get("dataValue");
|
||||||
|
|
||||||
|
// 判断是新增还是修改
|
||||||
|
ParamsConfigDataEO oldConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsReportConfigEOId, paramsCollectManifestId, paramsReportConfigDataEOList,configDataId);
|
||||||
|
if (ObjectUtil.isNotEmpty(oldConfigDataEO)) {
|
||||||
|
paramsReportConfigDataEO.setId(oldConfigDataEO.getId());
|
||||||
|
|
||||||
if (type.equals(ConfigDataTypeEnum.TEXT.getValue())) {
|
if (type.equals(ConfigDataTypeEnum.TEXT.getValue())) {
|
||||||
paramsReportConfigDataEO.setTextData(dataValue);
|
// paramsReportConfigDataEO.setTextData(dataValue);
|
||||||
if (StringUtils.isEmpty(oldConfigDataEO.getTextData()) && StringUtils.isNotEmpty(dataValue)) {
|
if (StringUtils.isEmpty(oldConfigDataEO.getTextData()) && StringUtils.isNotEmpty(dataValue)) {
|
||||||
logCnContent.append("\"").append("空").append("\"").append("改为").append("\"").append(dataValue).append("\"").append(",");
|
logCnContent.append("\"").append("空").append("\"").append("改为").append("\"").append(dataValue).append("\"").append(",");
|
||||||
logEnContent.append(" from ").append("\"").append("Null").append("\"").append(" to ").append("\"").append(dataValue).append("\"").append(", ");
|
logEnContent.append(" from ").append("\"").append("Null").append("\"").append(" to ").append("\"").append(dataValue).append("\"").append(", ");
|
||||||
@@ -1824,7 +1866,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
|
|
||||||
} else if (type.equals(ConfigDataTypeEnum.PULL.getValue())
|
} else if (type.equals(ConfigDataTypeEnum.PULL.getValue())
|
||||||
|| type.equals(ConfigDataTypeEnum.PULL_MORE.getValue())) {
|
|| type.equals(ConfigDataTypeEnum.PULL_MORE.getValue())) {
|
||||||
paramsReportConfigDataEO.setPullData(dataValue);
|
// paramsReportConfigDataEO.setPullData(dataValue);
|
||||||
|
|
||||||
if (StringUtils.isEmpty(oldConfigDataEO.getPullData()) && StringUtils.isNotEmpty(dataValue)) {
|
if (StringUtils.isEmpty(oldConfigDataEO.getPullData()) && StringUtils.isNotEmpty(dataValue)) {
|
||||||
logCnContent.append("\"").append("空").append("\"").append("改为").append("\"").append(dataValue).append("\"").append(",");
|
logCnContent.append("\"").append("空").append("\"").append("改为").append("\"").append(dataValue).append("\"").append(",");
|
||||||
@@ -1879,7 +1921,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
newFileNames = ossFileService.getFileInfosByConnectId(connectId).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
newFileNames = ossFileService.getFileInfosByConnectId(connectId).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
paramsReportConfigDataEO.setFileConnectId(dataValue);
|
// paramsReportConfigDataEO.setFileConnectId(dataValue);
|
||||||
if (StringUtils.isEmpty(oldConfigDataEO.getFileConnectId()) && StringUtils.isNotEmpty(dataValue)) {
|
if (StringUtils.isEmpty(oldConfigDataEO.getFileConnectId()) && StringUtils.isNotEmpty(dataValue)) {
|
||||||
logCnContent.append("\"").append("空").append("\"").append("改为").append("\"").append(newFileNames).append("\"").append(",");
|
logCnContent.append("\"").append("空").append("\"").append("改为").append("\"").append(newFileNames).append("\"").append(",");
|
||||||
logEnContent.append(" from ").append("\"").append("Null").append("\"").append(" to ").append("\"").append(newFileNames).append("\"").append(", ");
|
logEnContent.append(" from ").append("\"").append("Null").append("\"").append(" to ").append("\"").append(newFileNames).append("\"").append(", ");
|
||||||
@@ -1904,8 +1946,72 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (type.equals(ConfigDataTypeEnum.TEXT.getValue())) {
|
||||||
|
|
||||||
|
paramsReportConfigDataEO.setTextData(dataValue);
|
||||||
|
} else if (type.equals(ConfigDataTypeEnum.PULL.getValue())
|
||||||
|
|| type.equals(ConfigDataTypeEnum.PULL_MORE.getValue())) {
|
||||||
|
|
||||||
|
paramsReportConfigDataEO.setPullData(dataValue);
|
||||||
|
} else if (type.equals(ConfigDataTypeEnum.FILE.getValue())) {
|
||||||
|
String newFileNames = "";
|
||||||
|
if (StringUtils.isNotEmpty(dataValue) && dataValue.contains(",")) { // 新加多个文件. 目前没用到这段代码
|
||||||
|
// 处理文件connectId
|
||||||
|
String[] fileIdList = dataValue.split(",");
|
||||||
|
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(fileIdList[0]);
|
||||||
|
if(CollectionUtil.isEmpty(ossFiles)) { // 新加了一个文件
|
||||||
|
String connectId = UUID.randomUUID().toString().replace("-", "");
|
||||||
|
List<OSSFile> updateFileList = new ArrayList<>();
|
||||||
|
for (int i = 0; i < fileIdList.length; i++) {
|
||||||
|
OSSFile ossFile = new OSSFile();
|
||||||
|
ossFile.setId(fileIdList[i]);
|
||||||
|
ossFile.setConnectId(connectId);
|
||||||
|
updateFileList.add(ossFile);
|
||||||
}
|
}
|
||||||
|
ossFileService.updateBatchById(updateFileList);
|
||||||
|
dataValue = connectId;
|
||||||
|
newFileNames = ossFileService.getFileInfosByConnectId(connectId).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||||
|
}
|
||||||
|
} else if (StringUtils.isNotEmpty(dataValue) && !dataValue.contains(",")) {
|
||||||
|
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(dataValue);
|
||||||
|
if(CollectionUtil.isEmpty(ossFiles)){ // 新加了一个文件
|
||||||
|
String connectId = UUID.randomUUID().toString().replace("-", "");
|
||||||
|
//修改文件表关联信息connect_id
|
||||||
|
List<OSSFile> oSSFileList = new ArrayList<>();
|
||||||
|
for (String fileId : dataValue.split(",")) {
|
||||||
|
OSSFile ossFile = new OSSFile();
|
||||||
|
ossFile.setId(fileId);
|
||||||
|
ossFile.setConnectId(connectId);
|
||||||
|
oSSFileList.add(ossFile);
|
||||||
|
}
|
||||||
|
ossFileService.updateFileInfo(oSSFileList);
|
||||||
|
dataValue = connectId;
|
||||||
|
newFileNames = ossFileService.getFileInfosByConnectId(connectId).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
paramsReportConfigDataEO.setFileConnectId(dataValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryWrapper<ParamsReportConfigDataEO> removeConfigDataWrap = new QueryWrapper<>();
|
||||||
|
removeConfigDataWrap.lambda().eq(ParamsReportConfigDataEO::getParamsConfigId,paramsReportConfigEOId);
|
||||||
|
removeConfigDataWrap.lambda().eq(ParamsReportConfigDataEO::getParamsCollectManifestId,paramsCollectManifestId);
|
||||||
|
this.paramsReportConfigDataEOService.remove(removeConfigDataWrap);
|
||||||
|
|
||||||
|
paramsReportConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
|
||||||
|
paramsReportConfigDataEO.setParamsConfigId(paramsReportConfigEOId);
|
||||||
|
|
||||||
newConfigDataEOList.add(paramsReportConfigDataEO);
|
newConfigDataEOList.add(paramsReportConfigDataEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
logCnContent.append(paramsReportConfigEO.getConfigName()).append("的");
|
||||||
|
logEnContent.append(paramsReportConfigEO.getConfigName());
|
||||||
|
|
||||||
//******************这里是当前配置的循环结束了******************
|
//******************这里是当前配置的循环结束了******************
|
||||||
//判断结尾是不是该配置的名字--如果是(说明该配置没有被改变)需要从logCnContent中删除该配置名字
|
//判断结尾是不是该配置的名字--如果是(说明该配置没有被改变)需要从logCnContent中删除该配置名字
|
||||||
@@ -1966,14 +2072,13 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
if (CollectionUtil.isNotEmpty(insertLogEOList)) {
|
if (CollectionUtil.isNotEmpty(insertLogEOList)) {
|
||||||
paramsReportDetailLogEOService.saveBatch(insertLogEOList);
|
paramsReportDetailLogEOService.saveBatch(insertLogEOList);
|
||||||
}
|
}
|
||||||
return paramsReportConfigDataEOService.saveOrUpdateBatch(newConfigDataEOList);
|
return paramsReportConfigDataEOService.saveBatch(newConfigDataEOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private ParamsReportConfigDataEO getConfigDataEOByConfigIdAndCollectManifestId(String configId, String collectManifestId, List<ParamsReportConfigDataEO> paramsReportConfigDataEOList,String configDataId) {
|
||||||
private ParamsReportConfigDataEO getConfigDataEOByConfigIdAndCollectManifestId(String configId, String collectManifestId, List<ParamsReportConfigDataEO> paramsReportConfigDataEOList) {
|
|
||||||
List<ParamsReportConfigDataEO> configDataEOList = paramsReportConfigDataEOList.stream()
|
List<ParamsReportConfigDataEO> configDataEOList = paramsReportConfigDataEOList.stream()
|
||||||
.filter(e-> configId.equals(e.getParamsConfigId()) && collectManifestId.equals(e.getParamsCollectManifestId()))
|
.filter(e-> configId.equals(e.getParamsConfigId()) && collectManifestId.equals(e.getParamsCollectManifestId()) && StringUtils.equals(configDataId,e.getId()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (CollectionUtil.isNotEmpty(configDataEOList)) {
|
if (CollectionUtil.isNotEmpty(configDataEOList)) {
|
||||||
return configDataEOList.get(0);
|
return configDataEOList.get(0);
|
||||||
|
|||||||
+66
@@ -29,6 +29,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -55,6 +56,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ICertCategoryParamsInfoEOService certCategoryParamsInfoEOService;
|
private ICertCategoryParamsInfoEOService certCategoryParamsInfoEOService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
@@ -338,4 +340,68 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
return paramsInfoEOService.importParamsInfo(file, cut, paramsTemplateId);
|
return paramsInfoEOService.importParamsInfo(file, cut, paramsTemplateId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自动添加测试数据接口
|
||||||
|
* @param json
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/test/autoAddTestData")
|
||||||
|
public Result<?> autoAddTestData(@RequestBody JSONObject json) {
|
||||||
|
//TODO 测试接口
|
||||||
|
String certCategory = json.getString("certCategory");
|
||||||
|
String certCategoryType = json.getString("certCategoryType"); // gg、3c、yy、hb
|
||||||
|
String controlType = json.getString("controlType");
|
||||||
|
String controlVerify = json.getString("controlVerify");
|
||||||
|
String cut = json.getString("cut");
|
||||||
|
String dutyTerritory = json.getString("dutyTerritory");
|
||||||
|
String isMust = json.getString("isMust");
|
||||||
|
String nioNumber = json.getString("nioNumber");
|
||||||
|
String paramsBatch = json.getString("paramsBatch");
|
||||||
|
String paramsName = json.getString("paramsName");
|
||||||
|
String paramsTemplateId = json.getString("paramsTemplateId");
|
||||||
|
if (StringUtils.isEmpty(certCategory)) {
|
||||||
|
return Result.error("认证类别不能为空!");
|
||||||
|
}
|
||||||
|
boolean isSuccess = false;
|
||||||
|
|
||||||
|
Integer startIndex = json.getInteger("startIndex");
|
||||||
|
Integer endIndex = json.getInteger("endIndex");
|
||||||
|
for (Integer i = 0; i < endIndex; i++) {
|
||||||
|
ParamsInfoEO paramsInfoEO = new ParamsInfoEO();
|
||||||
|
paramsInfoEO.setNioNumber(nioNumber + "-" + String.format("%04d",startIndex + i));
|
||||||
|
paramsInfoEO.setParamsName(paramsName + "-" + String.format("%04d",startIndex + i) + "名称");
|
||||||
|
paramsInfoEO.setCertCategory(certCategory);
|
||||||
|
paramsInfoEO.setControlType(controlType);
|
||||||
|
paramsInfoEO.setControlVerify(controlVerify);
|
||||||
|
paramsInfoEO.setCut(cut);
|
||||||
|
paramsInfoEO.setDutyTerritory(dutyTerritory);
|
||||||
|
paramsInfoEO.setIsMust(isMust);
|
||||||
|
paramsInfoEO.setParamsBatch(paramsBatch);
|
||||||
|
paramsInfoEO.setParamsTemplateId(paramsTemplateId);
|
||||||
|
|
||||||
|
List<CertCategoryParamsInfoEO> certCategoryParamsInfoEOList = new ArrayList<>();
|
||||||
|
CertCategoryParamsInfoEO certCategoryParamsInfoEO = new CertCategoryParamsInfoEO();
|
||||||
|
certCategoryParamsInfoEO.setCertCategory(certCategory);
|
||||||
|
certCategoryParamsInfoEO.setParamsName(paramsName + "-" + String.format("%04d",startIndex + i) + "-" + certCategoryType + "-" + "name");
|
||||||
|
certCategoryParamsInfoEO.setParamsNumber(nioNumber + "-" + String.format("%04d",startIndex + i) + "-" + certCategoryType);
|
||||||
|
certCategoryParamsInfoEOList.add(certCategoryParamsInfoEO);
|
||||||
|
paramsInfoEO.setCertCategoryParamsInfoEOList(certCategoryParamsInfoEOList);
|
||||||
|
|
||||||
|
isSuccess = paramsInfoEOService.add(paramsInfoEO);
|
||||||
|
|
||||||
|
if(!isSuccess){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (isSuccess) {
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
} else {
|
||||||
|
return Result.error("添加失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -106,7 +106,7 @@ public class ParamsInfoEO implements Serializable {
|
|||||||
private String certCategory;
|
private String certCategory;
|
||||||
|
|
||||||
/**控件类型*/
|
/**控件类型*/
|
||||||
@Excel(name = "*控件类型", width = 15, replace = {"文本_1","下拉单选_2","下拉多选_3","附件_4","文本+下拉单选_5","文本+下拉多选_6","文本+附件_7","下拉单选+附件_8","下拉多选+附件_9","文本+下拉单选+附件_10","标题_11"})
|
@Excel(name = "*控件类型", width = 15, replace = {"文本_1","下拉单选_2","下拉多选_3","附件_4","下拉单选+文本_5","下拉多选+文本_6","文本+附件_7","下拉单选+附件_8","下拉多选+附件_9","下拉单选+文本+附件_10","标题_11"})
|
||||||
@ApiModelProperty(value = "控件类型")
|
@ApiModelProperty(value = "控件类型")
|
||||||
private String controlType;
|
private String controlType;
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -15,12 +15,12 @@ public enum ControlTypeEnum {
|
|||||||
PULL_SINGLE("下拉单选","Pull single","2"),
|
PULL_SINGLE("下拉单选","Pull single","2"),
|
||||||
PULL_MORE("下拉多选","Pull more","3"),
|
PULL_MORE("下拉多选","Pull more","3"),
|
||||||
FILE("附件","File","4"),
|
FILE("附件","File","4"),
|
||||||
TEXT_PULL_SINGLE("文本+下拉单选","Text+Pull single","5"),
|
TEXT_PULL_SINGLE("下拉单选+文本","Pull single+Text","5"),
|
||||||
TEXT_PULL_MORE("文本+下拉多选","Text+Pull more","6"),
|
TEXT_PULL_MORE("下拉多选+文本","Pull more+Text","6"),
|
||||||
TEXT_FILE("文本+附件","Text+File","7"),
|
TEXT_FILE("文本+附件","Text+File","7"),
|
||||||
PULL_SINGLE_FILE("下拉单选+附件","Pull single+File","8"),
|
PULL_SINGLE_FILE("下拉单选+附件","Pull single+File","8"),
|
||||||
PULL_MORE_FILE("下拉多选+附件","Pull more+File","9"),
|
PULL_MORE_FILE("下拉多选+附件","Pull more+File","9"),
|
||||||
TEXT_PULL_SINGLE_FILE("文本+下拉单选+附件","Text+Pull single+File","10"),
|
TEXT_PULL_SINGLE_FILE("下拉单选+文本+附件","Pull single+Text+File","10"),
|
||||||
Title("标题","Title","11");
|
Title("标题","Title","11");
|
||||||
|
|
||||||
String name;
|
String name;
|
||||||
|
|||||||
@@ -1088,12 +1088,12 @@ module.exports = {
|
|||||||
NDropdownradio: 'Pull single',
|
NDropdownradio: 'Pull single',
|
||||||
NDropdownmultipleselection: 'Pull more',
|
NDropdownmultipleselection: 'Pull more',
|
||||||
Nenclosure: 'File',
|
Nenclosure: 'File',
|
||||||
Atext: 'Text+Pull single',
|
Atext: 'Pull single+Text',
|
||||||
Btext: 'Text+Pull more',
|
Btext: 'Pull more+Text',
|
||||||
Ctext: 'Text+File',
|
Ctext: 'Text+File',
|
||||||
Dtext: 'Pull single+File',
|
Dtext: 'Pull single+File',
|
||||||
Etext: 'Pull more+File',
|
Etext: 'Pull more+File',
|
||||||
Ftext: 'Text+Pull single+File',
|
Ftext: 'Pull single+Text+File',
|
||||||
Gtext: 'Title',
|
Gtext: 'Title',
|
||||||
Nnothing: 'Null',
|
Nnothing: 'Null',
|
||||||
Nchinese: 'Chinese',
|
Nchinese: 'Chinese',
|
||||||
@@ -1663,5 +1663,12 @@ module.exports = {
|
|||||||
project:'Project',
|
project:'Project',
|
||||||
Categoryofdeliverables:'Category of deliverables',
|
Categoryofdeliverables:'Category of deliverables',
|
||||||
Taskconfirmationresult:'Task confirmation result',
|
Taskconfirmationresult:'Task confirmation result',
|
||||||
Compliancetaskhandling:'Compliance task handling'
|
Compliancetaskhandling:'Compliance task handling',
|
||||||
|
theDataYouSelectedContainsSkip:'The data you selected contains data with a blank deliverable type;Please confirm whether to skip',
|
||||||
|
designComplianceProcessFor:'Design compliance process for',
|
||||||
|
validationComplianceProcessFor:'Validation compliance process for',
|
||||||
|
thePersonResponsibleForVerifyingEmpty:'The person responsible for verifying the compliance process cannot be empty',
|
||||||
|
theDeadlineComplianceProcessCannotEmpty:'The deadline for the validation compliance process cannot be empty',
|
||||||
|
theDeadlineForTheDesignCannotBeEmpty:'The deadline for the design compliance process cannot be empty',
|
||||||
|
thePersonResponsibleForDesignCannotBeBlank:'The person responsible for designing the compliance process cannot be empty',
|
||||||
}
|
}
|
||||||
@@ -1100,12 +1100,12 @@ module.exports = {
|
|||||||
NDropdownradio: '下拉单选',
|
NDropdownradio: '下拉单选',
|
||||||
NDropdownmultipleselection: '下拉多选',
|
NDropdownmultipleselection: '下拉多选',
|
||||||
Nenclosure: '附件',
|
Nenclosure: '附件',
|
||||||
Atext: '文本+下拉单选',
|
Atext: '下拉单选+文本',
|
||||||
Btext: '文本+下拉多选',
|
Btext: '下拉多选+文本',
|
||||||
Ctext: '文本+附件',
|
Ctext: '文本+附件',
|
||||||
Dtext: '下拉单选+附件',
|
Dtext: '下拉单选+附件',
|
||||||
Etext: '下拉多选+附件',
|
Etext: '下拉多选+附件',
|
||||||
Ftext: '文本+下拉单选+附件',
|
Ftext: '下拉单选+文本+附件',
|
||||||
Gtext: '标题',
|
Gtext: '标题',
|
||||||
Nnothing: '无',
|
Nnothing: '无',
|
||||||
Nchinese: '中文',
|
Nchinese: '中文',
|
||||||
@@ -1762,7 +1762,12 @@ module.exports = {
|
|||||||
taskname:'任务名称',
|
taskname:'任务名称',
|
||||||
updatereleasetime:'升级发布时间',
|
updatereleasetime:'升级发布时间',
|
||||||
upgradeplanexpirationtime:'升级计划截止时间',
|
upgradeplanexpirationtime:'升级计划截止时间',
|
||||||
|
theDataYouSelectedContainsSkip:'您所勾选的数据中包含交付物类型为空的数据;请确认是否跳过',
|
||||||
|
designComplianceProcessFor:'的设计符合性流程',
|
||||||
|
validationComplianceProcessFor:'的验证符合性流程',
|
||||||
|
thePersonResponsibleForVerifyingEmpty:'验证符合性流程的责任人不能为空',
|
||||||
|
theDeadlineComplianceProcessCannotEmpty:'验证符合性流程的截止时间不能为空',
|
||||||
|
theDeadlineForTheDesignCannotBeEmpty:'设计符合性流程的截止时间不能为空',
|
||||||
|
thePersonResponsibleForDesignCannotBeBlank:'设计符合性流程的责任人不能为空',
|
||||||
|
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -75,7 +75,10 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span slot="detailClick" slot-scope="text,record">
|
<span slot="detailClick" slot-scope="text,record">
|
||||||
<collection-type :detailDate='text'/>
|
<collection-type :detailDate='text' :recordList = 'record' :columName='content'
|
||||||
|
:currentPersonRole="currentPersonRole"
|
||||||
|
@consolidateData="consolidateData"
|
||||||
|
@collectionForm='collectionForm'/>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -725,6 +728,13 @@
|
|||||||
this.pageNohistory = 1
|
this.pageNohistory = 1
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
|
collectionForm(){
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
consolidateData(){
|
||||||
|
this.dataSource = [...this.dataSource]
|
||||||
|
console.log(this.dataSource)
|
||||||
|
},
|
||||||
getAndUserId(result) {
|
getAndUserId(result) {
|
||||||
let query = {
|
let query = {
|
||||||
paramsManifestId: this.$route.query.id,
|
paramsManifestId: this.$route.query.id,
|
||||||
@@ -785,7 +795,7 @@
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
sorter: res.sort,
|
sorter: res.sort,
|
||||||
width: 500
|
width: 600
|
||||||
})
|
})
|
||||||
num++
|
num++
|
||||||
this.content.push(res)
|
this.content.push(res)
|
||||||
@@ -793,6 +803,7 @@
|
|||||||
customRender: 'detailClick',
|
customRender: 'detailClick',
|
||||||
title: 'titleName' + num
|
title: 'titleName' + num
|
||||||
}
|
}
|
||||||
|
console.log( this.content," this.content this.content this.content this.content this.content")
|
||||||
// 非配置列
|
// 非配置列
|
||||||
} else {
|
} else {
|
||||||
this.columns.push({
|
this.columns.push({
|
||||||
@@ -857,6 +868,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getTableListReset() {
|
getTableListReset() {
|
||||||
|
|
||||||
this.formInline = {}
|
this.formInline = {}
|
||||||
this.queryParamQuery = {}
|
this.queryParamQuery = {}
|
||||||
let params = {
|
let params = {
|
||||||
@@ -888,14 +900,25 @@
|
|||||||
if (this.currentPersonRole !== 'dre') {
|
if (this.currentPersonRole !== 'dre') {
|
||||||
res.result.records.forEach((Obj) => {
|
res.result.records.forEach((Obj) => {
|
||||||
Object.keys(Obj).forEach((item) => {
|
Object.keys(Obj).forEach((item) => {
|
||||||
|
|
||||||
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
||||||
Obj[item].list.forEach((itemLi) => {
|
for (const key in Obj[item].paramsConfigData){
|
||||||
|
Obj[item].paramsConfigData[key].forEach((itemLi) =>
|
||||||
|
{
|
||||||
|
|
||||||
itemLi.isLock = 1
|
itemLi.isLock = 1
|
||||||
if (itemLi.type === 'pull_more') {
|
if (itemLi.type === 'pull_more') {
|
||||||
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
|
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// Obj[item].list.forEach((itemLi) => {
|
||||||
|
// itemLi.isLock = 1
|
||||||
|
// if (itemLi.type === 'pull_more') {
|
||||||
|
// itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
}
|
||||||
})
|
})
|
||||||
tt.push(Obj)
|
tt.push(Obj)
|
||||||
})
|
})
|
||||||
@@ -903,12 +926,19 @@
|
|||||||
res.result.records.forEach((Obj) => {
|
res.result.records.forEach((Obj) => {
|
||||||
Object.keys(Obj).forEach((item) => {
|
Object.keys(Obj).forEach((item) => {
|
||||||
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
||||||
Obj[item].list.forEach((itemLi) => {
|
for (const key in Obj[item].paramsConfigData){
|
||||||
|
Obj[item].paramsConfigData[key].forEach((itemLi) => {
|
||||||
if (itemLi.type === 'pull_more') {
|
if (itemLi.type === 'pull_more') {
|
||||||
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
|
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// Obj[item].list.forEach((itemLi) => {
|
||||||
|
// if (itemLi.type === 'pull_more') {
|
||||||
|
// itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
}
|
||||||
})
|
})
|
||||||
tt.push(Obj)
|
tt.push(Obj)
|
||||||
})
|
})
|
||||||
@@ -987,12 +1017,14 @@
|
|||||||
// })
|
// })
|
||||||
let tt = []
|
let tt = []
|
||||||
if (this.currentPersonRole !== 'dre') {
|
if (this.currentPersonRole !== 'dre') {
|
||||||
|
|
||||||
console.log(res.result.records, 'res.result.records')
|
console.log(res.result.records, 'res.result.records')
|
||||||
res.result.records.forEach((Obj) => {
|
res.result.records.forEach((Obj) => {
|
||||||
Object.keys(Obj).forEach((item) => {
|
Object.keys(Obj).forEach((item) => {
|
||||||
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
||||||
Obj[item].list.forEach((itemLi) => {
|
for (const key in Obj[item].paramsConfigData){
|
||||||
// console.log(item)
|
Obj[item].paramsConfigData[key].forEach((itemLi) => {
|
||||||
|
console.log(item)
|
||||||
if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){
|
if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){
|
||||||
itemLi.isLock = 0
|
itemLi.isLock = 0
|
||||||
}else{
|
}else{
|
||||||
@@ -1003,19 +1035,39 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// Obj[item].list.forEach((itemLi) => {
|
||||||
|
// console.log(item)
|
||||||
|
// if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){
|
||||||
|
// itemLi.isLock = 0
|
||||||
|
// }else{
|
||||||
|
// itemLi.isLock = 1
|
||||||
|
// }
|
||||||
|
// if (itemLi.type === 'pull_more') {
|
||||||
|
// itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
}
|
||||||
})
|
})
|
||||||
tt.push(Obj)
|
tt.push(Obj)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
res.result.records.forEach((Obj) => {
|
res.result.records.forEach((Obj) => {
|
||||||
Object.keys(Obj).forEach((item) => {
|
Object.keys(Obj).forEach((item) => {
|
||||||
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
||||||
Obj[item].list.forEach((itemLi) => {
|
for (const key in Obj[item].paramsConfigData){
|
||||||
|
Obj[item].paramsConfigData[key].forEach((itemLi) => {
|
||||||
if (itemLi.type === 'pull_more') {
|
if (itemLi.type === 'pull_more') {
|
||||||
itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
|
itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// Obj[item].list.forEach((itemLi) => {
|
||||||
|
// if (itemLi.type === 'pull_more') {
|
||||||
|
// itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
}
|
||||||
})
|
})
|
||||||
tt.push(Obj)
|
tt.push(Obj)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
<!-- </span>-->
|
<!-- </span>-->
|
||||||
<!-- </span>-->
|
<!-- </span>-->
|
||||||
<span slot="detailClick" slot-scope="text,record">
|
<span slot="detailClick" slot-scope="text,record">
|
||||||
<collection-type :detailDate='text'/>
|
<collection-type @consolidateData="consolidateData" :detailDate='text'/>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -301,6 +301,7 @@
|
|||||||
detailDateList: [],
|
detailDateList: [],
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
selectedRowrowValue: [],
|
selectedRowrowValue: [],
|
||||||
|
description:'',
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
@@ -683,14 +684,25 @@
|
|||||||
if (this.currentPersonRole !== 'dre') {
|
if (this.currentPersonRole !== 'dre') {
|
||||||
res.result.records.forEach((Obj) => {
|
res.result.records.forEach((Obj) => {
|
||||||
Object.keys(Obj).forEach((item) => {
|
Object.keys(Obj).forEach((item) => {
|
||||||
|
|
||||||
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
||||||
Obj[item].list.forEach((itemLi) => {
|
for (const key in Obj[item].paramsConfigData){
|
||||||
|
Obj[item].paramsConfigData[key].forEach((itemLi) =>
|
||||||
|
{
|
||||||
|
|
||||||
itemLi.isLock = 1
|
itemLi.isLock = 1
|
||||||
if (itemLi.type === 'pull_more') {
|
if (itemLi.type === 'pull_more') {
|
||||||
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
|
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// Obj[item].list.forEach((itemLi) => {
|
||||||
|
// itemLi.isLock = 1
|
||||||
|
// if (itemLi.type === 'pull_more') {
|
||||||
|
// itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
}
|
||||||
})
|
})
|
||||||
tt.push(Obj)
|
tt.push(Obj)
|
||||||
})
|
})
|
||||||
@@ -698,12 +710,19 @@
|
|||||||
res.result.records.forEach((Obj) => {
|
res.result.records.forEach((Obj) => {
|
||||||
Object.keys(Obj).forEach((item) => {
|
Object.keys(Obj).forEach((item) => {
|
||||||
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
||||||
Obj[item].list.forEach((itemLi) => {
|
for (const key in Obj[item].paramsConfigData){
|
||||||
|
Obj[item].paramsConfigData[key].forEach((itemLi) => {
|
||||||
if (itemLi.type === 'pull_more') {
|
if (itemLi.type === 'pull_more') {
|
||||||
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
|
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// Obj[item].list.forEach((itemLi) => {
|
||||||
|
// if (itemLi.type === 'pull_more') {
|
||||||
|
// itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
}
|
||||||
})
|
})
|
||||||
tt.push(Obj)
|
tt.push(Obj)
|
||||||
})
|
})
|
||||||
@@ -723,6 +742,9 @@
|
|||||||
cancleoperationFailed() {
|
cancleoperationFailed() {
|
||||||
this.selectedRowKeys = []
|
this.selectedRowKeys = []
|
||||||
},
|
},
|
||||||
|
consolidateData(){
|
||||||
|
this.dataSource = [...this.dataSource]
|
||||||
|
},
|
||||||
getTableList(currentPersonRole) {
|
getTableList(currentPersonRole) {
|
||||||
console.log(this.url.tableList)
|
console.log(this.url.tableList)
|
||||||
let paramsManifestid
|
let paramsManifestid
|
||||||
@@ -766,29 +788,57 @@
|
|||||||
// })
|
// })
|
||||||
let tt = []
|
let tt = []
|
||||||
if (this.currentPersonRole !== 'dre') {
|
if (this.currentPersonRole !== 'dre') {
|
||||||
|
|
||||||
|
console.log(res.result.records, 'res.result.records')
|
||||||
res.result.records.forEach((Obj) => {
|
res.result.records.forEach((Obj) => {
|
||||||
Object.keys(Obj).forEach((item) => {
|
Object.keys(Obj).forEach((item) => {
|
||||||
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
||||||
Obj[item].list.forEach((itemLi) => {
|
for (const key in Obj[item].paramsConfigData){
|
||||||
|
Obj[item].paramsConfigData[key].forEach((itemLi) => {
|
||||||
|
console.log(item)
|
||||||
|
if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){
|
||||||
|
itemLi.isLock = 0
|
||||||
|
}else{
|
||||||
itemLi.isLock = 1
|
itemLi.isLock = 1
|
||||||
|
}
|
||||||
if (itemLi.type === 'pull_more') {
|
if (itemLi.type === 'pull_more') {
|
||||||
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
|
itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// Obj[item].list.forEach((itemLi) => {
|
||||||
|
// console.log(item)
|
||||||
|
// if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){
|
||||||
|
// itemLi.isLock = 0
|
||||||
|
// }else{
|
||||||
|
// itemLi.isLock = 1
|
||||||
|
// }
|
||||||
|
// if (itemLi.type === 'pull_more') {
|
||||||
|
// itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
}
|
||||||
})
|
})
|
||||||
tt.push(Obj)
|
tt.push(Obj)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
res.result.records.forEach((Obj) => {
|
res.result.records.forEach((Obj) => {
|
||||||
Object.keys(Obj).forEach((item) => {
|
Object.keys(Obj).forEach((item) => {
|
||||||
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
||||||
Obj[item].list.forEach((itemLi) => {
|
for (const key in Obj[item].paramsConfigData){
|
||||||
|
Obj[item].paramsConfigData[key].forEach((itemLi) => {
|
||||||
if (itemLi.type === 'pull_more') {
|
if (itemLi.type === 'pull_more') {
|
||||||
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
|
itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// Obj[item].list.forEach((itemLi) => {
|
||||||
|
// if (itemLi.type === 'pull_more') {
|
||||||
|
// itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
}
|
||||||
})
|
})
|
||||||
tt.push(Obj)
|
tt.push(Obj)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -73,12 +73,20 @@ import { mapGetters } from 'vuex'
|
|||||||
this.containerId = 'container-ty-' + new Date().getTime()
|
this.containerId = 'container-ty-' + new Date().getTime()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.detailDate.list.forEach((item) => {
|
for (const key in this.detailDate.paramsConfigData){
|
||||||
|
this.detailDate.paramsConfigData[key].forEach((item) => {
|
||||||
if (item.type === 'file') {
|
if (item.type === 'file') {
|
||||||
this.template.templateId = item.templateId
|
this.template.templateId = item.templateId
|
||||||
this.template.templateName = item.templateName
|
this.template.templateName = item.templateName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
// this.detailDate.list.forEach((item) => {
|
||||||
|
// if (item.type === 'file') {
|
||||||
|
// this.template.templateId = item.templateId
|
||||||
|
// this.template.templateName = item.templateName
|
||||||
|
// }
|
||||||
|
// })
|
||||||
let long = localStorage.getItem('language')
|
let long = localStorage.getItem('language')
|
||||||
this.cut = ''
|
this.cut = ''
|
||||||
if (long && long == 'zh-cn') {
|
if (long && long == 'zh-cn') {
|
||||||
|
|||||||
@@ -78,7 +78,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24" v-if='combineFlag'>
|
<!-- v-if='combineFlag'-->
|
||||||
|
<a-row :gutter="24">
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
|
|||||||
@@ -316,34 +316,69 @@
|
|||||||
data.forEach(res => {
|
data.forEach(res => {
|
||||||
selectedRowKeysValue.push(res)
|
selectedRowKeysValue.push(res)
|
||||||
})
|
})
|
||||||
console.log(selectedRowKeysValue)
|
// console.log(selectedRowKeysValue)
|
||||||
for (let i = 0; i < selectedRowKeysValue.length; i++) {
|
// for (let i = 0; i < selectedRowKeysValue.length; i++) {
|
||||||
let postDateobj = {}
|
// let postDateobj = {}
|
||||||
let itemIn = Object.keys(selectedRowKeysValue[i])
|
// let itemIn = Object.keys(selectedRowKeysValue[i])
|
||||||
for (let j = 0; j < itemIn.length; j++) {
|
// for (let j = 0; j < itemIn.length; j++) {
|
||||||
if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) {
|
// if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) {
|
||||||
if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
|
// if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
|
||||||
postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
|
// postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
|
||||||
for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
|
// for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
|
||||||
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue instanceof Array) {
|
// if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue instanceof Array) {
|
||||||
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
|
// selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
|
||||||
}
|
// }
|
||||||
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
|
// if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
|
||||||
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
|
// selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
postDateobj.id = selectedRowKeysValue[i].id
|
// postDateobj.id = selectedRowKeysValue[i].id
|
||||||
postDateobj.remarks = selectedRowKeysValue[i].remarks
|
// postDateobj.remarks = selectedRowKeysValue[i].remarks
|
||||||
postDate.push(postDateobj)
|
// postDate.push(postDateobj)
|
||||||
}
|
// }
|
||||||
let configDataList = { configDataList: postDate }
|
// let configDataList = { configDataList: postDate }
|
||||||
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
|
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
|
||||||
|
let configDataList = []
|
||||||
|
for (let i = 0; i < selectedRowKeysValue.length; i++) {
|
||||||
|
configDataList.push({
|
||||||
|
id: selectedRowKeysValue[i].id
|
||||||
|
})
|
||||||
|
if (selectedRowKeysValue[i].configIds && selectedRowKeysValue[i].configIds.length > 0) {
|
||||||
|
for (let j = 0; j < selectedRowKeysValue[i].configIds.length; j++) {
|
||||||
|
let keyIndex = Object.keys(selectedRowKeysValue[i])
|
||||||
|
for (let k = 0; k < keyIndex.length; k++) {
|
||||||
|
if (keyIndex[k] == selectedRowKeysValue[i].configIds[j]) {
|
||||||
|
let keyName = keyIndex[k]
|
||||||
|
configDataList[i][keyName] = selectedRowKeysValue[i][keyName]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// return
|
||||||
|
if (configDataList && configDataList.length > 0) {
|
||||||
|
configDataList.forEach(res => {
|
||||||
|
Object.keys(res).forEach(val => {
|
||||||
|
if (res[val] && res[val].paramsConfigData) {
|
||||||
|
let paramsConfigData = res[val].paramsConfigData
|
||||||
|
Object.keys(paramsConfigData).forEach((ol, index) => {
|
||||||
|
paramsConfigData[ol][0].orderNum = index
|
||||||
|
paramsConfigData[ol].forEach(item => {
|
||||||
|
if (item.type == 'pull_more') {
|
||||||
|
item.dataValue = item.dataValue.join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
this.textLoading = true
|
this.textLoading = true
|
||||||
let query = {
|
let query = {
|
||||||
...configDataList,
|
configDataList: configDataList,
|
||||||
paramsManifestId: this.$route.query.id
|
paramsManifestId: this.$route.query.id
|
||||||
}
|
}
|
||||||
postAction('/report/detail/save', query).then((res) => {
|
postAction('/report/detail/save', query).then((res) => {
|
||||||
|
|||||||
@@ -56,6 +56,17 @@
|
|||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </a-col>-->
|
<!-- </a-col>-->
|
||||||
<template v-if="toggleSearchStatus">
|
<template v-if="toggleSearchStatus">
|
||||||
|
<a-col :md="6" :sm="8">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text" :title="$t('NareaOfResponsibility')">
|
||||||
|
<span>{{$t('NareaOfResponsibility')}}</span>
|
||||||
|
</div>
|
||||||
|
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')"
|
||||||
|
:type="'select'"
|
||||||
|
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text" :title="$t('dre')">
|
<div class="title-text" :title="$t('dre')">
|
||||||
@@ -161,7 +172,8 @@
|
|||||||
{{$t('Updateparametercolumn')}}
|
{{$t('Updateparametercolumn')}}
|
||||||
</div>
|
</div>
|
||||||
<!-- 同步上报库 -->
|
<!-- 同步上报库 -->
|
||||||
<div @click="handleSynchronousReportLibraryJurisdiction" class="operator-text-title" v-if='currentPersonRole == "homo"'>
|
<div @click="handleSynchronousReportLibraryJurisdiction" class="operator-text-title"
|
||||||
|
v-if='currentPersonRole == "homo"'>
|
||||||
<a-icon type="sync"/>
|
<a-icon type="sync"/>
|
||||||
{{$t('SynchronousReportLibrary')}}
|
{{$t('SynchronousReportLibrary')}}
|
||||||
</div>
|
</div>
|
||||||
@@ -175,11 +187,13 @@
|
|||||||
<a-icon type="delete"/>
|
<a-icon type="delete"/>
|
||||||
{{$t('BatchDelete')}}
|
{{$t('BatchDelete')}}
|
||||||
</div>
|
</div>
|
||||||
<div @click="bringInTheProjectInterfaceClick" class="operator-text-title" v-if='currentPersonRole == "homo"'>
|
<div @click="bringInTheProjectInterfaceClick" class="operator-text-title"
|
||||||
|
v-if='currentPersonRole == "homo"'>
|
||||||
<a-icon type="user"/>
|
<a-icon type="user"/>
|
||||||
{{$t('bringInTheProjectInterface')}}
|
{{$t('bringInTheProjectInterface')}}
|
||||||
</div>
|
</div>
|
||||||
<div @click="AdjustareasofresponsibilityClick" class="operator-text-title" v-if='currentPersonRole == "homo"'>
|
<div @click="AdjustareasofresponsibilityClick" class="operator-text-title"
|
||||||
|
v-if='currentPersonRole == "homo"'>
|
||||||
<a-icon type="setting"/>
|
<a-icon type="setting"/>
|
||||||
{{$t('Adjustareasofresponsibility')}}
|
{{$t('Adjustareasofresponsibility')}}
|
||||||
</div>
|
</div>
|
||||||
@@ -190,12 +204,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<!-- @click='morepop'-->
|
<!-- @click='morepop'-->
|
||||||
<div class="operator-text" style="position: relative " v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
|
<div class="operator-text" style="position: relative "
|
||||||
|
v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
|
||||||
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
|
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
|
||||||
</div>
|
</div>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
<!-- 下发收集 -->
|
<!-- 下发收集 -->
|
||||||
<div @click="distributionAndCollectionJurisdiction" class="operator-text" v-if='currentPersonRole == "homo"'>
|
<div @click="distributionAndCollectionJurisdiction" class="operator-text"
|
||||||
|
v-if='currentPersonRole == "homo"'>
|
||||||
<a-icon type="solution"/>
|
<a-icon type="solution"/>
|
||||||
{{$t('distributionAndCollection')}}
|
{{$t('distributionAndCollection')}}
|
||||||
</div>
|
</div>
|
||||||
@@ -233,7 +249,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 导入-->
|
<!-- 导入-->
|
||||||
<div class="operator-text" v-if='currentPersonRole == "dre"'>
|
<div class="operator-text" v-if='currentPersonRole == "dre"'>
|
||||||
<ImportFileOnlyList :url="url" :isTrue="false" :accept="'.zip'" :paramsManifestId='this.$route.query.id' @getList='getList'/>
|
<ImportFileOnlyList :url="url" :isTrue="false" :accept="'.zip'" :paramsManifestId='this.$route.query.id'
|
||||||
|
@getList='getList'/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 填写人导出-->
|
<!-- 填写人导出-->
|
||||||
<div @click="handleExportDre" class="operator-text"
|
<div @click="handleExportDre" class="operator-text"
|
||||||
@@ -325,7 +342,8 @@
|
|||||||
<assigned-by-homo v-if='areaVisibleAssignedbyhomo' :selectedRowKeysArray='selectedRowKeysArray'
|
<assigned-by-homo v-if='areaVisibleAssignedbyhomo' :selectedRowKeysArray='selectedRowKeysArray'
|
||||||
@GetgetTableList='GetgetTableList'
|
@GetgetTableList='GetgetTableList'
|
||||||
@GetgetLoginUserType='GetgetLoginUserType'
|
@GetgetLoginUserType='GetgetLoginUserType'
|
||||||
@areaVisibleAssignedbyflaghomo='areaVisibleAssignedbyflaghomo' @areaVisible='areaVisibleAssignedbyhomo = false'/>
|
@areaVisibleAssignedbyflaghomo='areaVisibleAssignedbyflaghomo'
|
||||||
|
@areaVisible='areaVisibleAssignedbyhomo = false'/>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<!-- 下发收集--->
|
<!-- 下发收集--->
|
||||||
<!-- <a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('distributionAndCollection')" width='400px' :footer="null">-->
|
<!-- <a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('distributionAndCollection')" width='400px' :footer="null">-->
|
||||||
@@ -444,7 +462,8 @@
|
|||||||
<!-- 认证工程师-提示-->
|
<!-- 认证工程师-提示-->
|
||||||
<div style='font-size: 18px;text-align: center' v-if='NoEngineer === 1'>
|
<div style='font-size: 18px;text-align: center' v-if='NoEngineer === 1'>
|
||||||
{{ currentPersonRole =='homo'? $t('certifiedEngineer'): (currentPersonRole =='sdt'?
|
{{ currentPersonRole =='homo'? $t('certifiedEngineer'): (currentPersonRole =='sdt'?
|
||||||
$t('engineeringInterfacePerson'): $t('completedBy')) }}{{jurisdiction === "homoQZTH"? $t('Datastateexcept') : $t('Datastatusis')}}
|
$t('engineeringInterfacePerson'): $t('completedBy')) }}{{jurisdiction === 'homoQZTH'? $t('Datastateexcept')
|
||||||
|
: $t('Datastatusis')}}
|
||||||
<!-- 下发收集时-->
|
<!-- 下发收集时-->
|
||||||
<span v-if='jurisdiction === "HOMOZFSJ"' class="text-wraning">
|
<span v-if='jurisdiction === "HOMOZFSJ"' class="text-wraning">
|
||||||
'{{$t('CollectionInitiated')}}'、'{{$t('ReturnedPerson')}}'{{$t('or')}}'{{$t('alteration')}}'
|
'{{$t('CollectionInitiated')}}'、'{{$t('ReturnedPerson')}}'{{$t('or')}}'{{$t('alteration')}}'
|
||||||
@@ -550,47 +569,47 @@
|
|||||||
{
|
{
|
||||||
value: '1',
|
value: '1',
|
||||||
title: this.$t('CollectionInitiated'),
|
title: this.$t('CollectionInitiated'),
|
||||||
key:'1',
|
key: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '2',
|
value: '2',
|
||||||
title: this.$t('handledInterface'),
|
title: this.$t('handledInterface'),
|
||||||
key:'2',
|
key: '2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '3',
|
value: '3',
|
||||||
title: this.$t('ReturnedPerson'),
|
title: this.$t('ReturnedPerson'),
|
||||||
key:'3',
|
key: '3'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '4',
|
value: '4',
|
||||||
title: this.$t('completed'),
|
title: this.$t('completed'),
|
||||||
key:'4',
|
key: '4'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '5',
|
value: '5',
|
||||||
title: this.$t('Filledreturn'),
|
title: this.$t('Filledreturn'),
|
||||||
key:'5',
|
key: '5'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '6',
|
value: '6',
|
||||||
title: this.$t('Submitted'),
|
title: this.$t('Submitted'),
|
||||||
key:'6',
|
key: '6'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '7',
|
value: '7',
|
||||||
title: this.$t('ReturnedEngineer'),
|
title: this.$t('ReturnedEngineer'),
|
||||||
key:'7',
|
key: '7'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '8',
|
value: '8',
|
||||||
title: this.$t('SynchronizedLibrary'),
|
title: this.$t('SynchronizedLibrary'),
|
||||||
key:'8',
|
key: '8'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '9',
|
value: '9',
|
||||||
title: this.$t('alteration'),
|
title: this.$t('alteration'),
|
||||||
key:'9',
|
key: '9'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
return {
|
return {
|
||||||
@@ -682,7 +701,7 @@
|
|||||||
value: 'dre',
|
value: 'dre',
|
||||||
text: this.$t('dre'),
|
text: this.$t('dre'),
|
||||||
dictCode: 'dre'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
dictCode: 'dre'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
textLoading: false,
|
textLoading: false,
|
||||||
@@ -772,6 +791,7 @@
|
|||||||
window.addEventListener('keyup',this.handleKeyup)
|
window.addEventListener('keyup',this.handleKeyup)
|
||||||
window.addEventListener('click',this.handleClick)
|
window.addEventListener('click',this.handleClick)
|
||||||
this.GetgetLoginUserType()
|
this.GetgetLoginUserType()
|
||||||
|
console.log(this.currentPersonRole)
|
||||||
if (this.$route.query.type == '1') {
|
if (this.$route.query.type == '1') {
|
||||||
this.handleOkRoleSwitching()
|
this.handleOkRoleSwitching()
|
||||||
}
|
}
|
||||||
@@ -1490,10 +1510,10 @@
|
|||||||
},
|
},
|
||||||
Updateparametercolumn() {
|
Updateparametercolumn() {
|
||||||
let data = JSON.parse(JSON.stringify(this.$refs.CollectionTabel.dataSource))
|
let data = JSON.parse(JSON.stringify(this.$refs.CollectionTabel.dataSource))
|
||||||
console.log(data)
|
|
||||||
let referencesCol = []
|
let referencesCol = []
|
||||||
let postDate = []
|
let postDate = []
|
||||||
let colunmnFlag = ''
|
let colunmnFlag = ''
|
||||||
|
this.colunmnFlag = false
|
||||||
data.forEach((item, index) => {
|
data.forEach((item, index) => {
|
||||||
if (!item.referencesCol) {
|
if (!item.referencesCol) {
|
||||||
this.colunmnFlag = true
|
this.colunmnFlag = true
|
||||||
@@ -1507,30 +1527,47 @@
|
|||||||
this.$message.warning(this.$t('columnfirst'))
|
this.$message.warning(this.$t('columnfirst'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
console.log(referencesCol)
|
||||||
|
// for (let i = 0; i < referencesCol.length; i++) {
|
||||||
|
// let postDateobj = {}
|
||||||
|
// let itemIn = Object.keys(referencesCol[i])
|
||||||
|
// for (let j = 0; j < itemIn.length; j++) {
|
||||||
|
// if (itemIn[j] !== 'sdt' && referencesCol[i][itemIn[j]].list) {
|
||||||
|
// if (referencesCol[i][itemIn[j]] instanceof Object && !(referencesCol[i][itemIn[j]] instanceof Array)) {
|
||||||
|
// postDateobj[itemIn[j]] = referencesCol[i][itemIn[j]]
|
||||||
|
// for (let k = 0; k < referencesCol[i][itemIn[j]].list.length; k++) {
|
||||||
|
// if (referencesCol[i][itemIn[j]].list[k].type == 'pull_more' && referencesCol[i][itemIn[j]].list[k].dataValue instanceof Array) {
|
||||||
|
// referencesCol[i][itemIn[j]].list[k].dataValue = referencesCol[i][itemIn[j]].list[k].dataValue.join(',')
|
||||||
|
// }
|
||||||
|
// if (referencesCol[i][itemIn[j]].list[k].type == 'text' && referencesCol[i][itemIn[j]].list[k].dataValue !== null) {
|
||||||
|
// referencesCol[i][itemIn[j]].list[k].dataValue = referencesCol[i][itemIn[j]].list[k].dataValue.toString()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// postDateobj.id = referencesCol[i].id
|
||||||
|
// postDate.push(postDateobj)
|
||||||
|
// }
|
||||||
|
let configDataList = []
|
||||||
for (let i = 0; i < referencesCol.length; i++) {
|
for (let i = 0; i < referencesCol.length; i++) {
|
||||||
let postDateobj = {}
|
configDataList.push({
|
||||||
let itemIn = Object.keys(referencesCol[i])
|
id: referencesCol[i].id
|
||||||
for (let j = 0; j < itemIn.length; j++) {
|
})
|
||||||
if (itemIn[j] !== 'sdt' && referencesCol[i][itemIn[j]].list) {
|
let key = Object.keys(referencesCol[i].referencesCol.paramsConfigData)
|
||||||
if (referencesCol[i][itemIn[j]] instanceof Object && !(referencesCol[i][itemIn[j]] instanceof Array)) {
|
let value = referencesCol[i].referencesCol.paramsConfigData
|
||||||
postDateobj[itemIn[j]] = referencesCol[i][itemIn[j]]
|
for (let j = 0; j < key.length; j++) {
|
||||||
for (let k = 0; k < referencesCol[i][itemIn[j]].list.length; k++) {
|
let keyName = key[j]
|
||||||
if (referencesCol[i][itemIn[j]].list[k].type == 'pull_more') {
|
for (let k = 0; k < value[keyName].length; k++) {
|
||||||
referencesCol[i][itemIn[j]].list[k].dataValue = referencesCol[i][itemIn[j]].list[k].dataValue.join(',')
|
if (value[keyName][k].type == 'pull_more') {
|
||||||
}
|
value[keyName][k].dataValue = value[keyName][k].dataValue.join(',')
|
||||||
if (referencesCol[i][itemIn[j]].list[k].type == 'text' && referencesCol[i][itemIn[j]].list[k].dataValue !== null) {
|
|
||||||
referencesCol[i][itemIn[j]].list[k].dataValue = referencesCol[i][itemIn[j]].list[k].dataValue.toString()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
configDataList[i][keyName] = value[keyName]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
postDateobj.id = referencesCol[i].id
|
|
||||||
postDate.push(postDateobj)
|
|
||||||
}
|
|
||||||
let configDataList = { configDataList: postDate }
|
|
||||||
let query = {
|
let query = {
|
||||||
...configDataList,
|
configDataList: configDataList,
|
||||||
paramsManifestId: this.paramsManifest.id
|
paramsManifestId: this.paramsManifest.id
|
||||||
}
|
}
|
||||||
postAction('/params/collectManifest/updateReferencesCol', query).then((res) => {
|
postAction('/params/collectManifest/updateReferencesCol', query).then((res) => {
|
||||||
@@ -1634,37 +1671,71 @@
|
|||||||
selectedRowKeysValue.push(res)
|
selectedRowKeysValue.push(res)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(selectedRowKeysValue)
|
// for (let i = 0; i < selectedRowKeysValue.length; i++) {
|
||||||
for (let i = 0; i < selectedRowKeysValue.length; i++) {
|
// let postDateobj = {}
|
||||||
let postDateobj = {}
|
// let itemIn = Object.keys(selectedRowKeysValue[i])
|
||||||
let itemIn = Object.keys(selectedRowKeysValue[i])
|
// for (let j = 0; j < itemIn.length; j++) {
|
||||||
for (let j = 0; j < itemIn.length; j++) {
|
// if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) {
|
||||||
if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) {
|
// if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
|
||||||
if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
|
// postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
|
||||||
postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
|
// for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
|
||||||
for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
|
// if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') {
|
||||||
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') {
|
// selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
|
||||||
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
|
// }
|
||||||
}
|
// if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
|
||||||
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
|
// selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
|
||||||
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// postDateobj.id = selectedRowKeysValue[i].id
|
||||||
postDateobj.id = selectedRowKeysValue[i].id
|
// delete postDateobj.referencesCol
|
||||||
delete postDateobj.referencesCol
|
// postDate.push(postDateobj)
|
||||||
postDate.push(postDateobj)
|
// }
|
||||||
}
|
// console.log(postDate)
|
||||||
console.log(postDate)
|
|
||||||
let configDataList = { configDataList: postDate }
|
|
||||||
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
|
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
|
||||||
if (num && num == 1) {
|
if (num && num == 1) {
|
||||||
this.textLoading = true
|
this.textLoading = true
|
||||||
}
|
}
|
||||||
|
let configDataList = []
|
||||||
|
for (let i = 0; i < selectedRowKeysValue.length; i++) {
|
||||||
|
configDataList.push({
|
||||||
|
id: selectedRowKeysValue[i].id
|
||||||
|
})
|
||||||
|
if (selectedRowKeysValue[i].configIds && selectedRowKeysValue[i].configIds.length > 0) {
|
||||||
|
for (let j = 0; j < selectedRowKeysValue[i].configIds.length; j++) {
|
||||||
|
let keyIndex = Object.keys(selectedRowKeysValue[i])
|
||||||
|
for (let k = 0; k < keyIndex.length; k++) {
|
||||||
|
if (keyIndex[k] == selectedRowKeysValue[i].configIds[j]) {
|
||||||
|
let keyName = keyIndex[k]
|
||||||
|
configDataList[i][keyName] = selectedRowKeysValue[i][keyName]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// return
|
||||||
|
if (configDataList && configDataList.length > 0) {
|
||||||
|
configDataList.forEach(res => {
|
||||||
|
Object.keys(res).forEach(val => {
|
||||||
|
if (res[val] && res[val].paramsConfigData) {
|
||||||
|
let paramsConfigData = res[val].paramsConfigData
|
||||||
|
Object.keys(paramsConfigData).forEach((ol, index) => {
|
||||||
|
paramsConfigData[ol][0].orderNum = index
|
||||||
|
paramsConfigData[ol].forEach(item => {
|
||||||
|
if (item.type == 'pull_more') {
|
||||||
|
item.dataValue = item.dataValue.join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
let query = {
|
let query = {
|
||||||
...configDataList,
|
// ...configDataList,
|
||||||
|
configDataList: configDataList,
|
||||||
paramsManifestId: this.paramsManifest.id
|
paramsManifestId: this.paramsManifest.id
|
||||||
}
|
}
|
||||||
postAction('/params/collectManifest/save', query).then((res) => {
|
postAction('/params/collectManifest/save', query).then((res) => {
|
||||||
@@ -1720,22 +1791,67 @@
|
|||||||
let _this = this
|
let _this = this
|
||||||
let postDate = []
|
let postDate = []
|
||||||
let selectedRowKeysValue = JSON.parse(JSON.stringify(this.selectedRowKeysValue))
|
let selectedRowKeysValue = JSON.parse(JSON.stringify(this.selectedRowKeysValue))
|
||||||
|
// for (let i = 0; i < selectedRowKeysValue.length; i++) {
|
||||||
|
// let postDateobj = {}
|
||||||
|
// let itemIn = Object.keys(selectedRowKeysValue[i])
|
||||||
|
// for (let j = 0; j < itemIn.length; j++) {
|
||||||
|
// if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) {
|
||||||
|
// if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
|
||||||
|
// postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
|
||||||
|
// for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
|
||||||
|
// if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') {
|
||||||
|
// selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
|
||||||
|
// }
|
||||||
|
// if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
|
||||||
|
// selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
|
||||||
|
// }
|
||||||
|
// if (!selectedRowKeysValue[i][itemIn[j]].list[k].dataValue && selectedRowKeysValue[i][itemIn[j]].list[k].isMust == '1'
|
||||||
|
// && selectedRowKeysValue[i][itemIn[j]].list[k].isLock == '0') {
|
||||||
|
// this.$message.warning(selectedRowKeysValue[i].nioNumber + ',' + this.$t('requiredParametersEmpty'))
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// postDateobj.id = selectedRowKeysValue[i].id
|
||||||
|
// postDate.push(postDateobj)
|
||||||
|
// }
|
||||||
|
let configDataList = []
|
||||||
for (let i = 0; i < selectedRowKeysValue.length; i++) {
|
for (let i = 0; i < selectedRowKeysValue.length; i++) {
|
||||||
let postDateobj = {}
|
configDataList.push({
|
||||||
let itemIn = Object.keys(selectedRowKeysValue[i])
|
id: selectedRowKeysValue[i].id
|
||||||
for (let j = 0; j < itemIn.length; j++) {
|
})
|
||||||
if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) {
|
if (selectedRowKeysValue[i].configIds && selectedRowKeysValue[i].configIds.length > 0) {
|
||||||
if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
|
for (let j = 0; j < selectedRowKeysValue[i].configIds.length; j++) {
|
||||||
postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
|
let keyIndex = Object.keys(selectedRowKeysValue[i])
|
||||||
for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
|
for (let k = 0; k < keyIndex.length; k++) {
|
||||||
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') {
|
if (keyIndex[k] == selectedRowKeysValue[i].configIds[j]) {
|
||||||
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
|
let keyName = keyIndex[k]
|
||||||
|
configDataList[i][keyName] = selectedRowKeysValue[i][keyName]
|
||||||
}
|
}
|
||||||
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
|
|
||||||
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
|
|
||||||
}
|
}
|
||||||
if (!selectedRowKeysValue[i][itemIn[j]].list[k].dataValue && selectedRowKeysValue[i][itemIn[j]].list[k].isMust == '1'
|
}
|
||||||
&& selectedRowKeysValue[i][itemIn[j]].list[k].isLock == '0') {
|
}
|
||||||
|
}
|
||||||
|
// return
|
||||||
|
if (configDataList && configDataList.length > 0) {
|
||||||
|
for (let i = 0; i < configDataList.length; i++) {
|
||||||
|
let res = Object.keys(configDataList[i])
|
||||||
|
for (let j = 0; j < res.length; j++) {
|
||||||
|
let key = res[j]
|
||||||
|
if (configDataList[i][key] && configDataList[i][key].paramsConfigData) {
|
||||||
|
let paramsConfigData = configDataList[i][key].paramsConfigData
|
||||||
|
let paramsConfigDataQuery = Object.keys(paramsConfigData)
|
||||||
|
for (let k = 0; k < paramsConfigDataQuery.length; k++) {
|
||||||
|
let keyName = paramsConfigDataQuery[k]
|
||||||
|
paramsConfigData[keyName][0].orderNum = k
|
||||||
|
let keyNameOne = paramsConfigData[keyName]
|
||||||
|
for (let l = 0; l < keyNameOne.length; l++) {
|
||||||
|
if (keyNameOne[l].type == 'pull_more') {
|
||||||
|
keyNameOne[l].dataValue = keyNameOne[l].dataValue.join(',')
|
||||||
|
}
|
||||||
|
if (!keyNameOne[l].dataValue && keyNameOne[l].isMust == '1' && keyNameOne[l].isLock == '0') {
|
||||||
this.$message.warning(selectedRowKeysValue[i].nioNumber + ',' + this.$t('requiredParametersEmpty'))
|
this.$message.warning(selectedRowKeysValue[i].nioNumber + ',' + this.$t('requiredParametersEmpty'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -1743,11 +1859,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
postDateobj.id = selectedRowKeysValue[i].id
|
|
||||||
postDate.push(postDateobj)
|
|
||||||
}
|
}
|
||||||
|
// configDataList.forEach(res => {
|
||||||
let configDataList = { configDataList: postDate }
|
// Object.keys(res).forEach(val => {
|
||||||
|
// if (res[val] && res[val].paramsConfigData) {
|
||||||
|
// let paramsConfigData = res[val].paramsConfigData
|
||||||
|
// Object.keys(paramsConfigData).forEach((ol, index) => {
|
||||||
|
// paramsConfigData[ol][0].orderNum = index
|
||||||
|
// paramsConfigData[ol].forEach(item => {
|
||||||
|
// if (item.type == 'pull_more') {
|
||||||
|
// item.dataValue = item.dataValue.join(',')
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
// let configDataList = { configDataList: postDate }
|
||||||
if (this.selectedRowKeys.length == 0) {
|
if (this.selectedRowKeys.length == 0) {
|
||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
} else {
|
} else {
|
||||||
@@ -1755,7 +1884,11 @@
|
|||||||
this.$confirm({
|
this.$confirm({
|
||||||
content: _this.$t('Areyousureparameteritems'),
|
content: _this.$t('Areyousureparameteritems'),
|
||||||
onOk() {
|
onOk() {
|
||||||
postAction(_this.url.add, configDataList).then((res) => {
|
let query = {
|
||||||
|
configDataList: configDataList,
|
||||||
|
paramsManifestId: _this.paramsManifest.id
|
||||||
|
}
|
||||||
|
postAction(_this.url.add, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||||
_this.GetgetTableList()
|
_this.GetgetTableList()
|
||||||
@@ -1789,7 +1922,8 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
let _this = this
|
let _this = this
|
||||||
let param = { ids: _array.join(','),
|
let param = {
|
||||||
|
ids: _array.join(','),
|
||||||
currentPersonRole: this.currentPersonRole,
|
currentPersonRole: this.currentPersonRole,
|
||||||
paramsManifestId: this.$route.query.id
|
paramsManifestId: this.$route.query.id
|
||||||
}
|
}
|
||||||
@@ -2100,6 +2234,7 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.operator-text-title {
|
.operator-text-title {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-right: 22px;
|
margin-right: 22px;
|
||||||
@@ -2245,6 +2380,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-wraning {
|
.text-wraning {
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -231,12 +231,12 @@
|
|||||||
{{ $t('withdraw') }}
|
{{ $t('withdraw') }}
|
||||||
</div>
|
</div>
|
||||||
<!-- 发起任务-->
|
<!-- 发起任务-->
|
||||||
<div class="operator-text" @click="submitClick(0)" v-if="this.roleSwitchingCode == '1'">
|
<div class="operator-text" @click="submitOrSendBackClick(0)" v-if="this.roleSwitchingCode == '1'">
|
||||||
<a-icon type="check-circle"/>
|
<a-icon type="check-circle"/>
|
||||||
{{ $t('initiateTask') }}
|
{{ $t('initiateTask') }}
|
||||||
</div>
|
</div>
|
||||||
<!-- 退回-->
|
<!-- 退回-->
|
||||||
<div class="operator-text" @click="sendBackClick(1)" v-if="this.roleSwitchingCode == '1'">
|
<div class="operator-text" @click="submitOrSendBackClick(1)" v-if="this.roleSwitchingCode == '1'">
|
||||||
<a-icon type="close-circle"/>
|
<a-icon type="close-circle"/>
|
||||||
{{ $t('sendBack') }}
|
{{ $t('sendBack') }}
|
||||||
</div>
|
</div>
|
||||||
@@ -1178,7 +1178,8 @@
|
|||||||
rowKeysSuccessList: [],
|
rowKeysSuccessList: [],
|
||||||
selectedRowKeysList: [],
|
selectedRowKeysList: [],
|
||||||
rowKeysWarningList: [],
|
rowKeysWarningList: [],
|
||||||
rolecode: false
|
rolecode: false,
|
||||||
|
dataWarningList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -2076,51 +2077,26 @@
|
|||||||
this.detailedSuccessList = []
|
this.detailedSuccessList = []
|
||||||
this.detailedWarningList = []
|
this.detailedWarningList = []
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
let TaskSuccessList = JSON.parse(JSON.stringify(this.TaskSuccessList))
|
|
||||||
for (let i = 0; i < TaskSuccessList.length; i++) {
|
|
||||||
TaskSuccessList[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate
|
|
||||||
Object.keys(TaskSuccessList[i]).forEach(res => {
|
|
||||||
if (TaskSuccessList[i][res] && TaskSuccessList[i][res] instanceof String) {
|
|
||||||
TaskSuccessList[i][res] = TaskSuccessList[i][res].replace(/\"/g, '“')
|
|
||||||
TaskSuccessList[i][res] = TaskSuccessList[i][res].replace(/\'/g, '‘')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.confirmLoading = true
|
|
||||||
this.startProcess(TaskSuccessList)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
startProcess(value) {
|
startProcess(value,type) {
|
||||||
let query = {
|
let query = {
|
||||||
type: 1,
|
type: type,
|
||||||
projectLawsInvnetoryList: value,
|
projectLawsInvnetoryList: value,
|
||||||
projectNameId: this.$route.query.projectNameId,
|
projectNameId: this.$route.query.projectNameId,
|
||||||
projectName: this.$route.query.projectName,
|
projectName: this.$route.query.projectName,
|
||||||
projectLawsInventoryId: value.id,
|
projectLawsInventoryId: value.id
|
||||||
taskAffirmDueDate: this.formInline.taskAffirmDueDate
|
|
||||||
}
|
}
|
||||||
postAction('/workFlow/startProcess', query).then((res) => {
|
postAction('/workFlow/startProcess', query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.visible = false
|
// this.visible = false
|
||||||
this.selectedRowKeys = []
|
// this.selectedRowKeys = []
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
// this.$message.success(this.$t('OperationSuccessful'))
|
||||||
this.confirmLoading = false
|
// this.confirmLoading = false
|
||||||
this.getList()
|
this.completeTask(value, res.result)
|
||||||
let that = this
|
|
||||||
if (this.TaskWarningList.length > 0) {
|
|
||||||
this.$warning({
|
|
||||||
content: (
|
|
||||||
< div >
|
|
||||||
{ that.TaskWarningList }
|
|
||||||
< /div>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// this.completeTask(value, res.result, index)
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('operationFailed'))
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
}
|
}
|
||||||
@@ -2128,8 +2104,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
completeTask(value, taskId, index) {
|
completeTask(value, taskId, index) {
|
||||||
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
return new Promise((resolve, reject) => {
|
||||||
value.handlingTime = handlingTime
|
value.handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||||
Object.keys(value).forEach(res => {
|
Object.keys(value).forEach(res => {
|
||||||
if (value[res] && typeof value[res] == 'string') {
|
if (value[res] && typeof value[res] == 'string') {
|
||||||
value[res] = value[res].replace(/\"/g, '“')
|
value[res] = value[res].replace(/\"/g, '“')
|
||||||
@@ -2143,147 +2119,23 @@
|
|||||||
}
|
}
|
||||||
postAction('/workFlow/completeTask', query).then((res) => {
|
postAction('/workFlow/completeTask', query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
if (index == this.TaskSuccessList.length) {
|
// this.visible = false
|
||||||
this.visible = false
|
// this.selectedRowKeys = []
|
||||||
this.selectedRowKeys = []
|
// this.$message.success(this.$t('OperationSuccessful'))
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
// this.confirmLoading = false
|
||||||
this.confirmLoading = false
|
// this.getList()
|
||||||
this.getList()
|
resolve(res)
|
||||||
let that = this
|
|
||||||
if (this.TaskWarningList.length > 0) {
|
|
||||||
this.$warning({
|
|
||||||
content: (
|
|
||||||
< div >
|
|
||||||
{ that.TaskWarningList }
|
|
||||||
< /div>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('operationFailed'))
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
|
||||||
|
|
||||||
getRowKeys(value, num, callBack) {
|
|
||||||
let isTrue = true
|
|
||||||
let dataSource = []
|
|
||||||
for (let i = 0; i < this.dataSource.length; i++) {
|
|
||||||
for (let j = 0; j < value.length; j++) {
|
|
||||||
if (this.dataSource[i].id == value[j]) {
|
|
||||||
dataSource.push(this.dataSource[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.rowKeysSuccessList = []
|
|
||||||
this.rowKeysWarningList = []
|
|
||||||
for (let i = 0; i < dataSource.length; i++) {
|
|
||||||
if (dataSource[i].inventoryAffirmStatus == 'List to confirm' || dataSource[i].inventoryAffirmStatus == 'Rejected') {
|
|
||||||
if (dataSource[i].roleCode == 1 && dataSource[i].regulationOwnerSubmitStatus) {
|
|
||||||
|
|
||||||
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>)
|
|
||||||
continue
|
|
||||||
} else if (dataSource[i].roleCode == 2 && dataSource[i].homologationEngineerSubmitStatus) {
|
|
||||||
|
|
||||||
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>)
|
|
||||||
continue
|
|
||||||
} else if (dataSource[i].roleCode == 4 && (dataSource[i].homologationEngineerSubmitStatus && dataSource[i].regulationOwnerSubmitStatus)) {
|
|
||||||
|
|
||||||
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if (num == 1) {
|
|
||||||
if ((dataSource[i].designInitiatorId == dataSource[i].regulationOwnerId
|
|
||||||
&& dataSource[i].designInitiatorId == this.userInfo().id) ||
|
|
||||||
(dataSource[i].designInitiatorId == dataSource[i].homologationEngineerId
|
|
||||||
&& dataSource[i].designInitiatorId == this.userInfo().id)) {
|
|
||||||
if (!dataSource[i].designDutyId && !dataSource[i].designDueDate) {
|
|
||||||
this.rowKeysWarningList.push(
|
|
||||||
< div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>)
|
|
||||||
continue
|
|
||||||
} else if (!dataSource[i].designDutyId) {
|
|
||||||
this.rowKeysWarningList.push(
|
|
||||||
< div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theResponsiblePersonEmpty') } < /div>)
|
|
||||||
continue
|
|
||||||
} else if (!dataSource[i].designDueDate) {
|
|
||||||
this.rowKeysWarningList.push(
|
|
||||||
< div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theDeadlineEmpty') } < /div>)
|
|
||||||
continue
|
|
||||||
} else if (!dataSource[i].designDeliverableType) {
|
|
||||||
this.rowKeysWarningList.push(
|
|
||||||
< div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theDeliveryTypeCannotBeEmpty') } < /div>)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((dataSource[i].prehomoInitiatorId == dataSource[i].regulationOwnerId
|
|
||||||
&& dataSource[i].prehomoInitiatorId == this.userInfo().id) ||
|
|
||||||
(dataSource[i].prehomoInitiatorId == dataSource[i].homologationEngineerId
|
|
||||||
&& dataSource[i].prehomoInitiatorId == this.userInfo().id)) {
|
|
||||||
if (!dataSource[i].prehomoDutyId && !dataSource[i].prehomoDueDate) {
|
|
||||||
this.rowKeysWarningList.push(
|
|
||||||
< div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>)
|
|
||||||
continue
|
|
||||||
} else if (!dataSource[i].prehomoDutyId) {
|
|
||||||
this.rowKeysWarningList.push(
|
|
||||||
< div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theResponsiblePersonEmpty') } < /div>)
|
|
||||||
continue
|
|
||||||
} else if (!dataSource[i].prehomoDueDate) {
|
|
||||||
this.rowKeysWarningList.push(
|
|
||||||
< div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theDeadlineEmpty') } < /div>)
|
|
||||||
continue
|
|
||||||
} else if (!dataSource[i].prehomoDeliverableType) {
|
|
||||||
this.rowKeysWarningList.push(
|
|
||||||
< div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theDeliveryTypeCannotBeEmpty') } < /div>)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((dataSource[i].verifyInitiatorId == dataSource[i].regulationOwnerId
|
|
||||||
&& dataSource[i].verifyInitiatorId == this.userInfo().id) ||
|
|
||||||
(dataSource[i].verifyInitiatorId == dataSource[i].homologationEngineerId
|
|
||||||
&& dataSource[i].verifyInitiatorId == this.userInfo().id)) {
|
|
||||||
if (!dataSource[i].verifyDutyId && !dataSource[i].verifyDueDate) {
|
|
||||||
this.rowKeysWarningList.push(
|
|
||||||
< div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>)
|
|
||||||
continue
|
|
||||||
} else if (!dataSource[i].verifyDutyId) {
|
|
||||||
this.rowKeysWarningList.push(
|
|
||||||
< div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theResponsiblePersonEmpty') } < /div>)
|
|
||||||
continue
|
|
||||||
} else if (!dataSource[i].verifyDueDate) {
|
|
||||||
this.rowKeysWarningList.push(
|
|
||||||
< div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theDeadlineEmpty') } < /div>)
|
|
||||||
continue
|
|
||||||
} else if (!dataSource[i].verifyDeliverableType) {
|
|
||||||
this.rowKeysWarningList.push(
|
|
||||||
< div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theDeliveryTypeCannotBeEmpty') } < /div>)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.rowKeysSuccessList.push(dataSource[i])
|
|
||||||
} else {
|
|
||||||
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('incorrectsubmitted') } < /div>)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.rowKeysSuccessList && this.rowKeysSuccessList.length > 0) {
|
|
||||||
callBack && callBack()
|
|
||||||
} else {
|
|
||||||
let that = this
|
|
||||||
this.$warning({
|
|
||||||
content: (
|
|
||||||
< div >
|
|
||||||
{ that.rowKeysWarningList }
|
|
||||||
< /div>
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
sendBackClick() {
|
submitOrSendBackClick(num) {
|
||||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
this.detailedWarningList = []
|
this.detailedWarningList = []
|
||||||
|
this.dataWarningList = []
|
||||||
let dataSource = []
|
let dataSource = []
|
||||||
let idList = []
|
let idList = []
|
||||||
this.rowKeysSuccessList = []
|
this.rowKeysSuccessList = []
|
||||||
@@ -2302,14 +2154,20 @@
|
|||||||
} else {
|
} else {
|
||||||
this.detailedWarningList.push(
|
this.detailedWarningList.push(
|
||||||
< div > { dataSource[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
|
< div > { dataSource[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
|
||||||
|
this.dataWarningList.push(
|
||||||
|
< div > { dataSource[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (idList && idList.length > 0) {
|
if (idList && idList.length > 0) {
|
||||||
|
if (num == 0) {
|
||||||
|
this.submitClick(this.rowKeysSuccessList, 1)
|
||||||
|
} else {
|
||||||
this.visibleComment = true
|
this.visibleComment = true
|
||||||
this.formInlineComment = {}
|
this.formInlineComment = {}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.ruleFormComment.clearValidate()
|
this.$refs.ruleFormComment.clearValidate()
|
||||||
})
|
})
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.promptInformation(this.detailedWarningList)
|
this.promptInformation(this.detailedWarningList)
|
||||||
}
|
}
|
||||||
@@ -2317,6 +2175,99 @@
|
|||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
submitClick(dataList, num) {
|
||||||
|
let content = []
|
||||||
|
let designList = []
|
||||||
|
let verifyList = []
|
||||||
|
let detailedWarningList = []
|
||||||
|
this.detailedWarningList = this.dataWarningList || []
|
||||||
|
let _this = this
|
||||||
|
_this.$destroyAll()
|
||||||
|
if (num == 1) {
|
||||||
|
for (let i = 0; i < dataList.length; i++) {
|
||||||
|
if (!dataList[i].designDeliverableType && !dataList[i].designDutyId && !dataList[i].designDueDate) {
|
||||||
|
content.push(dataList[i])
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if (!dataList[i].verifyDeliverableType && !dataList[i].verifyDutyId && !dataList[i].verifyDueDate) {
|
||||||
|
content.push(dataList[i])
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (content && content.length > 0) {
|
||||||
|
for (let i = 0; i < content.length; i++) {
|
||||||
|
if (!content[i].designDeliverableType) {
|
||||||
|
designList.push(content[i].serialNumber)
|
||||||
|
}
|
||||||
|
if (!content[i].verifyDeliverableType) {
|
||||||
|
verifyList.push(content[i].serialNumber)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (designList.length > 0 || verifyList.length > 0) {
|
||||||
|
detailedWarningList.push(
|
||||||
|
< div > { this.$t('theDataYouSelectedContainsSkip') } < /div>)
|
||||||
|
}
|
||||||
|
if (designList.length > 0) {
|
||||||
|
detailedWarningList.push(
|
||||||
|
< div > { designList.join(',') + ' ' + this.$t('designComplianceProcessFor') } < /div>)
|
||||||
|
}
|
||||||
|
if (verifyList.length > 0) {
|
||||||
|
detailedWarningList.push(
|
||||||
|
< div > { verifyList.join(',') + ' ' + this.$t('validationComplianceProcessFor') } < /div>)
|
||||||
|
}
|
||||||
|
this.$confirm({
|
||||||
|
content: detailedWarningList,
|
||||||
|
class: 'confirmClass',
|
||||||
|
onOk() {
|
||||||
|
_this.submitClick(dataList, 2)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$confirm({
|
||||||
|
content: _this.$t('confirmLaunchTask'),
|
||||||
|
onOk() {
|
||||||
|
_this.submitAdmin(dataList)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitAdmin(dataList) {
|
||||||
|
let _this = this
|
||||||
|
for (let i = 0; i < dataList.length; i++) {
|
||||||
|
if (dataList[i].designDeliverableType) {
|
||||||
|
if (!dataList[i].designDutyId) {
|
||||||
|
_this.detailedWarningList.push(
|
||||||
|
< div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForDesignCannotBeBlank') } < /div>)
|
||||||
|
}
|
||||||
|
if (!dataList[i].designDueDate) {
|
||||||
|
_this.detailedWarningList.push(
|
||||||
|
< div > { dataList[i].serialNumber + _this.$t('theDeadlineForTheDesignCannotBeEmpty') } < /div>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (dataList[i].verifyDeliverableType) {
|
||||||
|
if (!dataList[i].verifyDueDate) {
|
||||||
|
_this.detailedWarningList.push(
|
||||||
|
< div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForVerifyingEmpty') } < /div>)
|
||||||
|
}
|
||||||
|
if (!dataList[i].verifyDutyId) {
|
||||||
|
_this.detailedWarningList.push(
|
||||||
|
< div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForVerifyingEmpty') } < /div>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (dataList[i].designDeliverableType && dataList[i].designDutyId && dataList[i].designDueDate) {
|
||||||
|
_this.startProcess(dataList[i], 2)
|
||||||
|
Promise.all(_this.completeTask()).then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
}).catch(error => {
|
||||||
|
console.log('error', error)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (dataList[i].verifyDeliverableType && dataList[i].verifyDutyId && dataList[i].verifyDueDate) {
|
||||||
|
_this.startProcess(dataList[i], 2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
handleOkComment() {
|
handleOkComment() {
|
||||||
this.$refs.ruleFormComment.validate(valid => {
|
this.$refs.ruleFormComment.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@@ -2895,5 +2846,13 @@
|
|||||||
touch-action: none;
|
touch-action: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.confirmClass .ant-modal-confirm-body {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirmClass .ant-modal-confirm-body .ant-modal-confirm-content {
|
||||||
|
margin-top: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* 插件 end */
|
/* 插件 end */
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user