生产日报表相关

master
zhaoxiaolin 6 months ago
parent b64cbf5242
commit 6860dc957b

@ -10,6 +10,7 @@
<result property="lineName" column="line_name"/> <result property="lineName" column="line_name"/>
<result property="useMan" column="use_man"/> <result property="useMan" column="use_man"/>
<result property="efficiency" column="efficiency"/> <result property="efficiency" column="efficiency"/>
<result property="hourEfficiency" column="hour_efficiency"/>
<result property="attr1" column="attr1"/> <result property="attr1" column="attr1"/>
<result property="attr2" column="attr2"/> <result property="attr2" column="attr2"/>
<result property="attr3" column="attr3"/> <result property="attr3" column="attr3"/>
@ -28,12 +29,12 @@
<sql id="selectMesLineVo"> <sql id="selectMesLineVo">
select id, line_code, product_code,product_name,use_man, efficiency, attr1, attr2, attr3, attr4, create_by, select id, line_code, product_code,product_name,use_man, efficiency, attr1, attr2, attr3, attr4, create_by,
create_time, update_by, update_time, factory_code, del_flag from mes_line_product create_time, update_by, update_time, factory_code, del_flag,hour_efficiency from mes_line_product
</sql> </sql>
<select id="selectMesLineList" parameterType="MesLine" resultMap="MesLineResult"> <select id="selectMesLineList" parameterType="MesLine" resultMap="MesLineResult">
select mlp.id, mlp.line_code, mlp.product_code,mlp.product_name,mlp.use_man, mlp.efficiency, mlp.attr1, select mlp.id, mlp.line_code, mlp.product_code,mlp.product_name,mlp.use_man, mlp.efficiency, mlp.attr1,
mlp.attr2, mlp.attr3, mlp.attr4, mlp.create_by, mlp.attr2, mlp.attr3, mlp.attr4, mlp.create_by,mlp.hour_efficiency,
mlp.create_time, mlp.update_by, mlp.update_time, mlp.factory_code, mlp.del_flag, mlp.create_time, mlp.update_by, mlp.update_time, mlp.factory_code, mlp.del_flag,
be.equipment_name line_name be.equipment_name line_name
from mes_line_product mlp from mes_line_product mlp
@ -67,7 +68,7 @@
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if> <if test="id != null">id,</if>
<if test="lineCode != null">line_code,</if> <if test="lineCode != null">line_code,</if>
<if test="hourEfficiency != null">hour_efficiency,</if>
<if test="useMan != null">use_man,</if> <if test="useMan != null">use_man,</if>
<if test="efficiency != null">efficiency,</if> <if test="efficiency != null">efficiency,</if>
<if test="attr1 != null">attr1,</if> <if test="attr1 != null">attr1,</if>
@ -84,7 +85,7 @@
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
<if test="lineCode != null">#{lineCode},</if> <if test="lineCode != null">#{lineCode},</if>
<if test="hourEfficiency != null">#{hourEfficiency},</if>
<if test="useMan != null">#{useMan},</if> <if test="useMan != null">#{useMan},</if>
<if test="efficiency != null">#{efficiency},</if> <if test="efficiency != null">#{efficiency},</if>
<if test="attr1 != null">#{attr1},</if> <if test="attr1 != null">#{attr1},</if>

@ -457,7 +457,7 @@
<select id="getMesLineInfo" resultType="com.op.mes.domain.MesLine"> <select id="getMesLineInfo" resultType="com.op.mes.domain.MesLine">
select select
mlp.use_man standarMan, mlp.use_man standarMan,
ROUND(mlp.efficiency/bp.umrez,2) AS standarXl ROUND(mlp.hour_efficiency/bp.umrez,2) AS standarXl
from mes_line_product mlp from mes_line_product mlp
left join base_product bp on bp.product_code=mlp.product_code left join base_product bp on bp.product_code=mlp.product_code
where mlp.line_code = #{equCode} and mlp.product_code = #{productCode} where mlp.line_code = #{equCode} and mlp.product_code = #{productCode}

@ -698,7 +698,7 @@
FROM( FROM(
select CONVERT(varchar(7),qct.create_time, 120) AS ymdms, qct.sample_quality select CONVERT(varchar(7),qct.create_time, 120) AS ymdms, qct.sample_quality
from qc_check_task qct from qc_check_task qct
where check_type = #{checkType} where check_type = #{checkType} and check_status = 2
and CONVERT(varchar(4),qct.create_time, 120) = #{incomeTimeStr} and CONVERT(varchar(4),qct.create_time, 120) = #{incomeTimeStr}
and del_flag = '0' and del_flag = '0'
) t ) t
@ -711,7 +711,7 @@
FROM( FROM(
select CONVERT(varchar(10),qct.create_time, 120) AS ymdms, check_result select CONVERT(varchar(10),qct.create_time, 120) AS ymdms, check_result
from qc_check_task qct from qc_check_task qct
where check_type = #{checkType} where check_type = #{checkType} and check_status = 2
and CONVERT(varchar(7),qct.create_time, 120) = #{incomeTimeStr} and CONVERT(varchar(7),qct.create_time, 120) = #{incomeTimeStr}
and del_flag = '0' and del_flag = '0'
) t ) t
@ -724,7 +724,7 @@
FROM( FROM(
select DATEPART(HOUR, qct.create_time) AS ymdms,check_result select DATEPART(HOUR, qct.create_time) AS ymdms,check_result
from qc_check_task qct from qc_check_task qct
where check_type = #{checkType} where check_type = #{checkType} and check_status = 2
and CONVERT(varchar(10),qct.create_time, 120) = #{incomeTimeStr} and CONVERT(varchar(10),qct.create_time, 120) = #{incomeTimeStr}
and del_flag = '0' and del_flag = '0'
) t ) t

Loading…
Cancel
Save