|
@@ -796,6 +796,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
}
|
|
|
//最新一条记录
|
|
|
TbBusinessCar db = tbBusinessCarService.findTheLastRecord(carNo);
|
|
|
+ if (db!=null&&db.getConfirmJudge()==TbBusinessCar.ConfirmJudgeEnum.JUDGE_PASS.getCode()){
|
|
|
+ throw new BusinessException("车辆【"+carNo+"】已审核,请驳回再录入业务");
|
|
|
+ }
|
|
|
if (!tbGoods.getName().contains("整车")){
|
|
|
//记录不存在或者已离场
|
|
|
if (db==null||db.getRealOutTime()!=null){
|
|
@@ -914,6 +917,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
if (StrUtil.isNotEmpty(businessCarId)) {
|
|
|
//原来已存在的
|
|
|
TbBusinessCar dbBusinessCar = tbBusinessCarService.getById(businessCarId);
|
|
|
+ if (dbBusinessCar.getConfirmJudge()==TbBusinessCar.ConfirmJudgeEnum.JUDGE_PASS.getCode()){
|
|
|
+ throw new BusinessException("车辆【"+carNo+"】已审核,请驳回再录入业务");
|
|
|
+ }
|
|
|
//如果修改了车牌号
|
|
|
String dbCarNo = dbBusinessCar.getCarNo();
|
|
|
if (!dbCarNo.equals(carNo)) {
|
|
@@ -950,7 +956,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
if (checkCar == null ||
|
|
|
(checkCar.getRealInTime() != null && checkCar.getRealOutTime() != null)) {
|
|
|
checkCar = new TbBusinessCar();
|
|
|
- checkCar.setCreateTime(now).setPay(0).setNo(carBuseinssNo + RandomUtil.randomNumbers(4));
|
|
|
+ checkCar.setCreateTime(now).setPay(0).setBusinessType(1)
|
|
|
+ .setConfirmJudge(TbBusinessCar.ConfirmJudgeEnum.NO_JUDGE.getCode())
|
|
|
+ .setNo(carBuseinssNo + RandomUtil.randomNumbers(4));
|
|
|
}
|
|
|
checkCar.setCarNo(carNo).setCarType(tbBusinessCar.getCarType()).setCarSize(tbBusinessCar.getCarSize())
|
|
|
.setNetWeight(tbBusinessCar.getNetWeight()).setCustomerId(dbBusiness.getCustomerId())
|