更新
This commit is contained in:
@@ -86,10 +86,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
String producetask_id = (String) jsonObject.get("producetask_id");
|
||||
String material_id = "";
|
||||
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("物料不能为空!");
|
||||
}
|
||||
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");
|
||||
}
|
||||
//如果是出窑输送线 要从组盘表里面去找物料
|
||||
@@ -142,13 +143,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
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");
|
||||
jsonObject.put("vehicle_code", vehicle_code);
|
||||
if (StrUtil.isEmpty(vehicle_code)) {
|
||||
throw new BadRequestException("当前点位载具号为空!");
|
||||
}
|
||||
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");
|
||||
JSONObject vehicleObj = WQLObject.getWQLObject("md_pb_vehicle").query("vehicle_code='" + vehicle_code + "'", "create_time desc").uniqueResult(0);
|
||||
String vehicle_type = vehicleObj.getString("vehicle_type");
|
||||
if (vehicle_type.equals("03")) {
|
||||
vehicle_type = "1";
|
||||
} 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);
|
||||
String vehicle_type = materialObj.getString("vehicle_type");
|
||||
if (StrUtil.isEmpty(vehicle_type)) {
|
||||
throw new RuntimeException("木托盘类型不可为空!");
|
||||
}
|
||||
dto.setVehicle_type(vehicle_type);
|
||||
dto.setProducetask_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||
dto.setProducetask_code(CodeUtil.getNewCode("PRODUCE_CODE"));
|
||||
|
||||
@@ -72,7 +72,7 @@ public class AutoOutStructTask {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("flag", "9");
|
||||
param.put("area_type", "01");
|
||||
// param.put("if_full", "1");
|
||||
param.put("if_full", "1");
|
||||
param.put("material_type", line.getString("material_type"));
|
||||
String lineMaterialCode = line.getString("material_code");
|
||||
if (StrUtil.isNotEmpty(lineMaterialCode) && !StrUtil.equals(lineMaterialCode, "0")) {
|
||||
|
||||
Reference in New Issue
Block a user