Ver a proveniência

模型调整

4.0
lip há 2 anos
ascendente
cometimento
2282a5ef4f
12 ficheiros alterados com 80 adições e 58 eliminações
  1. +12
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/model/LcNormalWorker.java
  2. +2
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lclc1/LCLC1LoadHandler.java
  3. +2
    -12
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lclc1/LCLC1Service.java
  4. +12
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lclc2/LCLC2Service.java
  5. +12
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lclt/LCLTService.java
  6. +12
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lcltms/LCLtMsService.java
  7. +1
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lcms/LCMsDefine.java
  8. +4
    -13
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lcms/LCMsDelHandler.java
  9. +1
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lcms/LCMsLoadHandler.java
  10. +1
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lcms/LCMsSaveHandler.java
  11. +4
    -9
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lcms/LCMsService.java
  12. +17
    -17
      smtweb-framework/bpm/src/main/resources/static/template/default/model_card_ms.ftl

+ 12
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/model/LcNormalWorker.java Ver ficheiro

@@ -1,6 +1,7 @@
package cc.smtweb.system.bpm.web.design.form.model;

import cc.smtweb.framework.core.common.SwEnum;
import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.framework.core.db.DbEngine;
import cc.smtweb.framework.core.db.EntityDao;
import cc.smtweb.framework.core.util.JsonUtil;
@@ -26,8 +27,17 @@ public class LcNormalWorker extends BaseModelWorker {
String baseName = ModelFormHelper.getPageName(bean);
String listName = baseName + StringUtil.upFirst(SwEnum.PageType.LIST.value);
String cardName = baseName + StringUtil.upFirst(SwEnum.PageType.CARD.value);

bean.setOption(JsonUtil.encodeString(bean.getOpts()));
//
SwMap opts = bean.getOpts();
SwMap cfg = opts.readMap(ModelFormHelper.OPT_CONFIG);
//
SwMap cfgPage = new SwMap();
cfg.put(ModelFormHelper.OPT_PAGE, cfgPage);
//
cfgPage.put(SwEnum.PageType.LIST.value, listName);
cfgPage.put(SwEnum.PageType.CARD.value, cardName);
bean.setOption(JsonUtil.encodeString(opts));
//
ModelForm listPage;
ModelForm cardPage;
if (bean.isNew()) {


+ 2
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lclc1/LCLC1LoadHandler.java Ver ficheiro

@@ -55,7 +55,7 @@ public class LCLC1LoadHandler extends ModelLoadHandler<DefaultEntity> {
* @return
*/
public R lList() {
return super.list(LCLC1Define.dsLCard);
return super.list(LCLC1Define.dsLList);
}

/**
@@ -64,7 +64,7 @@ public class LCLC1LoadHandler extends ModelLoadHandler<DefaultEntity> {
* @return
*/
public R rList() {
return super.list(LCLC1Define.dsRCard);
return super.list(LCLC1Define.dsRList);
}

/**


+ 2
- 12
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lclc1/LCLC1Service.java Ver ficheiro

@@ -47,12 +47,7 @@ public class LCLC1Service extends ModelService {
}

//删除
public R modelLLDel(@SwBody SwMap params, UserSession us) {
return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCLC1DelHandler) handler).lDel());
}

//删除
public R modelLCDel(@SwBody SwMap params, UserSession us) {
public R modelLDel(@SwBody SwMap params, UserSession us) {
return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCLC1DelHandler) handler).lDel());
}

@@ -83,12 +78,7 @@ public class LCLC1Service extends ModelService {
}

//删除
public R modelRLDel(@SwBody SwMap params, UserSession us) {
return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCLC1DelHandler) handler).rDel());
}

//删除
public R modelRCDel(@SwBody SwMap params, UserSession us) {
public R modelRDel(@SwBody SwMap params, UserSession us) {
return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCLC1DelHandler) handler).rDel());
}



+ 12
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lclc2/LCLC2Service.java Ver ficheiro

@@ -0,0 +1,12 @@
package cc.smtweb.system.bpm.web.engine.model.listcard.lclc2;

import cc.smtweb.framework.core.annotation.SwService;
import cc.smtweb.system.bpm.web.engine.model.listcard.lclc1.LCLC1Service;

/**
* @Author:lip
* @Date : 2022/9/13 15:28
*/
@SwService
public class LCLC2Service extends LCLC1Service {
}

+ 12
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lclt/LCLTService.java Ver ficheiro

@@ -0,0 +1,12 @@
package cc.smtweb.system.bpm.web.engine.model.listcard.lclt;

import cc.smtweb.framework.core.annotation.SwService;
import cc.smtweb.system.bpm.web.engine.model.listcard.normal.LCNormalService;

/**
* @Author:lip
* @Date : 2022/9/13 15:30
*/
@SwService
public class LCLTService extends LCNormalService {
}

+ 12
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lcltms/LCLtMsService.java Ver ficheiro

@@ -0,0 +1,12 @@
package cc.smtweb.system.bpm.web.engine.model.listcard.lcltms;

import cc.smtweb.framework.core.annotation.SwService;
import cc.smtweb.system.bpm.web.engine.model.listcard.lcms.LCMsService;

/**
* @Author:lip
* @Date : 2022/9/13 15:32
*/
@SwService
public class LCLtMsService extends LCMsService {
}

smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/mastersub/LCMsDefine.java → smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lcms/LCMsDefine.java Ver ficheiro

@@ -1,4 +1,4 @@
package cc.smtweb.system.bpm.web.engine.model.listcard.mastersub;
package cc.smtweb.system.bpm.web.engine.model.listcard.lcms;

/**
* @Author:lip

smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/mastersub/LCMsDelHandler.java → smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lcms/LCMsDelHandler.java Ver ficheiro

@@ -1,4 +1,4 @@
package cc.smtweb.system.bpm.web.engine.model.listcard.mastersub;
package cc.smtweb.system.bpm.web.engine.model.listcard.lcms;

import cc.smtweb.framework.core.cache.AbstractCache;
import cc.smtweb.framework.core.cache.CacheManager;
@@ -28,17 +28,8 @@ public class LCMsDelHandler extends AbsDelHandler {
*
* @return
*/
public R lDel() {
return del();
}

/**
* 卡片删除
*
* @return
*/
public R cDel() {
return del();
public R del() {
return doDel();
}

/**
@@ -46,7 +37,7 @@ public class LCMsDelHandler extends AbsDelHandler {
*
* @return
*/
private R del() {
private R doDel() {
long id = params.readLong("id");
if (id <= 0L) throw new BizException("没有收到待删除记录Id(" + id + ")!");
SwMap props = form.getOpts().readMap("config").readMap("props");

smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/mastersub/LCMsLoadHandler.java → smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lcms/LCMsLoadHandler.java Ver ficheiro

@@ -1,4 +1,4 @@
package cc.smtweb.system.bpm.web.engine.model.listcard.mastersub;
package cc.smtweb.system.bpm.web.engine.model.listcard.lcms;

import cc.smtweb.framework.core.common.R;
import cc.smtweb.framework.core.common.SwMap;

smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/mastersub/LCMsSaveHandler.java → smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lcms/LCMsSaveHandler.java Ver ficheiro

@@ -1,4 +1,4 @@
package cc.smtweb.system.bpm.web.engine.model.listcard.mastersub;
package cc.smtweb.system.bpm.web.engine.model.listcard.lcms;

import cc.smtweb.framework.core.common.R;
import cc.smtweb.framework.core.common.SwMap;

smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/mastersub/LCMsService.java → smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/lcms/LCMsService.java Ver ficheiro

@@ -1,4 +1,4 @@
package cc.smtweb.system.bpm.web.engine.model.listcard.mastersub;
package cc.smtweb.system.bpm.web.engine.model.listcard.lcms;

import cc.smtweb.framework.core.annotation.SwBody;
import cc.smtweb.framework.core.annotation.SwService;
@@ -50,14 +50,9 @@ public class LCMsService extends DynPageService {
return pageHandler(params, us, TYPE_MODEL_ADD, handler -> ((LCMsLoadHandler) handler).mAdd());
}

//列表删除
public R modelLDel(@SwBody SwMap params, UserSession us) {
return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCMsDelHandler) handler).lDel());
}

//卡片删除
public R modelCDel(@SwBody SwMap params, UserSession us) {
return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCMsDelHandler) handler).cDel());
//删除
public R modelDel(@SwBody SwMap params, UserSession us) {
return pageHandler(params, us, TYPE_MODEL_DEL, handler -> ((LCMsDelHandler) handler).del());
}

//主表列表数据

+ 17
- 17
smtweb-framework/bpm/src/main/resources/static/template/default/model_card_ms.ftl Ver ficheiro

@@ -36,7 +36,7 @@
"shape": "panel",
"props": {
"size": "56",
"label": "${group.label}",
"label": "标题",
"colNum": 2,
"alignY": "center",
"paddingLeft": 16,
@@ -77,7 +77,7 @@
"label": "${field.label}",
"dataset": "${field.dataset}",
"required": "${field.required}",
"field": "${field.field}",
"field": "${field.id}",
"placeholder": "请输入内容",
"labelWidth": 150,
"readonly": "${field.readonly}",
@@ -234,7 +234,7 @@
"shape": "panel",
"props": {
"size": "400",
"label": "列表",
"label": "子表列表",
"colNum": 0,
"paddingLeft": 16,
"paddingRight": 16,
@@ -246,12 +246,12 @@
"id": "id${newId()}",
"type": "fx-table",
"props": {
"label": "表格",
"label": "子表表格",
"border": true,
"stripe": true,
"showHeader": true,
"fit": true,
"dataset": "${group.dataset}",
"dataset": "${layout.listSub[0].dataset}",
"actionWidth": 150
},
"slots": {
@@ -276,11 +276,11 @@
"label": "编辑",
"type": "text",
"leftIcon": "edit",
"action": "button:edit",
"action": "button:loadRow",
"dataset": "${layout.listSub[0].dataset}",
"link": true,
"linkType": "",
"fxLink": ""
"linkType": "dialog",
"fxLink": "dialog:cardSubDialog",
"fxLink_text": "子表编辑卡片"
}
},
{
@@ -290,7 +290,8 @@
"label": "删除",
"type": "text",
"leftIcon": "delete-themes",
"action": "button:remove",
"action": "button:delRow",
"dataset": "${layout.listSub[0].dataset}",
"preAction": "",
"link": true,
"confirm": ""
@@ -341,7 +342,8 @@
"type": "fx-button-group",
"props": {
"showDropdown": false,
"textAlign": "center"
"textAlign": "center",
"dataset": "${layout.cardMaster[0].dataset}"
},
"slots": {
"default": [
@@ -473,7 +475,7 @@
"label": "保存",
"leftIcon": "save",
"type": "success",
"action": "button:save",
"action": "button:saveRow",
"dataset": "${assist_dialog.dataset}"
},
"id": "id${newId()}"
@@ -481,12 +483,10 @@
{
"type": "fx-button",
"props": {
"label": "保存并新增",
"label": "保存并新增",
"type": "primary",
"action": "button:saveRow",
"linkType": "curr",
"dataset": "${layout.listSub[0].dataset}",
"nextAction": "button:addRow"
"action": "button:saveAddRow",
"dataset": "${assist_dialog.dataset}"
},
"id": "${newId()}",
"events": {}


Carregando…
Cancelar
Guardar