执法结果响应类

zhangtao
dongdingding 1 year ago
parent 050d9acc4f
commit a8253e4520

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
@ -14,6 +15,7 @@ import java.util.Date;
/** /**
* *
*/ */
@ApiModel("执法结果响应类")
@Data @Data
public class BPlanEnterpriseZhifaResponse { public class BPlanEnterpriseZhifaResponse {
/** /**
@ -167,7 +169,7 @@ public class BPlanEnterpriseZhifaResponse {
* 0稿 1 * 0稿 1
*/ */
@ApiModelProperty(value = "0草稿 1正式") @ApiModelProperty(value = "0草稿 1正式")
private Integer status =0; private Integer status ;
/** /**
@ -189,4 +191,36 @@ public class BPlanEnterpriseZhifaResponse {
*/ */
@ApiModelProperty(value = "1当月 2提前 3滞后") @ApiModelProperty(value = "1当月 2提前 3滞后")
private Integer checkAgeing; private Integer checkAgeing;
/**
* 1 2 3
*/
@ApiModelProperty(value = "1当月 2提前 3滞后")
private Integer RISK_LEVEL;
/**
*
*/
@ApiModelProperty(value = "安全风险等级")
private String riskLevel;
/**
*
*/
@ApiModelProperty(value = "标准化等级")
private String standLevel;
/**
*
*/
@ApiModelProperty(value = "上次检查时间")
private Date examineEndTime;
} }

@ -45,11 +45,6 @@ public class BPlanEnterpriseServiceImpl extends ServiceImpl<BPlanEnterpriseMappe
@Override @Override
public List<BPlanEnterpriseZhifaResponse> getZhifa(checkResultRequest req) { public List<BPlanEnterpriseZhifaResponse> getZhifa(checkResultRequest req) {
// if(req.getDistrict()!=null && req.getDistrict().contains("000000000")){
// String result = req.getDistrict().replaceAll("0+$", "");
// req.setDistrict(result);
// }
return bPlanEnterpriseMapper.getZhifa(req); return bPlanEnterpriseMapper.getZhifa(req);
} }

@ -66,7 +66,7 @@
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
FROM b_plan_enterprise a FROM b_plan_enterprise a
LEFT JOIN b_key_enterprise b ON a.enterprise_id = b.ent_code 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 COLLATE utf8mb4_unicode_ci; LEFT JOIN b_enterprise_new c ON a.enterprise_id = c.enterprise_id COLLATE utf8mb4_unicode_ci
<where> <where>
<if test="enterpriseId != null and enterpriseId != ''">and a.enterprise_id = #{enterpriseId}</if> <if test="enterpriseId != null and enterpriseId != ''">and a.enterprise_id = #{enterpriseId}</if>
<if test="createId != null ">and a.create_id = #{createId}</if> <if test="createId != null ">and a.create_id = #{createId}</if>
@ -91,16 +91,47 @@
<select id="getZhifa" resultType="com.ruoyi.programManagement.entity.response.BPlanEnterpriseZhifaResponse"> <select id="getZhifa" resultType="com.ruoyi.programManagement.entity.response.BPlanEnterpriseZhifaResponse">
select * from b_plan_enterprise SELECT DISTINCT
a.id,
a.enterprise_id,
a.create_id,
a.create_by,
a.create_time,
a.update_id,
a.update_by,
a.update_time,
a.remark,
a.user_id,
a.dept_id,
a.district,
a.planned_year,
a.is_point,
a.enterprise_name,
a.law_sort,
a.law_areas,
a.law_level,
a.law_hierarchy,
a.planned_month,
a.status,
a.check_status,
a.check_id,
a.check_ageing,
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
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 COLLATE utf8mb4_unicode_ci
<where> <where>
<if test="req.plannedYear !=null and req.plannedYear !=''"> <if test="req.plannedYear !=null and req.plannedYear !=''">
and planned_year =#{req.plannedYear} and a.planned_year =#{req.plannedYear}
</if> </if>
<if test="req.district !=null and req.district !=''"> <if test="req.district !=null and req.district !=''">
and district like concat('%', #{req.district}, '%') and a.district like concat('%', #{req.district}, '%')
</if> </if>
<if test="req.plannedMonth != null and req.plannedMonth.length > 0"> <if test="req.plannedMonth != null and req.plannedMonth.length > 0">
AND planned_month IN AND a.planned_month IN
<foreach item="item" collection="req.plannedMonth" open="(" separator="," close=")"> <foreach item="item" collection="req.plannedMonth" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>

Loading…
Cancel
Save