更新
This commit is contained in:
@@ -1164,7 +1164,6 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
|
||||
} else {
|
||||
this.instruction_require_time = date;
|
||||
JSONObject json = new JSONObject();
|
||||
this.instruction_require_time = date;
|
||||
String linkobj = (String)this.getDevice().getExtraValue().get("link_device_code");
|
||||
String demosub = linkobj.substring(1,linkobj.length()-1);
|
||||
String demoArray[] = demosub.split(",");
|
||||
|
||||
@@ -40,6 +40,7 @@ public class ItemProtocol {
|
||||
public static String item_to_task2 = "to_task2";
|
||||
public static String item_to_onset2 = "to_onset2";
|
||||
public static String item_to_target2 = "to_target2";
|
||||
public static String item_to_container_type = "to_container_type";
|
||||
|
||||
private LnshRGVDeviceDriver driver;
|
||||
|
||||
@@ -159,6 +160,10 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_to_task2);
|
||||
}
|
||||
|
||||
public int getTo_container_type() {
|
||||
return this.getOpcIntegerValue(item_to_container_type);
|
||||
}
|
||||
|
||||
//是否有货
|
||||
public int hasGoods(int move) {
|
||||
return move;
|
||||
@@ -224,6 +229,7 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_to_onset2, "下发起始站", "DB51.W12"));
|
||||
list.add(new ItemDto(item_to_target2, "下发目标站", "DB51.W14"));
|
||||
list.add(new ItemDto(item_to_task2, "下发任务号2", "DB51.D16"));
|
||||
list.add(new ItemDto(item_to_container_type, "下发托盘类型", "DB51.W20"));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -567,7 +567,7 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
json.put("type","2");
|
||||
json.put("is_full","1");
|
||||
|
||||
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
|
||||
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"),"200")) {
|
||||
@@ -626,7 +626,7 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
json.put("type",type);
|
||||
// json.put("material",material);
|
||||
json.put("vehicle_code",this.autoGenericCode(String.valueOf(barcode)));
|
||||
// json.put("is_full","1");
|
||||
json.put("is_full","1");
|
||||
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
|
||||
@@ -423,6 +423,9 @@ export default {
|
||||
} else if (val === 'walk_y') {
|
||||
const obj = { name: '行走列', value: data[val] }
|
||||
arr.push(obj)
|
||||
} else if (val === 'task') {
|
||||
const obj = { name: '任务号', value: data[val] }
|
||||
arr.push(obj)
|
||||
} else if (val === 'task1') {
|
||||
const obj = { name: '前工位任务号', value: data[val] }
|
||||
arr.push(obj)
|
||||
|
||||
@@ -72,6 +72,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
throw new BadRequestException("类型不能为空!");
|
||||
}
|
||||
WQLObject pointTable = WQLObject.getWQLObject("sch_base_point");
|
||||
WQLObject structivtTable = WQLObject.getWQLObject("st_ivt_structivt");
|
||||
switch (type) {
|
||||
//送料入库
|
||||
case "1":
|
||||
@@ -142,11 +143,62 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
String vehicle_code = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0).getString("vehicle_code");
|
||||
jsonObject.put("vehicle_code", vehicle_code);
|
||||
toPackIngTask.createTask((JSONObject) JSON.toJSON(jsonObject));
|
||||
|
||||
//生成到包装位的任务时,下发托盘类型给RGV
|
||||
JSONObject vehicleObj = WQLObject.getWQLObject("st_buss_vehiclegroup").query("vehicle_code='" + vehicle_code + "'", "create_time desc").uniqueResult(0);
|
||||
String material_id1 = vehicleObj.getString("material_id");
|
||||
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")) {
|
||||
vehicle_type = "1";
|
||||
} else if (vehicle_type.equals("04")) {
|
||||
vehicle_type = "2";
|
||||
} else if (vehicle_type.equals("05")) {
|
||||
vehicle_type = "3";
|
||||
} else if (vehicle_type.equals("06")) {
|
||||
vehicle_type = "4";
|
||||
} else if (vehicle_type.equals("07")) {
|
||||
vehicle_type = "5";
|
||||
}
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
JSONArray array = new JSONArray();
|
||||
jsonObject1.put("device_code","RGV2");
|
||||
jsonObject1.put("code","to_container_type");
|
||||
jsonObject1.put("value",vehicle_type);
|
||||
array.add(jsonObject1);
|
||||
try {
|
||||
wmsToAcsServiceImpl.action(array);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
//假如是半托缓存的几个位置,强制去包装
|
||||
if (StrUtil.equals(area_type, AreaEnum.MTPQ.getCode())) {
|
||||
fmjToPackIngTask.createTask((JSONObject) JSON.toJSON(jsonObject));
|
||||
//生成到包装位的任务时,下发托盘类型给RGV
|
||||
String point_id = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0).getString("point_id");
|
||||
material_id = structivtTable.query("point_id ='" + point_id + "'").uniqueResult(0).getString("material_id");
|
||||
JSONObject materiralObj1 = WQLObject.getWQLObject("md_me_material").query("material_id = '" + material_id + "'").uniqueResult(0);
|
||||
String vehicle_type = materiralObj1.getString("vehicle_type");
|
||||
if (vehicle_type.equals("03")) {
|
||||
vehicle_type = "1";
|
||||
} else if (vehicle_type.equals("04")) {
|
||||
vehicle_type = "2";
|
||||
} else if (vehicle_type.equals("05")) {
|
||||
vehicle_type = "3";
|
||||
} else if (vehicle_type.equals("06")) {
|
||||
vehicle_type = "4";
|
||||
} else if (vehicle_type.equals("07")) {
|
||||
vehicle_type = "5";
|
||||
}
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
JSONArray array = new JSONArray();
|
||||
jsonObject1.put("device_code","RGV2");
|
||||
jsonObject1.put("code","to_container_type");
|
||||
jsonObject1.put("value",vehicle_type);
|
||||
array.add(jsonObject1);
|
||||
wmsToAcsServiceImpl.action(array);
|
||||
}
|
||||
//假如是分拣机械手的下料位置,则需要将点位上的托盘号写入
|
||||
if (StrUtil.equals(area_type, AreaEnum.FJQY.getCode())) {
|
||||
|
||||
Reference in New Issue
Block a user