|
|
@ -22,6 +22,7 @@ import com.dxhy.order.baseservice.module.taxclass.dao.TaxClassCodeMapper; |
|
|
|
import com.dxhy.order.baseservice.module.taxclass.model.TaxClassCodeEntity; |
|
|
|
import com.dxhy.order.baseservice.module.taxclass.model.TaxClassCodeEntity; |
|
|
|
import com.dxhy.order.baseservice.module.thirdservice.simsback.service.SimsBackService; |
|
|
|
import com.dxhy.order.baseservice.module.thirdservice.simsback.service.SimsBackService; |
|
|
|
import com.dxhy.order.baseservice.module.thirdservice.user.model.DeptEntity; |
|
|
|
import com.dxhy.order.baseservice.module.thirdservice.user.model.DeptEntity; |
|
|
|
|
|
|
|
import com.dxhy.order.baseservice.module.thirdservice.user.model.TaxPlayerCodeDept; |
|
|
|
import com.dxhy.order.baseservice.module.thirdservice.user.service.UserInfoService; |
|
|
|
import com.dxhy.order.baseservice.module.thirdservice.user.service.UserInfoService; |
|
|
|
import com.dxhy.order.baseservice.utils.BaseServiceBeanTransitionUtils; |
|
|
|
import com.dxhy.order.baseservice.utils.BaseServiceBeanTransitionUtils; |
|
|
|
import com.dxhy.order.constant.*; |
|
|
|
import com.dxhy.order.constant.*; |
|
|
@ -1784,7 +1785,21 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
orderProcessInfo2.setBzdh(bzdh); |
|
|
|
orderProcessInfo2.setBzdh(bzdh); |
|
|
|
orderProcessInfo2.setOrderInfoId(orderInfoId);//作为更新where条件
|
|
|
|
orderProcessInfo2.setOrderInfoId(orderInfoId);//作为更新where条件
|
|
|
|
orderProcessInfo2.setXtly(orderProcessInfo != null && StringUtils.isNotBlank(orderProcessInfo.getXtly()) ? orderProcessInfo.getXtly() : orderProcessInfos.size() > 0 && StringUtils.isNotBlank(orderProcessInfos.get(0).getXtly())?orderProcessInfos.get(0).getXtly():"SAP"); |
|
|
|
orderProcessInfo2.setXtly(orderProcessInfo != null && StringUtils.isNotBlank(orderProcessInfo.getXtly()) ? orderProcessInfo.getXtly() : orderProcessInfos.size() > 0 && StringUtils.isNotBlank(orderProcessInfos.get(0).getXtly())?orderProcessInfos.get(0).getXtly():"SAP"); |
|
|
|
orderProcessInfo2.setGsdm(orderProcessInfo != null && StringUtils.isNotBlank(orderProcessInfo.getGsdm()) ? orderProcessInfo.getGsdm() : orderProcessInfos.size() > 0 && StringUtils.isNotBlank(orderProcessInfos.get(0).getGsdm())?orderProcessInfos.get(0).getGsdm():null); |
|
|
|
//查询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)){ |
|
|
|
|
|
|
|
//根据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)){ |
|
|
|
|
|
|
|
throw new OrderReceiveException(OrderInfoContentEnum.ORDER__USER_INVALID_PERMISSIONS); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
orderProcessInfo2.setGsdm(gsdm); |
|
|
|
String ddh = orderProcessInfo != null && StringUtils.isNotBlank(orderProcessInfo.getDdh()) ? orderProcessInfo.getDdh() : orderProcessInfos.size() > 0 && StringUtils.isNotBlank(orderProcessInfos.get(0).getDdh()) ? orderProcessInfos.get(0).getDdh() : null; |
|
|
|
String ddh = orderProcessInfo != null && StringUtils.isNotBlank(orderProcessInfo.getDdh()) ? orderProcessInfo.getDdh() : orderProcessInfos.size() > 0 && StringUtils.isNotBlank(orderProcessInfos.get(0).getDdh()) ? orderProcessInfos.get(0).getDdh() : null; |
|
|
|
orderProcessInfo2.setDdh(ddh); |
|
|
|
orderProcessInfo2.setDdh(ddh); |
|
|
|
int i = orderProcessInfoMapper.updateOrderProcessInfoByFpqqlsh(orderProcessInfo2, Arrays.asList(xhfNsrsbh)); |
|
|
|
int i = orderProcessInfoMapper.updateOrderProcessInfoByFpqqlsh(orderProcessInfo2, Arrays.asList(xhfNsrsbh)); |
|
|
|