| | |
| | | import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.entity.DownWorkstation;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | import org.apache.ibatis.annotations.*;
|
| | | import org.springframework.stereotype.Component;
|
| | | import org.springframework.stereotype.Repository;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | @Mapper
|
| | | @Component
|
| | | @Repository
|
| | | @InterceptorIgnore(tenantLine = "true")
|
| | | @DS("hangzhoumes") // 指定使用 hangzhoumes 数据源
|
| | | public interface DownWorkstationMapper extends BaseMapper<DownWorkstation> {
|
| | | //根据工位ID和设备ID更新工位状态
|
| | | @Update("UPDATE down_workstation SET work_state = #{workState} " +
|
| | | "WHERE workstation_id = #{workstationId} AND device_id = #{deviceId}")
|
| | | void updateWorkStateByWorkstationIdAndDeviceId(@Param("workstationId") Integer workstationId,
|
| | | @Param("deviceId") Integer deviceId,
|
| | | @Param("workState") Integer workState);
|
| | | //工位ID删除信息
|
| | | @Delete("DELETE FROM down_workstation WHERE workstation_id = #{workstationId}")
|
| | | void deleteByWorkstationId(@Param("workstationId") Integer workstationId);
|
| | |
|
| | | //落架
|
| | | @Insert("INSERT INTO down_workstation (workstation_id, flow_card_id, device_id, enable_state, work_state) " +
|
| | | "VALUES (#{workstationId}, #{flowCardId}, #{deviceId}, #{enableState}, #{workState})")
|
| | | void insertDownWorkstation(DownWorkstation downWorkstation);
|
| | |
|
| | | //根据设备ID查询工位信息
|
| | | @Select("SELECT * FROM down_workstation WHERE device_id = #{deviceId}")
|
| | | List<DownWorkstation> selectByDeviceId(@Param("deviceId") Integer deviceId);
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | }
|