111
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,113 @@
|
||||
package org.nl.acs.ext.wms.liKuData.b;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.acs.ext.wms.RespUtil;
|
||||
import org.nl.acs.ext.wms.liKuData.Resp;
|
||||
import org.nl.acs.ext.wms.liKuData.a.Datas;
|
||||
import org.nl.acs.ext.wms.liKuData.a.RobotQueryResponse;
|
||||
import org.nl.acs.ext.wms.liKuData.a.Robots;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
public class Test {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TaskDto taskDto= new TaskDto();
|
||||
// Instruction dto = new Instruction();
|
||||
//
|
||||
// CreateRequest createRequest = new CreateRequest();
|
||||
// List<AGVTask> list = new ArrayList();
|
||||
// //list Describe 出库
|
||||
// OutTaskDescribe outTaskDescribe = new OutTaskDescribe();
|
||||
// outTaskDescribe.setContainerCode(dto.getVehicle_code());
|
||||
// outTaskDescribe.setFromLocationCode(dto.getStart_point_code());
|
||||
// outTaskDescribe.setToStationCode(new ArrayList<String>(Collections.singleton(dto.getNext_device_code())));
|
||||
//
|
||||
// AGVTask agvTask = new AGVTask();
|
||||
// agvTask.setTaskDescribe(outTaskDescribe);
|
||||
// agvTask.setTaskCode(dto.getTask_id());
|
||||
// agvTask.setTaskPriority(dto.getPriority());
|
||||
//
|
||||
// list.add(agvTask);
|
||||
// createRequest.setTasks(list);
|
||||
// //list Describe 入库
|
||||
// InTaskDescribe inTaskDescribe=new InTaskDescribe();
|
||||
// inTaskDescribe.setContainerCode(dto.getVehicle_code());
|
||||
// inTaskDescribe.setFromLocationCode(dto.getStart_point_code());
|
||||
// inTaskDescribe.setLocationCode(dto.getNext_point_code());
|
||||
// inTaskDescribe.setContainerType(dto.getVehicle_type());
|
||||
//
|
||||
// AGVTask agvTask1 = new AGVTask();
|
||||
// agvTask1.setTaskDescribe(inTaskDescribe);
|
||||
// agvTask1.setTaskCode(dto.getTask_id());
|
||||
// agvTask1.setTaskPriority(dto.getPriority());
|
||||
//
|
||||
// list.add(agvTask1);
|
||||
// createRequest.setTasks(list);
|
||||
// //list Describe 移库
|
||||
// RelocationTaskDescribe relocationTaskDescribe = new RelocationTaskDescribe();
|
||||
// relocationTaskDescribe.setContainerCode(dto.getVehicle_code());
|
||||
// relocationTaskDescribe.setFromLocationCode(dto.getStart_point_code());
|
||||
// relocationTaskDescribe.setToLocationCode(dto.getNext_point_code());
|
||||
//
|
||||
// AGVTask agvTask2 = new AGVTask();
|
||||
// agvTask2.setTaskDescribe(relocationTaskDescribe);
|
||||
// agvTask2.setTaskCode(dto.getTask_id());
|
||||
// agvTask2.setTaskPriority(dto.getPriority());
|
||||
//
|
||||
// list.add(agvTask2);
|
||||
// createRequest.setTasks(list);
|
||||
//
|
||||
// //list Describe 盘库
|
||||
// CheckTaskDescribe checkTaskDescribe=new CheckTaskDescribe();
|
||||
// checkTaskDescribe.setContainerCode(dto.getVehicle_code());
|
||||
// checkTaskDescribe.setLocationCode(dto.getNext_point_code());
|
||||
// checkTaskDescribe.setCheckType("scan");
|
||||
//
|
||||
// AGVTask agvTask3 = new AGVTask();
|
||||
// agvTask3.setTaskDescribe(inTaskDescribe);
|
||||
// agvTask3.setTaskCode(dto.getTask_id());
|
||||
// agvTask3.setTaskPriority(dto.getPriority());
|
||||
//
|
||||
// list.add(agvTask3);
|
||||
// createRequest.setTasks(list);
|
||||
// //list Describe 搬运
|
||||
// CarryTaskDescribe carryTaskDescribe=new CarryTaskDescribe();
|
||||
// carryTaskDescribe.setContainerCode(dto.getVehicle_code());
|
||||
// carryTaskDescribe.setFromLocationCode(dto.getStart_point_code());
|
||||
// carryTaskDescribe.setToLocationCode(dto.getNext_point_code());
|
||||
// carryTaskDescribe.setContainerType(dto.getVehicle_type());
|
||||
//
|
||||
// AGVTask agvTask4 = new AGVTask();
|
||||
// agvTask4.setTaskDescribe(inTaskDescribe);
|
||||
// agvTask4.setTaskCode(dto.getTask_id());
|
||||
// agvTask4.setTaskPriority(dto.getPriority());
|
||||
//
|
||||
// list.add(agvTask4);
|
||||
// createRequest.setTasks(list);
|
||||
|
||||
String result="{\"code\":0,\"msg\":\"success\",\"data\":{\"robots\":[{\"robotCode\":\"kubot-1\",\"robotTypeCode\":\"RT_KUBOT\",\"pointCode\":\"POINT:1280:5070\",\"positionX\":1283,\"positionY\":5057,\"theta\":269,\"forkHeight\":679,\"forkLength\":4,\"forkTheta\":1,\"stationCode\":\"1\",\"locationCode\":\"LT_CONVEYOR_OUTPUT:POINT:1280:5070\",\"state\":\"IDLE\",\"hardwareState\":\" ROBOT_IDLE \",\"trays\":[{\"trayLevel\":0,\"containerCode\":null,\"taskCodes\":[],\"positionCode\":\"kubot-1#0\"},{\"trayLevel\":1,\"containerCode\":null,\"taskCodes\":[],\"positionCode\":\"kubot-1#1\"},{\"trayLevel\":2,\"containerCode\":null,\"taskCodes\":[],\"positionCode\":\"kubot-1#2\"},{\"trayLevel\":3,\"containerCode\":null,\"taskCodes\":[],\"positionCode\":\"kubot-1#3\"},{\"trayLevel\":4,\"containerCode\":null,\"taskCodes\":[],\"positionCode\":\"kubot-1#4\"},{\"trayLevel\":64,\"containerCode\":null,\"taskCodes\":[],\"positionCode\":\"kubot-1#64\"}]}]}}";
|
||||
// RobotQueryResponse robotQueryResponse = JSONObject.parseObject(result, RobotQueryResponse.class);
|
||||
// List<Robots> robotsLIst=robotQueryResponse.getDatas().getRobots();
|
||||
|
||||
|
||||
Resp<JSONObject> robotResp = RespUtil.getResp(result, new RobotQueryResponse());;
|
||||
// RobotQueryResponse robotQueryResponse = JSONObject.parseObject(String.valueOf(robotResp.getData().getRobots()),RobotQueryResponse.class);
|
||||
// List<Robots> robotsList=robotQueryResponse.getDatas().getRobots();
|
||||
|
||||
JSONArray jsonArray =robotResp.getData().getJSONArray("robots");
|
||||
List<Robots> robotsList=jsonArray.toJavaList(Robots.class);
|
||||
System.out.println(robotsList);
|
||||
// for(int i=0;i<robotQueryList.size();i++){
|
||||
// RobotQueryResponse robots=robotQueryList.get(i);
|
||||
//// String robotCode=robots.getRobotCode();
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
8
wcs/nladmin-system/src/main/resources/log/.idea/.gitignore
generated
vendored
Normal file
8
wcs/nladmin-system/src/main/resources/log/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
9
wcs/nladmin-system/src/main/resources/log/.idea/misc.xml
generated
Normal file
9
wcs/nladmin-system/src/main/resources/log/.idea/misc.xml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="20" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
wcs/nladmin-system/src/main/resources/log/.idea/modules.xml
generated
Normal file
8
wcs/nladmin-system/src/main/resources/log/.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/log.iml" filepath="$PROJECT_DIR$/.idea/log.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
wcs/nladmin-system/src/main/resources/log/.idea/vcs.xml
generated
Normal file
6
wcs/nladmin-system/src/main/resources/log/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../../../../../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user