| | |
| | | public R statis(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | Page<StockStatisDTO> stockStatis = locDetlService.getStockStatis(toPage(curr, limit, param, StockStatisDTO.class)); |
| | | Page<LocDetl> stockStatis = locDetlService.getStockStatis(toPage(curr, limit, param, LocDetl.class)); |
| | | return R.ok().add(stockStatis); |
| | | } |
| | | |
| | |
| | | */ |
| | | List<String> getSameDetlToday(String matnr, String batch, Integer start, Integer end); |
| | | |
| | | Page<StockStatisDTO> getStockStatis(Page<StockStatisDTO> page); |
| | | Page<LocDetl> getStockStatis(Page<LocDetl> page); |
| | | |
| | | Double getSumAnfme(String matnr); |
| | | |
| | |
| | | return false; |
| | | } |
| | | if (crnp.getCrnErr() != null) { |
| | | if (crnp.getCrnErr() != 0) { |
| | | if (crnp.getCrnErr() != 0 && crnp.getCrnErr() != 10) { |
| | | log.error("{}号堆垛机异常,异常码{}", crnNo, crnp.getCrnErr()); |
| | | return false; |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | // @Override |
| | | // public Page<StockStatisDTO> getStockStatis1(Page<StockStatisDTO> page) { |
| | | // page.setRecords(baseMapper.asrsAndErpList(page.getCondition())); |
| | | // page.setTotal(baseMapper.asrsAndErpCount(page.getCondition())); |
| | | // return page; |
| | | // } |
| | | |
| | | @Override |
| | | public Page<StockStatisDTO> getStockStatis(Page<StockStatisDTO> page) { |
| | | page.setRecords(baseMapper.asrsAndErpList(page.getCondition())); |
| | | page.setTotal(baseMapper.asrsAndErpCount(page.getCondition())); |
| | | public Page<LocDetl> getStockStatis(Page<LocDetl> page) { |
| | | page.setRecords(baseMapper.getStockStatis(page.getCondition())); |
| | | page.setTotal(baseMapper.getStockStatisCount(page.getCondition())); |
| | | return page; |
| | | } |
| | | |
| | |
| | | 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); |
| | | int shallowRow = row; |
| | | return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2); |
| | | } |
| | | |
| | |
| | | int row = getRow(shallowLoc); |
| | | int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); |
| | | int targetRow; |
| | | if (remainder == 2) { |
| | | targetRow = row - 1; |
| | | } else if (remainder == 3) { |
| | | targetRow = row + 1; |
| | | } else { |
| | | throw new RuntimeException(shallowLoc + "不是浅库位,系统繁忙"); |
| | | } |
| | | // if (remainder == 2) { |
| | | // targetRow = row - 1; |
| | | // } else if (remainder == 3) { |
| | | // targetRow = row + 1; |
| | | // } else { |
| | | // throw new RuntimeException(shallowLoc + "不是浅库位,系统繁忙"); |
| | | // } |
| | | targetRow = row; |
| | | return zerofill(String.valueOf(targetRow), 2) + shallowLoc.substring(2); |
| | | } |
| | | |
| | |
| | | |
| | | //库位排号分配 |
| | | public static int[] LocNecessaryParameters(Integer whsType, Integer curRow, Integer crnNumber) { |
| | | switch (whsType){ |
| | | switch (2){ |
| | | case 1://经典双伸库位 |
| | | return LocNecessaryParametersDoubleExtension(whsType, curRow, crnNumber); //已完善 |
| | | case 2://经典单伸库位(2排货架) |
| | |
| | | RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class); |
| | | RowLastno rowLastno = rowLastnoService.selectById(whsType); |
| | | Integer sRow = rowLastno.getsRow(); |
| | | Integer eRow = rowLastno.geteRow(); |
| | | Integer sCrnNo = rowLastno.getsCrnNo(); |
| | | |
| | | // 判断仓库类型是否满足要求 |
| | |
| | | |
| | | // 计算最深库位排和最浅库位排 |
| | | int minRow = sRow; // 起始排号 |
| | | int maxRow = sRow + 7; // 终止排号 (8排) |
| | | int maxRow = eRow; // |
| | | |
| | | // 检查排号范围是否合法 |
| | | if (curRow < minRow || curRow > maxRow) { |
| | |
| | | continue; |
| | | } |
| | | if (Utils.BooleanWhsTypeStaIoType(whsType)){ |
| | | String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); |
| | | // String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "O")); |
| | | .eq("loc_sts", "O")); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast2; |
| | | break; |
| | |
| | | //@Transactional(rollbackFor = Throwable.class) |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | public void InHedTBScheduler() { |
| | | //log.info("InHedTBScheduler开始了"); |
| | | //log.info("InHedTBScheduler开始了" |
| | | // 7); |
| | | if (!erpEnabled) return; |
| | | String sqlInHed = "select * from erp_InHedTB where LKName='中扬二期'"; |
| | | List<InHedTB> inHeds = erpSqlServer.select(sqlInHed, InHedTB.class); |