| | |
| | | |
| | | // 总库位数 |
| | | Integer total1 = (int) Arith.add(0, locUseRate.getFqty(), locUseRate.getOqty(), locUseRate.getUqty(), locUseRate.getXqty()); |
| | | Integer total = total1>40000?40000:total1; |
| | | Integer total = total1>40000?6528:total1; |
| | | // 使用中 |
| | | Integer used = locUseRate.getFqty() + locUseRate.getUqty(); |
| | | // 库位使用率 |
| | |
| | | Integer count = 0; |
| | | String supp = ""; |
| | | //该订单累计入出库件数 |
| | | List<WrkMast> orderNo = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("user_no", wrkMast.getUserNo())); |
| | | List<WrkMastLog> userNo = wrkMastLogService.selectList(new EntityWrapper<WrkMastLog>().eq("user_no", wrkMast.getUserNo()).eq("wrk_sts",15L)); |
| | | Integer ioType = wrkMast.getIoType(); |
| | | if (ioType != null && ioType < 100) { |
| | | if (orderNo != null && orderNo.size() > 0) { |
| | | count = orderNo.size(); |
| | | } |
| | | if (userNo != null && userNo.size() > 0) { |
| | | count = userNo.size()+count+1; |
| | | } |
| | | supp = count + ""; |
| | | Date endTime = new Date(); |
| | | Date startTime = resolveBusinessDayStart(endTime); |
| | | Long inboundCount = wrkMastLogService.countInboundHistoryBySourceStaNo(startTime, endTime, resolveInboundStationNo(wrkMast)); |
| | | supp = String.valueOf(inboundCount); |
| | | }else { |
| | | List<WrkMast> orderNo = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("user_no", wrkMast.getUserNo())); |
| | | List<WrkMastLog> userNo = wrkMastLogService.selectList(new EntityWrapper<WrkMastLog>().eq("user_no", wrkMast.getUserNo()).eq("wrk_sts",15L)); |
| | | if (userNo != null && userNo.size() > 0) { |
| | | count = userNo.size()+1; |
| | | } |
| | | if (orderNo != null && orderNo.size() > 0) { |
| | | count=orderNo.size()+count; |
| | | } |
| | | supp = count + ""; |
| | | } |
| | |
| | | return wrkMastLogService.sumCostTimeByWrkSts(startTime, endTime, wrkSts); |
| | | } |
| | | |
| | | private Integer resolveInboundStationNo(WrkMast wrkMast) { |
| | | if (wrkMast == null) { |
| | | return null; |
| | | } |
| | | return wrkMast.getSourceStaNo() == null ? wrkMast.getStaNo() : wrkMast.getSourceStaNo(); |
| | | } |
| | | |
| | | private Date resolveBusinessDayStart(Date now) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(now); |