From c3434b1fe0132372b34ff0a46d84e6129a094bfc Mon Sep 17 00:00:00 2001
From: L <L@132>
Date: 星期四, 28 八月 2025 08:43:15 +0800
Subject: [PATCH] *
---
src/main/java/com/zy/asrs/entity/BasErrLog.java | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 49 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/zy/asrs/entity/BasErrLog.java b/src/main/java/com/zy/asrs/entity/BasErrLog.java
index e0c2d43..3bb2ac0 100644
--- a/src/main/java/com/zy/asrs/entity/BasErrLog.java
+++ b/src/main/java/com/zy/asrs/entity/BasErrLog.java
@@ -6,6 +6,9 @@
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
+import com.zy.asrs.service.BasWrkIotypeService;
+import com.zy.asrs.service.BasWrkStatusService;
+import com.zy.core.model.command.CrnCommand;
import com.zy.system.entity.User;
import com.zy.system.service.UserService;
import io.swagger.annotations.ApiModelProperty;
@@ -175,7 +178,8 @@
public BasErrLog() {}
- public BasErrLog(String uuid,Integer wrkNo,Date startTime,Date endTime,Long wrkSts,Integer ioType,Integer crnNo,Integer plcNo,String locNo,Integer staNo,Integer sourceStaNo,String sourceLocNo,String barcode,Integer errCode,String error,Integer status,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo) {
+ public BasErrLog(String uuid,Integer wrkNo,Date startTime,Date endTime,Long wrkSts,Integer ioType,Integer crnNo,Integer plcNo,
+ String locNo,Integer staNo,Integer sourceStaNo,String sourceLocNo,String barcode,Integer errCode,String error,Integer status,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo) {
this.uuid = uuid;
this.wrkNo = wrkNo;
this.startTime = startTime;
@@ -196,6 +200,32 @@
this.createBy = createBy;
this.updateTime = updateTime;
this.updateBy = updateBy;
+ this.memo = memo;
+ }
+
+
+ public BasErrLog(CrnCommand command,String error,String memo) {
+ Date now = new Date();
+ this.uuid = now.toString();
+ this.wrkNo = command.getTaskNo().intValue();
+ this.startTime = now;
+ this.endTime = now;
+ this.wrkSts = 0L;
+ this.ioType = 0;
+ this.crnNo = command.getLaneNo();
+ this.plcNo = command.getCrnNo();
+ this.locNo = command.getSourcePosX()+"鎺�"+command.getSourcePosY()+"鍒�"+command.getSourcePosZ()+"灞�";
+ this.staNo = 0;
+ this.sourceStaNo = 0;
+ this.sourceLocNo = command.getDestinationPosX()+"鎺�"+command.getDestinationPosY()+"鍒�"+command.getDestinationPosY()+"灞�";
+ this.barcode = "";
+ this.errCode = 0;
+ this.error = error;
+ this.status = 0;
+ this.createTime = now;
+ this.createBy = null;
+ this.updateTime = now;
+ this.updateBy = null;
this.memo = memo;
}
@@ -285,6 +315,15 @@
this.wrkSts = wrkSts;
}
+ public String getWrkSts$(){
+ BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class);
+ BasWrkStatus basWrkStatus = service.selectById(this.wrkSts);
+ if (!Cools.isEmpty(basWrkStatus)){
+ return String.valueOf(basWrkStatus.getWrkDesc());
+ }
+ return null;
+ }
+
public Integer getIoType() {
return ioType;
}
@@ -293,6 +332,15 @@
this.ioType = ioType;
}
+ public String getIoType$(){
+ BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class);
+ BasWrkIotype basWrkIotype = service.selectById(this.ioType);
+ if (!Cools.isEmpty(basWrkIotype)){
+ return String.valueOf(basWrkIotype.getIoDesc());
+ }
+ return null;
+ }
+
public Integer getCrnNo() {
return crnNo;
}
--
Gitblit v1.9.1