|
@ -13,8 +13,12 @@ import com.alibaba.fastjson.JSONObject; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.SneakyThrows; |
|
|
import lombok.SneakyThrows; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
import org.nl.acs.agv.server.AgvService; |
|
|
import org.nl.acs.agv.server.MagicAgvService; |
|
|
import org.nl.acs.agv.server.MagicAgvService; |
|
|
|
|
|
import org.nl.acs.agv.server.NDCAgvService; |
|
|
|
|
|
import org.nl.acs.agv.server.impl.AgvServiceImpl; |
|
|
import org.nl.acs.agv.server.impl.MagicAgvServiceImpl; |
|
|
import org.nl.acs.agv.server.impl.MagicAgvServiceImpl; |
|
|
|
|
|
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl; |
|
|
import org.nl.acs.device.service.DeviceService; |
|
|
import org.nl.acs.device.service.DeviceService; |
|
|
import org.nl.acs.device.service.dto.DeviceDto; |
|
|
import org.nl.acs.device.service.dto.DeviceDto; |
|
|
import org.nl.acs.device.service.impl.DeviceServiceImpl; |
|
|
import org.nl.acs.device.service.impl.DeviceServiceImpl; |
|
@ -157,6 +161,17 @@ public class AMHandServiceImpl implements AMHandService { |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public Map<String, Object> createChargingTask(Map<String, String> whereJson) { |
|
|
|
|
|
String type = whereJson.get("type"); |
|
|
|
|
|
NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvServiceImpl.class); |
|
|
|
|
|
agvService.createChargingTaskToNDC(type); |
|
|
|
|
|
JSONObject jo = new JSONObject(); |
|
|
|
|
|
jo.put("code", "1"); |
|
|
|
|
|
jo.put("desc", "创建成功"); |
|
|
|
|
|
return jo; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Map<String, Object> queryPointByArea(String areaCode) { |
|
|
public Map<String, Object> queryPointByArea(String areaCode) { |
|
|
JSONArray respArr = new JSONArray(); |
|
|
JSONArray respArr = new JSONArray(); |
|
@ -581,7 +596,7 @@ public class AMHandServiceImpl implements AMHandService { |
|
|
} |
|
|
} |
|
|
String task_id = instwo.getString("task_id"); |
|
|
String task_id = instwo.getString("task_id"); |
|
|
Instruction instdto = (Instruction) instwo.toJavaObject(Instruction.class); |
|
|
Instruction instdto = (Instruction) instwo.toJavaObject(Instruction.class); |
|
|
MagicAgvService agvService = SpringContextHolder.getBean(MagicAgvServiceImpl.class); |
|
|
NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvServiceImpl.class); |
|
|
InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class); |
|
|
InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class); |
|
|
|
|
|
|
|
|
/* 1 指令撤销 |
|
|
/* 1 指令撤销 |
|
@ -595,7 +610,7 @@ public class AMHandServiceImpl implements AMHandService { |
|
|
if (StrUtil.isEmpty(instdto.getAgv_jobno())) { |
|
|
if (StrUtil.isEmpty(instdto.getAgv_jobno())) { |
|
|
instructionService.cancelNOSendAgv(inst_uuid); |
|
|
instructionService.cancelNOSendAgv(inst_uuid); |
|
|
} else { |
|
|
} else { |
|
|
agvService.deleteAgvInst(instdto.getInstruction_code()); |
|
|
instructionService.cancel(instdto.getInstruction_id()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
@ -607,7 +622,7 @@ public class AMHandServiceImpl implements AMHandService { |
|
|
} |
|
|
} |
|
|
if (type.equals("2")) { |
|
|
if (type.equals("2")) { |
|
|
try { |
|
|
try { |
|
|
agvService.sendAgvInstToMagic(instdto); |
|
|
agvService.sendAgvInstToNDC(instdto.getAgv_system_type(),instdto); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
jo.put("code", "2"); |
|
|
jo.put("code", "2"); |
|
|
jo.put("desc", "下发agv失败"); |
|
|
jo.put("desc", "下发agv失败"); |
|
|