Commit 350539ce by 罗绍泽

办事大厅编辑页增加

parent 9bc06c27
......@@ -124,7 +124,7 @@
<property name="filters" value="stat" />
</bean>
<!-- 增加数据源dataSource-business -->
<!-- 增加数据源dataSource-activiti -->
<bean id="dataSource-activiti" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- 基本属性 url、user、password -->
<property name="url" value="jdbc:mysql://192.168.1.116:3306/lcyq_activiti?useUnicode=true&amp;characterEncoding=utf8&amp;autoReconnect=true&amp;useSSL=false" />
......
......@@ -144,7 +144,8 @@ function insertData(is_entity){
var ue=UE.getEditor('ueditId');
is_entity.FIELD_TABLE_ID=tableId;
is_entity.FIELD_FLAG=is_entity.FLAG;
is_entity.FIELD_MODEL_CONTENT=ue.getContent()
is_entity.FIELD_MODEL_CONTENT=ue.getContent();
delete is_entity.FIELD_ueditValue;
var v_result = formmodelModule.act.insertFormModel(is_entity);
$('#list').datagrid('reload');
return v_result;
......
......@@ -188,10 +188,10 @@ var is_column = [ [
return "同步";
}
}},
{field : 'CREATE_ID',title : '创建人员',width : 100,align : 'center'},
{field : 'CREATE_USER_NAME',title : '创建人员',width : 100,align : 'center'},
{field : 'CREATE_TIME',title : '创建时间',width : 100,align : 'center'},
{field : 'UPDATE_TIME',title : '更新时间',width : 100,align : 'center'},
{field : 'UPDATE_ID',title : '更新人员',width : 100,align : 'center'}
{field : 'UPDATE_USER_NAME',title : '更新人员',width : 100,align : 'center'},
{field : 'UPDATE_TIME',title : '更新时间',width : 100,align : 'center'}
] ];
//列表加载完成回调
function dataOnLoadSuccess(){
......
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>流程编辑页</title>
<script type="text/javascript" src="${ctx}/process/pages/procinstance/js/procinstanceModule.js" charset="utf-8"></script>
</head>
<style>
.proc_title {
color: #666;
text-align: left;
width: 90px;
height: 50px;
}
</style>
<script>
function proc_save(){
var returnIsValid = $('#form').form('validate');
if (returnIsValid) {
var query = $("#form").getFormVal();
query.FIELD_PROCID=$('#procId').val();
query.FIELD_FORM_MODEL_ID=$("#modelId").val();
var v_result = procinstanceModule.act.insertInfo(query);
console.log(v_result)
}
}
function proc_next(){
}
</script>
<body>
<form id="form">
<input type="hidden" id="procId" value="${procId}"/>
<input type="hidden" id="modelId" value="${modelId}"/>
${modelContent}
</form>
<ul>
<li><input type="button" value="保存" onclick="proc_save()"/></li>
<li><input type="button" value="下一步" onclick="proc_next()"/></li>
</ul>
</body>
</html>
......@@ -19,3 +19,5 @@ delete_true_and_delete_disk_file=true
#------------download_encode----------------------
downloadFilenameEncode1 = gbk
downloadFilenameEncode2 = iso8859-1
#------------business table database----------------------
lcyq_table_db = lcyq_table.
......@@ -121,5 +121,12 @@
<param name="root">jsonObject</param>
</result>
</action>
<!-- portal iframe专用 -->
<action name="processView_*" class="com.gaowj.process.action.viewAction"
method="{1}">
<result name="{1}">/process/pages/process/{1}.jsp
</result>
</action>
</package>
</struts>
......@@ -13,6 +13,7 @@ import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.FormtableBusiness;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.PropUtil;
import com.gaowj.business.util.SessionUtil;
public class FormtableBusinessImpl implements FormtableBusiness {
......@@ -144,6 +145,7 @@ public class FormtableBusinessImpl implements FormtableBusiness {
public void create_form_table(Map<String, Object> query)
throws BusinessException {
// TODO Auto-generated method stub
query.put("lcyq_table_db", PropUtil.getValue("lcyq_table_db", "quartz_service", ""));
formtableDAO.create_form_table(query);
}
......
......@@ -67,8 +67,12 @@
<select id="list_form_table" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
select f.*
select f.* ,c1.emname as create_user_name,c2.emname as update_user_name
from C_T_FORM_TABLE f
LEFT JOIN lcyq_system.c_t_sys_loginuser c1
ON f.create_id=c1.code
LEFT JOIN lcyq_system.c_t_sys_loginuser c2
ON f.update_id=c2.code
]]>
<include refid="Where_Clause" />
order by f.CREATE_TIME DESC
......@@ -83,7 +87,7 @@
</select>
<update id="create_form_table" parameterType="map">
CREATE TABLE ${tableName}(
CREATE TABLE ${lcyq_table_db}${tableName}(
<trim>
<foreach collection="list" item="item">
${item.FIELD_NAME} ${item.TYPE}
......
......@@ -74,7 +74,7 @@
</select>
<insert id="insert_custom_business" parameterType="map">
insert into ${tableName}(
insert into ${lcyq_table_db}${tableName}(
<trim prefix="" suffixOverrides=",">
<foreach collection="infoListKey" item="key">
${key},
......@@ -90,7 +90,7 @@
</insert>
<update id="update_custom_business" parameterType="map">
update ${tableName} set
update ${lcyq_table_db}${tableName} set
<trim suffixOverrides=",">
<foreach collection="infoList" item="info">
${info.key}=#{info.value},
......
......@@ -31,6 +31,7 @@ import com.gaowj.business.formtable.formtableDAO;
import com.gaowj.business.procdefinition.procdefinitionDAO;
import com.gaowj.business.system.SystemBackDAO;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.PropUtil;
import com.gaowj.business.util.SessionUtil;
import com.gaowj.business.utils.ActivitiTools;
import com.gaowj.business.utils.model.ActivitiOptEnum;
......@@ -247,6 +248,7 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
query.put("tableName", tableName);
query.put("PROC_DEFINITION_ID", procdefinitionUuid);
try {
query.put("lcyq_table_db", PropUtil.getValue("lcyq_table_db", "quartz_service", ""));
items = procinstanceDAO.list_proc_instance(new RowBounds(pageStart, pageSize), query);
} catch (Exception e) {
if (e.getMessage().indexOf("doesn't exist") != -1) {
......@@ -263,6 +265,7 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
int count = 0;
if (!notExist) {
// 如果表存在,则继续查询数量
query.put("lcyq_table_db", PropUtil.getValue("lcyq_table_db", "quartz_service", ""));
count = listCount_proc_instance(query);
}
......
......@@ -90,7 +90,7 @@
select f.*
from (
SELECT t.*,ins.proc_definition_id,ins.instance_id,ins.complete,ins.business_id,def.proc_name
FROM ${tableName} t
FROM ${lcyq_table_db}${tableName} t
LEFT JOIN c_t_proc_instance ins
ON t.uuid=ins.business_id
LEFT JOIN c_t_proc_definition def ON def.uuid = ins.proc_definition_id
......@@ -105,7 +105,7 @@
<![CDATA[
select count(*) c from
(
SELECT t.*,ins.proc_definition_id,ins.instance_id FROM ${tableName} t
SELECT t.*,ins.proc_definition_id,ins.instance_id FROM ${lcyq_table_db}${tableName} t
LEFT JOIN c_t_proc_instance ins
ON t.uuid=ins.business_id
)
......
......@@ -30,6 +30,7 @@ import com.gaowj.business.formtable.formtableDAO;
import com.gaowj.business.procdefinition.procdefinitionDAO;
import com.gaowj.business.procinstance.procinstanceDAO;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.PropUtil;
import com.gaowj.business.util.SessionUtil;
import com.gaowj.business.utils.ActivitiTools;
import com.gaowj.business.utils.model.ActivitiOptEnum;
......@@ -228,6 +229,7 @@ public class ProctaskBusinessImpl implements ProctaskBusiness {
Map<String, Object> query = new HashMap<String, Object>();
query.put("UUID", uuid);
query.put("tableName", tableName);
query.put("lcyq_table_db", PropUtil.getValue("lcyq_table_db", "quartz_service", ""));
return procinstanceDAO.list_proc_instance(query).get(0);
}
......
......@@ -32,6 +32,7 @@ import com.gaowj.business.ProcdefiChooseUserBusiness;
import com.gaowj.business.formtable.formtableDAO;
import com.gaowj.business.procdefinition.procdefinitionDAO;
import com.gaowj.business.procinstance.procinstanceDAO;
import com.gaowj.business.util.PropUtil;
import com.gaowj.business.util.SessionUtil;
import com.gaowj.business.utils.model.ActivitiOptEnum;
import com.gaowj.business.utils.model.ActivitiResultEnum;
......@@ -631,6 +632,7 @@ public class ActivitiTools {
entity.put("infoList", infoList);
}
entity.put("tableName", getTbleNameByUuid(tableId));
entity.put("lcyq_table_db", PropUtil.getValue("lcyq_table_db", "quartz_service", ""));
procdefinitionDAO.insert_custom_business(entity);
return entity;
}
......@@ -651,8 +653,9 @@ public class ActivitiTools {
// 设置表名
entity.put("tableName", getTbleNameByUuid(tableId));
entity.put("uuid", entity.get("UUID"));
procdefinitionDAO.update_custom_business(machiningUpdateEntity(entity, "uuid", "tableName"));
entity.put("lcyq_table_db", PropUtil.getValue("lcyq_table_db", "quartz_service", ""));
procdefinitionDAO.update_custom_business(machiningUpdateEntity(entity, "uuid", "tableName","lcyq_table_db"));
return entity.get("UUID").toString();
}
......
package com.gaowj.process.action;
import java.util.Map;
import com.gaowj.business.ProcdefinitionBusiness;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.RequestUtils;
public class viewAction extends BasicAction{
public String detail() throws BusinessException {
String procId=RequestUtils.getString(request, "procId");
request.setAttribute("procId", procId);
//通过流程id,获取表单
ProcdefinitionBusiness business = BusinessManager.getBusiness(ProcdefinitionBusiness.class);
Map<String,Object> model=business.findFormModel(procId);
request.setAttribute("modelContent", model.get("MODEL_CONTENT"));
request.setAttribute("modelId", model.get("UUID"));
return "detail";
}
}
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