* @see com.founder.fix.fixflow.service.FlowCenterService#queryMyTaskNotEnd(java.util.Map)
*/
public Map<String,Object> queryMyTaskNotEnd(Map<String, Object> filter)
throws SQLException {
Map<String,Object> result = new HashMap<String,Object>();
ProcessEngine engine = getProcessEngine(filter
.get("userId"));
String whereSql = " 1=1 ";
String leftJoinStr = "";
QueryExpandTo queryExpandTo = new QueryExpandTo();
try {
TaskQuery tq = engine.getTaskService().createTaskQuery();
tq.taskAssignee(StringUtil.getString(filter.get("userId")));
tq.taskCandidateUser(StringUtil.getString(filter.get("userId")));
// tq.processDefinitionKey(StringUtil.getString(filter.get("pdkey")));
String descritpion = StringUtil.getString(filter.get("title"));
if(StringUtil.isNotEmpty(descritpion))
tq.taskDescriptionLike(descritpion);
String initor = StringUtil.getString(filter.get("initor"));
if(StringUtil.isNotEmpty(initor))
tq.initiator(initor);
//发起人模糊匹配
String initorName = StringUtil.getString(filter.get("initorName"));
if (StringUtil.isNotEmpty(initorName)) {
initorName = initorName.replace("'", "");
ProcessEngine processEngine = ProcessEngineManagement
.getDefaultProcessEngine();
AllUserInfo userInfoConfig = processEngine
.getProcessEngineConfiguration().getUserDefinition()
.getUserInfoConfig();
leftJoinStr += " LEFT JOIN (" + userInfoConfig.getSqlText()
+ ") UT on UT." + userInfoConfig.getUserIdField()
+ " = P.INITIATOR ";