|
@@ -4,26 +4,25 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.dragoninfo.dcuc.common.entity.ApiResult;
|
|
|
import com.dragoninfo.dcuc.common.entity.ApiSearchReq;
|
|
|
-import com.dragoninfo.dcuc.common.entity.Proofs;
|
|
|
import com.dragoninfo.dcuc.common.utils.ResponseUtil;
|
|
|
import com.dragoninfo.dcuc.common.utils.SearchableUtil;
|
|
|
+import com.dragoninfo.dcuc.common.utils.SecurityUserUtil;
|
|
|
import com.dragoninfo.dcuc.duceap.enums.ManageDisposeTypeEnum;
|
|
|
import com.dragonsoft.dcuc.approve.business.IApproveBusiness;
|
|
|
-import com.dragonsoft.dcuc.approve.business.external.IDcucBusiness;
|
|
|
+import com.dragonsoft.dcuc.approve.business.IApproveCommonBusiness;
|
|
|
import com.dragonsoft.dcuc.approve.business.IWorkFlowBusiness;
|
|
|
-import com.dragonsoft.dcuc.approve.model.dto.OperateReqDTO;
|
|
|
+import com.dragonsoft.dcuc.approve.business.external.IDcucBusiness;
|
|
|
import com.dragonsoft.dcuc.approve.enumresources.*;
|
|
|
-import com.dragonsoft.dcuc.approve.model.dto.ApprovalInfoDTO;
|
|
|
import com.dragonsoft.dcuc.approve.model.ApproveRecordInfo;
|
|
|
+import com.dragonsoft.dcuc.approve.model.dto.ApprovalInfoDTO;
|
|
|
+import com.dragonsoft.dcuc.approve.model.dto.OperateReqDTO;
|
|
|
+import com.dragonsoft.dcuc.approve.model.dto.TaskRequestUserInfoDTO;
|
|
|
import com.dragonsoft.dcuc.approve.model.req.*;
|
|
|
import com.dragonsoft.dcuc.approve.model.req.v2.ApproveOperateV2ReqVO;
|
|
|
import com.dragonsoft.dcuc.approve.model.resp.*;
|
|
|
import com.dragonsoft.dcuc.approve.model.vo.ApproveTaskRequestVo;
|
|
|
-import com.dragonsoft.dcuc.approve.model.dto.TaskRequestUserInfoDTO;
|
|
|
import com.dragonsoft.dcuc.approve.model.vo.dcuc.OauthUserVO;
|
|
|
import com.dragonsoft.dcuc.approve.service.IApproveRecordService;
|
|
|
-import com.dragonsoft.dcuc.approve.business.IApproveCommonBusiness;
|
|
|
-import com.dragonsoft.dcuc.approve.threadlocal.ThreadLocalProofsHolder;
|
|
|
import com.dragonsoft.duceap.base.entity.http.ResponseDTO;
|
|
|
import com.dragonsoft.duceap.base.entity.http.ResponseStatus;
|
|
|
import com.dragonsoft.duceap.base.entity.security.BaseSecurityUser;
|
|
@@ -73,9 +72,10 @@ public class ApiV2ApproveFacade implements IApiV2ApproveFacade {
|
|
|
|
|
|
@Override
|
|
|
public ResponseDTO<String> approveAuthorities(ApprovalInfoAuthReqVO approvalInfoAuthReqVO) {
|
|
|
- Proofs proofs = ThreadLocalProofsHolder.getProofs();
|
|
|
- String idcard = proofs.getIdcard();
|
|
|
- String appCode = proofs.getAppCode();
|
|
|
+
|
|
|
+ BaseSecurityUser currentUser = UserContextUtils.getCurrentUser();
|
|
|
+ String idcard = currentUser.getIdcard();
|
|
|
+ String appCode = SecurityUserUtil.getSecurityAppCode();
|
|
|
if (StrUtil.isBlank(idcard) || StrUtil.isBlank(appCode)) {
|
|
|
return ResponseUtil.dtoFail("请传入凭据");
|
|
|
}
|
|
@@ -137,9 +137,10 @@ public class ApiV2ApproveFacade implements IApiV2ApproveFacade {
|
|
|
|
|
|
@Override
|
|
|
public ResponseStatus updateApprovesAuthorities(ApprovalInfoAuthUpdateReqVO approvalInfoAuthUpdateReqVO) {
|
|
|
- Proofs proofs = ThreadLocalProofsHolder.getProofs();
|
|
|
- String idcard = proofs.getIdcard();
|
|
|
- String appCode = proofs.getAppCode();
|
|
|
+
|
|
|
+ BaseSecurityUser currentUser = UserContextUtils.getCurrentUser();
|
|
|
+ String idcard = currentUser.getIdcard();
|
|
|
+ String appCode = SecurityUserUtil.getSecurityAppCode();
|
|
|
if (StrUtil.isBlank(idcard) || StrUtil.isBlank(appCode)) {
|
|
|
return ResponseStatus.fail("请传入凭据");
|
|
|
}
|
|
@@ -194,9 +195,10 @@ public class ApiV2ApproveFacade implements IApiV2ApproveFacade {
|
|
|
|
|
|
@Override
|
|
|
public ApiResult approvesSearch(ApiSearchReq apiSearchReq) {
|
|
|
- Proofs proofs = ThreadLocalProofsHolder.getProofs();
|
|
|
- String idcard = proofs.getIdcard();
|
|
|
- String appCode = proofs.getAppCode();
|
|
|
+
|
|
|
+ BaseSecurityUser currentUser = UserContextUtils.getCurrentUser();
|
|
|
+ String idcard = currentUser.getIdcard();
|
|
|
+ String appCode = SecurityUserUtil.getSecurityAppCode();
|
|
|
if (StrUtil.isBlank(idcard) || StrUtil.isBlank(appCode)) {
|
|
|
return ApiResult.setFailMessage("请传入凭据");
|
|
|
}
|
|
@@ -252,9 +254,10 @@ public class ApiV2ApproveFacade implements IApiV2ApproveFacade {
|
|
|
|
|
|
@Override
|
|
|
public ResponseStatus recallApprove(String approveNo) {
|
|
|
- Proofs proofs = ThreadLocalProofsHolder.getProofs();
|
|
|
- String idcard = proofs.getIdcard();
|
|
|
- String appCode = proofs.getAppCode();
|
|
|
+
|
|
|
+ BaseSecurityUser currentUser = UserContextUtils.getCurrentUser();
|
|
|
+ String idcard = currentUser.getIdcard();
|
|
|
+ String appCode = SecurityUserUtil.getSecurityAppCode();
|
|
|
if (StrUtil.isBlank(idcard) || StrUtil.isBlank(appCode)) {
|
|
|
return ResponseStatus.fail("请传入凭据");
|
|
|
}
|
|
@@ -302,9 +305,10 @@ public class ApiV2ApproveFacade implements IApiV2ApproveFacade {
|
|
|
|
|
|
@Override
|
|
|
public ResponseStatus deleteApprove(String approveNo) {
|
|
|
- Proofs proofs = ThreadLocalProofsHolder.getProofs();
|
|
|
- String idcard = proofs.getIdcard();
|
|
|
- String appCode = proofs.getAppCode();
|
|
|
+
|
|
|
+ BaseSecurityUser currentUser = UserContextUtils.getCurrentUser();
|
|
|
+ String idcard = currentUser.getIdcard();
|
|
|
+ String appCode = SecurityUserUtil.getSecurityAppCode();
|
|
|
if (StrUtil.isBlank(idcard) || StrUtil.isBlank(appCode)) {
|
|
|
return ResponseStatus.fail("请传入凭据");
|
|
|
}
|
|
@@ -331,9 +335,10 @@ public class ApiV2ApproveFacade implements IApiV2ApproveFacade {
|
|
|
|
|
|
@Override
|
|
|
public ResponseDTO<List<ApproveCommentVo>> approveComments(String approveNo) {
|
|
|
- Proofs proofs = ThreadLocalProofsHolder.getProofs();
|
|
|
- String idcard = proofs.getIdcard();
|
|
|
- String appCode = proofs.getAppCode();
|
|
|
+
|
|
|
+ BaseSecurityUser currentUser = UserContextUtils.getCurrentUser();
|
|
|
+ String idcard = currentUser.getIdcard();
|
|
|
+ String appCode = SecurityUserUtil.getSecurityAppCode();
|
|
|
if (StrUtil.isBlank(idcard) || StrUtil.isBlank(appCode)) {
|
|
|
return ResponseUtil.dtoFail("请传入凭据");
|
|
|
}
|
|
@@ -355,9 +360,10 @@ public class ApiV2ApproveFacade implements IApiV2ApproveFacade {
|
|
|
|
|
|
@Override
|
|
|
public ResponseDTO<TraceProcessAndOverVo> processPic(String approveNo) {
|
|
|
- Proofs proofs = ThreadLocalProofsHolder.getProofs();
|
|
|
- String idcard = proofs.getIdcard();
|
|
|
- String appCode = proofs.getAppCode();
|
|
|
+
|
|
|
+ BaseSecurityUser currentUser = UserContextUtils.getCurrentUser();
|
|
|
+ String idcard = currentUser.getIdcard();
|
|
|
+ String appCode = SecurityUserUtil.getSecurityAppCode();
|
|
|
if (StrUtil.isBlank(idcard) || StrUtil.isBlank(appCode)) {
|
|
|
return ResponseUtil.dtoFail("请传入凭据");
|
|
|
}
|
|
@@ -380,9 +386,10 @@ public class ApiV2ApproveFacade implements IApiV2ApproveFacade {
|
|
|
|
|
|
@Override
|
|
|
public ResponseDTO<ActivityNodeInfoVo> processPicDetail(String approveNo, String taskDefinitionCode, String statusType) {
|
|
|
- Proofs proofs = ThreadLocalProofsHolder.getProofs();
|
|
|
- String idcard = proofs.getIdcard();
|
|
|
- String appCode = proofs.getAppCode();
|
|
|
+
|
|
|
+ BaseSecurityUser currentUser = UserContextUtils.getCurrentUser();
|
|
|
+ String idcard = currentUser.getIdcard();
|
|
|
+ String appCode = SecurityUserUtil.getSecurityAppCode();
|
|
|
if (StrUtil.isBlank(idcard) || StrUtil.isBlank(appCode)) {
|
|
|
return ResponseUtil.dtoFail("请传入凭据");
|
|
|
}
|
|
@@ -404,9 +411,10 @@ public class ApiV2ApproveFacade implements IApiV2ApproveFacade {
|
|
|
|
|
|
@Override
|
|
|
public ResponseDTO<List<ProcessStatusVo>> processStatus(String approveNo) {
|
|
|
- Proofs proofs = ThreadLocalProofsHolder.getProofs();
|
|
|
- String idcard = proofs.getIdcard();
|
|
|
- String appCode = proofs.getAppCode();
|
|
|
+
|
|
|
+ BaseSecurityUser currentUser = UserContextUtils.getCurrentUser();
|
|
|
+ String idcard = currentUser.getIdcard();
|
|
|
+ String appCode = SecurityUserUtil.getSecurityAppCode();
|
|
|
if (StrUtil.isBlank(idcard) || StrUtil.isBlank(appCode)) {
|
|
|
return ResponseUtil.dtoFail("请传入凭据");
|
|
|
}
|
|
@@ -429,9 +437,10 @@ public class ApiV2ApproveFacade implements IApiV2ApproveFacade {
|
|
|
|
|
|
@Override
|
|
|
public ResponseDTO<TaskOperateRespVO> approveOperateType(String approveNo, String pageType) {
|
|
|
- Proofs proofs = ThreadLocalProofsHolder.getProofs();
|
|
|
- String idcard = proofs.getIdcard();
|
|
|
- String appCode = proofs.getAppCode();
|
|
|
+
|
|
|
+ BaseSecurityUser currentUser = UserContextUtils.getCurrentUser();
|
|
|
+ String idcard = currentUser.getIdcard();
|
|
|
+ String appCode = SecurityUserUtil.getSecurityAppCode();
|
|
|
if (StrUtil.isBlank(idcard) || StrUtil.isBlank(appCode)) {
|
|
|
return ResponseUtil.dtoFail("请传入凭据");
|
|
|
}
|