jiangping
2025-04-08 b1740c80205d9584738b1150f4122784c70bbe57
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -1014,11 +1014,11 @@
                        .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
                        // .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date)
                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                        .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey()
                                ,Constants.PlatformJobStatus.LEAVED.getKey()
                                ,Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()
                                ,Constants.PlatformJobStatus.CALLED.getKey())
                        .apply("   to_days(create_date) <to_days(now())"));
                        .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),
                                Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()
                                ,Constants.PlatformJobStatus.CANCEL.getKey())
                        .apply("   to_days(create_date) < to_days(now()) ")
        );
        //==========今天出入库完成量
        List<PlatformJob> currentDoneNum = platformJobMapper.selectJoinList(PlatformJob.class,
@@ -1029,9 +1029,10 @@
                        .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
//                        .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date)
                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                        .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey())
                        .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.CANCEL.getKey())
                        .apply(" to_days(done_date) = to_days(now())"));
        //==========今天下发出入库任务----
        //==========今天下发出入库任务 未完成的----
        List<PlatformJob> currentNum = platformJobMapper.selectJoinList(PlatformJob.class,
                new MPJLambdaWrapper<PlatformJob>()
                        .selectAs(PlatformJob::getId,PlatformJob::getId)
@@ -1040,17 +1041,17 @@
                        .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
//                        .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date)
                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                        .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey())
                        .apply(" to_days(create_date) = to_days(now())"));
                        .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.CANCEL.getKey())
                        .apply(" to_days(create_date) = to_days(now()) and done_date is null   "));
        BigDecimal beforeOutNum = (getSumTotalByList(beforeJobNum,0,null));//今天之前未完成出库任务
        BigDecimal currentOutNum = (getSumTotalByList(currentNum,0,null));//今天下发出库任务
        BigDecimal beforeInNum = (getSumTotalByList(beforeJobNum,1,null));//今天之前未完成入库任务
        BigDecimal currentInNum = (getSumTotalByList(currentNum,1,null));//今天下发入库任务
        data.setCurrentInNum(beforeInNum.add(currentInNum));//当前入库总任务成量
        data.setCurrentOutNum(beforeOutNum.add(currentOutNum));//当前出库总任务成量
        data.setCurrentInDoneNum(getSumTotalByList(currentDoneNum,1,1));//今日完成量
        data.setCurrentOutDoneNum(getSumTotalByList(currentDoneNum,0,1));//今日完成量
        data.setCurrentInNum(beforeInNum.add(data.getCurrentInDoneNum()).add(currentInNum));//当前入库总任务成量
        data.setCurrentOutNum(beforeOutNum.add(data.getCurrentOutDoneNum()).add(currentOutNum));//当前出库总任务成量
        //------------今日出入库效率----------------
        BigDecimal outHours = getTotalDoneTimes(currentDoneNum,0);//
@@ -1745,11 +1746,10 @@
    @Override
    public  VisitDataVO visitSecurityData(){
        //待访问、已登记、已离开
        VisitDataVO result = new VisitDataVO();
        result.setWaitVisitNum(visitsJoinMapper.selectCount(new MPJLambdaWrapper<Visits>()
                .eq(Visits::getIsdeleted,Constants.ZERO)
                .apply("to_days(create_date)=to_days(now())")
                .apply(" now() >  STARTTIME and now() < ENDTIME")
                .in(Visits::getStatus,Constants.VisitStatus.pass,Constants.VisitStatus.xfSuccess )));//待访问
        result.setRegisterVisitNum(visitsJoinMapper.selectCount(new MPJLambdaWrapper<Visits>()
                .eq(Visits::getIsdeleted,Constants.ZERO)