|
@@ -98,8 +98,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
private CarConfig carConfig;
|
|
|
|
|
|
@Resource
|
|
|
- private TbPassRecordService tbPassRecordService;
|
|
|
- @Resource
|
|
|
private TbNoticesService tbNoticesService;
|
|
|
@Resource
|
|
|
TbBusinessCarService tbBusinessCarService;
|
|
@@ -171,13 +169,14 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
}
|
|
|
tbBusinessCar.setBusinessId(t.getId());
|
|
|
tbBusinessCar.setCarNo(carNo);
|
|
|
+ tbBusinessCar.setBusinessId(t.getId()).setCustomerId(t.getCustomerId());
|
|
|
});
|
|
|
String yueCarNo = t.getCardNo().toUpperCase();
|
|
|
TbBusinessCar yueCar = tbBusinessCarService.findInAndNoBusinessCar(yueCarNo);
|
|
|
if (yueCar == null) {
|
|
|
yueCar = new TbBusinessCar();
|
|
|
}
|
|
|
- yueCar.setBusinessId(t.getId()).setCarSize(t.getCardSize()).setCarNo(yueCarNo);
|
|
|
+ yueCar.setBusinessId(t.getId()).setCarSize(t.getCardSize()).setCarNo(yueCarNo).setCustomerId(t.getCustomerId());
|
|
|
carList.add(yueCar);
|
|
|
tbBusinessCarService.saveOrUpdateBatch(carList);
|
|
|
BigDecimal initCarPartMoney = partConfig.getBasePrice();
|
|
@@ -188,12 +187,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
this.saveOrUpdate(t);
|
|
|
tbBusinessItemService.saveBatch(items);
|
|
|
|
|
|
- //增加或修改一条境外车未入场记录
|
|
|
- tbPassRecordService.addOrUpdate(t.getId(), t.getCustomerId(), t.getCustomerName(),
|
|
|
- t.getCardNo(), 1, null, null, t.getCountryName());
|
|
|
- //增加或修改一条中国车未入场记录
|
|
|
- tbPassRecordService.addOrUpdate(t.getId(), t.getCustomerId(), t.getCustomerName(),
|
|
|
- t.getChinaCarNo(), 1, null, null, "中国车");
|
|
|
|
|
|
return AjaxJson.getSuccess();
|
|
|
}
|
|
@@ -319,11 +312,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
this.updateById(tbBusiness);
|
|
|
|
|
|
//更新境外车入场记录
|
|
|
- tbPassRecordService.addOrUpdate(tbBusiness.getId(), tbBusiness.getCustomerId(), tbBusiness.getCustomerName(),
|
|
|
- tbBusiness.getCardNo(), 2, tbBusiness.getRealInTime(), null, tbBusiness.getCountryName());
|
|
|
+
|
|
|
//更新中国车入场记录
|
|
|
- tbPassRecordService.addOrUpdate(tbBusiness.getId(), tbBusiness.getCustomerId(), tbBusiness.getCustomerName(),
|
|
|
- tbBusiness.getChinaCarNo(), 2, tbBusiness.getChinaCarInTime(), null, "中国车");
|
|
|
+
|
|
|
//发送消息
|
|
|
String text = "您的车辆已入场,业务单号[" + tbBusiness.getNo() + "]";
|
|
|
tbNoticesService.sendNotice(tbBusiness.getId(), tbBusiness.getNo(), tbBusiness.getCustomerId(), text);
|
|
@@ -337,13 +328,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
this.updateById(tbBusiness);
|
|
|
|
|
|
//更新境外车出场记录
|
|
|
- tbPassRecordService.addOrUpdate(tbBusiness.getId(), tbBusiness.getCustomerId(), tbBusiness.getCustomerName(),
|
|
|
- tbBusiness.getCardNo(), 3,
|
|
|
- tbBusiness.getRealInTime(), tbBusiness.getOutDayTime(), tbBusiness.getCountryName());
|
|
|
+
|
|
|
//更新中国车出场记录
|
|
|
- tbPassRecordService.addOrUpdate(tbBusiness.getId(), tbBusiness.getCustomerId(), tbBusiness.getCustomerName(),
|
|
|
- tbBusiness.getChinaCarNo(), 3,
|
|
|
- tbBusiness.getChinaCarInTime(), tbBusiness.getChinaCarOutTime(), "中国车");
|
|
|
+
|
|
|
//发送消息
|
|
|
String text = "您的车辆已离场,业务单号[" + tbBusiness.getNo() + "]";
|
|
|
tbNoticesService.sendNotice(tbBusiness.getId(), tbBusiness.getNo(), tbBusiness.getCustomerId(), text);
|