bms2相关修改;
This commit is contained in:
+18
@@ -474,6 +474,16 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
.map(BmsMakeOutInvoiceItem::getFeeType)
|
||||
.filter(java.util.Objects::nonNull)
|
||||
.collect(java.util.stream.Collectors.joining("、"));
|
||||
|
||||
// 按 createTime 倒序排序并获取第一条记录
|
||||
BmsMakeOutInvoiceItem firstItem = bmsMakeOutInvoiceItems.stream()
|
||||
.sorted((a, b) -> {
|
||||
if (a.getCreateTime() == null) return 1;
|
||||
if (b.getCreateTime() == null) return -1;
|
||||
return b.getCreateTime().compareTo(a.getCreateTime());
|
||||
})
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
String salesmanId = reconciliation.getSalesmanId();
|
||||
String customerUserDept = billManageMapper.getCustomerUserDept(salesmanId);
|
||||
String deptValue = billManageMapper.getDeptValue(customerUserDept);
|
||||
@@ -517,6 +527,14 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
item.setScomment("业务部:"+appointShipper+feeTypes);
|
||||
}
|
||||
}
|
||||
// 费用类别
|
||||
String feeType = firstItem.getFeeType();
|
||||
String serviceItemsCodeNc = billManageMapper.getServiceItemsCodeNc(feeType);
|
||||
if (serviceItemsCodeNc != null && !serviceItemsCodeNc.isEmpty()) {
|
||||
item.setDef75(serviceItemsCodeNc);
|
||||
} else {
|
||||
item.setDef75("T10");
|
||||
}
|
||||
item.setPk_currtype(settlementCurrencyNcCode);
|
||||
item.setMoney_cr(String.valueOf(totalInvoiceValue));
|
||||
item.setMoney_bal(String.valueOf(totalInvoiceValue));
|
||||
|
||||
Reference in New Issue
Block a user