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