Commit 3ac2e062 by 王力

Merge branch 'dev_rescheduling20230711' into 'develop'

修改

See merge request !194
2 parents 686f10b0 9315d2c2
......@@ -11,7 +11,6 @@ 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.context.annotation.Bean;
import org.springframework.stereotype.Component;
import java.sql.Timestamp;
......@@ -24,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;
......@@ -41,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 {
......@@ -65,10 +58,10 @@ 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);
OrderRequest order = orderRequestMPDao.getByOrderId(orderId);
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!