| | |
| | | import com.doumee.core.haikang.model.param.request.ParkReservationDelRequest; |
| | | import com.doumee.core.haikang.model.param.respose.ParkReservationAddResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.service.business.third.WmsService; |
| | | import com.doumee.dao.business.dao.UserActionMapper; |
| | | import com.doumee.service.business.third.model.LoginUserInfo; |
| | | import com.doumee.service.business.third.model.PageData; |
| | | import com.doumee.service.business.third.model.PageWrap; |
| | |
| | | |
| | | @Autowired |
| | | private PlatformJobMapper platformJobMapper; |
| | | @Autowired |
| | | private UserActionMapper userActionMapper; |
| | | @Autowired |
| | | private TmsService tmsService; |
| | | |
| | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class}) |
| | | public void deleteById(Integer id,LoginUserInfo user) { |
| | | Date date = new Date(); |
| | | PlatformJob job = platformJobMapper.selectById(id); |
| | | if(job==null ||Constants.equalsInteger(Constants.ONE,job.getIsdeleted())){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(! Constants.equalsInteger(Constants.PlatformJobStatus.CANCEL.getKey(),job.getStatus())){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,只能删除已取消的作业任务!"); |
| | | } |
| | | platformJobMapper.update(null,new UpdateWrapper<PlatformJob>().lambda() |
| | | .set(PlatformJob::getIsdeleted,Constants.ONE) |
| | | .set(PlatformJob::getEditDate,date) |
| | | .set(PlatformJob::getEditor,user.getId()) |
| | | .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.CANCEL.getKey()) |
| | | .eq(PlatformJob::getId,id)); |
| | | String[] params = new String[3]; |
| | | params[0] = user.getRealname(); |
| | | params[1]=DateUtil.getPlusTime2(date); |
| | | params[2]=job.getBillCode()+"-【司机:"+job.getDriverName()+" "+job.getDrivierPhone()+"】-【车牌号:"+job.getCarCodeFront()+"】"; |
| | | //记录删除日志 |
| | | UserActionServiceImpl.saveUserActionBiz(user,id,Constants.UserActionType.PLATFROM_JOB_DEL,userActionMapper,date,params,JSONObject.toJSONString(job)); |
| | | } |
| | | @Override |
| | | public void delete(Integer id) { |
| | | platformJobMapper.update(null,new UpdateWrapper<PlatformJob>().lambda() |
| | | .set(PlatformJob::getIsdeleted,Constants.ONE) |
| | |
| | | IPage<PlatformJob> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<PlatformJob> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | pageWrap.getModel().setIsdeleted(Constants.ZERO); |
| | | queryWrapper |
| | | .selectAll(PlatformJob.class) |
| | | .selectAs(Platform::getName,PlatformJob::getPlatformName) |