瀏覽代碼

系统:增加SwConsts.SysParam.RUN_PROJECTS,启动时只读取指定项目的表定义

4.0
郑根木 2 年之前
父節點
當前提交
41738f6438
共有 5 個文件被更改,包括 8 次插入8 次删除
  1. +1
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/PreviewMenuTreeService.java
  2. +2
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowHelper.java
  3. +2
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java
  4. +1
    -2
      smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/AbstractCache.java
  5. +2
    -2
      smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwConsts.java

+ 1
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/PreviewMenuTreeService.java 查看文件

@@ -32,7 +32,7 @@ public class PreviewMenuTreeService {

public R treeAll(@SwParam("module") String module, UserSession us) {
String prj_id = ModelProjectCache.getInstance().getIdByModule(module);
if(!SwConsts.SYS_DEBUG){
if(!SwConsts.SysParam.SYS_DEBUG){
List<MenuVO> menuVOList = buildMenu(prj_id, module, us);
if (PubUtil.isNotEmpty(menuVOList)) {
return R.success(menuVOList);


+ 2
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowHelper.java 查看文件

@@ -47,9 +47,9 @@ public class FlowHelper {
" where r.trl_dst_task_id=? and t.tsk_handler=?", task_id, user_id);
}

public static void stopTask(long billId) {
public static void stopTask(long billId, long tskId) {
DbEngine.getInstance().update("update " + EntityHelper.getSchemaTableName(Task.ENTITY_NAME) +
" set tsk_statu=? where tsk_pri_id=? and tsk_statu<?", FlowConst.ActivityStatu.STOP.value, billId, FlowConst.ActivityStatu.SUBMIT.value);
" set tsk_statu=? where tsk_pri_id=? and tsk_id<>? and tsk_statu<?", FlowConst.ActivityStatu.STOP.value, billId,tskId, FlowConst.ActivityStatu.SUBMIT.value);
}

/**


+ 2
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java 查看文件

@@ -799,8 +799,9 @@ public class FlowInstance {

buildRejectTask(toTask, listInsertTask, listInsertCand, listTaskRel, listTaskComment);
}
actInst.setStatu(FlowConst.ActivityStatu.REJECT.value);
//先停止其他待办或办理中的任务
FlowHelper.stopTask(procInst.getId());
FlowHelper.stopTask(procInst.getId(), actInst.getId());
//保存入库
if (!listInsertTask.isEmpty()) {
getTaskDao().batchInsertEntity(listInsertTask);


+ 1
- 2
smtweb-framework/core/src/main/java/cc/smtweb/framework/core/cache/AbstractCache.java 查看文件

@@ -1,6 +1,5 @@
package cc.smtweb.framework.core.cache;

import cc.smtweb.framework.core.CoreAutoConfiguration;
import cc.smtweb.framework.core.annotation.SwCache;
import cc.smtweb.framework.core.cache.redis.RedisBroadcastEvent;
import cc.smtweb.framework.core.cache.redis.RedisManager;
@@ -110,7 +109,7 @@ public abstract class AbstractCache<T extends Serializable> implements ISwCache<
* 否则,非lazy,从数据库加载,并更新redis
*/
protected void init() {
if (!SwConsts.SYS_DEBUG && RedisManager.getInstance().exists(getIdent())) {
if (!SwConsts.SysParam.SYS_DEBUG && RedisManager.getInstance().exists(getIdent())) {
log.info("从redis同步缓存!(" + getTitle() + ")");
//从缓存服务器下载到本地
syncCache();


+ 2
- 2
smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwConsts.java 查看文件

@@ -5,13 +5,13 @@ package cc.smtweb.framework.core.common;
*/
public interface SwConsts {
class SysParam {
//开发调试模式
public static final boolean SYS_DEBUG = true;
//系统启动完成
public static boolean SYS_STARTED = false;
//运行的项目,多个用半角逗号分隔
public static String RUN_PROJECTS = "bpm";
}
//开发调试模式
boolean SYS_DEBUG = true;


int DEFAULT_ORDER = 1;


Loading…
取消
儲存