|
|
@ -5,7 +5,9 @@ import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import org.nl.common.exception.BadRequestException; |
|
|
|
import org.nl.common.utils.CodeUtil; |
|
|
|
import org.nl.config.MapOf; |
|
|
|
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.to.BaseRequest; |
|
|
|
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.core.TaskStatus; |
|
|
|
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.TaskUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@ -53,10 +56,11 @@ public class FJQKTask extends AbstractTask { |
|
|
|
private ISchBaseTaskconfigService taskConfigService; |
|
|
|
@Autowired |
|
|
|
private IPdmBdWorkorderService workorderService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ISysNoticeService noticeService; |
|
|
|
@Autowired |
|
|
|
private WmsToAcsService wmsToAcsService; |
|
|
|
@Autowired |
|
|
|
private FJMapper fjMapper; |
|
|
|
@Override |
|
|
|
protected void create() throws BadRequestException { |
|
|
@ -124,14 +128,18 @@ public class FJQKTask extends AbstractTask { |
|
|
|
// 向ACS请求所需木托盘在那个栈拆盘机?已经实时更新,故只需要自己查询即可
|
|
|
|
SchBasePoint endPointObj = fjMapper.findPointForFJQK(startRegionStr, new JSONObject() |
|
|
|
.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");
|
|
|
|
// List<SignalData> signalList = new ArrayList<>();
|
|
|
|
// signalList.add(signalData);
|
|
|
|
// PutActionRequest putActionRequest = (PutActionRequest) BaseRequest.createRequest();
|
|
|
|
// putActionRequest.setDevice_code(endPointObj.getDevice_code());
|
|
|
|
// putActionRequest.setList(signalList);
|
|
|
|
// AcsUtil.notifyAcs("", putActionRequest);
|
|
|
|
// List<PutActionRequest> list = new ArrayList<>();
|
|
|
|
// list.add(putActionRequest);
|
|
|
|
wmsToAcsService.getVehicleForLaminatingMachine(list); |
|
|
|
// 这个点的父点位为起点
|
|
|
|
return ObjectUtil.isNotEmpty(endPointObj) ? endPointObj : null; |
|
|
|
} |
|
|
|