mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
webcad拆单对图纸id为空的校验优化
This commit is contained in:
+1
-1
@@ -24,5 +24,5 @@ public class ErrorCodeConstants {
|
||||
public static final ErrorCode WEBCAD_ORDER_IMPORT_PEEK_NOT_EXIST_ERROR = new ErrorCode(1_005_000_014, "webcad.order.import.peek.not_exist");
|
||||
public static final ErrorCode WEBCAD_ORDER_IMPORT_ORDER_UPDATE_CONCURRENCY_ERROR = new ErrorCode(1_005_000_015, "webcad.order.import.order.update.concurrent");
|
||||
public static final ErrorCode WEBCAD_ORDER_IMPORT_GOODS_UPDATE_CONCURRENCY_ERROR = new ErrorCode(1_005_000_016, "webcad.order.import.goods.update.concurrent");
|
||||
|
||||
public static final ErrorCode WEBCAD_ORDER_IMPORT_CAD_VIEW_FILE_ID_EMPTY_ERROR = new ErrorCode(1_005_000_017, "webcad.order.import.cad.view.file.id.empty.error");
|
||||
}
|
||||
|
||||
+5
-1
@@ -3,6 +3,7 @@ package com.cf.imes.module.plan.service.orderImport;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.cf.imes.framework.common.exception.ServiceException;
|
||||
import com.cf.imes.framework.common.util.i18n.core.util.I18nUtils;
|
||||
import com.cf.imes.module.executor.enums.OrderImportStatusEnum;
|
||||
import com.cf.imes.module.executor.enums.OrderImportTaskStatusEnum;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTaskDO;
|
||||
@@ -26,6 +27,9 @@ public class OrderImportTaskServiceImpl implements OrderImportTaskService {
|
||||
@Resource
|
||||
private OrderImportTaskMapper orderImportTaskMapper;
|
||||
|
||||
@Resource
|
||||
private I18nUtils i18nUtils;
|
||||
|
||||
@Override
|
||||
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
|
||||
public OrderImportTaskDO confirmOrderImport(Long taskId) {
|
||||
@@ -61,7 +65,7 @@ public class OrderImportTaskServiceImpl implements OrderImportTaskService {
|
||||
}
|
||||
String msg;
|
||||
if (ex instanceof ServiceException) {
|
||||
msg = ex.getMessage();
|
||||
msg = i18nUtils.getMessage(ex.getMessage());
|
||||
} else {
|
||||
msg = ORDER_IMPORT_FAIL.getMsg();
|
||||
}
|
||||
|
||||
+3
@@ -9,6 +9,7 @@ import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.cf.imes.framework.common.exception.ErrorCode;
|
||||
import com.cf.imes.framework.common.exception.ServiceException;
|
||||
import com.cf.imes.framework.common.util.Assert.AssertUtils;
|
||||
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;
|
||||
@@ -31,6 +32,7 @@ import com.cf.imes.module.plan.dal.mysql.orderBody.OrderBodyMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderImport.OrderImportTaskMapper;
|
||||
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.enums.ErrorCodeConstants;
|
||||
import com.cf.imes.module.plan.service.customplateno.CustomPlateNoGenerateService;
|
||||
import com.cf.imes.module.plan.service.order.OrderInputProcessor;
|
||||
import com.cf.imes.module.plan.service.orderImport.factory.WebCadOrderImportFactory;
|
||||
@@ -174,6 +176,7 @@ public class WebCadOrderImportServiceImpl implements WebCadOrderImportService {
|
||||
|
||||
// cad图纸文件id
|
||||
cadViewFileId = webCadDataReqVO.getCadViewFileId();
|
||||
AssertUtils.notEmpty(cadViewFileId, ErrorCodeConstants.WEBCAD_ORDER_IMPORT_CAD_VIEW_FILE_ID_EMPTY_ERROR);
|
||||
webCadOrderImportFactory.analyzeTempData(webCadDataReqVO);
|
||||
} else {
|
||||
sync = false;
|
||||
|
||||
+2
@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.cf.imes.framework.common.exception.ErrorCode;
|
||||
import com.cf.imes.framework.common.exception.ServiceException;
|
||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||
import com.cf.imes.framework.common.util.Assert.AssertUtils;
|
||||
import com.cf.imes.framework.id.core.util.SnowflakeIdWorker3rd;
|
||||
import com.cf.imes.framework.mybatis.core.generator.SnowFlakeGenerator;
|
||||
import com.cf.imes.framework.mybatis.core.injector.BaseBatchMapper;
|
||||
@@ -304,6 +305,7 @@ public class WebCadOrderImportAsyncFactory {
|
||||
break;
|
||||
case "CadViewFileId":
|
||||
cadViewFileId = reader.readLong();
|
||||
AssertUtils.notEmpty(cadViewFileId, ErrorCodeConstants.WEBCAD_ORDER_IMPORT_CAD_VIEW_FILE_ID_EMPTY_ERROR);
|
||||
break;
|
||||
case "ComponentGroupTree":
|
||||
analyzeCadComponentList(reader);
|
||||
|
||||
+2
-1
@@ -29,4 +29,5 @@ webcad.order.import.plate_num.threshold.reach=部分导入成功,生产单{}
|
||||
order.import.plate.goods.no_match=导入失败,板材库中无板材匹配,商品编码:{},商品名称:{},材质:{},颜色:{},厚度:{},品牌:{}
|
||||
webcad.order.import.peek.not_exist=导入失败:数据源不存在,请检查消息可靠性
|
||||
webcad.order.import.order.update.concurrent=导入失败:生产单号{}板件数量已发生改变,请重新导入
|
||||
webcad.order.import.goods.update.concurrent=导入失败:材质{}板件数量已发生改变,请重新导入
|
||||
webcad.order.import.goods.update.concurrent=导入失败:材质{}板件数量已发生改变,请重新导入
|
||||
webcad.order.import.cad.view.file.id.empty.error=导入失败:请检查CAD图纸数据是否上传成功
|
||||
+2
-1
@@ -29,4 +29,5 @@ webcad.order.import.plate_num.threshold.reach=部分匯入成功,生產單{}
|
||||
order.import.plate.goods.no_match=匯入失敗,板材庫中無板材匹配,商品編碼:{},商品名稱:{},材質:{},顏色:{},厚度:{},品牌:{}
|
||||
webcad.order.import.peek.not_exist=匯入失敗:資料來源不存在,請檢查訊息可靠性
|
||||
webcad.order.import.order.update.concurrent=匯入失敗:生產單號{}板件數量已發生變更,請重新匯入
|
||||
webcad.order.import.goods.update.concurrent=匯入失敗:材質{}板件數量已發生變更,請重新匯入
|
||||
webcad.order.import.goods.update.concurrent=匯入失敗:材質{}板件數量已發生變更,請重新匯入
|
||||
webcad.order.import.cad.view.file.id.empty.error=匯入失敗:請檢查CAD圖紙數據是否上傳成功
|
||||
+2
-1
@@ -29,4 +29,5 @@ webcad.order.import.plate_num.threshold.reach=Partial import succeeded: the numb
|
||||
order.import.plate.goods.no_match=Import failed: no matching plate found in plate library, product code: {}, product name: {}, material: {}, color: {}, thickness: {}, brand: {}
|
||||
webcad.order.import.peek.not_exist=Import failed: data source does not exist, please check message reliability
|
||||
webcad.order.import.order.update.concurrent=Import failed: plate quantity under production order {} has changed, please re-import
|
||||
webcad.order.import.goods.update.concurrent=Import failed: plate quantity for material {} has changed, please re-import
|
||||
webcad.order.import.goods.update.concurrent=Import failed: plate quantity for material {} has changed, please re-import
|
||||
webcad.order.import.cad.view.file.id.empty.error=Import failed: Please check if the CAD drawing data was uploaded successfully
|
||||
Reference in New Issue
Block a user