更新
This commit is contained in:
@@ -1272,7 +1272,7 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
|
|||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (ObjectUtil.isNotEmpty(result)) {
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||||
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"),"200")) {
|
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"),"200")) {
|
||||||
this.writing(this.mode);
|
this.writing(8);
|
||||||
this.setResultSucess(true);
|
this.setResultSucess(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi
|
|||||||
}
|
}
|
||||||
//前工位申请任务
|
//前工位申请任务
|
||||||
if (mode == 2 && move_2 == 0 && action_2 == 0 && move_1 == 0 && task2 == 0 && !requireSucess1) {
|
if (mode == 2 && move_2 == 0 && action_2 == 0 && move_1 == 0 && task2 == 0 && !requireSucess1) {
|
||||||
System.out.println("move_2:" + move_2 + ",action_2:" + action_2 + ",move_1:" + move_1 + ",task2:" + task2 + ",requireSucess1:" + requireSucess1);
|
// System.out.println("move_2:" + move_2 + ",action_2:" + action_2 + ",move_1:" + move_1 + ",task2:" + task2 + ",requireSucess1:" + requireSucess1);
|
||||||
instruction_require();
|
instruction_require();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1498,7 +1498,7 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
|
|||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (ObjectUtil.isNotEmpty(result)) {
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||||
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"),"200")) {
|
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"),"200")) {
|
||||||
this.writing(this.mode);
|
this.writing(8);
|
||||||
this.setResultSucess(true);
|
this.setResultSucess(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,10 +86,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
String producetask_id = (String) jsonObject.get("producetask_id");
|
String producetask_id = (String) jsonObject.get("producetask_id");
|
||||||
String material_id = "";
|
String material_id = "";
|
||||||
JSONObject materialObj = WQLObject.getWQLObject("md_me_material").query("material_code ='" + material_code + "'").uniqueResult(0);
|
JSONObject materialObj = WQLObject.getWQLObject("md_me_material").query("material_code ='" + material_code + "'").uniqueResult(0);
|
||||||
if (StrUtil.isEmpty(material_code) && (!StrUtil.equals(device_code, "CYSSX101"))) {
|
if (StrUtil.isEmpty(material_code) && (!StrUtil.equals(device_code, "CYSSX101"))
|
||||||
|
&& !StrUtil.equals(device_code.substring(0,4), "BTHC")) {
|
||||||
throw new BadRequestException("物料不能为空!");
|
throw new BadRequestException("物料不能为空!");
|
||||||
}
|
}
|
||||||
if (!StrUtil.equals(device_code, "CYSSX101")) {
|
if (!StrUtil.equals(device_code, "CYSSX101") && !StrUtil.equals(device_code.substring(0,4), "BTHC")) {
|
||||||
material_id = materialObj.getString("material_id");
|
material_id = materialObj.getString("material_id");
|
||||||
}
|
}
|
||||||
//如果是出窑输送线 要从组盘表里面去找物料
|
//如果是出窑输送线 要从组盘表里面去找物料
|
||||||
@@ -142,13 +143,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
if (StrUtil.equals("1", is_full) && StrUtil.equals(area_type, AreaEnum.FJQY.getCode())) {
|
if (StrUtil.equals("1", is_full) && StrUtil.equals(area_type, AreaEnum.FJQY.getCode())) {
|
||||||
String vehicle_code = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0).getString("vehicle_code");
|
String vehicle_code = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0).getString("vehicle_code");
|
||||||
jsonObject.put("vehicle_code", vehicle_code);
|
jsonObject.put("vehicle_code", vehicle_code);
|
||||||
|
if (StrUtil.isEmpty(vehicle_code)) {
|
||||||
|
throw new BadRequestException("当前点位载具号为空!");
|
||||||
|
}
|
||||||
toPackIngTask.createTask((JSONObject) JSON.toJSON(jsonObject));
|
toPackIngTask.createTask((JSONObject) JSON.toJSON(jsonObject));
|
||||||
|
|
||||||
//生成到包装位的任务时,下发托盘类型给RGV
|
//生成到包装位的任务时,下发托盘类型给RGV
|
||||||
JSONObject vehicleObj = WQLObject.getWQLObject("st_buss_vehiclegroup").query("vehicle_code='" + vehicle_code + "'", "create_time desc").uniqueResult(0);
|
JSONObject vehicleObj = WQLObject.getWQLObject("md_pb_vehicle").query("vehicle_code='" + vehicle_code + "'", "create_time desc").uniqueResult(0);
|
||||||
String material_id1 = vehicleObj.getString("material_id");
|
String vehicle_type = vehicleObj.getString("vehicle_type");
|
||||||
JSONObject materiralObj1 = WQLObject.getWQLObject("md_me_material").query("material_id = '" + material_id1 + "'").uniqueResult(0);
|
|
||||||
String vehicle_type = materiralObj1.getString("vehicle_type");
|
|
||||||
if (vehicle_type.equals("03")) {
|
if (vehicle_type.equals("03")) {
|
||||||
vehicle_type = "1";
|
vehicle_type = "1";
|
||||||
} else if (vehicle_type.equals("04")) {
|
} else if (vehicle_type.equals("04")) {
|
||||||
|
|||||||
@@ -139,6 +139,9 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
|||||||
//根据物料去找木托盘类型
|
//根据物料去找木托盘类型
|
||||||
JSONObject materialObj = WQLObject.getWQLObject("md_me_material").query("material_id = '" + material_id + "'").uniqueResult(0);
|
JSONObject materialObj = WQLObject.getWQLObject("md_me_material").query("material_id = '" + material_id + "'").uniqueResult(0);
|
||||||
String vehicle_type = materialObj.getString("vehicle_type");
|
String vehicle_type = materialObj.getString("vehicle_type");
|
||||||
|
if (StrUtil.isEmpty(vehicle_type)) {
|
||||||
|
throw new RuntimeException("木托盘类型不可为空!");
|
||||||
|
}
|
||||||
dto.setVehicle_type(vehicle_type);
|
dto.setVehicle_type(vehicle_type);
|
||||||
dto.setProducetask_id(IdUtil.getSnowflake(1, 1).nextId());
|
dto.setProducetask_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||||
dto.setProducetask_code(CodeUtil.getNewCode("PRODUCE_CODE"));
|
dto.setProducetask_code(CodeUtil.getNewCode("PRODUCE_CODE"));
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class AutoOutStructTask {
|
|||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("flag", "9");
|
param.put("flag", "9");
|
||||||
param.put("area_type", "01");
|
param.put("area_type", "01");
|
||||||
// param.put("if_full", "1");
|
param.put("if_full", "1");
|
||||||
param.put("material_type", line.getString("material_type"));
|
param.put("material_type", line.getString("material_type"));
|
||||||
String lineMaterialCode = line.getString("material_code");
|
String lineMaterialCode = line.getString("material_code");
|
||||||
if (StrUtil.isNotEmpty(lineMaterialCode) && !StrUtil.equals(lineMaterialCode, "0")) {
|
if (StrUtil.isNotEmpty(lineMaterialCode) && !StrUtil.equals(lineMaterialCode, "0")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user