laozt 1 year ago
commit 2264d3212d

@ -223,5 +223,15 @@ public class BPlanEnterpriseController extends BaseController {
return AjaxResult.success(bPlanEnterpriseService.getPlanMx(req)); return AjaxResult.success(bPlanEnterpriseService.getPlanMx(req));
} }
/**
*
*/
@ApiOperation(value = "查看计划明细")
@PostMapping("/updateIdList")
public AjaxResult updateIdList(String[] idList) {
bPlanEnterpriseService.updateIdList(idList);
return AjaxResult.success();
}
} }

@ -176,7 +176,7 @@ public class BPlanEnterprise implements Serializable {
* 0稿 1 * 0稿 1
*/ */
@ApiModelProperty(value = "0草稿 1正式") @ApiModelProperty(value = "0草稿 1正式")
private Integer status =0; private Integer status ;
/** /**

@ -18,24 +18,18 @@ public class checkResultRequest {
/** /**
* *
*/ */
@ApiModelProperty(value = "行政区划") @ApiModelProperty(value = "计划月份")
private String district; private String[] plannedMonth;
/** /**
* *
*/ */
@ApiModelProperty(value = "检查状态 1=已检查2=未检查") @ApiModelProperty(value = "行政区划")
private Integer checkStatus; private String district;
/**
*
*/
@ApiModelProperty(value = "企业名称")
private String enterpriseName;
} }

@ -1,6 +1,7 @@
package com.ruoyi.programManagement.entity.response; package com.ruoyi.programManagement.entity.response;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
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;
@ -18,29 +19,14 @@ public class BPlanEnterpriseZhifaResponse {
/** /**
* *
*/ */
@ApiModelProperty(value = "编号") @ApiModelProperty(value = "编号")
@Excel(name = "编号") @TableId(type = IdType.AUTO)
private Long id; private Long id;
/**
* id
*/
@ApiModelProperty(value = "检查表id")
private String longId;
/**
* id
*/
@ApiModelProperty(value = "计划id")
private Long planId;
/** /**
* id * id
*/ */
@ApiModelProperty(value = "企业id") @ApiModelProperty(value = "企业id")
private String enterpriseId; private String enterpriseId;
@ -48,7 +34,7 @@ public class BPlanEnterpriseZhifaResponse {
* ID * ID
*/ */
@ApiModelProperty(value = "创建者ID") @ApiModelProperty(value = "创建者ID")
private Integer createId; private Long createId;
/** /**
* *
@ -59,9 +45,9 @@ public class BPlanEnterpriseZhifaResponse {
/** /**
* *
*/ */
@Excel(name = "年份", dateFormat = "yyyy-MM-dd")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd ", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private Date createTime; private Date createTime;
@ -69,7 +55,7 @@ public class BPlanEnterpriseZhifaResponse {
* ID * ID
*/ */
@ApiModelProperty(value = "更新者ID") @ApiModelProperty(value = "更新者ID")
private Integer updateId; private Long updateId;
/** /**
* *
@ -105,35 +91,102 @@ public class BPlanEnterpriseZhifaResponse {
/** /**
* *
*/ */
@ApiModelProperty(value = "行政区划") @ApiModelProperty(value = "行政区划")
@Excel(name = "行政区划") @Excel(name = "行政区划")
private String district; private String district;
/** /**
* *
*/ */
@ApiModelProperty(value = "计划年份")
@Excel(name = "计划年份")
private String plannedYear;
@ApiModelProperty(value = "企业名称")
/**
* 12
*/
@ApiModelProperty(value = "是否重点企业1是2否")
private Integer isPoint;
/**
*
*/
@TableField(exist = false)
@ApiModelProperty(value = "企业主表名称")
private String entprName;
/**
*
*/
@Excel(name = "企业名称") @Excel(name = "企业名称")
@ApiModelProperty(value = "企业名称")
private String enterpriseName; 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=未检查") * 0 1
private String checkStatus; */
@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;
} }

@ -24,7 +24,11 @@ public interface BPlanEnterpriseMapper extends BaseMapper<BPlanEnterprise> {
*/ */
void deleteByPlanId(@Param("planId") Long planId); void deleteByPlanId(@Param("planId") Long planId);
/**
*
* @param req
* @return
*/
List<BPlanEnterpriseZhifaResponse> getZhifa(@Param("req") checkResultRequest req); List<BPlanEnterpriseZhifaResponse> getZhifa(@Param("req") checkResultRequest req);
@ -94,5 +98,13 @@ public interface BPlanEnterpriseMapper extends BaseMapper<BPlanEnterprise> {
*/ */
List<BPlanEnterPriseTreeResponse>getShouYeMxList(@Param("req") BPlanEnterprisePageRequest req); List<BPlanEnterPriseTreeResponse>getShouYeMxList(@Param("req") BPlanEnterprisePageRequest req);
/**
*
* @param idList
*/
void updateIdList(String[] idList);
} }

@ -93,5 +93,12 @@ public interface BPlanEnterpriseService extends IService<BPlanEnterprise> {
*/ */
List<BPlanEnterPriseTreeResponse> getShouyeList(BPlanEnterprisePageRequest req); List<BPlanEnterPriseTreeResponse> getShouyeList(BPlanEnterprisePageRequest req);
/**
*
* @param idList
*/
void updateIdList(String[] idList);
} }

