diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/TaskHis.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/TaskHis.java
index 654f46c..89fa791 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/TaskHis.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/TaskHis.java
@@ -1,21 +1,25 @@
package com.mt.wms.core.dal.entity;
-import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.Version;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
-import java.io.Serializable;
-import java.time.LocalDateTime;
-
/**
*
* 任务历史表
*
*
* @author mt
- * @since 2021-12-14
+ * @since 2022-08-01
*/
@Data
@EqualsAndHashCode(callSuper = false)
@@ -91,13 +95,13 @@ public class TaskHis extends Model {
private Long autoExeTaskId;
/**
- * 工业炉id,关联设备工业炉表:t_kiln_info
+ * 窑炉id,关联设备窑炉表:t_kiln_info
*/
@TableField("kiln_id")
private Long kilnId;
/**
- * 工业炉名称
+ * 窑炉名称
*/
@TableField("kiln_name")
private String kilnName;
@@ -145,13 +149,13 @@ public class TaskHis extends Model {
private String startPosition;
/**
- * 目标位置指的是工业炉的位置
+ * 目标位置指的是窑炉的位置
*/
@TableField("target_position")
private String targetPosition;
/**
- * 是否缓存,如果当前指的工业炉正在加工,系统自动分配货物到缓存位置, 并且记录缓存库位,这是当指定工业炉加工完成后系统先判断是否当前缓存有当前等待执行的任务,然后按照先来先执行原则(等待多个任务)自动调用车辆来执行
+ * 是否缓存,如果当前指的窑炉正在加工,系统自动分配货物到缓存位置, 并且记录缓存库位,这是当指定窑炉加工完成后系统先判断是否当前缓存有当前等待执行的任务,然后按照先来先执行原则(等待多个任务)自动调用车辆来执行
*/
@TableField("is_cache")
private Integer isCache;
@@ -217,7 +221,7 @@ public class TaskHis extends Model {
private Integer processType;
/**
- * 任务类型:0:入库到工业炉,1:入库到缓存区,2出库到 工业炉到缓存区,3缓存区出库
+ * 任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库
*/
@TableField("task_type")
private Integer taskType;
@@ -228,6 +232,11 @@ public class TaskHis extends Model {
@TableField("sheet_no")
private String sheetNo;
+ /**
+ * 生产单号 APMS生成生产单后返回
+ */
+ @TableField("task_id")
+ private Long taskId;
public static final String ID = "id";
@@ -297,6 +306,8 @@ public class TaskHis extends Model {
public static final String SHEET_NO = "sheet_no";
+ public static final String TASK_ID = "task_id";
+
@Override
protected Serializable pkVal() {
return this.id;
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/TaskHisMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/TaskHisMapper.java
index dad2cd9..aaf9442 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/TaskHisMapper.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/TaskHisMapper.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*
*
* @author mt
- * @since 2021-12-14
+ * @since 2022-08-01
*/
public interface TaskHisMapper extends BaseMapper {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/TaskHisMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/TaskHisMapper.xml
index 98e23dc..ae3aa3f 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/TaskHisMapper.xml
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/TaskHisMapper.xml
@@ -25,27 +25,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, is_auto,
- auto_exe_task_id, kiln_id, kiln_name, craft_code_id, plc_value, begin_time, end_time, is_in, run_task_id,
- start_position, target_position, is_cache, cache_satatus, cache_run_task_id, location_id, location_name, is_out,
- out_run_task_id, out_start_position, out_target_position, task_code, process_type, task_type, sheet_no
+ id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, is_auto, auto_exe_task_id, kiln_id, kiln_name, craft_code_id, plc_value, begin_time, end_time, is_in, run_task_id, start_position, target_position, is_cache, cache_satatus, cache_run_task_id, location_id, location_name, is_out, out_run_task_id, out_start_position, out_target_position, task_code, process_type, task_type, sheet_no, task_id
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/TaskHisServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/TaskHisServiceBiz.java
index 2373a85..71445e9 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/TaskHisServiceBiz.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/TaskHisServiceBiz.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
*
*
* @author mt
- * @since 2021-12-14
+ * @since 2022-08-01
*/
public interface TaskHisServiceBiz extends IService {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/TaskHisServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/TaskHisServiceBizImpl.java
index ab56181..c17e04f 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/TaskHisServiceBizImpl.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/TaskHisServiceBizImpl.java
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
*
*
* @author mt
- * @since 2021-12-14
+ * @since 2022-08-01
*/
@Service
public class TaskHisServiceBizImpl extends ServiceImpl implements TaskHisServiceBiz {
diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java
index 46b5a96..90300fa 100644
--- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java
+++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java
@@ -78,6 +78,8 @@ public class ScheduledTask extends BaseService {
private AutoExeTaskServiceBiz autoExeTaskServiceBiz;
@Resource
private TaskHisServiceBiz taskHisServiceBiz;
+ @Resource
+ private TaskDetHisServiceBiz taskDetHisServiceBiz;
//@Scheduled(fixedDelay = 1000*20)
@Test
@@ -236,7 +238,11 @@ public class ScheduledTask extends BaseService {
org.springframework.beans.BeanUtils.copyProperties(currTask,taskHis);
taskHis.setStatus(2);
taskHis.setIsIn(2);
+ taskHis.setTaskId(currTask.getId());
taskHisServiceBiz.save(taskHis);
+ List currTaskDets = currTaskDetServiceBiz.list(new QueryWrapper().eq(CurrTaskDet.CURR_TASK_ID, currTask.getId()));
+ List taskDetHisList = BeanUtils.copyList(currTaskDets, TaskDetHis.class);
+ taskDetHisServiceBiz.saveBatch(taskDetHisList);
//加工结束而没有立马出炉,加工结束记录能源消耗值只记录一次
asynRunTaskService.asynEndRecordConsume(currTask.getId(),kilnId);
logger.info(kilnInfo.getCode()+"炉子中的任务:"+currTask.getId()+"已加工结束,记录加工结束能源消耗值");