|
|
@ -15,11 +15,14 @@ import org.nl.wms.database.brick.service.IMdBaseBrickInfoService; |
|
|
|
import org.nl.wms.database.material.service.IMdBaseMaterialService; |
|
|
|
import org.nl.wms.database.material.service.dao.MdBaseMaterial; |
|
|
|
import org.nl.wms.ext.acs.service.dto.*; |
|
|
|
import org.nl.wms.ext.acs.service.dto.ApplyTaskRequest; |
|
|
|
import org.nl.wms.ext.acs.service.vo.BaseResponse; |
|
|
|
import org.nl.wms.ext.acs.service.dto.to.acs.PutActionRequest; |
|
|
|
import org.nl.wms.ext.acs.service.dto.to.wms.ApplyTaskRequest; |
|
|
|
import org.nl.wms.ext.acs.service.dto.to.wms.FeedBackTaskStatusRequest; |
|
|
|
import org.nl.wms.ext.acs.service.dto.to.wms.GetPalletizeRequest; |
|
|
|
import org.nl.wms.ext.acs.service.dto.to.BaseResponse; |
|
|
|
import org.nl.wms.ext.acs.service.AcsToWmsService; |
|
|
|
import org.nl.wms.ext.acs.service.vo.ApplyTaskResponse; |
|
|
|
import org.nl.wms.ext.acs.service.vo.GetPalletizeResponse; |
|
|
|
import org.nl.wms.ext.acs.service.dto.to.acs.ApplyTaskResponse; |
|
|
|
import org.nl.wms.ext.acs.service.dto.to.acs.GetPalletizeResponse; |
|
|
|
import org.nl.wms.ext.record.service.ISysInteractRecordService; |
|
|
|
import org.nl.wms.pdm.record.service.IPdmBdRequestMaterialRecordService; |
|
|
|
import org.nl.wms.pdm.record.service.dao.PdmBdRequestMaterialRecord; |
|
|
@ -50,6 +53,7 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.lang.reflect.InvocationTargetException; |
|
|
|
import java.lang.reflect.Method; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Author: lyd |
|
|
@ -72,7 +76,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { |
|
|
|
private ISchBaseVehiclematerialgroupService vehiclematerialgroupService; |
|
|
|
@Autowired |
|
|
|
private TaskFactory taskFactory; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ISysNoticeService noticeService; |
|
|
|
@Autowired |
|
|
@ -410,7 +414,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { |
|
|
|
return BaseResponse.responseOk(requestNo); |
|
|
|
} |
|
|
|
|
|
|
|
public BaseResponse receiveTaskStatusAcs(JSONObject param) { |
|
|
|
public BaseResponse feedbackTaskStatus(JSONObject param) { |
|
|
|
// todo: action暂未维护
|
|
|
|
String requestNo = param.getString("requestNo"); |
|
|
|
FeedBackTaskStatusRequest taskStatusRequest = param.toJavaObject(FeedBackTaskStatusRequest.class); |
|
|
@ -475,14 +479,22 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { |
|
|
|
|
|
|
|
/** 实时修改点位状态 */ |
|
|
|
public BaseResponse realTimeSetPoint(JSONObject param) { |
|
|
|
String requestNo = param.getString("requestNo"); |
|
|
|
String deviceCode = param.getString("device_code"); |
|
|
|
String vehicleType = param.getString("vehicle_type"); |
|
|
|
// todo: 实体错误
|
|
|
|
PutActionRequest actionRequest = param.toJavaObject(PutActionRequest.class); |
|
|
|
String requestNo = actionRequest.getRequestNo(); |
|
|
|
String deviceCode = actionRequest.getDevice_code(); |
|
|
|
List<SignalData> list = actionRequest.getList(); |
|
|
|
// String vehicleType = actionRequest.getVehicle_type();
|
|
|
|
if (deviceCode == null) { |
|
|
|
return BaseResponse.responseError(requestNo, "设备编码不能为空"); |
|
|
|
} |
|
|
|
// move
|
|
|
|
String move = (param.getInteger("move") + 1) + ""; |
|
|
|
String move = ""; |
|
|
|
// move 根据链表数据来
|
|
|
|
for (SignalData signalData : list) { |
|
|
|
if (signalData.getCode().equals("move")) { |
|
|
|
move = (Integer.parseInt(signalData.getValue()) + 1) + ""; |
|
|
|
} |
|
|
|
} |
|
|
|
// 找到点位
|
|
|
|
SchBasePoint schBasePoint = pointService.getById(deviceCode); |
|
|
|
if (ObjectUtil.isEmpty(schBasePoint)) { |
|
|
@ -495,9 +507,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { |
|
|
|
&& move.equals(PointStatusEnum.EMPTY_VEHICLE.getCode())) || (pointStatus.equals(move))) { // 不做操作
|
|
|
|
return BaseResponse.responseOk(requestNo); |
|
|
|
} |
|
|
|
if (vehicleType != null) { |
|
|
|
schBasePoint.setVehicle_type(vehicleType); |
|
|
|
} |
|
|
|
// if (vehicleType != null) {
|
|
|
|
// schBasePoint.setVehicle_type(vehicleType);
|
|
|
|
// }
|
|
|
|
schBasePoint.setPoint_status(move); |
|
|
|
PointUtils.setUpdateByAcs(schBasePoint); |
|
|
|
pointService.updateById(schBasePoint); |
|
|
|