Commit d4bdaab6 by 丁伟峰

Merge branch 'feature-dingwf-0715' into develop

2 parents 26a4e727 355444e3
......@@ -33,6 +33,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
......@@ -97,6 +98,7 @@ public class OrderCreateServiceImpl implements OrderCreateService {
}
@Override
@Transactional
public Result<?> createOrder(OrderCreateReqDTO req) {
log.info("[createOrder] current XID: {}", RootContext.getXID());
OrderRequestEntity entity = new OrderRequestEntity();
......@@ -183,6 +185,8 @@ public class OrderCreateServiceImpl implements OrderCreateService {
OrderAppointmentEntity oa = new OrderAppointmentEntity();
oa.setDt(entity.getDt());
oa.setOrderId(entity.getOrderId());
oa.setMainSub(true); // 总是主单
oa.setIsWorkshop(false);
oa.setEngineerCode(assignEngineerCode);
EngineerInfoEntity engineerInfo = engineerInfoDao.getByEngineerCode(assignEngineerCode);
oa.setEngineerName(engineerInfo.getName());
......@@ -193,9 +197,11 @@ public class OrderCreateServiceImpl implements OrderCreateService {
oa.setEngineerAge(0);
}
oa.setEngineerPhone(engineerInfo.getPhone());
oa.setPreStatus("VIRTUAL");
oa.setStatus("ASSIGNED");
oa.setMemo("创建订单,虚拟指派");
oa.setExpectStartTime(entity.getExpectTimeBegin());
oa.setExpectEndTime(entity.getExpectTimeEnd());
oa.setCreateTime(LocalDateTime.now());
oa.setUpdateTime(LocalDateTime.now());
orderAppointmentDao.save(oa);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!