From e87b711cc267567d8374315dc99ef9780cb25dd8 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 26 三月 2025 17:55:57 +0800
Subject: [PATCH] 代码初始化

---
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java |   70 +++++++++++++++++++++++++++++++++++
 1 files changed, 70 insertions(+), 0 deletions(-)

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 b0d94cc..494e10b 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
@@ -687,7 +687,76 @@
         //瀛樺偍鎿嶄綔鏃ュ織
         savePlatformLog(Constants.PlatformJobLogType.SIGN.getKey(),oldPlatformJob,platformJob,
                 Constants.PlatformJobLogType.SIGN.getInfo());
+        //绛惧埌寰俊閫氱煡 2025骞�3鏈�26鏃�14:25:00
+        if(!Constants.equalsInteger(platformJob.getSingType(),Constants.TWO)&&StringUtils.isNotBlank(platformGroup.getSignInNoticeUsers())){
+            List<SystemUser> systemUserList = systemUserMapper.selectList(new QueryWrapper<SystemUser>().lambda()
+                    .eq(SystemUser::getDeleted,Constants.ZERO).eq(SystemUser::getStatus,Constants.ZERO).isNotNull(SystemUser::getOpenid)
+                    .in(SystemUser::getId,Arrays.asList(platformGroup.getSignInNoticeUsers().split(",")))
+            );
+            if (com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(systemUserList)) {
+                WxPlatNotice wxPlatNotice = new WxPlatNotice();
+                wxPlatNotice.sendPlatformJobSignNotice(wxNoticeConfigMapper, platformJob,
+                        WxPlatConstants.platformJobContent.platformGroupSignIn,
+                        systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
+                        systemUserList.stream().map(i->i.getOpenid()).collect(Collectors.toList())
+                );
+            }
+        }
     }
+
+
+    @Override
+    public void sendUnFinishNotice(){
+        //鐘舵�� 0寰呯‘璁� 1寰呯鍒� 2绛夊緟鍙彿 3鍏ュ洯绛夊緟 4宸插彨鍙� 5浣滀笟涓� 6浣滀笟瀹屾垚 7杞Щ涓� 8寮傚父鎸傝捣 9宸叉巿鏉冪鍥� 10宸茬鍥� 11 宸茶繃鍙�  12鍙栨秷锛圵MS锛�
+        List<PlatformJob> platformJobList = platformJobJoinMapper.selectJoinList(PlatformJob.class,
+                new MPJLambdaWrapper<PlatformJob>()
+                        .selectAll(PlatformJob.class)
+                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
+                        .isNotNull(PlatformJob::getPlatformGroupId)
+                        .apply(" CREATE_DATE < now() ")
+                        .in(PlatformJob::getStatus,Constants.PlatformJobStatus.WAIT_CONFIRM.getKey()
+                                ,Constants.PlatformJobStatus.WART_SIGN_IN.getKey()
+                                ,Constants.PlatformJobStatus.WAIT_CALL.getKey()
+                                ,Constants.PlatformJobStatus.IN_WAIT.getKey()
+                                ,Constants.PlatformJobStatus.CALLED.getKey()
+                                ,Constants.PlatformJobStatus.WORKING.getKey()
+                                ,Constants.PlatformJobStatus.TRANSFERING.getKey()
+                                ,Constants.PlatformJobStatus.EXCEPTION.getKey()
+                                ,Constants.PlatformJobStatus.OVER_NUMBER.getKey()
+                        )
+        );
+        if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformJobList)){
+            List<Integer> platformGroupId = platformJobList.stream().map(i->i.getPlatformGroupId()).collect(Collectors.toList());
+            if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformGroupId)){
+                Set<Integer> setList = new HashSet<>(platformGroupId);
+                for (Integer groupId:setList) {
+                    PlatformGroup platformGroup = platformGroupMapper.selectById(groupId);
+                    if(Objects.nonNull(platformGroup)){
+                        List<SystemUser> systemUserList = systemUserMapper.selectList(new QueryWrapper<SystemUser>().lambda()
+                                .eq(SystemUser::getDeleted,Constants.ZERO).eq(SystemUser::getStatus,Constants.ZERO).isNotNull(SystemUser::getOpenid)
+                                .in(SystemUser::getId,Arrays.asList(platformGroup.getUnFinishNoticeUsers().split(",")))
+                        );
+                        if (com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(systemUserList)) {
+                            WxPlatNotice wxPlatNotice = new WxPlatNotice();
+                            wxPlatNotice.sendUnFinishNotice(
+                                    wxNoticeConfigMapper,
+                                    platformJobList.stream().filter(i->Constants.equalsInteger(i.getPlatformGroupId(),groupId)).collect(Collectors.toList()).size(),
+                                    WxPlatConstants.platformJobContent.unFinishNotice,
+                                    systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
+                                    systemUserList.stream().map(i->i.getOpenid()).collect(Collectors.toList())
+                            );
+                        }
+                    }
+                }
+            }
+        }
+
+
+
+    }
+
+
+
 
     public void distanceSignIn(SignInDTO signInDTO , PlatformJob platformJob){
         if(Objects.isNull(signInDTO.getLat())
@@ -961,6 +1030,7 @@
 
 
 
+
     private Logger logger = LoggerFactory.getLogger(PlatformJobServiceImpl.class);
 
     @Override

--
Gitblit v1.9.3