beat_time AS "beatTime", id AS "id", work_order_no AS "workOrderNo", sfc_code AS "sfcCode", product_code AS "productCode", production_line AS "productionLine", location_code AS "locationCode", equipment_no AS "equipmentNo", inbound_time AS "inboundTime", outbound_time AS "outboundTime", in_rs_sign AS "inRsSign", in_msg_sign AS "inMsgSign", out_rs_sign AS "outRsSign", out_msg_sign AS "outMsgSign", collection_time AS "collectionTime", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", create_user AS "createUser", create_time AS "createTime", update_user AS "updateUser", update_time AS "updateTime"
select
from cm_passing_station_collection where 1 = 1
and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%')
and production_line like CONCAT('%',#{paramCondition.productionLine},'%')
and sfc_code like CONCAT('%',#{paramCondition.sfcCode},'%')
and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
and create_time >= #{paramCondition.startTime}
and create_time <= #{paramCondition.endTime}
select
from cm_passing_station_collection where 1 = 1
select
from cm_passing_station_collection where 1 = 1
and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%')
and production_line like CONCAT('%',#{paramCondition.productionLine},'%')
and sfc_code like CONCAT('%',#{paramCondition.sfcCode},'%')
and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
and create_time >= #{paramCondition.startTime}
and create_time <= #{paramCondition.endTime}
select
from cm_passing_station_collection where 1 = 1
select COUNT(*) as repairQty from cm_passing_station_collection where DateDiff(dd,create_time,getdate())=0
select COUNT(*) as repairQty from cm_passing_station_collection where DateDiff(week,create_time,getdate())=1
update cm_passing_station_collection set sfc_code = #{sfcCode} where sfc_code = #{childSfcCode}
SELECT
location_code as locationCode,
SUM ( CASE WHEN out_rs_sign = 1 THEN 1 ELSE 0 END ) as 'qualified',
SUM ( CASE WHEN out_rs_sign = 2 THEN 1 ELSE 0 END ) as 'unqualified',
FORMAT(CAST(SUM ( CASE WHEN out_rs_sign = 1 THEN 1 ELSE 0 END )*1.00 / COUNT(location_code) AS DECIMAL(8,6)),'P') as 'passRate'
FROM
cm_passing_station_collection
WHERE
1 = 1
and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%')
and production_line like CONCAT('%',#{paramCondition.productionLine},'%')
and sfc_code like CONCAT('%',#{paramCondition.sfcCode},'%')
and location_code = #{paramCondition.locationCode}
and create_time >= #{paramCondition.startTime}
and create_time <= #{paramCondition.endTime}
GROUP BY
location_code
select DISTINCT sfc_code as sfcCode FROM cm_passing_station_collection WHERE sfc_code LIKE CONCAT('%',#{dateLike},'%') GROUP BY sfc_code
SELECT * FROM cm_passing_station_collection ORDER BY create_time DESC LIMIT 1
SELECT * FROM cm_passing_station_collection WHERE sfc_code = #{sfcCode} ORDER BY location_code
SELECT COUNT(*) AS num,location_code AS locationCode FROM cm_passing_station_collection GROUP BY location_code