| | |
| | | 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")){ |
| | | if (locNo != null && !locNo.getLocSts().equals("O")) { |
| | | locMastStart = locNo; |
| | | } |
| | | } |
| | |
| | | .eq("loc_sts","O") |
| | | .eq("crn_no",basCrnp.getCrnNo()) |
| | | .eq("loc_type1",locMastStart.getLocType1()) |
| | | .ne("modi_user",66) |
| | | .ne("modi_user", 77) |
| | | .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")){ |
| | | if (locNo != null && locNo.getLocSts().equals("O")) { |
| | | |
| | | }else { |
| | | locMastEnd.setModiUser(66L); |
| | | locMastEnd.setModiUser(77L); |
| | | locMastService.updateById(locMastEnd); |
| | | continue; |
| | | } |
| | |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | // @Scheduled(cron = "0/2 * * * * ? ") |
| | | private void send() { |
| | | |
| | | //饼图 |
| | |
| | | webSocketServer.onMessage(JSONObject.toJSONString(map),null,"all"); |
| | | |
| | | } |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | // @Scheduled(cron = "0/2 * * * * ? ") |
| | | private void errorSend(){ |
| | | Map<String,Object> map=new HashMap<String, Object>(); |
| | | // for (LedSlave slave : slaveProperties.getLed()) { |
| | |
| | | // } |
| | | } |
| | | |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | // @Scheduled(cron = "0/2 * * * * ? ") |
| | | private void TaskSend(){ |
| | | Map<String,Object> map=new HashMap<String, Object>(); |
| | | // List<LedCommand> commandList = null; |
| | |
| | | public static String getShallowLoc(SlaveProperties slaveProperties, String deepLoc) { |
| | | int row = getRow(deepLoc); |
| | | int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); |
| | | int shallowRow = remainder == 1 ? (row + 1) : (row - 1); |
| | | int shallowRow = remainder == 1 ? (row - 1) : (row + 1); |
| | | return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2); |
| | | } |
| | | |
| | |
| | | |
| | | loc-move: |
| | | enable: true |
| | | crn1: false |
| | | crn1: true |
| | | crn2: false |
| | | crn3: false |
| | | crn4: false |