Commit 1dfaf6b1 by 丁伟峰

Merge branch 'feature-dingwf-0715' into develop

2 parents 935790b3 03360c7c
......@@ -180,8 +180,16 @@ public class OrderCreateServiceImpl implements OrderCreateService {
break;
}
}
// 虚拟指派登记
// 虚拟指派
if (StringUtils.isNotBlank(assignEngineerCode)){
tryVirtualAppointment(req, entity, orderId, assignEngineerCode);
}
return Result.success(null);
}
private void tryVirtualAppointment(OrderCreateReqDTO req, OrderRequestEntity entity, String orderId, String assignEngineerCode) {
try {
OrderAppointmentEntity oa = new OrderAppointmentEntity();
oa.setDt(entity.getDt());
oa.setOrderId(entity.getOrderId());
......@@ -190,7 +198,7 @@ public class OrderCreateServiceImpl implements OrderCreateService {
oa.setEngineerCode(assignEngineerCode);
EngineerInfoEntity engineerInfo = engineerInfoDao.getByEngineerCode(assignEngineerCode);
oa.setEngineerName(engineerInfo.getName());
if(StringUtils.isNotBlank(engineerInfo.getBirth())) {
if (StringUtils.isNotBlank(engineerInfo.getBirth())) {
int age = (int) DateUtils.getAge(engineerInfo.getBirth());
oa.setEngineerAge(age);
} else {
......@@ -206,9 +214,13 @@ public class OrderCreateServiceImpl implements OrderCreateService {
oa.setUpdateTime(LocalDateTime.now());
orderAppointmentDao.save(oa);
// 登记
commonService.addOrderEvent(orderId, "", req.getSource(), "API", "虚拟指派", "虚拟指派", "" );
}
commonService.addOrderEvent(orderId, "", req.getSource(), "API", "虚拟指派", "虚拟指派", "");
return Result.success(null);
log.info("==== 已经完成虚拟指派 ====");
} catch (Exception e){
log.error("虚拟指派错误: {}", e.getMessage());
}
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!