diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BPlanEnterpriseController.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BPlanEnterpriseController.java index caffbf1..c792a46 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BPlanEnterpriseController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BPlanEnterpriseController.java @@ -216,9 +216,13 @@ public class BPlanEnterpriseController extends BaseController { @ApiOperation(value = "导出执法结果") @PostMapping("/export") public void export(HttpServletResponse response, checkResultRequest req) { + if (req.getDistrict() != null && req.getDistrict().contains("000000000")) { + String result = req.getDistrict().replaceAll("0+$", ""); + req.setDistrict(result); + } List list = bPlanEnterpriseMapper.getZhifa(req); ExcelUtil util = new ExcelUtil(BPlanEnterpriseZhifaResponse.class); - util.exportExcel(response, list, "导出计划管理"); + util.exportExcel(response, list, "导出执法结果"); } /** @@ -232,12 +236,12 @@ public class BPlanEnterpriseController extends BaseController { String district = a.getDistrict(); String county = district.substring(0, 7); String paddedString = String.format("%s%s", county, "000000000"); - List countyList= bAdministrativeService.getBydistinct(district,paddedString); + List countyList = bAdministrativeService.getBydistinct(district, paddedString); String formattedData = String.join("-", countyList); a.setDistrict(formattedData); } ExcelUtil util = new ExcelUtil(BPlanEnterprise.class); - util.exportExcel(response,list, "计划管理数据"); + util.exportExcel(response, list, "计划管理数据"); } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/BPlanEnterpriseServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/BPlanEnterpriseServiceImpl.java index 71c8bba..f49f63d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/BPlanEnterpriseServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/BPlanEnterpriseServiceImpl.java @@ -53,6 +53,11 @@ public class BPlanEnterpriseServiceImpl extends ServiceImpl getZhifa(checkResultRequest req) { + + if(req.getDistrict()!=null && req.getDistrict().contains("000000000")){ + String result = req.getDistrict().replaceAll("0+$", ""); + req.setDistrict(result); + } return bPlanEnterpriseMapper.getZhifa(req); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/UserServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/UserServiceImpl.java index a903942..ebf6183 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/UserServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/impl/UserServiceImpl.java @@ -36,7 +36,7 @@ public class UserServiceImpl extends ServiceImpl imple public Object getUserByCode(String code) { RestTemplate restTemplate = new RestTemplate(); // 先请求accessToken - String accessTokenUrl = "http://2.46.4.197:8090/sso-server/oauth2/accessToken"; + String accessTokenUrl = "http://180.108.205.123:8090/sso-server/oauth2/accessToken"; HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.MULTIPART_FORM_DATA); MultiValueMap map = new LinkedMultiValueMap(); @@ -53,7 +53,7 @@ public class UserServiceImpl extends ServiceImpl imple // 获取accessToken String accessToken=data.get("accessToken").toString(); // 获取用户 - String userUrl = "http://2.46.4.197:8090/sso-server/oauth2/getUser"; + String userUrl = "http://180.108.205.123:8090/sso-server/oauth2/getUser"; headers = new HttpHeaders(); headers.setContentType(MediaType.MULTIPART_FORM_DATA); map = new LinkedMultiValueMap(); diff --git a/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml b/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml index 41177e6..ab49f24 100644 --- a/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml @@ -50,7 +50,7 @@ and update_id = #{updateId} and user_id = #{userId} and dept_id = #{deptId} - and district = #{district} + and district like concat('%', #{district}, '%') and planned_year = #{plannedYear} and plan_name like concat('%', #{planName}, '%') and plan_content = #{planContent} @@ -109,7 +109,7 @@ and s.plannedYear =#{req.plannedYear} - and s.district =#{req.district} + and s.district like concat('%', #{req.district}, '%') and s.checkStatus =#{req.checkStatus}