更新 用章流程, 追加用章公司选择
This commit is contained in:
parent
8d5d70fd1d
commit
6d71acad04
@ -69,6 +69,8 @@ public class BpmOAEntryController {
|
|||||||
respVO.setEntryPostName(getPost(entry.getEntryPostId()).getName());
|
respVO.setEntryPostName(getPost(entry.getEntryPostId()).getName());
|
||||||
// 设置岗位名称
|
// 设置岗位名称
|
||||||
respVO.setEntryPositionName(getPosition(entry.getEntryPositionId()).getName());
|
respVO.setEntryPositionName(getPosition(entry.getEntryPositionId()).getName());
|
||||||
|
// 设置公司名称
|
||||||
|
respVO.setContractCompanyName(getDept(entry.getContractCompany()).getName());
|
||||||
|
|
||||||
return success(respVO);
|
return success(respVO);
|
||||||
}
|
}
|
||||||
@ -87,6 +89,8 @@ public class BpmOAEntryController {
|
|||||||
respVO.setEntryPostName(getPost(entry.getEntryPostId()).getName());
|
respVO.setEntryPostName(getPost(entry.getEntryPostId()).getName());
|
||||||
// 设置岗位名称
|
// 设置岗位名称
|
||||||
respVO.setEntryPositionName(getPosition(entry.getEntryPositionId()).getName());
|
respVO.setEntryPositionName(getPosition(entry.getEntryPositionId()).getName());
|
||||||
|
// 设置公司名称
|
||||||
|
respVO.setContractCompanyName(getDept(entry.getContractCompany()).getName());
|
||||||
|
|
||||||
return success(respVO);
|
return success(respVO);
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,8 @@ import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.seal.BpmOASealRespVO;
|
|||||||
import cn.iocoder.yudao.module.bpm.convert.oa.BpmOASealConvert;
|
import cn.iocoder.yudao.module.bpm.convert.oa.BpmOASealConvert;
|
||||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOASealDO;
|
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOASealDO;
|
||||||
import cn.iocoder.yudao.module.bpm.service.oa.BpmOASealService;
|
import cn.iocoder.yudao.module.bpm.service.oa.BpmOASealService;
|
||||||
|
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
||||||
|
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@ -33,6 +35,9 @@ public class BpmOASealController {
|
|||||||
@Resource
|
@Resource
|
||||||
private BpmOASealService sealService;
|
private BpmOASealService sealService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DeptApi deptApi;
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建请求申请")
|
@Operation(summary = "创建请求申请")
|
||||||
public CommonResult<Long> createSeal(@Valid @RequestBody BpmOASealCreateReqVO createReqVO) {
|
public CommonResult<Long> createSeal(@Valid @RequestBody BpmOASealCreateReqVO createReqVO) {
|
||||||
@ -47,7 +52,8 @@ public class BpmOASealController {
|
|||||||
|
|
||||||
BpmOASealDO seal = sealService.getSeal(id);
|
BpmOASealDO seal = sealService.getSeal(id);
|
||||||
|
|
||||||
return success(BpmOASealConvert.INSTANCE.convert(seal));
|
return success(BpmOASealConvert.INSTANCE.convert(seal)
|
||||||
|
.setContractCompanyName(getDept(seal.getContractCompany()).getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/getByProcessInstanceId")
|
@GetMapping("/getByProcessInstanceId")
|
||||||
@ -57,6 +63,20 @@ public class BpmOASealController {
|
|||||||
|
|
||||||
BpmOASealDO seal = sealService.getByProcessInstanceId(processInstanceId);
|
BpmOASealDO seal = sealService.getByProcessInstanceId(processInstanceId);
|
||||||
|
|
||||||
return success(BpmOASealConvert.INSTANCE.convert(seal));
|
return success(BpmOASealConvert.INSTANCE.convert(seal)
|
||||||
|
.setContractCompanyName(getDept(seal.getContractCompany()).getName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得部门信息
|
||||||
|
* @param deptId 部门id
|
||||||
|
* @return 部门信息
|
||||||
|
*/
|
||||||
|
public DeptRespDTO getDept(Long deptId) {
|
||||||
|
|
||||||
|
if (deptId == null) {
|
||||||
|
return new DeptRespDTO();
|
||||||
|
}
|
||||||
|
return deptApi.getDept(deptId).getCheckedData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,9 +33,9 @@ public class BpmOAEntryCreateReqVO {
|
|||||||
@NotNull(message = "用户昵称不能为空")
|
@NotNull(message = "用户昵称不能为空")
|
||||||
private String nickname;
|
private String nickname;
|
||||||
|
|
||||||
@Schema(description = "合同公司 | 字典值参考bpm_entry_company", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "合同公司", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotNull(message = "合同公司不能为空")
|
@NotNull(message = "合同公司不能为空")
|
||||||
private Integer contractCompany;
|
private Long contractCompany;
|
||||||
|
|
||||||
@Schema(description = "手机号码", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "手机号码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotEmpty(message = "手机号码不能为空")
|
@NotEmpty(message = "手机号码不能为空")
|
||||||
|
@ -46,9 +46,12 @@ public class BpmOAEntryRespVO extends BpmOABaseRespVO {
|
|||||||
@NotEmpty(message = "用户昵称不能为空")
|
@NotEmpty(message = "用户昵称不能为空")
|
||||||
private String nickname;
|
private String nickname;
|
||||||
|
|
||||||
@Schema(description = "合同公司 | 字典值参考bpm_entry_company", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "合同公司", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotEmpty(message = "合同公司不能为空")
|
@NotEmpty(message = "合同公司不能为空")
|
||||||
private Integer contractCompany;
|
private Long contractCompany;
|
||||||
|
|
||||||
|
@Schema(description = "合同公司名称")
|
||||||
|
private String contractCompanyName;
|
||||||
|
|
||||||
@Schema(description = "手机号码", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "手机号码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotEmpty(message = "手机号码不能为空")
|
@NotEmpty(message = "手机号码不能为空")
|
||||||
|
@ -32,6 +32,10 @@ public class BpmOASealCreateReqVO {
|
|||||||
@NotNull(message = "印章类型不能为空")
|
@NotNull(message = "印章类型不能为空")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
|
@Schema(description = "用章所属公司 | 字典值参考bpm_entry_company", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "用章所属公司不能为空")
|
||||||
|
private Long contractCompany;
|
||||||
|
|
||||||
@Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotNull(message = "文件名称不能为空")
|
@NotNull(message = "文件名称不能为空")
|
||||||
private String fileName;
|
private String fileName;
|
||||||
|
@ -31,6 +31,13 @@ public class BpmOASealRespVO extends BpmOABaseRespVO {
|
|||||||
@NotNull(message = "印章类型不能为空")
|
@NotNull(message = "印章类型不能为空")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
|
@Schema(description = "用章所属公司", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "用章所属公司不能为空")
|
||||||
|
private Long contractCompany;
|
||||||
|
|
||||||
|
@Schema(description = "用章所属公司名称")
|
||||||
|
private String contractCompanyName;
|
||||||
|
|
||||||
@Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotNull(message = "文件名称不能为空")
|
@NotNull(message = "文件名称不能为空")
|
||||||
private String fileName;
|
private String fileName;
|
||||||
|
@ -57,9 +57,9 @@ public class BpmOAEntryDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
private String nickname;
|
private String nickname;
|
||||||
/**
|
/**
|
||||||
* 合同公司 | 字典值参考bpm_entry_company
|
* 合同公司
|
||||||
*/
|
*/
|
||||||
private Integer contractCompany;
|
private Long contractCompany;
|
||||||
/**
|
/**
|
||||||
* 手机号码
|
* 手机号码
|
||||||
*/
|
*/
|
||||||
|
@ -46,6 +46,11 @@ public class BpmOASealDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用章所属公司
|
||||||
|
*/
|
||||||
|
private Long contractCompany;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用章原因
|
* 用章原因
|
||||||
*/
|
*/
|
||||||
|
@ -17,6 +17,7 @@ import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessI
|
|||||||
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*;
|
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*;
|
||||||
import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert;
|
import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert;
|
||||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAEntryDO;
|
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAEntryDO;
|
||||||
|
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOASealDO;
|
||||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceExtDO;
|
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceExtDO;
|
||||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO;
|
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO;
|
||||||
import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmProcessInstanceExtMapper;
|
import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmProcessInstanceExtMapper;
|
||||||
@ -26,6 +27,7 @@ import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService;
|
|||||||
import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService;
|
import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService;
|
||||||
import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService;
|
import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService;
|
||||||
import cn.iocoder.yudao.module.bpm.service.oa.BpmOAEntryService;
|
import cn.iocoder.yudao.module.bpm.service.oa.BpmOAEntryService;
|
||||||
|
import cn.iocoder.yudao.module.bpm.service.oa.BpmOASealService;
|
||||||
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
||||||
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
||||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||||
@ -107,6 +109,9 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
|||||||
@Resource
|
@Resource
|
||||||
private BpmOAEntryService bpmOAEntryService;
|
private BpmOAEntryService bpmOAEntryService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BpmOASealService bpmOASealService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<BpmTaskCCPageItemRespVO> getCCTaskPage(Long userId, BpmTaskDonePageReqVO pageVO) {
|
public PageResult<BpmTaskCCPageItemRespVO> getCCTaskPage(Long userId, BpmTaskDonePageReqVO pageVO) {
|
||||||
// 查询被抄送的Task
|
// 查询被抄送的Task
|
||||||
@ -482,6 +487,17 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 判断 用章流程时
|
||||||
|
if (instance.getProcessDefinitionId().contains("oa_seal")) {
|
||||||
|
|
||||||
|
BpmOASealDO sealDO = bpmOASealService.getByProcessInstanceId(instance.getProcessInstanceId());
|
||||||
|
if (sealDO != null) {
|
||||||
|
|
||||||
|
DeptRespDTO dto = deptApi.getDept(sealDO.getContractCompany()).getCheckedData();
|
||||||
|
paramMap.put("contract_company_flag", dto.getFlag()); //配置合同公司flag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ArrayList<Long> list = new ArrayList<>(postIds);
|
ArrayList<Long> list = new ArrayList<>(postIds);
|
||||||
// 只获配置的首个岗位
|
// 只获配置的首个岗位
|
||||||
Long postId = list.get(0);
|
Long postId = list.get(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user