|
|
|
@ -1525,6 +1525,9 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
if(StrUtil.isNotBlank(commonOrderInfo.getOrderInfo().getBzdh())){ |
|
|
|
|
Map map = new HashMap(); |
|
|
|
|
map.put("bzdh",commonOrderInfo.getOrderInfo().getBzdh()); |
|
|
|
|
if(StringUtils.isNotBlank(commonOrderInfo.getOrderInfo().getDdh())){ |
|
|
|
|
map.put("ddh",commonOrderInfo.getOrderInfo().getDdh()); |
|
|
|
|
} |
|
|
|
|
List<OrderProcessInfo> orderProcessInfos = orderProcessInfoMapper.queryOrderInfo(map, null, null); |
|
|
|
|
if(orderProcessInfos.size()!=1){ |
|
|
|
|
return R.error("根据报账单号未查到到结算单或查询到多条结算单,请检查!"); |
|
|
|
@ -2161,7 +2164,7 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
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); |
|
|
|
|
sb1.append(String.format("本次作废存在商旅发票,报账单:%s存在未开具成功的结算单;",s)); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
fpqqlsh.addAll(orderProcessInfos1.stream().map(t -> t.getFpqqlsh()).collect(Collectors.toList())); |
|
|
|
@ -2175,7 +2178,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(String.format("本次作废存在商旅发票,以下发票号码未作废:%s,请注意" ,collect2.stream().collect(Collectors.joining(",")) )); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
@ -2202,15 +2205,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()){ |
|
|
|
|
yfpqqlsh.addAll(collect2); |
|
|
|
|
}else{ |
|
|
|
|
sb2.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){ |
|
|
|
|
sb2.append(String.format("本次冲红存在商旅发票,报账单:%s存在未开具成功的结算单;",s)); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
yfpqqlsh.addAll(orderProcessInfos1.stream().map(t -> t.getFpqqlsh()).collect(Collectors.toList())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//直接return ,存在未开具情况不查作废情况了
|
|
|
|
@ -2221,7 +2222,7 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
List<OrderInvoiceInfo> invoiceInfos = orderInvoiceInfoMapper.selectInvoiceInfoByFpqqlshs(yfpqqlsh); |
|
|
|
|
List<String> collect2 = invoiceInfos.stream().filter(t -> !list.contains(t.getFpdm() + "-" + t.getFphm())).map(t -> t.getFphm()).collect(Collectors.toList()); |
|
|
|
|
if(!collect2.isEmpty()){ |
|
|
|
|
return R.error("本次冲红存在商旅发票,以下发票号码未冲红:"+collect2.stream().collect(Collectors.joining(","))+",请注意"); |
|
|
|
|
return R.error(String.format("本次冲红存在商旅发票,以下发票号码需冲红:%s,请注意;",collect2.stream().collect(Collectors.joining(",")))); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|