| | |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | import com.example.springboot.entity.CarPosition; |
| | | import com.example.springboot.entity.Glass; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.alarmmg; |
| | | |
| | |
| | | @Select("select cage,round(100-(21-sum(state))/21*100) as cell,21-sum(state) as state from (select cage,cell,max(state) as state from storage_cage group by cage,cell) as cages group by cage") |
| | | List<StorageCage> selectAll(); |
| | | |
| | | // 查询1-5笼内层格子状态 |
| | | // 查询10-6笼内层格子状态 |
| | | @Select("SELECT cage,state,ifnull(glasswidth/2750*2,0) as glasswidth from storage_cage where cage>5 and tier=2 order by cage desc,cell desc") |
| | | List<StorageCage> selectRack1(); |
| | | |
| | | // 查询6-10笼内层格子状态 |
| | | // 查询5-1笼内层格子状态 |
| | | @Select("SELECT cage,state,ifnull(glasswidth/2750*2,0) as glasswidth from storage_cage where cage<=5 and tier=2 order by cage desc,cell desc") |
| | | List<StorageCage> selectRack2(); |
| | | |
| | | // 查询1-5笼外层格子状态 |
| | | // 查询10-6笼外层格子状态 |
| | | @Select("SELECT case when tier=1 then cage else 0 end as cage,case when tier=1 then state else 0 end as state,sum(case when tier=1 then glasswidth/2750*2 else 0 end) as glasswidth,sum(case when tier=2 then glasswidth/2750*2 else 0 end) as width from storage_cage where cage>5 group by cage,cell order by cage desc,cell desc") |
| | | List<StorageCage> selectRack3(); |
| | | |
| | | // 查询6-10笼外层格子状态 |
| | | // 查询5-1笼外层格子状态 |
| | | @Select("SELECT case when tier=1 then cage else 0 end as cage,case when tier=1 then state else 0 end as state,sum(case when tier=1 then glasswidth/2750*2 else 0 end) as glasswidth,sum(case when tier=2 then glasswidth/2750*2 else 0 end) as width from storage_cage where cage<=5 group by cage,cell order by cage desc,cell desc") |
| | | List<StorageCage> selectRack4(); |
| | | |
| | |
| | | void updateOrder(); |
| | | |
| | | // 查询是否存在正在上片的任务 |
| | | @Select("select count(*) from storage_task where task_state=0 and task_type=1") |
| | | short SelectOutTask(); |
| | | @Select("select count(*) from storage_task where task_state=0 and task_type=0") |
| | | short SelectInTask(); |
| | | |
| | | // 手动完成任务 |
| | | @Update("update storage_task set task_state=1 where task_type=#{task_type} and task_state=0") |
| | |
| | | @Select("select * from storage_cage where glass_id=#{glassid}") |
| | | StorageCage SelectGlassInfo(Integer glassid); |
| | | |
| | | @Select("select * from glass where glassid=#{glassid}") |
| | | Glass SelectGlassByGlassID(String glassid); |
| | | |
| | | } |