修改
This commit is contained in:
@@ -96,7 +96,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
UserStorServiceImpl userStorService = new UserStorServiceImpl();
|
||||
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");
|
||||
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) {
|
||||
throw new BadRequestException("该木箱已经分配过货位,无法继续分配!");
|
||||
}
|
||||
//判断该木箱是否已经存在库内
|
||||
JSONObject str_jo = WQLObject.getWQLObject("st_ivt_structattr").query("storagevehicle_code = '"+row.get("package_box_sn")+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(str_jo)){
|
||||
throw new BadRequestException("木箱:"+row.get("package_box_sn")+"已存在库内,请对数据进行核实!");
|
||||
JSONObject str_jo = WQLObject.getWQLObject("st_ivt_structattr").query("storagevehicle_code = '" + row.get("package_box_sn") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(str_jo)) {
|
||||
throw new BadRequestException("木箱:" + row.get("package_box_sn") + "已存在库内,请对数据进行核实!");
|
||||
}
|
||||
|
||||
|
||||
@@ -332,7 +332,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
if (whereJson.get("bill_type").equals("0003")) {
|
||||
map.put("status", "3");
|
||||
}else {
|
||||
} else {
|
||||
map.put("status", "0");
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
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) {
|
||||
throw new BadRequestException("该木箱已经分配过货位,无法继续分配!");
|
||||
}
|
||||
@@ -485,17 +485,18 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
JSONObject jo_form = new JSONObject();
|
||||
jo_form.put("box_no", map.get("box_no"));
|
||||
JSONObject struct_jo = new JSONObject();
|
||||
if (whereJson.containsKey("sect_id")){
|
||||
if (whereJson.containsKey("sect_id")) {
|
||||
String need_sect = (String) whereJson.get("sect_id");
|
||||
if (StrUtil.isNotEmpty(need_sect)){
|
||||
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", "1582991348217286656");
|
||||
JSONObject need_sect_jo = WQLObject.getWQLObject("st_ivt_sectattr").query("sect_id = '" + need_sect + "'").uniqueResult(0);
|
||||
//判断是否为主存区,主存区调用自动分配,虚拟区调用普通查询
|
||||
if (StrUtil.isNotEmpty(need_sect) && !need_sect_jo.getString("sect_type_attr").equals("00")) {
|
||||
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);
|
||||
}
|
||||
}else {
|
||||
jo_form.put("sect_id", "1582991348217286656");
|
||||
struct_jo = this.autoDis(jo_form);
|
||||
} else {
|
||||
throw new BadRequestException("请选择需要分配的库区!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -452,7 +452,7 @@
|
||||
GROUP BY
|
||||
sa2.block_num,sa2.row_num,sa2.placement_type
|
||||
ORDER BY
|
||||
sa.placement_type desc,num
|
||||
sa2.placement_type desc,num
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
Reference in New Issue
Block a user