| | |
| | | */ |
| | | public synchronized void locToCrnStn(CrnSlave slave, CrnProtocol crnProtocol,Integer mark) { |
| | | News.warnNoLog(""+mark+" - 2"+" - 0"+" - 堆垛机入出库作业下发:执行出库"); |
| | | |
| | | int devpTaskStackOver = 20; |
| | | Config config = configService.selectOne(new EntityWrapper<Config>() |
| | | .eq("code", "devpTaskStackOver")); |
| | | if(config != null) { |
| | | devpTaskStackOver = Integer.parseInt(config.getValue()); |
| | | } |
| | | |
| | | if (commonService.queryDevpWorkingCount() > devpTaskStackOver) { |
| | | News.warn(""+mark+" - 2"+" - 0"+" - 输送线任务过载"); |
| | | return; |
| | | } |
| | | |
| | | for (CrnSlave.CrnStn crnStn : slave.getCrnOutStn()) { |
| | | // 获取工作状态为11(生成出库ID)的出库工作档 |
| | | // WrkMast wrkMast = wrkMastMapper.selectPakOutStep1(slave.getId(), crnStn.getStaNo()); |
| | |
| | | return startupDto; |
| | | } |
| | | |
| | | public Integer queryDevpWorkingCount() { |
| | | List<WrkMast> wrkMastsIn = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | .in("wrk_sts", 2, 3, 4, 5)); |
| | | |
| | | List<WrkMast> wrkMastsOut = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | .in("wrk_sts", 12, 14, 15)); |
| | | |
| | | int count = 0; |
| | | count += wrkMastsIn.size(); |
| | | count += wrkMastsOut.size(); |
| | | return count; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(Arith.remainder(1, 4)); |
| | | System.out.println("0200201".substring(0, 2)); |