|
|
|
@ -218,9 +218,6 @@ public class InvoiceServiceImpl implements InvoiceService { |
|
|
|
|
}else { |
|
|
|
|
//封装成品油
|
|
|
|
|
PageCommonOrderInfo cpyPageCommonOrderInfo = new PageCommonOrderInfo(); |
|
|
|
|
//拼接自动按照明细行拆分所需要的数据
|
|
|
|
|
log.info("cpyOrderItems》》》》》》》》"+JSON.toJSONString(cpyOrderItems)); |
|
|
|
|
log.info("nocpyOrderItems》》》》》》》》"+JSON.toJSONString(nocpyOrderItems)); |
|
|
|
|
//成品油和非成品油混合
|
|
|
|
|
PageOrderInfo cpyPageOrderInfo = new PageOrderInfo(); |
|
|
|
|
BeanUtils.copyProperties(commonOrderInfo.getOrderInfo(),cpyPageOrderInfo); |
|
|
|
@ -254,7 +251,9 @@ public class InvoiceServiceImpl implements InvoiceService { |
|
|
|
|
if(cpyOrderItems.size()>ConfigureConstant.INT_8){ |
|
|
|
|
return R.error("结算单:"+commonOrderInfo.getOrderInfo().getDdh()+"是成品油发票,明细行数不能超过8行,请先进行手动拆分!"); |
|
|
|
|
} |
|
|
|
|
lists.add(mixCommonOrderInfoList); |
|
|
|
|
if(!CollectionUtils.isEmpty(mixCommonOrderInfoList)){ |
|
|
|
|
lists.add(mixCommonOrderInfoList); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//如果是混开的 走明细拆分
|
|
|
|
@ -343,20 +342,16 @@ public class InvoiceServiceImpl implements InvoiceService { |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
log.error("{}校验单价容差范围发生错误:在原结算单中未匹配到唯一明细,找到了{}条", LOGGER_MSG, collect.size()); |
|
|
|
|
// R.error("校验单价容差范围发生错误:在原结算单中未匹配到唯一明细");
|
|
|
|
|
throw new RuntimeException("校验单价容差范围发生错误:在原结算单中未匹配到唯一明细"); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if(consumerList.size()>0){ |
|
|
|
|
// return R.error(ConfigureConstant.STRING_9001, "以下结算单中客户的状态为“冻结”状态,不能进行开票。",consumerList);
|
|
|
|
|
throw new RuntimeException(String.format("以下结算单中%s客户的状态为“冻结”状态,不能进行开票。",consumerList)); |
|
|
|
|
}else if((StrUtil.isBlank(pageInvoiceReq.getConfirmZnfm()) || !ConfigureConstant.STRING_0.equals(pageInvoiceReq.getConfirmZnfm())) && confirmList.size()>0){ |
|
|
|
|
// return R.error(ConfigureConstant.STRING_9002,"请确认以下物料税收分类编码是否准确",confirmList);
|
|
|
|
|
throw new RuntimeException(String.format("请将以下物料同步至公司库,再进行生成预制",confirmList)); |
|
|
|
|
}else if(djOverflowList.size() > 0){ |
|
|
|
|
// return R.error(ConfigureConstant.STRING_9003, "以下订单自动拆分时单价超过设定范围,请手动拆分",djOverflowList);
|
|
|
|
|
throw new RuntimeException(String.format("以下订单自动拆分时单价超过设定范围,请手动拆分",djOverflowList)); |
|
|
|
|
}else { |
|
|
|
|
for (CommonOrderInfo f : commonOrderInfoList) { |
|
|
|
|