Przeglądaj źródła

bug:dynpage.save

4.0
郑根木 2 lat temu
rodzic
commit
ec49b3b8c3
3 zmienionych plików z 13 dodań i 6 usunięć
  1. +2
    -3
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageSaveHandler.java
  2. +6
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java
  3. +5
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/userGroup/UserGroupHelper.java

+ 2
- 3
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageSaveHandler.java Wyświetl plik

@@ -47,7 +47,6 @@ public class DynPageSaveHandler extends AbstractDynPageHandler {
//对应的数据集定义
PageDataset pageDataSet = findDataset(dbName);
if (pageDataSet == null) throw new BizException("没有找到指定的的数据集定义:" + dbName + "!");
ModelTable table = ModelTableCache.getInstance().get(pageDataSet.masterTable);

//读取待保存的bean
DefaultEntity bean = readBeanFromPage(pageDataSet, data.readMap("form"));
@@ -150,8 +149,8 @@ public class DynPageSaveHandler extends AbstractDynPageHandler {
ModelTable table = ModelTableCache.getInstance().get(pageDataSet.masterTable);
if (table == null) throw new BizException("没有找到待保存的表定义:" + pageDataSet.name);

long id = params.readLong(table.getIdField());
boolean isNew = params.readBool(DefaultEntity.statusKey) || id <= 0L;
long id = data.readLong(table.getIdField());
boolean isNew = data.readBool(DefaultEntity.statusKey) || id <= 0L;

EntityDao<DefaultEntity> dao = DbEngine.getInstance().findDao(table.getName());
DefaultEntity bean;


+ 6
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java Wyświetl plik

@@ -673,8 +673,12 @@ public class FlowInstance {
if (act.getType() != FlowConst.ActivityType.END.value) {
Set<Long> listHander = new HashSet<>();

long hanlder_group = act.getHandler().getUserGroup();
int handler_range = act.getHandler().getFilter();
long hanlder_group = 0L;
int handler_range = 0;
if (act.getHandler() != null) {
hanlder_group = act.getHandler().getUserGroup();
handler_range = act.getHandler().getFilter();
}
//获取所有候选人
listHander = UserGroupHelper.getUserIdList(hanlder_group, procInst, handler_range, us);



+ 5
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/userGroup/UserGroupHelper.java Wyświetl plik

@@ -42,7 +42,11 @@ public class UserGroupHelper {
* @return
*/
public static Set<Long> getUserIdList(long group_id, ProcInst pro_inst, int handle_range, UserSession us) {
if (group_id <= 0L) return null;//未设置分组,默认true
if (group_id <= 0L) {
Set<Long> set = new HashSet<>();
set.add(1L);
return set;//未设置分组,默认所有
}
return null;
/*
List<UserGroupItemEntity> items = UserGroupItemEntityBuffer.getInstance().getListByGroup(group_id);


Ładowanie…
Anuluj
Zapisz