rev acs工单更新
This commit is contained in:
@@ -41,11 +41,11 @@ public enum StatusEnum {
|
||||
|
||||
//请求MES任务类型
|
||||
LACK_REQ("1", "缺料请求(三工位)", ""),
|
||||
FULL_REQ("2", "满料请求(三工位、刻字满料)", ""),
|
||||
EMPTY_REQ("3", "取空框请求(包装)", ""),
|
||||
EMPTY_REQ1("4", "取空框请求(包装)", ""),
|
||||
EMPTY_REQ2("5", "取空框请求(包装)", ""),
|
||||
EMPTY_REQ3("6", "取空框请求(包装)", ""),
|
||||
FULL_REQ("2", "满料请求(三工位)", ""),
|
||||
KZ_FULL_REQ("3", "取满料请求(刻字)", ""),
|
||||
KZ_EMPTY_REQ("4", "叫空框请求(刻字)", ""),
|
||||
BZ_FULL_REQ("5", "叫满框请求(包装)", ""),
|
||||
BZ_EMPTY_REQ("6", "送空框请求(包装)", ""),
|
||||
|
||||
//指令状态
|
||||
INST_READY("0", "就绪", ""),
|
||||
|
||||
@@ -547,7 +547,7 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
||||
ProduceshiftorderDto produceshiftorderDto = produceshiftorderService.findByCodeFromCache(String.valueOf(order));
|
||||
if (produceshiftorderDto != null && StrUtil.equals(produceshiftorderDto.getIs_needmove(), StatusEnum.NEED_MOVE.getCode())) {
|
||||
JSONObject reqParam = new JSONObject();
|
||||
reqParam.put("type", StatusEnum.LACK_REQ.getCode());
|
||||
reqParam.put("type", StatusEnum.KZ_EMPTY_REQ.getCode());
|
||||
reqParam.put("device_code", this.getDevice_code());
|
||||
reqParam.put("workorder_code", this.getOrder());
|
||||
HttpResponse httpResponse = acsToWmsService.applyTaskToWms(reqParam);
|
||||
@@ -574,7 +574,7 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
||||
if (produceshiftorderDto != null && StrUtil.equals(produceshiftorderDto.getIs_needmove(), StatusEnum.NEED_MOVE.getCode())) {
|
||||
JSONObject reqParam = new JSONObject();
|
||||
reqParam.put("device_code", this.getDevice_code());
|
||||
reqParam.put("type", StatusEnum.FULL_REQ.getCode());
|
||||
reqParam.put("type", StatusEnum.KZ_FULL_REQ.getCode());
|
||||
reqParam.put("quantity", this.getPort_full_num());
|
||||
reqParam.put("workorder_code", this.getOrder());
|
||||
HttpResponse httpResponse = acsToWmsService.applyTaskToWms(reqParam);
|
||||
@@ -594,9 +594,9 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
||||
*/
|
||||
@Override
|
||||
public void issuedOrderInfo(ProduceshiftorderDto dto) {
|
||||
if (!this.getItemProtocol().getIsonline()) {
|
||||
throw new BadRequestException("设备未开机,工单下发失败!");
|
||||
}
|
||||
// if (!this.getItemProtocol().getIsonline()) {
|
||||
// throw new BadRequestException("设备未开机,工单下发失败!");
|
||||
// }
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("to_clear", "1");
|
||||
map.put("to_order", dto.getOrder_code());
|
||||
|
||||
@@ -458,7 +458,7 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
if (produceshiftorderDto != null && produceshiftorderDto.getIs_needmove().equals(StatusEnum.NEED_MOVE.getCode())) {
|
||||
JSONObject reqParam = new JSONObject();
|
||||
reqParam.put("device_code", this.getDevice_code());
|
||||
reqParam.put("type", StatusEnum.EMPTY_REQ.getCode());
|
||||
reqParam.put("type", StatusEnum.BZ_EMPTY_REQ.getCode());
|
||||
reqParam.put("workorder_code", this.getOrder());
|
||||
HttpResponse httpResponse = acsToWmsService.applyTaskToWms(reqParam);
|
||||
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) {
|
||||
|
||||
@@ -204,7 +204,11 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
||||
//驱动类中有工单的设备 下发电气工单信息的方法
|
||||
if (device.getDeviceDriver() instanceof IssuedDeviceOrderInfo) {
|
||||
IssuedDeviceOrderInfo issuedDeviceOrderInfo = (IssuedDeviceOrderInfo) device.getDeviceDriver();
|
||||
issuedDeviceOrderInfo.issuedOrderInfo(dto);
|
||||
try{
|
||||
issuedDeviceOrderInfo.issuedOrderInfo(dto);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
|
||||
wo.insert(json);
|
||||
|
||||
Reference in New Issue
Block a user