| | |
| | | " inbound_time,\n" + |
| | | " outbound_time,\n" + |
| | | " DATEDIFF(SECOND, inbound_time, outbound_time) AS beatTime"); |
| | | queryWrapper.eq("sfc_code","2408270000011"); |
| | | queryWrapper.eq("sfc_code",getLatestCompletedWorkpiece()); |
| | | queryWrapper.orderByDesc("location_code"); |
| | | List<DaPassingStationCollection> list = daPassingStationCollectionService.list(queryWrapper); |
| | | for (DaPassingStationCollection daPassingStationCollection : list) { |
| | |
| | | return AjaxResult.success(resultList); |
| | | } |
| | | |
| | | // 获得最新完成工件状态为5 |
| | | public String getLatestCompletedWorkpiece(){ |
| | | QueryWrapper<OmProductionOrdeInfo> wrapper = new QueryWrapper<>(); |
| | | wrapper.select("TOP 1 *"); |
| | | wrapper.eq("order_status","5"); |
| | | wrapper.orderByDesc("actual_end_time"); |
| | | OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(wrapper); |
| | | return one.getProductNum(); |
| | | } |
| | | |
| | | public static int locationPassRate(int passRate,int total) { |
| | | double percentage = (double) passRate / total * 100; |
| | | long roundedNumber = Math.round(percentage); |