diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java index f7fe431..0ef94ad 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java @@ -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()); diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/angle/service/AcsPointAngleService.java b/hd/nladmin-system/src/main/java/org/nl/acs/angle/service/AcsPointAngleService.java index 1abfe83..62e2b1c 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/angle/service/AcsPointAngleService.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/angle/service/AcsPointAngleService.java @@ -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); + /** * 创建 diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/angle/service/impl/AcsPointAngleServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/angle/service/impl/AcsPointAngleServiceImpl.java index 6586451..81d0fd4 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/angle/service/impl/AcsPointAngleServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/angle/service/impl/AcsPointAngleServiceImpl.java @@ -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) {