yuhdemo/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/system/EqmtPalletizerMapper.xml
2026-01-30 14:02:18 +08:00

280 lines
7.6 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="jnpf.mapper.EqmtPalletizerMapper">
<select id="getTemperature" resultType="jnpf.entity.TemperatureEntity">
SELECT
e.line_name AS eqmtName,
t.gmt_create AS gmtCreate,
t.D200 as D200,
t.D220 as D220,
t.D240 as D240,
t.D260 as D260,
t.D300 as D300,
t.D400 as D400,
t.D420 as D420,
t.D440 as D440,
t.D460 as D460,
t.D500 as D500,
t.D520 as D520,
t.D540 as D540,
t.D560 as D560,
t.D320 as D320,
t.D340 as D340,
t.D360 as D360,
t.D600 as D600,
t.D620 as D620,
t.D640 as D640,
t.D660 as D660,
t.D700 as D700,
t.D720 as D720,
t.D740 as D740,
t.D760 as D760
FROM
`yh-sc`.eqmt_collect_data38_plc2 t
LEFT JOIN `yh-sc`.eqmt_base e ON t.eqmt_id = e.eqmt_id
<if test="eqmtPalletizerPagination.acquisitionTime != null and eqmtPalletizerPagination.acquisitionTime !=''">
WHERE t.gmt_create between #{eqmtPalletizerPagination.startTime} and #{eqmtPalletizerPagination.endTime}
</if>
ORDER BY
t.gmt_create DESC
</select>
<select id="getFirstDetails" resultType="jnpf.entity.DataCollectionEntity">
SELECT
e.line_name AS eqmtName,
t.gmt_create AS gmtCreate,
t.D0 AS speed,
t.D1206 AS electricEnergy,
t.D1000 AS current,
t.D1020 AS voltage,
t.D1058 AS activePower,
CONCAT_WS(
':',
t.D4022,
LPAD(t.D4030, 2, '0'),
LPAD(t.D4032, 2, '0')) AS intradayEqmtRunTime
FROM
`yh-sc`.eqmt_ins_data20 t
LEFT JOIN `yh-sc`.eqmt_base e ON t.eqmt_id = e.eqmt_id
<if test="eqmtPalletizerPagination.gmtCreate != null and eqmtPalletizerPagination.gmtCreate !=''">
WHERE t.gmt_create between #{eqmtPalletizerPagination.startTime} and #{eqmtPalletizerPagination.endTime}
</if>
ORDER BY
t.gmt_create DESC
</select>
<select id="getSecondDetails" resultType="jnpf.entity.DataCollectionEntity">
SELECT
e.line_name AS eqmtName,
t.gmt_create AS gmtCreate,
t.D0 AS speed,
t.D4002 as intradayProductQty,
t.D4080 as intradayEqmtWorkRate,
t.D200 as currentTemperature,
CONCAT_WS(':',
t.D4022,
LPAD(t.D4030, 2, '0'),
LPAD(t.D4032, 2, '0')
) AS intradayEqmtRunTime
FROM
`yh-sc`.eqmt_ins_data38 t
LEFT JOIN `yh-sc`.eqmt_base e ON t.eqmt_id = e.eqmt_id
<if test="eqmtPalletizerPagination.gmtCreate != null and eqmtPalletizerPagination.gmtCreate !=''">
WHERE t.gmt_create between #{eqmtPalletizerPagination.startTime} and #{eqmtPalletizerPagination.endTime}
</if>
ORDER BY
t.gmt_create DESC
</select>
<select id="EquipmentParameterWarning" resultType="jnpf.entity.EquipmentParameterWarningEntity">
SELECT
e.line_name AS eqmtName,
t.gmt_create AS gmtCreate,
t.D2272,
t.D2273,
t.D4272,
t.D4273,
t.D6272,
t.D6273,
t.D8272,
t.D8273,
t.D10272,
t.D10273,
t.D12272,
t.D12273,
t.D14272,
t.D14273,
t.D16272,
t.D16273,
t.D20272,
t.D20273
FROM
`yh-sc`.eqmt_collect_data20_plc3 t
LEFT JOIN `yh-sc`.eqmt_base e ON t.eqmt_id = e.eqmt_id
<if test="eqmtPalletizerPagination.gmtCreate != null and eqmtPalletizerPagination.gmtCreate !=''">
WHERE t.gmt_create between #{eqmtPalletizerPagination.startTime} and #{eqmtPalletizerPagination.endTime}
</if>
ORDER BY
t.gmt_create DESC
</select>
<select id="Equipment" resultType="jnpf.entity.EquipmentEntity">
SELECT
e.line_name AS eqmtName,
t.gmt_create AS gmtCreate,
t.D2272,
t.D2273,
t.D4272,
t.D4273,
t.D6272,
t.D6273,
t.D8272,
t.D8273,
t.D10272,
t.D10273,
t.D12272,
t.D12273,
t.D14272,
t.D14273,
t.D16272,
t.D16273,
t.D20272,
t.D20273,
t.D22272,
t.D22273,
t.D18272,
t.D18273
FROM
`yh-sc`.eqmt_collect_data38_plc3 t
LEFT JOIN `yh-sc`.eqmt_base e ON t.eqmt_id = e.eqmt_id
<if test="eqmtPalletizerPagination.gmtCreate != null and eqmtPalletizerPagination.gmtCreate !=''">
WHERE t.gmt_create between #{eqmtPalletizerPagination.startTime} and #{eqmtPalletizerPagination.endTime}
</if>
ORDER BY
t.gmt_create DESC
</select>
<select id="getQualitymonitoring" resultType="jnpf.entity.QualitymonitoringEntity">
SELECT
e.line_name AS eqmtName,
e.product as product,
t.gmt_create AS gmtCreate,
t.R401,
t.R402,
t.R403,
t.R404,
t.R405,
t.R406,
t.R407,
t.R408,
t.R409,
t.R410,
t.R411,
t.R412,
t.R413,
t.R414,
t.R417,
t.R418,
t.R419,
t.R420,
t.R421,
t.R422,
t.R423,
t.R424,
t.R425,
t.R426,
t.R427,
t.R428,
t.R429,
t.R430,
t.R431,
t.R432,
t.R433,
t.R434,
t.R435,
t.R436,
t.R437,
t.R438,
t.R439,
t.R442,
t.R443,
t.R444,
t.R445,
t.R446,
t.R447,
t.R448,
t.R449,
t.R450,
t.R451,
t.R452,
t.R453,
t.R455,
t.R456,
t.R457,
t.R459,
t.R460
FROM
`yh-sc`.eqmt_collect_data20_plc1 t
LEFT JOIN `yh-sc`.eqmt_base e ON t.eqmt_id = e.eqmt_id
<if test="eqmtPalletizerPagination.gmtCreate != null and eqmtPalletizerPagination.gmtCreate !=''">
WHERE t.gmt_create between #{eqmtPalletizerPagination.startTime} and #{eqmtPalletizerPagination.endTime}
</if>
ORDER BY
t.gmt_create DESC
</select>
<select id="getQualitymonitoring1" resultType="jnpf.entity.QualityEntity">
SELECT
e.line_name AS eqmtName,
e.product as product,
t.gmt_create AS gmtCreate,
t.r801,
t.r802,
t.r803,
t.r804,
t.r805,
t.r806,
t.r807,
t.r808,
t.r809,
t.r810,
t.r811,
t.r812,
t.r814,
t.r817,
t.r818,
t.r819,
t.r820,
t.r821,
t.r822,
t.r823,
t.r824,
t.r825,
t.r826,
t.r827,
t.r828,
t.r829,
t.r830,
t.r831,
t.r833,
t.r834,
t.r835,
t.r836,
t.r850,
t.r851,
t.r852,
t.r853,
t.r854,
t.r855,
t.r856,
t.r861
FROM
`yh-sc`.eqmt_collect_data18 t
LEFT JOIN `yh-sc`.eqmt_base e ON t.eqmt_id = e.eqmt_id
<if test="eqmtPalletizerPagination.gmtCreate != null and eqmtPalletizerPagination.gmtCreate !=''">
WHERE t.gmt_create between #{eqmtPalletizerPagination.startTime} and #{eqmtPalletizerPagination.endTime}
</if>
ORDER BY
t.gmt_create DESC
</select>
</mapper>