Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李苗
/
Vion-DevOps
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fa845a68
authored
Jul 17, 2024
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[add]
1.文件来源添加 31启动会 2.钉钉消息通知具体内容添加标题
1 parent
f786ad1b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
36 additions
and
28 deletions
src/main/java/vion/cron/LogPushRunner.java
src/main/java/vion/cron/TaskRunner.java
src/main/java/vion/model/FileInfo.java
src/main/java/vion/service/impl/ContractServiceImpl.java
src/main/java/vion/service/impl/DeliverLogServiceImpl.java
src/main/java/vion/service/impl/DeliveryRecordServiceImpl.java
src/main/java/vion/service/impl/StoreServiceImpl.java
src/main/java/vion/service/impl/TaskServiceImpl.java
src/main/java/vion/service/impl/TaskTempServiceImpl.java
src/main/java/vion/cron/LogPushRunner.java
View file @
fa845a6
...
...
@@ -81,8 +81,9 @@ public class LogPushRunner {
var
msg
=
new
JSONObject
();
var
content
=
new
JSONObject
();
content
.
set
(
"title"
,
"项目日志提醒"
)
content
.
set
(
"title"
,
"项目日志
待提交
提醒"
)
.
set
(
"text"
,
StrUtil
.
format
(
"""
### 项目日志待提交提醒
#### 项目:[{}]请及时提交日志
#### 发送时间:{}"""
,
storeName
,
DateUtil
.
now
()));
...
...
src/main/java/vion/cron/TaskRunner.java
View file @
fa845a6
...
...
@@ -53,14 +53,15 @@ public class TaskRunner {
var
msg
=
JSONUtil
.
ofObj
();
var
content
=
JSONUtil
.
ofObj
()
.
set
(
"title"
,
"请查看您未完成的工单~_~"
)
.
set
(
"markdown"
,
"#### 请查看您未完成的工单"
+
" \n #### 发送时间:"
+
DateUtil
.
now
())
.
set
(
"markdown"
,
"""
### 未完成工单提醒
#### 请查看您未完成的工单
#### 发送时间:"""
+
DateUtil
.
now
())
.
set
(
"btn_orientation"
,
"1"
);
JSONArray
jsonArray
=
JSONUtil
.
ofArray
()
.
put
(
JSONUtil
.
ofObj
().
set
(
"title"
,
"查看详情"
)
.
set
(
"action_url"
,
"""
https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingkrzwks0jpi2di3uo&response_type=code&scope=snsapi_auth&state=STATE&redirect_uri=https%3A%2F%2Fyunwei.vionyun.com%3A8443%2Fyunwei%2Fapi%2Fding%2Fcallback%2Finside%3FuserId%3D"""
+
user
.
getId
()));
.
set
(
"action_url"
,
"https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingkrzwks0jpi2di3uo&response_type=code&scope=snsapi_auth&state=STATE&redirect_uri=https%3A%2F%2Fyunwei.vionyun.com%3A8443%2Fyunwei%2Fapi%2Fding%2Fcallback%2Finside%3FuserId%3D"
+
user
.
getId
()));
content
.
set
(
"btn_json_list"
,
jsonArray
);
msg
.
set
(
"msgtype"
,
"action_card"
).
set
(
"action_card"
,
content
);
...
...
src/main/java/vion/model/FileInfo.java
View file @
fa845a6
...
...
@@ -33,7 +33,7 @@ public class FileInfo {
* <br>16客户提交的门店图纸,17点位设计图,18合同范本,19客户上传的合同,20安装上线,与总部邮件截图</br>
* <br>21服务单等表单富文本编辑器里传图用这个类型</br>
* <br>22备件,23返修</br>
* <br>24验收报告,25竣工图纸,26点位表,27项目总结,28前期勘察,29巡检报告,30结算资料</br>
* <br>24验收报告,25竣工图纸,26点位表,27项目总结,28前期勘察,29巡检报告,30结算资料
,31启动会
</br>
*/
private
Integer
sourceType
;
/** 文件来源id */
...
...
src/main/java/vion/service/impl/ContractServiceImpl.java
View file @
fa845a6
...
...
@@ -811,7 +811,8 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
var
msg
=
JSONUtil
.
ofObj
();
var
content
=
JSONUtil
.
ofObj
().
set
(
"title"
,
"合同施工申请,请及时处理哦~_~"
);
String
template
=
"""
#### 合同编号: **{}**"
+
### 合同施工申请
#### 合同编号: **{}**
#### 合同名称:**{}**
#### 申请人:{}
#### 发送时间:{}
...
...
@@ -833,11 +834,11 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
var
msg
=
JSONUtil
.
ofObj
();
var
content
=
JSONUtil
.
ofObj
().
set
(
"title"
,
"验收提醒"
);
String
template
=
"""
####
验收提醒
" +
#### 合同编号:**{}**
"
+
####
合同名称
:**{}**
" +
#### 状态:{}
"
+
####
验收时间
:{}
" +
#### 验收提醒
#### 合同编号:**{}**
#### 合同名称:**{}**
#### 状态:{}
#### 验收时间:{}
#### 发送时间:{}
"""
;
String
markdown
=
StrUtil
.
format
(
template
,
...
...
@@ -1087,6 +1088,7 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
var
bongMap
=
BeanUtil
.
beanToMap
(
xbongContract
,
new
HashMap
<>(),
copyOptions
);
if
(!
mapEqual
(
platMap
,
bongMap
))
{
log
.
info
(
"不一致的合同:{}"
,
contractNo
);
//
}
}
}
...
...
src/main/java/vion/service/impl/DeliverLogServiceImpl.java
View file @
fa845a6
...
...
@@ -135,6 +135,7 @@ public class DeliverLogServiceImpl extends MPJBaseServiceImpl<DeliverLogMapper,
var
content
=
new
JSONObject
();
content
.
set
(
"title"
,
"项目交付日志提醒"
)
.
set
(
"text"
,
StrUtil
.
format
(
"""
### 项目交付日志提醒
#### 项目:{}
#### 合同编号:{}
#### 日志提交人:{}
...
...
@@ -163,6 +164,7 @@ public class DeliverLogServiceImpl extends MPJBaseServiceImpl<DeliverLogMapper,
var
content
=
new
JSONObject
();
content
.
set
(
"title"
,
"项目交付日志提醒"
)
.
set
(
"text"
,
StrUtil
.
format
(
"""
### 项目交付日志提醒
#### 您的日志还未提交,请尽快提交!
#### 未提交日志日期:{}
#### 发送时间:{}"""
,
dateStr
,
DateUtil
.
now
()));
...
...
src/main/java/vion/service/impl/DeliveryRecordServiceImpl.java
View file @
fa845a6
...
...
@@ -170,8 +170,7 @@ public class DeliveryRecordServiceImpl extends MPJBaseServiceImpl<DeliveryRecord
var
jsonArray
=
JSONUtil
.
ofArray
()
.
put
(
JSONUtil
.
ofObj
()
.
set
(
"title"
,
"查看详情"
)
.
set
(
"action_url"
,
"""
https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingkrzwks0jpi2di3uo&response_type=code&scope=snsapi_auth&state=STATE&redirect_uri=https%3A%2F%2Fyunwei.vionyun.com%3A8443%2Fyunwei%2Fapi%2Fding%2Fcallback%2Finside%3FdeliveryId%3D"""
+
rec
.
getId
()));
.
set
(
"action_url"
,
"https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingkrzwks0jpi2di3uo&response_type=code&scope=snsapi_auth&state=STATE&redirect_uri=https%3A%2F%2Fyunwei.vionyun.com%3A8443%2Fyunwei%2Fapi%2Fding%2Fcallback%2Finside%3FdeliveryId%3D"
+
rec
.
getId
()));
content
.
set
(
"btn_json_list"
,
jsonArray
);
msg
.
set
(
"msgtype"
,
"action_card"
).
set
(
"action_card"
,
content
);
...
...
src/main/java/vion/service/impl/StoreServiceImpl.java
View file @
fa845a6
...
...
@@ -124,7 +124,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
.
map
(
l
->
fileService
.
lambdaQuery
()
.
in
(
FileInfo:
:
getSourceId
,
l
)
.
in
(
FileInfo:
:
getStoreId
,
l
)
.
in
(
FileInfo:
:
getSourceType
,
1
,
24
,
25
,
26
,
27
,
28
,
29
,
30
)
.
in
(
FileInfo:
:
getSourceType
,
1
,
24
,
25
,
26
,
27
,
28
,
29
,
30
,
31
)
.
list
())
.
map
(
fileList
->
fileList
.
stream
().
collect
(
Collectors
.
groupingBy
(
FileInfo:
:
getStoreId
,
Collectors
.
counting
())))
.
orElse
(
MapUtil
.
empty
());
...
...
@@ -563,7 +563,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
.
map
(
ids
->
fileService
.
lambdaQuery
()
.
in
(
FileInfo:
:
getSourceId
,
ids
)
.
in
(
FileInfo:
:
getStoreId
,
ids
)
.
in
(
FileInfo:
:
getSourceType
,
1
,
24
,
25
,
26
,
27
,
28
,
29
,
30
)
.
in
(
FileInfo:
:
getSourceType
,
1
,
24
,
25
,
26
,
27
,
28
,
29
,
30
,
31
)
.
list
())
.
orElse
(
List
.
of
());
var
contractId2NoMap
=
Opt
.
ofEmptyAble
(
files
)
...
...
@@ -593,13 +593,13 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
"前期勘察"
,
"点位表"
,
"竣工图纸"
,
"验收报告"
,
"项目总结"
,
"巡检报告"
,
"结算资料"
,
"其它"
);
"结算资料"
,
"
启动会"
,
"
其它"
);
var
files
=
Opt
.
ofEmptyAble
(
storeIds
)
.
map
(
ids
->
fileService
.
lambdaQuery
()
.
in
(
FileInfo:
:
getSourceId
,
ids
)
.
in
(
FileInfo:
:
getStoreId
,
ids
)
.
in
(
FileInfo:
:
getSourceType
,
1
,
24
,
25
,
26
,
27
,
28
,
29
,
30
)
.
in
(
FileInfo:
:
getSourceType
,
1
,
24
,
25
,
26
,
27
,
28
,
29
,
30
,
31
)
.
list
())
.
orElse
(
List
.
of
());
var
contractId2NoMap
=
Opt
.
ofEmptyAble
(
files
)
...
...
@@ -634,7 +634,8 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
.
put
(
"g"
,
typeCntMap
.
getOrDefault
(
27
,
0L
))
.
put
(
"h"
,
typeCntMap
.
getOrDefault
(
29
,
0L
))
.
put
(
"i"
,
typeCntMap
.
getOrDefault
(
30
,
0L
))
.
put
(
"j"
,
typeCntMap
.
getOrDefault
(
1
,
0L
))
.
put
(
"j"
,
typeCntMap
.
getOrDefault
(
31
,
0L
))
.
put
(
"k"
,
typeCntMap
.
getOrDefault
(
1
,
0L
))
.
build
();
dataList
.
add
(
map
);
});
...
...
@@ -643,7 +644,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
var
workbook
=
defaultExcelBuilder
.
sheetName
(
"项目资料"
)
.
titles
(
titles
)
.
widths
(
10
,
20
)
.
fieldDisplayOrder
(
List
.
of
(
"a"
,
"b"
,
"c"
,
"d"
,
"e"
,
"f"
,
"g"
,
"h"
,
"i"
,
"j"
))
.
fieldDisplayOrder
(
List
.
of
(
"a"
,
"b"
,
"c"
,
"d"
,
"e"
,
"f"
,
"g"
,
"h"
,
"i"
,
"j"
,
"k"
))
.
build
(
dataList
);
// 水印添加指定字体,并在服务器上安装 SimSun 字体,解决中文字体变成方块的问题
Watermark
watermark
=
new
Watermark
();
...
...
@@ -683,11 +684,12 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
var
msg
=
new
JSONObject
();
var
content
=
new
JSONObject
();
String
fileNameStr
=
Arrays
.
stream
(
fileNameArr
).
map
(
v
->
StrUtil
.
format
(
"{}.{}"
,
String
fileNameStr
=
Arrays
.
stream
(
fileNameArr
).
map
(
v
->
StrUtil
.
format
(
"{}.
{}"
,
Arrays
.
asList
(
fileNameArr
).
indexOf
(
v
)
+
1
,
v
)).
collect
(
Collectors
.
joining
(
"\n"
));
content
.
set
(
"title"
,
"项目资料提交提醒"
)
.
set
(
"text"
,
StrUtil
.
format
(
"""
### 项目资料提交提醒
#### 项目名称:{}
#### 合同编号:{}
#### 资料类型:{}
...
...
src/main/java/vion/service/impl/TaskServiceImpl.java
View file @
fa845a6
...
...
@@ -537,6 +537,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
var
msg
=
JSONUtil
.
ofObj
();
var
content
=
JSONUtil
.
ofObj
().
set
(
"title"
,
"您有一条新工单请及时处理哦~_~"
);
String
template
=
"""
### 工单流转消息通知
#### 门店信息: **{}** [FullOfVitality]
#### 任务编号:{}
#### 报修人:{}
...
...
@@ -568,6 +569,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
var
msg
=
JSONUtil
.
ofObj
();
var
content
=
JSONUtil
.
ofObj
().
set
(
"title"
,
"工单消息提醒"
);
String
template
=
"""
### 客户工单提醒
#### 门店信息: **{}**
#### 报修人:{}
#### 联系方式:{}
...
...
@@ -581,8 +583,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
var
jsonArray
=
JSONUtil
.
ofArray
()
.
put
(
JSONUtil
.
ofObj
()
.
set
(
"title"
,
"查看详情"
)
.
set
(
"action_url"
,
"""
https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingkrzwks0jpi2di3uo&response_type=code&scope=snsapi_auth&state=STATE&redirect_uri=https%3A%2F%2Fyunwei.vionyun.com%3A8443%2Fyunwei%2Fapi%2Fding%2Fcallback%2Finside%3FtaskUuid%3D"""
+
task
.
getUuid
()));
.
set
(
"action_url"
,
"https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingkrzwks0jpi2di3uo&response_type=code&scope=snsapi_auth&state=STATE&redirect_uri=https%3A%2F%2Fyunwei.vionyun.com%3A8443%2Fyunwei%2Fapi%2Fding%2Fcallback%2Finside%3FtaskUuid%3D"
+
task
.
getUuid
()));
content
.
set
(
"btn_json_list"
,
jsonArray
);
msg
.
set
(
"msgtype"
,
"action_card"
).
set
(
"action_card"
,
content
);
...
...
@@ -598,6 +599,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
var
msg
=
JSONUtil
.
ofObj
();
var
content
=
JSONUtil
.
ofObj
().
set
(
"title"
,
"工单转发提醒"
);
String
template
=
"""
### 工单转发提醒
#### 门店信息: **{}** [FullOfVitality]
#### 任务编号:{}
#### 报修人:{}
...
...
@@ -613,8 +615,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
var
jsonArray
=
JSONUtil
.
ofArray
()
.
put
(
JSONUtil
.
ofObj
()
.
set
(
"title"
,
"查看详情"
)
.
set
(
"action_url"
,
"""
https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingkrzwks0jpi2di3uo&response_type=code&scope=snsapi_auth&state=STATE&redirect_uri=https%3A%2F%2Fyunwei.vionyun.com%3A8443%2Fyunwei%2Fapi%2Fding%2Fcallback%2Finside%3FtaskUuid%3D"""
+
task
.
getUuid
()));
.
set
(
"action_url"
,
"https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingkrzwks0jpi2di3uo&response_type=code&scope=snsapi_auth&state=STATE&redirect_uri=https%3A%2F%2Fyunwei.vionyun.com%3A8443%2Fyunwei%2Fapi%2Fding%2Fcallback%2Finside%3FtaskUuid%3D"
+
task
.
getUuid
()));
content
.
set
(
"btn_json_list"
,
jsonArray
);
msg
.
set
(
"msgtype"
,
"action_card"
).
set
(
"action_card"
,
content
);
...
...
@@ -632,6 +633,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
var
msg
=
JSONUtil
.
ofObj
();
var
content
=
JSONUtil
.
ofObj
().
set
(
"title"
,
"工单催办提醒"
);
String
template
=
"""
### 工单催办提醒
#### 门店信息: **{}** [FullOfVitality]
#### 任务编号:{}
#### 报修人:{}
...
...
src/main/java/vion/service/impl/TaskTempServiceImpl.java
View file @
fa845a6
...
...
@@ -160,6 +160,7 @@ public class TaskTempServiceImpl extends MPJBaseServiceImpl<TaskTempMapper, Task
var
content
=
JSONUtil
.
ofObj
()
.
set
(
"title"
,
"客户提交工单,请及时处理哦~_~"
);
String
template
=
"""
### 客户提交工单提醒
#### 门店信息: **{}**
#### 客户姓名:{}
#### 联系方式:{}
...
...
@@ -173,9 +174,7 @@ public class TaskTempServiceImpl extends MPJBaseServiceImpl<TaskTempMapper, Task
var
jsonArray
=
JSONUtil
.
ofArray
()
.
put
(
JSONUtil
.
ofObj
()
.
set
(
"title"
,
"查看详情"
)
.
set
(
"action_url"
,
"""
https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingkrzwks0jpi2di3uo&response_type=code&scope=snsapi_auth&state=STATE&redirect_uri=https%3A%2F%2Fyunwei.vionyun.com%3A8443%2Fyunwei%2Fapi%2Fding%2Fcallback%2Finside%3FtaskTempId%3D
"""
+
taskTemp
.
getId
()));
.
set
(
"action_url"
,
"https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingkrzwks0jpi2di3uo&response_type=code&scope=snsapi_auth&state=STATE&redirect_uri=https%3A%2F%2Fyunwei.vionyun.com%3A8443%2Fyunwei%2Fapi%2Fding%2Fcallback%2Finside%3FtaskTempId%3D"
+
taskTemp
.
getId
()));
content
.
set
(
"btn_json_list"
,
jsonArray
);
msg
.
set
(
"msgtype"
,
"action_card"
).
set
(
"action_card"
,
content
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment