From a034b1f7492ddc6a11bbc26dfd1b708138be8061 Mon Sep 17 00:00:00 2001 From: dongdingding <207595406@qq.com> Date: Mon, 25 Dec 2023 08:37:15 +0800 Subject: [PATCH] BUG FIX --- .../controller/BPlanEnterpriseController.java | 7 +++-- .../entity/BPlanEnterprise.java | 2 +- .../response/BPlanEnterpriseResponse.java | 2 +- .../BPlanEnterpriseZhifaResponse.java | 28 ++++++++++++------- .../mapper/yingji/BPlanEnterpriseMapper.xml | 4 ++- 5 files changed, 27 insertions(+), 16 deletions(-) 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 a38d35d..9f6e8f4 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 @@ -33,8 +33,9 @@ import java.util.List; * @since 2023-09-07 09:43:06 */ @RestController -@RequestMapping("pharmaceuticals/bPlanEnterprise") @Api(tags = "计划企业") +@RequestMapping("pharmaceuticals/bPlanEnterprise") + @Transactional(rollbackFor = Exception.class) public class BPlanEnterpriseController extends BaseController { /** @@ -157,7 +158,7 @@ public class BPlanEnterpriseController extends BaseController { public void export(HttpServletResponse response, checkResultRequest req) { List list = bPlanEnterpriseMapper.getZhifa(req); ExcelUtil util = new ExcelUtil(BPlanEnterpriseZhifaResponse.class); - util.exportExcel(list, "导出执法结果"); + util.exportExcel(response,list, "导出执法结果"); } /** @@ -168,7 +169,7 @@ public class BPlanEnterpriseController extends BaseController { public void exportplan(HttpServletResponse response, BPlanEnterprise bPlanEnterprise) { List list = bPlanEnterpriseService.selectBPlanEnterpriseList(bPlanEnterprise); ExcelUtil util = new ExcelUtil(BPlanEnterpriseResponse.class); - util.exportExcel(response, list, "计划管理数据"); + util.exportExcel(response,list, "计划管理数据"); } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/BPlanEnterprise.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/BPlanEnterprise.java index ac5d9cd..809b3c2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/BPlanEnterprise.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/BPlanEnterprise.java @@ -134,7 +134,7 @@ public class BPlanEnterprise { /** * 是否重点企业1:是2:否 */ - @Excel(name = "是否省重点", readConverterExp = "1=是,2=否") + @ApiModelProperty(value = "是否重点企业1:是2:否") private Integer isPoint; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/response/BPlanEnterpriseResponse.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/response/BPlanEnterpriseResponse.java index 3ce6973..f74ef94 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/response/BPlanEnterpriseResponse.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/response/BPlanEnterpriseResponse.java @@ -128,7 +128,7 @@ public class BPlanEnterpriseResponse extends BaseEntity { /** * 是否重点企业1:是2:否 */ - @Excel(name = "是否省重点", readConverterExp = "1=是,2=否") + @ApiModelProperty(value = "是否重点企业1:是2:否") private Integer isPoint; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/response/BPlanEnterpriseZhifaResponse.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/response/BPlanEnterpriseZhifaResponse.java index c00bc1d..37653ed 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/response/BPlanEnterpriseZhifaResponse.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/response/BPlanEnterpriseZhifaResponse.java @@ -46,8 +46,7 @@ public class BPlanEnterpriseZhifaResponse { /** * 创建时间 - */ - @Excel(name = "年份", dateFormat = "yyyy-MM-dd") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd ", timezone = "GMT+8") @DateTimeFormat(pattern = "yyyy-MM-dd") @ApiModelProperty(value = "创建时间") @@ -94,10 +93,15 @@ public class BPlanEnterpriseZhifaResponse { * 行政区划 */ @ApiModelProperty(value = "行政区划") - @Excel(name = "行政区划") + private String district; + /** + * 翻译行政区划 + */ + @Excel(name = "行政区划") + private String districtcounty; /** * 计划年份 */ @@ -106,6 +110,14 @@ public class BPlanEnterpriseZhifaResponse { private String plannedYear; + + /** + * 计划月份 + */ + @Excel(name = "计划月份") + @ApiModelProperty(value = "计划月份") + private String plannedMonth; + /** * 是否重点企业1:是2:否 */ @@ -156,13 +168,6 @@ public class BPlanEnterpriseZhifaResponse { private String lawHierarchy; - /** - * 计划月份 - */ - @ApiModelProperty(value = "计划月份") - private String plannedMonth; - - /** * 0:草稿 1:正式 */ @@ -173,6 +178,7 @@ public class BPlanEnterpriseZhifaResponse { /** * 0:未检查 1:已检查 */ + @Excel(name="执法状态",readConverterExp = "0=未检查,1=已检查") @ApiModelProperty(value = "0:未检查 1:已检查") private Long checkStatus; @@ -235,4 +241,6 @@ public class BPlanEnterpriseZhifaResponse { private String uuto; + + } diff --git a/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml b/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml index 7f4a4dd..9dd5f98 100644 --- a/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/yingji/BPlanEnterpriseMapper.xml @@ -148,10 +148,12 @@ c.RISK_LEVEL as riskLevel, c.STAND_LEVEL as standLevel, c.EXAMINE_END_TIME as examineEndTime, - CASE WHEN b.ent_code IS NOT NULL THEN 1 ELSE 2 END AS isPoint + CASE WHEN b.ent_code IS NOT NULL THEN 1 ELSE 2 END AS isPoint, + CONCAT(d.district,'-', d.county) AS districtcounty FROM b_plan_enterprise a LEFT JOIN b_key_enterprise b ON a.enterprise_id = b.ent_code LEFT JOIN b_enterprise_new c ON a.enterprise_id = c.enterprise_id + left join b_administrative_division d on a.district=d.county_code and a.planned_year =#{req.plannedYear}