rev:更新查询

This commit is contained in:
2024-01-16 09:54:18 +08:00
parent 7f5e6d6e4e
commit 48a0afd5d3
3 changed files with 28 additions and 13 deletions

View File

@@ -2230,20 +2230,18 @@ public class AgvServiceImpl implements AgvService {
//放货前下发旋转角度
com.alibaba.fastjson.JSONObject json1 = new com.alibaba.fastjson.JSONObject();
AcsPointAngleDto acsPointAngleDto = getAcsPointAngleDto(inst);
if (ObjectUtil.isEmpty(acsPointAngleDto)){
throw new RuntimeException("沒有找到内容,无法下发");
AcsPointAngleDto acsPointAngleDto = acsPointAngleService.findByCode(inst.getStart_device_code(),inst.getNext_device_code());
if (ObjectUtil.isNotEmpty(acsPointAngleDto)){
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();
jo4.put("blockId", IdUtil.simpleUUID());

View File

@@ -51,6 +51,15 @@ public interface AcsPointAngleService {
*/
AcsPointAngleDto findByCode(String code);
/**
* 根据起点编码和终点编码查询
*
* @param start_code
* @param next_code
* @return
*/
AcsPointAngleDto findByCode(String start_code,String next_code);
/**
* 创建

View File

@@ -70,6 +70,14 @@ public class AcsPointAngleServiceImpl implements AcsPointAngleService {
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
@Transactional(rollbackFor = Exception.class)
public void create(AcsPointAngleDto dto) {