Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sunac_report
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
java-sunac-report
sunac_report
Commits
f3d92f96
Commit
f3d92f96
authored
Sep 30, 2017
by
Java-张振楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码,以适配融创oracle数据库
parent
0def6d14
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
63 additions
and
21 deletions
+63
-21
FrontReportDao.java
src/main/java/com/ejweb/modules/front/report/dao/FrontReportDao.java
+1
-1
FrontReportService.java
src/main/java/com/ejweb/modules/front/report/service/FrontReportService.java
+1
-1
ReportDao.java
src/main/java/com/ejweb/modules/report/dao/ReportDao.java
+1
-1
ReportService.java
src/main/java/com/ejweb/modules/report/service/ReportService.java
+3
-2
User.java
src/main/java/com/ejweb/modules/sys/entity/User.java
+7
-1
UploadDao.xml
src/main/resources/mappings/modules/front.upload/UploadDao.xml
+3
-1
FrontReportDao.xml
src/main/resources/mappings/modules/front/report/FrontReportDao.xml
+5
-3
ReportDao.xml
src/main/resources/mappings/modules/report/ReportDao.xml
+4
-2
OfficeDao.xml
src/main/resources/mappings/modules/sys/OfficeDao.xml
+3
-2
reportDetail.jsp
src/main/webapp/WEB-INF/views/modules/report/reportDetail.jsp
+27
-5
reportTrack.jsp
src/main/webapp/WEB-INF/views/modules/report/reportTrack.jsp
+6
-0
workbench.jsp
src/main/webapp/WEB-INF/views/modules/workbench/workbench.jsp
+2
-2
No files found.
src/main/java/com/ejweb/modules/front/report/dao/FrontReportDao.java
View file @
f3d92f96
...
...
@@ -20,7 +20,7 @@ public interface FrontReportDao extends CrudDao<FrontReportEntity> {
public
Integer
insertReportAttachment
(
ReportAttachmentBean
bean
);
// 查找管理员
public
User
getUser
();
public
User
getUser
(
User
user
);
}
src/main/java/com/ejweb/modules/front/report/service/FrontReportService.java
View file @
f3d92f96
...
...
@@ -42,7 +42,7 @@ public class FrontReportService extends CrudService<FrontReportDao,FrontReportEn
bean
.
setReportStatus
(
"0"
);
// 查询管理员
User
user
=
dao
.
getUser
();
User
user
=
dao
.
getUser
(
new
User
()
);
if
(
user
!=
null
){
bean
.
setExchangeBeforeUser
(
user
.
getId
());
}
...
...
src/main/java/com/ejweb/modules/report/dao/ReportDao.java
View file @
f3d92f96
...
...
@@ -120,7 +120,7 @@ public interface ReportDao extends CrudDao<ReportEntity> {
* 查询管理员ID
* @return
*/
public
String
findAdmin
();
public
String
findAdmin
(
Office
office
);
/**
* 举报状态数据
...
...
src/main/java/com/ejweb/modules/report/service/ReportService.java
View file @
f3d92f96
package
com
.
ejweb
.
modules
.
report
.
service
;
import
com.ejweb.conf.GConstants
;
import
com.ejweb.core.persistence.Page
;
import
com.ejweb.core.service.CrudService
;
import
com.ejweb.core.utils.IdGen
;
...
...
@@ -252,7 +253,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
reportNotice
.
setSendToId
(
reportEntity
.
getExchangeAfterUser
());
reportNotice
.
setStatus
(
"0"
);
if
(
StringUtils
.
isNotBlank
(
reportEntity
.
getDealResult
())){
reportNotice
.
setSendToId
(
reportDao
.
findAdmin
());
reportNotice
.
setSendToId
(
reportDao
.
findAdmin
(
new
Office
()
));
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
"yyyy年MM月dd日"
);
String
dateStr
=
sdf1
.
format
(
date
);
reportNotice
.
setTitle
(
"“"
+
reportEntity
.
getSupplementTitle
()+
"”已由"
+
user
.
getName
()+
"于"
+
dateStr
+
"处理完成"
);
...
...
@@ -268,7 +269,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
"yyyy年MM月dd日"
);
String
dateStr
=
sdf1
.
format
(
date
);
reportNotice
.
setTitle
(
"“"
+
reportEntity
.
getSupplementTitle
()+
"”已由"
+
user
.
getName
()+
"于"
+
dateStr
+
"处理完成"
);
reportNotice
.
setSendToId
(
reportDao
.
findAdmin
());
reportNotice
.
setSendToId
(
reportDao
.
findAdmin
(
new
Office
()
));
}
else
{
//管理员转交或移交,消息标题为“请处理xxx”
reportNotice
.
setTitle
(
"请处理-“"
+
reportEntity
.
getSupplementTitle
()+
"”"
);
...
...
src/main/java/com/ejweb/modules/sys/entity/User.java
View file @
f3d92f96
...
...
@@ -311,7 +311,13 @@ public class User extends DataEntity<User> {
roleList
.
add
(
role
);
}
}
/**
* 获取数据库名称
*/
@JsonIgnore
public
String
getDbName
()
{
return
GConstants
.
getValue
(
"jdbc.type"
,
"mysql"
);
}
public
Position
getPosition
()
{
return
position
;
}
...
...
src/main/resources/mappings/modules/front.upload/UploadDao.xml
View file @
f3d92f96
...
...
@@ -47,7 +47,8 @@
<include
refid=
"fileColumns"
/>
FROM ct_bbtc_upload_files
WHERE path = #{code}
<if
test=
"dbName == 'oracle'"
>
AND rownum
<
= 1
</if>
ORDER BY created DESC
limit 1
<if
test=
"dbName == 'mysql'"
>
limit 1
</if>
</select>
</mapper>
\ No newline at end of file
src/main/resources/mappings/modules/front/report/FrontReportDao.xml
View file @
f3d92f96
...
...
@@ -85,13 +85,14 @@
)
</insert>
<select
id=
"getUser"
resultType=
"com.ejweb.modules.sys.entity.User"
>
<select
id=
"getUser"
parameterType=
"com.ejweb.modules.sys.entity.User"
resultType=
"com.ejweb.modules.sys.entity.User"
>
SELECT u.id
FROM ct_bbtc_sys_user u
LEFT JOIN ct_bbtc_sys_user2role u2r ON u2r.user_id = u.id
LEFT JOIN ct_bbtc_sys_role r ON r.id = u2r.role_id
WHERE r.enname = 'admin'
limit 1
WHERE r.enname = 'admin' AND u.del_flag = 0
<if
test=
"dbName == 'oracle'"
>
AND rownum
<
= 1
</if>
<if
test=
"dbName == 'mysql'"
>
limit 1
</if>
</select>
</mapper>
\ No newline at end of file
src/main/resources/mappings/modules/report/ReportDao.xml
View file @
f3d92f96
...
...
@@ -236,7 +236,7 @@
LEFT JOIN ct_bbtc_sys_area sac ON sac.id = so1.area_id
LEFT JOIN ct_bbtc_sys_area sao ON sao.id = so2.area_id
<where>
1 = 1
1 = 1
AND su.del_flag = 0
<if
test=
"no != null and no != ''"
>
AND su.no LIKE
<if
test=
"dbName == 'oracle'"
>
'%'||#{no}||'%'
</if>
...
...
@@ -349,7 +349,7 @@
AND r.exchange_type = #{exchangeType}
</select>
<select
id=
"findAdmin"
resultType=
"String"
>
<select
id=
"findAdmin"
parameterType=
"Office"
resultType=
"String"
>
SELECT
su.id
FROM
...
...
@@ -358,6 +358,8 @@
LEFT JOIN ct_bbtc_sys_role sr ON sr.id = sur.role_id
WHERE
sr.name = '系统管理员'
<if
test=
"dbName == 'oracle'"
>
AND rownum
<
= 1
</if>
<if
test=
"dbName == 'mysql'"
>
limit 1
</if>
</select>
<insert
id=
"addRecord"
>
...
...
src/main/resources/mappings/modules/sys/OfficeDao.xml
View file @
f3d92f96
...
...
@@ -100,13 +100,14 @@
</select>
<select
id=
"getCompany"
resultType=
"Office"
>
<select
id=
"getCompany"
parameterType=
"Office"
resultType=
"Office"
>
SELECT
<include
refid=
"officeColumns"
/>
FROM ct_bbtc_sys_office a
<include
refid=
"officeJoins"
/>
WHERE a.del_flag = #{DEL_FLAG_NORMAL} AND a.parent_id='1'
limit 1
<if
test=
"dbName == 'oracle'"
>
AND rownum
<
= 1
</if>
<if
test=
"dbName == 'mysql'"
>
limit 1
</if>
</select>
<insert
id=
"insert"
>
INSERT INTO ct_bbtc_sys_office(
...
...
src/main/webapp/WEB-INF/views/modules/report/reportDetail.jsp
View file @
f3d92f96
...
...
@@ -11,11 +11,32 @@
$
(
"#btnTrack"
).
click
(
function
()
{
window
.
location
.
href
=
"${ctx}/report/track?id=${report.id}"
;
});
$
(
"#btnDocument"
).
click
(
function
()
{
$
(
"#inputForm"
).
attr
(
"action"
,
"${ctx}/report/document?id=${report.id}"
);
$
(
"#inputForm"
).
submit
();
});
var
requestFlag
=
true
;
function
openDownloadDialog
(
id
){
if
(
requestFlag
==
true
){
$
.
ajax
({
url
:
"${ctx}/report/document?id="
+
id
,
dataType
:
"text"
,
traditional
:
true
,
//这里设置为true
cache
:
false
,
beforeSend
:
function
()
{
requestFlag
=
false
;
},
success
:
function
(
url
)
{
//登录成功后返回的数据
window
.
open
(
url
,
"_blank"
);
},
error
:
function
(){
alert
(
"数据错误!"
);
},
complete
:
function
()
{
requestFlag
=
true
;
}
});
}
else
{
top
.
$
.
jBox
.
tip
(
'正在加载,请稍等'
,
'warning'
);
}
}
</script>
<style
type=
"text/css"
>
.title
{
...
...
@@ -148,8 +169,9 @@
</div>
</div>
<li
class=
"btns"
>
<label
style=
"width:auto;"
><input
id=
"btnTrack"
class=
"btn btn-primary"
type=
"button"
value=
"跟踪"
/>
<input
id=
"btnDocument"
class=
"btn btn-primary"
type=
"button"
value=
"转为文档"
/>
<label
style=
"width:auto;"
>
<c:if
test=
"${report.reportStatus != '2'}"
><input
id=
"btnTrack"
class=
"btn btn-primary"
type=
"button"
value=
"跟踪"
/>
</c:if>
<input
id=
"btnDocument"
class=
"btn btn-primary"
type=
"button"
value=
"转为文档"
onclick=
"openDownloadDialog('${report.id}')"
/>
<input
id=
"btnReturn"
class=
"btn btn-primary"
type=
"button"
value=
"返回"
onclick=
"history.go(-1)"
/></label>
</li>
</form:form>
...
...
src/main/webapp/WEB-INF/views/modules/report/reportTrack.jsp
View file @
f3d92f96
...
...
@@ -147,6 +147,12 @@
<form:radiobutton
path=
"supplementArea"
value=
"North China"
checked=
"true"
/>
华北区域公司
<form:radiobutton
path=
"supplementArea"
value=
"BeiJing"
/>
北京区域公司
<form:radiobutton
path=
"supplementArea"
value=
"ShangHai"
/>
上海区域公司
<form:radiobutton
path=
"supplementArea"
value=
"SouthWest"
/>
西南区域公司
<form:radiobutton
path=
"supplementArea"
value=
"SouthEast"
/>
东南区域公司
<form:radiobutton
path=
"supplementArea"
value=
"Central China"
/>
华中区域公司
<form:radiobutton
path=
"supplementArea"
value=
"GuangShen"
/>
广深区域公司
<form:radiobutton
path=
"supplementArea"
value=
"Hainan"
/>
海南区域公司
<form:radiobutton
path=
"supplementArea"
value=
"Group"
/>
集团本部
<span
class=
"help-inline"
><font
color=
"red"
>
*
</font>
</span>
</div>
</div>
...
...
src/main/webapp/WEB-INF/views/modules/workbench/workbench.jsp
View file @
f3d92f96
...
...
@@ -229,9 +229,9 @@
</label>
</li>
<li
style=
"float: right"
><label>
至:
</label><input
id=
"endDate"
name=
"endDate"
readonly=
"readonly"
type=
"text"
maxlength=
"200"
class=
"Wdate"
style=
"width: auto"
onFocus=
"WdatePicker({lang:'zh-cn'})"
value=
"${workbench.endDate}"
/></li>
maxlength=
"200"
class=
"Wdate"
style=
"width: auto"
onFocus=
"WdatePicker({lang:'zh-cn'
,minDate:'#F{$dp.$D(\'startDate\')}'
})"
value=
"${workbench.endDate}"
/></li>
<li
style=
"float: right"
><label>
日期:
</label><input
id=
"startDate"
name=
"startDate"
readonly=
"readonly"
type=
"text"
maxlength=
"200"
class=
"Wdate"
style=
"width: auto"
onFocus=
"WdatePicker({lang:'zh-cn'})"
value=
"${workbench.startDate}"
/></li>
maxlength=
"200"
class=
"Wdate"
style=
"width: auto"
onFocus=
"WdatePicker({lang:'zh-cn'
,maxDate:'#F{$dp.$D(\'endDate\')}'
})"
value=
"${workbench.startDate}"
/></li>
</ul>
<ul
class=
"ul-form"
>
<div>
...
...
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