提交 f665135f 作者: 李超杰

解决墙盒申请导入

父级 4b3a7435
......@@ -5,11 +5,13 @@ import com.boco.nbd.cams.core.constant.MessageConstant;
import com.boco.nbd.wios.flow.imports.Import;
import com.boco.nbd.wios.manage.entity.bo.Order;
import com.boco.nbd.wios.manage.entity.cams.enums.OrderStatus;
import com.boco.nbd.wios.manage.service.impl.*;
import com.boco.nbd.wios.manage.service.impl.OrderService;
import com.boco.nbd.wios.manage.service.impl.WallboxApplyService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
......@@ -35,12 +37,12 @@ public class WallboxApplyImport implements Import {
// 是否紧急
String ifEmergency = childList.get(1);
if (org.springframework.util.StringUtils.isEmpty(orderId) || org.springframework.util.StringUtils.isEmpty(ifEmergency)) {
childList.add("error:"+ MessageConstant.MISSING_PARAM);
if (StringUtils.isEmpty(orderId) || StringUtils.isEmpty(ifEmergency)) {
childList.add("error:" + MessageConstant.MISSING_PARAM);
continue;
}
if (StringUtils.isNotBlank(orderId)){
if (StringUtils.isNotBlank(orderId)) {
Order order = orderService.get(orderId);
if (ObjectUtil.isNull(order)) {
childList.add("error:不存在安装订单号");
......@@ -51,6 +53,7 @@ public class WallboxApplyImport implements Import {
boolean allowed = status >= OrderStatus.DISPATCHING.getType() && status <= OrderStatus.INSTALLING.getType();
if (!allowed) {
childList.add("error:订单派单之后才能进行墙盒申请");
continue;
}
if (ObjectUtil.isNotNull(wallboxApplyService.selectWallboxDetail(orderId))) {
......
......@@ -31,7 +31,6 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论