Merge remote-tracking branch 'origin/feature/REQ-3300' into feature/REQ-3300
This commit is contained in:
commit
1414b9cf7f
@ -124,16 +124,19 @@ public interface ChangeRecordApi {
|
||||
|
||||
/**
|
||||
* IM 变洽签群,“重新发起”按钮
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/api/visa/change/reDecision")
|
||||
ApiResult<Void> reDecisionChangeRecord(@Validated @RequestBody ChangeRecordButtonOperationReq req);
|
||||
|
||||
/**
|
||||
* IM 变洽签全,“发起执行”按钮
|
||||
* IM 变洽签群,“发起执行”按钮
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/api/visa/change/execute")
|
||||
ApiResult<Void> executeChangeRecord(@Validated @RequestBody ChangeRecordButtonOperationReq req);
|
||||
|
||||
}
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
package cn.axzo.nanopart.visa.api.changerecord;
|
||||
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.nanopart.visa.api.request.ChangeRecordAppendAttachReq;
|
||||
import cn.axzo.nanopart.visa.api.request.ImGroupOperationReq;
|
||||
import cn.axzo.nanopart.visa.api.request.ImGroupTipsQueryReq;
|
||||
import cn.axzo.nanopart.visa.api.request.VisaRelationReq;
|
||||
import cn.axzo.nanopart.visa.api.response.ImGroupTipsResp;
|
||||
import cn.axzo.nanopart.visa.api.request.ImGroupOperationReq;
|
||||
import cn.axzo.nanopart.visa.api.response.VisaRelationResp;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -30,4 +31,12 @@ public interface ChangeRecordRelationApi {
|
||||
@PostMapping("/api/visa/relation/im/tips")
|
||||
ApiResult<ImGroupTipsResp> queryImGroupTips(@Validated @RequestBody ImGroupTipsQueryReq req);
|
||||
|
||||
/**
|
||||
* 变洽签追加附件
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/api/visa/relation/attach/append")
|
||||
ApiResult<Void> appendAttachment(@Validated @RequestBody ChangeRecordAppendAttachReq req);
|
||||
}
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
package cn.axzo.nanopart.visa.api.request;
|
||||
|
||||
import cn.axzo.workflow.common.model.dto.UploadFieldDTO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 变洽签增加附件
|
||||
*
|
||||
* @author wangli
|
||||
* @since 2025-02-08 14:19
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ChangeRecordAppendAttachReq {
|
||||
|
||||
/**
|
||||
* 变洽签主键 ID
|
||||
*/
|
||||
@NotNull(message = "变洽签主键 ID")
|
||||
private Long visaId;
|
||||
|
||||
/**
|
||||
* 新增的附件
|
||||
*/
|
||||
private List<UploadFieldDTO> attach;
|
||||
|
||||
private Long operatorPersonId;
|
||||
|
||||
private Long operatorOuId;
|
||||
|
||||
}
|
||||
@ -2,6 +2,7 @@ package cn.axzo.nanopart.visa.server.controller;
|
||||
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.nanopart.visa.api.changerecord.ChangeRecordRelationApi;
|
||||
import cn.axzo.nanopart.visa.api.request.ChangeRecordAppendAttachReq;
|
||||
import cn.axzo.nanopart.visa.api.request.ImGroupOperationReq;
|
||||
import cn.axzo.nanopart.visa.api.request.ImGroupTipsQueryReq;
|
||||
import cn.axzo.nanopart.visa.api.request.VisaRelationReq;
|
||||
@ -45,4 +46,10 @@ public class ChangeRecordRelationController implements ChangeRecordRelationApi {
|
||||
public ApiResult<ImGroupTipsResp> queryImGroupTips(ImGroupTipsQueryReq req) {
|
||||
return ApiResult.ok(changeRecordRelationService.queryImGroupTips(req));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResult<Void> appendAttachment(ChangeRecordAppendAttachReq req) {
|
||||
changeRecordRelationService.appendAttachment(req);
|
||||
return ApiResult.ok();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package cn.axzo.nanopart.visa.server.mq.listener.im;
|
||||
|
||||
import cn.axzo.basics.common.util.AssertUtil;
|
||||
import cn.axzo.basics.profiles.dto.basic.PersonProfileDto;
|
||||
import cn.axzo.framework.rocketmq.Event;
|
||||
import cn.axzo.framework.rocketmq.EventConsumer;
|
||||
import cn.axzo.framework.rocketmq.EventHandler;
|
||||
@ -12,6 +13,7 @@ import cn.axzo.im.center.api.vo.req.GroupGetOwnerRequest;
|
||||
import cn.axzo.im.center.api.vo.req.SendChatMessageRequest;
|
||||
import cn.axzo.im.center.api.vo.resp.GroupGetOwnerResponse;
|
||||
import cn.axzo.im.center.common.enums.AppTypeEnum;
|
||||
import cn.axzo.maokai.api.vo.response.OrganizationalUnitVO;
|
||||
import cn.axzo.msg.center.service.dto.PeerPerson;
|
||||
import cn.axzo.msg.center.service.pending.request.CardSendRequest;
|
||||
import cn.axzo.nanopart.visa.api.enums.VisaConfirmBizTypeEnum;
|
||||
@ -21,6 +23,7 @@ import cn.axzo.nanopart.visa.server.domain.ChangeRecord;
|
||||
import cn.axzo.nanopart.visa.server.domain.ChangeRecordConfirm;
|
||||
import cn.axzo.nanopart.visa.server.dto.VisaConfirmDto;
|
||||
import cn.axzo.nanopart.visa.server.rpc.MsgCenterGateway;
|
||||
import cn.axzo.nanopart.visa.server.rpc.OrganizationalUnitGateway;
|
||||
import cn.axzo.nanopart.visa.server.rpc.VisaProfileGateway;
|
||||
import cn.axzo.nanopart.visa.server.service.ChangeRecordConfirmService;
|
||||
import cn.axzo.nanopart.visa.server.service.ChangeRecordService;
|
||||
@ -34,6 +37,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -61,11 +65,13 @@ public class ImGroupsCreatedEventHandler implements EventHandler, InitializingBe
|
||||
@Resource
|
||||
private RefreshableConfiguration refreshableConfiguration;
|
||||
@Resource
|
||||
private VisaProfileGateway visaProfileGateway;
|
||||
private OrganizationalUnitGateway organizationalUnitGateway;
|
||||
@Resource
|
||||
private ChangeRecordService changeRecordService;
|
||||
@Resource
|
||||
private ChangeRecordConfirmService changeRecordConfirmService;
|
||||
@Resource
|
||||
private VisaProfileGateway visaProfileGateway;
|
||||
|
||||
@Override
|
||||
public void onEvent(Event event, EventConsumer.Context context) {
|
||||
@ -100,7 +106,7 @@ public class ImGroupsCreatedEventHandler implements EventHandler, InitializingBe
|
||||
.visaId(visaId)
|
||||
.bizType(VisaConfirmBizTypeEnum.CREATE)
|
||||
.build());
|
||||
AssertUtil.notEmpty(creators, "creators is empty");
|
||||
AssertUtil.notEmpty(creators, "visa creator is null");
|
||||
|
||||
|
||||
// 发送卡片
|
||||
@ -111,14 +117,24 @@ public class ImGroupsCreatedEventHandler implements EventHandler, InitializingBe
|
||||
cardRequest.setSender(PeerPerson.create(owner.getPersonId(), owner.getPersonOuId(), ownerWorkspaceId));
|
||||
cardRequest.setImSenderAccountAppType(AppTypeEnum.CMP);
|
||||
cardRequest.setImReceiveAccounts(imReceiveAccounts);
|
||||
// TODO
|
||||
|
||||
ChangeRecordConfirm creator = creators.get(0);
|
||||
OrganizationalUnitVO unitInfo = organizationalUnitGateway.getUnitInfo(creator.getOuId());
|
||||
PersonProfileDto profile = visaProfileGateway.getProfile(creator.getPersonId());
|
||||
String amountDesc = "不变";
|
||||
if (visa.getAmountChange().compareTo(BigDecimal.ZERO) > 0) {
|
||||
amountDesc = "增加" + visa.getAmountChange().toPlainString() + "元";
|
||||
} else if (visa.getAmountChange().compareTo(BigDecimal.ZERO) < 0) {
|
||||
amountDesc = "减少" + visa.getAmountChange().toPlainString() + "元";
|
||||
}
|
||||
|
||||
cardRequest.setBizParam(new JSONObject(Maps.of(
|
||||
"topic", group.getName(),
|
||||
"reason", visa.getReason(),
|
||||
"initiatorName", creators.get(0),
|
||||
"initiatorUnitName", "",
|
||||
"initiatorName", profile.getRealName(),
|
||||
"initiatorUnitName", unitInfo.getName(),
|
||||
"visaType", VisaTypeEnum.valueOfCode(visaType).getDesc(),
|
||||
"amountChange", ""
|
||||
"amountChange", amountDesc
|
||||
)));
|
||||
msgCenterGateway.sendCardToCroup(cardRequest);
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* 添加处理变洽签日志的逻辑
|
||||
*
|
||||
* @author wangli
|
||||
* @since 2025-02-08 11:18
|
||||
@ -21,6 +21,7 @@ import org.springframework.stereotype.Component;
|
||||
public class ChangeRecordLogEventHandle implements EventHandler, InitializingBean {
|
||||
private final EventConsumer eventConsumer;
|
||||
private final ChangeRecordLogService changeRecordLogService;
|
||||
|
||||
@Override
|
||||
public void onEvent(Event event, EventConsumer.Context context) {
|
||||
VisaChangeLogPayload log = event.normalizedData(VisaChangeLogPayload.class);
|
||||
@ -28,7 +29,7 @@ public class ChangeRecordLogEventHandle implements EventHandler, InitializingBea
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
eventConsumer.registerHandler(MQEventEnum.VISA_CHANGE_LOG.getEventCode(), this);
|
||||
public void afterPropertiesSet() {
|
||||
eventConsumer.registerHandler(MQEventEnum.VISA_CHANGE_LOG.getEventCode(), this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,6 +25,14 @@ public class OrganizationalUnitGateway {
|
||||
|
||||
private final OrganizationalUnitApi organizationalUnitApi;
|
||||
|
||||
@MethodAroundLog(target = "maokai", source = "nanopart", value = "获取单位信息")
|
||||
public OrganizationalUnitVO getUnitInfo(Long unitId) {
|
||||
ApiResult<OrganizationalUnitVO> unitResponse = organizationalUnitApi.getById(unitId);
|
||||
if (unitResponse.isSuccess() && Objects.nonNull(unitResponse.getData())) {
|
||||
return unitResponse.getData();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* 获取单位集合
|
||||
*/
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package cn.axzo.nanopart.visa.server.rpc;
|
||||
|
||||
import cn.axzo.pokonyan.util.RpcUtil;
|
||||
import cn.axzo.workflow.common.model.request.bpmn.process.BpmnProcessInstanceAbortDTO;
|
||||
import cn.axzo.workflow.common.model.request.bpmn.process.BpmnProcessInstanceCheckApproverDTO;
|
||||
import cn.axzo.workflow.common.model.request.bpmn.process.BpmnProcessInstanceCreateDTO;
|
||||
import cn.axzo.workflow.common.model.request.form.instance.FormVariablesUpdateDTO;
|
||||
import cn.axzo.workflow.starter.api.WorkflowCoreService;
|
||||
import cn.axzo.workflow.starter.api.WorkflowManageService;
|
||||
import cn.azxo.framework.common.logger.MethodAroundLog;
|
||||
@ -48,4 +48,8 @@ public class WorkflowGateway {
|
||||
|
||||
}
|
||||
|
||||
@MethodAroundLog(target = "workflow-engine", source = "nanopart", value = "更新指定流程表单最后一次编辑的内容")
|
||||
public Boolean updateInstanceFormData(FormVariablesUpdateDTO dto) {
|
||||
return workflowCoreService.updateInstanceFormVariables(dto);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package cn.axzo.nanopart.visa.server.service;
|
||||
|
||||
import cn.axzo.nanopart.visa.api.enums.VisaRelationFieldEnum;
|
||||
import cn.axzo.nanopart.visa.api.request.ChangeRecordAppendAttachReq;
|
||||
import cn.axzo.nanopart.visa.api.request.ImGroupOperationClearReq;
|
||||
import cn.axzo.nanopart.visa.api.request.ImGroupOperationReq;
|
||||
import cn.axzo.nanopart.visa.api.request.ImGroupTipsQueryReq;
|
||||
@ -33,6 +34,7 @@ public interface ChangeRecordRelationService extends IService<ChangeRecordRelati
|
||||
List<ChangeRecordRelation> findByVisaAndVarName(Long visaId, String varName);
|
||||
|
||||
boolean deleteByVisaId(Long visaId, List<VisaRelationFieldEnum> relationTypes);
|
||||
|
||||
/**
|
||||
* IM 群聊中,保存 IM 用户操作横条的人
|
||||
*
|
||||
@ -43,6 +45,7 @@ public interface ChangeRecordRelationService extends IService<ChangeRecordRelati
|
||||
|
||||
/**
|
||||
* IM 群聊中,群主操作重新发起,清空所有人的操作信息
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@ -55,4 +58,11 @@ public interface ChangeRecordRelationService extends IService<ChangeRecordRelati
|
||||
* @return
|
||||
*/
|
||||
ImGroupTipsResp queryImGroupTips(ImGroupTipsQueryReq req);
|
||||
|
||||
/**
|
||||
* 追加附件
|
||||
*
|
||||
* @param req
|
||||
*/
|
||||
void appendAttachment(ChangeRecordAppendAttachReq req);
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import cn.axzo.nanopart.visa.api.enums.VisaButtonTypeEnum;
|
||||
import cn.axzo.nanopart.visa.api.enums.VisaRelationFieldEnum;
|
||||
import cn.axzo.nanopart.visa.api.enums.VisaRelationVarTypeEnum;
|
||||
import cn.axzo.nanopart.visa.api.enums.VisaStatusEnum;
|
||||
import cn.axzo.nanopart.visa.api.request.ChangeRecordAppendAttachReq;
|
||||
import cn.axzo.nanopart.visa.api.request.ImGroupOperationClearReq;
|
||||
import cn.axzo.nanopart.visa.api.request.ImGroupOperationReq;
|
||||
import cn.axzo.nanopart.visa.api.request.ImGroupTipsQueryReq;
|
||||
@ -23,8 +24,10 @@ import cn.axzo.nanopart.visa.server.dto.VisaRelationDto;
|
||||
import cn.axzo.nanopart.visa.server.mapper.ChangeRecordRelationDao;
|
||||
import cn.axzo.nanopart.visa.server.rpc.MsgCenterGateway;
|
||||
import cn.axzo.nanopart.visa.server.rpc.VisaProfileGateway;
|
||||
import cn.axzo.nanopart.visa.server.rpc.WorkflowGateway;
|
||||
import cn.axzo.nanopart.visa.server.service.ChangeRecordRelationService;
|
||||
import cn.axzo.nanopart.visa.server.service.ChangeRecordService;
|
||||
import cn.axzo.workflow.common.model.request.form.instance.FormVariablesUpdateDTO;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -33,6 +36,7 @@ import com.google.common.collect.Sets;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.groovy.util.Maps;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
@ -43,9 +47,11 @@ import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static cn.axzo.nanopart.visa.api.constant.VisaConstant.FORM_FIELD_ATTACH;
|
||||
import static cn.axzo.nanopart.visa.api.constant.VisaConstant.IM_GROUP_BIZ_INFO_VISA_ID;
|
||||
import static cn.axzo.nanopart.visa.api.constant.VisaConstant.IM_GROUP_OWNER_TIPS;
|
||||
import static cn.axzo.nanopart.visa.api.constant.VisaConstant.IM_GROUP_PARTICIPATE_TIPS;
|
||||
import static cn.axzo.workflow.common.enums.BpmnProcessInstanceResultEnum.PROCESSING;
|
||||
|
||||
/**
|
||||
* @author xudawei
|
||||
@ -59,6 +65,7 @@ public class ChangeRecordRelationServiceImpl extends ServiceImpl<ChangeRecordRel
|
||||
private final ChangeRecordService changeRecordService;
|
||||
private final VisaProfileGateway visaProfileGateway;
|
||||
private final MsgCenterGateway msgCenterGateway;
|
||||
private final WorkflowGateway workflowGateway;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@ -286,4 +293,42 @@ public class ChangeRecordRelationServiceImpl extends ServiceImpl<ChangeRecordRel
|
||||
resp.setButtonList(buttons);
|
||||
return resp;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void appendAttachment(ChangeRecordAppendAttachReq req) {
|
||||
ChangeRecord visa = changeRecordService.getById(req.getVisaId());
|
||||
AssertUtil.isTrue(Objects.equals(VisaStatusEnum.APPROVING, visa.getStatus())
|
||||
|| Objects.equals(VisaStatusEnum.COMPLETED, visa.getStatus()), "当前单据状态下不允许操作");
|
||||
|
||||
AssertUtil.notNull(visa, "变洽签单据不存在");
|
||||
List<ChangeRecordRelation> existsAttach = findByCondition(VisaRelationDto.builder()
|
||||
.visaId(req.getVisaId())
|
||||
.varName(VisaRelationFieldEnum.ATTACHMENT.name())
|
||||
.build());
|
||||
AssertUtil.isTrue(existsAttach.size() < 30, "已达到附件数量限制");
|
||||
AssertUtil.isTrue(existsAttach.size() + req.getAttach().size() <= 30, "新增的附件数量超过限制");
|
||||
|
||||
List<ChangeRecordRelation> attach = req.getAttach().stream()
|
||||
.map(item -> {
|
||||
ChangeRecordRelation changeRecordRelation = new ChangeRecordRelation();
|
||||
changeRecordRelation.setVisaId(req.getVisaId());
|
||||
changeRecordRelation.setVarName(VisaRelationFieldEnum.ATTACHMENT.name());
|
||||
changeRecordRelation.setVarType(VisaRelationVarTypeEnum.JSON.getType());
|
||||
changeRecordRelation.setContent(JSON.toJSONString(item));
|
||||
changeRecordRelation.setCreateBy(req.getOperatorPersonId());
|
||||
changeRecordRelation.setUpdateBy(req.getOperatorPersonId());
|
||||
return changeRecordRelation;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
saveBatch(attach);
|
||||
|
||||
if (Objects.equals(PROCESSING.getStatus(), visa.getApprovalStatus())) {
|
||||
FormVariablesUpdateDTO formUpdateDto = new FormVariablesUpdateDTO();
|
||||
formUpdateDto.setProcessInstanceId(visa.getApprovalId());
|
||||
formUpdateDto.setFormVariables(Maps.of(FORM_FIELD_ATTACH, req.getAttach()));
|
||||
workflowGateway.updateInstanceFormData(formUpdateDto);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -871,13 +871,16 @@ public class ChangeRecordServiceImpl extends ServiceImpl<ChangeRecordDao, Change
|
||||
.needJob(true)
|
||||
.needNode(true)
|
||||
.needUnit(true)
|
||||
.needProfile(true)
|
||||
// 考虑发起人离职、退场情况,故加上该参数
|
||||
.containsExited(true)
|
||||
.build();
|
||||
List<OrgNodeUserBriefInfoResp> nodeUserResp = nodeUserGateway.listOrgNodeUsers(nodeUserReq);
|
||||
if (CollectionUtils.isEmpty(nodeUserResp)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
// Map<personId,OrgNodeUserBriefInfoResp>
|
||||
return nodeUserResp.stream().collect(Collectors.toMap(OrgNodeUserBriefInfoResp::getPersonId, Function.identity()));
|
||||
return nodeUserResp.stream().collect(Collectors.toMap(OrgNodeUserBriefInfoResp::getPersonId, Function.identity(), (v1, v2) -> v1));
|
||||
}
|
||||
|
||||
private static VisaChangeInitiatorResp buildInitiatorResp(Map<Long, OrgNodeUserBriefInfoResp> initiatorMap, ChangeRecordConfirm i) {
|
||||
@ -886,12 +889,13 @@ public class ChangeRecordServiceImpl extends ServiceImpl<ChangeRecordDao, Change
|
||||
.ouId(i.getOuId());
|
||||
OrgNodeUserBriefInfoResp initiator = initiatorMap.get(i.getPersonId());
|
||||
if (Objects.isNull(initiator)) {
|
||||
log.error("获取发起人: {} 信息失败", i.getPersonId());
|
||||
// 发起人可能已退场
|
||||
log.warn("获取发起人: {} 信息失败", i.getPersonId());
|
||||
return initiatorBuilder.build();
|
||||
}
|
||||
return initiatorBuilder
|
||||
.name(initiator.getRealName())
|
||||
.avatar(initiator.getRealName())
|
||||
.avatar(initiator.getProfile().getAvatarUrl())
|
||||
.jobId(initiator.getOrganizationalJobId())
|
||||
.jobName(initiator.getOrganizationalJobName())
|
||||
.jobCode(initiator.getOrganizationalJobCode())
|
||||
@ -1233,7 +1237,19 @@ public class ChangeRecordServiceImpl extends ServiceImpl<ChangeRecordDao, Change
|
||||
createReq.setOperatorOuId(req.getOperatorOuId());
|
||||
createReq.setOperatorPersonId(req.getOperatorPersonId());
|
||||
createReq.setRelationWorkspaceId(req.getOperatorWorkspaceId());
|
||||
createProcessInstance(createReq, req.getVisaId());
|
||||
String processInstanceId = createProcessInstance(createReq, req.getVisaId());
|
||||
|
||||
// 更新主表中的审批字段,记录变量表的审批的信息
|
||||
updateApprovalInfo(visa.getId(), processInstanceId);
|
||||
|
||||
// 更新主表状态
|
||||
changeStatus(ChangeStatusRequest.builder()
|
||||
.visaId(visa.getId())
|
||||
.updateStatus(VisaStatusEnum.APPROVING)
|
||||
.personId(req.getOperatorPersonId())
|
||||
.ouId(req.getOperatorOuId())
|
||||
.workspaceId(req.getOperatorWorkspaceId())
|
||||
.build());
|
||||
return req.getVisaId();
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user