diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/MyGenerator.java b/6.program/wms-core/src/main/java/com/mt/wms/core/MyGenerator.java index 501f9cc..6d98915 100644 --- a/6.program/wms-core/src/main/java/com/mt/wms/core/MyGenerator.java +++ b/6.program/wms-core/src/main/java/com/mt/wms/core/MyGenerator.java @@ -106,7 +106,8 @@ public class MyGenerator { @Test public void generateCodeWithInjectConfigForAllTable() { - generateByTablesWithInjectConfig(new String[]{"t_in_stock_info"}); + generateByTablesWithInjectConfig(new String[]{"t_curr_task"}); + generateByTablesWithInjectConfig(new String[]{"t_task_his"}); } public static void main(String[] args) { diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/CurrTask.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/CurrTask.java index 8157b1b..ab017ae 100644 --- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/CurrTask.java +++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/CurrTask.java @@ -1,18 +1,14 @@ package com.mt.wms.core.dal.entity; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.*; 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; + /** *

* 任务表 @@ -214,6 +210,24 @@ public class CurrTask extends Model { @TableField("task_code") private String taskCode; + /** + * 生产单号 APMS生成生产单后返回 + */ + @TableField("sheet_no") + private String sheetNo; + + /** + * 任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库 + */ + @TableField("task_type") + private Integer taskType; + + /** + * 加工类型:0 初始加工,1 复加工 + */ + @TableField("process_type") + private Integer processType; + public static final String ID = "id"; @@ -277,6 +291,12 @@ public class CurrTask extends Model { public static final String TASK_CODE = "task_code"; + public static final String SHEET_NO = "sheet_no"; + + public static final String TASK_TYPE = "task_type"; + + public static final String PROCESS_TYPE = "process_type"; + @Override protected Serializable pkVal() { return this.id; 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 c5cb177..237d36c 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,18 +1,14 @@ package com.mt.wms.core.dal.entity; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.*; 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; + /** *

* 任务历史表 @@ -214,6 +210,24 @@ public class TaskHis extends Model { @TableField("task_code") private String taskCode; + /** + * 加工类型:0 初始加工,1 复加工 + */ + @TableField("process_type") + private Integer processType; + + /** + * 任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库 + */ + @TableField("task_type") + private Integer taskType; + + /** + * 生产单号 APMS生成生产单后返回 + */ + @TableField("sheet_no") + private String sheetNo; + public static final String ID = "id"; @@ -277,6 +291,12 @@ public class TaskHis extends Model { public static final String TASK_CODE = "task_code"; + public static final String PROCESS_TYPE = "process_type"; + + public static final String TASK_TYPE = "task_type"; + + public static final String SHEET_NO = "sheet_no"; + @Override protected Serializable pkVal() { return this.id; diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/CurrTaskMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/CurrTaskMapper.xml index 0e9101f..829f7c9 100644 --- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/CurrTaskMapper.xml +++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/CurrTaskMapper.xml @@ -25,21 +25,27 @@ - - - - - - - - - - + + + + + + + + + + + + + - 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 + 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, sheet_no, task_type, process_type 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 c934272..98e23dc 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,21 +25,27 @@ - - - - - - - - - - + + + + + + + + + + + + + - 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 + 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 diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskServiceImpl.java index b7188dd..189f789 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskServiceImpl.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskServiceImpl.java @@ -26,7 +26,6 @@ import com.mt.wms.empty.vo.ApmsEndProcessVo; import com.mt.wms.empty.vo.CurrTaskMainQueryVo; import com.mt.wms.empty.vo.CurrTaskQueryVo; import com.mt.wms.empty.vo.CurrTaskVo; -import org.apache.commons.lang.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -90,11 +89,10 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService CurrTask currTask = new CurrTask(); BeanUtils.copyProperties(param, currTask); currTask.setTaskType(TaskTypeEnum.WTK.getValue()); - currTask.setTaskSource(0); //根据工艺号查询工艺id以及工艺plc值 CraftInfo one = craftInfoServiceBiz.getOne(new QueryWrapper().eq(CraftInfo.CREATOR_ID, param.getCraftCode())); - currTask.setFCraftCodeId(one.getId()); - currTask.setFPlcValue(one.getPlcValue()); + currTask.setCraftCodeId(one.getId()); + currTask.setPlcValue(one.getPlcValue()); currTask.setInterCode(IDGenerator.gen("RW", IDGenerator.PATTERN_YYYYMMDDHHMM, 2, "TASK_CODE")); setCommonField(currTask); currTaskServiceBiz.save(currTask); @@ -104,7 +102,6 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService @Override public R> currentTaskPage(CurrTaskQueryParam param) { QueryWrapper currTaskQueryWrapper = new QueryWrapper<>(); - currTaskQueryWrapper.eq(StringUtils.isNotBlank(param.getVehicleId()), CurrTask.VEHICLE_ID, param.getVehicleId()); currTaskQueryWrapper.eq(CurrTask.VALID, 1); Page page = currTaskServiceBiz.page(new Page<>(param.getCurrent(), param.getSize()), currTaskQueryWrapper); return successful(new PageVo<>(page, CurrTaskQueryVo.class)); diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskHisServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskHisServiceImpl.java index 86643bd..515c41d 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskHisServiceImpl.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskHisServiceImpl.java @@ -13,7 +13,6 @@ import com.mt.wms.empty.params.TaskHisQueryParam; import com.mt.wms.empty.service.TaskHisService; import com.mt.wms.empty.vo.CurrTaskVo; import com.mt.wms.empty.vo.TaskHisQueryVo; -import jodd.util.StringUtil; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -53,8 +52,7 @@ public class TaskHisServiceImpl extends BaseService implements TaskHisService { @Override public R> taskHisPage(TaskHisQueryParam param) { QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq(StringUtil.isNotBlank(param.getVehicleId()), TaskHis.VEHICLE_ID, param.getVehicleId()) - .between(Objects.nonNull(param.getStartTime()) && Objects.nonNull(param.getEndTime()), TaskHis.CREATE_TIME, param.getStartTime(), param.getEndTime()) + queryWrapper.between(Objects.nonNull(param.getStartTime()) && Objects.nonNull(param.getEndTime()), TaskHis.CREATE_TIME, param.getStartTime(), param.getEndTime()) .eq(TaskHis.VALID, 1).orderByDesc(TaskHis.CREATE_TIME); Page page = taskHisService.page(new Page<>(param.getCurrent(), param.getSize()), queryWrapper); return successful(new PageVo<>(page, TaskHisQueryVo.class));