人工确认排产单时序修改
This commit is contained in:
@@ -378,8 +378,8 @@ public class HfStationDeviceDriver extends AbstractOpcDeviceDriver implements De
|
|||||||
dto.setUpdate_time(DateUtil.now());
|
dto.setUpdate_time(DateUtil.now());
|
||||||
produceshiftorderService.update(dto);
|
produceshiftorderService.update(dto);
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
|
this.writing(8);
|
||||||
logServer.deviceInfo("人工排产确认", this.getDevice_code(), "人工排产确认成功!");
|
logServer.deviceInfo("人工排产确认", this.getDevice_code(), "人工排产确认成功!");
|
||||||
this.writing(3);
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
|||||||
hfStationDeviceDriver.writing("to_order", dto.getOrder_code());
|
hfStationDeviceDriver.writing("to_order", dto.getOrder_code());
|
||||||
hfStationDeviceDriver.writing("to_order_num", String.valueOf(dto.getQty()));
|
hfStationDeviceDriver.writing("to_order_num", String.valueOf(dto.getQty()));
|
||||||
hfStationDeviceDriver.writing("to_product_number", dto.getMaterial_code());
|
hfStationDeviceDriver.writing("to_product_number", dto.getMaterial_code());
|
||||||
// hfStationDeviceDriver.writing("to_command", "3");
|
hfStationDeviceDriver.writing("to_command", "3");
|
||||||
}
|
}
|
||||||
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
|
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
|
||||||
wo.insert(json);
|
wo.insert(json);
|
||||||
|
|||||||
@@ -419,31 +419,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
JSONObject resp = new JSONObject();
|
JSONObject resp = new JSONObject();
|
||||||
String ext_order_id = whereJson.getString("ext_order_id");
|
String ext_order_id = whereJson.getString("ext_order_id");
|
||||||
WorkorderDto dto = workordeService.findById(Long.valueOf(ext_order_id));
|
WorkorderDto dto = workordeService.findById(Long.valueOf(ext_order_id));
|
||||||
if (ObjectUtil.isEmpty(dto)) {
|
dto.setOrder_status("3");
|
||||||
throw new BadRequestException("查询到工单为空!");
|
dto.setUpdate_time(DateUtil.now());
|
||||||
}
|
workordeService.update(dto);
|
||||||
String device_code = whereJson.getString("device_code");
|
resp.put("status", "200");
|
||||||
String material_code = whereJson.getString("material_code");
|
resp.put("message", "人工排产确认成功!");
|
||||||
MaterialbaseDto materialbaseDto = materialbaseService.findByCode(material_code);
|
return resp;
|
||||||
if (ObjectUtil.isEmpty(materialbaseDto)) {
|
|
||||||
throw new BadRequestException("物料编码不存在!");
|
|
||||||
}
|
|
||||||
String order_code = whereJson.getString("order_code");
|
|
||||||
if (StrUtil.equals(device_code, dto.getDevice_code()) &&
|
|
||||||
StrUtil.equals(material_code, materialbaseDto.getMaterial_code())
|
|
||||||
&& StrUtil.equals(order_code, dto.getWorkorder_code())
|
|
||||||
) {
|
|
||||||
dto.setOrder_status("3");
|
|
||||||
dto.setUpdate_time(DateUtil.now());
|
|
||||||
workordeService.update(dto);
|
|
||||||
resp.put("status", "200");
|
|
||||||
resp.put("message", "人工排产确认成功!");
|
|
||||||
return resp;
|
|
||||||
} else {
|
|
||||||
resp.put("status", "400");
|
|
||||||
resp.put("message", "人工排产确认失败,工单设备编码或物料编码或工单号与acs传来的不一致!");
|
|
||||||
return resp;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user