Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -23,31 +23,33 @@ public class Init implements ApplicationRunner {
|
|||||||
/* WQLObject tab = WQLObject.getWQLObject("ST_IVT_StructAttr");
|
/* WQLObject tab = WQLObject.getWQLObject("ST_IVT_StructAttr");
|
||||||
WQLObject tab2 = WQLObject.getWQLObject("st_ivt_bsrealstorattr");
|
WQLObject tab2 = WQLObject.getWQLObject("st_ivt_bsrealstorattr");
|
||||||
WQLObject tab3 = WQLObject.getWQLObject("st_ivt_sectattr");
|
WQLObject tab3 = WQLObject.getWQLObject("st_ivt_sectattr");
|
||||||
|
WQLObject tab4 = WQLObject.getWQLObject("sch_base_point");
|
||||||
|
|
||||||
|
|
||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
for (int i = 1; i <= 10000; i++) {
|
for (int i = 1; i <= 2000; i++) {
|
||||||
|
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("struct_id", IdUtil.getSnowflake(1,1).nextId());
|
json.put("struct_id", IdUtil.getSnowflake(1,1).nextId());
|
||||||
|
|
||||||
if (i < 10) {
|
if (i < 10) {
|
||||||
json.put("struct_code", "11-"+"000"+i+"-01");
|
json.put("struct_code", "B01-"+"000"+i+"-01");
|
||||||
json.put("struct_name", "11排"+"000"+i+"列-01层");
|
json.put("struct_name", "B01排"+"000"+i+"列-01层");
|
||||||
|
|
||||||
}else if (i >= 10 && i < 100) {
|
}else if (i >= 10 && i < 100) {
|
||||||
json.put("struct_code", "11-"+"00"+i+"-01");
|
json.put("struct_code", "B01-"+"00"+i+"-01");
|
||||||
json.put("struct_name", "11排"+"00"+i+"列-01层");
|
json.put("struct_name", "B01排"+"00"+i+"列-01层");
|
||||||
}else if (i >= 100 && i < 1000) {
|
}else if (i >= 100 && i < 1000) {
|
||||||
json.put("struct_code", "11-"+"0"+i+"-01");
|
json.put("struct_code", "B01-"+"0"+i+"-01");
|
||||||
json.put("struct_name", "11排"+"0"+i+"列-01层");
|
json.put("struct_name", "B01排"+"0"+i+"列-01层");
|
||||||
} else {
|
} else {
|
||||||
json.put("struct_code", "11-"+i+"-01");
|
json.put("struct_code", "B01-"+i+"-01");
|
||||||
json.put("struct_name", "11排"+i+"列-01层");
|
json.put("struct_name", "B01排"+i+"列-01层");
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = tab2.query("stor_id = '1597073830499717120'").uniqueResult(0);
|
JSONObject jsonObject = tab2.query("stor_id = '1582991156504039455'").uniqueResult(0);
|
||||||
JSONObject jsonObjec2 = tab3.query("stor_id = '1597073830499717120' and sect_code = 'XN11'").uniqueResult(0);
|
JSONObject jsonObjec2 = tab3.query("stor_id = '1582991156504039455' and sect_code = 'BXN01'").uniqueResult(0);
|
||||||
|
|
||||||
|
// 新增仓位
|
||||||
json.put("simple_name", json.getString("struct_name"));
|
json.put("simple_name", json.getString("struct_name"));
|
||||||
json.put("sect_id", jsonObjec2.getString("sect_id"));
|
json.put("sect_id", jsonObjec2.getString("sect_id"));
|
||||||
json.put("sect_code", jsonObjec2.getString("sect_code"));
|
json.put("sect_code", jsonObjec2.getString("sect_code"));
|
||||||
@@ -69,9 +71,39 @@ public class Init implements ApplicationRunner {
|
|||||||
json.put("create_time", now);
|
json.put("create_time", now);
|
||||||
json.put("material_height_type", 1);
|
json.put("material_height_type", 1);
|
||||||
tab.insert(json);
|
tab.insert(json);
|
||||||
}*/
|
|
||||||
|
|
||||||
System.out.println("项目启动成功!");
|
// 新增点位
|
||||||
|
JSONObject jsonPoint = new JSONObject();
|
||||||
|
jsonPoint.put("point_id",IdUtil.getSnowflake(1,1).nextId());
|
||||||
|
jsonPoint.put("point_code", json.getString("struct_code"));
|
||||||
|
jsonPoint.put("point_name", json.getString("struct_name"));
|
||||||
|
jsonPoint.put("region_id", json.getString("sect_id"));
|
||||||
|
jsonPoint.put("region_code", json.getString("sect_code"));
|
||||||
|
jsonPoint.put("region_name", json.getString("sect_name"));
|
||||||
|
jsonPoint.put("point_type", "2");
|
||||||
|
jsonPoint.put("point_status", "1");
|
||||||
|
jsonPoint.put("lock_type", "1");
|
||||||
|
jsonPoint.put("vehicle_max_qty", 0);
|
||||||
|
jsonPoint.put("vehicle_qty", 0);
|
||||||
|
jsonPoint.put("block_num", 1);
|
||||||
|
jsonPoint.put("row_num", 1);
|
||||||
|
jsonPoint.put("col_num", 1);
|
||||||
|
jsonPoint.put("layer_num", 1);
|
||||||
|
jsonPoint.put("in_order_seq", 0);
|
||||||
|
jsonPoint.put("out_order_seq", 0);
|
||||||
|
jsonPoint.put("in_empty_seq", 0);
|
||||||
|
jsonPoint.put("out_empty_seq", 0);
|
||||||
|
jsonPoint.put("is_have_workder", "0");
|
||||||
|
jsonPoint.put("is_used", "1");
|
||||||
|
jsonPoint.put("source_id", json.get("struct_id"));
|
||||||
|
jsonPoint.put("is_delete", "0");
|
||||||
|
jsonPoint.put("create_id", "1");
|
||||||
|
jsonPoint.put("create_name", "管理员");
|
||||||
|
jsonPoint.put("create_time", now);
|
||||||
|
tab4.insert(jsonPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println("项目启动成功!");*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -983,6 +983,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
String box_width = param.getString("Attribute3"); // 木箱料号
|
String box_width = param.getString("Attribute3"); // 木箱料号
|
||||||
String box_high = param.getString("Attribute4"); // 木箱料号
|
String box_high = param.getString("Attribute4"); // 木箱料号
|
||||||
String sub_type = param.getString("Attribute5"); // 包装关系类型
|
String sub_type = param.getString("Attribute5"); // 包装关系类型
|
||||||
|
String ext_code = param.getString("Attribute6"); // 储存地点
|
||||||
JSONArray details = param.getJSONArray("details");
|
JSONArray details = param.getJSONArray("details");
|
||||||
if (ObjectUtil.isEmpty(details)) throw new BadRequestException("明细为空");
|
if (ObjectUtil.isEmpty(details)) throw new BadRequestException("明细为空");
|
||||||
for (int i = 0; i < details.size(); i++) {
|
for (int i = 0; i < details.size(); i++) {
|
||||||
@@ -1033,6 +1034,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
jo.put("standard_limit", standard_limit);
|
jo.put("standard_limit", standard_limit);
|
||||||
jo.put("actual_value", actual_value);
|
jo.put("actual_value", actual_value);
|
||||||
jo.put("quanlity_in_box", QuanlityInBox);
|
jo.put("quanlity_in_box", QuanlityInBox);
|
||||||
|
jo.put("ext_code", ext_code);
|
||||||
if (StrUtil.equals(BoxWeight, "0")) {
|
if (StrUtil.equals(BoxWeight, "0")) {
|
||||||
BoxWeight2 = NumberUtil.add(BoxWeight2, NetWeight).toString();
|
BoxWeight2 = NumberUtil.add(BoxWeight2, NetWeight).toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import org.nl.modules.wql.core.bean.WQLObject;
|
|||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.modules.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||||
|
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
||||||
import org.nl.wms.ext.acs.service.impl.AcsToWmsServiceImpl;
|
import org.nl.wms.ext.acs.service.impl.AcsToWmsServiceImpl;
|
||||||
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl;
|
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl;
|
||||||
import org.nl.wms.pda.st.service.CoolInService;
|
import org.nl.wms.pda.st.service.CoolInService;
|
||||||
@@ -68,6 +69,11 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
JSONArray rows = new JSONArray();
|
JSONArray rows = new JSONArray();
|
||||||
HashMap<String, String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
map.put("box_no", box_no);
|
map.put("box_no", box_no);
|
||||||
|
|
||||||
|
//获取人员对应的仓库
|
||||||
|
UserStorServiceImpl userStorService = new UserStorServiceImpl();
|
||||||
|
String in_stor_id = userStorService.getInStor();
|
||||||
|
|
||||||
if (option.equals("1")) {
|
if (option.equals("1")) {
|
||||||
map.put("flag", "1");
|
map.put("flag", "1");
|
||||||
//如果是报废入库要查询对应的报废出库
|
//如果是报废入库要查询对应的报废出库
|
||||||
@@ -75,6 +81,7 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
}
|
}
|
||||||
if (option.equals("2")) {
|
if (option.equals("2")) {
|
||||||
map.put("flag", "2");
|
map.put("flag", "2");
|
||||||
|
map.put("in_stor_id", in_stor_id);
|
||||||
//查询状态为生成的子卷包装关系对应表
|
//查询状态为生成的子卷包装关系对应表
|
||||||
rows = WQL.getWO("PDA_ST_01").addParamMap(map).process().getResultJSONArray(0);
|
rows = WQL.getWO("PDA_ST_01").addParamMap(map).process().getResultJSONArray(0);
|
||||||
}
|
}
|
||||||
@@ -160,8 +167,18 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//查询成品库仓库
|
|
||||||
JSONObject stor = WQLObject.getWQLObject("st_ivt_bsrealstorattr").query("is_delete = '0' AND is_used = '1' AND is_productstore = '1'").uniqueResult(0);
|
// 判断此木箱是否是二期木箱
|
||||||
|
JSONObject sub_jo = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_SN = '" + box_no + "'").uniqueResult(0);
|
||||||
|
|
||||||
|
//查询仓库
|
||||||
|
JSONObject stor = new JSONObject();
|
||||||
|
if(sub_jo.getString("ext_code").equals("BC01")) {
|
||||||
|
stor = WQLObject.getWQLObject("st_ivt_bsrealstorattr").query("is_delete = '0' AND is_used = '1' AND is_productstore = '0' AND stor_code = 'BC01'").uniqueResult(0);
|
||||||
|
} else {
|
||||||
|
stor = WQLObject.getWQLObject("st_ivt_bsrealstorattr").query("is_delete = '0' AND is_used = '1' AND is_productstore = '1'").uniqueResult(0);
|
||||||
|
}
|
||||||
|
|
||||||
mst_jo.put("stor_id", stor.getString("stor_id"));
|
mst_jo.put("stor_id", stor.getString("stor_id"));
|
||||||
mst_jo.put("stor_code", stor.getString("stor_code"));
|
mst_jo.put("stor_code", stor.getString("stor_code"));
|
||||||
mst_jo.put("stor_name", stor.getString("stor_name"));
|
mst_jo.put("stor_name", stor.getString("stor_name"));
|
||||||
@@ -180,8 +197,9 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
|
|
||||||
//判断是否虚拟
|
//判断是否虚拟
|
||||||
if (!is_virtual.equals("1")) {
|
if (!is_virtual.equals("1")) {
|
||||||
|
if (sub_jo.getString("ext_code").equals("BC01")) throw new BadRequestException("二期仓库木箱,请进行虚拟入库!");
|
||||||
|
|
||||||
//判断是该包装计划是否存在长宽高
|
//判断是该包装计划是否存在长宽高
|
||||||
JSONObject sub_jo = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_SN = '" + box_no + "'").uniqueResult(0);
|
|
||||||
Double box_length = sub_jo.getDoubleValue("box_length");
|
Double box_length = sub_jo.getDoubleValue("box_length");
|
||||||
Double box_width = sub_jo.getDoubleValue("box_width");
|
Double box_width = sub_jo.getDoubleValue("box_width");
|
||||||
Double box_high = sub_jo.getDoubleValue("box_high");
|
Double box_high = sub_jo.getDoubleValue("box_high");
|
||||||
@@ -242,7 +260,12 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
|
|
||||||
String task_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
String task_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||||
//直接分配虚拟区货位,并确认
|
//直接分配虚拟区货位,并确认
|
||||||
JSONObject struct = WQL.getWO("PDA_ST_01").addParam("flag", "3").addParam("stor_id", stor.getString("stor_id")).addParam("sect_id", whereJson.getString("sect_id")).process().uniqueResult(0);
|
JSONObject struct = WQL.getWO("PDA_ST_01")
|
||||||
|
.addParam("flag", "3")
|
||||||
|
.addParam("stor_id", stor.getString("stor_id"))
|
||||||
|
.addParam("sect_id", sub_jo.getString("ext_code").equals("BC01") ? "" : whereJson.getString("sect_id"))
|
||||||
|
.process().uniqueResult(0);
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(struct)){
|
if (ObjectUtil.isEmpty(struct)){
|
||||||
throw new BadRequestException("当前没有可用的空仓位进行入库!");
|
throw new BadRequestException("当前没有可用的空仓位进行入库!");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
输入.point_code TYPEAS s_string
|
输入.point_code TYPEAS s_string
|
||||||
输入.stor_id TYPEAS s_string
|
输入.stor_id TYPEAS s_string
|
||||||
输入.sect_id TYPEAS s_string
|
输入.sect_id TYPEAS s_string
|
||||||
|
输入.in_stor_id TYPEAS f_string
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
@@ -75,10 +77,12 @@
|
|||||||
sub_type
|
sub_type
|
||||||
FROM
|
FROM
|
||||||
pdm_bi_subpackagerelation sub
|
pdm_bi_subpackagerelation sub
|
||||||
|
LEFT JOIN st_ivt_bsrealstorattr attr ON sub.ext_code = attr.ext_id
|
||||||
WHERE
|
WHERE
|
||||||
sub.status = '0'
|
sub.status = '0'
|
||||||
AND
|
AND
|
||||||
sub.package_box_SN = 输入.box_no
|
sub.package_box_SN = 输入.box_no
|
||||||
|
AND attr.stor_id in 输入.in_stor_id
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
|
|
||||||
@@ -103,6 +107,7 @@
|
|||||||
AND dis.work_status < '99'
|
AND dis.work_status < '99'
|
||||||
AND task.task_id IS NULL
|
AND task.task_id IS NULL
|
||||||
AND sub.package_box_SN = 输入.box_no
|
AND sub.package_box_SN = 输入.box_no
|
||||||
|
AND mst.stor_id in 输入.in_stor_id
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
@@ -117,10 +122,17 @@
|
|||||||
WHERE
|
WHERE
|
||||||
se.sect_type_attr = '09'
|
se.sect_type_attr = '09'
|
||||||
AND sa.lock_type = '1'
|
AND sa.lock_type = '1'
|
||||||
AND sa.stor_id = 输入.stor_id
|
|
||||||
AND sa.sect_id = 输入.sect_id
|
|
||||||
AND sa.is_delete = '0'
|
AND sa.is_delete = '0'
|
||||||
AND IFNULL( storagevehicle_code, '' ) = ''
|
AND IFNULL( storagevehicle_code, '' ) = ''
|
||||||
|
|
||||||
|
OPTION 输入.stor_id <> ""
|
||||||
|
sa.stor_id = 输入.stor_id
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.sect_id <> ""
|
||||||
|
sa.sect_id = 输入.sect_id
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
struct_code
|
struct_code
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user