|
@@ -6,6 +6,8 @@ import cn.iocoder.yudao.module.as.dal.dataobject.aidingstudentspersonmanage.Aidi
|
|
|
import cn.iocoder.yudao.module.as.dal.dataobject.aidingstudentspersonmanage.AidingStudentsPersonManageDO;
|
|
|
import cn.iocoder.yudao.module.as.dal.mysql.aidingstudentspersonmanage.AidingStudentPersonManageEvaluationResultMapper;
|
|
|
import cn.iocoder.yudao.module.as.dal.mysql.aidingstudentspersonmanage.AidingStudentsPersonManageMapper;
|
|
|
+import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi;
|
|
|
+import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
|
|
|
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskPageReqVO;
|
|
|
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
|
|
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
|
@@ -20,6 +22,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.*;
|
|
|
|
|
@@ -36,6 +40,9 @@ import static cn.iocoder.yudao.module.as.enums.ErrorCodeConstants.*;
|
|
|
@Slf4j
|
|
|
public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStudentsPersonManageMapper, AidingStudentsPersonManageDO> implements AidingStudentsPersonManageService{
|
|
|
|
|
|
+
|
|
|
+ public static final String PROCESS_KEY = "familyDifficulties";
|
|
|
+
|
|
|
@Autowired
|
|
|
private AidingStudentsPersonManageMapper aidingStudentsPersonManageMapper;
|
|
|
|
|
@@ -48,6 +55,8 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
@Autowired
|
|
|
private AdminUserApi adminUserApi;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private BpmProcessInstanceApi processInstanceApi;
|
|
|
/**
|
|
|
* 学生上传材料之前的信息回显
|
|
|
* @return
|
|
@@ -76,6 +85,7 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
+ @Transactional
|
|
|
public void uploadAidingStudentsManage(AidingStudentPersonManageInfoRespVO uploadVO) {
|
|
|
// 0.检查数据库是否已经存在该信息
|
|
|
AidingStudentsPersonManageDO user1 = aidingStudentsPersonManageMapper
|
|
@@ -102,6 +112,14 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
aDo.setStatus(0);
|
|
|
|
|
|
aidingStudentsPersonManageMapper.insert(aDo);
|
|
|
+
|
|
|
+ String processInstanceId = processInstanceApi.createProcessInstance(user.getId(),
|
|
|
+ new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(PROCESS_KEY)
|
|
|
+ .setBusinessKey(String.valueOf(aDo.getId())));
|
|
|
+ AidingStudentsPersonManageDO aDo2 =
|
|
|
+ new AidingStudentsPersonManageDO().setId(aDo.getId()).setProcessInstanceId(processInstanceId);
|
|
|
+ // 将工作流的编号,更新到综测审批单项中
|
|
|
+ aidingStudentsPersonManageMapper.updateById(aDo2);
|
|
|
}
|
|
|
|
|
|
/**
|