|
|
@ -469,8 +469,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<select id="getReportWorkHzList" resultType="com.op.mes.domain.MesReportWork">
|
|
|
|
<select id="getReportWorkHzList" resultType="com.op.mes.domain.MesReportWork">
|
|
|
|
select mrw.workorderCode,mrw.productCode,mrw.productName,mrw.machineCode,mrw.machineName,
|
|
|
|
select mrw.workorderCode,mrw.productCode,mrw.productName,mrw.machineCode,mrw.machineName,
|
|
|
|
mrw.shiftCode,mrw.feedbackTime feedbackTimeStr,mrw.quantityFeedback,mrw.unit,
|
|
|
|
mrw.shiftCode,mrw.feedbackTime feedbackTimeStr,mrw.quantityFeedback,
|
|
|
|
mrw.workTime,mrw.useMan,mrw.uploadTime,mrw.uploadStatus,
|
|
|
|
mrw.workTime,mrw.useMan,mrw.uploadStatus,<!--mrw.uploadTime,mrw.unit,-->
|
|
|
|
pow.order_code orderCode,pow.quantity_split quantity
|
|
|
|
pow.order_code orderCode,pow.quantity_split quantity
|
|
|
|
from (
|
|
|
|
from (
|
|
|
|
select workorder_code workorderCode,
|
|
|
|
select workorder_code workorderCode,
|
|
|
@ -483,9 +483,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
sum(quantity_feedback) quantityFeedback,
|
|
|
|
sum(quantity_feedback) quantityFeedback,
|
|
|
|
sum(work_time) workTime,
|
|
|
|
sum(work_time) workTime,
|
|
|
|
sum(use_man) useMan,
|
|
|
|
sum(use_man) useMan,
|
|
|
|
upload_time uploadTime,
|
|
|
|
upload_status uploadStatus
|
|
|
|
upload_status uploadStatus,
|
|
|
|
<!--,upload_time uploadTime,
|
|
|
|
unit
|
|
|
|
,
|
|
|
|
|
|
|
|
unit-->
|
|
|
|
from mes_report_work
|
|
|
|
from mes_report_work
|
|
|
|
where del_flag = '0' and parent_order = '0'
|
|
|
|
where del_flag = '0' and parent_order = '0'
|
|
|
|
<if test="workorderCode != null and workorderCode != ''"> and workorder_code like concat('%', #{workorderCode}, '%')</if>
|
|
|
|
<if test="workorderCode != null and workorderCode != ''"> and workorder_code like concat('%', #{workorderCode}, '%')</if>
|
|
|
@ -496,8 +497,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="feedbackTimeStart != null "> and CONVERT(varchar(19),feedback_time, 120) >= #{feedbackTimeStart}</if>
|
|
|
|
<if test="feedbackTimeStart != null "> and CONVERT(varchar(19),feedback_time, 120) >= #{feedbackTimeStart}</if>
|
|
|
|
<if test="feedbackTimeEnd != null "> and #{feedbackTimeEnd} >= CONVERT(varchar(19),feedback_time, 120)</if>
|
|
|
|
<if test="feedbackTimeEnd != null "> and #{feedbackTimeEnd} >= CONVERT(varchar(19),feedback_time, 120)</if>
|
|
|
|
<if test="uploadStatus != null and uploadStatus != ''"> and upload_status = #{uploadStatus}</if>
|
|
|
|
<if test="uploadStatus != null and uploadStatus != ''"> and upload_status = #{uploadStatus}</if>
|
|
|
|
group by workorder_code, product_code,product_name,CONVERT(varchar(10),feedback_time, 120),machine_code,machine_name,shift_code,
|
|
|
|
group by workorder_code, product_code,product_name,CONVERT(varchar(10),feedback_time, 120),machine_code,machine_name,shift_code
|
|
|
|
upload_time,upload_status,unit
|
|
|
|
,upload_status
|
|
|
|
|
|
|
|
<!--,upload_time,unit-->
|
|
|
|
) mrw
|
|
|
|
) mrw
|
|
|
|
left join pro_order_workorder pow on mrw.workorderCode = pow.workorder_code
|
|
|
|
left join pro_order_workorder pow on mrw.workorderCode = pow.workorder_code
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
@ -542,6 +544,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
and mp.del_flag = '0' and mpd.del_flag = '0'
|
|
|
|
and mp.del_flag = '0' and mpd.del_flag = '0'
|
|
|
|
order by mp.workorder_code
|
|
|
|
order by mp.workorder_code
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getReportWorkHz" resultType="com.op.mes.domain.MesReportWork">
|
|
|
|
|
|
|
|
select
|
|
|
|
|
|
|
|
ow.workorder_code workorderCode,
|
|
|
|
|
|
|
|
ow.workorder_code_sap workorderCodeSap,
|
|
|
|
|
|
|
|
mrw.quantity_feedback quantityFeedback,
|
|
|
|
|
|
|
|
mrw.product_code productCode,
|
|
|
|
|
|
|
|
mrw.product_name productName,
|
|
|
|
|
|
|
|
rte.tec_machine sac1,
|
|
|
|
|
|
|
|
rte.tec_man sac2,
|
|
|
|
|
|
|
|
rte.tec_depreciation sac3,
|
|
|
|
|
|
|
|
rte.tec_other sac4,
|
|
|
|
|
|
|
|
rte.tec_conf_acivity5 sac5,
|
|
|
|
|
|
|
|
rte.tec_conf_acivity6 sac6
|
|
|
|
|
|
|
|
from (
|
|
|
|
|
|
|
|
select
|
|
|
|
|
|
|
|
workorder_code,
|
|
|
|
|
|
|
|
sum(quantity_feedback) quantity_feedback,
|
|
|
|
|
|
|
|
product_code,
|
|
|
|
|
|
|
|
product_name
|
|
|
|
|
|
|
|
from
|
|
|
|
|
|
|
|
mes_report_work
|
|
|
|
|
|
|
|
where upload_status != #{uploadStatus} and prod_type = #{prodType}
|
|
|
|
|
|
|
|
and workorder_code = #{workorderCode}
|
|
|
|
|
|
|
|
group by workorder_code,product_code,product_name
|
|
|
|
|
|
|
|
) mrw
|
|
|
|
|
|
|
|
left join pro_order_workorder ow on mrw.workorder_code = ow.workorder_code
|
|
|
|
|
|
|
|
left join pro_route rte on rte.route_code = ow.route_code
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getEndReport" resultType="com.op.mes.domain.MesReportWork">
|
|
|
|
|
|
|
|
select end_report endReport
|
|
|
|
|
|
|
|
from mes_report_work
|
|
|
|
|
|
|
|
where end_report = '1' and workorder_code = #{workorderCode}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertMesReportWork" parameterType="MesReportWork">
|
|
|
|
<insert id="insertMesReportWork" parameterType="MesReportWork">
|
|
|
|
insert into mes_report_work
|
|
|
|
insert into mes_report_work
|
|
|
|