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
f2b787a3
Commit
f2b787a3
authored
Sep 30, 2017
by
Java-张振楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改SQL,以适配融创oracle数据库
parent
a825becc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
12 deletions
+30
-12
ReportToPdfController.java
src/main/java/com/ejweb/modules/report/web/ReportToPdfController.java
+2
-1
Office.java
src/main/java/com/ejweb/modules/sys/entity/Office.java
+9
-1
ejweb.properties
src/main/resources/ejweb.properties
+2
-2
ReportDao.xml
src/main/resources/mappings/modules/report/ReportDao.xml
+13
-7
UploadDao.xml
src/main/resources/mappings/modules/upload/UploadDao.xml
+4
-1
No files found.
src/main/java/com/ejweb/modules/report/web/ReportToPdfController.java
View file @
f2b787a3
...
...
@@ -23,6 +23,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.net.URLDecoder
;
import
java.util.List
;
/**
...
...
@@ -99,7 +100,7 @@ public class ReportToPdfController extends BaseController {
Paragraph
paragraphPath1
=
new
Paragraph
();
if
(
list
!=
null
&&
list
.
size
()
!=
0
)
{
for
(
ReportAttachmentEntity
reportAttachmentEntity
:
list
)
{
Chunk
chunk
=
new
Chunk
(
reportAttachmentEntity
.
getAttachmentPath
(
),
urlfont
);
Chunk
chunk
=
new
Chunk
(
URLDecoder
.
decode
(
URLDecoder
.
decode
(
reportAttachmentEntity
.
getAttachmentPath
().
substring
(
reportAttachmentEntity
.
getAttachmentPath
().
lastIndexOf
(
"/"
)))
),
urlfont
);
paragraphPath1
.
add
(
chunk
);
paragraphPath1
.
add
(
Chunk
.
NEWLINE
);
}
...
...
src/main/java/com/ejweb/modules/sys/entity/Office.java
View file @
f2b787a3
...
...
@@ -7,6 +7,8 @@ import java.util.List;
import
javax.validation.constraints.NotNull
;
import
com.ejweb.conf.GConstants
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
org.hibernate.validator.constraints.Length
;
import
com.ejweb.core.persistence.TreeEntity
;
...
...
@@ -37,7 +39,13 @@ public class Office extends TreeEntity<Office> {
private
User
primaryPerson
;
//主负责人
private
User
deputyPerson
;
//副负责人
private
List
<
String
>
childDeptList
;
//快速添加子部门
/**
* 获取数据库名称
*/
@JsonIgnore
public
String
getDbName
(){
return
GConstants
.
getValue
(
"jdbc.type"
);
}
public
Office
(){
super
();
// this.sort = 30;
...
...
src/main/resources/ejweb.properties
View file @
f2b787a3
...
...
@@ -3,7 +3,7 @@
#============================#
#\u4ea7\u54c1\u4fe1\u606f\u8bbe\u7f6e
productName
=
\u
76d1
\u
5bdf
\u
4e3e
\u
62a5
\u
7ba1
\u7406\u
7cfb
\u
7edf
productName
=
\u
76d1
\u
5bdf
\u
5ba1
\u
8ba1
\u
7ba1
\u7406\u
7cfb
\u
7edf
copyrightYear
=
2017
version
=
V1.2.6
...
...
@@ -95,7 +95,7 @@ file.image.thumb.width=640
file.image.thumb.height
=
640
# The Prefix Url
#file.prefix.url=http://123.56.146.81:8808/
file.prefix.url
=
http://192.168.3.232:808
0
/
file.prefix.url
=
http://192.168.3.232:808
1
/
# The Prefix separator
file.upload.path.separator
=
/
...
...
src/main/resources/mappings/modules/report/ReportDao.xml
View file @
f2b787a3
...
...
@@ -277,7 +277,8 @@
<select
id=
"getOfficeList"
resultType=
"Office"
>
SELECT
so.id AS "id",
CONCAT(so.name,'(',(SELECT s.name FROM ct_bbtc_sys_office s WHERE s.id = so.parent_id),')') AS "name"
<if
test=
"dbName == 'oracle'"
>
so.name||'('||(SELECT s.name FROM ct_bbtc_sys_office s WHERE s.id = so.parent_id)||')' AS "name"
</if>
<if
test=
"dbName == 'mysql'"
>
CONCAT(so.name,'(',(SELECT s.name FROM ct_bbtc_sys_office s WHERE s.id = so.parent_id),')') AS "name"
</if>
FROM ct_bbtc_sys_office so
WHERE so.type = '2'
</select>
...
...
@@ -356,7 +357,7 @@
LEFT JOIN ct_bbtc_sys_user2role sur ON su.id = sur.user_id
LEFT JOIN ct_bbtc_sys_role sr ON sr.id = sur.role_id
WHERE
sr.name
`
= '系统管理员'
sr.name = '系统管理员'
</select>
<insert
id=
"addRecord"
>
...
...
@@ -388,7 +389,8 @@
AND create_date >= #{startDate}
</if>
<if
test=
"endDate != null"
>
AND create_date
<
= CONCAT(#{endDate}," 23:59:59")
<if
test=
"dbName == 'oracle'"
>
AND create_date
<
= #{endDate}||" 23:59:59"
</if>
<if
test=
"dbName == 'mysql'"
>
AND create_date
<
= CONCAT(#{endDate}," 23:59:59")
</if>
</if>
GROUP BY report_status
</select>
...
...
@@ -404,7 +406,8 @@
AND create_date >= #{startDate}
</if>
<if
test=
"endDate != null"
>
AND create_date
<
= CONCAT(#{endDate}," 23:59:59")
<if
test=
"dbName == 'oracle'"
>
AND create_date
<
= #{endDate}||" 23:59:59"
</if>
<if
test=
"dbName == 'mysql'"
>
AND create_date
<
= CONCAT(#{endDate}," 23:59:59")
</if>
</if>
GROUP BY deal_result
</select>
...
...
@@ -420,7 +423,8 @@
AND create_date >= #{startDate}
</if>
<if
test=
"endDate != null"
>
AND create_date
<
= CONCAT(#{endDate}," 23:59:59")
<if
test=
"dbName == 'oracle'"
>
AND create_date
<
= #{endDate}||" 23:59:59"
</if>
<if
test=
"dbName == 'mysql'"
>
AND create_date
<
= CONCAT(#{endDate}," 23:59:59")
</if>
</if>
GROUP BY report_source
</select>
...
...
@@ -436,7 +440,8 @@
AND create_date >= #{startDate}
</if>
<if
test=
"endDate != null"
>
AND create_date
<
= CONCAT(#{endDate}," 23:59:59")
<if
test=
"dbName == 'oracle'"
>
AND create_date
<
= #{endDate}||" 23:59:59"
</if>
<if
test=
"dbName == 'mysql'"
>
AND create_date
<
= CONCAT(#{endDate}," 23:59:59")
</if>
</if>
GROUP BY supplement_type
</select>
...
...
@@ -476,7 +481,8 @@
AND r.create_date >= #{startDate}
</if>
<if
test=
"endDate != null"
>
AND r.create_date
<
= CONCAT(#{endDate}," 23:59:59")
<if
test=
"dbName == 'oracle'"
>
AND create_date
<
= #{endDate}||" 23:59:59"
</if>
<if
test=
"dbName == 'mysql'"
>
AND create_date
<
= CONCAT(#{endDate}," 23:59:59")
</if>
</if>
order by r.create_date desc
limit 0,10
...
...
src/main/resources/mappings/modules/upload/UploadDao.xml
View file @
f2b787a3
...
...
@@ -44,6 +44,8 @@
<select
id=
"getFileByPath"
resultType=
"com.ejweb.modules.upload.entity.UploadEntity"
>
SELECT orientation FROM ct_bbtc_upload_files
WHERE #{path} LIKE CONCAT('%', path, '%')
WHERE #{path} LIKE
<if
test=
"dbName == 'oracle'"
>
'%'|| path|| '%'
</if>
<if
test=
"dbName == 'mysql'"
>
CONCAT('%', path, '%')
</if>
</select>
</mapper>
\ No newline at end of file
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