优化数据表结构同时同步代码

This commit is contained in:
徐晨晨 2021-11-16 20:16:23 +08:00
parent d23e169d9e
commit c626d34010
7 changed files with 100 additions and 65 deletions

View File

@ -1,25 +1,21 @@
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;
/**
* <p>
* 当前任务
* </p>
*
* @author mt
* @since 2021-11-09
* @since 2021-11-16
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ -100,6 +96,12 @@ public class CurrTask extends Model<CurrTask> {
@TableField("task_type")
private Integer taskType;
/**
* 加工类型0 初始加工1 复加工 2 追加加工
*/
@TableField("process_type")
private Integer processType;
/**
* 托盘编码
*/
@ -191,6 +193,8 @@ public class CurrTask extends Model<CurrTask> {
public static final String TASK_TYPE = "task_type";
public static final String PROCESS_TYPE = "process_type";
public static final String PALLET_CODE = "pallet_code";
public static final String A_BEGIN_TIME = "a_begin_time";

View File

@ -1,25 +1,21 @@
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;
/**
* <p>
* 订单历史信息
* 订单任务历史表
* </p>
*
* @author mt
* @since 2021-09-29
* @since 2021-11-16
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ -70,6 +66,12 @@ public class OrderInfoHis extends Model<OrderInfoHis> {
@Version
private String version;
/**
* 来源1.APMS 2.人工输入
*/
@TableField("order_source")
private Integer orderSource;
/**
* 状态 0等待执行1执行中2执行完成3追加后完成追加后就按完成来算
*/
@ -169,6 +171,8 @@ public class OrderInfoHis extends Model<OrderInfoHis> {
public static final String VERSION = "version";
public static final String ORDER_SOURCE = "order_source";
public static final String STATUS = "status";
public static final String INTER_CODE = "inter_code";

View File

@ -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;
/**
* <p>
* 任务明细历史表
@ -92,7 +88,7 @@ public class TaskDetHis extends Model<TaskDetHis> {
* 历史任务id关联当前任务表t_task_his
*/
@TableField("task_id")
private Integer taskId;
private Long taskId;
/**
* 订单号

View File

@ -1,25 +1,21 @@
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;
/**
* <p>
* 任务历史表
* 任务历史
* </p>
*
* @author mt
* @since 2021-09-29
* @since 2021-11-16
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ -83,11 +79,29 @@ public class TaskHis extends Model<TaskHis> {
private String interCode;
/**
* 任务编码
* 任务编码, 查看任务编码规则
*/
@TableField("task_code")
private String taskCode;
/**
* 任务来源 0人工 扩展字段
*/
@TableField("task_source")
private Integer taskSource;
/**
* 任务类型0:入库到窑炉1:入库到缓存区2:出库到窑炉到缓存区3:缓存区出库
*/
@TableField("task_type")
private Integer taskType;
/**
* 加工类型0 初始加工1 复加工 2 追加加工
*/
@TableField("process_type")
private Integer processType;
/**
* 托盘编码
*/
@ -122,7 +136,7 @@ public class TaskHis extends Model<TaskHis> {
* 窑炉id关联设备窑炉表t_kiln_info
*/
@TableField("kiln_id")
private Integer kilnId;
private Long kilnId;
/**
* 窑炉名称
@ -134,7 +148,7 @@ public class TaskHis extends Model<TaskHis> {
* 车辆id关联车辆表t_vehicle_info
*/
@TableField("vehicle_id")
private Integer vehicleId;
private Long vehicleId;
/**
* 是否缓存如果当前指的窑炉正在加工系统自动分配货物到缓存位置 并且记录缓存库位这是当指定窑炉加工完成后系统先判断是否当前缓存有当前等待执行的任务然后按照先来先执行原则等待多个任务自动调用车辆来执行
@ -146,7 +160,7 @@ public class TaskHis extends Model<TaskHis> {
* 库位id关联库位表t_location
*/
@TableField("location_id")
private Integer locationId;
private Long locationId;
/**
* 库位名称
@ -175,6 +189,12 @@ public class TaskHis extends Model<TaskHis> {
public static final String TASK_CODE = "task_code";
public static final String TASK_SOURCE = "task_source";
public static final String TASK_TYPE = "task_type";
public static final String PROCESS_TYPE = "process_type";
public static final String PALLET_CODE = "pallet_code";
public static final String A_BEGIN_TIME = "a_begin_time";

View File

@ -16,6 +16,7 @@
<result column="task_code" property="taskCode" />
<result column="task_source" property="taskSource" />
<result column="task_type" property="taskType" />
<result column="process_type" property="processType"/>
<result column="pallet_code" property="palletCode" />
<result column="a_begin_time" property="aBeginTime" />
<result column="a_end_time" property="aEndTime" />
@ -31,7 +32,9 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, task_code, task_source, task_type, pallet_code, a_begin_time, a_end_time, start_position, target_position, kiln_id, kiln_name, vehicle_id, is_cache, location_id, location_name
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, task_code,
task_source, task_type, process_type, pallet_code, a_begin_time, a_end_time, start_position, target_position,
kiln_id, kiln_name, vehicle_id, is_cache, location_id, location_name
</sql>
</mapper>

View File

@ -11,6 +11,7 @@
<result column="updater_id" property="updaterId" />
<result column="update_time" property="updateTime" />
<result column="version" property="version" />
<result column="order_source" property="orderSource"/>
<result column="status" property="status" />
<result column="inter_code" property="interCode" />
<result column="code" property="code" />
@ -29,7 +30,9 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, code, order_no, iden_card_num, customer_no, customer_name, product_name, product_model, material_des, craft_ill, unit, weight, quantity
id, valid, create_time, creator_id, updater_id, update_time, version, order_source, status, inter_code, code,
order_no, iden_card_num, customer_no, customer_name, product_name, product_model, material_des, craft_ill, unit,
weight, quantity
</sql>
</mapper>

View File

@ -4,32 +4,37 @@
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.TaskHis">
<id column="id" property="id" />
<result column="valid" property="valid" />
<result column="create_time" property="createTime" />
<result column="creator_id" property="creatorId" />
<result column="updater_id" property="updaterId" />
<result column="update_time" property="updateTime" />
<result column="version" property="version" />
<result column="status" property="status" />
<result column="inter_code" property="interCode" />
<result column="task_code" property="taskCode" />
<result column="pallet_code" property="palletCode" />
<result column="a_begin_time" property="aBeginTime" />
<result column="a_end_time" property="aEndTime" />
<result column="start_position" property="startPosition" />
<result column="target_position" property="targetPosition" />
<result column="kiln_id" property="kilnId" />
<result column="kiln_name" property="kilnName" />
<result column="vehicle_id" property="vehicleId" />
<result column="is_cache" property="isCache" />
<result column="location_id" property="locationId" />
<id column="id" property="id"/>
<result column="valid" property="valid"/>
<result column="create_time" property="createTime"/>
<result column="creator_id" property="creatorId"/>
<result column="updater_id" property="updaterId"/>
<result column="update_time" property="updateTime"/>
<result column="version" property="version"/>
<result column="status" property="status"/>
<result column="inter_code" property="interCode"/>
<result column="task_code" property="taskCode"/>
<result column="task_source" property="taskSource"/>
<result column="task_type" property="taskType"/>
<result column="process_type" property="processType"/>
<result column="pallet_code" property="palletCode"/>
<result column="a_begin_time" property="aBeginTime"/>
<result column="a_end_time" property="aEndTime"/>
<result column="start_position" property="startPosition"/>
<result column="target_position" property="targetPosition"/>
<result column="kiln_id" property="kilnId"/>
<result column="kiln_name" property="kilnName"/>
<result column="vehicle_id" property="vehicleId"/>
<result column="is_cache" property="isCache"/>
<result column="location_id" property="locationId"/>
<result column="location_name" property="locationName" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, task_code, pallet_code, a_begin_time, a_end_time, start_position, target_position, kiln_id, kiln_name, vehicle_id, is_cache, location_id, location_name
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, task_code,
task_source, task_type, process_type, pallet_code, a_begin_time, a_end_time, start_position, target_position,
kiln_id, kiln_name, vehicle_id, is_cache, location_id, location_name
</sql>
</mapper>