企业端设备模块->应急资源和子模块-修改和列表
This commit is contained in:
parent
e930fdbb6c
commit
82d92f4241
|
|
@ -2,6 +2,10 @@ package com.rzyc.mapper;
|
|||
|
||||
import com.rzyc.model.EntEmEquipment;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
|
@ -11,6 +15,23 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
* @author
|
||||
* @since 2022-11-09
|
||||
*/
|
||||
@Repository
|
||||
public interface EntEmEquipmentMapper extends BaseMapper<EntEmEquipment> {
|
||||
|
||||
|
||||
/**
|
||||
* 企业应急资源
|
||||
* @param enterpriseId 企业id
|
||||
* @return list
|
||||
* */
|
||||
List<EntEmEquipment> selectEntEmEquipmentList(@Param("enterpriseId") String enterpriseId);
|
||||
|
||||
|
||||
/**
|
||||
* 修改企业应急资源
|
||||
* @param entEmEquipment
|
||||
* @return int
|
||||
* */
|
||||
int updateEntEmEquipment(EntEmEquipment entEmEquipment);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@ package com.rzyc.mapper;
|
|||
|
||||
import com.rzyc.model.EntEmExpert;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
|
@ -11,6 +15,25 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
* @author
|
||||
* @since 2022-11-09
|
||||
*/
|
||||
@Repository
|
||||
public interface EntEmExpertMapper extends BaseMapper<EntEmExpert> {
|
||||
|
||||
|
||||
/**
|
||||
* 企业应急专家
|
||||
* @param enterpriseId 企业id
|
||||
* @param entEmExpertClass 企业应急专家领域
|
||||
* @param entEmExpertCategory 企业应急专家分类
|
||||
* @return list
|
||||
* */
|
||||
List<EntEmExpert>selectEntEmExpertList(@Param("enterpriseId") String enterpriseId, @Param("entEmExpertClass")String entEmExpertClass,
|
||||
@Param("entEmExpertCategory") String entEmExpertCategory);
|
||||
|
||||
/**
|
||||
* 企业应急专家修改
|
||||
* @param entEmExpert 企业应急专家
|
||||
* @return list
|
||||
* */
|
||||
int updateEntEmExpertUpdate(EntEmExpert entEmExpert);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ package com.rzyc.mapper;
|
|||
|
||||
import com.rzyc.model.EntEmRehearsal;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
|
@ -11,6 +14,23 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
* @author
|
||||
* @since 2022-11-09
|
||||
*/
|
||||
@Repository
|
||||
public interface EntEmRehearsalMapper extends BaseMapper<EntEmRehearsal> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询应急演练
|
||||
* @param enterpriseId 企业id
|
||||
* @return list
|
||||
* */
|
||||
List<EntEmRehearsal>selectEntEmRehearsalList(String enterpriseId);
|
||||
|
||||
|
||||
/**
|
||||
* 修改应急演练
|
||||
* @param entEmRehearsal 企业演练
|
||||
* @return int
|
||||
* */
|
||||
int updateEntEmRehearsal(EntEmRehearsal entEmRehearsal);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
package com.rzyc.mapper;
|
||||
|
||||
import com.rzyc.model.EntEmExpert;
|
||||
import com.rzyc.model.EntEmReservePlan;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
|
@ -11,6 +16,22 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
* @author
|
||||
* @since 2022-11-09
|
||||
*/
|
||||
@Repository
|
||||
public interface EntEmReservePlanMapper extends BaseMapper<EntEmReservePlan> {
|
||||
|
||||
/**
|
||||
* 企业应急预案
|
||||
* @param enterpriseId
|
||||
* @return list
|
||||
* */
|
||||
List<EntEmReservePlan>selectEntEmReservePlanList(@Param("enterpriseId") String enterpriseId);
|
||||
|
||||
|
||||
/**
|
||||
* 企业应急预案修改
|
||||
* @param entEmReservePlan
|
||||
* @return int
|
||||
* */
|
||||
int updateEntEmReservePlan(EntEmReservePlan entEmReservePlan);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,4 +66,11 @@ public interface EntPostTaskMapper extends BaseMapper<EntPostTask> {
|
|||
* */
|
||||
long selectEntPostTaskTotal(@Param("enterpriseId") String enterpriseId,@Param("listId")String listId,@Param("year") Integer year);
|
||||
|
||||
/**
|
||||
* 插入企业岗位任务
|
||||
* @return int
|
||||
* @param entTasks 任务
|
||||
* */
|
||||
int insertList(@Param("entTasks") List<EntPostTask> entTasks);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@ public class EntEmExpert implements Serializable {
|
|||
@TableField("ent_em_expert_name")
|
||||
private String entEmExpertName;
|
||||
|
||||
@ApiModelProperty(value = "年龄")
|
||||
private Integer age;
|
||||
|
||||
@ApiModelProperty(value = "性别")
|
||||
@TableField("ent_em_expert_sex")
|
||||
private Integer entEmExpertSex;
|
||||
|
|
@ -70,6 +73,14 @@ public class EntEmExpert implements Serializable {
|
|||
@TableField("modify_time")
|
||||
private Date modifyTime;
|
||||
|
||||
public Integer getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(Integer age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public String getEntEmExpertId() {
|
||||
return entEmExpertId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ public class EntEmRehearsal implements Serializable {
|
|||
@TableField("ent_em_rehearsal_remark")
|
||||
private String entEmRehearsalRemark;
|
||||
|
||||
@ApiModelProperty(value = "公司id")
|
||||
@TableField("enterprise_id")
|
||||
private String enterpriseId;
|
||||
|
||||
@TableField("create_by")
|
||||
private String createBy;
|
||||
|
||||
|
|
@ -54,6 +58,14 @@ public class EntEmRehearsal implements Serializable {
|
|||
@TableField("modify_time")
|
||||
private Date modifyTime;
|
||||
|
||||
public String getEnterpriseId() {
|
||||
return enterpriseId;
|
||||
}
|
||||
|
||||
public void setEnterpriseId(String enterpriseId) {
|
||||
this.enterpriseId = enterpriseId;
|
||||
}
|
||||
|
||||
public String getEntEmRehearsalId() {
|
||||
return entEmRehearsalId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -12,24 +13,30 @@ import java.util.Date;
|
|||
* @author Xuwanxin
|
||||
* @date 2022/10/31
|
||||
* */
|
||||
public class AddOrUpdateEntUserPostListDto {
|
||||
public class AddOrUpdateEntUserPostListDto {
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "岗位清单id")
|
||||
private String postListId;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "岗位id")
|
||||
private String postId;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "企业用户id")
|
||||
private String entUserId;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private String enterpriseId;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "企业清单项id")
|
||||
private String entListId;
|
||||
|
||||
@ApiModelProperty(value = "清单id")
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "履职清单id")
|
||||
private String listId;
|
||||
|
||||
@ApiModelProperty(value = "清单标题")
|
||||
|
|
@ -38,26 +45,12 @@ public class AddOrUpdateEntUserPostListDto {
|
|||
@ApiModelProperty(value = "清单内容")
|
||||
private String itemContent;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sortId;
|
||||
|
||||
@ApiModelProperty(value = "年份")
|
||||
private Integer yearNum;
|
||||
|
||||
@ApiModelProperty(value = "考核指标 1:每年 2:每半年 4:每季度 12:每月")
|
||||
private Integer standard;
|
||||
|
||||
@ApiModelProperty(value = "频率")
|
||||
private Integer frequency;
|
||||
|
||||
@ApiModelProperty(value = "完成状态 1:未完成 2:已完成")
|
||||
private Integer finishState;
|
||||
|
||||
@ApiModelProperty(value = "红色提醒天数")
|
||||
private Integer redAlert;
|
||||
|
||||
@ApiModelProperty(value = "黄色提醒天数")
|
||||
private Integer yellowAlert;
|
||||
|
||||
public String getPostListId() {
|
||||
return postListId;
|
||||
|
|
@ -123,21 +116,6 @@ public class AddOrUpdateEntUserPostListDto {
|
|||
this.itemContent = itemContent;
|
||||
}
|
||||
|
||||
public Integer getSortId() {
|
||||
return sortId;
|
||||
}
|
||||
|
||||
public void setSortId(Integer sortId) {
|
||||
this.sortId = sortId;
|
||||
}
|
||||
|
||||
public Integer getYearNum() {
|
||||
return yearNum;
|
||||
}
|
||||
|
||||
public void setYearNum(Integer yearNum) {
|
||||
this.yearNum = yearNum;
|
||||
}
|
||||
|
||||
public Integer getStandard() {
|
||||
return standard;
|
||||
|
|
@ -155,27 +133,5 @@ public class AddOrUpdateEntUserPostListDto {
|
|||
this.frequency = frequency;
|
||||
}
|
||||
|
||||
public Integer getFinishState() {
|
||||
return finishState;
|
||||
}
|
||||
|
||||
public void setFinishState(Integer finishState) {
|
||||
this.finishState = finishState;
|
||||
}
|
||||
|
||||
public Integer getRedAlert() {
|
||||
return redAlert;
|
||||
}
|
||||
|
||||
public void setRedAlert(Integer redAlert) {
|
||||
this.redAlert = redAlert;
|
||||
}
|
||||
|
||||
public Integer getYellowAlert() {
|
||||
return yellowAlert;
|
||||
}
|
||||
|
||||
public void setYellowAlert(Integer yellowAlert) {
|
||||
this.yellowAlert = yellowAlert;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,82 @@
|
|||
package com.rzyc.model.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 企业应急资源dto
|
||||
* @author Xuwanxin
|
||||
* @date 2022/11/10
|
||||
* */
|
||||
public class EntEmEquipmentDto {
|
||||
|
||||
@ApiModelProperty(value = "企业应急资源id")
|
||||
private String entEmEquipmentId;
|
||||
|
||||
@ApiModelProperty(value = "应急资源数量")
|
||||
private Integer entEmEquipmentNumber;
|
||||
|
||||
@ApiModelProperty(value = "应急资源类型")
|
||||
private String entEmEquipmentType;
|
||||
|
||||
@ApiModelProperty(value = "应急资源位置")
|
||||
private String entEmEquipmentStorageLocation;
|
||||
|
||||
@ApiModelProperty(value = "应急资源名")
|
||||
private String entEmEquipmentName;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private String enterpriseId;
|
||||
|
||||
public String getEntEmEquipmentId() {
|
||||
return entEmEquipmentId;
|
||||
}
|
||||
|
||||
public void setEntEmEquipmentId(String entEmEquipmentId) {
|
||||
this.entEmEquipmentId = entEmEquipmentId;
|
||||
}
|
||||
|
||||
public Integer getEntEmEquipmentNumber() {
|
||||
return entEmEquipmentNumber;
|
||||
}
|
||||
|
||||
public void setEntEmEquipmentNumber(Integer entEmEquipmentNumber) {
|
||||
this.entEmEquipmentNumber = entEmEquipmentNumber;
|
||||
}
|
||||
|
||||
public String getEntEmEquipmentType() {
|
||||
return entEmEquipmentType;
|
||||
}
|
||||
|
||||
public void setEntEmEquipmentType(String entEmEquipmentType) {
|
||||
this.entEmEquipmentType = entEmEquipmentType;
|
||||
}
|
||||
|
||||
public String getEntEmEquipmentStorageLocation() {
|
||||
return entEmEquipmentStorageLocation;
|
||||
}
|
||||
|
||||
public void setEntEmEquipmentStorageLocation(String entEmEquipmentStorageLocation) {
|
||||
this.entEmEquipmentStorageLocation = entEmEquipmentStorageLocation;
|
||||
}
|
||||
|
||||
public String getEntEmEquipmentName() {
|
||||
return entEmEquipmentName;
|
||||
}
|
||||
|
||||
public void setEntEmEquipmentName(String entEmEquipmentName) {
|
||||
this.entEmEquipmentName = entEmEquipmentName;
|
||||
}
|
||||
|
||||
public String getEnterpriseId() {
|
||||
return enterpriseId;
|
||||
}
|
||||
|
||||
public void setEnterpriseId(String enterpriseId) {
|
||||
this.enterpriseId = enterpriseId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
package com.rzyc.model.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 企业应急专家dto
|
||||
* @author Xuwanxin
|
||||
* @date 2022/11/11
|
||||
* */
|
||||
public class EntEmExpertDto {
|
||||
|
||||
@ApiModelProperty(value = "企业应急专家id")
|
||||
private String entEmExpertId;
|
||||
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private String enterpriseId;
|
||||
|
||||
@ApiModelProperty(value = "专家名字")
|
||||
private String entEmExpertName;
|
||||
|
||||
@ApiModelProperty(value = "年龄")
|
||||
private Integer age;
|
||||
|
||||
@ApiModelProperty(value = "性别")
|
||||
private Integer entEmExpertSex;
|
||||
|
||||
@ApiModelProperty(value = "专家电话")
|
||||
private String entEmExpertPhone;
|
||||
|
||||
@ApiModelProperty(value = "专家所在行业领域")
|
||||
private String entEmExpertClass;
|
||||
|
||||
@ApiModelProperty(value = "专家专业")
|
||||
private String entEmExpertMajor;
|
||||
|
||||
@ApiModelProperty(value = "专家类别")
|
||||
private String entEmExpertCategory;
|
||||
|
||||
@ApiModelProperty(value = "专家住址")
|
||||
private String entEmExpertAddress;
|
||||
|
||||
public Integer getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(Integer age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public String getEntEmExpertId() {
|
||||
return entEmExpertId;
|
||||
}
|
||||
|
||||
public void setEntEmExpertId(String entEmExpertId) {
|
||||
this.entEmExpertId = entEmExpertId;
|
||||
}
|
||||
|
||||
public String getEnterpriseId() {
|
||||
return enterpriseId;
|
||||
}
|
||||
|
||||
public void setEnterpriseId(String enterpriseId) {
|
||||
this.enterpriseId = enterpriseId;
|
||||
}
|
||||
|
||||
public String getEntEmExpertName() {
|
||||
return entEmExpertName;
|
||||
}
|
||||
|
||||
public void setEntEmExpertName(String entEmExpertName) {
|
||||
this.entEmExpertName = entEmExpertName;
|
||||
}
|
||||
|
||||
public Integer getEntEmExpertSex() {
|
||||
return entEmExpertSex;
|
||||
}
|
||||
|
||||
public void setEntEmExpertSex(Integer entEmExpertSex) {
|
||||
this.entEmExpertSex = entEmExpertSex;
|
||||
}
|
||||
|
||||
public String getEntEmExpertPhone() {
|
||||
return entEmExpertPhone;
|
||||
}
|
||||
|
||||
public void setEntEmExpertPhone(String entEmExpertPhone) {
|
||||
this.entEmExpertPhone = entEmExpertPhone;
|
||||
}
|
||||
|
||||
public String getEntEmExpertClass() {
|
||||
return entEmExpertClass;
|
||||
}
|
||||
|
||||
public void setEntEmExpertClass(String entEmExpertClass) {
|
||||
this.entEmExpertClass = entEmExpertClass;
|
||||
}
|
||||
|
||||
public String getEntEmExpertMajor() {
|
||||
return entEmExpertMajor;
|
||||
}
|
||||
|
||||
public void setEntEmExpertMajor(String entEmExpertMajor) {
|
||||
this.entEmExpertMajor = entEmExpertMajor;
|
||||
}
|
||||
|
||||
public String getEntEmExpertCategory() {
|
||||
return entEmExpertCategory;
|
||||
}
|
||||
|
||||
public void setEntEmExpertCategory(String entEmExpertCategory) {
|
||||
this.entEmExpertCategory = entEmExpertCategory;
|
||||
}
|
||||
|
||||
public String getEntEmExpertAddress() {
|
||||
return entEmExpertAddress;
|
||||
}
|
||||
|
||||
public void setEntEmExpertAddress(String entEmExpertAddress) {
|
||||
this.entEmExpertAddress = entEmExpertAddress;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
package com.rzyc.model.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 企业应急演练dto
|
||||
* @author Xuwanxin
|
||||
* @date 2022/11/11
|
||||
* */
|
||||
public class EntEmRehearsalDto {
|
||||
|
||||
@ApiModelProperty(value = "应急演练id")
|
||||
private String entEmRehearsalId;
|
||||
|
||||
@ApiModelProperty(value = "应急演练开始时间")
|
||||
private Date entEmRehearsalStartTime;
|
||||
|
||||
@ApiModelProperty(value = "应急演练开始时间")
|
||||
private Date entEmRehearsalEndTime;
|
||||
|
||||
@ApiModelProperty(value = "应急演练项目")
|
||||
private String entEmRehearsalProject;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String entEmRehearsalRemark;
|
||||
|
||||
@ApiModelProperty(value = "公司")
|
||||
private String enterpriseId;
|
||||
|
||||
public String getEnterpriseId() {
|
||||
return enterpriseId;
|
||||
}
|
||||
|
||||
public void setEnterpriseId(String enterpriseId) {
|
||||
this.enterpriseId = enterpriseId;
|
||||
}
|
||||
|
||||
public String getEntEmRehearsalId() {
|
||||
return entEmRehearsalId;
|
||||
}
|
||||
|
||||
public void setEntEmRehearsalId(String entEmRehearsalId) {
|
||||
this.entEmRehearsalId = entEmRehearsalId;
|
||||
}
|
||||
|
||||
public Date getEntEmRehearsalStartTime() {
|
||||
return entEmRehearsalStartTime;
|
||||
}
|
||||
|
||||
public void setEntEmRehearsalStartTime(Date entEmRehearsalStartTime) {
|
||||
this.entEmRehearsalStartTime = entEmRehearsalStartTime;
|
||||
}
|
||||
|
||||
public Date getEntEmRehearsalEndTime() {
|
||||
return entEmRehearsalEndTime;
|
||||
}
|
||||
|
||||
public void setEntEmRehearsalEndTime(Date entEmRehearsalEndTime) {
|
||||
this.entEmRehearsalEndTime = entEmRehearsalEndTime;
|
||||
}
|
||||
|
||||
public String getEntEmRehearsalProject() {
|
||||
return entEmRehearsalProject;
|
||||
}
|
||||
|
||||
public void setEntEmRehearsalProject(String entEmRehearsalProject) {
|
||||
this.entEmRehearsalProject = entEmRehearsalProject;
|
||||
}
|
||||
|
||||
public String getEntEmRehearsalRemark() {
|
||||
return entEmRehearsalRemark;
|
||||
}
|
||||
|
||||
public void setEntEmRehearsalRemark(String entEmRehearsalRemark) {
|
||||
this.entEmRehearsalRemark = entEmRehearsalRemark;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.rzyc.model.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* 企业应急预案dto
|
||||
* @author Xuwanxin
|
||||
* @date 2022/11/11
|
||||
* */
|
||||
public class EntEmReservePlanDto {
|
||||
|
||||
@ApiModelProperty(value = "企业应急预案id")
|
||||
private String entEmReservePlanId;
|
||||
|
||||
@ApiModelProperty(value = "应急预案名")
|
||||
private String entEmReservePlanName;
|
||||
|
||||
@ApiModelProperty(value = "应急预案类型")
|
||||
private String entEmReservePlanType;
|
||||
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private String enterpriseId;
|
||||
|
||||
public String getEntEmReservePlanId() {
|
||||
return entEmReservePlanId;
|
||||
}
|
||||
|
||||
public void setEntEmReservePlanId(String entEmReservePlanId) {
|
||||
this.entEmReservePlanId = entEmReservePlanId;
|
||||
}
|
||||
|
||||
public String getEntEmReservePlanName() {
|
||||
return entEmReservePlanName;
|
||||
}
|
||||
|
||||
public void setEntEmReservePlanName(String entEmReservePlanName) {
|
||||
this.entEmReservePlanName = entEmReservePlanName;
|
||||
}
|
||||
|
||||
public String getEntEmReservePlanType() {
|
||||
return entEmReservePlanType;
|
||||
}
|
||||
|
||||
public void setEntEmReservePlanType(String entEmReservePlanType) {
|
||||
this.entEmReservePlanType = entEmReservePlanType;
|
||||
}
|
||||
|
||||
public String getEnterpriseId() {
|
||||
return enterpriseId;
|
||||
}
|
||||
|
||||
public void setEnterpriseId(String enterpriseId) {
|
||||
this.enterpriseId = enterpriseId;
|
||||
}
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
</update>
|
||||
|
||||
|
||||
<select id="selectEntDeviceMaintenanceRecord">
|
||||
<select id="selectEntDeviceMaintenanceRecord" resultMap="BaseResultMap">
|
||||
select * from ent_device_maintenance_record
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -21,4 +21,13 @@
|
|||
ent_em_equipment_id, ent_em_equipment_number, ent_em_equipment_type, ent_em_equipment_storage_location, ent_em_equipment_name, enterprise_id, create_time, create_by, modify_time, modify_by
|
||||
</sql>
|
||||
|
||||
<select id="selectEntEmEquipmentList" resultMap="BaseResultMap">
|
||||
select * from ent_em_equipment where enterprise_id = #{enterpriseId} and del_state = 1
|
||||
</select>
|
||||
|
||||
<update id="updateEntEmEquipment">
|
||||
update ent_em_equipment set ent_em_equipment_number = #{entEmEquipmentNumber},ent_em_equipment_type = #{entEmEquipmentType},ent_em_equipment_storage_location = #{entEmEquipmentStorageLocation},
|
||||
ent_em_equipment_name = #{entEmEquipmentName},enterprise_id = #{enterpriseId},modify_time = #{modifyTime},modify_by = #{modifyBy} where ent_em_equipment_id = #{entEmEquipmentId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
<id column="ent_em_expert_id" property="entEmExpertId" />
|
||||
<result column="enterprise_id" property="enterpriseId" />
|
||||
<result column="ent_em_expert_name" property="entEmExpertName" />
|
||||
<result column="age" property="age"/>
|
||||
<result column="ent_em_expert_sex" property="entEmExpertSex" />
|
||||
<result column="ent_em_expert_phone" property="entEmExpertPhone" />
|
||||
<result column="ent_em_expert_class" property="entEmExpertClass" />
|
||||
|
|
@ -24,4 +25,20 @@
|
|||
ent_em_expert_id, enterprise_id, ent_em_expert_name, ent_em_expert_sex, ent_em_expert_phone, ent_em_expert_class, ent_em_expert_major, ent_em_expert_category, ent_em_expert_address, create_by, create_time, modify_by, modify_time
|
||||
</sql>
|
||||
|
||||
<select id="selectEntEmExpertList" resultMap="BaseResultMap">
|
||||
select * from ent_em_expert where enterprise_id = #{enterpriseId} and del_state = 1
|
||||
<if test="null != entEmExpertClass and '' != entEmExpertClass">
|
||||
and ent_em_expert_class like concat('%',#{entEmExpertClass},'%')
|
||||
</if>
|
||||
<if test="null != entEmExpertCategory and '' != entEmExpertCategory">
|
||||
and ent_em_expert_category like concat('%',#{entEmExpertCategory},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<update id="updateEntEmExpertUpdate">
|
||||
update ent_em_expert set enterprise_id = #{enterpriseId},ent_em_expert_name = #{entEmExpertName},ent_em_expert_sex = #{entEmExpertSex},ent_em_expert_phone = #{entEmExpertPhone},ent_em_expert_class = #{entEmExpertClass},ent_em_expert_major = #{entEmExpertMajor},ent_em_expert_category = #{entEmExpertCategory},
|
||||
ent_em_expert_address = #{entEmExpertAddress},age = #{age},modify_by = #{modifyBy},modify_time = #{modifyTime}
|
||||
where ent_em_expert_id = #{entEmExpertId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -20,4 +20,14 @@
|
|||
ent_em_rehearsal_id, ent_em_rehearsal_start_time, ent_em_rehearsal_end_time, ent_em_rehearsal_project, ent_em_rehearsal_remark, create_by, modify_by, create_time, modify_time
|
||||
</sql>
|
||||
|
||||
<select id="selectEntEmRehearsalList" resultMap="BaseResultMap">
|
||||
select * from ent_em_rehearsal where enterprise_id = #{enterpriseId} and del_state = 1
|
||||
</select>
|
||||
|
||||
<update id="UpdateEntEmRehearsal">
|
||||
update ent_em_rehearsal set ent_em_rehearsal_start_time = #{entEmRehearsalStartTime},ent_em_rehearsal_end_time = #{entEmRehearsalEndTime},ent_em_rehearsal_project = #{entEmRehearsalProject},
|
||||
set ent_em_rehearsal_remark = #{entEmRehearsalRemark},modify_by = #{modifyBy},modify_time = #{modifyTime},enterprise_id = #{enterpriseId}
|
||||
where ent_em_rehearsal_id = #{entEmRehearsalId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -19,4 +19,14 @@
|
|||
ent_em_reserve_plan_id, ent_em_reserve_plan_name, ent_em_reserve_plan_type, enterprise_id, create_time, create_by, modify_time, modify_by
|
||||
</sql>
|
||||
|
||||
<select id="selectEntEmReservePlanList" resultMap="BaseResultMap">
|
||||
select * from ent_em_reserve_plan where enterprise_id = #{enterpriseId} and del_state = 1
|
||||
</select>
|
||||
|
||||
<update id="updateEntEmReservePlan">
|
||||
update ent_em_reserve_plan set ent_em_reserve_plan_name = #{entEmReservePlanName},ent_em_reserve_plan_type = #{entEmReservePlanType},enterprise_id = #{enterpriseId},
|
||||
modify_time = #{modifyTime},modify_by = #{modifyBy}
|
||||
where ent_em_reserve_plan_id = #{entEmReservePlanId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@
|
|||
device_id = #{entInsRecord.deviceId},spare_part_id = #{entInsRecord.spare_part_id} ,cycle_id = #{entInsRecord.cycleId} where ins_record_id = #{insRecordId}
|
||||
</update>
|
||||
|
||||
<select id="selectInspectionRecord">
|
||||
<select id="selectInspectionRecord" resultMap="BaseResultMap">
|
||||
select * from ent_ins_record where 1=1
|
||||
<if test="null != inspectionName and '' != inspectionName">
|
||||
and inspection_name like concat('%',#{inspectionName},'%')
|
||||
<if test="null != inspectionRecordName and '' != inspectionRecordName">
|
||||
and ins_record_situation like concat('%',#{inspectionRecordName},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -91,6 +91,40 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insertList">
|
||||
insert into ent_post_task (task_id, post_id,ent_user_id,enterprise_id,
|
||||
ent_list_id,
|
||||
list_id, post_list_id, item_title,
|
||||
item_content, start_time,ent_time,task_state,
|
||||
frequency,
|
||||
del_state, create_time, create_by,
|
||||
modify_time, modify_by
|
||||
)
|
||||
values
|
||||
<foreach collection="entTasks" item="record" separator=",">
|
||||
(#{record.taskId,jdbcType=VARCHAR},
|
||||
#{record.postId,jdbcType=VARCHAR},
|
||||
#{record.entUserId,jdbcType=VARCHAR},
|
||||
#{record.enterpriseId,jdbcType=VARCHAR},
|
||||
#{record.entListId,jdbcType=VARCHAR},
|
||||
#{record.listId,jdbcType=VARCHAR},
|
||||
#{record.postListId,jdbcType=VARCHAR},
|
||||
#{record.itemTitle,jdbcType=VARCHAR},
|
||||
#{record.itemContent,jdbcType=VARCHAR},
|
||||
#{record.startTime},
|
||||
#{record.entTime},
|
||||
#{record.taskState,jdbcType=INTEGER},
|
||||
#{record.frequency,jdbcType=INTEGER},
|
||||
#{record.delState,jdbcType=INTEGER},
|
||||
#{record.createTime},
|
||||
#{record.createBy,jdbcType=VARCHAR},
|
||||
#{record.modifyTime},
|
||||
#{record.modifyBy,jdbcType=VARCHAR}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -531,6 +531,23 @@ public class BaseController {
|
|||
@Autowired
|
||||
protected EntUserTypeMapper entUserTypeMapper;
|
||||
|
||||
//企业应急资源
|
||||
@Autowired
|
||||
protected EntEmEquipmentMapper entEmEquipmentMapper;
|
||||
|
||||
//企业应急专家
|
||||
@Autowired
|
||||
protected EntEmExpertMapper entEmExpertMapper;
|
||||
|
||||
//企业应急预案
|
||||
@Autowired
|
||||
protected EntEmReservePlanMapper entEmReservePlanMapper;
|
||||
|
||||
//企业应急演练
|
||||
@Autowired
|
||||
protected EntEmRehearsalMapper entEmRehearsalMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 新都文件地址处理
|
||||
* @param url
|
||||
|
|
@ -1141,5 +1158,265 @@ public class BaseController {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建岗位任务
|
||||
* @param entPostList
|
||||
* @throws Exception
|
||||
*/
|
||||
public void addFactorTask(EntPostList entPostList,String sysUserId)throws Exception{
|
||||
//任务列表
|
||||
List<EntPostTask> entTasks = new ArrayList<>();
|
||||
if(1 == entPostList.getStandard()){
|
||||
entTasks = this.getYearTask(entPostList,sysUserId);
|
||||
}else if(2 == entPostList.getStandard()){
|
||||
entTasks = this.getHalfYearTask(entPostList,sysUserId);
|
||||
}else if(4 == entPostList.getStandard()){
|
||||
entTasks = this.getQuarterTask(entPostList,sysUserId);
|
||||
}else if(12 == entPostList.getStandard()){
|
||||
entTasks = this.getMonthTask(entPostList,sysUserId);
|
||||
}
|
||||
if(null != entTasks && entTasks.size() > 0){
|
||||
entPostTaskMapper.insertList(entTasks);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取年任务信息
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
private List<EntPostTask> getYearTask(EntPostList entPostList,String sysUserId)throws Exception{
|
||||
List<EntPostTask> entPostTasks = new ArrayList<>();
|
||||
EntPostTask ept = new EntPostTask();
|
||||
SysUser sysUser = getUser(sysUserId);
|
||||
Integer year = Calendar.getInstance().get(Calendar.YEAR);
|
||||
String startTime = year + "-01-01 00:00:01";
|
||||
String endTime = year + "-12-31 23:59:59";
|
||||
String subject = year+"年工作任务:"+entPostList.getItemTitle();
|
||||
ept.setItemTitle(subject);
|
||||
ept.setFrequency(entPostList.getFrequency());
|
||||
ept.setTaskState(1);
|
||||
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
||||
ept.setPostId(entPostList.getPostId());
|
||||
ept.setEntUserId(entPostList.getEntUserId());
|
||||
ept.setListId(entPostList.getListId());
|
||||
ept.setPostListId(entPostList.getPostListId());
|
||||
ept.setEntListId(entPostList.getPostListId());
|
||||
ept.setTaskId(RandomNumber.getUUid());
|
||||
Date start = DateUtils.parseString2Date(startTime,Constants.DATA);
|
||||
Date end = DateUtils.parseString2Date(endTime,Constants.DATA);
|
||||
ept.setStartTime(start);
|
||||
ept.setEntTime(end);
|
||||
ept.setDelState(DelState.NOT_DEL.getState());
|
||||
ept.setCreateBy(sysUser.getChinaname());
|
||||
ept.setCreateTime(new Date());
|
||||
ept.setModifyBy(sysUser.getChinaname());
|
||||
ept.setModifyTime(new Date());
|
||||
entPostTasks.add(ept);
|
||||
return entPostTasks;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取半年任务信息
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
private List<EntPostTask> getHalfYearTask(EntPostList entPostList,String sysUserId)throws Exception{
|
||||
List<EntPostTask> entPostTasks = new ArrayList<>();
|
||||
List<OaTaskTime> taskTimes = this.getTaskTime(entPostList.getStandard());
|
||||
Integer year = Calendar.getInstance().get(Calendar.YEAR);
|
||||
SysUser sysUser = getUser(sysUserId);
|
||||
for (OaTaskTime taskTime : taskTimes){
|
||||
EntPostTask ept = new EntPostTask();
|
||||
String subject = year+"年工作任务:"+entPostList.getItemTitle();
|
||||
ept.setItemTitle(subject);
|
||||
ept.setFrequency(entPostList.getFrequency());
|
||||
ept.setTaskState(1);
|
||||
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
||||
ept.setPostId(entPostList.getPostId());
|
||||
ept.setEntUserId(entPostList.getEntUserId());
|
||||
ept.setListId(entPostList.getListId());
|
||||
ept.setPostListId(entPostList.getPostListId());
|
||||
ept.setEntListId(entPostList.getPostListId());
|
||||
ept.setTaskId(RandomNumber.getUUid());
|
||||
Date start = DateUtils.parseString2Date(taskTime.getStartTime(),Constants.DATA);
|
||||
Date end = DateUtils.parseString2Date(taskTime.getEndTime(),Constants.DATA);
|
||||
ept.setStartTime(start);
|
||||
ept.setEntTime(end);
|
||||
ept.setDelState(DelState.NOT_DEL.getState());
|
||||
ept.setCreateBy(sysUser.getChinaname());
|
||||
ept.setCreateTime(new Date());
|
||||
ept.setModifyBy(sysUser.getChinaname());
|
||||
ept.setModifyTime(new Date());
|
||||
entPostTasks.add(ept);
|
||||
}
|
||||
return entPostTasks;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取季度任务信息
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
private List<EntPostTask> getQuarterTask(EntPostList entPostList,String sysUserId)throws Exception{
|
||||
List<EntPostTask> entPostTasks = new ArrayList<>();
|
||||
List<OaTaskTime> taskTimes = this.getTaskTime(entPostList.getStandard());
|
||||
Integer year = Calendar.getInstance().get(Calendar.YEAR);
|
||||
Integer index = 1;
|
||||
for (OaTaskTime taskTime : taskTimes){
|
||||
EntPostTask ept = new EntPostTask();
|
||||
SysUser sysUser = getUser(sysUserId);
|
||||
String subject = year+"年第"+index+"季度工作任务::"+entPostList.getItemTitle();
|
||||
ept.setItemTitle(subject);
|
||||
ept.setFrequency(entPostList.getFrequency());
|
||||
ept.setTaskState(1);
|
||||
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
||||
ept.setPostId(entPostList.getPostId());
|
||||
ept.setEntUserId(entPostList.getEntUserId());
|
||||
ept.setListId(entPostList.getListId());
|
||||
ept.setPostListId(entPostList.getPostListId());
|
||||
ept.setEntListId(entPostList.getPostListId());
|
||||
ept.setTaskId(RandomNumber.getUUid());
|
||||
Date start = DateUtils.parseString2Date(taskTime.getStartTime(),Constants.DATA);
|
||||
Date end = DateUtils.parseString2Date(taskTime.getEndTime(),Constants.DATA);
|
||||
ept.setStartTime(start);
|
||||
ept.setEntTime(end);
|
||||
ept.setDelState(DelState.NOT_DEL.getState());
|
||||
ept.setCreateBy(sysUser.getChinaname());
|
||||
ept.setCreateTime(new Date());
|
||||
ept.setModifyBy(sysUser.getChinaname());
|
||||
ept.setModifyTime(new Date());
|
||||
entPostTasks.add(ept);
|
||||
index++;
|
||||
}
|
||||
return entPostTasks;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取月任务信息
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
private List<EntPostTask> getMonthTask(EntPostList entPostList,String sysUserId)throws Exception{
|
||||
List<EntPostTask> entPostTasks = new ArrayList<>();
|
||||
List<OaTaskTime> taskTimes = this.getTaskTime(entPostList.getStandard());
|
||||
Integer year = Calendar.getInstance().get(Calendar.YEAR);
|
||||
Integer index = 1;
|
||||
for (OaTaskTime taskTime : taskTimes){
|
||||
EntPostTask ept = new EntPostTask();
|
||||
SysUser sysUser = getUser(sysUserId);
|
||||
String subject = year+"年第"+index+"月工作任务:"+entPostList.getFrequency();
|
||||
ept.setItemTitle(subject);
|
||||
ept.setFrequency(entPostList.getFrequency());
|
||||
ept.setTaskState(1);
|
||||
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
||||
ept.setPostId(entPostList.getPostId());
|
||||
ept.setEntUserId(entPostList.getEntUserId());
|
||||
ept.setListId(entPostList.getListId());
|
||||
ept.setPostListId(entPostList.getPostListId());
|
||||
ept.setEntListId(entPostList.getPostListId());
|
||||
ept.setTaskId(RandomNumber.getUUid());
|
||||
Date start = DateUtils.parseString2Date(taskTime.getStartTime(),Constants.DATA);
|
||||
Date end = DateUtils.parseString2Date(taskTime.getEndTime(),Constants.DATA);
|
||||
ept.setStartTime(start);
|
||||
ept.setEntTime(end);
|
||||
ept.setDelState(DelState.NOT_DEL.getState());
|
||||
ept.setCreateBy(sysUser.getChinaname());
|
||||
ept.setCreateTime(new Date());
|
||||
ept.setModifyBy(sysUser.getChinaname());
|
||||
ept.setModifyTime(new Date());
|
||||
entPostTasks.add(ept);
|
||||
index++;
|
||||
}
|
||||
return entPostTasks;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取任务时间段
|
||||
* @param checkstandard
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
private List<OaTaskTime> getTaskTime(Integer checkstandard)throws Exception{
|
||||
List<OaTaskTime> oaTaskTimes = new LinkedList<>();
|
||||
List<Integer> months = new ArrayList<>();
|
||||
Integer year = Calendar.getInstance().get(Calendar.YEAR);
|
||||
if(2 == checkstandard){
|
||||
months.add(1);
|
||||
months.add(7);
|
||||
for (Integer month : months){
|
||||
|
||||
Integer endMonth = month + 5;
|
||||
Integer day = DateUtils.getMonthLastDay(year,endMonth);
|
||||
OaTaskTime oaTaskTime = new OaTaskTime();
|
||||
oaTaskTime.setStartTime(year+"-0"+month+"-01 00:00:01");
|
||||
if(endMonth < 10){
|
||||
oaTaskTime.setEndTime(year+"-0"+endMonth+"-"+day+" 23:59:59");
|
||||
}else{
|
||||
oaTaskTime.setEndTime(year+"-"+endMonth+"-"+day+" 23:59:59");
|
||||
}
|
||||
oaTaskTimes.add(oaTaskTime);
|
||||
}
|
||||
}else if(4 == checkstandard){
|
||||
months.add(1);
|
||||
months.add(4);
|
||||
months.add(7);
|
||||
months.add(10);
|
||||
for (Integer month : months){
|
||||
|
||||
Integer entMonth = month + 2;
|
||||
Integer day = DateUtils.getMonthLastDay(year,entMonth);
|
||||
OaTaskTime oaTaskTime = new OaTaskTime();
|
||||
|
||||
String startMonthStr = "";
|
||||
String endMonthStr = "";
|
||||
if(month < 10){
|
||||
startMonthStr = "0"+month;
|
||||
}else{
|
||||
startMonthStr = ""+month;
|
||||
}
|
||||
if(entMonth < 10){
|
||||
endMonthStr = "0"+entMonth;
|
||||
}else{
|
||||
endMonthStr = entMonth+"";
|
||||
}
|
||||
oaTaskTime.setStartTime(year+"-"+startMonthStr+"-01 00:00:01");
|
||||
oaTaskTime.setEndTime(year+"-"+endMonthStr+"-"+day+" 23:59:59");
|
||||
oaTaskTimes.add(oaTaskTime);
|
||||
}
|
||||
}else if(12 == checkstandard){
|
||||
months.add(1);
|
||||
months.add(2);
|
||||
months.add(3);
|
||||
months.add(4);
|
||||
months.add(5);
|
||||
months.add(6);
|
||||
months.add(7);
|
||||
months.add(8);
|
||||
months.add(9);
|
||||
months.add(10);
|
||||
months.add(11);
|
||||
months.add(12);
|
||||
for (Integer month : months){
|
||||
Integer day = DateUtils.getMonthLastDay(year,month);
|
||||
OaTaskTime oaTaskTime = new OaTaskTime();
|
||||
String startMonthStr = "";
|
||||
if(month < 10){
|
||||
startMonthStr = "0"+month;
|
||||
}else{
|
||||
startMonthStr = ""+month;
|
||||
}
|
||||
oaTaskTime.setStartTime(year+"-"+startMonthStr+"-01 00:00:01");
|
||||
oaTaskTime.setEndTime(year+"-"+startMonthStr+"-"+day+" 23:59:59");
|
||||
oaTaskTimes.add(oaTaskTime);
|
||||
}
|
||||
}
|
||||
return oaTaskTimes;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,204 @@
|
|||
package com.rzyc.controller;
|
||||
|
||||
|
||||
import com.common.utils.model.SingleResult;
|
||||
import com.rzyc.config.MethodAnnotation;
|
||||
import com.rzyc.config.RedisUtil;
|
||||
import com.rzyc.model.EntEmEquipment;
|
||||
import com.rzyc.model.EntEmExpert;
|
||||
import com.rzyc.model.EntEmReservePlan;
|
||||
import com.rzyc.model.dto.EntEmEquipmentDto;
|
||||
import com.rzyc.model.dto.EntEmExpertDto;
|
||||
import com.rzyc.model.dto.EntEmRehearsalDto;
|
||||
import com.rzyc.model.dto.EntEmReservePlanDto;
|
||||
import com.rzyc.service.PcBusinessService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Xuwanxin
|
||||
* @date 2022/11/10
|
||||
*/
|
||||
@Api(tags = "企业端应急资源接口")
|
||||
@CrossOrigin("*")
|
||||
@RequestMapping("entEmEquipment")
|
||||
@Controller
|
||||
@Validated
|
||||
public class EmergencyEquipmentController {
|
||||
|
||||
PcBusinessService pcBusinessService;
|
||||
|
||||
RedisUtil redisUtil;
|
||||
|
||||
public EmergencyEquipmentController(PcBusinessService pcBusinessService, RedisUtil redisUtil) {
|
||||
this.pcBusinessService = pcBusinessService;
|
||||
this.redisUtil = redisUtil;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应急资源列表
|
||||
* @return list
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "应急资源列表", notes = "应急资源列表")
|
||||
@GetMapping(value = "/entEmEquipmentList")
|
||||
@PreAuthorize("hasAnyAuthority('entEmEquipmentList','entEmEquipmentList:update')")
|
||||
@MethodAnnotation(authorizations = {"entEmEquipmentList","entEmEquipmentList:update"},name = "应急资源列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "enterpriseId", value = "企业id",required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "page", value = "page",required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "page",required = true, dataType = "string"),
|
||||
})
|
||||
@ResponseBody
|
||||
public SingleResult<List<EntEmEquipment>> entEmEquipmentList(@RequestParam(required = true) String enterpriseId,
|
||||
@RequestParam(required = true)Integer page,
|
||||
@RequestParam(required = true)Integer pageSize)throws Exception{
|
||||
return pcBusinessService.entEmEquipmentList(enterpriseId,page,pageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* 应急资源修改
|
||||
* @return list
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "应急资源修改", notes = "应急资源修改")
|
||||
@PostMapping(value = "/entEmEquipmentUpdate")
|
||||
@PreAuthorize("hasAnyAuthority('entEmEquipmentList:update')")
|
||||
@MethodAnnotation(authorizations = {"entEmEquipmentList:update"},name = "应急资源修改")
|
||||
@ResponseBody
|
||||
public SingleResult entEmEquipmentUpdate(@RequestBody@Valid EntEmEquipmentDto entEmEquipmentDto)throws Exception{
|
||||
return pcBusinessService.entEmEquipmentUpdate(entEmEquipmentDto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 应急专家列表
|
||||
* @return list
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "应急专家列表", notes = "应急专家列表")
|
||||
@GetMapping(value = "/entEmExpertList")
|
||||
@PreAuthorize("hasAnyAuthority('entEmExpertList','entEmExpertList:update')")
|
||||
@MethodAnnotation(authorizations = {"entEmExpertList","entEmExpertList:update"},name = "应急专家列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "enterpriseId", value = "企业id",required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "page", value = "page",required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "page",required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "entEmExpertClass", value = "entEmExpertClass",required = false, dataType = "string"),
|
||||
@ApiImplicitParam(name = "entEmExpertCategory", value = "entEmExpertCategory",required = false, dataType = "string"),
|
||||
})
|
||||
@ResponseBody
|
||||
public SingleResult<List<EntEmExpert>> entEmExpertList(@RequestParam(required = true)String enterpriseId,
|
||||
@RequestParam(required = true)Integer page,
|
||||
@RequestParam(required = true)Integer pageSize,
|
||||
String entEmExpertClass,
|
||||
String entEmExpertCategory)throws Exception{
|
||||
return pcBusinessService.entEmExpertList(enterpriseId,page,pageSize,entEmExpertClass,entEmExpertCategory);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 应急专家修改
|
||||
* @return list
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "应急专家修改", notes = "应急专家修改")
|
||||
@PostMapping(value = "/entEmExpertUpdate")
|
||||
@PreAuthorize("hasAnyAuthority('entEmExpertList:update')")
|
||||
@MethodAnnotation(authorizations = {"entEmExpertList:update"},name = "应急专家修改")
|
||||
@ResponseBody
|
||||
public SingleResult entEmExpertUpdate(@RequestBody@Valid EntEmExpertDto entEmExpertDto)throws Exception{
|
||||
return pcBusinessService.entEmExpertUpdate(entEmExpertDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 应急预案
|
||||
* @return list
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "应急预案列表", notes = "应急预案列表")
|
||||
@GetMapping(value = "/entEmReservePlanList")
|
||||
@PreAuthorize("hasAnyAuthority('entEmReservePlanList','entEmReservePlanList:update')")
|
||||
@MethodAnnotation(authorizations = {"entEmReservePlanList","entEmReservePlanList:update"},name = "应急预案列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "enterpriseId", value = "企业id",required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "page", value = "page",required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "page",required = true, dataType = "string"),
|
||||
})
|
||||
@ResponseBody
|
||||
public SingleResult<List<EntEmReservePlan>> entEmReservePlanList(@RequestParam(required = true)String enterpriseId,
|
||||
@RequestParam(required = true)Integer page,
|
||||
@RequestParam(required = true)Integer pageSize)throws Exception{
|
||||
return pcBusinessService.entEmReservePlanList(enterpriseId,page,pageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* 应急预案修改
|
||||
* @return list
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "应急预案修改", notes = "应急预案修改")
|
||||
@PostMapping(value = "/entEmReservePlanUpdate")
|
||||
@PreAuthorize("hasAnyAuthority('entEmReservePlanList:update')")
|
||||
@MethodAnnotation(authorizations = {"entEmReservePlanList:update"},name = "应急预案修改")
|
||||
@ResponseBody
|
||||
public SingleResult entEmReservePlanUpdate(@RequestBody@Valid EntEmReservePlanDto entEmReservePlanDto)throws Exception{
|
||||
return pcBusinessService.entEmReservePlanUpdate(entEmReservePlanDto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 应急演练
|
||||
* @return list
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "应急演练列表", notes = "应急演练列表")
|
||||
@GetMapping(value = "/entEmRehearsalList")
|
||||
@PreAuthorize("hasAnyAuthority('entEmRehearsalList','entEmRehearsalList:update')")
|
||||
@MethodAnnotation(authorizations = {"entEmRehearsalList","entEmRehearsalList:update"},name = "应急演练列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "enterpriseId", value = "企业id",required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "page", value = "page",required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "page",required = true, dataType = "string"),
|
||||
})
|
||||
@ResponseBody
|
||||
public SingleResult<List<EntEmReservePlan>> entEmRehearsalList(@RequestParam(required = true)String enterpriseId,
|
||||
@RequestParam(required = true)Integer page,
|
||||
@RequestParam(required = true)Integer pageSize)throws Exception{
|
||||
return pcBusinessService.entEmRehearsalList(enterpriseId,page,pageSize);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 应急演练修改
|
||||
* @return list
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "应急演练修改", notes = "应急演练修改")
|
||||
@PostMapping(value = "/entEmRehearsalUpdate")
|
||||
@PreAuthorize("hasAnyAuthority('entEmRehearsalList:update')")
|
||||
@MethodAnnotation(authorizations = {"entEmRehearsalList:update"},name = "应急演练修改")
|
||||
@ResponseBody
|
||||
public SingleResult entEmRehearsalUpdate(@RequestBody@Valid EntEmRehearsalDto entEmRehearsalDto)throws Exception{
|
||||
return pcBusinessService.entEmRehearsalUpdate(entEmRehearsalDto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -179,7 +179,7 @@ public class EnterpriseEquipmentController extends BaseController {
|
|||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "设备巡检记录", notes = "设备巡检记录")
|
||||
@PostMapping(value = "/insRecord")
|
||||
@GetMapping(value = "/insRecord")
|
||||
@PreAuthorize("hasAnyAuthority('insRecord','insRecord:update')")
|
||||
@MethodAnnotation(authorizations = {"insRecord","insRecord:update"},name = "设备巡检记录")
|
||||
@ResponseBody
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
package com.rzyc.controller;
|
||||
|
||||
import com.common.utils.model.MultiResult;
|
||||
import com.rzyc.model.ent.BaseInClass;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @版本号
|
||||
* @Author qcl
|
||||
* @date 2022/9/20&14:59
|
||||
*/
|
||||
|
||||
|
||||
@Api(tags = "行业清单")
|
||||
@CrossOrigin("*")
|
||||
@RequestMapping("industryList")
|
||||
@Validated
|
||||
@RestController
|
||||
public class IndustryListController extends BaseController {
|
||||
|
||||
/**
|
||||
* 父级行业列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "父级行业列表", notes = "行业清单列表")
|
||||
@GetMapping("/industrySelect")
|
||||
@ResponseBody
|
||||
public MultiResult<String> industrySelect() {
|
||||
|
||||
MultiResult<String> result = new MultiResult<>();
|
||||
ArrayList<String> nameList = new ArrayList<>();
|
||||
List<BaseInClass> baseInClassList = baseInClassMapper.findAll();
|
||||
//取出对象的name字段放入集合
|
||||
for (BaseInClass baseInClass : baseInClassList) {
|
||||
String industryClassName = baseInClass.getIndustryclassname();
|
||||
nameList.add(industryClassName);
|
||||
}
|
||||
result.setData(nameList);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -10,10 +10,7 @@ import com.common.utils.model.SingleResult;
|
|||
import com.rzyc.bean.user.dto.LoginDto;
|
||||
import com.rzyc.config.MethodAnnotation;
|
||||
import com.rzyc.config.RedisUtil;
|
||||
import com.rzyc.model.EntPostDuty;
|
||||
import com.rzyc.model.EntPostList;
|
||||
import com.rzyc.model.EntPostTask;
|
||||
import com.rzyc.model.EntUserCredential;
|
||||
import com.rzyc.model.*;
|
||||
import com.rzyc.model.dto.*;
|
||||
import com.rzyc.model.ent.EntPost;
|
||||
import com.rzyc.model.ent.EntUser;
|
||||
|
|
@ -350,7 +347,8 @@ public class PersonalController extends BaseController{
|
|||
@PreAuthorize("hasAnyAuthority('entUserPostTask:update')")
|
||||
@MethodAnnotation(authorizations = {"entUserPostTask:update"},name = "手动企业分配任务")
|
||||
@ResponseBody
|
||||
public SingleResult manualAssignmentTask(AddOrUpdateEntUserPostListDto listDto)throws Exception{
|
||||
@Transactional
|
||||
public SingleResult manualAssignmentTask(@RequestBody@Valid AddOrUpdateEntUserPostListDto listDto)throws Exception{
|
||||
return pcBusinessService.manualAssignmentTask(listDto);
|
||||
}
|
||||
|
||||
|
|
@ -387,8 +385,8 @@ public class PersonalController extends BaseController{
|
|||
@ApiImplicitParam(name = "userId", value = "用户id",required = true, dataType = "string"),
|
||||
})
|
||||
@GetMapping(value = "/entListGroupByListId")
|
||||
@PreAuthorize("hasAnyAuthority('entListGroupByListId')")
|
||||
@MethodAnnotation(authorizations = {"entListGroupByListId"},name = "企业清单(类型)分组查询")
|
||||
@PreAuthorize("hasAnyAuthority('entListGroupByListId','entListGroupByListId:update')")
|
||||
@MethodAnnotation(authorizations = {"entListGroupByListId","entListGroupByListId:update"},name = "企业清单(类型)分组查询")
|
||||
@ResponseBody
|
||||
public SingleResult<List<EntPostList>> entListGroupByListId(@RequestParam(required = true) String enterpriseId,
|
||||
String listId,
|
||||
|
|
@ -421,4 +419,9 @@ public class PersonalController extends BaseController{
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.github.pagehelper.Page;
|
|||
import com.rzyc.advice.CustomException;
|
||||
import com.rzyc.config.RedisUtil;
|
||||
import com.rzyc.controller.BaseController;
|
||||
import com.rzyc.enums.DelState;
|
||||
import com.rzyc.enums.RedisKeys;
|
||||
import com.rzyc.model.*;
|
||||
import com.rzyc.model.dto.*;
|
||||
|
|
@ -663,14 +664,16 @@ public class PcBusinessService extends BaseController {
|
|||
SingleResult singleResult = new SingleResult();
|
||||
EntPostList entPostList = new EntPostList();
|
||||
BeanUtils.copyProperties(addOrUpdateEntUserPostTaskDto,entPostList);
|
||||
entPostList.setPostListId(RandomNumber.getUUid());
|
||||
entPostList.setCreateBy(getUserId());
|
||||
entPostList.setCreateTime(new Date());
|
||||
entPostList.setDelState(DelState.NOT_DEL.getState());
|
||||
int result = entPostListMapper.insert(entPostList);
|
||||
if (result != 1 ){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
//插入任务
|
||||
this.addFactorTask(entPostList,getUserId());
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
|
|
@ -758,6 +761,112 @@ public class PcBusinessService extends BaseController {
|
|||
return singleResult;
|
||||
}
|
||||
|
||||
@PageOperation
|
||||
public SingleResult entEmEquipmentList(String enterpriseId,Integer page,Integer pageSize){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
Page<EntEmEquipment> entEmEquipments = (Page<EntEmEquipment>) entEmEquipmentMapper.selectEntEmEquipmentList(enterpriseId);
|
||||
singleResult.setDataPager(entEmEquipments);
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entEmEquipmentUpdate(EntEmEquipmentDto entEmEquipmentDto) throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
EntEmEquipment entEmEquipment = new EntEmEquipment();
|
||||
BeanUtils.copyProperties(entEmEquipmentDto,entEmEquipment);
|
||||
if(null != entEmEquipment.getEntEmEquipmentId() ){
|
||||
entEmEquipment.setModifyBy(getUserId());
|
||||
entEmEquipment.setModifyTime(new Date());
|
||||
entEmEquipmentMapper.updateEntEmEquipment(entEmEquipment);
|
||||
}else {
|
||||
entEmEquipment.setCreateBy(getUserId());
|
||||
entEmEquipment.setCreateTime(new Date());
|
||||
entEmEquipment.setEntEmEquipmentId(RandomNumber.getUUid());
|
||||
entEmEquipmentMapper.insert(entEmEquipment);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
@PageOperation
|
||||
public SingleResult entEmExpertList(String enterpriseId,Integer page,Integer pageSize,String entEmExpertClass,String entEmExpertCategory){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
Page<EntEmExpert>list = (Page<EntEmExpert>)entEmExpertMapper.selectEntEmExpertList(enterpriseId,entEmExpertClass,entEmExpertCategory);
|
||||
singleResult.setDataPager(list);
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entEmExpertUpdate(EntEmExpertDto entEmExpertDto) throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
EntEmExpert entEmExpert = new EntEmExpert();
|
||||
BeanUtils.copyProperties(entEmExpertDto,entEmExpert);
|
||||
if(null != entEmExpert.getEntEmExpertId()){
|
||||
entEmExpert.setModifyBy(getUserId());
|
||||
entEmExpert.setModifyTime(new Date());
|
||||
entEmExpertMapper.updateEntEmExpertUpdate(entEmExpert);
|
||||
}else {
|
||||
entEmExpert.setCreateBy(getUserId());
|
||||
entEmExpert.setCreateTime(new Date());
|
||||
entEmExpert.setEntEmExpertId(RandomNumber.getUUid());
|
||||
entEmExpertMapper.insert(entEmExpert);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
@PageOperation
|
||||
public SingleResult entEmReservePlanList(String enterpriseId,Integer page,Integer pageSize){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
Page<EntEmReservePlan>list = (Page<EntEmReservePlan>) entEmReservePlanMapper.selectEntEmReservePlanList(enterpriseId);
|
||||
singleResult.setDataPager(list);
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entEmReservePlanUpdate(EntEmReservePlanDto entEmReservePlanDto) throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
EntEmReservePlan entEmReservePlan = new EntEmReservePlan();
|
||||
BeanUtils.copyProperties(entEmReservePlanDto,entEmReservePlan);
|
||||
if(null != entEmReservePlan.getEntEmReservePlanId()){
|
||||
entEmReservePlan.setModifyBy(getUserId());
|
||||
entEmReservePlan.setModifyTime(new Date());
|
||||
entEmReservePlanMapper.updateEntEmReservePlan(entEmReservePlan);
|
||||
}else {
|
||||
entEmReservePlan.setCreateBy(getUserId());
|
||||
entEmReservePlan.setCreateTime(new Date());
|
||||
entEmReservePlan.setEntEmReservePlanId(RandomNumber.getUUid());
|
||||
entEmReservePlanMapper.insert(entEmReservePlan);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
@PageOperation
|
||||
public SingleResult entEmRehearsalList(String enterpriseId,Integer page,Integer pageSize) throws Exception{
|
||||
SingleResult singleResult = new SingleResult();
|
||||
Page<EntEmRehearsal>entEmRehearsals = (Page<EntEmRehearsal>) entEmRehearsalMapper.selectEntEmRehearsalList(enterpriseId);
|
||||
singleResult.setDataPager(entEmRehearsals);
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
|
||||
public SingleResult entEmRehearsalUpdate(EntEmRehearsalDto entEmRehearsalDto) throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
EntEmRehearsal entEmRehearsal = new EntEmRehearsal();
|
||||
BeanUtils.copyProperties(entEmRehearsalDto,entEmRehearsal);
|
||||
if(null != entEmRehearsal.getEntEmRehearsalId()){
|
||||
entEmRehearsal.setModifyBy(getUserId());
|
||||
entEmRehearsal.setModifyTime(new Date());
|
||||
entEmRehearsalMapper.updateEntEmRehearsal(entEmRehearsal);
|
||||
}else {
|
||||
entEmRehearsal.setCreateBy(getUserId());
|
||||
entEmRehearsal.setCreateTime(new Date());
|
||||
entEmRehearsal.setEntEmRehearsalId(RandomNumber.getUUid());
|
||||
entEmRehearsalMapper.insert(entEmRehearsal);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2260,8 +2260,6 @@ public class BaseController {
|
|||
if(null != oaTasks && oaTasks.size() > 0){
|
||||
oaTaskMapper.insertList(oaTasks);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user