|
|
|
@ -2157,15 +2157,13 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
List<OrderProcessInfo> orderProcessInfos1 = collect.get(s); |
|
|
|
|
if(orderProcessInfos1.size() > 1){ |
|
|
|
|
//如果全部开具成功再添加否则返回报错信息
|
|
|
|
|
List<String> collect2 = orderProcessInfos1.stream() |
|
|
|
|
.filter(t -> OrderInfoEnum.ORDER_STATUS_5.getKey().equals(t.getDdzt()) || OrderInfoEnum.ORDER_STATUS_7.getKey().equals(t.getDdzt())) |
|
|
|
|
.map(t -> t.getFpqqlsh()).collect(Collectors.toList()); |
|
|
|
|
if(!collect2.isEmpty()){ |
|
|
|
|
fpqqlsh.addAll(collect2); |
|
|
|
|
}else{ |
|
|
|
|
sb1.append("本次作废存在商旅发票,,存在未开具成功结算单:" + collect2.stream().collect(Collectors.joining(",")));//结算单号
|
|
|
|
|
int count = (int)orderProcessInfos1.stream() |
|
|
|
|
.filter(t -> OrderInfoEnum.ORDER_STATUS_5.getKey().equals(t.getDdzt()) || OrderInfoEnum.ORDER_STATUS_7.getKey().equals(t.getDdzt())).count(); |
|
|
|
|
if(orderProcessInfos1.size() != count){ |
|
|
|
|
sb1.append("本次作废存在商旅发票,存在未开具成功报账单:" + s); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fpqqlsh.addAll(orderProcessInfos1.stream().map(t -> t.getFpqqlsh()).collect(Collectors.toList())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//直接return ,存在未开具情况不查作废情况了
|
|
|
|
@ -2176,7 +2174,7 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
List<OrderInvoiceInfo> invoiceInfos = orderInvoiceInfoMapper.selectInvoiceInfoByFpqqlshs(fpqqlsh); |
|
|
|
|
List<String> collect2 = invoiceInfos.stream().filter(t -> !paramList.contains(t.getFpqqlsh())).map(t -> t.getFphm()).collect(Collectors.toList()); |
|
|
|
|
if(!collect2.isEmpty()){ |
|
|
|
|
return R.error("本次作废存在商旅发票,以下发票号码未作废:"+collect2.stream().collect(Collectors.joining(","))+",请注意"); |
|
|
|
|
return R.error("本次作废存在商旅发票,以下发票号码未作废:" + collect2.stream().collect(Collectors.joining(",")) + ",请注意"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|