Browse Source

页面

master
郑根木 2 years ago
parent
commit
e8a49b396d
2 changed files with 5 additions and 5 deletions
  1. +4
    -3
      smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormSaveHandler.java
  2. +1
    -2
      smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/table/ModelCatalogTreeHandler.java

+ 4
- 3
smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormSaveHandler.java View File

@@ -61,11 +61,12 @@ public class ModelFormSaveHandler extends DefaultSaveHandler<ModelForm> {
public R saveModel() {
long id = params.readLong("id");
String data = params.readString("data");
ModelForm form = loadComp(id);
bean = loadComp(id);
if (StringUtils.isEmpty(data)) {
throw new SwException("没有待保存的数据!");
}
form.setContent(ModelFormHelper.buildSaveModel(form));
bean.setContent(data);
bean.setContent(ModelFormHelper.buildSaveModel(bean));
DbEngine.getInstance().doTrans(new AbsDbWorker() {
@Override
public void work() {
@@ -74,7 +75,7 @@ public class ModelFormSaveHandler extends DefaultSaveHandler<ModelForm> {
ModelTable table = ModelTableCache.getInstance().getByName(tableName);
ModelField field = table.findFieldByType(SwEnum.FieldType.UPDATE_USER.value);
if (field != null) bean.put(field.getName(), us.getUserId());
dao.updateEntity(form, "mf_content");
dao.updateEntity(bean, "mf_content");
}

@Override


+ 1
- 2
smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/table/ModelCatalogTreeHandler.java View File

@@ -83,8 +83,7 @@ public class ModelCatalogTreeHandler extends AbstractTreeHandler<DefaultEntity>

@Override
protected List<DefaultEntity> getChildren(long id) {
List<ModelCatalog> list;
list = mcTreeHelper.getChildren(id, prj_id, (o1, o2) -> CommUtil.chineseCompare(o1.getName(), o2.getName()));
List<ModelCatalog> list = mcTreeHelper.getChildren(id, prj_id, (o1, o2) -> CommUtil.chineseCompare(o1.getName(), o2.getName()));

List<DefaultEntity> listRet = new ArrayList<>(list);



Loading…
Cancel
Save