From 7444c4c07c82c1ae7816b4d3ee68b8d0eba7f4a0 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期六, 13 四月 2024 12:39:06 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/entity/WrkMastSta.java |  165 ++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 138 insertions(+), 27 deletions(-)

diff --git a/src/main/java/com/zy/asrs/entity/WrkMastSta.java b/src/main/java/com/zy/asrs/entity/WrkMastSta.java
index 7badeb3..c5cfbe3 100644
--- a/src/main/java/com/zy/asrs/entity/WrkMastSta.java
+++ b/src/main/java/com/zy/asrs/entity/WrkMastSta.java
@@ -1,11 +1,15 @@
 package com.zy.asrs.entity;
 
-import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId;
+import com.core.common.Cools;
+import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.enums.IdType;
 import com.baomidou.mybatisplus.annotations.TableField;
+
 import java.text.SimpleDateFormat;
 import java.util.Date;
+
 import org.springframework.format.annotation.DateTimeFormat;
+
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.text.SimpleDateFormat;
@@ -14,6 +18,7 @@
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import com.baomidou.mybatisplus.annotations.TableName;
+
 import java.io.Serializable;
 
 @Data
@@ -25,99 +30,124 @@
     /**
      * ID
      */
-    @ApiModelProperty(value= "ID")
+    @ApiModelProperty(value = "ID")
     @TableId(value = "id", type = IdType.AUTO)
     private Long id;
 
     /**
      * 宸ヤ綔鍙�
      */
-    @ApiModelProperty(value= "宸ヤ綔鍙�")
+    @ApiModelProperty(value = "宸ヤ綔鍙�")
     @TableField("wrk_no")
     private Long wrkNo;
 
     /**
      * 宸ヤ綔妗e紑濮嬩綅缃�
      */
-    @ApiModelProperty(value= "宸ヤ綔妗e紑濮嬩綅缃�")
+    @ApiModelProperty(value = "宸ヤ綔妗e紑濮嬩綅缃�")
     @TableField("wrk_start")
     private Integer wrkStart;
 
     /**
      * 宸ヤ綔妗g粨鏉熶綅缃�
      */
-    @ApiModelProperty(value= "宸ヤ綔妗g粨鏉熶綅缃�")
+    @ApiModelProperty(value = "宸ヤ綔妗g粨鏉熶綅缃�")
     @TableField("wrk_end")
     private Integer wrkEnd;
 
     /**
      * 灏忚溅鎺ヨ揣浣嶇疆
      */
-    @ApiModelProperty(value= "灏忚溅鎺ヨ揣浣嶇疆")
+    @ApiModelProperty(value = "灏忚溅鎺ヨ揣浣嶇疆")
     @TableField("sta_start")
     private Integer staStart;
 
     /**
      * 灏忚溅鏀捐揣浣嶇疆
      */
-    @ApiModelProperty(value= "灏忚溅鏀捐揣浣嶇疆")
+    @ApiModelProperty(value = "灏忚溅鏀捐揣浣嶇疆")
     @TableField("sta_end")
     private Integer staEnd;
 
     /**
      * 娣诲姞鏃堕棿
      */
-    @ApiModelProperty(value= "娣诲姞鏃堕棿")
+    @ApiModelProperty(value = "娣诲姞鏃堕棿")
     @TableField("create_time")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createTime;
 
     /**
      * 淇敼鏃堕棿
      */
-    @ApiModelProperty(value= "淇敼鏃堕棿")
+    @ApiModelProperty(value = "淇敼鏃堕棿")
     @TableField("update_time")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date updateTime;
 
     /**
-     * 绫诲瀷 0:闈炵┖  1:绌烘澘
+     * 绫诲瀷 1:闈炵┖  2:绌烘澘
      */
-    @ApiModelProperty(value= "绫诲瀷 0:闈炵┖  1:绌烘澘")
+    @ApiModelProperty(value = "绫诲瀷 1:闈炵┖  2:绌烘澘")
     private Integer type;
 
     /**
      * 宸ヤ綔鐘舵�� 0锛氬垵濮� 1锛氱瓑寰呭皬杞﹀彇 2锛氱瓑寰呭皬杞︽斁 3锛氬畬鎴�
      */
-    @ApiModelProperty(value= "宸ヤ綔鐘舵�� 0锛氬垵濮� 1锛氱瓑寰呭皬杞﹀彇 2锛氱瓑寰呭皬杞︽斁 3锛氬畬鎴�")
+    @ApiModelProperty(value = "宸ヤ綔鐘舵�� 0锛氬垵濮� 1锛氱瓑寰呭皬杞﹀彇 2锛氱瓑寰呭皬杞︽斁 3锛氬畬鎴�")
     @TableField("wrk_sts")
     private Integer wrkSts;
 
     /**
      * 琛屽彿
      */
-    @ApiModelProperty(value= "琛屽彿")
+    @ApiModelProperty(value = "琛屽彿")
     @TableField("line_number")
     private Integer lineNumber;
 
     /**
-     * 宸ヤ綔绫诲瀷
+     * 宸ヤ綔绫诲瀷 1:鍙栵紙鍙犵洏锛�  2锛氭媶鐩�  3锛氬彇鏀� 5锛氭弧鍙�  6锛氭弧鏀�
      */
