|
|
@@ -2,6 +2,7 @@ package com.xjrsoft.module.oa.service.impl;
|
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
|
import com.xjrsoft.module.oa.entity.OfficialDocumentReceived;
|
|
|
import com.xjrsoft.module.oa.mapper.OfficialDocumentReceivedMapper;
|
|
|
@@ -11,8 +12,13 @@ import com.xjrsoft.module.organization.dto.WeChatSendMessageDto;
|
|
|
import com.xjrsoft.module.organization.entity.User;
|
|
|
import com.xjrsoft.module.organization.mapper.UserMapper;
|
|
|
import com.xjrsoft.module.organization.service.IWeChatService;
|
|
|
+import com.xjrsoft.module.teacher.entity.WfTeacherleave;
|
|
|
+import com.xjrsoft.module.workflow.entity.WorkflowFormRelation;
|
|
|
+import com.xjrsoft.module.workflow.service.IWorkflowFormRelationService;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
+import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
@@ -31,6 +37,8 @@ public class OfficialDocumentReceivedServiceImpl extends MPJBaseServiceImpl<Offi
|
|
|
private final IWeChatService weChatService;
|
|
|
private final UserMapper userMapper;
|
|
|
|
|
|
+ private final IWorkflowFormRelationService workflowFormRelationService;
|
|
|
+
|
|
|
@Override
|
|
|
public String getMaxReceivedNumber() {
|
|
|
Integer maxReceivedNumber = officialDocumentReceivedMapper.getMaxReceivedNumber();
|
|
|
@@ -74,5 +82,20 @@ public class OfficialDocumentReceivedServiceImpl extends MPJBaseServiceImpl<Offi
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public void taskIdPersist(Long id) {
|
|
|
+ // 根据当前表单数据获取流程信息
|
|
|
+ LambdaQueryWrapper<WorkflowFormRelation> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ wrapper
|
|
|
+ .eq(WorkflowFormRelation::getFormKeyValue, id)
|
|
|
+ ;
|
|
|
+ WorkflowFormRelation workflowFormRelation = workflowFormRelationService.getOne(wrapper);
|
|
|
|
|
|
+ if(ObjectUtils.isNotEmpty(workflowFormRelation)){
|
|
|
+ OfficialDocumentReceived update = new OfficialDocumentReceived();
|
|
|
+ update.setId(id);
|
|
|
+ update.setTaskId(workflowFormRelation.getProcessId());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|