Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -15,6 +15,7 @@ import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hongxiang_conveyor.HongXiangStationDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hongxiang_device.HongXiangConveyorDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.photoelectric_inspection_site.PhotoelectricInspectionSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
@@ -194,7 +195,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
int door = hongXiangConveyorDeviceDriver.getDoor();
|
||||
int action = hongXiangConveyorDeviceDriver.getAction();
|
||||
int error1 = hongXiangConveyorDeviceDriver.getError1();
|
||||
if (mode == 1 && door == 1 && action == 1 && error1 == 0) {
|
||||
int move = hongXiangConveyorDeviceDriver.getMove();
|
||||
if (mode == 1 && door == 1 && action == 1 && error1 == 0 && move == 1) {
|
||||
if (this.getNow_steps_type() == 2) {
|
||||
this.writing("to_command", "2");
|
||||
this.setNow_steps_type(3);
|
||||
@@ -213,6 +215,9 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
if (action != 1) {
|
||||
feedMessage = feedMessage + "允许取放(action)信号未允许取放,";
|
||||
}
|
||||
if (move != 1){
|
||||
feedMessage = feedMessage + "取货位光电信号(move)不应该为无货状态,";
|
||||
}
|
||||
if (error1 != 0) {
|
||||
feedMessage = feedMessage + "故障(error1)信号出现故障,故障值:" + error1 + "。";
|
||||
}
|
||||
@@ -287,6 +292,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
String next_device_code = instructionDto.getNext_device_code();
|
||||
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
|
||||
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
||||
PhotoelectricInspectionSiteDeviceDriver photoelectricInspectionSiteDeviceDriver;
|
||||
if (nextDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
||||
//hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||
@@ -294,7 +300,38 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
int door = hongXiangConveyorDeviceDriver.getDoor();
|
||||
int action = hongXiangConveyorDeviceDriver.getAction();
|
||||
int error1 = hongXiangConveyorDeviceDriver.getError1();
|
||||
if (mode == 1 && door == 1 && action == 1 && error1 == 0) {
|
||||
int move = hongXiangConveyorDeviceDriver.getMove();
|
||||
if (mode == 1 && door == 1 && action == 1 && error1 == 0 && move == 0) {
|
||||
if (this.getNow_steps_type() == 4) {
|
||||
this.writing("to_command", "4");
|
||||
this.setNow_steps_type(5);
|
||||
} else {
|
||||
feedMessage = "未反馈电气信号原因:当前步骤不为允许放货(now_steps_type!=4)";
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "未反馈电气信号原因:当前步骤不为允许放货(now_steps_type!=4)");
|
||||
}
|
||||
} else {
|
||||
if (this.getNow_steps_type() == 4) {
|
||||
feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code();
|
||||
if (mode != 1) {
|
||||
feedMessage = feedMessage + "工作模式(mode)信号未联机,";
|
||||
}
|
||||
if (door != 1) {
|
||||
feedMessage = feedMessage + "门状态(door)信号未开门,";
|
||||
}
|
||||
if (action != 1) {
|
||||
feedMessage = feedMessage + "允许取放(action)信号未允许取放,";
|
||||
}
|
||||
if (move != 0) {
|
||||
feedMessage = feedMessage + "放货位光电信号不应该为有货状态";
|
||||
}
|
||||
if (error1 != 0) {
|
||||
feedMessage = feedMessage + "故障(error1)信号出现故障。";
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (nextDevice.getDeviceDriver() instanceof PhotoelectricInspectionSiteDeviceDriver){
|
||||
photoelectricInspectionSiteDeviceDriver = (PhotoelectricInspectionSiteDeviceDriver) device.getDeviceDriver();
|
||||
if (photoelectricInspectionSiteDeviceDriver.getMove() == 0){
|
||||
if (this.getNow_steps_type() == 4) {
|
||||
this.writing("to_command", "4");
|
||||
this.setNow_steps_type(5);
|
||||
@@ -302,26 +339,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "未反馈电气信号原因:当前步骤不为允许放货(now_steps_type!=4)");
|
||||
}
|
||||
} else {
|
||||
feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code();
|
||||
if (mode != 1) {
|
||||
feedMessage = feedMessage + "工作模式(mode)信号未联机,";
|
||||
if (this.getNow_steps_type() == 4) {
|
||||
if (photoelectricInspectionSiteDeviceDriver.getMove() != 0){
|
||||
feedMessage = "烘箱对接位有货不允许放货!";
|
||||
}
|
||||
}
|
||||
if (door != 1) {
|
||||
feedMessage = feedMessage + "门状态(door)信号未开门,";
|
||||
}
|
||||
if (action != 1) {
|
||||
feedMessage = feedMessage + "允许取放(action)信号未允许取放,";
|
||||
}
|
||||
if (error1 != 0) {
|
||||
feedMessage = feedMessage + "故障(error1)信号出现故障。";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.getNow_steps_type() == 4) {
|
||||
this.writing("to_command", "4");
|
||||
this.setNow_steps_type(5);
|
||||
} else {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "未反馈电气信号原因:当前步骤不为允许放货(now_steps_type!=4)");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -578,6 +578,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
data.put("box_width", box_width);
|
||||
data.put("box_high", box_high);
|
||||
data.put("bundle_times", 2);
|
||||
|
||||
/* Double box_length_value = Double.valueOf(box_length);
|
||||
if (box_length_value >= 772) {
|
||||
data.put("bundle_times", 3);
|
||||
} else {
|
||||
data.put("bundle_times", 2);
|
||||
}*/
|
||||
|
||||
result.put("data", data);
|
||||
} else if (type.equals("3")) {
|
||||
//烘箱出箱任务
|
||||
|
||||
@@ -13,10 +13,12 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.system.service.ParamService;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.nl.wms.ext.acs.service.impl.AcsToWmsServiceImpl;
|
||||
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl;
|
||||
import org.nl.wms.pda.st.service.CoolInService;
|
||||
@@ -152,9 +154,21 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
||||
Double box_length = sub_jo.getDoubleValue("box_length");
|
||||
Double box_width = sub_jo.getDoubleValue("box_width");
|
||||
Double box_high = sub_jo.getDoubleValue("box_high");
|
||||
|
||||
// 木箱长、宽、高不能为0
|
||||
if (box_length <= 0 || box_width <= 0 || box_high <= 0) {
|
||||
throw new BadRequestException("该木箱没有长宽高信息,无法入库,请到子卷包装关系中维护!");
|
||||
}
|
||||
// 木箱尺寸长度低于950的不入立体库,长度大于1385的立体库无法入库
|
||||
String length_up = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_length_up").getValue();
|
||||
String length_down = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_length_down").getValue();
|
||||
Double box_length_up = Double.valueOf(length_up);
|
||||
Double box_length_down = Double.valueOf(length_down);
|
||||
|
||||
if (!(box_length_down <= box_length && box_length <= box_length_up)) {
|
||||
throw new BadRequestException("无法入立体,木箱长度为:"+box_length);
|
||||
}
|
||||
|
||||
JSONObject point_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + point_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(point_jo)) {
|
||||
throw new BadRequestException("未查询到对应的点位!");
|
||||
@@ -291,9 +305,16 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
||||
String to_length = sub_jo.getString("box_length"); // 长
|
||||
String to_weight = sub_jo.getString("box_width"); // 宽
|
||||
String to_height = sub_jo.getString("box_high"); // 高
|
||||
String to_strap_times = "2"; // 捆扎次数
|
||||
String to_strap_times = ""; // 捆扎次数
|
||||
String to_command = "4"; // 指令
|
||||
|
||||
Double box_length_value = Double.valueOf(to_length);
|
||||
if (box_length_value >= 772) {
|
||||
to_strap_times = "3";
|
||||
} else {
|
||||
to_strap_times = "2";
|
||||
}
|
||||
|
||||
JSONArray array = new JSONArray();
|
||||
|
||||
JSONObject jsonLength = new JSONObject();
|
||||
|
||||
@@ -928,22 +928,62 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
}
|
||||
} else {
|
||||
//如果查询不到空的一排,则查询有空位双通的一排
|
||||
JSONObject have_row = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("sect_id", sect_id).addParam("flag", "14").addParam("sql_str", " ORDER BY abs(" + box_num + "-a.struct_num)").process().uniqueResult(0);
|
||||
JSONArray haveArr = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("sect_id", sect_id).addParam("flag", "14").addParam("sql_str", " ORDER BY abs(" + box_num + "-a.struct_num)").process().getResultJSONArray(0);
|
||||
|
||||
for (int j = 0; j < haveArr.size(); j++) {
|
||||
JSONObject have_row = haveArr.getJSONObject(j);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(have_row)) {
|
||||
String block_num3 = have_row.getString("block_num");
|
||||
String row_num3 = have_row.getString("row_num");
|
||||
|
||||
//判断该排是左边为空,还是右边为空
|
||||
JSONObject right_str = WQLObject.getWQLObject("st_ivt_structattr").query("block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' order by out_order_seq").uniqueResult(0);
|
||||
JSONObject left_str = WQLObject.getWQLObject("st_ivt_structattr").query("block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' order by out_order_seq desc").uniqueResult(0);
|
||||
if (StrUtil.isNotEmpty(right_str.getString("storagevehicle_code")) || !right_str.getString("lock_type").equals("1")) {
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq").uniqueResult(0);
|
||||
break;
|
||||
}
|
||||
if (StrUtil.isNotEmpty(left_str.getString("storagevehicle_code")) || !left_str.getString("lock_type").equals("1")) {
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq desc").uniqueResult(0);
|
||||
break;
|
||||
JSONArray isLock2 = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type not in ('1','2','7') AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1'").getResultJSONArray(0);
|
||||
|
||||
if (ObjectUtil.isEmpty(isLock2)) {
|
||||
// 先倒序找到第一个木箱、判断上一个是否有货位
|
||||
JSONObject jsonDescBox2 = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') <> '' order by out_order_seq DESC").uniqueResult(0);
|
||||
|
||||
JSONObject jsonDescStruct2 = new JSONObject();
|
||||
if (ObjectUtil.isNotEmpty(jsonDescBox2)) {
|
||||
String out_order_seq = jsonDescBox2.getString("out_order_seq");
|
||||
jsonDescStruct2 = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq > '" + out_order_seq + "' order by out_order_seq ASC").uniqueResult(0);
|
||||
} else {
|
||||
// 先倒序找到第一个入库锁或者移库锁、判断上一个是否有货位
|
||||
JSONObject jsonDescEmpStruct = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type in ('2','7') AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq DESC").uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(jsonDescEmpStruct)) {
|
||||
String out_order_seq = jsonDescEmpStruct.getString("out_order_seq");
|
||||
jsonDescStruct2 = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq > '" + out_order_seq + "' order by out_order_seq ASC").uniqueResult(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(jsonDescStruct2)) {
|
||||
struct_jo = jsonDescStruct2;
|
||||
break;
|
||||
} else {
|
||||
// 没有就正序找到第一个物料、判断上一个是否有货位
|
||||
JSONObject jsonAscBox2 = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') <> '' order by out_order_seq ASC").uniqueResult(0);
|
||||
|
||||
JSONObject jsonAscStruct2 = new JSONObject();
|
||||
if (ObjectUtil.isNotEmpty(jsonAscBox2)) {
|
||||
String out_order_seq2 = jsonAscBox2.getString("out_order_seq");
|
||||
// 上一个货位顺序号
|
||||
jsonAscStruct2 = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq < '" + out_order_seq2 + "' order by out_order_seq DESC").uniqueResult(0);
|
||||
} else {
|
||||
JSONObject jsonAscEmpStruct = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type in ('2','7') AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq ASC").uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(jsonAscEmpStruct)) {
|
||||
String out_order_seq2 = jsonAscEmpStruct.getString("out_order_seq");
|
||||
jsonAscStruct2 = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq < '" + out_order_seq2 + "' order by out_order_seq DESC").uniqueResult(0);
|
||||
}
|
||||
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(jsonAscStruct2)) {
|
||||
struct_jo = jsonAscStruct2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -987,20 +1027,61 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
} else {
|
||||
|
||||
//如果查询不到空的一排,则查询有空位双通的一排
|
||||
JSONObject have_row = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("sect_id", sect_id).addParam("flag", "14").addParam("sql_str", " ORDER BY abs(" + box_num + "-a.struct_num)").process().uniqueResult(0);
|
||||
JSONArray haveArr = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("sect_id", sect_id).addParam("flag", "14").addParam("sql_str", " ORDER BY abs(" + box_num + "-a.struct_num)").process().getResultJSONArray(0);
|
||||
for (int j = 0; j < haveArr.size(); j++) {
|
||||
JSONObject have_row = haveArr.getJSONObject(j);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(have_row)) {
|
||||
String block_num = have_row.getString("block_num");
|
||||
String row_num = have_row.getString("row_num");
|
||||
String block_num3 = have_row.getString("block_num");
|
||||
String row_num3 = have_row.getString("row_num");
|
||||
|
||||
//判断该排是左边为空,还是右边为空
|
||||
JSONObject right_str = WQLObject.getWQLObject("st_ivt_structattr").query("block_num = '" + block_num + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' order by out_order_seq").uniqueResult(0);
|
||||
JSONObject left_str = WQLObject.getWQLObject("st_ivt_structattr").query("block_num = '" + block_num + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' order by out_order_seq desc").uniqueResult(0);
|
||||
if (StrUtil.isNotEmpty(right_str.getString("storagevehicle_code")) || !right_str.getString("lock_type").equals("1")) {
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq").uniqueResult(0);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(left_str.getString("storagevehicle_code")) || !left_str.getString("lock_type").equals("1")) {
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq desc").uniqueResult(0);
|
||||
JSONArray isLock2 = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type not in ('1','2','7') AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1'").getResultJSONArray(0);
|
||||
|
||||
if (ObjectUtil.isEmpty(isLock2)) {
|
||||
// 先倒序找到第一个木箱、判断上一个是否有货位
|
||||
JSONObject jsonDescBox2 = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') <> '' order by out_order_seq DESC").uniqueResult(0);
|
||||
|
||||
JSONObject jsonDescStruct2 = new JSONObject();
|
||||
if (ObjectUtil.isNotEmpty(jsonDescBox2)) {
|
||||
String out_order_seq = jsonDescBox2.getString("out_order_seq");
|
||||
jsonDescStruct2 = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq > '" + out_order_seq + "' order by out_order_seq ASC").uniqueResult(0);
|
||||
} else {
|
||||
// 先倒序找到第一个入库锁或者移库锁、判断上一个是否有货位
|
||||
JSONObject jsonDescEmpStruct = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type in ('2','7') AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq DESC").uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(jsonDescEmpStruct)) {
|
||||
String out_order_seq = jsonDescEmpStruct.getString("out_order_seq");
|
||||
jsonDescStruct2 = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq > '" + out_order_seq + "' order by out_order_seq ASC").uniqueResult(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(jsonDescStruct2)) {
|
||||
struct_jo = jsonDescStruct2;
|
||||
break;
|
||||
} else {
|
||||
// 没有就正序找到第一个物料、判断上一个是否有货位
|
||||
JSONObject jsonAscBox2 = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') <> '' order by out_order_seq ASC").uniqueResult(0);
|
||||
|
||||
JSONObject jsonAscStruct2 = new JSONObject();
|
||||
if (ObjectUtil.isNotEmpty(jsonAscBox2)) {
|
||||
String out_order_seq2 = jsonAscBox2.getString("out_order_seq");
|
||||
// 上一个货位顺序号
|
||||
jsonAscStruct2 = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq < '" + out_order_seq2 + "' order by out_order_seq DESC").uniqueResult(0);
|
||||
} else {
|
||||
JSONObject jsonAscEmpStruct = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type in ('2','7') AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq ASC").uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(jsonAscEmpStruct)) {
|
||||
String out_order_seq2 = jsonAscEmpStruct.getString("out_order_seq");
|
||||
jsonAscStruct2 = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num3 + "' AND row_num = '" + row_num3 + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq < '" + out_order_seq2 + "' order by out_order_seq DESC").uniqueResult(0);
|
||||
}
|
||||
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(jsonAscStruct2)) {
|
||||
struct_jo = jsonAscStruct2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@
|
||||
OPTION 输入.material_code <> ""
|
||||
mb.material_code = 输入.material_code
|
||||
ENDOPTION
|
||||
OPTION 输入.material_code <> ""
|
||||
OPTION 输入.sale_order_name <> ""
|
||||
sub.sale_order_name = 输入.sale_order_name
|
||||
ENDOPTION
|
||||
GROUP BY
|
||||
@@ -572,6 +572,8 @@
|
||||
st_ivt_structattr sa2
|
||||
WHERE
|
||||
sa2.lock_type = '1'
|
||||
AND sa2.is_used = '1'
|
||||
AND sa2.is_delete = '0'
|
||||
AND IFNULL( sa2.storagevehicle_code, '' ) = ''
|
||||
GROUP BY
|
||||
sa2.block_num,
|
||||
|
||||
@@ -635,8 +635,8 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
||||
if (StrUtil.isNotEmpty(map.get("pcsn"))) {
|
||||
map.put("pcsn", "%" + map.get("pcsn") + "%");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(map.get("sap_pscn"))) {
|
||||
map.put("sap_pscn", "%" + map.get("sap_pscn") + "%");
|
||||
if (StrUtil.isNotEmpty(map.get("sap_pcsn"))) {
|
||||
map.put("sap_pcsn", "%" + map.get("sap_pcsn") + "%");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(map.get("package_box_sn"))) {
|
||||
map.put("package_box_sn", "%" + map.get("package_box_sn") + "%");
|
||||
|
||||
Reference in New Issue
Block a user