|
@ -5,7 +5,9 @@ import com.alibaba.fastjson.JSONObject; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import org.nl.common.exception.BadRequestException; |
|
|
import org.nl.common.exception.BadRequestException; |
|
|
import org.nl.common.utils.CodeUtil; |
|
|
import org.nl.common.utils.CodeUtil; |
|
|
|
|
|
import org.nl.config.MapOf; |
|
|
import org.nl.system.service.notice.ISysNoticeService; |
|
|
import org.nl.system.service.notice.ISysNoticeService; |
|
|
|
|
|
import org.nl.wms.ext.acs.service.WmsToAcsService; |
|
|
import org.nl.wms.ext.acs.service.dto.SignalData; |
|
|
import org.nl.wms.ext.acs.service.dto.SignalData; |
|
|
import org.nl.wms.ext.acs.service.dto.to.BaseRequest; |
|
|
import org.nl.wms.ext.acs.service.dto.to.BaseRequest; |
|
|
import org.nl.wms.ext.acs.service.dto.to.acs.PutActionRequest; |
|
|
import org.nl.wms.ext.acs.service.dto.to.acs.PutActionRequest; |
|
@ -26,6 +28,7 @@ import org.nl.wms.sch.task_manage.task.AcsUtil; |
|
|
import org.nl.wms.sch.task_manage.task.TaskType; |
|
|
import org.nl.wms.sch.task_manage.task.TaskType; |
|
|
import org.nl.wms.sch.task_manage.task.core.TaskStatus; |
|
|
import org.nl.wms.sch.task_manage.task.core.TaskStatus; |
|
|
import org.nl.wms.sch.task_manage.task.tasks.fj.mapper.FJMapper; |
|
|
import org.nl.wms.sch.task_manage.task.tasks.fj.mapper.FJMapper; |
|
|
|
|
|
import org.nl.wms.util.CommonUtils; |
|
|
import org.nl.wms.util.PointUtils; |
|
|
import org.nl.wms.util.PointUtils; |
|
|
import org.nl.wms.util.TaskUtils; |
|
|
import org.nl.wms.util.TaskUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
@ -53,10 +56,11 @@ public class FJQKTask extends AbstractTask { |
|
|
private ISchBaseTaskconfigService taskConfigService; |
|
|
private ISchBaseTaskconfigService taskConfigService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private IPdmBdWorkorderService workorderService; |
|
|
private IPdmBdWorkorderService workorderService; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private ISysNoticeService noticeService; |
|
|
private ISysNoticeService noticeService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
|
|
|
private WmsToAcsService wmsToAcsService; |
|
|
|
|
|
@Autowired |
|
|
private FJMapper fjMapper; |
|
|
private FJMapper fjMapper; |
|
|
@Override |
|
|
@Override |
|
|
protected void create() throws BadRequestException { |
|
|
protected void create() throws BadRequestException { |
|
@ -124,14 +128,18 @@ public class FJQKTask extends AbstractTask { |
|
|
// 向ACS请求所需木托盘在那个栈拆盘机?已经实时更新,故只需要自己查询即可
|
|
|
// 向ACS请求所需木托盘在那个栈拆盘机?已经实时更新,故只需要自己查询即可
|
|
|
SchBasePoint endPointObj = fjMapper.findPointForFJQK(startRegionStr, new JSONObject() |
|
|
SchBasePoint endPointObj = fjMapper.findPointForFJQK(startRegionStr, new JSONObject() |
|
|
.fluentPut("vehicleType", vehicleType).fluentPut("pointType", GeneralDefinition.DEVICE_POINT)); |
|
|
.fluentPut("vehicleType", vehicleType).fluentPut("pointType", GeneralDefinition.DEVICE_POINT)); |
|
|
// todo: 请求ACS释放一个木托盘
|
|
|
// 请求ACS释放一个木托盘
|
|
|
|
|
|
List list = CommonUtils.requestAcsReleaseVehicle(MapOf.of("to_command", "1"), |
|
|
|
|
|
endPointObj.getDevice_code()); |
|
|
// SignalData signalData = SignalData.buildSignalData("to_command", "1");
|
|
|
// SignalData signalData = SignalData.buildSignalData("to_command", "1");
|
|
|
// List<SignalData> signalList = new ArrayList<>();
|
|
|
// List<SignalData> signalList = new ArrayList<>();
|
|
|
// signalList.add(signalData);
|
|
|
// signalList.add(signalData);
|
|
|
// PutActionRequest putActionRequest = (PutActionRequest) BaseRequest.createRequest();
|
|
|
// PutActionRequest putActionRequest = (PutActionRequest) BaseRequest.createRequest();
|
|
|
// putActionRequest.setDevice_code(endPointObj.getDevice_code());
|
|
|
// putActionRequest.setDevice_code(endPointObj.getDevice_code());
|
|
|
// putActionRequest.setList(signalList);
|
|
|
// putActionRequest.setList(signalList);
|
|
|
// AcsUtil.notifyAcs("", putActionRequest);
|
|
|
// List<PutActionRequest> list = new ArrayList<>();
|
|
|
|
|
|
// list.add(putActionRequest);
|
|
|
|
|
|
wmsToAcsService.getVehicleForLaminatingMachine(list); |
|
|
// 这个点的父点位为起点
|
|
|
// 这个点的父点位为起点
|
|
|
return ObjectUtil.isNotEmpty(endPointObj) ? endPointObj : null; |
|
|
return ObjectUtil.isNotEmpty(endPointObj) ? endPointObj : null; |
|
|
} |
|
|
} |
|
|