|
|
@ -44,16 +44,18 @@
|
|
|
|
mur.product_code,
|
|
|
|
mur.product_code,
|
|
|
|
mur.product_name,
|
|
|
|
mur.product_name,
|
|
|
|
mur.line_code,
|
|
|
|
mur.line_code,
|
|
|
|
mur.attr2 AS real_wages,
|
|
|
|
mur.attr2,
|
|
|
|
mur.remark,
|
|
|
|
mur.remark,
|
|
|
|
be.sap_name as equipment_name,
|
|
|
|
be.sap_name as equipment_name,
|
|
|
|
mur.nick_name,
|
|
|
|
mur.nick_name,
|
|
|
|
mur.childprocess_code,
|
|
|
|
mur.childprocess_code,
|
|
|
|
mup.childprocess_name,
|
|
|
|
mup.childprocess_name,
|
|
|
|
mur.attr1 AS total_quantity,
|
|
|
|
mur.attr1 AS total_quantity,
|
|
|
|
|
|
|
|
CAST(mur.attr2 AS DECIMAL) * 16 AS real_wages,
|
|
|
|
mup.attr1,
|
|
|
|
mup.attr1,
|
|
|
|
mup.attr1*mur.attr1 AS result,
|
|
|
|
mup.attr1*mur.attr1 AS result,
|
|
|
|
COUNT(*) OVER (PARTITION BY mur.workorder_code_sap, mur.childprocess_code) AS head_count
|
|
|
|
COUNT(*) OVER (PARTITION BY mur.workorder_code_sap, mur.childprocess_code) AS head_count,
|
|
|
|
|
|
|
|
mur.create_time
|
|
|
|
FROM
|
|
|
|
FROM
|
|
|
|
mes_unitprice_report mur
|
|
|
|
mes_unitprice_report mur
|
|
|
|
LEFT JOIN
|
|
|
|
LEFT JOIN
|
|
|
@ -82,12 +84,15 @@
|
|
|
|
<if test="lineCode != null and lineCode != ''">and mur.line_code like concat('%',
|
|
|
|
<if test="lineCode != null and lineCode != ''">and mur.line_code like concat('%',
|
|
|
|
#{lineCode}, '%')
|
|
|
|
#{lineCode}, '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="equipmentName != null and equipmentName != ''">and be.equipment_name like concat('%',
|
|
|
|
<if test="equipmentName != null and equipmentName != ''">and be.sap_name like concat('%',
|
|
|
|
#{equipmentName}, '%')
|
|
|
|
#{equipmentName}, '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="attr1 != null and attr1 != ''">and attr1 = #{attr1}</if>
|
|
|
|
<if test="attr1 != null and attr1 != ''">and attr1 = #{attr1}</if>
|
|
|
|
<if test="attr2 != null and attr2 != ''">and attr2 = #{attr2}</if>
|
|
|
|
<if test="attr2 != null and attr2 != ''">and attr2 = #{attr2}</if>
|
|
|
|
<if test="attr3 != null and attr3 != ''">and attr3 = #{attr3}</if>
|
|
|
|
<if test="attr3 != null and attr3 != ''">and attr3 = #{attr3}</if>
|
|
|
|
|
|
|
|
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''">
|
|
|
|
|
|
|
|
and mur.create_time between #{params.beginTime} and #{params.endTime}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
GROUP BY
|
|
|
|
GROUP BY
|
|
|
|
mur.id,
|
|
|
|
mur.id,
|
|
|
@ -104,6 +109,7 @@
|
|
|
|
mur.childprocess_code,
|
|
|
|
mur.childprocess_code,
|
|
|
|
mup.childprocess_name,
|
|
|
|
mup.childprocess_name,
|
|
|
|
mrw.total_quantity,
|
|
|
|
mrw.total_quantity,
|
|
|
|
|
|
|
|
mur.create_time,
|
|
|
|
mup.attr1;
|
|
|
|
mup.attr1;
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|