执法结果响应类

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.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
@ -14,6 +15,7 @@ import java.util.Date;
/**
*
*/
@ApiModel("执法结果响应类")
@Data
public class BPlanEnterpriseZhifaResponse {
/**
@ -167,7 +169,7 @@ public class BPlanEnterpriseZhifaResponse {
* 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滞后")
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
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);
}

@ -66,7 +66,7 @@
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;
LEFT JOIN b_enterprise_new c ON a.enterprise_id = c.enterprise_id COLLATE utf8mb4_unicode_ci
<where>
<if test="enterpriseId != null and enterpriseId != ''">and a.enterprise_id = #{enterpriseId}</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 * 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>
<if test="req.plannedYear !=null and req.plannedYear !=''">
and planned_year =#{req.plannedYear}
and a.planned_year =#{req.plannedYear}
</if>
<if test="req.district !=null and req.district !=''">
and district like concat('%', #{req.district}, '%')
and a.district like concat('%', #{req.district}, '%')
</if>
<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=")">
#{item}
</foreach>

Loading…
Cancel
Save