|
@@ -140,7 +140,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
private final List<String> CAR_LIST = StrUtil.splitTrim("浙,粤,京,津,冀,晋,蒙,辽,黑,沪,吉,苏,皖,赣,鲁,豫,鄂,湘,桂,琼,渝,川,贵,云,藏, 陕, 甘, 青, 宁", ",");
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 增
|
|
|
*/
|
|
@@ -249,7 +248,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
yueCar.setBusinessType(TbBusiness.BusinessType.HOLD_CAR.getCode());
|
|
|
carList.add(yueCar);
|
|
|
tbBusinessCarService.saveOrUpdateBatch(carList);
|
|
|
-// BigDecimal initCarPartMoney = partConfig.getBasePrice();
|
|
|
t.setItemPrice(price)
|
|
|
.setTotalMoney(price);
|
|
|
this.saveOrUpdate(t);
|
|
@@ -417,7 +415,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
@Deprecated
|
|
|
public void adminConfirmIn(String id, String inChannel) {
|
|
|
TbBusiness tbBusiness = this.getById(id);
|
|
@@ -488,10 +485,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
public Map<String, Object> getBusinessMoney(String carId, String state) {
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
TbBusinessCar car = tbBusinessCarService.getById(carId);
|
|
@@ -506,8 +499,8 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
List<TbBusiness> businesses = this.findOtherBusinessByCarId(carId);
|
|
|
businesses = businesses.stream()
|
|
|
.filter(tbBusiness -> tbBusiness.getPayMoney().doubleValue() < tbBusiness.getTotalMoney().doubleValue()
|
|
|
- &&((TbItemType.PayStep.BEFORE_CONFIRM.getCode().equals(tbBusiness.getPayStep())&&tbBusiness.getAdminConfirmInput()>=0)
|
|
|
- ||(TbItemType.PayStep.AFTER_CONFIRM.getCode().equals(tbBusiness.getPayStep())&&tbBusiness.getAdminConfirmInput()==1)
|
|
|
+ && ((TbItemType.PayStep.BEFORE_CONFIRM.getCode().equals(tbBusiness.getPayStep()) && tbBusiness.getAdminConfirmInput() >= 0)
|
|
|
+ || (TbItemType.PayStep.AFTER_CONFIRM.getCode().equals(tbBusiness.getPayStep()) && tbBusiness.getAdminConfirmInput() == 1)
|
|
|
)
|
|
|
)
|
|
|
.collect(Collectors.toList());
|
|
@@ -530,7 +523,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
Date inTime = tbBusinessCar.getRealInTime();
|
|
|
BigDecimal partMoney = new BigDecimal("0");
|
|
|
String carNo = tbBusinessCar.getCarNo().substring(0, 1);
|
|
|
- if (inTime != null) {
|
|
|
+ if (inTime != null&&tbBusinessCar.getRealOutTime()==null) {
|
|
|
if (tbBusinessCar.getPay() == 1 && tbBusinessCar.getPayTime() != null) {
|
|
|
inTime = tbBusinessCar.getPayTime();
|
|
|
}
|
|
@@ -590,7 +583,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
public List<CarDisincle> getCarDisincleList(SoMap soMap) {
|
|
|
return tbBusinessMapper.getCarDisincleList(soMap);
|
|
|
}
|
|
@@ -611,19 +603,22 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
|
|
|
public void deleteOtherBusiness(String id) {
|
|
|
TbBusiness db = super.getById(id);
|
|
|
- List<TbBusiness>businesses=this.findOtherBusinessByCarId(db.getBusinessCarId());
|
|
|
- if (businesses.size()==1){
|
|
|
- tbBusinessCarService.removeById(db.getBusinessCarId());
|
|
|
+ TbBusinessCar tbBusinessCar = tbBusinessCarService.getById(db.getBusinessCarId());
|
|
|
+ if (tbBusinessCar==null||tbBusinessCar.getRealInTime()==null){
|
|
|
+ List<TbBusiness> businesses = this.findOtherBusinessByCarId(db.getBusinessCarId());
|
|
|
+ if (businesses.size() == 1) {
|
|
|
+ tbBusinessCarService.removeById(db.getBusinessCarId());
|
|
|
+ }
|
|
|
}
|
|
|
this.removeById(id);
|
|
|
tbBusinessItemService.removeByBusinessId(id);
|
|
|
}
|
|
|
|
|
|
- public int checkCarBusinessType(String typeId, String carNo, String operateTime,int before) {
|
|
|
- return tbBusinessMapper.checkCarBusinessType(typeId,carNo,operateTime,before);
|
|
|
+ public int checkCarBusinessType(String typeId, String carNo, String operateTime, int before) {
|
|
|
+ return tbBusinessMapper.checkCarBusinessType(typeId, carNo, operateTime, before);
|
|
|
}
|
|
|
|
|
|
public int checkCarBusinessType(String typeId, String carNo, String timeStart, String timeEnd, String businessId) {
|
|
|
- return tbBusinessMapper.checkCarBusinessTypeByTime(typeId,carNo,timeStart,timeEnd,businessId);
|
|
|
+ return tbBusinessMapper.checkCarBusinessTypeByTime(typeId, carNo, timeStart, timeEnd, businessId);
|
|
|
}
|
|
|
}
|