车辆修改
This commit is contained in:
parent
c026b575e4
commit
e9fc537c1f
@ -11,7 +11,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.async.AsyncHikvision;
|
||||
import com.zhgd.xmgl.async.AsyncWorker;
|
||||
import com.zhgd.xmgl.constant.Cts;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.impl.SystemUserServiceImpl;
|
||||
import com.zhgd.xmgl.modules.car.entity.*;
|
||||
import com.zhgd.xmgl.modules.car.entity.vo.CountCarModuleTypeVo;
|
||||
@ -21,7 +20,6 @@ import com.zhgd.xmgl.modules.project.entity.Project;
|
||||
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
|
||||
import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper;
|
||||
import com.zhgd.xmgl.modules.worker.service.impl.EnterpriseInfoServiceImpl;
|
||||
import com.zhgd.xmgl.util.MapBuilder;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -143,7 +141,7 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
|
||||
expiredCar.setReserveStartTime(flow.getReserveStartTime());
|
||||
this.editCarInfo(expiredCar);
|
||||
} else {
|
||||
this.delete(new MapBuilder<String, Object>().put(Cts.ID, expiredCar.getId()).build());
|
||||
deleteCar(expiredCar);
|
||||
}
|
||||
}
|
||||
|
||||
@ -238,9 +236,7 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
|
||||
throw new OpenAlertException(MessageUtil.get("notFindErr"));
|
||||
}
|
||||
if (Objects.equals(carInfo.getCarModuleType(), 1)) {
|
||||
carInfoMapper.deleteById(id);
|
||||
//同步海康
|
||||
asyncHikvision.deleteCarInfoForHikvision(carInfo);
|
||||
deleteCar(carInfo);
|
||||
} else {
|
||||
deleteFromApprovalFlowIf(carInfo);
|
||||
Project project = projectMapper.selectOne(new LambdaQueryWrapper<Project>().eq(Project::getSyncHikvision, 1));
|
||||
@ -248,6 +244,12 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
|
||||
}
|
||||
}
|
||||
|
||||
private void deleteCar(CarInfo carInfo) {
|
||||
carInfoMapper.deleteById(carInfo.getId());
|
||||
//同步海康
|
||||
asyncHikvision.deleteCarInfoForHikvision(carInfo);
|
||||
}
|
||||
|
||||
private void deleteFromApprovalFlowIf(CarInfo carInfo) {
|
||||
if (!Objects.equals(carInfo.getCarModuleType(), 1)) {
|
||||
carInfoApprovalFlowMapper.delete(new LambdaQueryWrapper<CarInfoApprovalFlow>()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user