240 lines
9.5 KiB
XML
240 lines
9.5 KiB
XML
<?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.cnbm.packing.mapper.CamlineMapper">
|
|
|
|
<resultMap id="ResultMap" type="com.cnbm.packing.vo.ComlinePMPP">
|
|
<result column="machine_name" property="machineName" />
|
|
<result column="platform_id" property="platformId" />
|
|
<result column="create_time" property="createTime" />
|
|
</resultMap>
|
|
<resultMap id="ResultMapCam" type="com.cnbm.packing.dto.CamlineSubIdDTO">
|
|
<result column="power_level" property="powerLevel" />
|
|
<result column="sap_material" property="sapMaterial" />
|
|
</resultMap>
|
|
<resultMap id="ResultMapCamIm" type="com.cnbm.packing.dto.CamlineSubIdForImportDTO">
|
|
<result column="power_level" property="powerLevel" />
|
|
<result column="sap_material" property="sapMaterial" />
|
|
<result column="sub_id" property="subId" />
|
|
<result column="order_name" property="orderName" />
|
|
</resultMap>
|
|
|
|
<resultMap id="ResultAMap" type="com.cnbm.packing.dto.CamlineExtendArgDTO">
|
|
<result column="LAST_UPDATE_TIME" property="lastUpdateTime" />
|
|
<result column="PMPP" property="pmpp" />
|
|
<result column="ORDER_NAME" property="orderName" />
|
|
<result column="BINCLASS_FL1" property="binclassFl1" />
|
|
<result column="BINCLASS_FL2" property="binclassFl2" />
|
|
<result column="ETA_FL1" property="etaFl1" />
|
|
<result column="ETA_FL2" property="etaFl2" />
|
|
<result column="FF_FL1" property="ffFl1" />
|
|
<result column="FF_FL2" property="ffFl2" />
|
|
<result column="IMPP_FL1" property="imppFl1" />
|
|
<result column="IMPP_FL2" property="imppFl2" />
|
|
<result column="InsolFlashControl_FL1" property="insolflashcontrolFl1" />
|
|
<result column="InsolFlashControl_FL2" property="insolflashcontrolFl2" />
|
|
<result column="InsolMPP_FL1" property="insolmppFl1" />
|
|
<result column="InsolMPP_FL2" property="insolmppFl2" />
|
|
<result column="InsolVoc_FL1" property="insolvocFl1" />
|
|
<result column="InsolVoc_FL2" property="insolvocFl2" />
|
|
<result column="Insol_FL1" property="insolFl1" />
|
|
<result column="Insol_FL2" property="insolFl2" />
|
|
<result column="ISC_FL1" property="iscFl1" />
|
|
<result column="ISC_FL2" property="iscFl2" />
|
|
<result column="MEAS_TIME_FL1" property="measTimeFl1" />
|
|
<result column="MEAS_TIME_FL2" property="measTimeFl2" />
|
|
<result column="PMPP_FL1" property="pmppFl1" />
|
|
<result column="PMPP_FL2" property="pmppFl2" />
|
|
<result column="Tcell_FL1" property="tcellFl1" />
|
|
<result column="Tcell_FL2" property="tcellFl2" />
|
|
<result column="Tmonicell_FL1" property="tmonicellFl1" />
|
|
<result column="Tmonicell_FL2" property="tmonicellFl2" />
|
|
<result column="UMPP_FL1" property="umppFl1" />
|
|
<result column="UMPP_FL2" property="umppFl2" />
|
|
<result column="UOC_FL1" property="uocFl1" />
|
|
<result column="UOC_FL2" property="uocFl2" />
|
|
</resultMap>
|
|
|
|
<select id="getByid" resultType="float">
|
|
select pd.pmpp from process_data pd
|
|
where pd.arg_name = #{subId}
|
|
ORDER BY
|
|
pd.create_time DESC
|
|
LIMIT 1
|
|
</select>
|
|
|
|
<select id="getPMPPBySubId" resultType="float">
|
|
SELECT
|
|
flr.PMPP_FL2 as PMPP
|
|
FROM
|
|
ue_flasher_data_raw flr
|
|
LEFT JOIN e_tracking_unit tu ON flr.mainid = tu.id
|
|
WHERE
|
|
flr.PMPP_FL2 != 0
|
|
and tu.name=#{subId} -- 查特定基板功率
|
|
ORDER BY
|
|
flr.LAST_UPDATE_TIME DESC
|
|
LIMIT 1
|
|
</select>
|
|
|
|
<select id="getExtendArgFromCamline" resultMap="ResultAMap">
|
|
SELECT
|
|
eo.`NAME` as ORDER_NAME,
|
|
flr.LAST_UPDATE_TIME,
|
|
flr.BINCLASS_FL1,-- 1为 PID16 电池相关信息
|
|
flr.BINCLASS_FL2,-- 2为 PID22 电池相关信息
|
|
flr.ETA_FL1,
|
|
flr.ETA_FL2,
|
|
flr.FF_FL1,
|
|
flr.FF_FL2,
|
|
flr.IMPP_FL1,
|
|
flr.IMPP_FL2,
|
|
flr.InsolFlashControl_FL1,
|
|
flr.InsolFlashControl_FL2,
|
|
flr.InsolMPP_FL1,
|
|
flr.InsolMPP_FL2,
|
|
flr.InsolVoc_FL1,
|
|
flr.InsolVoc_FL2,
|
|
flr.Insol_FL1,
|
|
flr.Insol_FL2,
|
|
flr.ISC_FL1,
|
|
flr.ISC_FL2,
|
|
flr.MEAS_TIME_FL1,
|
|
flr.MEAS_TIME_FL2,
|
|
flr.PMPP_FL1,-- pid16实测PMPP
|
|
flr.PMPP_FL2,-- pid22实测PMPP
|
|
flr.Tcell_FL1,
|
|
flr.Tcell_FL2,
|
|
flr.Tmonicell_FL1,
|
|
flr.Tmonicell_FL2,
|
|
flr.UMPP_FL1,
|
|
flr.UMPP_FL2,
|
|
flr.UOC_FL1,
|
|
flr.UOC_FL2,
|
|
flc.PMPP -- 补偿后功率,用我们的
|
|
|
|
FROM
|
|
ue_flasher_data_raw flr
|
|
LEFT JOIN e_tracking_unit tu ON flr.mainid = tu.id
|
|
LEFT JOIN ue_flasher_data_calc flc ON flc.mainid = tu.id
|
|
LEFT JOIN er_order eo ON tu.ORDER_ID = eo.ID
|
|
WHERE
|
|
flr.PMPP_FL2 != 0
|
|
and
|
|
tu.name=#{subId}
|
|
GROUP BY
|
|
tu.`NAME`
|
|
ORDER BY
|
|
flr.LAST_UPDATE_TIME DESC
|
|
LIMIT 1
|
|
</select>
|
|
|
|
|
|
<select id="getSubIdByCamline" resultMap="ResultMapCam">
|
|
SELECT
|
|
flc.SAP_Material as sap_material,
|
|
flc.Nenn_Leistung as power_level
|
|
|
|
FROM
|
|
ue_flasher_data_calc flc
|
|
LEFT JOIN e_tracking_unit tu ON flc.mainid = tu.id
|
|
WHERE
|
|
flc.PMPP != 0
|
|
and tu.name = #{subId}
|
|
</select>
|
|
|
|
<select id="getSubIdByCamlineForImpoet" resultMap="ResultMapCamIm">
|
|
SELECT
|
|
tu.`NAME` as sub_id,-- DMC
|
|
flc.SAP_Material as sap_material,
|
|
flc.Nenn_Leistung as power_level,
|
|
eo.`NAME` as order_name
|
|
FROM
|
|
ue_flasher_data_calc flc
|
|
LEFT JOIN e_tracking_unit tu ON flc.mainid = tu.id
|
|
LEFT JOIN er_order eo ON tu.ORDER_ID = eo.ID
|
|
WHERE
|
|
tu.NAME IN (
|
|
'30110012303050629',
|
|
'30110012302272118',
|
|
'30110012303050331',
|
|
'30110012303050321',
|
|
'30110012303030164',
|
|
'30110012303023000',
|
|
'30110012303011203',
|
|
'30110012303012089',
|
|
'30110012303011487',
|
|
'30110012302271154',
|
|
'30110012302283324',
|
|
'30110012303030787',
|
|
'30110012303050373',
|
|
'30110012303022841',
|
|
'30110012303021008',
|
|
'30110012303030325',
|
|
'30110012302283810',
|
|
'30110012303011490',
|
|
'30110012303022163',
|
|
'30110012303012695',
|
|
'30110012303010372',
|
|
'30110012303020247',
|
|
'30110012303022801',
|
|
'30110012303022407',
|
|
'30110012303012915',
|
|
'30110012303022996',
|
|
'30110012303022721',
|
|
'30110012303040003',
|
|
'30110012303023102',
|
|
'30110012302281213',
|
|
'30110012303022204',
|
|
'30110012302281212',
|
|
'30110012303022970',
|
|
'30110012303022415',
|
|
'30110012303050341',
|
|
'30110012303022434',
|
|
'30110012302271569',
|
|
'30110012303030505',
|
|
'30110012303021276',
|
|
'30110012302280295',
|
|
'30110012303022166',
|
|
'30110012303022299',
|
|
'30110012303020988',
|
|
'30110012302271160',
|
|
'30110012302281215',
|
|
'30110012303050537',
|
|
'30110012302272052',
|
|
'30110012303011213',
|
|
'30110012303030488',
|
|
'30110012303021614',
|
|
'30110012303012878',
|
|
'30110012302242962',
|
|
'30110012303030608',
|
|
'30110012303012697',
|
|
'30110012303020737'
|
|
)
|
|
and flc.PMPP != 0
|
|
GROUP BY tu.`NAME`
|
|
</select>
|
|
|
|
<select id="getOrderNameBySubId" resultType="string">
|
|
SELECT
|
|
eorder.name
|
|
FROM
|
|
e_tracking_unit tu
|
|
LEFT JOIN er_order eorder ON tu.order_id = eorder.id
|
|
WHERE
|
|
tu.name=#{subId} -- 依据基板id 查询对应的订单名
|
|
ORDER BY
|
|
tu.LAST_UPDATE_TIME DESC
|
|
LIMIT 1
|
|
</select>
|
|
|
|
<select id="getTodayBoxNum" resultType="java.lang.Integer">
|
|
select count(1)
|
|
from t_wo_packaging_box twpb
|
|
where
|
|
twpb.CREATE_TIME BETWEEN DATE_FORMAT(NOW(),'%Y-%m-%d 00:00:00') AND DATE_FORMAT(NOW(),'%Y-%m-%d 23:59:59')
|
|
and
|
|
twpb.model = 2
|
|
</select>
|
|
|
|
|
|
</mapper> |