From 8470e06b5ce5189162f9f6cd3f2cea7d14ad80af Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 28 四月 2025 10:37:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
server/meeting/meeting_service/src/main/java/com/doumee/service/business/impl/BookingsServiceImpl.java | 2
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java | 30 -
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformJobService.java | 7
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/PdaPlatformController.java | 10
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java | 133 ++++++++-
h5/App.vue | 517 ++++++++++++++++++++------------------
h5/n_pages/visitorApplication/visitorApplication.vue | 8
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformCloudController.java | 11
server/system_timer/src/main/java/com/doumee/jobs/fegin/VisitServiceFegin.java | 2
server/visits/dmvisit_service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatNotice.java | 2
10 files changed, 428 insertions(+), 294 deletions(-)
diff --git a/h5/App.vue b/h5/App.vue
index 18a1815..2fb62ad 100644
--- a/h5/App.vue
+++ b/h5/App.vue
@@ -1,272 +1,299 @@
<script>
-import { wxAuthorize, refreshToken, app_url } from '@/api'
-export default {
- onLaunch: function () {
- window.addEventListener("popstate", (event) => {
- const path = this.$route.fullPath
- // console.log('path', path);
- if(path == '/pages/login/login' || path == '/'){
- window.location.href = app_url
- }
- if(path == '/pages/wdata/home'){
- window.location.href = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/wdata/home'
- }
- if(path == '/pages/waybill/home'){
- window.location.href = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/waybill/home'
- }
- })
- uni.setStorageSync('transportList', [])
- console.log('onLaunch')
- },
- onShow: function () {
- console.log('App Show')
- },
- onHide: function () {
- console.log('App Hide')
- }
-}
+ import {
+ wxAuthorize,
+ refreshToken,
+ app_url
+ } from '@/api'
+ export default {
+ onLaunch: function() {
+ window.addEventListener("popstate", (event) => {
+ const path = this.$route.fullPath
+ // console.log('path', path);
+ if (path == '/pages/login/login' || path == '/') {
+ window.location.href = app_url
+ }
+ if (path == '/pages/wdata/home') {
+ window.location.href = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/wdata/home'
+ }
+ if (path == '/pages/waybill/home') {
+ window.location.href = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/waybill/home'
+ }
+ })
+ uni.setStorageSync('transportList', [])
+ console.log('onLaunch')
+ },
+ onShow: function() {
+ console.log('App Show')
+ },
+ onHide: function() {
+ console.log('App Hide')
+ }
+ }
</script>
<style lang="scss">
-/*姣忎釜椤甸潰鍏叡css */
-@import "uview-ui/index.scss";
-html, body {
- height: auto;
- min-height: 100%;
- overflow: visible;
-}
-.flex-cb {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
+ /*姣忎釜椤甸潰鍏叡css */
+ @import "uview-ui/index.scss";
-.container {
- height: 100%;
- width: 100%;
- max-width: 800rpx;
- overflow-y: auto;
-}
-.empty_wrap{
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- color: #666666;
- min-height: 600rpx;
- image{
- width: 300rpx;
- height: 300rpx;
+ html,
+ body {
+ height: auto;
+ min-height: 100%;
+ overflow: visible;
}
-}
-.doumee-container .ivu-tabs-nav {
- width: 100%;
-}
-.doumee-container .ivu-tabs-nav .ivu-tabs-tab {
- width: calc(100% / 3);
-}
+ .flex-cb {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
-.doumee-container .ivu-tabs-nav .ivu-tabs-tab {
- margin-right: 0;
- text-align: center;
-}
+ .container {
+ height: 100%;
+ width: 100%;
+ max-width: 800rpx;
+ overflow-y: auto;
+ }
-.cell {
- background-color: #fff;
- display: flex;
- justify-content: space-between;
- align-items: center;
- min-height: 100rpx;
- padding: 24rpx 30rpx;
- box-sizing: border-box;
- border-bottom: 1rpx solid #eee;
- font-size: 15rpx;
- position: relative;
-}
+ .empty_wrap {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ color: #666666;
+ min-height: 600rpx;
-.cell .title {
- flex-shrink: 0;
- color: #222;
- line-height: 20rpx;
- height: 20rpx;
- width: 28%;
- margin-right: 5%;
-}
+ image {
+ width: 300rpx;
+ height: 300rpx;
+ }
+ }
-.cell .content {
- flex: 1;
- font-size: 28rpx;
- font-weight: 400;
- color: #999999;
- display: flex;
- align-items: center;
- justify-content: flex-end;
-}
+ .doumee-container .ivu-tabs-nav {
+ width: 100%;
+ }
-.cell .content .input {
- width: 100%;
- height: 100%;
- font-size: 28rpx;
- font-weight: 400;
- color: #333333;
- text-align: right;
-}
+ .doumee-container .ivu-tabs-nav .ivu-tabs-tab {
+ width: calc(100% / 3);
+ }
-.cell.is-link::after {
- content: "";
- display: block;
- width: 8rpx;
- height: 8rpx;
- transform: rotate(-45deg);
- border-right: 1rpx solid #999999;
- border-bottom: 1rpx solid #999999;
- margin-left: 5rpx;
-}
+ .doumee-container .ivu-tabs-nav .ivu-tabs-tab {
+ margin-right: 0;
+ text-align: center;
+ }
-.card {
- background-color: #fff;
- padding: 16rpx;
- position: relative;
-}
+ .cell {
+ background-color: #fff;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ min-height: 100rpx;
+ padding: 24rpx 30rpx;
+ box-sizing: border-box;
+ border-bottom: 1rpx solid #eee;
+ font-size: 15rpx;
+ position: relative;
+ }
-.card::after {
- content: "";
- display: block;
- position: absolute;
- width: calc(100% - 32rpx);
- height: 0;
- bottom: 0;
- left: 16rpx;
- border-bottom: 1rpx solid #f7f7f7;
-}
+ .cell .title {
+ flex-shrink: 0;
+ color: #222;
+ line-height: 20rpx;
+ height: 20rpx;
+ width: 28%;
+ margin-right: 5%;
+ }
-.card .title {
- color: #777777;
- margin-bottom: 12rpx;
-}
+ .cell .content {
+ flex: 1;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #999999;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ }
-.card .content {
- color: #222;
-}
+ .cell .content .input {
+ width: 100%;
+ height: 100%;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #333333;
+ text-align: right;
+ }
-.placeholder9 {
- color: #999999 !important;
- font-size: 28rpx;
-}
-.placeholder3{
- color: #333333 !important;
-}
-.red{
- color: red !important;
-}
+ .cell.is-link::after {
+ content: "";
+ display: block;
+ width: 8rpx;
+ height: 8rpx;
+ transform: rotate(-45deg);
+ border-right: 1rpx solid #999999;
+ border-bottom: 1rpx solid #999999;
+ margin-left: 5rpx;
+ }
-//璁剧疆鍦嗚
-checkbox .uni-checkbox-input {
- border-radius: 50%;
-}
+ .card {
+ background-color: #fff;
+ padding: 16rpx;
+ position: relative;
+ }
-checkbox .uni-checkbox-input.uni-checkbox-input-checked {
- color: #fff !important;
- border: 1px solid #4d99a8 !important;
- background-color: #4d99a8 !important;
-}
+ .card::after {
+ content: "";
+ display: block;
+ position: absolute;
+ width: calc(100% - 32rpx);
+ height: 0;
+ bottom: 0;
+ left: 16rpx;
+ border-bottom: 1rpx solid #f7f7f7;
+ }
-checkbox .uni-checkbox-input.uni-checkbox-input-checked:before {
- /* color: #4d99a8 !important; */
- /* border: 1px solid #4d99a8 !important; */
- /* font-size: 58rpx; */
- /* border-radius: 50%; */
-}
+ .card .title {
+ color: #777777;
+ margin-bottom: 12rpx;
+ }
-//
+ .card .content {
+ color: #222;
+ }
-view {
- box-sizing: border-box;
-}
+ .placeholder9 {
+ color: #999999 !important;
+ font-size: 28rpx;
+ }
-image {
- box-sizing: border-box;
- margin: 0;
- display: flex;
-}
-input {
- font-size: 30rpx;
-}
-textarea {
- box-sizing: border-box;
- // background-color: #f7f7f7;
- font-size: 30rpx !important;
- padding: 0;
- border-radius: 8rpx;
- color: #333333 !important;
-}
-.u-textarea {
- padding: 0 !important;
- color: #333333 !important;
-}
+ .placeholder3 {
+ color: #333333 !important;
+ }
-.df_ac {
- display: flex;
- align-items: center;
-}
+ .red {
+ color: red !important;
+ }
-.main_app {
- padding: 10rpx 30rpx 0rpx;
- 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;
- border-radius: 50%;
- margin-right: 20rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- background-color: $uni-color-primary;
- color: #fff;
- font-size: 30rpx;
-}
-.placeholder9 {
- color: #999999;
- font-size: 28rpx;
-}
-.fs24 {
- font-size: 24rpx;
-}
-.mr24 {
- margin-right: 24rpx;
-}
-.mt24 {
- margin-top: 24rpx;
-}
+ //璁剧疆鍦嗚
+ checkbox .uni-checkbox-input {
+ border-radius: 50%;
+ }
-.mr12 {
- margin-right: 12rpx;
-}
-.ml12 {
- margin-left: 12rpx;
-}
-.ml6 {
- margin-left: 6rpx;
-}
-.mt6 {
- margin-top: 6rpx;
-}
-.mr6 {
- margin-right: 6rpx;
-}
-</style>
+ checkbox .uni-checkbox-input.uni-checkbox-input-checked {
+ color: #fff !important;
+ border: 1px solid #4d99a8 !important;
+ background-color: #4d99a8 !important;
+ }
+
+ checkbox .uni-checkbox-input.uni-checkbox-input-checked:before {
+ /* color: #4d99a8 !important; */
+ /* border: 1px solid #4d99a8 !important; */
+ /* font-size: 58rpx; */
+ /* border-radius: 50%; */
+ }
+
+ //
+
+ view {
+ box-sizing: border-box;
+ }
+
+ image {
+ box-sizing: border-box;
+ margin: 0;
+ display: flex;
+ }
+
+ input {
+ font-size: 30rpx;
+ }
+
+ textarea {
+ box-sizing: border-box;
+ // background-color: #f7f7f7;
+ font-size: 30rpx !important;
+ padding: 0;
+ border-radius: 8rpx;
+ color: #333333 !important;
+ }
+
+ .u-textarea {
+ padding: 0 !important;
+ color: #333333 !important;
+ }
+
+ .df_ac {
+ display: flex;
+ align-items: center;
+ }
+
+ .main_app {
+ padding: 10rpx 30rpx 0rpx;
+ 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;
+ border-radius: 50%;
+ margin-right: 20rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: $uni-color-primary;
+ color: #fff;
+ font-size: 30rpx;
+ }
+
+ .placeholder9 {
+ color: #999999;
+ font-size: 28rpx;
+ }
+
+ .fs24 {
+ font-size: 24rpx;
+ }
+
+ .mr24 {
+ margin-right: 24rpx;
+ }
+
+ .mt24 {
+ margin-top: 24rpx;
+ }
+
+ .mr12 {
+ margin-right: 12rpx;
+ }
+
+ .ml12 {
+ margin-left: 12rpx;
+ }
+
+ .ml6 {
+ margin-left: 6rpx;
+ }
+
+ .mt6 {
+ margin-top: 6rpx;
+ }
+
+ .mr6 {
+ margin-right: 6rpx;
+ }
+</style>
\ No newline at end of file
diff --git a/h5/n_pages/visitorApplication/visitorApplication.vue b/h5/n_pages/visitorApplication/visitorApplication.vue
index 5d7dd54..02c64f9 100644
--- a/h5/n_pages/visitorApplication/visitorApplication.vue
+++ b/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'
diff --git a/server/meeting/meeting_service/src/main/java/com/doumee/service/business/impl/BookingsServiceImpl.java b/server/meeting/meeting_service/src/main/java/com/doumee/service/business/impl/BookingsServiceImpl.java
index 709ae96..f1395de 100644
--- a/server/meeting/meeting_service/src/main/java/com/doumee/service/business/impl/BookingsServiceImpl.java
+++ b/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()
diff --git a/server/system_timer/src/main/java/com/doumee/jobs/fegin/VisitServiceFegin.java b/server/system_timer/src/main/java/com/doumee/jobs/fegin/VisitServiceFegin.java
index f7766bb..1bf2935 100644
--- a/server/system_timer/src/main/java/com/doumee/jobs/fegin/VisitServiceFegin.java
+++ b/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();
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformCloudController.java
index 05737bd..7553e6a 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformCloudController.java
+++ b/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")
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/PdaPlatformController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/PdaPlatformController.java
index ff4a5e5..9cf22d8 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/PdaPlatformController.java
+++ b/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")
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatNotice.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatNotice.java
index ae2a8a3..3520756 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatNotice.java
+++ b/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{
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformJobService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformJobService.java
index 6b2b9b2..78aa1f9 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformJobService.java
+++ b/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);
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
index 8dd4deb..547151c 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
+++ b/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){
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
index 7ddc86e..a8ef908 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
+++ b/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));//褰撳墠鍑哄簱鎬讳换鍔℃垚閲�
-
- //------------浠婃棩鍑哄叆搴撴晥鐜�----------------
- 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));//褰撳墠鍏ュ簱鎬讳换鍔℃垚閲�
- }
+ 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 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){
--
Gitblit v1.9.3