| | |
| | | |
| | | List<Double> dbOverview = digitalTwinMapper.overview(areaId); |
| | | if (dbOverview != null && !dbOverview.isEmpty()){ |
| | | int total = (int)Math.round(dbOverview.get(0)); |
| | | total = Math.min(total, 40000); |
| | | DtOverviewVo dtOverviewVo = DtOverviewVo.builder() |
| | | .totalLoc((int)Math.round(dbOverview.get(0))) |
| | | .totalLoc(total) |
| | | .useLoc((int)Math.round(dbOverview.get(1))) |
| | | .remainingStock((int)Math.round(dbOverview.get(2))) |
| | | .todayWarehousing((int)Math.round(dbOverview.get(3))) |
| | |
| | | return dtInAndOutBoundVos; |
| | | } |
| | | /** |
| | | * 近期近期呆滞品信息,默认超过30天为呆滞品 |
| | | * 近期近期呆滞品信息,默认超过14天为呆滞品 |
| | | * |
| | | * @param areaId |
| | | * @param overDayNum |
| | |
| | | */ |
| | | public List<DtDetainMatVo> recentDetainMat(String areaId, Integer overDayNum, Integer pageIndex, Integer pageSize, String condition) { |
| | | |
| | | overDayNum = overDayNum == null ? 30 : overDayNum; |
| | | overDayNum = overDayNum == null ? 14 : overDayNum; |
| | | pageIndex = pageIndex == null ? 1 : pageIndex; |
| | | pageSize = pageSize == null ? 1000000 : pageSize; |
| | | |
| | |
| | | /** |
| | | * 查询库存和库位详细信息 |
| | | * |
| | | * @param areaId |
| | | * @param arr |
| | | * @return |
| | | */ |
| | | public List<LocMast> warehouseDetail(String areaId) { |
| | | return locMastService.selectList(new EntityWrapper<>()); |
| | | public List<LocMast> warehouseDetail(Integer[] arr) { |
| | | if (arr == null || arr.length == 0) { |
| | | return locMastService.selectList(new EntityWrapper<>()); |
| | | } |
| | | return locMastService.selectList(new EntityWrapper<LocMast>().in("row1", Arrays.asList(arr))); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getLocalDetalByLocNo(String locNo) { |
| | | if (locNo == null || locNo.trim().isEmpty()) { |
| | | return Collections.emptyList(); |
| | | } |
| | | |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>() |
| | | .eq("loc_no", locNo.trim()) |
| | | .orderBy("appe_time", true)); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | |
| | | for (LocDetl locDetl : locDetls) { |
| | | Map<String, Object> item = new LinkedHashMap<>(); |
| | | item.put("locNo", locDetl.getLocNo()); |
| | | item.put("zpallet", locDetl.getZpallet()); |
| | | item.put("matnr", locDetl.getMatnr()); |
| | | item.put("maktx", locDetl.getMaktx()); |
| | | item.put("specs", locDetl.getSpecs()); |
| | | item.put("batch", locDetl.getBatch()); |
| | | item.put("anfme", locDetl.getAnfme()); |
| | | item.put("orderNo", locDetl.getOrderNo()); |
| | | item.put("frozen", locDetl.getFrozen()); |
| | | result.add(item); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | public Map<String, Object> getLocInfo() { |
| | | List<LocMast> LocMasts = locMastMapper.selectList(new EntityWrapper<>()); |
| | | Map<String, Object> result = new HashMap<>(); |