Merge branch 'master' of http://git.picaiba.com/mt-ck/mt-qj-wms-hd
This commit is contained in:
commit
71687b6bcd
@ -0,0 +1,137 @@
|
|||||||
|
package com.mt.wms.core.dal.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 设备工艺信息
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author mt
|
||||||
|
* @since 2021-12-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("t_craft_info")
|
||||||
|
public class CraftInfo extends Model<CraftInfo> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志,是否有效:1 可用 0不可用,2停止
|
||||||
|
*/
|
||||||
|
@TableField("valid")
|
||||||
|
@TableLogic
|
||||||
|
private Integer valid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加时间,入库时间
|
||||||
|
*/
|
||||||
|
@TableField("create_time")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
@TableField("creator_id")
|
||||||
|
private Integer creatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人id
|
||||||
|
*/
|
||||||
|
@TableField("updater_id")
|
||||||
|
private Integer updaterId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同
|
||||||
|
*/
|
||||||
|
@TableField("update_time")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本号 默认为 1
|
||||||
|
*/
|
||||||
|
@TableField("version")
|
||||||
|
@Version
|
||||||
|
private String version;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态,0:可用,1:不可用
|
||||||
|
*/
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内部编码,系统自动生成
|
||||||
|
*/
|
||||||
|
@TableField("inter_code")
|
||||||
|
private String interCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺号
|
||||||
|
*/
|
||||||
|
@TableField("craft_code")
|
||||||
|
private String craftCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
@TableField("code")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对应PLC值
|
||||||
|
*/
|
||||||
|
@TableField("plc_value")
|
||||||
|
private Integer plcValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 说明
|
||||||
|
*/
|
||||||
|
@TableField("content")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
|
||||||
|
public static final String ID = "id";
|
||||||
|
|
||||||
|
public static final String VALID = "valid";
|
||||||
|
|
||||||
|
public static final String CREATE_TIME = "create_time";
|
||||||
|
|
||||||
|
public static final String CREATOR_ID = "creator_id";
|
||||||
|
|
||||||
|
public static final String UPDATER_ID = "updater_id";
|
||||||
|
|
||||||
|
public static final String UPDATE_TIME = "update_time";
|
||||||
|
|
||||||
|
public static final String VERSION = "version";
|
||||||
|
|
||||||
|
public static final String STATUS = "status";
|
||||||
|
|
||||||
|
public static final String INTER_CODE = "inter_code";
|
||||||
|
|
||||||
|
public static final String CRAFT_CODE = "craft_code";
|
||||||
|
|
||||||
|
public static final String CODE = "code";
|
||||||
|
|
||||||
|
public static final String PLC_VALUE = "plc_value";
|
||||||
|
|
||||||
|
public static final String CONTENT = "content";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Serializable pkVal() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,25 +1,21 @@
|
|||||||
package com.mt.wms.core.dal.entity;
|
package com.mt.wms.core.dal.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
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.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 当前任务
|
* 当前任务
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author mt
|
* @author mt
|
||||||
* @since 2021-11-18
|
* @since 2021-12-09
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ -88,6 +84,12 @@ public class CurrTask extends Model<CurrTask> {
|
|||||||
@TableField("task_code")
|
@TableField("task_code")
|
||||||
private String taskCode;
|
private String taskCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产单号 APMS生成生产单后返回
|
||||||
|
*/
|
||||||
|
@TableField("sheet_no")
|
||||||
|
private String sheetNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务来源 0:人工 扩展字段
|
* 任务来源 0:人工 扩展字段
|
||||||
*/
|
*/
|
||||||
@ -172,6 +174,18 @@ public class CurrTask extends Model<CurrTask> {
|
|||||||
@TableField("location_name")
|
@TableField("location_name")
|
||||||
private String locationName;
|
private String locationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺号ID,关联工艺号表:t_craft_info
|
||||||
|
*/
|
||||||
|
@TableField("f_craft_code_id")
|
||||||
|
private Long fCraftCodeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺号对应PLC值
|
||||||
|
*/
|
||||||
|
@TableField("f_plc_value")
|
||||||
|
private Integer fPlcValue;
|
||||||
|
|
||||||
|
|
||||||
public static final String ID = "id";
|
public static final String ID = "id";
|
||||||
|
|
||||||
@ -193,6 +207,8 @@ public class CurrTask extends Model<CurrTask> {
|
|||||||
|
|
||||||
public static final String TASK_CODE = "task_code";
|
public static final String TASK_CODE = "task_code";
|
||||||
|
|
||||||
|
public static final String SHEET_NO = "sheet_no";
|
||||||
|
|
||||||
public static final String TASK_SOURCE = "task_source";
|
public static final String TASK_SOURCE = "task_source";
|
||||||
|
|
||||||
public static final String TASK_TYPE = "task_type";
|
public static final String TASK_TYPE = "task_type";
|
||||||
@ -221,6 +237,10 @@ public class CurrTask extends Model<CurrTask> {
|
|||||||
|
|
||||||
public static final String LOCATION_NAME = "location_name";
|
public static final String LOCATION_NAME = "location_name";
|
||||||
|
|
||||||
|
public static final String F_CRAFT_CODE_ID = "f_craft_code_id";
|
||||||
|
|
||||||
|
public static final String F_PLC_VALUE = "f_plc_value";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Serializable pkVal() {
|
protected Serializable pkVal() {
|
||||||
return this.id;
|
return this.id;
|
||||||
|
@ -1,25 +1,21 @@
|
|||||||
package com.mt.wms.core.dal.entity;
|
package com.mt.wms.core.dal.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
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.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 订单任务表
|
* 订单任务表
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author mt
|
* @author mt
|
||||||
* @since 2021-11-18
|
* @since 2021-12-09
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ -100,6 +96,12 @@ public class OrderInfo extends Model<OrderInfo> {
|
|||||||
@TableField("order_no")
|
@TableField("order_no")
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原订单号,APMS系统获取 返单时才存在
|
||||||
|
*/
|
||||||
|
@TableField("old_order_no")
|
||||||
|
private String oldOrderNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标识卡号,APMS系统获取
|
* 标识卡号,APMS系统获取
|
||||||
*/
|
*/
|
||||||
@ -209,6 +211,8 @@ public class OrderInfo extends Model<OrderInfo> {
|
|||||||
|
|
||||||
public static final String ORDER_NO = "order_no";
|
public static final String ORDER_NO = "order_no";
|
||||||
|
|
||||||
|
public static final String OLD_ORDER_NO = "old_order_no";
|
||||||
|
|
||||||
public static final String IDEN_CARD_NUM = "iden_card_num";
|
public static final String IDEN_CARD_NUM = "iden_card_num";
|
||||||
|
|
||||||
public static final String CUSTOMER_NO = "customer_no";
|
public static final String CUSTOMER_NO = "customer_no";
|
||||||
|
@ -1,25 +1,21 @@
|
|||||||
package com.mt.wms.core.dal.entity;
|
package com.mt.wms.core.dal.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
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.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 订单任务历史表
|
* 订单任务历史表
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author mt
|
* @author mt
|
||||||
* @since 2021-11-18
|
* @since 2021-12-09
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ -100,6 +96,12 @@ public class OrderInfoHis extends Model<OrderInfoHis> {
|
|||||||
@TableField("order_no")
|
@TableField("order_no")
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原订单号,APMS系统获取,返工单才存在
|
||||||
|
*/
|
||||||
|
@TableField("old_order_no")
|
||||||
|
private String oldOrderNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标识卡号,APMS系统获取
|
* 标识卡号,APMS系统获取
|
||||||
*/
|
*/
|
||||||
@ -185,6 +187,8 @@ public class OrderInfoHis extends Model<OrderInfoHis> {
|
|||||||
|
|
||||||
public static final String ORDER_NO = "order_no";
|
public static final String ORDER_NO = "order_no";
|
||||||
|
|
||||||
|
public static final String OLD_ORDER_NO = "old_order_no";
|
||||||
|
|
||||||
public static final String IDEN_CARD_NUM = "iden_card_num";
|
public static final String IDEN_CARD_NUM = "iden_card_num";
|
||||||
|
|
||||||
public static final String CUSTOMER_NO = "customer_no";
|
public static final String CUSTOMER_NO = "customer_no";
|
||||||
|
@ -1,25 +1,21 @@
|
|||||||
package com.mt.wms.core.dal.entity;
|
package com.mt.wms.core.dal.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
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.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 任务历史
|
* 任务历史
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author mt
|
* @author mt
|
||||||
* @since 2021-11-18
|
* @since 2021-12-09
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ -88,6 +84,12 @@ public class TaskHis extends Model<TaskHis> {
|
|||||||
@TableField("task_code")
|
@TableField("task_code")
|
||||||
private String taskCode;
|
private String taskCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产单号 APMS生成生产单后返回
|
||||||
|
*/
|
||||||
|
@TableField("sheet_no")
|
||||||
|
private String sheetNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务来源 0:人工 扩展字段
|
* 任务来源 0:人工 扩展字段
|
||||||
*/
|
*/
|
||||||
@ -172,6 +174,18 @@ public class TaskHis extends Model<TaskHis> {
|
|||||||
@TableField("location_name")
|
@TableField("location_name")
|
||||||
private String locationName;
|
private String locationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺号ID,关联工艺号表:t_craft_info
|
||||||
|
*/
|
||||||
|
@TableField("f_craft_code_id")
|
||||||
|
private Long fCraftCodeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺号对应PLC值
|
||||||
|
*/
|
||||||
|
@TableField("f_plc_value")
|
||||||
|
private Integer fPlcValue;
|
||||||
|
|
||||||
|
|
||||||
public static final String ID = "id";
|
public static final String ID = "id";
|
||||||
|
|
||||||
@ -193,6 +207,8 @@ public class TaskHis extends Model<TaskHis> {
|
|||||||
|
|
||||||
public static final String TASK_CODE = "task_code";
|
public static final String TASK_CODE = "task_code";
|
||||||
|
|
||||||
|
public static final String SHEET_NO = "sheet_no";
|
||||||
|
|
||||||
public static final String TASK_SOURCE = "task_source";
|
public static final String TASK_SOURCE = "task_source";
|
||||||
|
|
||||||
public static final String TASK_TYPE = "task_type";
|
public static final String TASK_TYPE = "task_type";
|
||||||
@ -221,6 +237,10 @@ public class TaskHis extends Model<TaskHis> {
|
|||||||
|
|
||||||
public static final String LOCATION_NAME = "location_name";
|
public static final String LOCATION_NAME = "location_name";
|
||||||
|
|
||||||
|
public static final String F_CRAFT_CODE_ID = "f_craft_code_id";
|
||||||
|
|
||||||
|
public static final String F_PLC_VALUE = "f_plc_value";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Serializable pkVal() {
|
protected Serializable pkVal() {
|
||||||
return this.id;
|
return this.id;
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.mt.wms.core.dal.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.mt.wms.core.dal.entity.CraftInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 设备工艺信息 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author mt
|
||||||
|
* @since 2021-12-09
|
||||||
|
*/
|
||||||
|
public interface CraftInfoMapper extends BaseMapper<CraftInfo> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.mt.wms.core.dal.mapper.CraftInfoMapper">
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.CraftInfo">
|
||||||
|
<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="craft_code" property="craftCode"/>
|
||||||
|
<result column="code" property="code"/>
|
||||||
|
<result column="plc_value" property="plcValue"/>
|
||||||
|
<result column="content" property="content"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 通用查询结果列 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, craft_code, code,
|
||||||
|
plc_value, content
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -14,25 +14,30 @@
|
|||||||
<result column="status" property="status" />
|
<result column="status" property="status" />
|
||||||
<result column="inter_code" property="interCode" />
|
<result column="inter_code" property="interCode" />
|
||||||
<result column="task_code" property="taskCode" />
|
<result column="task_code" property="taskCode" />
|
||||||
|
<result column="sheet_no" property="sheetNo"/>
|
||||||
<result column="task_source" property="taskSource" />
|
<result column="task_source" property="taskSource" />
|
||||||
<result column="task_type" property="taskType" />
|
<result column="task_type" property="taskType" />
|
||||||
<result column="process_type" property="processType" />
|
<result column="process_type" property="processType" />
|
||||||
<result column="pallet_code" property="palletCode" />
|
<result column="pallet_code" property="palletCode" />
|
||||||
<result column="a_begin_time" property="aBeginTime" />
|
<result column="a_begin_time" property="aBeginTime"/>
|
||||||
<result column="a_end_time" property="aEndTime" />
|
<result column="a_end_time" property="aEndTime"/>
|
||||||
<result column="start_position" property="startPosition" />
|
<result column="start_position" property="startPosition"/>
|
||||||
<result column="target_position" property="targetPosition" />
|
<result column="target_position" property="targetPosition"/>
|
||||||
<result column="kiln_id" property="kilnId" />
|
<result column="kiln_id" property="kilnId"/>
|
||||||
<result column="kiln_name" property="kilnName" />
|
<result column="kiln_name" property="kilnName"/>
|
||||||
<result column="vehicle_id" property="vehicleId" />
|
<result column="vehicle_id" property="vehicleId"/>
|
||||||
<result column="is_cache" property="isCache" />
|
<result column="is_cache" property="isCache"/>
|
||||||
<result column="location_id" property="locationId" />
|
<result column="location_id" property="locationId"/>
|
||||||
<result column="location_name" property="locationName" />
|
<result column="location_name" property="locationName"/>
|
||||||
|
<result column="f_craft_code_id" property="fCraftCodeId"/>
|
||||||
|
<result column="f_plc_value" property="fPlcValue"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<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, 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
|
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, task_code, sheet_no,
|
||||||
|
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, f_craft_code_id, f_plc_value
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
<result column="inter_code" property="interCode" />
|
<result column="inter_code" property="interCode" />
|
||||||
<result column="code" property="code" />
|
<result column="code" property="code" />
|
||||||
<result column="order_no" property="orderNo" />
|
<result column="order_no" property="orderNo" />
|
||||||
|
<result column="old_order_no" property="oldOrderNo"/>
|
||||||
<result column="iden_card_num" property="idenCardNum" />
|
<result column="iden_card_num" property="idenCardNum" />
|
||||||
<result column="customer_no" property="customerNo" />
|
<result column="customer_no" property="customerNo" />
|
||||||
<result column="customer_name" property="customerName" />
|
<result column="customer_name" property="customerName" />
|
||||||
@ -30,7 +31,9 @@
|
|||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
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
|
id, valid, create_time, creator_id, updater_id, update_time, version, order_source, status, inter_code, code,
|
||||||
|
order_no, old_order_no, iden_card_num, customer_no, customer_name, product_name, product_model, material_des,
|
||||||
|
craft_ill, unit, weight, quantity
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
<result column="inter_code" property="interCode" />
|
<result column="inter_code" property="interCode" />
|
||||||
<result column="code" property="code" />
|
<result column="code" property="code" />
|
||||||
<result column="order_no" property="orderNo" />
|
<result column="order_no" property="orderNo" />
|
||||||
|
<result column="old_order_no" property="oldOrderNo"/>
|
||||||
<result column="iden_card_num" property="idenCardNum" />
|
<result column="iden_card_num" property="idenCardNum" />
|
||||||
<result column="customer_no" property="customerNo" />
|
<result column="customer_no" property="customerNo" />
|
||||||
<result column="customer_name" property="customerName" />
|
<result column="customer_name" property="customerName" />
|
||||||
@ -34,7 +35,9 @@
|
|||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
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, add_a, add_b, orther_a, orther_b
|
id, valid, create_time, creator_id, updater_id, update_time, version, order_source, status, inter_code, code,
|
||||||
|
order_no, old_order_no, iden_card_num, customer_no, customer_name, product_name, product_model, material_des,
|
||||||
|
craft_ill, unit, weight, quantity, add_a, add_b, orther_a, orther_b
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -14,25 +14,30 @@
|
|||||||
<result column="status" property="status" />
|
<result column="status" property="status" />
|
||||||
<result column="inter_code" property="interCode" />
|
<result column="inter_code" property="interCode" />
|
||||||
<result column="task_code" property="taskCode" />
|
<result column="task_code" property="taskCode" />
|
||||||
|
<result column="sheet_no" property="sheetNo"/>
|
||||||
<result column="task_source" property="taskSource" />
|
<result column="task_source" property="taskSource" />
|
||||||
<result column="task_type" property="taskType" />
|
<result column="task_type" property="taskType" />
|
||||||
<result column="process_type" property="processType" />
|
<result column="process_type" property="processType" />
|
||||||
<result column="pallet_code" property="palletCode" />
|
<result column="pallet_code" property="palletCode" />
|
||||||
<result column="a_begin_time" property="aBeginTime" />
|
<result column="a_begin_time" property="aBeginTime"/>
|
||||||
<result column="a_end_time" property="aEndTime" />
|
<result column="a_end_time" property="aEndTime"/>
|
||||||
<result column="start_position" property="startPosition" />
|
<result column="start_position" property="startPosition"/>
|
||||||
<result column="target_position" property="targetPosition" />
|
<result column="target_position" property="targetPosition"/>
|
||||||
<result column="kiln_id" property="kilnId" />
|
<result column="kiln_id" property="kilnId"/>
|
||||||
<result column="kiln_name" property="kilnName" />
|
<result column="kiln_name" property="kilnName"/>
|
||||||
<result column="vehicle_id" property="vehicleId" />
|
<result column="vehicle_id" property="vehicleId"/>
|
||||||
<result column="is_cache" property="isCache" />
|
<result column="is_cache" property="isCache"/>
|
||||||
<result column="location_id" property="locationId" />
|
<result column="location_id" property="locationId"/>
|
||||||
<result column="location_name" property="locationName" />
|
<result column="location_name" property="locationName"/>
|
||||||
|
<result column="f_craft_code_id" property="fCraftCodeId"/>
|
||||||
|
<result column="f_plc_value" property="fPlcValue"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<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, 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
|
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, task_code, sheet_no,
|
||||||
|
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, f_craft_code_id, f_plc_value
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.mt.wms.core.dal.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.mt.wms.core.dal.entity.CraftInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 设备工艺信息 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author mt
|
||||||
|
* @since 2021-12-09
|
||||||
|
*/
|
||||||
|
public interface CraftInfoServiceBiz extends IService<CraftInfo> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.mt.wms.core.dal.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.mt.wms.core.dal.entity.CraftInfo;
|
||||||
|
import com.mt.wms.core.dal.mapper.CraftInfoMapper;
|
||||||
|
import com.mt.wms.core.dal.service.CraftInfoServiceBiz;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 设备工艺信息 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author mt
|
||||||
|
* @since 2021-12-09
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CraftInfoServiceBizImpl extends ServiceImpl<CraftInfoMapper, CraftInfo> implements CraftInfoServiceBiz {
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package com.mt.wms.empty.controller;
|
package com.mt.wms.empty.controller;
|
||||||
|
|
||||||
|
import cn.hutool.http.ContentType;
|
||||||
import cn.hutool.http.HttpResponse;
|
import cn.hutool.http.HttpResponse;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
import cn.hutool.json.JSON;
|
import cn.hutool.json.JSON;
|
||||||
@ -8,9 +9,14 @@ import com.mt.wms.core.base.BaseController;
|
|||||||
import com.mt.wms.core.constants.CommonConstant;
|
import com.mt.wms.core.constants.CommonConstant;
|
||||||
import com.mt.wms.core.dal.entity.CommunicationLog;
|
import com.mt.wms.core.dal.entity.CommunicationLog;
|
||||||
import com.mt.wms.core.dal.service.CommunicationLogServiceBiz;
|
import com.mt.wms.core.dal.service.CommunicationLogServiceBiz;
|
||||||
|
import com.mt.wms.core.enums.WhetherEnum;
|
||||||
import com.mt.wms.core.vo.R;
|
import com.mt.wms.core.vo.R;
|
||||||
import com.mt.wms.empty.params.*;
|
import com.mt.wms.empty.params.*;
|
||||||
import com.mt.wms.empty.service.OrderInfoService;
|
import com.mt.wms.empty.service.OrderInfoService;
|
||||||
|
import com.mt.wms.empty.vo.ApmsCreateProcessSheetVo;
|
||||||
|
import com.mt.wms.empty.vo.ApmsEndProcessVo;
|
||||||
|
import com.mt.wms.empty.vo.ApmsFinishProcessSheetVo;
|
||||||
|
import com.mt.wms.empty.vo.ApmsStoveVo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -21,6 +27,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -39,27 +47,31 @@ public class ApmsController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private CommunicationLogServiceBiz communicationLogServiceBiz;
|
private CommunicationLogServiceBiz communicationLogServiceBiz;
|
||||||
|
|
||||||
|
// static String Token = "eyJhbGciOiJIUzI1NiJ9.eyJkYXRlIjozMTkyNzU4NDk4ODA3LCJwbGF0Rm9ybUlkIjoyLCJhcGlLZXkiOiI3ZWU4ZjU5YmJhZWFlMjdlIiwiZXhwIjozMTkyNzU4NDk4LCJpYXQiOjE2Mzc1NTg0OTh9.RH3MRQr1dCBYW996-WXN69eXu1ZFblAQHfhZHNbTmCg";
|
||||||
static String Token = "";
|
static String Token = "";
|
||||||
|
static LocalDateTime TokenExpireTime = LocalDateTime.now();
|
||||||
static String ApiAddress = "http://59.110.171.25:9010";
|
static String ApiAddress = "http://59.110.171.25:9010";
|
||||||
|
|
||||||
@PostMapping(value = "apmsPostOrder")
|
@PostMapping(value = "apmsPostOrder")
|
||||||
@ApiOperation(value = "接收APMS推送订单信息")
|
@ApiOperation(value = "接收APMS推送订单信息")
|
||||||
public R apmsPostOrder(@Validated @RequestBody OrderParamForApms apmsPostOrderParam) {
|
public R<String> apmsPostOrder(@Validated @RequestBody OrderParamForApms apmsPostOrderParam) {
|
||||||
CommunicationLog communicationLog = new CommunicationLog();
|
CommunicationLog communicationLog = new CommunicationLog();
|
||||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||||
communicationLog.setLogName("Wms接收Apms订单");
|
communicationLog.setLogName("WMS接收APMS订单");
|
||||||
communicationLog.setContent(apmsPostOrderParam.toString());
|
communicationLog.setContent(apmsPostOrderParam.toString());
|
||||||
|
communicationLog.setType(3);
|
||||||
setCommonField(communicationLog);
|
setCommonField(communicationLog);
|
||||||
communicationLogServiceBiz.save(communicationLog);
|
communicationLogServiceBiz.save(communicationLog);
|
||||||
return orderInfoService.apmsPostOrder(apmsPostOrderParam);
|
return orderInfoService.apmsPostOrder(apmsPostOrderParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "apmsVoidOrder")
|
@PostMapping(value = "apmsVoidOrder")
|
||||||
@ApiOperation(value = "APMS作废订单")
|
@ApiOperation(value = "APMS通知WMS作废订单")
|
||||||
public R apmsVoidOrder(@Validated @RequestBody String idenCardNum) {
|
public R<String> apmsVoidOrder(@Validated @RequestBody String idenCardNum) {
|
||||||
CommunicationLog communicationLog = new CommunicationLog();
|
CommunicationLog communicationLog = new CommunicationLog();
|
||||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||||
communicationLog.setLogName("APMS作废订单");
|
communicationLog.setLogName("APMS通知WMS作废订单");
|
||||||
|
communicationLog.setType(3);
|
||||||
communicationLog.setContent(idenCardNum);
|
communicationLog.setContent(idenCardNum);
|
||||||
setCommonField(communicationLog);
|
setCommonField(communicationLog);
|
||||||
communicationLogServiceBiz.save(communicationLog);
|
communicationLogServiceBiz.save(communicationLog);
|
||||||
@ -67,99 +79,129 @@ public class ApmsController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "apmsCompleteOrder")
|
@PostMapping(value = "apmsCompleteOrder")
|
||||||
@ApiOperation(value = "APMS完成订单")
|
@ApiOperation(value = "APMS完成订单,返回加工单检验结果")
|
||||||
public R apmsCompleteOrder(@Validated @RequestBody ApmsCompleteOrder apmsCompleteOrder) {
|
public R<String> apmsCompleteOrder(@Validated @RequestBody ApmsCompleteOrder apmsCompleteOrder) {
|
||||||
CommunicationLog communicationLog = new CommunicationLog();
|
CommunicationLog communicationLog = new CommunicationLog();
|
||||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||||
communicationLog.setLogName("APMS完成订单");
|
communicationLog.setLogName("APMS完成订单,返回WMS加工单检验结果");
|
||||||
|
communicationLog.setType(3);
|
||||||
communicationLog.setContent(apmsCompleteOrder.toString());
|
communicationLog.setContent(apmsCompleteOrder.toString());
|
||||||
setCommonField(communicationLog);
|
setCommonField(communicationLog);
|
||||||
communicationLogServiceBiz.save(communicationLog);
|
communicationLogServiceBiz.save(communicationLog);
|
||||||
|
//APMS完成订单,返回检验结果,更新结果和后续处理
|
||||||
return orderInfoService.apmsCompleteOrder(apmsCompleteOrder);
|
return orderInfoService.apmsCompleteOrder(apmsCompleteOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "createProcessSheet")
|
|
||||||
@ApiOperation(value = "APMS创建生产单接口")
|
/**
|
||||||
public R createProcessSheet(@Validated @RequestBody ApmsCreateProcessSheet apmsCreateProcess) {
|
* 通过生产单编号删除生产单,如果生产单加工完成,不允许删除
|
||||||
|
*
|
||||||
|
* @param sheetNo 生产单编号
|
||||||
|
* @return 删除结果
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "deleteBySheetNo")
|
||||||
|
@ApiOperation(value = "通知APMS删除生产单")
|
||||||
|
public R<ApmsEndProcessVo> deleteBySheetNo(@Validated @RequestBody String sheetNo) {
|
||||||
checkToken();
|
checkToken();
|
||||||
HashMap<String, Object> paramMap = new HashMap<>();
|
HashMap<String, Object> paramMap = new HashMap<>();
|
||||||
paramMap.put("entity", apmsCreateProcess);
|
paramMap.put("sheetNo", sheetNo);
|
||||||
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/createProcessSheet")
|
HttpResponse response = HttpUtil.createGet(ApiAddress + "/platform/api/deleteBySheetNo")
|
||||||
.header("token", Token).form(paramMap).execute();
|
.header("token", Token).form(paramMap).execute();
|
||||||
CommunicationLog communicationLog = new CommunicationLog();
|
CommunicationLog communicationLog = new CommunicationLog();
|
||||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||||
communicationLog.setLogName("APMS创建生产单");
|
communicationLog.setLogName("WMS通知APMS删除生产单");
|
||||||
communicationLog.setContent(paramMap.toString());
|
communicationLog.setType(2);
|
||||||
|
communicationLog.setContent("param:" + paramMap + "\nresult:" + response.body());
|
||||||
setCommonField(communicationLog);
|
setCommonField(communicationLog);
|
||||||
communicationLogServiceBiz.save(communicationLog);
|
communicationLogServiceBiz.save(communicationLog);
|
||||||
return successful(response);
|
return successful(JSONUtil.toBean(response.body(), ApmsEndProcessVo.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "createProcessSheet")
|
||||||
|
@ApiOperation(value = "通知APMS创建生产单接口")
|
||||||
|
public R<ApmsCreateProcessSheetVo> createProcessSheet(@Validated @RequestBody ApmsCreateProcessSheet apmsCreateProcess) {
|
||||||
|
checkToken();
|
||||||
|
String paramJson = JSONUtil.toJsonStr(apmsCreateProcess);
|
||||||
|
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/createProcessSheet")
|
||||||
|
.header("token", Token).body(paramJson, ContentType.JSON.toString()).execute();
|
||||||
|
CommunicationLog communicationLog = new CommunicationLog();
|
||||||
|
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||||
|
communicationLog.setLogName("WMS通知APMS创建生产单");
|
||||||
|
communicationLog.setType(2);
|
||||||
|
communicationLog.setContent("param:" + paramJson + "\nresult:" + response.body());
|
||||||
|
setCommonField(communicationLog);
|
||||||
|
communicationLogServiceBiz.save(communicationLog);
|
||||||
|
return successful(JSONUtil.toBean(response.body(), ApmsCreateProcessSheetVo.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "startProcess")
|
@PostMapping(value = "startProcess")
|
||||||
@ApiOperation(value = "通知APMS生产单开始处理")
|
@ApiOperation(value = "通知APMS生产单开始处理")
|
||||||
public R startProcess(@Validated @RequestBody ApmsStartProcess apmsStartProcess) {
|
public R<ApmsStartProcess> startProcess(@Validated @RequestBody ApmsStartProcess apmsStartProcess) {
|
||||||
checkToken();
|
checkToken();
|
||||||
HashMap<String, Object> paramMap = new HashMap<>();
|
String paramJson = JSONUtil.toJsonStr(apmsStartProcess);
|
||||||
paramMap.put("entity", apmsStartProcess);
|
|
||||||
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/startProcess")
|
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/startProcess")
|
||||||
.header("token", Token).form(paramMap).execute();
|
.header("token", Token).body(paramJson, ContentType.JSON.toString()).execute();
|
||||||
CommunicationLog communicationLog = new CommunicationLog();
|
CommunicationLog communicationLog = new CommunicationLog();
|
||||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||||
communicationLog.setLogName("通知APMS生产单开始处理");
|
communicationLog.setLogName("WMS通知APMS生产单开始处理");
|
||||||
communicationLog.setContent(paramMap.toString());
|
communicationLog.setType(2);
|
||||||
|
communicationLog.setContent("param:" + paramJson + "\nresult:" + response.body());
|
||||||
setCommonField(communicationLog);
|
setCommonField(communicationLog);
|
||||||
communicationLogServiceBiz.save(communicationLog);
|
communicationLogServiceBiz.save(communicationLog);
|
||||||
return successful(response);
|
return successful(JSONUtil.toBean(response.body(), ApmsStartProcess.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "endProcess")
|
@PostMapping(value = "endProcess")
|
||||||
@ApiOperation(value = "通知APMS订单结束处理")
|
@ApiOperation(value = "通知APMS生产单结束处理")
|
||||||
public R endProcess(@Validated @RequestBody ApmsEndProcess apmsEndProcess) {
|
public R<ApmsEndProcessVo> endProcess(@Validated @RequestBody ApmsEndProcess apmsEndProcess) {
|
||||||
checkToken();
|
checkToken();
|
||||||
HashMap<String, Object> paramMap = new HashMap<>();
|
String paramJson = JSONUtil.toJsonStr(apmsEndProcess);
|
||||||
paramMap.put("entity", apmsEndProcess);
|
|
||||||
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/endProcess")
|
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/endProcess")
|
||||||
.header("token", Token).form(paramMap).execute();
|
.header("token", Token).body(paramJson, ContentType.JSON.toString()).execute();
|
||||||
CommunicationLog communicationLog = new CommunicationLog();
|
CommunicationLog communicationLog = new CommunicationLog();
|
||||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||||
communicationLog.setLogName("通知APMS订单结束处理");
|
communicationLog.setLogName("WMS通知APMS生产单结束处理");
|
||||||
communicationLog.setContent(paramMap.toString());
|
communicationLog.setType(2);
|
||||||
|
communicationLog.setContent("param:" + paramJson + "\nresult:" + response.body());
|
||||||
setCommonField(communicationLog);
|
setCommonField(communicationLog);
|
||||||
communicationLogServiceBiz.save(communicationLog);
|
communicationLogServiceBiz.save(communicationLog);
|
||||||
return successful(response);
|
return successful(JSONUtil.toBean(response.body(), ApmsEndProcessVo.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "finishProcessSheet")
|
@PostMapping(value = "finishProcessSheet")
|
||||||
@ApiOperation(value = "通知APMS完成生产单接口")
|
@ApiOperation(value = "通知APMS完成生产单接口")
|
||||||
public R finishProcessSheet(@Validated @RequestBody ApmsFinishProcessSheet apmsFinishProcessSheet) {
|
public R<ApmsFinishProcessSheetVo> finishProcessSheet(@Validated @RequestBody ApmsFinishProcessSheet apmsFinishProcessSheet) {
|
||||||
checkToken();
|
checkToken();
|
||||||
HashMap<String, Object> paramMap = new HashMap<>();
|
String paramJson = JSONUtil.toJsonStr(apmsFinishProcessSheet);
|
||||||
paramMap.put("entity", apmsFinishProcessSheet);
|
|
||||||
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/finishProcessSheet")
|
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/finishProcessSheet")
|
||||||
.header("token", Token).form(paramMap).execute();
|
.header("token", Token).body(paramJson, ContentType.JSON.toString()).execute();
|
||||||
CommunicationLog communicationLog = new CommunicationLog();
|
CommunicationLog communicationLog = new CommunicationLog();
|
||||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||||
communicationLog.setLogName("通知APMS完成生产单接口");
|
communicationLog.setLogName("WMS通知APMS完成生产单");
|
||||||
communicationLog.setContent(paramMap.toString());
|
communicationLog.setType(2);
|
||||||
|
communicationLog.setContent("param:" + paramJson + "\nresult:" + response.body());
|
||||||
setCommonField(communicationLog);
|
setCommonField(communicationLog);
|
||||||
communicationLogServiceBiz.save(communicationLog);
|
communicationLogServiceBiz.save(communicationLog);
|
||||||
return successful(response);
|
return successful(JSONUtil.toBean(response.body(), ApmsFinishProcessSheetVo.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "getApmsToken")
|
@PostMapping(value = "getApmsToken")
|
||||||
@ApiOperation(value = "获取APMS Token")
|
@ApiOperation(value = "获取APMS Token")
|
||||||
public R getApmsToken() {
|
public R<String> getApmsToken() {
|
||||||
HashMap<String, Object> paramMap = new HashMap<>();
|
HashMap<String, Object> paramMap = new HashMap<>();
|
||||||
paramMap.put("apiKey", "7ee8f59bbaeae27e");
|
paramMap.put("apiKey", "7ee8f59bbaeae27e");
|
||||||
paramMap.put("platFormCode", "CUC");
|
paramMap.put("platFormCode", "CUC");
|
||||||
String result = HttpUtil.get(ApiAddress + "/platform/api/getToken", paramMap);
|
String result = HttpUtil.get(ApiAddress + "/platform/api/getToken", paramMap);
|
||||||
JSON parse = JSONUtil.parse(result);
|
JSON parse = JSONUtil.parse(result);
|
||||||
Object token = parse.getByPath("token");
|
Object token = parse.getByPath("token");
|
||||||
|
String expireTime = parse.getByPath("expireTime").toString();
|
||||||
Token = token.toString();
|
Token = token.toString();
|
||||||
|
TokenExpireTime = LocalDateTime.parse(expireTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||||
CommunicationLog communicationLog = new CommunicationLog();
|
CommunicationLog communicationLog = new CommunicationLog();
|
||||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||||
communicationLog.setLogName("获取APMS Token");
|
communicationLog.setLogName("WMS获取APMS Token");
|
||||||
communicationLog.setContent(paramMap.toString());
|
communicationLog.setType(2);
|
||||||
|
communicationLog.setContent("param:" + paramMap + "\nresult:" + result);
|
||||||
setCommonField(communicationLog);
|
setCommonField(communicationLog);
|
||||||
communicationLogServiceBiz.save(communicationLog);
|
communicationLogServiceBiz.save(communicationLog);
|
||||||
return successful(result);
|
return successful(result);
|
||||||
@ -167,7 +209,7 @@ public class ApmsController extends BaseController {
|
|||||||
|
|
||||||
@PostMapping(value = "getStoveCodeByWorkShopCode")
|
@PostMapping(value = "getStoveCodeByWorkShopCode")
|
||||||
@ApiOperation(value = "APMS通过车间编码获取炉号信息")
|
@ApiOperation(value = "APMS通过车间编码获取炉号信息")
|
||||||
public R getStoveCodeByWorkShopCode(String workShopCode) {
|
public R<ApmsStoveVo> getStoveCodeByWorkShopCode(String workShopCode) {
|
||||||
checkToken();
|
checkToken();
|
||||||
HashMap<String, Object> paramMap = new HashMap<>();
|
HashMap<String, Object> paramMap = new HashMap<>();
|
||||||
paramMap.put("workShopCode", workShopCode);
|
paramMap.put("workShopCode", workShopCode);
|
||||||
@ -175,11 +217,12 @@ public class ApmsController extends BaseController {
|
|||||||
.header("token", Token).form(paramMap).execute();
|
.header("token", Token).form(paramMap).execute();
|
||||||
CommunicationLog communicationLog = new CommunicationLog();
|
CommunicationLog communicationLog = new CommunicationLog();
|
||||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||||
communicationLog.setLogName("APMS通过车间编码获取炉号信息");
|
communicationLog.setLogName("WMS通过APMS使用车间编码获取炉号信息");
|
||||||
communicationLog.setContent(paramMap.toString());
|
communicationLog.setType(2);
|
||||||
|
communicationLog.setContent("param:" + paramMap + "\nresult:" + response.body());
|
||||||
setCommonField(communicationLog);
|
setCommonField(communicationLog);
|
||||||
communicationLogServiceBiz.save(communicationLog);
|
communicationLogServiceBiz.save(communicationLog);
|
||||||
return successful(response);
|
return successful(JSONUtil.toBean(response.body(), ApmsStoveVo.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkToken() {
|
private void checkToken() {
|
||||||
@ -187,5 +230,15 @@ public class ApmsController extends BaseController {
|
|||||||
{
|
{
|
||||||
getApmsToken();
|
getApmsToken();
|
||||||
}
|
}
|
||||||
|
else if (TokenExpireTime.isBefore(LocalDateTime.now()))
|
||||||
|
{
|
||||||
|
getApmsToken();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setCommonField(CommunicationLog communicationLog) {
|
||||||
|
communicationLog.setValid(WhetherEnum.YES.getValue());
|
||||||
|
communicationLog.setCreateTime(LocalDateTime.now());
|
||||||
|
communicationLog.setUpdateTime(LocalDateTime.now());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,25 @@
|
|||||||
package com.mt.wms.empty.controller;
|
package com.mt.wms.empty.controller;
|
||||||
|
|
||||||
|
import com.mt.wms.basic.service.KilnInfoService;
|
||||||
|
import com.mt.wms.basic.vo.KilnInfoVo;
|
||||||
import com.mt.wms.core.base.BaseController;
|
import com.mt.wms.core.base.BaseController;
|
||||||
import com.mt.wms.core.constants.CommonConstant;
|
import com.mt.wms.core.constants.CommonConstant;
|
||||||
|
import com.mt.wms.core.dal.entity.CurrTask;
|
||||||
|
import com.mt.wms.core.params.BasePageParam;
|
||||||
import com.mt.wms.core.params.IdParam;
|
import com.mt.wms.core.params.IdParam;
|
||||||
import com.mt.wms.core.vo.IdVo;
|
import com.mt.wms.core.vo.IdVo;
|
||||||
import com.mt.wms.core.vo.PageVo;
|
import com.mt.wms.core.vo.PageVo;
|
||||||
import com.mt.wms.core.vo.R;
|
import com.mt.wms.core.vo.R;
|
||||||
|
import com.mt.wms.empty.params.ApmsCreateProcessSheet;
|
||||||
|
import com.mt.wms.empty.params.CreateItem;
|
||||||
import com.mt.wms.empty.params.CurrTaskQueryParam;
|
import com.mt.wms.empty.params.CurrTaskQueryParam;
|
||||||
import com.mt.wms.empty.params.TaskCreateParam;
|
import com.mt.wms.empty.params.TaskCreateParam;
|
||||||
import com.mt.wms.empty.service.CurrTaskDetService;
|
import com.mt.wms.empty.service.CurrTaskDetService;
|
||||||
import com.mt.wms.empty.service.CurrTaskService;
|
import com.mt.wms.empty.service.CurrTaskService;
|
||||||
|
import com.mt.wms.empty.service.OrderInfoService;
|
||||||
|
import com.mt.wms.empty.vo.ApmsCreateProcessSheetVo;
|
||||||
|
import com.mt.wms.empty.vo.ApmsStoveVo;
|
||||||
|
import com.mt.wms.empty.vo.CurrTaskMainQueryVo;
|
||||||
import com.mt.wms.empty.vo.CurrTaskQueryVo;
|
import com.mt.wms.empty.vo.CurrTaskQueryVo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -21,6 +31,11 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author xcc
|
* @author xcc
|
||||||
* @date 2021年11月8日
|
* @date 2021年11月8日
|
||||||
@ -35,25 +50,102 @@ public class CurrTaskController extends BaseController {
|
|||||||
private CurrTaskService currTaskService;
|
private CurrTaskService currTaskService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CurrTaskDetService currTaskDetService;
|
private CurrTaskDetService currTaskDetService;
|
||||||
|
@Autowired
|
||||||
|
private OrderInfoService orderInfoService;
|
||||||
|
@Autowired
|
||||||
|
private ApmsController apmsControl;
|
||||||
|
@Autowired
|
||||||
|
private KilnInfoService kilnInfoService;
|
||||||
|
|
||||||
@PostMapping(value = "createProcessTask")
|
@PostMapping(value = "createProcessTask")
|
||||||
@ApiOperation(value = "创建一个加工任务至任务队列")
|
@ApiOperation(value = "订单加工-创建一个加工任务至任务队列")
|
||||||
public R createProcessTask(@Validated @RequestBody TaskCreateParam param) {
|
public R<String> createProcessTask(@Validated @RequestBody TaskCreateParam param) {
|
||||||
|
//验证标识卡号正确无误。
|
||||||
|
orderInfoService.verifyTaskInfoByIdenCardNum(param.getDetParams());
|
||||||
|
//验证炉子编码信息在apms正确无误
|
||||||
|
R<KilnInfoVo> kilnInfoVoR = kilnInfoService.get(IdParam.builder().id(param.getKilnId()).build());
|
||||||
|
String kilnCode = kilnInfoVoR.getData().getCode();
|
||||||
|
R<ApmsStoveVo> bm = apmsControl.getStoveCodeByWorkShopCode("BM");
|
||||||
|
ArrayList<Map<String, String>> stoveCodes = bm.getData().getStoveCodes();
|
||||||
|
//验证apms数据中存在这个炉子
|
||||||
|
boolean verifyCodes = false;
|
||||||
|
ArrayList<String> codeStr = new ArrayList<>();
|
||||||
|
stoveCodes.forEach(kilnMap -> {
|
||||||
|
codeStr.add(kilnMap.get("code"));
|
||||||
|
});
|
||||||
|
for (String s : codeStr)
|
||||||
|
{
|
||||||
|
if (s.equals(kilnCode))
|
||||||
|
{
|
||||||
|
verifyCodes = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!verifyCodes)
|
||||||
|
{
|
||||||
|
return failed("创建失败,APMS中验证炉号" + kilnCode + "失败!");
|
||||||
|
}
|
||||||
|
|
||||||
|
//通知apms创建一个生产单
|
||||||
|
ApmsCreateProcessSheet apmsCreateSheet = new ApmsCreateProcessSheet();
|
||||||
|
apmsCreateSheet.setWorkShopCode("BM");
|
||||||
|
apmsCreateSheet.setStartTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||||
|
apmsCreateSheet.setTechCode(param.getCraftCode());
|
||||||
|
//fixme 暂时没有正式user,使用测试账户
|
||||||
|
apmsCreateSheet.setStartUser("QJJP03");
|
||||||
|
ArrayList<CreateItem> createItems = new ArrayList<>();
|
||||||
|
param.getDetParams().forEach(e -> {
|
||||||
|
CreateItem createItem = new CreateItem();
|
||||||
|
createItem.setItemCode(e.getIdenCardNum());
|
||||||
|
createItem.setQuantity(e.getQuantity().intValue());
|
||||||
|
createItem.setWeight(e.getWeight().doubleValue());
|
||||||
|
createItems.add(createItem);
|
||||||
|
});
|
||||||
|
apmsCreateSheet.setStoveCode(kilnCode);
|
||||||
|
apmsCreateSheet.setItems(createItems);
|
||||||
|
R<ApmsCreateProcessSheetVo> processSheet = apmsControl.createProcessSheet(apmsCreateSheet);
|
||||||
|
|
||||||
|
if (processSheet.getData().getSuccess())
|
||||||
|
{
|
||||||
|
//apms创建成功后写入数据库
|
||||||
R<IdVo> mainTask = currTaskService.createProcessTask(param);
|
R<IdVo> mainTask = currTaskService.createProcessTask(param);
|
||||||
currTaskDetService.createProcessTaskDet(param.getDetParams(), mainTask.getData().getId());
|
currTaskDetService.createProcessTaskDet(param.getDetParams(), mainTask.getData().getId());
|
||||||
return successful("创建成功。");
|
String sheetNo = processSheet.getData().getSheetNo();
|
||||||
|
//将返回的生产单号写入到主任务中。
|
||||||
|
CurrTask currTaskById = currTaskService.getCurrTaskById(mainTask.getData().getId());
|
||||||
|
currTaskById.setSheetNo(sheetNo);
|
||||||
|
currTaskService.updateCurrTaskById(currTaskById);
|
||||||
|
//生成详细任务中的检验结果数据在apms推送生产单结果时创建
|
||||||
|
return successful("创建成功,任务添加至等待执行队列。");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return failed("创建失败,APMS报错:" + processSheet.getData().getMsg());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping(value = "mainCurrentTaskNow")
|
||||||
|
@ApiOperation(value = "首页-获取当前执行中的任务")
|
||||||
|
public R<PageVo<CurrTaskMainQueryVo>> mainCurrentTaskNow(@Validated @RequestBody BasePageParam param) {
|
||||||
|
return currTaskService.currentTaskMainPage(param);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping(value = "currentTaskNow")
|
@PostMapping(value = "currentTaskNow")
|
||||||
@ApiOperation(value = "获取当前执行的任务")
|
@ApiOperation(value = "获取当前执行的任务 (车辆名称传id)")
|
||||||
public R<PageVo<CurrTaskQueryVo>> currentTask(@Validated @RequestBody CurrTaskQueryParam param) {
|
public R<PageVo<CurrTaskQueryVo>> currentTask(@Validated @RequestBody CurrTaskQueryParam param) {
|
||||||
return currTaskService.currentTaskPage(param);
|
return currTaskService.currentTaskPage(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "completeTask")
|
@PostMapping(value = "completeTask")
|
||||||
@ApiOperation(value = "完成执行任务")
|
@ApiOperation(value = "执行任务完成(仅wms,不通知apms)")
|
||||||
public R completeTask(@Validated @RequestBody IdParam param) {
|
public R<String> completeTask(@Validated @RequestBody IdParam param) {
|
||||||
return currTaskService.completeTask(param);
|
return currTaskService.completeTask(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "deleteBySheetNo")
|
||||||
|
@ApiOperation(value = "人工通过生产单编号删除未正式开始的生产单(通知APMS)")
|
||||||
|
public R<String> deleteBySheetNo(@Validated @RequestBody String sheetNo) {
|
||||||
|
return currTaskService.deleteBySheetNo(sheetNo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,10 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author xcc
|
* @author xcc
|
||||||
@ -28,7 +31,7 @@ public class CurrTaskDetController extends BaseController {
|
|||||||
CurrTaskDetService currTaskDetService;
|
CurrTaskDetService currTaskDetService;
|
||||||
|
|
||||||
@PostMapping(value = "getTaskDet")
|
@PostMapping(value = "getTaskDet")
|
||||||
@ApiOperation(value = "查看主任务的详情任务列表")
|
@ApiOperation(value = "当前执行任务-查看详情")
|
||||||
public R<PageVo<CurrTaskDetVo>> getTaskDetailsPage(@Validated@RequestBody CurrTaskDetQueryParam currTaskId){
|
public R<PageVo<CurrTaskDetVo>> getTaskDetailsPage(@Validated@RequestBody CurrTaskDetQueryParam currTaskId){
|
||||||
return currTaskDetService.getTaskDetailsPage(currTaskId);
|
return currTaskDetService.getTaskDetailsPage(currTaskId);
|
||||||
}
|
}
|
||||||
|
@ -35,44 +35,51 @@ public class OrderInfoController extends BaseController {
|
|||||||
private OrderInfoService orderInfoService;
|
private OrderInfoService orderInfoService;
|
||||||
|
|
||||||
@PostMapping(value = "page")
|
@PostMapping(value = "page")
|
||||||
@ApiOperation(value = "获取分页订单基础信息")
|
@ApiOperation(value = "订单加工管理-获取分页订单信息")
|
||||||
private R<PageVo<OrderInfoVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody OrderInfoBasePageParam orderBaseParam) {
|
private R<PageVo<OrderInfoVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody OrderInfoBasePageParam orderBaseParam) {
|
||||||
return orderInfoService.page(orderBaseParam);
|
return orderInfoService.page(orderBaseParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应该没有人工创建信息这个接口
|
||||||
|
*/
|
||||||
@PostMapping(value = "personCreateOrder")
|
@PostMapping(value = "personCreateOrder")
|
||||||
@ApiOperation(value = "人工创建订单信息")
|
@ApiOperation(value = "人工创建订单信息")
|
||||||
private R personCreateOrder(@Validated({Default.class}) @RequestBody OrderInfoPersonCreateParam orderInfoPersonCreateParam) {
|
@Deprecated
|
||||||
|
private R<String> personCreateOrder(@Validated({Default.class}) @RequestBody OrderInfoPersonCreateParam orderInfoPersonCreateParam) {
|
||||||
return orderInfoService.personCreateOrder(orderInfoPersonCreateParam);
|
return orderInfoService.personCreateOrder(orderInfoPersonCreateParam);
|
||||||
}
|
}
|
||||||
@PostMapping(value = "get")
|
|
||||||
@ApiOperation(value = "当前订单查看详情")
|
@PostMapping(value = "getDet")
|
||||||
|
@ApiOperation(value = "当前订单列表-查看详情")
|
||||||
private R<OrderInfoVo> get(@Validated @RequestBody IdParam idParam) {
|
private R<OrderInfoVo> get(@Validated @RequestBody IdParam idParam) {
|
||||||
return orderInfoService.getOne(idParam);
|
return orderInfoService.getOne(idParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "getTaskInfo")
|
@PostMapping(value = "getTaskInfo")
|
||||||
@ApiOperation(value = "当前订单任务详情")
|
@ApiOperation(value = "当前订单列表-查看任务详情")
|
||||||
private R<PageVo<OrderInfoTaskDetVo>> getTaskInfo(@Validated @RequestBody OrderInfoTaskDetParam orderInfoTaskDetParam) {
|
private R<PageVo<OrderInfoTaskDetVo>> getTaskInfo(@Validated @RequestBody OrderInfoTaskDetParam orderInfoTaskDetParam) {
|
||||||
return orderInfoService.getTaskInfo(orderInfoTaskDetParam);
|
return orderInfoService.getTaskInfo(orderInfoTaskDetParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "getTaskInfoByIdenCardNum")
|
@GetMapping(value = "getTaskInfoByIdenCardNum")
|
||||||
@ApiOperation(value = "根据标识卡获取信息")
|
@ApiOperation(value = "订单加工-填写时根据标识卡获取信息")
|
||||||
private R<OrderInfoVo> getTaskInfoByIdenCardNum(@Validated @RequestParam String idenCardNum) {
|
private R<OrderInfoVo> getTaskInfoByIdenCardNum(@Validated @RequestParam String idenCardNum) {
|
||||||
return orderInfoService.getTaskInfoByIdenCardNum(idenCardNum);
|
return orderInfoService.getTaskInfoByIdenCardNum(idenCardNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping(value = "completeOrder")
|
@PostMapping(value = "completeOrder")
|
||||||
@ApiOperation(value = "完成订单")
|
@ApiOperation(value = "人工完成订单(不需通知apms,仅在wms完成)")
|
||||||
private R completeOrder(@Validated @RequestBody IdParam idParam) {
|
@Deprecated
|
||||||
|
private R<String> completeOrder(@Validated @RequestBody IdParam idParam) {
|
||||||
return orderInfoService.completeOrder(idParam);
|
return orderInfoService.completeOrder(idParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "voidOrder")
|
@PostMapping(value = "voidOrder")
|
||||||
@ApiOperation(value = "作废订单")
|
@ApiOperation(value = "作废订单")
|
||||||
private R voidOrder(@Validated @RequestBody IdParam idParam) {
|
@Deprecated
|
||||||
|
private R<String> voidOrder(@Validated @RequestBody IdParam idParam) {
|
||||||
return orderInfoService.voidOrder(idParam);
|
return orderInfoService.voidOrder(idParam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,19 +37,19 @@ public class OrderInfoHisController extends BaseController {
|
|||||||
private OrderInfoHisService orderInfoHisService;
|
private OrderInfoHisService orderInfoHisService;
|
||||||
|
|
||||||
@PostMapping(value = "page")
|
@PostMapping(value = "page")
|
||||||
@ApiOperation(value = "获取分页订单基础信息")
|
@ApiOperation(value = "获取分页订单历史信息")
|
||||||
private R<PageVo<OrderInfoVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody OrderInfoBasePageParam orderBaseParam) {
|
private R<PageVo<OrderInfoVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody OrderInfoBasePageParam orderBaseParam) {
|
||||||
return orderInfoHisService.page(orderBaseParam);
|
return orderInfoHisService.page(orderBaseParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "get")
|
@PostMapping(value = "getDet")
|
||||||
@ApiOperation(value = "订单历史查看详情")
|
@ApiOperation(value = "订单历史-查看详情")
|
||||||
private R<OrderInfoVo> get(@Validated @RequestBody IdParam idParam) {
|
private R<OrderInfoVo> get(@Validated @RequestBody IdParam idParam) {
|
||||||
return orderInfoHisService.getOne(idParam);
|
return orderInfoHisService.getOne(idParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "getTaskInfo")
|
@PostMapping(value = "getTaskInfo")
|
||||||
@ApiOperation(value = "订单历史任务详情")
|
@ApiOperation(value = "订单历史-查看任务详情")
|
||||||
private R<PageVo<OrderInfoTaskDetVo>> getTaskInfo(@Validated @RequestBody OrderInfoTaskDetParam orderInfoTaskDetParam) {
|
private R<PageVo<OrderInfoTaskDetVo>> getTaskInfo(@Validated @RequestBody OrderInfoTaskDetParam orderInfoTaskDetParam) {
|
||||||
return orderInfoHisService.getTaskInfo(orderInfoTaskDetParam);
|
return orderInfoHisService.getTaskInfo(orderInfoTaskDetParam);
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,18 @@ package com.mt.wms.empty.controller;
|
|||||||
|
|
||||||
import com.mt.wms.core.base.BaseController;
|
import com.mt.wms.core.base.BaseController;
|
||||||
import com.mt.wms.core.constants.CommonConstant;
|
import com.mt.wms.core.constants.CommonConstant;
|
||||||
import com.mt.wms.empty.service.CurrTaskDetService;
|
import com.mt.wms.core.vo.PageVo;
|
||||||
|
import com.mt.wms.core.vo.R;
|
||||||
|
import com.mt.wms.empty.params.CurrTaskDetQueryParam;
|
||||||
|
import com.mt.wms.empty.service.TaskDetHisService;
|
||||||
|
import com.mt.wms.empty.vo.TaskHisDetVo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@ -20,6 +28,11 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@Api(value = "任务详情历史", tags = "任务详情历史管理", hidden = false)
|
@Api(value = "任务详情历史", tags = "任务详情历史管理", hidden = false)
|
||||||
public class TaskDetHisController extends BaseController {
|
public class TaskDetHisController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
CurrTaskDetService currTaskDetService;
|
TaskDetHisService taskDetHisService;
|
||||||
|
|
||||||
|
@PostMapping(value = "getTaskDet")
|
||||||
|
@ApiOperation(value = "历史执行任务-查看详情")
|
||||||
|
public R<PageVo<TaskHisDetVo>> getTaskDetailsPage(@Validated @RequestBody CurrTaskDetQueryParam param) {
|
||||||
|
return taskDetHisService.getTaskDetailsPage(param);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,13 +2,24 @@ package com.mt.wms.empty.controller;
|
|||||||
|
|
||||||
import com.mt.wms.core.base.BaseController;
|
import com.mt.wms.core.base.BaseController;
|
||||||
import com.mt.wms.core.constants.CommonConstant;
|
import com.mt.wms.core.constants.CommonConstant;
|
||||||
import com.mt.wms.empty.service.CurrTaskService;
|
import com.mt.wms.core.utils.LocalDateTimeUtils;
|
||||||
|
import com.mt.wms.core.vo.PageVo;
|
||||||
|
import com.mt.wms.core.vo.R;
|
||||||
|
import com.mt.wms.empty.params.TaskHisQueryParam;
|
||||||
|
import com.mt.wms.empty.service.TaskHisService;
|
||||||
|
import com.mt.wms.empty.vo.TaskHisQueryVo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author xcc
|
* @author xcc
|
||||||
* @date 2021年11月16日
|
* @date 2021年11月16日
|
||||||
@ -20,5 +31,19 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@Api(value = "任务历史管理", tags = "任务历史管理", hidden = false)
|
@Api(value = "任务历史管理", tags = "任务历史管理", hidden = false)
|
||||||
public class TaskHisController extends BaseController {
|
public class TaskHisController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private CurrTaskService currTaskService;
|
private TaskHisService taskHisService;
|
||||||
|
|
||||||
|
@PostMapping(value = "taskHis")
|
||||||
|
@ApiOperation(value = "获取历史执行的任务 (车辆名称传id)")
|
||||||
|
public R<PageVo<TaskHisQueryVo>> currentTask(@Validated @RequestBody TaskHisQueryParam param) {
|
||||||
|
if (Objects.nonNull(param.getStartTime()))
|
||||||
|
{
|
||||||
|
param.setStartTime(LocalDateTimeUtils.getDayStart(param.getStartTime()));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(param.getEndTime()))
|
||||||
|
{
|
||||||
|
param.setEndTime(LocalDateTimeUtils.getDayEnd(param.getEndTime()));
|
||||||
|
}
|
||||||
|
return taskHisService.taskHisPage(param);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,18 +41,3 @@ public class ApmsCreateProcessSheet extends BaseParam {
|
|||||||
private String workShopCode;
|
private String workShopCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@Accessors(chain = true)
|
|
||||||
@ApiModel(value = "Apms生产单详细", description = "Apms生产单详细")
|
|
||||||
class CreateItem extends BaseParam {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
@ApiModelProperty(value = "标识卡号", required = true)
|
|
||||||
private String itemCode;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "加工数量", required = true)
|
|
||||||
private String quantity;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "加工重量", required = true)
|
|
||||||
private String weight;
|
|
||||||
}
|
|
||||||
|
@ -13,7 +13,7 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@ApiModel(value = "Apms创建生产单", description = "Apms创建生产单")
|
@ApiModel(value = "Apms结束生产单", description = "Apms结束生产单")
|
||||||
public class ApmsFinishProcessSheet extends BaseParam {
|
public class ApmsFinishProcessSheet extends BaseParam {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -34,18 +34,3 @@ public class ApmsFinishProcessSheet extends BaseParam {
|
|||||||
private String remark;
|
private String remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@Accessors(chain = true)
|
|
||||||
@ApiModel(value = "Apms生产单详细", description = "Apms生产单详细")
|
|
||||||
class FinishItem extends BaseParam {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
@ApiModelProperty(value = "标识卡号", required = true)
|
|
||||||
private String itemCode;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "完成加工数量", required = true)
|
|
||||||
private String finishQuantity;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "完成加工重量", required = true)
|
|
||||||
private String finishWeight;
|
|
||||||
}
|
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.mt.wms.empty.params;
|
||||||
|
|
||||||
|
import com.mt.wms.core.base.BaseParam;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value = "Apms生产单详细", description = "Apms生产单详细")
|
||||||
|
public class CreateItem extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ApiModelProperty(value = "标识卡号", required = true)
|
||||||
|
private String itemCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "加工数量", required = true)
|
||||||
|
private Integer quantity;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "加工重量", required = true)
|
||||||
|
private Double weight;
|
||||||
|
}
|
@ -15,12 +15,11 @@ import lombok.experimental.Accessors;
|
|||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@ApiModel(value = "获取任务信息", description = "获取任务信息")
|
@ApiModel(value = "获取任务详细信息", description = "获取任务详细信息")
|
||||||
public class CurrTaskDetQueryParam extends BasePageParam {
|
public class CurrTaskDetQueryParam extends BasePageParam {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "主任务id",required = true)
|
@ApiModelProperty(value = "主任务id",required = true)
|
||||||
private Long currTaskId;
|
private Long currTaskId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -20,8 +20,6 @@ public class CurrTaskQueryParam extends BasePageParam {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "标识卡号",required = false)
|
|
||||||
private String idenCardNum;
|
|
||||||
@ApiModelProperty(value = "车辆id")
|
@ApiModelProperty(value = "车辆id")
|
||||||
private String vehicleId;
|
private String vehicleId;
|
||||||
|
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.mt.wms.empty.params;
|
||||||
|
|
||||||
|
import com.mt.wms.core.base.BaseParam;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value = "Apms生产单详细", description = "Apms生产单详细")
|
||||||
|
public class FinishItem extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ApiModelProperty(value = "标识卡号", required = true)
|
||||||
|
private String itemCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "完成加工数量", required = true)
|
||||||
|
private Integer finishQuantity;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "完成加工重量", required = true)
|
||||||
|
private Double finishWeight;
|
||||||
|
}
|
@ -1,6 +1,5 @@
|
|||||||
package com.mt.wms.empty.params;
|
package com.mt.wms.empty.params;
|
||||||
|
|
||||||
import com.mt.wms.core.base.BaseParam;
|
|
||||||
import com.mt.wms.core.params.BasePageParam;
|
import com.mt.wms.core.params.BasePageParam;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -24,13 +23,13 @@ public class OrderInfoBasePageParam extends BasePageParam {
|
|||||||
/**
|
/**
|
||||||
* 订单号,APMS系统获取
|
* 订单号,APMS系统获取
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "订单号", required = false)
|
@ApiModelProperty(value = "订单号", required = true)
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标识卡号,APMS系统获取
|
* 标识卡号,APMS系统获取
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "标识卡号", required = false)
|
@ApiModelProperty(value = "标识卡号", required = true)
|
||||||
private String idenCardNum;
|
private String idenCardNum;
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ import lombok.experimental.Accessors;
|
|||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@ApiModel(value = "apms订单对象", description = "用于推送新的订单信息")
|
@ApiModel(value = "apms订单对象", description = "用于APMS推送新的订单信息")
|
||||||
public class OrderParamForApms extends BaseParam {
|
public class OrderParamForApms extends BaseParam {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -68,10 +68,10 @@ public class OrderParamForApms extends BaseParam {
|
|||||||
@ApiModelProperty(value = "工艺要求")
|
@ApiModelProperty(value = "工艺要求")
|
||||||
private String craftIll;
|
private String craftIll;
|
||||||
|
|
||||||
@ApiModelProperty(value = "加工数量")
|
@ApiModelProperty(value = "加工数量", required = true)
|
||||||
private Float quantity;
|
private Float quantity;
|
||||||
|
|
||||||
@ApiModelProperty(value = "加工重量")
|
@ApiModelProperty(value = "加工重量", required = true)
|
||||||
private Float weight;
|
private Float weight;
|
||||||
|
|
||||||
@ApiModelProperty(value = "单位")
|
@ApiModelProperty(value = "单位")
|
||||||
|
@ -22,16 +22,18 @@ public class TaskCreateParam extends BaseParam {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "托盘号")
|
// @ApiModelProperty(value = "托盘号")
|
||||||
private String palletCode;
|
// private String palletCode;
|
||||||
@ApiModelProperty(value = "起点", required = true)
|
@ApiModelProperty(value = "起点(提升平台)", required = true)
|
||||||
private String startPosition;
|
private String startPosition;
|
||||||
@ApiModelProperty(value = "终点位置", required = true)
|
@ApiModelProperty(value = "终点位置", required = true)
|
||||||
private String targetPosition;
|
private String targetPosition;
|
||||||
@ApiModelProperty(value = "加工任务类型", required = true)
|
@ApiModelProperty(value = "加工类型:0 初始加工,1 复加工", required = true)
|
||||||
private Integer processType;
|
private Integer processType;
|
||||||
@ApiModelProperty(value = "窑炉Id", required = true)
|
@ApiModelProperty(value = "窑炉Id", example = "1", required = true)
|
||||||
private Long kilnId;
|
private Long kilnId;
|
||||||
|
@ApiModelProperty(value = "工艺号", required = true)
|
||||||
|
private String craftCode;
|
||||||
@ApiModelProperty(value = "详细信息", required = true)
|
@ApiModelProperty(value = "详细信息", required = true)
|
||||||
private List<TaskCreateDetParam> detParams;
|
private List<TaskCreateDetParam> detParams;
|
||||||
|
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.mt.wms.empty.params;
|
||||||
|
|
||||||
|
import com.mt.wms.core.params.BasePageParam;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xcc
|
||||||
|
* @date 2021年11月9日
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value = "获取任务信息", description = "获取任务信息")
|
||||||
|
public class TaskHisQueryParam extends BasePageParam {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "车辆id")
|
||||||
|
private String vehicleId;
|
||||||
|
@ApiModelProperty(value = "开始时间", example = "2021-11-20T12:05:20")
|
||||||
|
private LocalDateTime startTime;
|
||||||
|
@ApiModelProperty(value = "结束时间", example = "2021-11-25T12:05:20")
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
}
|
@ -10,6 +10,7 @@ import com.mt.wms.empty.params.TaskCreateDetParam;
|
|||||||
import com.mt.wms.empty.vo.CurrTaskDetVo;
|
import com.mt.wms.empty.vo.CurrTaskDetVo;
|
||||||
import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
|
import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -58,4 +59,20 @@ public interface CurrTaskDetService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
List<CurrTaskDet> getTaskDetailsByIdenCardNum(String idenCardNum);
|
List<CurrTaskDet> getTaskDetailsByIdenCardNum(String idenCardNum);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过生产单删除某个生产单
|
||||||
|
*
|
||||||
|
* @param currTaskId 生产单号
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
R<String> deleteByCurrTaskId(Long currTaskId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过标识卡号查询订单统计数
|
||||||
|
*
|
||||||
|
* @param idCard 任务详情历史
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
HashMap<String, Double> getSumByIdCard(String idCard);
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
package com.mt.wms.empty.service;
|
package com.mt.wms.empty.service;
|
||||||
|
|
||||||
|
import com.mt.wms.core.dal.entity.CurrTask;
|
||||||
|
import com.mt.wms.core.params.BasePageParam;
|
||||||
import com.mt.wms.core.params.IdParam;
|
import com.mt.wms.core.params.IdParam;
|
||||||
import com.mt.wms.core.vo.IdVo;
|
import com.mt.wms.core.vo.IdVo;
|
||||||
import com.mt.wms.core.vo.PageVo;
|
import com.mt.wms.core.vo.PageVo;
|
||||||
import com.mt.wms.core.vo.R;
|
import com.mt.wms.core.vo.R;
|
||||||
import com.mt.wms.empty.params.CurrTaskQueryParam;
|
import com.mt.wms.empty.params.CurrTaskQueryParam;
|
||||||
import com.mt.wms.empty.params.TaskCreateParam;
|
import com.mt.wms.empty.params.TaskCreateParam;
|
||||||
|
import com.mt.wms.empty.vo.CurrTaskMainQueryVo;
|
||||||
import com.mt.wms.empty.vo.CurrTaskQueryVo;
|
import com.mt.wms.empty.vo.CurrTaskQueryVo;
|
||||||
import com.mt.wms.empty.vo.CurrTaskVo;
|
import com.mt.wms.empty.vo.CurrTaskVo;
|
||||||
|
|
||||||
@ -20,11 +23,26 @@ public interface CurrTaskService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 内部使用,获取详情任务的关联任务
|
* 内部使用,获取详情任务的关联任务
|
||||||
|
*
|
||||||
* @param idParam 任务id
|
* @param idParam 任务id
|
||||||
* @return 任务实体
|
* @return 任务实体
|
||||||
*/
|
*/
|
||||||
CurrTaskVo getCurrTask(IdParam idParam);
|
CurrTaskVo getCurrTask(IdParam idParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内部使用,更新任务单号
|
||||||
|
*
|
||||||
|
* @param id 任务id
|
||||||
|
*/
|
||||||
|
void updateCurrTaskById(CurrTask id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内部使用,获取任务实体
|
||||||
|
*
|
||||||
|
* @param id 任务id
|
||||||
|
* @return 任务实体
|
||||||
|
*/
|
||||||
|
CurrTask getCurrTaskById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建加工任务的主任务信息
|
* 创建加工任务的主任务信息
|
||||||
@ -43,10 +61,25 @@ public interface CurrTaskService {
|
|||||||
R<PageVo<CurrTaskQueryVo>> currentTaskPage(CurrTaskQueryParam param);
|
R<PageVo<CurrTaskQueryVo>> currentTaskPage(CurrTaskQueryParam param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 完成执行任务
|
* 完成执行任务 不会物理删除,会将删除值置为0,同时在历史表复制一份记录 方便在订单未完成时查询任务详情
|
||||||
*
|
*
|
||||||
* @param param id
|
* @param param id
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
R completeTask(IdParam param);
|
R<String> completeTask(IdParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过生产单编号删除生产单
|
||||||
|
*
|
||||||
|
* @param sheetNo 生产单号
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
R<String> deleteBySheetNo(String sheetNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页 获取当前执行的任务
|
||||||
|
*
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
R<PageVo<CurrTaskMainQueryVo>> currentTaskMainPage(BasePageParam param);
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,8 @@ import com.mt.wms.empty.params.*;
|
|||||||
import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
|
import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
|
||||||
import com.mt.wms.empty.vo.OrderInfoVo;
|
import com.mt.wms.empty.vo.OrderInfoVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单相关服务
|
* 订单相关服务
|
||||||
*
|
*
|
||||||
@ -21,7 +23,7 @@ public interface OrderInfoService {
|
|||||||
* @param apmsPostOrderParam 订单参数
|
* @param apmsPostOrderParam 订单参数
|
||||||
* @return 操作结果
|
* @return 操作结果
|
||||||
*/
|
*/
|
||||||
R apmsPostOrder(OrderParamForApms apmsPostOrderParam);
|
R<String> apmsPostOrder(OrderParamForApms apmsPostOrderParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询当前订单列表
|
* 查询当前订单列表
|
||||||
@ -30,13 +32,15 @@ public interface OrderInfoService {
|
|||||||
* @return 分页结果集
|
* @return 分页结果集
|
||||||
*/
|
*/
|
||||||
R<PageVo<OrderInfoVo>> page(OrderInfoBasePageParam orderInfoBasePageParam);
|
R<PageVo<OrderInfoVo>> page(OrderInfoBasePageParam orderInfoBasePageParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人工创建订单
|
* 人工创建订单
|
||||||
*
|
*
|
||||||
* @param orderInfoPersonCreateParam 人工订单参数
|
* @param orderInfoPersonCreateParam 人工订单参数
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
R personCreateOrder(OrderInfoPersonCreateParam orderInfoPersonCreateParam);
|
R<String> personCreateOrder(OrderInfoPersonCreateParam orderInfoPersonCreateParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取详细单条信息
|
* 获取详细单条信息
|
||||||
*
|
*
|
||||||
@ -59,13 +63,20 @@ public interface OrderInfoService {
|
|||||||
*/
|
*/
|
||||||
R<OrderInfoVo> getTaskInfoByIdenCardNum(String idenCardNum);
|
R<OrderInfoVo> getTaskInfoByIdenCardNum(String idenCardNum);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证传入的详细订单标识卡正确
|
||||||
|
*
|
||||||
|
* @param detParams 详细订单
|
||||||
|
*/
|
||||||
|
void verifyTaskInfoByIdenCardNum(List<TaskCreateDetParam> detParams);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 完成订单
|
* 完成订单
|
||||||
*
|
*
|
||||||
* @param idParam id号
|
* @param idParam id号
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
R completeOrder(IdParam idParam);
|
R<String> completeOrder(IdParam idParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 作废订单
|
* 作废订单
|
||||||
@ -73,7 +84,7 @@ public interface OrderInfoService {
|
|||||||
* @param idParam id号
|
* @param idParam id号
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
R voidOrder(IdParam idParam);
|
R<String> voidOrder(IdParam idParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APMS作废订单
|
* APMS作废订单
|
||||||
@ -81,7 +92,7 @@ public interface OrderInfoService {
|
|||||||
* @param idenCardNum 标识卡号
|
* @param idenCardNum 标识卡号
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
R apmsVoidOrder(String idenCardNum);
|
R<String> apmsVoidOrder(String idenCardNum);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APMS返回订单结果
|
* APMS返回订单结果
|
||||||
@ -89,6 +100,6 @@ public interface OrderInfoService {
|
|||||||
* @param apmsCompleteOrder 订单检验结果
|
* @param apmsCompleteOrder 订单检验结果
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
R apmsCompleteOrder(ApmsCompleteOrder apmsCompleteOrder);
|
R<String> apmsCompleteOrder(ApmsCompleteOrder apmsCompleteOrder);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,12 @@ package com.mt.wms.empty.service;
|
|||||||
import com.mt.wms.core.dal.entity.TaskDetHis;
|
import com.mt.wms.core.dal.entity.TaskDetHis;
|
||||||
import com.mt.wms.core.vo.PageVo;
|
import com.mt.wms.core.vo.PageVo;
|
||||||
import com.mt.wms.core.vo.R;
|
import com.mt.wms.core.vo.R;
|
||||||
|
import com.mt.wms.empty.params.CurrTaskDetQueryParam;
|
||||||
import com.mt.wms.empty.params.OrderInfoTaskDetParam;
|
import com.mt.wms.empty.params.OrderInfoTaskDetParam;
|
||||||
import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
|
import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
|
||||||
|
import com.mt.wms.empty.vo.TaskHisDetVo;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -22,7 +25,7 @@ public interface TaskDetHisService {
|
|||||||
* @param taskDetHis 任务详情历史
|
* @param taskDetHis 任务详情历史
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
R save(TaskDetHis taskDetHis);
|
R<String> save(TaskDetHis taskDetHis);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存任务详情历史list
|
* 保存任务详情历史list
|
||||||
@ -30,7 +33,7 @@ public interface TaskDetHisService {
|
|||||||
* @param taskDetHis 任务详情历史
|
* @param taskDetHis 任务详情历史
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
R saveList(List<TaskDetHis> taskDetHis);
|
R<String> saveList(List<TaskDetHis> taskDetHis);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存任务详情历史list
|
* 保存任务详情历史list
|
||||||
@ -39,4 +42,20 @@ public interface TaskDetHisService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
PageVo<OrderInfoTaskDetVo> getHisOrderHisTask(OrderInfoTaskDetParam param);
|
PageVo<OrderInfoTaskDetVo> getHisOrderHisTask(OrderInfoTaskDetParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过标识卡号查询订单统计数
|
||||||
|
*
|
||||||
|
* @param idCard 任务详情历史
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
HashMap<String, Double> getSumByIdCard(String idCard);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询历史加工的详细任务信息
|
||||||
|
*
|
||||||
|
* @param currTaskId 详细任务信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
R<PageVo<TaskHisDetVo>> getTaskDetailsPage(CurrTaskDetQueryParam currTaskId);
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,11 @@ package com.mt.wms.empty.service;
|
|||||||
import com.mt.wms.core.dal.entity.TaskHis;
|
import com.mt.wms.core.dal.entity.TaskHis;
|
||||||
import com.mt.wms.core.params.IdParam;
|
import com.mt.wms.core.params.IdParam;
|
||||||
import com.mt.wms.core.vo.IdVo;
|
import com.mt.wms.core.vo.IdVo;
|
||||||
|
import com.mt.wms.core.vo.PageVo;
|
||||||
import com.mt.wms.core.vo.R;
|
import com.mt.wms.core.vo.R;
|
||||||
|
import com.mt.wms.empty.params.TaskHisQueryParam;
|
||||||
import com.mt.wms.empty.vo.CurrTaskVo;
|
import com.mt.wms.empty.vo.CurrTaskVo;
|
||||||
|
import com.mt.wms.empty.vo.TaskHisQueryVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主任务历史相关服务
|
* 主任务历史相关服务
|
||||||
@ -30,4 +33,13 @@ public interface TaskHisService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
CurrTaskVo getById(IdParam id);
|
CurrTaskVo getById(IdParam id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分页信息
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
R<PageVo<TaskHisQueryVo>> taskHisPage(TaskHisQueryParam param);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.mt.wms.core.base.BaseService;
|
import com.mt.wms.core.base.BaseService;
|
||||||
import com.mt.wms.core.dal.entity.CurrTaskDet;
|
import com.mt.wms.core.dal.entity.CurrTaskDet;
|
||||||
|
import com.mt.wms.core.dal.entity.OrderInfo;
|
||||||
import com.mt.wms.core.dal.service.CurrTaskDetServiceBiz;
|
import com.mt.wms.core.dal.service.CurrTaskDetServiceBiz;
|
||||||
|
import com.mt.wms.core.dal.service.OrderInfoServiceBiz;
|
||||||
import com.mt.wms.core.params.IdParam;
|
import com.mt.wms.core.params.IdParam;
|
||||||
import com.mt.wms.core.utils.BeanUtils;
|
import com.mt.wms.core.utils.BeanUtils;
|
||||||
import com.mt.wms.core.vo.PageVo;
|
import com.mt.wms.core.vo.PageVo;
|
||||||
@ -13,12 +15,15 @@ import com.mt.wms.empty.params.CurrTaskDetQueryParam;
|
|||||||
import com.mt.wms.empty.params.OrderInfoTaskDetParam;
|
import com.mt.wms.empty.params.OrderInfoTaskDetParam;
|
||||||
import com.mt.wms.empty.params.TaskCreateDetParam;
|
import com.mt.wms.empty.params.TaskCreateDetParam;
|
||||||
import com.mt.wms.empty.service.CurrTaskDetService;
|
import com.mt.wms.empty.service.CurrTaskDetService;
|
||||||
|
import com.mt.wms.empty.service.CurrTaskService;
|
||||||
import com.mt.wms.empty.vo.CurrTaskDetVo;
|
import com.mt.wms.empty.vo.CurrTaskDetVo;
|
||||||
|
import com.mt.wms.empty.vo.CurrTaskVo;
|
||||||
import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
|
import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,13 +39,17 @@ public class CurrTaskDetServiceImpl extends BaseService implements CurrTaskDetSe
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
CurrTaskDetServiceBiz currTaskDetServiceBiz;
|
CurrTaskDetServiceBiz currTaskDetServiceBiz;
|
||||||
|
@Autowired
|
||||||
|
CurrTaskService currTaskService;
|
||||||
|
@Autowired
|
||||||
|
OrderInfoServiceBiz orderInfoService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageVo<OrderInfoTaskDetVo> getCurrOrderCurrTask(OrderInfoTaskDetParam param) {
|
public PageVo<OrderInfoTaskDetVo> getCurrOrderCurrTask(OrderInfoTaskDetParam param) {
|
||||||
QueryWrapper<CurrTaskDet> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<CurrTaskDet> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq(CurrTaskDet.IDEN_CARD_NUM,param.getIdenCardNum())
|
queryWrapper.eq(CurrTaskDet.IDEN_CARD_NUM, param.getIdenCardNum())
|
||||||
.eq(CurrTaskDet.ORDER_NO,param.getOrderNo())
|
.eq(CurrTaskDet.ORDER_NO, param.getOrderNo())
|
||||||
.eq(CurrTaskDet.VALID,1);
|
.eq(CurrTaskDet.VALID, 1);
|
||||||
Page<CurrTaskDet> page = currTaskDetServiceBiz.page(new Page<>(param.getCurrent(), param.getSize()), queryWrapper);
|
Page<CurrTaskDet> page = currTaskDetServiceBiz.page(new Page<>(param.getCurrent(), param.getSize()), queryWrapper);
|
||||||
return new PageVo<>(page, OrderInfoTaskDetVo.class);
|
return new PageVo<>(page, OrderInfoTaskDetVo.class);
|
||||||
}
|
}
|
||||||
@ -61,7 +70,15 @@ public class CurrTaskDetServiceImpl extends BaseService implements CurrTaskDetSe
|
|||||||
queryWrapper.eq(CurrTaskDet.CURR_TASK_ID, currTaskId.getCurrTaskId())
|
queryWrapper.eq(CurrTaskDet.CURR_TASK_ID, currTaskId.getCurrTaskId())
|
||||||
.eq(CurrTaskDet.VALID, 1);
|
.eq(CurrTaskDet.VALID, 1);
|
||||||
Page<CurrTaskDet> page = currTaskDetServiceBiz.page(new Page<>(currTaskId.getCurrent(), currTaskId.getSize()), queryWrapper);
|
Page<CurrTaskDet> page = currTaskDetServiceBiz.page(new Page<>(currTaskId.getCurrent(), currTaskId.getSize()), queryWrapper);
|
||||||
return successful(new PageVo<>(page, CurrTaskDetVo.class));
|
PageVo<CurrTaskDetVo> currTaskDetVo = new PageVo<>(page, CurrTaskDetVo.class);
|
||||||
|
currTaskDetVo.getRecords().forEach(
|
||||||
|
e -> {
|
||||||
|
OrderInfo one = orderInfoService.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM, e.getIdenCardNum()));
|
||||||
|
e.setProductModel(one.getProductModel());
|
||||||
|
e.setCustomer(one.getCustomerName());
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return successful(currTaskDetVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -79,4 +96,33 @@ public class CurrTaskDetServiceImpl extends BaseService implements CurrTaskDetSe
|
|||||||
.eq(CurrTaskDet.VALID, 1);
|
.eq(CurrTaskDet.VALID, 1);
|
||||||
return currTaskDetServiceBiz.list(queryWrapper);
|
return currTaskDetServiceBiz.list(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<String> deleteByCurrTaskId(Long currTaskId) {
|
||||||
|
currTaskDetServiceBiz.remove(new QueryWrapper<CurrTaskDet>().eq(CurrTaskDet.CURR_TASK_ID, currTaskId));
|
||||||
|
return successful("成功。");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HashMap<String, Double> getSumByIdCard(String idCard) {
|
||||||
|
HashMap<String, Double> result = new HashMap<>(2);
|
||||||
|
QueryWrapper<CurrTaskDet> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq(CurrTaskDet.IDEN_CARD_NUM, idCard)
|
||||||
|
.eq(CurrTaskDet.VALID, 1);
|
||||||
|
List<CurrTaskDet> list = currTaskDetServiceBiz.list(queryWrapper);
|
||||||
|
list.forEach(e -> {
|
||||||
|
CurrTaskVo byId = currTaskService.getCurrTask(IdParam.builder().id(e.getCurrTaskId()).build());
|
||||||
|
//如果加工类型是复加工,或者任务作废。移除对象
|
||||||
|
if (byId.getProcessType().equals(2) || byId.getValid() != 1)
|
||||||
|
{
|
||||||
|
list.remove(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//计算加工总数
|
||||||
|
double sumWeight = list.stream().mapToDouble(CurrTaskDet::getWeight).sum();
|
||||||
|
double sumQuantity = list.stream().mapToDouble(CurrTaskDet::getQuantity).sum();
|
||||||
|
result.put("weight", sumWeight);
|
||||||
|
result.put("quantity", sumQuantity);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,16 +2,18 @@ package com.mt.wms.empty.service.impl;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.mt.wms.core.api.Assert;
|
||||||
import com.mt.wms.core.base.BaseService;
|
import com.mt.wms.core.base.BaseService;
|
||||||
import com.mt.wms.core.dal.entity.CurrTask;
|
import com.mt.wms.core.dal.entity.*;
|
||||||
import com.mt.wms.core.dal.entity.CurrTaskDet;
|
import com.mt.wms.core.dal.service.CraftInfoServiceBiz;
|
||||||
import com.mt.wms.core.dal.entity.TaskDetHis;
|
|
||||||
import com.mt.wms.core.dal.entity.TaskHis;
|
|
||||||
import com.mt.wms.core.dal.service.CurrTaskServiceBiz;
|
import com.mt.wms.core.dal.service.CurrTaskServiceBiz;
|
||||||
|
import com.mt.wms.core.dal.service.OrderInfoServiceBiz;
|
||||||
|
import com.mt.wms.core.params.BasePageParam;
|
||||||
import com.mt.wms.core.params.IdParam;
|
import com.mt.wms.core.params.IdParam;
|
||||||
import com.mt.wms.core.vo.IdVo;
|
import com.mt.wms.core.vo.IdVo;
|
||||||
import com.mt.wms.core.vo.PageVo;
|
import com.mt.wms.core.vo.PageVo;
|
||||||
import com.mt.wms.core.vo.R;
|
import com.mt.wms.core.vo.R;
|
||||||
|
import com.mt.wms.empty.controller.ApmsController;
|
||||||
import com.mt.wms.empty.enums.TaskTypeEnum;
|
import com.mt.wms.empty.enums.TaskTypeEnum;
|
||||||
import com.mt.wms.empty.params.CurrTaskQueryParam;
|
import com.mt.wms.empty.params.CurrTaskQueryParam;
|
||||||
import com.mt.wms.empty.params.TaskCreateParam;
|
import com.mt.wms.empty.params.TaskCreateParam;
|
||||||
@ -19,6 +21,8 @@ import com.mt.wms.empty.service.CurrTaskDetService;
|
|||||||
import com.mt.wms.empty.service.CurrTaskService;
|
import com.mt.wms.empty.service.CurrTaskService;
|
||||||
import com.mt.wms.empty.service.TaskDetHisService;
|
import com.mt.wms.empty.service.TaskDetHisService;
|
||||||
import com.mt.wms.empty.service.TaskHisService;
|
import com.mt.wms.empty.service.TaskHisService;
|
||||||
|
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.CurrTaskQueryVo;
|
||||||
import com.mt.wms.empty.vo.CurrTaskVo;
|
import com.mt.wms.empty.vo.CurrTaskVo;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
@ -27,6 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -52,6 +57,14 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
|
|||||||
@Autowired
|
@Autowired
|
||||||
TaskDetHisService taskDetHisService;
|
TaskDetHisService taskDetHisService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ApmsController apmsControl;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
OrderInfoServiceBiz orderInfoServiceBiz;
|
||||||
|
@Autowired
|
||||||
|
CraftInfoServiceBiz craftInfoServiceBiz;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CurrTaskVo getCurrTask(IdParam idParam) {
|
public CurrTaskVo getCurrTask(IdParam idParam) {
|
||||||
CurrTask byId = currTaskServiceBiz.getById(idParam.getId());
|
CurrTask byId = currTaskServiceBiz.getById(idParam.getId());
|
||||||
@ -60,12 +73,27 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
|
|||||||
return build;
|
return build;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CurrTask getCurrTaskById(Long id) {
|
||||||
|
return currTaskServiceBiz.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateCurrTaskById(CurrTask id) {
|
||||||
|
currTaskServiceBiz.updateById(id);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<IdVo> createProcessTask(TaskCreateParam param) {
|
public R<IdVo> createProcessTask(TaskCreateParam param) {
|
||||||
|
Assert.notNull("错误,加工类型不可为空!", param.getProcessType());
|
||||||
CurrTask currTask = new CurrTask();
|
CurrTask currTask = new CurrTask();
|
||||||
BeanUtils.copyProperties(param, currTask);
|
BeanUtils.copyProperties(param, currTask);
|
||||||
currTask.setTaskType(TaskTypeEnum.WTK.getValue());
|
currTask.setTaskType(TaskTypeEnum.WTK.getValue());
|
||||||
currTask.setTaskSource(0);
|
currTask.setTaskSource(0);
|
||||||
|
//根据工艺号查询工艺id以及工艺plc值
|
||||||
|
CraftInfo one = craftInfoServiceBiz.getOne(new QueryWrapper<CraftInfo>().eq(CraftInfo.CREATOR_ID, param.getCraftCode()));
|
||||||
|
currTask.setFCraftCodeId(one.getId());
|
||||||
|
currTask.setFPlcValue(one.getPlcValue());
|
||||||
setCommonField(currTask);
|
setCommonField(currTask);
|
||||||
currTaskServiceBiz.save(currTask);
|
currTaskServiceBiz.save(currTask);
|
||||||
return successful(IdVo.builder().id(currTask.getId()).build());
|
return successful(IdVo.builder().id(currTask.getId()).build());
|
||||||
@ -81,7 +109,7 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R completeTask(IdParam param) {
|
public R<String> completeTask(IdParam param) {
|
||||||
CurrTask byId = currTaskServiceBiz.getById(param.getId());
|
CurrTask byId = currTaskServiceBiz.getById(param.getId());
|
||||||
TaskHis taskHis = new TaskHis();
|
TaskHis taskHis = new TaskHis();
|
||||||
BeanUtils.copyProperties(byId, taskHis);
|
BeanUtils.copyProperties(byId, taskHis);
|
||||||
@ -89,7 +117,9 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
|
|||||||
taskHis.setId(null);
|
taskHis.setId(null);
|
||||||
//将主任务放入到历史表,清空id,防止重复
|
//将主任务放入到历史表,清空id,防止重复
|
||||||
R<IdVo> save = taskHisService.save(taskHis);
|
R<IdVo> save = taskHisService.save(taskHis);
|
||||||
currTaskServiceBiz.removeById(byId.getId());
|
byId.setValid(0);
|
||||||
|
byId.setStatus(2);
|
||||||
|
currTaskServiceBiz.updateById(byId);
|
||||||
List<CurrTaskDet> taskDetailsByMainId = currTaskDetService.getTaskDetailsByMainId(IdParam.builder().id(byId.getId()).build());
|
List<CurrTaskDet> taskDetailsByMainId = currTaskDetService.getTaskDetailsByMainId(IdParam.builder().id(byId.getId()).build());
|
||||||
List<TaskDetHis> taskDetHis = com.mt.wms.core.utils.BeanUtils.copyList(taskDetailsByMainId, TaskDetHis.class);
|
List<TaskDetHis> taskDetHis = com.mt.wms.core.utils.BeanUtils.copyList(taskDetailsByMainId, TaskDetHis.class);
|
||||||
taskDetHis.forEach(detHis -> {
|
taskDetHis.forEach(detHis -> {
|
||||||
@ -99,4 +129,60 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
|
|||||||
taskDetHisService.saveList(taskDetHis);
|
taskDetHisService.saveList(taskDetHis);
|
||||||
return successful("执行成功。");
|
return successful("执行成功。");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<String> deleteBySheetNo(String sheetNo) {
|
||||||
|
CurrTask byId = currTaskServiceBiz.getById(new QueryWrapper<CurrTask>().eq(CurrTask.SHEET_NO, sheetNo));
|
||||||
|
//如果尚未执行(状态 0)
|
||||||
|
if (byId.getStatus() == 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
R<ApmsEndProcessVo> apmsStartProcessR = apmsControl.deleteBySheetNo(sheetNo);
|
||||||
|
if (apmsStartProcessR.getData().getSuccess())
|
||||||
|
{
|
||||||
|
currTaskServiceBiz.removeById(byId.getId());
|
||||||
|
currTaskDetService.deleteByCurrTaskId(byId.getId());
|
||||||
|
return successful("APMS生产单删除成功。");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return failed(apmsStartProcessR.getData().getMsg());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return failed("无法删除,任务正在执行中。");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<PageVo<CurrTaskMainQueryVo>> currentTaskMainPage(BasePageParam param) {
|
||||||
|
QueryWrapper<CurrTask> currTaskQueryWrapper = new QueryWrapper<>();
|
||||||
|
currTaskQueryWrapper.eq(CurrTask.STATUS, 1);
|
||||||
|
currTaskQueryWrapper.eq(CurrTask.VALID, 1);
|
||||||
|
Page<CurrTask> page = currTaskServiceBiz.page(new Page<>(param.getCurrent(), param.getSize()), currTaskQueryWrapper);
|
||||||
|
PageVo<CurrTaskMainQueryVo> pageVo = new PageVo<>(page, CurrTaskMainQueryVo.class);
|
||||||
|
Assert.notNull("无执行中的任务!", pageVo.getRecords());
|
||||||
|
pageVo.getRecords().forEach(e ->
|
||||||
|
{
|
||||||
|
//根据当前主任务查详细任务
|
||||||
|
List<CurrTaskDet> taskDetailsByMainId = currTaskDetService.getTaskDetailsByMainId(IdParam.builder().id(e.getId()).build());
|
||||||
|
ArrayList<String> materialDes = new ArrayList<>();
|
||||||
|
ArrayList<String> iden = new ArrayList<>();
|
||||||
|
//写入材料名与标识卡号
|
||||||
|
taskDetailsByMainId.forEach(a -> {
|
||||||
|
materialDes.add(a.getMaterialDes());
|
||||||
|
iden.add(a.getIdenCardNum());
|
||||||
|
});
|
||||||
|
e.setMaterials(materialDes);
|
||||||
|
e.setIdens(iden);
|
||||||
|
ArrayList<String> customers = new ArrayList<>();
|
||||||
|
//根据标识卡号查订单的客户名并写入
|
||||||
|
e.getIdens().forEach(id -> {
|
||||||
|
OrderInfo one = orderInfoServiceBiz.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM, id));
|
||||||
|
customers.add(one.getCustomerName());
|
||||||
|
}
|
||||||
|
);
|
||||||
|
e.setCustomers(customers);
|
||||||
|
});
|
||||||
|
return successful(pageVo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ public class OrderInfoHisServiceImpl extends BaseService implements OrderInfoHis
|
|||||||
public R<PageVo<OrderInfoTaskDetVo>> getTaskInfo(OrderInfoTaskDetParam param) {
|
public R<PageVo<OrderInfoTaskDetVo>> getTaskInfo(OrderInfoTaskDetParam param) {
|
||||||
//从历史任务详细中获取该标识卡和订单的所有订单
|
//从历史任务详细中获取该标识卡和订单的所有订单
|
||||||
PageVo<OrderInfoTaskDetVo> currOrderCurrTask = taskDetHisService.getHisOrderHisTask(param);
|
PageVo<OrderInfoTaskDetVo> currOrderCurrTask = taskDetHisService.getHisOrderHisTask(param);
|
||||||
Assert.gtZero(currOrderCurrTask.getRecords().size(), "该订单暂无详细记录。");
|
Assert.notNull("该订单下无历史任务!", currOrderCurrTask.getRecords());
|
||||||
//获取车辆信息
|
//获取车辆信息
|
||||||
R<List<VehicleVo>> vehicle = vehicleService.list(new VehicleQueryParam());
|
R<List<VehicleVo>> vehicle = vehicleService.list(new VehicleQueryParam());
|
||||||
Map<Long, List<VehicleVo>> collect = vehicle.getData().stream().collect(Collectors.groupingBy(VehicleVo::getId));
|
Map<Long, List<VehicleVo>> collect = vehicle.getData().stream().collect(Collectors.groupingBy(VehicleVo::getId));
|
||||||
|
@ -11,20 +11,20 @@ import com.mt.wms.basic.vo.KilnInfoVo;
|
|||||||
import com.mt.wms.basic.vo.VehicleVo;
|
import com.mt.wms.basic.vo.VehicleVo;
|
||||||
import com.mt.wms.core.api.Assert;
|
import com.mt.wms.core.api.Assert;
|
||||||
import com.mt.wms.core.base.BaseService;
|
import com.mt.wms.core.base.BaseService;
|
||||||
|
import com.mt.wms.core.dal.entity.ApmsCheckResult;
|
||||||
import com.mt.wms.core.dal.entity.CurrTaskDet;
|
import com.mt.wms.core.dal.entity.CurrTaskDet;
|
||||||
import com.mt.wms.core.dal.entity.OrderInfo;
|
import com.mt.wms.core.dal.entity.OrderInfo;
|
||||||
|
import com.mt.wms.core.dal.service.ApmsCheckResultServiceBiz;
|
||||||
import com.mt.wms.core.dal.service.CommunicationLogServiceBiz;
|
import com.mt.wms.core.dal.service.CommunicationLogServiceBiz;
|
||||||
import com.mt.wms.core.dal.service.OrderInfoServiceBiz;
|
import com.mt.wms.core.dal.service.OrderInfoServiceBiz;
|
||||||
|
import com.mt.wms.core.enums.WhetherEnum;
|
||||||
import com.mt.wms.core.params.IdParam;
|
import com.mt.wms.core.params.IdParam;
|
||||||
import com.mt.wms.core.vo.PageVo;
|
import com.mt.wms.core.vo.PageVo;
|
||||||
import com.mt.wms.core.vo.R;
|
import com.mt.wms.core.vo.R;
|
||||||
import com.mt.wms.empty.controller.ApmsController;
|
import com.mt.wms.empty.controller.ApmsController;
|
||||||
import com.mt.wms.empty.enums.OrderSourceEnum;
|
import com.mt.wms.empty.enums.OrderSourceEnum;
|
||||||
import com.mt.wms.empty.params.*;
|
import com.mt.wms.empty.params.*;
|
||||||
import com.mt.wms.empty.service.CurrTaskDetService;
|
import com.mt.wms.empty.service.*;
|
||||||
import com.mt.wms.empty.service.CurrTaskService;
|
|
||||||
import com.mt.wms.empty.service.OrderInfoHisService;
|
|
||||||
import com.mt.wms.empty.service.OrderInfoService;
|
|
||||||
import com.mt.wms.empty.vo.CurrTaskVo;
|
import com.mt.wms.empty.vo.CurrTaskVo;
|
||||||
import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
|
import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
|
||||||
import com.mt.wms.empty.vo.OrderInfoVo;
|
import com.mt.wms.empty.vo.OrderInfoVo;
|
||||||
@ -34,8 +34,11 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -57,6 +60,8 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
|
|||||||
@Autowired
|
@Autowired
|
||||||
CurrTaskDetService currTaskDetService;
|
CurrTaskDetService currTaskDetService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
TaskDetHisService taskDetHisService;
|
||||||
|
@Autowired
|
||||||
CurrTaskService currTaskService;
|
CurrTaskService currTaskService;
|
||||||
@Autowired
|
@Autowired
|
||||||
KilnInfoService kilnInfoService;
|
KilnInfoService kilnInfoService;
|
||||||
@ -69,11 +74,14 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
CommunicationLogServiceBiz communicationLogServiceBiz;
|
CommunicationLogServiceBiz communicationLogServiceBiz;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ApmsCheckResultServiceBiz apmsCheckResultServiceBiz;
|
||||||
@Autowired
|
@Autowired
|
||||||
ApmsController apmsControl;
|
ApmsController apmsControl;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R apmsPostOrder(OrderParamForApms apmsPostOrderParam) {
|
public R<String> apmsPostOrder(OrderParamForApms apmsPostOrderParam) {
|
||||||
OrderInfo orderInfo = new OrderInfo();
|
OrderInfo orderInfo = new OrderInfo();
|
||||||
BeanUtils.copyProperties(apmsPostOrderParam, orderInfo);
|
BeanUtils.copyProperties(apmsPostOrderParam, orderInfo);
|
||||||
setCommonField(orderInfo);
|
setCommonField(orderInfo);
|
||||||
@ -86,23 +94,34 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<PageVo<OrderInfoVo>> page(OrderInfoBasePageParam param) {
|
public R<PageVo<OrderInfoVo>> page(OrderInfoBasePageParam param) {
|
||||||
QueryWrapper<OrderInfo> wrapper=new QueryWrapper<>();
|
QueryWrapper<OrderInfo> wrapper = new QueryWrapper<>();
|
||||||
wrapper.like(StringUtils.isNotBlank(param.getIdenCardNum()),OrderInfo.IDEN_CARD_NUM, param.getIdenCardNum())
|
wrapper.like(StringUtils.isNotBlank(param.getIdenCardNum()), OrderInfo.IDEN_CARD_NUM, param.getIdenCardNum())
|
||||||
.like(StringUtils.isNotBlank(param.getOrderNo()),OrderInfo.ORDER_NO, param.getOrderNo())
|
.like(StringUtils.isNotBlank(param.getOrderNo()), OrderInfo.ORDER_NO, param.getOrderNo())
|
||||||
.eq(OrderInfo.VALID,1)
|
.eq(OrderInfo.VALID, 1)
|
||||||
.orderByDesc(OrderInfo.CREATE_TIME);
|
.orderByDesc(OrderInfo.CREATE_TIME);
|
||||||
Page<OrderInfo> page = orderInfoService.page(new Page<>(param.getCurrent(), param.getSize()), wrapper);
|
Page<OrderInfo> page = orderInfoService.page(new Page<>(param.getCurrent(), param.getSize()), wrapper);
|
||||||
return successful(new PageVo<>(page,OrderInfoVo.class));
|
PageVo<OrderInfoVo> orderInfoVoPageVo = new PageVo<>(page, OrderInfoVo.class);
|
||||||
|
orderInfoVoPageVo.getRecords().forEach(e ->
|
||||||
|
{
|
||||||
|
R<OrderInfoVo> info = getTaskInfoByIdenCardNum(e.getIdenCardNum());
|
||||||
|
e.setFinishWeight(info.getData().getFinishWeight());
|
||||||
|
e.setFinishQuantity(info.getData().getQuantity());
|
||||||
|
e.setWaitWeight(info.getData().getWaitWeight());
|
||||||
|
e.setWaitQuantity(info.getData().getWaitQuantity());
|
||||||
|
e.setReProcessQuantity(info.getData().getReProcessQuantity());
|
||||||
|
e.setReProcessWeight(info.getData().getReProcessWeight());
|
||||||
|
});
|
||||||
|
return successful(orderInfoVoPageVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R personCreateOrder(OrderInfoPersonCreateParam orderInfoPersonCreateParam) {
|
public R<String> personCreateOrder(OrderInfoPersonCreateParam orderInfoPersonCreateParam) {
|
||||||
OrderInfo orderInfo = new OrderInfo();
|
OrderInfo orderInfo = new OrderInfo();
|
||||||
BeanUtils.copyProperties(orderInfoPersonCreateParam,orderInfo);
|
BeanUtils.copyProperties(orderInfoPersonCreateParam, orderInfo);
|
||||||
setCommonField(orderInfo);
|
setCommonField(orderInfo);
|
||||||
//设定来源信息为人工
|
//设定来源信息为人工
|
||||||
orderInfo.setOrderSource(OrderSourceEnum.PERSON.getValue());
|
orderInfo.setOrderSource(OrderSourceEnum.PERSON.getValue());
|
||||||
orderInfo.setInterCode("PERSONAL"+System.currentTimeMillis());
|
orderInfo.setInterCode("PERSONAL" + System.currentTimeMillis());
|
||||||
orderInfoService.save(orderInfo);
|
orderInfoService.save(orderInfo);
|
||||||
return successful("人工创建订单成功。");
|
return successful("人工创建订单成功。");
|
||||||
}
|
}
|
||||||
@ -111,7 +130,14 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
|
|||||||
public R<OrderInfoVo> getOne(IdParam idParam) {
|
public R<OrderInfoVo> getOne(IdParam idParam) {
|
||||||
OrderInfo byId = orderInfoService.getById(idParam.getId());
|
OrderInfo byId = orderInfoService.getById(idParam.getId());
|
||||||
OrderInfoVo build = OrderInfoVo.builder().build();
|
OrderInfoVo build = OrderInfoVo.builder().build();
|
||||||
BeanUtils.copyProperties(byId,build);
|
BeanUtils.copyProperties(byId, build);
|
||||||
|
R<OrderInfoVo> info = getTaskInfoByIdenCardNum(build.getIdenCardNum());
|
||||||
|
build.setFinishWeight(info.getData().getFinishWeight());
|
||||||
|
build.setFinishQuantity(info.getData().getQuantity());
|
||||||
|
build.setWaitWeight(info.getData().getWaitWeight());
|
||||||
|
build.setWaitQuantity(info.getData().getWaitQuantity());
|
||||||
|
build.setReProcessQuantity(info.getData().getReProcessQuantity());
|
||||||
|
build.setReProcessWeight(info.getData().getReProcessWeight());
|
||||||
return successful(build);
|
return successful(build);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,33 +185,74 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
|
|||||||
@Override
|
@Override
|
||||||
public R<OrderInfoVo> getTaskInfoByIdenCardNum(String idenCardNum) {
|
public R<OrderInfoVo> getTaskInfoByIdenCardNum(String idenCardNum) {
|
||||||
QueryWrapper<OrderInfo> wrapper = new QueryWrapper<>();
|
QueryWrapper<OrderInfo> wrapper = new QueryWrapper<>();
|
||||||
wrapper.eq(OrderInfo.IDEN_CARD_NUM, idenCardNum).eq(OrderInfo.VALID, 1).eq(OrderInfo.STATUS, 0);
|
wrapper.eq(OrderInfo.IDEN_CARD_NUM, idenCardNum).eq(OrderInfo.VALID, 1);
|
||||||
OrderInfo one = orderInfoService.getOne(wrapper);
|
OrderInfo one = orderInfoService.getOne(wrapper);
|
||||||
|
Assert.notNull("未找到该标识卡信息!", one);
|
||||||
OrderInfoVo build = OrderInfoVo.builder().build();
|
OrderInfoVo build = OrderInfoVo.builder().build();
|
||||||
BeanUtils.copyProperties(one, build);
|
BeanUtils.copyProperties(one, build);
|
||||||
|
//查询历史任务表,当前任务表,拉取加工完成 创建任务未加工 计算剩余数量
|
||||||
|
HashMap<String, Double> sumCurrTask = currTaskDetService.getSumByIdCard(idenCardNum);
|
||||||
|
build.setWaitQuantity(sumCurrTask.get("quantity").floatValue());
|
||||||
|
build.setWaitWeight(sumCurrTask.get("weight").floatValue());
|
||||||
|
|
||||||
|
HashMap<String, Double> sumTaskHis = taskDetHisService.getSumByIdCard(idenCardNum);
|
||||||
|
build.setFinishQuantity(sumTaskHis.get("quantity").floatValue());
|
||||||
|
build.setFinishWeight(sumTaskHis.get("weight").floatValue());
|
||||||
|
|
||||||
|
// 考虑返工单的加工情况,添加到返工统计信息中。
|
||||||
|
if (Objects.nonNull(one.getOldOrderNo()))
|
||||||
|
{
|
||||||
|
List<OrderInfo> list = orderInfoService.list(new QueryWrapper<OrderInfo>().eq(OrderInfo.VALID, 1).eq(OrderInfo.ORDER_NO, one.getOldOrderNo()));
|
||||||
|
float reQuantity = 0;
|
||||||
|
float reWeight = 0;
|
||||||
|
for (OrderInfo orderInfo : list)
|
||||||
|
{
|
||||||
|
HashMap<String, Double> reCurrTask = currTaskDetService.getSumByIdCard(orderInfo.getIdenCardNum());
|
||||||
|
reQuantity += reCurrTask.get("quantity").floatValue();
|
||||||
|
reWeight += reCurrTask.get("weight").floatValue();
|
||||||
|
|
||||||
|
HashMap<String, Double> reTaskHis = taskDetHisService.getSumByIdCard(orderInfo.getIdenCardNum());
|
||||||
|
reQuantity += reTaskHis.get("quantity").floatValue();
|
||||||
|
reWeight += reTaskHis.get("weight").floatValue();
|
||||||
|
}
|
||||||
|
build.setReProcessQuantity(reQuantity);
|
||||||
|
build.setReProcessWeight(reWeight);
|
||||||
|
}
|
||||||
|
|
||||||
return successful(build);
|
return successful(build);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R completeOrder(IdParam idParam) {
|
public void verifyTaskInfoByIdenCardNum(List<TaskCreateDetParam> detParams) {
|
||||||
|
for (TaskCreateDetParam detParam : detParams)
|
||||||
|
{
|
||||||
|
QueryWrapper<OrderInfo> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq(OrderInfo.IDEN_CARD_NUM, detParam.getIdenCardNum()).eq(OrderInfo.VALID, 1);
|
||||||
|
OrderInfo one = orderInfoService.getOne(wrapper);
|
||||||
|
Assert.notNull("错误,标识卡号" + detParam.getIdenCardNum() + "在订单中不存在!", one);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<String> completeOrder(IdParam idParam) {
|
||||||
OrderInfo byId = orderInfoService.getById(idParam.getId());
|
OrderInfo byId = orderInfoService.getById(idParam.getId());
|
||||||
orderInfoHisService.save(byId);
|
orderInfoHisService.save(byId);
|
||||||
byId.setValid(0);
|
byId.setValid(0);
|
||||||
byId.setStatus(2);
|
byId.setStatus(2);
|
||||||
orderInfoService.updateById(byId);
|
orderInfoService.updateById(byId);
|
||||||
return successful("操作成功。");
|
return successful("订单状态成功置为完成。");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R voidOrder(IdParam idParam) {
|
public R<String> voidOrder(IdParam idParam) {
|
||||||
OrderInfo byId = orderInfoService.getById(idParam.getId());
|
OrderInfo byId = orderInfoService.getById(idParam.getId());
|
||||||
byId.setValid(0);
|
byId.setValid(0);
|
||||||
orderInfoService.updateById(byId);
|
orderInfoService.updateById(byId);
|
||||||
return successful("操作成功。");
|
return successful("订单状态成功置为作废。");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R apmsVoidOrder(String idenCardNum) {
|
public R<String> apmsVoidOrder(String idenCardNum) {
|
||||||
OrderInfo byId = orderInfoService.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM, idenCardNum));
|
OrderInfo byId = orderInfoService.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM, idenCardNum));
|
||||||
//确定是否有订单在生产
|
//确定是否有订单在生产
|
||||||
List<CurrTaskDet> taskDetailsByIdenCardNum = currTaskDetService.getTaskDetailsByIdenCardNum(idenCardNum);
|
List<CurrTaskDet> taskDetailsByIdenCardNum = currTaskDetService.getTaskDetailsByIdenCardNum(idenCardNum);
|
||||||
@ -200,7 +267,19 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R apmsCompleteOrder(ApmsCompleteOrder apmsCompleteOrder) {
|
public R<String> apmsCompleteOrder(ApmsCompleteOrder apmsCompleteOrder) {
|
||||||
return null;
|
//通过标识卡号与生产单号进行更新检验结果
|
||||||
|
ApmsCheckResult one = new ApmsCheckResult();
|
||||||
|
one.setIdenCardNum(apmsCompleteOrder.getIdenCardNum());
|
||||||
|
one.setSheetNo(apmsCompleteOrder.getSheetNo());
|
||||||
|
one.setCreateTime(LocalDateTime.now());
|
||||||
|
one.setValid(WhetherEnum.YES.getValue());
|
||||||
|
one.setMetallography(apmsCompleteOrder.getMetallographic());
|
||||||
|
one.setHeartHardness(apmsCompleteOrder.getHeartHardness());
|
||||||
|
one.setHardness(apmsCompleteOrder.getHardness());
|
||||||
|
one.setUpdateTime(LocalDateTime.now());
|
||||||
|
apmsCheckResultServiceBiz.save(one);
|
||||||
|
//订单不应该在该地方完成,额外提供一个完成接口供人工完成,不通知apms
|
||||||
|
return successful("任务执行完成。");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,18 +3,25 @@ package com.mt.wms.empty.service.impl;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.mt.wms.core.base.BaseService;
|
import com.mt.wms.core.base.BaseService;
|
||||||
import com.mt.wms.core.dal.entity.CurrTaskDet;
|
import com.mt.wms.core.dal.entity.OrderInfo;
|
||||||
import com.mt.wms.core.dal.entity.TaskDetHis;
|
import com.mt.wms.core.dal.entity.TaskDetHis;
|
||||||
|
import com.mt.wms.core.dal.service.OrderInfoServiceBiz;
|
||||||
import com.mt.wms.core.dal.service.TaskDetHisServiceBiz;
|
import com.mt.wms.core.dal.service.TaskDetHisServiceBiz;
|
||||||
|
import com.mt.wms.core.params.IdParam;
|
||||||
import com.mt.wms.core.vo.PageVo;
|
import com.mt.wms.core.vo.PageVo;
|
||||||
import com.mt.wms.core.vo.R;
|
import com.mt.wms.core.vo.R;
|
||||||
|
import com.mt.wms.empty.params.CurrTaskDetQueryParam;
|
||||||
import com.mt.wms.empty.params.OrderInfoTaskDetParam;
|
import com.mt.wms.empty.params.OrderInfoTaskDetParam;
|
||||||
import com.mt.wms.empty.service.TaskDetHisService;
|
import com.mt.wms.empty.service.TaskDetHisService;
|
||||||
|
import com.mt.wms.empty.service.TaskHisService;
|
||||||
|
import com.mt.wms.empty.vo.CurrTaskVo;
|
||||||
import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
|
import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
|
||||||
|
import com.mt.wms.empty.vo.TaskHisDetVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30,27 +37,70 @@ public class TaskDetHisServiceImpl extends BaseService implements TaskDetHisServ
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
TaskDetHisServiceBiz taskDetHisServiceBiz;
|
TaskDetHisServiceBiz taskDetHisServiceBiz;
|
||||||
|
@Autowired
|
||||||
|
TaskHisService taskhisService;
|
||||||
|
@Autowired
|
||||||
|
OrderInfoServiceBiz orderInfoService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R save(TaskDetHis taskDetHis) {
|
public R<String> save(TaskDetHis taskDetHis) {
|
||||||
taskDetHisServiceBiz.save(taskDetHis);
|
taskDetHisServiceBiz.save(taskDetHis);
|
||||||
return successful("操作成功");
|
return successful("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R saveList(List<TaskDetHis> taskDetHis) {
|
public R<String> saveList(List<TaskDetHis> taskDetHis) {
|
||||||
taskDetHisServiceBiz.saveBatch(taskDetHis);
|
taskDetHisServiceBiz.saveBatch(taskDetHis);
|
||||||
return null;
|
return successful("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageVo<OrderInfoTaskDetVo> getHisOrderHisTask(OrderInfoTaskDetParam param) {
|
public PageVo<OrderInfoTaskDetVo> getHisOrderHisTask(OrderInfoTaskDetParam param) {
|
||||||
QueryWrapper<TaskDetHis> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<TaskDetHis> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq(CurrTaskDet.IDEN_CARD_NUM, param.getIdenCardNum())
|
queryWrapper.eq(TaskDetHis.IDEN_CARD_NUM, param.getIdenCardNum())
|
||||||
.eq(CurrTaskDet.ORDER_NO, param.getOrderNo())
|
.eq(TaskDetHis.ORDER_NO, param.getOrderNo())
|
||||||
.eq(CurrTaskDet.VALID, 1);
|
.eq(TaskDetHis.VALID, 1);
|
||||||
Page<TaskDetHis> page = taskDetHisServiceBiz.page(new Page<>(param.getCurrent(), param.getSize()), queryWrapper);
|
Page<TaskDetHis> page = taskDetHisServiceBiz.page(new Page<>(param.getCurrent(), param.getSize()), queryWrapper);
|
||||||
return new PageVo<>(page, OrderInfoTaskDetVo.class);
|
return new PageVo<>(page, OrderInfoTaskDetVo.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HashMap<String, Double> getSumByIdCard(String idCard) {
|
||||||
|
HashMap<String, Double> result = new HashMap<>(2);
|
||||||
|
QueryWrapper<TaskDetHis> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq(TaskDetHis.IDEN_CARD_NUM, idCard)
|
||||||
|
.eq(TaskDetHis.VALID, 1);
|
||||||
|
List<TaskDetHis> list = taskDetHisServiceBiz.list(queryWrapper);
|
||||||
|
list.forEach(e -> {
|
||||||
|
CurrTaskVo byId = taskhisService.getById(IdParam.builder().id(e.getTaskId()).build());
|
||||||
|
//如果加工类型是复加工,或者任务作废。移除对象
|
||||||
|
if (byId.getProcessType().equals(2) || byId.getValid() != 1)
|
||||||
|
{
|
||||||
|
list.remove(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//计算加工总数
|
||||||
|
double sumWeight = list.stream().mapToDouble(TaskDetHis::getWeight).sum();
|
||||||
|
double sumQuantity = list.stream().mapToDouble(TaskDetHis::getQuantity).sum();
|
||||||
|
result.put("weight", sumWeight);
|
||||||
|
result.put("quantity", sumQuantity);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<PageVo<TaskHisDetVo>> getTaskDetailsPage(CurrTaskDetQueryParam currTaskId) {
|
||||||
|
QueryWrapper<TaskDetHis> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq(TaskDetHis.TASK_ID, currTaskId.getCurrTaskId())
|
||||||
|
.eq(TaskDetHis.VALID, 1);
|
||||||
|
Page<TaskDetHis> page = taskDetHisServiceBiz.page(new Page<>(currTaskId.getCurrent(), currTaskId.getSize()), queryWrapper);
|
||||||
|
PageVo<TaskHisDetVo> taskHisDetVoPageVo = new PageVo<>(page, TaskHisDetVo.class);
|
||||||
|
taskHisDetVoPageVo.getRecords().forEach(
|
||||||
|
e -> {
|
||||||
|
OrderInfo one = orderInfoService.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM, e.getIdenCardNum()));
|
||||||
|
e.setProductModel(one.getProductModel());
|
||||||
|
e.setCustomer(one.getCustomerName());
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return successful(taskHisDetVoPageVo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,26 @@
|
|||||||
package com.mt.wms.empty.service.impl;
|
package com.mt.wms.empty.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.mt.wms.core.base.BaseService;
|
import com.mt.wms.core.base.BaseService;
|
||||||
import com.mt.wms.core.dal.entity.TaskHis;
|
import com.mt.wms.core.dal.entity.TaskHis;
|
||||||
import com.mt.wms.core.dal.service.TaskHisServiceBiz;
|
import com.mt.wms.core.dal.service.TaskHisServiceBiz;
|
||||||
import com.mt.wms.core.params.IdParam;
|
import com.mt.wms.core.params.IdParam;
|
||||||
import com.mt.wms.core.vo.IdVo;
|
import com.mt.wms.core.vo.IdVo;
|
||||||
|
import com.mt.wms.core.vo.PageVo;
|
||||||
import com.mt.wms.core.vo.R;
|
import com.mt.wms.core.vo.R;
|
||||||
|
import com.mt.wms.empty.params.TaskHisQueryParam;
|
||||||
import com.mt.wms.empty.service.TaskHisService;
|
import com.mt.wms.empty.service.TaskHisService;
|
||||||
import com.mt.wms.empty.vo.CurrTaskVo;
|
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.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务实现类
|
* 服务实现类
|
||||||
*
|
*
|
||||||
@ -41,4 +49,14 @@ public class TaskHisServiceImpl extends BaseService implements TaskHisService {
|
|||||||
BeanUtils.copyProperties(byId, build);
|
BeanUtils.copyProperties(byId, build);
|
||||||
return build;
|
return build;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<PageVo<TaskHisQueryVo>> taskHisPage(TaskHisQueryParam param) {
|
||||||
|
QueryWrapper<TaskHis> 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())
|
||||||
|
.eq(TaskHis.VALID, 1).orderByDesc(TaskHis.CREATE_TIME);
|
||||||
|
Page<TaskHis> page = taskHisService.page(new Page<>(param.getCurrent(), param.getSize()), queryWrapper);
|
||||||
|
return successful(new PageVo<>(page, TaskHisQueryVo.class));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
package com.mt.wms.empty.vo;
|
||||||
|
|
||||||
|
import com.mt.wms.core.base.BaseVo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xcc
|
||||||
|
* @date 2021年11月8日
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Builder
|
||||||
|
@ApiModel(value = "APMS返回创建生产单信息", description = "APMS返回创建生产单信息")
|
||||||
|
public class ApmsCreateProcessSheetVo extends BaseVo {
|
||||||
|
/**
|
||||||
|
* 返回消息,返回false时为失败原因
|
||||||
|
*/
|
||||||
|
private String msg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否成功
|
||||||
|
*/
|
||||||
|
private Boolean success;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产单编号,创建成功后返回,需要记录此生产单编号,加工过程处理及结束加工处理需要传入此生产单编号
|
||||||
|
*/
|
||||||
|
private String sheetNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回状态编码:00-正常,01-token失败,02-参数错误,03-其他错误
|
||||||
|
*/
|
||||||
|
private String statusCode;
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.mt.wms.empty.vo;
|
||||||
|
|
||||||
|
import com.mt.wms.core.base.BaseVo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xcc
|
||||||
|
* @date 2021年11月8日
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Builder
|
||||||
|
@ApiModel(value = "APMS返回生产单结束信息", description = "APMS返回生产单结束信息")
|
||||||
|
public class ApmsEndProcessVo extends BaseVo {
|
||||||
|
/**
|
||||||
|
* 返回消息,返回false时为失败原因
|
||||||
|
*/
|
||||||
|
private String msg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否成功
|
||||||
|
*/
|
||||||
|
private Boolean success;
|
||||||
|
/**
|
||||||
|
* 返回状态编码:00-正常,01-token失败,02-参数错误,03-其他错误
|
||||||
|
*/
|
||||||
|
private String statusCode;
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
package com.mt.wms.empty.vo;
|
||||||
|
|
||||||
|
import com.mt.wms.core.base.BaseVo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xcc
|
||||||
|
* @date 2021年11月8日
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Builder
|
||||||
|
@ApiModel(value = "APMS返回完成生产单信息", description = "APMS返回完成生产单信息")
|
||||||
|
public class ApmsFinishProcessSheetVo extends BaseVo {
|
||||||
|
/**
|
||||||
|
* 返回消息,返回false时为失败原因
|
||||||
|
*/
|
||||||
|
private String msg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否成功
|
||||||
|
*/
|
||||||
|
private Boolean success;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产单编号,创建成功后返回,需要记录此生产单编号,加工过程处理及结束加工处理需要传入此生产单编号
|
||||||
|
*/
|
||||||
|
private String sheetNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回状态编码:00-正常,01-token失败,02-参数错误,03-其他错误
|
||||||
|
*/
|
||||||
|
private String statusCode;
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.mt.wms.empty.vo;
|
||||||
|
|
||||||
|
import com.mt.wms.core.base.BaseVo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xcc
|
||||||
|
* @date 2021年11月8日
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Builder
|
||||||
|
@ApiModel(value = "APMS返回生产单开始信息", description = "APMS返回生产单开始信息")
|
||||||
|
public class ApmsStartProcessVo extends BaseVo {
|
||||||
|
/**
|
||||||
|
* 返回消息,返回false时为失败原因
|
||||||
|
*/
|
||||||
|
private String msg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否成功
|
||||||
|
*/
|
||||||
|
private Boolean success;
|
||||||
|
/**
|
||||||
|
* 返回状态编码:00-正常,01-token失败,02-参数错误,03-其他错误
|
||||||
|
*/
|
||||||
|
private String statusCode;
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
package com.mt.wms.empty.vo;
|
||||||
|
|
||||||
|
import com.mt.wms.core.base.BaseVo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xcc
|
||||||
|
* @date 2021年11月8日
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Builder
|
||||||
|
@ApiModel(value = "APMS返回窑炉信息", description = "APMS返回窑炉信息")
|
||||||
|
public class ApmsStoveVo extends BaseVo {
|
||||||
|
/**
|
||||||
|
* 返回消息,返回false时为失败原因
|
||||||
|
*/
|
||||||
|
private String msg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否成功
|
||||||
|
*/
|
||||||
|
private Boolean success;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回状态编码:00-正常,01-token失败,02-参数错误,03-其他错误
|
||||||
|
*/
|
||||||
|
private String statusCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车间炉号信息明细
|
||||||
|
*/
|
||||||
|
private ArrayList<Map<String, String>> stoveCodes;
|
||||||
|
}
|
@ -41,7 +41,10 @@ public class CurrTaskDetVo extends BaseVo implements PageVo.ConvertVo {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty("任务编码")
|
@ApiModelProperty("任务编码")
|
||||||
private String taskCode;
|
private String taskCode;
|
||||||
|
@ApiModelProperty("客户名")
|
||||||
|
private String customer;
|
||||||
|
@ApiModelProperty("订单名")
|
||||||
|
private String orderNo;
|
||||||
/**
|
/**
|
||||||
* 当前任务id,关联当前任务表:t_curr_task
|
* 当前任务id,关联当前任务表:t_curr_task
|
||||||
*/
|
*/
|
||||||
@ -53,6 +56,39 @@ public class CurrTaskDetVo extends BaseVo implements PageVo.ConvertVo {
|
|||||||
@ApiModelProperty("重量")
|
@ApiModelProperty("重量")
|
||||||
private Float weight;
|
private Float weight;
|
||||||
|
|
||||||
|
@ApiModelProperty("标识卡号")
|
||||||
|
private String idenCardNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("产品名称")
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料牌号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("材料牌号")
|
||||||
|
private String materialDes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品型号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("产品型号")
|
||||||
|
private String productModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺要求
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("工艺要求")
|
||||||
|
private String craftIll;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("单位")
|
||||||
|
private Float unit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数量,手动输入
|
* 数量,手动输入
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,80 @@
|
|||||||
|
package com.mt.wms.empty.vo;
|
||||||
|
|
||||||
|
import com.mt.wms.core.base.BaseVo;
|
||||||
|
import com.mt.wms.core.vo.PageVo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xcc
|
||||||
|
* @date 2021年11月8日
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Builder
|
||||||
|
@ApiModel(value = "首页当前任务信息", description = "首页当前任务信息")
|
||||||
|
public class CurrTaskMainQueryVo extends BaseVo implements PageVo.ConvertVo {
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务编码, 查看任务编码规则
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("任务编码")
|
||||||
|
private String taskCode;
|
||||||
|
/**
|
||||||
|
* 标识卡集
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("标识卡集")
|
||||||
|
private ArrayList<String> idens;
|
||||||
|
/**
|
||||||
|
* 物料集 材料集?
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("物料集")
|
||||||
|
private ArrayList<String> materials;
|
||||||
|
/**
|
||||||
|
* 客户集
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("客户集")
|
||||||
|
private ArrayList<String> customers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态: 0等待执行,1执行中,2执行完成,3追加后完成(追加后就按完成来算)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("任务类型")
|
||||||
|
private Integer taskType;
|
||||||
|
/**
|
||||||
|
* 开始位置
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("开始位置")
|
||||||
|
private String startPosition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目标位置指的是窑炉的位置
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("窑炉位置")
|
||||||
|
private String targetPosition;
|
||||||
|
/**
|
||||||
|
* 库位
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("库位")
|
||||||
|
private String locationName;
|
||||||
|
/**
|
||||||
|
* 窑炉名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("窑炉名称")
|
||||||
|
private String kilnName;
|
||||||
|
}
|
@ -51,12 +51,31 @@ public class CurrTaskQueryVo extends BaseVo implements PageVo.ConvertVo {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty("任务类型")
|
@ApiModelProperty("任务类型")
|
||||||
private Integer taskType;
|
private Integer taskType;
|
||||||
|
/**
|
||||||
|
* 开始加工时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("开始加工时间")
|
||||||
|
private LocalDateTime aBeginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加工完成时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("加工完成时间")
|
||||||
|
private LocalDateTime aEndTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("窑炉工艺号")
|
||||||
|
private String craftCode;
|
||||||
/**
|
/**
|
||||||
* 开始位置
|
* 开始位置
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("开始位置")
|
@ApiModelProperty("开始位置")
|
||||||
private String startPosition;
|
private String startPosition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产单号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("生产单号")
|
||||||
|
private String sheetNo;
|
||||||
/**
|
/**
|
||||||
* 目标位置指的是窑炉的位置
|
* 目标位置指的是窑炉的位置
|
||||||
*/
|
*/
|
||||||
|
@ -25,6 +25,14 @@ import java.time.LocalDateTime;
|
|||||||
public class CurrTaskVo extends BaseVo implements PageVo.ConvertVo {
|
public class CurrTaskVo extends BaseVo implements PageVo.ConvertVo {
|
||||||
@ApiModelProperty(value = "id")
|
@ApiModelProperty(value = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志,是否有效:1 可用 0不可用,2停止
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("删除标志")
|
||||||
|
private Integer valid;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态: 0等待执行,1执行中,2执行完成,3追加后完成(追加后就按完成来算)
|
* 状态: 0等待执行,1执行中,2执行完成,3追加后完成(追加后就按完成来算)
|
||||||
*/
|
*/
|
||||||
@ -55,6 +63,12 @@ public class CurrTaskVo extends BaseVo implements PageVo.ConvertVo {
|
|||||||
@ApiModelProperty("任务类型")
|
@ApiModelProperty("任务类型")
|
||||||
private Integer taskType;
|
private Integer taskType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加工类型:0 初始加工,1 复加工 ,2 追加加工
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("任务类型")
|
||||||
|
private Integer processType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 托盘编码
|
* 托盘编码
|
||||||
*/
|
*/
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package com.mt.wms.empty.vo;
|
package com.mt.wms.empty.vo;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import com.mt.wms.core.base.BaseVo;
|
import com.mt.wms.core.base.BaseVo;
|
||||||
import com.mt.wms.core.base.ITree;
|
|
||||||
import com.mt.wms.core.vo.PageVo;
|
import com.mt.wms.core.vo.PageVo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -11,9 +9,7 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -43,18 +39,6 @@ public class OrderInfoVo extends BaseVo implements PageVo.ConvertVo {
|
|||||||
@ApiModelProperty(value = "添加时间")
|
@ApiModelProperty(value = "添加时间")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建人id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "创建人id")
|
|
||||||
private Integer creatorId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新人id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "更新人id")
|
|
||||||
private Integer updaterId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同
|
* 修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同
|
||||||
*/
|
*/
|
||||||
@ -65,13 +49,6 @@ public class OrderInfoVo extends BaseVo implements PageVo.ConvertVo {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "状态")
|
@ApiModelProperty(value = "状态")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
/**
|
|
||||||
* 内部编码,系统自动生成
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "内部编码")
|
|
||||||
private String interCode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编码
|
* 编码
|
||||||
*/
|
*/
|
||||||
@ -143,4 +120,41 @@ public class OrderInfoVo extends BaseVo implements PageVo.ConvertVo {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "数量")
|
@ApiModelProperty(value = "数量")
|
||||||
private Float quantity;
|
private Float quantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "完成加工重量")
|
||||||
|
private Float finishWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "完成加工数量")
|
||||||
|
private Float finishQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待加工重量 任务创建等待中
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "等待重量")
|
||||||
|
private Float waitWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待加工数量 任务创建等待中
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "等待数量")
|
||||||
|
private Float waitQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返工重量 返工单中计算的值
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "返工重量")
|
||||||
|
private Float reProcessWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返工数量 返工单中计算的值
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "返工数量")
|
||||||
|
private Float reProcessQuantity;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,97 @@
|
|||||||
|
package com.mt.wms.empty.vo;
|
||||||
|
|
||||||
|
import com.mt.wms.core.base.BaseVo;
|
||||||
|
import com.mt.wms.core.vo.PageVo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xcc
|
||||||
|
* @date 2021年11月8日
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Builder
|
||||||
|
@ApiModel(value = "任务详细信息", description = "用于返回任务详细信息")
|
||||||
|
public class TaskHisDetVo extends BaseVo implements PageVo.ConvertVo {
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态: 0等待执行
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private Integer status;
|
||||||
|
/**
|
||||||
|
* 任务编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("任务编码")
|
||||||
|
private String taskCode;
|
||||||
|
@ApiModelProperty("客户名")
|
||||||
|
private String customer;
|
||||||
|
@ApiModelProperty("订单名")
|
||||||
|
private String orderNo;
|
||||||
|
/**
|
||||||
|
* 历史任务id,关联当前任务表:t_task_his
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("历史任务id")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
@ApiModelProperty("标识卡号")
|
||||||
|
private String idenCardNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("产品名称")
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料牌号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("材料牌号")
|
||||||
|
private String materialDes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品型号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("产品型号")
|
||||||
|
private String productModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺要求
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("工艺要求")
|
||||||
|
private String craftIll;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("单位")
|
||||||
|
private Float unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重量,手动输入
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("重量")
|
||||||
|
private Float weight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量,手动输入
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("数量")
|
||||||
|
private Float quantity;
|
||||||
|
}
|
@ -0,0 +1,79 @@
|
|||||||
|
package com.mt.wms.empty.vo;
|
||||||
|
|
||||||
|
import com.mt.wms.core.base.BaseVo;
|
||||||
|
import com.mt.wms.core.vo.PageVo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xcc
|
||||||
|
* @date 2021年11月8日
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Builder
|
||||||
|
@ApiModel(value = "历史任务信息", description = "历史任务信息")
|
||||||
|
public class TaskHisQueryVo extends BaseVo implements PageVo.ConvertVo {
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务编码, 查看任务编码规则
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("任务编码")
|
||||||
|
private String taskCode;
|
||||||
|
/**
|
||||||
|
* 发起任务时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("发起时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
/**
|
||||||
|
* 任务来源, 暂时只有人工
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("任务来源")
|
||||||
|
private String taskSource;
|
||||||
|
/**
|
||||||
|
* 状态: 0等待执行,1执行中,2执行完成,3追加后完成(追加后就按完成来算)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private Integer status;
|
||||||
|
/**
|
||||||
|
* 任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("任务类型")
|
||||||
|
private Integer taskType;
|
||||||
|
/**
|
||||||
|
* 开始位置
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("开始位置")
|
||||||
|
private String startPosition;
|
||||||
|
/**
|
||||||
|
* 开始加工时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("开始加工时间")
|
||||||
|
private LocalDateTime aBeginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加工完成时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("加工完成时间")
|
||||||
|
private LocalDateTime aEndTime;
|
||||||
|
/**
|
||||||
|
* 目标位置指的是窑炉的位置
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("窑炉位置")
|
||||||
|
private String targetPosition;
|
||||||
|
/**
|
||||||
|
* 车辆名称,关联车辆表:t_vehicle_info
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("车辆名称")
|
||||||
|
private String vehicleName;
|
||||||
|
}
|
@ -88,6 +88,7 @@ wms:
|
|||||||
- /*/login
|
- /*/login
|
||||||
- /*/wechatLogin
|
- /*/wechatLogin
|
||||||
- /*/mobileLogin
|
- /*/mobileLogin
|
||||||
|
- /apms
|
||||||
|
|
||||||
#公共配置
|
#公共配置
|
||||||
common:
|
common:
|
||||||
|
Loading…
Reference in New Issue
Block a user