浙大调度fix
This commit is contained in:
@@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -17,6 +18,7 @@ import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.nl.acs.AcsConfig;
|
||||
import org.nl.acs.agv.server.MagicAgvService;
|
||||
import org.nl.acs.agv.server.NDCAgvService;
|
||||
import org.nl.acs.agv.server.ZheDaAgvService;
|
||||
import org.nl.acs.auto.initial.ApplicationAutoInitial;
|
||||
import org.nl.acs.device.domain.Device;
|
||||
import org.nl.acs.device.service.DeviceService;
|
||||
@@ -450,6 +452,19 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
if (StrUtil.equals(shortPathsList.get(0).getType(), "1")) {
|
||||
NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||
ndcAgvService.sendAgvInstToNDC(task.getAgv_system_type(), dto);
|
||||
}else if(StrUtil.equals(shortPathsList.get(0).getType(), "2")) {
|
||||
ZheDaAgvService zheDaAgvService = SpringContextHolder.getBean(ZheDaAgvService.class);
|
||||
HttpResponse result = zheDaAgvService.sendAgvInstToAgv(dto);
|
||||
if (!ObjectUtils.isEmpty(result)) {
|
||||
JSONObject jo = JSON.parseObject(result.body());
|
||||
if (jo.getInteger("status") != 200) {
|
||||
dto.setSend_status("2");
|
||||
} else {
|
||||
dto.setSend_status("1");
|
||||
}
|
||||
} else {
|
||||
dto.setSend_status("2");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
dto.setSend_status("2");
|
||||
|
||||
Reference in New Issue
Block a user