修改
This commit is contained in:
@@ -96,7 +96,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
|||||||
UserStorServiceImpl userStorService = new UserStorServiceImpl();
|
UserStorServiceImpl userStorService = new UserStorServiceImpl();
|
||||||
String in_stor_id = userStorService.getInStor();
|
String in_stor_id = userStorService.getInStor();
|
||||||
|
|
||||||
if (ObjectUtil.isNotEmpty(in_stor_id)) map.put("in_stor_id",in_stor_id);
|
if (ObjectUtil.isNotEmpty(in_stor_id)) map.put("in_stor_id", in_stor_id);
|
||||||
|
|
||||||
JSONObject jo = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "bill_code desc");
|
JSONObject jo = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "bill_code desc");
|
||||||
return jo;
|
return jo;
|
||||||
@@ -192,14 +192,14 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
|||||||
|
|
||||||
//判断该木箱是否已经生成入库单
|
//判断该木箱是否已经生成入库单
|
||||||
//判断该载具是否已经分配货位或者起点
|
//判断该载具是否已经分配货位或者起点
|
||||||
JSONArray now_dis_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag","18").addParam("box_no",row.get("package_box_sn")).process().getResultJSONArray(0);
|
JSONArray now_dis_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag", "18").addParam("box_no", row.get("package_box_sn")).process().getResultJSONArray(0);
|
||||||
if (now_dis_rows.size() > 0) {
|
if (now_dis_rows.size() > 0) {
|
||||||
throw new BadRequestException("该木箱已经分配过货位,无法继续分配!");
|
throw new BadRequestException("该木箱已经分配过货位,无法继续分配!");
|
||||||
}
|
}
|
||||||
//判断该木箱是否已经存在库内
|
//判断该木箱是否已经存在库内
|
||||||
JSONObject str_jo = WQLObject.getWQLObject("st_ivt_structattr").query("storagevehicle_code = '"+row.get("package_box_sn")+"'").uniqueResult(0);
|
JSONObject str_jo = WQLObject.getWQLObject("st_ivt_structattr").query("storagevehicle_code = '" + row.get("package_box_sn") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(str_jo)){
|
if (ObjectUtil.isNotEmpty(str_jo)) {
|
||||||
throw new BadRequestException("木箱:"+row.get("package_box_sn")+"已存在库内,请对数据进行核实!");
|
throw new BadRequestException("木箱:" + row.get("package_box_sn") + "已存在库内,请对数据进行核实!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -332,7 +332,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
|||||||
HashMap<String, String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
if (whereJson.get("bill_type").equals("0003")) {
|
if (whereJson.get("bill_type").equals("0003")) {
|
||||||
map.put("status", "3");
|
map.put("status", "3");
|
||||||
}else {
|
} else {
|
||||||
map.put("status", "0");
|
map.put("status", "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -464,7 +464,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
|||||||
HashMap<String, String> map = rows.get(0);
|
HashMap<String, String> map = rows.get(0);
|
||||||
|
|
||||||
//判断该载具是否已经分配货位或者起点
|
//判断该载具是否已经分配货位或者起点
|
||||||
JSONArray now_dis_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag","17").addParam("box_no",map.get("box_no")).process().getResultJSONArray(0);
|
JSONArray now_dis_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag", "17").addParam("box_no", map.get("box_no")).process().getResultJSONArray(0);
|
||||||
if (now_dis_rows.size() > 0) {
|
if (now_dis_rows.size() > 0) {
|
||||||
throw new BadRequestException("该木箱已经分配过货位,无法继续分配!");
|
throw new BadRequestException("该木箱已经分配过货位,无法继续分配!");
|
||||||
}
|
}
|
||||||
@@ -485,17 +485,18 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
|||||||
JSONObject jo_form = new JSONObject();
|
JSONObject jo_form = new JSONObject();
|
||||||
jo_form.put("box_no", map.get("box_no"));
|
jo_form.put("box_no", map.get("box_no"));
|
||||||
JSONObject struct_jo = new JSONObject();
|
JSONObject struct_jo = new JSONObject();
|
||||||
if (whereJson.containsKey("sect_id")){
|
if (whereJson.containsKey("sect_id")) {
|
||||||
String need_sect = (String) whereJson.get("sect_id");
|
String need_sect = (String) whereJson.get("sect_id");
|
||||||
if (StrUtil.isNotEmpty(need_sect)){
|
JSONObject need_sect_jo = WQLObject.getWQLObject("st_ivt_sectattr").query("sect_id = '" + need_sect + "'").uniqueResult(0);
|
||||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("sect_id = '"+need_sect+"' AND lock_type = '1' AND is_delete = '0' AND IFNULL( storagevehicle_code, '' ) = ''").uniqueResult(0);
|
//判断是否为主存区,主存区调用自动分配,虚拟区调用普通查询
|
||||||
}else {
|
if (StrUtil.isNotEmpty(need_sect) && !need_sect_jo.getString("sect_type_attr").equals("00")) {
|
||||||
jo_form.put("sect_id", "1582991348217286656");
|
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("sect_id = '" + need_sect + "' AND lock_type = '1' AND is_delete = '0' AND IFNULL( storagevehicle_code, '' ) = ''").uniqueResult(0);
|
||||||
|
} else {
|
||||||
|
jo_form.put("sect_id", whereJson.get("sect_id"));
|
||||||
struct_jo = this.autoDis(jo_form);
|
struct_jo = this.autoDis(jo_form);
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
jo_form.put("sect_id", "1582991348217286656");
|
throw new BadRequestException("请选择需要分配的库区!");
|
||||||
struct_jo = this.autoDis(jo_form);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -452,7 +452,7 @@
|
|||||||
GROUP BY
|
GROUP BY
|
||||||
sa2.block_num,sa2.row_num,sa2.placement_type
|
sa2.block_num,sa2.row_num,sa2.placement_type
|
||||||
ORDER BY
|
ORDER BY
|
||||||
sa.placement_type desc,num
|
sa2.placement_type desc,num
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
Reference in New Issue
Block a user