Commit fa845a68 by HlQ

[add]

1.文件来源添加 31启动会
2.钉钉消息通知具体内容添加标题
1 parent f786ad1b
...@@ -81,8 +81,9 @@ public class LogPushRunner { ...@@ -81,8 +81,9 @@ public class LogPushRunner {
var msg = new JSONObject(); var msg = new JSONObject();
var content = new JSONObject(); var content = new JSONObject();
content.set("title", "项目日志提醒") content.set("title", "项目日志待提交提醒")
.set("text", StrUtil.format(""" .set("text", StrUtil.format("""
### 项目日志待提交提醒
#### 项目:[{}]请及时提交日志 #### 项目:[{}]请及时提交日志
#### 发送时间:{}""", storeName, DateUtil.now())); #### 发送时间:{}""", storeName, DateUtil.now()));
......
...@@ -53,14 +53,15 @@ public class TaskRunner { ...@@ -53,14 +53,15 @@ public class TaskRunner {
var msg = JSONUtil.ofObj(); var msg = JSONUtil.ofObj();
var content = JSONUtil.ofObj() var content = JSONUtil.ofObj()
.set("title", "请查看您未完成的工单~_~") .set("title", "请查看您未完成的工单~_~")
.set("markdown", "#### 请查看您未完成的工单" + .set("markdown", """
" \n #### 发送时间:" + DateUtil.now()) ### 未完成工单提醒
#### 请查看您未完成的工单
#### 发送时间:""" + DateUtil.now())
.set("btn_orientation", "1"); .set("btn_orientation", "1");
JSONArray jsonArray = JSONUtil.ofArray() JSONArray jsonArray = JSONUtil.ofArray()
.put(JSONUtil.ofObj().set("title", "查看详情") .put(JSONUtil.ofObj().set("title", "查看详情")
.set("action_url", """ .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()));
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); content.set("btn_json_list", jsonArray);
msg.set("msgtype", "action_card").set("action_card", content); msg.set("msgtype", "action_card").set("action_card", content);
......
...@@ -33,7 +33,7 @@ public class FileInfo { ...@@ -33,7 +33,7 @@ public class FileInfo {
* <br>16客户提交的门店图纸,17点位设计图,18合同范本,19客户上传的合同,20安装上线,与总部邮件截图</br> * <br>16客户提交的门店图纸,17点位设计图,18合同范本,19客户上传的合同,20安装上线,与总部邮件截图</br>
* <br>21服务单等表单富文本编辑器里传图用这个类型</br> * <br>21服务单等表单富文本编辑器里传图用这个类型</br>
* <br>22备件,23返修</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; private Integer sourceType;
/** 文件来源id */ /** 文件来源id */
......
...@@ -811,7 +811,8 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont ...@@ -811,7 +811,8 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
var msg = JSONUtil.ofObj(); var msg = JSONUtil.ofObj();
var content = JSONUtil.ofObj().set("title", "合同施工申请,请及时处理哦~_~"); var content = JSONUtil.ofObj().set("title", "合同施工申请,请及时处理哦~_~");
String template = """ String template = """
#### 合同编号: **{}**" + ### 合同施工申请
#### 合同编号: **{}**
#### 合同名称:**{}** #### 合同名称:**{}**
#### 申请人:{} #### 申请人:{}
#### 发送时间:{} #### 发送时间:{}
...@@ -833,11 +834,11 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont ...@@ -833,11 +834,11 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
var msg = JSONUtil.ofObj(); var msg = JSONUtil.ofObj();
var content = JSONUtil.ofObj().set("title", "验收提醒"); var content = JSONUtil.ofObj().set("title", "验收提醒");
String template = """ String template = """
#### 验收提醒" + #### 验收提醒
#### 合同编号:**{}**" + #### 合同编号:**{}**
#### 合同名称:**{}**" + #### 合同名称:**{}**
#### 状态:{}" + #### 状态:{}
#### 验收时间:{}" + #### 验收时间:{}
#### 发送时间:{} #### 发送时间:{}
"""; """;
String markdown = StrUtil.format(template, String markdown = StrUtil.format(template,
...@@ -1087,6 +1088,7 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont ...@@ -1087,6 +1088,7 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
var bongMap = BeanUtil.beanToMap(xbongContract, new HashMap<>(), copyOptions); var bongMap = BeanUtil.beanToMap(xbongContract, new HashMap<>(), copyOptions);
if (!mapEqual(platMap, bongMap)) { if (!mapEqual(platMap, bongMap)) {
log.info("不一致的合同:{}", contractNo); log.info("不一致的合同:{}", contractNo);
//
} }
} }
} }
......
...@@ -135,6 +135,7 @@ public class DeliverLogServiceImpl extends MPJBaseServiceImpl<DeliverLogMapper, ...@@ -135,6 +135,7 @@ public class DeliverLogServiceImpl extends MPJBaseServiceImpl<DeliverLogMapper,
var content = new JSONObject(); var content = new JSONObject();
content.set("title", "项目交付日志提醒") content.set("title", "项目交付日志提醒")
.set("text", StrUtil.format(""" .set("text", StrUtil.format("""
### 项目交付日志提醒
#### 项目:{} #### 项目:{}
#### 合同编号:{} #### 合同编号:{}
#### 日志提交人:{} #### 日志提交人:{}
...@@ -163,6 +164,7 @@ public class DeliverLogServiceImpl extends MPJBaseServiceImpl<DeliverLogMapper, ...@@ -163,6 +164,7 @@ public class DeliverLogServiceImpl extends MPJBaseServiceImpl<DeliverLogMapper,
var content = new JSONObject(); var content = new JSONObject();
content.set("title", "项目交付日志提醒") content.set("title", "项目交付日志提醒")
.set("text", StrUtil.format(""" .set("text", StrUtil.format("""
### 项目交付日志提醒
#### 您的日志还未提交,请尽快提交! #### 您的日志还未提交,请尽快提交!
#### 未提交日志日期:{} #### 未提交日志日期:{}
#### 发送时间:{}""", dateStr, DateUtil.now())); #### 发送时间:{}""", dateStr, DateUtil.now()));
......
...@@ -170,8 +170,7 @@ public class DeliveryRecordServiceImpl extends MPJBaseServiceImpl<DeliveryRecord ...@@ -170,8 +170,7 @@ public class DeliveryRecordServiceImpl extends MPJBaseServiceImpl<DeliveryRecord
var jsonArray = JSONUtil.ofArray() var jsonArray = JSONUtil.ofArray()
.put(JSONUtil.ofObj() .put(JSONUtil.ofObj()
.set("title", "查看详情") .set("title", "查看详情")
.set("action_url", """ .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()));
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); content.set("btn_json_list", jsonArray);
msg.set("msgtype", "action_card").set("action_card", content); msg.set("msgtype", "action_card").set("action_card", content);
......
...@@ -124,7 +124,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp ...@@ -124,7 +124,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
.map(l -> fileService.lambdaQuery() .map(l -> fileService.lambdaQuery()
.in(FileInfo::getSourceId, l) .in(FileInfo::getSourceId, l)
.in(FileInfo::getStoreId, 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()) .list())
.map(fileList -> fileList.stream().collect(Collectors.groupingBy(FileInfo::getStoreId, Collectors.counting()))) .map(fileList -> fileList.stream().collect(Collectors.groupingBy(FileInfo::getStoreId, Collectors.counting())))
.orElse(MapUtil.empty()); .orElse(MapUtil.empty());
...@@ -563,7 +563,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp ...@@ -563,7 +563,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
.map(ids -> fileService.lambdaQuery() .map(ids -> fileService.lambdaQuery()
.in(FileInfo::getSourceId, ids) .in(FileInfo::getSourceId, ids)
.in(FileInfo::getStoreId, 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()) .list())
.orElse(List.of()); .orElse(List.of());
var contractId2NoMap = Opt.ofEmptyAble(files) var contractId2NoMap = Opt.ofEmptyAble(files)
...@@ -593,13 +593,13 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp ...@@ -593,13 +593,13 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
"前期勘察", "点位表", "前期勘察", "点位表",
"竣工图纸", "验收报告", "竣工图纸", "验收报告",
"项目总结", "巡检报告", "项目总结", "巡检报告",
"结算资料", "其它"); "结算资料", "启动会", "其它");
var files = Opt.ofEmptyAble(storeIds) var files = Opt.ofEmptyAble(storeIds)
.map(ids -> fileService.lambdaQuery() .map(ids -> fileService.lambdaQuery()
.in(FileInfo::getSourceId, ids) .in(FileInfo::getSourceId, ids)
.in(FileInfo::getStoreId, 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()) .list())
.orElse(List.of()); .orElse(List.of());
var contractId2NoMap = Opt.ofEmptyAble(files) var contractId2NoMap = Opt.ofEmptyAble(files)
...@@ -634,7 +634,8 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp ...@@ -634,7 +634,8 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
.put("g", typeCntMap.getOrDefault(27, 0L)) .put("g", typeCntMap.getOrDefault(27, 0L))
.put("h", typeCntMap.getOrDefault(29, 0L)) .put("h", typeCntMap.getOrDefault(29, 0L))
.put("i", typeCntMap.getOrDefault(30, 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(); .build();
dataList.add(map); dataList.add(map);
}); });
...@@ -643,7 +644,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp ...@@ -643,7 +644,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
var workbook = defaultExcelBuilder.sheetName("项目资料") var workbook = defaultExcelBuilder.sheetName("项目资料")
.titles(titles) .titles(titles)
.widths(10, 20) .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); .build(dataList);
// 水印添加指定字体,并在服务器上安装 SimSun 字体,解决中文字体变成方块的问题 // 水印添加指定字体,并在服务器上安装 SimSun 字体,解决中文字体变成方块的问题
Watermark watermark = new Watermark(); Watermark watermark = new Watermark();
...@@ -683,11 +684,12 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp ...@@ -683,11 +684,12 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
var msg = new JSONObject(); var msg = new JSONObject();
var content = 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")); Arrays.asList(fileNameArr).indexOf(v) + 1, v)).collect(Collectors.joining("\n"));
content.set("title", "项目资料提交提醒") content.set("title", "项目资料提交提醒")
.set("text", StrUtil.format(""" .set("text", StrUtil.format("""
### 项目资料提交提醒
#### 项目名称:{} #### 项目名称:{}
#### 合同编号:{} #### 合同编号:{}
#### 资料类型:{} #### 资料类型:{}
......
...@@ -537,6 +537,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem ...@@ -537,6 +537,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
var msg = JSONUtil.ofObj(); var msg = JSONUtil.ofObj();
var content = JSONUtil.ofObj().set("title", "您有一条新工单请及时处理哦~_~"); var content = JSONUtil.ofObj().set("title", "您有一条新工单请及时处理哦~_~");
String template = """ String template = """
### 工单流转消息通知
#### 门店信息: **{}** [FullOfVitality] #### 门店信息: **{}** [FullOfVitality]
#### 任务编号:{} #### 任务编号:{}
#### 报修人:{} #### 报修人:{}
...@@ -568,6 +569,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem ...@@ -568,6 +569,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
var msg = JSONUtil.ofObj(); var msg = JSONUtil.ofObj();
var content = JSONUtil.ofObj().set("title", "工单消息提醒"); var content = JSONUtil.ofObj().set("title", "工单消息提醒");
String template = """ String template = """
### 客户工单提醒
#### 门店信息: **{}** #### 门店信息: **{}**
#### 报修人:{} #### 报修人:{}
#### 联系方式:{} #### 联系方式:{}
...@@ -581,8 +583,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem ...@@ -581,8 +583,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
var jsonArray = JSONUtil.ofArray() var jsonArray = JSONUtil.ofArray()
.put(JSONUtil.ofObj() .put(JSONUtil.ofObj()
.set("title", "查看详情") .set("title", "查看详情")
.set("action_url", """ .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()));
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); content.set("btn_json_list", jsonArray);
msg.set("msgtype", "action_card").set("action_card", content); msg.set("msgtype", "action_card").set("action_card", content);
...@@ -598,6 +599,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem ...@@ -598,6 +599,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
var msg = JSONUtil.ofObj(); var msg = JSONUtil.ofObj();
var content = JSONUtil.ofObj().set("title", "工单转发提醒"); var content = JSONUtil.ofObj().set("title", "工单转发提醒");
String template = """ String template = """
### 工单转发提醒
#### 门店信息: **{}** [FullOfVitality] #### 门店信息: **{}** [FullOfVitality]
#### 任务编号:{} #### 任务编号:{}
#### 报修人:{} #### 报修人:{}
...@@ -613,8 +615,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem ...@@ -613,8 +615,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
var jsonArray = JSONUtil.ofArray() var jsonArray = JSONUtil.ofArray()
.put(JSONUtil.ofObj() .put(JSONUtil.ofObj()
.set("title", "查看详情") .set("title", "查看详情")
.set("action_url", """ .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()));
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); content.set("btn_json_list", jsonArray);
msg.set("msgtype", "action_card").set("action_card", content); msg.set("msgtype", "action_card").set("action_card", content);
...@@ -632,6 +633,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem ...@@ -632,6 +633,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
var msg = JSONUtil.ofObj(); var msg = JSONUtil.ofObj();
var content = JSONUtil.ofObj().set("title", "工单催办提醒"); var content = JSONUtil.ofObj().set("title", "工单催办提醒");
String template = """ String template = """
### 工单催办提醒
#### 门店信息: **{}** [FullOfVitality] #### 门店信息: **{}** [FullOfVitality]
#### 任务编号:{} #### 任务编号:{}
#### 报修人:{} #### 报修人:{}
......
...@@ -160,6 +160,7 @@ public class TaskTempServiceImpl extends MPJBaseServiceImpl<TaskTempMapper, Task ...@@ -160,6 +160,7 @@ public class TaskTempServiceImpl extends MPJBaseServiceImpl<TaskTempMapper, Task
var content = JSONUtil.ofObj() var content = JSONUtil.ofObj()
.set("title", "客户提交工单,请及时处理哦~_~"); .set("title", "客户提交工单,请及时处理哦~_~");
String template = """ String template = """
### 客户提交工单提醒
#### 门店信息: **{}** #### 门店信息: **{}**
#### 客户姓名:{} #### 客户姓名:{}
#### 联系方式:{} #### 联系方式:{}
...@@ -173,9 +174,7 @@ public class TaskTempServiceImpl extends MPJBaseServiceImpl<TaskTempMapper, Task ...@@ -173,9 +174,7 @@ public class TaskTempServiceImpl extends MPJBaseServiceImpl<TaskTempMapper, Task
var jsonArray = JSONUtil.ofArray() var jsonArray = JSONUtil.ofArray()
.put(JSONUtil.ofObj() .put(JSONUtil.ofObj()
.set("title", "查看详情") .set("title", "查看详情")
.set("action_url", """ .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()));
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); content.set("btn_json_list", jsonArray);
msg.set("msgtype", "action_card").set("action_card", content); msg.set("msgtype", "action_card").set("action_card", content);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!