rev:更新
This commit is contained in:
@@ -88,7 +88,7 @@ public class AgvServiceImpl implements AgvService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
DeviceService deviceService;
|
DeviceService deviceService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private static AcsPointAngleService acsPointAngleService;
|
AcsPointAngleService acsPointAngleService;
|
||||||
|
|
||||||
private final LogServer logServer;
|
private final LogServer logServer;
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ public class AgvServiceImpl implements AgvService {
|
|||||||
* demo:destination("cz14", "JackUnload", "3", "")
|
* demo:destination("cz14", "JackUnload", "3", "")
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static JSONObject destination2(String locationName, String operation, String propertiesType, String pro,Instruction dto) {
|
public JSONObject destination2(String locationName, String operation, String propertiesType, String pro,Instruction dto) {
|
||||||
//新增业务订单
|
//新增业务订单
|
||||||
JSONObject destinationOrder = new JSONObject();
|
JSONObject destinationOrder = new JSONObject();
|
||||||
//目标工作站
|
//目标工作站
|
||||||
@@ -246,16 +246,13 @@ public class AgvServiceImpl implements AgvService {
|
|||||||
properties.add(pro2);
|
properties.add(pro2);
|
||||||
destinationOrder.put("properties", properties);
|
destinationOrder.put("properties", properties);
|
||||||
} else if (propertiesType.equals("2")) {//Spin转动
|
} else if (propertiesType.equals("2")) {//Spin转动
|
||||||
AcsPointAngleDto acsPointAngleDto = new AcsPointAngleDto();
|
AcsPointAngleDto acsPointAngleDto = getAcsPointAngleDto(dto);
|
||||||
acsPointAngleDto = getAcsPointAngleDto(dto);
|
|
||||||
if (ObjectUtil.isEmpty(acsPointAngleDto)){
|
if (ObjectUtil.isEmpty(acsPointAngleDto)){
|
||||||
throw new RuntimeException("沒有找到内容,无法下发");
|
throw new RuntimeException("沒有找到内容,无法下发");
|
||||||
}
|
}
|
||||||
BigDecimal next_point_angle = acsPointAngleDto.getNext_point_angle();
|
|
||||||
JSONArray properties = new JSONArray();
|
JSONArray properties = new JSONArray();
|
||||||
JSONObject pro1 = new JSONObject();
|
JSONObject pro1 = new JSONObject();
|
||||||
pro1.put("key", "global_spin_angle");//坐标系类型,global_spin_angle为全局坐标系
|
pro1.put("key", "global_spin_angle");//坐标系类型,global_spin_angle为全局坐标系
|
||||||
pro1.put("value", next_point_angle);//弧度值,如3.14
|
|
||||||
properties.add(pro1);
|
properties.add(pro1);
|
||||||
JSONObject pro2 = new JSONObject();
|
JSONObject pro2 = new JSONObject();
|
||||||
pro2.put("key", "spin_direction");//固定值
|
pro2.put("key", "spin_direction");//固定值
|
||||||
@@ -289,7 +286,7 @@ public class AgvServiceImpl implements AgvService {
|
|||||||
return destinationOrder;
|
return destinationOrder;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static AcsPointAngleDto getAcsPointAngleDto(Instruction dto) {
|
private AcsPointAngleDto getAcsPointAngleDto(Instruction dto) {
|
||||||
List<AcsPointAngleDto> list = acsPointAngleService.queryAll(new HashMap());
|
List<AcsPointAngleDto> list = acsPointAngleService.queryAll(new HashMap());
|
||||||
AcsPointAngleDto acsPointAngleDto = new AcsPointAngleDto();
|
AcsPointAngleDto acsPointAngleDto = new AcsPointAngleDto();
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
@@ -2231,6 +2228,23 @@ public class AgvServiceImpl implements AgvService {
|
|||||||
ja.add(jo3);
|
ja.add(jo3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//放货前下发旋转角度
|
||||||
|
com.alibaba.fastjson.JSONObject json1 = new com.alibaba.fastjson.JSONObject();
|
||||||
|
AcsPointAngleDto acsPointAngleDto = getAcsPointAngleDto(inst);
|
||||||
|
if (ObjectUtil.isEmpty(acsPointAngleDto)){
|
||||||
|
throw new RuntimeException("沒有找到内容,无法下发");
|
||||||
|
}
|
||||||
|
com.alibaba.fastjson.JSONObject operation_args = new com.alibaba.fastjson.JSONObject();
|
||||||
|
BigDecimal next_point_angle = acsPointAngleDto.getNext_point_angle();
|
||||||
|
operation_args.put("move_angle",next_point_angle);//弧度值,如3.14
|
||||||
|
operation_args.put("skill_name","GoByOdometer");
|
||||||
|
operation_args.put("speed_w",1.57);
|
||||||
|
operation_args.put("loc_mode",1);
|
||||||
|
json1.put("blockId", IdUtil.simpleUUID());
|
||||||
|
json1.put("location", inst.getNext_point_code() + "INPUT");
|
||||||
|
json1.put("operation_args",operation_args);
|
||||||
|
ja.add(json1);
|
||||||
|
|
||||||
com.alibaba.fastjson.JSONObject jo4 = new com.alibaba.fastjson.JSONObject();
|
com.alibaba.fastjson.JSONObject jo4 = new com.alibaba.fastjson.JSONObject();
|
||||||
jo4.put("blockId", IdUtil.simpleUUID());
|
jo4.put("blockId", IdUtil.simpleUUID());
|
||||||
jo4.put("location", inst.getNext_point_code());
|
jo4.put("location", inst.getNext_point_code());
|
||||||
@@ -2257,7 +2271,6 @@ public class AgvServiceImpl implements AgvService {
|
|||||||
jo5.put("script_args", script_args5);
|
jo5.put("script_args", script_args5);
|
||||||
ja.add(jo5);
|
ja.add(jo5);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ja;
|
return ja;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,17 +5,15 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.nl.acs.angle.service.AcsPointAngleService;
|
import org.nl.acs.angle.service.AcsPointAngleService;
|
||||||
import org.nl.acs.angle.service.dto.AcsPointAngleDto;
|
import org.nl.acs.angle.service.dto.AcsPointAngleDto;
|
||||||
import org.nl.exception.BadRequestException;
|
import org.nl.exception.BadRequestException;
|
||||||
|
import org.nl.wql.WQL;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.*;
|
||||||
import java.util.Map;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
@@ -41,9 +39,9 @@ public class AcsPointAngleServiceImpl implements AcsPointAngleService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||||
WQLObject wo = WQLObject.getWQLObject("acs_point_angle");
|
HashMap<String, String> map = new HashMap<>();
|
||||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "", "update_time desc");
|
map.put("flag", "1");
|
||||||
final JSONObject json = rb.pageResult();
|
JSONObject json = WQL.getWO("ST_VEHICLE_IN_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time DESC");
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,7 +98,6 @@ public class AcsPointAngleServiceImpl implements AcsPointAngleService {
|
|||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
dto.setUpdate_time(now);
|
dto.setUpdate_time(now);
|
||||||
dto.setUpdate_by(currentUsername);
|
dto.setUpdate_by(currentUsername);
|
||||||
|
|
||||||
WQLObject wo = WQLObject.getWQLObject("acs_point_angle");
|
WQLObject wo = WQLObject.getWQLObject("acs_point_angle");
|
||||||
JSONObject json = JSONObject.fromObject(dto);
|
JSONObject json = JSONObject.fromObject(dto);
|
||||||
wo.update(json);
|
wo.update(json);
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
[交易说明]
|
||||||
|
交易名: 空载具入库分页查询
|
||||||
|
所属模块:
|
||||||
|
功能简述:
|
||||||
|
版权所有:
|
||||||
|
表引用:
|
||||||
|
版本经历:
|
||||||
|
|
||||||
|
[数据库]
|
||||||
|
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||||
|
|
||||||
|
[IO定义]
|
||||||
|
#################################################
|
||||||
|
## 表字段对应输入参数
|
||||||
|
#################################################
|
||||||
|
输入.flag TYPEAS s_string
|
||||||
|
输入.bill_code TYPEAS s_string
|
||||||
|
|
||||||
|
[临时表]
|
||||||
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
|
|
||||||
|
[临时变量]
|
||||||
|
--所有中间过程变量均可在此处定义
|
||||||
|
|
||||||
|
[业务过程]
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 1、输入输出检查 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 2、主过程前处理 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 3、业务主过程 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
IF 输入.flag = "1"
|
||||||
|
PAGEQUERY
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
acs_point_angle
|
||||||
|
WHERE
|
||||||
|
1=1
|
||||||
|
ENDSELECT
|
||||||
|
ENDPAGEQUERY
|
||||||
|
ENDIF
|
||||||
Binary file not shown.
@@ -23,17 +23,17 @@
|
|||||||
v-if="false"
|
v-if="false"
|
||||||
label="id标识"
|
label="id标识"
|
||||||
>
|
>
|
||||||
<el-input v-model="form.id" style="width: 370px;" />
|
<el-input v-model="form.id" style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="起始设备编码"
|
label="起始设备编码"
|
||||||
>
|
>
|
||||||
<el-input v-model="form.start_device_code" style="width: 370px;" />
|
<el-input v-model="form.start_device_code" :disabled="crud.status.edit > 0" style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="目标设备编码"
|
label="目标设备编码"
|
||||||
>
|
>
|
||||||
<el-input v-model="form.next_device_code" style="width: 370px;" />
|
<el-input v-model="form.next_device_code" :disabled="crud.status.edit > 0" style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="目标点位角度"
|
label="目标点位角度"
|
||||||
|
|||||||
Reference in New Issue
Block a user