|
|
@@ -1789,9 +1789,11 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
// String incomeId = invoicingVo.getIncomeIds().get(0);
|
|
|
|
|
|
// 这里的公司应该是支公司的公司
|
|
|
- invoice.setCompanyId(invoicingVo.getCompanyId());
|
|
|
-
|
|
|
-
|
|
|
+ List<String> parternerCompanyId = baseMapper.queryDistinctParternerCompanyId(invoicingVo.getIncomeIds());
|
|
|
+ if(CollUtil.size(parternerCompanyId) >1 || CollUtil.size(parternerCompanyId) == 0){
|
|
|
+ throw new ServiceException("勾选的应收订单对应的保险机构不唯一");
|
|
|
+ }
|
|
|
+ invoice.setCompanyId(parternerCompanyId.get(0));
|
|
|
invoice.setInvoiceType(invoicingVo.getInvoiceType());
|
|
|
// 开票类型 1、手续费 2、跟单费 3、驾意险手续费 4、驾意险跟单费 5、平台应收-车险 6、平台应收-非车险
|
|
|
if("1".equals(invoicingVo.getInvoiceType()) || "2".equals(invoicingVo.getInvoiceType())){
|
|
|
@@ -1840,6 +1842,9 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
if(invoicingVo == null){
|
|
|
throw new ServiceException("无法开票,开票参数为空");
|
|
|
}
|
|
|
+ if(CollUtil.isEmpty(invoicingVo.getIncomeIds())){
|
|
|
+ throw new SystemException("只选择要开票的应收数据");
|
|
|
+ }
|
|
|
// if(StrUtil.isEmpty(invoicingVo.getInvoiceNo())){
|
|
|
// throw new ServiceException("发票号不能为空");
|
|
|
// }
|