mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
1、新增生产单xml导入异步处理;2、excel导入提示优化;
This commit is contained in:
+2
-2
@@ -28,7 +28,7 @@ public class DictFrameworkUtils {
|
||||
* 针对 {@link #getDictDataLabel(String, String)} 的缓存
|
||||
*/
|
||||
private static final LoadingCache<Pair<String, String>, DictDataRespDTO> GET_DICT_DATA_CACHE = CacheUtils.buildAsyncReloadingCache(
|
||||
Duration.ofMinutes(1L), // 过期时间 1 分钟
|
||||
Duration.ofMinutes(10L), // 过期时间 1 分钟
|
||||
new CacheLoader<>() {
|
||||
|
||||
@Override
|
||||
@@ -43,7 +43,7 @@ public class DictFrameworkUtils {
|
||||
* 针对 {@link #parseDictDataValue(String, String)} 的缓存
|
||||
*/
|
||||
private static final LoadingCache<Pair<String, String>, DictDataRespDTO> PARSE_DICT_DATA_CACHE = CacheUtils.buildAsyncReloadingCache(
|
||||
Duration.ofMinutes(1L), // 过期时间 1 分钟
|
||||
Duration.ofMinutes(10L), // 过期时间 1 分钟
|
||||
new CacheLoader<>() {
|
||||
|
||||
@Override
|
||||
|
||||
+40
-5
@@ -41,22 +41,22 @@ public class ChenfengRabbitMQAutoConfiguration {
|
||||
|
||||
|
||||
/**
|
||||
* 生产单导入交换机、队列、绑定声明
|
||||
* 生产单excel导入交换机、队列、绑定声明
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public FanoutExchange orderImportFanoutExchange() {
|
||||
public FanoutExchange orderImportDefaultExcelFanoutExchange() {
|
||||
return new FanoutExchange(RabbitMqConstants.ORDER_IMPORT_DEFAULT_EXCEL_EXCHANGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生产单导入队列声明
|
||||
* 生产单excel导入队列声明
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public Queue orderImportQueue() {
|
||||
public Queue orderImportDefaultExcelQueue() {
|
||||
Map<String, Object> args = new HashMap<>(1);
|
||||
// x-dead-letter-exchange 这里声明当前队列绑定的死信交换机
|
||||
args.put("x-dead-letter-exchange", ORDER_IMPORT_DEAD_LETTER_EXCHANGE);
|
||||
@@ -72,7 +72,42 @@ public class ChenfengRabbitMQAutoConfiguration {
|
||||
*/
|
||||
@Bean
|
||||
public Binding orderImportDefaultExcelBinding() {
|
||||
return BindingBuilder.bind(orderImportQueue()).to(orderImportFanoutExchange());
|
||||
return BindingBuilder.bind(orderImportDefaultExcelQueue()).to(orderImportDefaultExcelFanoutExchange());
|
||||
}
|
||||
|
||||
/**
|
||||
* 生产单xml导入交换机、队列、绑定声明
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public FanoutExchange orderImportDefaultXmlFanoutExchange() {
|
||||
return new FanoutExchange(RabbitMqConstants.ORDER_IMPORT_DEFAULT_XML_EXCHANGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生产单xml导入队列声明
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public Queue orderImportDefaultXmlQueue() {
|
||||
Map<String, Object> args = new HashMap<>(1);
|
||||
// x-dead-letter-exchange 这里声明当前队列绑定的死信交换机
|
||||
args.put("x-dead-letter-exchange", ORDER_IMPORT_DEAD_LETTER_EXCHANGE);
|
||||
// 设置死信路由键
|
||||
args.put("x-dead-letter-routing-key", ORDER_IMPORT_DEAD_LETTER_ROUTING_KEY);
|
||||
return QueueBuilder.durable(RabbitMqConstants.ORDER_IMPORT_DEFAULT_XML_QUEUE).withArguments(args).build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 生产单xml导入交换机声明
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public Binding orderImportDefaultXmlBinding() {
|
||||
return BindingBuilder.bind(orderImportDefaultXmlQueue()).to(orderImportDefaultXmlFanoutExchange());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+12
-2
@@ -8,15 +8,25 @@ package com.cf.imes.framework.mq.rabbitmq.constant;
|
||||
*/
|
||||
public class RabbitMqConstants {
|
||||
/**
|
||||
* 生产单导入交换机
|
||||
* 生产单导入excel交换机
|
||||
*/
|
||||
public static final String ORDER_IMPORT_DEFAULT_EXCEL_EXCHANGE = "order_import_default_excel_exchange";
|
||||
|
||||
/**
|
||||
* 生产单导入队列
|
||||
* 生产单导入excel队列
|
||||
*/
|
||||
public static final String ORDER_IMPORT_DEFAULT_EXCEL_QUEUE = "order_import_default_excel_queue";
|
||||
|
||||
/**
|
||||
* 生产单导入xml交换机
|
||||
*/
|
||||
public static final String ORDER_IMPORT_DEFAULT_XML_EXCHANGE = "order_import_default_xml_exchange";
|
||||
|
||||
/**
|
||||
* 生产单导入xml队列
|
||||
*/
|
||||
public static final String ORDER_IMPORT_DEFAULT_XML_QUEUE = "order_import_default_xml_queue";
|
||||
|
||||
/**
|
||||
* 生产单导入死信交换机
|
||||
*/
|
||||
|
||||
+3
@@ -91,4 +91,7 @@ public class ErrorCodeConstants {
|
||||
public static final ErrorCode ORDER_IMPORT_DETAIL_FIELD_EMPTY = new ErrorCode(1_002_031_010, "导入校验异常:第{}行,导入明细【{}】不能为空");
|
||||
public static final ErrorCode ORDER_IMPORT_DETAIL_FIELD_LENGTH_ERROR = new ErrorCode(1_002_031_011, "导入校验异常:第{}行,导入明细【{}】长度不能超过【{}】个字符");
|
||||
public static final ErrorCode ORDER_IMPORT_DETAIL_VALID_ERROR = new ErrorCode(1_002_031_012, "导入校验异常:{}");
|
||||
public static final ErrorCode ORDER_IMPORT_GROUPCODE_NOT_EXIST_VALID_ERROR = new ErrorCode(1_002_031_013, "导入校验异常:板件{}下加工组编码{}不存在于加工组编码列表中");
|
||||
public static final ErrorCode ORDER_IMPORT_ROOMCODE_NOT_EXIST_VALID_ERROR = new ErrorCode(1_002_031_014, "导入校验异常:板件{}下房间编码{}不存在于房间编码列表中");
|
||||
public static final ErrorCode ORDER_IMPORT_BODYCODE_NOT_EXIST_VALID_ERROR = new ErrorCode(1_002_031_015, "导入校验异常:板件{}下柜体编码{}不存在于柜体编码列表中");
|
||||
}
|
||||
|
||||
+5
@@ -16,4 +16,9 @@ public class OrderImportConstants {
|
||||
* 房间、柜体缺省name
|
||||
*/
|
||||
public static final String NOT_ASSIGNED = "未命名";
|
||||
|
||||
/**
|
||||
* 房间柜体缺省code
|
||||
*/
|
||||
public static final String NOT_ASSIGNED_CODE = "未命编号";
|
||||
}
|
||||
|
||||
+4
-3
@@ -34,9 +34,10 @@ public enum OrderImportTmpDataTypeEnum {
|
||||
BLOCK_GROOVE_POINTS_POINT(20),
|
||||
BLOCK_GROOVE_ISLET(21),
|
||||
BLOCK_GROOVE_ISLET_POINTS_POINT(22),
|
||||
BLOCK_GROOVE_OFFSETLINE(23),
|
||||
BLOCK_REMKAR(24),
|
||||
PART_REMARK(25);
|
||||
BLOCK_GROOVE_CORRELATIONS(23),
|
||||
BLOCK_GROOVE_OFFSETLINE(24),
|
||||
BLOCK_REMKAR(25),
|
||||
PART_REMARK(26);
|
||||
|
||||
private int type;
|
||||
|
||||
|
||||
+25
@@ -54,6 +54,16 @@ public class OrderImportTempDataDO {
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 设计端id
|
||||
*/
|
||||
private String outerId;
|
||||
|
||||
/**
|
||||
* 设计端归属id
|
||||
*/
|
||||
private String outerSubId;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@@ -145,11 +155,21 @@ public class OrderImportTempDataDO {
|
||||
*/
|
||||
private String roomName;
|
||||
|
||||
/**
|
||||
* 房间编号
|
||||
*/
|
||||
private String roomCode;
|
||||
|
||||
/**
|
||||
* 柜体名称
|
||||
*/
|
||||
private String bodyName;
|
||||
|
||||
/**
|
||||
* 柜体编号
|
||||
*/
|
||||
private String bodyCode;
|
||||
|
||||
/**
|
||||
* 加工组类型
|
||||
*/
|
||||
@@ -160,6 +180,11 @@ public class OrderImportTempDataDO {
|
||||
*/
|
||||
private String groupName;
|
||||
|
||||
/**
|
||||
* 加工组编号
|
||||
*/
|
||||
private String groupCode;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
||||
+102
-1
@@ -1,10 +1,35 @@
|
||||
package com.cf.imes.module.executor.service.orderImport.handler.xml;
|
||||
|
||||
import com.cf.imes.framework.common.exception.ServiceException;
|
||||
import com.cf.imes.framework.mq.rabbitmq.constant.RabbitMqConstants;
|
||||
import com.cf.imes.framework.mybatis.core.generator.SnowFlakeGenerator;
|
||||
import com.cf.imes.framework.redis.config.ChenfengCacheProperties;
|
||||
import com.cf.imes.framework.redis.constants.RedisKeyConstants;
|
||||
import com.cf.imes.framework.redis.util.RedisLockUtil;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderImportAsyncReqVO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.orderImport.OrderImportTaskDO;
|
||||
import com.cf.imes.module.executor.dal.mysql.orderImport.OrderImportTaskMapper;
|
||||
import com.cf.imes.module.executor.dal.mysql.orderImport.OrderImportTempDataMapper;
|
||||
import com.cf.imes.module.executor.enums.OrderImportStatusEnum;
|
||||
import com.cf.imes.module.executor.enums.OrderImportTaskStatusEnum;
|
||||
import com.cf.imes.module.executor.enums.OrderImportTypeEnum;
|
||||
import com.cf.imes.module.executor.service.order.OrderService;
|
||||
import com.cf.imes.module.executor.util.fileConversion.admin.files.xml.DefaultOrderImportXmlParserHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.core.Message;
|
||||
import org.springframework.amqp.core.MessageBuilder;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.support.TransactionSynchronization;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId;
|
||||
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.ORDER_IMPORT_FILE_ANALYZE_ERROR;
|
||||
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.ORDER_IMPORT_ORGAN_LOCK_ERROR;
|
||||
|
||||
/**
|
||||
* @author Gqr
|
||||
* @since 2025/1/9 9:21
|
||||
@@ -12,6 +37,27 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
@Service("defaultXmlOrderImportHandler")
|
||||
@Slf4j
|
||||
public class DefaultXmlOrderImportHandler implements AbstractXmlOrderImportHandler {
|
||||
@Resource
|
||||
private OrderImportTempDataMapper orderImportTempDataMapper;
|
||||
|
||||
@Resource
|
||||
private OrderService orderService;
|
||||
|
||||
@Resource
|
||||
private SnowFlakeGenerator snowFlakeGenerator;
|
||||
|
||||
@Resource
|
||||
private OrderImportTaskMapper orderImportTaskMapper;
|
||||
|
||||
@Resource
|
||||
private RabbitTemplate rabbitTemplate;
|
||||
|
||||
@Resource
|
||||
private RedisLockUtil redisLockUtil;
|
||||
|
||||
@Resource
|
||||
private ChenfengCacheProperties chenfengCacheProperties;
|
||||
|
||||
@Override
|
||||
public String getFactoryName() {
|
||||
return "default";
|
||||
@@ -19,6 +65,61 @@ public class DefaultXmlOrderImportHandler implements AbstractXmlOrderImportHandl
|
||||
|
||||
@Override
|
||||
public void prepareAndConvert(OrderImportAsyncReqVO importAsyncReqVO, MultipartFile file) {
|
||||
// todo xml 准备、转换前置数据
|
||||
// 创建任务
|
||||
Long taskId = createImportTask();
|
||||
String importLockKey = String.format(RedisKeyConstants.ORDER_IMPORT_LOCK_KEY, getUserOrganId());
|
||||
// 检查机构导入锁
|
||||
boolean lockResult = redisLockUtil.lock(importLockKey, String.valueOf(taskId), chenfengCacheProperties.getLockTimeout());
|
||||
if (!lockResult) {
|
||||
throw new ServiceException(ORDER_IMPORT_ORGAN_LOCK_ERROR);
|
||||
}
|
||||
try {
|
||||
DefaultOrderImportXmlParserHandler defaultOrderImportXmlParserHandler = new DefaultOrderImportXmlParserHandler(orderImportTempDataMapper, orderService, snowFlakeGenerator, importAsyncReqVO.getOrderId(), taskId);
|
||||
defaultOrderImportXmlParserHandler.analyzeFile(file);
|
||||
} catch (ServiceException sev) {
|
||||
// 导入锁解锁
|
||||
redisLockUtil.unlock(importLockKey, taskId.toString());
|
||||
throw sev;
|
||||
} catch (Exception e) {
|
||||
log.error(ORDER_IMPORT_FILE_ANALYZE_ERROR.getMsg(), e);
|
||||
// 导入锁解锁
|
||||
redisLockUtil.unlock(importLockKey, taskId.toString());
|
||||
throw new ServiceException(ORDER_IMPORT_FILE_ANALYZE_ERROR);
|
||||
}
|
||||
|
||||
Message message = MessageBuilder
|
||||
.withBody(taskId.toString().getBytes())
|
||||
.setHeader("x-message-ttl", 60000) // 设置 TTL 为 60000 毫秒(60 秒)
|
||||
.build();
|
||||
//如果处于事务中,待事务提交成功了再执行后续操作,防止事务未提交完成导致消费端查不到数据
|
||||
if (TransactionSynchronizationManager.isActualTransactionActive()) {
|
||||
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
|
||||
@Override
|
||||
public void afterCommit() {
|
||||
// 数据库操作全部完成发送消息
|
||||
rabbitTemplate.convertAndSend(RabbitMqConstants.ORDER_IMPORT_DEFAULT_XML_EXCHANGE, null, message);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 数据库操作全部完成发送消息
|
||||
rabbitTemplate.convertAndSend(RabbitMqConstants.ORDER_IMPORT_DEFAULT_XML_EXCHANGE, null, message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建导入任务
|
||||
*
|
||||
* @return taskId
|
||||
*/
|
||||
private Long createImportTask() {
|
||||
// 创建导入任务
|
||||
OrderImportTaskDO orderImportTaskDO = OrderImportTaskDO.builder()
|
||||
.id((Long) snowFlakeGenerator.nextId(null))
|
||||
.type(OrderImportTypeEnum.EXCEL.getType())
|
||||
.importStatus(OrderImportStatusEnum.IMPORT_NOT_YET.getStatus())
|
||||
.status(OrderImportTaskStatusEnum.CREATE_NOT_CONSUME.getStatus())
|
||||
.build();
|
||||
orderImportTaskMapper.insert(orderImportTaskDO);
|
||||
return orderImportTaskDO.getId();
|
||||
}
|
||||
}
|
||||
|
||||
+32
-18
@@ -97,6 +97,11 @@ public final class DefaultOrderImportExcelListener extends AnalysisEventListener
|
||||
|
||||
private int sort = 1;
|
||||
|
||||
/**
|
||||
* 行号
|
||||
*/
|
||||
private int rowIndex;
|
||||
|
||||
private static final String NUMBER_TYPE_ERR = "数量类型错误";
|
||||
private static final String NOT_EMPTY = "不可为空";
|
||||
private static final String ACCORD_ENUM = "请按照提示词语选择填入";
|
||||
@@ -123,7 +128,7 @@ public final class DefaultOrderImportExcelListener extends AnalysisEventListener
|
||||
|
||||
// 获取行号
|
||||
ReadRowHolder readRowHolder = context.readRowHolder();
|
||||
Integer rowIndex = readRowHolder.getRowIndex();
|
||||
rowIndex = readRowHolder.getRowIndex();
|
||||
|
||||
// 生产单信息在1-5行间
|
||||
boolean isOrderInfo = (rowIndex >= 0 && rowIndex <= 4);
|
||||
@@ -600,14 +605,23 @@ public final class DefaultOrderImportExcelListener extends AnalysisEventListener
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取行数的提示,第rowIndex行
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private String getRowIndexNotification() {
|
||||
return String.format("第%s行", rowIndex + 1);
|
||||
}
|
||||
|
||||
// 判断非空,字典值判断
|
||||
public void isNotEmptyAndDict(String value, String dictType, String errValue) {
|
||||
if (StringUtils.isEmpty(value)) {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + NOT_EMPTY);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + NOT_EMPTY);
|
||||
} else {
|
||||
DictDataRespDTO dictDataRespDTO = dictDataApi.parseDictData(dictType, value).getData();
|
||||
if (dictDataRespDTO == null) {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + ACCORD_ENUM);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + ACCORD_ENUM);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -615,12 +629,12 @@ public final class DefaultOrderImportExcelListener extends AnalysisEventListener
|
||||
// 非空判断,错误填入
|
||||
private void isEmpty(String value, String errValue, int length) {
|
||||
if (StringUtils.isEmpty(value)) {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + NOT_EMPTY);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + NOT_EMPTY);
|
||||
} else {
|
||||
// 字符串长度检查
|
||||
int size = value.length();
|
||||
if (size > length) {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + NUMBER_LENGTH_ERR);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + NUMBER_LENGTH_ERR);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -629,7 +643,7 @@ public final class DefaultOrderImportExcelListener extends AnalysisEventListener
|
||||
// 判断非零,错误返回;不为空时,判断是否符合枚举类
|
||||
private void isNotEmptyAndBack(String value, Class<? extends Enum<?>> enumClass, String errValue, int length) {
|
||||
if (StringUtils.isEmpty(value)) {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + NOT_EMPTY);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + NOT_EMPTY);
|
||||
} else {
|
||||
isEmptyAndSize(value, length, errValue);
|
||||
try {
|
||||
@@ -646,10 +660,10 @@ public final class DefaultOrderImportExcelListener extends AnalysisEventListener
|
||||
}
|
||||
}
|
||||
if (!isValid) {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + ACCORD_ENUM);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + ACCORD_ENUM);
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + ACCORD_ENUM);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + ACCORD_ENUM);
|
||||
} catch (NoSuchFieldException | IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -670,13 +684,13 @@ public final class DefaultOrderImportExcelListener extends AnalysisEventListener
|
||||
if (Boolean.TRUE.equals(ToolUtil.convertToType(value, targetType))) {
|
||||
if (Boolean.TRUE.equals(ToolUtil.checkNumber(value))) {
|
||||
if (!ToolUtil.checkPrecision(value, length, decimalLength)) {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + NUMBER_LENGTH_ERR);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + NUMBER_LENGTH_ERR);
|
||||
}
|
||||
} else {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + POSITIVE_ERR);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + POSITIVE_ERR);
|
||||
}
|
||||
} else {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + NUMBER_TYPE_ERR);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + NUMBER_TYPE_ERR);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -695,13 +709,13 @@ public final class DefaultOrderImportExcelListener extends AnalysisEventListener
|
||||
if (Boolean.TRUE.equals(ToolUtil.convertToType(value, targetType))) {
|
||||
if (Boolean.TRUE.equals(checkPositiveNumber(value))) {
|
||||
if (!ToolUtil.checkPrecision(value, length, decimalLength)) {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + NUMBER_LENGTH_ERR);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + NUMBER_LENGTH_ERR);
|
||||
}
|
||||
} else {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + "必须大于0");
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + "必须大于0");
|
||||
}
|
||||
} else {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + NUMBER_TYPE_ERR);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + NUMBER_TYPE_ERR);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -709,7 +723,7 @@ public final class DefaultOrderImportExcelListener extends AnalysisEventListener
|
||||
// 判断非零,错误返回
|
||||
private void isNotEmptyAndBack(String value, String errValue) {
|
||||
if (StringUtils.isEmpty(value)) {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + NOT_EMPTY);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + NOT_EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -718,7 +732,7 @@ public final class DefaultOrderImportExcelListener extends AnalysisEventListener
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
int size = value.length();
|
||||
if (size > length) {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + NUMBER_LENGTH_ERR);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + NUMBER_LENGTH_ERR);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -727,10 +741,10 @@ public final class DefaultOrderImportExcelListener extends AnalysisEventListener
|
||||
public void isEmptyAndPositiveNumber(String value, Class<?> targetType, String errValue) {
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
if (Boolean.FALSE.equals(ToolUtil.convertToType(value, targetType))) {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + NUMBER_TYPE_ERR);
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + NUMBER_TYPE_ERR);
|
||||
} else {
|
||||
if (Boolean.FALSE.equals(checkPositiveNumber(value))) {
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, errValue + "数量必须大于0");
|
||||
throw ServiceExceptionUtil.exception(ORDER_IMPORT_DETAIL_VALID_ERROR, getRowIndexNotification() + errValue + "数量必须大于0");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2049
File diff suppressed because it is too large
Load Diff
+72
@@ -0,0 +1,72 @@
|
||||
package com.cf.imes.module.executor.util.fileConversion.admin.files.xml.VO;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RoomBoxXmlVO implements Serializable {
|
||||
|
||||
// 房间名称
|
||||
private String name;
|
||||
|
||||
// 房间编号
|
||||
private String code;
|
||||
|
||||
// 房间高度
|
||||
private String height;
|
||||
|
||||
// 房间宽度
|
||||
private String width;
|
||||
|
||||
// 房间深度
|
||||
private String length;
|
||||
|
||||
// 成倍拆单数量
|
||||
private String multipleNumber;
|
||||
|
||||
// 成倍拆单序号
|
||||
private String multipleNo;
|
||||
|
||||
|
||||
// 基点X坐标
|
||||
private String basePointX;
|
||||
|
||||
// 基点Y坐标
|
||||
private String basePointY;
|
||||
|
||||
// 基点Z坐标
|
||||
private String basePointZ;
|
||||
|
||||
// 绕X轴旋转角度
|
||||
private String axisXrotate;
|
||||
|
||||
// 绕Y轴旋转角度
|
||||
private String axisYrotate;
|
||||
|
||||
// 绕Z轴旋转角度
|
||||
private String axisZrotate;
|
||||
|
||||
// 房间基点X坐标
|
||||
private String roomBasePointX;
|
||||
|
||||
// 房间基点Y坐标
|
||||
private String roomBasePointY;
|
||||
|
||||
// 房间基点Z坐标
|
||||
private String roomBasePointZ;
|
||||
|
||||
// 房间绕X轴旋转角度
|
||||
private String roomAxisXrotate;
|
||||
|
||||
// 房间绕Y轴旋转角度
|
||||
private String roomAxisYrotate;
|
||||
|
||||
// 房间绕Z轴旋转角度
|
||||
private String roomAxisZrotate;
|
||||
|
||||
}
|
||||
@@ -30,6 +30,10 @@
|
||||
<artifactId>cf-module-prod-plan-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-biz-dict</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 业务组件 -->
|
||||
<dependency>
|
||||
@@ -249,6 +253,10 @@
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-biz-id</artifactId>
|
||||
</include>
|
||||
<include>
|
||||
<groupId>com.cf.imes</groupId>
|
||||
<artifactId>cf-spring-boot-starter-biz-dict</artifactId>
|
||||
</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
<executions>
|
||||
@@ -269,12 +277,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>
|
||||
|
||||
+15
@@ -47,11 +47,21 @@ public class OrderImportTempDataReqVO {
|
||||
*/
|
||||
private String roomName;
|
||||
|
||||
/**
|
||||
* 房间编号
|
||||
*/
|
||||
private String roomCode;
|
||||
|
||||
/**
|
||||
* 柜体名称
|
||||
*/
|
||||
private String bodyName;
|
||||
|
||||
/**
|
||||
* 柜体编号
|
||||
*/
|
||||
private String bodyCode;
|
||||
|
||||
/**
|
||||
* 加工组类型
|
||||
*/
|
||||
@@ -61,4 +71,9 @@ public class OrderImportTempDataReqVO {
|
||||
* 模块名称
|
||||
*/
|
||||
private String groupName;
|
||||
|
||||
/**
|
||||
* 外部id
|
||||
*/
|
||||
private String outerId;
|
||||
}
|
||||
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
// 组件/部件信息
|
||||
public class AssemblyXmlVO implements Serializable {
|
||||
|
||||
// 五金物料编码
|
||||
private String itemCode;
|
||||
|
||||
// 类型——抽屉Drawer、酒格WineGrid、框架/拼框门FrameDoor、线条(顶线、脚线、挡水条等)Line、桌面/台面TableTop、水槽Sink……
|
||||
private String type;
|
||||
|
||||
// 厂家
|
||||
private String manufacturer;
|
||||
|
||||
// 品牌
|
||||
private String brand;
|
||||
|
||||
// 名称
|
||||
private String name;
|
||||
|
||||
// 材质
|
||||
private String material;
|
||||
|
||||
// 颜色
|
||||
private String color;
|
||||
|
||||
// 规格/类型
|
||||
private String specs;
|
||||
|
||||
// 长度
|
||||
private String length;
|
||||
|
||||
// 宽度
|
||||
private String width;
|
||||
|
||||
// 高
|
||||
private String height;
|
||||
|
||||
// 数量
|
||||
private String count;
|
||||
|
||||
// 长度单位
|
||||
private String unit;
|
||||
|
||||
// 数量单位
|
||||
private String unitCount;
|
||||
|
||||
// 仓库
|
||||
private String warehouse;
|
||||
|
||||
// 货架
|
||||
private String shelf;
|
||||
|
||||
// 房间名称
|
||||
private String roomName;
|
||||
|
||||
// 房间号
|
||||
private String roomCode;
|
||||
|
||||
// 柜体名称
|
||||
private String boxName;
|
||||
|
||||
// 柜体号
|
||||
private String boxCode;
|
||||
|
||||
// 加工组号
|
||||
private String groupCode;
|
||||
|
||||
// 加工组名称
|
||||
private String groupName;
|
||||
|
||||
// 模块名称
|
||||
private String moduleName;
|
||||
|
||||
// 模块号
|
||||
private String moduleCode;
|
||||
|
||||
// 子组件/部件物料编码
|
||||
private String subCodes;
|
||||
|
||||
// 备注
|
||||
// private RemarkXmlVOS remarkXmlVOS;
|
||||
}
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
// 板件信息
|
||||
public class BlockXmlVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -2203972183257792706L;
|
||||
|
||||
// 设计编号
|
||||
private String designCode;
|
||||
|
||||
// 生产编号
|
||||
private String productionCode;
|
||||
|
||||
// 名称
|
||||
private String name;
|
||||
|
||||
// 类型——类型——背板类、层板类、立板类 -- order_plate_type
|
||||
private String type;
|
||||
|
||||
// 是否见光板/面板 ——是/否
|
||||
private String visible;
|
||||
|
||||
// 开向——左开、右开、上开、下开、非门板 -- doorOpeningDirections
|
||||
private String openDirection;
|
||||
|
||||
// 设计纹路——正纹、反纹、可翻转 -- grainType
|
||||
private String texture;
|
||||
|
||||
// 设计饰面——无、单面、双面
|
||||
private String coatingType;
|
||||
|
||||
// 成品长
|
||||
private String length;
|
||||
|
||||
// 成品宽
|
||||
private String width;
|
||||
|
||||
// 成品厚
|
||||
private String thickness;
|
||||
|
||||
// 坯料长
|
||||
private String rawLength;
|
||||
|
||||
// 坯料宽
|
||||
private String rawWidth;
|
||||
|
||||
// 坯料厚
|
||||
private String rawThickness;
|
||||
|
||||
// 开料长
|
||||
private String cuttingLength;
|
||||
|
||||
// 开料宽
|
||||
private String cuttingWidth;
|
||||
|
||||
// 开料厚
|
||||
private String cuttingThickness;
|
||||
|
||||
// 成倍拆单数量
|
||||
private String multipleNumber;
|
||||
|
||||
// 成倍拆单序号
|
||||
private String multipleNo;
|
||||
|
||||
// 异形——是/否
|
||||
private String unregular;
|
||||
|
||||
// 挖槽——是/否
|
||||
private String slotting;
|
||||
|
||||
// 排版面——设计正面、设计反面、随意面 -- typographyType
|
||||
private String layoutFace;
|
||||
|
||||
// 正面饰面颜色、无
|
||||
private String coatingObverse;
|
||||
|
||||
// 反面饰面颜色、无
|
||||
private String coatingReverse;
|
||||
|
||||
// 长度单位
|
||||
private String unit;
|
||||
|
||||
// 是否钻孔
|
||||
private String drilling;
|
||||
|
||||
// 房间名称
|
||||
private String roomName;
|
||||
|
||||
// 房间号
|
||||
private String roomCode;
|
||||
|
||||
// 房间名称
|
||||
private String boxName;
|
||||
|
||||
// 柜体号
|
||||
private String boxCode;
|
||||
|
||||
// 加工组号
|
||||
private String groupCodes;
|
||||
|
||||
// 柜体名称
|
||||
private String groupName;
|
||||
|
||||
// 模块名称
|
||||
private String moduleName;
|
||||
|
||||
// 模块号
|
||||
private String moduleCode;
|
||||
|
||||
// 基点X坐标
|
||||
private String basePointX;
|
||||
|
||||
// 基点Y坐标
|
||||
private String basePointY;
|
||||
|
||||
// 基点Z坐标
|
||||
private String basePointZ;
|
||||
|
||||
// 绕X轴旋转角度
|
||||
private String axisXrotate;
|
||||
|
||||
// 绕Y轴旋转角度
|
||||
private String axisYrotate;
|
||||
|
||||
// 绕Z轴旋转角度
|
||||
private String axisZrotate;
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CorrelationXmlVO implements Serializable {
|
||||
|
||||
// 关联五金/关联组件物料编码
|
||||
private String itemCode;
|
||||
|
||||
// 类型
|
||||
private String type;
|
||||
|
||||
// 厂家
|
||||
private String manufacturer;
|
||||
|
||||
// 品牌
|
||||
private String brand;
|
||||
|
||||
// 名称
|
||||
private String name;
|
||||
|
||||
// 材质
|
||||
private String material;
|
||||
|
||||
// 颜色
|
||||
private String color;
|
||||
|
||||
// 规格/类型
|
||||
private String specs;
|
||||
|
||||
// 长
|
||||
private String length;
|
||||
|
||||
// 宽
|
||||
private String width;
|
||||
|
||||
// 高
|
||||
private String height;
|
||||
|
||||
// 长度单位
|
||||
private String unit;
|
||||
|
||||
// 数量
|
||||
private String count;
|
||||
|
||||
// 数量单位
|
||||
private String unitCount;
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
// 开料成型(还需进行精修/铣削/打磨的板材,成品尺寸-封边+预留边)轮廓信息
|
||||
public class CuttingOutlineXmlVO implements Serializable {
|
||||
|
||||
// 相对于成品轮廓,基准点的X坐标偏移量
|
||||
private String referenceOffsetX;
|
||||
|
||||
// 相对于成品轮廓,基准点的Y坐标偏移量
|
||||
private String referenceOffsetY;
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
// 封边条信息
|
||||
public class EdgingXmlVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -8053518845837052834L;
|
||||
|
||||
// 封边条物料编码
|
||||
private String itemCode;
|
||||
|
||||
// 厂家
|
||||
private String manufacturer;
|
||||
|
||||
// 品牌
|
||||
private String brand;
|
||||
|
||||
// 名称
|
||||
private String name;
|
||||
|
||||
// 材质
|
||||
private String material;
|
||||
|
||||
// 颜色
|
||||
private String color;
|
||||
|
||||
// 规格
|
||||
private String specs;
|
||||
|
||||
// 长
|
||||
private String length;
|
||||
|
||||
// 宽
|
||||
private String width;
|
||||
|
||||
// 厚
|
||||
private String thickness;
|
||||
|
||||
// 长度单位——默认m米
|
||||
private String unit;
|
||||
|
||||
// 仓库
|
||||
private String warehouse;
|
||||
|
||||
// 货架
|
||||
private String shelf;
|
||||
|
||||
// 数量
|
||||
private String count;
|
||||
|
||||
// 数量单位(默认m米)
|
||||
private String unitCount;
|
||||
|
||||
// 房间名称
|
||||
private String roomName;
|
||||
|
||||
// 房间号
|
||||
private String roomCode;
|
||||
|
||||
// 柜体名称
|
||||
private String boxName;
|
||||
|
||||
// 柜体号
|
||||
private String boxCode;
|
||||
|
||||
// 加工组名称
|
||||
private String groupName;
|
||||
|
||||
// 加工组号
|
||||
private String groupCode;
|
||||
|
||||
// 模块名称
|
||||
private String moduleName;
|
||||
|
||||
// 模块号
|
||||
private String moduleCode;
|
||||
|
||||
// // 备注
|
||||
// private RemarkXmlVOS remarkXmlVOS;
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
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
|
||||
public class ExtraVO {
|
||||
|
||||
@Schema(description ="板类型" )
|
||||
private String boardType;
|
||||
|
||||
@Schema(description ="挖穿的孔数" )
|
||||
private String throughHoleCount;
|
||||
|
||||
@Schema(description ="挖穿的孔数" )
|
||||
private String throughModelCount;
|
||||
|
||||
@Schema(description ="是否有二维刀路" )
|
||||
private String has2DModel;
|
||||
|
||||
@Schema(description ="是否有三维刀路" )
|
||||
private String has3DModel;
|
||||
|
||||
@Schema(description ="排版面" )
|
||||
private String composingFace;
|
||||
|
||||
@Schema(description ="板边备注" )
|
||||
private List<String> edgeRemarks;
|
||||
|
||||
@Schema(description ="封边备注" )
|
||||
private List<RectSealVO> rectSealDetail;
|
||||
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
// 凹槽信息
|
||||
public class GrooveXmlVO implements Serializable {
|
||||
|
||||
// 凹槽ID
|
||||
private String id;
|
||||
|
||||
// 内部孤岛ID集合
|
||||
private String subIDs;
|
||||
|
||||
// 类型——矩形槽Rectangle、路径槽Path、内铣槽internalMilling、折返路径槽turnbackPath
|
||||
private String type;
|
||||
|
||||
// 加工面——正面、反面、左侧面、右侧面、上侧面、下侧面、斜面
|
||||
private String face;
|
||||
|
||||
// 宽度
|
||||
private String width;
|
||||
|
||||
// 长度
|
||||
private String length;
|
||||
|
||||
// 深度
|
||||
private String depth;
|
||||
|
||||
// 加宽
|
||||
private String widthExtend;
|
||||
|
||||
// 加长
|
||||
private String lengthExtend;
|
||||
|
||||
// 加深
|
||||
private String depthExtend;
|
||||
|
||||
// 造型/凹槽(边缘)的刀路方向——内圈顺时针(最)外圈逆时针、内圈顺时针(最)外圈顺时针、内圈逆时针(最)外圈顺时针、内圈逆时针(最)外圈逆时针
|
||||
private String direction;
|
||||
|
||||
// 加工模式/方式——由内向外、由外向内
|
||||
private String mode;
|
||||
|
||||
// 圆角半径
|
||||
private String round;
|
||||
|
||||
// 刀名称
|
||||
private String toolName;
|
||||
|
||||
// 刀号
|
||||
private String toolNo;
|
||||
|
||||
// 刀直径
|
||||
private String toolDiameter;
|
||||
|
||||
// 刀路冗余量——偏移重叠量
|
||||
private String redundance;
|
||||
|
||||
// 角度——二维刀路V型刀提角/清角用
|
||||
private String tangentAngle;
|
||||
|
||||
// 内层(不含内嵌凹槽内的孤岛)孤岛数量
|
||||
private String isletCount;
|
||||
|
||||
private String result;
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
// 凹槽列表
|
||||
public class GrooveXmlVOS implements Serializable {
|
||||
|
||||
// 凹槽数量
|
||||
private String count;
|
||||
|
||||
// 正面垂凹槽数量/凹槽数量
|
||||
private String countFaceA;
|
||||
|
||||
// 反面凹槽数量/凹槽数量
|
||||
private String countFaceB;
|
||||
|
||||
// 侧凹槽数量/凹槽数量
|
||||
private String countSide;
|
||||
|
||||
// 左侧槽数量/凹槽数量
|
||||
private String countSideL;
|
||||
|
||||
// 右侧槽数量/凹槽数量
|
||||
private String countSideR;
|
||||
|
||||
// 上侧槽数量/凹槽数量
|
||||
private String countSideU;
|
||||
|
||||
// 下侧槽数量/凹槽数量
|
||||
private String countSideD;
|
||||
|
||||
// 斜面凹槽数量
|
||||
private String countBevelled;
|
||||
|
||||
// 矩形凹槽数量
|
||||
private String countRectangle;
|
||||
|
||||
// 挖穿造型/槽数量
|
||||
private String countThrough;
|
||||
|
||||
// 二维造型刀路数量
|
||||
private String count2V;
|
||||
|
||||
// 三维造型刀路(浮雕)数量
|
||||
private String count3D;
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GroupXmlVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1168768925661067043L;
|
||||
|
||||
// 加工组名称
|
||||
private String name;
|
||||
|
||||
// 加工组编号
|
||||
private String code;
|
||||
|
||||
// 加工组高度
|
||||
private String height;
|
||||
|
||||
// 加工组宽度
|
||||
private String width;
|
||||
|
||||
// 加工组长度
|
||||
private String length;
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
// 五金信息
|
||||
public class HardwareXmlVO implements Serializable {
|
||||
|
||||
// 五金物料编码
|
||||
private String itemCode;
|
||||
|
||||
// 类型——拉手Handle、铰链Hinge、导轨Track、衣杆/裤杆Pole、杆托/杆座PoleBase、拉直器Straightener、灯带LightBelt、螺丝(及螺母)Screw(Nut)……
|
||||
private String type;
|
||||
|
||||
// 厂家
|
||||
private String manufacturer;
|
||||
|
||||
// 品牌
|
||||
private String brand;
|
||||
|
||||
// 名称
|
||||
private String name;
|
||||
|
||||
// 材质
|
||||
private String material;
|
||||
|
||||
// 颜色
|
||||
private String color;
|
||||
|
||||
// 规格/类型
|
||||
private String specs;
|
||||
|
||||
// 长度
|
||||
private String length;
|
||||
|
||||
// 宽度
|
||||
private String width;
|
||||
|
||||
// 厚
|
||||
private String thickness;
|
||||
|
||||
// 数量
|
||||
private String count;
|
||||
|
||||
// 长度单位
|
||||
private String unit;
|
||||
|
||||
// 数量单位
|
||||
private String unitCount;
|
||||
|
||||
// 仓库
|
||||
private String warehouse;
|
||||
|
||||
// 货架
|
||||
private String shelf;
|
||||
|
||||
// 房间名称
|
||||
private String roomName;
|
||||
|
||||
// 房间号
|
||||
private String roomCode;
|
||||
|
||||
// 柜体名称
|
||||
private String boxName;
|
||||
|
||||
// 柜体号
|
||||
private String boxCode;
|
||||
|
||||
// 加工组号
|
||||
private String groupCode;
|
||||
|
||||
// 加工组名称
|
||||
private String groupName;
|
||||
|
||||
// 模块名称
|
||||
private String moduleName;
|
||||
|
||||
// 模块号
|
||||
private String moduleCode;
|
||||
|
||||
// 子五金物料编码
|
||||
private String subCodes;
|
||||
|
||||
// // 备注
|
||||
// private RemarkXmlVOS remarkXmlVOS;
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class HoleXmlVO implements Serializable {
|
||||
|
||||
// 孔类型
|
||||
private String type;
|
||||
|
||||
// 拆单名/商品名
|
||||
private String name;
|
||||
|
||||
// 加工面——正面、反面、左侧面、右侧面、上侧面、下侧面、斜面
|
||||
private String face;
|
||||
|
||||
// 方向——向后Z-、向前Z+、向右X+、向左X-、向下Y-、向上Y+、斜O 孔加工面
|
||||
private String direction;
|
||||
|
||||
// 直径/沉头孔外直径
|
||||
private String diameter;
|
||||
|
||||
// 沉头孔内直径
|
||||
private String diameterInner;
|
||||
|
||||
// 深度/沉头孔浅孔深度
|
||||
private String depth;
|
||||
|
||||
// 沉头孔深孔深度
|
||||
private String depthInner;
|
||||
|
||||
// 孔组数量
|
||||
private String groupNumber;
|
||||
|
||||
// 孔组X坐标偏移
|
||||
private String groupXoffset;
|
||||
|
||||
// 孔组Y坐标偏移
|
||||
private String groupYoffset;
|
||||
|
||||
// 孔组Z坐标偏移
|
||||
private String groupZoffset;
|
||||
|
||||
// 刀名称
|
||||
private String toolName;
|
||||
|
||||
// 刀号
|
||||
private String toolNo;
|
||||
|
||||
// 起点坐标X
|
||||
private String startX;
|
||||
|
||||
// 起点坐标Y
|
||||
private String startY;
|
||||
|
||||
// 起点坐标Z
|
||||
private String startZ;
|
||||
|
||||
// 刀具起点X轴旋转角度
|
||||
private String toolStartRotateX;
|
||||
|
||||
// 刀具起点Y轴旋转角度
|
||||
private String toolStartRotateY;
|
||||
|
||||
// 刀具起点Z轴旋转角度
|
||||
private String toolStartRotateZ;
|
||||
|
||||
// 终点坐标X
|
||||
private String endX;
|
||||
|
||||
// 终点坐标Y
|
||||
private String endY;
|
||||
|
||||
// 终点坐标Z
|
||||
private String endZ;
|
||||
|
||||
// 刀具终点X轴旋转角度
|
||||
private String toolEndRotateX;
|
||||
|
||||
// 刀具终点Y轴旋转角度
|
||||
private String toolEndRotateY;
|
||||
|
||||
// 刀具终点Z轴旋转角度
|
||||
private String toolEndRotateZ;
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
// 孔列表
|
||||
public class HoleXmlVOS implements Serializable {
|
||||
|
||||
// 孔数量
|
||||
private String count;
|
||||
|
||||
// 正面垂直孔数量
|
||||
private String countFaceA;
|
||||
|
||||
// 反面垂直孔数量
|
||||
private String countFaceB;
|
||||
|
||||
// 水平侧孔数量
|
||||
private String countSide;
|
||||
|
||||
// 左侧孔数量
|
||||
private String countSideL;
|
||||
|
||||
// 右侧孔数量
|
||||
private String countSideR;
|
||||
|
||||
// 上侧孔数量
|
||||
private String countSideU;
|
||||
|
||||
// 下侧孔数量
|
||||
private String countSideD;
|
||||
|
||||
// 斜面孔数量
|
||||
private String countBevelled;
|
||||
|
||||
// 偏心轮/锁定孔数
|
||||
private String countLocking;
|
||||
|
||||
// 预埋件孔数量
|
||||
private String countBuildIn;
|
||||
|
||||
// 铰链孔数量
|
||||
private String countHinge;
|
||||
|
||||
// 挖穿孔数量(通孔/对成孔)
|
||||
private String countThrough;
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
// 孤岛信息
|
||||
public class IsletXmlVO implements Serializable {
|
||||
|
||||
// 孤岛ID
|
||||
private String id;
|
||||
|
||||
// 内部槽ID集合
|
||||
private String subIDs;
|
||||
|
||||
// 内层(不含内嵌孤岛内的凹槽)凹槽数量
|
||||
private String grooveCount;
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
// 偏移刀路信息
|
||||
public class OffsetLineXmlVO implements Serializable {
|
||||
|
||||
// 偏移值——正值外偏/右偏、负值内偏/左偏
|
||||
private String offset;
|
||||
|
||||
// 深度
|
||||
private String depth;
|
||||
|
||||
// 刀名称
|
||||
private String toolName;
|
||||
|
||||
// 刀号
|
||||
private String toolNo;
|
||||
|
||||
// 刀直径
|
||||
private String toolDiameter;
|
||||
|
||||
// 角度——二维刀路V型刀提角/清角用
|
||||
private String tangentAngle;
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
// 板材信息
|
||||
public class PlateXmlVO implements Serializable {
|
||||
|
||||
// 物料编码
|
||||
private String itemCode;
|
||||
|
||||
// 厂家
|
||||
private String manufacturer;
|
||||
|
||||
// 品牌
|
||||
private String brand;
|
||||
|
||||
// 名称
|
||||
private String name;
|
||||
|
||||
// 材质
|
||||
private String material;
|
||||
|
||||
// 饰面类型——无、单面、双面
|
||||
private String coating;
|
||||
|
||||
// 有无纹理 有 无
|
||||
private String grained;
|
||||
|
||||
// 正面饰面颜色、无(空)
|
||||
private String coatingObverse;
|
||||
|
||||
// 反面饰面颜色、无(空)
|
||||
private String coatingReverse;
|
||||
|
||||
// 规格
|
||||
private String specs;
|
||||
|
||||
// 长
|
||||
private String length;
|
||||
|
||||
// 宽
|
||||
private String width;
|
||||
|
||||
// 厚
|
||||
private String thickness;
|
||||
|
||||
// 是否余料
|
||||
private String oddment;
|
||||
|
||||
// 余料长
|
||||
private String oddmentLength;
|
||||
|
||||
// 余料宽
|
||||
private String oddmentWidth;
|
||||
|
||||
// 余料厚
|
||||
private String oddmentThickness;
|
||||
|
||||
// 长度单位——默认mm毫米
|
||||
private String unitLength;
|
||||
|
||||
// 面积
|
||||
private String area;
|
||||
|
||||
// 面积单位——默认m²平方米
|
||||
private String unitArea;
|
||||
|
||||
// 仓库
|
||||
private String warehouse;
|
||||
|
||||
// 货架
|
||||
private String shelf;
|
||||
|
||||
// 余料编号
|
||||
private String oddmentNo;
|
||||
|
||||
// 备注信息
|
||||
private String memo;
|
||||
|
||||
// 数量
|
||||
private String count;
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
// 孤岛点信息
|
||||
public class PointXmlVO implements Serializable {
|
||||
|
||||
// 点X坐标
|
||||
private String pointX;
|
||||
|
||||
// 点Y坐标
|
||||
private String pointY;
|
||||
|
||||
// 点Z坐标 (在outline中不用)
|
||||
private String pointZ;
|
||||
|
||||
// 圆弧凹凸度——直线段为0
|
||||
private String curvature;
|
||||
|
||||
// 边圆弧半径——直线段为0
|
||||
private String radius;
|
||||
|
||||
// 加工工艺
|
||||
private String process;
|
||||
|
||||
// 封边条物料编码
|
||||
private String itemCode;
|
||||
|
||||
// 封边条物料名称
|
||||
private String edgingName;
|
||||
|
||||
// 封边条颜色
|
||||
private String edgingColor;
|
||||
|
||||
// 封边条材质
|
||||
private String edgingMaterial;
|
||||
|
||||
// 封边条厚度
|
||||
private String edgingThickness;
|
||||
|
||||
// 封边条宽度
|
||||
private String edgingWidth;
|
||||
|
||||
// 封边条长度
|
||||
private String edgingLength;
|
||||
|
||||
// 封边条余量
|
||||
private String edgingExtend;
|
||||
|
||||
// 预铣/精修量
|
||||
private String preMilling;
|
||||
|
||||
// 延展/收缩量,预留边
|
||||
private String scale;
|
||||
|
||||
// 边备注信息
|
||||
private String remark;
|
||||
|
||||
// 单边封边尺寸
|
||||
private String count;
|
||||
|
||||
// 封边尺寸单位
|
||||
private String countUnit;
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
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 RectSealVO {
|
||||
|
||||
@Schema(description ="点id" )
|
||||
private String pointID;
|
||||
|
||||
@Schema(description ="预留边" )
|
||||
private String reservedEdge;
|
||||
|
||||
@Schema(description ="封边颜色" )
|
||||
private String sealColor;
|
||||
|
||||
@Schema(description ="封边尺寸" )
|
||||
private String sealSize;
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RemarkXmlVO implements Serializable {
|
||||
|
||||
// 备注名称
|
||||
private String name;
|
||||
|
||||
// 备注信息
|
||||
private String info;
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
package com.cf.imes.module.plan.controller.orderImport.xml.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RoomBoxXmlVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -1320628670435686511L;
|
||||
|
||||
// 房间名称
|
||||
private String name;
|
||||
|
||||
// 房间编号
|
||||
private String code;
|
||||
|
||||
// 房间高度
|
||||
private String height;
|
||||
|
||||
// 房间宽度
|
||||
private String width;
|
||||
|
||||
// 房间深度
|
||||
private String length;
|
||||
|
||||
// 成倍拆单数量
|
||||
private String multipleNumber;
|
||||
|
||||
// 成倍拆单序号
|
||||
private String multipleNo;
|
||||
|
||||
|
||||
// 基点X坐标
|
||||
private String basePointX;
|
||||
|
||||
// 基点Y坐标
|
||||
private String basePointY;
|
||||
|
||||
// 基点Z坐标
|
||||
private String basePointZ;
|
||||
|
||||
// 绕X轴旋转角度
|
||||
private String axisXrotate;
|
||||
|
||||
// 绕Y轴旋转角度
|
||||
private String axisYrotate;
|
||||
|
||||
// 绕Z轴旋转角度
|
||||
private String axisZrotate;
|
||||
|
||||
// 房间基点X坐标
|
||||
private String roomBasePointX;
|
||||
|
||||
// 房间基点Y坐标
|
||||
private String roomBasePointY;
|
||||
|
||||
// 房间基点Z坐标
|
||||
private String roomBasePointZ;
|
||||
|
||||
// 房间绕X轴旋转角度
|
||||
private String roomAxisXrotate;
|
||||
|
||||
// 房间绕Y轴旋转角度
|
||||
private String roomAxisYrotate;
|
||||
|
||||
// 房间绕Z轴旋转角度
|
||||
private String roomAxisZrotate;
|
||||
|
||||
}
|
||||
+62
@@ -5,6 +5,7 @@ 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.module.plan.dal.elasticsearch.BasePosition;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
@@ -54,6 +55,16 @@ public class OrderImportTempDataDO {
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 设计端id
|
||||
*/
|
||||
private String outerId;
|
||||
|
||||
/**
|
||||
* 设计端归属id
|
||||
*/
|
||||
private String outerSubId;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@@ -145,11 +156,33 @@ public class OrderImportTempDataDO {
|
||||
*/
|
||||
private String roomName;
|
||||
|
||||
/**
|
||||
* 房间编号
|
||||
*/
|
||||
private String roomCode;
|
||||
|
||||
/**
|
||||
* imes房间id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Long innerRoomId;
|
||||
|
||||
/**
|
||||
* 柜体名称
|
||||
*/
|
||||
private String bodyName;
|
||||
|
||||
/**
|
||||
* 柜体编号
|
||||
*/
|
||||
private String bodyCode;
|
||||
|
||||
/**
|
||||
* imes柜体id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Long innerBodyId;
|
||||
|
||||
/**
|
||||
* 加工组类型
|
||||
*/
|
||||
@@ -160,11 +193,28 @@ public class OrderImportTempDataDO {
|
||||
*/
|
||||
private String groupName;
|
||||
|
||||
/**
|
||||
* 加工组编号
|
||||
*/
|
||||
private String groupCode;
|
||||
|
||||
/**
|
||||
* imes加工组id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Long innerGroupId;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Double num;
|
||||
|
||||
@TableField(exist = false)
|
||||
private int plateNum;
|
||||
|
||||
@TableField(exist = false)
|
||||
private int unregularNum;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@@ -185,4 +235,16 @@ public class OrderImportTempDataDO {
|
||||
* 排序号
|
||||
*/
|
||||
private int sort;
|
||||
|
||||
/**
|
||||
* 房间基准信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private BasePosition roomPosition;
|
||||
|
||||
/**
|
||||
* 柜体基准信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private BasePosition bodyPosition;
|
||||
}
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
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/2/27 12:02
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderImportTempDataPartItemCodeGroupDO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 7562741999326100586L;
|
||||
|
||||
/**
|
||||
* 配件编码
|
||||
*/
|
||||
private String itemCode;
|
||||
|
||||
/**
|
||||
* 配件类型
|
||||
*/
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
private int sortn;
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
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/2/27 14:10
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderImportTempDataPartRoomBodyGroupGroupDO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 4444878625562385937L;
|
||||
|
||||
/**
|
||||
* 房间编号
|
||||
*/
|
||||
private String roomCode;
|
||||
|
||||
/**
|
||||
* 柜体编号
|
||||
*/
|
||||
private String bodyCode;
|
||||
|
||||
/**
|
||||
* 加工组编号
|
||||
*/
|
||||
private String groupCode;
|
||||
|
||||
/**
|
||||
* 配件数量
|
||||
*/
|
||||
private double partsNum;
|
||||
}
|
||||
+18
@@ -5,6 +5,8 @@ import com.cf.imes.module.plan.controller.orderImport.vo.OrderImportTempDataReqV
|
||||
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 com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataPartItemCodeGroupDO;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataPartRoomBodyGroupGroupDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -153,4 +155,20 @@ public interface OrderImportTempDataMapper extends BaseMapperX<OrderImportTempDa
|
||||
* @return
|
||||
*/
|
||||
List<OrderImportTempDataDO> selectPartList(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 查询配件itemcode分组
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
List<OrderImportTempDataPartItemCodeGroupDO> selectPartItemCodeGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 查询配件itemcode下的房间+柜体+加工组分组
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
List<OrderImportTempDataPartRoomBodyGroupGroupDO> selectPartRoomBodyGroupGroup(@Param("reqVO") OrderImportTempDataReqVO reqVO);
|
||||
}
|
||||
|
||||
+3
@@ -118,6 +118,7 @@ public class DefaultExcelOrderImportConsumer {
|
||||
@DS("imes_prod")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void orderImport(String message, Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long deliveryTag) throws Exception {
|
||||
log.info("====================【生产单默认excel导入收到消息:{}】====================", message);
|
||||
Long organId = null;
|
||||
Long taskId = Long.parseLong(message);
|
||||
try {
|
||||
@@ -133,11 +134,13 @@ public class DefaultExcelOrderImportConsumer {
|
||||
// 创建生产单
|
||||
Long orderId = createOrder(taskId);
|
||||
// 创建工厂
|
||||
log.info("====================【生产单默认excel导入处理临时数据开始】====================");
|
||||
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();
|
||||
log.info("====================【生产单默认excel导入处理临时数据结束】====================");
|
||||
} catch (Exception e) {
|
||||
// 确认消息进入死信队列
|
||||
channel.basicNack(deliveryTag, false, false);
|
||||
|
||||
+260
@@ -0,0 +1,260 @@
|
||||
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.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.executor.enums.OrderStatusEnum;
|
||||
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.orderParts.PartsMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.plate.PlateGoodMapper;
|
||||
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.plan.service.order.OrderInputProcessor;
|
||||
import com.cf.imes.module.plan.service.orderImport.factory.DefaultXmlOrderImportFactory;
|
||||
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/2/19 16:22
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class DefaultXmlOrderImportConsumer {
|
||||
@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 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_XML_QUEUE)
|
||||
@DS("imes_prod")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void orderImport(String message, Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long deliveryTag) throws Exception {
|
||||
log.info("====================【生产单默认xml导入收到消息:{}】====================", message);
|
||||
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);
|
||||
log.info("====================【生产单默认xml导入处理临时数据开始】====================");
|
||||
// 创建工厂
|
||||
DefaultXmlOrderImportFactory defaultExcelOrderImportFactory = new DefaultXmlOrderImportFactory(taskId, orderId, organId, orderImportTaskDO.getCreator(),
|
||||
snowFlakeGenerator, idWorker, orderImportTaskMapper, orderImportTempDataMapper, goodsMapper, rawGoodsMapper, orderPartsMapper,
|
||||
orderBodyMapper, orderGroupMapper, plateMapper, orderItemMapper, plateGoodMapper, orderInputProcessor, partsMapper);
|
||||
// 解析临时表数据
|
||||
defaultExcelOrderImportFactory.analyzeTempData();
|
||||
log.info("====================【生产单默认xml导入处理临时数据结束】====================");
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
+13
-6
@@ -67,7 +67,6 @@ import java.util.List;
|
||||
import static com.cf.imes.module.plan.enums.ErrorCodeConstants.ORDER_IMPORT_PLATE_GOODS_NOT_EXISTS;
|
||||
import static com.cf.imes.module.plan.service.order.OrderInputProcessor.ORDER_PARTS_REMARK_MODEL;
|
||||
import static com.cf.imes.module.plan.service.order.OrderInputProcessor.ORDER_PLATE_MODEL;
|
||||
import static com.cf.imes.module.plan.service.order.OrderInputProcessor.ORDER_PLATE_MODEL_COMPRESS;
|
||||
|
||||
/**
|
||||
* 默认excel导入生产单工厂服务
|
||||
@@ -78,9 +77,9 @@ import static com.cf.imes.module.plan.service.order.OrderInputProcessor.ORDER_PL
|
||||
@Slf4j
|
||||
public class DefaultExcelOrderImportFactory {
|
||||
/**
|
||||
* 分组中做分页的阈值,如:总数1000以上就边分组边分页,否则一次性查出来
|
||||
* 分组中做分页的阈值,如:总数100以上就边分组边分页,否则一次性查出来
|
||||
*/
|
||||
private static final int BATCH_THRESHOLD_NUMBER = 1000;
|
||||
private static final int BATCH_THRESHOLD_NUMBER = 100;
|
||||
|
||||
private Long organId;
|
||||
|
||||
@@ -183,12 +182,21 @@ public class DefaultExcelOrderImportFactory {
|
||||
*/
|
||||
public void analyzeTempData() {
|
||||
try {
|
||||
log.info("====================【生产单默认xml导入处理商品开始】====================");
|
||||
// 解析商品数据
|
||||
analyzeGoods();
|
||||
log.info("====================【生产单默认xml导入处理商品结束】====================");
|
||||
|
||||
log.info("====================【生产单默认xml导入处理配件商品开始】====================");
|
||||
// 解析配件数据
|
||||
analyzePartsGoods();
|
||||
log.info("====================【生产单默认xml导入处理配件商品结束】====================");
|
||||
|
||||
log.info("====================【生产单默认xml导入处理小板/配件开始】====================");
|
||||
// 解析小板/配件项
|
||||
analyzeRooms();
|
||||
log.info("====================【生产单默认xml导入处理小板/配件结束】====================");
|
||||
|
||||
// 删除临时数据
|
||||
deleteTempData();
|
||||
// 完成所有流程后更新任务为导入成功
|
||||
@@ -196,7 +204,6 @@ public class DefaultExcelOrderImportFactory {
|
||||
} catch (Exception e) {
|
||||
// 数据库数据回滚,此时删除 ES 里的数据
|
||||
orderInputProcessor.deleteByOrderId(orderId, ORDER_PLATE_MODEL);
|
||||
orderInputProcessor.deleteByOrderId(orderId, ORDER_PLATE_MODEL_COMPRESS);
|
||||
orderInputProcessor.deleteByOrderId(orderId, ORDER_PARTS_REMARK_MODEL);
|
||||
throw e;
|
||||
} finally {
|
||||
@@ -457,7 +464,7 @@ public class DefaultExcelOrderImportFactory {
|
||||
orderInputProcessor.batchSaveOrderPartsModel(orderPartsRemarks);
|
||||
if (!isLast) {
|
||||
// 存储完成清理 list
|
||||
orderPartsRemarks = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
orderPartsRemarks.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -845,7 +852,7 @@ public class DefaultExcelOrderImportFactory {
|
||||
baseBatchMapper.insertBatchSomeColumn(list);
|
||||
if (!isLast) {
|
||||
// 存储完成清理 list
|
||||
list = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
list.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2005
File diff suppressed because it is too large
Load Diff
+15
@@ -249,4 +249,19 @@
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and type = '${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@PART.type}' and inner_goods_id = #{reqVO.goodsId}
|
||||
</select>
|
||||
|
||||
<select id="selectPartItemCodeGroup" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataPartItemCodeGroupDO">
|
||||
select outer_id as item_code, type, min(sort) as sortn
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId}
|
||||
and type in ('${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@PART_EDGING.type}','${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@PART_HARDWARE.type}','${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@PART_ASSEMBLY.type}')
|
||||
group by outer_id, type
|
||||
</select>
|
||||
|
||||
<select id="selectPartRoomBodyGroupGroup" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataPartRoomBodyGroupGroupDO">
|
||||
select room_code, body_code, group_code, sum(num) as partsNum
|
||||
from order_import_temp_data
|
||||
where task_id = #{reqVO.taskId} and type = #{reqVO.type} and outer_id = #{reqVO.outerId}
|
||||
group by room_code, body_code, group_code
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user