h5/App.vue
@@ -1,5 +1,9 @@ <script> import { wxAuthorize, refreshToken, app_url } from '@/api' import { wxAuthorize, refreshToken, app_url } from '@/api' export default { onLaunch: function () { window.addEventListener("popstate", (event) => { @@ -30,11 +34,14 @@ <style lang="scss"> /*每个页面公共css */ @import "uview-ui/index.scss"; html, body { html, body { height: auto; min-height: 100%; overflow: visible; } .flex-cb { display: flex; justify-content: space-between; @@ -47,6 +54,7 @@ max-width: 800rpx; overflow-y: auto; } .empty_wrap{ display: flex; flex-direction: column; @@ -54,11 +62,13 @@ align-items: center; color: #666666; min-height: 600rpx; image{ width: 300rpx; height: 300rpx; } } .doumee-container .ivu-tabs-nav { width: 100%; } @@ -154,9 +164,11 @@ color: #999999 !important; font-size: 28rpx; } .placeholder3{ color: #333333 !important; } .red{ color: red !important; } @@ -190,9 +202,11 @@ margin: 0; display: flex; } input { font-size: 30rpx; } textarea { box-sizing: border-box; // background-color: #f7f7f7; @@ -201,6 +215,7 @@ border-radius: 8rpx; color: #333333 !important; } .u-textarea { padding: 0 !important; color: #333333 !important; @@ -216,18 +231,22 @@ font-size: 28rpx; color: #333333; } .popupShow { overflow: hidden; position: fixed; width: 100%; } .placeholder6 { color: #666666; font-size: 28rpx; } .primaryColor { color: $uni-color-primary; } .avatar { width: 64rpx; height: 64rpx; @@ -240,16 +259,20 @@ color: #fff; font-size: 30rpx; } .placeholder9 { color: #999999; font-size: 28rpx; } .fs24 { font-size: 24rpx; } .mr24 { margin-right: 24rpx; } .mt24 { margin-top: 24rpx; } @@ -257,15 +280,19 @@ .mr12 { margin-right: 12rpx; } .ml12 { margin-left: 12rpx; } .ml6 { margin-left: 6rpx; } .mt6 { margin-top: 6rpx; } .mr6 { margin-right: 6rpx; } h5/n_pages/visitorApplication/visitorApplication.vue
@@ -575,10 +575,10 @@ title: '证件类型不能为空', icon: 'none' }) if (!this.withUserList.idcardNo) return uni.showToast({ title: '证件号码不能为空', icon: 'none' }) // if (!this.withUserList.idcardNo) return uni.showToast({ // title: '证件号码不能为空', // icon: 'none' // }) if (!this.withUserList.faceImg) return uni.showToast({ title: '人脸照片不能为空', icon: 'none' server/meeting/meeting_service/src/main/java/com/doumee/service/business/impl/BookingsServiceImpl.java
@@ -1316,7 +1316,7 @@ for (Rooms rooms:roomList) { //查询当前会议室是否存在进行中的会议 if(bookingsMapper.selectCount(new QueryWrapper<Bookings>().lambda().eq(Bookings::getIsdeleted,Constants.ZERO) .eq(Bookings::getStatus,Constants.ZERO).isNotNull(Bookings::getStartTimeReal) .eq(Bookings::getStatus,Constants.ZERO).isNotNull(Bookings::getStartTimeReal).apply(" DATE_FORMAT(NOW(), '%Y-%m-%d') = DATE_FORMAT(START_TIME, '%Y-%m-%d') ") )<=Constants.ZERO){ //根据会议室获取可以开启的会议记录(第一条记录) Bookings bookings = bookingsMapper.selectOne(new QueryWrapper<Bookings>().lambda() server/system_timer/src/main/java/com/doumee/jobs/fegin/VisitServiceFegin.java
@@ -92,7 +92,7 @@ @GetMapping("/timer/sms/sendWaitingSmsNotice") ApiResponse sendWaitingSmsNotice(); @ApiOperation("【数字化月台】月台今日作业外完成通知定时") @ApiOperation("【数字化月台】月台今日作业未完成通知定时") @GetMapping("/timer/platformJob/sendUnFinishNotice") ApiResponse sendUnFinishNotice(); server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformCloudController.java
@@ -245,6 +245,17 @@ } @ApiOperation("恢复作业") @PostMapping("/restoreWork") @CloudRequiredPermission("business:platform:update") public ApiResponse restoreWork (@RequestBody JobOperateDTO jobOperateDTO, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { jobOperateDTO.setLoginUserInfo(getLoginUser(token)); PlatformJob platformJob = platformJobService.restoreWork(jobOperateDTO); platformJobService.cancelInPark(platformJob); return ApiResponse.success("操作成功"); } @ApiOperation("完成作业") @PostMapping("/finishWork") @CloudRequiredPermission("business:platform:update") server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/PdaPlatformController.java
@@ -171,6 +171,16 @@ } @ApiOperation("恢复作业") @PostMapping("/restoreWork") @CloudRequiredPermission("business:platform:update") public ApiResponse restoreWork (@RequestBody JobOperateDTO jobOperateDTO, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { jobOperateDTO.setLoginUserInfo(getLoginUser(token)); PlatformJob platformJob = platformJobService.restoreWork(jobOperateDTO); platformJobService.cancelInPark(platformJob); return ApiResponse.success("操作成功"); } @ApiOperation("完成作业") @PostMapping("/finishWork") @CloudRequiredPermission("business:platform:update") server/visits/dmvisit_service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatNotice.java
@@ -782,7 +782,7 @@ public void sendUnFinishNotice(SystemDictDataBiz systemDictDataBiz,WxNoticeConfigMapper wxNoticeConfigMapper,Integer unFinishNum,String objCode, List<String> openIds){ String token = this.getToken(systemDictDataBiz); if(StringUtils.isBlank(token)){ if(StringUtils.isBlank(token)||Constants.equalsInteger(unFinishNum,Constants.ZERO)){ return; } try{ server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformJobService.java
@@ -257,4 +257,11 @@ void sendUnFinishNotice(); void dealJobFinish(List<Integer> jobIdList); /** * 恢复作业 * @param jobOperateDTO * @return */ PlatformJob restoreWork(JobOperateDTO jobOperateDTO); } server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
@@ -335,8 +335,14 @@ .ge(pageWrap.getModel().getBeginDoneDateStart() != null, PlatformJob::getDoneDate, Utils.Date.getStart(pageWrap.getModel().getBeginDoneDateStart())) .le(pageWrap.getModel().getBeginDoneDateEnd() != null, PlatformJob::getDoneDate, Utils.Date.getEnd(pageWrap.getModel().getBeginDoneDateEnd())) .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) // .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(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ZERO,pageWrap.getModel().getJobType()), "select 1 from platform_wms_detail tt where tt.isdeleted=0 and tt.job_id=t.id") .notExists(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ONE,pageWrap.getModel().getJobType()), "select 1 from platform_wms_detail tt where tt.isdeleted=0 and tt.job_id=t.id") .exists(StringUtils.isNotBlank(pageWrap.getModel().getWmsContractNum()), "select tt.id from platform_wms_detail tt where tt.isdeleted=0 and tt.contract_num='"+pageWrap.getModel().getWmsContractNum()+"' and tt.job_id=t.id"); queryWrapper.orderByDesc(PlatformJob::getCreateDate); @@ -737,8 +743,7 @@ PlatformGroup platformGroup = platformGroupMapper.selectById(groupId); if(Objects.nonNull(platformGroup)&&StringUtils.isNotBlank(platformGroup.getUnFinishNoticeUsers())){ List<SystemUser> systemUserList = systemUserMapper.selectList(new QueryWrapper<SystemUser>().lambda() .eq(SystemUser::getDeleted,Constants.ZERO) .eq(SystemUser::getStatus,Constants.ZERO) .eq(SystemUser::getDeleted,Constants.ZERO).eq(SystemUser::getStatus,Constants.ZERO) .isNotNull(SystemUser::getOpenid) .in(SystemUser::getMemberId,Arrays.asList(platformGroup.getUnFinishNoticeUsers().split(","))) ); @@ -756,23 +761,6 @@ } } } public static void main(String[] args) { Integer key1 =20; Integer key2 =20; Integer key3 =30; Integer key4 =40; List<Integer> list = new ArrayList<>(); list.add(key1); list.add(key2); list.add(key3); list.add(key4); Set<Integer> setList = new HashSet<>(list); for (Integer groupId:setList) { System.out.println(groupId); } } public void distanceSignIn(SignInDTO signInDTO , PlatformJob platformJob){ server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -1078,27 +1078,31 @@ data.setCurrentOutDoneNum(getSumTotalByList(currentDoneNum,0,1));//今日完成量 data.setCurrentInNum(beforeInNum.add(data.getCurrentInDoneNum()).add(currentInNum));//当前入库总任务成量 data.setCurrentOutNum(beforeOutNum.add(data.getCurrentOutDoneNum()).add(currentOutNum));//当前出库总任务成量 data.setTodayOutRate(getDayTotalRata(data.getCurrentOutDoneNum(),DateUtil.getToday()));//当日出库效率 data.setTodayInRate(getDayTotalRata(data.getCurrentInDoneNum(),DateUtil.getToday()));//当日入库效率 data.setMonthOutRate(getMonthRata(monthNum,Constants.ZERO));//本月出库效率 data.setMonthInRate(getMonthRata(monthNum,Constants.ONE));//本月出库效率 //------------今日出入库效率---------------- BigDecimal outHours = getTotalDoneTimes(currentDoneNum,0);// BigDecimal inHours = getTotalDoneTimes(currentDoneNum,1);// if(outHours.compareTo(new BigDecimal(0))>0){ data.setTodayOutRate(data.getCurrentOutDoneNum().divide(outHours,2));//当前入库总任务成量 } if(inHours.compareTo(new BigDecimal(0))>0){ data.setTodayInRate(data.getCurrentInDoneNum().divide(inHours,2));//当前入库总任务成量 } // BigDecimal outHours = getTotalDoneTimes(currentDoneNum,0);// // BigDecimal inHours = getTotalDoneTimes(currentDoneNum,1);// // // if(outHours.compareTo(new BigDecimal(0))>0){ // data.setTodayOutRate(data.getCurrentOutDoneNum().divide(outHours,2));//当前入库总任务成量 // } // if(inHours.compareTo(new BigDecimal(0))>0){ // data.setTodayInRate(data.getCurrentInDoneNum().divide(inHours,2));//当前入库总任务成量 // } //------------本月出入库效率---------------- // BigDecimal outMonthNum = getSumTotalByList(monthNum,0,null).add(data.getCurrentOutDoneNum()); BigDecimal inMonthNum = getSumTotalByList(monthNum,1,null).add(data.getCurrentInDoneNum()); BigDecimal outMonthHours = getTotalDoneTimes(monthNum,0).add(outHours);// BigDecimal inMonthHours = getTotalDoneTimes(monthNum,1).add(inHours);// if(outMonthHours.compareTo(new BigDecimal(0))>0){ data.setMonthOutRate(data.getMonthOutTotal().divide(outMonthHours,0,BigDecimal.ROUND_HALF_UP));//本月入库效率 } if(inMonthHours.compareTo(new BigDecimal(0))>0){ data.setMonthInRate(inMonthNum.divide(inMonthHours,0,BigDecimal.ROUND_HALF_UP));//本月入库效率 } // BigDecimal inMonthNum = getSumTotalByList(monthNum,1,null).add(data.getCurrentInDoneNum()); // BigDecimal outMonthHours = getTotalDoneTimes(monthNum,0).add(outHours);// // BigDecimal inMonthHours = getTotalDoneTimes(monthNum,1).add(inHours);// // if(outMonthHours.compareTo(new BigDecimal(0))>0){ // data.setMonthOutRate(data.getMonthOutTotal().divide(outMonthHours,0,BigDecimal.ROUND_HALF_UP));//本月出库效率 // } // if(inMonthHours.compareTo(new BigDecimal(0))>0){ // data.setMonthInRate(inMonthNum.divide(inMonthHours,0,BigDecimal.ROUND_HALF_UP));//本月入库效率 // } return data; } @@ -1110,10 +1114,9 @@ if(platformLogList!=null && platformLogList.size()>0){ return new BigDecimal((double)(platformLogList.stream().map(m->Long.valueOf(m.getParam3())).reduce(Long.valueOf(0),Long::sum))/(double)60); } return new BigDecimal(0); } private BigDecimal getTotalDoneTimes(List<PlatformJob> list, Integer type) { BigDecimal r = new BigDecimal(0); if(list==null || list.size() == 0){ @@ -1149,6 +1152,94 @@ return r; } private BigDecimal getMonthRata(List<PlatformJob> list, Integer type) { BigDecimal r = new BigDecimal(0); if(list==null || list.size() == 0){ return r; } List<PlatformJob> jobList= new ArrayList<>(); for(PlatformJob job : list) { if (!(Constants.equalsInteger(job.getStatus(), Constants.PlatformJobStatus.DONE.getKey()) || Constants.equalsInteger(job.getStatus(), Constants.PlatformJobStatus.LEAVED.getKey()) || Constants.equalsInteger(job.getStatus(), Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()))) { //只查询完成数据 continue; } if (type != null && type == 0 && (Constants.equalsInteger(job.getType(), Constants.ONE) || Constants.equalsInteger(job.getType(), Constants.THREE))) { //出库 jobList.add(job); } if (type != null && type == 1 && (Constants.equalsInteger(job.getType(), Constants.ZERO) || Constants.equalsInteger(job.getType(), Constants.TWO) || Constants.equalsInteger(job.getType(), Constants.FOUR))) { //入库 jobList.add(job); } } if(CollectionUtils.isNotEmpty(jobList)){ //获取任务数据 List<String> jobDataList = list.stream().filter(i->Objects.nonNull(i.getDoneDate())).map(i->DateUtil.formatDate(i.getDoneDate(),"yyyy-MM-dd")).collect(Collectors.toList()); for (String jobDate:jobDataList) { //过滤当天的数据 List<PlatformJob> platformJobList = list.stream(). filter(i->jobDate.equals(DateUtil.formatDate(i.getDoneDate(),"yyyy-MM-dd"))).collect(Collectors.toList()); if(CollectionUtils.isNotEmpty(platformJobList)){ //获取今天的 r = r.add(this.getDayTotalRata(getSumTotalByList(platformJobList,type,null),jobDate)); } } } return r; } private BigDecimal getDayTotalRata(BigDecimal totalAmount,String today) { BigDecimal r = new BigDecimal(0); //查询今日最早/最晚的作业数据 List<PlatformLog> platformLogList = platformLogMapper.selectList(new QueryWrapper<PlatformLog>() .lambda() .apply(" ( to_days(param1) = '"+today+"' or to_days(param2) = '"+today+"' ) ") ); if(totalAmount.compareTo(BigDecimal.ZERO)==0||CollectionUtils.isEmpty(platformLogList)){ return BigDecimal.ZERO; } if(platformLogList!=null && platformLogList.size()>0){ return this.getWorkTime(totalAmount,platformLogList); } return r; } /** * 查询作业时长(小时) * @param totalAmount * @param platformLogList * @return */ public BigDecimal getWorkTime(BigDecimal totalAmount,List<PlatformLog> platformLogList){ if(CollectionUtils.isEmpty(platformLogList)){ return BigDecimal.ZERO; } //获取开始时间 List<Long> startTimeList = platformLogList.stream().filter(i->Objects.nonNull(i.getParam1())).map(i->DateUtil.fromStringToDate("yyyy-MM-dd HH:mm:ss",i.getParam1()).getTime()).collect(Collectors.toList()); Long startTime = Collections.min(startTimeList); //获取结束时间 List<Long> endTimeList = platformLogList.stream().filter(i->Objects.nonNull(i.getParam2())).map(i->DateUtil.fromStringToDate("yyyy-MM-dd HH:mm:ss",i.getParam2()).getTime()).collect(Collectors.toList()); Long endTime = Collections.max(endTimeList); if(Objects.isNull(startTime) || Objects.isNull(endTime) || (startTime>=endTime)){ return BigDecimal.ZERO; } return totalAmount.divide(new BigDecimal(( endTime - startTime )+"").divide(new BigDecimal("3600000"),2,BigDecimal.ROUND_HALF_UP),2,BigDecimal.ROUND_HALF_UP) ; } private BigDecimal getSumTotalByList(List<PlatformJob> list,Integer type,Integer status) { BigDecimal r = new BigDecimal(0); if(list==null || list.size() == 0){