From 03ec5826348fe924243eb797559aef91afa98086 Mon Sep 17 00:00:00 2001
From: 刘小明 <liuxm_a@163.com>
Date: 星期一, 24 六月 2024 17:29:23 +0800
Subject: [PATCH] 记录组装各步骤
---
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceProductionLog.java | 46 +-
pms-parent/pms-global/src/main/resources/mapper/StaDeviceProductionLogMapper.xml | 120 +++++----
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java | 22 +
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceLastMapper.java | 3
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceLifeMapper.java | 2
pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml | 121 +++++----
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLast.java | 46 ++-
pms-parent/pms-global/src/main/resources/mapper/StaDeviceLastMapper.xml | 124 +++++---
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceProductionLogMapper.java | 2
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/QueryVo.java | 33 ++
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLife.java | 47 +-
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java | 173 +++++++++++++
12 files changed, 509 insertions(+), 230 deletions(-)
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceLastMapper.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceLastMapper.java
index df26ce6..cce49c8 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceLastMapper.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceLastMapper.java
@@ -6,7 +6,7 @@
/**
* @author User
* @description 閽堝琛ㄣ�恠ta_device_last(璁惧鏈�鏂扮姸鎬佽〃)銆戠殑鏁版嵁搴撴搷浣淢apper
-* @createDate 2024-06-20 11:31:20
+* @createDate 2024-06-22 11:43:04
* @Entity com.dy.pmsGlobal.pojoSta.StaDeviceLast
*/
@Mapper
@@ -24,4 +24,5 @@
int updateByPrimaryKey(StaDeviceLast record);
+ StaDeviceLast selectByDeviceNo(String s);
}
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceLifeMapper.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceLifeMapper.java
index c3efd9c..e128166 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceLifeMapper.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceLifeMapper.java
@@ -6,7 +6,7 @@
/**
* @author User
* @description 閽堝琛ㄣ�恠ta_device_life(璁惧鐢熷懡鍛ㄦ湡琛�)銆戠殑鏁版嵁搴撴搷浣淢apper
-* @createDate 2024-06-20 11:31:20
+* @createDate 2024-06-22 11:43:04
* @Entity com.dy.pmsGlobal.pojoSta.StaDeviceLife
*/
@Mapper
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceProductionLogMapper.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceProductionLogMapper.java
index 6d151e5..85f636e 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceProductionLogMapper.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceProductionLogMapper.java
@@ -6,7 +6,7 @@
/**
* @author User
* @description 閽堝琛ㄣ�恠ta_device_production_log(璁惧鐢熶骇鏃ュ織琛�)銆戠殑鏁版嵁搴撴搷浣淢apper
-* @createDate 2024-06-20 11:31:20
+* @createDate 2024-06-22 11:43:04
* @Entity com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog
*/
@Mapper
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLast.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLast.java
index c2c7ab5..17f2283 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLast.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLast.java
@@ -5,10 +5,7 @@
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;
@@ -32,8 +29,18 @@
/**
* 璁惧鐮�
*/
- @NotBlank(message="[璁惧鐮乚涓嶈兘涓虹┖")
+ @NotBlank(message="璁惧鐮佷笉鑳戒负绌�")
public String equipNo;
+ /**
+ * 鐢熶骇鐧诲綍id
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long claimId;
+ /**
+ * 缁翠慨id
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long repairId;
/**
* 璁″垝id
*/
@@ -50,10 +57,13 @@
@JSONField(serializeUsing= ObjectWriterImplToString.class)
public Long currNode;
/**
- * 涓嬩竴鑺傜偣
+ * 鑺傜偣浣滀笟鍐呭
*/
- @JSONField(serializeUsing= ObjectWriterImplToString.class)
- public Long nextNode;
+ public String nodeContent;
+ /**
+ * 璁板綍璁惧鍛ㄦ湡鍐呭
+ */
+ public String equipCycleContent;
/**
* 鐘舵��: 1:缁勮涓�,2:瀹屾垚,3:缁翠慨,4:鎶ュ簾
*/
@@ -67,21 +77,9 @@
*/
public String errorCode;
/**
- * 澶囨敞
- */
- public String memo;
- /**
* 杈呭姪浜哄憳:杈呭姪鍛樺伐id,浠ラ�楀彿闅斿紑
*/
public String assistants;
- /**
- * 鍒涘缓鏃堕棿
- */
- public Date createTime;
- /**
- *
- */
- public Date updatedDate;
/**
* 鎿嶄綔鍛榠d
*/
@@ -90,7 +88,15 @@
/**
* 鍏ョ珯鏃堕棿(涓婁竴鑺傜偣鐨勫嚭绔欐椂闂�)
*/
- public Date inStationTime;
+ public Date inTime;
+ /**
+ * 鍑虹珯鏃堕棿
+ */
+ public Date outTime;
+ /**
+ * 澶囨敞
+ */
+ public String memo;
}
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLife.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLife.java
index c46df26..33cc91a 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLife.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLife.java
@@ -5,10 +5,7 @@
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;
@@ -32,8 +29,18 @@
/**
* 璁惧鐮�
*/
- @NotBlank(message="[璁惧鐮乚涓嶈兘涓虹┖")
+ @NotBlank(message="璁惧鐮佷笉鑳戒负绌�")
public String equipNo;
+ /**
+ * 鐢熶骇鐧诲綍id
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long claimId;
+ /**
+ * 缁翠慨id
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long repairId;
/**
* 璁″垝id
*/
@@ -50,14 +57,14 @@
@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:鎶ュ簾
*/
@@ -71,32 +78,26 @@
*/
public String errorCode;
/**
- * 澶囨敞
- */
- public String memo;
- /**
* 杈呭姪浜哄憳:杈呭姪鍛樺伐id,浠ラ�楀彿闅斿紑
*/
public String assistants;
/**
- *
+ * 鍏ョ珯鏃堕棿
*/
- public Date updatedDate;
+ public Date inTime;
+ /**
+ * 鍑虹珯鏃堕棿
+ */
+ public Date outTime;
/**
* 鎿嶄綔鍛榠d
*/
@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;
}
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceProductionLog.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceProductionLog.java
index 535b3ca..4bfedf4 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceProductionLog.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceProductionLog.java
@@ -5,10 +5,7 @@
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;
@@ -32,8 +29,18 @@
/**
* 璁惧鐮�
*/
- @NotBlank(message="[璁惧鐮乚涓嶈兘涓虹┖")
+ @NotBlank(message="璁惧鐮佷笉鑳戒负绌�")
public String equipNo;
+ /**
+ * 鐢熶骇鐧诲綍id
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long claimId;
+ /**
+ * 缁翠慨id
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long repairId;
/**
* 璁″垝id
*/
@@ -50,14 +57,13 @@
@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:鎶ュ簾
*/
@@ -71,32 +77,26 @@
*/
public String errorCode;
/**
- * 澶囨敞
- */
- public String memo;
- /**
* 杈呭姪浜哄憳:杈呭姪鍛樺伐id,浠ラ�楀彿闅斿紑
*/
public String assistants;
/**
- *
+ * 鍏ョ珯鏃堕棿
*/
- public Date updatedDate;
+ public Date inTime;
+ /**
+ * 鍑虹珯鏃堕棿
+ */
+ public Date outTime;
/**
* 鎿嶄綔鍛榠d
*/
@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;
}
diff --git a/pms-parent/pms-global/src/main/resources/mapper/StaDeviceLastMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/StaDeviceLastMapper.xml
index 50da7e0..c6f32b4 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/StaDeviceLastMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/StaDeviceLastMapper.xml
@@ -7,27 +7,31 @@
<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">
@@ -36,6 +40,12 @@
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
@@ -43,54 +53,60 @@
</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">
@@ -98,6 +114,12 @@
<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},
@@ -108,8 +130,11 @@
<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},
@@ -120,23 +145,20 @@
<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}
@@ -145,19 +167,21 @@
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>
diff --git a/pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml
index 9bb4600..412af69 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml
@@ -7,29 +7,30 @@
<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">
@@ -45,56 +46,60 @@
</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">
@@ -102,6 +107,12 @@
<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},
@@ -112,11 +123,11 @@
<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},
@@ -127,23 +138,20 @@
<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}
@@ -152,20 +160,21 @@
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>
diff --git a/pms-parent/pms-global/src/main/resources/mapper/StaDeviceProductionLogMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/StaDeviceProductionLogMapper.xml
index 1e10462..3ddb7c2 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/StaDeviceProductionLogMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/StaDeviceProductionLogMapper.xml
@@ -7,29 +7,30 @@
<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">
@@ -45,56 +46,61 @@
</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">
@@ -102,6 +108,12 @@
<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},
@@ -112,11 +124,11 @@
<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},
@@ -127,23 +139,20 @@
<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}
@@ -152,20 +161,21 @@
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>
diff --git a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java
index 353bbd1..6894e18 100644
--- a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java
+++ b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java
@@ -1,6 +1,12 @@
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;
@@ -11,4 +17,20 @@
@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);
+ }
+ }
}
diff --git a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java
new file mode 100644
index 0000000..e3b6538
--- /dev/null
+++ b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java
@@ -0,0 +1,173 @@
+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("鐘舵�侀敊璇�");
+ };
+ }
+}
diff --git a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/QueryVo.java b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/QueryVo.java
new file mode 100644
index 0000000..91484d8
--- /dev/null
+++ b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/QueryVo.java
@@ -0,0 +1,33 @@
+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;
+ }
+}
--
Gitblit v1.8.0