|  | @@ -704,7 +704,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
 | 
											
												
													
														|  |                  .setOperator(otherBusinessBO.getOperator()).setOperateTime(otherBusinessBO.getOperateTime())
 |  |                  .setOperator(otherBusinessBO.getOperator()).setOperateTime(otherBusinessBO.getOperateTime())
 | 
											
												
													
														|  |                  .setNo(no).setGoodsName(tbGoods.getName()).setGoodsId(otherBusinessBO.getGoodsId())
 |  |                  .setNo(no).setGoodsName(tbGoods.getName()).setGoodsId(otherBusinessBO.getGoodsId())
 | 
											
												
													
														|  |                  .setPayStep(tbGoods.getPayStep()).setDeclareNo(declareNo).setCardNo(otherBusinessBO.getCardNo());
 |  |                  .setPayStep(tbGoods.getPayStep()).setDeclareNo(declareNo).setCardNo(otherBusinessBO.getCardNo());
 | 
											
												
													
														|  | -        tbBusiness.setCreateTime(now).setBusinessType(TbBusiness.BusinessType.CAR_DISINCLE.getCode())
 |  | 
 | 
											
												
													
														|  | 
 |  | +        tbBusiness.setCreateTime(now).setCreateByCustomerId(StpUserUtil.getCustomerId())
 | 
											
												
													
														|  |                  .setItemPrice(price).setTotalMoney(price).setOwner(otherBusinessBO.getOwner());
 |  |                  .setItemPrice(price).setTotalMoney(price).setOwner(otherBusinessBO.getOwner());
 | 
											
												
													
														|  |          tbBusiness.setChinaCarNo(otherBusinessBO.getChinaCarNo());
 |  |          tbBusiness.setChinaCarNo(otherBusinessBO.getChinaCarNo());
 | 
											
												
													
														|  |          this.save(tbBusiness);
 |  |          this.save(tbBusiness);
 | 
											
										
											
												
													
														|  | @@ -728,6 +728,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
 | 
											
												
													
														|  |              for (TbBusinessItem item : itemList) {
 |  |              for (TbBusinessItem item : itemList) {
 | 
											
												
													
														|  |                  checkOtherBusiness(item.getItemTypeId(), otherBusinessBO.getOperateTime(), tbBusiness.getId(), carNo);
 |  |                  checkOtherBusiness(item.getItemTypeId(), otherBusinessBO.getOperateTime(), tbBusiness.getId(), carNo);
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  | 
 |  | +            db.setPayType(TbBusinessCar.PayTypeEnum.NO_PAY_TYPE.getType());
 | 
											
												
													
														|  |              if ((CAR_LIST.contains(carPrefix) && chinaCarPay == 0) || (!CAR_LIST.contains(carPrefix) && vietnamCarPay == 0)) {
 |  |              if ((CAR_LIST.contains(carPrefix) && chinaCarPay == 0) || (!CAR_LIST.contains(carPrefix) && vietnamCarPay == 0)) {
 | 
											
												
													
														|  |                  db.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
 |  |                  db.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
										
											
												
													
														|  | @@ -827,7 +828,8 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
 | 
											
												
													
														|  |                  //原来已存在的
 |  |                  //原来已存在的
 | 
											
												
													
														|  |                  TbBusinessCar dbBusinessCar = tbBusinessCarService.getById(businessCarId);
 |  |                  TbBusinessCar dbBusinessCar = tbBusinessCarService.getById(businessCarId);
 | 
											
												
													
														|  |                  //如果修改了车牌号
 |  |                  //如果修改了车牌号
 | 
											
												
													
														|  | -                if (!StrUtil.equals(carNo, dbBusiness.getCardNo())) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +                String dbCarNo=dbBusinessCar.getCarNo();
 | 
											
												
													
														|  | 
 |  | +                if (!dbCarNo.equals(carNo)) {
 | 
											
												
													
														|  |                      //把关联删除掉,然后添加新的关联
 |  |                      //把关联删除掉,然后添加新的关联
 | 
											
												
													
														|  |                      relationBusinessCarService.removeByBusinessIdAndCarId(dbBusiness.getId(),businessCarId);
 |  |                      relationBusinessCarService.removeByBusinessIdAndCarId(dbBusiness.getId(),businessCarId);
 | 
											
												
													
														|  |                      TbBusinessCar otherCar = tbBusinessCarService.findTheLastRecord(carNo);
 |  |                      TbBusinessCar otherCar = tbBusinessCarService.findTheLastRecord(carNo);
 | 
											
										
											
												
													
														|  | @@ -837,7 +839,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
 | 
											
												
													
														|  |                          otherCar.setCreateTime(now).setPay(0).setNo(carBuseinssNo + RandomUtil.randomNumbers(4))
 |  |                          otherCar.setCreateTime(now).setPay(0).setNo(carBuseinssNo + RandomUtil.randomNumbers(4))
 | 
											
												
													
														|  |                                  .setCarNo(carNo).setCarType(tbBusinessCar.getCarType()).setCarSize(tbBusinessCar.getCarSize())
 |  |                                  .setCarNo(carNo).setCarType(tbBusinessCar.getCarType()).setCarSize(tbBusinessCar.getCarSize())
 | 
											
												
													
														|  |                                  .setNetWeight(tbBusinessCar.getNetWeight()).setCustomerId(dbBusiness.getCustomerId())
 |  |                                  .setNetWeight(tbBusinessCar.getNetWeight()).setCustomerId(dbBusiness.getCustomerId())
 | 
											
												
													
														|  | -                                .setTimeUpdate(now).setIsLock(0);
 |  | 
 | 
											
												
													
														|  | 
 |  | +                                .setTimeUpdate(now).setIsLock(0).setCarType(tbBusinessCar.getCarType());
 | 
											
												
													
														|  |                          if ((CAR_LIST.contains(carPrefix) && chinaCarPay == 0) || (!CAR_LIST.contains(carPrefix) && vietnamCarPay == 0)) {
 |  |                          if ((CAR_LIST.contains(carPrefix) && chinaCarPay == 0) || (!CAR_LIST.contains(carPrefix) && vietnamCarPay == 0)) {
 | 
											
												
													
														|  |                              otherCar.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
 |  |                              otherCar.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
 | 
											
												
													
														|  |                          }
 |  |                          }
 | 
											
										
											
												
													
														|  | @@ -852,8 +854,8 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
 | 
											
												
													
														|  |                      relationBusinessCar.setBusinessId(dbBusiness.getId()).setBusinessCarId(otherCar.getId());
 |  |                      relationBusinessCar.setBusinessId(dbBusiness.getId()).setBusinessCarId(otherCar.getId());
 | 
											
												
													
														|  |                      relationBusinessCarService.save(relationBusinessCar);
 |  |                      relationBusinessCarService.save(relationBusinessCar);
 | 
											
												
													
														|  |                  } else {
 |  |                  } else {
 | 
											
												
													
														|  | -                    dbBusinessCar.setNetWeight(tbBusinessCar.getNetWeight()).setCarType(tbBusinessCar.getCarType())
 |  | 
 | 
											
												
													
														|  | -                            .setCarSize(tbBusinessCar.getCarSize());
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    dbBusinessCar.setNetWeight(tbBusinessCar.getNetWeight()).setNetWeight(tbBusinessCar.getNetWeight())
 | 
											
												
													
														|  | 
 |  | +                            .setCarSize(tbBusinessCar.getCarSize()).setCarType(tbBusinessCar.getCarType());
 | 
											
												
													
														|  |                      tbBusinessCarService.updateById(dbBusinessCar);
 |  |                      tbBusinessCarService.updateById(dbBusinessCar);
 | 
											
												
													
														|  |                  }
 |  |                  }
 | 
											
												
													
														|  |              } else {
 |  |              } else {
 | 
											
										
											
												
													
														|  | @@ -865,7 +867,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
 | 
											
												
													
														|  |                  }
 |  |                  }
 | 
											
												
													
														|  |                  checkCar.setCarNo(carNo).setCarType(tbBusinessCar.getCarType()).setCarSize(tbBusinessCar.getCarSize())
 |  |                  checkCar.setCarNo(carNo).setCarType(tbBusinessCar.getCarType()).setCarSize(tbBusinessCar.getCarSize())
 | 
											
												
													
														|  |                          .setNetWeight(tbBusinessCar.getNetWeight()).setCustomerId(dbBusiness.getCustomerId())
 |  |                          .setNetWeight(tbBusinessCar.getNetWeight()).setCustomerId(dbBusiness.getCustomerId())
 | 
											
												
													
														|  | -                        .setTimeUpdate(now).setIsLock(0);
 |  | 
 | 
											
												
													
														|  | 
 |  | +                        .setTimeUpdate(now).setIsLock(0).setCarType(tbBusinessCar.getCarType());
 | 
											
												
													
														|  |                  if ((CAR_LIST.contains(carPrefix) && chinaCarPay == 0) || (!CAR_LIST.contains(carPrefix) && vietnamCarPay == 0)) {
 |  |                  if ((CAR_LIST.contains(carPrefix) && chinaCarPay == 0) || (!CAR_LIST.contains(carPrefix) && vietnamCarPay == 0)) {
 | 
											
												
													
														|  |                      checkCar.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
 |  |                      checkCar.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
 | 
											
												
													
														|  |                  }
 |  |                  }
 |