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 4378b48..a4570f1 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 @@ -223,5 +223,15 @@ public class BPlanEnterpriseController extends BaseController { return AjaxResult.success(bPlanEnterpriseService.getPlanMx(req)); } + + /** + * 批量更新状态 + */ + @ApiOperation(value = "查看计划明细") + @PostMapping("/updateIdList") + public AjaxResult updateIdList(String[] idList) { + bPlanEnterpriseService.updateIdList(idList); + return AjaxResult.success(); + } } 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 b244275..ee73afe 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 @@ -176,7 +176,7 @@ public class BPlanEnterprise implements Serializable { * 0:草稿 1:正式 */ @ApiModelProperty(value = "0:草稿 1:正式") - private Integer status =0; + private Integer status ; /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/checkResultRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/checkResultRequest.java index 6987cb8..8855bca 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/checkResultRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/checkResultRequest.java @@ -18,24 +18,18 @@ public class checkResultRequest { /** - * 行政区划 + * 计划月份 */ - @ApiModelProperty(value = "行政区划") - private String district; - + @ApiModelProperty(value = "计划月份") + private String[] plannedMonth; /** - * 检查状态 + * 行政区划 */ - @ApiModelProperty(value = "检查状态 1=已检查,2=未检查") - private Integer checkStatus; + @ApiModelProperty(value = "行政区划") + private String district; - /** - * 企业名称 - */ - @ApiModelProperty(value = "企业名称") - private String enterpriseName; } 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 83bc658..b5254e9 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 @@ -1,6 +1,7 @@ package com.ruoyi.programManagement.entity.response; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.common.annotation.Excel; @@ -18,29 +19,14 @@ public class BPlanEnterpriseZhifaResponse { /** * 编号 */ - @ApiModelProperty(value = "编号") - @Excel(name = "编号") + @TableId(type = IdType.AUTO) private Long id; - /** - * 检查表id - */ - @ApiModelProperty(value = "检查表id") - - private String longId; - - /** - * 计划id - */ - - @ApiModelProperty(value = "计划id") - private Long planId; /** * 企业id */ - @ApiModelProperty(value = "企业id") private String enterpriseId; @@ -48,7 +34,7 @@ public class BPlanEnterpriseZhifaResponse { * 创建者ID */ @ApiModelProperty(value = "创建者ID") - private Integer createId; + private Long createId; /** * 创建者 @@ -59,9 +45,9 @@ public class BPlanEnterpriseZhifaResponse { /** * 创建时间 */ - - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @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 = "创建时间") private Date createTime; @@ -69,7 +55,7 @@ public class BPlanEnterpriseZhifaResponse { * 更新者ID */ @ApiModelProperty(value = "更新者ID") - private Integer updateId; + private Long updateId; /** * 更新者 @@ -105,35 +91,102 @@ public class BPlanEnterpriseZhifaResponse { /** * 行政区划 */ - @ApiModelProperty(value = "行政区划") @Excel(name = "行政区划") private String district; /** - * 企业名称 + * 计划年份 */ + @ApiModelProperty(value = "计划年份") + @Excel(name = "计划年份") + private String plannedYear; - @ApiModelProperty(value = "企业名称") + + + + /** + * 是否重点企业1:是2:否 + */ + @ApiModelProperty(value = "是否重点企业1:是2:否") + private Integer isPoint; + + /** + * 企业主表名称 + */ + @TableField(exist = false) + @ApiModelProperty(value = "企业主表名称") + private String entprName; + + + /** + * 企业名称 + */ @Excel(name = "企业名称") + @ApiModelProperty(value = "企业名称") private String enterpriseName; /** - * 计划年份 + * 执法排序 */ + @ApiModelProperty(value = "执法排序") + private Long lawSort; - @ApiModelProperty(value = "计划年份") - @Excel(name = "计划年份") - private String plannedYear; /** - * 检查状态 + * 执法地区 + */ + @ApiModelProperty(value = "执法地区") + private String lawAreas; + + + /** + * 执法级别 + */ + @ApiModelProperty(value = "执法级别") + private String lawLevel; + + + /** + * 执法层级 + */ + @ApiModelProperty(value = "执法层级") + private String lawHierarchy; + + + /** + * 计划月份 + */ + @ApiModelProperty(value = "计划月份") + private String plannedMonth; + + + /** + * 0:草稿 1:正式 */ + @ApiModelProperty(value = "0:草稿 1:正式") + private Integer status =0; + - @ApiModelProperty(value = "检查状态 1=已检查,2=未检查") - @Excel(name = "检查状态",readConverterExp = "1=已检查,2=未检查") - private String checkStatus; + /** + * 0:未检查 1:已检查 + */ + @ApiModelProperty(value = "0:未检查 1:已检查") + private Integer checkStatus; + + /** + * 检查id + */ + @ApiModelProperty(value = "检查id") + private Integer checkId; + + + /** + * 1当月 2提前 3滞后 + */ + @ApiModelProperty(value = "1当月 2提前 3滞后") + private Integer checkAgeing; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BPlanEnterpriseMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BPlanEnterpriseMapper.java index 653a8d4..97aa085 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BPlanEnterpriseMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/mapper/BPlanEnterpriseMapper.java @@ -24,7 +24,11 @@ public interface BPlanEnterpriseMapper extends BaseMapper { */ void deleteByPlanId(@Param("planId") Long planId); - + /** + * 执法 + * @param req + * @return + */ List getZhifa(@Param("req") checkResultRequest req); @@ -94,5 +98,13 @@ public interface BPlanEnterpriseMapper extends BaseMapper { */ ListgetShouYeMxList(@Param("req") BPlanEnterprisePageRequest req); + + + /** + * 批量更新状态 + * @param idList + */ + void updateIdList(String[] idList); + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/BPlanEnterpriseService.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/BPlanEnterpriseService.java index 9b73a12..debc8a9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/BPlanEnterpriseService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/service/BPlanEnterpriseService.java @@ -93,5 +93,12 @@ public interface BPlanEnterpriseService extends IService { */ List getShouyeList(BPlanEnterprisePageRequest req); + + /** + * 批量更新状态 + * @param idList + */ + void updateIdList(String[] idList); + } 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 d99a528..376971a 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 @@ -104,6 +104,11 @@ public class BPlanEnterpriseServiceImpl extends ServiceImpl + - SELECT s.* - FROM ( - SELECT - a.*, - a.planned_year AS plannedYear, - b.id AS longId, - b.EXAMINE_START_TIME, - b.EXAMINE_END_TIME, - a.enterprise_name as enterpriseName, - - CASE - WHEN b.USC_CODE IS NOT NULL AND SUBSTRING(a.planned_year, 1, 7) = SUBSTRING(b.EXAMINE_START_TIME, 1, 7) THEN 1 - ELSE 2 - END AS checkStatus, - ROW_NUMBER() OVER (PARTITION BY a.enterprise_id ORDER BY b.EXAMINE_START_TIME DESC) AS rn - FROM - b_plan_enterprise a - LEFT JOIN sz_enfor_examine b ON a.enterprise_id = b.USC_CODE AND b.USC_CODE IS NOT NULL - ) s - + select * from b_plan_enterprise - and s.plannedYear =#{req.plannedYear} + and planned_year =#{req.plannedYear} - and s.district like concat('%', #{req.district}, '%') + and district like concat('%', #{req.district}, '%') - - and s.checkStatus =#{req.checkStatus} - - - and s.enterpriseName like concat('%', #{req.enterpriseName}, '%') + + AND planned_month IN + + #{item} + - and s.rn = 1 + + UPDATE b_plan_enterprise + SET status = 1 + WHERE id in + + #{item} + + + + \ No newline at end of file