| | |
| | | /** |
| | | * @author User |
| | | * @description 针对表【sta_device_last(设备最新状态表)】的数据库操作Mapper |
| | | * @createDate 2024-06-20 11:31:20 |
| | | * @createDate 2024-06-22 11:43:04 |
| | | * @Entity com.dy.pmsGlobal.pojoSta.StaDeviceLast |
| | | */ |
| | | @Mapper |
| | |
| | | |
| | | int updateByPrimaryKey(StaDeviceLast record); |
| | | |
| | | StaDeviceLast selectByDeviceNo(String s); |
| | | } |
| | |
| | | /** |
| | | * @author User |
| | | * @description 针对表【sta_device_life(设备生命周期表)】的数据库操作Mapper |
| | | * @createDate 2024-06-20 11:31:20 |
| | | * @createDate 2024-06-22 11:43:04 |
| | | * @Entity com.dy.pmsGlobal.pojoSta.StaDeviceLife |
| | | */ |
| | | @Mapper |
| | |
| | | /** |
| | | * @author User |
| | | * @description 针对表【sta_device_production_log(设备生产日志表)】的数据库操作Mapper |
| | | * @createDate 2024-06-20 11:31:20 |
| | | * @createDate 2024-06-22 11:43:04 |
| | | * @Entity com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog |
| | | */ |
| | | @Mapper |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.*; |
| | | |
| | | |
| | | |
| | | import java.util.Date; |
| | | |
| | |
| | | /** |
| | | * 设备码 |
| | | */ |
| | | @NotBlank(message="[设备码]不能为空") |
| | | @NotBlank(message="设备码不能为空") |
| | | public String equipNo; |
| | | /** |
| | | * 生产登录id |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long claimId; |
| | | /** |
| | | * 维修id |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long repairId; |
| | | /** |
| | | * 计划id |
| | | */ |
| | |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long currNode; |
| | | /** |
| | | * 下一节点 |
| | | * 节点作业内容 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long nextNode; |
| | | public String nodeContent; |
| | | /** |
| | | * 记录设备周期内容 |
| | | */ |
| | | public String equipCycleContent; |
| | | /** |
| | | * 状态: 1:组装中,2:完成,3:维修,4:报废 |
| | | */ |
| | |
| | | */ |
| | | public String errorCode; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | public String memo; |
| | | /** |
| | | * 辅助人员:辅助员工id,以逗号隔开 |
| | | */ |
| | | public String assistants; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | public Date createTime; |
| | | /** |
| | | * |
| | | */ |
| | | public Date updatedDate; |
| | | /** |
| | | * 操作员id |
| | | */ |
| | |
| | | /** |
| | | * 入站时间(上一节点的出站时间) |
| | | */ |
| | | public Date inStationTime; |
| | | public Date inTime; |
| | | /** |
| | | * 出站时间 |
| | | */ |
| | | public Date outTime; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | public String memo; |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.*; |
| | | |
| | | |
| | | |
| | | import java.util.Date; |
| | | |
| | |
| | | /** |
| | | * 设备码 |
| | | */ |
| | | @NotBlank(message="[设备码]不能为空") |
| | | @NotBlank(message="设备码不能为空") |
| | | public String equipNo; |
| | | /** |
| | | * 生产登录id |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long claimId; |
| | | /** |
| | | * 维修id |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long repairId; |
| | | /** |
| | | * 计划id |
| | | */ |
| | |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long currNode; |
| | | /** |
| | | * 下一节点 |
| | | * 节点作业内容 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long nextNode; |
| | | public String nodeContent; |
| | | /** |
| | | * 投入时间 |
| | | * 记录设备周期内容 |
| | | */ |
| | | public Date inLineTime; |
| | | public String equipCycleContent; |
| | | |
| | | /** |
| | | * 状态: 1:组装中,2:完成,3:维修,4:报废 |
| | | */ |
| | |
| | | */ |
| | | public String errorCode; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | public String memo; |
| | | /** |
| | | * 辅助人员:辅助员工id,以逗号隔开 |
| | | */ |
| | | public String assistants; |
| | | /** |
| | | * |
| | | * 入站时间 |
| | | */ |
| | | public Date updatedDate; |
| | | public Date inTime; |
| | | /** |
| | | * 出站时间 |
| | | */ |
| | | public Date outTime; |
| | | /** |
| | | * 操作员id |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long updatedBy; |
| | | /** |
| | | * 生产登录id |
| | | * 备注 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long claimId; |
| | | /** |
| | | * 维修id |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long repairId; |
| | | public String memo; |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.*; |
| | | |
| | | |
| | | |
| | | import java.util.Date; |
| | | |
| | |
| | | /** |
| | | * 设备码 |
| | | */ |
| | | @NotBlank(message="[设备码]不能为空") |
| | | @NotBlank(message="设备码不能为空") |
| | | public String equipNo; |
| | | /** |
| | | * 生产登录id |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long claimId; |
| | | /** |
| | | * 维修id |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long repairId; |
| | | /** |
| | | * 计划id |
| | | */ |
| | |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long currNode; |
| | | /** |
| | | * |
| | | * 节点作业内容 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long nextNode; |
| | | public String nodeContent; |
| | | /** |
| | | * 投入时间 |
| | | * 记录设备周期内容 |
| | | */ |
| | | public Date inLineTime; |
| | | public String equipCycleContent; |
| | | /** |
| | | * 状态: 1:组装中,2:完成,3:维修,4:报废 |
| | | */ |
| | |
| | | */ |
| | | public String errorCode; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | public String memo; |
| | | /** |
| | | * 辅助人员:辅助员工id,以逗号隔开 |
| | | */ |
| | | public String assistants; |
| | | /** |
| | | * |
| | | * 入站时间 |
| | | */ |
| | | public Date updatedDate; |
| | | public Date inTime; |
| | | /** |
| | | * 出站时间 |
| | | */ |
| | | public Date outTime; |
| | | /** |
| | | * 操作员id |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long updatedBy; |
| | | /** |
| | | * 生产登录id |
| | | * 备注 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long claimId; |
| | | /** |
| | | * 维修id |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long repairId; |
| | | public String memo; |
| | | |
| | | |
| | | } |
| | |
| | | <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoSta.StaDeviceLast"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="equipNo" column="equip_no" jdbcType="VARCHAR"/> |
| | | <result property="claimId" column="claim_id" jdbcType="BIGINT"/> |
| | | <result property="repairId" column="repair_id" jdbcType="BIGINT"/> |
| | | <result property="planId" column="plan_id" jdbcType="BIGINT"/> |
| | | <result property="stationId" column="station_id" jdbcType="BIGINT"/> |
| | | <result property="currNode" column="curr_node" jdbcType="BIGINT"/> |
| | | <result property="nextNode" column="next_node" jdbcType="BIGINT"/> |
| | | <result property="nodeContent" column="node_content" jdbcType="VARCHAR"/> |
| | | <result property="equipCycleContent" column="equip_cycle_content" jdbcType="VARCHAR"/> |
| | | <result property="status" column="status" jdbcType="TINYINT"/> |
| | | <result property="result" column="result" jdbcType="TINYINT"/> |
| | | <result property="errorCode" column="error_code" jdbcType="VARCHAR"/> |
| | | <result property="memo" column="memo" jdbcType="VARCHAR"/> |
| | | <result property="assistants" column="assistants" jdbcType="VARCHAR"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updatedDate" column="updated_date" jdbcType="TIMESTAMP"/> |
| | | <result property="updatedBy" column="updated_by" jdbcType="BIGINT"/> |
| | | <result property="inStationTime" column="in_station_time" jdbcType="TIMESTAMP"/> |
| | | <result property="inTime" column="in_time" jdbcType="TIMESTAMP"/> |
| | | <result property="outTime" column="out_time" jdbcType="TIMESTAMP"/> |
| | | <result property="memo" column="memo" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,equip_no,plan_id, |
| | | station_id,curr_node,next_node, |
| | | status,result,error_code, |
| | | memo,assistants,create_time, |
| | | updated_date,updated_by,in_station_time |
| | | id,equip_no,claim_id, |
| | | repair_id,plan_id,station_id, |
| | | curr_node,node_content,equip_cycle_content, |
| | | status,result, |
| | | error_code,assistants, |
| | | updated_by,in_time,out_time, |
| | | memo |
| | | </sql> |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | |
| | | from sta_device_last |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectByDeviceNo" resultType="com.dy.pmsGlobal.pojoSta.StaDeviceLast"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from sta_device_last |
| | | where equip_no = #{equipNo,jdbcType=VARCHAR} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from sta_device_last |
| | |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLast" useGeneratedKeys="true"> |
| | | insert into sta_device_last |
| | | ( id,equip_no,plan_id |
| | | ,station_id,curr_node,next_node |
| | | ,status,result,error_code |
| | | ,memo,assistants,create_time |
| | | ,updated_date,updated_by,in_station_time |
| | | ) |
| | | values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{planId,jdbcType=BIGINT} |
| | | ,#{stationId,jdbcType=BIGINT},#{currNode,jdbcType=BIGINT},#{nextNode,jdbcType=BIGINT} |
| | | ,#{status,jdbcType=TINYINT},#{result,jdbcType=TINYINT},#{errorCode,jdbcType=VARCHAR} |
| | | ,#{memo,jdbcType=VARCHAR},#{assistants,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP} |
| | | ,#{updatedDate,jdbcType=TIMESTAMP},#{updatedBy,jdbcType=BIGINT},#{inStationTime,jdbcType=TIMESTAMP} |
| | | ) |
| | | ( id,equip_no,claim_id |
| | | ,repair_id,plan_id,station_id |
| | | ,curr_node,node_content,equip_cycle_content |
| | | ,status,result |
| | | ,error_code,assistants |
| | | ,updated_by,in_time,out_time |
| | | ,memo) |
| | | values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{claimId,jdbcType=BIGINT} |
| | | ,#{repairId,jdbcType=BIGINT},#{planId,jdbcType=BIGINT},#{stationId,jdbcType=BIGINT} |
| | | ,#{currNode,jdbcType=BIGINT},#{nodeContent,jdbcType=VARCHAR},#{equipCycleContent,jdbcType=VARCHAR} |
| | | ,#{status,jdbcType=TINYINT},#{result,jdbcType=TINYINT} |
| | | ,#{errorCode,jdbcType=VARCHAR},#{assistants,jdbcType=VARCHAR} |
| | | ,#{updatedBy,jdbcType=BIGINT},#{inTime,jdbcType=TIMESTAMP},#{outTime,jdbcType=TIMESTAMP} |
| | | ,#{memo,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLast" useGeneratedKeys="true"> |
| | | insert into sta_device_last |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="equipNo != null">equip_no,</if> |
| | | <if test="claimId != null">claim_id,</if> |
| | | <if test="repairId != null">repair_id,</if> |
| | | <if test="planId != null">plan_id,</if> |
| | | <if test="stationId != null">station_id,</if> |
| | | <if test="currNode != null">curr_node,</if> |
| | | <if test="nextNode != null">next_node,</if> |
| | | <if test="nodeContent != null">node_content,</if> |
| | | <if test="equipCycleContent != null">equip_cycle_content,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="result != null">result,</if> |
| | | <if test="errorCode != null">error_code,</if> |
| | | <if test="memo != null">memo,</if> |
| | | <if test="assistants != null">assistants,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updatedDate != null">updated_date,</if> |
| | | <if test="updatedBy != null">updated_by,</if> |
| | | <if test="inStationTime != null">in_station_time,</if> |
| | | <if test="inTime != null">in_time,</if> |
| | | <if test="outTime != null">out_time,</if> |
| | | <if test="memo != null">memo,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="equipNo != null">#{equipNo,jdbcType=VARCHAR},</if> |
| | | <if test="claimId != null">#{claimId,jdbcType=BIGINT},</if> |
| | | <if test="repairId != null">#{repairId,jdbcType=BIGINT},</if> |
| | | <if test="planId != null">#{planId,jdbcType=BIGINT},</if> |
| | | <if test="stationId != null">#{stationId,jdbcType=BIGINT},</if> |
| | | <if test="currNode != null">#{currNode,jdbcType=BIGINT},</if> |
| | | <if test="nextNode != null">#{nextNode,jdbcType=BIGINT},</if> |
| | | <if test="nodeContent != null">#{nodeContent,jdbcType=VARCHAR},</if> |
| | | <if test="equipCycleContent != null">#{equipCycleContent,jdbcType=VARCHAR},</if> |
| | | <if test="status != null">#{status,jdbcType=TINYINT},</if> |
| | | <if test="result != null">#{result,jdbcType=TINYINT},</if> |
| | | <if test="errorCode != null">#{errorCode,jdbcType=VARCHAR},</if> |
| | | <if test="memo != null">#{memo,jdbcType=VARCHAR},</if> |
| | | <if test="assistants != null">#{assistants,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updatedDate != null">#{updatedDate,jdbcType=TIMESTAMP},</if> |
| | | <if test="updatedBy != null">#{updatedBy,jdbcType=BIGINT},</if> |
| | | <if test="inStationTime != null">#{inStationTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="inTime != null">#{inTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="outTime != null">#{outTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="memo != null">#{memo,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLast"> |
| | |
| | | <set> |
| | | <if test="equipNo != null"> |
| | | equip_no = #{equipNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="claimId != null"> |
| | | claim_id = #{claimId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="repairId != null"> |
| | | repair_id = #{repairId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="planId != null"> |
| | | plan_id = #{planId,jdbcType=BIGINT}, |
| | |
| | | <if test="currNode != null"> |
| | | curr_node = #{currNode,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="nextNode != null"> |
| | | next_node = #{nextNode,jdbcType=BIGINT}, |
| | | <if test="nodeContent != null"> |
| | | node_content = #{nodeContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="equipCycleContent != null"> |
| | | equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="status != null"> |
| | | status = #{status,jdbcType=TINYINT}, |
| | |
| | | <if test="errorCode != null"> |
| | | error_code = #{errorCode,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="memo != null"> |
| | | memo = #{memo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="assistants != null"> |
| | | assistants = #{assistants,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createTime != null"> |
| | | create_time = #{createTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="updatedDate != null"> |
| | | updated_date = #{updatedDate,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="updatedBy != null"> |
| | | updated_by = #{updatedBy,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="inStationTime != null"> |
| | | in_station_time = #{inStationTime,jdbcType=TIMESTAMP}, |
| | | <if test="inTime != null"> |
| | | in_time = #{inTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="outTime != null"> |
| | | out_time = #{outTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="memo != null"> |
| | | memo = #{memo,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | |
| | | update sta_device_last |
| | | set |
| | | equip_no = #{equipNo,jdbcType=VARCHAR}, |
| | | claim_id = #{claimId,jdbcType=BIGINT}, |
| | | repair_id = #{repairId,jdbcType=BIGINT}, |
| | | plan_id = #{planId,jdbcType=BIGINT}, |
| | | station_id = #{stationId,jdbcType=BIGINT}, |
| | | curr_node = #{currNode,jdbcType=BIGINT}, |
| | | next_node = #{nextNode,jdbcType=BIGINT}, |
| | | node_content = #{nodeContent,jdbcType=VARCHAR}, |
| | | equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR}, |
| | | status = #{status,jdbcType=TINYINT}, |
| | | result = #{result,jdbcType=TINYINT}, |
| | | error_code = #{errorCode,jdbcType=VARCHAR}, |
| | | memo = #{memo,jdbcType=VARCHAR}, |
| | | assistants = #{assistants,jdbcType=VARCHAR}, |
| | | create_time = #{createTime,jdbcType=TIMESTAMP}, |
| | | updated_date = #{updatedDate,jdbcType=TIMESTAMP}, |
| | | updated_by = #{updatedBy,jdbcType=BIGINT}, |
| | | in_station_time = #{inStationTime,jdbcType=TIMESTAMP} |
| | | in_time = #{inTime,jdbcType=TIMESTAMP}, |
| | | out_time = #{outTime,jdbcType=TIMESTAMP}, |
| | | memo = #{memo,jdbcType=VARCHAR} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoSta.StaDeviceLife"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="equipNo" column="equip_no" jdbcType="VARCHAR"/> |
| | | <result property="claimId" column="claim_id" jdbcType="BIGINT"/> |
| | | <result property="repairId" column="repair_id" jdbcType="BIGINT"/> |
| | | <result property="planId" column="plan_id" jdbcType="BIGINT"/> |
| | | <result property="stationId" column="station_id" jdbcType="BIGINT"/> |
| | | <result property="currNode" column="curr_node" jdbcType="BIGINT"/> |
| | | <result property="nextNode" column="next_node" jdbcType="BIGINT"/> |
| | | <result property="inLineTime" column="in_line_time" jdbcType="TIMESTAMP"/> |
| | | <result property="nodeContent" column="node_content" jdbcType="VARCHAR"/> |
| | | <result property="equipCycleContent" column="equip_cycle_content" jdbcType="VARCHAR"/> |
| | | <result property="status" column="status" jdbcType="TINYINT"/> |
| | | <result property="result" column="result" jdbcType="TINYINT"/> |
| | | <result property="errorCode" column="error_code" jdbcType="VARCHAR"/> |
| | | <result property="memo" column="memo" jdbcType="VARCHAR"/> |
| | | <result property="assistants" column="assistants" jdbcType="VARCHAR"/> |
| | | <result property="updatedDate" column="updated_date" jdbcType="TIMESTAMP"/> |
| | | <result property="inTime" column="in_time" jdbcType="TIMESTAMP"/> |
| | | <result property="outTime" column="out_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updatedBy" column="updated_by" jdbcType="BIGINT"/> |
| | | <result property="claimId" column="claim_id" jdbcType="BIGINT"/> |
| | | <result property="repairId" column="repair_id" jdbcType="BIGINT"/> |
| | | <result property="memo" column="memo" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,equip_no,plan_id, |
| | | station_id,curr_node,next_node, |
| | | in_line_time,status,result, |
| | | error_code,memo,assistants, |
| | | updated_date,updated_by,claim_id, |
| | | repair_id |
| | | id,equip_no,claim_id, |
| | | repair_id,plan_id,station_id, |
| | | curr_node,node_content,equip_cycle_content, |
| | | status,result, |
| | | error_code,assistants,in_time, |
| | | out_time,updated_by,memo |
| | | </sql> |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLife" useGeneratedKeys="true"> |
| | | insert into sta_device_life |
| | | ( id,equip_no,plan_id |
| | | ,station_id,curr_node,next_node |
| | | ,in_line_time,status,result |
| | | ,error_code,memo,assistants |
| | | ,updated_date,updated_by,claim_id |
| | | ,repair_id) |
| | | values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{planId,jdbcType=BIGINT} |
| | | ,#{stationId,jdbcType=BIGINT},#{currNode,jdbcType=BIGINT},#{nextNode,jdbcType=BIGINT} |
| | | ,#{inLineTime,jdbcType=TIMESTAMP},#{status,jdbcType=TINYINT},#{result,jdbcType=TINYINT} |
| | | ,#{errorCode,jdbcType=VARCHAR},#{memo,jdbcType=VARCHAR},#{assistants,jdbcType=VARCHAR} |
| | | ,#{updatedDate,jdbcType=TIMESTAMP},#{updatedBy,jdbcType=BIGINT},#{claimId,jdbcType=BIGINT} |
| | | ,#{repairId,jdbcType=BIGINT}) |
| | | ( id,equip_no,claim_id |
| | | ,repair_id,plan_id,station_id |
| | | ,curr_node,node_content,equip_cycle_content |
| | | ,status,result |
| | | ,error_code,assistants,in_time |
| | | ,out_time,updated_by,memo |
| | | ) |
| | | values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{claimId,jdbcType=BIGINT} |
| | | ,#{repairId,jdbcType=BIGINT},#{planId,jdbcType=BIGINT},#{stationId,jdbcType=BIGINT} |
| | | ,#{currNode,jdbcType=BIGINT},#{nodeContent,jdbcType=VARCHAR},#{equipCycleContent,jdbcType=VARCHAR} |
| | | ,#{status,jdbcType=TINYINT},#{result,jdbcType=TINYINT} |
| | | ,#{errorCode,jdbcType=VARCHAR},#{assistants,jdbcType=VARCHAR},#{inTime,jdbcType=TIMESTAMP} |
| | | ,#{outTime,jdbcType=TIMESTAMP},#{updatedBy,jdbcType=BIGINT},#{memo,jdbcType=VARCHAR} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLife" useGeneratedKeys="true"> |
| | | insert into sta_device_life |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="equipNo != null">equip_no,</if> |
| | | <if test="claimId != null">claim_id,</if> |
| | | <if test="repairId != null">repair_id,</if> |
| | | <if test="planId != null">plan_id,</if> |
| | | <if test="stationId != null">station_id,</if> |
| | | <if test="currNode != null">curr_node,</if> |
| | | <if test="nextNode != null">next_node,</if> |
| | | <if test="inLineTime != null">in_line_time,</if> |
| | | <if test="nodeContent != null">node_content,</if> |
| | | <if test="equipCycleContent != null">equip_cycle_content,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="result != null">result,</if> |
| | | <if test="errorCode != null">error_code,</if> |
| | | <if test="memo != null">memo,</if> |
| | | <if test="assistants != null">assistants,</if> |
| | | <if test="updatedDate != null">updated_date,</if> |
| | | <if test="inTime != null">in_time,</if> |
| | | <if test="outTime != null">out_time,</if> |
| | | <if test="updatedBy != null">updated_by,</if> |
| | | <if test="claimId != null">claim_id,</if> |
| | | <if test="repairId != null">repair_id,</if> |
| | | <if test="memo != null">memo,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="equipNo != null">#{equipNo,jdbcType=VARCHAR},</if> |
| | | <if test="claimId != null">#{claimId,jdbcType=BIGINT},</if> |
| | | <if test="repairId != null">#{repairId,jdbcType=BIGINT},</if> |
| | | <if test="planId != null">#{planId,jdbcType=BIGINT},</if> |
| | | <if test="stationId != null">#{stationId,jdbcType=BIGINT},</if> |
| | | <if test="currNode != null">#{currNode,jdbcType=BIGINT},</if> |
| | | <if test="nextNode != null">#{nextNode,jdbcType=BIGINT},</if> |
| | | <if test="inLineTime != null">#{inLineTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="nodeContent != null">#{nodeContent,jdbcType=VARCHAR},</if> |
| | | <if test="equipCycleContent != null">#{equipCycleContent,jdbcType=VARCHAR},</if> |
| | | <if test="status != null">#{status,jdbcType=TINYINT},</if> |
| | | <if test="result != null">#{result,jdbcType=TINYINT},</if> |
| | | <if test="errorCode != null">#{errorCode,jdbcType=VARCHAR},</if> |
| | | <if test="memo != null">#{memo,jdbcType=VARCHAR},</if> |
| | | <if test="assistants != null">#{assistants,jdbcType=VARCHAR},</if> |
| | | <if test="updatedDate != null">#{updatedDate,jdbcType=TIMESTAMP},</if> |
| | | <if test="inTime != null">#{inTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="outTime != null">#{outTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updatedBy != null">#{updatedBy,jdbcType=BIGINT},</if> |
| | | <if test="claimId != null">#{claimId,jdbcType=BIGINT},</if> |
| | | <if test="repairId != null">#{repairId,jdbcType=BIGINT},</if> |
| | | <if test="memo != null">#{memo,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLife"> |
| | |
| | | <set> |
| | | <if test="equipNo != null"> |
| | | equip_no = #{equipNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="claimId != null"> |
| | | claim_id = #{claimId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="repairId != null"> |
| | | repair_id = #{repairId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="planId != null"> |
| | | plan_id = #{planId,jdbcType=BIGINT}, |
| | |
| | | <if test="currNode != null"> |
| | | curr_node = #{currNode,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="nextNode != null"> |
| | | next_node = #{nextNode,jdbcType=BIGINT}, |
| | | <if test="nodeContent != null"> |
| | | node_content = #{nodeContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="inLineTime != null"> |
| | | in_line_time = #{inLineTime,jdbcType=TIMESTAMP}, |
| | | <if test="equipCycleContent != null"> |
| | | equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="status != null"> |
| | | status = #{status,jdbcType=TINYINT}, |
| | |
| | | <if test="errorCode != null"> |
| | | error_code = #{errorCode,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="memo != null"> |
| | | memo = #{memo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="assistants != null"> |
| | | assistants = #{assistants,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="updatedDate != null"> |
| | | updated_date = #{updatedDate,jdbcType=TIMESTAMP}, |
| | | <if test="inTime != null"> |
| | | in_time = #{inTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="outTime != null"> |
| | | out_time = #{outTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="updatedBy != null"> |
| | | updated_by = #{updatedBy,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="claimId != null"> |
| | | claim_id = #{claimId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="repairId != null"> |
| | | repair_id = #{repairId,jdbcType=BIGINT}, |
| | | <if test="memo != null"> |
| | | memo = #{memo,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | |
| | | update sta_device_life |
| | | set |
| | | equip_no = #{equipNo,jdbcType=VARCHAR}, |
| | | claim_id = #{claimId,jdbcType=BIGINT}, |
| | | repair_id = #{repairId,jdbcType=BIGINT}, |
| | | plan_id = #{planId,jdbcType=BIGINT}, |
| | | station_id = #{stationId,jdbcType=BIGINT}, |
| | | curr_node = #{currNode,jdbcType=BIGINT}, |
| | | next_node = #{nextNode,jdbcType=BIGINT}, |
| | | in_line_time = #{inLineTime,jdbcType=TIMESTAMP}, |
| | | node_content = #{nodeContent,jdbcType=VARCHAR}, |
| | | equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR}, |
| | | status = #{status,jdbcType=TINYINT}, |
| | | result = #{result,jdbcType=TINYINT}, |
| | | error_code = #{errorCode,jdbcType=VARCHAR}, |
| | | memo = #{memo,jdbcType=VARCHAR}, |
| | | assistants = #{assistants,jdbcType=VARCHAR}, |
| | | updated_date = #{updatedDate,jdbcType=TIMESTAMP}, |
| | | in_time = #{inTime,jdbcType=TIMESTAMP}, |
| | | out_time = #{outTime,jdbcType=TIMESTAMP}, |
| | | updated_by = #{updatedBy,jdbcType=BIGINT}, |
| | | claim_id = #{claimId,jdbcType=BIGINT}, |
| | | repair_id = #{repairId,jdbcType=BIGINT} |
| | | memo = #{memo,jdbcType=VARCHAR} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="equipNo" column="equip_no" jdbcType="VARCHAR"/> |
| | | <result property="claimId" column="claim_id" jdbcType="BIGINT"/> |
| | | <result property="repairId" column="repair_id" jdbcType="BIGINT"/> |
| | | <result property="planId" column="plan_id" jdbcType="BIGINT"/> |
| | | <result property="stationId" column="station_id" jdbcType="BIGINT"/> |
| | | <result property="currNode" column="curr_node" jdbcType="BIGINT"/> |
| | | <result property="nextNode" column="next_node" jdbcType="BIGINT"/> |
| | | <result property="inLineTime" column="in_line_time" jdbcType="TIMESTAMP"/> |
| | | <result property="nodeContent" column="node_content" jdbcType="VARCHAR"/> |
| | | <result property="equipCycleContent" column="equip_cycle_content" jdbcType="VARCHAR"/> |
| | | <result property="status" column="status" jdbcType="TINYINT"/> |
| | | <result property="result" column="result" jdbcType="TINYINT"/> |
| | | <result property="errorCode" column="error_code" jdbcType="VARCHAR"/> |
| | | <result property="memo" column="memo" jdbcType="VARCHAR"/> |
| | | <result property="assistants" column="assistants" jdbcType="VARCHAR"/> |
| | | <result property="updatedDate" column="updated_date" jdbcType="TIMESTAMP"/> |
| | | <result property="inTime" column="in_time" jdbcType="TIMESTAMP"/> |
| | | <result property="outTime" column="out_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updatedBy" column="updated_by" jdbcType="BIGINT"/> |
| | | <result property="claimId" column="claim_id" jdbcType="BIGINT"/> |
| | | <result property="repairId" column="repair_id" jdbcType="BIGINT"/> |
| | | <result property="memo" column="memo" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,equip_no,plan_id, |
| | | station_id,curr_node,next_node, |
| | | in_line_time,status,result, |
| | | error_code,memo,assistants, |
| | | updated_date,updated_by,claim_id, |
| | | repair_id |
| | | id,equip_no,claim_id, |
| | | repair_id,plan_id,station_id, |
| | | curr_node,node_content,equip_cycle_content, |
| | | status,result, |
| | | error_code,assistants,in_time, |
| | | out_time,updated_by,memo |
| | | </sql> |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog" useGeneratedKeys="true"> |
| | | insert into sta_device_production_log |
| | | ( id,equip_no,plan_id |
| | | ,station_id,curr_node,next_node |
| | | ,in_line_time,status,result |
| | | ,error_code,memo,assistants |
| | | ,updated_date,updated_by,claim_id |
| | | ,repair_id) |
| | | values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{planId,jdbcType=BIGINT} |
| | | ,#{stationId,jdbcType=BIGINT},#{currNode,jdbcType=BIGINT},#{nextNode,jdbcType=BIGINT} |
| | | ,#{inLineTime,jdbcType=TIMESTAMP},#{status,jdbcType=TINYINT},#{result,jdbcType=TINYINT} |
| | | ,#{errorCode,jdbcType=VARCHAR},#{memo,jdbcType=VARCHAR},#{assistants,jdbcType=VARCHAR} |
| | | ,#{updatedDate,jdbcType=TIMESTAMP},#{updatedBy,jdbcType=BIGINT},#{claimId,jdbcType=BIGINT} |
| | | ,#{repairId,jdbcType=BIGINT}) |
| | | ( id,equip_no,claim_id |
| | | ,repair_id,plan_id,station_id |
| | | ,curr_node,node_content,equip_cycle_content |
| | | ,status,result |
| | | ,error_code,assistants,in_time |
| | | ,out_time,updated_by,memo |
| | | ) |
| | | values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{claimId,jdbcType=BIGINT} |
| | | ,#{repairId,jdbcType=BIGINT},#{planId,jdbcType=BIGINT},#{stationId,jdbcType=BIGINT} |
| | | ,#{currNode,jdbcType=BIGINT},#{nodeContent,jdbcType=VARCHAR},#{equipCycleContent,jdbcType=VARCHAR} |
| | | ,#{nextNode,jdbcType=BIGINT},#{status,jdbcType=TINYINT},#{result,jdbcType=TINYINT} |
| | | ,#{errorCode,jdbcType=VARCHAR},#{assistants,jdbcType=VARCHAR},#{inTime,jdbcType=TIMESTAMP} |
| | | ,#{outTime,jdbcType=TIMESTAMP},#{updatedBy,jdbcType=BIGINT},#{memo,jdbcType=VARCHAR} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog" useGeneratedKeys="true"> |
| | | insert into sta_device_production_log |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="equipNo != null">equip_no,</if> |
| | | <if test="claimId != null">claim_id,</if> |
| | | <if test="repairId != null">repair_id,</if> |
| | | <if test="planId != null">plan_id,</if> |
| | | <if test="stationId != null">station_id,</if> |
| | | <if test="currNode != null">curr_node,</if> |
| | | <if test="nextNode != null">next_node,</if> |
| | | <if test="inLineTime != null">in_line_time,</if> |
| | | <if test="nodeContent != null">node_content,</if> |
| | | <if test="equipCycleContent != null">equip_cycle_content,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="result != null">result,</if> |
| | | <if test="errorCode != null">error_code,</if> |
| | | <if test="memo != null">memo,</if> |
| | | <if test="assistants != null">assistants,</if> |
| | | <if test="updatedDate != null">updated_date,</if> |
| | | <if test="inTime != null">in_time,</if> |
| | | <if test="outTime != null">out_time,</if> |
| | | <if test="updatedBy != null">updated_by,</if> |
| | | <if test="claimId != null">claim_id,</if> |
| | | <if test="repairId != null">repair_id,</if> |
| | | <if test="memo != null">memo,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="equipNo != null">#{equipNo,jdbcType=VARCHAR},</if> |
| | | <if test="claimId != null">#{claimId,jdbcType=BIGINT},</if> |
| | | <if test="repairId != null">#{repairId,jdbcType=BIGINT},</if> |
| | | <if test="planId != null">#{planId,jdbcType=BIGINT},</if> |
| | | <if test="stationId != null">#{stationId,jdbcType=BIGINT},</if> |
| | | <if test="currNode != null">#{currNode,jdbcType=BIGINT},</if> |
| | | <if test="nodeContent != null">#{nodeContent,jdbcType=VARCHAR},</if> |
| | | <if test="equipCycleContent != null">#{equipCycleContent,jdbcType=VARCHAR},</if> |
| | | <if test="nextNode != null">#{nextNode,jdbcType=BIGINT},</if> |
| | | <if test="inLineTime != null">#{inLineTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="status != null">#{status,jdbcType=TINYINT},</if> |
| | | <if test="result != null">#{result,jdbcType=TINYINT},</if> |
| | | <if test="errorCode != null">#{errorCode,jdbcType=VARCHAR},</if> |
| | | <if test="memo != null">#{memo,jdbcType=VARCHAR},</if> |
| | | <if test="assistants != null">#{assistants,jdbcType=VARCHAR},</if> |
| | | <if test="updatedDate != null">#{updatedDate,jdbcType=TIMESTAMP},</if> |
| | | <if test="inTime != null">#{inTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="outTime != null">#{outTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updatedBy != null">#{updatedBy,jdbcType=BIGINT},</if> |
| | | <if test="claimId != null">#{claimId,jdbcType=BIGINT},</if> |
| | | <if test="repairId != null">#{repairId,jdbcType=BIGINT},</if> |
| | | <if test="memo != null">#{memo,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog"> |
| | |
| | | <set> |
| | | <if test="equipNo != null"> |
| | | equip_no = #{equipNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="claimId != null"> |
| | | claim_id = #{claimId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="repairId != null"> |
| | | repair_id = #{repairId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="planId != null"> |
| | | plan_id = #{planId,jdbcType=BIGINT}, |
| | |
| | | <if test="currNode != null"> |
| | | curr_node = #{currNode,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="nextNode != null"> |
| | | next_node = #{nextNode,jdbcType=BIGINT}, |
| | | <if test="nodeContent != null"> |
| | | node_content = #{nodeContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="inLineTime != null"> |
| | | in_line_time = #{inLineTime,jdbcType=TIMESTAMP}, |
| | | <if test="equipCycleContent != null"> |
| | | equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="status != null"> |
| | | status = #{status,jdbcType=TINYINT}, |
| | |
| | | <if test="errorCode != null"> |
| | | error_code = #{errorCode,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="memo != null"> |
| | | memo = #{memo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="assistants != null"> |
| | | assistants = #{assistants,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="updatedDate != null"> |
| | | updated_date = #{updatedDate,jdbcType=TIMESTAMP}, |
| | | <if test="inTime != null"> |
| | | in_time = #{inTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="outTime != null"> |
| | | out_time = #{outTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="updatedBy != null"> |
| | | updated_by = #{updatedBy,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="claimId != null"> |
| | | claim_id = #{claimId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="repairId != null"> |
| | | repair_id = #{repairId,jdbcType=BIGINT}, |
| | | <if test="memo != null"> |
| | | memo = #{memo,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | |
| | | update sta_device_production_log |
| | | set |
| | | equip_no = #{equipNo,jdbcType=VARCHAR}, |
| | | claim_id = #{claimId,jdbcType=BIGINT}, |
| | | repair_id = #{repairId,jdbcType=BIGINT}, |
| | | plan_id = #{planId,jdbcType=BIGINT}, |
| | | station_id = #{stationId,jdbcType=BIGINT}, |
| | | curr_node = #{currNode,jdbcType=BIGINT}, |
| | | next_node = #{nextNode,jdbcType=BIGINT}, |
| | | in_line_time = #{inLineTime,jdbcType=TIMESTAMP}, |
| | | node_content = #{nodeContent,jdbcType=VARCHAR}, |
| | | equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR}, |
| | | status = #{status,jdbcType=TINYINT}, |
| | | result = #{result,jdbcType=TINYINT}, |
| | | error_code = #{errorCode,jdbcType=VARCHAR}, |
| | | memo = #{memo,jdbcType=VARCHAR}, |
| | | assistants = #{assistants,jdbcType=VARCHAR}, |
| | | updated_date = #{updatedDate,jdbcType=TIMESTAMP}, |
| | | in_time = #{inTime,jdbcType=TIMESTAMP}, |
| | | out_time = #{outTime,jdbcType=TIMESTAMP}, |
| | | updated_by = #{updatedBy,jdbcType=BIGINT}, |
| | | claim_id = #{claimId,jdbcType=BIGINT}, |
| | | repair_id = #{repairId,jdbcType=BIGINT} |
| | | memo = #{memo,jdbcType=VARCHAR} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | package com.dy.pmsStation.assemblyStep; |
| | | |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import jakarta.validation.Valid; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @RestController |
| | | @RequestMapping(path = "assemblyStep") |
| | | public class AssemblyStepCtrl { |
| | | private AssemblyStepSv sv; |
| | | @Autowired |
| | | public void setSv(AssemblyStepSv sv) { |
| | | this.sv = sv; |
| | | } |
| | | |
| | | @PostMapping(path = "save") |
| | | public BaseResponse save(@RequestBody @Valid QueryVo vo) { |
| | | log.info("AssemblyStepCtrl.test()"); |
| | | int count = sv.save(vo); |
| | | if (count <= 0) { |
| | | return BaseResponseUtils.buildFail("数据库存储失败"); |
| | | } else { |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.dy.pmsStation.assemblyStep; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.dy.pmsGlobal.daoPr.PrAssemblyPlanMapper; |
| | | import com.dy.pmsGlobal.daoPr.PrProductionNodeMapper; |
| | | import com.dy.pmsGlobal.daoSta.*; |
| | | import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan; |
| | | import com.dy.pmsGlobal.pojoPr.PrProductionNode; |
| | | import com.dy.pmsGlobal.pojoSta.*; |
| | | import com.dy.pmsGlobal.util.QrCodeConstant; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class AssemblyStepSv { |
| | | private static final int STATUS_OK = 1; |
| | | private static final int STATUS_COMPLETE = 2; |
| | | private static final int STATUS_REPAIR = 3; |
| | | private static final int STATUS_WASTE = 4; |
| | | |
| | | private StaDeviceLastMapper deviceLastDao; |
| | | private StaDeviceLifeMapper deviceLifeDao; |
| | | private StaWipSnExMapper wipSnExDao; |
| | | private StaDeviceProductionLogMapper deviceProductionLogDao; |
| | | private StaAssemblyWorkLastMapper assemblyWorkLastDao; |
| | | private PrAssemblyPlanMapper assemblyPlanDao; |
| | | // private PrProductionProcessMapper processDao; |
| | | private PrProductionNodeMapper nodeDao; |
| | | @Autowired |
| | | public void setDeviceLastDao(StaDeviceLastMapper deviceLastDao) { |
| | | this.deviceLastDao = deviceLastDao; |
| | | } |
| | | @Autowired |
| | | public void setDeviceLifeDao(StaDeviceLifeMapper deviceLifeDao) { |
| | | this.deviceLifeDao = deviceLifeDao; |
| | | } |
| | | @Autowired |
| | | public void setWipSnExDao(StaWipSnExMapper wipSnExDao) { |
| | | this.wipSnExDao = wipSnExDao; |
| | | } |
| | | @Autowired |
| | | public void setDeviceProductionLogDao(StaDeviceProductionLogMapper deviceProductionLogDao) { |
| | | this.deviceProductionLogDao = deviceProductionLogDao; |
| | | } |
| | | @Autowired |
| | | public void setAssemblyWorkLastDao(StaAssemblyWorkLastMapper assemblyWorkLastDao) { |
| | | this.assemblyWorkLastDao = assemblyWorkLastDao; |
| | | } |
| | | @Autowired |
| | | public void setAssemblyPlanDao(PrAssemblyPlanMapper assemblyPlanDao) { |
| | | this.assemblyPlanDao = assemblyPlanDao; |
| | | } |
| | | @Autowired |
| | | public void setNodeDao(PrProductionNodeMapper nodeDao) { |
| | | this.nodeDao = nodeDao; |
| | | } |
| | | |
| | | public int save(QueryVo params) { |
| | | long taskId = Long.parseLong(params.taskId); |
| | | StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(taskId); |
| | | if (workLast == null) { |
| | | throw new RuntimeException("工单不存在"); |
| | | } |
| | | PrAssemblyPlan plan = assemblyPlanDao.selectByPrimaryKey(workLast.getPlanId()); |
| | | // 验证并处理设备号和物料号 |
| | | Set<String> deviceSet = new HashSet<>(Arrays.asList(params.deviceNo.split(","))); |
| | | // 分类设备号和物料号 |
| | | List<String> deviceList = new ArrayList<>(); |
| | | List<String> materialList = new ArrayList<>(); |
| | | |
| | | deviceSet.forEach(device -> { |
| | | if (device.contains(plan.batchNo)) { |
| | | deviceList.add(device); |
| | | } else { |
| | | materialList.add(device); |
| | | } |
| | | }); |
| | | |
| | | if (deviceList.isEmpty()) { |
| | | throw new RuntimeException("设备号不属于当前任务计划"); |
| | | } |
| | | if (deviceList.size() > 1) { |
| | | throw new RuntimeException("设备号有且只能有一个"); |
| | | } |
| | | |
| | | StaDeviceLast deviceLast = saveDeviceLast(params, workLast, deviceList); |
| | | int count = deviceLast.id == null ? deviceLastDao.insertSelective(deviceLast) : |
| | | deviceLastDao.updateByPrimaryKeySelective(deviceLast); |
| | | |
| | | saveDeviceProductionLog(deviceLast); |
| | | |
| | | PrProductionNode node = nodeDao.selectByPrimaryKey(workLast.nodeId); |
| | | if (node.isRecord) { |
| | | saveDeviceLife(deviceLast); |
| | | } |
| | | if (CollectionUtils.isNotEmpty(materialList)) { |
| | | saveSnEx(workLast, deviceList, materialList, plan); |
| | | } |
| | | return count; |
| | | } |
| | | |
| | | private void saveDeviceProductionLog(StaDeviceLast deviceLast) { |
| | | StaDeviceProductionLog log = new StaDeviceProductionLog(); |
| | | BeanUtils.copyProperties(deviceLast, log); |
| | | log.setId(null); // 设备生产日志ID设为null,表示新增 |
| | | deviceProductionLogDao.insertSelective(log); |
| | | } |
| | | |
| | | private void saveDeviceLife(StaDeviceLast deviceLast) { |
| | | StaDeviceLife life = new StaDeviceLife(); |
| | | BeanUtils.copyProperties(deviceLast, life); |
| | | deviceLifeDao.insertSelective(life); |
| | | } |
| | | |
| | | private StaDeviceLast saveDeviceLast(QueryVo params, StaAssemblyWorkLast workLast, List<String> deviceList){ |
| | | //组装数据 |
| | | StaDeviceLast record = new StaDeviceLast(); |
| | | |
| | | StaDeviceLast preRecord = deviceLastDao.selectByDeviceNo(deviceList.get(0)); |
| | | if(preRecord != null){ |
| | | record.id = preRecord.id; |
| | | record.inTime = preRecord.outTime; |
| | | } |
| | | record.outTime = new Date(); |
| | | |
| | | record.setPlanId(workLast.planId); |
| | | record.setClaimId(Long.parseLong(params.taskId)); |
| | | record.setStationId(workLast.stationId); |
| | | record.setEquipNo(deviceList.get(0)); |
| | | record.setCurrNode(workLast.nodeId); |
| | | // record.setNextNode(getNextNode(params.status,workLast.nodeId)); |
| | | |
| | | record.updatedBy = workLast.userId; |
| | | record.assistants = params.assistants; |
| | | |
| | | PrProductionNode node = nodeDao.selectByPrimaryKey(workLast.nodeId); |
| | | record.nodeContent = node.content; |
| | | if(node.isRecord){ |
| | | record.equipCycleContent = node.equipCycleContent; |
| | | } |
| | | record.status = getStatus(params.status,node.isEnd); |
| | | return record; |
| | | } |
| | | private int saveSnEx(StaAssemblyWorkLast workLast, List<String> deviceList,List<String> materialList, PrAssemblyPlan plan){ |
| | | StaWipSnEx snEx = new StaWipSnEx(); |
| | | snEx.deviceNo = deviceList.get(0); |
| | | snEx.productNo = plan.batchNo; |
| | | snEx.deviceNo = materialList.get(0); |
| | | snEx.createTime = workLast.startTime; |
| | | snEx.createBy = workLast.userId; |
| | | snEx.productName = plan.proName; |
| | | return wipSnExDao.insertSelective(snEx); |
| | | } |
| | | /** |
| | | * 状态: 1:组装中,2:完成,3:维修,4:报废 |
| | | * @param status 状态 |
| | | * @param isEndNode 是否结束节点 |
| | | * @return 状态 |
| | | */ |
| | | private int getStatus(String status,boolean isEndNode){ |
| | | return switch (status) { |
| | | case QrCodeConstant.MarkOk -> isEndNode? STATUS_COMPLETE:STATUS_OK; |
| | | case QrCodeConstant.MarkUnqualified -> STATUS_REPAIR; |
| | | case QrCodeConstant.MarkWaste -> STATUS_WASTE; |
| | | default -> throw new RuntimeException("状态错误"); |
| | | }; |
| | | } |
| | | } |
New file |
| | |
| | | package com.dy.pmsStation.assemblyStep; |
| | | |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.*; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ToString(callSuper = true) |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Builder |
| | | public class QueryVo{ |
| | | @NotEmpty(message = "设备编号不能为空") |
| | | public String deviceNo; |
| | | @NotNull(message = "任务编号不能为空") |
| | | public String taskId; |
| | | @NotNull(message = "状态不能为空") |
| | | public String status; |
| | | /** |
| | | * 测试或品检返回的错误信息 |
| | | */ |
| | | public String errorMsg; |
| | | /** |
| | | * 辅助人员 |
| | | */ |
| | | public String assistants; |
| | | |
| | | public void setTaskId(String taskId) { |
| | | taskId = taskId.replace("", "103"); |
| | | this.taskId = taskId; |
| | | } |
| | | } |