-    @ApiModelProperty(value= "宸ヤ綔绫诲瀷")
+    @ApiModelProperty(value = "宸ヤ綔绫诲瀷  1:鍙栵紙鍙犵洏锛�  2锛氭媶鐩�  3锛氬彇鏀� 5锛氭弧鍙�  6锛氭弧鏀�")
     @TableField("wrk_type")
     private Integer wrkType;
 
     /**
      * 鏍囪鏃堕棿
      */
-    @ApiModelProperty(value= "鏍囪鏃堕棿")
+    @ApiModelProperty(value = "鏍囪鏃堕棿")
     @TableField("bign_time")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date bignTime;
 
-    public WrkMastSta() {}
+    public WrkMastSta() {
+    }
 
-    public WrkMastSta(Long wrkNo,Integer wrkStart,Integer wrkEnd,Integer staStart,Integer staEnd,Date createTime,Date updateTime,Integer type,Integer wrkSts,Integer lineNumber,Integer wrkType,Date bignTime) {
+    public WrkMastSta(WrkMast wrkMast, Date now, BasDevp basDevp) {
+        this.wrkNo = wrkMast.getWrkNo().longValue();
+        this.wrkStart = wrkMast.getSourceStaNo();
+        this.wrkEnd = wrkMast.getStaNo();
+        this.staStart = basDevp.getDevNo();
+        this.staEnd = getStaEnd(wrkMast.getStaNo());
+        this.createTime = now;
+        this.updateTime = now;
+        this.wrkSts = 0;
+        this.bignTime = now;
+    }
+
+    public WrkMastSta(Date now, Integer staStart) {
+        this.wrkNo = staStart.longValue()+19999L;
+        this.wrkStart = staStart;
+        this.wrkEnd = staStart;
+        this.staStart = staStart;
+        this.staEnd = staStart;
+        this.createTime = now;
+        this.updateTime = now;
+        this.wrkSts = 0;
+        this.bignTime = now;
+    }
+
+    public WrkMastSta(Long wrkNo, Integer wrkStart, Integer wrkEnd, Integer staStart, Integer staEnd, Date createTime, Date updateTime, Integer type, Integer wrkSts, Integer lineNumber, Integer wrkType, Date bignTime) {
         this.wrkNo = wrkNo;
         this.wrkStart = wrkStart;
         this.wrkEnd = wrkEnd;
@@ -147,26 +177,107 @@
 //            null    // 鏍囪鏃堕棿
 //    );
 
-    public String getCreateTime$(){
-        if (Cools.isEmpty(this.createTime)){
+    public String getCreateTime$() {
+        if (Cools.isEmpty(this.createTime)) {
             return "";
         }
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
     }
 
-    public String getUpdateTime$(){
-        if (Cools.isEmpty(this.updateTime)){
+    public String getUpdateTime$() {
+        if (Cools.isEmpty(this.updateTime)) {
             return "";
         }
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
     }
 
-    public String getBignTime$(){
-        if (Cools.isEmpty(this.bignTime)){
+    public String getBignTime$() {
+        if (Cools.isEmpty(this.bignTime)) {
             return "";
         }
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.bignTime);
     }
 
+    public Integer getStaEnd(Integer souSta) {
+        switch (souSta) {
+            case 100:
+            case 103:
+            case 106:
+            case 109:
+            case 112:
+            case 115:
+                return souSta + 1;
+            default:
+                return souSta;
+        }
+    }
+
+    public String getType$() {
+        if (Cools.isEmpty(this.type)) {
+            return "";
+        }
+        switch (this.type) {
+            case 1:
+                return "闈炵┖";
+            case 2:
+                return "绌烘澘";
+            default:
+                return "";
+        }
+    }
+
+    /**
+     * 宸ヤ綔鐘舵�� 0锛氬垵濮� 1锛氱瓑寰呭皬杞﹀彇 2锛氱瓑寰呭皬杞︽斁 3锛氬畬鎴�
+     */
+    public String getWrkSts$() {
+        if (Cools.isEmpty(this.wrkSts)) {
+            try {
+                if (this.wrkSts==0){
+                    return "鍒濆";
+                }
+            }catch (Exception e){
+                return "";
+            }
+            return "";
+        }
+        switch (this.wrkSts) {
+            case 0:
+                return "鍒濆";
+            case 1:
+                return "绛夊緟灏忚溅鍙�";
+            case 2:
+                return "绛夊緟灏忚溅鏀�";
+            case 3:
+                return "瀹屾垚";
+            default:
+                return "";
+        }
+    }
+
+    /**
+     * 宸ヤ綔绫诲瀷 1:鍙栵紙鍙犵洏锛�  2锛氭媶鐩�  3锛氬彇鏀� 5锛氭弧鍙�  6锛氭弧鏀�
+     */
+    public String getWrkType$() {
+        if (Cools.isEmpty(this.wrkType)) {
+            return "";
+        }
+        switch (this.wrkType) {
+            case 1:
+                return "鍙犵洏";
+            case 2:
+                return "鎷嗙洏";
+            case 3:
+                return "鍙栨斁";
+            case 4:
+                return "琛岃蛋";
+            case 5:
+                return "婊″彇";
+            case 6:
+                return "婊℃斁";
+            default:
+                return "";
+        }
+    }
+
 
 }

--
Gitblit v1.9.1