This commit is contained in:
2022-12-10 13:55:39 +08:00
7 changed files with 76 additions and 20 deletions

View File

@@ -747,6 +747,11 @@ public class MesToLmsServiceImpl implements MesToLmsService {
String Description = param.getString("Description"); // 来源卷位置
String DateOfFGInbound = param.getString("DateOfFGInbound"); // 来源卷位置
String BoxWeight = param.getString("BoxWeight"); // 来源卷位置
String BoxWeight2 = "";
if (ObjectUtil.isEmpty(BoxWeight) || param.getIntValue("BoxWeight") == 0) {
BoxWeight2 = "0";
BoxWeight = "0";
}
String box_type = param.getString("Attribute1"); // 木箱料号
String box_length = param.getString("Attribute2"); // 木箱料号
String box_width = param.getString("Attribute3"); // 木箱料号
@@ -784,6 +789,10 @@ public class MesToLmsServiceImpl implements MesToLmsService {
jo.put("box_width", box_width);
jo.put("box_high", box_high);
jo.put("quanlity_in_box", QuanlityInBox);
if (StrUtil.equals(BoxWeight, "0")) {
BoxWeight2 = NumberUtil.add(BoxWeight2,NetWeight).toString();
}
jo.put("box_weight", BoxWeight);
if (QualityGuaranPeriod.equals("0天")){
jo.put("quality_guaran_period", "90天");
@@ -818,7 +827,12 @@ public class MesToLmsServiceImpl implements MesToLmsService {
tab.insert(jo);
HashMap<String, String> map = new HashMap<>();
map.put("box_weight", String.valueOf(BoxWeight));
if (StrUtil.equals(BoxWeight, "0")) {
map.put("box_weight", String.valueOf(BoxWeight2));
} else {
map.put("box_weight", String.valueOf(BoxWeight));
}
tab.update(map,"package_box_sn = '"+PackageBoxSN+"'");
}
// }

View File

@@ -1771,6 +1771,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
.addParam("material_id", map.get("material_id"))
.addParam("quality_scode", map.get("quality_scode"))
.addParam("pcsn", map.get("pcsn"))
.addParam("sap_pcsn", map.get("sap_pcsn"))
.addParam("iostorinv_id", map.get("iostorinv_id"))
.addParam("stor_id", map.get("stor_id"))
.addParam("sect_id", map.get("sect_id"))

View File

@@ -172,13 +172,14 @@
struct.sect_code,
struct.storagevehicle_id,
struct.storagevehicle_code,
point.point_id
point.point_id,
sub.sap_pcsn
FROM
ST_IVT_StructIvt ivt
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = ivt.struct_id
LEFT JOIN md_me_materialbase mb ON mb.material_id = ivt.material_id
LEFT JOIN SCH_BASE_Point point ON struct.struct_id = point.source_id
LEFT JOIN pdm_bi_subpackagerelation sub ON struct.storagevehicle_code = sub.package_box_sn
LEFT JOIN pdm_bi_subpackagerelation sub ON struct.storagevehicle_code = sub.package_box_sn and ivt.pcsn = sub.container_name
WHERE
1 = 1 and struct.lock_type='1'
and struct.struct_id in (
@@ -222,6 +223,9 @@
OPTION 输入.box_no <> ""
sub.package_box_sn = 输入.box_no
ENDOPTION
OPTION 输入.sap_pcsn <> ""
sub.sap_pcsn = 输入.sap_pcsn
ENDOPTION
order by ivt.canuse_qty,ivt.pcsn desc
) t1
UNION
@@ -236,13 +240,14 @@
struct.sect_code,
struct.storagevehicle_id,
struct.storagevehicle_code,
point.point_id
point.point_id,
sub.sap_pcsn
FROM
ST_IVT_StructIvt ivt2
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = ivt2.struct_id
LEFT JOIN md_me_materialbase mb ON mb.material_id = ivt2.material_id
LEFT JOIN SCH_BASE_Point point ON struct.struct_id = point.source_id
LEFT JOIN pdm_bi_subpackagerelation sub ON struct.storagevehicle_code = sub.package_box_sn
LEFT JOIN pdm_bi_subpackagerelation sub ON struct.storagevehicle_code = sub.package_box_sn and ivt2.pcsn = sub.container_name
WHERE
1 = 1 and struct.lock_type='1'
OPTION 输入.material_id <> ""
@@ -275,6 +280,9 @@
OPTION 输入.box_no <> ""
sub.package_box_sn = 输入.box_no
ENDOPTION
OPTION 输入.sap_pcsn <> ""
sub.sap_pcsn = 输入.sap_pcsn
ENDOPTION
order by ivt2.canuse_qty,ivt2.pcsn desc
) t2
ENDSELECT
@@ -322,13 +330,15 @@
task.task_code,
task.task_status,
task.task_type,
point2.point_code
point2.point_code,
sub.sap_pcsn
FROM
ST_IVT_IOStorInvDis dis
LEFT JOIN ST_IVT_IOStorInv ios ON ios.iostorinv_id = dis.iostorinv_id
LEFT JOIN md_me_materialbase mb ON mb.material_id = dis.material_id
LEFT JOIN SCH_BASE_Task task ON task.task_id = dis.task_id
LEFT JOIN SCH_BASE_Point point2 ON point2.point_id = dis.point_id
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = dis.pcsn
WHERE
1 = 1
OPTION 输入.iostorinvdtl_id <> ""
@@ -582,12 +592,14 @@
task.task_id,
task.task_code,
task.task_type,
task.task_status
task.task_status,
sub.sap_pcsn
FROM
st_ivt_iostorinvdis dis
LEFT JOIN md_me_materialbase mater ON dis.material_id = mater.material_id
LEFT JOIN sch_base_point point ON dis.point_id = point.point_id
LEFT JOIN sch_base_task task ON dis.task_id = task.task_id
LEFT JOIN pdm_bi_subpackagerelation sub ON dis.pcsn = sub.container_name
WHERE
1=1
@@ -619,12 +631,14 @@
point.point_code AS next_point_code,
task.task_code,
task.task_type,
task.task_status
task.task_status,
sub.sap_pcsn
FROM
st_ivt_iostorinvdis dis
LEFT JOIN md_me_materialbase mater ON dis.material_id = mater.material_id
LEFT JOIN sch_base_point point ON dis.point_id = point.point_id
LEFT JOIN sch_base_task task ON dis.task_id = task.task_id
LEFT JOIN pdm_bi_subpackagerelation sub ON dis.pcsn = sub.container_name
WHERE
1=1