Commit 15030a46 authored by wangyangyang's avatar wangyangyang

设计评审:通知自动任务接口 完成部分

parent 9beea6e7
...@@ -3,6 +3,7 @@ package com.inet.dcs.document.core.controller; ...@@ -3,6 +3,7 @@ package com.inet.dcs.document.core.controller;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import com.inet.dcs.document.common.vo.ExtApplicantVO; import com.inet.dcs.document.common.vo.ExtApplicantVO;
import com.inet.dcs.document.common.vo.ExtAuditObjectVO; import com.inet.dcs.document.common.vo.ExtAuditObjectVO;
import com.inet.dcs.document.common.vo.ExtDesignReviewNoticeVO;
import com.inet.dcs.document.common.vo.ExtInterfaceVO; import com.inet.dcs.document.common.vo.ExtInterfaceVO;
import com.inet.dcs.document.core.constants.Constants; import com.inet.dcs.document.core.constants.Constants;
import com.inet.dcs.document.core.service.ExtAutoTaskService; import com.inet.dcs.document.core.service.ExtAutoTaskService;
...@@ -63,6 +64,13 @@ public class ExtAutoTaskController { ...@@ -63,6 +64,13 @@ public class ExtAutoTaskController {
private ExtDxDocumentService extDxDocumentService; private ExtDxDocumentService extDxDocumentService;
@ApiOperation("设置评审通知流程团队变量")
@PostMapping({"/design/review/notice"})
public void setDesignNoticeTeamRole(@RequestBody ExtDesignReviewNoticeVO noticeVO) {
autoTaskService.setDesignNoticeTeamRole(noticeVO);
}
@ApiOperation("生成图册目录且修改图册已经图纸状态为发布") @ApiOperation("生成图册目录且修改图册已经图纸状态为发布")
@GetMapping({"/catalog"}) @GetMapping({"/catalog"})
public void generateCatalog(@RequestParam Long docId) { public void generateCatalog(@RequestParam Long docId) {
......
...@@ -3,6 +3,7 @@ package com.inet.dcs.document.core.service; ...@@ -3,6 +3,7 @@ package com.inet.dcs.document.core.service;
import com.inet.dcs.document.common.vo.ExtApplicantVO; import com.inet.dcs.document.common.vo.ExtApplicantVO;
import com.inet.dcs.document.common.vo.ExtAuditObjectVO; import com.inet.dcs.document.common.vo.ExtAuditObjectVO;
import com.inet.dcs.document.common.vo.ExtDesignReviewNoticeVO;
import com.inet.dcs.document.common.vo.ExtInterfaceVO; import com.inet.dcs.document.common.vo.ExtInterfaceVO;
import com.inet.dcs.document.feign.ExtAutoTaskServiceFeign; import com.inet.dcs.document.feign.ExtAutoTaskServiceFeign;
import com.yonde.dcs.document.common.entity.vo.DxDocumentVO; import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
...@@ -221,4 +222,10 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign { ...@@ -221,4 +222,10 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
* @param documentVO * @param documentVO
*/ */
void changeIEDStatus(String iedStatus, DxDocumentVO documentVO); void changeIEDStatus(String iedStatus, DxDocumentVO documentVO);
/**
* 设置评审通知流程团队变量
* @param id
*/
void setDesignNoticeTeamRole(ExtDesignReviewNoticeVO noticeVO);
} }
package com.inet.dcs.document.core.service.impl; package com.inet.dcs.document.core.service.impl;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.spring.SpringUtil; import cn.hutool.extra.spring.SpringUtil;
import cn.hutool.http.ContentType; import cn.hutool.http.ContentType;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
...@@ -168,6 +170,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService { ...@@ -168,6 +170,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
ExtIEDPlanServiceFeign extIEDPlanServiceFeign; ExtIEDPlanServiceFeign extIEDPlanServiceFeign;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void changeIEDStatus(String iedStatus, DxDocumentVO documentVO) { public void changeIEDStatus(String iedStatus, DxDocumentVO documentVO) {
...@@ -191,6 +194,32 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService { ...@@ -191,6 +194,32 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
} }
} }
@Override
@Transactional(rollbackFor = Exception.class)
public void setDesignNoticeTeamRole(ExtDesignReviewNoticeVO noticeVO) {
String userList = "";
if (!StrUtil.isEmpty(noticeVO.getSendPerson())){
userList = noticeVO.getSendPerson();
}
if (!StrUtil.isEmpty(noticeVO.getSendDepartment())){
//获取组织下的人
String[] orgList = noticeVO.getSendDepartment().split(",");
for (String orgId : orgList) {
List<Long> memberUserList = dxOrganizationFeign.getOrganizationMemberList(Long.valueOf(orgId));
if (CollectionUtils.isNotEmpty(memberUserList)) {
for (Long userId : memberUserList) {
userList = userList + "," + userId;
}
}
}
}
//流程 消息发送设置变量
String teamRole = "messageDesign";
// varMap.put("wf_act_TeamRole_Responsible_userList", userList);
// wfcProcessFeign.setProcessVariables(processInstanceId, varMap);
}
@SneakyThrows @SneakyThrows
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
......
...@@ -2,6 +2,7 @@ package com.inet.dcs.document.feign; ...@@ -2,6 +2,7 @@ package com.inet.dcs.document.feign;
import com.inet.dcs.document.common.vo.ExtApplicantVO; import com.inet.dcs.document.common.vo.ExtApplicantVO;
import com.inet.dcs.document.common.vo.ExtAuditObjectVO; import com.inet.dcs.document.common.vo.ExtAuditObjectVO;
import com.inet.dcs.document.common.vo.ExtDesignReviewNoticeVO;
import com.inet.dcs.document.common.vo.ExtInterfaceVO; import com.inet.dcs.document.common.vo.ExtInterfaceVO;
import com.yonde.dcs.document.common.entity.vo.DxDocumentVO; import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import com.yonde.dcs.plan.common.vo.ExtPlanVO; import com.yonde.dcs.plan.common.vo.ExtPlanVO;
...@@ -25,6 +26,10 @@ import java.util.Map; ...@@ -25,6 +26,10 @@ import java.util.Map;
@FeignClient(value = "${dcs.feign.DCS-DOC}", path = "/task") @FeignClient(value = "${dcs.feign.DCS-DOC}", path = "/task")
public interface ExtAutoTaskServiceFeign { public interface ExtAutoTaskServiceFeign {
@ApiOperation("设置评审通知流程团队变量")
@PostMapping({"/design/review/notice"})
void setDesignNoticeTeamRole(@RequestBody ExtDesignReviewNoticeVO noticeVO);
@ApiOperation("客制化修改IED计划状态") @ApiOperation("客制化修改IED计划状态")
@PostMapping({"/ied/change"}) @PostMapping({"/ied/change"})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment