Commit fa2bf8ca by Java-李昕颖

Merge remote-tracking branch 'origin/develop' into develop

parents 594aaf7f eb6fd0c8
...@@ -23,6 +23,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -23,6 +23,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.net.URLDecoder;
import java.util.List; import java.util.List;
/** /**
...@@ -99,7 +100,7 @@ public class ReportToPdfController extends BaseController { ...@@ -99,7 +100,7 @@ public class ReportToPdfController extends BaseController {
Paragraph paragraphPath1 = new Paragraph(); Paragraph paragraphPath1 = new Paragraph();
if (list != null && list.size() != 0) { if (list != null && list.size() != 0) {
for (ReportAttachmentEntity reportAttachmentEntity : list) { 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);
paragraphPath1.add(Chunk.NEWLINE); paragraphPath1.add(Chunk.NEWLINE);
} }
......
...@@ -7,6 +7,8 @@ import java.util.List; ...@@ -7,6 +7,8 @@ import java.util.List;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import com.ejweb.conf.GConstants;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import com.ejweb.core.persistence.TreeEntity; import com.ejweb.core.persistence.TreeEntity;
...@@ -37,7 +39,13 @@ public class Office extends TreeEntity<Office> { ...@@ -37,7 +39,13 @@ public class Office extends TreeEntity<Office> {
private User primaryPerson;//主负责人 private User primaryPerson;//主负责人
private User deputyPerson;//副负责人 private User deputyPerson;//副负责人
private List<String> childDeptList;//快速添加子部门 private List<String> childDeptList;//快速添加子部门
/**
* 获取数据库名称
*/
@JsonIgnore
public String getDbName(){
return GConstants.getValue("jdbc.type");
}
public Office(){ public Office(){
super(); super();
// this.sort = 30; // this.sort = 30;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#============================# #============================#
#\u4ea7\u54c1\u4fe1\u606f\u8bbe\u7f6e #\u4ea7\u54c1\u4fe1\u606f\u8bbe\u7f6e
productName=\u76d1\u5bdf\u4e3e\u62a5\u7ba1\u7406\u7cfb\u7edf productName=\u76d1\u5bdf\u5ba1\u8ba1\u7ba1\u7406\u7cfb\u7edf
copyrightYear=2017 copyrightYear=2017
version=V1.2.6 version=V1.2.6
...@@ -95,7 +95,7 @@ file.image.thumb.width=640 ...@@ -95,7 +95,7 @@ file.image.thumb.width=640
file.image.thumb.height=640 file.image.thumb.height=640
# The Prefix Url # The Prefix Url
#file.prefix.url=http://123.56.146.81:8808/ #file.prefix.url=http://123.56.146.81:8808/
file.prefix.url=http://192.168.3.232:8080/ file.prefix.url=http://192.168.3.232:8081/
# The Prefix separator # The Prefix separator
file.upload.path.separator = / file.upload.path.separator = /
......
...@@ -277,7 +277,8 @@ ...@@ -277,7 +277,8 @@
<select id="getOfficeList" resultType="Office"> <select id="getOfficeList" resultType="Office">
SELECT SELECT
so.id AS "id", 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 FROM ct_bbtc_sys_office so
WHERE so.type = '2' WHERE so.type = '2'
</select> </select>
...@@ -388,7 +389,8 @@ ...@@ -388,7 +389,8 @@
AND create_date >= #{startDate} AND create_date >= #{startDate}
</if> </if>
<if test="endDate != null"> <if test="endDate != null">
AND create_date &lt;= CONCAT(#{endDate}," 23:59:59") <if test="dbName == 'oracle'"> AND create_date &lt;= #{endDate}||" 23:59:59"</if>
<if test="dbName == 'mysql'"> AND create_date &lt;= CONCAT(#{endDate}," 23:59:59")</if>
</if> </if>
GROUP BY report_status GROUP BY report_status
</select> </select>
...@@ -404,7 +406,8 @@ ...@@ -404,7 +406,8 @@
AND create_date >= #{startDate} AND create_date >= #{startDate}
</if> </if>
<if test="endDate != null"> <if test="endDate != null">
AND create_date &lt;= CONCAT(#{endDate}," 23:59:59") <if test="dbName == 'oracle'"> AND create_date &lt;= #{endDate}||" 23:59:59"</if>
<if test="dbName == 'mysql'"> AND create_date &lt;= CONCAT(#{endDate}," 23:59:59")</if>
</if> </if>
GROUP BY deal_result GROUP BY deal_result
</select> </select>
...@@ -420,7 +423,8 @@ ...@@ -420,7 +423,8 @@
AND create_date >= #{startDate} AND create_date >= #{startDate}
</if> </if>
<if test="endDate != null"> <if test="endDate != null">
AND create_date &lt;= CONCAT(#{endDate}," 23:59:59") <if test="dbName == 'oracle'"> AND create_date &lt;= #{endDate}||" 23:59:59"</if>
<if test="dbName == 'mysql'"> AND create_date &lt;= CONCAT(#{endDate}," 23:59:59")</if>
</if> </if>
GROUP BY report_source GROUP BY report_source
</select> </select>
...@@ -436,7 +440,8 @@ ...@@ -436,7 +440,8 @@
AND create_date >= #{startDate} AND create_date >= #{startDate}
</if> </if>
<if test="endDate != null"> <if test="endDate != null">
AND create_date &lt;= CONCAT(#{endDate}," 23:59:59") <if test="dbName == 'oracle'"> AND create_date &lt;= #{endDate}||" 23:59:59"</if>
<if test="dbName == 'mysql'"> AND create_date &lt;= CONCAT(#{endDate}," 23:59:59")</if>
</if> </if>
GROUP BY supplement_type GROUP BY supplement_type
</select> </select>
...@@ -479,7 +484,8 @@ ...@@ -479,7 +484,8 @@
AND r.create_date >= #{startDate} AND r.create_date >= #{startDate}
</if> </if>
<if test="endDate != null"> <if test="endDate != null">
AND r.create_date &lt;= CONCAT(#{endDate}," 23:59:59") <if test="dbName == 'oracle'"> AND create_date &lt;= #{endDate}||" 23:59:59"</if>
<if test="dbName == 'mysql'"> AND create_date &lt;= CONCAT(#{endDate}," 23:59:59")</if>
</if> </if>
order by r.create_date desc order by r.create_date desc
limit 0,10 limit 0,10
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
<select id="getFileByPath" resultType="com.ejweb.modules.upload.entity.UploadEntity"> <select id="getFileByPath" resultType="com.ejweb.modules.upload.entity.UploadEntity">
SELECT orientation FROM ct_bbtc_upload_files 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> </select>
</mapper> </mapper>
\ No newline at end of file
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