Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
Project
Project
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
竹天卫
tianjin-cement
Commits
b9161d33
Commit
b9161d33
authored
Jan 15, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.203.232.171:8888/zhutianwei/tianjin-cement
parents
a5264cae
1c1bcef0
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
118 additions
and
45 deletions
+118
-45
pom.xml
cement-business/pom.xml
+7
-1
TJCementApplication.java
.../java/cn/wise/sc/cement/business/TJCementApplication.java
+1
-0
EntityEnclosureController.java
...cement/business/controller/EntityEnclosureController.java
+9
-3
ReportController.java
.../wise/sc/cement/business/controller/ReportController.java
+10
-9
FastDFSUtils.java
...ava/cn/wise/sc/cement/business/util/dfs/FastDFSUtils.java
+36
-1
fastdfs-client.properties
cement-business/src/main/resources/fastdfs-client.properties
+2
-2
license.xml
cement-business/src/main/resources/license.xml
+13
-0
logback-spring.xml
cement-business/src/main/resources/logback-spring.xml
+1
-1
fastdfs-client.properties
cement-business/target/classes/fastdfs-client.properties
+2
-2
license.xml
cement-business/target/classes/license.xml
+13
-0
logback-spring.xml
cement-business/target/classes/logback-spring.xml
+1
-1
pom.properties
cement-business/target/maven-archiver/pom.properties
+1
-1
pom.properties
...ommon/common-swagger/target/maven-archiver/pom.properties
+1
-1
inputFiles.lst
...en-compiler-plugin/compile/default-compile/inputFiles.lst
+2
-2
application.yml
config/application.yml
+16
-18
GeneratorApplication.java
.../main/java/cn/wise/sc/cement/mg/GeneratorApplication.java
+1
-1
pom.properties
mybatis-generator/target/maven-archiver/pom.properties
+1
-1
inputFiles.lst
...en-compiler-plugin/compile/default-compile/inputFiles.lst
+1
-1
No files found.
cement-business/pom.xml
View file @
b9161d33
...
...
@@ -146,7 +146,6 @@
<artifactId>
gson
</artifactId>
<version>
2.8.5
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.aspose/aspose-slides -->
<dependency>
<groupId>
com.aspose
</groupId>
<!--自定义-->
...
...
@@ -155,6 +154,13 @@
<scope>
system
</scope>
<!--system,类似provided,需要显式提供依赖的jar以后,Maven就不会在Repository中查找它-->
<systemPath>
${basedir}/lib/aspose-cells-8.5.2.jar
</systemPath>
<!--项目根目录下的lib文件夹下-->
</dependency>
<dependency>
<groupId>
com.aspose
</groupId>
<!--自定义-->
<artifactId>
words
</artifactId>
<!--自定义-->
<version>
1.0
</version>
<!--自定义-->
<scope>
system
</scope>
<!--system,类似provided,需要显式提供依赖的jar以后,Maven就不会在Repository中查找它-->
<systemPath>
${basedir}/lib/words.jar
</systemPath>
<!--项目根目录下的lib文件夹下-->
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-base
</artifactId>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/TJCementApplication.java
View file @
b9161d33
...
...
@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.web.client.RestTemplate
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
import
java.util.TimeZone
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/EntityEnclosureController.java
View file @
b9161d33
...
...
@@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
sun.misc.BASE64Encoder
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -63,11 +62,15 @@ public class EntityEnclosureController {
return
BaseResponse
.
errorMsg
(
"登录信息失效"
);
}
if
(
extName
.
contains
(
FileExt
.
EXCL
.
getName
())
||
extName
.
contains
(
FileExt
.
EXCLX
.
getName
()))
{
String
pdfPath
=
FastDFSUtils
.
conventAndUpload
(
file
.
getInputStream
(),
fileName
);
String
pdfPath
=
FastDFSUtils
.
conventAndUploadExcel
(
file
.
getInputStream
(),
fileName
);
map
.
put
(
"pdfPath"
,
pdfPath
);
}
else
if
(
extName
.
contains
(
FileExt
.
DOC
.
getName
())
||
extName
.
contains
(
FileExt
.
DOCX
.
getName
()))
{
String
pdfPath
=
FastDFSUtils
.
conventAndUploadWord
(
file
.
getInputStream
(),
fileName
);
map
.
put
(
"pdfPath"
,
pdfPath
);
}
else
{
map
.
put
(
"pdfPath"
,
filePath
);
}
String
picUrl
=
filePath
;
map
.
put
(
"fileUrl"
,
picUrl
);
map
.
put
(
"fileName"
,
fileName
);
...
...
@@ -135,7 +138,10 @@ public class EntityEnclosureController {
mapSub
.
put
(
"fileName"
,
fileName
);
mapSub
.
put
(
"extName"
,
extName
);
if
(
extName
.
contains
(
FileExt
.
EXCL
.
getName
())
||
extName
.
contains
(
FileExt
.
EXCLX
.
getName
()))
{
String
pdfPath
=
FastDFSUtils
.
conventAndUpload
(
file
.
getInputStream
(),
fileName
);
String
pdfPath
=
FastDFSUtils
.
conventAndUploadExcel
(
file
.
getInputStream
(),
fileName
);
mapSub
.
put
(
"pdfPath"
,
pdfPath
);
}
else
if
(
extName
.
contains
(
FileExt
.
DOC
.
getName
())
||
extName
.
contains
(
FileExt
.
DOCX
.
getName
()))
{
String
pdfPath
=
FastDFSUtils
.
conventAndUploadWord
(
file
.
getInputStream
(),
fileName
);
mapSub
.
put
(
"pdfPath"
,
pdfPath
);
}
else
{
mapSub
.
put
(
"pdfPath"
,
filePath
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/ReportController.java
View file @
b9161d33
...
...
@@ -122,12 +122,12 @@ public class ReportController {
beanParams
.
put
(
"printDate"
,
rts
.
getPrintDate
());
beanParams
.
put
(
"year"
,
DateUtil
.
year
(
DateUtil
.
date
()));
beanParams
.
put
(
"month"
,
DateUtil
.
month
(
DateUtil
.
date
()));
beanParams
.
put
(
"day"
,
DateUtil
.
today
());
beanParams
.
put
(
"reportNo"
,
StrUtil
.
isEmpty
(
rts
.
getReportNo
())
?
""
:
rts
.
getReportNo
());
beanParams
.
put
(
"month"
,
DateUtil
.
month
(
DateUtil
.
date
()));
beanParams
.
put
(
"day"
,
DateUtil
.
today
());
beanParams
.
put
(
"reportNo"
,
StrUtil
.
isEmpty
(
rts
.
getReportNo
())
?
""
:
rts
.
getReportNo
());
beanParams
.
put
(
"firstMethodName"
,
getFirstSet
(
rts
.
getMethodNames
()));
beanParams
.
put
(
"firstEquipment"
,
getFirstSet
(
rts
.
getEquipmentNames
()));
beanParams
.
put
(
"firstMethodName"
,
getFirstSet
(
rts
.
getMethodNames
()));
beanParams
.
put
(
"firstEquipment"
,
getFirstSet
(
rts
.
getEquipmentNames
()));
beanParams
.
put
(
"methodNames"
,
moveFirst
(
rts
.
getMethodNames
()));
beanParams
.
put
(
"equipmentNames"
,
moveFirst
(
rts
.
getEquipmentNames
()));
...
...
@@ -166,7 +166,8 @@ public class ReportController {
qw
.
eq
(
"entity_id"
,
query
.
getId
());
if
(
FileExt
.
EXCL
.
getName
().
equals
(
query
.
getExtName
())
||
FileExt
.
EXCLX
.
getName
().
equals
(
query
.
getExtName
()))
{
FileExt
.
EXCLX
.
getName
().
equals
(
query
.
getExtName
())
||
FileExt
.
PDF
.
getName
().
equals
(
query
.
getExtName
()))
{
EntityEnclosure
one
=
iEntityEnclosureService
.
getOne
(
qw
);
if
(
BeanUtil
.
isEmpty
(
one
))
{
EntityEnclosure
entityEnclosure
=
new
EntityEnclosure
();
...
...
@@ -230,15 +231,15 @@ public class ReportController {
sixElement
.
setSo3
(
countResultMap
.
getOrDefault
(
SixElementKey
.
SO3
.
getKey
(),
"0"
));
}
private
String
getFirstSet
(
Set
<
String
>
set
){
private
String
getFirstSet
(
Set
<
String
>
set
)
{
Iterator
<
String
>
iterator
=
set
.
iterator
();
if
(
iterator
.
hasNext
()){
if
(
iterator
.
hasNext
())
{
return
iterator
.
next
();
}
return
""
;
}
private
static
Set
<
String
>
moveFirst
(
Set
<
String
>
set
){
private
static
Set
<
String
>
moveFirst
(
Set
<
String
>
set
)
{
Set
<
String
>
newSet
=
new
HashSet
<>(
set
.
size
());
Iterator
<
String
>
iterator
=
set
.
iterator
();
if
(
iterator
.
hasNext
())
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/util/dfs/FastDFSUtils.java
View file @
b9161d33
...
...
@@ -2,8 +2,10 @@ package cn.wise.sc.cement.business.util.dfs;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.io.file.FileReader
;
import
com.aspose.cells.License
;
import
com.aspose.cells.SaveFormat
;
import
com.aspose.cells.Workbook
;
import
com.aspose.words.Document
;
import
org.apache.commons.io.FilenameUtils
;
import
org.csource.common.MyException
;
import
org.csource.common.NameValuePair
;
...
...
@@ -181,7 +183,31 @@ public class FastDFSUtils {
}
public
static
String
conventAndUpload
(
InputStream
inputStream
,
String
filename
)
{
public
static
String
conventAndUploadWord
(
InputStream
inputStream
,
String
filename
)
{
File
outputFile
=
new
File
(
filename
+
".pdf"
);
String
filePath
=
""
;
try
{
Document
document
=
new
Document
(
inputStream
);
document
.
save
(
outputFile
.
getAbsolutePath
(),
com
.
aspose
.
words
.
SaveFormat
.
PDF
);
FileReader
fileReader
=
new
FileReader
(
outputFile
.
getAbsolutePath
());
filePath
=
uploadPic
(
fileReader
.
readBytes
(),
outputFile
.
getName
(),
outputFile
.
length
());
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
//删除创建的输出文件
FileUtil
.
del
(
outputFile
);
return
filePath
;
}
}
public
static
String
conventAndUploadExcel
(
InputStream
inputStream
,
String
filename
)
{
// 验证License
getLicense
();
File
outputFile
=
new
File
(
filename
+
".pdf"
);
String
filePath
=
""
;
try
{
...
...
@@ -202,4 +228,13 @@ public class FastDFSUtils {
}
}
public
static
void
getLicense
()
{
try
{
InputStream
is
=
FastDFSUtils
.
class
.
getClassLoader
().
getResourceAsStream
(
"\\license.xml"
);
License
aposeLic
=
new
License
();
aposeLic
.
setLicense
(
is
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
\ No newline at end of file
cement-business/src/main/resources/fastdfs-client.properties
View file @
b9161d33
...
...
@@ -4,7 +4,7 @@ fastdfs.charset=UTF-8
fastdfs.http.tracker_http_port
=
8888
fastdfs.http.anti_steal_token
=
no
fastdfs.http.secret_key
=
FastDFS1234567890
fastdfs.tracker_servers
=
localhost
:22122
#fastdfs.tracker_servers=
localhost
:22122
fastdfs.tracker_servers
=
192.168.110.85
:22122
#fastdfs.tracker_servers=
192.168.110.85
:22122
cement-business/src/main/resources/license.xml
0 → 100644
View file @
b9161d33
<License>
<Data>
<Products>
<Product>
Aspose.Total for Java
</Product>
<Product>
Aspose.Words for Java
</Product>
</Products>
<EditionType>
Enterprise
</EditionType>
<SubscriptionExpiry>
20991231
</SubscriptionExpiry>
<LicenseExpiry>
20991231
</LicenseExpiry>
<SerialNumber>
8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7
</SerialNumber>
</Data>
<Signature>
sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=
</Signature>
</License>
\ No newline at end of file
cement-business/src/main/resources/logback-spring.xml
View file @
b9161d33
...
...
@@ -8,7 +8,7 @@
<contextName>
logback-spring
</contextName>
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 -->
<property
name=
"logging.path"
value=
"./../wise-came/logs"
/
>
<!-- <property name="logging.path" value="./../wise-came/logs"/>--
>
<!--0. 日志格式和颜色渲染 -->
<!-- 彩色日志依赖的渲染类 -->
...
...
cement-business/target/classes/fastdfs-client.properties
View file @
b9161d33
...
...
@@ -4,7 +4,7 @@ fastdfs.charset=UTF-8
fastdfs.http.tracker_http_port
=
8888
fastdfs.http.anti_steal_token
=
no
fastdfs.http.secret_key
=
FastDFS1234567890
fastdfs.tracker_servers
=
localhost
:22122
#fastdfs.tracker_servers=
localhost
:22122
fastdfs.tracker_servers
=
192.168.110.85
:22122
#fastdfs.tracker_servers=
192.168.110.85
:22122
cement-business/target/classes/license.xml
0 → 100644
View file @
b9161d33
<License>
<Data>
<Products>
<Product>
Aspose.Total for Java
</Product>
<Product>
Aspose.Words for Java
</Product>
</Products>
<EditionType>
Enterprise
</EditionType>
<SubscriptionExpiry>
20991231
</SubscriptionExpiry>
<LicenseExpiry>
20991231
</LicenseExpiry>
<SerialNumber>
8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7
</SerialNumber>
</Data>
<Signature>
sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=
</Signature>
</License>
\ No newline at end of file
cement-business/target/classes/logback-spring.xml
View file @
b9161d33
...
...
@@ -8,7 +8,7 @@
<contextName>
logback-spring
</contextName>
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 -->
<property
name=
"logging.path"
value=
"./../wise-came/logs"
/
>
<!-- <property name="logging.path" value="./../wise-came/logs"/>--
>
<!--0. 日志格式和颜色渲染 -->
<!-- 彩色日志依赖的渲染类 -->
...
...
cement-business/target/maven-archiver/pom.properties
View file @
b9161d33
#Created by Apache Maven 3.6.
0
#Created by Apache Maven 3.6.
1
version
=
1.0-SNAPSHOT
groupId
=
cn.wise.sc.tjcement
artifactId
=
cement-business
cement-common/common-swagger/target/maven-archiver/pom.properties
View file @
b9161d33
#Created by Apache Maven 3.6.
0
#Created by Apache Maven 3.6.
1
version
=
1.0-SNAPSHOT
groupId
=
cn.wise.sc.tjcement
artifactId
=
common-swagger
cement-common/common-swagger/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
View file @
b9161d33
D:\
idea_workspases\tianjin-cement\cement-common\common-swagger\src\main\java\cn\wise\sc\cement\common\swagger\PackageInfo
.java
D:\
idea_workspases\tianjin-cement\cement-common\common-swagger\src\main\java\cn\wise\sc\cement\common\swagger\SwaggerConfig
.java
D:\
JavaProject\tianjin-cement\cement-common\common-swagger\src\main\java\cn\wise\sc\cement\common\swagger\SwaggerConfig
.java
D:\
JavaProject\tianjin-cement\cement-common\common-swagger\src\main\java\cn\wise\sc\cement\common\swagger\PackageInfo
.java
config/application.yml
View file @
b9161d33
...
...
@@ -42,23 +42,21 @@ mybatis-plus:
mapper-locations
:
classpath:/cn/wise/sc/cement/business/mapper/xml/*Mapper.xml
#天津
#weixin:
# corpId: ww348f91b2573c1867
# agentId: 1000002
# agentIdPC: 1000003
# agentSecret: gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o
# agentSecretPC: itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A
# backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
# systemUrl: <a href=\"https://open.weixin.qq.com/connect/oauth2/authorize?appid="ww348f91b2573c1867"&redirect_uri="https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system"%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect\">物化检测流程</a>,
#邦业
weixin
:
corpId
:
ww348f91b2573c1867
agentId
:
1000004
agentIdPC
:
1000005
agentSecret
:
flISLojPiE1_ieO9bPgyZ4g_4O-Rr-FKzs7e7p3HEtA
agentSecretPC
:
ABagJNftdn1uOYsDLrhlCIM8jZdcTgEA9DyX6kn_-hY
backUrl
:
https%3a%2f%2flab.wisenergy.cn%2flab-bangye
systemUrl
:
<a href=\"https://open.weixin.qq.com/connect/oauth2/authorize?appid="ww348f91b2573c1867"&redirect_uri="https%3a%2f%2flab.wisenergy.cn%2flab-bangye"%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect\">物化检测流程</a>,
agentId
:
1000002
agentIdPC
:
1000003
agentSecret
:
gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o
agentSecretPC
:
itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A
backUrl
:
https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
systemUrl
:
<a href=\"https://open.weixin.qq.com/connect/oauth2/authorize?appid="ww348f91b2573c1867"&redirect_uri="https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system"%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect\">物化检测流程</a>,
#邦业
#weixin:
# corpId: ww348f91b2573c1867
# agentId: 1000004
# agentIdPC: 1000005
# agentSecret: flISLojPiE1_ieO9bPgyZ4g_4O-Rr-FKzs7e7p3HEtA
# agentSecretPC: ABagJNftdn1uOYsDLrhlCIM8jZdcTgEA9DyX6kn_-hY
# backUrl: https%3a%2f%2flab.wisenergy.cn%2flab-bangye
# systemUrl: <a href=\"https://open.weixin.qq.com/connect/oauth2/authorize?appid="ww348f91b2573c1867"&redirect_uri="https%3a%2f%2flab.wisenergy.cn%2flab-bangye"%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect\">物化检测流程</a>,
mybatis-generator/src/main/java/cn/wise/sc/cement/mg/GeneratorApplication.java
View file @
b9161d33
...
...
@@ -47,7 +47,7 @@ public class GeneratorApplication {
AutoGenerator
mpg
=
new
AutoGenerator
();
// 数据源配置
DataSourceConfig
dsc
=
new
DataSourceConfig
();
dsc
.
setUrl
(
"jdbc:mysql://
192.168.110.85
:3306/sinoma_tcdri?useUnicode=true&useSSL=false&characterEncoding=utf8"
);
dsc
.
setUrl
(
"jdbc:mysql://
47.93.148.213
:3306/sinoma_tcdri?useUnicode=true&useSSL=false&characterEncoding=utf8"
);
dsc
.
setDriverName
(
"com.mysql.jdbc.Driver"
);
dsc
.
setUsername
(
"root"
);
dsc
.
setPassword
(
"admin!@#123"
);
...
...
mybatis-generator/target/maven-archiver/pom.properties
View file @
b9161d33
#Created by Apache Maven 3.6.
0
#Created by Apache Maven 3.6.
1
version
=
1.0-SNAPSHOT
groupId
=
cn.wise.sc.tjcement
artifactId
=
mybatis-generator
mybatis-generator/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
View file @
b9161d33
D:\
idea_workspases
\tianjin-cement\mybatis-generator\src\main\java\cn\wise\sc\cement\mg\GeneratorApplication.java
D:\
JavaProject
\tianjin-cement\mybatis-generator\src\main\java\cn\wise\sc\cement\mg\GeneratorApplication.java
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