复用功能增加,草稿状态,增加全部公开按钮

This commit is contained in:
yujh 2024-06-25 11:22:50 +08:00
parent f628a7df74
commit bd27df8813
3 changed files with 65 additions and 30 deletions

View File

@ -4943,4 +4943,14 @@ public class ProcessPublishWeb extends ActionWeb {
return String.valueOf(count);
}
/**
* 切换历史数据为公开状态
*/
public String changeHisToPublicAll() {
String querySql = " UPDATE " + PublisherConstant.BO_ACT_PUBLISH_HIS +
" SET PUBLICSTATUS = 1 WHERE SUBMITUID = ?";
int count = DBSql.update(querySql,new Object[]{_uc.getUID()});
return String.valueOf(count);
}
}

View File

@ -338,52 +338,65 @@ public class ApplyTasAfterkComplete extends ExecuteListener implements ExecuteLi
* @return
*/
public String getSelectedOrg(String orgIds) {
String[] split = orgIds.split(",");
String orgNames = "";
for (String orgId : split) {
orgNames += SDK.getORGAPI().getDepartmentById(orgId).getName()+",";
if(UtilString.isEmpty(orgIds)){
return "";
}else{
String[] split = orgIds.split(",");
StringBuilder orgNames = new StringBuilder();
for (String orgId : split) {
orgNames.append(SDK.getORGAPI().getDepartmentById(orgId).getName()).append(",");
}
if(split.length>1){
//去掉最后一个字符
orgNames = new StringBuilder(orgNames.substring(0, orgNames.length() - 1));
}
return orgNames.toString();
}
if(split.length>1){
//去掉最后一个字符
orgNames = orgNames.substring(0, orgNames.length()-1);
}
return orgNames;
}
/**
* 获取选中的岗位名称
* @param orgIds
* @param postIds
* @return
*/
public String getSelectedPost(String postIds) {
String[] split = postIds.split(",");
String postNames = "";
for (String postId : split) {
postNames += DBSql.getString("select NAME from VIEW_EU_TESTBZP where ID =?", new Object[]{postId}) + ",";
if(UtilString.isEmpty(postIds)){
return "";
}else{
String[] split = postIds.split(",");
StringBuilder postNames = new StringBuilder();
for (String postId : split) {
postNames.append(DBSql.getString("select NAME from VIEW_EU_TESTBZP where ID =?", new Object[]{postId})).append(",");
}
if(split.length>1){
//去掉最后一个字符
postNames = new StringBuilder(postNames.substring(0, postNames.length() - 1));
}
return postNames.toString();
}
if(split.length>1){
//去掉最后一个字符
postNames = postNames.substring(0, postNames.length()-1);
}
return postNames;
}
/**
* 获取选中的职级信息
* @param postIds
* @param levelIds
* @return
*/
public String getSelectedLevel(String levelIds) {
String[] split = levelIds.split(",");
String levelNames = "";
for (String levelId : split) {
levelNames += DBSql.getString("SELECT RANKSUB_NAME FROM BO_ACT_PAL_LEVEL_SUB WHERE RANKSUB_NO =?", new Object[]{levelId}) + ",";
if(UtilString.isEmpty(levelIds)){
return "";
}else{
String[] split = levelIds.split(",");
StringBuilder levelNames = new StringBuilder();
for (String levelId : split) {
levelNames.append(DBSql.getString("SELECT RANKSUB_NAME FROM BO_ACT_PAL_LEVEL_SUB WHERE RANKSUB_NO =?", new Object[]{levelId})).append(",");
}
if(split.length>1){
//去掉最后一个字符
levelNames = new StringBuilder(levelNames.substring(0, levelNames.length() - 1));
}
return levelNames.toString();
}
if(split.length>1){
//去掉最后一个字符
levelNames = levelNames.substring(0, levelNames.length()-1);
}
return levelNames;
}
}

View File

@ -12,6 +12,7 @@ import com.actionsoft.bpms.bpmn.engine.model.run.delegate.TaskInstance;
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 com.actionsoft.sdk.local.api.BOQueryAPI;
import org.apache.commons.lang.StringUtils;
@ -22,7 +23,7 @@ import java.util.List;
public class SubFormAfterSave extends ExecuteListener {
public String getDescription() {
return "子表单保存后,拆分成多条数据保存到数据库中";
return "1.子表单保存后,拆分成多条数据保存到数据库中。2.主表保存后,存储历史数据";
}
public String getProvider() {
@ -128,7 +129,18 @@ public class SubFormAfterSave extends ExecuteListener {
//保存文件类型到主表
saveFileType(processInstId,formData);
}
} else if (boName.equals("BO_ACT_COE_PUBLISH")) {//如果是主表保存
SDK.getLogAPI().consoleInfo(">>>>>>保存触发了his数据更新");
BO bo = SDK.getBOAPI().query(PublisherConstant.BOTABLENAME).detailByBindId(processInstId);
if(UtilString.isNotEmpty(bo.getString("SEND_SCOPE_ORG"))//都不为空则更新
|| UtilString.isNotEmpty(bo.getString("SEND_SCOPE_POST"))
|| UtilString.isNotEmpty(bo.getString("SEND_SCOPE_LEVEL"))){
ApplyTasAfterkComplete event = new ApplyTasAfterkComplete();
event.addPublishHistory(param,bo);
}
}
//保存文件类型到主表
saveFileType(processInstId,formData);