| | |
| | | import com.doumee.dao.openapi.request.*; |
| | | import com.doumee.dao.openapi.response.*; |
| | | |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.web.reqeust.*; |
| | | 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; |
| | |
| | | private MemberMapper memberMapper; |
| | | @Autowired |
| | | private WxNoticeConfigMapper wxNoticeConfigMapper; |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | | |
| | | @Override |
| | | public Integer create(PlatformJob platformJob) { |
| | |
| | | |
| | | //公众号模板消息 |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobCallIn, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobCallIn,platformJob); |
| | | } |
| | | |
| | | return platformJob; |
| | | } |
| | | |
| | | public void sendWxNotice(String objCode,PlatformJob platformJob){ |
| | | SystemUser driver = systemUserMapper.selectOne(new QueryWrapper<SystemUser>().lambda() |
| | | .eq(SystemUser::getDeleted, Constants.ZERO) |
| | | .eq(SystemUser::getType, Constants.ZERO) |
| | | .eq(SystemUser::getMobile,platformJob.getDrivierPhone()) |
| | | .last(" limit 1 ")); |
| | | if (Objects.nonNull(driver) && StringUtils.isNotBlank(driver.getOpenid())) { |
| | | PlatformJob p = platformJobJoinMapper.selectJoinOne(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAll(PlatformJob.class) |
| | | .selectAs(Platform::getName,PlatformJob::getPlatformName) |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .eq(PlatformJob::getId,platformJob.getId()) |
| | | .last(" limit 1") |
| | | ); |
| | | |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper, p, |
| | | objCode, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(driver.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | private Logger logger = LoggerFactory.getLogger(PlatformJobServiceImpl.class); |
| | |
| | | ); |
| | | |
| | | //公众号模板消息 |
| | | if(Objects.nonNull(platformJob.getDriverId())){ |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper,platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobSingIn, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | if(Objects.nonNull(platformJob.getDriverId())){ |
| | | this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobSingIn,platformJob); |
| | | } |
| | | |
| | | |
| | |
| | | ); |
| | | |
| | | //公众号模板消息 |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobMove, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobMove,platformJob); |
| | | } |
| | | |
| | | platformJob.setPlatformName(oldPlatform.getName()); |
| | |
| | | |
| | | //公众号模板消息 |
| | | if(Objects.nonNull(platformJob.getDriverId())){ |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper,platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobOverNum, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobOverNum,platformJob); |
| | | } |
| | | |
| | | platformJob.setPlatformName(platform.getName()); |
| | |
| | | |
| | | //公众号模板消息 |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobError, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobError,platformJob); |
| | | } |
| | | |
| | | platformJob.setPlatformName(platform.getName()); |
| | |
| | | ); |
| | | //公众号模板消息 |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobWorking, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobWorking,platformJob); |
| | | } |
| | | //广播 led通知 |
| | | platformJob.setPlatformName(platform.getName()); |
| | |
| | | |
| | | return platformJob; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public PlatformJob getLastWaitJob(String uuid, LoginUserInfo loginUser){ |
| | | String u = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.BIGSCREEN_UUID); |
| | | if(!StringUtils.equals(u,uuid)){ |
| | |
| | | .last(" limit 1 ") ); |
| | | return platformJob; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public PlatformJob finishWork(JobOperateDTO jobOperateDTO){ |
| | |
| | | |
| | | //公众号模板消息 |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobFinish, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobFinish,platformJob); |
| | | } |
| | | |
| | | //广播 led通知 |
| | |
| | | String u = UUID.randomUUID().toString(); |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.BIGSCREEN_UUID,u,3, TimeUnit.MINUTES); |
| | | String url = Constants.getWxUrl(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.WX_REDIRECT_URL).getCode(),Constants.WxUrlParams.BISCREEN_CODE,u); |
| | | largeScreenDataVO.setQrCode(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_QRCODE_PREFIX).getCode().replace( "${param}", url)); |
| | | largeScreenDataVO.setQrCode(url); |
| | | largeScreenDataVO.setAttention(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_ATTENTION).getCode()); |
| | | return largeScreenDataVO; |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 累计出库量统计 - 大屏 |
| | | * @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)); |
| | | // } |
| | | |
| | | |
| | | } |
| | | |
| | | } |