jiangping
2025-01-13 cc0d840070c24ceb20180a41f0323bdc0ee03347
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
@@ -10,16 +10,18 @@
import com.doumee.core.haikang.model.param.request.ParkReservationDelRequest;
import com.doumee.core.haikang.model.param.respose.ParkReservationAddResponse;
import com.doumee.core.haikang.service.HKService;
import com.doumee.core.model.LoginUserInfo;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.tms.model.request.TmsLockStatusQueryRequest;
import com.doumee.core.tms.model.response.TmsBaseResponse;
import com.doumee.core.tms.model.response.TmsLockStatusQueryResponse;
import com.doumee.service.business.third.WmsService;
import com.doumee.service.business.third.model.LoginUserInfo;
import com.doumee.service.business.third.model.PageData;
import com.doumee.service.business.third.model.PageWrap;
import com.doumee.service.business.third.model.request.TmsLockStatusQueryRequest;
import com.doumee.service.business.third.model.response.TmsBaseResponse;
import com.doumee.service.business.third.model.response.TmsLockStatusQueryResponse;
import com.doumee.core.utils.*;
import com.doumee.core.wx.wxPlat.WxPlatConstants;
import com.doumee.core.wx.wxPlat.WxPlatNotice;
import com.doumee.dao.business.*;
import com.doumee.dao.business.dao.MemberMapper;
import com.doumee.dao.business.dao.SmsConfigMapper;
import com.doumee.dao.business.dao.SmsEmailMapper;
import com.doumee.dao.business.join.PlatformJobJoinMapper;
@@ -35,7 +37,6 @@
import com.doumee.dao.web.response.DriverHomeVO;
import com.doumee.dao.web.response.LineUpVO;
import com.doumee.dao.web.response.PlatformWorkVO;
import com.doumee.dao.web.response.platformReport.WholeProvinceBoardVO;
import com.doumee.service.business.PlatformJobService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -58,7 +59,6 @@
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.URLEncoder;
import java.util.*;
import java.util.Date;
import java.util.concurrent.TimeUnit;
@@ -306,7 +306,7 @@
                .le(pageWrap.getModel().getCreateDateEnd() != null, PlatformWmsJob::getIoCreatedate, Utils.Date.getEnd(pageWrap.getModel().getCreateDateEnd()))
                .isNotNull(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ONE,pageWrap.getModel().getJobType()), PlatformJob::getContractNum)
                .isNull(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ZERO,pageWrap.getModel().getJobType()), PlatformJob::getContractNum)
        ;
                .exists(StringUtils.isNotBlank(pageWrap.getModel().getWmsContractNum()),"select tt.id from platfrom_wms_detail tt where tt.isdeleted=0 and tt.job_id=t.id");
        for(PageWrap.SortData sortData: pageWrap.getSorts()) {
            if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
@@ -517,6 +517,14 @@
                .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
                .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                .eq(PlatformJob::getDrivierPhone,loginUserInfo.getMobile())
                .and(i->i.like(PlatformJob::getDoneDate,DateUtil.getCurrDate())
                        .or().in(PlatformJob::getStatus,Constants.PlatformJobStatus.WAIT_CALL.getKey()
                                ,Constants.PlatformJobStatus.WAIT_CONFIRM.getKey(),
                                Constants.PlatformJobStatus.WART_SIGN_IN.getKey(),
                                Constants.PlatformJobStatus.IN_WAIT.getKey(),
                                Constants.PlatformJobStatus.CALLED.getKey(),
                                Constants.PlatformJobStatus.WORKING.getKey())
                )
                .orderByDesc(PlatformJob::getId)
        );
        for (PlatformJob platformJob:platformJobList) {
@@ -527,7 +535,6 @@
        }
        driverHomeVO.setPlatformJobList(platformJobList);
        // 园区导览图  图片
        driverHomeVO.setReservationMap(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.PLATFORM_GUIDEMAP).getCode());
        // 预约指南 文本