@ -104,6 +104,11 @@ public class BPlanEnterpriseServiceImpl extends ServiceImpl<BPlanEnterpriseMappe
return list; return list;
} }
@Override
public void updateIdList(String[] idList) {
bPlanEnterpriseMapper.updateIdList(idList);
}
} }

@ -6,16 +6,23 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
#本地 #远程
# url: jdbc:mysql://39.101.188.84:3307/ying_ji?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 # url: jdbc:mysql://39.101.188.84:3307/ying_ji?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root # username: root
# password: Admin123@ # password: Admin123@
#本地
url: jdbc:mysql://localhost:3306/ying_ji?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://localhost:3306/ying_ji?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: adminadmin password: adminadmin
# url: jdbc:mysql://192.167.2.56:3306/ying_ji?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=UTC # url: jdbc:mysql://192.167.2.56:3306/ying_ji?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=UTC
# username: root # username: root
# password: Jichuang@2023 # password: Jichuang@2023
#公司本地
# url: jdbc:mysql://localhost:3307/ying_ji?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root
# password: Admin123@
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭

@ -33,6 +33,7 @@
from b_plan_enterprise from b_plan_enterprise
</sql> </sql>
<select id="selectBPlanEnterpriseList" parameterType="BPlanEnterprise" resultType="BPlanEnterprise"> <select id="selectBPlanEnterpriseList" parameterType="BPlanEnterprise" resultType="BPlanEnterprise">
select a.id, select a.id,
a. enterprise_id, a. enterprise_id,
@ -87,40 +88,20 @@
<select id="getZhifa" resultType="com.ruoyi.programManagement.entity.response.BPlanEnterpriseZhifaResponse"> <select id="getZhifa" resultType="com.ruoyi.programManagement.entity.response.BPlanEnterpriseZhifaResponse">
SELECT s.* select * from b_plan_enterprise
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
<where> <where>
<if test="req.plannedYear !=null and req.plannedYear !=''"> <if test="req.plannedYear !=null and req.plannedYear !=''">
and s.plannedYear =#{req.plannedYear} and planned_year =#{req.plannedYear}
</if> </if>
<if test="req.district !=null and req.district !=''"> <if test="req.district !=null and req.district !=''">
and s.district like concat('%', #{req.district}, '%') and district like concat('%', #{req.district}, '%')
</if> </if>
<if test="req.checkStatus !=null and req.checkStatus !=''"> <if test="req.plannedMonth != null and req.plannedMonth.length > 0">
and s.checkStatus =#{req.checkStatus} AND planned_month IN
</if> <foreach item="item" collection="req.plannedMonth" open="(" separator="," close=")">
<if test="req.enterpriseName !=null and req.enterpriseName !=''"> #{item}
and s.enterpriseName like concat('%', #{req.enterpriseName}, '%') </foreach>
</if> </if>
and s.rn = 1
</where> </where>
</select> </select>
<select id="page" resultType="com.ruoyi.programManagement.entity.BPlanEnterprise"> <select id="page" resultType="com.ruoyi.programManagement.entity.BPlanEnterprise">
@ -270,5 +251,15 @@
</select> </select>
<update id="updateIdList">
UPDATE b_plan_enterprise
SET status = 1
WHERE id in
<foreach item="item" collection="idList" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper> </mapper>
Loading…
Cancel
Save