From c2600591e819743757f8668d0c684da1e24cb7d4 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期五, 08 三月 2024 18:21:22 +0800 Subject: [PATCH] 代码提交 --- ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java | 47 +++++++++++++++++++++++++++++------------------ 1 files changed, 29 insertions(+), 18 deletions(-) diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java index eaae727..68ffcff 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java @@ -1,9 +1,13 @@ package com.ruoyi.quartz.task; +import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.utils.bean.DtoConversionUtils; import com.ruoyi.project.domain.*; import com.ruoyi.project.domain.vo.DingTalkReqVo; import com.ruoyi.project.service.*; +import com.ruoyi.system.mapper.SysUserMapper; +import com.ruoyi.system.service.ISysUserService; +import com.taobao.api.ApiException; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -42,9 +46,12 @@ @Autowired private IServiceFundflowruleService iServiceFundflowruleService; - @Autowired + @Autowired private IServiceFundService serviceFundService; + + @Autowired + private ISysUserService sysUserService; @Autowired @@ -62,7 +69,7 @@ System.out.println("鎵ц鏃犲弬鏂规硶"); } - public void checkReportInfo() { + public void checkReportInfo() throws ApiException { //鏌ュ嚭鎵�鏈夎鍖婚櫌閫�鍥炵殑Fund鏁版嵁 List<ServiceFundShared> serviceFundShareds = serviceFundSharedService.queryFundShareList(); for (ServiceFundShared serviceFundShared : serviceFundShareds) { @@ -85,7 +92,9 @@ serviceFund1.setRecordstatus(-1); serviceFund1.setBackflowlevel(199); serviceFundService.updateById(serviceFund1); - sendMeg(split, phone, serviceFundShared.getApplytype(), 2, serviceFundShared.getSerfunid()); + + SysUser sysUser = sysUserService.selectUserByUserName(serviceFund1.getUserno()); + sendMeg(split, sysUser.getPhonenumber(), serviceFundShared.getApplytype(), 2, serviceFundShared.getSerfunid()); } else { //涓嶆槸閫�鍥炵殑鎿嶄綔 if (StringUtils.isNotBlank(serviceFundShared.getZffs()) && serviceFundShared.getSpjg() == 0) { @@ -312,7 +321,9 @@ serviceReimbursement1.setBackflowlevel(199L); serviceReimbursement1.setRecordstatus(-1); serviceReimbursementService.updateById(serviceReimbursement1); - sendMeg(split, phone, "0", 1, serviceReimbursementShared.getReimid()); + + SysUser sysUser = sysUserService.selectUserByUserName(serviceReimbursement1.getUserno()); + sendMeg(split, sysUser.getPhonenumber(), "0", 1, serviceReimbursementShared.getReimid()); } else { //涓嶆槸閫�鍥炵殑鎿嶄綔 @@ -518,12 +529,12 @@ } - public void sendMeg(String[] split, String phone, String applyType, Integer fundType, Long fundId) { + public void sendMeg(String[] split, String phone, String applyType, Integer fundType, Long fundId) throws ApiException { //璁板綍鎿嶄綔璁板綍 ServiceFundflow serviceFundflow = new ServiceFundflow(); - serviceFundflow.setCreateBy("admin"); + serviceFundflow.setCreateBy(split[0]); serviceFundflow.setCreateTime(new Date()); - serviceFundflow.setUpdateBy("admin"); + serviceFundflow.setUpdateBy(split[0]); serviceFundflow.setUpdateTime(new Date()); serviceFundflow.setCheckusername(split[0]); serviceFundflow.setFlowcontent(split[2]); @@ -534,17 +545,17 @@ serviceFundflow.setFundid(fundId); fundflowService.save(serviceFundflow); -// ArrayList<ConcurrentHashMap<String, String>> contentList = new ArrayList<>(); -// ConcurrentHashMap map = new ConcurrentHashMap(); -// map.put("瀹℃壒浜�", split[0]); -// map.put("瀹℃壒鏃堕棿", split[1]); -// map.put("鎰忚", split[2]); -// contentList.add(map); -// DingTalkReqVo dingTalkReqVo = new DingTalkReqVo(); -// dingTalkReqVo.setTitle("璐㈠姟绯荤粺椹冲洖淇℃伅"); -// dingTalkReqVo.setNumber(phone); -// dingTalkReqVo.setContents(contentList); -// dingTalkService.sendNotification(dingTalkReqVo); + ArrayList<ConcurrentHashMap<String, Object>> contentList = new ArrayList<>(); + ConcurrentHashMap map = new ConcurrentHashMap(); + map.put("瀹℃壒浜猴細", split[0]); + map.put("瀹℃壒鏃堕棿锛�", split[1]); + map.put("鎰忚锛�", split[2]); + contentList.add(map); + DingTalkReqVo dingTalkReqVo = new DingTalkReqVo(); + dingTalkReqVo.setTitle("璐㈠姟绯荤粺椹冲洖淇℃伅"); + dingTalkReqVo.setNumber(phone); + dingTalkReqVo.setContents(contentList); + dingTalkService.sendNotification(dingTalkReqVo); } private ReentrantLock lock = new ReentrantLock(); -- Gitblit v1.9.3