From 14e89d68cf0ea22cb1ef75a91f95fd9ab1cc7b13 Mon Sep 17 00:00:00 2001 From: caihaohan Date: Tue, 26 Sep 2023 07:42:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=81=E6=A0=87=E6=96=B0=E5=A2=9E-?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=9B=9E=E6=98=BE=E7=A8=BD=E6=9F=A5=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/service/ILawsCommonService.java | 8 ++++++++ .../service/impl/LawsCommonServiceImpl.java | 19 ++++++++++++++++++- .../controller/LawsEnterpriseController.java | 8 ++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/laws-modules/src/main/java/com/jero/modules/laws/common/service/ILawsCommonService.java b/laws-modules/src/main/java/com/jero/modules/laws/common/service/ILawsCommonService.java index 5fab6295..fb4ede15 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/common/service/ILawsCommonService.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/common/service/ILawsCommonService.java @@ -5,6 +5,7 @@ import com.jero.modules.laws.common.vo.ManyStandardSelectionBox; import com.jero.modules.laws.common.vo.ManyStandardSelectionBoxVO; import com.jero.modules.tag.entity.LawsTag; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; @@ -140,4 +141,11 @@ public interface ILawsCommonService { * @param tableName */ void templateDownload(HttpServletResponse response, String tableName); + + /** + * 导入 + * @param request + * @param tableName + */ + void importExcelWithData(HttpServletRequest request, String tableName); } diff --git a/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java index a5e8891e..538db5e4 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java @@ -890,8 +890,19 @@ public class LawsCommonServiceImpl implements ILawsCommonService { if (initMap == null) { throw new JeroBootException(ResultCommon.NO_CORRESPONDING_DATA_FOUND); } + + Map stringObjectMap = processResultMap(initMap, fieldList); + + if (module.equals(TableNameEnum.ENTERPRISE_STANDARDS.getValue())) { + // 企标独有的稽查内容列表 + LambdaQueryWrapper esIcWrapper = new LambdaQueryWrapper<>(); + esIcWrapper.eq(EnterpriseStandardInspectContent::getStandardId, id); + List list = esInspectContentService.list(esIcWrapper); + stringObjectMap.put("checkList", list); + } + // 对返回的字段做处理 - return processResultMap(initMap, fieldList); + return stringObjectMap; } /** @@ -1263,6 +1274,12 @@ public class LawsCommonServiceImpl implements ILawsCommonService { } } + @Override + public void importExcelWithData(HttpServletRequest request, String tableName) { + //TODO 该死的导入 + + } + /** * 设置导入模板的第三行提示内容 * @param row3 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 3a314e8e..70e0f006 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 @@ -26,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; @@ -213,4 +214,11 @@ public class LawsEnterpriseController { public void templateDownload(HttpServletResponse response) { lawsCommonService.templateDownload(response, TableNameEnum.ENTERPRISE_STANDARDS.getTableName()); } + + @AutoLog(value = "企业法规标准-导入") + @ApiOperation(value="企业法规标准-导入", notes="企业法规标准-导入") + @GetMapping("/importExcelWithData") + public void importExcelWithData(HttpServletRequest request) { + lawsCommonService.importExcelWithData(request, TableNameEnum.ENTERPRISE_STANDARDS.getTableName()); + } }