| | |
| | | Date lastMonth = DateUtil.addMonthToDate(month,-1);//上月 |
| | | Date year = Utils.Date.getStart(new Date());//今年 |
| | | Date lastYear = DateUtil.addYearToDate(year,-1);//去年 |
| | | |
| | | List<PlatformJob> monthNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAs(PlatformJob::getId,PlatformJob::getId) |
| | |
| | | .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum) |
| | | .select(PlatformJob::getStatus,PlatformJob::getStatus) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(), |
| | | Constants.PlatformJobStatus.LEAVED.getKey(), |
| | | Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()) |
| | | .apply("year(done_date) = year('"+DateUtil.getPlusTime2(month)+"') and month(done_date) = month('"+DateUtil.getPlusTime2(month)+"') ")); |
| | | List<PlatformJob> monthLastNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | |
| | | data.setFreePlatform( |
| | | list.stream().filter(i->Constants.formatIntegerNum(i.getWorkStatus())<=Constants.ZERO).collect(Collectors.toList()).size() |
| | | ); |
| | | //查询今日月台个状态作业数量 |
| | | /* //查询今日月台个状态作业数量 |
| | | List<PlatformJob> jobList = platformJobMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAll(PlatformJob.class) |
| | | .select("count(id)" ,PlatformJob::getCountum) |
| | |
| | | .apply("to_days(create_date) = to_days(now())" ) |
| | | .groupBy(PlatformJob::getStatus) |
| | | ); |
| | | if(jobList!=null){ |
| | | |
| | | if(jobList!=null){ |
| | | //-------------TODO----------【看板】爱确认需求-------------- |
| | | // * 0待确认 1待签到 2等待叫号 3入园等待 4已叫号 5作业中 6作业完成 7转移中 8异常挂起 9已授权离园 10已离园 11 已过号 12已取消 |
| | | for(PlatformJob model : jobList){ |
| | |
| | | } |
| | | |
| | | } |
| | | }*/ |
| | | //预约数 |
| | | data.setReservationCar(platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .apply("to_days(create_date) = to_days(now())" )).intValue()); |
| | | //作业中 |
| | | data.setWorkingCar(platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.WORKING.getKey()) |
| | | ).intValue()); |
| | | //排队车 |
| | | data.setLineUpCar(platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey(), |
| | | Constants.PlatformJobStatus.WAIT_CALL.getKey(), |
| | | Constants.PlatformJobStatus.IN_WAIT.getKey())).intValue()); |
| | | //已叫号 |
| | | data.setCalledNum(platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .apply("to_days(call_date) = to_days(now())" )).intValue()); |
| | | //签到数 |
| | | data.setSignedNum(platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .apply("to_days(sign_date) = to_days(now())" )).intValue()); |
| | | //今日完成数 |
| | | data.setDoneNum(platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.LEAVED.getKey(), |
| | | Constants.PlatformJobStatus.AUTHED_LEAVE.getKey(), |
| | | Constants.PlatformJobStatus.DONE.getKey()) |
| | | .apply("to_days(done_date) = to_days(now())" )).intValue()); |
| | | |
| | | //已作业数 |
| | | data.setWorkedNum(platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .and(w->{w.eq(PlatformJob::getStatus,Constants.PlatformJobStatus.WORKING.getKey());}) |
| | | .and(w->{w.in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey() |
| | | ,Constants.PlatformJobStatus.AUTHED_LEAVE.getKey() |
| | | ,Constants.PlatformJobStatus.LEAVED.getKey()) |
| | | .apply("to_days(done_date) = to_days(now())");}) |
| | | .and(w->{w.eq(PlatformJob::getStatus,Constants.PlatformJobStatus.EXCEPTION.getKey()) |
| | | .apply("to_days(error_date) = to_days(now())");}) |
| | | .and(w->{w.eq(PlatformJob::getStatus,Constants.PlatformJobStatus.TRANSFERING.getKey()) |
| | | .apply("to_days(trans_platform_date) = to_days(now())");}) |
| | | ).intValue()); |
| | | |
| | | data.setVideoPluginUrl(getVideoUrl()); |
| | | String indexCodes = systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_CHANGNEI_SCREEN_INDEXCODES).getCode(); |
| | | if(StringUtils.isNotBlank(indexCodes)){ |
| | | data.setVideoIndexCodes(indexCodes.split(",")); |
| | | } |
| | | } |
| | | |
| | | return data; |
| | | } |
| | | |
| | |
| | | data.setCurrentOutNum(data.getCurrentOutNum().add(Constants.formatBigdecimal(model.getOutSideProvinceOutQty()))); |
| | | data.setCurrentInNum(data.getCurrentInNum().add(Constants.formatBigdecimal(model.getInSideProvinceOutQty()))); |
| | | data.setTotalCarNum(data.getTotalCarNum()+Constants.formatIntegerNum(model.getVehicleQty()));//累计车次 |
| | | data.setCurrentProvinceNum(data.getCurrentProvinceNum().add(Constants.formatBigdecimal(model.getOutSideProvinceOutQty())) |
| | | data.setCurrentProvinceNum(data.getCurrentProvinceNum().add(Constants.formatBigdecimal(model.getOutSideProvinceOutT01Qty())) |
| | | .add(Constants.formatBigdecimal(model.getInSideProvinceOutT01Qty())));//省内省外销售量 |
| | | data.setCurrentOtherNum(data.getCurrentOtherNum().add(Constants.formatBigdecimal(model.getOutSideProvinceOutT03Qty())) |
| | | .add(Constants.formatBigdecimal(model.getInSideProvinceOutT03Qty())));//省内省外其他出库量 |