认证-参数收集-同步上报库bug修改
This commit is contained in:
+32
-16
@@ -1179,7 +1179,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
@Override
|
||||
public boolean lockConfigColumn(ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
if (StringUtils.isEmpty(paramsCollectManifestVO.getParamsManifestId()) || StringUtils.isEmpty(paramsCollectManifestVO.getParamsConfigIds())) {
|
||||
if (StringUtils.isEmpty(paramsCollectManifestVO.getParamsManifestId())) {
|
||||
throw new JeroBootException("参数不能为空!");
|
||||
}
|
||||
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
|
||||
@@ -1271,13 +1271,13 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
List<String> paramsCollectManifestIdList = Arrays.asList(paramsCollectManifestIds.split(","));
|
||||
ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId);
|
||||
|
||||
// 根据收集库清单id 的是否上报过
|
||||
boolean isSync = paramsReportEOService.isSync(paramsManifestId);
|
||||
// 根据收集库清单id和版本,判断当前版本是否上报过
|
||||
boolean isSync = paramsReportEOService.isSync(paramsManifestId, paramsManifestEO.getVersion());
|
||||
String reportId = null;
|
||||
if (!isSync) {
|
||||
if (!isSync) { // 未上报过
|
||||
reportId = UUID.randomUUID().toString().replace("-","");
|
||||
} else {
|
||||
ParamsReportEO paramsReportEO = paramsReportEOService.queryByOldParamsManifestId(paramsManifestId);
|
||||
} else { // 上报过
|
||||
ParamsReportEO paramsReportEO = paramsReportEOService.queryByOldParamsManifestId(paramsManifestId, paramsManifestEO.getVersion());
|
||||
reportId = paramsReportEO.getId();
|
||||
}
|
||||
|
||||
@@ -1285,15 +1285,24 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId);
|
||||
List<ParamsReportConfigEO> addReportConfigEOList = new ArrayList<>();
|
||||
List<ReportCertCategoryParamsInfoEO> addReportCertCategoryParamsInfoEOList = new ArrayList<>();
|
||||
Map<String, String> configIdMap = new HashMap<>(); // 存放新旧 configId 关系
|
||||
if (!isSync) { // 未上报
|
||||
// 复制配置
|
||||
for (ParamsConfigEO configEO : paramsConfigEOList) {
|
||||
ParamsReportConfigEO addReportConfigEO = new ParamsReportConfigEO();
|
||||
BeanUtils.copyProperties(configEO, addReportConfigEO); // 全盘复制,包括id
|
||||
BeanUtils.copyProperties(configEO, addReportConfigEO);
|
||||
addReportConfigEO.setParamsManifestId(reportId);
|
||||
String addReportConfigId = UUID.randomUUID().toString().replace("-","");
|
||||
addReportConfigEO.setId(addReportConfigId);
|
||||
addReportConfigEO.setOldParamsConfigId(configEO.getId());
|
||||
addReportConfigEOList.add(addReportConfigEO);
|
||||
|
||||
configIdMap.put(configEO.getId(), addReportConfigId);
|
||||
}
|
||||
|
||||
} else {
|
||||
List<ParamsReportConfigEO> paramsReportConfigEOList = paramsReportConfigEOService.queryList(reportId);
|
||||
configIdMap = paramsReportConfigEOList.stream().collect(Collectors.toMap(ParamsReportConfigEO::getOldParamsConfigId, ParamsReportConfigEO::getId));
|
||||
}
|
||||
|
||||
// 添加参数项到上报库
|
||||
@@ -1316,6 +1325,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
ParamsReportConfigDataEO addReportConfigDataEO = new ParamsReportConfigDataEO();
|
||||
BeanUtils.copyProperties(configDataEO, addReportConfigDataEO);
|
||||
addReportConfigDataEO.setId(UUID.randomUUID().toString().replace("-",""));
|
||||
addReportConfigDataEO.setParamsConfigId(configIdMap.get(configEO.getId()));
|
||||
addReportConfigDataEO.setParamsCollectManifestId(reportDetailId);
|
||||
addReportConfigDataEOList.add(addReportConfigDataEO);
|
||||
|
||||
@@ -1327,7 +1338,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
List<CertCategoryParamsInfoPublishEO> certCategoryParamsInfoPublishEOS = certCategoryParamsInfoPublishEOService.queryListByVersionAndNio(paramsManifestEO.getParamsTemplateId(), paramsManifestEO.getParamsTemplatePublishVersion(), nioNumberList);
|
||||
for (CertCategoryParamsInfoPublishEO ccpi : certCategoryParamsInfoPublishEOS) {
|
||||
ReportCertCategoryParamsInfoEO addCcpi = new ReportCertCategoryParamsInfoEO();
|
||||
BeanUtils.copyProperties(ccpi, addCcpi); // 全盘复制,包括id
|
||||
BeanUtils.copyProperties(ccpi, addCcpi);
|
||||
addCcpi.setId(UUID.randomUUID().toString().replace("-",""));
|
||||
addReportCertCategoryParamsInfoEOList.add(addCcpi);
|
||||
}
|
||||
|
||||
@@ -1337,18 +1349,22 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
// 添加参数项
|
||||
paramsReportDetailEOService.saveBatch(addReportDetailEOList);
|
||||
|
||||
// 添加配置
|
||||
paramsReportConfigEOService.saveBatch(addReportConfigEOList);
|
||||
if (!isSync) { // 未上报
|
||||
// 添加配置
|
||||
paramsReportConfigEOService.saveBatch(addReportConfigEOList);
|
||||
}
|
||||
|
||||
// 添加配置数据
|
||||
paramsReportConfigDataEOService.saveBatch(addReportConfigDataEOList);
|
||||
|
||||
// 添加上报库
|
||||
ParamsReportEO addReportEO = new ParamsReportEO();
|
||||
addReportEO.setId(reportId);
|
||||
addReportEO.setOldParamsManifestId(paramsManifestId);
|
||||
addReportEO.setVersion(paramsManifestEO.getVersion());
|
||||
paramsReportEOService.save(addReportEO);
|
||||
if (!isSync) { // 未上报
|
||||
// 添加上报库
|
||||
ParamsReportEO addReportEO = new ParamsReportEO();
|
||||
addReportEO.setId(reportId);
|
||||
addReportEO.setOldParamsManifestId(paramsManifestId);
|
||||
addReportEO.setVersion(paramsManifestEO.getVersion());
|
||||
paramsReportEOService.save(addReportEO);
|
||||
}
|
||||
|
||||
// 修改收集库参数项状态
|
||||
List<ParamsCollectManifestEO> updateEOList = new ArrayList<>();
|
||||
|
||||
+50
-2
@@ -18,6 +18,8 @@ import com.jero.modules.cert.collect.service.IParamsConfigHistoryEOService;
|
||||
import com.jero.modules.cert.collect.vo.ParamsConfigDataVO;
|
||||
import com.jero.modules.cert.template.enums.ControlTypeEnum;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -52,6 +54,9 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
@Autowired
|
||||
private ISysDictItemService sysDictItemService;
|
||||
|
||||
@Autowired
|
||||
private IOSSFileService ossFileService;
|
||||
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
@@ -117,6 +122,8 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
String stateName = collectManifestStateMap.get(collectManifestEO.getState());
|
||||
collectManifestEO.setState(stateName);
|
||||
|
||||
List<String> configIdList = new ArrayList<>(); // 配置列名
|
||||
|
||||
Map<String, Object> manifestMap = objectToMap(collectManifestEO); // 对象转map
|
||||
String controlType = collectManifestEO.getControlType();
|
||||
String paramsCollectManifestId = collectManifestEO.getId();
|
||||
@@ -126,10 +133,12 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
Map<String, Object> configMap = new HashMap<>();
|
||||
String paramsConfigId = paramsConfigEO.getId();
|
||||
ParamsConfigDataEO paramsConfigDataEO = paramsConfigDataHistoryEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
|
||||
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
|
||||
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
|
||||
configMap.put("controlType", controlType);
|
||||
configMap.put("list", paramsConfigDataVOList);
|
||||
manifestMap.put(paramsConfigEO.getId(), configMap);
|
||||
|
||||
configIdList.add(paramsConfigEO.getId());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -141,6 +150,9 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
sdtMap.put("dataValue", collectManifestEO.getSdt());
|
||||
manifestMap.put("sdt", sdtMap);
|
||||
|
||||
// 配置列名数组
|
||||
manifestMap.put("configIds", configIdList);
|
||||
|
||||
listMap.add(manifestMap);
|
||||
});
|
||||
|
||||
@@ -154,14 +166,24 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
* @param paramsCollectManifestEO
|
||||
* @return
|
||||
*/
|
||||
private List<ParamsConfigDataVO> getConfigDataVOList(String controlType, ParamsConfigDataEO paramsConfigDataEO, ParamsCollectManifestHistoryEO paramsCollectManifestEO) {
|
||||
private List<ParamsConfigDataVO> getConfigDataVOList(String controlType, ParamsConfigEO paramsConfigEO, ParamsConfigDataEO paramsConfigDataEO, ParamsCollectManifestHistoryEO paramsCollectManifestEO) {
|
||||
List<ParamsConfigDataVO> paramsConfigDataVOList = new ArrayList<>();
|
||||
String templateId = null;
|
||||
String templateName = null;
|
||||
if (StringUtils.isNotEmpty(paramsCollectManifestEO.getFileTemplateConnectId())) {
|
||||
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(paramsCollectManifestEO.getFileTemplateConnectId());
|
||||
|
||||
if (CollectionUtil.isNotEmpty(ossFiles)) {
|
||||
templateId = ossFiles.get(0).getId();
|
||||
templateName = ossFiles.get(0).getFileName();
|
||||
}
|
||||
}
|
||||
if (ControlTypeEnum.TEXT.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO configDataVO = new ParamsConfigDataVO();
|
||||
configDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
configDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
configDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
configDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
configDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
@@ -173,6 +195,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO configDataVO = new ParamsConfigDataVO();
|
||||
configDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
configDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
configDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
configDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
configDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
@@ -184,6 +207,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO configDataVO = new ParamsConfigDataVO();
|
||||
configDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue());
|
||||
configDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
configDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
configDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
configDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
@@ -195,6 +219,9 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO configDataVO = new ParamsConfigDataVO();
|
||||
configDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
configDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
configDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
configDataVO.setTemplateId(templateId);
|
||||
configDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
configDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
@@ -205,6 +232,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
@@ -214,6 +242,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
@@ -225,6 +254,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
@@ -234,6 +264,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO();
|
||||
pullMoreConfigDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue());
|
||||
pullMoreConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullMoreConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullMoreConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullMoreConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
@@ -245,6 +276,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
@@ -254,6 +286,9 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
@@ -264,6 +299,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
@@ -273,6 +309,9 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
@@ -283,6 +322,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO();
|
||||
pullMoreConfigDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue());
|
||||
pullMoreConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullMoreConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullMoreConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullMoreConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
@@ -292,6 +332,9 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
@@ -302,6 +345,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
@@ -311,6 +355,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
@@ -320,6 +365,9 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
|
||||
+20
-14
@@ -23,6 +23,7 @@ import com.jero.modules.cert.collect.service.*;
|
||||
import com.jero.modules.cert.collect.vo.ParamsManifestHistoryVO;
|
||||
import com.jero.modules.cert.template.entity.ParamsInfoPublishEO;
|
||||
import com.jero.modules.cert.template.entity.ParamsTemplateEO;
|
||||
import com.jero.modules.cert.template.enums.ControlTypeEnum;
|
||||
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
||||
import com.jero.modules.cert.template.service.IParamsTemplateEOService;
|
||||
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
||||
@@ -280,17 +281,16 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
Boolean finish = (Boolean) map.get("finish");
|
||||
Date time = (Date) map.get("time");
|
||||
if (finish) {
|
||||
if (ManifestStateEnum.COLLECTING.getValue().equals(manifestEO.getState())) {
|
||||
manifestEO.setState(ManifestStateEnum.FINISHED.getValue());
|
||||
manifestEO.setFinishTime(time);
|
||||
manifestEO.setState(ManifestStateEnum.FINISHED.getValue());
|
||||
manifestEO.setFinishTime(time);
|
||||
|
||||
// 更新清单状态和完成时间
|
||||
ParamsManifestEO updateParamsManifestEO = new ParamsManifestEO();
|
||||
updateParamsManifestEO.setId(manifestEO.getId());
|
||||
updateParamsManifestEO.setState(ManifestStateEnum.FINISHED.getValue());
|
||||
updateParamsManifestEO.setFinishTime(time);
|
||||
updateById(updateParamsManifestEO);
|
||||
|
||||
// 更新清单状态和完成时间
|
||||
ParamsManifestEO updateParamsManifestEO = new ParamsManifestEO();
|
||||
updateParamsManifestEO.setId(manifestEO.getId());
|
||||
updateParamsManifestEO.setState(ManifestStateEnum.FINISHED.getValue());
|
||||
updateParamsManifestEO.setFinishTime(time);
|
||||
updateById(updateParamsManifestEO);
|
||||
}
|
||||
} else {
|
||||
if (ManifestStateEnum.FINISHED.getValue().equals(manifestEO.getState())) {
|
||||
manifestEO.setState(ManifestStateEnum.COLLECTING.getValue());
|
||||
@@ -389,6 +389,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
String oldControlValues = oldCollectManifestEO.getControlValues();
|
||||
|
||||
ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO();
|
||||
BeanUtils.copyProperties(paramsInfoPublishEO, updateCollectManifestEO);
|
||||
// 比较参数填写规则
|
||||
if (!newControlType.equals(oldControlType)
|
||||
|| (newControlVerify != null && !newControlVerify.equals(oldControlVerify))
|
||||
@@ -397,12 +398,12 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
|| (oldControlValues != null && !oldControlValues.equals(newControlValues))) {
|
||||
|
||||
// 参数填写规则改变,删除参数项配置数据,状态变为:待发起收集,拍列表前边
|
||||
updateCollectManifestEO.setId(oldCollectManifestEO.getId());
|
||||
updateCollectManifestEO.setId(oldCollectManifestEO.getId()); // 为收集参数项id
|
||||
updateCollectManifestEO.setState(CollectManifestStateEnum.WAIT_COLLECT.getValue());
|
||||
updateCollectManifestEO.setChangeFlag(CollectManifestChangeFlagEnum.CHANGE_AFTER.getValue());
|
||||
updateCollectManifestEO.setControlType(newControlType);
|
||||
updateCollectManifestEO.setControlVerify(newControlVerify);
|
||||
updateCollectManifestEO.setControlValues(newControlValues);
|
||||
// updateCollectManifestEO.setControlType(newControlType);
|
||||
// updateCollectManifestEO.setControlVerify(newControlVerify);
|
||||
// updateCollectManifestEO.setControlValues(newControlValues);
|
||||
|
||||
delCollectManifestIdList.add(oldCollectManifestEO.getId());
|
||||
} else {
|
||||
@@ -412,6 +413,11 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
updateCollectManifestEO.setChangeFlag(CollectManifestChangeFlagEnum.CHANGE_BEFORE.getValue());
|
||||
|
||||
}
|
||||
// 更新附件模板字段
|
||||
if (StringUtils.isNotEmpty(paramsInfoPublishEO.getFileTemplateConnectId())) {
|
||||
updateCollectManifestEO.setFileTemplateConnectId(paramsInfoPublishEO.getFileTemplateConnectId());
|
||||
}
|
||||
|
||||
updateCollectManifestEOList.add(updateCollectManifestEO);
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -61,10 +61,12 @@ public class ParamsExportTemplateEOController extends JeroController<ParamsExpor
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<ParamsExportTemplateEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.like(StringUtils.isNotEmpty(paramsExportTemplateEO.getTemplateName()), ParamsExportTemplateEO::getTemplateName, paramsExportTemplateEO.getTemplateName());
|
||||
queryWrapper.like(StringUtils.isNotEmpty(paramsExportTemplateEO.getTemplateName()), ParamsExportTemplateEO::getTemplateName, paramsExportTemplateEO.getTemplateName())
|
||||
.orderByDesc(ParamsExportTemplateEO::getCreateTime);
|
||||
Page<ParamsExportTemplateEO> page = new Page<ParamsExportTemplateEO>(pageNo, pageSize);
|
||||
IPage<ParamsExportTemplateEO> pageList = paramsExportTemplateEOService.page(page, queryWrapper);
|
||||
List<ParamsExportTemplateEO> rows = pageList.getRecords();
|
||||
// 处理 状态 中英文
|
||||
Map<String, String> stateMap = ExportTemplateStateEnum.toMap(cut);
|
||||
rows.forEach(exportTemplateEO -> {
|
||||
exportTemplateEO.setState(stateMap.get(exportTemplateEO.getState()));
|
||||
|
||||
+3
-3
@@ -104,7 +104,7 @@ public class ParamsReportEOController extends JeroController<ParamsReportEO, IPa
|
||||
*/
|
||||
@AutoLog(value = "上报库-编辑")
|
||||
@ApiOperation(value="上报库-编辑", notes="上报库-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ParamsReportEO paramsReportEO) {
|
||||
paramsReportEOService.editById(paramsReportEO);
|
||||
return Result.OK("编辑成功!");
|
||||
@@ -118,7 +118,7 @@ public class ParamsReportEOController extends JeroController<ParamsReportEO, IPa
|
||||
*/
|
||||
@AutoLog(value = "上报库-通过id删除")
|
||||
@ApiOperation(value="上报库-通过id删除", notes="上报库-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
@GetMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
paramsReportEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
@@ -132,7 +132,7 @@ public class ParamsReportEOController extends JeroController<ParamsReportEO, IPa
|
||||
*/
|
||||
@AutoLog(value = "上报库-批量删除")
|
||||
@ApiOperation(value="上报库-批量删除", notes="上报库-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.paramsReportEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
|
||||
+4
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.cert.report.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
@@ -78,4 +79,7 @@ public class ParamsExportTemplateEO implements Serializable {
|
||||
@ApiModelProperty(value = "附件上传")
|
||||
private String fileConnectId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -3,9 +3,11 @@ package com.jero.modules.cert.report.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jero.modules.cert.collect.entity.ParamsConfigEO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -24,4 +26,9 @@ import java.io.Serializable;
|
||||
public class ParamsReportConfigEO extends ParamsConfigEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**收集库参数配置id*/
|
||||
@Excel(name = "收集库参数配置id", width = 15)
|
||||
@ApiModelProperty(value = "收集库参数配置id")
|
||||
private String oldParamsConfigId;
|
||||
|
||||
}
|
||||
|
||||
+1
@@ -16,5 +16,6 @@
|
||||
<result column="params_manifest_id" property="paramsManifestId" />
|
||||
<result column="is_lock" property="isLock" />
|
||||
<result column="display_seq" property="displaySeq" />
|
||||
<result column="old_params_config_id" property="oldParamsConfigId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+1
-1
@@ -59,6 +59,6 @@
|
||||
select *
|
||||
from params_report_detail
|
||||
<include refid="BaseQuerySql"/>
|
||||
order by create_time asc
|
||||
order by sync_time asc
|
||||
</select>
|
||||
</mapper>
|
||||
+2
-2
@@ -63,8 +63,8 @@ public interface IParamsReportEOService extends IService<ParamsReportEO> {
|
||||
|
||||
IPage pageInfo(IPage page, ParamsReportEO paramsReportEO);
|
||||
|
||||
boolean isSync(String oldParamsManifestId);
|
||||
boolean isSync(String oldParamsManifestId, Integer version);
|
||||
|
||||
ParamsReportEO queryByOldParamsManifestId(String oldParamsManifestId);
|
||||
ParamsReportEO queryByOldParamsManifestId(String oldParamsManifestId, Integer version);
|
||||
|
||||
}
|
||||
|
||||
+27
-2
@@ -3,6 +3,8 @@ package com.jero.modules.cert.report.service.impl;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.cert.report.entity.ParamsExportTemplateEO;
|
||||
import com.jero.modules.cert.report.mapper.ParamsExportTemplateEOMapper;
|
||||
import com.jero.modules.cert.report.service.IParamsExportTemplateEOService;
|
||||
@@ -36,6 +38,16 @@ public class ParamsExportTemplateEOServiceImpl extends ServiceImpl<ParamsExportT
|
||||
*/
|
||||
@Override
|
||||
public boolean add(ParamsExportTemplateEO paramsExportTemplateEO) {
|
||||
|
||||
// 模板名称唯一校验
|
||||
boolean isRepeat = verifyTemplateName(paramsExportTemplateEO.getTemplateName());
|
||||
if (isRepeat) {
|
||||
if (CutEnum.CN.equals(paramsExportTemplateEO.getCut())) {
|
||||
throw new JeroBootException("模板名称已存在!");
|
||||
} else {
|
||||
throw new JeroBootException("Template Name already exists!");
|
||||
}
|
||||
}
|
||||
// 处理附件模板 修改文件表关联信息connect_id 一个文件
|
||||
if (StringUtils.isNotBlank(paramsExportTemplateEO.getFileConnectId())) {
|
||||
String fileId = paramsExportTemplateEO.getFileConnectId();
|
||||
@@ -66,6 +78,19 @@ public class ParamsExportTemplateEOServiceImpl extends ServiceImpl<ParamsExportT
|
||||
*/
|
||||
@Override
|
||||
public boolean editById(ParamsExportTemplateEO paramsExportTemplateEO) {
|
||||
|
||||
ParamsExportTemplateEO templateEO = getById(paramsExportTemplateEO.getId());
|
||||
if (!templateEO.getTemplateName().equals(paramsExportTemplateEO.getTemplateName())) {
|
||||
// 模板名称唯一校验
|
||||
boolean isRepeat = verifyTemplateName(paramsExportTemplateEO.getTemplateName());
|
||||
if (isRepeat) {
|
||||
if (CutEnum.CN.equals(paramsExportTemplateEO.getCut())) {
|
||||
throw new JeroBootException("模板名称已存在!");
|
||||
} else {
|
||||
throw new JeroBootException("Template Name already exists!");
|
||||
}
|
||||
}
|
||||
}
|
||||
// 处理附件模板 若附件模板被修改,修改文件表关联信息connect_id 一个文件
|
||||
if (StringUtils.isNotBlank(paramsExportTemplateEO.getFileConnectId())) {
|
||||
String fileId = paramsExportTemplateEO.getFileConnectId();
|
||||
@@ -136,9 +161,9 @@ public class ParamsExportTemplateEOServiceImpl extends ServiceImpl<ParamsExportT
|
||||
queryWrapper.eq(ParamsExportTemplateEO::getTemplateName, templateName);
|
||||
int repeatNum = count(queryWrapper);
|
||||
if (repeatNum > 0) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+59
-3
@@ -21,6 +21,8 @@ import com.jero.modules.cert.report.service.IParamsReportConfigEOService;
|
||||
import com.jero.modules.cert.report.service.IParamsReportDetailEOService;
|
||||
import com.jero.modules.cert.template.enums.ControlTypeEnum;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -55,6 +57,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
@Autowired
|
||||
private ISysDictItemService sysDictItemService;
|
||||
|
||||
@Autowired
|
||||
private IOSSFileService ossFileService;
|
||||
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
@@ -120,6 +125,8 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
String stateName = collectManifestStateMap.get(collectManifestEO.getState());
|
||||
collectManifestEO.setState(stateName);
|
||||
|
||||
List<String> configIdList = new ArrayList<>(); // 配置列名
|
||||
|
||||
Map<String, Object> manifestMap = objectToMap(collectManifestEO); // 对象转map
|
||||
String controlType = collectManifestEO.getControlType();
|
||||
String paramsCollectManifestId = collectManifestEO.getId();
|
||||
@@ -129,13 +136,26 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
Map<String, Object> configMap = new HashMap<>();
|
||||
String paramsConfigId = paramsConfigEO.getId();
|
||||
ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
|
||||
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
|
||||
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
|
||||
configMap.put("controlType", controlType);
|
||||
configMap.put("list", paramsConfigDataVOList);
|
||||
manifestMap.put(paramsConfigEO.getId(), configMap);
|
||||
|
||||
configIdList.add(paramsConfigEO.getId());
|
||||
});
|
||||
}
|
||||
|
||||
// 处理工程接口人
|
||||
// Map<String, Object> sdtMap = new HashMap<>();
|
||||
// sdtMap.put("id", collectManifestEO.getId());
|
||||
// sdtMap.put("state", collectManifestEO.getState());
|
||||
// sdtMap.put("dutyTerritory", StringUtils.join(dutyTerritory, ","));
|
||||
// sdtMap.put("dataValue", collectManifestEO.getSdt());
|
||||
// manifestMap.put("sdt", sdtMap);
|
||||
|
||||
// 配置列名数组
|
||||
manifestMap.put("configIds", configIdList);
|
||||
|
||||
listMap.add(manifestMap);
|
||||
});
|
||||
|
||||
@@ -149,14 +169,24 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
* @param paramsCollectManifestEO
|
||||
* @return
|
||||
*/
|
||||
private List<ParamsConfigDataVO> getConfigDataVOList(String controlType, ParamsConfigDataEO paramsConfigDataEO, ParamsReportDetailEO paramsCollectManifestEO) {
|
||||
private List<ParamsConfigDataVO> getConfigDataVOList(String controlType, ParamsConfigEO paramsConfigEO, ParamsConfigDataEO paramsConfigDataEO, ParamsReportDetailEO paramsCollectManifestEO) {
|
||||
List<ParamsConfigDataVO> paramsConfigDataVOList = new ArrayList<>();
|
||||
String templateId = null;
|
||||
String templateName = null;
|
||||
if (StringUtils.isNotEmpty(paramsCollectManifestEO.getFileTemplateConnectId())) {
|
||||
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(paramsCollectManifestEO.getFileTemplateConnectId());
|
||||
|
||||
if (CollectionUtil.isNotEmpty(ossFiles)) {
|
||||
templateId = ossFiles.get(0).getId();
|
||||
templateName = ossFiles.get(0).getFileName();
|
||||
}
|
||||
}
|
||||
if (ControlTypeEnum.TEXT.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO configDataVO = new ParamsConfigDataVO();
|
||||
configDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
configDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
configDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
configDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
configDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
@@ -168,6 +198,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO configDataVO = new ParamsConfigDataVO();
|
||||
configDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
configDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
configDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
configDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
configDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
@@ -179,6 +210,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO configDataVO = new ParamsConfigDataVO();
|
||||
configDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue());
|
||||
configDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
configDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
configDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
configDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
@@ -190,6 +222,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO configDataVO = new ParamsConfigDataVO();
|
||||
configDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
configDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
configDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
configDataVO.setTemplateId(templateId);
|
||||
configDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
configDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
@@ -200,6 +235,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
@@ -209,6 +245,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
@@ -220,6 +257,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
@@ -229,6 +267,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO();
|
||||
pullMoreConfigDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue());
|
||||
pullMoreConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullMoreConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullMoreConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullMoreConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
@@ -240,6 +279,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
@@ -249,6 +289,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
@@ -259,6 +302,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
@@ -268,6 +312,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
@@ -278,6 +325,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO();
|
||||
pullMoreConfigDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue());
|
||||
pullMoreConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullMoreConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullMoreConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullMoreConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
@@ -287,6 +335,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
@@ -297,6 +348,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
@@ -306,6 +358,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
@@ -315,6 +368,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
@@ -331,7 +387,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
String[] controlValueStr = controlValue.split(",");
|
||||
for (int i = 0; i < controlValueStr.length; i++) {
|
||||
Map<String, String> controlValueMap = new HashMap<>();
|
||||
controlValueMap.put("lable", controlValueStr[i]);
|
||||
controlValueMap.put("label", controlValueStr[i]);
|
||||
controlValueMap.put("value", controlValueStr[i]);
|
||||
controlValueMapList.add(controlValueMap);
|
||||
}
|
||||
|
||||
+7
-4
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportEO;
|
||||
import com.jero.modules.cert.report.mapper.ParamsReportEOMapper;
|
||||
import com.jero.modules.cert.report.service.IParamsReportEOService;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -100,9 +101,10 @@ public class ParamsReportEOServiceImpl extends ServiceImpl<ParamsReportEOMapper,
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSync(String oldParamsManifestId) {
|
||||
public boolean isSync(String oldParamsManifestId, Integer version) {
|
||||
LambdaQueryWrapper<ParamsReportEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ParamsReportEO::getOldParamsManifestId, oldParamsManifestId);
|
||||
queryWrapper.eq(ParamsReportEO::getOldParamsManifestId, oldParamsManifestId)
|
||||
.eq(ParamsReportEO::getVersion, version);
|
||||
int num = count(queryWrapper);
|
||||
if (num > 0) {
|
||||
return true; // 上报过
|
||||
@@ -113,9 +115,10 @@ public class ParamsReportEOServiceImpl extends ServiceImpl<ParamsReportEOMapper,
|
||||
}
|
||||
|
||||
@Override
|
||||
public ParamsReportEO queryByOldParamsManifestId(String oldParamsManifestId) {
|
||||
public ParamsReportEO queryByOldParamsManifestId(String oldParamsManifestId, Integer version) {
|
||||
LambdaQueryWrapper<ParamsReportEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ParamsReportEO::getOldParamsManifestId, oldParamsManifestId);
|
||||
queryWrapper.eq(ParamsReportEO::getOldParamsManifestId, oldParamsManifestId)
|
||||
.eq(ParamsReportEO::getVersion, version);
|
||||
return getOne(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
+8
-2
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
||||
import com.jero.modules.cert.template.service.IParamsInfoEOService;
|
||||
@@ -231,9 +232,14 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
||||
@ApiOperation(value="参数项基本信息表-发布版本", notes="参数项基本信息表-发布版本")
|
||||
@GetMapping(value = "/publish")
|
||||
// @RequiresPermissions("params:paramsInfo:publish")
|
||||
public Result<?> publish(@RequestParam(name="paramsTemplateId") String paramsTemplateId) {
|
||||
public Result<?> publish(@RequestParam(name="paramsTemplateId") String paramsTemplateId,
|
||||
@RequestParam(name="cut") String cut) {
|
||||
int publishVersion = paramsInfoPublishEOService.publishTemplate(paramsTemplateId);
|
||||
return Result.OK("发布版本:" + publishVersion + "成功!");
|
||||
if (CutEnum.CN.equals(cut)) {
|
||||
return Result.OK("发布版本:" + publishVersion + "成功!");
|
||||
} else {
|
||||
return Result.OK("Publish version:" + publishVersion + "success!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user