rev:更新查询
This commit is contained in:
@@ -2230,20 +2230,18 @@ public class AgvServiceImpl implements AgvService {
|
|||||||
|
|
||||||
//放货前下发旋转角度
|
//放货前下发旋转角度
|
||||||
com.alibaba.fastjson.JSONObject json1 = new com.alibaba.fastjson.JSONObject();
|
com.alibaba.fastjson.JSONObject json1 = new com.alibaba.fastjson.JSONObject();
|
||||||
AcsPointAngleDto acsPointAngleDto = getAcsPointAngleDto(inst);
|
AcsPointAngleDto acsPointAngleDto = acsPointAngleService.findByCode(inst.getStart_device_code(),inst.getNext_device_code());
|
||||||
if (ObjectUtil.isEmpty(acsPointAngleDto)){
|
if (ObjectUtil.isNotEmpty(acsPointAngleDto)){
|
||||||
throw new RuntimeException("沒有找到内容,无法下发");
|
log.info("acsPointAngleDto----參數,{}", acsPointAngleDto.toString());
|
||||||
|
com.alibaba.fastjson.JSONObject operation_args = new com.alibaba.fastjson.JSONObject();
|
||||||
|
BigDecimal next_point_angle = acsPointAngleDto.getNext_point_angle();
|
||||||
|
operation_args.put("increase_spin_angle",next_point_angle);//弧度值,如3.14
|
||||||
|
operation_args.put("skill_name","GoByOdometer");
|
||||||
|
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 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());
|
||||||
|
|||||||
@@ -51,6 +51,15 @@ public interface AcsPointAngleService {
|
|||||||
*/
|
*/
|
||||||
AcsPointAngleDto findByCode(String code);
|
AcsPointAngleDto findByCode(String code);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据起点编码和终点编码查询
|
||||||
|
*
|
||||||
|
* @param start_code
|
||||||
|
* @param next_code
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AcsPointAngleDto findByCode(String start_code,String next_code);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建
|
* 创建
|
||||||
|
|||||||
@@ -70,6 +70,14 @@ public class AcsPointAngleServiceImpl implements AcsPointAngleService {
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AcsPointAngleDto findByCode(String start_code, String next_code) {
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("acs_point_angle");
|
||||||
|
JSONObject json = wo.query("start_device_code ='" + start_code + "'" + " and next_device_code = '" + next_code + "'").uniqueResult(0);
|
||||||
|
final AcsPointAngleDto obj = (AcsPointAngleDto) JSONObject.toBean(json, AcsPointAngleDto.class);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void create(AcsPointAngleDto dto) {
|
public void create(AcsPointAngleDto dto) {
|
||||||
|
|||||||
Reference in New Issue
Block a user