Przeglądaj źródła

Merge remote-tracking branch 'origin/4.0' into 4.0

4.0
yaoq 2 lat temu
rodzic
commit
a1af8a48a8
2 zmienionych plików z 41 dodań i 17 usunięć
  1. +20
    -8
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/lclc1/FlowLcLc1Service.java
  2. +21
    -9
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/lcms/FlowLcMsService.java

+ 20
- 8
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/lclc1/FlowLcLc1Service.java Wyświetl plik

@@ -7,6 +7,7 @@ import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.framework.core.mvc.service.AbstractHandler;
import cc.smtweb.framework.core.session.UserSession;
import cc.smtweb.system.bpm.web.engine.model.common.*;
import cc.smtweb.system.bpm.web.engine.model.listcard.lclc1.LCLC1Config;
import cc.smtweb.system.bpm.web.engine.model.listcard.lclc1.LCLC1Service;

/**
@@ -16,7 +17,10 @@ import cc.smtweb.system.bpm.web.engine.model.listcard.lclc1.LCLC1Service;
*/
@SwService
public class FlowLcLc1Service extends FlowModelService {
private LCLC1Service worker = new LCLC1Service();
public final static String TYPE_MODEL_LEFT_LIST = "modelLList";
public final static String TYPE_MODEL_LEFT_LOAD = "modelLLoad";
public final static String TYPE_MODEL_LEFT_SAVE = "modelLSave";
public final static String TYPE_MODEL_LEFT_DEL = "modelLDel";

@Override
protected AbstractHandler createHandler(String type) {
@@ -27,8 +31,16 @@ public class FlowLcLc1Service extends FlowModelService {
case TYPE_MODEL_DEL:
case TYPE_FLOW:
return super.createHandler(type);
case TYPE_MODEL_LEFT_LIST:
return new ModelListHandler(LCLC1Config.dsLList);
case TYPE_MODEL_LEFT_LOAD:
return new ModelLoadHandler<>(LCLC1Config.dsLCard);
case TYPE_MODEL_LEFT_SAVE:
return new ModelSaveHandler<>(LCLC1Config.dsLCard);
case TYPE_MODEL_LEFT_DEL:
return new ModelDelHandler(LCLC1Config.dsLCard);
}
return worker.createHandler(type);
return super.createHandler(type);
}

/**
@@ -38,7 +50,7 @@ public class FlowLcLc1Service extends FlowModelService {
* @return
*/
public R modelLSave(@SwBody SwMap params, UserSession us) {
return worker.modelLSave(params,us);
return pageHandler(params, us, TYPE_MODEL_LEFT_SAVE, handler -> ((ModelSaveHandler) handler).save());
}

/**
@@ -48,7 +60,7 @@ public class FlowLcLc1Service extends FlowModelService {
* @return
*/
public R modelLLoad(@SwBody SwMap params, UserSession us) {
return worker.modelLLoad(params,us);
return pageHandler(params, us, TYPE_MODEL_LEFT_LOAD, handler -> ((ModelLoadHandler) handler).load());
}

/**
@@ -58,7 +70,7 @@ public class FlowLcLc1Service extends FlowModelService {
* @return
*/
public R modelLAdd(@SwBody SwMap params, UserSession us) {
return worker.modelLAdd(params,us);
return pageHandler(params, us, TYPE_MODEL_LEFT_LOAD, handler -> ((ModelLoadHandler) handler).add());
}

/**
@@ -68,7 +80,7 @@ public class FlowLcLc1Service extends FlowModelService {
* @return
*/
public R modelLDel(@SwBody SwMap params, UserSession us) {
return worker.modelLDel(params,us);
return pageHandler(params, us, TYPE_MODEL_LEFT_DEL, handler -> ((ModelDelHandler) handler).del());
}

/**
@@ -78,7 +90,7 @@ public class FlowLcLc1Service extends FlowModelService {
* @return
*/
public R modelLList(@SwBody SwMap params, UserSession us) {
return worker.modelLList(params,us);
return pageHandler(params, us, TYPE_MODEL_LEFT_LIST, handler -> ((ModelListHandler) handler).data());
}

/**
@@ -88,6 +100,6 @@ public class FlowLcLc1Service extends FlowModelService {
* @return
*/
public R modelLListTotal(@SwBody SwMap params, UserSession us) {
return worker.modelLListTotal(params,us);
return pageHandler(params, us, TYPE_MODEL_LEFT_LIST, handler -> ((ModelListHandler) handler).getTotal());
}
}

