巡检计划修改初始化
parent
435e7adcd4
commit
6bde4f4df9
@ -0,0 +1,133 @@
|
||||
package com.op.device.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 计划人员关联对象 equ_plan_person
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-19
|
||||
*/
|
||||
public class EquPlanPerson extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** 计划编码 */
|
||||
@Excel(name = "计划编码")
|
||||
private String planCode;
|
||||
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 账号 */
|
||||
@Excel(name = "账号")
|
||||
private String userName;
|
||||
|
||||
/** 工厂 */
|
||||
@Excel(name = "工厂")
|
||||
private String factoryCode;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String attr1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String attr2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String attr3;
|
||||
|
||||
/** 删除标识 */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public void setPlanCode(String planCode) {
|
||||
this.planCode = planCode;
|
||||
}
|
||||
|
||||
public String getPlanCode() {
|
||||
return planCode;
|
||||
}
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
public void setFactoryCode(String factoryCode) {
|
||||
this.factoryCode = factoryCode;
|
||||
}
|
||||
|
||||
public String getFactoryCode() {
|
||||
return factoryCode;
|
||||
}
|
||||
public void setAttr1(String attr1) {
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1() {
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2) {
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2() {
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(String attr3) {
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public String getAttr3() {
|
||||
return attr3;
|
||||
}
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("planCode", getPlanCode())
|
||||
.append("userId", getUserId())
|
||||
.append("userName", getUserName())
|
||||
.append("factoryCode", getFactoryCode())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.op.device.domain;
|
||||
|
||||
// 工作中心实体类
|
||||
public class WorkCenter {
|
||||
private int factoryId;
|
||||
|
||||
private String factoryName;
|
||||
|
||||
private String factoryCode;
|
||||
|
||||
private String fType;
|
||||
|
||||
public int getFactoryId() {
|
||||
return factoryId;
|
||||
}
|
||||
|
||||
public void setFactoryId(int factoryId) {
|
||||
this.factoryId = factoryId;
|
||||
}
|
||||
|
||||
public String getFactoryName() {
|
||||
return factoryName;
|
||||
}
|
||||
|
||||
public void setFactoryName(String factoryName) {
|
||||
this.factoryName = factoryName;
|
||||
}
|
||||
|
||||
public String getFactoryCode() {
|
||||
return factoryCode;
|
||||
}
|
||||
|
||||
public void setFactoryCode(String factoryCode) {
|
||||
this.factoryCode = factoryCode;
|
||||
}
|
||||
|
||||
public String getfType() {
|
||||
return fType;
|
||||
}
|
||||
|
||||
public void setfType(String fType) {
|
||||
this.fType = fType;
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.op.device.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.device.domain.EquPlanPerson;
|
||||
|
||||
/**
|
||||
* 计划人员关联Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-19
|
||||
*/
|
||||
public interface EquPlanPersonMapper {
|
||||
/**
|
||||
* 查询计划人员关联
|
||||
*
|
||||
* @param id 计划人员关联主键
|
||||
* @return 计划人员关联
|
||||
*/
|
||||
public EquPlanPerson selectEquPlanPersonById(String id);
|
||||
|
||||
/**
|
||||
* 查询计划人员关联列表
|
||||
*
|
||||
* @param equPlanPerson 计划人员关联
|
||||
* @return 计划人员关联集合
|
||||
*/
|
||||
public List<EquPlanPerson> selectEquPlanPersonList(EquPlanPerson equPlanPerson);
|
||||
|
||||
/**
|
||||
* 新增计划人员关联
|
||||
*
|
||||
* @param equPlanPerson 计划人员关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquPlanPerson(EquPlanPerson equPlanPerson);
|
||||
|
||||
/**
|
||||
* 修改计划人员关联
|
||||
*
|
||||
* @param equPlanPerson 计划人员关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquPlanPerson(EquPlanPerson equPlanPerson);
|
||||
|
||||
/**
|
||||
* 删除计划人员关联
|
||||
*
|
||||
* @param id 计划人员关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquPlanPersonById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除计划人员关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquPlanPersonByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 通过主计划code获取人员list
|
||||
* @param planCode
|
||||
* @return
|
||||
*/
|
||||
List<EquPlanPerson> selectEquPlanPersonByPlanCode(String planCode);
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.op.device.mapper.EquPlanPersonMapper">
|
||||
|
||||
<resultMap type="EquPlanPerson" id="EquPlanPersonResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="planCode" column="plan_code" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="factoryCode" column="factory_code" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEquPlanPersonVo">
|
||||
select id, plan_code, user_id, user_name, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_plan_person
|
||||
</sql>
|
||||
|
||||
<select id="selectEquPlanPersonList" parameterType="EquPlanPerson" resultMap="EquPlanPersonResult">
|
||||
<include refid="selectEquPlanPersonVo"/>
|
||||
<where>
|
||||
<if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEquPlanPersonById" parameterType="String" resultMap="EquPlanPersonResult">
|
||||
<include refid="selectEquPlanPersonVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectEquPlanPersonByPlanCode" parameterType="String" resultMap="EquPlanPersonResult">
|
||||
<include refid="selectEquPlanPersonVo"/>
|
||||
where plan_code = #{planCode} and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<insert id="insertEquPlanPerson" parameterType="EquPlanPerson">
|
||||
insert into equ_plan_person
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="planCode != null and planCode != ''">plan_code,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="planCode != null and planCode != ''">#{planCode},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEquPlanPerson" parameterType="EquPlanPerson">
|
||||
update equ_plan_person
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="planCode != null and planCode != ''">plan_code = #{planCode},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEquPlanPersonById" parameterType="String">
|
||||
delete from equ_plan_person where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEquPlanPersonByIds" parameterType="String">
|
||||
delete from equ_plan_person where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue