Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV5portal
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
管理员
jfV5portal
Commits
ea11fd40
Commit
ea11fd40
authored
Sep 06, 2018
by
周王清
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报工模块的修改
修复了user_id,dept_id不能存入; 删除了bgmkDAO,多余的3个抽象方法; user_id,正确修复了读取的值 dao.xml 优化了where
parent
69d0fe7e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
200 deletions
+59
-200
actAction.java
src_jwapp/com/jw/app/bgmk/actAction.java
+0
-11
dataAction.java
src_jwapp/com/jw/app/bgmk/dataAction.java
+3
-9
BgmkBusinessImpl.java
src_jwapp/com/jw/app/business/bgmk/BgmkBusinessImpl.java
+9
-7
bgmkDAO.java
src_jwapp/com/jw/app/business/bgmk/bgmkDAO.java
+0
-5
bgmkDAO.xml
src_jwapp/com/jw/app/business/bgmk/bgmkDAO.xml
+46
-164
actAction.java
src_jwapp/com/jw/app/friendlink/action/actAction.java
+1
-4
No files found.
src_jwapp/com/jw/app/bgmk/actAction.java
View file @
ea11fd40
...
@@ -18,18 +18,7 @@ import com.jw.app.business.BgmkBusiness;
...
@@ -18,18 +18,7 @@ import com.jw.app.business.BgmkBusiness;
public
class
actAction
extends
BasicAction
{
public
class
actAction
extends
BasicAction
{
/**
*
*/
/**
*
*/
private
static
final
long
serialVersionUID
=
-
2059356249335526616L
;
private
static
final
long
serialVersionUID
=
-
2059356249335526616L
;
/**
*
*/
private
JSONObject
jsonObject
=
new
JSONObject
();
private
JSONObject
jsonObject
=
new
JSONObject
();
...
...
src_jwapp/com/jw/app/bgmk/dataAction.java
View file @
ea11fd40
...
@@ -23,22 +23,16 @@ import com.jw.app.business.BgmkBusiness;
...
@@ -23,22 +23,16 @@ import com.jw.app.business.BgmkBusiness;
public
class
dataAction
extends
BasicAction
{
public
class
dataAction
extends
BasicAction
{
/**
*
*/
private
static
final
long
serialVersionUID
=
8400799803941083524L
;
private
static
final
long
serialVersionUID
=
8400799803941083524L
;
/**
*
*/
private
static
final
String
console
=
null
;
private
static
final
String
console
=
null
;
private
JSONObject
jsonObject
=
new
JSONObject
();
private
JSONObject
jsonObject
=
new
JSONObject
();
private
int
rows
=
20
;
// 每页显示的记录数
private
int
rows
=
20
;
// 每页显示的记录数
private
int
page
=
1
;
// 当前第几页
private
int
page
=
1
;
// 当前第几页
public
JSONObject
getJsonObject
()
{
public
JSONObject
getJsonObject
()
{
return
jsonObject
;
return
jsonObject
;
}
}
...
...
src_jwapp/com/jw/app/business/bgmk/BgmkBusinessImpl.java
View file @
ea11fd40
...
@@ -34,6 +34,12 @@ public class BgmkBusinessImpl implements BgmkBusiness {
...
@@ -34,6 +34,12 @@ public class BgmkBusinessImpl implements BgmkBusiness {
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
());
}
}
if
(
entity
.
get
(
"USER_ID"
)==
null
){
entity
.
put
(
"USER_ID"
,
SessionUtil
.
getCode
());
}
if
(
entity
.
get
(
"DEPT_ID"
)==
null
){
entity
.
put
(
"DEPT_ID"
,
SessionUtil
.
getEmdepart
());
}
if
(
entity
.
get
(
"CREATE_TIME"
)==
null
){
if
(
entity
.
get
(
"CREATE_TIME"
)==
null
){
entity
.
put
(
"CREATE_TIME"
,
new
Date
());
entity
.
put
(
"CREATE_TIME"
,
new
Date
());
}
}
...
@@ -48,10 +54,6 @@ public class BgmkBusinessImpl implements BgmkBusiness {
...
@@ -48,10 +54,6 @@ public class BgmkBusinessImpl implements BgmkBusiness {
entity
.
put
(
"DEPT_NAME"
,
SessionUtil
.
getEmdepartname
());
entity
.
put
(
"DEPT_NAME"
,
SessionUtil
.
getEmdepartname
());
}
}
// if(entity.get("SAVEDAYS")==null){
// String ls_savedays = PropUtil.getValue("set_savedays", "quartz_service", "14");
// entity.put("SAVEDAYS", Integer.parseInt(ls_savedays));
// }
//动态传值插入
//动态传值插入
List
<
String
>
infoListKey
=
new
ArrayList
<
String
>();
List
<
String
>
infoListKey
=
new
ArrayList
<
String
>();
List
<
Object
>
infoList
=
new
ArrayList
<
Object
>();
List
<
Object
>
infoList
=
new
ArrayList
<
Object
>();
...
@@ -141,7 +143,7 @@ public class BgmkBusinessImpl implements BgmkBusiness {
...
@@ -141,7 +143,7 @@ public class BgmkBusinessImpl implements BgmkBusiness {
int
pageStart
=
(
pageNo
-
1
)
*
pageSize
;
int
pageStart
=
(
pageNo
-
1
)
*
pageSize
;
//获取列表
//获取列表
List
<
Map
<
String
,
Object
>>
items
=
bgmkDAO
.
list_bgmk
_employee
(
new
RowBounds
(
pageStart
,
pageSize
),
query
);
List
<
Map
<
String
,
Object
>>
items
=
bgmkDAO
.
list_bgmk
(
new
RowBounds
(
pageStart
,
pageSize
),
query
);
//获取列表个数
//获取列表个数
int
count
=
listCount_bgmk_employee
(
query
);
int
count
=
listCount_bgmk_employee
(
query
);
...
@@ -159,7 +161,7 @@ public class BgmkBusinessImpl implements BgmkBusiness {
...
@@ -159,7 +161,7 @@ public class BgmkBusinessImpl implements BgmkBusiness {
public
List
<
Map
<
String
,
Object
>>
list_bgmk_employee
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
public
List
<
Map
<
String
,
Object
>>
list_bgmk_employee
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
List
<
Map
<
String
,
Object
>>
list_data
=
CacheKit
.
get
(
"ehcache10"
,
"bgmk_employee"
+
query
);
List
<
Map
<
String
,
Object
>>
list_data
=
CacheKit
.
get
(
"ehcache10"
,
"bgmk_employee"
+
query
);
if
(
list_data
==
null
||
list_data
.
size
()==
0
){
if
(
list_data
==
null
||
list_data
.
size
()==
0
){
list_data
=
bgmkDAO
.
list_bgmk
_employee
(
query
);
list_data
=
bgmkDAO
.
list_bgmk
(
query
);
CacheKit
.
put
(
"ehcache10"
,
"bgmk_employee"
+
query
,
list_data
);
CacheKit
.
put
(
"ehcache10"
,
"bgmk_employee"
+
query
,
list_data
);
}
}
return
list_data
;
return
list_data
;
...
@@ -167,7 +169,7 @@ public class BgmkBusinessImpl implements BgmkBusiness {
...
@@ -167,7 +169,7 @@ public class BgmkBusinessImpl implements BgmkBusiness {
@Override
@Override
public
int
listCount_bgmk_employee
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
public
int
listCount_bgmk_employee
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
return
bgmkDAO
.
listCount_bgmk
_employee
(
query
);
return
bgmkDAO
.
listCount_bgmk
(
query
);
}
}
}
}
...
...
src_jwapp/com/jw/app/business/bgmk/bgmkDAO.java
View file @
ea11fd40
...
@@ -21,11 +21,6 @@ public interface bgmkDAO {
...
@@ -21,11 +21,6 @@ public interface bgmkDAO {
int
listCount_bgmk
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
int
listCount_bgmk
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
List
<
Map
<
String
,
Object
>>
list_bgmk_employee
(
RowBounds
rowbounds
,
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
List
<
Map
<
String
,
Object
>>
list_bgmk_employee
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
int
listCount_bgmk_employee
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
}
}
src_jwapp/com/jw/app/business/bgmk/bgmkDAO.xml
View file @
ea11fd40
...
@@ -2,53 +2,9 @@
...
@@ -2,53 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jw.app.business.bgmk.bgmkDAO"
>
<mapper
namespace=
"com.jw.app.business.bgmk.bgmkDAO"
>
<insert
id=
"insert_bgmk"
parameterType=
"map"
>
<sql
id=
"where_bg"
>
insert into WORK_BG(
<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_bgmk"
parameterType=
"map"
>
<![CDATA[
update WORK_BG set
]]>
<trim
prefix=
""
suffixOverrides=
","
>
<foreach
collection=
"info"
item=
"info"
>
${info.key} = #{info.value} ,
</foreach>
</trim>
<where>
<where>
<if
test=
"UUID != null and UUID != ''"
>
<trim
prefixOverrides=
"AND |OR"
>
and UUID = #{UUID}
</if>
</where>
</update>
<delete
id=
"delete_bgmk"
parameterType=
"list"
>
<![CDATA[
delete from WORK_BG where UUID IN
]]>
<foreach
collection=
"list"
item=
"UUID"
open=
"("
separator=
","
close=
")"
>
#{UUID}
</foreach>
</delete>
<select
id=
"list_bgmk"
parameterType=
"map"
resultType=
"upperCaseKeyMap"
>
<![CDATA[
select f.*
from WORK_BG f where 1=1
]]>
<if
test=
"UUID != null and UUID != ''"
>
<if
test=
"UUID != null and UUID != ''"
>
and f.UUID = #{UUID}
and f.UUID = #{UUID}
</if>
</if>
...
@@ -85,142 +41,67 @@
...
@@ -85,142 +41,67 @@
<if
test=
"CREATE_TIME != null and CREATE_TIME != ''"
>
<if
test=
"CREATE_TIME != null and CREATE_TIME != ''"
>
and f.CREATE_TIME = #{CREATE_TIME}
and f.CREATE_TIME = #{CREATE_TIME}
</if>
</if>
</trim>
</where>
</sql>
<insert
id=
"insert_bgmk"
parameterType=
"map"
>
insert into WORK_BG(
<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>
order by f.CREATE_TIME DESC
<update
id=
"update_bgmk"
parameterType=
"map"
>
</select>
<select
id=
"listCount_bgmk"
parameterType=
"map"
resultType=
"int"
>
<![CDATA[
<![CDATA[
select count(*) c from WORK_BG f where 1=1
update WORK_BG set
]]>
]]>
<trim
prefix=
""
suffixOverrides=
","
>
<foreach
collection=
"info"
item=
"info"
>
${info.key} = #{info.value} ,
</foreach>
</trim>
<where>
<if
test=
"UUID != null and UUID != ''"
>
<if
test=
"UUID != null and UUID != ''"
>
and f.UUID = #{UUID}
and UUID = #{UUID}
</if>
<if
test=
"USER_NAME != null and USER_NAME != ''"
>
and f.USER_NAME like '%${USER_NAME}%'
</if>
<if
test=
"USER_ID != null and USER_ID != ''"
>
and f.USER_ID = #{USER_ID}
</if>
<if
test=
"DEPT_NAME != null and DEPT_NAME != ''"
>
and f.DEPT_NAME = #{DEPT_NAME}
</if>
<if
test=
"CONTENT != null and CONTENT != ''"
>
and f.CONTENT = #{CONTENT}
</if>
<if
test=
"GZYS != null and GZYS != ''"
>
and f.GZYS = #{GZYS}
</if>
<if
test=
"BG_TIME != null and BG_TIME != ''"
>
and f.BG_TIME = #{BG_TIME}
</if>
<if
test=
"BG_TYPE != null and BG_TYPE != ''"
>
and f.BG_TYPE = #{BG_TYPE}
</if>
<if
test=
"USER_TYPE != null and USER_TYPE != ''"
>
and f.USER_TYPE = #{USER_TYPE}
</if>
<if
test=
"CREATOR_ID != null and CREATOR_ID != ''"
>
and f.CREATOR_ID = #{CREATOR_ID}
</if>
<if
test=
"CREATE_TIME != null and CREATE_TIME != ''"
>
and f.CREATE_TIME = #{CREATE_TIME}
</if>
</if>
</where>
</update>
</select>
<delete
id=
"delete_bgmk"
parameterType=
"list"
>
<![CDATA[
delete from WORK_BG where UUID IN
]]>
<foreach
collection=
"list"
item=
"UUID"
open=
"("
separator=
","
close=
")"
>
#{UUID}
</foreach>
</delete>
<select
id=
"list_bgmk
_employee
"
parameterType=
"map"
resultType=
"upperCaseKeyMap"
>
<select
id=
"list_bgmk"
parameterType=
"map"
resultType=
"upperCaseKeyMap"
>
<![CDATA[
<![CDATA[
select f.*
select f.*
from WORK_BG f where 1=1
from WORK_BG f where 1=1
]]>
]]>
<if
test=
"UUID != null and UUID != ''"
>
<include
refid=
"where_bg"
/>
and f.UUID = #{UUID}
</if>
<if
test=
"USER_NAME != null and USER_NAME != ''"
>
and f.USER_NAME like '%${USER_NAME}%'
</if>
<if
test=
"USER_ID != null and USER_ID != ''"
>
and f.USER_ID = #{USER_ID}
</if>
<if
test=
"DEPT_NAME != null and DEPT_NAME != ''"
>
and f.DEPT_NAME = #{DEPT_NAME}
</if>
<if
test=
"CONTENT != null and CONTENT != ''"
>
and f.CONTENT = #{CONTENT}
</if>
<if
test=
"GZYS != null and GZYS != ''"
>
and f.GZYS = #{GZYS}
</if>
<if
test=
"BG_TIME != null and BG_TIME != ''"
>
and f.BG_TIME = #{BG_TIME}
</if>
<if
test=
"BG_TYPE != null and BG_TYPE != ''"
>
and f.BG_TYPE = #{BG_TYPE}
</if>
<if
test=
"USER_TYPE != null and USER_TYPE != ''"
>
and f.USER_TYPE = #{USER_TYPE}
</if>
<if
test=
"CREATOR_ID != null and CREATOR_ID != ''"
>
and f.CREATOR_ID = #{CREATOR_ID}
</if>
<if
test=
"CREATE_TIME != null and CREATE_TIME != ''"
>
and f.CREATE_TIME = #{CREATE_TIME}
</if>
order by f.CREATE_TIME DESC
order by f.CREATE_TIME DESC
</select>
</select>
<select
id=
"listCount_bgmk
_employee
"
parameterType=
"map"
resultType=
"int"
>
<select
id=
"listCount_bgmk"
parameterType=
"map"
resultType=
"int"
>
<![CDATA[
<![CDATA[
select count(*) c from WORK_BG f where 1=1
select count(*) c from WORK_BG f where 1=1
]]>
]]>
<if
test=
"UUID != null and UUID != ''"
>
<include
refid=
"where_send"
/>
and f.UUID = #{UUID}
</if>
<if
test=
"USER_NAME != null and USER_NAME != ''"
>
and f.USER_NAME like '%${USER_NAME}%'
</if>
<if
test=
"USER_ID != null and USER_ID != ''"
>
and f.USER_ID = #{USER_ID}
</if>
<if
test=
"DEPT_NAME != null and DEPT_NAME != ''"
>
and f.DEPT_NAME = #{DEPT_NAME}
</if>
<if
test=
"CONTENT != null and CONTENT != ''"
>
and f.CONTENT = #{CONTENT}
</if>
<if
test=
"GZYS != null and GZYS != ''"
>
and f.GZYS = #{GZYS}
</if>
<if
test=
"BG_TIME != null and BG_TIME != ''"
>
and f.BG_TIME = #{BG_TIME}
</if>
<if
test=
"BG_TYPE != null and BG_TYPE != ''"
>
and f.BG_TYPE = #{BG_TYPE}
</if>
<if
test=
"USER_TYPE != null and USER_TYPE != ''"
>
and f.USER_TYPE = #{USER_TYPE}
</if>
<if
test=
"CREATOR_ID != null and CREATOR_ID != ''"
>
and f.CREATOR_ID = #{CREATOR_ID}
</if>
<if
test=
"CREATE_TIME != null and CREATE_TIME != ''"
>
and f.CREATE_TIME = #{CREATE_TIME}
</if>
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
src_jwapp/com/jw/app/friendlink/action/actAction.java
View file @
ea11fd40
...
@@ -16,10 +16,7 @@ import net.sf.json.JSONObject;
...
@@ -16,10 +16,7 @@ import net.sf.json.JSONObject;
public
class
actAction
extends
BasicAction
{
public
class
actAction
extends
BasicAction
{
/**
*
*/
private
static
final
long
serialVersionUID
=
3380082635300076202L
;
private
JSONObject
jsonObject
=
new
JSONObject
();
private
JSONObject
jsonObject
=
new
JSONObject
();
public
JSONObject
getJsonObject
()
{
public
JSONObject
getJsonObject
()
{
...
...
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