+ 21
- 9
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/lcms/FlowLcMsService.java Wyświetl plik

@@ -6,7 +6,8 @@ import cc.smtweb.framework.core.common.R;
import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.framework.core.mvc.service.AbstractHandler;
import cc.smtweb.framework.core.session.UserSession;
import cc.smtweb.system.bpm.web.engine.model.common.FlowModelService;
import cc.smtweb.system.bpm.web.engine.model.common.*;
import cc.smtweb.system.bpm.web.engine.model.listcard.lcms.LCMsConfig;
import cc.smtweb.system.bpm.web.engine.model.listcard.lcms.LCMsService;

/**
@@ -16,7 +17,10 @@ import cc.smtweb.system.bpm.web.engine.model.listcard.lcms.LCMsService;
*/
@SwService
public class FlowLcMsService extends FlowModelService {
private LCMsService worker = new LCMsService();
public final static String TYPE_MODEL_SUB_LIST = "modelSubList";
public final static String TYPE_MODEL_SUB_LOAD = "modelSubLoad";
public final static String TYPE_MODEL_SUB_SAVE = "modelSubSave";
public final static String TYPE_MODEL_SUB_DEL = "modelSubDel";

protected AbstractHandler createHandler(String type) {
switch (type) {
@@ -28,8 +32,16 @@ public class FlowLcMsService extends FlowModelService {
return new FlowLcMsSaveHandler();
case TYPE_MODEL_DEL:
return new FlowLcMsDelHandler();
case TYPE_MODEL_SUB_LIST:
return new ModelListHandler(LCMsConfig.dsSList);
case TYPE_MODEL_SUB_LOAD:
return new ModelLoadHandler<>(LCMsConfig.dsSCard);
case TYPE_MODEL_SUB_SAVE:
return new ModelSaveHandler<>(LCMsConfig.dsSCard);
case TYPE_MODEL_SUB_DEL:
return new ModelDelHandler(LCMsConfig.dsSCard);
}
return worker.createHandler(type);
return super.createHandler(type);
}

/**
@@ -39,7 +51,7 @@ public class FlowLcMsService extends FlowModelService {
* @return
*/
public R modelSubSave(@SwBody SwMap params, UserSession us) {
return worker.modelSubSave(params,us);
return pageHandler(params, us, TYPE_MODEL_SUB_SAVE, handler -> ((ModelSaveHandler) handler).save());
}

/**
@@ -49,7 +61,7 @@ public class FlowLcMsService extends FlowModelService {
* @return
*/
public R modelSubLoad(@SwBody SwMap params, UserSession us) {
return worker.modelSubLoad(params,us);
return pageHandler(params, us, TYPE_MODEL_SUB_LOAD, handler -> ((ModelLoadHandler) handler).load());
}

/**
@@ -59,7 +71,7 @@ public class FlowLcMsService extends FlowModelService {
* @return
*/
public R modelSubAdd(@SwBody SwMap params, UserSession us) {
return worker.modelSubAdd(params,us);
return pageHandler(params, us, TYPE_MODEL_SUB_LOAD, handler -> ((ModelLoadHandler) handler).add());
}

/**
@@ -69,7 +81,7 @@ public class FlowLcMsService extends FlowModelService {
* @return
*/
public R modelSubDel(@SwBody SwMap params, UserSession us) {
return worker.modelSubDel(params,us);
return pageHandler(params, us, TYPE_MODEL_SUB_DEL, handler -> ((ModelDelHandler) handler).del());
}

/**
@@ -79,7 +91,7 @@ public class FlowLcMsService extends FlowModelService {
* @return
*/
public R modelSubList(@SwBody SwMap params, UserSession us) {
return worker.modelSubList(params,us);
return pageHandler(params, us, TYPE_MODEL_SUB_LIST, handler -> ((ModelListHandler) handler).data());
}

/**
@@ -89,6 +101,6 @@ public class FlowLcMsService extends FlowModelService {
* @return
*/
public R modelSubListTotal(@SwBody SwMap params, UserSession us) {
return worker.modelSubListTotal(params,us);
return pageHandler(params, us, TYPE_MODEL_SUB_LIST, handler -> ((ModelListHandler) handler).getTotal());
}
}

Ładowanie…
Anuluj
Zapisz