Commit 539975bc by 罗绍泽

流程实例完善

parent 12e0aa2a
...@@ -315,4 +315,22 @@ ...@@ -315,4 +315,22 @@
} }
.icon-ext-01_10{ .icon-ext-01_10{
background:url('../../../../images/icons/(01,10).png') no-repeat left center; background:url('../../../../images/icons/(01,10).png') no-repeat left center;
}
.icon-ext-01_41{
background:url('../../../../images/icons/(01,41).png') no-repeat left center;
}
.icon-ext-03_15{
background:url('../../../../images/icons/(03,15).png') no-repeat left center;
}
.icon-ext-04_36{
background:url('../../../../images/icons/(04,36).png') no-repeat left center;
}
.icon-ext-07_13{
background:url('../../../../images/icons/(07,13).png') no-repeat left center;
}
.icon-ext-44_08{
background:url('../../../../images/icons/(44,08).png') no-repeat left center;
}
.icon-ext-17_02{
background:url('../../../../images/icons/(17,02).png') no-repeat left center;
} }
\ No newline at end of file
...@@ -423,11 +423,12 @@ ...@@ -423,11 +423,12 @@
u : [], u : [],
ul : [ 'class', 'style' ], ul : [ 'class', 'style' ],
video : [ 'autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', 'class', 'style' ], video : [ 'autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', 'class', 'style' ],
input : ['type','value','id','name','style'], input : ['type','value','id','name','style','class'],
source: ['src', 'type'], source: ['src', 'type'],
embed: ['type', 'class', 'pluginspage', 'src', 'width', 'height', 'align', 'style', 'wmode', 'play', embed: ['type', 'class', 'pluginspage', 'src', 'width', 'height', 'align', 'style', 'wmode', 'play',
'loop', 'menu', 'allowscriptaccess', 'allowfullscreen','controls', 'preload','autoplay'], 'loop', 'menu', 'allowscriptaccess', 'allowfullscreen','controls', 'preload','autoplay'],
iframe: ['src', 'class', 'height', 'width', 'max-width', 'max-height', 'align', 'frameborder', 'allowfullscreen'] iframe: ['src', 'class', 'height', 'width', 'max-width', 'max-height', 'align', 'frameborder', 'allowfullscreen'],
script:[]
} }
}; };
......
...@@ -305,7 +305,7 @@ function openProcEditRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_le ...@@ -305,7 +305,7 @@ function openProcEditRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_le
} }
}, { }, {
text : '下一步', text : '下一步',
iconCls : 'icon-ok', iconCls : 'icon-ext-44_08',
handler : function() { handler : function() {
nextBox('detail','list'); nextBox('detail','list');
} }
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}" /> <input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}" /> <input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}" /> <input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}" />
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;"> <table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr> <tr>
<td style="width: 15%;" class="tableStyleLable"> <td style="width: 10%;" class="tableStyleLable">
<span>模板名称:</span> <span>模板名称:</span>
</td> </td>
<td style="width: 30%"> <td style="width: 89%">
<input class="easyui-textbox" id="MODEL_NAME" name="FIELD_MODEL_NAME" value="${is_row.MODEL_NAME}" style="width:200px" /> <input class="easyui-textbox" id="MODEL_NAME" name="FIELD_MODEL_NAME" value="${is_row.MODEL_NAME}" style="width:200px" />
</td> </td>
<!-- <td style="width: 15%;" class="tableStyleLable"> <!-- <td style="width: 15%;" class="tableStyleLable">
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</td> --> </td> -->
</tr> </tr>
</table> </table>
<div id="ueditId" name="FIELD_ueditValue"> <div id="ueditId" name="FIELD_ueditValue" style="height:100%">
</div> </div>
</form> </form>
\ No newline at end of file
...@@ -156,7 +156,7 @@ function editRow(index) { ...@@ -156,7 +156,7 @@ function editRow(index) {
var is_row = $('#list').datagrid('getSelections'); var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections'); $('#list').datagrid('clearSelections');
is_row[0].OPETYPE = 'update'; is_row[0].OPETYPE = 'update';
openEditRow("formmodelView_formmodelTabDetail",is_row[0],"编辑",true,0.65,0.95,0,0); openEditRow("formmodelView_formmodelTabDetail",is_row[0],"编辑",true,0.95,0.95,0,0);
} }
//加载修改子页面成功后的回调 //加载修改子页面成功后的回调
......
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
<table id="list" style="width: 100%; height: 100%;"></table> <table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb"> <div id="tb">
<form id="formTableTab_searchForm" style="float:left"> <form id="formTableTab_searchForm" style="float:left">
姓名: <input class="easyui-textbox" id="FIELD_NAME" name="FIELD_TABLE_NAME" style="width:200px"/>&nbsp;&nbsp; 表名: <input class="easyui-textbox" id="FIELD_TABLE_NAME" name="FIELD_TABLE_NAME" style="width:200px"/>&nbsp;&nbsp;
描述: <input class="easyui-textbox" id="FIELD_CONTENT" name="FIELD_CONTENT" style="width:200px"/>&nbsp;&nbsp;
</form> </form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a> <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a> <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
......
...@@ -16,6 +16,9 @@ formtableModule.prototype.updateFormTable = function(){}; ...@@ -16,6 +16,9 @@ formtableModule.prototype.updateFormTable = function(){};
formtableModule.prototype.deleteFormTable = function(){}; formtableModule.prototype.deleteFormTable = function(){};
//获取所有的表数据 //获取所有的表数据
formtableModule.prototype.listFormTable = function(){}; formtableModule.prototype.listFormTable = function(){};
//同步表结构
formtableModule.prototype.synchFormTable = function(){};
//创建一个数据操作对象,然后再后续使用 //创建一个数据操作对象,然后再后续使用
formtableModule.act = new formtableModule("json").delegate("formtableAct"); formtableModule.act = new formtableModule("json").delegate("formtableAct");
......
...@@ -179,8 +179,8 @@ var tr=['<tr>', ...@@ -179,8 +179,8 @@ var tr=['<tr>',
//定义grid列表 //定义grid列表
var ls_title="表单管理&nbsp;&nbsp;"; var ls_title="表单管理&nbsp;&nbsp;";
var is_column = [ [ var is_column = [ [
{field : 'TABLE_NAME',title : '表名',width : 100,align : 'center'}, {field : 'TABLE_NAME',title : '表名',width : 120,align : 'left'},
{field : 'CONTENT',title : '描述',width : 80,align : 'center'}, {field : 'CONTENT',title : '描述',width : 180,align : 'left'},
{field : 'IS_DBSYNCH',title : '是否同步到数据库',width : 100,align : 'center',formatter:function(value,row,index){ {field : 'IS_DBSYNCH',title : '是否同步到数据库',width : 100,align : 'center',formatter:function(value,row,index){
if(value=='0'){ if(value=='0'){
return "未同步"; return "未同步";
...@@ -228,9 +228,9 @@ function formatMenu(value, data,index) { ...@@ -228,9 +228,9 @@ function formatMenu(value, data,index) {
//上浮横向菜单集里的具体菜单项(需更改) //上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(data,index){ function getOptionMenu(data,index){
var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('" var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('"
+ index + "')\">编辑</a> | <span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"templateRow('" + index + "')\">编辑</a> | <span class=\"icon-ext-03_15\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"templateRow('"
+ index + "')\">模板</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"synchRow('" + index + "')\">模板</a> | <span class=\"icon-ext-01_41\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"synchRow('"
+ index + "')\">同步</a> | <span class=\"icon-ext-file\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('" + index + "')\">同步</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a>"; + index + "')\">删除</a>";
return returnData; return returnData;
} }
...@@ -336,7 +336,7 @@ function fieldModel(i,field){ ...@@ -336,7 +336,7 @@ function fieldModel(i,field){
field_name:'<input type="text" name="LIST['+i+'].NAME" value="'+field.FIELD_NAME+'" />', field_name:'<input type="text" name="LIST['+i+'].NAME" value="'+field.FIELD_NAME+'" />',
content:'<input type="text" name="LIST['+i+'].CONTENT" value="'+field.CONTENT+'" />', content:'<input type="text" name="LIST['+i+'].CONTENT" value="'+field.CONTENT+'" />',
type:'<input type="combobox" name="LIST['+i+'].TYPE" value="'+field.TYPE+'" />', type:'<input type="combobox" name="LIST['+i+'].TYPE" value="'+field.TYPE+'" />',
length:'<input placeholder="dfsd" type="text" name="LIST['+i+'].LENGTH" value="'+field.LENGTH+'" />', length:'<input placeholder="" type="text" name="LIST['+i+'].LENGTH" value="'+field.LENGTH+'" />',
point:'<input type="text" name="LIST['+i+'].POINT" value="'+field.POINT+'" />', point:'<input type="text" name="LIST['+i+'].POINT" value="'+field.POINT+'" />',
field_default:'<input type="text" name="LIST['+i+'].FIELD_DEFAULT" value="'+field.FIELD_DEFAULT+'" />', field_default:'<input type="text" name="LIST['+i+'].FIELD_DEFAULT" value="'+field.FIELD_DEFAULT+'" />',
field_width:'<input type="text" name="LIST['+i+'].FIELD_WIDTH" value="'+field.FIELD_WIDTH+'" />', field_width:'<input type="text" name="LIST['+i+'].FIELD_WIDTH" value="'+field.FIELD_WIDTH+'" />',
...@@ -622,16 +622,12 @@ function synchRow(index){ ...@@ -622,16 +622,12 @@ function synchRow(index){
$.messager.alert('警告',"该表已同步到数据库",'info'); $.messager.alert('警告',"该表已同步到数据库",'info');
return; return;
} }
$.ajax({
url:'formtableAct_synchFormTable',
data:{
tableId:is_row[0].UUID,
tableName:is_row[0].TABLE_NAME
},
success:function(data){
$('#list').datagrid('load',{});
}
});
//formtableModule.act.updateFormTable(is_row[0])
var v_result = formtableModule.act.synchFormTable({
tableId:is_row[0].UUID,
tableName:is_row[0].TABLE_NAME,
content:is_row[0].CONTENT
});
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
} }
\ No newline at end of file
...@@ -46,7 +46,7 @@ $(function(){ ...@@ -46,7 +46,7 @@ $(function(){
//展示列表 //展示列表
/*datagridLog("list1", ls_title, gaowj.WEB_APP_NAME + "/systemdata_listSysUser", queryData, is_column, 60, 80); /*datagridLog("list1", ls_title, gaowj.WEB_APP_NAME + "/systemdata_listSysUser", queryData, is_column, 60, 80);
datagridLog("list2", ls_title, gaowj.WEB_APP_NAME + "/systemdata_listSysUser", queryData, is_column, 60, 80);*/ datagridLog("list2", ls_title, gaowj.WEB_APP_NAME + "/systemdata_listSysUser", queryData, is_column, 60, 80);*/
var linkId=$.getUrlParam("procdef_linkId"); var linkKey=$.getUrlParam("linkKey");
$('#list1').datagrid({ $('#list1').datagrid({
title:'人员', title:'人员',
idField:'CODE', idField:'CODE',
...@@ -82,7 +82,7 @@ $(function(){ ...@@ -82,7 +82,7 @@ $(function(){
title:'人员', title:'人员',
idField:'CODE', idField:'CODE',
iconCls:$.getJwWindowPic(), iconCls:$.getJwWindowPic(),
url:gaowj.WEB_APP_NAME + "/procdefinitionData_getChooseUser?key_id="+linkId, url:gaowj.WEB_APP_NAME + "/procdefinitionData_getChooseUser?linkKey="+linkKey,
queryParams : queryData,//查询参数 queryParams : queryData,//查询参数
rownumbers : true,//显示索引号 rownumbers : true,//显示索引号
singleSelect : false,//是否多选 singleSelect : false,//是否多选
...@@ -165,7 +165,7 @@ function cancelChoosePeople(){ ...@@ -165,7 +165,7 @@ function cancelChoosePeople(){
} }
} }
function savePeople(key_id){ function savePeople(linkKey){
var map={}; var map={};
var arr=""; var arr="";
var is_row = $('#list2').datagrid('getRows'); var is_row = $('#list2').datagrid('getRows');
...@@ -175,7 +175,7 @@ function savePeople(key_id){ ...@@ -175,7 +175,7 @@ function savePeople(key_id){
$.ajax({ $.ajax({
url:gaowj.WEB_APP_NAME + "/procdefinitionAct_savePeople", url:gaowj.WEB_APP_NAME + "/procdefinitionAct_savePeople",
data:{ data:{
KEY_ID:key_id, LINK_KEY:linkKey,
USER_IDS:arr USER_IDS:arr
}, },
success:function(){ success:function(){
......
...@@ -89,6 +89,7 @@ function memberRow(index){ ...@@ -89,6 +89,7 @@ function memberRow(index){
var is_row = $('#list').datagrid('getSelections'); var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections'); $('#list').datagrid('clearSelections');
is_row[0].OPETYPE = 'insert'; is_row[0].OPETYPE = 'insert';
console.log(is_row[0])
$('#people').dialog( { $('#people').dialog( {
title : '选择人员', title : '选择人员',
iconCls : $.getJwWindowPic(), iconCls : $.getJwWindowPic(),
...@@ -99,14 +100,14 @@ function memberRow(index){ ...@@ -99,14 +100,14 @@ function memberRow(index){
maximizable:true, maximizable:true,
left:0, left:0,
top:0, top:0,
content : '<iframe scrolling="yes" id="choosePeopleIframe" frameborder="0" src="procdefinitionView_peopleTab?procdef_linkId='+is_row[0].UUID+'" style="width:100%;height:98%;"></iframe><span id="return_text"></span>', content : '<iframe scrolling="yes" id="choosePeopleIframe" frameborder="0" src="procdefinitionView_peopleTab?linkKey='+is_row[0].LINK_KEY+'" style="width:100%;height:98%;"></iframe><span id="return_text"></span>',
queryParams:is_row[0], queryParams:is_row[0],
modal : true, modal : true,
buttons : [{ buttons : [{
text : '保存', text : '保存',
iconCls : 'icon-save', iconCls : 'icon-save',
handler : function() { handler : function() {
document.getElementById("choosePeopleIframe").contentWindow.savePeople(is_row[0].UUID); document.getElementById("choosePeopleIframe").contentWindow.savePeople(is_row[0].LINK_KEY);
$('#people').dialog('close'); $('#people').dialog('close');
} }
} ,{ } ,{
......
...@@ -106,11 +106,11 @@ function formatMenu(value, data,index) { ...@@ -106,11 +106,11 @@ function formatMenu(value, data,index) {
//上浮横向菜单集里的具体菜单项(需更改) //上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(data,index){ function getOptionMenu(data,index){
var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('" var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('"
+ index + "')\">编辑</a> | <span class=\"icon-ext-file\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"modelList('" + index + "')\">编辑</a> | <span class=\"icon-ext-03_15\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"modelList('"
+ index + "')\">模板</a> | <span class=\"icon-ext-file\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"procdefinitionImg('" + index + "')\">模板</a> | <span class=\"icon-ext-04_36\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"procdefinitionImg('"
+ index + "')\">流程图</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('" + index + "')\">流程图</a> | <span class=\"icon-ext-07_13\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"choosePeopleRow('"
+ index + "')\">删除</a> | <span class=\"icon-ext-file\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"choosePeopleRow('" + index + "')\">配置</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">选人</a> "; + index + "')\">删除</a> ";
return returnData; return returnData;
} }
......
...@@ -137,8 +137,7 @@ function formatMenu(value, data,index) { ...@@ -137,8 +137,7 @@ function formatMenu(value, data,index) {
//上浮横向菜单集里的具体菜单项(需更改) //上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(data,index){ function getOptionMenu(data,index){
var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"design('" var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"design('"
+ index + "')\">设计</a> | <span class=\"icon-ext-file\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"configureUser('" + index + "')\">设计</a> | <span class=\"icon-ext-file\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deploy('"
+ index + "')\">人员</a> | <span class=\"icon-ext-file\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deploy('"
+ index + "')\">部署</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('" + index + "')\">部署</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a>"; + index + "')\">删除</a>";
return returnData; return returnData;
...@@ -146,7 +145,7 @@ function getOptionMenu(data,index){ ...@@ -146,7 +145,7 @@ function getOptionMenu(data,index){
//返回菜单集的菜单个数(需更改) //返回菜单集的菜单个数(需更改)
function getOptionMenuCount(){ function getOptionMenuCount(){
var is_menu_count = 4; var is_menu_count = 3;
return is_menu_count; return is_menu_count;
} }
......
...@@ -69,7 +69,7 @@ for(var i=1;i<v_data_procdefinition.length;i++){ ...@@ -69,7 +69,7 @@ for(var i=1;i<v_data_procdefinition.length;i++){
* 备注:需更改 * 备注:需更改
**/ **/
//定义grid列表 //定义grid列表
var ls_title=null; var ls_title="流程实例&nbsp;&nbsp;";
var is_column = [[ var is_column = [[
{field:'PROC_NAME',title:'流程',width:100}, {field:'PROC_NAME',title:'流程',width:100},
{field:'INSTANCE_ID',title:'实例id',width:80,formatter:function(value,row,index){ {field:'INSTANCE_ID',title:'实例id',width:80,formatter:function(value,row,index){
...@@ -135,9 +135,9 @@ function getOptionMenu(data,index){ ...@@ -135,9 +135,9 @@ function getOptionMenu(data,index){
var returnData=[]; var returnData=[];
var editBtn="<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('" var editBtn="<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('"
+ index + "')\">处理</a>"; + index + "')\">处理</a>";
var delBtn="<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"showProcinstanceImg('" var delBtn="<span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a>"; + index + "')\">删除</a>";
var procinstanceImgBtn="<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"showProcinstanceImg('" var procinstanceImgBtn="<span class=\"icon-ext-17_02\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"showProcinstanceImg('"
+ index + "')\">进度</a>"; + index + "')\">进度</a>";
returnData.push(editBtn); returnData.push(editBtn);
returnData.push(delBtn); returnData.push(delBtn);
...@@ -238,6 +238,8 @@ function fillTable2(businessId,taskId){ ...@@ -238,6 +238,8 @@ function fillTable2(businessId,taskId){
info.BUSINESS_DATA['FIELD_TASK_ID_SYSTEM']=taskId; info.BUSINESS_DATA['FIELD_TASK_ID_SYSTEM']=taskId;
$("#inputForm").form('load',info.BUSINESS_DATA); $("#inputForm").form('load',info.BUSINESS_DATA);
//$.parser.parse();
} }
//下一步按钮执行事件 //下一步按钮执行事件
function updateDataToNext(is_entity){ function updateDataToNext(is_entity){
...@@ -260,20 +262,24 @@ function updateDataToNext(is_entity){ ...@@ -260,20 +262,24 @@ function updateDataToNext(is_entity){
**/ **/
function deleteRow(index){ function deleteRow(index){
$('#list').datagrid('selectRow',index); $('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections'); var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections'); $('#list').datagrid('clearSelections');
var code = is_row[0].UUID; if(is_row[0].COMPLETE==0&&is_row[0].INSTANCE_ID==null){
$.messager.confirm('提示', '确定删除?', function(r) { //执行删除
if (r) { var code = is_row[0].UUID;
var v_query = {}; $.messager.confirm('提示', '确定删除?', function(r) {
v_query.FIELD_CODE = code; if (r) {
var v_result = procdefinitionmodelsModule.act.deleteProcdefinitionmodels(v_query); var v_query = {};
$.messager.alert('提示',v_result.VALUE); v_query.FIELD_CODE = code;
$('#list').datagrid('reload'); var v_result = procinstanceModule.act.deleteInfo(v_query);
} $.messager.alert('提示',v_result.VALUE);
}); $('#list').datagrid('reload');
}
});
}else{
$.messager.alert('提示','已启动的流程不得删除!');
}
} }
/****/ /****/
...@@ -297,6 +303,14 @@ function deleteBatchRow(){ ...@@ -297,6 +303,14 @@ function deleteBatchRow(){
$.messager.alert('提示',"请选择需删除的记录!",'info'); $.messager.alert('提示',"请选择需删除的记录!",'info');
return; return;
} }
for(var i=0;i<rows.length;i++){
if(!(rows[i].COMPLETE==0&&rows[i].INSTANCE_ID==null)){
$.messager.alert('提示','已启动的流程不得删除!');
return;
}
}
if(code.length>0){ if(code.length>0){
code = code.substring(0,code.length - 1); code = code.substring(0,code.length - 1);
} }
...@@ -304,7 +318,7 @@ function deleteBatchRow(){ ...@@ -304,7 +318,7 @@ function deleteBatchRow(){
if (r) { if (r) {
var v_query = {}; var v_query = {};
v_query.FIELD_CODE = code; v_query.FIELD_CODE = code;
var v_result = procdefinitionmodelsModule.act.deleteProcdefinitionmodels(v_query); var v_result = procinstanceModule.act.deleteInfo(v_query);
$.messager.alert('提示',v_result.VALUE); $.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload'); $('#list').datagrid('reload');
} }
...@@ -515,6 +529,7 @@ function fillTable(){ ...@@ -515,6 +529,7 @@ function fillTable(){
$("#table_content").html(table_content.MODEL_CONTENT); $("#table_content").html(table_content.MODEL_CONTENT);
$("#FIELD_FORM_MODEL_ID").val(table_content.UUID); $("#FIELD_FORM_MODEL_ID").val(table_content.UUID);
} }
//$.parser.parse();
} }
function showProcinstanceImg(index) { function showProcinstanceImg(index) {
......
...@@ -69,7 +69,7 @@ for(var i=1;i<v_data_procdefinition.length;i++){ ...@@ -69,7 +69,7 @@ for(var i=1;i<v_data_procdefinition.length;i++){
* 备注:需更改 * 备注:需更改
**/ **/
//定义grid列表 //定义grid列表
var ls_title=null; var ls_title="个人任务&nbsp;&nbsp;";
var is_column = [[ var is_column = [[
{field:'PROC_NAME',title:'流程',width:80}, {field:'PROC_NAME',title:'流程',width:80},
{field:'TASK_ID',title:'任务id',width:80}, {field:'TASK_ID',title:'任务id',width:80},
...@@ -121,7 +121,7 @@ function getOptionMenu(data,index){ ...@@ -121,7 +121,7 @@ function getOptionMenu(data,index){
+ index + "')\">处理</a>"; + index + "')\">处理</a>";
var delBtn="<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"showProcinstanceImg('" var delBtn="<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"showProcinstanceImg('"
+ index + "')\">删除</a>"; + index + "')\">删除</a>";
var procinstanceImgBtn="<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"showProcinstanceImg('" var procinstanceImgBtn="<span class=\"icon-ext-17_02\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"showProcinstanceImg('"
+ index + "')\">进度</a>"; + index + "')\">进度</a>";
returnData.push(editBtn); returnData.push(editBtn);
//returnData.push(delBtn); //returnData.push(delBtn);
......
...@@ -11,11 +11,20 @@ import com.gaowj.business.util.Page; ...@@ -11,11 +11,20 @@ import com.gaowj.business.util.Page;
@Service @Service
public interface ProcdefiChooseUserBusiness { public interface ProcdefiChooseUserBusiness {
void insert_procdefi_chooseUser(Map<String, Object> entity) throws BusinessException;
Page<Map<String, Object>> list_procdefi_chooseUser(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException; Page<Map<String, Object>> list_procdefi_chooseUser(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> list_procdefi_chooseUser(Map<String, Object> entity) throws BusinessException; List<Map<String, Object>> list_procdefi_chooseUser(Map<String, Object> entity) throws BusinessException;
void delete_procdefi_chooseUser_byKeyId(String key_id) throws BusinessException; void delete_procdefi_chooseUser_byKeyId(String key_id) throws BusinessException;
/**
* 保存选择的用户
*
* @param linkKey
* 环节的id
* @param userIds
* 用户ids,通过英文逗号分隔
* @throws BusinessException
*/
void save_chooseUser(String linkKey, String userIds) throws BusinessException;
} }
...@@ -71,7 +71,7 @@ public class FormfieldBusinessImpl implements FormfieldBusiness{ ...@@ -71,7 +71,7 @@ public class FormfieldBusinessImpl implements FormfieldBusiness{
//清除原先的所有字段信息 //清除原先的所有字段信息
List<String> listTable=new ArrayList<String>(); List<String> listTable=new ArrayList<String>();
listTable.add(tableId); listTable.add(tableId);
formfieldDAO.delete_form_field_byTableid(listTable); formfieldDAO.delete_form_field_byTableid_real(listTable);
//插入现在的字段信息 //插入现在的字段信息
for(Map<String, Object> field:list){ for(Map<String, Object> field:list){
insert_form_field(field); insert_form_field(field);
......
...@@ -3,10 +3,8 @@ package com.gaowj.business.formfield; ...@@ -3,10 +3,8 @@ package com.gaowj.business.formfield;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.gaowj.business.exception.BusinessException; import com.gaowj.business.exception.BusinessException;
public interface formfieldDAO { public interface formfieldDAO {
void insert_form_field(Map<String, Object> entity) throws BusinessException; void insert_form_field(Map<String, Object> entity) throws BusinessException;
...@@ -14,10 +12,24 @@ public interface formfieldDAO { ...@@ -14,10 +12,24 @@ public interface formfieldDAO {
void update_form_field(Map<String, Object> entity) throws BusinessException; void update_form_field(Map<String, Object> entity) throws BusinessException;
void delete_form_field(List<String> list) throws BusinessException; void delete_form_field(List<String> list) throws BusinessException;
/**
* 逻辑删除
*
* @param list
* @throws BusinessException
*/
void delete_form_field_byTableid(List<String> list) throws BusinessException; void delete_form_field_byTableid(List<String> list) throws BusinessException;
/**
* 物理删除
*
* @param list
* @throws BusinessException
*/
void delete_form_field_byTableid_real(List<String> list) throws BusinessException;
List<Map<String, Object>> list_form_field(Map<String, Object> query) throws BusinessException; List<Map<String, Object>> list_form_field(Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> list_form_field_byTableid(String tableid) throws BusinessException; List<Map<String, Object>> list_form_field_byTableid(String tableid) throws BusinessException;
} }
...@@ -68,6 +68,17 @@ ...@@ -68,6 +68,17 @@
#{UUID} #{UUID}
</foreach> </foreach>
</delete> </delete>
<delete id="delete_form_field_byTableid_real" parameterType="list">
<![CDATA[
delete from C_T_FORM_FIELD where TABLE_ID IN
]]>
<foreach collection="list" item="UUID" open="(" separator=","
close=")">
#{UUID}
</foreach>
</delete>
<select id="list_form_field" parameterType="map" resultType="upperCaseKeyMap"> <select id="list_form_field" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[ <![CDATA[
select f.* select f.*
......
...@@ -74,6 +74,9 @@ public class FormmodelsBusinessImpl implements FormmodelsBusiness { ...@@ -74,6 +74,9 @@ public class FormmodelsBusinessImpl implements FormmodelsBusiness {
// TODO Auto-generated method stub // TODO Auto-generated method stub
int pageStart = (pageNo - 1) * pageSize; int pageStart = (pageNo - 1) * pageSize;
// 获取列表 // 获取列表
if (query.get("MODEL_NAME") != null && !"".equals(query.get("MODEL_NAME"))) {
query.put("MODEL_NAME", "%" + query.get("MODEL_NAME") + "%");
}
List<Map<String, Object>> items = formmodelsDAO.list_form_models(new RowBounds(pageStart, pageSize), query); List<Map<String, Object>> items = formmodelsDAO.list_form_models(new RowBounds(pageStart, pageSize), query);
// 获取列表个数 // 获取列表个数
int count = formmodelsDAO.listCount_form_models(query); int count = formmodelsDAO.listCount_form_models(query);
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
<if test="TABLE_ID != null and TABLE_ID != ''"> <if test="TABLE_ID != null and TABLE_ID != ''">
and f.TABLE_ID = #{TABLE_ID} and f.TABLE_ID = #{TABLE_ID}
</if> </if>
<if test="MODEL_NAME != null and MODEL_NAME != ''">
and f.MODEL_NAME like #{MODEL_NAME}
</if>
<if test="FLAG != null and FLAG != ''"> <if test="FLAG != null and FLAG != ''">
and f.FLAG = #{FLAG} and f.FLAG = #{FLAG}
</if> </if>
......
...@@ -88,7 +88,7 @@ public class FormtableBusinessImpl implements FormtableBusiness { ...@@ -88,7 +88,7 @@ public class FormtableBusinessImpl implements FormtableBusiness {
query.put("TABLE_NAME", "%"+query.get("TABLE_NAME")+"%"); query.put("TABLE_NAME", "%"+query.get("TABLE_NAME")+"%");
} }
//默认选择逻辑删,未删除的 //默认选择逻辑删,未删除的
query.put("DELETE_FLAG", 0); query.put("DELETE_FLAG", "0");
// 获取列表 // 获取列表
List<Map<String, Object>> items = formtableDAO.list_form_table(new RowBounds(pageStart, pageSize), query); List<Map<String, Object>> items = formtableDAO.list_form_table(new RowBounds(pageStart, pageSize), query);
// 获取列表个数 // 获取列表个数
......
...@@ -84,26 +84,43 @@ ...@@ -84,26 +84,43 @@
<update id="create_form_table" parameterType="map"> <update id="create_form_table" parameterType="map">
CREATE TABLE ${tableName}( CREATE TABLE ${tableName}(
<trim prefix="" suffixOverrides=","> <trim>
<foreach collection="list" item="item"> <foreach collection="list" item="item">
${item.FIELD_NAME} ${item.TYPE} ${item.FIELD_NAME} ${item.TYPE}
<choose> <if test="item.LENGTH != null">
<when test="item.LENGTH == null"> (${item.LENGTH}
#{item.LENGTH} <if test="item.POINT != null">
</when> ,${item.POINT}
<when test="item.LENGTH != null"> </if>
(#{item.LENGTH}) )
</when> </if>
</choose> <if test="item.IS_NULL != 1">
<if test="item.IS_NULL == 0"> NOT
NOT NULL,
</if> </if>
<if test="item.IS_NULL == 1"> NULL
DEFAULT NULL, <if test="item.DEFAULT != null">
DEFAULT '${item.DEFAULT}'
</if> </if>
<if test="item.DEFAULT == null">
<if test="item.IS_NULL == 1">
DEFAULT NULL
</if>
</if>
<if test="item.CONTENT != null">
COMMENT '${item.CONTENT}'
</if>
,
</foreach> </foreach>
</trim> </trim>
<![CDATA[ ) ]]> <![CDATA[
ENGINE=InnoDB DEFAULT CHARSET=utf8; PRIMARY KEY (`uuid`)
) ]]>
ENGINE=InnoDB DEFAULT CHARSET=utf8
<if test="content != null">
COMMENT='${content}'
</if>
;
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,6 +2,7 @@ package com.gaowj.business.procdefiChooseUser; ...@@ -2,6 +2,7 @@ package com.gaowj.business.procdefiChooseUser;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
...@@ -12,27 +13,22 @@ import org.apache.ibatis.session.RowBounds; ...@@ -12,27 +13,22 @@ import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.ProcdefiChooseUserBusiness; import com.gaowj.business.ProcdefiChooseUserBusiness;
import com.gaowj.business.exception.BusinessException; import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page; import com.gaowj.business.util.Page;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.SessionUtil; import com.gaowj.business.util.SessionUtil;
public class ProcdefiChooseUserBusinessImpl implements public class ProcdefiChooseUserBusinessImpl implements ProcdefiChooseUserBusiness {
ProcdefiChooseUserBusiness {
private procdefiChooseUserDAO procdefiChooseUserDAO; private procdefiChooseUserDAO procdefiChooseUserDAO;
public procdefiChooseUserDAO getProcdefiChooseUserDAO() { public procdefiChooseUserDAO getProcdefiChooseUserDAO() {
return procdefiChooseUserDAO; return procdefiChooseUserDAO;
} }
public void setProcdefiChooseUserDAO(procdefiChooseUserDAO procdefiChooseUserDAO) { public void setProcdefiChooseUserDAO(procdefiChooseUserDAO procdefiChooseUserDAO) {
this.procdefiChooseUserDAO = procdefiChooseUserDAO; this.procdefiChooseUserDAO = procdefiChooseUserDAO;
} }
private void insert_procdefi_chooseUser(Map<String, Object> entity) throws BusinessException {
@Override
public void insert_procdefi_chooseUser(Map<String, Object> entity)
throws BusinessException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
if (entity.get("UUID") == null) { if (entity.get("UUID") == null) {
entity.put("UUID", java.util.UUID.randomUUID().toString()); entity.put("UUID", java.util.UUID.randomUUID().toString());
...@@ -65,13 +61,11 @@ public class ProcdefiChooseUserBusinessImpl implements ...@@ -65,13 +61,11 @@ public class ProcdefiChooseUserBusinessImpl implements
} }
procdefiChooseUserDAO.insert_procdefi_chooseUser(entity); procdefiChooseUserDAO.insert_procdefi_chooseUser(entity);
entity.clear(); entity.clear();
}
}
@Override @Override
public Page<Map<String, Object>> list_procdefi_chooseUser(int pageNo, public Page<Map<String, Object>> list_procdefi_chooseUser(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException {
int pageSize, Map<String, Object> query) throws BusinessException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
int pageStart = (pageNo - 1) * pageSize; int pageStart = (pageNo - 1) * pageSize;
...@@ -89,20 +83,31 @@ public class ProcdefiChooseUserBusinessImpl implements ...@@ -89,20 +83,31 @@ public class ProcdefiChooseUserBusinessImpl implements
return page; return page;
} }
@Override @Override
public List<Map<String, Object>> list_procdefi_chooseUser( public List<Map<String, Object>> list_procdefi_chooseUser(Map<String, Object> entity) throws BusinessException {
Map<String, Object> entity) throws BusinessException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return procdefiChooseUserDAO.list_procdefi_chooseUser(entity); return procdefiChooseUserDAO.list_procdefi_chooseUser(entity);
} }
@Override @Override
public void delete_procdefi_chooseUser_byKeyId(String key_id) public void delete_procdefi_chooseUser_byKeyId(String key_id) throws BusinessException {
throws BusinessException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
procdefiChooseUserDAO.delete_procdefi_chooseUser_byKeyId(key_id); procdefiChooseUserDAO.delete_procdefi_chooseUser_byKeyId(key_id);
} }
@Override
public void save_chooseUser(String linkKey, String userIds) throws BusinessException {
//先删除原有的人员
procdefiChooseUserDAO.delete_procdefi_chooseUser_byKeyId(linkKey);
// 重新添加现在选取的人员
List<String> listUserId = QueryParamUtil.StringToList(userIds);
for (int i = 0; i < listUserId.size(); i++) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("KEY_ID", linkKey);
params.put("USER_ID", listUserId.get(i));
insert_procdefi_chooseUser(params);
}
};
} }
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
L.`LINK_KEY` L.`LINK_KEY`
from C_T_PROC_CHOOSE_USER A from C_T_PROC_CHOOSE_USER A
LEFT JOIN LCYQ_SYSTEM.C_T_SYS_LOGINUSER U ON U.`CODE`=A.`USER_ID` LEFT JOIN LCYQ_SYSTEM.C_T_SYS_LOGINUSER U ON U.`CODE`=A.`USER_ID`
LEFT JOIN C_T_PROC_DEFINITION_INIT_LINK L ON L.`UUID`=A.`KEY_ID` LEFT JOIN C_T_PROC_DEFINITION_INIT_LINK L ON L.`LINK_KEY`=A.`KEY_ID`
) f ) f
]]> ]]>
......
...@@ -203,7 +203,9 @@ public class ProcdefinitionBusinessImpl implements ProcdefinitionBusiness { ...@@ -203,7 +203,9 @@ public class ProcdefinitionBusinessImpl implements ProcdefinitionBusiness {
query2.put("TABLE_ID", tableId); query2.put("TABLE_ID", tableId);
List<Map<String, Object>> listFormmodels=formmodelsDAO.list_form_models(query2); List<Map<String, Object>> listFormmodels=formmodelsDAO.list_form_models(query2);
if(listFormmodels.size()==0){ if(listFormmodels.size()==0){
return null; return new HashMap<String, Object>(){{
put("MODEL_CONTENT", -1);
}};
} }
return listFormmodels.get(0); return listFormmodels.get(0);
...@@ -262,7 +264,17 @@ public class ProcdefinitionBusinessImpl implements ProcdefinitionBusiness { ...@@ -262,7 +264,17 @@ public class ProcdefinitionBusinessImpl implements ProcdefinitionBusiness {
taskKey.add(taskDefKey); taskKey.add(taskDefKey);
} }
} }
//获取当前数据库中的环节数据
List<Map<String, Object>> selectResult=procdefinitionInitlinkDAO.list_procde_finition_init_link_byLinkKey(taskKey); List<Map<String, Object>> selectResult=procdefinitionInitlinkDAO.list_procde_finition_init_link_byLinkKey(taskKey);
if(selectResult.size()==0){ if(selectResult.size()==0){
for (ActivityImpl activity : activitiList){ for (ActivityImpl activity : activitiList){
ActivityBehavior activityBehavior = activity.getActivityBehavior(); ActivityBehavior activityBehavior = activity.getActivityBehavior();
......
...@@ -147,6 +147,9 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness { ...@@ -147,6 +147,9 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
//通过流程定义id启动流程 //通过流程定义id启动流程
String deploymentKey=procdeFinition.get("DEPLOYMENT_KEY").toString(); String deploymentKey=procdeFinition.get("DEPLOYMENT_KEY").toString();
ProcessInstance processInstance=runtimeService.startProcessInstanceByKey(deploymentKey); ProcessInstance processInstance=runtimeService.startProcessInstanceByKey(deploymentKey);
//获取我的任务(如果点击下一步的时候,是第一次插入,这直接将我的任务完成掉)
String taskId=taskService.createTaskQuery().processInstanceId(processInstance.getId()).taskCandidateUser(SessionUtil.getCode()).list().get(0).getId();
taskService.complete(taskId);
//存储流程实例id和业务数据id的关联 //存储流程实例id和业务数据id的关联
insertProcInstance(procId,businessId,formModelId,processInstance.getId()); insertProcInstance(procId,businessId,formModelId,processInstance.getId());
return entity; return entity;
...@@ -352,8 +355,39 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness { ...@@ -352,8 +355,39 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
@Override @Override
public void delete_proc_instance(List<String> list) throws BusinessException { public void delete_proc_instance(List<String> list) throws BusinessException {
// TODO Auto-generated method stub //查询流程实例表
Map<String,Object> query=new HashMap<String, Object>();
query.put("UUIDIN", list);
List<Map<String, Object>> listInstance=procinstanceDAO.list_proc_instance_all(query);
//获取业务主键id
List<Map<String,Object>> listBusiness=new ArrayList<Map<String,Object>>();
for(Map<String, Object> m:listInstance){
Map<String,Object> business=new HashMap<String, Object>();
business.put("UUID", m.get("BUSINESS_ID"));
business.put("TABLE_NAME", m.get("TABLE_NAME"));
listBusiness.add(business);
}
//整理业务表id,以表名为key,listuuid为value
Map<String,List<String>> listBusinessUuidList=new HashMap<String,List<String>>();
for(Map<String,Object> m:listBusiness){
List<String> listUuid=null;
if(listBusinessUuidList.get(m.get("TABLE_NAME"))==null){
listUuid=new ArrayList<String>();
listBusinessUuidList.put((String) m.get("TABLE_NAME"), listUuid);
}else{
listUuid=listBusinessUuidList.get(m.get("TABLE_NAME"));
}
listUuid.add(m.get("UUID").toString());
}
//根据业务主键id和表名删除具体的业务数据
for(String tableName:listBusinessUuidList.keySet()){
Map<String,Object> deleteParams=new HashMap<String, Object>();
deleteParams.put("TABLE_NAME", tableName);
deleteParams.put("list", listBusinessUuidList.get(tableName));
procinstanceDAO.delete_proc_instance_business(deleteParams);
}
//删除实例表
procinstanceDAO.delete_proc_instance(list);
} }
@Override @Override
......
...@@ -13,6 +13,8 @@ public interface procinstanceDAO { ...@@ -13,6 +13,8 @@ public interface procinstanceDAO {
void update_proc_instance(Map<String, Object> entity) throws BusinessException; void update_proc_instance(Map<String, Object> entity) throws BusinessException;
void delete_proc_instance(List<String> list) throws BusinessException; void delete_proc_instance(List<String> list) throws BusinessException;
void delete_proc_instance_business(Map<String,Object> query) throws BusinessException;
List<Map<String, Object>> list_proc_instance(RowBounds rowbounds, Map<String, Object> query) throws BusinessException; List<Map<String, Object>> list_proc_instance(RowBounds rowbounds, Map<String, Object> query) throws BusinessException;
......
...@@ -6,6 +6,14 @@ ...@@ -6,6 +6,14 @@
<if test="UUID != null and UUID != ''"> <if test="UUID != null and UUID != ''">
and f.UUID = #{UUID} and f.UUID = #{UUID}
</if> </if>
<if test="UUIDIN != null and UUIDIN != ''">
and f.UUID IN
<trim prefix="(" suffix=")" suffixOverrides=",">
<foreach collection="UUIDIN" item="value">
#{value},
</foreach>
</trim>
</if>
<if test="CREATE_ID != null and CREATE_ID != ''"> <if test="CREATE_ID != null and CREATE_ID != ''">
and f.CREATE_ID = #{CREATE_ID} and f.CREATE_ID = #{CREATE_ID}
</if> </if>
...@@ -66,6 +74,16 @@ ...@@ -66,6 +74,16 @@
#{UUID} #{UUID}
</foreach> </foreach>
</delete> </delete>
<delete id="delete_proc_instance_business" parameterType="map">
<![CDATA[
delete from ${TABLE_NAME} where UUID IN
]]>
<foreach collection="list" item="UUID" open="(" separator=","
close=")">
#{UUID}
</foreach>
</delete>
<select id="list_proc_instance" parameterType="map" resultType="upperCaseKeyMap"> <select id="list_proc_instance" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[ <![CDATA[
...@@ -100,8 +118,9 @@ ...@@ -100,8 +118,9 @@
<![CDATA[ <![CDATA[
select f.* select f.*
from ( from (
SELECT ins.*,def.proc_name from c_t_proc_instance ins SELECT ins.*,def.proc_name,def.table_id,ctft.table_name from c_t_proc_instance ins
LEFT JOIN c_t_proc_definition def on ins.proc_definition_id=def.uuid LEFT JOIN c_t_proc_definition def on ins.proc_definition_id=def.uuid
LEFT JOIN c_t_form_table ctft ON ctft.uuid=def.table_id
) f ) f
]]> ]]>
<include refid="Where_Clause" /> <include refid="Where_Clause" />
......
...@@ -152,33 +152,18 @@ public class actAction extends BasicAction { ...@@ -152,33 +152,18 @@ public class actAction extends BasicAction {
} }
public String savePeople()throws BusinessException{ public String savePeople()throws BusinessException{
ProcdefiChooseUserBusiness business=BusinessManager.getBusiness(ProcdefiChooseUserBusiness.class); jsonObject = new JSONObject();
Map<String, Object> entity=new HashMap<String, Object>(); try {
String KEY_ID=RequestUtils.getString(request, "KEY_ID"); ProcdefiChooseUserBusiness business=BusinessManager.getBusiness(ProcdefiChooseUserBusiness.class);
String IDS=RequestUtils.getString(request, "USER_IDS"); String linkKey=RequestUtils.getString(request, "LINK_KEY");
List<String> ListKey = QueryParamUtil.StringToList(IDS); String userIds=RequestUtils.getString(request, "USER_IDS");
entity.put("KEY_ID", KEY_ID); business.save_chooseUser(linkKey, userIds);
List<Map<String, Object>> result=business.list_procdefi_chooseUser(entity); jsonObject.putAll(Status.getStatusSuccessMessage("成功"));
if(result.size()==0&&ListKey.size()>0){ } catch (Exception e) {
Map<String, Object> params=new HashMap<String, Object>(); e.printStackTrace();
for(int i=0;i<ListKey.size();i++){ jsonObject.putAll(Status.getStatusSuccessMessage("失败"));
params.put("KEY_ID", KEY_ID);
params.put("USER_ID", ListKey.get(i));
business.insert_procdefi_chooseUser(params);
}
}
if(result.size()>0&&ListKey.size()==0){
business.delete_procdefi_chooseUser_byKeyId(KEY_ID);
}
if(result.size()>0&&ListKey.size()>0){
business.delete_procdefi_chooseUser_byKeyId(KEY_ID);
Map<String, Object> params=new HashMap<String, Object>();
for(int i=0;i<ListKey.size();i++){
params.put("KEY_ID", KEY_ID);
params.put("USER_ID", ListKey.get(i));
business.insert_procdefi_chooseUser(params);
}
} }
return "json"; return "json";
} }
......
...@@ -188,7 +188,7 @@ public class dataAction extends BasicAction{ ...@@ -188,7 +188,7 @@ public class dataAction extends BasicAction{
public String getChooseUser()throws BusinessException{ public String getChooseUser()throws BusinessException{
ProcdefiChooseUserBusiness business =BusinessManager.getBusiness(ProcdefiChooseUserBusiness.class); ProcdefiChooseUserBusiness business =BusinessManager.getBusiness(ProcdefiChooseUserBusiness.class);
Map<String, Object> query=new HashMap<String, Object>(); Map<String, Object> query=new HashMap<String, Object>();
query.put("KEY_ID", RequestUtils.getString(request, "key_id")); query.put("KEY_ID", RequestUtils.getString(request, "linkKey"));
Page<Map<String, Object>> pageRows=business.list_procdefi_chooseUser(pageNo, pageSize, query ); Page<Map<String, Object>> pageRows=business.list_procdefi_chooseUser(pageNo, pageSize, query );
setPageCount((pageRows.getCount() - 1) / pageSize + 1); setPageCount((pageRows.getCount() - 1) / pageSize + 1);
Map<String, Object> data = new HashMap<String, Object>(); Map<String, Object> data = new HashMap<String, Object>();
......
package com.gaowj.procinstance.action; package com.gaowj.procinstance.action;
import java.util.List;
import java.util.Map; import java.util.Map;
import com.gaowj.business.ProcdefinitionmodelsBusiness; import com.gaowj.business.ProcdefinitionmodelsBusiness;
...@@ -160,5 +161,27 @@ public class actAction extends BasicAction { ...@@ -160,5 +161,27 @@ public class actAction extends BasicAction {
} }
return "json"; return "json";
} }
public String deleteInfo() throws BusinessException{
ProcinstanceBusiness business = BusinessManager.getBusiness(ProcinstanceBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
String deletekey = (String) entity.get("CODE");
List<String> ListKey = QueryParamUtil.StringToList(deletekey);
try {
business.delete_proc_instance(ListKey);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("deleteProcinstance", "" + ListKey,
"删除流程实例数据", deletekey, "多个流水号","procinstance");
//
jsonObject.putAll(Status.getStatusSuccessMessage("删除成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("删除失败"));
e.printStackTrace();
}
return "json";
}
} }
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