关键控制点js补交,以及权限申请代码优化
This commit is contained in:
parent
11d759b1b2
commit
1a79ec6256
@ -150,7 +150,7 @@ public class Plugins implements PluginListener {
|
||||
// 注册AT公式
|
||||
list.add(new AtFormulaPluginProfile("根据发布部门返回应发送发布人员账号", "@SendPublishMessage(*depName)", SendPublisherMessageAt.class.getName(), "返回发送发布人员账号", "返回发送发布人员账号"));
|
||||
|
||||
list.add(new AtFormulaPluginProfile("根据流程填写情况获取文件发布部门文件管理员", "@GetPublisherAdminAt(*applyType,*applyMothod,*publishDept)", GetPublisherAdminAt.class.getName(), "返回发布部门文件管理员账号", "返回发布部门文件管理员账号"));
|
||||
list.add(new AtFormulaPluginProfile("根据流程填写情况获取文件发布部门文件管理员", "@GetPublisherAdminAt(*publishDept,*userType)", GetPublisherAdminAt.class.getName(), "返回发布部门文件管理员账号", "返回发布部门文件管理员账号"));
|
||||
|
||||
list.add(new AtFormulaPluginProfile("根据发布人部门获取角色账号", "@getRole(*orgdepart)", getRoleAt.class.getName(), "根据发布人部门获取角色账号", "根据发布人部门获取角色账号"));
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.actionsoft.apps.coe.pal.publisher.at;
|
||||
|
||||
import com.actionsoft.bpms.commons.at.AbstExpression;
|
||||
import com.actionsoft.bpms.commons.at.ExpressionContext;
|
||||
import com.actionsoft.bpms.commons.database.RowMap;
|
||||
import com.actionsoft.bpms.org.cache.DepartmentCache;
|
||||
import com.actionsoft.bpms.org.model.DepartmentModel;
|
||||
import com.actionsoft.bpms.util.DBSql;
|
||||
@ -19,44 +20,32 @@ public class GetPublisherAdminAt extends AbstExpression {
|
||||
@Override
|
||||
public String execute(String expression){
|
||||
// 获取发送部门
|
||||
String applyType = getParameter(expression, 1);//申请类型
|
||||
String applyMothod = getParameter(expression, 2);//批量申请方式
|
||||
String publishDept = getParameter(expression, 3);//批量申请部门
|
||||
String dyPublishDept = getParameter(expression, 4);//单一申请部门
|
||||
String publishDept = getParameter(expression, 1);//批量申请部门
|
||||
String userType = getParameter(expression, 2);//获取人员类型 1.流程校对人,2流程经理
|
||||
StringBuilder resultUser=new StringBuilder();
|
||||
ORGAPI orgapi = SDK.getORGAPI();
|
||||
if(applyType.equals("单一权限申请")){
|
||||
String[] deptIds = dyPublishDept.split(",");
|
||||
for (String deptId : deptIds) {
|
||||
getPublisher(orgapi,deptId,resultUser);
|
||||
}
|
||||
}else if(applyType.equals("批量权限申请")){
|
||||
if(applyMothod.equals("按流程架构申请")){
|
||||
resultUser.append("10036614 00116580");//默认芦娟和付仪伟
|
||||
}else if(applyMothod.equals("按发布部门申请")){
|
||||
String[] deptIds = publishDept.split(",");
|
||||
for (String deptId : deptIds) {
|
||||
getPublisher(orgapi,deptId,resultUser);
|
||||
}
|
||||
}
|
||||
String[] deptIds = publishDept.split(",");
|
||||
for (String deptId : deptIds) {
|
||||
getPublisher(orgapi,deptId,userType,resultUser);
|
||||
}
|
||||
return resultUser.toString();
|
||||
}
|
||||
|
||||
public void getPublisher(ORGAPI orgapi,String deptId,StringBuilder resultUser){
|
||||
public void getPublisher(ORGAPI orgapi,String deptId,String userType,StringBuilder resultUser){
|
||||
DepartmentModel model = orgapi.getDepartmentById(deptId);
|
||||
String querySql = "";
|
||||
if(SDK.getConfAPI().isOracle()){
|
||||
querySql = " SELECT DEAPRTMNUM || ' ' || PROCESSMNUMBER AS PROCESSNUMBER FROM BO_ACT_PROCESSMANAGER WHERE ORGDEPART = ?";
|
||||
}else{
|
||||
querySql = " SELECT CONCAT(DEAPRTMNUM, ' ', PROCESSMNUMBER) AS PROCESSNUMBER FROM BO_ACT_PROCESSMANAGER WHERE ORGDEPART = ?";
|
||||
String querySql = "SELECT DEAPRTMNUM,PROCESSMNUMBER FROM BO_ACT_PROCESSMANAGER WHERE ORGDEPART = ?";
|
||||
RowMap map = DBSql.getMap(querySql, new Object[]{model.getName()});
|
||||
if(null!=map){
|
||||
if(userType.equals("1")){//流程校对人
|
||||
resultUser.append(" ").append(map.getString("DEAPRTMNUM"));
|
||||
}else{
|
||||
resultUser.append(" ").append(map.getString("PROCESSMNUMBER"));
|
||||
}
|
||||
}
|
||||
String result = DBSql.getString(querySql, new Object[]{model.getName()});
|
||||
resultUser.append(" ").append(result);
|
||||
List<DepartmentModel> subDepartments = orgapi.getSubDepartments(deptId);
|
||||
if(!subDepartments.isEmpty()){
|
||||
for (DepartmentModel subDepartment : subDepartments) {
|
||||
getPublisher(orgapi,subDepartment.getId(),resultUser);
|
||||
getPublisher(orgapi,subDepartment.getId(),userType,resultUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2246,6 +2246,29 @@ function updateAttributeById(objId, va, shapeId) {
|
||||
"cmd": "com.actionsoft.apps.coe.pal_pl_repository_designer_message"
|
||||
}];
|
||||
}
|
||||
var isCriticalControlPoint="否";
|
||||
attributesJsonArray.forEach(obj => {
|
||||
// 检查id是否匹配
|
||||
if (obj.id === 'isCriticalControlPoint') {
|
||||
isCriticalControlPoint = obj.value;
|
||||
}
|
||||
});
|
||||
if(isCriticalControlPoint === "是"){
|
||||
//增加右下角图表显示
|
||||
var dataArray = [
|
||||
{
|
||||
"horizontal": "right",
|
||||
"verity": "bottom",
|
||||
"showType": "icon",
|
||||
"iconContent": "|#D81E06"
|
||||
}
|
||||
|
||||
];
|
||||
shape.dataAttributes[13]["dataShowConfig"].config = dataArray;
|
||||
}else{
|
||||
//删除右下角图表
|
||||
shape.dataAttributes[13]["dataShowConfig"].config = [];
|
||||
}
|
||||
Model.update(shape);
|
||||
}
|
||||
}
|
||||
@ -2262,17 +2285,12 @@ function updateArrayByControlPoint(attributesJsonArray){
|
||||
});
|
||||
attributesJsonArray.forEach(obj => {
|
||||
if(isCriticalControlPoint === "是"){
|
||||
if(obj.id ==="controlDesc"){
|
||||
obj.isRequired = true;
|
||||
}
|
||||
if(obj.id ==="mappingRiskDescription"){
|
||||
if(obj.id ==="controlDesc" || obj.id ==="mappingRiskDescription"){
|
||||
obj.isRequired = true;
|
||||
}
|
||||
|
||||
}else{
|
||||
if(obj.id ==="controlDesc"){
|
||||
obj.isRequired = false;
|
||||
}
|
||||
if(obj.id ==="mappingRiskDescription"){
|
||||
if(obj.id ==="controlDesc" || obj.id ==="mappingRiskDescription"){
|
||||
obj.isRequired = false;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user