liukangdong
2025-03-11 ccfd4adf5fbc53ca8026234ed7631c2b3961abd6
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -132,6 +132,7 @@
                        .select(PlatformJob::getTotalNum)
                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                        .eq(PlatformJob::getOrigin,Constants.ONE)
                        .in(PlatformJob::getType,new Integer[]{0,2,4})
                        .in(PlatformJob::getStatus, Constants.PlatformJobStatus.DONE.getKey()
                                , Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()
                                , Constants.PlatformJobStatus.LEAVED.getKey())
@@ -801,11 +802,13 @@
                        .selectAll(PlatformJob.class)
                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                        .eq(PlatformJob::getCarCodeFront,param.getCarCode())
                        .in(PlatformJob::getStatus,
                        .notIn(PlatformJob::getStatus,
                                Constants.PlatformJobStatus.DONE.getKey(),
                                Constants.PlatformJobStatus.LEAVED.getKey(),
                                Constants.PlatformJobStatus.AUTHED_LEAVE.getKey(),
                                Constants.PlatformJobStatus.CALLED.getKey())
                                Constants.PlatformJobStatus.CANCEL.getKey()
                        )
                        .orderByAsc(PlatformJob::getId)
                        .last("limit 1"));
        dealJobDetailAndContractBiz(job,data);
@@ -951,6 +954,7 @@
                        .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
                        .select(PlatformJob::getStatus,PlatformJob::getStatus)
                        .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())
@@ -1971,7 +1975,7 @@
        List<PlatformJob> jobList = platformJobMapper.selectJoinList(PlatformJob.class, new MPJLambdaWrapper<PlatformJob>()
                .selectAll( PlatformJob.class)
//                .select("(select sum(ifnull(a.io_qty,0)) from platform_wms_detail a where a.isdeleted=0 and a.job_id =t.id )", create_date)
                .apply("to_days(t.create_date) = to_days(now())")
                .apply("to_days(t.done_date) = to_days(now())")
                .eq(Platform::getIsdeleted, Constants.ZERO)
                .in(PlatformJob::getStatus, Constants.PlatformJobStatus.DONE.getKey()
                        , Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()
@@ -2191,15 +2195,22 @@
        //已作业数
        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()
                .and(w-> w.eq(PlatformJob::getStatus,Constants.PlatformJobStatus.WORKING.getKey())
                        .or().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())");})
                                ,Constants.PlatformJobStatus.LEAVED.getKey()).apply("to_days(done_date) = to_days(now())")
                        .or().eq(PlatformJob::getStatus,Constants.PlatformJobStatus.EXCEPTION.getKey()).apply("to_days(done_date) = to_days(now())")
                        .or().eq(PlatformJob::getStatus,Constants.PlatformJobStatus.TRANSFERING.getKey()).apply("to_days(trans_platform_date) = to_days(now())")
                )
//                .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());