@@ -623,7 +630,8 @@
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未在工作时间["+platformGroup.getStartTime() + "-" + platformGroup.getEndTime() +"],无法进行签到");
        }
        //查询今日最大的签到数
        List<PlatformJob> signList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>().lambda().apply(" DATE(SIGN_DATE) = DATE(NOW()) and sign_date is not null  "));
        List<PlatformJob> signList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>().lambda()
                .apply(" DATE(SIGN_DATE) = DATE(NOW()) and sign_date is not null  "));
        if(CollectionUtils.isEmpty(signList)){
            platformJob.setSignNum(Constants.ONE);
        } else{
@@ -737,6 +745,7 @@
                                ,PlatformJob::getId,lineUpDetailDTO.getJobId())
                        .in(PlatformJob::getStatus,Constants.PlatformJobStatus.WAIT_CALL.getKey(),
                                Constants.PlatformJobStatus.IN_WAIT.getKey(),
                                Constants.PlatformJobStatus.WORKING.getKey(),
                                Constants.PlatformJobStatus.CALLED.getKey())
                        .orderByDesc(PlatformJob::getStatus)
                        .orderByAsc(PlatformJob::getSignDate)
@@ -909,11 +918,31 @@
        }
    }
    private Logger logger = LoggerFactory.getLogger(PlatformJobServiceImpl.class);
    @Override
    public void sendInPark(PlatformJob platformJob){
        log.info("【下发停车场权限】================开始===="+platformJob.getCarCodeFront());
        if(Constants.equalsInteger(platformJob.getType(),Constants.THREE)
                && Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.DONE.getKey()) ){
            //如果是已完成的外协车卸货作业,查询所有合同是否以上电子锁,如果没有,不自动授权离园
            List<PlatformWmsDetail> details = platformWmsDetailMapper.selectList(new QueryWrapper<PlatformWmsDetail>().lambda()
                     .select(PlatformWmsDetail::getLockStatus,PlatformWmsDetail::getId)
                    .eq(PlatformWmsDetail::getJobId,platformJob.getId())
                    .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO)
            );
            if(details!=null && details.size()>0){
                for(PlatformWmsDetail d : details){
                    if(Constants.equalsInteger(d.getLockStatus(),Constants.ZERO)){
                        //如果存在未上锁,不自动授权离园
                        return;
                    }
                }
            }
        }
        if(Constants.equalsInteger(platformJob.getType(),Constants.TWO)
                || Constants.equalsInteger(platformJob.getType(),Constants.THREE)
                || Constants.equalsInteger(platformJob.getType(),Constants.FOUR)){
@@ -995,6 +1024,10 @@
                    platformJob.setInHkdate(new Date());
                    if(sendStatus){
                        platformJob.setInHkstatus(Constants.TWO);
                        if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.DONE.getKey())){
                            //如果已下发成功,标记已授权离园状态
                            platformJob.setStatus(Constants.PlatformJobStatus.AUTHED_LEAVE.getKey());
                        }
                    }else{
                        platformJob.setInHkstatus(Constants.THREE);
                    }
@@ -1468,19 +1501,21 @@
                Date date = new Date();
                List<String> codeList =new ArrayList<>();
                for(PlatformWmsDetail d : details){
                    codeList.add(d.getIocode());
                    codeList.add(d.getContractNum());
                }
                TmsLockStatusQueryRequest tmsLock = new TmsLockStatusQueryRequest();
                tmsLock.setContractNumbers(codeList);
                TmsBaseResponse<List<TmsLockStatusQueryResponse>>  lockResult =  tmsService.lockStatusQuery(tmsLock);
                if(lockResult!=null && lockResult.isSuccess()&& lockResult.getData()!=null ){
                if(lockResult!=null && lockResult.getCode()!=null && lockResult.getCode().equals("0")&& lockResult.getData()!=null ){
                     for(TmsLockStatusQueryResponse s : lockResult.getData()){
                       if(StringUtils.isBlank(s.getContractNumber())){
                           continue;
                       }
                         platformWmsDetailMapper.update(null,new UpdateWrapper<PlatformWmsDetail>().lambda()
                                 .eq(PlatformWmsDetail::getIocode,s.getContractNumber())
                                 .eq(PlatformWmsDetail::getContractNum,s.getContractNumber())
                                 .set(PlatformWmsDetail::getEditDate,date)
                                 .set(PlatformWmsDetail::getLockDate,s.getOutDate())
                                 .set(PlatformWmsDetail::getLockStatus,Constants.ONE)
                                 .eq(PlatformWmsDetail::getJobId,platformJob.getId())
                                 .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO));
                     }
                }
