From dd1d377063269906a95774aa61c2a95492522a07 Mon Sep 17 00:00:00 2001 From: dx <1242347652@qq.com> Date: Mon, 7 Jul 2025 09:54:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=AE=B0=E5=BD=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=BF=AE=E7=A8=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EnterpriseInspectionsMapper.java | 2 + .../EnterpriseInspectionsServiceImpl.java | 19 ++++--- .../EnterpriseInspections.xml | 55 +++++++++++++++++++ .../src/main/resources/application-local.yaml | 8 +-- 4 files changed, 73 insertions(+), 11 deletions(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterpriseinspections/EnterpriseInspectionsMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterpriseinspections/EnterpriseInspectionsMapper.java index 8498e47..222f27c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterpriseinspections/EnterpriseInspectionsMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterpriseinspections/EnterpriseInspectionsMapper.java @@ -53,6 +53,8 @@ public interface EnterpriseInspectionsMapper extends BaseMapperX inspectionsByLogStatus(Page page, @Param("params") EnterpriseInspectionsPageReqVO pageReqVO); + //整改数据 List inspectionsCorrectionList(); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterpriseinspections/EnterpriseInspectionsServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterpriseinspections/EnterpriseInspectionsServiceImpl.java index ae68a2c..83f4d29 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterpriseinspections/EnterpriseInspectionsServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterpriseinspections/EnterpriseInspectionsServiceImpl.java @@ -269,8 +269,13 @@ public class EnterpriseInspectionsServiceImpl implements EnterpriseInspectionsSe } } - //TODO 按状态查询不好用 - final PageResult enterpriseInspectionsDOPageResult = enterpriseInspectionsMapper.selectPage(pageReqVO); + //TODO 按状态查询不好用 inspectionsByLogStatus +// final PageResult enterpriseInspectionsDOPageResult = enterpriseInspectionsMapper.selectPage(pageReqVO); + Page page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()); + final IPage enterpriseInspectionsDOIPage = enterpriseInspectionsMapper.inspectionsByLogStatus(page, pageReqVO); + final PageResult enterpriseInspectionsDOPageResult = new PageResult<>(enterpriseInspectionsDOIPage.getRecords(), enterpriseInspectionsDOIPage.getTotal()); + + if ( enterpriseInspectionsDOPageResult.getList() != null && enterpriseInspectionsDOPageResult.getList().size() > 0 ) { enterpriseInspectionsDOPageResult.getList().forEach(item->{ @@ -356,11 +361,11 @@ public class EnterpriseInspectionsServiceImpl implements EnterpriseInspectionsSe }); } - if (pageReqVO.getInspectionsStatus() != null) { - final List collect = enterpriseInspectionsDOPageResult.getList().stream().filter(item -> item.getInspectionStatus() == pageReqVO.getInspectionsStatus()).collect(Collectors.toList()); - enterpriseInspectionsDOPageResult.setList(collect); - enterpriseInspectionsDOPageResult.setTotal(Long.valueOf(collect.size())); - } +// if (pageReqVO.getInspectionsStatus() != null) { +// final List collect = enterpriseInspectionsDOPageResult.getList().stream().filter(item -> item.getInspectionStatus() == pageReqVO.getInspectionsStatus()).collect(Collectors.toList()); +// enterpriseInspectionsDOPageResult.setList(collect); +// enterpriseInspectionsDOPageResult.setTotal(Long.valueOf(collect.size())); +// } return enterpriseInspectionsDOPageResult; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/enterpriseinspections/EnterpriseInspections.xml b/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/enterpriseinspections/EnterpriseInspections.xml index 215baa8..c0f379a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/enterpriseinspections/EnterpriseInspections.xml +++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/enterpriseinspections/EnterpriseInspections.xml @@ -38,4 +38,59 @@ ei.enterprise_id = #{params.enterpriseId} and il.inspections_id is NOT NULL + diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 989f2e8..bf0f633 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -1,5 +1,5 @@ server: - port: 48080 + port: 48088 --- #################### 数据库相关配置 #################### spring: @@ -46,7 +46,7 @@ spring: primary: master datasource: master: - url: jdbc:mysql://188.188.3.232:3306/huanbao?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://82.156.141.150:3306/huanbao?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 @@ -54,8 +54,8 @@ spring: # url: jdbc:dm://127.0.0.1:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 # url: jdbc:kingbase8://127.0.0.1:54321/test # 人大金仓 KingbaseES 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/postgres # OpenGauss 连接的示例 - username: root - password: 123456 + username: huanbao + password: DF64GBXeC4TkZcAP slave: # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://192.168.2.5:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true