OEE添加镀锌接口
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.klp.pocket.galvanize1.mapper.GalvanizeOeeMasterMapper">
|
||||
|
||||
<resultMap id="AcidOeeDailySummaryResultMap" type="com.klp.pocket.acid.domain.vo.AcidOeeDailySummaryVo">
|
||||
<result column="stat_date" property="statDate" jdbcType="VARCHAR"/>
|
||||
<result column="line_id" property="lineId" jdbcType="VARCHAR"/>
|
||||
<result column="line_name" property="lineName" jdbcType="VARCHAR"/>
|
||||
<result column="planned_time_min" property="plannedTimeMin" jdbcType="BIGINT"/>
|
||||
<result column="planned_downtime_min" property="plannedDowntimeMin" jdbcType="BIGINT"/>
|
||||
<result column="loading_time_min" property="loadingTimeMin" jdbcType="BIGINT"/>
|
||||
<result column="downtime_min" property="downtimeMin" jdbcType="BIGINT"/>
|
||||
<result column="run_time_min" property="runTimeMin" jdbcType="BIGINT"/>
|
||||
<result column="total_output_ton" property="totalOutputTon" jdbcType="DECIMAL"/>
|
||||
<result column="total_output_coil" property="totalOutputCoil" jdbcType="BIGINT"/>
|
||||
<result column="good_output_ton" property="goodOutputTon" jdbcType="DECIMAL"/>
|
||||
<result column="good_output_coil" property="goodOutputCoil" jdbcType="BIGINT"/>
|
||||
<result column="defect_output_ton" property="defectOutputTon" jdbcType="DECIMAL"/>
|
||||
<result column="defect_output_coil" property="defectOutputCoil" jdbcType="BIGINT"/>
|
||||
<result column="ideal_cycle_time_min_per_ton" property="idealCycleTimeMinPerTon" jdbcType="DECIMAL"/>
|
||||
<result column="ideal_cycle_time_min_per_coil" property="idealCycleTimeMinPerCoil" jdbcType="DECIMAL"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectDailySummary" resultMap="AcidOeeDailySummaryResultMap">
|
||||
SELECT
|
||||
DATE_FORMAT(mc.create_time, '%Y-%m-%d') AS stat_date,
|
||||
'DX1' AS line_id,
|
||||
'镀锌一线' AS line_name,
|
||||
1440 AS planned_time_min,
|
||||
0 AS planned_downtime_min,
|
||||
1440 AS loading_time_min,
|
||||
0 AS downtime_min,
|
||||
COALESCE(SUM(mc.net_weight / 1000), 0) AS total_output_ton,
|
||||
COUNT(*) AS total_output_coil,
|
||||
0 AS good_output_ton,
|
||||
0 AS good_output_coil,
|
||||
0 AS defect_output_ton,
|
||||
0 AS defect_output_coil,
|
||||
NULL AS ideal_cycle_time_min_per_ton,
|
||||
NULL AS ideal_cycle_time_min_per_coil
|
||||
FROM wms_material_coil mc
|
||||
WHERE DATE(mc.create_time) BETWEEN #{startDate} AND #{endDate}
|
||||
AND mc.create_by = #{createBy}
|
||||
AND mc.del_flag = 0
|
||||
AND mc.data_type = 1
|
||||
AND mc.current_coil_no IS NOT NULL
|
||||
AND mc.net_weight IS NOT NULL
|
||||
AND mc.net_weight > 0
|
||||
GROUP BY DATE_FORMAT(mc.create_time, '%Y-%m-%d')
|
||||
ORDER BY stat_date ASC
|
||||
</select>
|
||||
|
||||
<select id="selectCoilInfoByDate" resultType="com.klp.pocket.acid.domain.vo.AcidOeeCoilInfoByDateVo">
|
||||
SELECT
|
||||
DATE_FORMAT(mc.create_time, '%Y-%m-%d') AS statDate,
|
||||
mc.current_coil_no AS coilNo,
|
||||
(mc.net_weight / 1000) AS weight,
|
||||
mc.quality_status AS qualityStatus
|
||||
FROM wms_material_coil mc
|
||||
WHERE DATE(mc.create_time) BETWEEN #{startDate} AND #{endDate}
|
||||
AND mc.create_by = #{createBy}
|
||||
AND mc.del_flag = 0
|
||||
AND mc.data_type = 1
|
||||
AND mc.current_coil_no IS NOT NULL
|
||||
AND mc.net_weight IS NOT NULL
|
||||
AND mc.net_weight > 0
|
||||
ORDER BY mc.create_time ASC, mc.current_coil_no ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user