刘小明
2024-06-26 a058edded3901601f8597c66bcae687c5dbc4407
记录维修步骤
14个文件已修改
234 ■■■■■ 已修改文件
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrProductionNodeMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaAssemblyWorkLastMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLast.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLife.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceProductionLog.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaRepairInfo.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/StaDeviceLastMapper.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/StaDeviceProductionLogMapper.xml 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/StaRepairInfoMapper.xml 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/QueryVo.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrProductionNodeMapper.java
@@ -27,4 +27,11 @@
    List<PrProductionNode> selectByProcess(Long processId);
    void deleteByProcessId(Long id);
    /**
     * 节点是结束节点或之后的节点
     * @param currNode
     * @return
     */
    boolean isEndNode(Long currNode);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaAssemblyWorkLastMapper.java
@@ -2,7 +2,6 @@
import com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import java.util.List;
import java.util.Map;
@@ -20,7 +19,7 @@
    int insert(StaAssemblyWorkLast record);
    @Options(useGeneratedKeys = true, keyProperty = "id")
//    @Options(useGeneratedKeys = true, keyProperty = "id")
    int insertSelective(StaAssemblyWorkLast record);
    StaAssemblyWorkLast selectByPrimaryKey(Long id);
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLast.java
@@ -35,7 +35,7 @@
    * 生产登录id
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long claimId;
    public Long workId;
    /**
    * 维修id
    */
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLife.java
@@ -35,7 +35,7 @@
    * 生产登录id
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long claimId;
    public Long workId;
    /**
    * 维修id
    */
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceProductionLog.java
@@ -35,7 +35,7 @@
    * 生产登录id
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long claimId;
    public Long workId;
    /**
    * 维修id
    */
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaRepairInfo.java
@@ -23,15 +23,17 @@
@AllArgsConstructor
public class StaRepairInfo implements BaseEntity {
    /**
    *
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long id;
    /**
    * 设备码
    */
    public String equipNo;
    /**
    * 生产登录id
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long workId;
    /**
    * 从哪个节点进入维修
    */
@@ -42,11 +44,6 @@
    */
    public String repairReason;
    /**
    * 去向节点
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long toNode;
    /**
    * 维修员工
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
@@ -55,15 +52,6 @@
    * 维修时间
    */
    public Date repairTime;
    /**
    * 创建时间
    */
    public Date createTime;
    /**
    * 推送员工
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long createBy;
}
pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml
@@ -153,6 +153,13 @@
            </if>
        </trim>
    </select>
    <select id="isEndNode" resultType="java.lang.Boolean">
        select
            n.sort >=n1.sort
        from pr_production_node n
                 left join pr_production_node n1 on n.process_id = n1.process_id
        where n1.id = #{id} and n.is_end=1
    </select>
    <update id="deleteLogicById" parameterType="java.lang.Long">
        update pr_production_node set deleted = 1
pms-parent/pms-global/src/main/resources/mapper/StaDeviceLastMapper.xml
@@ -7,7 +7,7 @@
    <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="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"/>
@@ -25,7 +25,7 @@
    </resultMap>
    <sql id="Base_Column_List">
        id,equip_no,claim_id,
        id,equip_no,work_id,
        repair_id,plan_id,station_id,
        curr_node,node_content,equip_cycle_content,
        status,result,
@@ -53,14 +53,14 @@
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLast" useGeneratedKeys="true">
        insert into sta_device_last
        ( id,equip_no,claim_id
        ( id,equip_no,work_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}
        values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{workId,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}
@@ -73,7 +73,7 @@
        <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="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>
@@ -92,7 +92,7 @@
        <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="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>
@@ -115,8 +115,8 @@
                <if test="equipNo != null">
                    equip_no = #{equipNo,jdbcType=VARCHAR},
                </if>
                <if test="claimId != null">
                    claim_id = #{claimId,jdbcType=BIGINT},
                <if test="workId != null">
                    work_id = #{workId,jdbcType=BIGINT},
                </if>
                <if test="repairId != null">
                    repair_id = #{repairId,jdbcType=BIGINT},
@@ -167,7 +167,7 @@
        update sta_device_last
        set 
            equip_no =  #{equipNo,jdbcType=VARCHAR},
            claim_id =  #{claimId,jdbcType=BIGINT},
            work_id =  #{workId,jdbcType=BIGINT},
            repair_id =  #{repairId,jdbcType=BIGINT},
            plan_id =  #{planId,jdbcType=BIGINT},
            station_id =  #{stationId,jdbcType=BIGINT},
pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml
@@ -7,7 +7,7 @@
    <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="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"/>
@@ -25,7 +25,7 @@
    </resultMap>
    <sql id="Base_Column_List">
        id,equip_no,claim_id,
        id,equip_no,work_id,
        repair_id,plan_id,station_id,
        curr_node,node_content,equip_cycle_content,
        status,result,
@@ -46,14 +46,14 @@
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLife" useGeneratedKeys="true">
        insert into sta_device_life
        ( id,equip_no,claim_id
        ( id,equip_no,work_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}
        values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{workId,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}
@@ -66,7 +66,7 @@
        <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="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>
@@ -85,7 +85,7 @@
        <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="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>
@@ -108,8 +108,8 @@
                <if test="equipNo != null">
                    equip_no = #{equipNo,jdbcType=VARCHAR},
                </if>
                <if test="claimId != null">
                    claim_id = #{claimId,jdbcType=BIGINT},
                <if test="workId != null">
                    work_id = #{workId,jdbcType=BIGINT},
                </if>
                <if test="repairId != null">
                    repair_id = #{repairId,jdbcType=BIGINT},
@@ -160,7 +160,7 @@
        update sta_device_life
        set 
            equip_no =  #{equipNo,jdbcType=VARCHAR},
            claim_id =  #{claimId,jdbcType=BIGINT},
            work_id =  #{workId,jdbcType=BIGINT},
            repair_id =  #{repairId,jdbcType=BIGINT},
            plan_id =  #{planId,jdbcType=BIGINT},
            station_id =  #{stationId,jdbcType=BIGINT},
pms-parent/pms-global/src/main/resources/mapper/StaDeviceProductionLogMapper.xml
@@ -7,7 +7,7 @@
    <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="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"/>
@@ -25,7 +25,7 @@
    </resultMap>
    <sql id="Base_Column_List">
        id,equip_no,claim_id,
        id,equip_no,work_id,
        repair_id,plan_id,station_id,
        curr_node,node_content,equip_cycle_content,
        status,result,
@@ -46,17 +46,17 @@
    </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,claim_id
        ( id,equip_no,work_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}
        values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{workId,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}
        ,#{status,jdbcType=TINYINT},#{result,jdbcType=TINYINT}
        ,#{errorCode,jdbcType=VARCHAR},#{assistants,jdbcType=VARCHAR},#{inTime,jdbcType=TIMESTAMP}
        ,#{outTime,jdbcType=TIMESTAMP},#{updatedBy,jdbcType=BIGINT},#{memo,jdbcType=VARCHAR}
        )
@@ -66,7 +66,7 @@
        <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="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>
@@ -85,14 +85,13 @@
        <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="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="nextNode != null">#{nextNode,jdbcType=BIGINT},</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>
@@ -109,8 +108,8 @@
                <if test="equipNo != null">
                    equip_no = #{equipNo,jdbcType=VARCHAR},
                </if>
                <if test="claimId != null">
                    claim_id = #{claimId,jdbcType=BIGINT},
                <if test="workId != null">
                    work_id = #{workId,jdbcType=BIGINT},
                </if>
                <if test="repairId != null">
                    repair_id = #{repairId,jdbcType=BIGINT},
@@ -161,7 +160,7 @@
        update sta_device_production_log
        set 
            equip_no =  #{equipNo,jdbcType=VARCHAR},
            claim_id =  #{claimId,jdbcType=BIGINT},
            work_id =  #{workId,jdbcType=BIGINT},
            repair_id =  #{repairId,jdbcType=BIGINT},
            plan_id =  #{planId,jdbcType=BIGINT},
            station_id =  #{stationId,jdbcType=BIGINT},
pms-parent/pms-global/src/main/resources/mapper/StaRepairInfoMapper.xml
@@ -7,19 +7,17 @@
    <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="workId" column="work_id" jdbcType="BIGINT"/>
            <result property="fromNode" column="from_node" jdbcType="BIGINT"/>
            <result property="repairReason" column="repair_reason" jdbcType="VARCHAR"/>
            <result property="toNode" column="to_node" jdbcType="BIGINT"/>
            <result property="repairBy" column="repair_by" jdbcType="BIGINT"/>
            <result property="repairTime" column="repair_time" jdbcType="TIMESTAMP"/>
            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
            <result property="createBy" column="create_by" jdbcType="BIGINT"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,equip_no,from_node,
        repair_reason,to_node,repair_by,
        repair_time,create_time,create_by
        id,equip_no,work_id,
        from_node,repair_reason,repair_by,
        repair_time
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
@@ -35,38 +33,32 @@
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo" useGeneratedKeys="true">
        insert into sta_repair_info
        ( id,equip_no,from_node
        ,repair_reason,to_node,repair_by
        ,repair_time,create_time,create_by
        )
        values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{fromNode,jdbcType=BIGINT}
        ,#{repairReason,jdbcType=VARCHAR},#{toNode,jdbcType=BIGINT},#{repairBy,jdbcType=BIGINT}
        ,#{repairTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{createBy,jdbcType=BIGINT}
        )
        ( id,equip_no,work_id
        ,from_node,repair_reason,repair_by
        ,repair_time)
        values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{workId,jdbcType=BIGINT}
        ,#{fromNode,jdbcType=BIGINT},#{repairReason,jdbcType=VARCHAR},#{repairBy,jdbcType=BIGINT}
        ,#{repairTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo" useGeneratedKeys="true">
        insert into sta_repair_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="equipNo != null">equip_no,</if>
                <if test="workId != null">work_id,</if>
                <if test="fromNode != null">from_node,</if>
                <if test="repairReason != null">repair_reason,</if>
                <if test="toNode != null">to_node,</if>
                <if test="repairBy != null">repair_by,</if>
                <if test="repairTime != null">repair_time,</if>
                <if test="createTime != null">create_time,</if>
                <if test="createBy != null">create_by,</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="workId != null">#{workId,jdbcType=BIGINT},</if>
                <if test="fromNode != null">#{fromNode,jdbcType=BIGINT},</if>
                <if test="repairReason != null">#{repairReason,jdbcType=VARCHAR},</if>
                <if test="toNode != null">#{toNode,jdbcType=BIGINT},</if>
                <if test="repairBy != null">#{repairBy,jdbcType=BIGINT},</if>
                <if test="repairTime != null">#{repairTime,jdbcType=TIMESTAMP},</if>
                <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
                <if test="createBy != null">#{createBy,jdbcType=BIGINT},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo">
@@ -75,26 +67,20 @@
                <if test="equipNo != null">
                    equip_no = #{equipNo,jdbcType=VARCHAR},
                </if>
                <if test="workId != null">
                    work_id = #{workId,jdbcType=BIGINT},
                </if>
                <if test="fromNode != null">
                    from_node = #{fromNode,jdbcType=BIGINT},
                </if>
                <if test="repairReason != null">
                    repair_reason = #{repairReason,jdbcType=VARCHAR},
                </if>
                <if test="toNode != null">
                    to_node = #{toNode,jdbcType=BIGINT},
                </if>
                <if test="repairBy != null">
                    repair_by = #{repairBy,jdbcType=BIGINT},
                </if>
                <if test="repairTime != null">
                    repair_time = #{repairTime,jdbcType=TIMESTAMP},
                </if>
                <if test="createTime != null">
                    create_time = #{createTime,jdbcType=TIMESTAMP},
                </if>
                <if test="createBy != null">
                    create_by = #{createBy,jdbcType=BIGINT},
                </if>
        </set>
        where   id = #{id,jdbcType=BIGINT} 
@@ -103,13 +89,11 @@
        update sta_repair_info
        set 
            equip_no =  #{equipNo,jdbcType=VARCHAR},
            work_id =  #{workId,jdbcType=BIGINT},
            from_node =  #{fromNode,jdbcType=BIGINT},
            repair_reason =  #{repairReason,jdbcType=VARCHAR},
            to_node =  #{toNode,jdbcType=BIGINT},
            repair_by =  #{repairBy,jdbcType=BIGINT},
            repair_time =  #{repairTime,jdbcType=TIMESTAMP},
            create_time =  #{createTime,jdbcType=TIMESTAMP},
            create_by =  #{createBy,jdbcType=BIGINT}
            repair_time =  #{repairTime,jdbcType=TIMESTAMP}
        where   id = #{id,jdbcType=BIGINT} 
    </update>
</mapper>
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java
@@ -25,7 +25,7 @@
    @PostMapping(path = "save")
    public BaseResponse save(@RequestBody @Valid QueryVo vo) {
        log.info("AssemblyStepCtrl.test()");
        log.info("AssemblyStepCtrl.save()");
        int count = sv.save(vo);
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
@@ -33,4 +33,15 @@
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    @PostMapping(path = "repair")
    public BaseResponse repair(@RequestBody @Valid QueryVo vo) {
        log.info("AssemblyStepCtrl.repair()");
        int count = sv.repair(vo);
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
}
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java
@@ -31,6 +31,7 @@
    private PrAssemblyPlanMapper assemblyPlanDao;
//    private PrProductionProcessMapper processDao;
    private PrProductionNodeMapper nodeDao;
    private StaRepairInfoMapper repairInfoDao;
    @Autowired
    public void setDeviceLastDao(StaDeviceLastMapper deviceLastDao) {
        this.deviceLastDao = deviceLastDao;
@@ -59,10 +60,14 @@
    public void setNodeDao(PrProductionNodeMapper nodeDao) {
        this.nodeDao = nodeDao;
    }
    @Autowired
    public void setRepairInfoDao(StaRepairInfoMapper repairInfoDao) {
        this.repairInfoDao = repairInfoDao;
    }
    public int save(QueryVo params) {
        long taskId = Long.parseLong(params.taskId);
        StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(taskId);
        long workId = Long.parseLong(params.workId);
        StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(workId);
        if (workLast == null) {
            throw new RuntimeException("工单不存在");
        }
@@ -88,7 +93,7 @@
            throw new RuntimeException("设备号有且只能有一个");
        }
        StaDeviceLast deviceLast = saveDeviceLast(params, workLast, deviceList);
        StaDeviceLast deviceLast = buildDeviceLast(params, workLast, deviceList.get(0));
        int count = deviceLast.id == null ? deviceLastDao.insertSelective(deviceLast) :
                deviceLastDao.updateByPrimaryKeySelective(deviceLast);
@@ -117,22 +122,22 @@
        deviceLifeDao.insertSelective(life);
    }
    private StaDeviceLast saveDeviceLast(QueryVo params, StaAssemblyWorkLast workLast, List<String> deviceList){
    private StaDeviceLast buildDeviceLast(QueryVo params, StaAssemblyWorkLast workLast, String deviceNo){
        //组装数据
        StaDeviceLast record = new StaDeviceLast();
        StaDeviceLast preRecord = deviceLastDao.selectByDeviceNo(deviceList.get(0));
        StaDeviceLast preRecord = deviceLastDao.selectByDeviceNo(deviceNo);
        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.planId = workLast.planId;
        record.workId = Long.parseLong(params.workId);
        record.stationId = workLast.stationId;
        record.equipNo = deviceNo;
        record.currNode = workLast.nodeId;
//        record.setNextNode(getNextNode(params.status,workLast.nodeId));
        record.updatedBy = workLast.userId;
@@ -170,4 +175,42 @@
            default -> throw new RuntimeException("状态错误");
        };
    }
    public int repair(QueryVo vo) {
        long workId = Long.parseLong(vo.workId);
        StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(workId);
        if (workLast == null) {
            throw new RuntimeException("工单不存在");
        }
        StaDeviceLast preDeviceRecord = deviceLastDao.selectByDeviceNo(vo.deviceNo);
        StaRepairInfo repairInfo = new StaRepairInfo();
        repairInfo.workId = workId;
        repairInfo.equipNo = vo.deviceNo;
        repairInfo.repairTime = new Date();
        repairInfo.repairBy = workLast.userId;
        repairInfo.repairReason = vo.errorMsg;
        repairInfo.fromNode = preDeviceRecord.currNode;
        repairInfoDao.insertSelective(repairInfo);
        StaDeviceLast deviceLast = new StaDeviceLast();
        BeanUtils.copyProperties(preDeviceRecord, deviceLast);
        deviceLast.repairId = repairInfo.id;
        deviceLast.errorCode = vo.errorMsg;
        deviceLast.assistants = vo.assistants;
        //如果原节点是结束节点或之后的节点,是则更新为完成,否则更新为组装中(默认维修节点的状态只能为 确定或 报废)
        boolean isEndNode = nodeDao.isEndNode(preDeviceRecord.currNode);
        if(QrCodeConstant.MarkWaste.equals(vo.status)){
            deviceLast.status = STATUS_WASTE;
        }else{
            deviceLast.status = isEndNode? STATUS_COMPLETE:STATUS_OK;
        }
        int count = deviceLast.id == null ? deviceLastDao.insertSelective(deviceLast) :
                deviceLastDao.updateByPrimaryKeySelective(deviceLast);
        saveDeviceProductionLog(deviceLast);
        if (isEndNode) {
            saveDeviceLife(deviceLast);
        }
        return count;
    }
}
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/QueryVo.java
@@ -14,7 +14,7 @@
    @NotEmpty(message = "设备编号不能为空")
    public String deviceNo;
    @NotNull(message = "任务编号不能为空")
    public String taskId;
    public String workId;
    @NotNull(message = "状态不能为空")
    public String status;
    /**
@@ -26,8 +26,4 @@
     */
    public String assistants;
    public void setTaskId(String taskId) {
        taskId = taskId.replace("", "103");
        this.taskId = taskId;
    }
}