|
@@ -1,5 +1,6 @@
|
|
package org.springblade.business.controller;
|
|
package org.springblade.business.controller;
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
@@ -15,9 +16,8 @@ import org.springblade.core.tool.api.R;
|
|
import org.springblade.core.tool.utils.Func;
|
|
import org.springblade.core.tool.utils.Func;
|
|
import org.springblade.manager.entity.ContractInfo;
|
|
import org.springblade.manager.entity.ContractInfo;
|
|
import org.springblade.manager.entity.SignPfxFile;
|
|
import org.springblade.manager.entity.SignPfxFile;
|
|
-import org.springblade.manager.feign.ContractClient;
|
|
|
|
-import org.springblade.manager.feign.EVisaConfigClient;
|
|
|
|
-import org.springblade.manager.feign.SignPfxClient;
|
|
|
|
|
|
+import org.springblade.manager.entity.WbsTreePrivate;
|
|
|
|
+import org.springblade.manager.feign.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -37,6 +37,10 @@ public class EVisaTaskCheckController {
|
|
|
|
|
|
private final SignPfxClient signPfxClient;
|
|
private final SignPfxClient signPfxClient;
|
|
|
|
|
|
|
|
+ private final SaveUserInfoByProjectClient saveUserInfoByProjectClient;
|
|
|
|
+
|
|
|
|
+ private final WbsTreePrivateClient wbsTreePrivateClient;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 检查当前审批人是否存在证书
|
|
* 检查当前审批人是否存在证书
|
|
*/
|
|
*/
|
|
@@ -70,7 +74,9 @@ public class EVisaTaskCheckController {
|
|
@ApiOperationSupport(order = 2)
|
|
@ApiOperationSupport(order = 2)
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParam(name = "flowId", value = "所选的流程ID", required = true),
|
|
@ApiImplicitParam(name = "flowId", value = "所选的流程ID", required = true),
|
|
- @ApiImplicitParam(name = "privatePKeyId", value = "表单列表中的isTypePrivatePid字段,集合形式", required = true)
|
|
|
|
|
|
+ @ApiImplicitParam(name = "contractId", value = "合同段ID", required = true),
|
|
|
|
+ @ApiImplicitParam(name = "privatePKeyId", value = "表单列表中的isTypePrivatePid字段,集合形式"),
|
|
|
|
+ @ApiImplicitParam(name = "theLogPrimaryKeyId", value = "日志左侧所选的填报类型ID")
|
|
})
|
|
})
|
|
public R<Boolean> checkFlowUserIsEVisaPermissions(@RequestBody JSONObject json){
|
|
public R<Boolean> checkFlowUserIsEVisaPermissions(@RequestBody JSONObject json){
|
|
if(json.containsKey("flowId")){
|
|
if(json.containsKey("flowId")){
|
|
@@ -79,9 +85,27 @@ public class EVisaTaskCheckController {
|
|
|
|
|
|
//获取这些人当前合同段下的权限
|
|
//获取这些人当前合同段下的权限
|
|
List<Long> linkUserList = flowLink.stream().map(FixedFlowLink::getFixedFlowLinkUser).distinct().collect(Collectors.toList());
|
|
List<Long> linkUserList = flowLink.stream().map(FixedFlowLink::getFixedFlowLinkUser).distinct().collect(Collectors.toList());
|
|
|
|
+ List<JSONObject> userRoleList = this.saveUserInfoByProjectClient.queryUserContractRole(linkUserList, json.getString("contractId"));
|
|
|
|
|
|
//获取对应表格的所有电签配置
|
|
//获取对应表格的所有电签配置
|
|
- List<JSONObject> jsonList = this.eVisaConfigClient.queryEVisaConfigAllByTableIds(json.getJSONArray("privatePKeyId").toJavaList(String.class));
|
|
|
|
|
|
+ List<JSONObject> jsonList;
|
|
|
|
+ if(json.containsKey("theLogPrimaryKeyId") && StringUtils.isNotEmpty(json.getString("theLogPrimaryKeyId"))){
|
|
|
|
+ //日志,需要先获取对应的表格
|
|
|
|
+ List<WbsTreePrivate> privateTreeList = this.wbsTreePrivateClient.queryExcelTableByParentId(this.wbsTreePrivateClient.queryByPKeyIds(Func.toStrList(json.getString("theLogPrimaryKeyId"))).get(0));
|
|
|
|
+ if(privateTreeList != null && privateTreeList.size() > 0){
|
|
|
|
+ List<Long> pKeyList = privateTreeList.stream().map(WbsTreePrivate::getPKeyId).distinct().collect(Collectors.toList());
|
|
|
|
+ jsonList = this.eVisaConfigClient.queryEVisaConfigAllByTableIds(JSONArray.parseArray(JSONObject.toJSONString(pKeyList), String.class));
|
|
|
|
+ } else {
|
|
|
|
+ jsonList = null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ jsonList = this.eVisaConfigClient.queryEVisaConfigAllByTableIds(json.getJSONArray("privatePKeyId").toJavaList(String.class));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(jsonList == null){
|
|
|
|
+ return R.data(300, false, "当前表格均未配置电签关键字,请联系管理员处理");
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|