From 31df5de2de35b78f1cb587c40fd1f8bd4147a229 Mon Sep 17 00:00:00 2001 From: laozt <2721205210@qq.com> Date: Wed, 20 Dec 2023 14:09:05 +0800 Subject: [PATCH] zhang --- .../BAdministrativeDivisionController.java | 20 ++-- .../mapper/yingji/BEnterpriseNewMapper.xml | 101 +++++++++++------- .../mapper/yingji/BPlanEnterpriseMapper.xml | 50 ++++----- 3 files changed, 97 insertions(+), 74 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BAdministrativeDivisionController.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BAdministrativeDivisionController.java index 3f69e15..ffb35ee 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BAdministrativeDivisionController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BAdministrativeDivisionController.java @@ -40,11 +40,11 @@ public class BAdministrativeDivisionController extends BaseController { @Resource private IBAdministrativeDivisionService bAdministrativeDivisionService; -/** - * 查询行政区划列表 - */ -@ApiOperation(value = "查询行政区划列表", response = BAdministrativeDivision.class) -@GetMapping("/list") + /** + * 查询行政区划列表 + */ + @ApiOperation(value = "查询行政区划列表", response = BAdministrativeDivision.class) + @GetMapping("/list") public TableDataInfo list(BAdministrativeDivision bAdministrativeDivision) { startPage(); List list = bAdministrativeDivisionService.selectBAdministrativeDivisionList(bAdministrativeDivision); @@ -58,7 +58,7 @@ public class BAdministrativeDivisionController extends BaseController { @PostMapping("/export") public void export(HttpServletResponse response, BAdministrativeDivision bAdministrativeDivision) { List list = bAdministrativeDivisionService.selectBAdministrativeDivisionList(bAdministrativeDivision); - ExcelUtil util = new ExcelUtil(BAdministrativeDivision. class); + ExcelUtil util = new ExcelUtil(BAdministrativeDivision.class); util.exportExcel(response, list, "行政区划数据"); } @@ -110,12 +110,12 @@ public class BAdministrativeDivisionController extends BaseController { List listsub = bAdministrativeDivisionService.selectByDistctList(); List cascadingSelectData = new ArrayList<>(); for (BAdministrativeDistrictRequest item1 : list) { - BAdministrativeDistrictRequest parentDto = new BAdministrativeDistrictRequest(item1.getDistrictCode(),item1.getDistrict()); + BAdministrativeDistrictRequest parentDto = new BAdministrativeDistrictRequest(item1.getDistrictCode(), item1.getDistrict()); for (BAdministrativeTreeRequest item2 : listsub) { if (item2.getCountyCode() != null && !item2.getCountyCode().equals("")) { - if (item2.getCountyCode().substring(0,6).equals(item1.getDistrictCode())) { - BAdministrativeTreeRequest childDto = new BAdministrativeTreeRequest(item2.getCounty(), item2.getCountyCode(),item2.getSort()); - parentDto.addChild(childDto); + if (item2.getCountyCode().substring(0, 6).equals(item1.getDistrictCode())) { + BAdministrativeTreeRequest childDto = new BAdministrativeTreeRequest(item2.getCounty(), item2.getCountyCode(), item2.getSort()); + parentDto.addChild(childDto); } } diff --git a/ruoyi-system/src/main/resources/mapper/yingji/BEnterpriseNewMapper.xml b/ruoyi-system/src/main/resources/mapper/yingji/BEnterpriseNewMapper.xml index 64d2dfa..fc9f53f 100644 --- a/ruoyi-system/src/main/resources/mapper/yingji/BEnterpriseNewMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/yingji/BEnterpriseNewMapper.xml @@ -1,55 +1,76 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - select id, enterprise_id, enterprise_name, district, SUPERVISION_LARGE, RISK_LEVEL, STAND_LEVEL, EXAMINE_END_TIME, create_id, create_by, create_time, update_id, update_by, update_time, remark, user_id, dept_id from b_enterprise_new + select id, + enterprise_id, + enterprise_name, + district, + SUPERVISION_LARGE, + RISK_LEVEL, + STAND_LEVEL, + EXAMINE_END_TIME, + create_id, + create_by, + create_time, + update_id, + update_by, + update_time, + remark, + user_id, + dept_id + from b_enterprise_new - + - + insert into b_enterprise_new @@ -69,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" remark, user_id, dept_id, - + #{enterpriseId}, #{enterpriseName}, @@ -87,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{remark}, #{userId}, #{deptId}, - + @@ -114,11 +135,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from b_enterprise_new where id = #{id} + delete + from b_enterprise_new + where id = #{id} - delete from b_enterprise_new where id in + delete from b_enterprise_new where id in #{id} diff --git a/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml b/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml index 5c6d7af..494a118 100644 --- a/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml @@ -4,25 +4,25 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + select id, enterprise_id, @@ -37,8 +37,6 @@ dept_id, district, planned_year, - plan_name, - plan_content, is_point, enterprise_name, law_sort, @@ -66,7 +64,9 @@ and plan_name like concat('%', #{planName}, '%') and plan_content = #{planContent} and is_point = #{isPoint} - and enterprise_name like concat('%',#{enterpriseName}, '%') + and enterprise_name like + concat('%',#{enterpriseName}, '%') + @@ -109,7 +109,7 @@ and s.checkStatus =#{req.checkStatus} - and s.enterpriseName like concat('%', #{req.enterpriseName}, '%') + and s.enterpriseName like concat('%', #{req.enterpriseName}, '%') and s.rn = 1 @@ -177,11 +177,11 @@ and a.planned_year =#{req.plannedYear} - and a.ENTERPRISE_NAME like concat('%', #{req.enterpriseName}, '%') + and a.ENTERPRISE_NAME like concat('%', #{req.enterpriseName}, '%') - group by a.id order by a.id desc + group by a.id order by a.id desc