|
@@ -18,6 +18,8 @@ import org.springblade.manager.entity.ContractInfo;
|
|
import org.springblade.manager.entity.SignPfxFile;
|
|
import org.springblade.manager.entity.SignPfxFile;
|
|
import org.springblade.manager.entity.WbsTreePrivate;
|
|
import org.springblade.manager.entity.WbsTreePrivate;
|
|
import org.springblade.manager.feign.*;
|
|
import org.springblade.manager.feign.*;
|
|
|
|
+import org.springblade.system.user.entity.User;
|
|
|
|
+import org.springblade.system.user.feign.IUserClient;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -41,6 +43,8 @@ public class EVisaTaskCheckController {
|
|
|
|
|
|
private final WbsTreePrivateClient wbsTreePrivateClient;
|
|
private final WbsTreePrivateClient wbsTreePrivateClient;
|
|
|
|
|
|
|
|
+ private final IUserClient userClient;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 检查当前审批人是否存在证书
|
|
* 检查当前审批人是否存在证书
|
|
*/
|
|
*/
|
|
@@ -106,10 +110,21 @@ public class EVisaTaskCheckController {
|
|
if(jsonList == null){
|
|
if(jsonList == null){
|
|
return R.data(300, false, "当前表格均未配置电签关键字,请联系管理员处理");
|
|
return R.data(300, false, "当前表格均未配置电签关键字,请联系管理员处理");
|
|
}
|
|
}
|
|
|
|
+ //汇总电签配置的审批角色
|
|
|
|
+ List<String> eVisaRoleList = jsonList.stream().map(jsonObject -> jsonObject.getString("sigRoleId")).distinct().collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ //循环审批人的角色集合,并判断电签配置中是否含有这个角色
|
|
|
|
+ for(JSONObject userRole : userRoleList){
|
|
|
|
+ if(!eVisaRoleList.contains(userRole.getString("roleId"))){
|
|
|
|
+ User user = this.userClient.userInfoById(userRole.getLong("userId")).getData();
|
|
|
|
+ return R.data(300, false, "所选流程中的用户【" + user.getRealName() + "】不具有相关审批角色,请联系管理员处理或更换审批流程");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ return R.data(200, true, "满足上报条件");
|
|
}
|
|
}
|
|
|
|
|
|
- return null;
|
|
|
|
|
|
+ return R.data(300, false, "未找到对应流程,请重新选择");
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|