Commit 52e22438 by yangxiujun

fix:优化下载上传中禁止再次上传

1 parent ec227128
...@@ -258,7 +258,7 @@ public class OrderCreateServiceImpl implements OrderCreateService { ...@@ -258,7 +258,7 @@ public class OrderCreateServiceImpl implements OrderCreateService {
@Override @Override
@Transactional @Transactional
public void saveBatch(List<OrderInfoExcelDTO> cachedDataList, String token, ThreadLocal local ) { public void saveBatch(List<OrderInfoExcelDTO> cachedDataList, String token, ThreadLocal local) {
String key = redisGroup + token; String key = redisGroup + token;
ArrayList<OrderInfoErrorExcelDTO> errorList = (ArrayList<OrderInfoErrorExcelDTO>) local.get(); ArrayList<OrderInfoErrorExcelDTO> errorList = (ArrayList<OrderInfoErrorExcelDTO>) local.get();
...@@ -270,7 +270,8 @@ public class OrderCreateServiceImpl implements OrderCreateService { ...@@ -270,7 +270,8 @@ public class OrderCreateServiceImpl implements OrderCreateService {
if (cachedDataList.size() == 0 && errorList.size() == 0) { if (cachedDataList.size() == 0 && errorList.size() == 0) {
throw new BusinessException("模版数据不能为空"); throw new BusinessException("模版数据不能为空");
} }
if (redisService.get(key) != null) { FileRateDTO fileRateDTO1 = JSONObject.parseObject(redisService.get(key), FileRateDTO.class);
if (fileRateDTO1.getFlag() == 1) {
throw new BusinessException("用户正在上传中,请稍后再试"); throw new BusinessException("用户正在上传中,请稍后再试");
} }
//创建保存的对象 //创建保存的对象
...@@ -282,218 +283,220 @@ public class OrderCreateServiceImpl implements OrderCreateService { ...@@ -282,218 +283,220 @@ public class OrderCreateServiceImpl implements OrderCreateService {
fileRateDTO.setTotalCount(cachedDataList.size()); fileRateDTO.setTotalCount(cachedDataList.size());
fileRateDTO.setErrorCount(errorExcelDTOS.size()); fileRateDTO.setErrorCount(errorExcelDTOS.size());
if (errorExcelDTOS.size() > 0){ if (errorExcelDTOS.size() > 0) {
fileRateDTO.setErrorExcelDTOList(errorExcelDTOS); fileRateDTO.setErrorExcelDTOList(errorExcelDTOS);
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
}
}
fileRateDTO.setFlag(1);
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
for (OrderInfoExcelDTO req : cachedDataList) {
OrderInfoEntity byOrderId = orderInfoDao.getByOrderId(req.getOrderId());
String peaBrand = req.getBrand();
if (ObjectUtil.isNotNull(byOrderId)) {
OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO();
BeanUtil.copyProperties(req, orderInfoError);
orderInfoError.setError(StatusCodeEnum.ORDER_EXISTS.getDesc());
errorList.add(orderInfoError);
fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount()) + 1);
fileRateDTO.addErrorData(orderInfoError);
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
continue;
}
SkillInfoEntity skillInfoEntity = skillInfoDao.getByBrandAndTypeAndSkill(peaBrand, req.getType(), req.getSkill());
if (ObjectUtil.isNull(skillInfoEntity)) {
OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO();
BeanUtil.copyProperties(req, orderInfoError);
orderInfoError.setError(StatusCodeEnum.ORDER_SKILL_NOT_EXISTS.getDesc());
errorList.add(orderInfoError);
fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount()) + 1);
fileRateDTO.addErrorData(orderInfoError);
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
continue;
for (OrderInfoExcelDTO req : cachedDataList) { }
OrderInfoEntity byOrderId = orderInfoDao.getByOrderId(req.getOrderId()); OrderInfoEntity entity = new OrderInfoEntity();
String peaBrand = req.getBrand();
if (ObjectUtil.isNotNull(byOrderId)) { entity.setExpectTimeBegin(DateUtil.fromDate(req.getExpectBegin()));
OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO(); entity.setExpectTimeEnd(DateUtil.fromDate(req.getExpectEnd()));
BeanUtil.copyProperties(req, orderInfoError); entity.setAppointmentStatus(OrderFlowEnum.INIT.name());
orderInfoError.setError(StatusCodeEnum.ORDER_EXISTS.getDesc()); entity.setAppointmentMethod(AppointmentMethodEnum.AUTO_BATCH.name());
errorList.add(orderInfoError); entity.setDt(entity.getExpectTimeBegin().toLocalDate());
fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount()) + 1); entity.setOrderId(req.getOrderId());
fileRateDTO.addErrorData(orderInfoError); FendanDTO fendanDTO = new FendanDTO();
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L); fendanDTO.setAddress(req.getDetail());
continue; //获取地址的信息
SaasAddressResult saasByAddresss = null;
try {
saasByAddresss = saasUtils.getSaasByAddresss(fendanDTO);
} catch (Exception e) {
//上传成功,删除上传的进度条
OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO();
BeanUtil.copyProperties(req, orderInfoError);
orderInfoError.setError("地址解析失败");
errorList.add(orderInfoError);
fileRateDTO.addErrorData(orderInfoError);
fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount()) + 1);
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
continue;
}
entity.setProvince(saasByAddresss.getProvince());
entity.setCity(saasByAddresss.getCity());
entity.setCounty(saasByAddresss.getCounty());
// 处理技能和标签
entity.setTakeTime(skillInfoEntity.getTakeTime());
String joinTags = String.join(",", req.getOrderTags());
entity.setBeanTags(joinTags);
entity.setIsMultiple(joinTags.contains("重物搬运") ? 1 : 0);
entity.setBeanPriority(req.getBeanPriority());
if (req.getBeanPriority().equals("1")) {
if (!DateUtil.judgeTimeIsToday(entity.getExpectTimeBegin())) {
entity.setAppointmentMethod(AppointmentMethodEnum.AUTO_NOW.name());
} }
SkillInfoEntity skillInfoEntity = skillInfoDao.getByBrandAndTypeAndSkill(peaBrand, req.getType(), req.getSkill()); }
if (ObjectUtil.isNull(skillInfoEntity)) { //一家多单
OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO(); // Result<String> addMultipleOrders = orderInfoService
BeanUtil.copyProperties(req, orderInfoError); // .addMultipleOrders(entity.getDt(), saasByAddresss.getId(), req.getOrderId());
orderInfoError.setError(StatusCodeEnum.ORDER_SKILL_NOT_EXISTS.getDesc()); //entity.setMultipleOrders(addMultipleOrders.getResult());
errorList.add(orderInfoError); entity.setMultipleOrders(null);
fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount()) + 1); //构建参数
fileRateDTO.addErrorData(orderInfoError); OrderDTO.OrderCreateRequest request = new OrderDTO.OrderCreateRequest();
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L); request.setOrderId(req.getOrderId());
continue; request.setBrand(req.getBrand());
request.setProductType(req.getType());
request.setServiceType(req.getSkill());
Location location = new Location();
if (saasByAddresss.getX() == null || saasByAddresss.getY() == null) {
OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO();
BeanUtil.copyProperties(req, orderInfoError);
orderInfoError.setError("地址解析失败");
errorList.add(orderInfoError);
fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount()) + 1);
fileRateDTO.addErrorData(orderInfoError);
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
continue;
}
location.setLongitude(saasByAddresss.getX());
location.setLatitude(saasByAddresss.getY());
location.setAddress(req.getAddress());
location.setAddressId(saasByAddresss.getId());
request.setLocation(location);
} // 分单处理
OrderInfoEntity entity = new OrderInfoEntity(); Result<OrgTeamInfo> fendanResult = null;
try {
entity.setExpectTimeBegin(DateUtil.fromDate(req.getExpectBegin())); fendanResult = fendanService.fendanToGroupCapacity(request, 2, entity.getExpectTimeBegin().toLocalDate(), entity.getExpectTimeBegin().toLocalTime(), entity.getExpectTimeEnd().toLocalTime());
entity.setExpectTimeEnd(DateUtil.fromDate(req.getExpectEnd())); } catch (Exception e) {
entity.setAppointmentStatus(OrderFlowEnum.INIT.name()); OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO();
entity.setAppointmentMethod(AppointmentMethodEnum.AUTO_BATCH.name()); BeanUtil.copyProperties(req, orderInfoError);
entity.setDt(entity.getExpectTimeBegin().toLocalDate()); orderInfoError.setError("地址解析失败");
entity.setOrderId(req.getOrderId()); errorList.add(orderInfoError);
FendanDTO fendanDTO = new FendanDTO(); fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount()) + 1);
fendanDTO.setAddress(req.getDetail()); fileRateDTO.addErrorData(orderInfoError);
//获取地址的信息 redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
SaasAddressResult saasByAddresss = null; continue;
try { }
saasByAddresss = saasUtils.getSaasByAddresss(fendanDTO); if (fendanResult.getCode().equals(StatusCodeEnum.ORDER_SKILL_NOT_EXISTS.getCode())) {
} catch (Exception e) { OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO();
//上传成功,删除上传的进度条 BeanUtil.copyProperties(req, orderInfoError);
OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO(); orderInfoError.setError(StatusCodeEnum.ORDER_SKILL_NOT_EXISTS.getCode());
BeanUtil.copyProperties(req, orderInfoError); errorList.add(orderInfoError);
orderInfoError.setError("地址解析失败"); fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount()) + 1);
errorList.add(orderInfoError); fileRateDTO.addErrorData(orderInfoError);
fileRateDTO.addErrorData(orderInfoError); redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount()) + 1); continue;
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
continue;
}
entity.setProvince(saasByAddresss.getProvince());
entity.setCity(saasByAddresss.getCity());
entity.setCounty(saasByAddresss.getCounty());
// 处理技能和标签
entity.setTakeTime(skillInfoEntity.getTakeTime());
String joinTags = String.join(",", req.getOrderTags());
entity.setBeanTags(joinTags);
entity.setIsMultiple(joinTags.contains("重物搬运") ? 1 : 0);
entity.setBeanPriority(req.getBeanPriority());
if (req.getBeanPriority().equals("1")) {
if (!DateUtil.judgeTimeIsToday(entity.getExpectTimeBegin())) {
entity.setAppointmentMethod(AppointmentMethodEnum.AUTO_NOW.name());
}
}
//一家多单
// Result<String> addMultipleOrders = orderInfoService
// .addMultipleOrders(entity.getDt(), saasByAddresss.getId(), req.getOrderId());
//entity.setMultipleOrders(addMultipleOrders.getResult());
entity.setMultipleOrders(null);
//构建参数
OrderDTO.OrderCreateRequest request = new OrderDTO.OrderCreateRequest();
request.setOrderId(req.getOrderId());
request.setBrand(req.getBrand());
request.setProductType(req.getType());
request.setServiceType(req.getSkill());
Location location = new Location();
if (saasByAddresss.getX() == null || saasByAddresss.getY() == null) {
OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO();
BeanUtil.copyProperties(req, orderInfoError);
orderInfoError.setError("地址解析失败");
errorList.add(orderInfoError);
fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount()) + 1);
fileRateDTO.addErrorData(orderInfoError);
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
continue;
}
location.setLongitude(saasByAddresss.getX());
location.setLatitude(saasByAddresss.getY());
location.setAddress(req.getAddress());
location.setAddressId(saasByAddresss.getId());
request.setLocation(location);
// 分单处理
Result<OrgTeamInfo> fendanResult = null;
try {
fendanResult = fendanService.fendanToGroupCapacity(request, 2, entity.getExpectTimeBegin().toLocalDate(), entity.getExpectTimeBegin().toLocalTime(), entity.getExpectTimeEnd().toLocalTime());
} catch (Exception e) {
OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO();
BeanUtil.copyProperties(req, orderInfoError);
orderInfoError.setError("地址解析失败");
errorList.add(orderInfoError);
fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount()) + 1);
fileRateDTO.addErrorData(orderInfoError);
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
continue;
}
if (fendanResult.getCode().equals(StatusCodeEnum.ORDER_SKILL_NOT_EXISTS.getCode())) {
OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO();
BeanUtil.copyProperties(req, orderInfoError);
orderInfoError.setError(StatusCodeEnum.ORDER_SKILL_NOT_EXISTS.getCode());
errorList.add(orderInfoError);
fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount()) + 1);
fileRateDTO.addErrorData(orderInfoError);
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
continue;
}
if (!fendanResult.getCode().equals(ResultEnum.SUCCESS.getCode()) || ObjectUtil.isNull(fendanResult.getResult())) {
if (fendanResult.getCode().equals(StatusCodeEnum.FENDAN_IS_TRANSCEND.getCode())) {
// 处理超派
entity.setTranscend(1);
} }
if (!fendanResult.getCode().equals(ResultEnum.SUCCESS.getCode()) || ObjectUtil.isNull(fendanResult.getResult())) { if (fendanResult.getCode().equals(StatusCodeEnum.FENDAN_IS_TRANSCEND_AND_SPECIAL.getCode())) {
if (fendanResult.getCode().equals(StatusCodeEnum.FENDAN_IS_TRANSCEND.getCode())) { // 处理超派和特殊时间
// 处理超派 entity.setTranscend(1);
entity.setTranscend(1); entity.setIsSpecialTime(1);
} }
if (fendanResult.getCode().equals(StatusCodeEnum.FENDAN_IS_TRANSCEND_AND_SPECIAL.getCode())) { OrgBranchEntity branchEntity = orgBranchDao.findByCitycodeListLike("%" + saasByAddresss.getCity() + "%");
// 处理超派和特殊时间 if (branchEntity != null) {
entity.setTranscend(1); entity.setOrgClusterId(branchEntity.getClusterId());
entity.setIsSpecialTime(1); entity.setOrgBranchId(branchEntity.getBranchId());
} entity.setAppointmentMethod(AppointmentMethodEnum.MANUAL.name());
OrgBranchEntity branchEntity = orgBranchDao.findByCitycodeListLike("%" + saasByAddresss.getCity() + "%");
if (branchEntity != null) {
entity.setOrgClusterId(branchEntity.getClusterId());
entity.setOrgBranchId(branchEntity.getBranchId());
entity.setAppointmentMethod(AppointmentMethodEnum.MANUAL.name());
Integer cutoff = CommonUtil.isCutoff(entity.getExpectTimeBegin(), null); Integer cutoff = CommonUtil.isCutoff(entity.getExpectTimeBegin(), null);
entity.setIsCutoff(cutoff); entity.setIsCutoff(cutoff);
//发送通知分部消息 //发送通知分部消息
sendMsg(branchEntity.getBranchId(), req.getOrderId(), entity.getExpectTimeBegin().toLocalDate(), entity); sendMsg(branchEntity.getBranchId(), req.getOrderId(), entity.getExpectTimeBegin().toLocalDate(), entity);
}
} else {
// 根据分单工作队,填写clusterId/branchId/groupId/teamId等
OrgTeamInfo teamInfo = fendanResult.getResult();
entity.setOrgClusterId(teamInfo.getClusterId());
entity.setOrgBranchId(teamInfo.getBranchId());
entity.setOrgGroupId(teamInfo.getGroupId());
entity.setOrgTeamId(teamInfo.getTeamId());
//特殊时间段
Integer special = CommonUtil.isSpecial(entity.getExpectTimeBegin().toLocalTime(),
entity.getExpectTimeEnd().toLocalTime(), teamInfo.getWorkOn(), teamInfo.getWorkOff());
Integer cutoff = CommonUtil.isCutoff(entity.getExpectTimeBegin(), teamInfo.getWorkOff());
// 处理cutoff 动态排班结束后创建的当日单和次日单
boolean isTomorrow = DateUtil.judgeTimeIsisTomorrow(entity.getExpectTimeBegin());
//次日单自动批量
if (isTomorrow) {
entity.setAppointmentMethod(AppointmentMethodEnum.AUTO_BATCH.name());
}
// 特殊时间段,当天单,cutoff需要人工处理
if (cutoff == 1 || special == 1) {
//判断是否在今天cutoff之后
entity.setIsCutoff(cutoff);
entity.setIsSpecialTime(special);
entity.setAppointmentMethod(AppointmentMethodEnum.MANUAL.name());
//发送通知分部消息
sendMsg(teamInfo.getBranchId(), req.getOrderId(), entity.getExpectTimeBegin().toLocalDate(), entity);
}
} }
// 字段转换 } else {
entity.setSource(req.getSource()); // 根据分单工作队,填写clusterId/branchId/groupId/teamId等
entity.setName(req.getName()); OrgTeamInfo teamInfo = fendanResult.getResult();
entity.setPhone(req.getPhone()); entity.setOrgClusterId(teamInfo.getClusterId());
entity.setBeanBrand(req.getBrand()); entity.setOrgBranchId(teamInfo.getBranchId());
entity.setBrand(peaBrand); entity.setOrgGroupId(teamInfo.getGroupId());
entity.setType(req.getType()); entity.setOrgTeamId(teamInfo.getTeamId());
entity.setSkill(req.getSkill()); //特殊时间段
entity.setFaultDescribe(req.getFaultDescribe()); Integer special = CommonUtil.isSpecial(entity.getExpectTimeBegin().toLocalTime(),
entity.setExpectTimeDesc(req.getExpectTimeDesc()); entity.getExpectTimeEnd().toLocalTime(), teamInfo.getWorkOn(), teamInfo.getWorkOff());
// 使用期望时间来初始化计划时间,后面在指派环节更新为真正的有效的计划时间 Integer cutoff = CommonUtil.isCutoff(entity.getExpectTimeBegin(), teamInfo.getWorkOff());
entity.setPlanStartTime(entity.getExpectTimeBegin()); // 处理cutoff 动态排班结束后创建的当日单和次日单
entity.setPlanEndTime(entity.getExpectTimeEnd()); boolean isTomorrow = DateUtil.judgeTimeIsisTomorrow(entity.getExpectTimeBegin());
// order_request的description字段,仅仅用于内部备注,不对外 //次日单自动批量
entity.setApplyNote(req.getDescription()); if (isTomorrow) {
entity.setSubId(newSubId(entity.getOrderId(), entity.getDt())); entity.setAppointmentMethod(AppointmentMethodEnum.AUTO_BATCH.name());
entity.setX(location.getLongitude().toString()); }
entity.setY(location.getLatitude().toString()); // 特殊时间段,当天单,cutoff需要人工处理
entity.setAddress(location.getAddress()); if (cutoff == 1 || special == 1) {
entity.setAddressId(location.getAddressId()); //判断是否在今天cutoff之后
// 默认值 entity.setIsCutoff(cutoff);
// entity.setAppointmentStatus(OrderFlowEnum.INIT.name()); entity.setIsSpecialTime(special);
entity.setBeanStatus("OPEN"); entity.setAppointmentMethod(AppointmentMethodEnum.MANUAL.name());
entity.setBeanSubStatus(""); //发送通知分部消息
entity.setWorkshop(false); sendMsg(teamInfo.getBranchId(), req.getOrderId(), entity.getExpectTimeBegin().toLocalDate(), entity);
}
// 记录订单和节点
orderInfoDao.save(entity);
commonService.addOrderEvent(req.getOrderId(), "", req.getSource(), "API", OrderEventEnum.createOrder.getEvent(), String.format(OrderEventEnum.createOrder.getMsg(), req.getSource(), "BEAN", req.getOrderId()), "");
successCount++;
//每次上传成功更新上传进度条
fileRateDTO.setSuccessCount((fileRateDTO.getSuccessCount() == null ? 0 : fileRateDTO.getSuccessCount()) + 1);
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
}
if (fileRateDTO.getErrorCount()>0){
throw new BusinessException("订单上传失败,请检查错误模版");
} }
// 字段转换
entity.setSource(req.getSource());
entity.setName(req.getName());
entity.setPhone(req.getPhone());
entity.setBeanBrand(req.getBrand());
entity.setBrand(peaBrand);
entity.setType(req.getType());
entity.setSkill(req.getSkill());
entity.setFaultDescribe(req.getFaultDescribe());
entity.setExpectTimeDesc(req.getExpectTimeDesc());
// 使用期望时间来初始化计划时间,后面在指派环节更新为真正的有效的计划时间
entity.setPlanStartTime(entity.getExpectTimeBegin());
entity.setPlanEndTime(entity.getExpectTimeEnd());
// order_request的description字段,仅仅用于内部备注,不对外
entity.setApplyNote(req.getDescription());
entity.setSubId(newSubId(entity.getOrderId(), entity.getDt()));
entity.setX(location.getLongitude().toString());
entity.setY(location.getLatitude().toString());
entity.setAddress(location.getAddress());
entity.setAddressId(location.getAddressId());
// 默认值
// entity.setAppointmentStatus(OrderFlowEnum.INIT.name());
entity.setBeanStatus("OPEN");
entity.setBeanSubStatus("");
entity.setWorkshop(false);
// 记录订单和节点
orderInfoDao.save(entity);
commonService.addOrderEvent(req.getOrderId(), "", req.getSource(), "API", OrderEventEnum.createOrder.getEvent(), String.format(OrderEventEnum.createOrder.getMsg(), req.getSource(), "BEAN", req.getOrderId()), "");
successCount++;
//每次上传成功更新上传进度条
fileRateDTO.setSuccessCount((fileRateDTO.getSuccessCount() == null ? 0 : fileRateDTO.getSuccessCount()) + 1);
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
}
fileRateDTO.setFlag(0);
redisService.set(key, JSONObject.toJSONString(fileRateDTO), 60L);
if (fileRateDTO.getErrorCount() > 0) {
throw new BusinessException("订单上传失败,请检查错误模版");
}
} }
...@@ -698,6 +701,7 @@ public class OrderCreateServiceImpl implements OrderCreateService { ...@@ -698,6 +701,7 @@ public class OrderCreateServiceImpl implements OrderCreateService {
log.info("[createOrder] orderId:{}, 结束,订单信息:{}", req.getOrderId(), entity); log.info("[createOrder] orderId:{}, 结束,订单信息:{}", req.getOrderId(), entity);
return Result.success(null); return Result.success(null);
} }
@Async @Async
public void sendMsg(String branchId, String orderId, LocalDate toLocalDate, OrderInfoEntity orderInfo) { public void sendMsg(String branchId, String orderId, LocalDate toLocalDate, OrderInfoEntity orderInfo) {
MsgDTO msgDTO = new MsgDTO(); MsgDTO msgDTO = new MsgDTO();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!