岗位筛选功能

This commit is contained in:
zhal 2022-07-24 00:38:59 +08:00
parent 907896a160
commit 1af79cd34b
3 changed files with 38 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import com.actionsoft.bpms.bo.engine.BO;
import com.actionsoft.bpms.commons.database.RowMap;
import com.actionsoft.bpms.util.DBSql;
import com.actionsoft.bpms.util.UUIDGener;
import com.actionsoft.bpms.util.UtilString;
import com.actionsoft.sdk.local.SDK;
import java.util.List;
@ -63,7 +64,20 @@ public class ProcesNumberUtil {
//查询出所有的发布流程
List<BO> dataList = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_N").addQuery("BINDID=", bindId).list();
//依次生成编号~并回填
String levelnum = levelOne + "." + (levelTwo.isEmpty() ? "00" : levelTwo) + (levelThree.isEmpty() ? "00" : levelThree);
if(UtilString.isNotEmpty(levelTwo)){
String[] str = levelTwo.split(".");
levelTwo =str[1];
}else{
levelTwo = "00";
}
if(UtilString.isNotEmpty(levelThree)){
String[] str = levelThree.split(".");
levelThree =str[2];
}else{
levelThree = "00";
}
String levelnum = levelOne + "." + levelTwo + "." + levelThree;
String updateSql = "update BO_ACT_COE_PUBLISH_N set PROCESS_NUMBER='%s' where ID = '%S'";
for (BO nowData : dataList) {
String number = getProcessNum(levelnum, orgCode);

View File

@ -760,7 +760,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
//JSONObject jsonObject = JSONObject.parseObject(json);
JSONArray jsonArr_new= new JSONArray();
JSONArray objects=JSONArray.parseArray(treeJson);
//角色图属性代码是role/绩效图属性代码
//角色图属性代码是role/绩效图属性代码为Process_performance_metrics进行判断
if (attrId.equals("role") || attrId.equals("Process_performance_metrics")) {
if (objects != null) {
for (int i = 0; i < objects.size(); i++) {
@ -782,6 +782,27 @@ public class DesignerRelationShapeWeb extends ActionWeb {
}
}
macroLibraries.put("treeData", jsonArr_new.toString());
} else if(attrId.equals("post")){
if (objects != null) {
for (int i = 0; i < objects.size(); i++) {
String id= objects.getJSONObject(i).getString("id");
String url =objects.getJSONObject(i).getString("url");
if (UtilString.isNotEmpty(url)) {
List<Map<String, Object>> nodeElements = CoeDesignerUtil.getShapeMessageJson4(id);
if(nodeElements.size()>0){
String title = nodeElements.get(0).get("title").toString();
if(title.equals("岗位")){
jsonArr_new.add(objects.getJSONObject(i));
}
}
}else{
jsonArr_new.add(objects.getJSONObject(i));
}
}
}
macroLibraries.put("treeData", jsonArr_new.toString());
}else{
macroLibraries.put("treeData", treeJson);
}