Commit 503c2be2 by yangxiujun

fix:修改上传

1 parent 9562cedc
...@@ -141,11 +141,6 @@ ...@@ -141,11 +141,6 @@
</dependency> </dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
......
...@@ -101,6 +101,11 @@ public class FileController { ...@@ -101,6 +101,11 @@ public class FileController {
throw new BusinessException("用户未登录"); throw new BusinessException("用户未登录");
} }
FileRateDTO rate = orderCreateService.getsuccessRate(token); FileRateDTO rate = orderCreateService.getsuccessRate(token);
if (rate != null && (rate.getSuccessCount() == rate.getTotalCount())){
//上传成功,删除上传的进度条
orderCreateService.delRate(token);
}
if (rate == null) { if (rate == null) {
rate = new FileRateDTO(); rate = new FileRateDTO();
rate.setRate("100%"); rate.setRate("100%");
...@@ -112,7 +117,7 @@ public class FileController { ...@@ -112,7 +117,7 @@ public class FileController {
/** /**
* 订单批量模版下载 * 订单批量模版下载
* *
* @param response * @param
*/ */
@GetMapping(value = "/file/downOrder") @GetMapping(value = "/file/downOrder")
public ResponseEntity<byte[]> downOrderTemplate() { public ResponseEntity<byte[]> downOrderTemplate() {
...@@ -127,7 +132,7 @@ public class FileController { ...@@ -127,7 +132,7 @@ public class FileController {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
EasyExcel.write(outputStream, OrderInfoExcelDTO.class) EasyExcel.write(outputStream, OrderInfoExcelDTO.class)
//不设置字体 .registerWriteHandler(ExcelUtil.getDefaultWriteHandler()) .registerWriteHandler(ExcelUtil.getDefaultWriteHandler())
.registerConverter(new DateStringConverter()) .registerConverter(new DateStringConverter())
.registerConverter(new BigDecimalStringConverter()) .registerConverter(new BigDecimalStringConverter())
.sheet("工单列表").doWrite(arrayList); .sheet("工单列表").doWrite(arrayList);
......
...@@ -7,7 +7,7 @@ import com.dituhui.pea.pojo.saas.req.AdministrativeDistrictReq; ...@@ -7,7 +7,7 @@ import com.dituhui.pea.pojo.saas.req.AdministrativeDistrictReq;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@FeignClient(url = "${SaaS.url}", name = "saasService") @FeignClient(url = "${SaaS.urlBack}", name = "saasService")
public interface ISaaSRemoteService { public interface ISaaSRemoteService {
@PostMapping("/v1/bsh/area/add") @PostMapping("/v1/bsh/area/add")
......
...@@ -228,7 +228,7 @@ public class FendanServiceImpl implements FendanService { ...@@ -228,7 +228,7 @@ public class FendanServiceImpl implements FendanService {
@Override @Override
public Result<OrgTeamInfo> fendanToGroupCapacity(OrderDTO.OrderCreateRequest request, Integer isDate, LocalDate targetDate, LocalTime startTime, LocalTime endTime) { public Result<OrgTeamInfo> fendanToGroupCapacity(OrderDTO.OrderCreateRequest request, Integer isDate, LocalDate targetDate, LocalTime startTime, LocalTime endTime) {
List<OrgGroupInfo> orgGroupTeamInfos = new ArrayList<>(); List<OrgGroupInfo> orgGroupTeamInfos = new ArrayList<>();
String peaBrand = fixBrand(request.getBrand()); String peaBrand = request.getBrand();
SkillInfoEntity skillInfo = skillInfoDao.getByBrandAndTypeAndSkill(peaBrand, request.getProductType(), request.getServiceType()); SkillInfoEntity skillInfo = skillInfoDao.getByBrandAndTypeAndSkill(peaBrand, request.getProductType(), request.getServiceType());
if (ObjectUtil.isNull(skillInfo)) { if (ObjectUtil.isNull(skillInfo)) {
return Result.failed(StatusCodeEnum.ORDER_SKILL_NOT_EXISTS); return Result.failed(StatusCodeEnum.ORDER_SKILL_NOT_EXISTS);
......
...@@ -137,6 +137,11 @@ public class OrderCreateServiceImpl implements OrderCreateService { ...@@ -137,6 +137,11 @@ public class OrderCreateServiceImpl implements OrderCreateService {
return tokenCount.get(token); return tokenCount.get(token);
} }
public static void delRate(String token) {
//上传成功,删除上传的进度条
tokenCount.remove(token);
}
private List<LabelValueDTO> getPriorities() { private List<LabelValueDTO> getPriorities() {
String[] priorities = {"紧急", "正常"}; String[] priorities = {"紧急", "正常"};
List<LabelValueDTO> listPriorities = new ArrayList<>(); List<LabelValueDTO> listPriorities = new ArrayList<>();
...@@ -275,194 +280,206 @@ public class OrderCreateServiceImpl implements OrderCreateService { ...@@ -275,194 +280,206 @@ public class OrderCreateServiceImpl implements OrderCreateService {
} }
fileRateDTO.setTotalCount(cachedDataList.size()); fileRateDTO.setTotalCount(cachedDataList.size());
tokenCount.put(token,fileRateDTO); tokenCount.put(token,fileRateDTO);
for (OrderInfoExcelDTO req : cachedDataList) { try {
OrderInfoEntity byOrderId = orderInfoDao.getByOrderId(req.getOrderId()); for (OrderInfoExcelDTO req : cachedDataList) {
String peaBrand = CommonUtil.fixBrand(req.getBrand()); OrderInfoEntity byOrderId = orderInfoDao.getByOrderId(req.getOrderId());
if (ObjectUtil.isNotNull(byOrderId)) { String peaBrand = req.getBrand();
OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO(); if (ObjectUtil.isNotNull(byOrderId)) {
BeanUtil.copyProperties(req, orderInfoError); OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO();
orderInfoError.setError(StatusCodeEnum.ORDER_EXISTS.getDesc()); BeanUtil.copyProperties(req, orderInfoError);
errorList.add(orderInfoError); orderInfoError.setError(StatusCodeEnum.ORDER_EXISTS.getDesc());
fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount() )+1); errorList.add(orderInfoError);
tokenCount.put(token,fileRateDTO); fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount() )+1);
continue; tokenCount.put(token,fileRateDTO);
} 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);
tokenCount.put(token,fileRateDTO);
continue;
}
OrderInfoEntity entity = new OrderInfoEntity();
entity.setExpectTimeBegin(DateUtil.fromDate(req.getExpectBegin()));
entity.setExpectTimeEnd(DateUtil.fromDate(req.getExpectEnd()));
entity.setAppointmentStatus(OrderFlowEnum.INIT.name());
entity.setAppointmentMethod(AppointmentMethodEnum.AUTO_BATCH.name());
entity.setDt(entity.getExpectTimeBegin().toLocalDate());
entity.setOrderId(req.getOrderId());
FendanDTO fendanDTO = new FendanDTO();
fendanDTO.setAddress(req.getDetail());
//获取地址的信息
SaasAddressResult saasByAddresss = null;
try {
saasByAddresss = saasUtils.getSaasByAddresss(fendanDTO);
} catch (Exception e) {
//上传成功,删除上传的进度条
tokenCount.remove(token);
throw new BusinessException(e.getMessage());
}
entity.setProvince(saasByAddresss.getProvince());
entity.setCity(saasByAddresss.getCity());
entity.setCounty(saasByAddresss.getCounty());
// 处理技能和标签
entity.setTakeTime(skillInfoEntity.getTakeTime());
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)) {
Result<String> addMultipleOrders = orderInfoService.addMultipleOrders(entity.getDt(), saasByAddresss.getId(), req.getOrderId()); OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO();
entity.setMultipleOrders(addMultipleOrders.getResult()); BeanUtil.copyProperties(req, orderInfoError);
//构建参数 orderInfoError.setError(StatusCodeEnum.ORDER_SKILL_NOT_EXISTS.getDesc());
OrderDTO.OrderCreateRequest request = new OrderDTO.OrderCreateRequest(); errorList.add(orderInfoError);
request.setOrderId(req.getOrderId()); fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount() )+1);
request.setBrand(req.getBrand()); tokenCount.put(token,fileRateDTO);
request.setProductType(req.getType()); continue;
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);
tokenCount.put(token,fileRateDTO);
continue;
}
location.setLongitude(saasByAddresss.getX());
location.setLatitude(saasByAddresss.getY());
location.setAddress(req.getAddress());
location.setAddressId(saasByAddresss.getId());
request.setLocation(location);
// 分单处理
Result<OrgTeamInfo> fendanResult = fendanService.fendanToGroupCapacity(request, 2, entity.getExpectTimeBegin().toLocalDate(), entity.getExpectTimeBegin().toLocalTime(), entity.getExpectTimeEnd().toLocalTime());
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);
tokenCount.put(token,fileRateDTO);
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(StatusCodeEnum.FENDAN_IS_TRANSCEND_AND_SPECIAL.getCode())) { OrderInfoEntity entity = new OrderInfoEntity();
// 处理超派和特殊时间
entity.setTranscend(1); entity.setExpectTimeBegin(DateUtil.fromDate(req.getExpectBegin()));
entity.setIsSpecialTime(1); entity.setExpectTimeEnd(DateUtil.fromDate(req.getExpectEnd()));
entity.setAppointmentStatus(OrderFlowEnum.INIT.name());
entity.setAppointmentMethod(AppointmentMethodEnum.AUTO_BATCH.name());
entity.setDt(entity.getExpectTimeBegin().toLocalDate());
entity.setOrderId(req.getOrderId());
FendanDTO fendanDTO = new FendanDTO();
fendanDTO.setAddress(req.getDetail());
//获取地址的信息
SaasAddressResult saasByAddresss = null;
try {
saasByAddresss = saasUtils.getSaasByAddresss(fendanDTO);
} catch (Exception e) {
//上传成功,删除上传的进度条
tokenCount.remove(token);
throw new BusinessException(e.getMessage());
} }
OrgBranchEntity branchEntity = orgBranchDao.findByCitycodeListLike("%" + saasByAddresss.getCity() + "%"); entity.setProvince(saasByAddresss.getProvince());
if (branchEntity != null) { entity.setCity(saasByAddresss.getCity());
entity.setOrgClusterId(branchEntity.getClusterId()); entity.setCounty(saasByAddresss.getCounty());
entity.setOrgBranchId(branchEntity.getBranchId());
entity.setAppointmentMethod(AppointmentMethodEnum.MANUAL.name());
Integer cutoff = CommonUtil.isCutoff(entity.getExpectTimeBegin(), null); // 处理技能和标签
entity.setIsCutoff(cutoff); entity.setTakeTime(skillInfoEntity.getTakeTime());
//发送通知分部消息
sendMsg(branchEntity.getBranchId(), req.getOrderId(), entity.getExpectTimeBegin().toLocalDate(), entity);
entity.setBeanPriority(req.getBeanPriority());
if (req.getBeanPriority().equals("1")) {
if (!DateUtil.judgeTimeIsToday(entity.getExpectTimeBegin())) {
entity.setAppointmentMethod(AppointmentMethodEnum.AUTO_NOW.name());
}
} }
} else { //一家多单
// 根据分单工作队,填写clusterId/branchId/groupId/teamId等 Result<String> addMultipleOrders = orderInfoService.addMultipleOrders(entity.getDt(), saasByAddresss.getId(), req.getOrderId());
OrgTeamInfo teamInfo = fendanResult.getResult(); entity.setMultipleOrders(addMultipleOrders.getResult());
entity.setOrgClusterId(teamInfo.getClusterId()); //构建参数
entity.setOrgBranchId(teamInfo.getBranchId()); OrderDTO.OrderCreateRequest request = new OrderDTO.OrderCreateRequest();
entity.setOrgGroupId(teamInfo.getGroupId()); request.setOrderId(req.getOrderId());
entity.setOrgTeamId(teamInfo.getTeamId()); request.setBrand(req.getBrand());
//特殊时间段 request.setProductType(req.getType());
Integer special = CommonUtil.isSpecial(entity.getExpectTimeBegin().toLocalTime(), request.setServiceType(req.getSkill());
entity.getExpectTimeEnd().toLocalTime(), teamInfo.getWorkOn(), teamInfo.getWorkOff()); Location location = new Location();
Integer cutoff = CommonUtil.isCutoff(entity.getExpectTimeBegin(), teamInfo.getWorkOff()); if (saasByAddresss.getX() == null || saasByAddresss.getY() == null) {
// 处理cutoff 动态排班结束后创建的当日单和次日单 OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO();
boolean isTomorrow = DateUtil.judgeTimeIsisTomorrow(entity.getExpectTimeBegin()); BeanUtil.copyProperties(req, orderInfoError);
//次日单自动批量 orderInfoError.setError("地址解析失败");
if (isTomorrow) { errorList.add(orderInfoError);
entity.setAppointmentMethod(AppointmentMethodEnum.AUTO_BATCH.name()); fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount() )+1);
tokenCount.put(token,fileRateDTO);
continue;
} }
// 特殊时间段,当天单,cutoff需要人工处理 location.setLongitude(saasByAddresss.getX());
if (cutoff == 1 || special == 1) { location.setLatitude(saasByAddresss.getY());
//判断是否在今天cutoff之后 location.setAddress(req.getAddress());
entity.setIsCutoff(cutoff); location.setAddressId(saasByAddresss.getId());
entity.setIsSpecialTime(special); request.setLocation(location);
entity.setAppointmentMethod(AppointmentMethodEnum.MANUAL.name());
//发送通知分部消息 // 分单处理
sendMsg(teamInfo.getBranchId(), req.getOrderId(), entity.getExpectTimeBegin().toLocalDate(), entity); 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);
tokenCount.put(token,fileRateDTO);
continue;
} }
} if (fendanResult.getCode().equals(StatusCodeEnum.ORDER_SKILL_NOT_EXISTS.getCode())) {
// 字段转换 OrderInfoErrorExcelDTO orderInfoError = new OrderInfoErrorExcelDTO();
entity.setSource(req.getSource()); BeanUtil.copyProperties(req, orderInfoError);
entity.setName(req.getName()); orderInfoError.setError(StatusCodeEnum.ORDER_SKILL_NOT_EXISTS.getCode());
entity.setPhone(req.getPhone()); errorList.add(orderInfoError);
entity.setBeanBrand(req.getBrand()); fileRateDTO.setErrorCount((fileRateDTO.getErrorCount() == null ? 0 : fileRateDTO.getErrorCount() )+1);
entity.setBrand(peaBrand); tokenCount.put(token,fileRateDTO);
entity.setType(req.getType()); continue;
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);
tokenCount.put(token,fileRateDTO);
try {
Thread.sleep(1000*20);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
} }
if (successCount == cachedDataList.size()) { 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(StatusCodeEnum.FENDAN_IS_TRANSCEND_AND_SPECIAL.getCode())) {
// 处理超派和特殊时间
entity.setTranscend(1);
entity.setIsSpecialTime(1);
}
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);
entity.setIsCutoff(cutoff);
//发送通知分部消息
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);
}
}
// 字段转换
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);
tokenCount.put(token,fileRateDTO);
try {
Thread.sleep(1000*5);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
} catch (Exception e) {
tokenCount.remove(token); tokenCount.remove(token);
throw new BusinessException("订单上传异常");
} }
if (errorList.size() > 0) { if (errorList.size() > 0) {
tokenCount.remove(token);
if (errorList != null && errorList.size() > 0) { if (errorList != null && errorList.size() > 0) {
try { try {
......
...@@ -62,6 +62,7 @@ sentry: ...@@ -62,6 +62,7 @@ sentry:
exception-resolver-order: -2147483647 exception-resolver-order: -2147483647
SaaS: SaaS:
urlBack: http://119.3.39.114:8034
url: http://119.3.39.114:8100 url: http://119.3.39.114:8100
ak: 216d013687ba46f5ad990e9380ec56c6 ak: 216d013687ba46f5ad990e9380ec56c6
userAccount: 1YL+MfLj/Oy70Dvbvn3mYg== userAccount: 1YL+MfLj/Oy70Dvbvn3mYg==
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!