|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.glxp.api.service.inout.impl;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import cn.hutool.core.net.URLEncodeUtil;
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
|
@ -35,6 +36,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.net.URLEncoder;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
|
@ -61,6 +63,8 @@ public class PlatformServiceImpl implements PlatformService {
|
|
|
|
|
IoOrderDetailResultDao ioOrderDetailResultDao;
|
|
|
|
|
@Resource
|
|
|
|
|
IoOrderInvoiceMapper ioOrderInvoiceMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
IoCodeService ioCodeService;
|
|
|
|
|
@Value("${file_path}")
|
|
|
|
|
private String filePath;
|
|
|
|
|
@Value("${API_KEY}")
|
|
|
|
@ -324,14 +328,12 @@ public class PlatformServiceImpl implements PlatformService {
|
|
|
|
|
}
|
|
|
|
|
//获取单据详情
|
|
|
|
|
List<IoOrderDetailCodeEntity> ioOrderDetailCodeEntityList = ioOrderDetailCodeService.findByOrderId(orderId);
|
|
|
|
|
List<IoCodeTempEntity> ioCodeTempEntityList = ioCodeTempService.findByOrderId(orderId);
|
|
|
|
|
for (IoCodeTempEntity ioCodeTempEntity : ioCodeTempEntityList) {
|
|
|
|
|
Map<String, String> jsonMap = new HashMap<>();
|
|
|
|
|
jsonMap.put("code", ioCodeTempEntity.getCode());
|
|
|
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
|
|
|
String json = mapper.writeValueAsString(jsonMap);
|
|
|
|
|
ioCodeTempEntity.setCode(json);
|
|
|
|
|
List<IoCodeEntity> ioCodeEntityList = ioCodeService.findByOrderId(orderId);
|
|
|
|
|
for (IoCodeEntity ioCodeTempEntity : ioCodeEntityList) {
|
|
|
|
|
String code = URLEncodeUtil.encode(ioCodeTempEntity.getCode());
|
|
|
|
|
ioCodeTempEntity.setCode(code);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取业务单
|
|
|
|
|
QueryWrapper<IoOrderDetailBizEntity> ew = new QueryWrapper<>();
|
|
|
|
|
ew.eq("orderIdFk", orderId);
|
|
|
|
@ -363,7 +365,7 @@ public class PlatformServiceImpl implements PlatformService {
|
|
|
|
|
IoUploadOrderResponse ioUploadOrderResponse = new IoUploadOrderResponse();
|
|
|
|
|
ioUploadOrderResponse.setIoOrderEntity(ioOrderEntity);
|
|
|
|
|
ioUploadOrderResponse.setPlatformLinkRespons(platformLinkRespons);
|
|
|
|
|
ioUploadOrderResponse.setIoCodeTempEntityList(ioCodeTempEntityList);
|
|
|
|
|
ioUploadOrderResponse.setIoCodeEntityList(ioCodeEntityList);
|
|
|
|
|
ioUploadOrderResponse.setIoOrderDetailCodeEntityList(ioOrderDetailCodeEntityList);
|
|
|
|
|
ioUploadOrderResponse.setIoOrderDetailResultEntityList(ioOrderDetailResultEntityList);
|
|
|
|
|
ioUploadOrderResponse.setIoOrderDetailBizEntityList(ioOrderDetailBizEntityList);
|
|
|
|
|