@@ -1488,7 +1523,6 @@
        }else if(Constants.equalsInteger(platformJob.getType(),Constants.ONE) || Constants.equalsInteger(platformJob.getType(),Constants.FOUR)){
            //TODO 外协车卸货 或者 市公司车卸货 则根据任务情况
        }
@@ -1508,6 +1542,76 @@
        this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.DONE.getInfo(),
                Constants.PlatformBroadcastContent.DONE.getInfo());
        return platformJob;
    }
    @Override
    public void checkWmsLockStatus(){
        List<PlatformWmsDetail> details = platformWmsDetailMapper.selectJoinList(PlatformWmsDetail.class,new MPJLambdaWrapper<PlatformWmsDetail>()
                .selectAll(PlatformWmsDetail.class)
                .leftJoin(PlatformJob.class,PlatformJob::getId,PlatformWmsDetail::getJobId)
                .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey())//查询已完成作业的
                .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                .and(wr->{wr.isNull(PlatformWmsDetail::getLockStatus).or().eq(PlatformWmsDetail::getLockStatus,Constants.ZERO);})
                .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO));
       if(details !=null && details.size()>0){
           Date date = new Date();
           List<String> codeList =new ArrayList<>();
           for(PlatformWmsDetail d : details){
               codeList.add(d.getContractNum());
           }
           TmsLockStatusQueryRequest tmsLock = new TmsLockStatusQueryRequest();
           tmsLock.setContractNumbers(codeList);
           List<Integer> jobIds = new ArrayList<>();
           TmsBaseResponse<List<TmsLockStatusQueryResponse>>  lockResult =  tmsService.lockStatusQuery(tmsLock);
           if(lockResult!=null && lockResult.getCode()!=null && lockResult.getCode().equals("0")&& lockResult.getData()!=null ){
               for(TmsLockStatusQueryResponse s : lockResult.getData()){
                   try {
                       //异常处理,能处理一个是一个
                       platformWmsDetailMapper.update(null,new UpdateWrapper<PlatformWmsDetail>().lambda()
                               .eq(PlatformWmsDetail::getContractNum,s.getContractNumber())
                               .set(PlatformWmsDetail::getEditDate,date)
                               .set(PlatformWmsDetail::getLockDate,s.getOutDate())
                               .set(PlatformWmsDetail::getLockStatus,Constants.ONE)
                               .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO));
                       PlatformWmsDetail job = getJobByContractnumFromDetail(s.getContractNumber(),details);
                       if(job != null){
                           jobIds.add(job.getJobId());
                       }
                   }catch (Exception e){
                        logger.error("=============更新电子锁状态信息异常:"+e.getMessage());
                   }
               }
           }
           if(jobIds.size()>0){
               List<PlatformJob> list = platformJobMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>()
                       .selectAll(PlatformJob.class)
                       .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey())
                       .in(PlatformJob::getId,jobIds)
               );
               if(list!=null){
                   for(PlatformJob platformJob : list){
                       sendInPark(platformJob);//检查是否需要自动授权离园
                   }
               }
           }
       }
    }
    private PlatformWmsJob getJobByContractnum(String contractNumber, List<PlatformWmsJob> details) {
        for(PlatformWmsJob d : details){
            if(StringUtils.equals(contractNumber,d.getContractNum())){
                return d;
            }
        }
        return  null;
    }
    private PlatformWmsDetail getJobByContractnumFromDetail(String contractNumber, List<PlatformWmsDetail> details) {
        for(PlatformWmsDetail d : details){
            if(StringUtils.equals(contractNumber,d.getContractNum())){
                return d;
            }
        }
        return  null;
    }
