计划管理模块修改

zhangtao
dongdingding 1 year ago
parent eb2d0adce7
commit 9284ceba73

@ -67,7 +67,7 @@ public class BKeyEnterpriseController extends BaseController {
@PostMapping @PostMapping
@ApiOperation(value = "新增省重点企业表", response = BKeyEnterprise.class) @ApiOperation(value = "新增省重点企业表", response = BKeyEnterprise.class)
public AjaxResult insert(@RequestBody BKeyEnterprise bKeyEnterprise) { public AjaxResult insert(@RequestBody BKeyEnterprise bKeyEnterprise) {
bKeyEnterprise.setCreateId(getUserId());
return success(bKeyEnterpriseService.save(bKeyEnterprise)); return success(bKeyEnterpriseService.save(bKeyEnterprise));
} }
@ -80,7 +80,7 @@ public class BKeyEnterpriseController extends BaseController {
@PutMapping @PutMapping
@ApiOperation(value = "修改省重点企业表") @ApiOperation(value = "修改省重点企业表")
public AjaxResult update(@RequestBody BKeyEnterprise bKeyEnterprise) { public AjaxResult update(@RequestBody BKeyEnterprise bKeyEnterprise) {
bKeyEnterprise.setUpdateId(getUserId());
return success(bKeyEnterpriseService.updateById(bKeyEnterprise)); return success(bKeyEnterpriseService.updateById(bKeyEnterprise));
} }

@ -69,7 +69,6 @@ public class BPlanEnterpriseController extends BaseController {
@GetMapping("/list") @GetMapping("/list")
public AjaxResult list(BPlanEnterprise bPlanEnterprise) { public AjaxResult list(BPlanEnterprise bPlanEnterprise) {
List<BPlanEnterpriseResponse> list = bPlanEnterpriseService.selectBPlanEnterpriseList(bPlanEnterprise); List<BPlanEnterpriseResponse> list = bPlanEnterpriseService.selectBPlanEnterpriseList(bPlanEnterprise);
return AjaxResult.success(list); return AjaxResult.success(list);
} }
@ -120,7 +119,7 @@ public class BPlanEnterpriseController extends BaseController {
@PostMapping @PostMapping
@ApiOperation(value = "新增计划企业表", response = BPlanEnterprise.class) @ApiOperation(value = "新增计划企业表", response = BPlanEnterprise.class)
public AjaxResult insert(@RequestBody BPlanEnterprise bPlanEnterprise) { public AjaxResult insert(@RequestBody BPlanEnterprise bPlanEnterprise) {
bPlanEnterprise.setCreateId(getUserId());
String enterPriseId = String.valueOf(bPlanEnterprise.getEnterpriseId()); String enterPriseId = String.valueOf(bPlanEnterprise.getEnterpriseId());
String district = bPlanEnterprise.getDistrict(); String district = bPlanEnterprise.getDistrict();
String enterpriseName = bPlanEnterprise.getEnterpriseName(); String enterpriseName = bPlanEnterprise.getEnterpriseName();
@ -137,7 +136,7 @@ public class BPlanEnterpriseController extends BaseController {
bPlanEnterprise.setIsPoint(2); bPlanEnterprise.setIsPoint(2);
bPlanEnterprise.setId(null); bPlanEnterprise.setId(null);
bPlanEnterprise.setEnterpriseId(entId); bPlanEnterprise.setEnterpriseId(entId);
bPlanEnterprise.setCreateId(getUserId());
bPlanEnterprise.setDeptId(getDeptId()); bPlanEnterprise.setDeptId(getDeptId());
bPlanEnterprise.setDistrict(districtArray[i]); bPlanEnterprise.setDistrict(districtArray[i]);
bPlanEnterprise.setEnterpriseName(enterpriseNameArray[i]); bPlanEnterprise.setEnterpriseName(enterpriseNameArray[i]);
@ -157,7 +156,7 @@ public class BPlanEnterpriseController extends BaseController {
@PutMapping @PutMapping
@ApiOperation(value = "修改计划企业表") @ApiOperation(value = "修改计划企业表")
public AjaxResult update(@RequestBody BPlanEnterprise bPlanEnterprise) { public AjaxResult update(@RequestBody BPlanEnterprise bPlanEnterprise) {
bPlanEnterprise.setUpdateId(getDeptId());
return success(bPlanEnterpriseService.updateById(bPlanEnterprise)); return success(bPlanEnterpriseService.updateById(bPlanEnterprise));
} }

@ -3,8 +3,10 @@ package com.ruoyi.programManagement.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -22,7 +24,7 @@ import java.util.Date;
*/ */
@Data @Data
@ApiModel("计划企业表实体类") @ApiModel("计划企业表实体类")
public class BPlanEnterprise implements Serializable { public class BPlanEnterprise extends BaseEntity {
private static final long serialVersionUID = -98531345456142440L; private static final long serialVersionUID = -98531345456142440L;
/** /**
@ -39,61 +41,61 @@ public class BPlanEnterprise implements Serializable {
@ApiModelProperty(value = "企业id") @ApiModelProperty(value = "企业id")
private String enterpriseId; private String enterpriseId;
/** // /**
* ID // * 创建者ID
*/ // */
@ApiModelProperty(value = "创建者ID") // @ApiModelProperty(value = "创建者ID")
private Long createId; // private Long createId;
//
/** // /**
* // * 创建者
*/ // */
@ApiModelProperty(value = "创建者") // @ApiModelProperty(value = "创建者")
private String createBy; // private String createBy;
//
/** // /**
* // * 创建时间
*/ // */
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd ", timezone = "GMT+8") // @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd ", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd") // @DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "创建时间") // @ApiModelProperty(value = "创建时间")
private Date createTime; // private Date createTime;
//
/** // /**
* ID // * 更新者ID
*/ // */
@ApiModelProperty(value = "更新者ID") // @ApiModelProperty(value = "更新者ID")
private Long updateId; // private Long updateId;
//
/** // /**
* // * 更新者
*/ // */
@ApiModelProperty(value = "更新者") // @ApiModelProperty(value = "更新者")
private String updateBy; // private String updateBy;
//
/** // /**
* // * 更新时间
*/ // */
@ApiModelProperty(value = "更新时间") // @ApiModelProperty(value = "更新时间")
private Date updateTime; // private Date updateTime;
//
/** // /**
* // * 备注
*/ // */
@ApiModelProperty(value = "备注") // @ApiModelProperty(value = "备注")
private String remark; // private String remark;
/** // /**
* id // * 用户权限id
*/ // */
@ApiModelProperty(value = "用户权限id") // @ApiModelProperty(value = "用户权限id")
private Long userId; // private Long userId;
//
/** // /**
* id // * 部门权限id
*/ // */
@ApiModelProperty(value = "部门权限id") // @ApiModelProperty(value = "部门权限id")
private Long deptId; // private Long deptId;
/** /**
* *

@ -0,0 +1,108 @@
package com.ruoyi.programManagement.entity.request;
import com.baomidou.mybatisplus.annotation.TableField;
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 java.util.Date;
/**
*
*/
@Data
@ApiModel("企业新表请求类")
public class BEnterpriseNewRequest {
/**
* $column.columnComment
*/
private Long id;
/**
* id
*/
@Excel(name = "企业id")
@ApiModelProperty(value = "企业id")
private String enterpriseId;
/**
*
*/
@Excel(name = "企业名称")
@ApiModelProperty(value = "企业名称")
private String enterpriseName;
/**
*
*/
@Excel(name = "行政区划")
@ApiModelProperty(value = "行政区划")
private String[] district;
/**
*
*/
@Excel(name = "行业监管大类编码")
@ApiModelProperty(value = "行业监管大类编码")
private String supervisionLarge;
/**
*
*/
@Excel(name = "安全风险等级")
@ApiModelProperty(value = "安全风险等级")
private String riskLevel;
/**
*
*/
@Excel(name = "标准化等级")
@ApiModelProperty(value = "标准化等级")
private String standLevel;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "上次检查时间")
@Excel(name = "上次检查时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date examineEndTime;
/**
* ID
*/
@Excel(name = "创建者ID")
@ApiModelProperty(value = "创建者ID")
private Integer createId;
/**
* ID
*/
@Excel(name = "更新者ID")
@ApiModelProperty(value = "更新者ID")
private Integer updateId;
/**
* id
*/
@Excel(name = "用户权限id")
@ApiModelProperty(value = "用户权限id")
private Long userId;
/**
* id
*/
@Excel(name = "部门权限id")
@ApiModelProperty(value = "部门权限id")
private Long deptId;
/**
*
*/
@TableField(exist = false)
@ApiModelProperty(value = "是否重点企业")
private Long isPoint;
}

@ -22,7 +22,7 @@ public class BKeyEnterprisePageRequest implements Serializable {
/** /**
* *
*/ */
@Excel(name = "年份",dateFormat = "") @Excel(name = "年份")
@ApiModelProperty("年份") @ApiModelProperty("年份")
private String year; private String year;

@ -1,6 +1,7 @@
package com.ruoyi.programManagement.service.impl; package com.ruoyi.programManagement.service.impl;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.programManagement.entity.BEnterpriseNew; import com.ruoyi.programManagement.entity.BEnterpriseNew;
import com.ruoyi.programManagement.mapper.BEnterpriseNewMapper; import com.ruoyi.programManagement.mapper.BEnterpriseNewMapper;
import com.ruoyi.programManagement.service.IBEnterpriseNewService; import com.ruoyi.programManagement.service.IBEnterpriseNewService;
@ -39,6 +40,7 @@ public class BEnterpriseNewServiceImpl implements IBEnterpriseNewService {
*/ */
@Override @Override
public List<BEnterpriseNew> selectBEnterpriseNewList(BEnterpriseNew bEnterpriseNew) { public List<BEnterpriseNew> selectBEnterpriseNewList(BEnterpriseNew bEnterpriseNew) {
bEnterpriseNew.setDistrict(SecurityUtils.getLoginUser().getUser().getPermissionCode());
return bEnterpriseNewMapper.selectBEnterpriseNewList(bEnterpriseNew); return bEnterpriseNewMapper.selectBEnterpriseNewList(bEnterpriseNew);
} }

@ -3,6 +3,7 @@ package com.ruoyi.programManagement.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.programManagement.entity.BPlanEnterprise; import com.ruoyi.programManagement.entity.BPlanEnterprise;
import com.ruoyi.programManagement.entity.request.*; import com.ruoyi.programManagement.entity.request.*;
import com.ruoyi.programManagement.entity.response.*; import com.ruoyi.programManagement.entity.response.*;
@ -40,6 +41,7 @@ public class BPlanEnterpriseServiceImpl extends ServiceImpl<BPlanEnterpriseMappe
*/ */
@Override @Override
public List<BPlanEnterpriseResponse> selectBPlanEnterpriseList(BPlanEnterprise bPlanEnterprise) { public List<BPlanEnterpriseResponse> selectBPlanEnterpriseList(BPlanEnterprise bPlanEnterprise) {
bPlanEnterprise.setDistrict(SecurityUtils.getLoginUser().getUser().getPermissionCode());
return bPlanEnterpriseMapper.selectBPlanEnterpriseList(bPlanEnterprise); return bPlanEnterpriseMapper.selectBPlanEnterpriseList(bPlanEnterprise);
} }

@ -64,6 +64,11 @@ public class BaseEntity implements Serializable
/** 更新者 */ /** 更新者 */
private String updateBy; private String updateBy;
/**
*
*/
private String permissionCode;
/** 更新时间 */ /** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime; private Date updateTime;
@ -100,6 +105,14 @@ public class BaseEntity implements Serializable
@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonInclude(JsonInclude.Include.NON_EMPTY)
private Map<String, Object> params; private Map<String, Object> params;
public String getPermissionCode() {
return permissionCode;
}
public void setPermissionCode(String permissionCode) {
this.permissionCode = permissionCode;
}
public String getSearchValue() public String getSearchValue()
{ {
return searchValue; return searchValue;

@ -76,9 +76,13 @@
<if test="enterpriseName != null and enterpriseName != ''">and s.enterprise_name like concat('%', <if test="enterpriseName != null and enterpriseName != ''">and s.enterprise_name like concat('%',
#{enterpriseName}, '%') #{enterpriseName}, '%')
</if> </if>
<if test="district != null and district != ''">and s.district like concat('%', <if test="district != null and district != ''">
#{district}, '%') and s.district in
<foreach item="item" index="index" collection="district.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if> </if>
<if test="supervisionLarge != null and supervisionLarge != ''">and s.SUPERVISION_LARGE = <if test="supervisionLarge != null and supervisionLarge != ''">and s.SUPERVISION_LARGE =
#{supervisionLarge} #{supervisionLarge}
</if> </if>

@ -75,7 +75,13 @@
<if test="updateId != null ">and a.update_id = #{updateId}</if> <if test="updateId != null ">and a.update_id = #{updateId}</if>
<if test="userId != null ">and a.user_id = #{userId}</if> <if test="userId != null ">and a.user_id = #{userId}</if>
<if test="deptId != null ">and a.dept_id = #{deptId}</if> <if test="deptId != null ">and a.dept_id = #{deptId}</if>
<if test="district != null and district != ''">and a.district like concat('%', #{district}, '%')</if> <if test="district != null and district != ''">
and s.district in
<foreach item="item" index="index" collection="district.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="plannedYear != null and plannedYear != ''">and a.planned_year = #{plannedYear}</if> <if test="plannedYear != null and plannedYear != ''">and a.planned_year = #{plannedYear}</if>
<if test="isPoint != null ">and a.is_point = #{isPoint}</if> <if test="isPoint != null ">and a.is_point = #{isPoint}</if>
<if test="lawHierarchy != null ">and a.law_hierarchy = #{lawHierarchy}</if> <if test="lawHierarchy != null ">and a.law_hierarchy = #{lawHierarchy}</if>

Loading…
Cancel
Save