Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspect
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
912协同工作系统
项目监控管理工具
inspect
Commits
a1f6a347
提交
a1f6a347
authored
8月 18, 2020
作者:
杨雪
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改模板
上级
769d5475
全部展开
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
16 行增加
和
16 行删除
+16
-16
EvaluationController.java
...ava/com/zjty/inspect/controller/EvaluationController.java
+4
-9
FreeMakerUtils.java
src/main/java/com/zjty/inspect/utils/FreeMakerUtils.java
+1
-2
WpsUtil.java
src/main/java/com/zjty/inspect/utils/WpsUtil.java
+11
-5
reportTemplate.ftl
src/main/resources/templates/reportTemplate.ftl
+0
-0
reportTemplate1.0.ftl
src/main/resources/templates/reportTemplate1.0.ftl
+0
-0
reportTemplate2.ftl
src/main/resources/templates/reportTemplate2.ftl
+0
-0
没有找到文件。
src/main/java/com/zjty/inspect/controller/EvaluationController.java
浏览文件 @
a1f6a347
...
...
@@ -5,7 +5,9 @@ import com.zjty.inspect.aop.AuthAnnotation;
import
com.zjty.inspect.entity.*
;
import
com.zjty.inspect.service.EvaReportService
;
import
com.zjty.inspect.service.EvaluationService
;
import
com.zjty.inspect.utils.*
;
import
com.zjty.inspect.utils.ExcelUtil
;
import
com.zjty.inspect.utils.FreeMakerUtils
;
import
com.zjty.inspect.utils.WpsUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
...
...
@@ -27,6 +29,7 @@ import java.util.Map;
@RequestMapping
(
"/evaluation"
)
@Api
(
value
=
"评估报告管理接口"
,
description
=
"评估报告管理接口,提供页面的增、删、改、查"
)
public
class
EvaluationController
{
private
final
EvaluationService
evaluationService
;
private
final
EvaReportService
evaReportService
;
...
...
@@ -158,14 +161,6 @@ public class EvaluationController {
@ApiOperation
(
"下载报告"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"报告主键"
),
@ApiImplicitParam
(
name
=
"danjia"
,
value
=
"单价"
),
@ApiImplicitParam
(
name
=
"yusuan"
,
value
=
"总预算金额"
),
@ApiImplicitParam
(
name
=
"gong"
,
value
=
"工作量"
),
@ApiImplicitParam
(
name
=
"ewai"
,
value
=
"额外申请"
),
@ApiImplicitParam
(
name
=
"agree"
,
value
=
"0不同意 1同意"
)
})
@PostMapping
(
"/downloadWps"
)
public
ServerResponse
download
(
@RequestBody
Download
download
){
// return ResponseEntity.ok("http://120.55.57.35:12345/static/uplaods/a36b17568d4e466dacf9f088a29b4dbc.docx");
...
...
src/main/java/com/zjty/inspect/utils/FreeMakerUtils.java
浏览文件 @
a1f6a347
...
...
@@ -3,8 +3,6 @@ package com.zjty.inspect.utils;
import
com.zjty.inspect.entity.TechnologyContent
;
import
freemarker.template.Configuration
;
import
freemarker.template.Template
;
import
org.springframework.web.servlet.view.freemarker.FreeMarkerConfig
;
import
org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer
;
import
java.io.*
;
import
java.util.List
;
...
...
@@ -28,6 +26,7 @@ public class FreeMakerUtils {
public
static
String
createWord
(
Template
template
,
Map
<
String
,
List
<
TechnologyContent
>>
dataMap
)
throws
Exception
{
//文件路径
String
filePath
=
"/opt/monitor/inspect/static/ins/doc/"
;
// String filePath= "/home/tykj/doc/";
//文件名称
String
fileName
=
System
.
currentTimeMillis
()+
".docx"
;
...
...
src/main/java/com/zjty/inspect/utils/WpsUtil.java
浏览文件 @
a1f6a347
...
...
@@ -28,7 +28,11 @@ public class WpsUtil {
keyValue
.
put
(
"codeUrl"
,
reform
.
getCodeUrl
());
keyValue
.
put
(
"codeName"
,
reform
.
getCodeName
());
keyValue
.
put
(
"gitUrl"
,
reform
.
getGitUrl
());
keyValue
.
put
(
"moduleNum"
,
String
.
valueOf
(
reform
.
getModuleNum
()));
Integer
moduleNum
=
reform
.
getModuleNum
();
keyValue
.
put
(
"moduleNum"
,
"0"
);
if
(
moduleNum
>
0
){
keyValue
.
put
(
"moduleNum"
,
String
.
valueOf
(
moduleNum
));
}
keyValue
.
put
(
"cost"
,
String
.
valueOf
(
reform
.
getCost
()));
keyValue
.
put
(
"address"
,
flipYesOrNo
(
reform
.
getAddress
()));
keyValue
.
put
(
"localContact"
,
reform
.
getLocalContact
());
...
...
@@ -41,13 +45,13 @@ public class WpsUtil {
Integer
code
=
reform
.
getApplicationType
().
get
(
i
);
keyValue
.
put
(
"applicationType"
+
i
+
1
,
ApplicationType
.
getByCode
(
code
).
getName
());
}
keyValue
.
put
(
"time"
,
String
.
valueOf
(
reform
.
getTime
()));
if
(
StringUtils
.
isEmpty
(
String
.
valueOf
(
reform
.
getTime
()))){
keyValue
.
put
(
"time"
,
"0"
);
if
(!
StringUtils
.
isEmpty
(
String
.
valueOf
(
reform
.
getTime
()))&&
reform
.
getTime
()>
0
){
keyValue
.
put
(
"time"
,
String
.
valueOf
(
reform
.
getTime
()));
}
keyValue
.
put
(
"tableNum"
,
"0"
);
if
(!
StringUtils
.
isEmpty
(
String
.
valueOf
(
reform
.
getTableNum
()))){
if
(!
StringUtils
.
isEmpty
(
String
.
valueOf
(
reform
.
getTableNum
()))
&&
reform
.
getTableNum
()>
0
){
keyValue
.
put
(
"tableNum"
,
String
.
valueOf
(
reform
.
getTableNum
()));
}
keyValue
.
put
(
"databaseNum"
,
String
.
valueOf
(
reform
.
getDatabaseNum
()));
...
...
@@ -99,7 +103,9 @@ public class WpsUtil {
keyValue
.
put
(
"otherApi"
+
i1
,
"无"
);
continue
;
}
keyValue
.
put
(
"otherApi"
+
i1
,
otherApis
.
get
(
i
).
getApiName
());
if
(!
StringUtils
.
isEmpty
(
otherApis
.
get
(
i
).
getApiName
()))
{
keyValue
.
put
(
"otherApi"
+
i1
,
otherApis
.
get
(
i
).
getApiName
().
trim
());
}
}
repairMap
(
"microService"
,
13
,
middleware
.
getMicroServices
(),
keyValue
);
...
...
src/main/resources/templates/reportTemplate.ftl
浏览文件 @
a1f6a347
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/main/resources/templates/reportTemplate1.0.ftl
0 → 100644
浏览文件 @
a1f6a347
差异被折叠。
点击展开。
src/main/resources/templates/reportTemplate2.ftl
0 → 100644
浏览文件 @
a1f6a347
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论