|
|
@@ -243,7 +243,7 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
if (ObjectUtils.isNotNull(boxType) && boxType.size() > 0) {
|
|
|
List<TradingBoxItem> boxTypeSize = tradingBoxItemList.stream().filter(e -> ObjectUtils.isNotNull(e.getBoxType()) && e.getBoxType().equals(boxType_)).collect(Collectors.toList());
|
|
|
if (ObjectUtils.isNotNull(boxTypeSize) && boxTypeSize.size() > 0) {
|
|
|
- boxTypeNumber.append(boxType_).append("X").append(boxTypeSize.size()).append(",");
|
|
|
+ boxTypeNumber.append(boxTypeSize.size()).append("*").append(boxType_).append(",");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -267,6 +267,7 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
tradingBoxItem.setCreateUserName(AuthUtil.getUserName());
|
|
|
tradingBoxItem.setTenantId(AuthUtil.getTenantId());
|
|
|
tradingBoxItem.setPid(tradingBox.getId());
|
|
|
+ tradingBoxItem.setStackingStatus("未堆存");
|
|
|
tradingBoxItemMapper.insert(tradingBoxItem);
|
|
|
} else {
|
|
|
tradingBoxItem.setUpdateUser(AuthUtil.getUserId());
|
|
|
@@ -488,7 +489,7 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
if (ObjectUtils.isNotNull(boxType) && boxType.size() > 0) {
|
|
|
List<TradingBoxItem> boxTypeSize = tradingBoxItemList.stream().filter(e -> ObjectUtils.isNotNull(e.getBoxType()) && e.getBoxType().equals(boxType_)).collect(Collectors.toList());
|
|
|
if (ObjectUtils.isNotNull(boxTypeSize) && boxTypeSize.size() > 0) {
|
|
|
- boxTypeNumber.append(boxType_).append("X").append(boxTypeSize.size()).append(",");
|
|
|
+ boxTypeNumber.append(boxTypeSize.size()).append("*").append(boxType_).append(",");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1802,11 +1803,11 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
|
|
|
//账单数据
|
|
|
ApplyDTO applyDTO = new ApplyDTO();
|
|
|
- if ("JKFC".equals(transport.getBillType())) {
|
|
|
+ /*if ("JKFC".equals(transport.getBillType())) {
|
|
|
applyDTO.setBillType("申请");
|
|
|
} else {
|
|
|
applyDTO.setBillType("收费");
|
|
|
- }
|
|
|
+ }*/
|
|
|
applyDTO.setTradeType("BOX");
|
|
|
applyDTO.setBelongCompany(transport.getCorpName());
|
|
|
|
|
|
@@ -1821,15 +1822,19 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
List<Items> itemsList = new ArrayList<>();
|
|
|
for (TransportItemFees tradingBoxFees : transportItemFeesList) {
|
|
|
Items items = new Items();
|
|
|
- amount = tradingBoxFees.getAmount();
|
|
|
+ if (ObjectUtils.isNotEmpty(tradingBoxFees.getAmount())){
|
|
|
+ amount = tradingBoxFees.getAmount();
|
|
|
+ }
|
|
|
//计算单价
|
|
|
if (quantity.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
price = amount.divide(quantity, 5, RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP);
|
|
|
}
|
|
|
if (1 == tradingBoxFees.getFeesType()) {
|
|
|
items.setSrcFeesType("收费");
|
|
|
+ applyDTO.setBillType("收费");
|
|
|
} else {
|
|
|
items.setSrcFeesType("申请");
|
|
|
+ applyDTO.setBillType("申请");
|
|
|
}
|
|
|
items.setSrcBoxBillType(tradingBoxFees.getBillType());
|
|
|
items.setItemType(transport.getBillType());
|
|
|
@@ -1861,6 +1866,7 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
applyDTO.setItemsList(itemsList);
|
|
|
//修改费用明细
|
|
|
tradingBoxFees.setSubmitPay(1);
|
|
|
+ tradingBoxFees.setExpenseGenerationTime(new Date());
|
|
|
transportItemFeesMapper.updateById(tradingBoxFees);
|
|
|
}
|
|
|
if (CollectionUtils.isNotEmpty(itemsList)) {
|
|
|
@@ -1906,7 +1912,7 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
|
|
|
//账单数据
|
|
|
ApplyDTO applyDTO = new ApplyDTO();
|
|
|
- if ("ZR".equals(tradingBox.getType()) || "ZC".equals(tradingBox.getType())) {
|
|
|
+ /*if ("ZR".equals(tradingBox.getType()) || "ZC".equals(tradingBox.getType())) {
|
|
|
applyDTO.setBillType("");
|
|
|
} else if ("BUY".equals(tradingBox.getType())) {
|
|
|
applyDTO.setBillType("申请");
|
|
|
@@ -1914,7 +1920,7 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
applyDTO.setBillType("收费");
|
|
|
} else if ("DCF".equals(tradingBox.getType())) {
|
|
|
applyDTO.setBillType("申请");
|
|
|
- }
|
|
|
+ }*/
|
|
|
applyDTO.setTradeType("BOX");
|
|
|
applyDTO.setBelongCompany(tradingBox.getPurchaseCompanyName());
|
|
|
|
|
|
@@ -1936,8 +1942,10 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
}
|
|
|
if (1 == tradingBoxFees.getFeesType()) {
|
|
|
items.setSrcFeesType("收费");
|
|
|
+ applyDTO.setBillType("收费");
|
|
|
} else {
|
|
|
items.setSrcFeesType("申请");
|
|
|
+ applyDTO.setBillType("申请");
|
|
|
}
|
|
|
items.setSrcBoxBillType(tradingBoxFees.getBillType());
|
|
|
items.setItemType(tradingBox.getType());
|
|
|
@@ -1967,6 +1975,7 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
applyDTO.setItemsList(itemsList);
|
|
|
//修改费用明细
|
|
|
tradingBoxFees.setSubmitPay(1);
|
|
|
+ tradingBoxFees.setExpenseGenerationTime(new Date());
|
|
|
tradingBoxFeesMapper.updateById(tradingBoxFees);
|
|
|
}
|
|
|
if (CollectionUtils.isNotEmpty(itemsList)) {
|
|
|
@@ -2011,7 +2020,7 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
|
|
|
@Override
|
|
|
public R revokeBill(TradingBox tradingBox) {
|
|
|
- if ("JKFC".equals(tradingBox.getType()) || "CKZY".equals(tradingBox.getType())) {
|
|
|
+ if ("JK".equals(tradingBox.getType()) || "CK".equals(tradingBox.getType())) {
|
|
|
Transport selectTransport = transportMapper.selectById(tradingBox.getId());
|
|
|
if (selectTransport == null) {
|
|
|
throw new SecurityException("撤销失败,未找到主表信息");
|
|
|
@@ -2036,6 +2045,7 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
}
|
|
|
}
|
|
|
transportItemFees.setSubmitPay(0);
|
|
|
+ transportItemFees.setExpenseGenerationTime(null);
|
|
|
transportItemFeesMapper.updateById(transportItemFees);
|
|
|
}
|
|
|
} else {
|
|
|
@@ -2067,6 +2077,7 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
}
|
|
|
}
|
|
|
tradingBoxFees.setSubmitPay(0);
|
|
|
+ tradingBoxFees.setExpenseGenerationTime(null);
|
|
|
tradingBoxFeesMapper.updateById(tradingBoxFees);
|
|
|
}
|
|
|
} else {
|