|
|
|
@ -1,36 +1,24 @@
|
|
|
|
|
package com.glxp.api.service.inout;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
import cn.hutool.core.net.URLDecoder;
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.constant.Constant;
|
|
|
|
|
import com.glxp.api.dao.auth.AuthAdminDao;
|
|
|
|
|
import com.glxp.api.dao.basic.UdiRlSupDao;
|
|
|
|
|
import com.glxp.api.dao.inout.*;
|
|
|
|
|
import com.glxp.api.entity.auth.AuthAdmin;
|
|
|
|
|
import com.glxp.api.entity.basic.UdiRlSupEntity;
|
|
|
|
|
import com.glxp.api.entity.inout.*;
|
|
|
|
|
import com.glxp.api.idc.utils.IDCUtils;
|
|
|
|
|
import com.glxp.api.req.basic.FilterCompanyProductRelevanceRequest;
|
|
|
|
|
import com.glxp.api.req.inout.ioOrderUploadRequest;
|
|
|
|
|
import com.glxp.api.res.inout.PlatformLinkResponse;
|
|
|
|
|
import com.glxp.api.res.inout.ioUploadOrderResponse;
|
|
|
|
|
import com.glxp.api.util.BeanCopyUtils;
|
|
|
|
|
import com.glxp.api.util.FileUtils;
|
|
|
|
|
import com.glxp.api.util.GennerOrderUtils;
|
|
|
|
|
import com.glxp.api.util.OrderNoTypeBean;
|
|
|
|
|
import org.apache.catalina.User;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
@ -88,15 +76,17 @@ public class IoOrderUtilsService {
|
|
|
|
|
filterCompanyProductRelevanceRequest.setCustomerId(Long.valueOf(platformLinkRespons.getCustomerId()));
|
|
|
|
|
filterCompanyProductRelevanceRequest.setNameCode(ioCodeTempEntity.getNameCode());
|
|
|
|
|
List<ioOrderUploadRequest> udiRlSupEntityList = udiRlSupDao.filterCompanyProduct(filterCompanyProductRelevanceRequest);
|
|
|
|
|
if (udiRlSupEntityList != null && udiRlSupEntityList.size() == 0 || udiRlSupEntityList.size() > 1) {
|
|
|
|
|
if (CollectionUtil.isNotEmpty(udiRlSupEntityList) && udiRlSupEntityList.size() > 1) {
|
|
|
|
|
ioCodeTempEntity1.setRelId(null);
|
|
|
|
|
checkUdi = true;
|
|
|
|
|
} else {
|
|
|
|
|
ioCodeTempEntity1.setRelId(udiRlSupEntityList.get(0).getId());
|
|
|
|
|
map.put(ioCodeTempEntity.getRelId(), udiRlSupEntityList.get(0));
|
|
|
|
|
if(CollectionUtil.isNotEmpty(udiRlSupEntityList)) {
|
|
|
|
|
ioCodeTempEntity1.setRelId(udiRlSupEntityList.get(0).getId());
|
|
|
|
|
map.put(ioCodeTempEntity.getRelId(), udiRlSupEntityList.get(0));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ioCodeTempEntity1.setOrderId(billNO);
|
|
|
|
|
String code=URLDecoder.decode(ioCodeTempEntity.getCode(), StandardCharsets.UTF_8);
|
|
|
|
|
String code = URLDecoder.decode(ioCodeTempEntity.getCode(), StandardCharsets.UTF_8);
|
|
|
|
|
ioCodeTempEntity1.setCode(code);
|
|
|
|
|
ioCodeTempEntity1.setMainAction(ioCodeTempEntity.getMainAction());
|
|
|
|
|
ioCodeTempEntity1.setAction(platformLinkRespons.getTargetAction());
|
|
|
|
@ -266,7 +256,6 @@ public class IoOrderUtilsService {
|
|
|
|
|
ioOrderEntity1.setMainAction(ioOrderEntity.getMainAction());
|
|
|
|
|
ioOrderEntity1.setAction(platformLinkRespons.getTargetAction());
|
|
|
|
|
ioOrderEntity1.setFromCorp(ioOrderEntity.getFromCorp());
|
|
|
|
|
ioOrderEntity1.setFromCorp(ioOrderEntity.getFromCorp());
|
|
|
|
|
ioOrderEntity1.setFromDeptCode(ioOrderEntity.getFromDeptCode());
|
|
|
|
|
ioOrderEntity1.setFromInvCode(ioOrderEntity.getFromInvCode());
|
|
|
|
|
ioOrderEntity1.setOrderType(3);
|
|
|
|
|