@@ -520,13 +520,16 @@ public class ModelFormHelper { | |||||
col.put("editor", dtb != null ? dtb.editor: SwEnum.EditorType.INPUT.value); | col.put("editor", dtb != null ? dtb.editor: SwEnum.EditorType.INPUT.value); | ||||
if (field.getLink() == 0L) return; | if (field.getLink() == 0L) return; | ||||
Set<ModelForm> set = ModelFormCache.getInstance().getListByTable(table.getId(), SwEnum.FormType.WIDGET.value); | |||||
Set<ModelForm> set = ModelFormCache.getInstance().getListByTable(field.getLink(), SwEnum.FormType.WIDGET.value); | |||||
if (set == null || set.isEmpty()) return; | if (set == null || set.isEmpty()) return; | ||||
ModelForm form = set.iterator().next(); | ModelForm form = set.iterator().next(); | ||||
if (form == null) return; | if (form == null) return; | ||||
col.put("widget", form.getId()); | |||||
col.put("widgetText", form.getTitle()); | |||||
SwMap widget = new SwMap(); | |||||
col.put("widget", widget); | |||||
widget.put("widgetId", form.getId()); | |||||
widget.put("widgetId_text", form.getTitle()); | |||||
SwMap opts = form.getOpts(); | SwMap opts = form.getOpts(); | ||||
if (opts != null) { | if (opts != null) { | ||||
col.put("editor", SwEnum.WidgetType.getEditor(opts.readString("widgetType"))); | col.put("editor", SwEnum.WidgetType.getEditor(opts.readString("widgetType"))); | ||||
@@ -23,6 +23,7 @@ import cc.smtweb.system.bpm.web.sys.user.user.UserCache; | |||||
import cc.smtweb.system.bpm.web.sys.user.userGroup.UserGroupHelper; | import cc.smtweb.system.bpm.web.sys.user.userGroup.UserGroupHelper; | ||||
import lombok.Data; | import lombok.Data; | ||||
import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
import org.springframework.lang.NonNull; | |||||
import java.util.*; | import java.util.*; | ||||
@@ -52,8 +53,10 @@ public class FlowInstance { | |||||
private List<Map<String, String>> tasks = new ArrayList<>(); | private List<Map<String, String>> tasks = new ArrayList<>(); | ||||
//数据提供者 | //数据提供者 | ||||
private FlowProvider provider = new FlowProvider(); | private FlowProvider provider = new FlowProvider(); | ||||
private FlowListener listener; | |||||
public FlowInstance(UserSession us) { | |||||
public FlowInstance(@NonNull FlowListener listener, UserSession us) { | |||||
this.listener = listener; | |||||
this.us = us; | this.us = us; | ||||
} | } | ||||
@@ -74,16 +77,10 @@ public class FlowInstance { | |||||
*/ | */ | ||||
public boolean execTrans(String expr) { | public boolean execTrans(String expr) { | ||||
if (StringUtils.isBlank(expr)) return true; | if (StringUtils.isBlank(expr)) return true; | ||||
Map<String, Object> mapVar = new HashMap<>(); | |||||
/*mapVar.putAll(billEntity.getData()); | |||||
mapVar.put("party_code", PartyEntityBuffer.getInstance().getCodeById(billEntity.getPartyId())); | |||||
mapVar.put("party_name", PartyEntityBuffer.getInstance().getNameById(billEntity.getPartyId())); | |||||
mapVar.put("dept_code", DepartmentEntityBuffer.getInstance().getCodeById(billEntity.getDeptId())); | |||||
mapVar.put("dept_name", DepartmentEntityBuffer.getInstance().getNameById(billEntity.getDeptId())); | |||||
mapVar.put("bill_user_code", UserBaseEntityBuffer.getInstance().getCodeById(billEntity.getBillUser())); | |||||
mapVar.put("bill_user_name", UserBaseEntityBuffer.getInstance().getNameById(billEntity.getBillUser())); | |||||
localBuildExecTrans(mapVar);*/ | |||||
Object o = NumberUtil.calcExprMapObject(expr, mapVar); | |||||
SwMap params = new SwMap(); | |||||
params.putAll(procInst.getData()); | |||||
listener.setExprParam(params); | |||||
Object o = NumberUtil.calcExprMapObject(expr, params); | |||||
return o != null && (Boolean) o; | return o != null && (Boolean) o; | ||||
} | } | ||||
@@ -0,0 +1,12 @@ | |||||
package cc.smtweb.system.bpm.web.engine.flow; | |||||
import cc.smtweb.framework.core.common.SwMap; | |||||
/** | |||||
* Created by Akmm at 2022-08-20 16:12 | |||||
* 流程流转监听 | |||||
*/ | |||||
public class FlowListener { | |||||
//设置条件计算参数 | |||||
public void setExprParam(SwMap param){} | |||||
} |
@@ -46,7 +46,7 @@ public class EnumComboService extends DynPageService { | |||||
tempClass = Class.forName(cls); | tempClass = Class.forName(cls); | ||||
wantClass = tempClass; | wantClass = tempClass; | ||||
}catch (Exception e){ | }catch (Exception e){ | ||||
e.printStackTrace(); | |||||
// e.printStackTrace(); | |||||
// | // | ||||
int lIndex = cls.lastIndexOf("."); | int lIndex = cls.lastIndexOf("."); | ||||
if (lIndex > 0) { | if (lIndex > 0) { | ||||
@@ -45,11 +45,11 @@ spring: | |||||
password: | password: | ||||
datasource: | datasource: | ||||
driver-class-name: com.mysql.cj.jdbc.Driver | driver-class-name: com.mysql.cj.jdbc.Driver | ||||
# url: jdbc:mysql://139.9.38.43:6032/smt?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false | |||||
url: jdbc:mysql://127.0.0.1:3306/smt?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false | |||||
url: jdbc:mysql://139.9.38.43:6032/smt?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false | |||||
# url: jdbc:mysql://127.0.0.1:3306/smt?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false | |||||
username: root | username: root | ||||
# password: Ncmz@2022_jjkj | |||||
password: ssqsoft | |||||
password: Ncmz@2022_jjkj | |||||
# password: ssqsoft | |||||
servlet: | servlet: | ||||
multipart: | multipart: | ||||
max-file-size: 104857600000 | max-file-size: 104857600000 | ||||