|
@@ -143,7 +143,8 @@ public class TaskAnalysisDaoImpl extends BaseDaoImpl implements ITaskAnalysisDao
|
|
|
|
|
|
Long gbTaskTypeId = ParameterUtil.getLong(param, "gbTaskTypeId");
|
|
Long gbTaskTypeId = ParameterUtil.getLong(param, "gbTaskTypeId");
|
|
if(gbTaskTypeId != null){
|
|
if(gbTaskTypeId != null){
|
|
- sql.append(" and T.tasktype_id = :gbTaskTypeId ");
|
|
|
|
|
|
+ sql.append(" and T.tasktype_id in (SELECT id FROM task_type WHERE status = 1 AND sub_type = 1 AND creator_id <> -1 "
|
|
|
|
+ + "AND (parent_id = :gbTaskTypeId OR id = :gbTaskTypeId) ) ");
|
|
}
|
|
}
|
|
if(param.get("gbResIds") != null){
|
|
if(param.get("gbResIds") != null){
|
|
sql.append(" and M.resource_id in ( :gbResIds) ");
|
|
sql.append(" and M.resource_id in ( :gbResIds) ");
|
|
@@ -531,7 +532,8 @@ public class TaskAnalysisDaoImpl extends BaseDaoImpl implements ITaskAnalysisDao
|
|
//类型筛选
|
|
//类型筛选
|
|
Long gbTaskTypeId = ParameterUtil.getLong(param, "gbTaskTypeId");
|
|
Long gbTaskTypeId = ParameterUtil.getLong(param, "gbTaskTypeId");
|
|
if (gbTaskTypeId != null) {
|
|
if (gbTaskTypeId != null) {
|
|
- sql.append(" AND t.tasktype_id = :gbTaskTypeId ");
|
|
|
|
|
|
+ sql.append(" AND t.tasktype_id in (SELECT id FROM task_type WHERE status = 1 AND sub_type = 1 AND creator_id <> -1 "
|
|
|
|
+ + "AND (parent_id = :gbTaskTypeId OR id = :gbTaskTypeId) ) ");
|
|
}
|
|
}
|
|
if(param.get("gbResIds") != null){
|
|
if(param.get("gbResIds") != null){
|
|
sql.append(" AND M.resource_id in ( :gbResIds) ");
|
|
sql.append(" AND M.resource_id in ( :gbResIds) ");
|
|
@@ -2051,7 +2053,8 @@ hql.append("AND EXISTS (\n" +
|
|
//类型筛选
|
|
//类型筛选
|
|
Long gbTaskTypeId = ParameterUtil.getLong(param, "gbTaskTypeId");
|
|
Long gbTaskTypeId = ParameterUtil.getLong(param, "gbTaskTypeId");
|
|
if (gbTaskTypeId != null) {
|
|
if (gbTaskTypeId != null) {
|
|
- sql.append(" and ts.tasktype_id = :gbTaskTypeId ");
|
|
|
|
|
|
+ sql.append(" and ts.tasktype_id in (SELECT id FROM task_type WHERE status = 1 AND sub_type = 1 AND creator_id <> -1 "
|
|
|
|
+ + "AND (parent_id = :gbTaskTypeId OR id = :gbTaskTypeId) ) ");
|
|
}
|
|
}
|
|
|
|
|
|
//督办管理员看全部,部门主管看本部门所有人员,普通用户只看自己的数据
|
|
//督办管理员看全部,部门主管看本部门所有人员,普通用户只看自己的数据
|
|
@@ -2112,7 +2115,8 @@ hql.append("AND EXISTS (\n" +
|
|
sql.append(" and ts.tstate != 7 ");
|
|
sql.append(" and ts.tstate != 7 ");
|
|
String taskTypeId = ParameterUtil.getString(params, "taskTypeId");
|
|
String taskTypeId = ParameterUtil.getString(params, "taskTypeId");
|
|
if(StringUtils.isNotBlank(taskTypeId)){
|
|
if(StringUtils.isNotBlank(taskTypeId)){
|
|
- sql.append("and ts.tasktype_id = :taskTypeId ");
|
|
|
|
|
|
+ sql.append("and ts.tasktype_id in (SELECT id FROM task_type WHERE status = 1 AND sub_type = 1 AND creator_id <> -1 "
|
|
|
|
+ + "AND (parent_id = :taskTypeId OR id = :taskTypeId) ) ");
|
|
param.put("taskTypeId",taskTypeId);
|
|
param.put("taskTypeId",taskTypeId);
|
|
}
|
|
}
|
|
sql.append(" GROUP BY te.value,te.id ");
|
|
sql.append(" GROUP BY te.value,te.id ");
|
|
@@ -2138,7 +2142,8 @@ hql.append("AND EXISTS (\n" +
|
|
sql.append("where ts.tstate != 7 and to_char(ts.create_date, 'yyyy') = :year ");
|
|
sql.append("where ts.tstate != 7 and to_char(ts.create_date, 'yyyy') = :year ");
|
|
String taskTypeId = ParameterUtil.getString(params, "taskTypeId");
|
|
String taskTypeId = ParameterUtil.getString(params, "taskTypeId");
|
|
if(StringUtils.isNotBlank(taskTypeId)){
|
|
if(StringUtils.isNotBlank(taskTypeId)){
|
|
- sql.append("and ts.tasktype_id = :taskTypeId ");
|
|
|
|
|
|
+ sql.append("and ts.tasktype_id in (SELECT id FROM task_type WHERE status = 1 AND sub_type = 1 AND creator_id <> -1 "
|
|
|
|
+ + "AND (parent_id = :taskTypeId OR id = :taskTypeId) ) ");
|
|
param.put("taskTypeId",taskTypeId);
|
|
param.put("taskTypeId",taskTypeId);
|
|
}
|
|
}
|
|
sql.append("group by te.id, te.value, te.color ");
|
|
sql.append("group by te.id, te.value, te.color ");
|