Commit dd0cc472 authored by 332784038@qq.com's avatar 332784038@qq.com

自编号状态防重复提交错误提示修正

parent 3976f929
...@@ -121,5 +121,6 @@ public interface ErrorCodeConstants { ...@@ -121,5 +121,6 @@ public interface ErrorCodeConstants {
ErrorCode CASE_NUM_IN_MERGE_PKG = new ErrorCode(1109010058,"case.num.in.merge.pkg"); ErrorCode CASE_NUM_IN_MERGE_PKG = new ErrorCode(1109010058,"case.num.in.merge.pkg");
ErrorCode ORDER_IN_MERGE_PKG = new ErrorCode(1109010059,"order.already.in.merge.pkg"); ErrorCode ORDER_IN_MERGE_PKG = new ErrorCode(1109010059,"order.already.in.merge.pkg");
ErrorCode BOX_UPDATE_REPEAT_COMMIT = new ErrorCode(1109010060, "box.update.repeat.commit");
} }
\ No newline at end of file
...@@ -41,8 +41,8 @@ import java.util.concurrent.TimeUnit; ...@@ -41,8 +41,8 @@ import java.util.concurrent.TimeUnit;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
import static cn.iocoder.yudao.module.order.enums.ErrorCodeConstants.ORDER_UPDATE_REPEAT_COMMIT;
import static cn.iocoder.yudao.module.shipment.controller.admin.constant.Constant.BOX_UPDATE_KEY; import static cn.iocoder.yudao.module.shipment.controller.admin.constant.Constant.BOX_UPDATE_KEY;
import static cn.iocoder.yudao.module.shipment.enums.ErrorCodeConstants.BOX_UPDATE_REPEAT_COMMIT;
@Validated @Validated
@RestController @RestController
...@@ -73,7 +73,7 @@ public class BoxApprovalController { ...@@ -73,7 +73,7 @@ public class BoxApprovalController {
String redisKey = MessageFormat.format(BOX_UPDATE_KEY, createReqVO.getShipmentId().toString()); String redisKey = MessageFormat.format(BOX_UPDATE_KEY, createReqVO.getShipmentId().toString());
Long count = redisHelper.incrBy(redisKey, 1); Long count = redisHelper.incrBy(redisKey, 1);
if (count > 1) { if (count > 1) {
return error(ORDER_UPDATE_REPEAT_COMMIT); return error(BOX_UPDATE_REPEAT_COMMIT);
} }
redisHelper.expire(redisKey, 1, TimeUnit.MINUTES); redisHelper.expire(redisKey, 1, TimeUnit.MINUTES);
try { try {
......
package cn.iocoder.yudao.module.shipment.controller.admin; package cn.iocoder.yudao.module.shipment.controller.admin;
import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage; import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent; import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent;
import cn.iocoder.yudao.framework.limiter.dynamic.DynamicRateLimiter; import cn.iocoder.yudao.framework.limiter.dynamic.DynamicRateLimiter;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO; import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.framework.redis.helper.RedisHelper; import cn.iocoder.yudao.framework.redis.helper.RedisHelper;
import cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO;
import cn.iocoder.yudao.module.order.dto.ContainerNumberSummaryDto;
import cn.iocoder.yudao.module.order.dto.OrderCostSummaryDto;
import cn.iocoder.yudao.module.order.vo.order.OrderBackPageVO; import cn.iocoder.yudao.module.order.vo.order.OrderBackPageVO;
import cn.iocoder.yudao.module.order.vo.order.OrderBackVO;
import cn.iocoder.yudao.module.order.vo.orderSplit.OrderSplitBackVO; import cn.iocoder.yudao.module.order.vo.orderSplit.OrderSplitBackVO;
import cn.iocoder.yudao.module.shipment.convert.BoxConvert; import cn.iocoder.yudao.module.shipment.convert.BoxConvert;
import cn.iocoder.yudao.module.shipment.dal.dataobject.BoxDO; import cn.iocoder.yudao.module.shipment.dal.dataobject.BoxDO;
import cn.iocoder.yudao.module.shipment.enums.SlStatueEnum;
import cn.iocoder.yudao.module.shipment.vo.boxTally.BoxOrderLocationUpdateReq; import cn.iocoder.yudao.module.shipment.vo.boxTally.BoxOrderLocationUpdateReq;
import cn.iocoder.yudao.module.shipment.vo.boxTally.BoxTallyBackVO; import cn.iocoder.yudao.module.shipment.vo.boxTally.BoxTallyBackVO;
import cn.iocoder.yudao.module.system.api.file.FileMakeApi; import cn.iocoder.yudao.module.system.api.file.FileMakeApi;
import cn.iocoder.yudao.module.system.api.file.dto.FileMakeReqDTO; import cn.iocoder.yudao.module.system.api.file.dto.FileMakeReqDTO;
import cn.iocoder.yudao.module.system.enums.download.DownloadTypeEnum; import cn.iocoder.yudao.module.system.enums.download.DownloadTypeEnum;
import cn.iocoder.yudao.module.system.enums.sms.SmsSceneEnum; import cn.iocoder.yudao.module.system.enums.sms.SmsSceneEnum;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.metadata.fill.FillConfig;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -38,7 +28,6 @@ import io.swagger.annotations.*; ...@@ -38,7 +28,6 @@ import io.swagger.annotations.*;
import javax.validation.*; import javax.validation.*;
import javax.servlet.http.*; import javax.servlet.http.*;
import java.io.*; import java.io.*;
import java.math.BigDecimal;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
...@@ -53,9 +42,8 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils; ...@@ -53,9 +42,8 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
import static cn.iocoder.yudao.module.order.enums.ErrorCodeConstants.ORDER_UPDATE_REPEAT_COMMIT;
import static cn.iocoder.yudao.module.shipment.controller.admin.constant.Constant.BOX_UPDATE_KEY; import static cn.iocoder.yudao.module.shipment.controller.admin.constant.Constant.BOX_UPDATE_KEY;
import static cn.iocoder.yudao.module.shipment.enums.ErrorCodeConstants.BOX_REPORT_NOT_EXIST; import static cn.iocoder.yudao.module.shipment.enums.ErrorCodeConstants.BOX_UPDATE_REPEAT_COMMIT;
import cn.iocoder.yudao.module.shipment.vo.box.*; import cn.iocoder.yudao.module.shipment.vo.box.*;
import cn.iocoder.yudao.module.shipment.service.box.BoxService; import cn.iocoder.yudao.module.shipment.service.box.BoxService;
...@@ -120,7 +108,7 @@ public class BoxController { ...@@ -120,7 +108,7 @@ public class BoxController {
String redisKey = MessageFormat.format(BOX_UPDATE_KEY, updateReqVO.getId().toString()); String redisKey = MessageFormat.format(BOX_UPDATE_KEY, updateReqVO.getId().toString());
Long count = redisHelper.incrBy(redisKey, 1); Long count = redisHelper.incrBy(redisKey, 1);
if (count > 1) { if (count > 1) {
return error(ORDER_UPDATE_REPEAT_COMMIT); return error(BOX_UPDATE_REPEAT_COMMIT);
} }
redisHelper.expire(redisKey, 1, TimeUnit.MINUTES); redisHelper.expire(redisKey, 1, TimeUnit.MINUTES);
try { try {
......
...@@ -29,8 +29,8 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; ...@@ -29,8 +29,8 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.util.ExcelUtils; import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
import static cn.iocoder.yudao.module.order.enums.ErrorCodeConstants.ORDER_UPDATE_REPEAT_COMMIT;
import static cn.iocoder.yudao.module.shipment.controller.admin.constant.Constant.BOX_UPDATE_KEY; import static cn.iocoder.yudao.module.shipment.controller.admin.constant.Constant.BOX_UPDATE_KEY;
import static cn.iocoder.yudao.module.shipment.enums.ErrorCodeConstants.BOX_UPDATE_REPEAT_COMMIT;
@Validated @Validated
@RestController @RestController
...@@ -58,7 +58,7 @@ public class BoxCustomsController { ...@@ -58,7 +58,7 @@ public class BoxCustomsController {
String redisKey = MessageFormat.format(BOX_UPDATE_KEY, updateReqVO.getShipmentId().toString()); String redisKey = MessageFormat.format(BOX_UPDATE_KEY, updateReqVO.getShipmentId().toString());
Long count = redisHelper.incrBy(redisKey, 1); Long count = redisHelper.incrBy(redisKey, 1);
if (count > 1) { if (count > 1) {
return error(ORDER_UPDATE_REPEAT_COMMIT); return error(BOX_UPDATE_REPEAT_COMMIT);
} }
redisHelper.expire(redisKey, 1, TimeUnit.MINUTES); redisHelper.expire(redisKey, 1, TimeUnit.MINUTES);
try { try {
......
...@@ -267,4 +267,7 @@ order.item.is.pay.advance.not.null= ...@@ -267,4 +267,7 @@ order.item.is.pay.advance.not.null=
order.item.freight.currency.not.null= order.item.freight.currency.not.null=
order.item.freight.unit.not.null= order.item.freight.unit.not.null=
order.item.clearance.currency.not.null= order.item.clearance.currency.not.null=
order.item.clearance.unit.not.null= order.item.clearance.unit.not.null=
\ No newline at end of file
box.update.repeat.commit=
\ No newline at end of file
...@@ -1006,3 +1006,7 @@ order.item.freight.currency.not.null=The currency unit for the shipping cost of ...@@ -1006,3 +1006,7 @@ order.item.freight.currency.not.null=The currency unit for the shipping cost of
order.item.freight.unit.not.null=The unit of measurement for shipping fees for order items cannot be empty order.item.freight.unit.not.null=The unit of measurement for shipping fees for order items cannot be empty
order.item.clearance.currency.not.null=Customs clearance fee for order goods, currency unit cannot be empty order.item.clearance.currency.not.null=Customs clearance fee for order goods, currency unit cannot be empty
order.item.clearance.unit.not.null=The unit of measurement for customs clearance fees for order goods cannot be empty order.item.clearance.unit.not.null=The unit of measurement for customs clearance fees for order goods cannot be empty
box.update.repeat.commit=Duplicate submission of self assigned number status modification
\ No newline at end of file
...@@ -1007,4 +1007,7 @@ order.item.is.pay.advance.not.null=\u8ba2\u5355\u5546\u54c1\u662f\u5426\u9884\u4 ...@@ -1007,4 +1007,7 @@ order.item.is.pay.advance.not.null=\u8ba2\u5355\u5546\u54c1\u662f\u5426\u9884\u4
order.item.freight.currency.not.null=\u8ba2\u5355\u5546\u54c1\u8fd0\u8d39\u8d27\u5e01\u5355\u4f4d\u4e0d\u80fd\u4e3a\u7a7a order.item.freight.currency.not.null=\u8ba2\u5355\u5546\u54c1\u8fd0\u8d39\u8d27\u5e01\u5355\u4f4d\u4e0d\u80fd\u4e3a\u7a7a
order.item.freight.unit.not.null=\u8ba2\u5355\u5546\u54c1\u8fd0\u8d39\u8ba1\u91cf\u5355\u4f4d\u4e0d\u80fd\u4e3a\u7a7a order.item.freight.unit.not.null=\u8ba2\u5355\u5546\u54c1\u8fd0\u8d39\u8ba1\u91cf\u5355\u4f4d\u4e0d\u80fd\u4e3a\u7a7a
order.item.clearance.currency.not.null=\u8ba2\u5355\u5546\u54c1\u6e05\u5173\u8d39\u8d27\u5e01\u5355\u4f4d\u4e0d\u80fd\u4e3a\u7a7a order.item.clearance.currency.not.null=\u8ba2\u5355\u5546\u54c1\u6e05\u5173\u8d39\u8d27\u5e01\u5355\u4f4d\u4e0d\u80fd\u4e3a\u7a7a
order.item.clearance.unit.not.null=\u8ba2\u5355\u5546\u54c1\u6e05\u5173\u8d39\u8ba1\u91cf\u5355\u4f4d\u4e0d\u80fd\u4e3a\u7a7a order.item.clearance.unit.not.null=\u8ba2\u5355\u5546\u54c1\u6e05\u5173\u8d39\u8ba1\u91cf\u5355\u4f4d\u4e0d\u80fd\u4e3a\u7a7a
\ No newline at end of file
box.update.repeat.commit=\u81ea\u7f16\u53f7\u72b6\u6001\u4fee\u6539\u91cd\u590d\u63d0\u4ea4
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment