From 1834d7defb4128709be8321911dc055ca8a5e406 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期二, 26 三月 2024 16:15:12 +0800
Subject: [PATCH] #

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/entity/Motion.java |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/entity/Motion.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/entity/Motion.java
index 1aeec03..d508c7b 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/entity/Motion.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/entity/Motion.java
@@ -3,7 +3,9 @@
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
+import com.zy.asrs.wcs.core.BuildSupport;
 import com.zy.asrs.wcs.core.entity.DeviceCtg;
+import com.zy.asrs.wcs.core.model.enums.MotionStsType;
 import com.zy.asrs.wcs.core.service.DeviceCtgService;
 import com.zy.asrs.wcs.rcs.service.DeviceTypeService;
 import com.zy.asrs.wcs.rcs.service.MotionCtgService;
@@ -273,6 +275,25 @@
         this.hostId = hostId;
     }
 
+    public static Motion build(BuildSupport<Motion> support) {
+        Motion motion = new Motion();
+        Date date = new Date();
+
+        support.execute(motion);
+
+        if (null == motion.getSync()) {
+            motion.setSync(1);
+        }
+        if (null == motion.getMotionSts()) {
+            motion.setMotionSts(MotionStsType.INIT.val());
+        }
+
+        motion.setStatus(1);
+        motion.setCreateTime(date);
+        motion.setUpdateTime(date);
+        return motion;
+    }
+
 //    Motion motion = new Motion(
 //            null,    // 缂栧彿
 //            null,    // 浠诲姟鍙�

--
Gitblit v1.9.1