Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
5082472e
Commit
5082472e
authored
Apr 17, 2020
by
yuquan.zhu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of 120.24.24.239:8timerv2/8timerapiv200 into zyq-mvn
parents
2e5f7b81
357b583e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
271 additions
and
11 deletions
+271
-11
src/main/java/cn/timer/api/config/swagger/Swagger2Config.java
+7
-2
src/main/java/cn/timer/api/controller/dzht/DzhtController.java
+12
-4
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
+2
-1
src/main/java/cn/timer/api/controller/spmk/SpmkServiceImpl.java
+104
-4
src/main/java/cn/timer/api/dto/spmk/Condition.java
+22
-0
src/main/java/cn/timer/api/dto/spmk/Relation.java
+33
-0
src/main/java/cn/timer/api/dto/spmk/Router.java
+51
-0
src/main/java/cn/timer/api/dto/spmk/Spmk.java
+19
-0
src/main/java/cn/timer/api/dto/spmk/User.java
+20
-0
src/main/java/cn/timer/api/utils/RouterUtils.java
+0
-0
src/test/.gitignore
+1
-0
No files found.
src/main/java/cn/timer/api/config/swagger/Swagger2Config.java
View file @
5082472e
...
...
@@ -32,8 +32,13 @@ public class Swagger2Config {
@SuppressWarnings
(
"deprecation"
)
@Bean
public
ApiInfo
apiInfo
()
{
return
new
ApiInfoBuilder
().
title
(
"8小时-Api接口文档"
).
description
(
"快速进行Api接口调试"
).
termsOfServiceUrl
(
"127.0.0.1:8080"
)
.
contact
(
"TangZhaoQian"
).
version
(
"1.0"
).
build
();
return
new
ApiInfoBuilder
()
.
title
(
"8小时-Api接口文档"
)
.
description
(
"快速进行Api接口调试"
)
.
termsOfServiceUrl
(
"127.0.0.1:8080"
)
.
contact
(
"TangZhaoQian"
)
.
version
(
"1.0"
)
.
build
();
}
/**
...
...
src/main/java/cn/timer/api/controller/dzht/DzhtController.java
View file @
5082472e
...
...
@@ -233,7 +233,7 @@ public class DzhtController {
return
ResultUtil
.
data
(
list
);
}
final
static
String
savePath
=
"
E:\\esignHtmb
"
;
// 本地服务器文件保存路径
final
static
String
savePath
=
"
esignTemplate
"
;
// 本地服务器文件保存路径
final
static
String
APP_ID
=
ConfigConstant
.
PROJECT_ID
;
// 项目id
final
static
String
APP_SECRET
=
ConfigConstant
.
PROJECT_SECRET
;
// 项目密码
// final static String RE_TOKEN = "8b58973c290cc848b67ff0017cd424ff";
...
...
@@ -678,10 +678,18 @@ public class DzhtController {
}
@GetMapping
(
"/queryName"
)
@ApiOperation
(
value
=
"查
员工
名字"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"查
版本
名字"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getName
(
@RequestParam
String
empNum
)
{
return
ResultUtil
.
data
(
YgglMainEmp
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
eq
(
"emp_num"
,
empNum
)).
getName
());
String
a
=
System
.
getProperty
(
"os.name"
);
String
b
=
System
.
getProperty
(
"os.arch"
);
String
c
=
System
.
getProperty
(
"os.version"
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"os.name"
,
a
);
map
.
put
(
"os.arch"
,
b
);
map
.
put
(
"os.version"
,
c
);
return
ResultUtil
.
data
(
map
);
// return ResultUtil.data(YgglMainEmp.builder().build()
// .selectOne(new QueryWrapper<YgglMainEmp>().eq("emp_num", empNum)).getName());
}
/*************************** 设置请求头 ***************************************/
...
...
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
View file @
5082472e
...
...
@@ -192,7 +192,8 @@ public class DzhtController2 {
@ApiOperation
(
value
=
"创建机构模板印章"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
orgTemplate
(
@CurrentUser
UserBean
userBean
,
@RequestBody
DzhtAssoQyyz
qyyz
)
{
String
orgId
=
DzhtAssoQyzc
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
DzhtAssoQyzc
>().
eq
(
"third_party_user_id"
,
qyyz
.
getThirdPartyUserId
()).
select
(
"org_id"
))
// new QueryWrapper<DzhtAssoQyzc>().eq("third_party_user_id", qyyz.getThirdPartyUserId()).select("org_id"))
new
QueryWrapper
<
DzhtAssoQyzc
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
select
(
"org_id"
))
.
getOrgId
();
// 查询orgId
// String orgId = "dfd84b9a58d345ea90f6711bad853435";// 测试公司账户
// 印章参数
...
...
src/main/java/cn/timer/api/controller/spmk/SpmkServiceImpl.java
View file @
5082472e
package
cn
.
timer
.
api
.
controller
.
spmk
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -21,9 +22,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.lang.Console
;
import
cn.hutool.core.util.ArrayUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
cn.timer.api.bean.spmk.SpmkIcon
;
import
cn.timer.api.bean.spmk.SpmkJqgz
;
import
cn.timer.api.bean.spmk.SpmkLcjd
;
...
...
@@ -33,12 +37,15 @@ import cn.timer.api.bean.spmk.SpmkSpcz;
import
cn.timer.api.bean.spmk.SpmkSpgl
;
import
cn.timer.api.bean.spmk.SpmkSpz
;
import
cn.timer.api.bean.spmk.SpmkSxpz
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.dao.spmk.SpmkSpglMapper
;
import
cn.timer.api.dao.spmk.SpmkSpzMapper
;
import
cn.timer.api.dto.spmk.SpmkMbKjDto
;
import
cn.timer.api.dto.spmk.Router
;
import
cn.timer.api.dto.spmk.Spmk
;
import
cn.timer.api.dto.spmk.SpmkSpglDto
;
import
cn.timer.api.dto.spmk.SpmkSpglMoveDto
;
import
cn.timer.api.dto.spmk.SpmkSpglSortDto
;
...
...
@@ -47,6 +54,7 @@ import cn.timer.api.dto.spmk.SpmkSpzSortDto;
import
cn.timer.api.dto.spmk.SpmkSpzSpglDto
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.RouterUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -392,12 +400,104 @@ public class SpmkServiceImpl {
Integer
orgCode
=
userBean
.
getOrgCode
();
IPage
<
SpmkJqgz
>
sPage
=
SpmkJqgz
.
builder
().
build
().
selectPage
(
p
,
new
QueryWrapper
<
SpmkJqgz
>().
eq
(
"org_code"
,
orgCode
));
List
<
SpmkJqgz
>
spmkJqgzs
=
sPage
.
getRecords
();
sPage
.
getCurrent
();
sPage
.
getPages
();
sPage
.
getTotal
();
sPage
.
getSize
();
return
ResultUtil
.
data
(
sPage
,
spmkJqgzs
,
"获取假期规则列表成功"
);
}
/**
* 流程节点解析
*/
@PostMapping
(
value
=
"/jsonparse"
)
@ApiOperation
(
value
=
"流程节点解析"
,
httpMethod
=
"POST"
,
notes
=
"流程节点解析"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
jsonToObj
(
@RequestBody
Object
jsonObj
){
JSONObject
obj
=
JSONUtil
.
parseObj
(
jsonObj
,
false
,
true
);
Router
Router
=
obj
.
get
(
"router"
,
Router
.
class
);
Console
.
log
(
"obj:"
+
obj
.
toStringPretty
());
Console
.
log
(
"Router:"
+
Router
.
toPrettyString
());
Console
.
log
(
"Router:"
+
Router
.
toJSONString
());
return
ResultUtil
.
success
(
"解析成功!"
);
}
/**
* 流程节点解析
*/
@PostMapping
(
value
=
"/jsonparse_plus"
)
@ApiOperation
(
value
=
"流程节点解析_plus"
,
httpMethod
=
"POST"
,
notes
=
"流程节点解析_plus"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
jsonToObj2
(
@RequestBody
Router
jsonObj
){
Console
.
log
(
"jsonObj:"
+
jsonObj
);
Console
.
log
(
"jsonObj:"
+
jsonObj
.
getChildren
());
return
ResultUtil
.
data
(
jsonObj
,
"解析成功!"
);
}
/**
* 流程节点解析
*/
@PostMapping
(
value
=
"/jsonparse_plusx"
)
@ApiOperation
(
value
=
"流程节点解析_plus"
,
httpMethod
=
"POST"
,
notes
=
"流程节点解析_plus"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
jsonToObj3
(
@RequestBody
Object
jsonObj
){
JSONObject
obj
=
JSONUtil
.
parseObj
(
jsonObj
,
false
,
true
);
obj
.
put
(
"orgCode"
,
4
);
Console
.
log
(
"jsonObj:"
+
obj
.
get
(
"name"
));
Console
.
log
(
"jsonObj:"
+
obj
.
get
(
"id"
));
Console
.
log
(
"jsonObj:"
+
obj
.
get
(
"aaa"
));
return
ResultUtil
.
data
(
jsonObj
,
"解析成功!"
);
}
/**
* 部门id 查询 员工
*/
@PostMapping
(
value
=
"/deptSelectEmp"
)
@ApiOperation
(
value
=
"部门id 查询 员工"
,
httpMethod
=
"POST"
,
notes
=
"流程节点解析_plus"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
selectEmpBydept
(
@RequestParam
Integer
id
){
List
<
YgglMainEmp
>
ygglMainEmp
=
RouterUtils
.
selectOtherlistent
(
4
,
id
);
return
ResultUtil
.
data
(
ygglMainEmp
,
"解析成功!"
);
}
/**
* 流程节点解析123
*/
@PostMapping
(
value
=
"/jsonparse_plus_plus"
)
@ApiOperation
(
value
=
"流程节点解析_plus"
,
httpMethod
=
"POST"
,
notes
=
"流程节点解析_plus"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
jsonToObj123
(
@RequestBody
Spmk
spmk
){
List
<
Router
>
listRouter
=
new
ArrayList
<
Router
>();
listRouter
.
add
(
spmk
.
getRouter
());
return
ResultUtil
.
data
(
RouterUtils
.
NextNode
(
listRouter
,
spmk
.
getData
()),
"解析成功!"
);
}
}
src/main/java/cn/timer/api/dto/spmk/Condition.java
0 → 100644
View file @
5082472e
package
cn
.
timer
.
api
.
dto
.
spmk
;
import
java.util.List
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
Condition
{
private
String
key
;
private
String
format
;
private
String
value
;
}
src/main/java/cn/timer/api/dto/spmk/Relation.java
0 → 100644
View file @
5082472e
package
cn
.
timer
.
api
.
dto
.
spmk
;
import
java.util.List
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
Relation
{
/**
* 类型
*/
private
String
type
;
/**
* 名称
*/
private
String
name
;
/**
* 部门ID
*/
private
String
departmentId
;
/**
* 用户
*/
private
List
<
User
>
users
;
}
src/main/java/cn/timer/api/dto/spmk/Router.java
0 → 100644
View file @
5082472e
package
cn
.
timer
.
api
.
dto
.
spmk
;
import
java.util.List
;
import
cn.hutool.json.JSONSupport
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
Router
extends
JSONSupport
{
/**
* 节点类型
* 1.creator-发起
* 2.audit-审批
* 3.copy-抄送
* 4.rules-规则
*/
private
String
className
;
/**
* 执行
*/
private
String
execute
;
/**
* 通过
*/
private
Boolean
flow
;
/**
* 关系
*/
private
List
<
Relation
>
relation
;
/**
* 条件
*/
private
List
<
Condition
>
condition
;
/**
* 下一级
*/
private
List
<
Router
>
children
;
}
src/main/java/cn/timer/api/dto/spmk/Spmk.java
0 → 100644
View file @
5082472e
package
cn
.
timer
.
api
.
dto
.
spmk
;
import
cn.hutool.json.JSONObject
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
Spmk
{
private
Router
router
;
private
JSONObject
data
;
}
src/main/java/cn/timer/api/dto/spmk/User.java
0 → 100644
View file @
5082472e
package
cn
.
timer
.
api
.
dto
.
spmk
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
User
{
private
String
name
;
private
String
id
;
private
String
execute
;
}
src/main/java/cn/timer/api/utils/RouterUtils.java
0 → 100644
View file @
5082472e
This diff is collapsed.
Click to expand it.
src/test/.gitignore
0 → 100644
View file @
5082472e
/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