mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
新增生产单导入异步处理
This commit is contained in:
+7
-1
@@ -1,8 +1,14 @@
|
||||
package com.cf.imes.module.plan.enums;
|
||||
|
||||
import com.cf.imes.framework.common.exception.ErrorCode;
|
||||
|
||||
/**
|
||||
* @author there
|
||||
* 生产计划服务错误码枚举 使用 1-005-000-000 段
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
public class ErrorCodeConstants {
|
||||
// ========== 生产单导入 1_005_000 ==========
|
||||
public static final ErrorCode ORDER_IMPORT_PLATE_GOODS_NOT_EXISTS = new ErrorCode(1_005_000_000, "{}小板数据不存在:{}");
|
||||
public static final ErrorCode ORDER_IMPORT_ORGANID_NOT_EXISTS = new ErrorCode(1_005_000_001, "不存在组织id,导入终止");
|
||||
public static final ErrorCode ORDER_IMPORT_FAIL = new ErrorCode(1_005_000_002, "导入失败");
|
||||
}
|
||||
|
||||
@@ -68,6 +68,23 @@
|
||||
<artifactId>cf-spring-boot-starter-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-elasticsearch</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>jakarta.json</groupId>
|
||||
<artifactId>jakarta.json-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.json</groupId>
|
||||
<artifactId>jakarta.json-api</artifactId>
|
||||
<version>2.1.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-redis</artifactId>
|
||||
@@ -127,6 +144,21 @@
|
||||
<artifactId>cf-spring-boot-starter-file</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-mq</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-module-prod-executor-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-biz-id</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -138,6 +170,87 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<configuration>
|
||||
<layout>ZIP</layout>
|
||||
<includes>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-common</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-module-infra-api</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-module-prod-plan-api</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-module-system-api</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-banner</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-biz-error-code</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-biz-operatelog</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-biz-organ</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-excel</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-monitor</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-mybatis</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-redis</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-rpc</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-security</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-web</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-mq</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-elasticsearch</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-module-prod-executor-api</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-biz-id</artifactId>
|
||||
</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -156,12 +269,12 @@
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<!-- 将依赖放到target/lib目录下 -->
|
||||
<outputDirectory>target/lib</outputDirectory>
|
||||
<!-- 排除自身的代码包-->
|
||||
<excludeGroupIds>com.cf.imes</excludeGroupIds>
|
||||
</configuration>
|
||||
<!-- <configuration>-->
|
||||
<!-- <!– 将依赖放到target/lib目录下 –>-->
|
||||
<!-- <outputDirectory>target/lib</outputDirectory>-->
|
||||
<!-- <!– 排除自身的代码包–>-->
|
||||
<!-- <excludeGroupIds>com.cf.imes</excludeGroupIds>-->
|
||||
<!-- </configuration>-->
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Gqr
|
||||
* @since 2025/1/15 16:59
|
||||
*/
|
||||
@Schema(description = "管理后台 - 生产单导入临时数据 Request VO")
|
||||
@Data
|
||||
@Builder
|
||||
public class OrderImportTempDataReqVO {
|
||||
/**
|
||||
* 导入任务id
|
||||
*/
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 临时数据类型,参考OrderImportTmpDataTypeEnum
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String goodsId;
|
||||
|
||||
/**
|
||||
* 是否做分页
|
||||
*/
|
||||
private boolean doPaging;
|
||||
|
||||
/**
|
||||
* 偏移量 (page - 1) * pageSize
|
||||
*/
|
||||
private int offset;
|
||||
|
||||
/**
|
||||
* 页大小
|
||||
*/
|
||||
private int size;
|
||||
|
||||
/**
|
||||
* 房间名称
|
||||
*/
|
||||
private String roomName;
|
||||
|
||||
/**
|
||||
* 柜体名称
|
||||
*/
|
||||
private String bodyName;
|
||||
|
||||
/**
|
||||
* 加工组类型
|
||||
*/
|
||||
private String groupTypeName;
|
||||
|
||||
/**
|
||||
* 模块名称
|
||||
*/
|
||||
private String groupName;
|
||||
}
|
||||
+181
@@ -0,0 +1,181 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 生产单 Excel 导入 VO
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = false) // 设置 chain = false,避免生产单导入有问题
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class OrderPlateImportExcelVO {
|
||||
|
||||
@JsonIgnore
|
||||
private String ordinal;
|
||||
|
||||
@JsonIgnore
|
||||
private String goodType;
|
||||
|
||||
@JsonIgnore
|
||||
private String goodsId;
|
||||
|
||||
@JsonIgnore
|
||||
private Long goodId; // 商品id
|
||||
|
||||
@JsonIgnore
|
||||
private String goodsName;
|
||||
|
||||
@JsonIgnore
|
||||
private String material;
|
||||
|
||||
@JsonIgnore
|
||||
private String wave;
|
||||
|
||||
@JsonIgnore
|
||||
private String color;
|
||||
|
||||
@JsonIgnore
|
||||
private String isComposite;
|
||||
|
||||
@JsonIgnore
|
||||
private String category;
|
||||
|
||||
@JsonIgnore
|
||||
private String type;
|
||||
|
||||
@JsonIgnore
|
||||
private String factory;
|
||||
|
||||
@JsonIgnore
|
||||
private String brand;
|
||||
|
||||
@JsonIgnore
|
||||
private String model;
|
||||
|
||||
@JsonIgnore
|
||||
private String goodsHeight;
|
||||
|
||||
@JsonIgnore
|
||||
private String goodsWidth;
|
||||
|
||||
@JsonIgnore
|
||||
private String goodsThickness;
|
||||
|
||||
@JsonIgnore
|
||||
private String spec;
|
||||
|
||||
@JsonIgnore
|
||||
private String unit;
|
||||
|
||||
@NotNull
|
||||
@JsonIgnore
|
||||
private String goodsNumber;
|
||||
|
||||
@JsonIgnore
|
||||
private String roomsName;
|
||||
|
||||
@JsonIgnore
|
||||
private String cabinetsName;
|
||||
|
||||
@JsonIgnore
|
||||
private String synthesisTypeName; // 加工组类型的名称
|
||||
|
||||
@JsonIgnore
|
||||
private String combinationName;
|
||||
|
||||
@JsonIgnore
|
||||
private String name;
|
||||
|
||||
@JsonIgnore
|
||||
private String plateNo;
|
||||
|
||||
@JsonIgnore
|
||||
private String height;
|
||||
|
||||
@JsonIgnore
|
||||
private String width;
|
||||
|
||||
@JsonIgnore
|
||||
private String splitHeight;
|
||||
|
||||
@JsonIgnore
|
||||
private String splitWidth;
|
||||
|
||||
@JsonIgnore
|
||||
private String thickness;
|
||||
|
||||
@JsonIgnore
|
||||
private String sealLeft;
|
||||
|
||||
@JsonIgnore
|
||||
private String sealRight;
|
||||
|
||||
@JsonIgnore
|
||||
private String sealUp;
|
||||
|
||||
@JsonIgnore
|
||||
private String sealDown;
|
||||
|
||||
@JsonIgnore
|
||||
private String typographicFace;
|
||||
|
||||
@JsonIgnore
|
||||
private String texture;
|
||||
|
||||
@JsonIgnore
|
||||
private String openDoorType;
|
||||
|
||||
@JsonIgnore
|
||||
private String result;
|
||||
|
||||
private String remark1;
|
||||
|
||||
private String remark2;
|
||||
|
||||
private String remark3;
|
||||
|
||||
private String remark4;
|
||||
|
||||
private String remark5;
|
||||
|
||||
private String remark6;
|
||||
|
||||
private String remark7;
|
||||
|
||||
private String remark8;
|
||||
|
||||
private String remark9;
|
||||
|
||||
private String remark10;
|
||||
|
||||
private String remark;
|
||||
|
||||
@JsonIgnore
|
||||
private Double area; // 面积
|
||||
|
||||
// 备注转json数据
|
||||
public String remarkJSON() {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
// 设置实体类字段的值
|
||||
try {
|
||||
String json = objectMapper.writeValueAsString(this);
|
||||
return json;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.goods;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 生产单商品 DO
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@TableName("order_goods")
|
||||
@KeySequence("order_goods_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class GoodsDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
// 组织 ID
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long organId;
|
||||
/**
|
||||
* 生产单号
|
||||
*/
|
||||
private Long orderId;
|
||||
/**
|
||||
* 设计端商品ID
|
||||
*/
|
||||
private String rawGoodsId;
|
||||
/**
|
||||
* 商品 ID
|
||||
*/
|
||||
private String goodsId;
|
||||
/**
|
||||
* 排单 ID
|
||||
*/
|
||||
private Long planId;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
/**
|
||||
* 材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板
|
||||
*/
|
||||
private String material;
|
||||
/**
|
||||
* 纹路 0 正纹 1 可翻转 2 反纹
|
||||
*/
|
||||
private Boolean texture;
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
/**
|
||||
* 背面颜色
|
||||
*/
|
||||
private String colorBlack;
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
private BigDecimal width;
|
||||
/**
|
||||
* 高度
|
||||
*/
|
||||
private BigDecimal height;
|
||||
/**
|
||||
* 厚度
|
||||
*/
|
||||
private BigDecimal thickness;
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private Double price;
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String brand;
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String spec;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.order;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.cf.imes.framework.mybatis.core.type.CompressStringTypeHandler;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 生产单表 order_{N} DO
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@TableName(value = "`orders`", autoResultMap = true)
|
||||
@KeySequence("order_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 生产单号,主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
// 组织 ID
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long organId;
|
||||
|
||||
/**
|
||||
* 父单号
|
||||
*/
|
||||
private Long parentNo;
|
||||
/**
|
||||
* 源生产单号
|
||||
*/
|
||||
private String apiOrderId;
|
||||
/**
|
||||
* 生产单日期
|
||||
*/
|
||||
private LocalDateTime orderDate;
|
||||
/**
|
||||
* 交付日期
|
||||
*/
|
||||
private LocalDateTime deliveryDate;
|
||||
/**
|
||||
* 生产单的完成时间
|
||||
*/
|
||||
private LocalDateTime finishTime;
|
||||
/**
|
||||
* 生产单类型,1主单 2子单
|
||||
*/
|
||||
private Integer orderType;
|
||||
/**
|
||||
* 生产单排序号
|
||||
*/
|
||||
private Integer orderSort;
|
||||
/**
|
||||
* 数据类型,0文件导入 1API 2数据源
|
||||
*/
|
||||
private Integer dataType;
|
||||
/**
|
||||
* 订单状态,0空订单1新单2已排单3生产中4生产完成
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 打包状态:0未打包1打包中2已打包
|
||||
*/
|
||||
private Integer packaged;
|
||||
/**
|
||||
* 自定义单号
|
||||
*/
|
||||
private String customOrderNo;
|
||||
/**
|
||||
* 客户
|
||||
*/
|
||||
private String customer;
|
||||
/**
|
||||
* 客户地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 客户电话
|
||||
*/
|
||||
private String phoneNumber;
|
||||
/**
|
||||
* 经销商
|
||||
*/
|
||||
private String dealer;
|
||||
/**
|
||||
* 经销商电话
|
||||
*/
|
||||
private String dealerPhoneNumber;
|
||||
/**
|
||||
* 业务员
|
||||
*/
|
||||
private String salesman;
|
||||
/**
|
||||
* 拆单员
|
||||
*/
|
||||
private String splitter;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
/**
|
||||
* 自定义板编号配置id
|
||||
*/
|
||||
@TableField(value = "custom_plateno_config_id")
|
||||
private Long customPlatenoConfigId;
|
||||
|
||||
/**
|
||||
* 自定义板编号序号
|
||||
*/
|
||||
@TableField(value = "custom_plateno_seq", typeHandler = CompressStringTypeHandler.class)
|
||||
private String customPlatenoSeq;
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.orderBody;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 生产单柜体 DO
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@TableName("order_body")
|
||||
@KeySequence("order_body_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderBodyDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 模块 ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
// 组织 ID
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long organId;
|
||||
/**
|
||||
* 生产单号
|
||||
*/
|
||||
private Long orderId;
|
||||
/**
|
||||
* 房间ID,后端生成
|
||||
*/
|
||||
private Long roomId;
|
||||
/**
|
||||
* 房间名称
|
||||
*/
|
||||
private String roomName;
|
||||
/**
|
||||
* 模块名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 模块宽度
|
||||
*/
|
||||
private Double width;
|
||||
/**
|
||||
* 模块高度
|
||||
*/
|
||||
private Double height;
|
||||
/**
|
||||
* 模块深度
|
||||
*/
|
||||
private Double depth;
|
||||
/**
|
||||
* 模块复制数量
|
||||
*/
|
||||
private Integer multiNum;
|
||||
/**
|
||||
* 板材数量
|
||||
*/
|
||||
private Integer plateNum;
|
||||
/**
|
||||
* 异型数量
|
||||
*/
|
||||
private Integer unregularNum;
|
||||
|
||||
/**
|
||||
* 文件名
|
||||
*/
|
||||
private String filename;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean deleted;
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.orderGroup;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 生产单加工组 DO
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@TableName("order_group")
|
||||
@KeySequence("order_group_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderGroupDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 模块 ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
// 组织 ID
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long organId;
|
||||
/**
|
||||
* 生产单号
|
||||
*/
|
||||
private Long orderId;
|
||||
/**
|
||||
* 柜体ID,上表中ID
|
||||
*/
|
||||
private Long bodyId;
|
||||
/**
|
||||
* 加工组类型id,依据同一生产单的同一房间的同一柜体的相同加工组类型,由服务端生成
|
||||
*/
|
||||
private Long groupTypeId;
|
||||
/**
|
||||
* 加工组类型
|
||||
*/
|
||||
private String groupTypeName;
|
||||
/**
|
||||
* 模块名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 加工组宽度
|
||||
*/
|
||||
private Double width;
|
||||
/**
|
||||
* 加工组高度
|
||||
*/
|
||||
private Double height;
|
||||
/**
|
||||
* 加工组深度
|
||||
*/
|
||||
private Double depth;
|
||||
/**
|
||||
* 模块复制数量
|
||||
*/
|
||||
private Integer multiNum;
|
||||
/**
|
||||
* 板材数量
|
||||
*/
|
||||
private Integer plateNum;
|
||||
/**
|
||||
* 异型数量
|
||||
*/
|
||||
private Integer unregularNum;
|
||||
/**
|
||||
* 文件名
|
||||
*/
|
||||
private String filename;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.orderImport;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 生产单导入任务
|
||||
*
|
||||
* @author Gqr
|
||||
* @since 2025/1/9 11:30
|
||||
*/
|
||||
@TableName("order_import_task")
|
||||
@KeySequence("order_import_task_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderImportTaskDO extends BaseDO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long organId;
|
||||
|
||||
/**
|
||||
* 生产单id
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 导入类型,参考OrderImportTypeEnum
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 导入状态
|
||||
*/
|
||||
private Integer importStatus;
|
||||
|
||||
/**
|
||||
* 消费状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 导入结果0
|
||||
*/
|
||||
private String result;
|
||||
}
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.orderImport;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 生产单导入临时表
|
||||
*
|
||||
* @author Gqr
|
||||
* @since 2025/1/9 11:36
|
||||
*/
|
||||
@TableName("order_import_temp_data")
|
||||
@KeySequence("order_import_temp_data_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderImportTempDataDO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long organId;
|
||||
|
||||
/**
|
||||
* 导入任务id
|
||||
*/
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 生产单id(补板用)
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String outerGoodsId;
|
||||
|
||||
/**
|
||||
* imes商品id
|
||||
*/
|
||||
private String innerGoodsId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
|
||||
/**
|
||||
* 材料
|
||||
*/
|
||||
private String material;
|
||||
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
|
||||
/**
|
||||
* 纹路
|
||||
*/
|
||||
private String wave;
|
||||
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
private String width;
|
||||
|
||||
/**
|
||||
* 长度
|
||||
*/
|
||||
private String height;
|
||||
|
||||
/**
|
||||
* 厚度
|
||||
*/
|
||||
private String thickness;
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String brand;
|
||||
|
||||
/**
|
||||
* 是否复合部件
|
||||
*/
|
||||
@TableField("is_composite")
|
||||
private String isComposite;
|
||||
|
||||
/**
|
||||
* 配件主类
|
||||
*/
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 配件子类型
|
||||
*/
|
||||
private String subType;
|
||||
|
||||
/**
|
||||
* 厂家
|
||||
*/
|
||||
private String factory;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* 型号
|
||||
*/
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 房间名称
|
||||
*/
|
||||
private String roomName;
|
||||
|
||||
/**
|
||||
* 柜体名称
|
||||
*/
|
||||
private String bodyName;
|
||||
|
||||
/**
|
||||
* 加工组类型
|
||||
*/
|
||||
private String groupTypeName;
|
||||
|
||||
/**
|
||||
* 模块名称
|
||||
*/
|
||||
private String groupName;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Double num;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String creater;
|
||||
|
||||
/**
|
||||
* 导入数据明细
|
||||
*/
|
||||
private String detail;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
private int sort;
|
||||
}
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.orderImport;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Gqr
|
||||
* @since 2025/1/15 16:49
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderImportTempDataGoodsGroupDO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -1853615166652757427L;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
private int sortn;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
|
||||
/**
|
||||
* 材料
|
||||
*/
|
||||
private String material;
|
||||
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
|
||||
/**
|
||||
* 纹路
|
||||
*/
|
||||
private String wave;
|
||||
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
private String width;
|
||||
|
||||
/**
|
||||
* 长度
|
||||
*/
|
||||
private String height;
|
||||
|
||||
/**
|
||||
* 厚度
|
||||
*/
|
||||
private String thickness;
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String brand;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String spec;
|
||||
|
||||
private String isComposite;
|
||||
|
||||
/**
|
||||
* 配件主类
|
||||
*/
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 配件子类型
|
||||
*/
|
||||
private String subType;
|
||||
|
||||
/**
|
||||
* 厂家
|
||||
*/
|
||||
private String factory;
|
||||
|
||||
/**
|
||||
* 型号
|
||||
*/
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 房间名称
|
||||
*/
|
||||
private String roomName;
|
||||
|
||||
/**
|
||||
* 柜体名称
|
||||
*/
|
||||
private String bodyName;
|
||||
|
||||
/**
|
||||
* 柜体板件数
|
||||
*/
|
||||
private int bodyPlateNum;
|
||||
|
||||
/**
|
||||
* 加工组类型
|
||||
*/
|
||||
private String groupTypeName;
|
||||
|
||||
/**
|
||||
* 模块名称
|
||||
*/
|
||||
private String groupName;
|
||||
|
||||
/**
|
||||
* 加工组板件数
|
||||
*/
|
||||
private int groupNameNum;
|
||||
|
||||
/**
|
||||
* 统计总数
|
||||
*/
|
||||
private int count;
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.orderImport;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Gqr
|
||||
* @since 2025/1/15 16:49
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderImportTempDataGoodsIdGroupDO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -1853615166652757427L;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
private int sortn;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String outerGoodsId;
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.orderItem;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 生产单明细表 order_item DO
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@TableName("order_item")
|
||||
@KeySequence("order_item_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderItemDO {
|
||||
|
||||
/**
|
||||
* 明细编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 生产单号
|
||||
*/
|
||||
private Long orderId;
|
||||
/**
|
||||
* 明细类型,1 板材 2 五金/配件 3 其他 4 报价配件
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 房间 ID
|
||||
*/
|
||||
private Long roomId;
|
||||
/**
|
||||
* 柜体 ID
|
||||
*/
|
||||
private Long bodyId;
|
||||
/**
|
||||
* 排单 ID
|
||||
*/
|
||||
private Long planId;
|
||||
/**
|
||||
* 包裹 ID
|
||||
*/
|
||||
private Long packageId;
|
||||
/**
|
||||
* 加工组 ID
|
||||
*/
|
||||
private Long groupId;
|
||||
/**
|
||||
* 生产单板件id
|
||||
*/
|
||||
private Long plateId;
|
||||
/**
|
||||
* 五金配件id
|
||||
*/
|
||||
private Long partsId;
|
||||
/**
|
||||
* 部件数量
|
||||
*/
|
||||
private Double num;
|
||||
// 组织 ID
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long organId;
|
||||
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.orderParts;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 生产单配件表 order_parts_{N} DO
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@TableName("order_parts")
|
||||
@KeySequence("order_parts_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderPartsDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 配件 ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
// 组织 ID
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long organId;
|
||||
/**
|
||||
* 生产单号
|
||||
*/
|
||||
private Long orderId;
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private String goodsId;
|
||||
/**
|
||||
* 配件名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
/**
|
||||
* 材质
|
||||
*/
|
||||
private String material;
|
||||
/**
|
||||
* 配件类型
|
||||
*/
|
||||
private String category;
|
||||
/**
|
||||
* 配件子类
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
private Double width;
|
||||
/**
|
||||
* 长度
|
||||
*/
|
||||
private Double length;
|
||||
/**
|
||||
* 厚度
|
||||
*/
|
||||
private Double thickness;
|
||||
/**
|
||||
* 型号
|
||||
*/
|
||||
private String model;
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String spec;
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String brand;
|
||||
/**
|
||||
* 厂家
|
||||
*/
|
||||
private String factory;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private Double price;
|
||||
/**
|
||||
* 是否复合部件:0 否 1 是
|
||||
*/
|
||||
private Boolean isComposite;
|
||||
/**
|
||||
* 子配件ID列表,复合部件时记录子配件ID,半角逗号分隔
|
||||
*/
|
||||
private String subparts;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.orderParts;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 配件表 parts_{N} DO
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@TableName("parts")
|
||||
@KeySequence("parts_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PartsDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 配件 ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long organId;
|
||||
/**
|
||||
* 设计端商品ID
|
||||
*/
|
||||
private String goodsId;
|
||||
/**
|
||||
* 配件名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板
|
||||
*/
|
||||
private String material;
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
/**
|
||||
* 配件类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 配件主类
|
||||
*/
|
||||
private String category;
|
||||
/**
|
||||
* 型号
|
||||
*/
|
||||
private String model;
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
private Double width;
|
||||
/**
|
||||
* 长度
|
||||
*/
|
||||
private Double length;
|
||||
/**
|
||||
* 厚度
|
||||
*/
|
||||
private Double thickness;
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String spec;
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String brand;
|
||||
/**
|
||||
* 厂家
|
||||
*/
|
||||
private String factory;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
/**
|
||||
* 是否复合部件:0 否 1 是
|
||||
*/
|
||||
private Boolean isComposite;
|
||||
/**
|
||||
* 子配件ID列表,复合部件时记录子配件ID,半角逗号分隔
|
||||
*/
|
||||
private String subparts;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.ordermodel;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cf.imes.framework.es.core.dal.ESDocument;
|
||||
import com.cf.imes.module.plan.dal.elasticsearch.BasePosition;
|
||||
import com.cf.imes.module.plan.dal.elasticsearch.HoleDetail;
|
||||
import com.cf.imes.module.plan.dal.elasticsearch.ModelDetail;
|
||||
import com.cf.imes.module.plan.dal.elasticsearch.PartsInfo;
|
||||
import com.cf.imes.module.plan.dal.elasticsearch.PointDetail;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Beal
|
||||
* 生产单 小板的轮廓数据对象
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OrderModelDO extends ESDocument {
|
||||
/*@Schema(description = "组织id")
|
||||
private Long organId;*/
|
||||
@Schema(description = "生产单id")
|
||||
private Long orderId;
|
||||
@Schema(description = "小板id")
|
||||
private Long plateId;
|
||||
|
||||
@Schema(description = "大板的实际ID")
|
||||
private String goodsId;
|
||||
|
||||
@Schema(description = "大板的分类ID")
|
||||
private Long plateGoodsId;
|
||||
|
||||
@Schema(description = "是否已优化")
|
||||
private Boolean isOptimized;
|
||||
|
||||
@Schema(description = "房间的基点坐标")
|
||||
private BasePosition roomBasePosition; // 板件基准点坐标
|
||||
@Schema(description = "柜体的基点坐标")
|
||||
private BasePosition bodyBasePosition; // 板件基准点坐标
|
||||
@Schema(description = "板件的基点坐标")
|
||||
private BasePosition plateBasePosition; // 板件基准点坐标
|
||||
|
||||
@Schema(description = "纹路 纹路(0正纹1可翻转2反纹)")
|
||||
private Integer texture;
|
||||
@Schema(description = "排版面 排钻类型(0正面1反面2随意面)")
|
||||
private Integer typographicFace;
|
||||
@Schema(description = "开门类型 0非门板,1左开,2右开,3上翻,4下翻")
|
||||
private Integer openDoorType; // 字典转换
|
||||
@Schema(description = "小板类型")
|
||||
private String boardType;
|
||||
|
||||
@Schema(description = "板件配件信息")
|
||||
private List<PartsInfo> partsInfos;
|
||||
|
||||
@Schema(description = "开料长")
|
||||
private BigDecimal splitLength;
|
||||
@Schema(description = "开料宽")
|
||||
private BigDecimal splitWidth;
|
||||
|
||||
|
||||
@Schema(description = "偏移量X")
|
||||
private BigDecimal offsetX;
|
||||
@Schema(description = "偏移量Y")
|
||||
private BigDecimal offsetY;
|
||||
|
||||
@Schema(description = "是否有二维刀路")
|
||||
private Boolean has2DModel;
|
||||
@Schema(description = "是否有三维刀路")
|
||||
private Boolean has3DModel;
|
||||
|
||||
@Schema(description = "点明细,表示小板外围轮廓的几个转折点(不含封边)")
|
||||
private List<PointDetail> pointDetail;
|
||||
@Schema(description = "原始点明细列表")
|
||||
private List<PointDetail> rawPointDetail;
|
||||
@Schema(description = "坯料点明细")
|
||||
private List<PointDetail> basePointDetail ; //坯料点明细
|
||||
@Schema(description = "holes数量集合 count=孔数量 countFaceA=正面垂直孔数量] countFaceB=反面垂直孔数量] countSide=水平侧孔数量] countSideL=左侧孔数量] countSideR=右侧孔数量 countSideU=上侧孔数量 countSideD=下侧孔数量 countBevelled=斜面孔数量 countLocking=偏心轮/锁定孔数量 countBuildIn=预埋件/插入孔数量 countHinge=铰链孔数量 countThrough=通孔(对穿孔)/挖穿孔数量]")
|
||||
private Map<String,Integer> holeCount;//孔类型数量集合
|
||||
@Schema(description = "孔明细列表")
|
||||
private List<HoleDetail> holeDetail;
|
||||
@Schema(description = "凹槽数量集合")
|
||||
private Map<String,Integer> contourCount;//凹槽数量集合
|
||||
@Schema(description = "造型明细(凹槽)")
|
||||
private List<ModelDetail> contourDetail;
|
||||
@Schema(description = "造型明细(孤岛,现在是xml数据格式添加)")
|
||||
private List<ModelDetail> sideDetail ; //造型明细(孤岛) sideDetail
|
||||
@Schema(description = "侧面孔明细列表")
|
||||
private List<HoleDetail> sideHoleDetail;
|
||||
|
||||
@Schema(description = "生产封边备注")
|
||||
private Map<String,String> sideRemark;// 封边备注
|
||||
@Schema(description = "板材扩展备注")
|
||||
private JSONObject plateExtraRemark;// 封边备注
|
||||
|
||||
@Schema(description = "扩展备注(包含铰链备注、订单板件流水号)")
|
||||
private String extraRemark; // 扩展备注(包含铰链备注、订单板件流水号)(板材明细中)
|
||||
@Schema(description = "特殊备注(Json字符串)")
|
||||
private String specialRemarkDei; // 特殊备注(Json字符串)
|
||||
@Schema(description = "拉手备注(Json字符串)")
|
||||
private String extraHandleRemark; // 拉手备注
|
||||
@Schema(description = "排钻备注(Json字符串)")
|
||||
private String drillsRemark; // 排钻备注(Json字符串)
|
||||
@Schema(description = "板其他备注(Json字符串)")
|
||||
private String infoRemark; // 板其他备注(Json字符串)
|
||||
@Schema(description = "板件备注(Json字符串)")
|
||||
private String remarkJsonDei; // 板件备注(Json字符串)
|
||||
|
||||
@Schema(description = "普通备注(板材数据中)")
|
||||
private String remarkJson; // 普通备注(板材数据中)
|
||||
@Schema(description = "特殊备注(板材数据中)")
|
||||
private String specialRemark; // 特殊备注(板材数据中)
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.ordermodel;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cf.imes.module.plan.dal.elasticsearch.BasePosition;
|
||||
import com.cf.imes.module.plan.dal.elasticsearch.HoleDetail;
|
||||
import com.cf.imes.module.plan.dal.elasticsearch.ModelDetail;
|
||||
import com.cf.imes.module.plan.dal.elasticsearch.PartsInfo;
|
||||
import com.cf.imes.module.plan.dal.elasticsearch.PointDetail;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OrderPlateList {
|
||||
|
||||
|
||||
@Schema(description = "小板id")
|
||||
private Long plateId;
|
||||
@Schema(description = "是否已优化")
|
||||
private Boolean isOptimized;
|
||||
@Schema(description = "房间的基点坐标")
|
||||
private BasePosition roomBasePosition; // 板件基准点坐标
|
||||
@Schema(description = "柜体的基点坐标")
|
||||
private BasePosition bodyBasePosition; // 板件基准点坐标
|
||||
@Schema(description = "板件的基点坐标")
|
||||
private BasePosition plateBasePosition; // 板件基准点坐标
|
||||
|
||||
@Schema(description = "纹路 纹路(0正纹1可翻转2反纹)")
|
||||
private Integer texture;
|
||||
@Schema(description = "排版面 排钻类型(0正面1反面2随意面)")
|
||||
private Integer typographicFace;
|
||||
@Schema(description = "开门类型 0非门板,1左开,2右开,3上翻,4下翻")
|
||||
private Integer openDoorType; // 字典转换
|
||||
@Schema(description = "小板类型")
|
||||
private String boardType;
|
||||
|
||||
@Schema(description = "板件配件信息")
|
||||
private List<PartsInfo> partsInfos;
|
||||
|
||||
@Schema(description = "开料长")
|
||||
private BigDecimal splitLength;
|
||||
@Schema(description = "开料宽")
|
||||
private BigDecimal splitWidth;
|
||||
|
||||
|
||||
@Schema(description = "偏移量X")
|
||||
private BigDecimal offsetX;
|
||||
@Schema(description = "偏移量Y")
|
||||
private BigDecimal offsetY;
|
||||
|
||||
@Schema(description = "是否有二维刀路")
|
||||
private Boolean has2DModel;
|
||||
@Schema(description = "是否有三维刀路")
|
||||
private Boolean has3DModel;
|
||||
|
||||
@Schema(description = "点明细,表示小板外围轮廓的几个转折点(不含封边)")
|
||||
private List<PointDetail> pointDetail;
|
||||
@Schema(description = "原始点明细列表")
|
||||
private List<PointDetail> rawPointDetail;
|
||||
@Schema(description = "坯料点明细")
|
||||
private List<PointDetail> basePointDetail ; //坯料点明细
|
||||
@Schema(description = "holes数量集合 count=孔数量 countFaceA=正面垂直孔数量] countFaceB=反面垂直孔数量] countSide=水平侧孔数量] countSideL=左侧孔数量] countSideR=右侧孔数量 countSideU=上侧孔数量 countSideD=下侧孔数量 countBevelled=斜面孔数量 countLocking=偏心轮/锁定孔数量 countBuildIn=预埋件/插入孔数量 countHinge=铰链孔数量 countThrough=通孔(对穿孔)/挖穿孔数量]")
|
||||
private Map<String,Integer> holeCount;//孔类型数量集合
|
||||
@Schema(description = "孔明细列表")
|
||||
private List<HoleDetail> holeDetail;
|
||||
@Schema(description = "凹槽数量集合")
|
||||
private Map<String,Integer> contourCount;//凹槽数量集合
|
||||
@Schema(description = "造型明细(凹槽)")
|
||||
private List<ModelDetail> contourDetail;
|
||||
@Schema(description = "造型明细(孤岛,现在是xml数据格式添加)")
|
||||
private List<ModelDetail> sideDetail ; //造型明细(孤岛) sideDetail
|
||||
@Schema(description = "侧面孔明细列表")
|
||||
private List<HoleDetail> sideHoleDetail;
|
||||
|
||||
@Schema(description = "生产封边备注")
|
||||
private Map<String,String> sideRemark;// 封边备注
|
||||
@Schema(description = "板材扩展备注")
|
||||
private JSONObject plateExtraRemark;// 封边备注
|
||||
|
||||
@Schema(description = "扩展备注(包含铰链备注、订单板件流水号)")
|
||||
private String extraRemark; // 扩展备注(包含铰链备注、订单板件流水号)(板材明细中)
|
||||
@Schema(description = "特殊备注(Json字符串)")
|
||||
private String specialRemarkDei; // 特殊备注(Json字符串)
|
||||
@Schema(description = "拉手备注(Json字符串)")
|
||||
private String extraHandleRemark; // 拉手备注
|
||||
@Schema(description = "排钻备注(Json字符串)")
|
||||
private String drillsRemark; // 排钻备注(Json字符串)
|
||||
@Schema(description = "板其他备注(Json字符串)")
|
||||
private String infoRemark; // 板其他备注(Json字符串)
|
||||
@Schema(description = "板件备注(Json字符串)")
|
||||
private String remarkJsonDei; // 板件备注(Json字符串)
|
||||
|
||||
@Schema(description = "普通备注(板材数据中)")
|
||||
private String remarkJson; // 普通备注(板材数据中)
|
||||
@Schema(description = "特殊备注(板材数据中)")
|
||||
private String specialRemark; // 特殊备注(板材数据中)
|
||||
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.ordermodel;
|
||||
|
||||
|
||||
import com.cf.imes.framework.es.core.dal.ESDocument;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author 高级筛选数据
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OrderPlateModel extends ESDocument {
|
||||
|
||||
@Schema(description = "生产单id")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "大板分类ID")
|
||||
private Long plateGoodsId;
|
||||
|
||||
@Schema(description = "大板实际ID")
|
||||
private String goodsId;
|
||||
|
||||
}
|
||||
+218
@@ -0,0 +1,218 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.plate;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 生产单板件 DO
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@TableName("order_plate")
|
||||
@KeySequence("order_plate_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PlateDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 板件 ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
// 组织 ID
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long organId;
|
||||
/**
|
||||
* 生产单号
|
||||
*/
|
||||
private Long orderId;
|
||||
/**
|
||||
* 板名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 组织中唯一板编号
|
||||
*/
|
||||
private String plateNo;
|
||||
/**
|
||||
* 板类型,0 层板 1 立板 2 背板 3 自增板
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 商品 ID
|
||||
*/
|
||||
private Long goodsId;
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
private BigDecimal width;
|
||||
/**
|
||||
* 高度
|
||||
*/
|
||||
private BigDecimal height;
|
||||
/**
|
||||
* 厚度
|
||||
*/
|
||||
private BigDecimal thickness;
|
||||
/**
|
||||
* 拆单宽度
|
||||
*/
|
||||
private BigDecimal splitWidth;
|
||||
/**
|
||||
* 拆单高度
|
||||
*/
|
||||
private BigDecimal splitHeight;
|
||||
/**
|
||||
* 拆单厚度
|
||||
*/
|
||||
private BigDecimal splitThickness;
|
||||
/**
|
||||
* 左封边厚度
|
||||
*/
|
||||
private BigDecimal sealLeft;
|
||||
/**
|
||||
* 右封边厚度
|
||||
*/
|
||||
private BigDecimal sealRight;
|
||||
/**
|
||||
* 上封边厚度
|
||||
*/
|
||||
private BigDecimal sealUp;
|
||||
/**
|
||||
* 下封边厚度
|
||||
*/
|
||||
private BigDecimal sealDown;
|
||||
/**
|
||||
* 面积
|
||||
*/
|
||||
private BigDecimal area;
|
||||
/**
|
||||
* 纹路类型,0 正纹 1 可翻转 2 反纹
|
||||
*/
|
||||
private Integer texture;
|
||||
/**
|
||||
* 孔面类型,0 正面 1 反面 2 侧面
|
||||
*/
|
||||
private Integer holeFace;
|
||||
/**
|
||||
* 排孔类型,0 正纹 1 反面 2 随意面
|
||||
*/
|
||||
private Integer holeArrange;
|
||||
/**
|
||||
* 异型孔数量
|
||||
*/
|
||||
private Integer unregularPointCount;
|
||||
/**
|
||||
* 正面孔数量
|
||||
*/
|
||||
private Integer frontHoleCount;
|
||||
/**
|
||||
* 背面孔数量
|
||||
*/
|
||||
private Integer backHoleCount;
|
||||
/**
|
||||
* 侧面孔数量
|
||||
*/
|
||||
private Integer sideHoleCount;
|
||||
/**
|
||||
* 正面造型量
|
||||
*/
|
||||
private Integer frontModelCount;
|
||||
/**
|
||||
* 背面造型量
|
||||
*/
|
||||
private Integer backModelCount;
|
||||
/**
|
||||
* 是否门板
|
||||
*/
|
||||
private Boolean isDoor;
|
||||
/**
|
||||
* 开门类型,0 无 1 左 2 右 3 上 4 下
|
||||
*/
|
||||
private Integer openDoorType;
|
||||
/**
|
||||
* 异型偏移 x
|
||||
*/
|
||||
private BigDecimal offsetX;
|
||||
/**
|
||||
* 异型偏移 y
|
||||
*/
|
||||
private BigDecimal offsetY;
|
||||
/**
|
||||
* 是否孤形对角
|
||||
*/
|
||||
private Boolean isArcAcross;
|
||||
/**
|
||||
* 模块类型 ID
|
||||
*/
|
||||
private Long moduleTypeId;
|
||||
/**
|
||||
* 是否异性
|
||||
*/
|
||||
private Boolean isSpecialShaped;
|
||||
/**
|
||||
* 是否造型
|
||||
*/
|
||||
private Boolean isSculpt;
|
||||
/**
|
||||
* 是否造型
|
||||
*/
|
||||
private Boolean isRowHole;
|
||||
/**
|
||||
* 是否优化
|
||||
*/
|
||||
private Boolean isOptimized;
|
||||
/**
|
||||
* 是否开料,0:未开料,1:开料中,2:已开料
|
||||
*/
|
||||
private Integer isCutted;
|
||||
/**
|
||||
* 排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠
|
||||
*/
|
||||
private String filterType;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 是否作废
|
||||
*/
|
||||
private Boolean isCancel;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
private String customPlateNo;
|
||||
|
||||
/**
|
||||
* 房间名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String roomName;
|
||||
|
||||
/**
|
||||
* 柜体名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String bodyName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private StringBuilder customPlateNoBuilder;
|
||||
}
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.plate;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 板材信息表 plate_N DO
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@TableName("plate")
|
||||
@KeySequence("plate_n_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PlateGoodDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 客户的商品编号
|
||||
*/
|
||||
private String goodsId;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
/**
|
||||
* 材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板
|
||||
*/
|
||||
private String material;
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
/**
|
||||
* 背面颜色
|
||||
*/
|
||||
private String colorBlack;
|
||||
/**
|
||||
* 纹路
|
||||
*/
|
||||
private Boolean texture;
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
private Double width;
|
||||
/**
|
||||
* 高度
|
||||
*/
|
||||
private Double height;
|
||||
/**
|
||||
* 厚度
|
||||
*/
|
||||
private Double thickness;
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
// private Double price;
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String brand;
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String spec;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long organId;
|
||||
|
||||
}
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
package com.cf.imes.module.plan.dal.dataobject.rawgoods;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 生产单设计商品表 order_raw_goods_{N} DO
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@TableName("order_raw_goods")
|
||||
@KeySequence("order_raw_goods_n_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RawGoodsDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
// 组织 ID
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long organId;
|
||||
/**
|
||||
* 生产单号
|
||||
*/
|
||||
private Long orderId;
|
||||
/**
|
||||
* 设计端商品编码
|
||||
*/
|
||||
private String rawGoodsId;
|
||||
/**
|
||||
* 设计端商品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
/**
|
||||
* 材质
|
||||
*/
|
||||
private String material;
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
/**
|
||||
* 背面颜色
|
||||
*/
|
||||
private String colorBlack;
|
||||
/**
|
||||
* 纹路 0 正纹 1 可翻转 2 反纹
|
||||
*/
|
||||
private Boolean texture;
|
||||
/**
|
||||
* 厚度
|
||||
*/
|
||||
private Double thickness;
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private Double price;
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String brand;
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String spec;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.cf.imes.module.plan.dal.elasticsearch;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 基准位置,用于画图
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class BasePosition {
|
||||
private String basePoint;// 基准点
|
||||
|
||||
private Double basePointX;// 基准点X坐标
|
||||
|
||||
private Double basePointY;// 基准点Y坐标
|
||||
|
||||
private Double basePointZ;// 基准点Z坐标
|
||||
|
||||
private Double axisXrotate;// 绕X轴旋转角度
|
||||
|
||||
private Double axisYrotate;// 绕Y轴旋转角度
|
||||
|
||||
private Double axisZrotate;// 绕Z轴旋转角度
|
||||
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.cf.imes.module.plan.dal.elasticsearch;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 排钻类型数据
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DrillsInfo {
|
||||
|
||||
private String name; // 排钻名称
|
||||
|
||||
private String type; // 排钻类型名称
|
||||
|
||||
private String face; // 排钻朝向名称
|
||||
|
||||
private Double count; // 排钻数量
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
package com.cf.imes.module.plan.dal.elasticsearch;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 孔明细,板上的孔的明细
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class HoleDetail {
|
||||
|
||||
@Schema(description = "孔ID")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "孔名称,用于类型相同的孔,进行分组区分,一组的孔名称相同")
|
||||
private String holeName;
|
||||
|
||||
@Schema(description = "打孔面(0正面, 1反面, 2侧面)")
|
||||
private Integer faceType;
|
||||
@Schema(description = "方向 0:其他(斜方向),1:上方向,2:右方向,3:下方向,4:左方向")
|
||||
private Integer direction;
|
||||
@Schema(description = "孔类型(0大孔, 10小孔, 20木削, 21木削大孔, 30层板钉, 40通孔, 50连接杆, -10造型孔)")
|
||||
private Integer holeType;
|
||||
|
||||
// xml无法转换数据
|
||||
@Schema(description = "[加工面——正面、反面、左侧面、右侧面、上侧面、下侧面、斜面]")
|
||||
private String faceTypeStr;
|
||||
@Schema(description = "[方向——向后Z-、向前Z+、向右X+、向左X-、向下Y-、向上Y+、斜O]")
|
||||
private String directionStr;
|
||||
@Schema(description = "孔类型——简单孔(恒定直径的孔(盲孔、通孔/穿孔、间断孔))、沉头孔(恒定直径孔连接直径较大的孔(柱形、锥形))、锥孔、螺纹孔]")
|
||||
private String holeTypeStr;
|
||||
|
||||
|
||||
@Schema(description = "孔的起点坐标")
|
||||
private Double startX;
|
||||
private Double startY;
|
||||
private Double startZ;
|
||||
|
||||
|
||||
@Schema(description = " 打孔的半径-孔半径")
|
||||
private Double radius;
|
||||
|
||||
|
||||
@Schema(description = "孔的终点坐标")
|
||||
private Double endX;
|
||||
private Double endY;
|
||||
private Double endZ;
|
||||
|
||||
@Schema(description = "深度")
|
||||
private Double depth;
|
||||
|
||||
// xml新增数据
|
||||
@Schema(description = " 沉头孔内直径")
|
||||
private Double diameterInner;
|
||||
|
||||
@Schema(description = " 沉头孔(台阶孔)深孔深度")
|
||||
private Double depthInner;
|
||||
|
||||
@Schema(description = " 孔组X坐标偏移")
|
||||
private Double groupXOffset;
|
||||
|
||||
@Schema(description = " 孔组Y坐标偏移")
|
||||
private Double groupYOffset;
|
||||
|
||||
@Schema(description = " 孔组Z坐标偏移")
|
||||
private Double groupZOffset;
|
||||
|
||||
@Schema(description = " 孔组数量")
|
||||
private Integer groupNumber;
|
||||
|
||||
@Schema(description = "刀号")
|
||||
private String toolNo;
|
||||
|
||||
@Schema(description = "刀名称")
|
||||
private String toolName;
|
||||
|
||||
@Schema(description = "刀具起点X轴旋转角度")
|
||||
private Double toolStartRotateX;
|
||||
|
||||
@Schema(description = "刀具起点Y轴旋转角度")
|
||||
private Double toolStartRotateY;
|
||||
|
||||
@Schema(description = "刀具起点Z轴旋转角度")
|
||||
private Double toolStartRotateZ;
|
||||
|
||||
@Schema(description = "刀具终点X轴旋转角度")
|
||||
private Double toolEndRotateX;
|
||||
|
||||
@Schema(description = "刀具终点Y轴旋转角度")
|
||||
private Double toolEndRotateY;
|
||||
|
||||
@Schema(description = "刀具终点Z轴旋转角度")
|
||||
private Double toolEndRotateZ;
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.cf.imes.module.plan.dal.elasticsearch;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
/**
|
||||
* 轮廓数据
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = false) // 设置 chain = false,避免生产单导入有问
|
||||
public class IContourData {
|
||||
|
||||
@Schema(description = "点集(二维向量(x,y,z))")
|
||||
private Point pts; //
|
||||
@Schema(description = "凸度(0直线段 >0逆时针方向 <0顺时针方向)")
|
||||
private Double buls; //
|
||||
@Schema(description = "起点圆弧半径(直线段为0)")
|
||||
private Double radius; //
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.cf.imes.module.plan.dal.elasticsearch;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 板的造型生成刀路数据
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = false) // 设置 chain = false,避免生产单导入有问
|
||||
public class IOriginModelingData {
|
||||
|
||||
@Schema(description = "刀半径")
|
||||
private Double knifeRadius;
|
||||
|
||||
@Schema(description = "厚度")
|
||||
private Double thickness; // xml中没有
|
||||
@Schema(description = "方向")
|
||||
private Integer dir;
|
||||
|
||||
// xml中修改
|
||||
@Schema(description = "造型/凹槽(边缘)的刀路方向——内圈顺时针(最)外圈逆时针、内圈顺时针(最)外圈顺时针、内圈逆时针(最)外圈顺时针、内圈逆时针(最)外圈逆时针")
|
||||
private String direction;
|
||||
|
||||
@Schema(description = "轮廓,造型最外围的轮廓数据")
|
||||
private List<IContourData> outline;
|
||||
@Schema(description = "孤岛轮廓")
|
||||
private List<List<IContourData>> holes;
|
||||
|
||||
|
||||
@Schema(description = "槽加长")
|
||||
private Double addLen;
|
||||
@Schema(description = "槽加宽")
|
||||
private Double addWidth;
|
||||
@Schema(description = "槽加深")
|
||||
private Double addDepth;
|
||||
|
||||
// ============ 启用 api =============
|
||||
// @Schema(description = "造型点列表")
|
||||
// private List<PointList> pointList;
|
||||
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
package com.cf.imes.module.plan.dal.elasticsearch;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 造型明细
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "管理后台 - 造型信息")
|
||||
public class ModelDetail {
|
||||
|
||||
@Schema(description = "造型ID")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "刀路ID")
|
||||
private Integer lineID;
|
||||
|
||||
@Schema(description = "内部孤岛ID集合")
|
||||
private String[] subIDs;
|
||||
|
||||
@Schema(description = "类型——矩形槽Rectangle、路径槽Path、内铣槽internalMilling、折返路径槽turnbackPath")
|
||||
private String type; // 目前只在xml中
|
||||
|
||||
@Schema(description = "根据是否为正面,face有不同的含义")
|
||||
private Integer faceType;
|
||||
|
||||
// xml更新
|
||||
@Schema(description = "加工面——正面、反面、左侧面、右侧面、上侧面、下侧面、斜面")
|
||||
private String grooveFace; // 目前只在xml中
|
||||
|
||||
@Schema(description = "造型长度")
|
||||
private Double width;
|
||||
@Schema(description = "造型宽度")
|
||||
private Double length;
|
||||
@Schema(description = "造型深度")
|
||||
private Double depth;
|
||||
|
||||
@Schema(description = "圆角半径")
|
||||
private Double round; // 目前只在xml中
|
||||
|
||||
@Schema(description = "刀路冗余量(偏移重叠量)")
|
||||
private Double redundance; // 目前只在xml中
|
||||
@Schema(description = "角度(二维刀路V型刀提角/清角用)")
|
||||
private Double tangentAngle; // 目前只在xml中
|
||||
|
||||
// @Schema(description = "造型数量")
|
||||
// private Integer count;
|
||||
|
||||
@Schema(description = "造像使用刀具名称")
|
||||
private String knifeName;
|
||||
@Schema(description = "刀号")
|
||||
private String toolNo;
|
||||
@Schema(description = "刀半径")
|
||||
private Double knifeRadius;
|
||||
|
||||
|
||||
@Schema(description = "造型数据")
|
||||
private IOriginModelingData originModeling;
|
||||
|
||||
@Schema(description = "造型点列表")
|
||||
private List<PointList> pointList;
|
||||
|
||||
@Schema(description = "造型偏移量列表-模块偏移数据")
|
||||
private List<OffSetList> offSetList;
|
||||
|
||||
|
||||
// xml新增
|
||||
@Schema(description = "加工模式/方式——由内向外、由外向内")
|
||||
private String mode;
|
||||
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.cf.imes.module.plan.dal.elasticsearch;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 偏移量列表 模块偏移数据
|
||||
* 在有用到二维刀路的时候,需要这个数据
|
||||
* 注:1、有用到type之类需要转换类型的诗句,将type全部存原有的值,然后在接口这一块,通过字典进行进行转换
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = false) // 设置 chain = false,避免生产单导入有问
|
||||
public class OffSetList {
|
||||
|
||||
@Schema(description = "偏移刀路ID")
|
||||
private String id;
|
||||
|
||||
// 刀路的偏移值
|
||||
@Schema(description = "刀路的偏倚值")
|
||||
private Double value;
|
||||
@Schema(description = "下刀的深度")
|
||||
private Double depth;
|
||||
@Schema(description = "角度")
|
||||
private Double angle;
|
||||
|
||||
// 二维刀路的属性
|
||||
@Schema(description = "二维刀路的属性-刀的名称")
|
||||
private String name;
|
||||
@Schema(description = "二维刀路的属性-刀的半径")
|
||||
private Double radius; // api中为直径
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.cf.imes.module.plan.dal.elasticsearch;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class OrderGoodsPlateIds {
|
||||
|
||||
|
||||
private Long id;
|
||||
|
||||
|
||||
private Long orderId;
|
||||
|
||||
|
||||
private String actualGoodsId;
|
||||
|
||||
|
||||
private Long goodsId;
|
||||
|
||||
}
|
||||
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.cf.imes.module.plan.dal.elasticsearch;
|
||||
|
||||
import com.cf.imes.framework.es.core.dal.ESDocument;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Schema(description = "管理后台 - 生产单配件 备注信息")
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OrderPartsRemark extends ESDocument {
|
||||
|
||||
@Schema(description = "配件 ID")
|
||||
private Long partsId;
|
||||
|
||||
@Schema(description = "生产单号")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "额外规格")
|
||||
private String specExtras;
|
||||
|
||||
@Schema(description = "门板组件铰链备注")
|
||||
private String doorRemark;
|
||||
|
||||
@Schema(description = "门板组件拉手备注")
|
||||
private String hingeRemark;
|
||||
|
||||
@Schema(description = "特殊备注(Json字符串)")
|
||||
private String specialRemark;
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.cf.imes.module.plan.dal.elasticsearch;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 配件基本信息
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PartsInfo {
|
||||
|
||||
private Long id; // 配件标识
|
||||
private String name; // 配件名称
|
||||
|
||||
// 单个配件的数量
|
||||
private Double partNum;
|
||||
|
||||
// 配件数量单位
|
||||
private String unit;
|
||||
}
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
package com.cf.imes.module.plan.dal.elasticsearch;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* CAD板件信息详情
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlateDetail {
|
||||
// 组织id
|
||||
private Long organId;
|
||||
// 生产单id
|
||||
private Long orderId;
|
||||
// 板名称
|
||||
private String name;
|
||||
// 板id
|
||||
private Long plateId;
|
||||
// 设计板编号
|
||||
private String plateNo;
|
||||
// 设计板编号
|
||||
private String customPlateNo;
|
||||
|
||||
private Integer texture; //纹路 纹路(0正纹1可翻转2反纹)
|
||||
private Integer typographicFace; //排版面 排钻类型(0正面1反面2随意面)
|
||||
private Integer openDoorType; //开门类型 0非门板,1左开,2右开,3上翻,4下翻 字典转换
|
||||
private String boardType; // 小板类型
|
||||
|
||||
|
||||
// 板件所属信息
|
||||
private String roomsName; //房间名称
|
||||
private String roomNo; // 房间号
|
||||
private String bodyName; //柜体名
|
||||
private String bodyNo; // 柜体号
|
||||
private String groupName; //加工组号
|
||||
private String groupNo; // 加工组名称
|
||||
// 柜体 长 宽 深
|
||||
private Double width;
|
||||
private Double height;
|
||||
private Double depth;
|
||||
|
||||
// 柜体成倍拆单的倍数
|
||||
private Integer multiNum;
|
||||
|
||||
|
||||
// 板材所属加工组
|
||||
private String group;// 板件加工组Group的名称,可以有多个
|
||||
// 加工组具体信息
|
||||
// private List<Group> groupList;
|
||||
|
||||
// 成品长宽、面积
|
||||
private BigDecimal plateWidth;
|
||||
private BigDecimal plateLength;
|
||||
private BigDecimal acreage;
|
||||
|
||||
// 开料长宽、面积
|
||||
private BigDecimal splitLength;
|
||||
private BigDecimal splitWidth;
|
||||
private BigDecimal sealAcreage;
|
||||
|
||||
// 是否异形
|
||||
private Boolean isUnRegular;
|
||||
// 封边,用于矩形
|
||||
private BigDecimal sealLeft;
|
||||
private BigDecimal sealRight;
|
||||
private BigDecimal sealUp;
|
||||
private BigDecimal sealDown;
|
||||
|
||||
|
||||
// 偏移量
|
||||
private BigDecimal offsetX;
|
||||
private BigDecimal offsetY;
|
||||
private Boolean isHXDJX; // 是否弧形地脚
|
||||
|
||||
// 大板基本信息
|
||||
// private BoardInfo boardInfo;
|
||||
// 配件基本信息
|
||||
private List<PartsInfo> partsInfos; // xml中有,估计之后不需要
|
||||
// 排钻类型
|
||||
private List<DrillsInfo> drillsInfos; // api中有
|
||||
|
||||
private Double throughHoleCount; // 挖孔的孔数
|
||||
private Double throughModelCount; // 挖穿的造型数
|
||||
|
||||
private Boolean has2DModel; // 是否有二维刀路
|
||||
private Boolean has3DModel; // 是否有三维刀路
|
||||
|
||||
// 轮廓数据、造型数据
|
||||
private BasePosition roomBasePosition; // 板件基准点坐标
|
||||
private BasePosition bodyBasePosition; // 柜体基准点坐标
|
||||
private BasePosition plateBasePosition; // 板件基准点坐标
|
||||
private List<PointDetail> pointDetail; //点明细,表示小板外围轮廓的几个转折点(不含封边)
|
||||
private List<PointDetail> rawPointDetail; //原始点明细(含封边)
|
||||
private List<PointDetail> basePointDetail; //坯料点明细 (xml中特有,现可以不用)
|
||||
|
||||
private Map<String, Integer> holeCount;//孔类型数量集合 (xml中特有----孔类型,对应的数量)
|
||||
private List<HoleDetail> holeDetail; //孔明细,表示板上的孔
|
||||
private Map<String, Integer> contourCount;//凹槽数量集合 (xml中特有----槽所在板面的对应数量)
|
||||
private List<ModelDetail> contourDetail; //造型明细(xml中为凹槽,将孤岛的信息放入槽中)
|
||||
private List<ModelDetail> sideDetail; //造型明细(侧面)
|
||||
|
||||
private List<HoleDetail> sideHoleDetail;//侧面孔明细
|
||||
|
||||
// 备注
|
||||
private Map<String, String> plateRemark;// 板件备注 (生产数据接口中)(不用)
|
||||
private Map<String, String> sideRemark;// 板边备注
|
||||
private JSONObject plateExtraRemark;// 板材扩展备注 (不含板件的备注)
|
||||
|
||||
private String extraRemark; // 扩展备注(包含铰链备注、订单板件流水号)(板材明细中)
|
||||
private String specialRemarkDei; // 特殊备注(Json字符串)
|
||||
private String extraHandleRemark; // 拉手备注
|
||||
private String drillsRemark; // 排钻备注(Json字符串)
|
||||
private String infoRemark; // 板其他备注(Json字符串)
|
||||
private String remarkJsonDei; // 板件备注(Json字符串)
|
||||
|
||||
private String remarkJson; // 普通备注(板材数据中)
|
||||
private String specialRemark; // 特殊备注(板材数据中)
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.cf.imes.module.plan.dal.elasticsearch;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author Beal
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Point {
|
||||
private Double x;
|
||||
private Double y;
|
||||
private Double z;
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.cf.imes.module.plan.dal.elasticsearch;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 点明细 , 表示小板外围轮廓的几个转折点
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = false) // 设置 chain = false,避免生产单导入有问
|
||||
public class PointDetail {
|
||||
|
||||
@Schema(description = "点id")
|
||||
private String id;
|
||||
// 点的位置信息
|
||||
@Schema(description = "点的位置信息")
|
||||
private Double pointX;
|
||||
private Double pointY;
|
||||
@Schema(description = "曲线-凸度")
|
||||
private Double curve;
|
||||
@Schema(description = "边圆弧半径(直线段为0)")
|
||||
private Double radius;
|
||||
|
||||
// 点的封边尺寸
|
||||
@Schema(description = "点的封边尺寸,封边尺寸,封边的厚度,长同边长")
|
||||
private BigDecimal sealSize;
|
||||
|
||||
@Schema(description = "加工工艺")
|
||||
private String process;
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.cf.imes.module.plan.dal.elasticsearch;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 点列表
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = false) // 设置 chain = false,避免生产单导入有问
|
||||
public class PointList {
|
||||
|
||||
@Schema(description = "纹路Id")
|
||||
private Integer lineId;
|
||||
@Schema(description = "点Id")
|
||||
private Integer pointId;
|
||||
|
||||
|
||||
@Schema(description = "点的位置信息")
|
||||
private Double pointX;
|
||||
private Double pointY;
|
||||
private Double pointZ;
|
||||
private Double radius;
|
||||
|
||||
@Schema(description = "曲线")
|
||||
private Double curve;
|
||||
@Schema(description = "曲线深度")
|
||||
private Double depth;
|
||||
@Schema(description = "起点圆弧半径(直线段为0)")
|
||||
private Double holeRadius;
|
||||
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.cf.imes.module.plan.dal.mysql.goods;
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.injector.BaseBatchMapper;
|
||||
import com.cf.imes.module.plan.dal.dataobject.goods.GoodsDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 生产单商品 Mapper
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface GoodsMapper extends BaseBatchMapper<GoodsDO> {
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.cf.imes.module.plan.dal.mysql.order;
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.module.plan.dal.dataobject.order.OrderDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 生产单表 order_{N} Mapper
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderMapper extends BaseMapperX<OrderDO> {
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.cf.imes.module.plan.dal.mysql.orderBody;
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.injector.BaseBatchMapper;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderBody.OrderBodyDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 生产单柜体 Mapper
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderBodyMapper extends BaseBatchMapper<OrderBodyDO> {
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.cf.imes.module.plan.dal.mysql.orderGroup;
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.injector.BaseBatchMapper;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderGroup.OrderGroupDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* 生产单加工组 Mapper
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderGroupMapper extends BaseBatchMapper<OrderGroupDO> {
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.cf.imes.module.plan.dal.mysql.orderImport;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTaskDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 生产单导入任务 Mapper
|
||||
*
|
||||
* @author Gqr
|
||||
* @since 2025/1/9 11:42
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderImportTaskMapper extends BaseMapper<OrderImportTaskDO> {
|
||||
}
|
||||
+156
@@ -0,0 +1,156 @@
|
||||
package com.cf.imes.module.plan.dal.mysql.orderImport;
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.module.plan.controller.orderImport.vo.OrderImportTempDataReqVO;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataDO;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataGoodsGroupDO;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataGoodsIdGroupDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产单导入临时表 Mapper
|
||||
*
|
||||
* @author Gqr
|
||||
* @since 2025/1/9 11:42
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderImportTempDataMapper extends BaseMapperX<OrderImportTempDataDO> {
|
||||
/**
|
||||
* 基于物料编码分组的总数查询
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
int selectCountGoodsIdGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 基于物料编码的分组查询(可分页)
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
List<OrderImportTempDataGoodsIdGroupDO> selectGoodsIdGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 基于商品名称、材料、纹理、颜色、规格、商品高、商品宽、商品厚、品牌分组的商品总数查询
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
int selectCountPlateGoodsGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 基于商品名称、材料、纹理、颜色、规格、商品高、商品宽、商品厚、品牌的商品分组查询(可分页)
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
List<OrderImportTempDataGoodsGroupDO> selectPlateGoodsGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 基于商品名称、材料、复合部件、配件类型、配件子类、厂家、型号、规格、、商品高、商品宽、商品厚、单位、品牌分组的配件总数查询
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
int selectCountPartGoodsGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 基于商品名称、材料、复合部件、配件类型、配件子类、厂家、型号、规格、、商品高、商品宽、商品厚、单位、品牌的配件分组查询
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
List<OrderImportTempDataGoodsGroupDO> selectPartGoodsGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 基于房间名的分组总数查询
|
||||
*
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
int selectCountRoomGroup(@Param("taskId") Long taskId);
|
||||
|
||||
/**
|
||||
* 基于房间名的分组查询
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
List<OrderImportTempDataGoodsGroupDO> selectRoomGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 基于房间名下柜体名的分组总数查询
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
int selectCountBodyGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 基于房间名下柜体名的分组查询
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
List<OrderImportTempDataGoodsGroupDO> selectBodyGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 基于房间名、柜体名下的加工组类型名称分组总数查询
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
int selectCountGroupTypeNameGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 基于房间名、柜体名下的加工组类型名称分组查询
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
List<OrderImportTempDataGoodsGroupDO> selectGroupTypeNameGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 基于房间名、柜体名、加工组类型名称下的加工组名称分组总数查询
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
int selectCountGroupNameGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 基于房间名、柜体名、加工组类型名称下的加工组名称分组查询
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
List<OrderImportTempDataGoodsGroupDO> selectGroupNameGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 查询房间名、柜体名、加工组类型名称、加工组名称下的总数
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
int selectCountGroupName(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 查询房间名、柜体名、加工组类型名称、加工组名称下的临时数据列表
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
List<OrderImportTempDataDO> selectGroupNameList(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 查询配件商品id下的临时数据列表
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
List<OrderImportTempDataDO> selectPartList(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.cf.imes.module.plan.dal.mysql.orderItem;
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.injector.BaseBatchMapper;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderItem.OrderItemDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 生产单明细表 order_item Mapper
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderItemMapper extends BaseBatchMapper<OrderItemDO> {
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.cf.imes.module.plan.dal.mysql.orderParts;
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.injector.BaseBatchMapper;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderParts.OrderPartsDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 生产单配件表 order_parts_{N} Mapper
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderPartsMapper extends BaseBatchMapper<OrderPartsDO> {
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.cf.imes.module.plan.dal.mysql.orderParts;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.cf.imes.framework.mybatis.core.injector.BaseBatchMapper;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderParts.PartsDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 配件表 parts_{N} Mapper
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface PartsMapper extends BaseBatchMapper<PartsDO> {
|
||||
default PartsDO selectByGoodID(String goodId , Long organId) {
|
||||
return selectOne(new LambdaQueryWrapper<PartsDO>().eq(PartsDO::getGoodsId, goodId).eq(PartsDO::getOrganId, organId));
|
||||
}
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.cf.imes.module.plan.dal.mysql.plate;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.cf.imes.framework.mybatis.core.injector.BaseBatchMapper;
|
||||
import com.cf.imes.module.plan.dal.dataobject.plate.PlateGoodDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 板材信息 Mapper plate
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface PlateGoodMapper extends BaseBatchMapper<PlateGoodDO> {
|
||||
default List<PlateGoodDO> selectGoodOne(String id, Long organId) {
|
||||
return selectList(new LambdaQueryWrapper<PlateGoodDO>()
|
||||
.eq(PlateGoodDO::getGoodsId, id)
|
||||
.eq(PlateGoodDO::getDeleted, 0)
|
||||
.eq(PlateGoodDO::getOrganId, organId));
|
||||
}
|
||||
|
||||
default List<PlateGoodDO> selectGood(String goodsName, String material, String color, Boolean texture, BigDecimal width,
|
||||
BigDecimal thickness, BigDecimal height, String brand, String spec, Long organId) {
|
||||
LambdaQueryWrapper<PlateGoodDO> queryWrapper = new LambdaQueryWrapper<PlateGoodDO>()
|
||||
.eq(PlateGoodDO::getGoodsName, goodsName)
|
||||
.eq(PlateGoodDO::getMaterial, material)
|
||||
.eq(PlateGoodDO::getColor, color)
|
||||
.eq(PlateGoodDO::getTexture, texture)
|
||||
.eq(PlateGoodDO::getWidth, width)
|
||||
.eq(PlateGoodDO::getHeight, height)
|
||||
.eq(PlateGoodDO::getThickness, thickness)
|
||||
.eq(PlateGoodDO::getSpec, spec)
|
||||
.eq(PlateGoodDO::getDeleted, 0)
|
||||
.eq(PlateGoodDO::getOrganId, organId);
|
||||
if (brand == null) {
|
||||
queryWrapper.eq(PlateGoodDO::getBrand,"");
|
||||
}else {
|
||||
queryWrapper.eq(PlateGoodDO::getBrand, brand);
|
||||
}
|
||||
return selectList(queryWrapper);
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.cf.imes.module.plan.dal.mysql.plate;
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.injector.BaseBatchMapper;
|
||||
import com.cf.imes.module.plan.dal.dataobject.plate.PlateDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 生产单板件 Mapper
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface PlateMapper extends BaseBatchMapper<PlateDO> {
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.cf.imes.module.plan.dal.mysql.rawgoods;
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.injector.BaseBatchMapper;
|
||||
import com.cf.imes.module.plan.dal.dataobject.rawgoods.RawGoodsDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 生产单设计商品表 order_raw_goods_{N} Mapper
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface RawGoodsMapper extends BaseBatchMapper<RawGoodsDO> {
|
||||
}
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
package com.cf.imes.module.plan.framework.rpc.config;
|
||||
|
||||
import com.cf.imes.module.system.api.dict.DictDataApi;
|
||||
import com.cf.imes.module.system.api.user.AdminUserApi;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -8,6 +9,6 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @author there
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableFeignClients(clients = AdminUserApi.class)
|
||||
@EnableFeignClients(clients = {AdminUserApi.class, DictDataApi.class})
|
||||
public class RpcConfiguration {
|
||||
}
|
||||
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
package com.cf.imes.module.plan.service.order;
|
||||
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import co.elastic.clients.elasticsearch.ElasticsearchClient;
|
||||
import co.elastic.clients.elasticsearch._types.ElasticsearchException;
|
||||
import co.elastic.clients.elasticsearch.core.BulkRequest;
|
||||
import co.elastic.clients.elasticsearch.core.BulkResponse;
|
||||
import co.elastic.clients.elasticsearch.core.DeleteByQueryRequest;
|
||||
import co.elastic.clients.elasticsearch.core.DeleteByQueryResponse;
|
||||
import com.cf.imes.framework.common.exception.ServiceException;
|
||||
import com.cf.imes.framework.es.core.dal.ESDocument;
|
||||
import com.cf.imes.module.plan.dal.dataobject.ordermodel.OrderModelDO;
|
||||
import com.cf.imes.module.plan.dal.elasticsearch.OrderPartsRemark;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static com.cf.imes.framework.common.exception.enums.GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR;
|
||||
|
||||
/**
|
||||
* @author Beal
|
||||
* 生产单入库处理器
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class OrderInputProcessor {
|
||||
|
||||
@Resource
|
||||
private ElasticsearchClient elasticsearchClient;
|
||||
|
||||
private Snowflake snowflake = IdUtil.getSnowflake();
|
||||
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
public static final String ORDER_PLATE_MODEL = "imes_order_plate_model";
|
||||
|
||||
|
||||
public static final String ORDER_PLATE_MODEL_COMPRESS = "imes_order_plate_model_compress";
|
||||
|
||||
public static final String ORDER_PARTS_REMARK_MODEL = "imes_order_parts_remark_model";
|
||||
|
||||
private static final String FIELD_ORDER_ID = "orderId";
|
||||
|
||||
/**
|
||||
* 保存生产单造型数据
|
||||
*
|
||||
* @param orderModelDOs
|
||||
*/
|
||||
public void batchSaveModel(List<OrderModelDO> orderModelDOs) {
|
||||
try {
|
||||
BulkResponse bulkResponse = bulkCreate(ORDER_PLATE_MODEL, orderModelDOs);
|
||||
boolean errors = bulkResponse.errors();
|
||||
if (errors) {
|
||||
log.error(bulkResponse.items().toString());
|
||||
throw new ServiceException(500, "未知异常");
|
||||
}
|
||||
} catch (IOException | ElasticsearchException e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage());
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void deleteByOrderId(Long orderId, String index) {
|
||||
DeleteByQueryRequest.Builder builder = new DeleteByQueryRequest.Builder();
|
||||
builder.index(index);
|
||||
builder.query(q -> q.term(t -> t.field(FIELD_ORDER_ID).value(orderId)));
|
||||
|
||||
try {
|
||||
DeleteByQueryResponse response = elasticsearchClient.deleteByQuery(builder.build());
|
||||
log.info("Deleted {} documents with planId {}", response.deleted(), orderId);
|
||||
} catch (IOException | ElasticsearchException e) {
|
||||
log.error("Error deleting documents with planId {}: {}", orderId, e.getMessage());
|
||||
throw new ServiceException(INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存生产单配件备注数据
|
||||
*
|
||||
* @param orderPartsRemarks
|
||||
*/
|
||||
public void batchSaveOrderPartsModel(List<OrderPartsRemark> orderPartsRemarks) {
|
||||
try {
|
||||
BulkResponse bulkResponse = bulkCreate(ORDER_PARTS_REMARK_MODEL, orderPartsRemarks);
|
||||
boolean errors = bulkResponse.errors();
|
||||
if (errors) {
|
||||
log.error(bulkResponse.items().toString());
|
||||
throw new ServiceException(500, "未知异常");
|
||||
}
|
||||
} catch (IOException | ElasticsearchException e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage());
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public <T> BulkResponse bulkCreate(String idxName, List<? extends ESDocument> documents) throws IOException, ElasticsearchException {
|
||||
BulkRequest.Builder br = new BulkRequest.Builder();
|
||||
Date date = new Date();
|
||||
documents.forEach(esDocument -> {
|
||||
if (CharSequenceUtil.isBlank(esDocument.getId())) {
|
||||
esDocument.setId(snowflake.nextIdStr());
|
||||
}
|
||||
esDocument.setCreateTime(simpleDateFormat.format(date));
|
||||
|
||||
esDocument.setUpdateTime(simpleDateFormat.format(date));
|
||||
br.operations(op -> op.index(idx -> idx
|
||||
.index(idxName)
|
||||
.id(esDocument.getId())
|
||||
.document(esDocument)));
|
||||
});
|
||||
return elasticsearchClient.bulk(br.build());
|
||||
}
|
||||
}
|
||||
+261
@@ -0,0 +1,261 @@
|
||||
package com.cf.imes.module.plan.service.orderImport.consumer;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.cf.imes.framework.common.enums.OrderPackageStatusEnum;
|
||||
import com.cf.imes.framework.common.exception.util.ServiceExceptionUtil;
|
||||
import com.cf.imes.framework.common.util.json.JsonUtils;
|
||||
import com.cf.imes.framework.id.core.util.SnowflakeIdWorker3rd;
|
||||
import com.cf.imes.module.executor.enums.OrderStatusEnum;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderParts.PartsMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.plate.PlateGoodMapper;
|
||||
import com.cf.imes.module.plan.service.order.OrderInputProcessor;
|
||||
import com.cf.imes.module.plan.service.orderImport.factory.DefaultExcelOrderImportFactory;
|
||||
import com.cf.imes.framework.mq.rabbitmq.constant.RabbitMqConstants;
|
||||
import com.cf.imes.framework.mybatis.core.generator.SnowFlakeGenerator;
|
||||
import com.cf.imes.framework.organ.core.context.OrganContextHolder;
|
||||
import com.cf.imes.framework.redis.constants.RedisKeyConstants;
|
||||
import com.cf.imes.framework.redis.util.RedisLockUtil;
|
||||
import com.cf.imes.module.executor.enums.OrderImportStatusEnum;
|
||||
import com.cf.imes.module.executor.enums.OrderImportTaskStatusEnum;
|
||||
import com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum;
|
||||
import com.cf.imes.module.plan.dal.dataobject.order.OrderDO;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTaskDO;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataDO;
|
||||
import com.cf.imes.module.plan.dal.mysql.goods.GoodsMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.order.OrderMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderBody.OrderBodyMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderGroup.OrderGroupMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderImport.OrderImportTaskMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderImport.OrderImportTempDataMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderItem.OrderItemMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderParts.OrderPartsMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.plate.PlateMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.rawgoods.RawGoodsMapper;
|
||||
import com.cf.imes.module.system.api.dict.DictDataApi;
|
||||
import com.rabbitmq.client.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.amqp.support.AmqpHeaders;
|
||||
import org.springframework.messaging.handler.annotation.Header;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.ORDER_IMPORT_ORDER_NOT_EXISTS;
|
||||
import static com.cf.imes.module.plan.enums.ErrorCodeConstants.ORDER_IMPORT_FAIL;
|
||||
import static com.cf.imes.module.plan.enums.ErrorCodeConstants.ORDER_IMPORT_ORGANID_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 默认excel导入生产单消费者
|
||||
*
|
||||
* @author Gqr
|
||||
* @since 2025/1/6 11:18
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class DefaultExcelOrderImportConsumer {
|
||||
|
||||
@Resource
|
||||
private OrderImportTaskMapper orderImportTaskMapper;
|
||||
|
||||
@Resource
|
||||
private OrderImportTempDataMapper orderImportTempDataMapper;
|
||||
|
||||
@Resource
|
||||
private OrderMapper orderMapper;
|
||||
|
||||
@Resource
|
||||
private RedisLockUtil redisLockUtil;
|
||||
|
||||
@Resource
|
||||
private SnowFlakeGenerator snowFlakeGenerator;
|
||||
|
||||
@Resource
|
||||
private SnowflakeIdWorker3rd idWorker;
|
||||
|
||||
@Resource
|
||||
private DictDataApi dictDataApi;
|
||||
|
||||
@Resource
|
||||
private GoodsMapper goodsMapper;
|
||||
|
||||
@Resource
|
||||
private RawGoodsMapper rawGoodsMapper;
|
||||
|
||||
@Resource
|
||||
private OrderPartsMapper orderPartsMapper;
|
||||
|
||||
@Resource
|
||||
private OrderBodyMapper orderBodyMapper;
|
||||
|
||||
@Resource
|
||||
private OrderGroupMapper orderGroupMapper;
|
||||
|
||||
@Resource
|
||||
private PlateMapper plateMapper;
|
||||
|
||||
@Resource
|
||||
private OrderItemMapper orderItemMapper;
|
||||
|
||||
@Resource
|
||||
private PlateGoodMapper plateGoodMapper;
|
||||
|
||||
@Resource
|
||||
private OrderInputProcessor orderInputProcessor;
|
||||
|
||||
@Resource
|
||||
private PartsMapper partsMapper;
|
||||
|
||||
@RabbitListener(queues = RabbitMqConstants.ORDER_IMPORT_DEFAULT_EXCEL_QUEUE)
|
||||
@DS("imes_prod")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void orderImport(String message, Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long deliveryTag) throws Exception {
|
||||
Long organId = null;
|
||||
Long taskId = Long.parseLong(message);
|
||||
try {
|
||||
organId = OrganContextHolder.getOrganId();
|
||||
if (ObjectUtil.isNull(organId)) {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_ORGANID_NOT_EXISTS);
|
||||
}
|
||||
// 确认任务,更新状态为消费成功,没有找到任务中断后续消费
|
||||
OrderImportTaskDO orderImportTaskDO = confirmOrderImport(taskId);
|
||||
if (ObjectUtil.isNull(orderImportTaskDO)) {
|
||||
return;
|
||||
}
|
||||
// 创建生产单
|
||||
Long orderId = createOrder(taskId);
|
||||
// 创建工厂
|
||||
DefaultExcelOrderImportFactory defaultExcelOrderImportFactory = new DefaultExcelOrderImportFactory(taskId, orderId, organId, orderImportTaskDO.getCreator(),
|
||||
snowFlakeGenerator, idWorker, orderImportTaskMapper, orderImportTempDataMapper, dictDataApi, goodsMapper, rawGoodsMapper, orderPartsMapper,
|
||||
orderBodyMapper, orderGroupMapper, plateMapper, orderItemMapper, plateGoodMapper, orderInputProcessor, partsMapper);
|
||||
// 解析临时表数据
|
||||
defaultExcelOrderImportFactory.analyzeTempData();
|
||||
} catch (Exception e) {
|
||||
// 确认消息进入死信队列
|
||||
channel.basicNack(deliveryTag, false, false);
|
||||
String importFailNotify = ORDER_IMPORT_FAIL.getMsg();
|
||||
// 更新状态为消费失败、导入失败
|
||||
orderImportTaskMapper.update(new LambdaUpdateWrapper<OrderImportTaskDO>().eq(OrderImportTaskDO::getId, taskId)
|
||||
.set(OrderImportTaskDO::getStatus, OrderImportTaskStatusEnum.CONSUME_FAIL.getStatus())
|
||||
.set(OrderImportTaskDO::getImportStatus, OrderImportStatusEnum.IMPORT_FAIL.getStatus())
|
||||
.set(OrderImportTaskDO::getResult, importFailNotify));
|
||||
log.error(importFailNotify, e);
|
||||
throw e;
|
||||
} finally {
|
||||
// 手动确认消息接收
|
||||
channel.basicAck(deliveryTag, false);
|
||||
// 导入锁解锁
|
||||
redisLockUtil.unlock(String.format(RedisKeyConstants.ORDER_IMPORT_LOCK_KEY, organId), message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认导入任务,更新任务状态
|
||||
*
|
||||
* @param taskId
|
||||
*/
|
||||
private OrderImportTaskDO confirmOrderImport(Long taskId) {
|
||||
boolean taskExist = false;
|
||||
OrderImportTaskDO orderImportTaskDO = null;
|
||||
// 线程每1s查询一次,查三次没有就提示任务不存在
|
||||
for (int i = 0; i < 3; i++) {
|
||||
orderImportTaskDO = orderImportTaskMapper.selectById(taskId);
|
||||
if (ObjectUtil.isNotNull(orderImportTaskDO)) {
|
||||
taskExist = true;
|
||||
break;
|
||||
} else {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
log.error("====================【线程中断异常】====================");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (taskExist) {
|
||||
// 更新状态为消费成功
|
||||
orderImportTaskMapper.update(new LambdaUpdateWrapper<OrderImportTaskDO>().eq(OrderImportTaskDO::getId, taskId).set(OrderImportTaskDO::getStatus, OrderImportTaskStatusEnum.CONSUME_SUCCESS.getStatus()));
|
||||
} else {
|
||||
String taskNotExistNotify = String.format("%s不存在的导入任务,消费中止", taskId);
|
||||
// 更新状态为消费成功,导入失败
|
||||
orderImportTaskMapper.update(
|
||||
new LambdaUpdateWrapper<OrderImportTaskDO>()
|
||||
.eq(OrderImportTaskDO::getId, taskId)
|
||||
.set(OrderImportTaskDO::getStatus, OrderImportTaskStatusEnum.CONSUME_SUCCESS.getStatus())
|
||||
.set(OrderImportTaskDO::getImportStatus, OrderImportStatusEnum.IMPORT_FAIL.getStatus())
|
||||
.set(OrderImportTaskDO::getResult, taskNotExistNotify)
|
||||
);
|
||||
log.error(String.format("====================【%s】====================", taskNotExistNotify));
|
||||
}
|
||||
return orderImportTaskDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建生产单
|
||||
*
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
private Long createOrder(Long taskId) {
|
||||
// 查询临时表中的order
|
||||
LambdaQueryWrapper<OrderImportTempDataDO> orderTempData = new LambdaQueryWrapper<OrderImportTempDataDO>()
|
||||
.eq(OrderImportTempDataDO::getTaskId, taskId)
|
||||
.eq(OrderImportTempDataDO::getType, OrderImportTmpDataTypeEnum.ORDER.getType())
|
||||
.eq(OrderImportTempDataDO::getSort, 0);
|
||||
OrderImportTempDataDO orderImportTempDataDO = orderImportTempDataMapper.selectOne(orderTempData);
|
||||
// 不是新单不用创建
|
||||
if (ObjectUtil.isNotNull(orderImportTempDataDO) && ObjectUtil.isNotNull(orderImportTempDataDO.getOrderId())) {
|
||||
Long existOrderId = orderImportTempDataDO.getOrderId();
|
||||
// 校验生产单id
|
||||
OrderDO orderDO = orderMapper.selectById(existOrderId);
|
||||
Optional.ofNullable(orderDO).orElseThrow(() -> ServiceExceptionUtil.exception(ORDER_IMPORT_ORDER_NOT_EXISTS, existOrderId));
|
||||
// 更新补板生产单属性
|
||||
updateOrder(orderDO);
|
||||
return existOrderId;
|
||||
}
|
||||
// 取临时order数据,detail转orderDO,插入新增orderDO
|
||||
String orderTempDetail = JsonUtils.unzipString(orderImportTempDataDO.getDetail());
|
||||
OrderDO newOrder = JSON.parseObject(orderTempDetail, OrderDO.class);
|
||||
Long orderId = (Long) snowFlakeGenerator.nextId(null);
|
||||
newOrder.setId(orderId);
|
||||
orderMapper.insert(newOrder);
|
||||
// 生产单id更新到导入任务表
|
||||
orderImportTaskMapper.update(new LambdaUpdateWrapper<OrderImportTaskDO>()
|
||||
.eq(OrderImportTaskDO::getId, taskId)
|
||||
.set(OrderImportTaskDO::getOrderId, orderId));
|
||||
return orderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新补板生产单的属性
|
||||
*
|
||||
* @param orderDO
|
||||
*/
|
||||
public void updateOrder(OrderDO orderDO) {
|
||||
// 发货日期校验
|
||||
LocalDate orderDate = LocalDate.from(orderDO.getOrderDate());
|
||||
LocalDate deliveryDate = LocalDate.from(orderDO.getDeliveryDate());
|
||||
if (deliveryDate.isBefore(orderDate)) {
|
||||
// 将 deliveryDate 设置为 orderDate 后的第 30 天
|
||||
deliveryDate = orderDate.plusMonths(1);
|
||||
}
|
||||
orderDO.setDeliveryDate(deliveryDate.atStartOfDay());
|
||||
if (Objects.equals(orderDO.getStatus(), OrderStatusEnum.EMPTY.getStatus())) {
|
||||
orderDO.setStatus(OrderStatusEnum.NEW_ORDER.getStatus());
|
||||
}
|
||||
if (Objects.equals(orderDO.getStatus(), OrderStatusEnum.FINISH_PRODUCTION.getStatus())) {
|
||||
orderDO.setStatus(OrderStatusEnum.IN_PRODUCTION.getStatus());
|
||||
}
|
||||
if (Objects.equals(orderDO.getPackaged(), OrderPackageStatusEnum.PACKAGED.getStatus())) {
|
||||
orderDO.setPackaged(OrderPackageStatusEnum.PACKAGED.getStatus());
|
||||
}
|
||||
orderMapper.updateById(orderDO);
|
||||
}
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.cf.imes.module.plan.service.orderImport.consumer;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.cf.imes.framework.organ.core.context.OrganContextHolder;
|
||||
import com.cf.imes.framework.redis.constants.RedisKeyConstants;
|
||||
import com.cf.imes.framework.redis.util.RedisLockUtil;
|
||||
import com.rabbitmq.client.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.amqp.support.AmqpHeaders;
|
||||
import org.springframework.messaging.handler.annotation.Header;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
|
||||
import static com.cf.imes.framework.mq.rabbitmq.constant.RabbitMqConstants.ORDER_IMPORT_DEAD_LETTER_QUEUE;
|
||||
|
||||
/**
|
||||
* 生产单导入死信队列消费
|
||||
*
|
||||
* @author Gqr
|
||||
* @since 2025/2/12 10:48
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class OrderImportDeadLetterConsumer {
|
||||
|
||||
@Resource
|
||||
private RedisLockUtil redisLockUtil;
|
||||
|
||||
@RabbitListener(queues = ORDER_IMPORT_DEAD_LETTER_QUEUE)
|
||||
public void receiveA(String message, Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long deliveryTag) throws IOException {
|
||||
log.info("====================【生产单导入收到死信消息:{}】====================", message);
|
||||
// 手动确认消息
|
||||
channel.basicAck(deliveryTag, false);
|
||||
|
||||
// 导入锁解锁
|
||||
Long organId = OrganContextHolder.getOrganId();
|
||||
if (ObjectUtil.isNotNull(organId)) {
|
||||
redisLockUtil.unlock(String.format(RedisKeyConstants.ORDER_IMPORT_LOCK_KEY, organId), message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+1155
File diff suppressed because it is too large
Load Diff
+254
@@ -0,0 +1,254 @@
|
||||
<?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.cf.imes.module.plan.dal.mysql.orderImport.OrderImportTempDataMapper">
|
||||
<select id="selectCountGoodsIdGroup" resultType="java.lang.Integer">
|
||||
select count(distinct outer_goods_id) from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and type = #{reqVO.type}
|
||||
</select>
|
||||
|
||||
<select id="selectGoodsIdGroup"
|
||||
resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataGoodsIdGroupDO">
|
||||
select outer_goods_id
|
||||
<if test="reqVO.doPaging">
|
||||
, min(sort) as sortn
|
||||
</if>
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and type = #{reqVO.type}
|
||||
group by outer_goods_id
|
||||
<if test="reqVO.doPaging">
|
||||
order by sortn
|
||||
limit #{reqVO.offset}, #{reqVO.size}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectCountPlateGoodsGroup" resultType="java.lang.Integer">
|
||||
select count(1) from (
|
||||
select goods_name,
|
||||
material,
|
||||
wave,
|
||||
color,
|
||||
spec,
|
||||
height,
|
||||
width,
|
||||
thickness,
|
||||
brand
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and type = #{reqVO.type} and outer_goods_id = #{reqVO.goodsId}
|
||||
group by goods_name,material, wave, color, spec, height, width, thickness, brand) temp
|
||||
</select>
|
||||
|
||||
<select id="selectCountPartGoodsGroup" resultType="java.lang.Integer">
|
||||
select count(1) from (
|
||||
select goods_name,
|
||||
material,
|
||||
color,
|
||||
is_composite,
|
||||
category,
|
||||
sub_type,
|
||||
factory,
|
||||
model,
|
||||
spec,
|
||||
height,
|
||||
width,
|
||||
thickness,
|
||||
unit,
|
||||
brand
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and type = #{reqVO.type} and outer_goods_id = #{reqVO.goodsId}
|
||||
group by goods_name, material, color, is_composite, category, sub_type, factory, model, spec, height, width, thickness, unit, brand) temp
|
||||
</select>
|
||||
|
||||
<select id="selectPlateGoodsGroup" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataGoodsGroupDO">
|
||||
select goods_name,
|
||||
material,
|
||||
wave,
|
||||
color,
|
||||
spec,
|
||||
height,
|
||||
width,
|
||||
thickness,
|
||||
brand
|
||||
<if test="reqVO.doPaging">
|
||||
,min(sort) as sortn
|
||||
</if>
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and type = #{reqVO.type} and outer_goods_id = #{reqVO.goodsId}
|
||||
group by goods_name, material, wave, color, spec, height, width, thickness, brand
|
||||
<if test="reqVO.doPaging">
|
||||
order by sortn
|
||||
limit #{reqVO.offset}, #{reqVO.size}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPartGoodsGroup" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataGoodsGroupDO">
|
||||
select
|
||||
goods_name,
|
||||
material,
|
||||
color,
|
||||
is_composite,
|
||||
category,
|
||||
sub_type,
|
||||
factory,
|
||||
model,
|
||||
spec,
|
||||
height,
|
||||
width,
|
||||
thickness,
|
||||
unit,
|
||||
brand
|
||||
<if test="reqVO.doPaging">
|
||||
,min(sort) as sortn
|
||||
</if>
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and type = #{reqVO.type} and outer_goods_id = #{reqVO.goodsId}
|
||||
group by goods_name, material, color, is_composite, category, sub_type, factory, model, spec, height, width, thickness, unit, brand
|
||||
<if test="reqVO.doPaging">
|
||||
order by sortn
|
||||
limit #{reqVO.offset}, #{reqVO.size}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectCountRoomGroup" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from (select room_name
|
||||
from order_import_temp_data
|
||||
where task_id = #{taskId} and type != 0
|
||||
group by room_name) temp
|
||||
</select>
|
||||
|
||||
<select id="selectRoomGroup" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataGoodsGroupDO">
|
||||
select room_name
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and type != 0
|
||||
group by room_name
|
||||
<if test="reqVO.doPaging">
|
||||
order by sort
|
||||
limit #{reqVO.offset}, #{reqVO.size}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectCountBodyGroup" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from (select body_name
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and type != 0
|
||||
group by body_name) temp
|
||||
</select>
|
||||
|
||||
<select id="selectBodyGroup" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataGoodsGroupDO">
|
||||
select body_name,sum(case type when 1 then num else 0 end) as bodyPlateNum
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and type != 0
|
||||
group by body_name
|
||||
<if test="reqVO.doPaging">
|
||||
order by sort
|
||||
limit #{reqVO.offset}, #{reqVO.size}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectCountGroupTypeNameGroup" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from (select group_type_name
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and body_name = #{reqVO.bodyName} and type != 0
|
||||
group by group_type_name) temp
|
||||
</select>
|
||||
|
||||
<select id="selectGroupTypeNameGroup" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataGoodsGroupDO">
|
||||
select group_type_name, count(1) as count
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and body_name = #{reqVO.bodyName} and type != 0
|
||||
group by group_type_name
|
||||
<if test="reqVO.doPaging">
|
||||
order by sort
|
||||
limit #{reqVO.offset}, #{reqVO.size}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectCountGroupNameGroup" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from (select group_name
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and body_name = #{reqVO.bodyName} and type != 0
|
||||
<choose>
|
||||
<when test="reqVO.groupTypeName != null and reqVO.groupTypeName != ''">
|
||||
and group_type_name = #{reqVO.groupTypeName}
|
||||
</when>
|
||||
<otherwise>
|
||||
and group_type_name is null
|
||||
</otherwise>
|
||||
</choose>
|
||||
group by group_name) temp
|
||||
</select>
|
||||
|
||||
<select id="selectGroupNameGroup" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataGoodsGroupDO">
|
||||
select group_name, sum(case type when 1 then num else 0 end) as groupNameNum
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and body_name = #{reqVO.bodyName} and type != 0
|
||||
<choose>
|
||||
<when test="reqVO.groupTypeName != null and reqVO.groupTypeName != ''">
|
||||
and group_type_name = #{reqVO.groupTypeName}
|
||||
</when>
|
||||
<otherwise>
|
||||
and group_type_name is null
|
||||
</otherwise>
|
||||
</choose>
|
||||
group by group_name
|
||||
<if test="reqVO.doPaging">
|
||||
order by sort
|
||||
limit #{reqVO.offset}, #{reqVO.size}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectCountGroupName" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and body_name = #{reqVO.bodyName} and type = #{reqVO.type}
|
||||
<choose>
|
||||
<when test="reqVO.groupTypeName != null and reqVO.groupTypeName != ''">
|
||||
and group_type_name = #{reqVO.groupTypeName}
|
||||
</when>
|
||||
<otherwise>
|
||||
and group_type_name is null
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="reqVO.groupName != null and reqVO.groupName != ''">
|
||||
and group_name = #{reqVO.groupName}
|
||||
</when>
|
||||
<otherwise>
|
||||
and group_name is null
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="selectGroupNameList" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataDO">
|
||||
select *
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and body_name = #{reqVO.bodyName} and type = #{reqVO.type}
|
||||
<choose>
|
||||
<when test="reqVO.groupTypeName != null and reqVO.groupTypeName != ''">
|
||||
and group_type_name = #{reqVO.groupTypeName}
|
||||
</when>
|
||||
<otherwise>
|
||||
and group_type_name is null
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="reqVO.groupName != null and reqVO.groupName != ''">
|
||||
and group_name = #{reqVO.groupName}
|
||||
</when>
|
||||
<otherwise>
|
||||
and group_name is null
|
||||
</otherwise>
|
||||
</choose>
|
||||
order by sort
|
||||
limit #{reqVO.offset}, #{reqVO.size}
|
||||
</select>
|
||||
|
||||
<select id="selectPartList" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataDO">
|
||||
select *
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and type = 2 and inner_goods_id = #{reqVO.goodsId}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user