认证-参数项-变更:添加"标题"控件类型
This commit is contained in:
+5
@@ -137,4 +137,9 @@ public class ParamsCollectManifestBaseEO implements Serializable {
|
||||
@Excel(name = "参数清单id", width = 15)
|
||||
@ApiModelProperty(value = "参数清单id")
|
||||
private String paramsManifestId;
|
||||
|
||||
/**标题默认值*/
|
||||
@Excel(name = "默认值", width = 15)
|
||||
@ApiModelProperty(value = "标题默认值")
|
||||
private String titleDefaultValue;
|
||||
}
|
||||
|
||||
+8
-5
@@ -1,11 +1,11 @@
|
||||
package com.jero.modules.cert.collect.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 参数收集清单
|
||||
@@ -17,5 +17,8 @@ public interface ParamsCollectManifestEOMapper extends BaseMapper<ParamsCollectM
|
||||
|
||||
List<ParamsCollectManifestEO> listInfo(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
|
||||
|
||||
// 查询控件类型为 标题的 参数项
|
||||
List<ParamsCollectManifestEO> listInfoOfTitle(@Param("paramsManifestId") String paramsManifestId);
|
||||
|
||||
IPage pageInfo(@Param("page") IPage page, @Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
|
||||
}
|
||||
|
||||
+10
@@ -29,6 +29,7 @@
|
||||
<result column="change_flag" property="changeFlag" />
|
||||
<result column="del_flag" property="delFlag" />
|
||||
<result column="add_flag" property="addFlag" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
</resultMap>
|
||||
<sql id="BaseQuerySql">
|
||||
<where>
|
||||
@@ -79,10 +80,19 @@
|
||||
order by del_flag desc, add_flag desc, change_flag desc, nio_number asc
|
||||
</select>
|
||||
|
||||
<select id="listInfoOfTitle" resultMap="ParamsCollectManifestEOResultMap">
|
||||
select *
|
||||
from params_collect_manifest
|
||||
<include refid="BaseQuerySql"/>
|
||||
and control_type = '11'
|
||||
order by del_flag desc, add_flag desc, change_flag desc, nio_number asc
|
||||
</select>
|
||||
|
||||
<select id="pageInfo" resultMap="ParamsCollectManifestEOResultMap">
|
||||
select *
|
||||
from params_collect_manifest
|
||||
<include refid="BaseQuerySql"/>
|
||||
and control_type != '11'
|
||||
order by del_flag desc, add_flag desc, change_flag desc, nio_number asc
|
||||
</select>
|
||||
|
||||
|
||||
+2
@@ -26,6 +26,7 @@
|
||||
<result column="dre" property="dre" />
|
||||
<result column="deadline" property="deadline" />
|
||||
<result column="params_manifest_id" property="paramsManifestId" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
</resultMap>
|
||||
<sql id="BaseQuerySql">
|
||||
<where>
|
||||
@@ -66,6 +67,7 @@
|
||||
select *
|
||||
from params_collect_manifest_history
|
||||
<include refid="BaseQuerySql"/>
|
||||
and control_type != '11'
|
||||
order by nio_number asc
|
||||
</select>
|
||||
</mapper>
|
||||
+16
@@ -1545,6 +1545,22 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
}
|
||||
|
||||
// 单独添加 控件类型为标题的参数项
|
||||
if (!isSync) { // 未上报
|
||||
List<ParamsCollectManifestEO> paramsCollectManifestEOListOfTitle = paramsCollectManifestEOMapper.listInfoOfTitle(paramsManifestId);
|
||||
if(CollectionUtil.isNotEmpty(paramsCollectManifestEOListOfTitle)) {
|
||||
for(ParamsCollectManifestEO item : paramsCollectManifestEOListOfTitle) {
|
||||
ParamsReportDetailEO addReportDetailEO = new ParamsReportDetailEO();
|
||||
BeanUtils.copyProperties(item, addReportDetailEO);
|
||||
String reportDetailId = UUID.randomUUID().toString().replace("-","");
|
||||
addReportDetailEO.setId(reportDetailId);
|
||||
addReportDetailEO.setParamsManifestId(reportId);
|
||||
addReportDetailEO.setSyncTime(syncTime);
|
||||
addReportDetailEOList.add(addReportDetailEO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 复制认证类别参数
|
||||
List<String> nioNumberList = paramsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getNioNumber).collect(Collectors.toList());
|
||||
List<CertCategoryParamsInfoPublishEO> certCategoryParamsInfoPublishEOS = certCategoryParamsInfoPublishEOService.queryListByVersionAndNio(paramsManifestEO.getParamsTemplateId(), paramsManifestEO.getParamsTemplatePublishVersion(), nioNumberList);
|
||||
|
||||
+1
@@ -27,6 +27,7 @@
|
||||
<result column="deadline" property="deadline" />
|
||||
<result column="params_manifest_id" property="paramsManifestId" />
|
||||
<result column="sync_time" property="syncTime" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="BaseQuerySql">
|
||||
|
||||
+7
-2
@@ -106,7 +106,7 @@ public class ParamsInfoEO implements Serializable {
|
||||
private String certCategory;
|
||||
|
||||
/**控件类型*/
|
||||
@Excel(name = "*控件类型", width = 15, replace = {"文本_1","下拉单选_2","下拉多选_3","附件_4","文本+下拉单选_5","文本+下拉多选_6","文本+附件_7","下拉单选+附件_8","下拉多选+附件_9","文本+下拉单选+附件_10"})
|
||||
@Excel(name = "*控件类型", width = 15, replace = {"文本_1","下拉单选_2","下拉多选_3","附件_4","文本+下拉单选_5","文本+下拉多选_6","文本+附件_7","下拉单选+附件_8","下拉多选+附件_9","文本+下拉单选+附件_10","标题_11"})
|
||||
@ApiModelProperty(value = "控件类型")
|
||||
private String controlType;
|
||||
|
||||
@@ -120,7 +120,12 @@ public class ParamsInfoEO implements Serializable {
|
||||
@ApiModelProperty(value = "控件备选值")
|
||||
private String controlValues;
|
||||
|
||||
/**附件模板*/
|
||||
/**标题默认值*/
|
||||
@Excel(name = "默认值", width = 15)
|
||||
@ApiModelProperty(value = "标题默认值")
|
||||
private String titleDefaultValue;
|
||||
|
||||
/**附件模板*/
|
||||
@ApiModelProperty(value = "附件模板")
|
||||
private String fileTemplateConnectId;
|
||||
|
||||
|
||||
+2
-1
@@ -20,7 +20,8 @@ public enum ControlTypeEnum {
|
||||
TEXT_FILE("文本+附件","Text+File","7"),
|
||||
PULL_SINGLE_FILE("下拉单选+附件","Pull single+File","8"),
|
||||
PULL_MORE_FILE("下拉多选+附件","Pull more+File","9"),
|
||||
TEXT_PULL_SINGLE_FILE("文本+下拉单选+附件","Text+Pull single+File","10");
|
||||
TEXT_PULL_SINGLE_FILE("文本+下拉单选+附件","Text+Pull single+File","10"),
|
||||
Title("标题","Title","11");
|
||||
|
||||
String name;
|
||||
String enName;
|
||||
|
||||
+4
@@ -21,6 +21,7 @@
|
||||
<result column="control_verify" property="controlVerify" />
|
||||
<result column="file_template_connect_id" property="fileTemplateConnectId" />
|
||||
<result column="params_template_id" property="paramsTemplateId" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ParamsInfoEOResultMapWithCert" type="com.jero.modules.cert.template.entity.ParamsInfoEO">
|
||||
@@ -43,6 +44,7 @@
|
||||
<result column="control_verify" property="controlVerify" />
|
||||
<result column="file_template_connect_id" property="fileTemplateConnectId" />
|
||||
<result column="params_template_id" property="paramsTemplateId" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
<collection property="certCategoryParamsInfoEOList" javaType="java.util.List" ofType="com.jero.modules.cert.template.entity.CertCategoryParamsInfoEO">
|
||||
<id column="ccpi_id" property="id" />
|
||||
<result column="ccpi_params_number" property="paramsNumber" />
|
||||
@@ -74,6 +76,7 @@
|
||||
<result column="control_verify" property="controlVerify" />
|
||||
<result column="file_template_connect_id" property="fileTemplateConnectId" />
|
||||
<result column="params_template_id" property="paramsTemplateId" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
<collection property="certCategoryParamsInfoEnExportList" javaType="java.util.List" ofType="com.jero.modules.cert.template.vo.CertCategoryParamsInfoEnExport">
|
||||
<id column="ccpi_id" property="id" />
|
||||
<result column="ccpi_params_number" property="paramsNumber" />
|
||||
@@ -105,6 +108,7 @@
|
||||
pi.control_verify as control_verify,
|
||||
pi.file_template_connect_id as file_template_connect_id,
|
||||
pi.params_template_id as params_template_id,
|
||||
pi.title_default_value as title_default_value,
|
||||
ccpi.id as ccpi_id,
|
||||
ccpi.params_number as ccpi_params_number,
|
||||
ccpi.params_name as ccpi_params_name,
|
||||
|
||||
+1
@@ -22,6 +22,7 @@
|
||||
<result column="file_template_connect_id" property="fileTemplateConnectId" />
|
||||
<result column="params_template_id" property="paramsTemplateId" />
|
||||
<result column="version" property="version" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getNewestVersion" resultType="java.lang.Integer" parameterType="java.lang.String">
|
||||
|
||||
+54
-22
@@ -840,7 +840,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
if (numSheet == 0) { // 企业参数表
|
||||
if (CutEnum.EN.getValue().equals(cut)) {
|
||||
String fields[] ={ "*NIO Number", "*Is Must", "*Params Name","*Params Batch","*Duty Territory",
|
||||
"Description", "*Control Type", "Control Verify", "Control Values", "File Template"};
|
||||
"Description", "*Control Type", "Control Verify", "Control Values", "Default Value", "File Template"};
|
||||
params.setImportFields(fields);
|
||||
|
||||
ExcelImportResult<ParamsInfoEnImport> resultEn = ExcelImportUtil.importExcelMore(excelfile,ParamsInfoEnImport.class, params);
|
||||
@@ -848,7 +848,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
copyParamsInfoList(paramsInfoEOListEn, paramsInfoEOList);
|
||||
} else {
|
||||
String fields[] ={ "*NIO编号", "*是否必填", "*参数名称","*参数批次","*责任领域",
|
||||
"参数说明", "*控件类型", "控件校验", "控件备选值", "附件模板"};
|
||||
"参数说明", "*控件类型", "控件校验", "控件备选值", "默认值", "附件模板"};
|
||||
params.setImportFields(fields);
|
||||
|
||||
ExcelImportResult<ParamsInfoCnImport> result = ExcelImportUtil.importExcelMore(excelfile, ParamsInfoCnImport.class, params);
|
||||
@@ -1255,6 +1255,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
resultMap = validateMustAndLength(controlValues, "控件备选值", "Control Values", IsMustEnum.YES.getValue(), "500", false, cut);
|
||||
} else {
|
||||
resultMap = validateMustAndLength(controlValues, "控件备选值", "Control Values", IsMustEnum.NO.getValue(), "500", false, cut);
|
||||
dto.setControlValues(null);
|
||||
}
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
@@ -1267,51 +1268,81 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
|| ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
resultMap = validateMustAndLength(controlVerify, "控件校验", "Control Verify", IsMustEnum.YES.getValue(), "50", false, cut);
|
||||
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
resultMap = getCodeByName(controlVerify,"控件校验", "Control Verify", "enum",controlVerifyEnumMap,null,null,cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
controlVerify = (String)resultMap.get("value");
|
||||
dto.setControlVerify(controlVerify);
|
||||
|
||||
} else {
|
||||
resultMap = validateMustAndLength(controlVerify, "控件校验", "Control Verify", IsMustEnum.NO.getValue(), "50", false, cut);
|
||||
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
resultMap = getCodeByName(controlVerify,"控件校验", "Control Verify", "enum",controlVerifyEnumMap,null,null,cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
|
||||
dto.setControlVerify(null);
|
||||
}
|
||||
|
||||
|
||||
// 标题默认值
|
||||
String titleDefaultValue = dto.getTitleDefaultValue();
|
||||
if (ControlTypeEnum.Title.getValue().equals(controlType)) {
|
||||
resultMap = validateMustAndLength(titleDefaultValue,"默认值", "Default Value", IsMustEnum.YES.getValue(),"100",false, cut);
|
||||
} else {
|
||||
resultMap = validateMustAndLength(controlVerify, "默认值", "Default Value", IsMustEnum.NO.getValue(), "100", false, cut);
|
||||
dto.setTitleDefaultValue(null);
|
||||
}
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
resultMap = getCodeByName(controlVerify,"控件校验", "Control Verify", "enum",controlVerifyEnumMap,null,null,cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
controlVerify = (String)resultMap.get("value");
|
||||
dto.setControlVerify(controlVerify);
|
||||
|
||||
// 附件模板
|
||||
String fileTemplateName = dto.getFileTemplateName();
|
||||
if (StringUtils.isNotBlank(fileTemplateName)) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
fileTemplateName = fileTemplateName.replace(",",",");
|
||||
fileTemplateName = fileTemplateName.replace(",", ",");
|
||||
if (fileTemplateName.contains(",")) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += "附件模板只能上传一个文件;";
|
||||
} else {
|
||||
errorMsg += "File template only can upload one;";
|
||||
}
|
||||
}
|
||||
for (String fileName : fileTemplateName.split(",")) {
|
||||
List<File> nowFileList = FileUnZip.readFileByFilename(filepath, fileName,null,null,null,null,null);
|
||||
List<File> nowFileList = FileUnZip.readFileByFilename(filepath, fileName, null, null, null, null, null);
|
||||
// List<File> nowFileList = FileUnZip.readFileByFilename(filepath, fileName);
|
||||
if (nowFileList.size() == 0) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += "附件模板压缩包中没有" + fileName + "文件; ";
|
||||
} else {
|
||||
errorMsg += "File template " + fileName + "isn't present in the cabinet;";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
try {
|
||||
FileInputStream input = new FileInputStream(nowFileList.get(0));
|
||||
MultipartFile multipartFile =
|
||||
new MockMultipartFile(nowFileList.get(0).getName(), nowFileList.get(0).getName(), "text/plain", input);
|
||||
//文件存入文件表
|
||||
OSSFile ossFile = ossFileService.uploadLocalOfCos(multipartFile, "", null,null);
|
||||
if (ObjectUtils.isNotEmpty(ossFile)) {
|
||||
sb.append(ossFile.getId() + ",");
|
||||
if (ControlTypeEnum.FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
try {
|
||||
FileInputStream input = new FileInputStream(nowFileList.get(0));
|
||||
MultipartFile multipartFile =
|
||||
new MockMultipartFile(nowFileList.get(0).getName(), nowFileList.get(0).getName(), "text/plain", input);
|
||||
//文件存入文件表
|
||||
OSSFile ossFile = ossFileService.uploadLocalOfCos(multipartFile, "", null, null);
|
||||
if (ObjectUtils.isNotEmpty(ossFile)) {
|
||||
sb.append(ossFile.getId() + ",");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} else {
|
||||
dto.setFileTemplateName(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1321,6 +1352,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
dto.setFileTemplateName(fileTemplateId);
|
||||
}
|
||||
}
|
||||
|
||||
if (countError > 0) {
|
||||
stringMessage.add(errorMsg);
|
||||
}
|
||||
@@ -1513,7 +1545,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldNameCn + "不能超过" + dbLength + "个字符;";
|
||||
} else {
|
||||
errorMsg += fieldNameEn + " can not be more than" + dbLength + "char;";
|
||||
errorMsg += fieldNameEn + " can not be more than " + dbLength + " char;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
+5
@@ -67,6 +67,11 @@ public class ParamsInfoCnImport {
|
||||
@ApiModelProperty(value = "控件备选值")
|
||||
private String controlValues;
|
||||
|
||||
/**标题默认值*/
|
||||
@Excel(name = "默认值", width = 15)
|
||||
@ApiModelProperty(value = "标题默认值")
|
||||
private String titleDefaultValue;
|
||||
|
||||
/**附件模板*/
|
||||
@ApiModelProperty(value = "附件模板")
|
||||
private String fileTemplateConnectId;
|
||||
|
||||
+6
-1
@@ -89,7 +89,7 @@ public class ParamsInfoEnExport {
|
||||
private String certCategory;
|
||||
|
||||
/**控件类型*/
|
||||
@Excel(name = "*Control Type", width = 15, replace = {"Text_1","Pull single_2","Pull more_3","File_4","Text+Pull single_5","Text+Pull more_6","Text+File_7","Pull single+File_8","Pull more+File_9","Text+Pull single+File_10"})
|
||||
@Excel(name = "*Control Type", width = 15, replace = {"Text_1","Pull single_2","Pull more_3","File_4","Text+Pull single_5","Text+Pull more_6","Text+File_7","Pull single+File_8","Pull more+File_9","Text+Pull single+File_10","Title_11"})
|
||||
@ApiModelProperty(value = "控件类型")
|
||||
private String controlType;
|
||||
|
||||
@@ -103,6 +103,11 @@ public class ParamsInfoEnExport {
|
||||
@ApiModelProperty(value = "控件备选值")
|
||||
private String controlValues;
|
||||
|
||||
/**标题默认值*/
|
||||
@Excel(name = "Default Value", width = 15)
|
||||
@ApiModelProperty(value = "标题默认值")
|
||||
private String titleDefaultValue;
|
||||
|
||||
/**附件模板*/
|
||||
@ApiModelProperty(value = "附件模板")
|
||||
private String fileTemplateConnectId;
|
||||
|
||||
+5
@@ -67,6 +67,11 @@ public class ParamsInfoEnImport {
|
||||
@ApiModelProperty(value = "控件备选值")
|
||||
private String controlValues;
|
||||
|
||||
/**标题默认值*/
|
||||
@Excel(name = "Default Value", width = 15)
|
||||
@ApiModelProperty(value = "标题默认值")
|
||||
private String titleDefaultValue;
|
||||
|
||||
/**附件模板*/
|
||||
@ApiModelProperty(value = "附件模板")
|
||||
private String fileTemplateConnectId;
|
||||
|
||||
Reference in New Issue
Block a user