feat(wms): 增加产品和原材料的规格、材质等信息字段

This commit is contained in:
2025-11-17 17:00:57 +08:00
parent 0f92560e62
commit 3f507cef5b
3 changed files with 70 additions and 2 deletions

View File

@@ -91,7 +91,12 @@ public class WmsStockServiceImpl implements IWmsStockService {
"mc.item_id",
"w.actual_warehouse_name",
"CASE WHEN mc.item_type = 'product' THEN p.product_name WHEN mc.item_type = 'raw_material' THEN r.raw_material_name ELSE NULL END",
"CASE WHEN mc.item_type = 'product' THEN p.product_code WHEN mc.item_type = 'raw_material' THEN r.raw_material_code ELSE NULL END"
"CASE WHEN mc.item_type = 'product' THEN p.product_code WHEN mc.item_type = 'raw_material' THEN r.raw_material_code ELSE NULL END",
"CASE WHEN mc.item_type = 'product' THEN p.specification WHEN mc.item_type = 'raw_material' THEN r.specification ELSE NULL END",
"CASE WHEN mc.item_type = 'product' THEN p.material WHEN mc.item_type = 'raw_material' THEN r.material ELSE NULL END",
"CASE WHEN mc.item_type = 'product' THEN p.surface_treatment_desc WHEN mc.item_type = 'raw_material' THEN r.surface_treatment_desc ELSE NULL END",
"CASE WHEN mc.item_type = 'product' THEN p.zinc_layer WHEN mc.item_type = 'raw_material' THEN r.zinc_layer ELSE NULL END",
"CASE WHEN mc.item_type = 'product' THEN p.manufacturer WHEN mc.item_type = 'raw_material' THEN r.manufacturer ELSE NULL END"
);
return qw;
@@ -166,7 +171,13 @@ public class WmsStockServiceImpl implements IWmsStockService {
"mc.item_id",
"w.warehouse_name",
"CASE WHEN mc.item_type = 'product' THEN p.product_name WHEN mc.item_type = 'raw_material' THEN r.raw_material_name ELSE NULL END",
"CASE WHEN mc.item_type = 'product' THEN p.product_code WHEN mc.item_type = 'raw_material' THEN r.raw_material_code ELSE NULL END"
"CASE WHEN mc.item_type = 'product' THEN p.product_code WHEN mc.item_type = 'raw_material' THEN r.raw_material_code ELSE NULL END",
// 新增分组字段(规格、材质等)
"CASE WHEN mc.item_type = 'product' THEN p.specification WHEN mc.item_type = 'raw_material' THEN r.specification ELSE NULL END",
"CASE WHEN mc.item_type = 'product' THEN p.material WHEN mc.item_type = 'raw_material' THEN r.material ELSE NULL END",
"CASE WHEN mc.item_type = 'product' THEN p.surface_treatment_desc WHEN mc.item_type = 'raw_material' THEN r.surface_treatment_desc ELSE NULL END",
"CASE WHEN mc.item_type = 'product' THEN p.zinc_layer WHEN mc.item_type = 'raw_material' THEN r.zinc_layer ELSE NULL END",
"CASE WHEN mc.item_type = 'product' THEN p.manufacturer WHEN mc.item_type = 'raw_material' THEN r.manufacturer ELSE NULL END"
);
return qw;