Commit 337ff787 by 丁伟峰

Merge remote-tracking branch 'origin/develop' into develop

2 parents 9422fd78 6a91be6f
......@@ -11,6 +11,7 @@ import com.dituhui.pea.order.entity.SkillInfo;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.sql.Timestamp;
import java.time.LocalDate;
......@@ -22,11 +23,9 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Component
@Slf4j
public class OrderAssignCheck {
private String orderId;
private String engineerCode;
@Autowired
OrderRequestMPDao orderRequestMPDao;
......@@ -39,10 +38,6 @@ public class OrderAssignCheck {
@Autowired
EngineerBusinessMPDao engineerBusinessMPDao;
public OrderAssignCheck(String orderId, String engineerCode) {
this.orderId = orderId;
this.engineerCode = engineerCode;
}
@Data
public class Result {
......@@ -63,10 +58,12 @@ public class OrderAssignCheck {
}
}
public Result orderAssignCheck() {
log.info("begin orderAssignCheck:orderId={}, engineerCode={}", this.orderId, this.engineerCode);
public Result orderAssignCheck(String orderId, String engineerCode) {
log.info("begin orderAssignCheck:orderId={}, engineerCode={}", orderId, engineerCode);
OrderRequest order = orderRequestMPDao.getByOrderId(this.orderId);
log.info(">>>>>>>>:orderRequestMpDao:{}, is null :{}", orderRequestMPDao, orderRequestMPDao == null);
OrderRequest order = orderRequestMPDao.getByOrderId(orderId);
log.info(">>>>>>>:order:{}, order is null:{}", order, order == null);
double curX = Double.parseDouble(order.getX());
double curY = Double.parseDouble(order.getY());
......
......@@ -131,8 +131,8 @@ public class OrderAssignImpl implements OrderAssign {
throw new BusinessException(String.format("订单已指派个技术员[%s], 不必重复指派给同一个技术员", engineer.getName()));
}
OrderAssignCheck ck = new OrderAssignCheck(orderId, engineerCode);
OrderAssignCheck.Result result = ck.orderAssignCheck();
OrderAssignCheck ck = new OrderAssignCheck();
OrderAssignCheck.Result result = ck.orderAssignCheck(orderId, engineerCode);
log.info("指派检查结果:{}", result);
if(!result.getCanAssign()){
throw new BusinessException("指派失败, 未能找到合适的时间段, 请选择其他技术员");
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!