|
|
@@ -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 lombok.Data; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.lang.NonNull; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
@@ -52,8 +53,10 @@ public class FlowInstance { |
|
|
|
private List<Map<String, String>> tasks = new ArrayList<>(); |
|
|
|
//数据提供者 |
|
|
|
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; |
|
|
|
} |
|
|
|
|
|
|
@@ -74,16 +77,10 @@ public class FlowInstance { |
|
|
|
*/ |
|
|
|
public boolean execTrans(String expr) { |
|
|
|
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; |
|
|
|
} |
|
|
|
|
|
|
|