修改计划企业列表list

zhangtao
dongdingding 1 year ago
parent 18cad02690
commit 050d9acc4f

@ -61,21 +61,11 @@ public class BPlanEnterpriseController extends BaseController {
/** /**
* *
*/ */
@ApiOperation(value = "查询计划企业列表") @ApiOperation(value = "查询计划企业列表",response = BPlanEnterprise.class)
@GetMapping("/list") @GetMapping("/list")
public AjaxResult list(BPlanEnterprise bPlanEnterprise) { public AjaxResult list(BPlanEnterprise bPlanEnterprise) {
List<BPlanEnterprise> list = bPlanEnterpriseService.selectBPlanEnterpriseList(bPlanEnterprise); List<BPlanEnterprise> list = bPlanEnterpriseService.selectBPlanEnterpriseList(bPlanEnterprise);
// for (BPlanEnterprise a : list) {
// String enterPriseId = String.valueOf(a.getEnterpriseId());
// BKeyEnterprise count = bKeyEnterpriseService.getByentCode(enterPriseId);
// if (count != null) {
// a.setIsPoint(1);
// } else {
// a.setIsPoint(2);
// }
//
// bPlanEnterpriseService.updateById(a);
// }
return AjaxResult.success(list); return AjaxResult.success(list);
} }

@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.Valid;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@ -200,5 +201,37 @@ public class BPlanEnterprise implements Serializable {
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;
} }

@ -35,35 +35,38 @@
<select id="selectBPlanEnterpriseList" parameterType="BPlanEnterprise" resultType="BPlanEnterprise"> <select id="selectBPlanEnterpriseList" parameterType="BPlanEnterprise" resultType="BPlanEnterprise">
select a.id, SELECT DISTINCT
a. enterprise_id, a.id,
a.enterprise_id,
a.create_id, a.create_id,
a.create_by, a.create_by,
a.create_time, a.create_time,
a.update_id, a.update_id,
a. update_by, a.update_by,
a.update_time, a.update_time,
a.remark, a.remark,
a. user_id, a.user_id,
a. dept_id, a.dept_id,
a. district, a.district,
a.planned_year, a.planned_year,
a. is_point, a.is_point,
a.enterprise_name, a.enterprise_name,
a.law_sort, a.law_sort,
a.law_areas, a.law_areas,
a.law_level, a.law_level,
a. law_hierarchy, a.law_hierarchy,
a. planned_month, a.planned_month,
a.status, a.status,
a. check_status, a.check_status,
a. check_id, a.check_id,
a.check_ageing, 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 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 LEFT JOIN b_key_enterprise b ON a.enterprise_id = b.ent_code
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="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>

Loading…
Cancel
Save