|
@@ -1,5 +1,7 @@
|
|
package com.ruoyi.ams.task.service.impl;
|
|
package com.ruoyi.ams.task.service.impl;
|
|
|
|
|
|
|
|
+import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.ruoyi.ams.agv.ndc.domain.AmsTask;
|
|
import com.ruoyi.ams.agv.ndc.domain.AmsTask;
|
|
import com.ruoyi.ams.agv.ndc.service.IAmsTaskService;
|
|
import com.ruoyi.ams.agv.ndc.service.IAmsTaskService;
|
|
import com.ruoyi.ams.box.service.IWmsBoxInfoService;
|
|
import com.ruoyi.ams.box.service.IWmsBoxInfoService;
|
|
@@ -29,6 +31,7 @@ import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.lang.reflect.Method;
|
|
import java.lang.reflect.Method;
|
|
|
|
+import java.util.ArrayList;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
@@ -113,9 +116,12 @@ public class WcsTaskServiceImpl implements IWcsTaskService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public List<LargeScreenWcsTaskDTO> selectLargeScreenWcsTaskList() {
|
|
|
|
|
|
+ public List<LargeScreenWcsTaskDTO> selectLargeScreenWcsTaskList(String size) {
|
|
List<WcsTask> wcsTaskList = wcsTaskMapper.selectWcsTaskListVO(new WcsTask());
|
|
List<WcsTask> wcsTaskList = wcsTaskMapper.selectWcsTaskListVO(new WcsTask());
|
|
- List<LargeScreenWcsTaskDTO> largeScreenWcsTaskDTO = ConvertUtils.sourceToTarget(wcsTaskList, LargeScreenWcsTaskDTO.class);
|
|
|
|
|
|
+ if (CollectionUtil.isEmpty(wcsTaskList)){
|
|
|
|
+ return new ArrayList<>();
|
|
|
|
+ }
|
|
|
|
+ List<LargeScreenWcsTaskDTO> largeScreenWcsTaskDTO = ConvertUtils.sourceToTarget(wcsTaskList.subList(0, Integer.valueOf(size)), LargeScreenWcsTaskDTO.class);
|
|
largeScreenWcsTaskDTO.forEach(item -> item.setStateRemark(Constant.TASK_STS.getRemark(Integer.valueOf(item.getState().toString()))));
|
|
largeScreenWcsTaskDTO.forEach(item -> item.setStateRemark(Constant.TASK_STS.getRemark(Integer.valueOf(item.getState().toString()))));
|
|
return largeScreenWcsTaskDTO;
|
|
return largeScreenWcsTaskDTO;
|
|
}
|
|
}
|
|
@@ -125,6 +131,10 @@ public class WcsTaskServiceImpl implements IWcsTaskService {
|
|
return wcsTaskMapper.selectWcsUnallocated(warehouseId);
|
|
return wcsTaskMapper.selectWcsUnallocated(warehouseId);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public List<WcsTask> queryAgvWcsTask(List<String> agvNoList, Integer state) {
|
|
|
|
+ return wcsTaskMapper.selectList(Wrappers.<WcsTask>lambdaQuery().in(WcsTask::getAgvNo, agvNoList).eq(WcsTask::getState, state));
|
|
|
|
+ }
|
|
/**
|
|
/**
|
|
* 查询AGV任务
|
|
* 查询AGV任务
|
|
*
|
|
*
|