@@ -2203,164 +2307,5 @@
    }
    /**
     * 累计出库量统计 - 大屏
     * @param data
     */
    @Override
    public void wholeProvinceCenterData(WholeProvinceBoardVO data){
//        //累计本年度出库量
//        List<PlatformJob> platformJobList = platformJobJoinMapper.selectList(new QueryWrapper<PlatformJob>()
//                .lambda()
//                .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE
//                        ,Constants.PlatformJobStatus.AUTHED_LEAVE
//                        ,Constants.PlatformJobStatus.LEAVED)
//                .isNotNull(PlatformJob::getDoneDate)
//                .in(PlatformJob::getType,Constants.platformJobType.wxczh,Constants.platformJobType.zyczh)
//                .like( PlatformJob::getDoneDate, DateUtil.getFomartDate(new Date(),"yyyy"))
//        );
//        data.setYearOutTotal(platformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())).map(i->i.getTotalNum()).reduce(BigDecimal.ZERO,BigDecimal::add));
//        data.setYearOutTimes(platformJobList.size());
//
//
//        List<PlatformJob> platformJobsMonthList = platformJobList.stream().filter(i->DateUtil.getFomartDate(i.getDoneDate(),"yyyy-MM").equals(DateUtil.getFomartDate(new Date(),"yyyy-MM"))).collect(Collectors.toList());
//        data.setMonthOutTotal(platformJobsMonthList.stream().filter(i->Objects.nonNull(i.getTotalNum())).map(i->i.getTotalNum()).reduce(BigDecimal.ZERO,BigDecimal::add));
//        data.setMonthOutTimes(platformJobsMonthList.size());
//        String beforYear = DateUtil.getBeforYear(new Date(),1);
//
//        //累计本年度出库量
//        List<PlatformJob> beforYearPlatformJobList = platformJobJoinMapper.selectList(new QueryWrapper<PlatformJob>()
//                .lambda()
//                .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE
//                        ,Constants.PlatformJobStatus.AUTHED_LEAVE
//                        ,Constants.PlatformJobStatus.LEAVED)
//                .isNotNull(PlatformJob::getDoneDate)
//                .in(PlatformJob::getType,Constants.platformJobType.wxczh,Constants.platformJobType.zyczh)
//                .like( PlatformJob::getDoneDate, beforYear.substring(0,4))
//        );
//
//        List<PlatformJob> beforPlatformJobsMonthList = platformJobList.stream().filter(i->DateUtil.getFomartDate(i.getDoneDate(),"yyyy-MM").equals(beforYear.substring(0,7))).collect(Collectors.toList());
//        //同比数据
//        data.setYearOutTotalOnYear(beforYearPlatformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())).map(i->i.getTotalNum()).reduce(BigDecimal.ZERO,BigDecimal::add));
//        data.setMonthOutTotalOnYear(beforPlatformJobsMonthList.stream().filter(i->Objects.nonNull(i.getTotalNum())).map(i->i.getTotalNum()).reduce(BigDecimal.ZERO,BigDecimal::add));
//
    }
    @Override
    public void centerDataForInOut(WholeProvinceBoardVO data){
//        //今日完成的出入库所有数据
//        List<PlatformJob> platformJobList = platformJobJoinMapper.selectList(new QueryWrapper<PlatformJob>()
//                .lambda()
//                .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE
//                        ,Constants.PlatformJobStatus.AUTHED_LEAVE
//                        ,Constants.PlatformJobStatus.LEAVED)
//                .like( PlatformJob::getDoneDate, DateUtil.getFomartDate(new Date(),"yyyy-MM-dd"))
//        );
//        //今日之前 所有未完成的出入库数据 - WMS推送
//        List<PlatformJob> wmsPlatformJobList  = platformJobJoinMapper.selectList(new QueryWrapper<PlatformJob>()
//                .lambda()
//                .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE
//                        ,Constants.PlatformJobStatus.AUTHED_LEAVE
//                        ,Constants.PlatformJobStatus.LEAVED
//                        ,Constants.PlatformJobStatus.CANCEL)
//                .eq(PlatformJob::getOrigin ,Constants.ONE)
//                .le(PlatformJob::getCreateDate, DateUtil.getFomartDate(new Date(),"yyyy-MM-dd") +" 23:59:59")
//        );
//        //今日之前 所有未完成的出入库数据 - 预约数据
//        List<PlatformJob> bookPlatformJobList  = platformJobJoinMapper.selectList(new QueryWrapper<PlatformJob>()
//                .lambda()
//                .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE
//                        ,Constants.PlatformJobStatus.AUTHED_LEAVE
//                        ,Constants.PlatformJobStatus.LEAVED
//                        ,Constants.PlatformJobStatus.CANCEL)
//                .eq(PlatformJob::getOrigin ,Constants.ONE)
//                .le(PlatformJob::getArriveDate, DateUtil.getFomartDate(new Date(),"yyyy-MM-dd") +" 23:59:59")
//        );
//
//        BigDecimal finishOutTotal = platformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())&&(i.getType().equals(Constants.platformJobType.wxczh)||i.getType().equals(Constants.platformJobType.zyczh))).map(i->i.getTotalNum()).reduce(BigDecimal.ZERO,BigDecimal::add);
//        BigDecimal unFinishWmsOutTotal = wmsPlatformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())&&(i.getType().equals(Constants.platformJobType.wxczh)||i.getType().equals(Constants.platformJobType.zyczh))).map(i->i.getTotalNum()).reduce(BigDecimal.ZERO,BigDecimal::add);
//        BigDecimal unFinishBookOutTotal = bookPlatformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())&&(i.getType().equals(Constants.platformJobType.wxczh)||i.getType().equals(Constants.platformJobType.zyczh))).map(i->i.getTotalNum()).reduce(BigDecimal.ZERO,BigDecimal::add);
//
//        BigDecimal finishInTotal = platformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())&&(i.getType().equals(Constants.platformJobType.zycxh)||i.getType().equals(Constants.platformJobType.wxcxh)||i.getType().equals(Constants.platformJobType.sgscxh))).map(i->i.getTotalNum()).reduce(BigDecimal.ZERO,BigDecimal::add);
//        BigDecimal unFinishWmsInTotal = wmsPlatformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())&&(i.getType().equals(Constants.platformJobType.zycxh)||i.getType().equals(Constants.platformJobType.wxcxh)||i.getType().equals(Constants.platformJobType.sgscxh))).map(i->i.getTotalNum()).reduce(BigDecimal.ZERO,BigDecimal::add);
//        BigDecimal unFinishBookInTotal = bookPlatformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())&&(i.getType().equals(Constants.platformJobType.zycxh)||i.getType().equals(Constants.platformJobType.wxcxh)||i.getType().equals(Constants.platformJobType.sgscxh))).map(i->i.getTotalNum()).reduce(BigDecimal.ZERO,BigDecimal::add);
//
//        data.setOutTotal(finishOutTotal);
//        data.setOutPlanTotal(finishOutTotal.add(unFinishWmsOutTotal).add(unFinishBookOutTotal));
//
//        data.setInTotal(finishInTotal);
//        data.setInPlanTotal(finishInTotal.add(unFinishWmsInTotal).add(unFinishBookInTotal));
    }
    @Override
    public void centerDataOutInRata(WholeProvinceBoardVO data){
//        //累计本月度所有操作量
//        List<PlatformJob> platformJobList = platformJobJoinMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>()
//                        .selectAll(PlatformJob.class)
//                        .select(" ( select ifnull(sum(p.param3),0) from platform_log p where p.obj_id = platform_job.id  ) ",PlatformJob::getWorkTime)
//                .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE
//                        ,Constants.PlatformJobStatus.AUTHED_LEAVE
//                        ,Constants.PlatformJobStatus.LEAVED)
//                .isNotNull(PlatformJob::getDoneDate)
//                .like( PlatformJob::getDoneDate, DateUtil.getFomartDate(new Date(),"yyyy-MM"))
//        );
//
//        //获取本月所有出库量
//        BigDecimal monthOutTotal = platformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())&&(i.getType().equals(Constants.platformJobType.wxczh)||i.getType().equals(Constants.platformJobType.zyczh))).map(i->i.getTotalNum()).reduce(BigDecimal.ZERO,BigDecimal::add);
//        Long monthOutWorkTotal = platformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())&&(i.getType().equals(Constants.platformJobType.wxczh)||i.getType().equals(Constants.platformJobType.zyczh))).map(i->i.getWorkTime()).reduce(Long.valueOf(Constants.ZERO),Long::sum);
//        BigDecimal monthInTotal = platformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())&&(i.getType().equals(Constants.platformJobType.zycxh)||i.getType().equals(Constants.platformJobType.wxcxh)||i.getType().equals(Constants.platformJobType.sgscxh))).map(i->i.getTotalNum()).reduce(BigDecimal.ZERO,BigDecimal::add);
//        Long monthInWorkTotal = platformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())&&(i.getType().equals(Constants.platformJobType.zycxh)||i.getType().equals(Constants.platformJobType.wxcxh)||i.getType().equals(Constants.platformJobType.sgscxh))).map(i->i.getWorkTime()).reduce(Long.valueOf(Constants.ZERO),Long::sum);
//
//        data.setMonthOutRata(BigDecimal.ZERO);
//        //月度出库效率
//        if(Objects.nonNull(monthOutTotal) && Objects.nonNull(monthOutWorkTotal) && monthOutWorkTotal>0L && monthOutTotal.compareTo(BigDecimal.ZERO) > 0){
//            BigDecimal workTotal = new BigDecimal(monthOutWorkTotal);
//            data.setMonthOutRata(monthOutTotal.multiply(new BigDecimal(3600)).divide(workTotal,2,BigDecimal.ROUND_UP));
//        }
//
//        //月度入库效率
//
//        data.setMonthInRata(BigDecimal.ZERO);
//        if(Objects.nonNull(monthInTotal) && Objects.nonNull(monthInWorkTotal) && monthInWorkTotal>0L && monthInTotal.compareTo(BigDecimal.ZERO) > 0){
//            BigDecimal workTotal = new BigDecimal(monthInWorkTotal);
//            data.setMonthInRata(monthInTotal.multiply(new BigDecimal(3600)).divide(workTotal,2,BigDecimal.ROUND_UP));
//        }
//
//
//
//        List<PlatformJob> dayPlatformJobList = platformJobJoinMapper.selectList(new QueryWrapper<PlatformJob>()
//                .lambda()
//                .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE
//                        ,Constants.PlatformJobStatus.AUTHED_LEAVE
//                        ,Constants.PlatformJobStatus.LEAVED)
//                .isNotNull(PlatformJob::getDoneDate)
//                .like( PlatformJob::getDoneDate, DateUtil.getFomartDate(new Date(),"yyyy-MM-dd"))
//        );
//
//        BigDecimal dayOutTotal = dayPlatformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())&&(i.getType().equals(Constants.platformJobType.wxczh)||i.getType().equals(Constants.platformJobType.zyczh))).map(i->i.getTotalNum()).reduce(BigDecimal.ZERO,BigDecimal::add);
//        Long dayOutWorkTotal = platformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())&&(i.getType().equals(Constants.platformJobType.wxczh)||i.getType().equals(Constants.platformJobType.zyczh))).map(i->i.getWorkTime()).reduce(Long.valueOf(Constants.ZERO),Long::sum);
//        BigDecimal dayInTotal = dayPlatformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())&&(i.getType().equals(Constants.platformJobType.zycxh)||i.getType().equals(Constants.platformJobType.wxcxh)||i.getType().equals(Constants.platformJobType.sgscxh))).map(i->i.getTotalNum()).reduce(BigDecimal.ZERO,BigDecimal::add);
//        Long dayInWorkTotal = platformJobList.stream().filter(i->Objects.nonNull(i.getTotalNum())&&(i.getType().equals(Constants.platformJobType.zycxh)||i.getType().equals(Constants.platformJobType.wxcxh)||i.getType().equals(Constants.platformJobType.sgscxh))).map(i->i.getWorkTime()).reduce(Long.valueOf(Constants.ZERO),Long::sum);
//
//        data.setDayOutRata(BigDecimal.ZERO);
//        //日出库效率
//        if(Objects.nonNull(dayOutTotal) && Objects.nonNull(dayOutWorkTotal) && dayOutWorkTotal>0L && dayOutTotal.compareTo(BigDecimal.ZERO) > 0){
//            BigDecimal workTotal = new BigDecimal(dayOutWorkTotal);
//            data.setDayOutRata(dayOutTotal.multiply(new BigDecimal(3600)).divide(workTotal,2,BigDecimal.ROUND_UP));
//        }
//        //日入库效率
//        data.setDayInRata(BigDecimal.ZERO);
//        if(Objects.nonNull(dayInTotal) && Objects.nonNull(dayInWorkTotal) && dayInWorkTotal>0L && dayInTotal.compareTo(BigDecimal.ZERO) > 0){
//            BigDecimal workTotal = new BigDecimal(dayInWorkTotal);
//            data.setMonthInRata(dayInTotal.multiply(new BigDecimal(3600)).divide(workTotal,2,BigDecimal.ROUND_UP));
//        }
    }
}