diff --git a/laws-modules/src/main/java/com/jero/modules/laws/enterprise/entity/vo/EnterpriseStandardPlanVo.java b/laws-modules/src/main/java/com/jero/modules/laws/enterprise/entity/vo/EnterpriseStandardPlanVo.java index 6037f5e9..e928bf97 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/enterprise/entity/vo/EnterpriseStandardPlanVo.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/enterprise/entity/vo/EnterpriseStandardPlanVo.java @@ -51,15 +51,16 @@ public class EnterpriseStandardPlanVo { @Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") private String authDept; + @Excel(name = "企业标准代号", width = 15, orderNum = "1", dicCode = "enterprise_standard_code") + @Dict(dicCode = "enterprise_standard_code") + @ApiModelProperty(value = "企业标准代号") + private String enStandardCode; + @Excel(name = "配合单位", width = 15, orderNum = "1", dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") @Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") @ApiModelProperty(value = "配合单位") private String cooperationUnit; - @Excel(name = "企业标准代号", width = 15, orderNum = "1") - @ApiModelProperty(value = "企业标准代号") - private String enStandardCode; - @Excel(name = "主起草人", width = 15, orderNum = "1", dictTable = "sys_user", dicCode = "id", dicText = "username") @Dict(dictTable = "sys_user", dicCode = "id", dicText = "username") @ApiModelProperty(value = "主起草人") diff --git a/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsEnterpriseController.java b/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsEnterpriseController.java index cbaf0749..823c5855 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsEnterpriseController.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/standard/controller/LawsEnterpriseController.java @@ -234,6 +234,17 @@ public class LawsEnterpriseController { return Result.OK(); } + @AutoLog(value = "企业法规标准-老法规企标数据库Excel导入") + @ApiOperation(value="企业法规标准-老法规企标数据库Excel导入", notes="企业法规标准-老法规企标数据库Excel导入") + @PostMapping("/importExcelOldSystem") + public Result importExcelOldSystem(@RequestParam("file") MultipartFile file) { + List errorMessages = lawsCommonService.importExcelWithData(file, TableNameEnum.ENTERPRISE_STANDARDS.getValue()); + if (errorMessages.size() > 0) { + return Result.error(MessageUtils.getMessage(ResultCommon.IMPORT_ERROR), errorMessages); + } + return Result.OK(); + } + /** * 企标详情-评分详情 *