|
|
@@ -217,9 +217,17 @@ public class TradingBoxItemController extends BladeController {
|
|
|
//更新箱档案信息
|
|
|
Archives archivesR = archivesService.getOne(new LambdaQueryWrapper<Archives>().eq(Archives::getIsDeleted, 0)
|
|
|
.eq(Archives::getTenantId, AuthUtil.getTenantId())
|
|
|
- .eq(Archives::getCode, tradingBoxItem.getCode())
|
|
|
- .eq(Archives::getStatus, ""));
|
|
|
+ .eq(Archives::getCode, tradingBoxItem.getCode()));
|
|
|
Archives archives = new Archives();
|
|
|
+ if ("卖出".equals(tradingBoxItem.getStatus())) {
|
|
|
+ if (ObjectUtils.isNotNull(archivesR)) {
|
|
|
+ if (!"待使用".equals(archivesR.getStatus())) {
|
|
|
+ throw new RuntimeException("集装箱" + archivesR.getCode() + "状态不等于待使用");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ throw new RuntimeException("未查到集装箱" + archivesR.getCode() + "信息");
|
|
|
+ }
|
|
|
+ }
|
|
|
if (ObjectUtils.isNotNull(archivesR)) {
|
|
|
BeanUtil.copy(archivesR, archives);
|
|
|
} else {
|