|
|
@@ -910,12 +910,23 @@
|
|
|
t.create_emp as "createEmp",
|
|
|
t.create_time as "createTime",
|
|
|
b.material_specification as "specName",
|
|
|
- nvl(substr(b.material_specification,
|
|
|
- decode(instr(b.material_specification, '/'),
|
|
|
- 0,
|
|
|
- 100,
|
|
|
- instr(b.material_specification, '/')) + 1),
|
|
|
- 12) * b.material_theoretical_weight / 1000 as "weight"
|
|
|
+ CASE WHEN
|
|
|
+ REGEXP_LIKE(nvl(substr(b.material_specification,
|
|
|
+ decode(instr(b.material_specification, '/'),
|
|
|
+ 0,
|
|
|
+ 100,
|
|
|
+ instr(b.material_specification, '/')) + 1),
|
|
|
+ 12),'^\d+$') THEN
|
|
|
+ nvl(substr(b.material_specification,
|
|
|
+ decode(instr(b.material_specification, '/'),
|
|
|
+ 0,
|
|
|
+ 100,
|
|
|
+ instr(b.material_specification, '/')) + 1),
|
|
|
+ 12)
|
|
|
+ ELSE
|
|
|
+ '0'
|
|
|
+ END
|
|
|
+ * b.material_theoretical_weight / 1000 as "weight"
|
|
|
from rms_material b
|
|
|
left join rms_material_map t
|
|
|
on t.prod_code_l = b.material_code
|
|
|
@@ -933,12 +944,22 @@
|
|
|
'' as "createEmp",
|
|
|
sysdate as "createTime",
|
|
|
b.material_specification as "specName",
|
|
|
- nvl(substr(b.material_specification,
|
|
|
- decode(instr(b.material_specification, '/'),
|
|
|
- 0,
|
|
|
- 100,
|
|
|
- instr(b.material_specification, '/')) + 1),
|
|
|
- 12) * b.material_theoretical_weight / 1000 as "weight"
|
|
|
+ CASE WHEN
|
|
|
+ REGEXP_LIKE(nvl(substr(b.material_specification,
|
|
|
+ decode(instr(b.material_specification, '/'),
|
|
|
+ 0,
|
|
|
+ 100,
|
|
|
+ instr(b.material_specification, '/')) + 1),
|
|
|
+ 12),'^\d+$') THEN
|
|
|
+ nvl(substr(b.material_specification,
|
|
|
+ decode(instr(b.material_specification, '/'),
|
|
|
+ 0,
|
|
|
+ 100,
|
|
|
+ instr(b.material_specification, '/')) + 1),
|
|
|
+ 12)
|
|
|
+ ELSE
|
|
|
+ '0'
|
|
|
+ END * b.material_theoretical_weight / 1000 as "weight"
|
|
|
from rms_material b
|
|
|
<where>
|
|
|
<if test="prodCode != null and prodCode != ''">
|