|
|
|
@ -1787,14 +1787,14 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
orderProcessInfo2.setXtly(orderProcessInfo != null && StringUtils.isNotBlank(orderProcessInfo.getXtly()) ? orderProcessInfo.getXtly() : orderProcessInfos.size() > 0 && StringUtils.isNotBlank(orderProcessInfos.get(0).getXtly())?orderProcessInfos.get(0).getXtly():"SAP"); |
|
|
|
|
//查询entId,判断如果为空
|
|
|
|
|
String gsdm = orderProcessInfo != null && StringUtils.isNotBlank(orderProcessInfo.getGsdm()) ? orderProcessInfo.getGsdm() : orderProcessInfos.size() > 0 && StringUtils.isNotBlank(orderProcessInfos.get(0).getGsdm()) ? orderProcessInfos.get(0).getGsdm() : null; |
|
|
|
|
if(StringUtils.isNotBlank(gsdm)){ |
|
|
|
|
if(StringUtils.isBlank(gsdm)){ |
|
|
|
|
//根据orderInfoId 查询 发票公司代码是否为空
|
|
|
|
|
OrderProcessInfo orderProcessInfo1 = orderProcessInfoMapper.selectByOrderId(orderInfoId, Arrays.asList(xhfNsrsbh)); |
|
|
|
|
if(orderProcessInfo1 != null && StringUtils.isBlank(orderProcessInfo1.getGsdm())){ |
|
|
|
|
//如果为空,根据entID查询大B获取公司代码
|
|
|
|
|
List<TaxPlayerCodeDept> taxplayercodeDeptList = userInfoService.getUser().getTaxplayercodeDeptList(); |
|
|
|
|
gsdm = taxplayercodeDeptList.stream().filter(t -> orderProcessInfo1.getEntId().equals(t.getDeptId())).map(t -> t.getEnterpriseNumbers()).findFirst().orElse(""); |
|
|
|
|
if(StringUtils.isNotBlank(gsdm)){ |
|
|
|
|
if(StringUtils.isBlank(gsdm)){ |
|
|
|
|
throw new OrderReceiveException(OrderInfoContentEnum.ORDER__USER_INVALID_PERMISSIONS); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|