| | |
| | | <sql id="all_columns"> |
| | | workstation_id,value_collect,calendar_code,factory_year,factory_month,factory_date,factory_week,shift_index,shift_time_type,wcs,rps,is_fix_point,is_sync,is_plan,feedback_point_type,feedback_id,is_deleted,employee_id |
| | | </sql> |
| | | <select id="lastStateNotEqValue" resultMap="voResultMap"> |
| | | select <include refid="all_columns" /> from root.f2.state_${workstationId} where is_fix_point=false and is_deleted=false and wcs <>#{value} and wcs > 0 order by time desc limit 1 align by device |
| | | <select id="lastStateNotEqValueLtTime" resultMap="voResultMap"> |
| | | select <include refid="all_columns" /> from root.f2.state_${workstationId} where is_fix_point=false and is_deleted=false and wcs <>#{value} and wcs > 0 and time < #{beforeTime} order by time desc limit 1 align by device |
| | | </select> |
| | | |
| | | <select id="firstStateEqValueGtTime" resultMap="voResultMap"> |