| | |
| | | |
| | | int updateByPrimaryKey(StaDeviceLife record); |
| | | |
| | | List<StaDeviceLife> selectByEquipNo(String deviceNo); |
| | | List<StaDeviceLife> selectByDeviceNo(String deviceNo); |
| | | } |
| | |
| | | |
| | | StaDeviceProductionLog selectByPrimaryKey(Long id); |
| | | |
| | | List<StaDeviceProductionLog> selectByEquipNo(String equipNo); |
| | | List<StaDeviceProductionLog> selectByDeviceNo(String deviceNo); |
| | | |
| | | int updateByPrimaryKeySelective(StaDeviceProductionLog record); |
| | | |
| | |
| | | |
| | | int updateByPrimaryKey(StaRepairInfo record); |
| | | |
| | | List<StaRepairInfo> selectByEquipNo(String equipNo); |
| | | List<StaRepairInfo> selectByDeviceNo(String equipNo); |
| | | } |
| | |
| | | * 设备码 |
| | | */ |
| | | @NotBlank(message="设备码不能为空") |
| | | public String equipNo; |
| | | public String deviceNo; |
| | | /** |
| | | * 生产登录id |
| | | */ |
| | |
| | | /** |
| | | * 记录设备周期内容 |
| | | */ |
| | | public String equipCycleContent; |
| | | public String deviceCycleContent; |
| | | /** |
| | | * 状态: 1:组装中,2:完成,3:维修,4:报废,5:测试不通过,6:品检不通过 |
| | | */ |
| | |
| | | * 设备码 |
| | | */ |
| | | @NotBlank(message="设备码不能为空") |
| | | public String equipNo; |
| | | public String deviceNo; |
| | | /** |
| | | * 生产登录id |
| | | */ |
| | |
| | | /** |
| | | * 记录设备周期内容 |
| | | */ |
| | | public String equipCycleContent; |
| | | public String deviceCycleContent; |
| | | |
| | | /** |
| | | * 状态: 1:组装中,2:完成,3:维修,4:报废 |
| | |
| | | * 设备码 |
| | | */ |
| | | @NotBlank(message="设备码不能为空") |
| | | public String equipNo; |
| | | public String deviceNo; |
| | | /** |
| | | * 生产登录id |
| | | */ |
| | |
| | | /** |
| | | * 记录设备周期内容 |
| | | */ |
| | | public String equipCycleContent; |
| | | public String deviceCycleContent; |
| | | /** |
| | | * 状态: 1:组装中,2:完成,3:维修,4:报废 |
| | | */ |
| | |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.*; |
| | | |
| | | |
| | | |
| | | import java.util.Date; |
| | | |
| | |
| | | /** |
| | | * 设备码 |
| | | */ |
| | | public String equipNo; |
| | | public String deviceNo; |
| | | /** |
| | | * 生产登录id |
| | | */ |
| | |
| | | |
| | | <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="deviceNo" column="device_no" jdbcType="VARCHAR"/> |
| | | <result property="workId" column="work_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="nodeContent" column="node_content" jdbcType="VARCHAR"/> |
| | | <result property="equipCycleContent" column="equip_cycle_content" jdbcType="VARCHAR"/> |
| | | <result property="deviceCycleContent" column="device_cycle_content" jdbcType="VARCHAR"/> |
| | | <result property="status" column="status" jdbcType="TINYINT"/> |
| | | <result property="result" column="result" jdbcType="TINYINT"/> |
| | | <result property="errorMsg" column="error_msg" jdbcType="VARCHAR"/> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,equip_no,work_id, |
| | | id,device_no,work_id, |
| | | repair_id,plan_id,station_id, |
| | | curr_node,node_content,equip_cycle_content, |
| | | curr_node,node_content,device_cycle_content, |
| | | status,result, |
| | | error_msg,assistants, |
| | | updated_by,in_time,out_time, |
| | | memo |
| | | </sql> |
| | | <select id="selectByEquipNo" parameterType="java.lang.String" resultMap="joinResultMap"> |
| | | <select id="selectByDeviceNo" parameterType="java.lang.String" resultMap="joinResultMap"> |
| | | select |
| | | t.* ,p.`name` plan_name,s.`name` station_name,u.`name` update_user_name |
| | | FROM |
| | |
| | | left join pr_assembly_plan p on t.plan_id=p.id |
| | | left join plt_station s on s.id = t.station_id |
| | | left JOIN ba_user u on u.id=t.updated_by |
| | | where t.equip_no = #{equipNo,jdbcType=VARCHAR} |
| | | where t.device_no = #{deviceNo,jdbcType=VARCHAR} |
| | | ORDER BY t.id DESC |
| | | </select> |
| | | |
| | |
| | | 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,work_id |
| | | ( id,device_no,work_id |
| | | ,repair_id,plan_id,station_id |
| | | ,curr_node,node_content,equip_cycle_content |
| | | ,curr_node,node_content,device_cycle_content |
| | | ,status,result |
| | | ,error_msg,assistants |
| | | ,updated_by,in_time,out_time |
| | | ,memo) |
| | | values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{workId,jdbcType=BIGINT} |
| | | values (#{id,jdbcType=BIGINT},#{deviceNo,jdbcType=VARCHAR},#{workId,jdbcType=BIGINT} |
| | | ,#{repairId,jdbcType=BIGINT},#{planId,jdbcType=BIGINT},#{stationId,jdbcType=BIGINT} |
| | | ,#{currNode,jdbcType=BIGINT},#{nodeContent,jdbcType=VARCHAR},#{equipCycleContent,jdbcType=VARCHAR} |
| | | ,#{currNode,jdbcType=BIGINT},#{nodeContent,jdbcType=VARCHAR},#{deviceCycleContent,jdbcType=VARCHAR} |
| | | ,#{status,jdbcType=TINYINT},#{result,jdbcType=TINYINT} |
| | | ,#{errorMsg,jdbcType=VARCHAR},#{assistants,jdbcType=VARCHAR} |
| | | ,#{updatedBy,jdbcType=BIGINT},#{inTime,jdbcType=TIMESTAMP},#{outTime,jdbcType=TIMESTAMP} |
| | |
| | | insert into sta_device_last |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="equipNo != null">equip_no,</if> |
| | | <if test="deviceNo != null">device_no,</if> |
| | | <if test="workId != null">work_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="nodeContent != null">node_content,</if> |
| | | <if test="equipCycleContent != null">equip_cycle_content,</if> |
| | | <if test="deviceCycleContent != null">device_cycle_content,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="result != null">result,</if> |
| | | <if test="errorMsg != null">error_msg,</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="deviceNo != null">#{deviceNo,jdbcType=VARCHAR},</if> |
| | | <if test="workId != null">#{workId,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="deviceCycleContent != null">#{deviceCycleContent,jdbcType=VARCHAR},</if> |
| | | <if test="status != null">#{status,jdbcType=TINYINT},</if> |
| | | <if test="result != null">#{result,jdbcType=TINYINT},</if> |
| | | <if test="errorMsg != null">#{errorMsg,jdbcType=VARCHAR},</if> |
| | |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLast"> |
| | | update sta_device_last |
| | | <set> |
| | | <if test="equipNo != null"> |
| | | equip_no = #{equipNo,jdbcType=VARCHAR}, |
| | | <if test="deviceNo != null"> |
| | | device_no = #{deviceNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="workId != null"> |
| | | work_id = #{workId,jdbcType=BIGINT}, |
| | |
| | | <if test="nodeContent != null"> |
| | | node_content = #{nodeContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="equipCycleContent != null"> |
| | | equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR}, |
| | | <if test="deviceCycleContent != null"> |
| | | device_cycle_content = #{deviceCycleContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="status != null"> |
| | | status = #{status,jdbcType=TINYINT}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLast"> |
| | | update sta_device_last |
| | | set |
| | | equip_no = #{equipNo,jdbcType=VARCHAR}, |
| | | device_no = #{deviceNo,jdbcType=VARCHAR}, |
| | | work_id = #{workId,jdbcType=BIGINT}, |
| | | repair_id = #{repairId,jdbcType=BIGINT}, |
| | | plan_id = #{planId,jdbcType=BIGINT}, |
| | | station_id = #{stationId,jdbcType=BIGINT}, |
| | | curr_node = #{currNode,jdbcType=BIGINT}, |
| | | node_content = #{nodeContent,jdbcType=VARCHAR}, |
| | | equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR}, |
| | | device_cycle_content = #{deviceCycleContent,jdbcType=VARCHAR}, |
| | | status = #{status,jdbcType=TINYINT}, |
| | | result = #{result,jdbcType=TINYINT}, |
| | | error_msg = #{errorMsg,jdbcType=VARCHAR}, |
| | |
| | | |
| | | <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="deviceNo" column="device_no" jdbcType="VARCHAR"/> |
| | | <result property="workId" column="work_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="nodeContent" column="node_content" jdbcType="VARCHAR"/> |
| | | <result property="equipCycleContent" column="equip_cycle_content" jdbcType="VARCHAR"/> |
| | | <result property="deviceCycleContent" column="device_cycle_content" jdbcType="VARCHAR"/> |
| | | <result property="status" column="status" jdbcType="TINYINT"/> |
| | | <result property="result" column="result" jdbcType="TINYINT"/> |
| | | <result property="errorMsg" column="error_msg" jdbcType="VARCHAR"/> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,equip_no,work_id, |
| | | id,device_no,work_id, |
| | | repair_id,plan_id,station_id, |
| | | curr_node,node_content,equip_cycle_content, |
| | | curr_node,node_content,device_cycle_content, |
| | | status,result, |
| | | error_msg,assistants,in_time, |
| | | out_time,updated_by,memo |
| | |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="selectByEquipNo" parameterType="java.lang.String" resultMap="joinResultMap"> |
| | | <select id="selectByDeviceNo" parameterType="java.lang.String" resultMap="joinResultMap"> |
| | | select |
| | | t.* ,p.`name` plan_name,s.`name` station_name,u.`name` update_user_name |
| | | FROM |
| | |
| | | left join pr_assembly_plan p on t.plan_id=p.id |
| | | left join plt_station s on s.id = t.station_id |
| | | left JOIN ba_user u on u.id=t.updated_by |
| | | where t.equip_no = #{equipNo,jdbcType=VARCHAR} |
| | | where t.device_no = #{deviceNo,jdbcType=VARCHAR} |
| | | ORDER BY t.id DESC |
| | | </select> |
| | | |
| | |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLife" useGeneratedKeys="true"> |
| | | insert into sta_device_life |
| | | ( id,equip_no,work_id |
| | | ( id,device_no,work_id |
| | | ,repair_id,plan_id,station_id |
| | | ,curr_node,node_content,equip_cycle_content |
| | | ,curr_node,node_content,device_cycle_content |
| | | ,status,result |
| | | ,error_msg,assistants,in_time |
| | | ,out_time,updated_by,memo |
| | | ) |
| | | values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{workId,jdbcType=BIGINT} |
| | | values (#{id,jdbcType=BIGINT},#{deviceNo,jdbcType=VARCHAR},#{workId,jdbcType=BIGINT} |
| | | ,#{repairId,jdbcType=BIGINT},#{planId,jdbcType=BIGINT},#{stationId,jdbcType=BIGINT} |
| | | ,#{currNode,jdbcType=BIGINT},#{nodeContent,jdbcType=VARCHAR},#{equipCycleContent,jdbcType=VARCHAR} |
| | | ,#{currNode,jdbcType=BIGINT},#{nodeContent,jdbcType=VARCHAR},#{deviceCycleContent,jdbcType=VARCHAR} |
| | | ,#{status,jdbcType=TINYINT},#{result,jdbcType=TINYINT} |
| | | ,#{errorMsg,jdbcType=VARCHAR},#{assistants,jdbcType=VARCHAR},#{inTime,jdbcType=TIMESTAMP} |
| | | ,#{outTime,jdbcType=TIMESTAMP},#{updatedBy,jdbcType=BIGINT},#{memo,jdbcType=VARCHAR} |
| | |
| | | insert into sta_device_life |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="equipNo != null">equip_no,</if> |
| | | <if test="deviceNo != null">device_no,</if> |
| | | <if test="workId != null">work_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="nodeContent != null">node_content,</if> |
| | | <if test="equipCycleContent != null">equip_cycle_content,</if> |
| | | <if test="deviceCycleContent != null">device_cycle_content,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="result != null">result,</if> |
| | | <if test="errorMsg != null">error_msg,</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="deviceNo != null">#{deviceNo,jdbcType=VARCHAR},</if> |
| | | <if test="workId != null">#{workId,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="deviceCycleContent != null">#{deviceCycleContent,jdbcType=VARCHAR},</if> |
| | | <if test="status != null">#{status,jdbcType=TINYINT},</if> |
| | | <if test="result != null">#{result,jdbcType=TINYINT},</if> |
| | | <if test="errorMsg != null">#{errorMsg,jdbcType=VARCHAR},</if> |
| | |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLife"> |
| | | update sta_device_life |
| | | <set> |
| | | <if test="equipNo != null"> |
| | | equip_no = #{equipNo,jdbcType=VARCHAR}, |
| | | <if test="deviceNo != null"> |
| | | device_no = #{deviceNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="workId != null"> |
| | | work_id = #{workId,jdbcType=BIGINT}, |
| | |
| | | <if test="nodeContent != null"> |
| | | node_content = #{nodeContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="equipCycleContent != null"> |
| | | equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR}, |
| | | <if test="deviceCycleContent != null"> |
| | | device_cycle_content = #{deviceCycleContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="status != null"> |
| | | status = #{status,jdbcType=TINYINT}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLife"> |
| | | update sta_device_life |
| | | set |
| | | equip_no = #{equipNo,jdbcType=VARCHAR}, |
| | | device_no = #{deviceNo,jdbcType=VARCHAR}, |
| | | work_id = #{workId,jdbcType=BIGINT}, |
| | | repair_id = #{repairId,jdbcType=BIGINT}, |
| | | plan_id = #{planId,jdbcType=BIGINT}, |
| | | station_id = #{stationId,jdbcType=BIGINT}, |
| | | curr_node = #{currNode,jdbcType=BIGINT}, |
| | | node_content = #{nodeContent,jdbcType=VARCHAR}, |
| | | equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR}, |
| | | device_cycle_content = #{deviceCycleContent,jdbcType=VARCHAR}, |
| | | status = #{status,jdbcType=TINYINT}, |
| | | result = #{result,jdbcType=TINYINT}, |
| | | error_msg = #{errorMsg,jdbcType=VARCHAR}, |
| | |
| | | |
| | | <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="deviceNo" column="device_no" jdbcType="VARCHAR"/> |
| | | <result property="workId" column="work_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="nodeContent" column="node_content" jdbcType="VARCHAR"/> |
| | | <result property="equipCycleContent" column="equip_cycle_content" jdbcType="VARCHAR"/> |
| | | <result property="deviceCycleContent" column="device_cycle_content" jdbcType="VARCHAR"/> |
| | | <result property="status" column="status" jdbcType="TINYINT"/> |
| | | <result property="result" column="result" jdbcType="TINYINT"/> |
| | | <result property="errorMsg" column="error_msg" jdbcType="VARCHAR"/> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,equip_no,work_id, |
| | | id,device_no,work_id, |
| | | repair_id,plan_id,station_id, |
| | | curr_node,node_content,equip_cycle_content, |
| | | curr_node,node_content,device_cycle_content, |
| | | status,result, |
| | | error_msg,assistants,in_time, |
| | | out_time,updated_by,memo |
| | |
| | | from sta_device_production_log |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectByEquipNo" parameterType="java.lang.String" resultMap="joinResultMap"> |
| | | <select id="selectByDeviceNo" parameterType="java.lang.String" resultMap="joinResultMap"> |
| | | select |
| | | t.* ,p.`name` plan_name,s.`name` station_name,u.`name` update_user_name |
| | | FROM |
| | |
| | | left join pr_assembly_plan p on t.plan_id=p.id |
| | | left join plt_station s on s.id = t.station_id |
| | | left JOIN ba_user u on u.id=t.updated_by |
| | | where t.equip_no = #{equipNo,jdbcType=VARCHAR} |
| | | where t.device_no = #{deviceNo,jdbcType=VARCHAR} |
| | | ORDER BY t.id DESC |
| | | </select> |
| | | |
| | |
| | | </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,work_id |
| | | ( id,device_no,work_id |
| | | ,repair_id,plan_id,station_id |
| | | ,curr_node,node_content,equip_cycle_content |
| | | ,curr_node,node_content,device_cycle_content |
| | | ,status,result |
| | | ,error_msg,assistants,in_time |
| | | ,out_time,updated_by,memo |
| | | ) |
| | | values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{workId,jdbcType=BIGINT} |
| | | values (#{id,jdbcType=BIGINT},#{deviceNo,jdbcType=VARCHAR},#{workId,jdbcType=BIGINT} |
| | | ,#{repairId,jdbcType=BIGINT},#{planId,jdbcType=BIGINT},#{stationId,jdbcType=BIGINT} |
| | | ,#{currNode,jdbcType=BIGINT},#{nodeContent,jdbcType=VARCHAR},#{equipCycleContent,jdbcType=VARCHAR} |
| | | ,#{currNode,jdbcType=BIGINT},#{nodeContent,jdbcType=VARCHAR},#{deviceCycleContent,jdbcType=VARCHAR} |
| | | ,#{status,jdbcType=TINYINT},#{result,jdbcType=TINYINT} |
| | | ,#{errorMsg,jdbcType=VARCHAR},#{assistants,jdbcType=VARCHAR},#{inTime,jdbcType=TIMESTAMP} |
| | | ,#{outTime,jdbcType=TIMESTAMP},#{updatedBy,jdbcType=BIGINT},#{memo,jdbcType=VARCHAR} |
| | |
| | | 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="deviceNo != null">device_no,</if> |
| | | <if test="workId != null">work_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="nodeContent != null">node_content,</if> |
| | | <if test="equipCycleContent != null">equip_cycle_content,</if> |
| | | <if test="deviceCycleContent != null">device_cycle_content,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="result != null">result,</if> |
| | | <if test="errorMsg != null">error_msg,</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="deviceNo != null">#{deviceNo,jdbcType=VARCHAR},</if> |
| | | <if test="workId != null">#{workId,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="deviceCycleContent != null">#{deviceCycleContent,jdbcType=VARCHAR},</if> |
| | | <if test="status != null">#{status,jdbcType=TINYINT},</if> |
| | | <if test="result != null">#{result,jdbcType=TINYINT},</if> |
| | | <if test="errorMsg != null">#{errorMsg,jdbcType=VARCHAR},</if> |
| | |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog"> |
| | | update sta_device_production_log |
| | | <set> |
| | | <if test="equipNo != null"> |
| | | equip_no = #{equipNo,jdbcType=VARCHAR}, |
| | | <if test="deviceNo != null"> |
| | | device_no = #{deviceNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="workId != null"> |
| | | work_id = #{workId,jdbcType=BIGINT}, |
| | |
| | | <if test="nodeContent != null"> |
| | | node_content = #{nodeContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="equipCycleContent != null"> |
| | | equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR}, |
| | | <if test="deviceCycleContent != null"> |
| | | device_cycle_content = #{deviceCycleContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="status != null"> |
| | | status = #{status,jdbcType=TINYINT}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog"> |
| | | update sta_device_production_log |
| | | set |
| | | equip_no = #{equipNo,jdbcType=VARCHAR}, |
| | | device_no = #{deviceNo,jdbcType=VARCHAR}, |
| | | work_id = #{workId,jdbcType=BIGINT}, |
| | | repair_id = #{repairId,jdbcType=BIGINT}, |
| | | plan_id = #{planId,jdbcType=BIGINT}, |
| | | station_id = #{stationId,jdbcType=BIGINT}, |
| | | curr_node = #{currNode,jdbcType=BIGINT}, |
| | | node_content = #{nodeContent,jdbcType=VARCHAR}, |
| | | equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR}, |
| | | device_cycle_content = #{deviceCycleContent,jdbcType=VARCHAR}, |
| | | status = #{status,jdbcType=TINYINT}, |
| | | result = #{result,jdbcType=TINYINT}, |
| | | error_msg = #{errorMsg,jdbcType=VARCHAR}, |
| | |
| | | |
| | | <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoSta.StaRepairInfo"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="equipNo" column="equip_no" jdbcType="VARCHAR"/> |
| | | <result property="deviceNo" column="device_no" jdbcType="VARCHAR"/> |
| | | <result property="workId" column="work_id" jdbcType="BIGINT"/> |
| | | <result property="fromNode" column="from_node" jdbcType="BIGINT"/> |
| | | <result property="repairReason" column="repair_reason" jdbcType="VARCHAR"/> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,equip_no,work_id, |
| | | id,device_no,work_id, |
| | | from_node,repair_reason,repair_by, |
| | | repair_time |
| | | </sql> |
| | |
| | | from sta_repair_info |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectByEquipNo" resultMap="BaseResultMap"> |
| | | <select id="selectByDeviceNo" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from sta_repair_info |
| | | where equip_no = #{equipNo,jdbcType=VARCHAR} |
| | | where device_no = #{deviceNo,jdbcType=VARCHAR} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from sta_repair_info |
| | |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo" useGeneratedKeys="true"> |
| | | insert into sta_repair_info |
| | | ( id,equip_no,work_id |
| | | ( id,device_no,work_id |
| | | ,from_node,repair_reason,repair_by |
| | | ,repair_time) |
| | | values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{workId,jdbcType=BIGINT} |
| | | values (#{id,jdbcType=BIGINT},#{deviceNo,jdbcType=VARCHAR},#{workId,jdbcType=BIGINT} |
| | | ,#{fromNode,jdbcType=BIGINT},#{repairReason,jdbcType=VARCHAR},#{repairBy,jdbcType=BIGINT} |
| | | ,#{repairTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | |
| | | insert into sta_repair_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="equipNo != null">equip_no,</if> |
| | | <if test="deviceNo != null">device_no,</if> |
| | | <if test="workId != null">work_id,</if> |
| | | <if test="fromNode != null">from_node,</if> |
| | | <if test="repairReason != null">repair_reason,</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="deviceNo != null">#{deviceNo,jdbcType=VARCHAR},</if> |
| | | <if test="workId != null">#{workId,jdbcType=BIGINT},</if> |
| | | <if test="fromNode != null">#{fromNode,jdbcType=BIGINT},</if> |
| | | <if test="repairReason != null">#{repairReason,jdbcType=VARCHAR},</if> |
| | |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo"> |
| | | update sta_repair_info |
| | | <set> |
| | | <if test="equipNo != null"> |
| | | equip_no = #{equipNo,jdbcType=VARCHAR}, |
| | | <if test="deviceNo != null"> |
| | | device_no = #{deviceNo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="workId != null"> |
| | | work_id = #{workId,jdbcType=BIGINT}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo"> |
| | | update sta_repair_info |
| | | set |
| | | equip_no = #{equipNo,jdbcType=VARCHAR}, |
| | | device_no = #{deviceNo,jdbcType=VARCHAR}, |
| | | work_id = #{workId,jdbcType=BIGINT}, |
| | | from_node = #{fromNode,jdbcType=BIGINT}, |
| | | repair_reason = #{repairReason,jdbcType=VARCHAR}, |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | if(process == null || !process.proId.equals(plan.proId)){ |
| | | throw new RuntimeException("产品与生产流程不匹配"); |
| | | } |
| | | //Fancy add 2024/07/09 如果状态为执行 ,则结束日期必须大于等于当前日期 |
| | | if(plan.status == PlanStatusEnum.NORMAL.getCode()){ |
| | | String endDateStr = plan.getEndDate(); |
| | | LocalDate endDate = LocalDate.parse(endDateStr, DateTimeFormatter.ISO_LOCAL_DATE); |
| | | LocalDate nextDay = endDate.plusDays(1); |
| | | LocalDate today = LocalDate.now(); // 获取当前日期 |
| | | if (nextDay.isBefore(today)) { |
| | | throw new RuntimeException("执行状态结束日期必须大于等于当前日期"); |
| | | } |
| | | } |
| | | PrAssemblyPlan origPlan = assemblyDao.selectByPrimaryKey(plan.id); |
| | | PrBatchNumber batch = batchDao.selectByPrimaryKey(origPlan.batchId); |
| | | //产品改变则更新全部已生成设备号 |
| | |
| | | Map<String, Object> deviceInfo =new HashMap<>(); |
| | | deviceInfo.put("deviceInfo", deviceLast); |
| | | //查询设备日志 |
| | | List<StaDeviceProductionLog> log = deviceProductionLogDao.selectByEquipNo(deviceNo); |
| | | List<StaDeviceProductionLog> log = deviceProductionLogDao.selectByDeviceNo(deviceNo); |
| | | deviceInfo.put("deviceLog", log); |
| | | // 查询设备生命周期 |
| | | List<StaDeviceLife> deviceLife = deviceLifeDao.selectByEquipNo(deviceNo); |
| | | List<StaDeviceLife> deviceLife = deviceLifeDao.selectByDeviceNo(deviceNo); |
| | | deviceInfo.put("deviceLife", deviceLife); |
| | | // 查询设备维修信息 |
| | | List<StaRepairInfo> repairInfo = repairInfoDao.selectByEquipNo(deviceNo); |
| | | List<StaRepairInfo> repairInfo = repairInfoDao.selectByDeviceNo(deviceNo); |
| | | deviceInfo.put("deviceRepair", repairInfo); |
| | | // 查询设备附件信息 |
| | | List<StaWipSnEx> wipSnEx = wipSnExDao.selectByDeviceNo(deviceNo); |
| | |
| | | private OthFileMapper othFileMapper; |
| | | @Value("${dy.webFile.fmUrl}") |
| | | private String fmUrl; |
| | | |
| | | @Autowired |
| | | public void setDeviceLastDao(StaDeviceLastMapper deviceLastDao) { |
| | | this.deviceLastDao = deviceLastDao; |
| | |
| | | record.planId = workLast.planId; |
| | | record.workId = Long.parseLong(params.workId); |
| | | record.stationId = workLast.stationId; |
| | | record.equipNo = deviceNo; |
| | | record.deviceNo = deviceNo; |
| | | record.currNode = workLast.nodeId; |
| | | |
| | | record.updatedBy = workLast.userId; |
| | |
| | | PrProductionNode node = nodeDao.selectByPrimaryKey(workLast.nodeId); |
| | | record.nodeContent = node.content; |
| | | if (node.isRecord) { |
| | | record.equipCycleContent = node.equipCycleContent; |
| | | record.deviceCycleContent = node.equipCycleContent; |
| | | } |
| | | record.status = getStatus(params.status, node.isEnd,params.workType); |
| | | return record; |
| | |
| | | StaDeviceLast preDeviceRecord = deviceLastDao.selectByDeviceNo(vo.deviceNo); |
| | | StaRepairInfo repairInfo = new StaRepairInfo(); |
| | | repairInfo.workId = workId; |
| | | repairInfo.equipNo = vo.deviceNo; |
| | | repairInfo.deviceNo = vo.deviceNo; |
| | | repairInfo.repairTime = new Date(); |
| | | repairInfo.repairBy = workLast.userId; |
| | | repairInfo.repairReason = vo.errorMsg; |
| | |
| | | } |
| | | |
| | | public List<StaDeviceLife> queryLifeByDeviceNo(String deviceNo) { |
| | | return deviceLifeDao.selectByEquipNo(deviceNo); |
| | | return deviceLifeDao.selectByDeviceNo(deviceNo); |
| | | } |
| | | |
| | | public List<StaDeviceProductionLog> queryLogByDeviceNo(String devoiceNo) { |
| | | return deviceProductionLogDao.selectByEquipNo(devoiceNo); |
| | | return deviceProductionLogDao.selectByDeviceNo(devoiceNo); |
| | | } |
| | | } |