|
@@ -354,8 +354,8 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
res.setOver24Hour(1);
|
|
|
res.setHourDesc(PartFeeEnum.OUT_24_HOURS.getDesc());
|
|
|
}
|
|
|
- TbItem partItem=tbItemService.findByAliasName(SystemObject.config.getPartItemAlias());
|
|
|
- if (partItem==null) {
|
|
|
+ TbItem partItem = tbItemService.findByAliasName(SystemObject.config.getPartItemAlias());
|
|
|
+ if (partItem == null) {
|
|
|
throw new AjaxError("未配置停车费规则");
|
|
|
}
|
|
|
List<TbItemFac> list = tbItemFacService.getByItemId(partItem.getId());
|
|
@@ -398,7 +398,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 微信端获取缴费信息
|
|
|
*
|
|
@@ -456,6 +455,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
if (CarEnum.PayTypeEnum.FEE_TYPE.getType().equals(tbBusinessCar.getPayType())) {
|
|
|
partMoney = new BigDecimal("0");
|
|
|
}
|
|
|
+ if (CarEnum.PayTypeEnum.HAS_PAY_TYPE.getType().equals(tbBusinessCar.getPayType())) {
|
|
|
+ inTime=tbBusinessCar.getPayTime();
|
|
|
+ }
|
|
|
if (partMoney.doubleValue() == 1) {
|
|
|
IOrderPriceRes partPriceRes = getPartMoney(inTime, outTime, tbBusinessCar.getCarNo(), tbBusinessCar.getColor());
|
|
|
BigDecimal partPrice = partPriceRes.getTotalOrderPrice();
|
|
@@ -487,18 +489,30 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
//未支付的
|
|
|
List<IOrderItem> expenses = new ArrayList<>();
|
|
|
items = items.stream().filter(item -> item.getPayStatus() == 0).collect(Collectors.toList());
|
|
|
- //如果不需要支付,则过滤掉入场管理费
|
|
|
-// ManagerBO dto = needPayManagerMoney(carNo, businessCarId, items);
|
|
|
-// if (dto.isNeed()) {
|
|
|
-// result.put("manager", dto);
|
|
|
-// }
|
|
|
- items.forEach(item -> {
|
|
|
- String num = item.getNum();
|
|
|
- String itemCode = item.getItemCode();
|
|
|
+ for (TbBusinessItem businessItem : items) {
|
|
|
+ String num = businessItem.getNum();
|
|
|
+ String itemCode = businessItem.getItemCode();
|
|
|
IOrderItem iOrderItem = new IOrderItem();
|
|
|
+ String itemAlias = businessItem.getItemAlias();
|
|
|
+ Date startTime = businessItem.getColdStartTime();
|
|
|
+ Date endTime = businessItem.getColdEndTime();
|
|
|
iOrderItem.setExpenseNum(Integer.parseInt(num)).setUniqExpenseId(itemCode);
|
|
|
+ if (StrUtil.equals(itemAlias, SystemObject.config.getColdItemAlias())) {
|
|
|
+ tbBusinessItemService.buildColdFceItem(businessItem, iOrderItem, startTime, endTime);
|
|
|
+ //充电打冷--->按小时计费
|
|
|
+ } else if (StrUtil.equals(itemAlias, SystemObject.config.getHeavyStoreItemAlias())
|
|
|
+ || StrUtil.equals(itemAlias, SystemObject.config.getEmptyStoreItemAlias())) {
|
|
|
+ //空柜堆存、重箱堆存--->按天算
|
|
|
+ //如果存柜的话则不收费
|
|
|
+ if (businessItem.getCabinetType() == 0) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ tbBusinessItemService.buildDaysFceItem(businessItem, iOrderItem, startTime, endTime);
|
|
|
+ }else if (StrUtil.equals(itemAlias,SystemObject.config.getBigHeadCar())){
|
|
|
+ tbBusinessItemService .buildDaysFceItem(businessItem, iOrderItem, startTime, endTime);
|
|
|
+ }
|
|
|
expenses.add(iOrderItem);
|
|
|
- });
|
|
|
+ }
|
|
|
if (!expenses.isEmpty()) {
|
|
|
IOrderPriceRes orderPriceRes = syncService.orderPriceCal(expenses);
|
|
|
BigDecimal totalPrice = orderPriceRes.getTotalOrderPrice();
|
|
@@ -656,17 +670,27 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
for (TbItem tbItem : tbItems) {
|
|
|
TbItem db = tbItemService.getById(tbItem.getId());
|
|
|
String itemName = db.getItemName();
|
|
|
+ String alaisName = db.getItemAlias();
|
|
|
TbBusinessItem item = new TbBusinessItem();
|
|
|
+ int cabinetType = tbItem.getCabinetType();
|
|
|
+ if (!SystemObject.config.getEmptyStoreItemAlias().equals(alaisName)
|
|
|
+ && !SystemObject.config.getHeavyStoreItemAlias().equals(alaisName)) {
|
|
|
+ cabinetType = -1;
|
|
|
+ }
|
|
|
int num = tbItem.getNum();
|
|
|
String typeId = tbItem.getTypeId();
|
|
|
TbItemType tbItemType = tbItemTypeService.getById(typeId);
|
|
|
- BigDecimal itemTotalPrice = tbItem.getPrice().multiply(new BigDecimal(num));
|
|
|
- item.setNo(no + "0" + index).setPayTypeName(db.getPayTypeName()).setPayType(db.getPayType())
|
|
|
+ BigDecimal itemTotalPrice = db.getPrice().multiply(new BigDecimal(num));
|
|
|
+ item.setNo(no + "0" + index).setPayTypeName(db.getPayTypeName())
|
|
|
+ .setPayType(db.getPayType())
|
|
|
.setBusinessType(db.getBusinessType()).setTaxRate(NumberUtil.div(db.getTaxRate().doubleValue(), 100D, 2));
|
|
|
- item.setItemCode(db.getItemCode()).setNum(num + "").setItemId(db.getId()).setCabinetNo(tbItem.getCabinetNo())
|
|
|
+ item.setItemCode(db.getItemCode()).setNum(num + "")
|
|
|
+ .setItemId(db.getId()).setCabinetType(cabinetType)
|
|
|
+ .setCabinetNo(tbItem.getCabinetNo()).setColdStartTime(tbItem.getColdStartTime())
|
|
|
.setItemName(db.getItemName()).setItemPrice(db.getPrice()).setRemark(tbItem.getRemark())
|
|
|
- .setItemTypeId(typeId).setItemTypeName(tbItemType.getName())
|
|
|
- .setUnit(db.getUnit()).setTotal(itemTotalPrice).setCreateTime(now);
|
|
|
+ .setItemTypeId(typeId).setItemTypeName(tbItemType.getName()).setItemAlias(tbItem.getItemAlias())
|
|
|
+ .setUnit(db.getUnit()).setTotal(itemTotalPrice).setCreateTime(now)
|
|
|
+ .setColdStartTime(tbItem.getColdStartTime());
|
|
|
if (partner != null) {
|
|
|
item.setPick(1).setPickCustomerId(pickCustomerId).setPickCustomerName(partner.getName())
|
|
|
.setPickBy(StpUserUtil.getCreateBy()).setPickTime(now);
|
|
@@ -674,6 +698,57 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
if (SystemObject.config.getEveryCarPay().contains(itemName)) {
|
|
|
itemTotalPrice = itemTotalPrice.multiply(BigDecimal.valueOf(size));
|
|
|
}
|
|
|
+ //堆存业务
|
|
|
+ if (SystemObject.config.getEmptyStoreItemAlias().equals(alaisName)
|
|
|
+ || SystemObject.config.getHeavyStoreItemAlias().equals(alaisName)) {
|
|
|
+ //取柜--->根据柜号查询上一个存柜时间
|
|
|
+ TbBusinessItem tbBusinessItem = tbBusinessItemService.findTheLastRecordByCabinetNo(tbItem.getCabinetNo());
|
|
|
+ //堆存---》取柜
|
|
|
+ if (cabinetType == 1) {
|
|
|
+ if (tbBusinessItem == null) {
|
|
|
+ throw new AjaxError("根据柜号" + tbItem.getCabinetNo() + "找不到堆存记录");
|
|
|
+ }
|
|
|
+ //已经取走
|
|
|
+ if (tbBusinessItem.getCabinetStatus() == 1) {
|
|
|
+ throw new AjaxError("柜号" + tbItem.getCabinetNo() + "已取走");
|
|
|
+ }
|
|
|
+ Date endTime = tbItem.getColdStartTime();
|
|
|
+ if (endTime == null) {
|
|
|
+ throw new AjaxError("请输入取柜时间");
|
|
|
+ }
|
|
|
+ item.setColdStartTime(tbBusinessItem.getColdStartTime())
|
|
|
+ .setParentCabinetId(tbBusinessItem.getId())
|
|
|
+ .setColdEndTime(endTime)
|
|
|
+ .setCabinetStatus(1);
|
|
|
+ tbBusinessItem.setColdEndTime(endTime)
|
|
|
+ .setCabinetStatus(1);
|
|
|
+ tbBusinessItemService.updateById(tbBusinessItem);
|
|
|
+ } else {
|
|
|
+ //存柜
|
|
|
+ if (tbBusinessItem != null && tbBusinessItem.getCabinetStatus() == 0) {
|
|
|
+ throw new AjaxError("柜号" + tbItem.getCabinetNo() + "已存柜未取柜");
|
|
|
+ }
|
|
|
+ Date endTime = tbItem.getColdStartTime();
|
|
|
+ if (endTime == null) {
|
|
|
+ throw new AjaxError("请输入存柜时间");
|
|
|
+ }
|
|
|
+ //业务费xxx都为0;
|
|
|
+ BigDecimal zero = BigDecimal.ZERO;
|
|
|
+ item.setColdStartTime(endTime).setItemPrice(zero)
|
|
|
+ .setTotal(zero).setPayStatus(1).setPayTime(now);
|
|
|
+ //无需支付
|
|
|
+ item.setPayStatus(3);
|
|
|
+ itemTotalPrice = zero;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Date startTime = item.getColdStartTime();
|
|
|
+ Date endTime = item.getColdEndTime();
|
|
|
+ if (startTime != null && endTime != null) {
|
|
|
+ List<IOrderItem> expenses = new ArrayList<>();
|
|
|
+ tbBusinessItemService.buildExpenses(Collections.singletonList(item), expenses);
|
|
|
+ IOrderPriceRes res = syncService.orderPriceCal(expenses);
|
|
|
+ item.setTotal(res.getTotalOrderPrice());
|
|
|
+ }
|
|
|
price = price.add(itemTotalPrice);
|
|
|
itemList.add(item);
|
|
|
index++;
|
|
@@ -693,9 +768,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
for (TbBusinessCar car : cars) {
|
|
|
String carNo = car.getCarNo().trim().toUpperCase();
|
|
|
String carType = car.getCarType();
|
|
|
- if (car.getCarSize() == null || car.getCarSize() <= 0) {
|
|
|
- throw new AjaxError(carNo + "规格不正确");
|
|
|
- }
|
|
|
if (StrUtil.isEmpty(carType)) {
|
|
|
throw new BusinessException(carNo + "类型不能为空");
|
|
|
}
|
|
@@ -732,6 +804,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
db.setCarNo(carNo).setIsLock(0).setBusinessType(CarEnum.BusinessTypeEnum.BUSINESS_CAR.getType());
|
|
|
db.setCarSize(car.getCarSize()).setConfirmJudge(CarEnum.ConfirmJudgeEnum.NO_JUDGE.getCode())//业务车都是未审核状态
|
|
|
.setTimeUpdate(now).setCarType(car.getCarType())
|
|
|
+ .setDriverName(car.getDriverName()).setDriverPhone(car.getDriverPhone())
|
|
|
.setNetWeight(car.getNetWeight()).setColor(car.getColor())
|
|
|
.setCustomerId(customerId)
|
|
|
.setNo(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmm")) + RandomUtil.randomNumbers(4));
|
|
@@ -788,6 +861,13 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
String carBuseinssNo = DateUtil.format(now, "yyyyMMddHHmm");
|
|
|
List<TbBusinessItem> itemList = new ArrayList<>();
|
|
|
if (PayEnum.PayStatusEnum.HAS_PAY_CONFIRM.getCode() != dbBusiness.getPayStatus()) {
|
|
|
+ List<TbBusinessItem> businessItemList = tbBusinessItemService.findByBusinessId(id);
|
|
|
+ //变成未取柜状态
|
|
|
+ businessItemList.stream().filter(item -> item.getParentCabinetId() != null).forEach(item -> {
|
|
|
+ TbBusinessItem tbBusinessItem = tbBusinessItemService.getById(item.getParentCabinetId());
|
|
|
+ tbBusinessItem.setCabinetStatus(0).setColdEndTime(null);
|
|
|
+ tbBusinessItemService.updateById(tbBusinessItem);
|
|
|
+ });
|
|
|
tbBusinessItemService.removeByBusinessId(id);
|
|
|
BigDecimal price = new BigDecimal("0");
|
|
|
String no = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmm")) + RandomUtil.randomNumbers(4);
|
|
@@ -801,19 +881,26 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
int size = cars.size();
|
|
|
for (TbItem tbItem : tbItems) {
|
|
|
TbItem db = tbItemService.getById(tbItem.getId());
|
|
|
+ String alaisName = db.getItemAlias();
|
|
|
+ int cabinetType = tbItem.getCabinetType();
|
|
|
+ if (!SystemObject.config.getEmptyStoreItemAlias().equals(alaisName)
|
|
|
+ && !SystemObject.config.getHeavyStoreItemAlias().equals(alaisName)) {
|
|
|
+ cabinetType = -1;
|
|
|
+ }
|
|
|
String itemName = db.getItemName();
|
|
|
TbBusinessItem item = new TbBusinessItem();
|
|
|
int num = tbItem.getNum();
|
|
|
TbItemType tbItemType = tbItemTypeService.getById(tbItem.getTypeId());
|
|
|
- BigDecimal itemTotalPrice = tbItem.getPrice().multiply(new BigDecimal(num));
|
|
|
-
|
|
|
+ BigDecimal itemTotalPrice = db.getPrice().multiply(new BigDecimal(num));
|
|
|
item.setNo(no + "0" + index).setPayTypeName(db.getPayTypeName()).setPayType(db.getPayType())
|
|
|
.setBusinessType(db.getBusinessType()).setTaxRate(NumberUtil.div(db.getTaxRate().doubleValue(), 100D, 2));
|
|
|
item.setItemCode(db.getItemCode()).setNum(num + "").setItemId(db.getId()).setBusinessId(dbBusiness.getId())
|
|
|
.setItemName(db.getItemName()).setItemPrice(db.getPrice()).setRemark(tbItem.getRemark())
|
|
|
.setItemTypeId(tbItem.getTypeId()).setItemTypeName(tbItemType.getName())
|
|
|
- .setCabinetNo(tbItem.getCabinetNo())
|
|
|
- .setUnit(db.getUnit()).setTotal(itemTotalPrice).setCreateTime(now);
|
|
|
+ .setCabinetNo(tbItem.getCabinetNo()).setItemAlias(tbItem.getItemAlias())
|
|
|
+ .setUnit(db.getUnit()).setTotal(itemTotalPrice).setCreateTime(now)
|
|
|
+ .setCabinetType(cabinetType)
|
|
|
+ .setColdStartTime(tbItem.getColdStartTime()).setColdEndTime(tbItem.getColdEndTime());
|
|
|
if (partner != null) {
|
|
|
item.setPick(1).setPickCustomerId(pickCustomerId).setPickCustomerName(partner.getName())
|
|
|
.setPickBy(StpUserUtil.getCreateBy()).setPickTime(now);
|
|
@@ -821,6 +908,52 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
if (SystemObject.config.getEveryCarPay().contains(itemName)) {
|
|
|
itemTotalPrice = itemTotalPrice.multiply(BigDecimal.valueOf(size));
|
|
|
}
|
|
|
+
|
|
|
+ Date startTime = item.getColdStartTime();
|
|
|
+ Date endTime = item.getColdEndTime();
|
|
|
+ if (startTime != null && endTime != null) {
|
|
|
+ List<IOrderItem> expenses = new ArrayList<>();
|
|
|
+ tbBusinessItemService.buildExpenses(Collections.singletonList(item), expenses);
|
|
|
+ if (!expenses.isEmpty()){
|
|
|
+ IOrderPriceRes res = syncService.orderPriceCal(expenses);
|
|
|
+ item.setTotal(res.getTotalOrderPrice());
|
|
|
+ itemTotalPrice = res.getTotalOrderPrice();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //堆存业务
|
|
|
+ if (SystemObject.config.getEmptyStoreItemAlias().equals(alaisName)
|
|
|
+ || SystemObject.config.getHeavyStoreItemAlias().equals(alaisName)) {
|
|
|
+ //取柜--->根据柜号查询上一个存柜时间
|
|
|
+ TbBusinessItem tbBusinessItem = tbBusinessItemService.findTheLastRecordByCabinetNo(tbItem.getCabinetNo());
|
|
|
+ //堆存
|
|
|
+ if (cabinetType == 1) {
|
|
|
+ if (tbBusinessItem == null) {
|
|
|
+ throw new AjaxError("根据柜号" + tbItem.getCabinetNo() + "找不到堆存记录");
|
|
|
+ }
|
|
|
+ if (endTime == null) {
|
|
|
+ throw new AjaxError("请输入取柜时间");
|
|
|
+ }
|
|
|
+ item.setColdStartTime(tbBusinessItem.getColdStartTime())
|
|
|
+ .setParentCabinetId(tbBusinessItem.getId())
|
|
|
+ .setColdEndTime(endTime);
|
|
|
+ tbBusinessItem.setColdEndTime(endTime)
|
|
|
+ .setCabinetStatus(1);
|
|
|
+ tbBusinessItemService.updateById(tbBusinessItem);
|
|
|
+ } else {
|
|
|
+ if (startTime == null) {
|
|
|
+ throw new AjaxError("请输入存柜时间");
|
|
|
+ }
|
|
|
+ //业务费xxx都为0;
|
|
|
+ BigDecimal zero = BigDecimal.ZERO;
|
|
|
+ item.setColdStartTime(endTime).setItemPrice(zero)
|
|
|
+ .setTotal(zero).setPayStatus(1).setPayTime(now);
|
|
|
+ itemTotalPrice = zero;
|
|
|
+ item.setColdStartTime(startTime);
|
|
|
+ //无需支付
|
|
|
+ item.setPayStatus(3);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
price = price.add(itemTotalPrice);
|
|
|
itemList.add(item);
|
|
|
index++;
|
|
@@ -1506,6 +1639,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
|
|
|
/**
|
|
|
* 审核通过
|
|
|
+ *
|
|
|
* @param id
|
|
|
*/
|
|
|
public void confirmJudgePass(String id) {
|
|
@@ -1540,20 +1674,26 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
item.setPayTime(now).setPayStatus(1).setPayType(PayEnum.PayType.PER_PAY.getCode())
|
|
|
.setPayTypeName(PayEnum.PayType.PER_PAY.getDesc());
|
|
|
tbBusinessItemService.updateById(item);
|
|
|
- tbBusiness.setPayMoney(price.add(tbBusiness.getPayMoney()));
|
|
|
+ tbBusiness.setPayMoney(price.add(tbBusiness.getPayMoney())).setPayTime(now);
|
|
|
BigDecimal afterBalance = balance.subtract(price);
|
|
|
tbAccount.setTotalMoney(afterBalance);//增加累计扣款
|
|
|
tbAccountService.updateById(tbAccount);
|
|
|
TbFeeDetails details = tbFeeDetailsService.savePrePayDetails(res, item, tbBusinessCar, tbBusiness, FeeTypeEnum.STEVEDORE_FEE);
|
|
|
tbFeeStatisticsService.addOrUpdateStatistic(now, PayEnum.PayType.PER_PAY.getCode());//更新当前日期的日统计
|
|
|
- TbDeductionRecord record= automaticPay.createTbDeductionRecord(details, balance, afterBalance, tbBusiness.getPickCustomerId(), tbBusiness.getPickCustomerName(), tbBusinessCar.getCarNo(), tbBusinessCar.getId(), FeeTypeEnum.STEVEDORE_FEE);
|
|
|
- addInvoiceOrder(tbBusiness, res.getTotalOrderPrice(),details,record);
|
|
|
+ TbDeductionRecord record = automaticPay.createTbDeductionRecord(details, balance, afterBalance, tbBusiness.getPickCustomerId(), tbBusiness.getPickCustomerName(), tbBusinessCar.getCarNo(), tbBusinessCar.getId(), FeeTypeEnum.STEVEDORE_FEE);
|
|
|
+ addInvoiceOrder(tbBusiness, res.getTotalOrderPrice(), details, record);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
//其他费项 装卸业务管理费” 进行预存款扣除
|
|
|
for (TbBusinessItem item : tbBusinessItems) {
|
|
|
+ String aliasName = item.getItemAlias();
|
|
|
+ if (StrUtil.equals(aliasName, SystemObject.config.getColdItemAlias())) {
|
|
|
+ if (item.getColdStartTime() == null || item.getColdEndTime() == null) {
|
|
|
+ throw new AjaxError("请先录入打冷开始/结束时间");
|
|
|
+ }
|
|
|
+ }
|
|
|
//业务类型是装卸业务管理费且未支付的进行扣款
|
|
|
if (item.getPayStatus() == 0 && SystemObject.config.getUnLoadItem().contains(item.getItemTypeName())) {
|
|
|
List<IOrderItem> expenses = new ArrayList<>();
|
|
@@ -1573,29 +1713,35 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
item.setPayTime(now).setPayStatus(1).setPayType(PayEnum.PayType.PER_PAY.getCode())
|
|
|
.setPayTypeName(PayEnum.PayType.PER_PAY.getDesc());
|
|
|
tbBusinessItemService.updateById(item);
|
|
|
- tbBusiness.setPayMoney(price.add(tbBusiness.getPayMoney()));
|
|
|
- //查找越南车--->统计以
|
|
|
- TbBusinessCar tbBusinessCar = tbBusinessCars.stream().filter(car -> !CAR_LIST.contains(car.getCarNo().substring(0, 1)))
|
|
|
+ tbBusiness.setPayMoney(price.add(tbBusiness.getPayMoney())).setPayTime(now);
|
|
|
+ //查找越南车--->统计以--->重车对集装箱吊装 (重 柜 ) =====空车 vs 集装箱吊装 (空 柜 )
|
|
|
+ String itemAlias = item.getItemAlias();
|
|
|
+ TbBusinessCar tbBusinessCar = tbBusinessCars.stream().filter(car -> car.getCarType().equals(CarEnum.CarTypeEnum.EMPTY_TYPE.getType()))
|
|
|
.findAny().orElse(tbBusinessCars.get(0));
|
|
|
+ if (StrUtil.equals(itemAlias, SystemObject.config.getHeavyCondoleItemAlias())) {
|
|
|
+ tbBusinessCar = tbBusinessCars.stream().filter(car -> car.getCarType().equals(CarEnum.CarTypeEnum.WEIGHT_TYPE.getType()))
|
|
|
+ .findAny().orElse(tbBusinessCars.get(0));
|
|
|
+ }
|
|
|
TbFeeDetails details = tbFeeDetailsService.savePrePayDetails(res, item, tbBusinessCar, tbBusiness, FeeTypeEnum.STEVEDORE_FEE);
|
|
|
tbFeeStatisticsService.addOrUpdateStatistic(now, PayEnum.PayType.PER_PAY.getCode());//更新当前日期的日统计
|
|
|
- TbDeductionRecord record= automaticPay.createTbDeductionRecord(details, balance, afterBalance, tbBusiness.getPickCustomerId(), tbBusiness.getPickCustomerName(), tbBusinessCar.getCarNo(), tbBusinessCar.getId(), FeeTypeEnum.STEVEDORE_FEE);
|
|
|
- addInvoiceOrder(tbBusiness, res.getTotalOrderPrice(),details,record);
|
|
|
+ TbDeductionRecord record = automaticPay.createTbDeductionRecord(details, balance, afterBalance, tbBusiness.getPickCustomerId(), tbBusiness.getPickCustomerName(), tbBusinessCar.getCarNo(), tbBusinessCar.getId(), FeeTypeEnum.STEVEDORE_FEE);
|
|
|
+ addInvoiceOrder(tbBusiness, res.getTotalOrderPrice(), details, record);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
tbBusiness.setConfirmJudgeTime(now).setConfirmJudgeContent("审核通过")
|
|
|
.setConfirmJudge(CarEnum.ConfirmJudgeEnum.JUDGE_PASS.getCode())
|
|
|
- .setJudgeBy(StpUserUtil.getCreateBy()).setPayTime(now);
|
|
|
+ .setJudgeBy(StpUserUtil.getCreateBy());
|
|
|
this.updateById(tbBusiness);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 添加开票订单
|
|
|
+ *
|
|
|
* @param tbBusiness
|
|
|
* @param billMoney
|
|
|
*/
|
|
|
- private void addInvoiceOrder(TbBusiness tbBusiness, BigDecimal billMoney,TbFeeDetails details,TbDeductionRecord record) {
|
|
|
+ private void addInvoiceOrder(TbBusiness tbBusiness, BigDecimal billMoney, TbFeeDetails details, TbDeductionRecord record) {
|
|
|
TbInvoiceOrder t = new TbInvoiceOrder();
|
|
|
t.setBusinessName(tbBusiness.getGoodsName())
|
|
|
.setBusinessNo(tbBusiness.getNo())
|
|
@@ -1611,6 +1757,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
|
|
|
/**
|
|
|
* 审核驳回
|
|
|
+ *
|
|
|
* @param id
|
|
|
* @param judgeContent
|
|
|
*/
|