Commit b814811a by huangjinxin

fix:指定工程师,取消工单相关

1 parent 23fe6c5a
......@@ -136,7 +136,7 @@ public class OrderDTO {
/**
* 是否指定某个工程师/是否排除某个工程师 0:否 1:指定 2:排除 默认0
*/
private Integer isAppointEngineer;
private Integer isAppointEngineer = 0;
/**
* 指定某个工程师/排除某个工程师 codes
......
......@@ -163,7 +163,7 @@ public class OrderCreateServiceImpl implements OrderCreateService {
// 处理指派工程师
entity.setIsAppointEngineer(req.getIsAppointEngineer());
String appointEngineerCodes = CollectionUtils.isEmpty(req.getAppointEngineerCodes()) ? "" : String.join(",", req.getAppointEngineerCodes());
String appointEngineerCodes = CollectionUtils.isEmpty(req.getAppointEngineerCodes()) ? null : String.join(",", req.getAppointEngineerCodes());
entity.setAppointEngineerCodes(appointEngineerCodes);
if (req.getIsAppointEngineer() == 1) {
EngineerInfoEntity engineerInfo = engineerInfoDao.getByEngineerCode(req.getAppointEngineerCodes().get(0));
......
......@@ -188,71 +188,6 @@ public class OrderInfoServiceImpl implements OrderInfoService {
}
return this.orderReschedule(reschedule);
// orderInfo.setServiceStatus(ServiceStatusEnum.INIT.getCode());
// orderInfo.setOrderStatus(OrderStatusEnum.RESCHEDULED.getCode());
// if (StringUtils.isBlank(request.getDescription())) {
// orderInfo.setDescription(request.getDescription());
// }
// Location location = request.getHappenLocation();
// if (ObjectUtil.isNull(location)) {
// location = new Location();
// location.setLongitude(Double.valueOf(orderInfo.getX()));
// location.setLatitude(Double.valueOf(orderInfo.getY()));
// location.setAddress(orderInfo.getAddress());
// location.setAddressId(orderInfo.getAddressId());
// } else {
// orderInfo.setX(location.getLongitude().toString());
// orderInfo.setY(location.getLongitude().toString());
// orderInfo.setAddress(location.getAddress());
// orderInfo.setAddressId(location.getAddressId());
// }
// //获取省市区
// AdministrativeDistrictReq administrativeDistrictReq = new AdministrativeDistrictReq();
// administrativeDistrictReq.setPoints(location.getLongitude() + "," + location.getLatitude());
// Result<AdministrativeDistrictResp> adminDistrict = fendanService.getAdminDistrict(administrativeDistrictReq);
// if (ObjectUtil.isNotEmpty(adminDistrict) && ObjectUtil.isNotEmpty(adminDistrict.getResult())) {
// orderInfo.setProvince(adminDistrict.getResult().getSubNames().getProvince());
// orderInfo.setCity(adminDistrict.getResult().getSubNames().getCity());
// orderInfo.setCounty(adminDistrict.getResult().getSubNames().getCounty());
// }
// // 分单处理
// String peaBrand = CommonUtil.fixBrand(orderInfo.getBrand());
// OrderDTO.OrderCreateRequest req = new OrderDTO.OrderCreateRequest();
// req.setBrand(peaBrand);
// req.setProductType(orderInfo.getType());
// req.setServiceType(orderInfo.getSkill());
// req.setLocation(location);
// Result<OrgTeamInfo> fendanResult = fendanService.fendanToGroupCapacity(req, 1, DateUtil.getLocalDateByDate(request.getNewReservationTime()), null, null);
// String branchId = "";
// String clusterId = "";
// if (!fendanResult.getCode().equals(ResultEnum.SUCCESS.getCode()) || ObjectUtil.isNull(fendanResult.getResult())) {
// OrgBranchEntity branchEntity = orgBranchDao.findByCitycodeListLike("%" + adminDistrict.getResult().getSubNames().getCounty() + "%");
// clusterId = branchEntity.getClusterId();
// branchId = branchEntity.getBranchId();
// sendMsg(branchEntity, orderInfo.getOrderId(), request.getNewReservationTime());
// } else {
// OrgTeamInfo teamInfo = fendanResult.getResult();
// clusterId = teamInfo.getClusterId();
// branchId = teamInfo.getBranchId();
// orderInfo.setOrgGroupId(teamInfo.getGroupId());
// orderInfo.setOrgTeamId(teamInfo.getTeamId());
// }
// orderInfo.setOrgClusterId(clusterId);
// orderInfo.setOrgBranchId(branchId);
// orderInfo.setDt(DateUtil.getLocalDateByDate(request.getNewReservationTime()));
// //一家多单
// Result<String> deleteMultipleOrders = this.deleteMultipleOrders(orderInfo.getMultipleOrders(), orderInfo.getAddressId());
// if (!deleteMultipleOrders.getCode().equals(ResultEnum.SUCCESS.getCode())) {
// return Result.failed("改约日期失败");
// }
// Result<String> addMultipleOrders = this.addMultipleOrders(orderInfo.getDt(), location.getAddressId(), orderInfo.getOrderId());
// if (!addMultipleOrders.getCode().equals(ResultEnum.SUCCESS.getCode())) {
// return Result.failed("改约日期失败");
// }
// orderInfo.setMultipleOrders(addMultipleOrders.getResult());
// orderInfoDao.save(orderInfo);
// //记录流程
// commonService.addOrderEvent(request.getOrderId(), "", "BEAN", "BEAN", OrderStatusEnum.CANCELED.getDescription(), request.getStage(), "", LocalDateTimeUtil.of(request.getHappen()));
}
return Result.success(null);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!