|
@@ -20,6 +20,7 @@ import com.yh.saas.plugin.yiliangyiyun.mapper.CommonUserMapper;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.StatusRecordMapper;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.service.IExpenseInfoService;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.service.ITranSettlementReportService;
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.util.GeTuiUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
@@ -46,6 +47,8 @@ public class ExepenseYunListener extends AbstractWorkflowTaskListener {
|
|
|
private INoticeTaskService noticeTaskService;
|
|
|
@Autowired
|
|
|
private ICommonStaffService staffService;
|
|
|
+ @Autowired
|
|
|
+ private GeTuiUtils geTuiUtils;
|
|
|
|
|
|
@Override
|
|
|
public void handleStatusChanged(String businessKey, String status, String statusEn, boolean processIsEnd) {
|
|
@@ -80,26 +83,31 @@ public class ExepenseYunListener extends AbstractWorkflowTaskListener {
|
|
|
statusRecordMapper.insert(statusRecord);
|
|
|
}
|
|
|
|
|
|
-// // 先删除任务
|
|
|
-// noticeService.removeNotice(BaseNotice.NoticeStatus.TASK, "FEIYONGGUANLI-APPROVE",
|
|
|
-// expenseInfo.getId(), null);
|
|
|
-// CommonStaff commitUserInfo = staffService.getInfo(AuthSecurityUtils.getCurrentUserId());
|
|
|
-// String taskContent = "有新的待付款操作需要你处理";
|
|
|
-// NoticeTaskInfo taskInfo = new NoticeTaskInfo();
|
|
|
-// taskInfo.setCompId(commitUserInfo.getCompId());
|
|
|
-// taskInfo.setAcceptType(BaseNotice.AcceptStatus.STAFF);
|
|
|
-// taskInfo.setBusinessId(expenseInfo.getId());
|
|
|
-// taskInfo.setBusinessType("FEIYONGGUANLI");
|
|
|
-// taskInfo.setMessageTitle("费用管理");
|
|
|
-// taskInfo.setMessageContent(taskContent);
|
|
|
-// taskInfo.setBusinessCode("FEIYONGGUANLI-APPROVE");
|
|
|
-// //查询出纳
|
|
|
-// List<CommonStaff> commonStaffList = staffService.selectList(new EntityWrapper<CommonStaff>()
|
|
|
-// .eq("major_role_id", "04e3ec4d03c7499fafa690572fdb4c1c")
|
|
|
-// .eq("delete_flag", "0"));
|
|
|
-// List<String> staffIds = commonStaffList.stream().map(CommonStaff::getStaffId).collect(Collectors.toList());
|
|
|
-// noticeTaskService.createNoticeTask(staffIds,
|
|
|
-// "点击切换任务状态", taskInfo);
|
|
|
+ // 先删除任务
|
|
|
+ noticeService.removeNotice(BaseNotice.NoticeStatus.TASK, "FEIYONGGUANLI-APPROVE",
|
|
|
+ expenseInfo.getId(), null);
|
|
|
+ CommonStaff commitUserInfo = staffService.getInfo(AuthSecurityUtils.getCurrentUserId());
|
|
|
+ String taskContent = "有新的待付款操作需要你处理";
|
|
|
+ NoticeTaskInfo taskInfo = new NoticeTaskInfo();
|
|
|
+ taskInfo.setCompId(commitUserInfo.getCompId());
|
|
|
+ taskInfo.setAcceptType(BaseNotice.AcceptStatus.STAFF);
|
|
|
+ taskInfo.setBusinessId(expenseInfo.getId());
|
|
|
+ taskInfo.setBusinessType("FEIYONGGUANLI");
|
|
|
+ taskInfo.setMessageTitle("费用管理");
|
|
|
+ taskInfo.setMessageContent(taskContent);
|
|
|
+ taskInfo.setBusinessCode("FEIYONGGUANLI-APPROVE");
|
|
|
+ //查询出纳
|
|
|
+ List<CommonStaff> commonStaffList = staffService.selectList(new EntityWrapper<CommonStaff>()
|
|
|
+ .eq("major_role_id", "04e3ec4d03c7499fafa690572fdb4c1c")
|
|
|
+ .eq("delete_flag", "0"));
|
|
|
+ for (CommonStaff c :
|
|
|
+ commonStaffList) {
|
|
|
+ geTuiUtils.pushByCidPhone("工作事项提醒","您有新的易粮易运流程,请及时审批",c.getStaffId());
|
|
|
+
|
|
|
+ }
|
|
|
+ List<String> staffIds = commonStaffList.stream().map(CommonStaff::getStaffId).collect(Collectors.toList());
|
|
|
+ noticeTaskService.createNoticeTask(staffIds,
|
|
|
+ "点击切换任务状态", taskInfo);
|
|
|
} else {
|
|
|
expenseInfo.setApproveStatus(status);
|
|
|
|