| | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | * Created by vincent on 2020/7/7 //跑酷测试 生成移库 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | |
| | | return; |
| | | } |
| | | for (BasCrnp basCrnp:basCrnps){ |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("crn_no",basCrnp.getCrnNo())); |
| | | if (Cools.isEmpty(wrkMasts) || wrkMasts.size()==0) { |
| | | LocMast locMastStart = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts","D").eq("crn_no",basCrnp.getCrnNo()).orderBy("appe_time",true));//空板所在 |
| | | if (Cools.isEmpty(locMastStart)){ |
| | | continue; |
| | | } |
| | | if (!Utils.isShallowLoc(slaveProperties, locMastStart.getLocNo())){ |
| | | String shallowLocNo = Utils.getShallowLoc(slaveProperties, locMastStart.getLocNo()); |
| | | LocMast locNo = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", shallowLocNo)); |
| | | if (!locNo.getLocSts().equals("O")){ |
| | | locMastStart = locNo; |
| | | } |
| | | } |
| | | LocMast locMastEnd = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts","O").eq("crn_no",basCrnp.getCrnNo()).ne("modi_user",66).orderBy("row1",true));//目标 |
| | | if (Cools.isEmpty(locMastEnd)){ |
| | | continue; |
| | | } |
| | | if (!Utils.isShallowLoc(slaveProperties, locMastEnd.getLocNo())){ |
| | | String shallowLocNo = Utils.getShallowLoc(slaveProperties, locMastEnd.getLocNo()); |
| | | LocMast locNo = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", shallowLocNo)); |
| | | if (locNo.getLocSts().equals("O")){ |
| | | try{ |
| | | if (basCrnp.getCrnSts()!=3) continue; |
| | | if (!basCrnp.getInEnable().equals("N") || !basCrnp.getOutEnable().equals("Y")) continue; |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("crn_no",basCrnp.getCrnNo())); |
| | | if (Cools.isEmpty(wrkMasts) || wrkMasts.size()==0) { |
| | | LocMast locMastStart = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts","D").eq("crn_no",basCrnp.getCrnNo()).orderBy("appe_time",true));//空板所在 |
| | | if (Cools.isEmpty(locMastStart)){ |
| | | continue; |
| | | } |
| | | if (!Utils.isShallowLoc(slaveProperties, locMastStart.getLocNo())){ |
| | | String shallowLocNo = Utils.getShallowLoc(slaveProperties, locMastStart.getLocNo()); |
| | | LocMast locNo = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", shallowLocNo)); |
| | | if (!locNo.getLocSts().equals("O")){ |
| | | locMastStart = locNo; |
| | | } |
| | | } |
| | | LocMast locMastEnd = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts","O").eq("crn_no",basCrnp.getCrnNo()).ne("modi_user",66).orderBy("row1",true));//目标 |
| | | if (Cools.isEmpty(locMastEnd)){ |
| | | continue; |
| | | } |
| | | if (!Utils.isShallowLoc(slaveProperties, locMastEnd.getLocNo())){ |
| | | String shallowLocNo = Utils.getShallowLoc(slaveProperties, locMastEnd.getLocNo()); |
| | | LocMast locNo = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", shallowLocNo)); |
| | | if (locNo.getLocSts().equals("O")){ |
| | | |
| | | }else { |
| | | locMastEnd.setModiUser(66L); |
| | | locMastService.updateById(locMastEnd); |
| | | continue; |
| | | } |
| | | } |
| | | }else { |
| | | locMastEnd.setModiUser(66L); |
| | | locMastService.updateById(locMastEnd); |
| | | continue; |
| | | } |
| | | } |
| | | // if (Cools.isEmpty(locMastStart) || Cools.isEmpty(locMastEnd)){ |
| | | |
| | | ReturnT<String> result = locMoveAllHandler.start(locMastStart,locMastEnd,basCrnp.getCrnNo()); |
| | | if (!result.isSuccess()) { |
| | | log.error("处理失败"); |
| | | } |
| | | } |
| | | ReturnT<String> result = locMoveAllHandler.start(locMastStart,locMastEnd,basCrnp.getCrnNo()); |
| | | if (!result.isSuccess()) { |
| | | log.error("处理失败"); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("处理失败,异常信息:"+e); |
| | | } |
| | | } |
| | | } |
| | | |