Commit 952dcef5 by 罗绍泽

流程实例详情实现,考虑后期加一个环节可处理人列表,就是配置环节的时候的人员列表,但是activiti中暂时没有找到可以获取的方法

parent 539975bc
...@@ -102,6 +102,7 @@ ...@@ -102,6 +102,7 @@
<property name="taskService" ref="taskService"></property> <property name="taskService" ref="taskService"></property>
<property name="historyService" ref="historyService"></property> <property name="historyService" ref="historyService"></property>
<property name="repositoryService" ref="repositoryService"></property> <property name="repositoryService" ref="repositoryService"></property>
<property name="systemBackDAO" ref="systemBackDAO"></property>
</bean> </bean>
<bean id="ProcdefinitionInitLinkBusiness" class="com.gaowj.business.procdefinitionInitlink.ProcdefinitionInitLinkBusinessImpl"> <bean id="ProcdefinitionInitLinkBusiness" class="com.gaowj.business.procdefinitionInitlink.ProcdefinitionInitLinkBusinessImpl">
......
...@@ -304,6 +304,12 @@ function openProcEditRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_le ...@@ -304,6 +304,12 @@ function openProcEditRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_le
saveBox('detail','list'); saveBox('detail','list');
} }
}, { }, {
text : '退回',
iconCls : 'icon-ext-44_08',
handler : function() {
lastBox('detail','list');
}
}, {
text : '下一步', text : '下一步',
iconCls : 'icon-ext-44_08', iconCls : 'icon-ext-44_08',
handler : function() { handler : function() {
...@@ -327,6 +333,24 @@ function openProcEditRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_le ...@@ -327,6 +333,24 @@ function openProcEditRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_le
} }
/****/ /****/
//弹出层流程编辑上一步(退回)按扭
function lastBox(Box_id,List_id) {
if(Box_id==null||Box_id==''||Box_id==undefined)
Box_id='detail';
if(List_id==null||List_id==''||List_id==undefined)
List_id='list';
var returnIsValid = $('#inputForm').form('validate');
if (returnIsValid) {
//$("#inputForm").submit();
var query = $("#inputForm").getFormVal();
var v_result = backProc(query);
if (v_result != null && v_result != undefined) {
closeBox(Box_id);
$.messager.alert('提示', v_result.VALUE);
}
}
}
//弹出层流程编辑下一步按扭 //弹出层流程编辑下一步按扭
function nextBox(Box_id,List_id) { function nextBox(Box_id,List_id) {
if(Box_id==null||Box_id==''||Box_id==undefined) if(Box_id==null||Box_id==''||Box_id==undefined)
......
...@@ -29,7 +29,7 @@ var ls_module_id='2'; ...@@ -29,7 +29,7 @@ var ls_module_id='2';
var ls_ywlx = 'YBYW'; var ls_ywlx = 'YBYW';
//定义grid列表 //定义grid列表
var ls_title="选择人员"; var ls_title=null;
var is_column = [ [ var is_column = [ [
{field : 'LINK_NAME',title : '环节名',width : 300,align : 'center'}, {field : 'LINK_NAME',title : '环节名',width : 300,align : 'center'},
{field : 'PROC_DEFIN_KEY',title : 'PROC_DEFIN_KEY',width : 300,align : 'center'} {field : 'PROC_DEFIN_KEY',title : 'PROC_DEFIN_KEY',width : 300,align : 'center'}
......
...@@ -412,7 +412,7 @@ function procdefinitionImg(index){ ...@@ -412,7 +412,7 @@ function procdefinitionImg(index){
width : 1000, width : 1000,
height : 500, height : 500,
title : '流程图', title : '流程图',
content:'<img src="procdefinitionData_showProcdefinitionImg?deploymentId='+is_row[0].DEPLOYMENT_ID+'" />' content:'<div style="height:100%;overflow:auto;"><img src="procdefinitionData_showProcdefinitionImg?deploymentId='+is_row[0].DEPLOYMENT_ID+'" /></div>'
}); });
} }
...@@ -430,5 +430,5 @@ function choosePeopleRow(index){ ...@@ -430,5 +430,5 @@ function choosePeopleRow(index){
success:function(data){ success:function(data){
} }
}); });
openViewIframRow("choosePeople","procdefinitionView_procdefiChoosePeopleTab?DEPLOYMENT_ID="+is_row[0].DEPLOYMENT_ID,is_row[0],"选人列表",true,0.95,0.95,0,0); openViewIframRow("choosePeople","procdefinitionView_procdefiChoosePeopleTab?DEPLOYMENT_ID="+is_row[0].DEPLOYMENT_ID,is_row[0],"环节配置",true,0.95,0.95,0,0);
} }
...@@ -541,6 +541,64 @@ function showProcinstanceImg(index) { ...@@ -541,6 +541,64 @@ function showProcinstanceImg(index) {
width : 1000, width : 1000,
height : 500, height : 500,
title : '流程图', title : '流程图',
content:'<img src="procinstanceData_showProcinstanceImg?instanceId='+is_row[0].INSTANCE_ID+'" />' href:'procinstanceView_procinstanceTabHistory?instanceId='+is_row[0].INSTANCE_ID,
onLoad:function(){
$('#historyTable').datagrid({
iconCls:$.getJwWindowPic(),
url:gaowj.WEB_APP_NAME+"/procinstanceData_procinstanceHistory",
queryParams : {
processInstanceId:$("#instanceIdHide").val()
},//查询参数
rownumbers : true,//显示索引号
singleSelect : false,//是否多选
fitColumns : false,//是否撑满
autoRowHeight : false,//设定高度
rowStyler :function(index,row){return rowstyler(index,row);},
pagination : true,//分页显示
pageSize : rows,//显示行数
pageList : listPageSize,//条数选择
striped : true, //是否隔行显示
remoteSort : false,//是否从服务器排序
frozenColumns : [[
{
field : 'ck',
checkbox : true
}
]],
columns : [ [ {
field : 'ACTIVITY_NAME',
title : '环节名称',
width : 200,
align : 'center',
}, {
field : 'ASSIGNEE',
title : '办理人',
width : 200,
align : 'center',
}, {
field : 'START_TIME',
title : '开始时间',
width : 250,
align : 'center',
}, {
field : 'END_TIME',
title : '结束时间',
width : 250,
align : 'center',
} ] ],
onLoadSuccess : function() {
if(is_opetipmenuwidth==null){
is_opetipmenuwidth = 60;
}
}
});
}
}); });
}
//流程退回
function backProc(is_entity){
var v_result = proctaskModule.act.back(is_entity);
$('#list').datagrid('reload');
return v_result;
} }
\ No newline at end of file
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<div style="overflow:auto;height:100%;">
<div style="overflow:auto;">
<img src="procinstanceData_showProcinstanceImg?instanceId=${instanceId}" />
</div>
<input type="hidden" id="instanceIdHide" value="${instanceId}" />
<div id="historyTable"></div>
</div>
...@@ -16,6 +16,8 @@ proctaskModule.prototype.updateInfo = function(){}; ...@@ -16,6 +16,8 @@ proctaskModule.prototype.updateInfo = function(){};
proctaskModule.prototype.updateInfoToNext = function(){}; proctaskModule.prototype.updateInfoToNext = function(){};
//删除流程实例 //删除流程实例
proctaskModule.prototype.deleteInfo = function(){}; proctaskModule.prototype.deleteInfo = function(){};
//退回流程实例
proctaskModule.prototype.back = function(){};
//创建一个数据操作对象,然后再后续使用 //创建一个数据操作对象,然后再后续使用
proctaskModule.act = new proctaskModule("json").delegate("proctaskAct"); proctaskModule.act = new proctaskModule("json").delegate("proctaskAct");
......
...@@ -438,6 +438,6 @@ function showProcinstanceImg(index) { ...@@ -438,6 +438,6 @@ function showProcinstanceImg(index) {
width : 1000, width : 1000,
height : 500, height : 500,
title : '流程图', title : '流程图',
content:'<img src="procinstanceData_showProcinstanceImg?instanceId='+is_row[0].INSTANCE_ID+'" />' content:'<div style="height:100%;overflow:auto;"><img src="procinstanceData_showProcinstanceImg?instanceId='+is_row[0].INSTANCE_ID+'" /></div>'
}); });
} }
\ No newline at end of file
...@@ -18,6 +18,12 @@ import com.gaowj.business.ProcinstanceBusiness; ...@@ -18,6 +18,12 @@ import com.gaowj.business.ProcinstanceBusiness;
import com.gaowj.business.comp.BusinessManager; import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.util.SessionUtil; import com.gaowj.business.util.SessionUtil;
/**
* 流程任务新建时,设置该任务在数据库存储的人员列表
*
* @author luosz
*
*/
public class AssignmentTaskListener implements TaskListener { public class AssignmentTaskListener implements TaskListener {
/** /**
...@@ -28,49 +34,28 @@ public class AssignmentTaskListener implements TaskListener { ...@@ -28,49 +34,28 @@ public class AssignmentTaskListener implements TaskListener {
@Override @Override
public void notify(DelegateTask task) { public void notify(DelegateTask task) {
ApplicationContext context = ContextLoaderListener.getCurrentWebApplicationContext(); ApplicationContext context = ContextLoaderListener.getCurrentWebApplicationContext();
HistoryService historyService=(HistoryService) context.getBean("historyService"); HistoryService historyService = (HistoryService) context.getBean("historyService");
// 获取流程历史中已执行节点,并按照节点在流程中执行先后顺序排序 // 获取流程历史中已执行节点,并按照节点在流程中执行先后顺序排序
List<HistoricActivityInstance> historicActivityInstanceList = historyService.createHistoricActivityInstanceQuery().processInstanceId(task.getProcessInstanceId()).orderByHistoricActivityInstanceId().asc().list(); List<HistoricActivityInstance> historicActivityInstanceList = historyService.createHistoricActivityInstanceQuery().processInstanceId(task.getProcessInstanceId()).orderByHistoricActivityInstanceId().asc().list();
System.out.println("历史环节数量:"+historicActivityInstanceList.size());
if (historicActivityInstanceList.size() == 0) {
if(historicActivityInstanceList.size()==0){ // 如果历史环节数量为0,则表示这个实例第一次启动,第一个环节默认为当前登陆人
//如果历史环节数量为0,则表示这个实例第一次启动,第一个环节默认为当前登陆人 // task.setAssignee(SessionUtil.getCode());
//task.setAssignee(SessionUtil.getCode()); List<String> listUserId = new ArrayList<String>();
List<String> listUserId=new ArrayList<String>();
listUserId.add(SessionUtil.getCode()); listUserId.add(SessionUtil.getCode());
task.addCandidateUsers(listUserId); task.addCandidateUsers(listUserId);
}else{ } else {
//读取环节人员配置信息,循环设置人员 // 读取环节人员配置信息,循环设置人员
ProcdefiChooseUserBusiness procdefiChooseUserBusiness=(ProcdefiChooseUserBusiness) context.getBean("ProcdefiChooseUserBusiness"); ProcdefiChooseUserBusiness procdefiChooseUserBusiness = (ProcdefiChooseUserBusiness) context.getBean("ProcdefiChooseUserBusiness");
Map<String, Object> query=new HashMap<String, Object>(); Map<String, Object> query = new HashMap<String, Object>();
query.put("LINK_KEY", task.getTaskDefinitionKey().toString()); query.put("LINK_KEY", task.getTaskDefinitionKey().toString());
List<Map<String, Object>> listUser=procdefiChooseUserBusiness.list_procdefi_chooseUser(query); List<Map<String, Object>> listUser = procdefiChooseUserBusiness.list_procdefi_chooseUser(query);
List<String> listUserId=new ArrayList<String>(); List<String> listUserId = new ArrayList<String>();
for(Map<String, Object> user:listUser){ for (Map<String, Object> user : listUser) {
listUserId.add(user.get("CODE").toString()); listUserId.add(user.get("CODE").toString());
} }
task.addCandidateUsers(listUserId); task.addCandidateUsers(listUserId);
} }
/*System.out.println(task.getAssignee());
System.out.println(task.getCategory());
System.out.println(task.getDescription());
System.out.println(task.getEventName());
System.out.println(task.getExecutionId());
System.out.println(task.getFormKey());
System.out.println(task.getId());
System.out.println(task.getName());
System.out.println(task.getOwner());
System.out.println(task.getPriority());
System.out.println(task.getProcessDefinitionId());
System.out.println(task.getProcessInstanceId());
System.out.println(task.getTaskDefinitionKey());
System.out.println(task.getTenantId());
System.out.println(task.getVariables().toString());*/
//
} }
} }
package com.gaowj.activiti.listener;
import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;
import com.gaowj.business.util.SessionUtil;
/**
* 任务完成时,设置实际的办理人为当前登录人
*
* @author luosz
*
*/
public class AssignmentTaskListenerComplete implements TaskListener {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void notify(DelegateTask task) {
task.setAssignee(SessionUtil.getCode());
}
}
...@@ -58,6 +58,16 @@ public interface ProcinstanceBusiness { ...@@ -58,6 +58,16 @@ public interface ProcinstanceBusiness {
* @throws BusinessException * @throws BusinessException
*/ */
Page<Map<String, Object>> list_proc_instance(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException; Page<Map<String, Object>> list_proc_instance(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException;
/**
* 获取历史任务列表
* @param pageNo
* @param pageSize
* @param query
* @return
* @throws BusinessException
*/
List<Map<String, Object>> list_proc_instance_history(String processInstanceId) throws BusinessException;
/** /**
* 获取所有记录 * 获取所有记录
......
...@@ -22,4 +22,6 @@ public interface ProctaskBusiness { ...@@ -22,4 +22,6 @@ public interface ProctaskBusiness {
Map<String, Object> update(Map<String, Object> entity) throws BusinessException; Map<String, Object> update(Map<String, Object> entity) throws BusinessException;
Map<String, Object> updateToNext(String taskId,Map<String, Object> entity) throws BusinessException; Map<String, Object> updateToNext(String taskId,Map<String, Object> entity) throws BusinessException;
Map<String, Object> back(Map<String, Object> entity) throws BusinessException;
} }
...@@ -270,6 +270,9 @@ public class ProcdefinitionmodelsBusinessImpl implements ProcdefinitionmodelsBus ...@@ -270,6 +270,9 @@ public class ProcdefinitionmodelsBusinessImpl implements ProcdefinitionmodelsBus
Element taskListener=extensionElements.addElement("activiti:taskListener"); Element taskListener=extensionElements.addElement("activiti:taskListener");
taskListener.addAttribute("event", "create"); taskListener.addAttribute("event", "create");
taskListener.addAttribute("class", "com.gaowj.activiti.listener.AssignmentTaskListener"); taskListener.addAttribute("class", "com.gaowj.activiti.listener.AssignmentTaskListener");
Element taskListenerComplete=extensionElements.addElement("activiti:taskListener");
taskListenerComplete.addAttribute("event", "complete");
taskListenerComplete.addAttribute("class", "com.gaowj.activiti.listener.AssignmentTaskListenerComplete");
} }
} }
bpmText=doc.asXML(); bpmText=doc.asXML();
......
...@@ -21,6 +21,7 @@ import org.activiti.engine.RuntimeService; ...@@ -21,6 +21,7 @@ import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService; import org.activiti.engine.TaskService;
import org.activiti.engine.history.HistoricActivityInstance; import org.activiti.engine.history.HistoricActivityInstance;
import org.activiti.engine.history.HistoricProcessInstance; import org.activiti.engine.history.HistoricProcessInstance;
import org.activiti.engine.history.HistoricTaskInstance;
import org.activiti.engine.repository.ProcessDefinition; import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.runtime.ProcessInstance; import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task; import org.activiti.engine.task.Task;
...@@ -31,6 +32,7 @@ import com.gaowj.business.ProcinstanceBusiness; ...@@ -31,6 +32,7 @@ import com.gaowj.business.ProcinstanceBusiness;
import com.gaowj.business.exception.BusinessException; import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.formtable.formtableDAO; import com.gaowj.business.formtable.formtableDAO;
import com.gaowj.business.procdefinition.procdefinitionDAO; import com.gaowj.business.procdefinition.procdefinitionDAO;
import com.gaowj.business.system.SystemBackDAO;
import com.gaowj.business.util.Page; import com.gaowj.business.util.Page;
import com.gaowj.business.util.SessionUtil; import com.gaowj.business.util.SessionUtil;
...@@ -49,6 +51,8 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness { ...@@ -49,6 +51,8 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
private HistoryService historyService; private HistoryService historyService;
private RepositoryService repositoryService; private RepositoryService repositoryService;
private SystemBackDAO systemBackDAO;
public RuntimeService getRuntimeService() { public RuntimeService getRuntimeService() {
return runtimeService; return runtimeService;
...@@ -107,6 +111,14 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness { ...@@ -107,6 +111,14 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
this.repositoryService = repositoryService; this.repositoryService = repositoryService;
} }
public SystemBackDAO getSystemBackDAO() {
return systemBackDAO;
}
public void setSystemBackDAO(SystemBackDAO systemBackDAO) {
this.systemBackDAO = systemBackDAO;
}
@Override @Override
public Map<String, Object> insert_proc_instance(Map<String, Object> entity) throws BusinessException { public Map<String, Object> insert_proc_instance(Map<String, Object> entity) throws BusinessException {
//流程定义id //流程定义id
...@@ -443,36 +455,53 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness { ...@@ -443,36 +455,53 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
page.setItems(items); page.setItems(items);
return page; return page;
/*// 计算起始记录 }
int pageStart = (pageNo - 1) * pageSize;
ProcessInstanceQuery leaveDynamicQuery = runtimeService.createProcessInstanceQuery() @Override
.orderByProcessInstanceId().desc().active(); public List<Map<String, Object>> list_proc_instance_history(String processInstanceId) throws BusinessException{
if(query.get("PROCDEFINITION_UUID")!=null&&!"".equals(query.get("PROCDEFINITION_UUID"))){ List<HistoricActivityInstance> listHistoricActivityInstance = historyService // 历史相关Service
Map<String, Object> query2=new HashMap<String, Object>(); .createHistoricActivityInstanceQuery() // 创建历史活动实例查询
query2.put("UUID", query.get("PROCDEFINITION_UUID")); .processInstanceId(processInstanceId) // 执行流程实例id
String deploymentKey=procdefinitionDAO.list_procde_finition(query2).get(0).get("DEPLOYMENT_KEY").toString(); //.finished()
.orderByHistoricActivityInstanceStartTime().asc().list();
if(deploymentKey!=null&&!"".equals(deploymentKey)){
leaveDynamicQuery.processDefinitionKey(deploymentKey); List<Map<String, Object>> list=new ArrayList<Map<String,Object>>();
List<String> listAssignee=new ArrayList<String>();
for (HistoricActivityInstance hai : listHistoricActivityInstance) {
if(hai.getActivityName()==null){
continue;
} }
if(hai.getAssignee()==null&&hai.getEndTime()!=null){
//如果没有办理人,但是有结束时间,任务该环节是开始环节,默认剔除
continue;
}
if(hai.getAssignee()!=null){
listAssignee.add(hai.getAssignee());
}
Map<String,Object> entry=new HashMap<String, Object>();
entry.put("ACTIVITY_NAME", hai.getActivityName());
entry.put("ASSIGNEE", hai.getAssignee()==null?"":hai.getAssignee());
entry.put("START_TIME", hai.getStartTime());
entry.put("END_TIME", hai.getEndTime()==null?"":hai.getEndTime());
list.add(entry);
} }
List<ProcessInstance> list = leaveDynamicQuery.listPage(pageStart, pageSize);
List<Map<String, Object>> items=new ArrayList<Map<String,Object>>(); Map<String,Object> query=new HashMap<String, Object>();
for(ProcessInstance processInstance:list){ query.put("CODE_IN", listAssignee);
Map<String, Object> item=new HashMap<String, Object>(); List<Map<String, Object>> items = systemBackDAO.listLoginUserInfo(query);
items.add(item);
outer:
item.put("NAME", processInstance.getName()); for(Map<String, Object> m:list){
for(Map<String, Object> user:items){
if(m.get("ASSIGNEE")!=null&&!"".equals(m.get("ASSIGNEE"))){
if(m.get("ASSIGNEE").equals(user.get("CODE"))){
m.put("ASSIGNEE",user.get("EMNAME"));
continue outer;
}
}
}
} }
return list;
int count=(int) leaveDynamicQuery.count();
// 创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return page;*/
} }
@Override @Override
......
...@@ -6,6 +6,7 @@ import java.net.URLEncoder; ...@@ -6,6 +6,7 @@ import java.net.URLEncoder;
import java.sql.SQLException; import java.sql.SQLException;
import java.text.ParseException; import java.text.ParseException;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import com.gaowj.business.ProcdefinitionBusiness; import com.gaowj.business.ProcdefinitionBusiness;
...@@ -103,4 +104,24 @@ public class dataAction extends BasicAction{ ...@@ -103,4 +104,24 @@ public class dataAction extends BasicAction{
} }
return name; return name;
} }
public String procinstanceHistory() throws BusinessException {
ProcinstanceBusiness business = BusinessManager.getBusiness(ProcinstanceBusiness.class);
try {
List<Map<String, Object>> listRows = business.list_proc_instance_history(RequestUtils.getString(request, "processInstanceId"));
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateTimeToString(listRows));
data.put("pageNo", pageNo);
data.put("pageSize", pageSize);
data.put("pageCount", pageCount);
data.put("rows", data.get("rowSet"));
data.put("total", listRows.size());
jsonObject = new JSONObject();
jsonObject.putAll(data);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "json";
}
} }
...@@ -28,5 +28,10 @@ public class viewAction extends BasicAction { ...@@ -28,5 +28,10 @@ public class viewAction extends BasicAction {
request.setAttribute("is_row", query); request.setAttribute("is_row", query);
return "procinstanceTabDetailEdit"; return "procinstanceTabDetailEdit";
} }
public String procinstanceTabHistory() throws BusinessException{
request.setAttribute("instanceId", RequestUtils.getString(request, "instanceId"));
return "procinstanceTabHistory";
}
} }
...@@ -84,4 +84,19 @@ public class actAction extends BasicAction{ ...@@ -84,4 +84,19 @@ public class actAction extends BasicAction{
} }
return "json"; return "json";
} }
public String back() throws BusinessException {
ProctaskBusiness business = BusinessManager.getBusiness(ProctaskBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
jsonObject = new JSONObject();
try {
entity = QueryParamUtil.StringToDate(entity);
//business.list_proc_task(pageNo, pageSize, query)
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("保存失败"));
e.printStackTrace();
}
return "json";
}
} }
...@@ -103,6 +103,14 @@ ...@@ -103,6 +103,14 @@
<if test="EMID != null and EMID != ''"> <if test="EMID != null and EMID != ''">
and u.emid like CONCAT('%',#{EMID},'%') and u.emid like CONCAT('%',#{EMID},'%')
</if> </if>
<if test="CODE_IN != null and CODE_IN != ''">
and u.code IN
<trim prefix="(" suffix=")" suffixOverrides=",">
<foreach collection="CODE_IN" item="value">
#{value},
</foreach>
</trim>
</if>
<if test="NAME != null and NAME != ''"> <if test="NAME != null and NAME != ''">
and u.emid in (select lu.emid from c_t_sys_loginuser lu where lu.emname like CONCAT('%',#{NAME},'%') or lu.emid like CONCAT('%',#{NAME},'%')) and u.emid in (select lu.emid from c_t_sys_loginuser lu where lu.emname like CONCAT('%',#{NAME},'%') or lu.emid like CONCAT('%',#{NAME},'%'))
</if> </if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment