| | |
| | | @Repository |
| | | public interface WrkMastMapper extends BaseMapper<WrkMast> { |
| | | |
| | | @Insert("insert into asr_wrk_mast_log select * from asr_wrk_mast where wrk_no=#{workNo}") |
| | | int saveLog(Long workNo); |
| | | |
| | | WrkMast selectByLocNo(@Param("sourceLocNo") String sourceLocNo); |
| | | |
| | | WrkMast selectByLocNo1(@Param("sourceLocNo") String sourceLocNo); |
| | | |
| | | // @Select("select * from asr_wrk_mast where ((wrk_sts = 4 Or wrk_sts = 14 ) and io_type <> 103 and io_type <> 104 and io_type <> 107 ) or (wrk_sts = 2 and io_type=6) order by upd_mk,io_time,wrk_no") |
| | | List<WrkMast> selectToBeCompleteData(); |
| | | |
| | |
| | | |
| | | // wcs --------------------------------------------- |
| | | // 入库第一步,扫码仪获取条码信息时查询 |
| | | @Select("select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=2 and barcode=#{barcode} and (io_type=1 or io_type=10) order by io_pri desc,io_time,wrk_no ASC") |
| | | // @Select("select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=2 and barcode=#{barcode} and (io_type=1 or io_type=10) order by io_pri desc,io_time,wrk_no ASC") |
| | | WrkMast selectPakInStep1(@Param("sourceStaNo")Integer sourceStaNo, @Param("barcode")String barcode); |
| | | |
| | | WrkMast selectPakInStep111(@Param("sourceStaNo")Integer sourceStaNo, @Param("barcode")String barcode); |
| | | |
| | | WrkMast selectPakInStep11(@Param("sourceStaNo")Integer sourceStaNo); |
| | | |
| | | // 入库第二步,当托盘物料在堆垛机入库站时时查询 |
| | | @Select("select top 1 * from dbo.asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and wrk_no=#{workNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC") |
| | | WrkMast selectPakInStep2(@Param("crnNo")Integer crnNo, @Param("workNo")Integer workNo); |
| | | // @Select("select top 1 * from dbo.asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and wrk_no=#{workNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC") |
| | | WrkMast selectPakInStep2(@Param("crnNo")Integer crnNo, @Param("workNo")Integer workNo, @Param("staNo")Integer staNo); |
| | | |
| | | /** |
| | | * 查询同一台堆垛机下所有出库任务 |
| | | * @param crnNo |
| | | * @return |
| | | */ |
| | | List<WrkMast> selectPakInStep12(@Param("crnNo")Integer crnNo); |
| | | |
| | | // 入库第三步,当堆垛机把货放入库位时 |
| | | @Select("select top 1 from dbo.asr_wrk_mast where wrk_no=#{workNo}") |
| | | // @Select("select top 1 from dbo.asr_wrk_mast where wrk_no=#{workNo}") |
| | | WrkMast selectPakInStep3(@Param("workNo")Integer workNo); |
| | | WrkMast selectWrkMastUnstackingOne212(); |
| | | |
| | | WrkMast selectPakInStep4(@Param("staNo")Integer staNo,@Param("sheetNo")String sheetNo); |
| | | WrkMast selectPakInStep5(@Param("staNo")Integer staNo,@Param("sheetNo")String sheetNo); |
| | | |
| | | // 拣料再入库时,站点有物且需求时查询 |
| | | @Select("select top 1 * from asr_wrk_mast where wrk_no=#{workNo} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104)") |
| | | WrkMast selectPickStep(@Param("workNo")Integer workNo); |
| | | // @Select("select top 1 * from asr_wrk_mast where wrk_no=#{workNo} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104)") |
| | | WrkMast selectPickStep(@Param("barcode")String barcode); |
| | | |
| | | // 出库第一步,从库位到堆垛机出库站 |
| | | @Select("select top 1 * from dbo.asr_wrk_mast where crn_no=#{crnNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc") |
| | | WrkMast selectPakOutStep1(@Param("crnNo")Integer crnNO); |
| | | // @Select("select top 1 * from dbo.asr_wrk_mast where crn_no=#{crnNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc") |
| | | WrkMast selectPakOutStep1(@Param("crnNo")Integer crnNO, @Param("sourceStaNo")Integer sourceStaNo); |
| | | |
| | | // 出库第二步,从堆垛机出库站到目标出库站,堆垛机出库站有物时执行 |
| | | @Select("select top 1 * from dbo.asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=12 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC") |
| | | // @Select("select top 1 * from dbo.asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=12 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC") |
| | | WrkMast selectPakOutStep2(@Param("sourceStaNo")Integer sourceStaNo); |
| | | WrkMast selectPakOutStep2345(@Param("sourceStaNo")Integer sourceStaNo,@Param("workNo")Integer workNo); |
| | | |
| | | WrkMast selectPakOutStep3(@Param("sourceStaNo")Integer sourceStaNo); |
| | | |
| | | // 库位移转工作档,在进行一次入出库作业后紧跟库位移转 |
| | | @Select("select top 1 * from dbo.asr_wrk_mast where wrk_sts=11 and (io_type=11 or io_type=110) and crn_no=#{crnNo} order by io_time,wrk_no") |
| | | // @Select("select top 1 * from dbo.asr_wrk_mast where wrk_sts=11 and (io_type=11 or io_type=110) and crn_no=#{crnNo} order by io_time,wrk_no") |
| | | WrkMast selectLocMove(@Param("crnNo")Integer crnNo); |
| | | |
| | | WrkMast selectLocMoving(@Param("crnNo")Integer crnNo); |
| | | |
| | | WrkMast selectWorking(@Param("crnNo")Integer crnNo); |
| | | |
| | | // work log ------------------------------------------------------- |
| | | @Insert("insert into asr_wrk_mast_log select * from asr_wrk_mast where wrk_no=#{workNo}") |
| | |
| | | @Update("update cust_wait_pakin set io_status='F' where zpallet = #{barcode}") |
| | | int updateWaitPakInStep2(String barcode); |
| | | |
| | | // WrkMast selectWorkingPakin(); |
| | | // |
| | | // WrkMast selectWorkingPakout(); |
| | | |
| | | /** |
| | | * 堆垛机是否存在出库任务 |
| | | * @param crnNo |
| | | * @return |
| | | */ |
| | | WrkMast selectCrnWorking(@Param("crnNo")Integer crnNo); |
| | | |
| | | /** |
| | | * 输送线是否存在入库任务 |
| | | * @param crnNo |
| | | * @return |
| | | */ |
| | | WrkMast selectDevWorking(@Param("crnNo")Integer crnNo); |
| | | |
| | | |
| | | List<WrkMast> selectPick(); |
| | | |
| | | /** |
| | | * 查找堆垛机号对应所有待出库工作档 |
| | | * @param crnNO |
| | | * @param sourceStaNo |
| | | * @return |
| | | */ |
| | | List<WrkMast> selectPakOutStep11(@Param("crnNo")Integer crnNO, @Param("sourceStaNo")Integer sourceStaNo); |
| | | |
| | | /** |
| | | * 查询同一台堆垛机下所有出库任务 |
| | | * @param crnNO |
| | | * @return |
| | | */ |
| | | List<WrkMast> selectPakOutStep12(@Param("crnNo")Integer crnNO); |
| | | |
| | | WrkMast selectWorkingPakin(@Param("sourceStaNo")Integer sourceStaNo); |
| | | WrkMast selectWorkingPakout(@Param("sourceStaNo")Integer sourceStaNo); |
| | | |
| | | WrkMast selectPakoutEmpty(@Param("staNo")Integer outSite); |
| | | |
| | | |
| | | Integer selectExistInEmpty(); |
| | | |
| | | /** |
| | | * 查找工作状态为2(设备上走),且RGV入库接驳站符合的的入库工作档 |
| | | * @param rgvNo |
| | | * @param staNos |
| | | * @return |
| | | */ |
| | | List<WrkMast> selectRgvInStep1(@Param("rgvNo")Integer rgvNo, @Param("staNos")List<Integer> staNos); |
| | | |
| | | /** |
| | | * 查找是否存在RGV正在工作中的任务 |
| | | * @param rgvNo |
| | | * @return |
| | | */ |
| | | List<WrkMast> selectRgvInWorking(@Param("rgvNo")Integer rgvNo); |
| | | |
| | | /** |
| | | * 指定RGV出库站,查找工作状态为7(RGV入库放货中)的入库工作档List |
| | | * @param rgvInDStn |
| | | * @return |
| | | */ |
| | | List<WrkMast> selectRgvInStep2(@Param("rgvInDStn")Integer rgvInDStn); |
| | | |
| | | /** |
| | | * 指定RGV出库站,查找工作状态为17(RGV出库放货中)的出库工作档List |
| | | * @param rgvOutDStn |
| | | * @return |
| | | */ |
| | | List<WrkMast> selectRgvOutStep2(@Param("rgvOutDStn")Integer rgvOutDStn); |
| | | |
| | | /** |
| | | * 指定RGV出库站,查找工作状态为7(RGV入库放货中)或 17(RGV出库放货中) 的工作档List |
| | | * @param rgvDestStn |
| | | * @return |
| | | */ |
| | | List<WrkMast> selectRgvDestStep2(@Param("rgvDestStn")Integer rgvDestStn); |
| | | |
| | | /** |
| | | * 查找工作状态为14(出库完成),且RGV出库接驳站符合的的入库工作档 |
| | | * @param rgvNo |
| | | * @param staNos |
| | | * @return |
| | | */ |
| | | List<WrkMast> selectRgvOutStep1(@Param("rgvNo")Integer rgvNo, @Param("staNos")List<Integer> staNos); |
| | | |
| | | /** |
| | | * 查找是否存在RGV正在出库工作中的任务 |
| | | * @param rgvNo |
| | | * @return |
| | | */ |
| | | List<WrkMast> selectRgvOutWorking(@Param("rgvNo")Integer rgvNo); |
| | | |
| | | /*..............................徐工汉云..............以下.............上饶江铜..............................*/ |
| | | /*...............................Created by Monkey D. Luffy on 2023.07.19................................*/ |
| | | |
| | | /*=========================================== RGV任务绑定相关 ========================================*/ |
| | | |
| | | /** |
| | | * 获取等待绑定RGV的任务 |
| | | * @return |
| | | */ |
| | | List<WrkMast> selectWaitBindRGV(); |
| | | |
| | | /** |
| | | * 查找是否存在入出库工作中等待RGV搬运的任务 |
| | | * |
| | | * @param rgvNo |
| | | * @return |
| | | */ |
| | | List<WrkMast> selectIoRgvNo(@Param("rgvNo") Integer rgvNo); |
| | | |
| | | /** |
| | | * 查找是否存在入库工作中正在走向RGV的任务 |
| | | * @param wrkNo |
| | | * @return |
| | | */ |
| | | WrkMast selectRgvInSteWrkNo(@Param("wrkNo")Integer wrkNo); |
| | | |
| | | /** |
| | | * 查找是否存在出库工作中正在走向RGV的任务 |
| | | * @param wrkNo |
| | | * @return |
| | | */ |
| | | WrkMast selectRgvOutSteWrkNo(@Param("wrkNo")Integer wrkNo); |
| | | |
| | | /** |
| | | * 查找是否存在入库工作中等待RGV搬运的任务 |
| | | * @param rgvNo |
| | | * @return |
| | | */ |
| | | WrkMast selectRgvInSteNo(@Param("rgvNo")Integer rgvNo); |
| | | |
| | | /** |
| | | * 查找是否存在出库工作中等待RGV搬运的任务 |
| | | * @param rgvNo |
| | | * @return |
| | | */ |
| | | WrkMast selectRgvOutSteNo(@Param("rgvNo")Integer rgvNo); |
| | | |
| | | |
| | | /*=========================================== RGV任务绑定相关 ========================================*/ |
| | | |
| | | /*=========================================== 自动补空板相关 ========================================*/ |
| | | |
| | | /** |
| | | * 查找是否存在出库工作中等待RGV搬运的任务 |
| | | */ |
| | | // List<WrkMast> selectDischargingMachineOutputTray(); |
| | | |
| | | /** |
| | | * 码垛完成驱动托盘下一步扫码入库 |
| | | */ |
| | | // List<WrkMast> selectStackingCompletionDriveTray(); |
| | | // /** |
| | | // * 码垛完成驱动托盘下一步扫码入库 |
| | | // * @param wrkNo |
| | | // */ |
| | | // @Update("update asr_wrk_mast set wrk_sts=44 where 1=1 and wrk_no=#{wrkNo}") |
| | | // int updateStackingCompletionDriveTray(@Param("wrkNo")Integer wrkNo); |
| | | |
| | | // int selectConfigCount10468N(); |
| | | // update Config -- Y |
| | | // @Update("update sys_config set value='Y' where 1=1 and id=10468 and value = 'N'") |
| | | // int updateConfig10468Y(); |
| | | /*=========================================== 自动补空板相关 ========================================*/ |
| | | |
| | | /** |
| | | * 查找是否存在拆垛单次完成的工作档 |
| | | */ |
| | | WrkMast selectWrkMastUnstackingOne202(@Param("sourceStaNo")Integer sourceStaNo); |
| | | WrkMast selectWrkMastUnstackingOne202Two(@Param("sourceStaNo")Integer sourceStaNo); |
| | | WrkMast selectWrkMastUnstackingOne145(@Param("sourceStaNo")Integer sourceStaNo); |
| | | |
| | | WrkMast selectWrkMastLabelingOne54(); |
| | | |
| | | List<WrkMast> selectWaitBindRGVRgvNo(@Param("rgvNo") Integer rgvNo); |
| | | List<WrkMast> selectWaitBindRgvNo2(@Param("rgvNo") Integer rgvNo); |
| | | void insertRgvMast(@Param("wrkNo") Integer wrkNo); |
| | | void updateRgvMast(@Param("wrkNo") Integer wrkNo); |
| | | |
| | | WrkMast selectWaitBindRgvNoOneWrkNo(@Param("wrkNo") Integer wrkNo); |
| | | |
| | | |
| | | |
| | | |
| | | /*..............................上饶江铜..............以上.............徐工汉云..............................*/ |
| | | } |