Commit 539975bc by 罗绍泽

流程实例完善

parent 12e0aa2a
......@@ -315,4 +315,22 @@
}
.icon-ext-01_10{
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 @@
u : [],
ul : [ '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'],
embed: ['type', 'class', 'pluginspage', 'src', 'width', 'height', 'align', 'style', 'wmode', 'play',
'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
}
}, {
text : '下一步',
iconCls : 'icon-ok',
iconCls : 'icon-ext-44_08',
handler : function() {
nextBox('detail','list');
}
......
......@@ -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}" />
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr>
<td style="width: 15%;" class="tableStyleLable">
<td style="width: 10%;" class="tableStyleLable">
<span>模板名称:</span>
</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" />
</td>
<!-- <td style="width: 15%;" class="tableStyleLable">
......@@ -18,7 +18,7 @@
</td> -->
</tr>
</table>
<div id="ueditId" name="FIELD_ueditValue">
<div id="ueditId" name="FIELD_ueditValue" style="height:100%">
</div>
</form>
\ No newline at end of file
......@@ -156,7 +156,7 @@ function editRow(index) {
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
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 @@
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<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>
<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>
......
......@@ -16,6 +16,9 @@ formtableModule.prototype.updateFormTable = function(){};
formtableModule.prototype.deleteFormTable = function(){};
//获取所有的表数据
formtableModule.prototype.listFormTable = function(){};
//同步表结构
formtableModule.prototype.synchFormTable = function(){};
//创建一个数据操作对象,然后再后续使用
formtableModule.act = new formtableModule("json").delegate("formtableAct");
......
......@@ -179,8 +179,8 @@ var tr=['<tr>',
//定义grid列表
var ls_title="表单管理&nbsp;&nbsp;";
var is_column = [ [
{field : 'TABLE_NAME',title : '表名',width : 100,align : 'center'},
{field : 'CONTENT',title : '描述',width : 80,align : 'center'},
{field : 'TABLE_NAME',title : '表名',width : 120,align : 'left'},
{field : 'CONTENT',title : '描述',width : 180,align : 'left'},
{field : 'IS_DBSYNCH',title : '是否同步到数据库',width : 100,align : 'center',formatter:function(value,row,index){
if(value=='0'){
return "未同步";
......@@ -228,9 +228,9 @@ function formatMenu(value, 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('"
+ 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-clear\" 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-ext-03_15\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"templateRow('"
+ 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-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a>";
return returnData;
}
......@@ -336,7 +336,7 @@ function fieldModel(i,field){
field_name:'<input type="text" name="LIST['+i+'].NAME" value="'+field.FIELD_NAME+'" />',
content:'<input type="text" name="LIST['+i+'].CONTENT" value="'+field.CONTENT+'" />',
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+'" />',
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+'" />',
......@@ -622,16 +622,12 @@ function synchRow(index){
$.messager.alert('警告',"该表已同步到数据库",'info');
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(){
//展示列表
/*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);*/
var linkId=$.getUrlParam("procdef_linkId");
var linkKey=$.getUrlParam("linkKey");
$('#list1').datagrid({
title:'人员',
idField:'CODE',
......@@ -82,7 +82,7 @@ $(function(){
title:'人员',
idField:'CODE',
iconCls:$.getJwWindowPic(),
url:gaowj.WEB_APP_NAME + "/procdefinitionData_getChooseUser?key_id="+linkId,
url:gaowj.WEB_APP_NAME + "/procdefinitionData_getChooseUser?linkKey="+linkKey,
queryParams : queryData,//查询参数
rownumbers : true,//显示索引号
singleSelect : false,//是否多选
......@@ -165,7 +165,7 @@ function cancelChoosePeople(){
}
}
function savePeople(key_id){
function savePeople(linkKey){
var map={};
var arr="";
var is_row = $('#list2').datagrid('getRows');
......@@ -175,7 +175,7 @@ function savePeople(key_id){
$.ajax({
url:gaowj.WEB_APP_NAME + "/procdefinitionAct_savePeople",
data:{
KEY_ID:key_id,
LINK_KEY:linkKey,
USER_IDS:arr
},
success:function(){
......
......@@ -89,6 +89,7 @@ function memberRow(index){
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
is_row[0].OPETYPE = 'insert';
console.log(is_row[0])
$('#people').dialog( {
title : '选择人员',
iconCls : $.getJwWindowPic(),
......@@ -99,14 +100,14 @@ function memberRow(index){
maximizable:true,
left: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],
modal : true,
buttons : [{
text : '保存',
iconCls : 'icon-save',
handler : function() {
document.getElementById("choosePeopleIframe").contentWindow.savePeople(is_row[0].UUID);
document.getElementById("choosePeopleIframe").contentWindow.savePeople(is_row[0].LINK_KEY);
$('#people').dialog('close');
}
} ,{
......
......@@ -106,11 +106,11 @@ function formatMenu(value, 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('"
+ 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-file\" 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-file\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"choosePeopleRow('"
+ index + "')\">选人</a> ";
+ 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-04_36\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"procdefinitionImg('"
+ 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-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a> ";
return returnData;
}
......
......@@ -137,8 +137,7 @@ function formatMenu(value, 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('"
+ 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>";
return returnData;
......@@ -146,7 +145,7 @@ function getOptionMenu(data,index){
//返回菜单集的菜单个数(需更改)
function getOptionMenuCount(){
var is_menu_count = 4;
var is_menu_count = 3;
return is_menu_count;
}
......
......@@ -69,7 +69,7 @@ for(var i=1;i<v_data_procdefinition.length;i++){
* 备注:需更改
**/
//定义grid列表
var ls_title=null;
var ls_title="流程实例&nbsp;&nbsp;";
var is_column = [[
{field:'PROC_NAME',title:'流程',width:100},
{field:'INSTANCE_ID',title:'实例id',width:80,formatter:function(value,row,index){
......@@ -135,9 +135,9 @@ function getOptionMenu(data,index){
var returnData=[];
var editBtn="<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('"
+ 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>";
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>";
returnData.push(editBtn);
returnData.push(delBtn);
......@@ -238,6 +238,8 @@ function fillTable2(businessId,taskId){
info.BUSINESS_DATA['FIELD_TASK_ID_SYSTEM']=taskId;
$("#inputForm").form('load',info.BUSINESS_DATA);
//$.parser.parse();
}
//下一步按钮执行事件
function updateDataToNext(is_entity){
......@@ -260,20 +262,24 @@ function updateDataToNext(is_entity){
**/
function deleteRow(index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
var code = is_row[0].UUID;
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = procdefinitionmodelsModule.act.deleteProcdefinitionmodels(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
if(is_row[0].COMPLETE==0&&is_row[0].INSTANCE_ID==null){
//执行删除
var code = is_row[0].UUID;
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
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(){
$.messager.alert('提示',"请选择需删除的记录!",'info');
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){
code = code.substring(0,code.length - 1);
}
......@@ -304,7 +318,7 @@ function deleteBatchRow(){
if (r) {
var v_query = {};
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);
$('#list').datagrid('reload');
}
......@@ -515,6 +529,7 @@ function fillTable(){
$("#table_content").html(table_content.MODEL_CONTENT);
$("#FIELD_FORM_MODEL_ID").val(table_content.UUID);
}
//$.parser.parse();
}
function showProcinstanceImg(index) {
......
......@@ -69,7 +69,7 @@ for(var i=1;i<v_data_procdefinition.length;i++){
* 备注:需更改
**/
//定义grid列表
var ls_title=null;
var ls_title="个人任务&nbsp;&nbsp;";
var is_column = [[
{field:'PROC_NAME',title:'流程',width:80},
{field:'TASK_ID',title:'任务id',width:80},
......@@ -121,7 +121,7 @@ function getOptionMenu(data,index){
+ index + "')\">处理</a>";
var delBtn="<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"showProcinstanceImg('"
+ 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>";
returnData.push(editBtn);
//returnData.push(delBtn);
......
......@@ -11,11 +11,20 @@ import com.gaowj.business.util.Page;
@Service
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;
List<Map<String, Object>> list_procdefi_chooseUser(Map<String, Object> entity) 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{
//清除原先的所有字段信息
List<String> listTable=new ArrayList<String>();
listTable.add(tableId);
formfieldDAO.delete_form_field_byTableid(listTable);
formfieldDAO.delete_form_field_byTableid_real(listTable);
//插入现在的字段信息
for(Map<String, Object> field:list){
insert_form_field(field);
......
......@@ -3,10 +3,8 @@ package com.gaowj.business.formfield;
import java.util.List;
import java.util.Map;
import com.gaowj.business.exception.BusinessException;
public interface formfieldDAO {
void insert_form_field(Map<String, Object> entity) throws BusinessException;
......@@ -14,10 +12,24 @@ public interface formfieldDAO {
void update_form_field(Map<String, Object> entity) 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;
/**
* 物理删除
*
* @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_byTableid(String tableid) throws BusinessException;
}
......@@ -68,6 +68,17 @@
#{UUID}
</foreach>
</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">
<![CDATA[
select f.*
......
......@@ -74,6 +74,9 @@ public class FormmodelsBusinessImpl implements FormmodelsBusiness {
// TODO Auto-generated method stub
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);
// 获取列表个数
int count = formmodelsDAO.listCount_form_models(query);
......
......@@ -9,6 +9,9 @@
<if test="TABLE_ID != null and TABLE_ID != ''">
and f.TABLE_ID = #{TABLE_ID}
</if>
<if test="MODEL_NAME != null and MODEL_NAME != ''">
and f.MODEL_NAME like #{MODEL_NAME}
</if>
<if test="FLAG != null and FLAG != ''">
and f.FLAG = #{FLAG}
</if>
......
......@@ -88,7 +88,7 @@ public class FormtableBusinessImpl implements FormtableBusiness {
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);
// 获取列表个数
......
......@@ -84,26 +84,43 @@
<update id="create_form_table" parameterType="map">
CREATE TABLE ${tableName}(
<trim prefix="" suffixOverrides=",">
<trim>
<foreach collection="list" item="item">
${item.FIELD_NAME} ${item.TYPE}
<choose>
<when test="item.LENGTH == null">
#{item.LENGTH}
</when>
<when test="item.LENGTH != null">
(#{item.LENGTH})
</when>
</choose>
<if test="item.IS_NULL == 0">
NOT NULL,
<if test="item.LENGTH != null">
(${item.LENGTH}
<if test="item.POINT != null">
,${item.POINT}
</if>
)
</if>
<if test="item.IS_NULL != 1">
NOT
</if>
<if test="item.IS_NULL == 1">
DEFAULT NULL,
NULL
<if test="item.DEFAULT != null">
DEFAULT '${item.DEFAULT}'
</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>
</trim>
<![CDATA[ ) ]]>
ENGINE=InnoDB DEFAULT CHARSET=utf8;
<![CDATA[
PRIMARY KEY (`uuid`)
) ]]>
ENGINE=InnoDB DEFAULT CHARSET=utf8
<if test="content != null">
COMMENT='${content}'
</if>
;
</update>
</mapper>
\ No newline at end of file
......@@ -2,6 +2,7 @@ package com.gaowj.business.procdefiChooseUser;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
......@@ -12,27 +13,22 @@ import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.ProcdefiChooseUserBusiness;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.SessionUtil;
public class ProcdefiChooseUserBusinessImpl implements
ProcdefiChooseUserBusiness {
public class ProcdefiChooseUserBusinessImpl implements ProcdefiChooseUserBusiness {
private procdefiChooseUserDAO procdefiChooseUserDAO;
public procdefiChooseUserDAO getProcdefiChooseUserDAO() {
return procdefiChooseUserDAO;
}
public void setProcdefiChooseUserDAO(procdefiChooseUserDAO procdefiChooseUserDAO) {
this.procdefiChooseUserDAO = procdefiChooseUserDAO;
}
@Override
public void insert_procdefi_chooseUser(Map<String, Object> entity)
throws BusinessException {
private void insert_procdefi_chooseUser(Map<String, Object> entity) throws BusinessException {
// TODO Auto-generated method stub
if (entity.get("UUID") == null) {
entity.put("UUID", java.util.UUID.randomUUID().toString());
......@@ -65,13 +61,11 @@ public class ProcdefiChooseUserBusinessImpl implements
}
procdefiChooseUserDAO.insert_procdefi_chooseUser(entity);
entity.clear();
}
}
@Override
public Page<Map<String, Object>> list_procdefi_chooseUser(int pageNo,
int pageSize, Map<String, Object> query) throws BusinessException {
public Page<Map<String, Object>> list_procdefi_chooseUser(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException {
// TODO Auto-generated method stub
int pageStart = (pageNo - 1) * pageSize;
......@@ -89,20 +83,31 @@ public class ProcdefiChooseUserBusinessImpl implements
return page;
}
@Override
public List<Map<String, Object>> list_procdefi_chooseUser(
Map<String, Object> entity) throws BusinessException {
public List<Map<String, Object>> list_procdefi_chooseUser(Map<String, Object> entity) throws BusinessException {
// TODO Auto-generated method stub
return procdefiChooseUserDAO.list_procdefi_chooseUser(entity);
}
@Override
public void delete_procdefi_chooseUser_byKeyId(String key_id)
throws BusinessException {
public void delete_procdefi_chooseUser_byKeyId(String key_id) throws BusinessException {
// TODO Auto-generated method stub
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 @@
L.`LINK_KEY`
from C_T_PROC_CHOOSE_USER A
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
]]>
......
......@@ -203,7 +203,9 @@ public class ProcdefinitionBusinessImpl implements ProcdefinitionBusiness {
query2.put("TABLE_ID", tableId);
List<Map<String, Object>> listFormmodels=formmodelsDAO.list_form_models(query2);
if(listFormmodels.size()==0){
return null;
return new HashMap<String, Object>(){{
put("MODEL_CONTENT", -1);
}};
}
return listFormmodels.get(0);
......@@ -262,7 +264,17 @@ public class ProcdefinitionBusinessImpl implements ProcdefinitionBusiness {
taskKey.add(taskDefKey);
}
}
//获取当前数据库中的环节数据
List<Map<String, Object>> selectResult=procdefinitionInitlinkDAO.list_procde_finition_init_link_byLinkKey(taskKey);
if(selectResult.size()==0){
for (ActivityImpl activity : activitiList){
ActivityBehavior activityBehavior = activity.getActivityBehavior();
......
......@@ -147,6 +147,9 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
//通过流程定义id启动流程
String deploymentKey=procdeFinition.get("DEPLOYMENT_KEY").toString();
ProcessInstance processInstance=runtimeService.startProcessInstanceByKey(deploymentKey);
//获取我的任务(如果点击下一步的时候,是第一次插入,这直接将我的任务完成掉)
String taskId=taskService.createTaskQuery().processInstanceId(processInstance.getId()).taskCandidateUser(SessionUtil.getCode()).list().get(0).getId();
taskService.complete(taskId);
//存储流程实例id和业务数据id的关联
insertProcInstance(procId,businessId,formModelId,processInstance.getId());
return entity;
......@@ -352,8 +355,39 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
@Override
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
......
......@@ -13,6 +13,8 @@ public interface procinstanceDAO {
void update_proc_instance(Map<String, Object> entity) 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;
......
......@@ -6,6 +6,14 @@
<if test="UUID != null and UUID != ''">
and f.UUID = #{UUID}
</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 != ''">
and f.CREATE_ID = #{CREATE_ID}
</if>
......@@ -66,6 +74,16 @@
#{UUID}
</foreach>
</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">
<![CDATA[
......@@ -100,8 +118,9 @@
<![CDATA[
select f.*
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_form_table ctft ON ctft.uuid=def.table_id
) f
]]>
<include refid="Where_Clause" />
......
......@@ -27,7 +27,7 @@ public class actAction extends BasicAction {
*
*/
private static final long serialVersionUID = 1559759499504671708L;
private JSONObject jsonObject = new JSONObject();
public JSONObject getJsonObject() {
......@@ -37,9 +37,8 @@ public class actAction extends BasicAction {
public void setJsonObject(JSONObject jsonObject) {
this.jsonObject = jsonObject;
}
private List<Property> LIST;
public List<Property> getLIST() {
return LIST;
......@@ -51,33 +50,34 @@ public class actAction extends BasicAction {
/**
* 插入
*
* @param entity
* @throws BusinessException
*/
public String insertFormTable() throws BusinessException {
FormtableBusiness business = BusinessManager.getBusiness(FormtableBusiness.class);
FormfieldBusiness fieldBusiness=BusinessManager.getBusiness(FormfieldBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
FormfieldBusiness fieldBusiness = BusinessManager.getBusiness(FormfieldBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
jsonObject = new JSONObject();
try {
entity = QueryParamUtil.StringToDate(entity);
//去除不要更新的字段
// 去除不要更新的字段
entity.remove("OPETYPE");
//新增
Map<String,Object> formTable=business.insert_form_table(entity);
//做子表的插入
Map<String, Object> param=new HashMap<String, Object>();
for(Property property:LIST){
if(property==null){
// 新增
Map<String, Object> formTable = business.insert_form_table(entity);
// 做子表的插入
Map<String, Object> param = new HashMap<String, Object>();
for (Property property : LIST) {
if (property == null) {
continue;
}
if(property.getCONTENT()!=null&&""!=property.getCONTENT()){
if (property.getCONTENT() != null && "" != property.getCONTENT()) {
param.put("CONTENT", property.getCONTENT());
}
if(property.getTYPE().equals("date")||property.getTYPE().equals("text")){
if (property.getTYPE().equals("date") || property.getTYPE().equals("text")) {
param.put("LENGTH", null);
}else{
} else {
param.put("LENGTH", property.getLENGTH());
}
param.put("FIELD_WIDTH", property.getFIELD_WIDTH());
......@@ -86,37 +86,39 @@ public class actAction extends BasicAction {
param.put("TABLE_ID", formTable.get("UUID"));
param.put("TYPE", property.getTYPE());
param.put("ORDER_NUM", property.getORDER_NUM());
if(property.getIS_NULL().equals("")){
param.put("IS_NULL",0);
}else{
param.put("IS_NULL",1);
if (property.getIS_NULL().equals("")) {
param.put("IS_NULL", 0);
} else {
param.put("IS_NULL", 1);
}
if(property.getIS_KEY().equals("")){
if (property.getIS_KEY().equals("")) {
param.put("IS_KEY", 0);
}else{
} else {
param.put("IS_KEY", 1);
}
if(property.getIS_SHOW_LIST().equals("")){
if (property.getIS_SHOW_LIST().equals("")) {
param.put("IS_SHOW_LIST", 0);
}else{
} else {
param.put("IS_SHOW_LIST", 1);
}
if(property.getFIELD_DEFAULT()!=null&&""!=property.getFIELD_DEFAULT()){
if (property.getFIELD_DEFAULT() != null && "" != property.getFIELD_DEFAULT()) {
param.put("FIELD_DEFAULT", property.getFIELD_DEFAULT());
}
fieldBusiness.insert_form_field(param);
}
if(entity.get("IS_DBSYNCH").equals("1")){
String TABLE_ID=formTable.get("UUID").toString();
String TABLE_NAME=formTable.get("TABLE_NAME").toString();
List<Map<String, Object>> result=fieldBusiness.list_form_field_byTableid(TABLE_ID);
Map<String, Object> query=new HashMap<String, Object>();
if (entity.get("IS_DBSYNCH").equals("1")) {
String TABLE_ID = formTable.get("UUID").toString();
String TABLE_NAME = formTable.get("TABLE_NAME").toString();
String CONTENT = formTable.get("CONTENT").toString();
List<Map<String, Object>> result = fieldBusiness.list_form_field_byTableid(TABLE_ID);
Map<String, Object> query = new HashMap<String, Object>();
query.put("tableName", TABLE_NAME);
query.put("content", CONTENT);
query.put("list", result);
business.create_form_table(query);
}
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("保存失败"));
......@@ -124,64 +126,65 @@ public class actAction extends BasicAction {
}
return "json";
}
/**
* 更新
*
* @param entity
* @throws BusinessException
*/
public String updateFormTable() throws BusinessException {
FormtableBusiness business = BusinessManager.getBusiness(FormtableBusiness.class);
FormfieldBusiness fieldBusiness=BusinessManager.getBusiness(FormfieldBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
FormfieldBusiness fieldBusiness = BusinessManager.getBusiness(FormfieldBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
try {
//去除不要更新的字段
// 去除不要更新的字段
entity.remove("OPETYPE");
//修改
// 修改
entity = QueryParamUtil.StringToDate(entity);
business.update_form_table(entity);
//做子表的插入
List<Map<String, Object>> listField=new ArrayList<Map<String, Object>>();
Map<String, Object> param=null;
for(Property property:LIST){
param=new HashMap<String, Object>();
if(property==null){
// 做子表的插入
List<Map<String, Object>> listField = new ArrayList<Map<String, Object>>();
Map<String, Object> param = null;
for (Property property : LIST) {
param = new HashMap<String, Object>();
if (property == null) {
continue;
}
if(property.getCONTENT()!=null&&""!=property.getCONTENT()){
if (property.getCONTENT() != null && "" != property.getCONTENT()) {
param.put("CONTENT", property.getCONTENT());
}
param.put("UUID", property.getUUID());
param.put("FIELD_NAME", property.getNAME());
param.put("FIELD_WIDTH", property.getFIELD_WIDTH());
param.put("LENGTH",property.getLENGTH() );
param.put("LENGTH", property.getLENGTH());
param.put("POINT", property.getPOINT());
param.put("TABLE_ID", entity.get("UUID"));
param.put("TYPE", property.getTYPE());
param.put("ORDER_NUM", property.getORDER_NUM());
if(property.getIS_NULL().equals("")){
param.put("IS_NULL",0);
}else{
param.put("IS_NULL",1);
if (property.getIS_NULL().equals("")) {
param.put("IS_NULL", 0);
} else {
param.put("IS_NULL", 1);
}
if(property.getIS_KEY().equals("")){
if (property.getIS_KEY().equals("")) {
param.put("IS_KEY", 0);
}else{
} else {
param.put("IS_KEY", 1);
}
if(property.getIS_SHOW_LIST().equals("")){
if (property.getIS_SHOW_LIST().equals("")) {
param.put("IS_SHOW_LIST", 0);
}else{
} else {
param.put("IS_SHOW_LIST", 1);
}
if(property.getFIELD_DEFAULT()!=null&&""!=property.getFIELD_DEFAULT()){
if (property.getFIELD_DEFAULT() != null && "" != property.getFIELD_DEFAULT()) {
param.put("FIELD_DEFAULT", property.getFIELD_DEFAULT());
}
listField.add(param);
}
fieldBusiness.update_form_field(listField,entity.get("UUID").toString());
fieldBusiness.update_form_field(listField, entity.get("UUID").toString());
jsonObject.putAll(Status.getStatusSuccessMessage("修改成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("修改失败"));
......@@ -189,20 +192,21 @@ public class actAction extends BasicAction {
}
return "json";
}
/**
* 在软删除基础上删除记录
*
* @param entity
* @throws BusinessException
*/
public String deleteFormTable() throws BusinessException {
FormtableBusiness business = BusinessManager.getBusiness(FormtableBusiness.class);
FormfieldBusiness fieldBusiness=BusinessManager.getBusiness(FormfieldBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
FormfieldBusiness fieldBusiness = BusinessManager.getBusiness(FormfieldBusiness.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_form_table(ListKey);
fieldBusiness.delete_form_field_byTableid(ListKey);
......@@ -213,36 +217,49 @@ public class actAction extends BasicAction {
}
return "json";
}
public String synchFormTable()throws BusinessException{
FormfieldBusiness fieldBusiness=BusinessManager.getBusiness(FormfieldBusiness.class);
FormtableBusiness tableBusiness=BusinessManager.getBusiness(FormtableBusiness.class);
Map<String, Object> query=new HashMap<String, Object>();
String table_id=RequestUtils.getString(request, "tableId");
String table_name=RequestUtils.getString(request, "tableName");
List<Map<String, Object>> listField=fieldBusiness.list_form_field_byTableid(table_id);
Map<String, Object> create_param=new HashMap<String, Object>();
create_param.put("tableName", table_name);
create_param.put("list", listField);
tableBusiness.create_form_table(create_param);
Map<String, Object> entity=new HashMap<String, Object>();
entity.put("UUID", table_id);
entity.put("IS_DBSYNCH", 1);
tableBusiness.update_form_table(entity);
public String synchFormTable() throws BusinessException {
FormfieldBusiness fieldBusiness = BusinessManager.getBusiness(FormfieldBusiness.class);
FormtableBusiness tableBusiness = BusinessManager.getBusiness(FormtableBusiness.class);
jsonObject = new JSONObject();
try {
String table_id = RequestUtils.getString(request, "tableId");
String table_name = RequestUtils.getString(request, "tableName");
String content = RequestUtils.getString(request, "content");
List<Map<String, Object>> listField = fieldBusiness.list_form_field_byTableid(table_id);
Map<String, Object> create_param = new HashMap<String, Object>();
create_param.put("tableName", table_name);
create_param.put("content", content);
create_param.put("list", listField);
tableBusiness.create_form_table(create_param);
Map<String, Object> entity = new HashMap<String, Object>();
entity.put("UUID", table_id);
entity.put("IS_DBSYNCH", 1);
tableBusiness.update_form_table(entity);
jsonObject.putAll(Status.getStatusSuccessMessage("同步成功"));
} catch (Exception e) {
System.out.println(e.getMessage());
if(e.getMessage().indexOf("A table must have at least 1 column")!=-1){
jsonObject.putAll(Status.getStatusErrorMessage("同步失败,一个表至少含有一个字段!"));
}else{
jsonObject.putAll(Status.getStatusErrorMessage("同步失败!"));
}
e.printStackTrace();
}
return "json";
}
public String listTableFile()throws BusinessException{
FormfieldBusiness fieldBusiness=BusinessManager.getBusiness(FormfieldBusiness.class);
public String listTableFile() throws BusinessException {
FormfieldBusiness fieldBusiness = BusinessManager.getBusiness(FormfieldBusiness.class);
String tableId = RequestUtils.getString(request, "UUID");
List<Map<String, Object>> list=fieldBusiness.list_form_field_byTableid(tableId);
String result=JSON.toJSONString(list);
List<Map<String, Object>> list = fieldBusiness.list_form_field_byTableid(tableId);
String result = JSON.toJSONString(list);
jsonObject.put("listfield", result);
return "json";
}
}
......@@ -152,33 +152,18 @@ public class actAction extends BasicAction {
}
public String savePeople()throws BusinessException{
ProcdefiChooseUserBusiness business=BusinessManager.getBusiness(ProcdefiChooseUserBusiness.class);
Map<String, Object> entity=new HashMap<String, Object>();
String KEY_ID=RequestUtils.getString(request, "KEY_ID");
String IDS=RequestUtils.getString(request, "USER_IDS");
List<String> ListKey = QueryParamUtil.StringToList(IDS);
entity.put("KEY_ID", KEY_ID);
List<Map<String, Object>> result=business.list_procdefi_chooseUser(entity);
if(result.size()==0&&ListKey.size()>0){
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);
}
}
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);
}
jsonObject = new JSONObject();
try {
ProcdefiChooseUserBusiness business=BusinessManager.getBusiness(ProcdefiChooseUserBusiness.class);
String linkKey=RequestUtils.getString(request, "LINK_KEY");
String userIds=RequestUtils.getString(request, "USER_IDS");
business.save_chooseUser(linkKey, userIds);
jsonObject.putAll(Status.getStatusSuccessMessage("成功"));
} catch (Exception e) {
e.printStackTrace();
jsonObject.putAll(Status.getStatusSuccessMessage("失败"));
}
return "json";
}
......
......@@ -188,7 +188,7 @@ public class dataAction extends BasicAction{
public String getChooseUser()throws BusinessException{
ProcdefiChooseUserBusiness business =BusinessManager.getBusiness(ProcdefiChooseUserBusiness.class);
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 );
setPageCount((pageRows.getCount() - 1) / pageSize + 1);
Map<String, Object> data = new HashMap<String, Object>();
......
package com.gaowj.procinstance.action;
import java.util.List;
import java.util.Map;
import com.gaowj.business.ProcdefinitionmodelsBusiness;
......@@ -160,5 +161,27 @@ public class actAction extends BasicAction {
}
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