jiangping
2025-03-27 7b51c9e1abc198a501f7858599da9c116130fd6f
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -151,7 +151,7 @@
                List<PlatformJob> jobs = platformJobMapper.selectList (new MPJLambdaWrapper<PlatformJob>()
                        .select(PlatformJob::getTotalNum)
                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                        .eq(PlatformJob::getOrigin,Constants.ZERO)
                                .apply(" ( origin = 0 or origin is null)  ")
                        .eq(PlatformJob::getPlatformGroupId,platformGroupId)
                        .apply("to_days(done_date) = to_days(now())")
                        .in(PlatformJob::getStatus, Constants.PlatformJobStatus.DONE.getKey()
@@ -962,6 +962,18 @@
                                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>  yearNum = platformJobMapper.selectJoinList(PlatformJob.class,
                new MPJLambdaWrapper<PlatformJob>()
                        .selectAs(PlatformJob::getId,PlatformJob::getId)
                        .selectAs(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
                        .select(PlatformJob::getStatus,PlatformJob::getStatus)
                        .select(PlatformJob::getType,PlatformJob::getType)
//                        .selectCount(PlatformJob::getPlatformId,PlatformJob::getCountum)
                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                        .in(PlatformJob::getType,Constants.ONE,Constants.THREE)
                        .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())
                        .apply("year(done_date) = year('"+DateUtil.getPlusTime2(year)+"')   and done_date<=  now()  "));
        List<PlatformJob>  monthLastNum = platformJobMapper.selectJoinList(PlatformJob.class,
                new MPJLambdaWrapper<PlatformJob>()
                        .selectAs(PlatformJob::getId,PlatformJob::getId)
@@ -974,17 +986,7 @@
                        .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())
                        .apply("year(done_date) = year('"+DateUtil.getPlusTime2(lastMonth)+"') and month(done_date) = month('"+DateUtil.getPlusTime2(lastMonth)+"') and  done_date<= '"
                                +DateUtil.getPlusTime2(lastMonth)+"'"));
        List<PlatformJob>  yearNum = platformJobMapper.selectJoinList(PlatformJob.class,
                new MPJLambdaWrapper<PlatformJob>()
                        .selectAs(PlatformJob::getId,PlatformJob::getId)
                        .selectAs(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
                        .select(PlatformJob::getStatus,PlatformJob::getStatus)
                        .select(PlatformJob::getType,PlatformJob::getType)
//                        .selectCount(PlatformJob::getPlatformId,PlatformJob::getCountum)
                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                        .in(PlatformJob::getType,Constants.ONE,Constants.THREE)
                        .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())
                        .apply("year(done_date) = year('"+DateUtil.getPlusTime2(year)+"')   and done_date<= '"+DateUtil.getPlusTime2(year)+"'"));
        List<PlatformJob> yearLastNum = platformJobMapper.selectJoinList(PlatformJob.class,
                new MPJLambdaWrapper<PlatformJob>()
                        .selectAs(PlatformJob::getId,PlatformJob::getId)
@@ -994,7 +996,7 @@
                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                        .in(PlatformJob::getType,Constants.ONE,Constants.THREE)
                        .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())
                        .apply("year(done_date) = year('"+DateUtil.getPlusTime2(lastYear)+"')  and done_date<= '"+DateUtil.getPlusTime2(lastYear)+"'"));
                        .apply("year(done_date) = year('"+DateUtil.getPlusTime2(lastYear)+"')  and done_date<=  now()  "));
        data.setMonthOutTotal(getSumTotalByList(monthNum,0,null));//本月出库量
        data.setMonthLastOutTotal(getSumTotalByList(monthLastNum,null,null) );//上月出库量