|
@@ -142,14 +142,12 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
this.saveOrUpdate(t);
|
|
|
tbBusinessItemService.saveBatch(items);
|
|
|
|
|
|
- //增加或更新一条放行记录
|
|
|
- TbPassRecord record = tbPassRecordService.getByBusinessId(t.getId());
|
|
|
- if(record == null)
|
|
|
- record = new TbPassRecord();
|
|
|
- record.setBusinessId(t.getId()).setCustomerId(t.getCustomerId())
|
|
|
- .setCardNo(t.getCardNo()).setCustomerName(t.getCustomerName())
|
|
|
- .setStatus(1).setUpdateTime(new Date());
|
|
|
- tbPassRecordService.saveOrUpdate(record);
|
|
|
+ //增加或修改一条境外车未入场记录
|
|
|
+ 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();
|
|
|
}
|
|
@@ -255,10 +253,12 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
tbBusiness.setRealInTime(new Date()).setInChannel(inChannel);
|
|
|
this.updateById(tbBusiness);
|
|
|
|
|
|
- //更新放行记录
|
|
|
- TbPassRecord record = tbPassRecordService.getByBusinessId(tbBusiness.getId());
|
|
|
- record.setStatus(2).setInTime(tbBusiness.getRealInTime()).setUpdateTime(new Date());
|
|
|
- tbPassRecordService.saveOrUpdate(record);
|
|
|
+ //更新境外车入场记录
|
|
|
+ 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, "中国车");
|
|
|
}
|
|
|
|
|
|
public void adminOut(String id, Date outDayTime, String outChannel,String carType) {
|
|
@@ -267,10 +267,14 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
calculationPartMoney(carType,tbBusiness);
|
|
|
this.updateById(tbBusiness);
|
|
|
|
|
|
- //更新放行记录
|
|
|
- TbPassRecord record = tbPassRecordService.getByBusinessId(tbBusiness.getId());
|
|
|
- record.setStatus(3).setOutTime(tbBusiness.getOutDayTime()).setUpdateTime(new Date());
|
|
|
- tbPassRecordService.saveOrUpdate(record);
|
|
|
+ //更新境外车出场记录
|
|
|
+ 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(), "中国车");
|
|
|
|
|
|
}
|
|
|
|