2022-11-23 19:20:03 +08:00
|
|
|
|
# 常用的数据信息
|
|
|
|
|
|
2022-11-24 14:39:42 +08:00
|
|
|
|
## 其他
|
|
|
|
|
|
|
|
|
|
> 维护人员: youhong.ai
|
|
|
|
|
|
2022-11-23 19:20:03 +08:00
|
|
|
|
+ 缓存地址: `/commcache/cacheMonitor.jsp`
|
2022-11-24 14:39:42 +08:00
|
|
|
|
+ 移动端流程模拟地址: `/spa/workflow/static4mobile/index.html#/center/doing`
|
|
|
|
|
|
|
|
|
|
## 常用代码
|
|
|
|
|
|
|
|
|
|
### 前端
|
|
|
|
|
|
2022-11-27 20:49:32 +08:00
|
|
|
|
**1.获取用户信息**
|
2022-11-24 14:39:42 +08:00
|
|
|
|
> 维护人员:youhong.ai
|
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
|
const userInfo = JSON.parse(localStorage.getItem("theme-account"))
|
2022-11-24 14:59:07 +08:00
|
|
|
|
```
|
|
|
|
|
|
2022-11-27 20:49:32 +08:00
|
|
|
|
**2.ecode访问上传的resource静态文件**
|
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
|
let src = "/cloudstore/release/${appId}/resources/"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**3.获取url参数**
|
2022-11-24 14:59:07 +08:00
|
|
|
|
> 维护人员: youHong.ai
|
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
|
getQueryString = (name) => {
|
|
|
|
|
let reg = new RegExp("(^|&|\/?)" + name + "=([^&]*)(&|$)", "i");
|
|
|
|
|
let searchStr = window.location.href
|
|
|
|
|
if (searchStr.startsWith('&')) {
|
|
|
|
|
searchStr = searchStr.substr(1)
|
|
|
|
|
}
|
|
|
|
|
search = searchStr.match(reg)
|
|
|
|
|
if (search != null) {
|
|
|
|
|
return unescape(search[2]);
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
2022-11-27 20:49:32 +08:00
|
|
|
|
**4.ajax请求**
|
2022-11-24 14:59:07 +08:00
|
|
|
|
> 维护人员: youHong.ai
|
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
|
class ApiUtils {
|
|
|
|
|
static request = (url, type = "GET", data, isAsync = true, success = () => {
|
|
|
|
|
}, error = () => {
|
|
|
|
|
}, complete = () => {
|
|
|
|
|
}, contentType = 'application/json', beforeSend = () => {
|
|
|
|
|
}) => {
|
|
|
|
|
let options = {
|
|
|
|
|
url,
|
|
|
|
|
type,
|
|
|
|
|
dataType: "json",
|
|
|
|
|
contentType,
|
|
|
|
|
async: isAsync,
|
|
|
|
|
data,
|
|
|
|
|
beforeSend,
|
|
|
|
|
success,
|
|
|
|
|
error,
|
|
|
|
|
complete,
|
|
|
|
|
}
|
|
|
|
|
if (contentType == 'application/json') {
|
|
|
|
|
options.data = JSON.stringify(data)
|
|
|
|
|
}
|
|
|
|
|
return $.ajax(options)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2022-11-27 20:49:32 +08:00
|
|
|
|
**5.通过js获取react组件,操作组件内部数据**
|
2022-11-24 14:59:07 +08:00
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
|
function FindReact(dom, traverseUp = 0) {
|
|
|
|
|
const key = Object.keys(dom).find(key => {
|
|
|
|
|
return key.startsWith("__reactFiber$") // react 17+
|
|
|
|
|
|| key.startsWith("__reactInternalInstance$"); // react <17
|
|
|
|
|
});
|
|
|
|
|
const domFiber = dom[key];
|
|
|
|
|
if (domFiber == null) return null;
|
|
|
|
|
|
|
|
|
|
// react <16
|
|
|
|
|
if (domFiber._currentElement) {
|
|
|
|
|
let compFiber = domFiber._currentElement._owner;
|
|
|
|
|
for (let i = 0; i < traverseUp; i++) {
|
|
|
|
|
compFiber = compFiber._currentElement._owner;
|
|
|
|
|
}
|
|
|
|
|
return compFiber._instance;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// react 16+
|
|
|
|
|
const GetCompFiber = fiber => {
|
|
|
|
|
let parentFiber = fiber.return;
|
|
|
|
|
while (typeof parentFiber.type == "string") {
|
|
|
|
|
parentFiber = parentFiber.return;
|
|
|
|
|
}
|
|
|
|
|
return parentFiber;
|
|
|
|
|
};
|
|
|
|
|
let compFiber = GetCompFiber(domFiber);
|
|
|
|
|
for (let i = 0; i < traverseUp; i++) {
|
|
|
|
|
compFiber = GetCompFiber(compFiber);
|
|
|
|
|
}
|
|
|
|
|
return compFiber.stateNode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 用法
|
|
|
|
|
const someElement = document.getElementById("someElement");
|
|
|
|
|
const myComp = FindReact(someElement);
|
|
|
|
|
myComp.setState({test1: test2});
|
|
|
|
|
```
|
|
|
|
|
|
2022-11-27 20:49:32 +08:00
|
|
|
|
**6.ecode集成iconfont**
|
|
|
|
|
|
|
|
|
|
```css
|
|
|
|
|
/*修改url,字体文件上传到cloudstore/iconfont/xx/下,没有目录自己创建*/
|
|
|
|
|
/*修改font-family,命名为其他名称,防止与系统自带的或与其他iconfont冲突*/
|
|
|
|
|
@font-face {
|
|
|
|
|
font-family: "cus_iconfont"; /* Project id 3789451 */
|
|
|
|
|
src: url('/cloudstore/iconfont/pcn/iconfont.woff2?t=1669223019749') format('woff2'),
|
|
|
|
|
url('/cloudstore/iconfont/pcn/iconfont.woff?t=1669223019749') format('woff'),
|
|
|
|
|
url('/cloudstore/iconfont/pcn/iconfont.ttf?t=1669223019749') format('truetype');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*修改iconfont类名为font-family的名称*/
|
|
|
|
|
.cus_iconfont {
|
|
|
|
|
font-family: "cus_iconfont" !important;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-style: normal;
|
|
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2022-11-24 14:59:07 +08:00
|
|
|
|
### 数据库
|
|
|
|
|
|
|
|
|
|
**备份mysql数据库**
|
|
|
|
|
> 维护人员: youHong.ai
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
mysqldump -uroot -p'passowrd' --single-transaction -R -E --databases ecology_dev> /tmp/ecology_dev_back.sql
|
|
|
|
|
```
|
|
|
|
|
|
2022-11-24 15:08:27 +08:00
|
|
|
|
**mysql常用视图**
|
|
|
|
|
|
2022-11-24 15:09:31 +08:00
|
|
|
|
```sql
|
2022-11-24 15:10:35 +08:00
|
|
|
|
-- 流程类型视图,可用于数据集成或流览按钮
|
2022-11-24 15:09:31 +08:00
|
|
|
|
create
|
|
|
|
|
or replace view workflow_type_info_view as
|
2022-11-24 15:08:27 +08:00
|
|
|
|
select wb.id,
|
|
|
|
|
wb.workflowname,
|
|
|
|
|
wt.typename,
|
|
|
|
|
wb.workflowdesc,
|
|
|
|
|
(IF(wb.version is null, 1, wb.version)) version
|
|
|
|
|
from workflow_base wb
|
|
|
|
|
RIGHT JOIN workflow_type wt on wb.workflowtype = wt.id;
|
|
|
|
|
|
2022-11-24 15:10:35 +08:00
|
|
|
|
-- 流程表单视图,用于流览按钮或数据集成,配置流程类型表可以用字段联动获取流程表表名
|
2022-11-24 15:09:31 +08:00
|
|
|
|
create
|
|
|
|
|
or replace view workflow_table_view as
|
2022-11-24 15:08:27 +08:00
|
|
|
|
select base.id,
|
|
|
|
|
base.workflowname,
|
|
|
|
|
base.formid,
|
|
|
|
|
bill.tablename,
|
|
|
|
|
(IF(base.version is null, 1, base.version)) version
|
|
|
|
|
from workflow_bill bill
|
|
|
|
|
join workflow_base base on base.formid = bill.id;
|
|
|
|
|
|
2022-11-24 15:10:35 +08:00
|
|
|
|
-- 流程明细表信息,可用流程主表查询对应的明细表信息,用于流览框
|
2022-11-24 15:09:31 +08:00
|
|
|
|
create
|
|
|
|
|
or replace view workflow_detail_table_view as
|
2022-11-24 15:08:27 +08:00
|
|
|
|
select CONCAT(bill.id, '-', base.id) id,
|
|
|
|
|
bill.id bill_id,
|
|
|
|
|
base.id workflow_id,
|
|
|
|
|
base.workflowname,
|
|
|
|
|
base.formid main_formid,
|
|
|
|
|
bill.tablename
|
|
|
|
|
from workflow_billdetailtable bill
|
|
|
|
|
join workflow_base base on base.formid = bill.billid;
|
|
|
|
|
|
2022-11-24 15:10:35 +08:00
|
|
|
|
-- 流程和建模字段视图,更具流程和建模的billid可以查询流程和建模中的字段信息
|
2022-11-24 15:09:31 +08:00
|
|
|
|
create
|
|
|
|
|
or replace view workflow_field_table_view as
|
2022-11-24 15:08:27 +08:00
|
|
|
|
select wb.id,
|
|
|
|
|
wb.fieldname,
|
|
|
|
|
concat(ht.indexdesc, ':', wb.fieldname) indexdesc,
|
|
|
|
|
(
|
|
|
|
|
case
|
|
|
|
|
when wb.detailtable is null then (select distinct tablename from workflow_bill where id = wb.billid)
|
|
|
|
|
when wb.detailtable = ''
|
|
|
|
|
then (select distinct tablename from workflow_bill where id = wb.billid)
|
|
|
|
|
else wb.detailtable
|
|
|
|
|
end
|
|
|
|
|
) tablename,
|
|
|
|
|
billid,
|
|
|
|
|
(
|
|
|
|
|
case
|
|
|
|
|
when wb.detailtable = '' then 'main table'
|
|
|
|
|
when wb.detailtable is null then 'main table'
|
|
|
|
|
else wb.detailtable end
|
|
|
|
|
) showtablename,
|
|
|
|
|
(case
|
|
|
|
|
when wb.fieldhtmltype = '1' then '单行文本框'
|
|
|
|
|
when wb.FIELDHTMLTYPE = '2' then '多行文本框'
|
|
|
|
|
when wb.FIELDHTMLTYPE = '3' then '流览框'
|
|
|
|
|
when wb.FIELDHTMLTYPE = '4' then 'check框'
|
|
|
|
|
when wb.FIELDHTMLTYPE = '5' then '选择框'
|
|
|
|
|
else '附件上传' end) fieldhtmltype
|
|
|
|
|
from workflow_billfield wb
|
|
|
|
|
left join htmllabelindex ht on wb.fieldlabel = ht.id;
|
|
|
|
|
|
2022-11-24 15:10:35 +08:00
|
|
|
|
-- 建模表信息视图
|
2022-11-24 15:09:31 +08:00
|
|
|
|
create
|
|
|
|
|
or replace view mode_bill_info_view as
|
2022-11-24 15:08:27 +08:00
|
|
|
|
select bill.id, bill.tablename, hti.indexdesc
|
|
|
|
|
from workflow_bill bill
|
|
|
|
|
left join htmllabelindex hti on hti.id = bill.namelabel
|
|
|
|
|
where bill.id < 0
|
|
|
|
|
and bill.tablename like 'uf%';
|
|
|
|
|
|
2022-11-24 15:10:35 +08:00
|
|
|
|
-- 流程节点信息视图
|
2022-11-24 15:09:31 +08:00
|
|
|
|
create
|
|
|
|
|
or replace view workflow_node_info_view as
|
2022-11-24 15:08:27 +08:00
|
|
|
|
select distinct nb.id,
|
|
|
|
|
nb.nodename,
|
|
|
|
|
(case when wb.version is null then 1 else wb.version end) version,
|
|
|
|
|
fn.workflowid
|
|
|
|
|
from workflow_nodebase nb
|
|
|
|
|
left join workflow_flownode fn on nb.id = fn.nodeid
|
|
|
|
|
left join workflow_base wb on wb.id = fn.workflowid;
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**oracle常用视图,与mysql对应**
|
|
|
|
|
|
2022-11-24 15:09:31 +08:00
|
|
|
|
```sql
|
|
|
|
|
create
|
|
|
|
|
or replace view workflow_type_info_view as
|
2022-11-24 15:08:27 +08:00
|
|
|
|
select wb.id,
|
|
|
|
|
wb.workflowname,
|
|
|
|
|
wt.typename,
|
|
|
|
|
wb.workflowdesc,
|
|
|
|
|
(IF(wb.version is null, 1, wb.version)) version
|
|
|
|
|
from workflow_base wb
|
|
|
|
|
RIGHT JOIN workflow_type wt on wb.workflowtype = wt.id
|
2022-11-24 15:09:31 +08:00
|
|
|
|
/
|
2022-11-24 15:08:27 +08:00
|
|
|
|
|
2022-11-24 15:09:31 +08:00
|
|
|
|
create
|
|
|
|
|
or replace view workflow_table_view as
|
2022-11-24 15:08:27 +08:00
|
|
|
|
select base.id,
|
|
|
|
|
base.workflowname,
|
|
|
|
|
base.formid,
|
|
|
|
|
bill.tablename,
|
|
|
|
|
(IF(base.version is null, 1, base.version)) version
|
|
|
|
|
from workflow_bill bill
|
|
|
|
|
join workflow_base base on base.formid = bill.id
|
2022-11-24 15:09:31 +08:00
|
|
|
|
/
|
2022-11-24 15:08:27 +08:00
|
|
|
|
|
2022-11-24 15:09:31 +08:00
|
|
|
|
create
|
|
|
|
|
or replace view workflow_detail_table_view as
|
2022-11-24 15:08:27 +08:00
|
|
|
|
select (bill.id || '-' || base.id) id,
|
|
|
|
|
bill.id bill_id,
|
|
|
|
|
base.id workflow_id,
|
|
|
|
|
base.workflowname,
|
|
|
|
|
base.formid main_formid,
|
|
|
|
|
bill.tablename
|
|
|
|
|
from workflow_billdetailtable bill
|
|
|
|
|
join workflow_base base on base.formid = bill.billid
|
2022-11-24 15:09:31 +08:00
|
|
|
|
/
|
2022-11-24 15:08:27 +08:00
|
|
|
|
|
|
|
|
|
|
2022-11-24 15:09:31 +08:00
|
|
|
|
create
|
|
|
|
|
or replace view workflow_field_table_view as
|
2022-11-24 15:08:27 +08:00
|
|
|
|
select wb.id,
|
|
|
|
|
wb.fieldname,
|
|
|
|
|
(ht.indexdesc || ':' || wb.fieldname) indexdesc,
|
|
|
|
|
(
|
|
|
|
|
case
|
|
|
|
|
when wb.detailtable is null then (select distinct tablename from workflow_bill where id = wb.billid)
|
|
|
|
|
when wb.detailtable = ''
|
|
|
|
|
then (select distinct tablename from workflow_bill where id = wb.billid)
|
|
|
|
|
else wb.detailtable
|
|
|
|
|
end
|
|
|
|
|
) tablename,
|
|
|
|
|
billid,
|
|
|
|
|
(
|
|
|
|
|
case
|
|
|
|
|
when wb.detailtable = '' then 'main table'
|
|
|
|
|
when wb.detailtable is null then 'main table'
|
|
|
|
|
else wb.detailtable end
|
|
|
|
|
) showtablename,
|
|
|
|
|
(case
|
|
|
|
|
when wb.fieldhtmltype = '1' then '单行文本框'
|
|
|
|
|
when wb.FIELDHTMLTYPE = '2' then '多行文本框'
|
|
|
|
|
when wb.FIELDHTMLTYPE = '3' then '流览框'
|
|
|
|
|
when wb.FIELDHTMLTYPE = '4' then 'check框'
|
|
|
|
|
when wb.FIELDHTMLTYPE = '5' then '选择框'
|
|
|
|
|
else '附件上传' end) fieldhtmltype
|
|
|
|
|
from workflow_billfield wb
|
|
|
|
|
left join htmllabelindex ht on wb.fieldlabel = ht.id
|
2022-11-24 15:09:31 +08:00
|
|
|
|
/
|
2022-11-24 15:08:27 +08:00
|
|
|
|
|
2022-11-24 15:09:31 +08:00
|
|
|
|
create
|
|
|
|
|
or replace view mode_bill_info_view as
|
2022-11-24 15:08:27 +08:00
|
|
|
|
select bill.id, bill.tablename, hti.indexdesc
|
|
|
|
|
from workflow_bill bill
|
|
|
|
|
left join htmllabelindex hti on hti.id = bill.namelabel
|
|
|
|
|
where bill.id < 0
|
|
|
|
|
and bill.tablename like 'uf%'
|
2022-11-24 15:09:31 +08:00
|
|
|
|
/
|
2022-11-24 15:08:27 +08:00
|
|
|
|
|
2022-11-24 15:09:31 +08:00
|
|
|
|
create
|
|
|
|
|
or replace view workflow_node_info_view as
|
2022-11-24 15:08:27 +08:00
|
|
|
|
select distinct nb.id,
|
|
|
|
|
nb.nodename,
|
|
|
|
|
(case when wb.version is null then 1 else wb.version end) version,
|
|
|
|
|
fn.workflowid
|
|
|
|
|
from workflow_nodebase nb
|
|
|
|
|
left join workflow_flownode fn on nb.id = fn.nodeid
|
|
|
|
|
left join workflow_base wb on wb.id = fn.workflowid
|
2022-11-24 15:09:31 +08:00
|
|
|
|
/
|
2022-11-24 15:08:27 +08:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**sqlserver常用视图,与mysql对应**
|
|
|
|
|
|
|
|
|
|
```sql
|
|
|
|
|
create view workflow_type_info_view as
|
|
|
|
|
select wb.id,
|
|
|
|
|
wb.workflowname,
|
|
|
|
|
wt.typename,
|
|
|
|
|
wb.workflowdesc,
|
|
|
|
|
(
|
|
|
|
|
IF(wb.version is null, 1, wb.version)) version
|
|
|
|
|
from workflow_base wb
|
|
|
|
|
RIGHT JOIN workflow_type wt on wb.workflowtype = wt.id;
|
|
|
|
|
|
|
|
|
|
create
|
|
|
|
|
or replace view workflow_table_view as
|
|
|
|
|
select base.id,
|
|
|
|
|
base.workflowname,
|
|
|
|
|
base.formid,
|
|
|
|
|
bill.tablename,
|
|
|
|
|
(
|
|
|
|
|
IF(base.version is null, 1, base.version)) version
|
|
|
|
|
from workflow_bill bill
|
|
|
|
|
join workflow_base base on base.formid = bill.id;
|
|
|
|
|
|
|
|
|
|
create
|
|
|
|
|
or replace view workflow_detail_table_view as
|
|
|
|
|
select (bill.id + '-' + base.id) id,
|
|
|
|
|
bill.id bill_id,
|
|
|
|
|
base.id workflow_id,
|
|
|
|
|
base.workflowname,
|
|
|
|
|
base.formid main_formid,
|
|
|
|
|
bill.tablename
|
|
|
|
|
from workflow_billdetailtable bill
|
|
|
|
|
join workflow_base base on base.formid = bill.billid;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
create view workflow_field_table_view as
|
|
|
|
|
select wb.id,
|
|
|
|
|
wb.fieldname,
|
|
|
|
|
(ht.indexdesc + ':' + wb.fieldname) indexdesc,
|
|
|
|
|
(
|
|
|
|
|
case
|
|
|
|
|
when wb.detailtable is null then (select distinct tablename from workflow_bill where id = wb.billid)
|
|
|
|
|
when wb.detailtable = ''
|
|
|
|
|
then (select distinct tablename from workflow_bill where id = wb.billid)
|
|
|
|
|
else wb.detailtable
|
|
|
|
|
end
|
|
|
|
|
) tablename,
|
|
|
|
|
billid,
|
|
|
|
|
(
|
|
|
|
|
case
|
|
|
|
|
when wb.detailtable = '' then 'main table'
|
|
|
|
|
when wb.detailtable is null then 'main table'
|
|
|
|
|
else wb.detailtable end
|
|
|
|
|
) showtablename,
|
|
|
|
|
(case
|
|
|
|
|
when wb.fieldhtmltype = '1' then '单行文本框'
|
|
|
|
|
when wb.FIELDHTMLTYPE = '2' then '多行文本框'
|
|
|
|
|
when wb.FIELDHTMLTYPE = '3' then '流览框'
|
|
|
|
|
when wb.FIELDHTMLTYPE = '4' then 'check框'
|
|
|
|
|
when wb.FIELDHTMLTYPE = '5' then '选择框'
|
|
|
|
|
else '附件上传' end) fieldhtmltype
|
|
|
|
|
from workflow_billfield wb
|
|
|
|
|
left join htmllabelindex ht on wb.fieldlabel = ht.id;
|
|
|
|
|
|
|
|
|
|
create view mode_bill_info_view as
|
|
|
|
|
select bill.id, bill.tablename, hti.indexdesc
|
|
|
|
|
from workflow_bill bill
|
|
|
|
|
left join htmllabelindex hti on hti.id = bill.namelabel
|
|
|
|
|
where bill.id < 0
|
|
|
|
|
and bill.tablename like 'uf%';
|
|
|
|
|
|
|
|
|
|
create view workflow_node_info_view as
|
|
|
|
|
select distinct nb.id,
|
|
|
|
|
nb.nodename,
|
|
|
|
|
(case when wb.version is null then 1 else wb.version end) version,
|
|
|
|
|
fn.workflowid
|
|
|
|
|
from workflow_nodebase nb
|
|
|
|
|
left join workflow_flownode fn on nb.id = fn.nodeid
|
|
|
|
|
left join workflow_base wb on wb.id = fn.workflowid;
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
2022-11-24 14:59:07 +08:00
|
|
|
|
### 后端
|
2022-11-25 16:32:54 +08:00
|
|
|
|
|
|
|
|
|
**1.后端根据请求获取登录用户信息**
|
|
|
|
|
> 维护人员:xuanran.wang
|
2022-11-25 17:35:20 +08:00
|
|
|
|
|
2022-11-25 16:32:54 +08:00
|
|
|
|
```java
|
2022-12-01 16:35:18 +08:00
|
|
|
|
//@Context HttpServletRequest request, @Context HttpServletResponse response
|
|
|
|
|
User logInUser=HrmUserVarify.getUser(request,response);
|
2022-11-25 16:32:54 +08:00
|
|
|
|
// 传入id会将此人员信息带出
|
2022-11-25 17:35:20 +08:00
|
|
|
|
User user=new User(id);
|
2022-11-25 16:32:54 +08:00
|
|
|
|
// 获取人员id
|
2022-11-25 17:35:20 +08:00
|
|
|
|
user.getUID();
|
2022-11-25 16:32:54 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**2.发送邮件**
|
|
|
|
|
> 维护人员:xuanran.wang
|
2022-11-25 17:35:20 +08:00
|
|
|
|
|
2022-11-25 16:32:54 +08:00
|
|
|
|
```java
|
|
|
|
|
/**
|
|
|
|
|
* <h1>发送邮件</h1>
|
|
|
|
|
* @param address 邮箱地址
|
|
|
|
|
* @param title 标题
|
|
|
|
|
* @param content 正文
|
|
|
|
|
**/
|
2022-11-25 17:35:20 +08:00
|
|
|
|
EmailWorkRunnable.threadModeReminder(address,title,content);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
> 维护人员: youHong.ai
|
|
|
|
|
|
|
|
|
|
```java
|
|
|
|
|
/**
|
|
|
|
|
* <h2>发送附件邮件</h2>
|
|
|
|
|
* @param sendTo 收件人邮箱地址(多个值之间用英文逗号分隔)
|
|
|
|
|
* @param sendCc 抄送人邮箱地址(多个值之间用英文逗号分隔)
|
|
|
|
|
* @param sendBcc 密送人邮箱地址(多个值之间用英文逗号分隔)
|
|
|
|
|
* @param subject 主题
|
|
|
|
|
* @param content 内容
|
|
|
|
|
* @param imageFileIds 附件id
|
|
|
|
|
*/
|
|
|
|
|
EmailWorkRunnable.threadModeReminder(sendTo,sendCc,sendBcc,subject,content,imageFileIds);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
或者
|
|
|
|
|
|
|
|
|
|
```java
|
|
|
|
|
/*
|
|
|
|
|
@param sendTo 收件人邮箱地址(多个值之间用英文逗号分隔)
|
|
|
|
|
@param sendCc 抄送人邮箱地址(多个值之间用英文逗号分隔)
|
|
|
|
|
@param sendBcc 密送人邮箱地址(多个值之间用英文逗号分隔)
|
|
|
|
|
@param subject 主题
|
|
|
|
|
@param content 内容
|
|
|
|
|
@param imageFileIds 附件id
|
|
|
|
|
*/
|
|
|
|
|
EmailWorkRunnable emailWorkRunable=new EmailWorkRunnable(sendTo,sendCc,sendBcc,subject,content);
|
|
|
|
|
emailWorkRunable.setImagefileids(imageFileIds);
|
|
|
|
|
MailCommonUtils.executeThreadPool(EmailPoolSubTypeEnum.EMAIL_SYS_ALTER.toString(),emailWorkRunable);
|
2022-11-25 16:32:54 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**3.短信服务**
|
|
|
|
|
> 维护人员:xuanran.wang
|
2022-11-25 17:35:20 +08:00
|
|
|
|
|
2022-11-25 16:32:54 +08:00
|
|
|
|
```java
|
|
|
|
|
public class SendSms implements SmsService {
|
2022-11-25 17:35:20 +08:00
|
|
|
|
@Override
|
2022-11-25 16:32:54 +08:00
|
|
|
|
public boolean sendSMS(String smsId, String number, String msg) {
|
|
|
|
|
//执行短信调用接口逻辑
|
2022-11-25 17:35:20 +08:00
|
|
|
|
return SMSUtil.sendSms(number, msg, url, sn, pwd);
|
2022-11-25 16:32:54 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
2022-11-25 17:35:20 +08:00
|
|
|
|
|
2022-11-25 16:32:54 +08:00
|
|
|
|
**4.三方插件文档转PDF(培训群找过来的)**
|
|
|
|
|
> 维护人员:xuanran.wang
|
2022-11-25 17:35:20 +08:00
|
|
|
|
|
2022-11-25 16:32:54 +08:00
|
|
|
|
```java
|
2022-11-25 17:35:20 +08:00
|
|
|
|
//wps转PDF:
|
|
|
|
|
DocImagefileToPdfUseWps toPdfUseWps=new DocImagefileToPdfUseWps();
|
|
|
|
|
newimagefileid=toPdfUseWps.officeDocumetnToPdfByImagefileid(docimagefileid);
|
2022-11-25 16:32:54 +08:00
|
|
|
|
|
2022-11-25 17:35:20 +08:00
|
|
|
|
//永中转PDF:
|
|
|
|
|
DocImagefileToPdf yozoToPdf=new DocImagefileToPdf();
|
|
|
|
|
newimagefileid=yozoToPdf.officeDocumetnToPdfByImagefileid(docimagefileid);
|
2022-11-25 16:32:54 +08:00
|
|
|
|
```
|