Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV5lcyq
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
管理员
jfV5lcyq
Commits
44cadacd
Commit
44cadacd
authored
May 22, 2018
by
陈玉兰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
ddd09a6d
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
320 additions
and
51 deletions
+320
-51
formtableTabDetail.jsp
WebContent/process/pages/formtable/formtableTabDetail.jsp
+6
-1
formtableModule.js
WebContent/process/pages/formtable/js/formtableModule.js
+3
-3
formtableTab.js
WebContent/process/pages/formtable/js/formtableTab.js
+15
-28
FormfieldBusiness.java
src_process/com/gaowj/business/FormfieldBusiness.java
+35
-0
FormtableBusiness.java
src_process/com/gaowj/business/FormtableBusiness.java
+1
-1
FormfieldBusinessImpl.java
...s/com/gaowj/business/formfiled/FormfieldBusinessImpl.java
+38
-0
formfieldDAO.java
src_process/com/gaowj/business/formfiled/formfieldDAO.java
+20
-0
formfieldDAO.xml
src_process/com/gaowj/business/formfiled/formfieldDAO.xml
+82
-0
FormtableBusinessImpl.java
...s/com/gaowj/business/formtable/FormtableBusinessImpl.java
+36
-1
formtableDAO.xml
src_process/com/gaowj/business/formtable/formtableDAO.xml
+4
-4
Property.java
src_process/com/gaowj/formtable/action/Property.java
+52
-0
actAction.java
src_process/com/gaowj/formtable/action/actAction.java
+28
-13
No files found.
WebContent/process/pages/formtable/formtableTabDetail.jsp
View file @
44cadacd
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<span>同步数据库状态:</span>
<span>同步数据库状态:</span>
</td>
</td>
<td style="width: 30%">
<td style="width: 30%">
<span id="IS_DBSYNCH"></span>
<span id="IS_DBSYNCH"
name="FIELD_IS_DBSYNCH" value="0"
></span>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
...
@@ -25,6 +25,10 @@
...
@@ -25,6 +25,10 @@
</td>
</td>
</tr>
</tr>
</table>
</table>
<div>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:addLine()">新增</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteLine()">删除</a>
</div>
<table id="fieldTable">
<table id="fieldTable">
</table>
</table>
</form>
</form>
\ No newline at end of file
WebContent/process/pages/formtable/js/formtableModule.js
View file @
44cadacd
...
@@ -9,11 +9,11 @@ var formtableModule = function(format) {
...
@@ -9,11 +9,11 @@ var formtableModule = function(format) {
formtableModule
.
prototype
=
BusinessObject
;
formtableModule
.
prototype
=
BusinessObject
;
//插入附件数据
//插入附件数据
formtableModule
.
prototype
.
insert
Student
=
function
(){};
formtableModule
.
prototype
.
insert
FormTable
=
function
(){};
//修改附件数据
//修改附件数据
formtableModule
.
prototype
.
update
Student
=
function
(){};
formtableModule
.
prototype
.
update
FormTable
=
function
(){};
//删除附件数据
//删除附件数据
formtableModule
.
prototype
.
delete
Student
=
function
(){};
formtableModule
.
prototype
.
delete
FormTable
=
function
(){};
//创建一个数据操作对象,然后再后续使用
//创建一个数据操作对象,然后再后续使用
formtableModule
.
act
=
new
formtableModule
(
"json"
).
delegate
(
"formtableAct"
);
formtableModule
.
act
=
new
formtableModule
(
"json"
).
delegate
(
"formtableAct"
);
...
...
WebContent/process/pages/formtable/js/formtableTab.js
View file @
44cadacd
...
@@ -128,24 +128,13 @@ var tr=['<tr>',
...
@@ -128,24 +128,13 @@ var tr=['<tr>',
//定义grid列表
//定义grid列表
var
ls_title
=
"表单管理 <font color='#993300'>(1、绿色表示未同步数据库 2、蓝色表示已同步数据库。)</font>"
;
var
ls_title
=
"表单管理 <font color='#993300'>(1、绿色表示未同步数据库 2、蓝色表示已同步数据库。)</font>"
;
var
is_column
=
[
[
var
is_column
=
[
[
{
field
:
'NAME'
,
title
:
'姓名'
,
width
:
100
,
align
:
'center'
},
{
field
:
'TABLE_NAME'
,
title
:
'表名'
,
width
:
100
,
align
:
'center'
},
{
field
:
'SEX'
,
title
:
'性别'
,
width
:
80
,
align
:
'center'
,
{
field
:
'CONTENT'
,
title
:
'描述'
,
width
:
80
,
align
:
'center'
},
formatter
:
function
(
value
)
{
{
field
:
'IS_DBSYNCH'
,
title
:
'是否同步到数据库'
,
width
:
100
,
align
:
'center'
},
return
getCodeName
(
v_sexquery_data
.
rowSet
,
value
);
}
},
{
field
:
'NATION'
,
title
:
'民族'
,
width
:
300
,
align
:
'center'
,
formatter
:
function
(
value
)
{
return
getCodeName
(
v_nationquery_data
.
rowSet
,
value
);
}
},
{
field
:
'STATUS'
,
title
:
'是否毕业'
,
width
:
100
,
align
:
'center'
,
formatter
:
function
(
value
)
{
return
getCodeName
(
v_statusquery_data
,
value
);
}
},
{
field
:
'CREATE_ID'
,
title
:
'创建人员'
,
width
:
100
,
align
:
'center'
},
{
field
:
'CREATE_ID'
,
title
:
'创建人员'
,
width
:
100
,
align
:
'center'
},
{
field
:
'CREATE_TIME'
,
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'
}
]
];
]
];
//列表加载完成回调
//列表加载完成回调
function
dataOnLoadSuccess
(){
function
dataOnLoadSuccess
(){
...
@@ -240,14 +229,14 @@ function addUrlOnloadCallback(is_row){
...
@@ -240,14 +229,14 @@ function addUrlOnloadCallback(is_row){
tr2
=
replaceByJson
(
tr2
,{
tr2
=
replaceByJson
(
tr2
,{
index
:
i
+
1
,
index
:
i
+
1
,
opt
:
'<input type="checkbox" />'
,
opt
:
'<input type="checkbox" />'
,
field_name
:
'<input type="text" name="
FIELD_
NAME" value="'
+
field
.
FIELD_NAME
+
'" />'
,
field_name
:
'<input type="text" name="
LIST['
+
i
+
'].
NAME" value="'
+
field
.
FIELD_NAME
+
'" />'
,
content
:
'<input type="text" name="CONTENT" value="'
+
field
.
CONTENT
+
'" />'
,
content
:
'<input type="text" name="
LIST['
+
i
+
'].
CONTENT" value="'
+
field
.
CONTENT
+
'" />'
,
length
:
'<input type="text" name="LENGTH" value="'
+
field
.
LENGTH
+
'" />'
,
length
:
'<input type="text" name="L
IST['
+
i
+
'].L
ENGTH" value="'
+
field
.
LENGTH
+
'" />'
,
point
:
'<input type="text" name="POINT" value="'
+
field
.
POINT
+
'" />'
,
point
:
'<input type="text" name="
LIST['
+
i
+
'].
POINT" value="'
+
field
.
POINT
+
'" />'
,
field_default
:
'<input type="text" name="
FIELD_
DEFAULT" value="'
+
field
.
FIELD_DEFAULT
+
'" />'
,
field_default
:
'<input type="text" name="
LIST['
+
i
+
'].
DEFAULT" value="'
+
field
.
FIELD_DEFAULT
+
'" />'
,
type
:
'<input type="text" name="TYPE" value="'
+
field
.
TYPE
+
'" />'
,
type
:
'<input type="text" name="
LIST['
+
i
+
'].
TYPE" value="'
+
field
.
TYPE
+
'" />'
,
is_key
:
'<input type="checkbox" name="IS_KEY" '
+
(
field
.
IS_KEY
==
true
?
'checked'
:
''
)
+
' />'
,
is_key
:
'<input type="checkbox" name="
LIST['
+
i
+
'].
IS_KEY" '
+
(
field
.
IS_KEY
==
true
?
'checked'
:
''
)
+
' />'
,
is_null
:
'<input type="checkbox"
name="
IS_NULL" '
+
(
field
.
IS_NULL
==
false
?
''
:
'checked'
)
+
' />'
is_null
:
'<input type="checkbox"
value="1" name="LIST['
+
i
+
'].
IS_NULL" '
+
(
field
.
IS_NULL
==
false
?
''
:
'checked'
)
+
' />'
});
});
$
(
tr2
).
appendTo
(
fieldTable
);
$
(
tr2
).
appendTo
(
fieldTable
);
}
}
...
@@ -261,9 +250,7 @@ function addUrlOnloadCallback(is_row){
...
@@ -261,9 +250,7 @@ function addUrlOnloadCallback(is_row){
}
}
//保存
//保存
function
insertData
(
is_entity
){
function
insertData
(
is_entity
){
is_entity
.
FIELD_CREATE_TIME
=
strToDateObj
(
is_entity
.
FIELD_CREATE_TIME
);
var
v_result
=
formtableModule
.
act
.
insertFormTable
(
is_entity
);
// is_entity.FIELD_RECEIVE_DATE = strToDateObj(is_entity.FIELD_RECEIVE_DATE);
var
v_result
=
studentModule
.
studentActAction
.
insertStudent
(
is_entity
);
$
(
'#list'
).
datagrid
(
'reload'
);
$
(
'#list'
).
datagrid
(
'reload'
);
return
v_result
;
return
v_result
;
}
}
...
...
src_process/com/gaowj/business/FormfieldBusiness.java
0 → 100644
View file @
44cadacd
package
com
.
gaowj
.
business
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.stereotype.Service
;
import
com.gaowj.business.exception.BusinessException
;
@Service
public
interface
FormfieldBusiness
{
/**
* 插入
* @param entity
* @throws BusinessException
*/
void
insert_form_field
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
/**
* 更新
* @param entity
* @throws BusinessException
*/
void
update_form_field
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
/**
* 删除记录
* @param entity
* @throws BusinessException
*/
void
delete_form_field
(
List
<
String
>
list
)
throws
BusinessException
;
List
<
Map
<
String
,
Object
>>
list_form_field
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
}
src_process/com/gaowj/business/FormtableBusiness.java
View file @
44cadacd
...
@@ -15,7 +15,7 @@ public interface FormtableBusiness {
...
@@ -15,7 +15,7 @@ public interface FormtableBusiness {
* @param entity
* @param entity
* @throws BusinessException
* @throws BusinessException
*/
*/
void
insert_form_table
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
Map
<
String
,
Object
>
insert_form_table
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
/**
/**
* 更新
* 更新
...
...
src_process/com/gaowj/business/formfiled/FormfieldBusinessImpl.java
0 → 100644
View file @
44cadacd
package
com
.
gaowj
.
business
.
formfiled
;
import
java.util.List
;
import
java.util.Map
;
import
com.gaowj.business.FormfieldBusiness
;
import
com.gaowj.business.exception.BusinessException
;
public
class
FormfieldBusinessImpl
implements
FormfieldBusiness
{
@Override
public
void
insert_form_field
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
// TODO Auto-generated method stub
}
@Override
public
void
update_form_field
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
// TODO Auto-generated method stub
}
@Override
public
void
delete_form_field
(
List
<
String
>
list
)
throws
BusinessException
{
// TODO Auto-generated method stub
}
@Override
public
List
<
Map
<
String
,
Object
>>
list_form_field
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
// TODO Auto-generated method stub
return
null
;
}
}
src_process/com/gaowj/business/formfiled/formfieldDAO.java
0 → 100644
View file @
44cadacd
package
com
.
gaowj
.
business
.
formfiled
;
import
java.util.List
;
import
java.util.Map
;
import
com.gaowj.business.exception.BusinessException
;
public
interface
formfieldDAO
{
void
insert_form_table
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
void
update_form_table
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
void
delete_form_table
(
List
<
String
>
list
)
throws
BusinessException
;
List
<
Map
<
String
,
Object
>>
list_form_table
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
}
src_process/com/gaowj/business/formfiled/formfieldDAO.xml
0 → 100644
View file @
44cadacd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.gaowj.business.formfield.formfieldDAO"
>
<sql
id=
"Where_Clause"
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND |OR"
>
<if
test=
"UUID != null and UUID != ''"
>
and f.UUID = #{UUID}
</if>
<if
test=
"TABLE_NAME != null and TABLE_NAME != ''"
>
and f.TABLE_NAME like #{TABLE_NAME_LIKE}
</if>
<if
test=
"CONTENT != null and CONTENT != ''"
>
and f.CONTENT like #{CONTENT_LIKE}
</if>
<if
test=
"IS_DBSYNCH != null and IS_DBSYNCH != ''"
>
and f.IS_DBSYNCH = #{IS_DBSYNCH}
</if>
<if
test=
"STATUS != null and STATUS != ''"
>
and f.STATUS = #{STATUS}
</if>
</trim>
</sql>
<insert
id=
"insert_form_table"
parameterType=
"map"
>
insert into C_T_FORM_FIELD(
<trim
prefix=
""
suffixOverrides=
","
>
<foreach
collection=
"infoListKey"
item=
"key"
>
${key},
</foreach>
</trim>
<![CDATA[ ) values( ]]>
<trim
prefix=
""
suffixOverrides=
","
>
<foreach
collection=
"infoList"
item=
"value"
>
#{value},
</foreach>
</trim>
<![CDATA[ ) ]]>
</insert>
<update
id=
"update_form_table"
parameterType=
"map"
>
<![CDATA[
update C_T_FORM_FIELD set
]]>
<trim
prefix=
""
suffixOverrides=
","
>
<foreach
collection=
"info"
item=
"info"
>
${info.key} = #{info.value} ,
</foreach>
</trim>
<where>
<if
test=
"UUID != null and UUID != ''"
>
and UUID = #{UUID}
</if>
</where>
</update>
<delete
id=
"delete_form_table"
parameterType=
"list"
>
<![CDATA[
delete from C_T_FORM_FIELD where UUID IN
]]>
<foreach
collection=
"list"
item=
"UUID"
open=
"("
separator=
","
close=
")"
>
#{UUID}
</foreach>
</delete>
<select
id=
"list_form_table"
parameterType=
"map"
resultType=
"upperCaseKeyMap"
>
<![CDATA[
select f.*
from C_T_FORM_FIELD f
]]>
<include
refid=
"Where_Clause"
/>
order by f.CREATE_TIME DESC
</select>
<select
id=
"listCount_form_table"
parameterType=
"map"
resultType=
"int"
>
<![CDATA[
select count(*) c from C_T_FORM_TABLE f
]]>
<include
refid=
"Where_Clause"
/>
</select>
</mapper>
src_process/com/gaowj/business/formtable/FormtableBusinessImpl.java
View file @
44cadacd
package
com
.
gaowj
.
business
.
formtable
;
package
com
.
gaowj
.
business
.
formtable
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -12,6 +13,7 @@ import org.apache.ibatis.session.RowBounds;
...
@@ -12,6 +13,7 @@ import org.apache.ibatis.session.RowBounds;
import
com.gaowj.business.FormtableBusiness
;
import
com.gaowj.business.FormtableBusiness
;
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.SessionUtil
;
public
class
FormtableBusinessImpl
implements
FormtableBusiness
{
public
class
FormtableBusinessImpl
implements
FormtableBusiness
{
private
formtableDAO
formtableDAO
;
private
formtableDAO
formtableDAO
;
...
@@ -25,8 +27,41 @@ public class FormtableBusinessImpl implements FormtableBusiness {
...
@@ -25,8 +27,41 @@ public class FormtableBusinessImpl implements FormtableBusiness {
}
}
@Override
@Override
public
void
insert_form_table
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
public
Map
<
String
,
Object
>
insert_form_table
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
if
(
entity
.
get
(
"UUID"
)==
null
){
entity
.
put
(
"UUID"
,
java
.
util
.
UUID
.
randomUUID
().
toString
());
}
if
(
entity
.
get
(
"CREATE_TIME"
)==
null
){
entity
.
put
(
"CREATE_TIME"
,
new
Date
());
}
if
(
entity
.
get
(
"CREATE_ID"
)==
null
){
entity
.
put
(
"CREATE_ID"
,
SessionUtil
.
getCode
());
}
if
(
entity
.
get
(
"UPDATE_ID"
)==
null
){
entity
.
put
(
"UPDATE_ID"
,
SessionUtil
.
getCode
());
}
if
(
entity
.
get
(
"UPDATE_TIME"
)==
null
){
entity
.
put
(
"UPDATE_TIME"
,
new
Date
());
}
if
(
entity
.
get
(
"IS_DBSYNCH"
)==
null
){
entity
.
put
(
"IS_DBSYNCH"
,
"0"
);
}
//动态传值插入
List
<
String
>
infoListKey
=
new
ArrayList
<
String
>();
List
<
Object
>
infoList
=
new
ArrayList
<
Object
>();
if
(
entity
.
keySet
()!=
null
){
Set
<
String
>
key
=
entity
.
keySet
();
// 将map集合中的key和value 取出来分别放到list集合里
for
(
String
str
:
key
)
{
infoList
.
add
(
entity
.
get
(
str
));
infoListKey
.
add
(
str
);
}
entity
.
put
(
"infoListKey"
,
infoListKey
);
entity
.
put
(
"infoList"
,
infoList
);
}
formtableDAO
.
insert_form_table
(
entity
);
formtableDAO
.
insert_form_table
(
entity
);
return
entity
;
}
}
@Override
@Override
...
...
src_process/com/gaowj/business/formtable/formtableDAO.xml
View file @
44cadacd
...
@@ -23,14 +23,14 @@
...
@@ -23,14 +23,14 @@
<insert
id=
"insert_form_table"
parameterType=
"map"
>
<insert
id=
"insert_form_table"
parameterType=
"map"
>
insert into C_T_FORM_TABLE(
insert into C_T_FORM_TABLE(
<trim
prefix=
""
suffixOverrides=
","
>
<trim
prefix=
""
suffixOverrides=
","
>
<foreach
collection=
"info
"
item=
"info
"
>
<foreach
collection=
"info
ListKey"
item=
"key
"
>
${
info.
key},
${key},
</foreach>
</foreach>
</trim>
</trim>
<![CDATA[ ) values( ]]>
<![CDATA[ ) values( ]]>
<trim
prefix=
""
suffixOverrides=
","
>
<trim
prefix=
""
suffixOverrides=
","
>
<foreach
collection=
"info
"
item=
"info
"
>
<foreach
collection=
"info
List"
item=
"value
"
>
#{
info.
value},
#{value},
</foreach>
</foreach>
</trim>
</trim>
<![CDATA[ ) ]]>
<![CDATA[ ) ]]>
...
...
src_process/com/gaowj/formtable/action/Property.java
0 → 100644
View file @
44cadacd
package
com
.
gaowj
.
formtable
.
action
;
public
class
Property
{
private
Object
IS_NULL
;
private
String
NAME
;
private
String
CONTENT
;
private
Integer
LENGTH
;
private
Integer
POINT
;
public
Object
getIS_NULL
()
{
return
IS_NULL
;
}
public
void
setIS_NULL
(
Object
iS_NULL
)
{
IS_NULL
=
iS_NULL
;
}
public
String
getNAME
()
{
return
NAME
;
}
public
void
setNAME
(
String
nAME
)
{
NAME
=
nAME
;
}
public
String
getCONTENT
()
{
return
CONTENT
;
}
public
void
setCONTENT
(
String
cONTENT
)
{
CONTENT
=
cONTENT
;
}
public
Integer
getLENGTH
()
{
return
LENGTH
;
}
public
void
setLENGTH
(
Integer
lENGTH
)
{
LENGTH
=
lENGTH
;
}
public
Integer
getPOINT
()
{
return
POINT
;
}
public
void
setPOINT
(
Integer
pOINT
)
{
POINT
=
pOINT
;
}
}
src_process/com/gaowj/formtable/action/actAction.java
View file @
44cadacd
package
com
.
gaowj
.
formtable
.
action
;
package
com
.
gaowj
.
formtable
.
action
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
net.sf.json.JSONObject
;
import
net.sf.json.JSONObject
;
import
com.gaowj.business.
Student
Business
;
import
com.gaowj.business.
Formtable
Business
;
import
com.gaowj.business.SystemOpeBusiness
;
import
com.gaowj.business.SystemOpeBusiness
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.comp.BusinessManager
;
import
com.gaowj.business.comp.BusinessManager
;
...
@@ -32,15 +33,28 @@ public class actAction extends BasicAction {
...
@@ -32,15 +33,28 @@ public class actAction extends BasicAction {
this
.
jsonObject
=
jsonObject
;
this
.
jsonObject
=
jsonObject
;
}
}
private
List
<
Property
>
LIST
;
public
List
<
Property
>
getLIST
()
{
return
LIST
;
}
public
void
setLIST
(
List
<
Property
>
lIST
)
{
LIST
=
lIST
;
}
/**
/**
* 插入
* 插入
* @param entity
* @param entity
* @throws BusinessException
* @throws BusinessException
*/
*/
public
String
insert
Student
()
throws
BusinessException
{
public
String
insert
FormTable
()
throws
BusinessException
{
StudentBusiness
business
=
BusinessManager
.
getBusiness
(
Student
Business
.
class
);
FormtableBusiness
business
=
BusinessManager
.
getBusiness
(
Formtable
Business
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
Map
<
String
,
Object
>
RE
=
RequestUtils
.
getUpdateFieldMap
(
request
,
"Form_"
);
jsonObject
=
new
JSONObject
();
jsonObject
=
new
JSONObject
();
try
{
try
{
entity
=
QueryParamUtil
.
StringToDate
(
entity
);
entity
=
QueryParamUtil
.
StringToDate
(
entity
);
...
@@ -48,8 +62,10 @@ public class actAction extends BasicAction {
...
@@ -48,8 +62,10 @@ public class actAction extends BasicAction {
//去除不要更新的字段
//去除不要更新的字段
entity
.
remove
(
"OPETYPE"
);
entity
.
remove
(
"OPETYPE"
);
//新增
//新增
business
.
insert_student
(
entity
);
Map
<
String
,
Object
>
formTable
=
business
.
insert_form_table
(
entity
);
Map
<
String
,
Object
>
param
=
new
HashMap
<
String
,
Object
>();
param
.
put
(
"list"
,
LIST
);
param
.
put
(
"table_id"
,
formTable
.
get
(
"UUID"
));
// 操作日志
// 操作日志
//sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
//sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
...
@@ -57,7 +73,7 @@ public class actAction extends BasicAction {
...
@@ -57,7 +73,7 @@ public class actAction extends BasicAction {
"增加学生测试数据"
,
(
String
)
entity
.
get
(
"UUID"
),
(
String
)
entity
.
get
(
"NAME"
),
"studentdemo1"
);
"增加学生测试数据"
,
(
String
)
entity
.
get
(
"UUID"
),
(
String
)
entity
.
get
(
"NAME"
),
"studentdemo1"
);
//
//
//更新缓存
//更新缓存
CacheKit
.
update
(
"ehcache11"
,
"com_gaowj_student_dataAction_listAll"
,
business
.
list_
student
(
null
));
CacheKit
.
update
(
"ehcache11"
,
"com_gaowj_student_dataAction_listAll"
,
business
.
list_
form_table
(
null
));
//
//
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"保存成功"
));
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"保存成功"
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -72,9 +88,9 @@ public class actAction extends BasicAction {
...
@@ -72,9 +88,9 @@ public class actAction extends BasicAction {
* @param entity
* @param entity
* @throws BusinessException
* @throws BusinessException
*/
*/
public
String
update
Student
()
throws
BusinessException
{
public
String
update
FormTable
()
throws
BusinessException
{
StudentBusiness
business
=
BusinessManager
.
getBusiness
(
Student
Business
.
class
);
FormtableBusiness
business
=
BusinessManager
.
getBusiness
(
Formtable
Business
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
try
{
try
{
...
@@ -82,7 +98,7 @@ public class actAction extends BasicAction {
...
@@ -82,7 +98,7 @@ public class actAction extends BasicAction {
entity
.
remove
(
"OPETYPE"
);
entity
.
remove
(
"OPETYPE"
);
//修改
//修改
entity
=
QueryParamUtil
.
StringToDate
(
entity
);
entity
=
QueryParamUtil
.
StringToDate
(
entity
);
business
.
update_
student
(
entity
);
business
.
update_
form_table
(
entity
);
// 操作日志
// 操作日志
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
sysbusiness
.
insert_logBusiness
(
"updateStudent"
,
""
+
entity
,
sysbusiness
.
insert_logBusiness
(
"updateStudent"
,
""
+
entity
,
...
@@ -101,21 +117,20 @@ public class actAction extends BasicAction {
...
@@ -101,21 +117,20 @@ public class actAction extends BasicAction {
* @param entity
* @param entity
* @throws BusinessException
* @throws BusinessException
*/
*/
public
String
delete
Student
()
throws
BusinessException
{
public
String
delete
FormTable
()
throws
BusinessException
{
StudentBusiness
business
=
BusinessManager
.
getBusiness
(
Student
Business
.
class
);
FormtableBusiness
business
=
BusinessManager
.
getBusiness
(
Formtable
Business
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
String
deletekey
=
(
String
)
entity
.
get
(
"CODE"
);
String
deletekey
=
(
String
)
entity
.
get
(
"CODE"
);
List
<
String
>
ListKey
=
QueryParamUtil
.
StringToList
(
deletekey
);
List
<
String
>
ListKey
=
QueryParamUtil
.
StringToList
(
deletekey
);
try
{
try
{
business
.
delete_
student
(
ListKey
);
business
.
delete_
form_table
(
ListKey
);
// 操作日志
// 操作日志
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
sysbusiness
.
insert_logBusiness
(
"deleteStudent"
,
""
+
ListKey
,
sysbusiness
.
insert_logBusiness
(
"deleteStudent"
,
""
+
ListKey
,
"删除学生测试数据"
,
deletekey
,
"多个流水号"
,
"studentdemo1"
);
"删除学生测试数据"
,
deletekey
,
"多个流水号"
,
"studentdemo1"
);
//
//
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"删除成功"
));
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"删除成功"
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
jsonObject
.
putAll
(
Status
.
getStatusErrorMessage
(
"删除失败"
));
jsonObject
.
putAll
(
Status
.
getStatusErrorMessage
(
"删除失败"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment