| | |
| | | import com.doumee.core.haikang.model.param.respose.ParkReservationAddResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.dao.business.dao.UserActionMapper; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.service.business.third.WmsService; |
| | | import com.doumee.service.business.third.model.LoginUserInfo; |
| | | import com.doumee.service.business.third.model.PageData; |
| | |
| | | BeanUtils.copyProperties(platformJob,oldPlatformJob); |
| | | platformJob.setPlatformId(platform.getId()); |
| | | platformJob.setInwaitDate(new Date()); |
| | | platformJob.setInwaitUserId(jobOperateDTO.getLoginUserInfo().getId()); |
| | | platformJob.setInwaitUserId(Objects.isNull(jobOperateDTO.getLoginUserInfo())?null:jobOperateDTO.getLoginUserInfo().getId()); |
| | | platformJob.setStatus(Constants.PlatformJobStatus.IN_WAIT.getKey()); |
| | | platformJob.setEditDate(new Date()); |
| | | platformJobMapper.updateById(platformJob); |
| | |
| | | BeanUtils.copyProperties(platformJob,oldPlatformJob); |
| | | |
| | | platformJob.setCallDate(Objects.isNull(platformJob.getCallDate())?new Date():null); |
| | | platformJob.setCallUserId(jobOperateDTO.getLoginUserInfo().getId()); |
| | | platformJob.setCallUserId(Objects.isNull(jobOperateDTO.getLoginUserInfo())?null:jobOperateDTO.getLoginUserInfo().getId()); |
| | | platformJob.setStatus(Constants.PlatformJobStatus.CALLED.getKey()); |
| | | platformJob.setPlatformId(jobOperateDTO.getPlatformId()); |
| | | //夿æ¯å¦éè¦å¡«å
è¿å» |
| | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void autoPlatformCallCar(WmsService wmsService){ |
| | | //æ¥è¯¢å½åå¼å¯çæå°æ°æ® |
| | | List<PlatformGroup> allPlatformGroup = platformGroupMapper.selectList(new QueryWrapper<PlatformGroup>().lambda().eq(PlatformGroup::getStatus,Constants.ZERO) |
| | | .eq(PlatformGroup::getIsdeleted,Constants.ZERO).eq(PlatformGroup::getAutoCall,Constants.ONE) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(allPlatformGroup)){ |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(allPlatformGroup)){ |
| | | return; |
| | | } |
| | | //è¿æ»¤å½åæ¶é´æ®µä¸å¨æ¶é´å
çæå°ç» AUTO_CALL_END_TIME AUTO_CALL_START_TIME |
| | |
| | | && Integer.valueOf(i.getAutoCallStartTime().replaceAll(":","")) < nowHm |
| | | && Integer.valueOf(i.getAutoCallEndTime().replaceAll(":","")) > nowHm |
| | | ).collect(Collectors.toList()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(autoCallGroup)){ |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(autoCallGroup)){ |
| | | return; |
| | | } |
| | | //æ¥è¯¢æææå° |
| | |
| | | .lambda() |
| | | .eq(Platform::getIsdeleted,Constants.ZERO) |
| | | .eq(Platform::getStatus,Constants.ZERO) |
| | | .in(Platform::getId,autoCallGroup.stream().map(i->i.getId()).collect(Collectors.toList())) |
| | | .isNotNull(Platform::getWorkingNum) |
| | | .in(Platform::getGroupId,autoCallGroup.stream().map(i->i.getId()).collect(Collectors.toList())) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(platformList)){ |
| | | return; |
| | |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformJob::getPlatformGroupId, platformGroup.getId()) |
| | | .apply(" ( " + |
| | | " ( t.`STATUS` = "+Constants.PlatformJobStatus.WAIT_CALL.getKey()+" and t.PLATFORM_GROUP_ID = "+platformGroup.getId()+" )" + |
| | | " ( `STATUS` = "+Constants.PlatformJobStatus.WAIT_CALL.getKey()+" and PLATFORM_GROUP_ID = "+platformGroup.getId()+" )" + |
| | | " or " + |
| | | " (t.`STATUS` = "+Constants.PlatformJobStatus.IN_WAIT.getKey()+" and and t.PLATFORM_ID = "+platform.getId()+" ) " + |
| | | " ( `STATUS` = "+Constants.PlatformJobStatus.IN_WAIT.getKey()+" and PLATFORM_ID = "+platform.getId()+" ) " + |
| | | " or " + |
| | | " (t.`STATUS` = "+Constants.PlatformJobStatus.TRANSFERING.getKey()+" and t.PLATFORM_ID = "+platform.getId()+" ) " + |
| | | " ( `STATUS` = "+Constants.PlatformJobStatus.TRANSFERING.getKey()+" and PLATFORM_ID = "+platform.getId()+" ) " + |
| | | ") " |
| | | ) |
| | | //æåºæ¹å¼ æå°ä½ä¸ç±»å ï¼è½¬ç§»ä¸ >å«å·å
¥åï¼> å æ¥ > ç¾å°æ¶é´ |
| | |
| | | } |
| | | for (int i = 0; i < workingNum - workNum ; i++) { |
| | | PlatformJob platformJob = this.getAutoCallJob(platformJobList,platform,isDefaul,platformGroup); |
| | | if(Objects.isNull(platformJob)){ |
| | | continue; |
| | | } |
| | | JobOperateDTO jobOperateDTO = new JobOperateDTO(); |
| | | jobOperateDTO.setJobId(platformJob.getId()); |
| | | jobOperateDTO.setPlatformId(platform.getId()); |
| | | PlatformJob callPlatformJob = this.platformCallNumber(jobOperateDTO); |
| | | platformJobList = platformJobList.stream().filter(j->!Constants.equalsInteger(j.getId(),platformJob.getId())).collect(Collectors.toList()); |
| | | try{ |
| | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void autoCallInParkCar(WmsService wmsService){ |
| | | //æ¥è¯¢å½åå¼å¯çæå°æ°æ® |
| | | List<PlatformGroup> allPlatformGroup = platformGroupMapper.selectList(new QueryWrapper<PlatformGroup>().lambda().eq(PlatformGroup::getStatus,Constants.ZERO) |
| | | .eq(PlatformGroup::getIsdeleted,Constants.ZERO).eq(PlatformGroup::getAutoCall,Constants.ONE) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(allPlatformGroup)){ |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(allPlatformGroup)){ |
| | | return; |
| | | } |
| | | //è¿æ»¤å½åæ¶é´æ®µä¸å¨æ¶é´å
çæå°ç» AUTO_CALL_END_TIME AUTO_CALL_START_TIME |
| | |
| | | && Integer.valueOf(i.getAutoCallStartTime().replaceAll(":","")) < nowHm |
| | | && Integer.valueOf(i.getAutoCallEndTime().replaceAll(":","")) > nowHm |
| | | ).collect(Collectors.toList()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(autoCallGroup)){ |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(autoCallGroup)){ |
| | | return; |
| | | } |
| | | //æ¥è¯¢æææå° |
| | |
| | | .lambda() |
| | | .eq(Platform::getIsdeleted,Constants.ZERO) |
| | | .eq(Platform::getStatus,Constants.ZERO) |
| | | .in(Platform::getId,autoCallGroup.stream().map(i->i.getId()).collect(Collectors.toList())) |
| | | .isNotNull(Platform::getCallReadyNum) |
| | | .in(Platform::getGroupId,autoCallGroup.stream().map(i->i.getId()).collect(Collectors.toList())) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(platformList)){ |
| | | return; |
| | |
| | | .lambda() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformJob::getPlatformGroupId, platformGroup.getId()) |
| | | .apply(" t.`STATUS` = "+Constants.PlatformJobStatus.WAIT_CALL.getKey()+" and t.PLATFORM_GROUP_ID = "+platformGroup.getId()+" ) ") |
| | | .apply(" ( `STATUS` = "+Constants.PlatformJobStatus.WAIT_CALL.getKey()+" and PLATFORM_GROUP_ID = "+platformGroup.getId()+" ) ") |
| | | //æåºæ¹å¼ æå°ä½ä¸ç±»å ï¼å¼å¸¸æèµ·>å«å·å
¥åï¼> å æ¥ > ç¾å°æ¶é´ |
| | | .orderByDesc(PlatformJob::getStatus,PlatformJob::getUrgeTime) |
| | | .orderByAsc(PlatformJob::getSignDate)); |
| | |
| | | if(Objects.isNull(platformWmsJob)){ |
| | | continue; |
| | | } |
| | | //TODO ææ å
¥åºçæ°æ® |
| | | if(platformWmsJob.getCarrierName().equals("1") && Constants.equalsInteger(platform.getType(),Constants.ONE)){ |
| | | SystemDictData systemDictData = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.IN_REPERTOTY_CODE); |
| | | if(Objects.nonNull(systemDictData)){ |
| | | //夿æ¾ç½®ä½ç½® |
| | | if(platformWmsDetailMapper.selectCount(new QueryWrapper<PlatformWmsDetail>().lambda().eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformWmsDetail::getWmsJobId,platformWmsJob.getId()) |
| | | .apply(" find_in_set(IN_REPERTOTY_CODE ,'"+systemDictData.getCode()+"')") |
| | | .eq(PlatformWmsDetail::getInRepertotyCode,"") |
| | | .isNotNull(PlatformWmsDetail::getInRepertotyCode) |
| | | ) > Constants.ZERO && Constants.equalsInteger(platform.getType(),Constants.ONE)){ |
| | | return platformJob; |
| | | } |
| | | } |
| | | if(Constants.equalsInteger(platform.getType(),Constants.ZERO)){ |
| | | return platformJob; |
| | | } |