|  |  | 
 |  |  |     @Update("update asr_wrk_mast set ste_no = null where wrk_no = #{wrkNo}") | 
 |  |  |     int setSteEmpty(Integer wrkNo); | 
 |  |  |  | 
 |  |  |     WrkMast selectPakin(@Param("crnNo")Integer crnNo, @Param("steNo")Integer steNo); | 
 |  |  |  | 
 |  |  |     WrkMast selectPakout(@Param("crnNo")Integer crnNo, @Param("steNo")Integer steNo); | 
 |  |  |  | 
 |  |  | } | 
 
 |  |  | 
 |  |  |  | 
 |  |  |                     try { | 
 |  |  |                         // 保存工作明细档历史档 | 
 |  |  |                         if (wrkMastMapper.saveWrkDetlLog(wrkMast.getWrkNo()) == 0) { | 
 |  |  |                             throw new CoolException("保存工作明细档历史档失败"); | 
 |  |  |                         } | 
 |  |  | //                        if (wrkMastMapper.saveWrkDetlLog(wrkMast.getWrkNo()) == 0) { | 
 |  |  | //                            throw new CoolException("保存工作明细档历史档失败"); | 
 |  |  | //                        } | 
 |  |  |                         // 保存工作主档历史档 | 
 |  |  |                         if (wrkMastMapper.saveWrkMastLog(wrkMast.getWrkNo()) == 0) { | 
 |  |  |                             throw new CoolException("保存工作主档历史档失败"); | 
 |  |  | 
 |  |  |                 continue; | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             // 过滤 | 
 |  |  |             if (null != wrkMastMapper.selectPakout(slave.getId(), null)) { | 
 |  |  |                 log.error("{}入库任务无法作业,因存在出库中任务!", wrkMast.getWrkNo()); | 
 |  |  |                 continue; | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             // 置顶任务 | 
 |  |  |             wrkMast.setIoPri((double) 9999); | 
 |  |  |             wrkMastMapper.updateById(wrkMast); | 
 |  |  | 
 |  |  |                 if (steNo != null) { | 
 |  |  |                     // 小车行走到堆垛机待搬移点 | 
 |  |  |                     if (wrkMast.getWrkSts() == 2L && wrkMast.getSteNo() == null) { | 
 |  |  | //                        if (null != wrkMastMapper.selectPakin(slave.getId(), steNo)) { | 
 |  |  | //                            continue; | 
 |  |  | //                        } | 
 |  |  |                         this.letCarBeReady(wrkMast, steNo, wrkMast.getLocNo()); | 
 |  |  |                     } | 
 |  |  |                     // 小车搬走 | 
 |  |  | 
 |  |  |                     continue; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 // 过滤 | 
 |  |  |                 if (null != wrkMastMapper.selectPakin(slave.getId(), null)) { | 
 |  |  |                     log.error("{}出库任务无法作业,因存在入库中任务!", wrkMast.getWrkNo()); | 
 |  |  |                     continue; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 // 置顶任务 | 
 |  |  |                 wrkMast.setIoPri((double) 9999); | 
 |  |  |                 wrkMastMapper.updateById(wrkMast); | 
 
 |  |  | 
 |  |  |   enable: false | 
 |  |  |  | 
 |  |  | wms: | 
 |  |  |   url: localhost:8080/bfwms | 
 |  |  |   url: 10.10.10.100:8080/bfwms | 
 |  |  |  | 
 |  |  | # 下位机配置 | 
 |  |  | wcs-slave: | 
 
 |  |  | 
 |  |  |     </resultMap> | 
 |  |  |  | 
 |  |  |     <select id="findByWorkNo" resultMap="BaseResultMap"> | 
 |  |  |         select wrk_no, matnr, maktx, qty from asr_wrk_detl where 1=1 and wrk_no = #{workNo} | 
 |  |  |         select wrk_no, matnr, maktx, anfme from asr_wrk_detl where 1=1 and wrk_no = #{workNo} | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  | </mapper> | 
 
 |  |  | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectPakInStep23456" resultMap="BaseResultMap"> | 
 |  |  |         select top 1 * from dbo.asr_wrk_mast where wrk_sts in (2,3,4,5,6,7, 8) and crn_no=#{crnNo} and wrk_no=#{workNo} and sta_no=#{staNo} 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 | 
 |  |  |         select top 1 * from dbo.asr_wrk_mast where wrk_sts in (2,3,4,5,6,7,8) and crn_no=#{crnNo} and wrk_no=#{workNo} and sta_no=#{staNo} 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 | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectPakInStep45" resultMap="BaseResultMap"> | 
 |  |  | 
 |  |  |         select top 1 * from dbo.asr_wrk_mast where 1=1 and (wrk_sts=7 or wrk_sts=16) and crn_no=#{crnNo} order by io_time,wrk_no | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectPakin" resultMap="BaseResultMap"> | 
 |  |  |         select top 1 * from dbo.asr_wrk_mast | 
 |  |  |         where 1=1 | 
 |  |  |         and wrk_sts in (3,4,5,6,7,8) | 
 |  |  |         and crn_no=#{crnNo} | 
 |  |  |         <if test="steNo != null"> | 
 |  |  |             and ste_no = #{steNo} | 
 |  |  |         </if> | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectPakout" resultMap="BaseResultMap"> | 
 |  |  |         select top 1 * from dbo.asr_wrk_mast | 
 |  |  |         where 1=1 | 
 |  |  |         and wrk_sts in (12,13,14,15,16) | 
 |  |  |         and crn_no=#{crnNo} | 
 |  |  |         <if test="steNo != null"> | 
 |  |  |             and ste_no = #{steNo} | 
 |  |  |         </if> | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  | </mapper> |