Commit 52b088f7 by 陈玉兰

提交

parent f66352fa
...@@ -602,8 +602,17 @@ function synchRow(index){ ...@@ -602,8 +602,17 @@ function synchRow(index){
if(is_row[0].IS_DBSYNCH=='1'){ if(is_row[0].IS_DBSYNCH=='1'){
$.messager.alert('警告',"该表已同步到数据库",'info'); $.messager.alert('警告',"该表已同步到数据库",'info');
} }
is_row[0].IS_DBSYNCH=1; $.ajax({
formtableModule.act.updateFormTable(is_row[0]) url:'formtableAct_synchFormTable',
data:{
tableId:is_row[0].UUID,
tableName:is_row[0].TABLE_NAME
},
success:function(data){
console.log(data);
}
});
//formtableModule.act.updateFormTable(is_row[0])
return; return;
} }
\ No newline at end of file
...@@ -49,6 +49,7 @@ $(function(){ ...@@ -49,6 +49,7 @@ $(function(){
var linkId=$.getUrlParam("procdef_linkId"); var linkId=$.getUrlParam("procdef_linkId");
$('#list1').datagrid({ $('#list1').datagrid({
title:'人员', title:'人员',
idField:'CODE',
iconCls:$.getJwWindowPic(), iconCls:$.getJwWindowPic(),
url:gaowj.WEB_APP_NAME + "/systemdata_listSysUser", url:gaowj.WEB_APP_NAME + "/systemdata_listSysUser",
queryParams : queryData,//查询参数 queryParams : queryData,//查询参数
...@@ -79,6 +80,7 @@ $(function(){ ...@@ -79,6 +80,7 @@ $(function(){
$('#list2').datagrid({ $('#list2').datagrid({
title:'人员', title:'人员',
idField:'CODE',
iconCls:$.getJwWindowPic(), iconCls:$.getJwWindowPic(),
url:gaowj.WEB_APP_NAME + "/procdefinitionData_getChooseUser?key_id="+linkId, url:gaowj.WEB_APP_NAME + "/procdefinitionData_getChooseUser?key_id="+linkId,
queryParams : queryData,//查询参数 queryParams : queryData,//查询参数
...@@ -111,20 +113,56 @@ $(function(){ ...@@ -111,20 +113,56 @@ $(function(){
function choosePeople(){ function choosePeople(){
var is_row = $('#list1').datagrid('getSelections'); var is_row1 = $('#list1').datagrid('getSelections');
$.each(is_row,function(index,value) { var is_row2 = $('#list2').datagrid('getRows');
$('#list2').datagrid('appendRow',is_row[index]); var arr1=[];
var arr2=[];
$.each(is_row1,function(index,value) {
console.log(value);
arr1.push(value.CODE);
});
$.each(is_row2,function(index,value) {
console.log(value);
arr2.push(value.CODE);
}); });
select_diff(arr1,arr2);
$('#list1').datagrid('clearSelections');
/*$.each(is_row,function(index,value) {
$('#list2').datagrid('appendRow',is_row[index]);
});*/
} }
function select_diff(arr1,arr2){
//临时数组存放
var tempArray1 = [];//临时数组1
var tempArray2 = [];//临时数组2
//通过对两个数组的对比,筛选出不同的code
for(var i=0;i<arr2.length;i++){
tempArray1[arr2[i]]=true;//将数array2 中的元素值作为tempArray1 中的键,值为true;
}
for(var i=0;i<arr1.length;i++){
if(!tempArray1[arr1[i]]){
tempArray2.push(arr1[i]);//过滤array1 中与array2 相同的元素;
}
}
//根据筛选出来的结果,找到那几行的数据,并追加上去
for(var i=0;i<tempArray2.length;i++){
var rowIndex = $('#list1').datagrid('getRowIndex', tempArray2[i]);//id是关键字值
var data = $('#list1').datagrid('getData').rows[rowIndex];
$('#list2').datagrid('appendRow',data);
}
}
function cancelChoosePeople(){ function cancelChoosePeople(){
var is_row = $('#list2').datagrid('getSelections'); var is_row = $('#list2').datagrid('getSelections');
$.each(is_row,function(index,value) { for(var i=0;i<is_row.length;i++){
var index = $('#list2').datagrid('getRowIndex',value); var index = $('#list2').datagrid('getRowIndex',is_row[i]);
//console.log(index)
$('#list2').datagrid('deleteRow',index); $('#list2').datagrid('deleteRow',index);
}); }
} }
function savePeople(key_id){ function savePeople(key_id){
......
...@@ -84,14 +84,24 @@ ...@@ -84,14 +84,24 @@
<trim prefix="" suffixOverrides=","> <trim prefix="" suffixOverrides=",">
<foreach collection="list" item="item"> <foreach collection="list" item="item">
${item.FIELD_NAME} ${item.TYPE} ${item.FIELD_NAME} ${item.TYPE}
<if test="item.LENGTH == null"> <choose>
#{item.LENGTH}, <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> </if>
<if test="item.LENGTH != null"> <if test="item.IS_NULL == 1">
(#{item.LENGTH}), DEFAULT NULL
</if> </if>
COMMENT '#{item.CONTENT}',
</foreach> </foreach>
</trim> </trim>
<![CDATA[ ) ]]> <![CDATA[ ) ]]>
ENGINE=InnoDB DEFAULT CHARSET=utf8;
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
<if test="KEY_ID != null and KEY_ID != ''"> <if test="KEY_ID != null and KEY_ID != ''">
and f.KEY_ID = #{KEY_ID} and f.KEY_ID = #{KEY_ID}
</if> </if>
<if test="LINK_KEY != null and LINK_KEY != ''">
and f.LINK_KEY = #{LINK_KEY}
</if>
</trim> </trim>
</sql> </sql>
<insert id="insert_procdefi_chooseDept" parameterType="map"> <insert id="insert_procdefi_chooseDept" parameterType="map">
...@@ -53,11 +56,16 @@ ...@@ -53,11 +56,16 @@
<select id="list_procdefi_chooseDept" parameterType="map" resultType="upperCaseKeyMap"> <select id="list_procdefi_chooseDept" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[ <![CDATA[
select f.* , select * FROM (
select A.* ,
U.`DPT_NAME`, U.`DPT_NAME`,
U.`DPT_NO` U.`DPT_NO`,
from C_T_PROC_CHOOSE_DEPT f L.`LINK_KEY`
LEFT JOIN LCYQ_SYSTEM.C_T_SYS_DEPARTMENT U ON U.`DPT_NO`=f.`DEPT_ID` from C_T_PROC_CHOOSE_DEPT A
LEFT JOIN LCYQ_SYSTEM.C_T_SYS_DEPARTMENT U ON U.`DPT_NO`=A.`DEPT_ID`
LEFT JOIN C_T_PROC_DEFINITION_INIT_LINK L ON L.`UUID`=A.`KEY_ID`
) f
]]> ]]>
<include refid="Where_Clause" /> <include refid="Where_Clause" />
order by f.CREATE_TIME DESC order by f.CREATE_TIME DESC
......
...@@ -215,6 +215,22 @@ public class actAction extends BasicAction { ...@@ -215,6 +215,22 @@ public class actAction extends BasicAction {
} }
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);
return "json";
}
public String listTableFile()throws BusinessException{ public String listTableFile()throws BusinessException{
FormfieldBusiness fieldBusiness=BusinessManager.getBusiness(FormfieldBusiness.class); FormfieldBusiness fieldBusiness=BusinessManager.getBusiness(FormfieldBusiness.class);
String tableId = RequestUtils.getString(request, "UUID"); String tableId = RequestUtils.getString(request, "UUID");
......
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