Commit 1adba534 by 刘鑫

fix(ID1004096): 工单动态需要记录指派 (成功或失败均记录, 成功失败状态依赖BEAN)

1 parent 04a30973
......@@ -23,9 +23,11 @@ import com.dituhui.pea.order.entity.MapBlockInfoEntity;
import com.dituhui.pea.order.entity.OrderInfoEntity;
import com.dituhui.pea.order.entity.OrgGroupEntity;
import com.dituhui.pea.order.enums.AppointmentMethodEnum;
import com.dituhui.pea.order.enums.OrderEventEnum;
import com.dituhui.pea.order.enums.OrderFlowEnum;
import com.dituhui.pea.order.enums.OrderStatusEnum;
import com.dituhui.pea.order.enums.ServiceStatusEnum;
import com.dituhui.pea.order.service.CommonService;
import com.dituhui.pea.order.service.PeaOuterAPIService;
import com.dituhui.pea.pojo.fendan.FendanDTO;
import lombok.RequiredArgsConstructor;
......@@ -63,6 +65,7 @@ public class PeaOuterAPIServiceImpl implements PeaOuterAPIService {
private final SaasUtils saasUtils;
private final MapBlockInfoDao mapBlockInfoDao;
private final EngineerInfoDao engineerInfoDao;
private final CommonService commonService;
@Override
public EstimateDTO.VisitResult estimateVisitService(String brand, String productType, String serviceType, Location clientLocation) {
......@@ -187,7 +190,16 @@ public class PeaOuterAPIServiceImpl implements PeaOuterAPIService {
orderInfo.setReasonForFailure(request.getReasonForFailure());
orderInfoDao.save(orderInfo);
//TODO 回调BEAN 改约接口
String memo;
if (Objects.equals(request.getAppointmentResult(), "CONFIRMED")) {
//TODO 回调BEAN 改约接口
memo = "SUCCESS";
} else {
memo = "FAIL:" + request.getReasonForFailure();
}
String msg = String.format(OrderEventEnum.reassignment.getMsg(), engineerInfo.getName());
commonService.addOrderEvent(orderInfo.getOrderId(), null, "BEAN", "BEAN", OrderEventEnum.reassignment.getEvent(),
msg, memo, LocalDateTime.now());
OrderConfirmResult orderConfirmResult = new OrderConfirmResult();
orderConfirmResult.setOrderId(orderId);
orderConfirmResult.setEngineerCode(engineerInfo.getEngineerCode());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!