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
17164769
Commit
17164769
authored
Apr 17, 2020
by
邓实川
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://120.24.24.239:8082/8timerv2/8timerapiv200.git
into dsc
parents
013380e3
b3f28de6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
256 additions
and
6 deletions
+256
-6
src/main/java/cn/timer/api/config/swagger/Swagger2Config.java
+7
-2
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
No files found.
src/main/java/cn/timer/api/config/swagger/Swagger2Config.java
View file @
17164769
...
...
@@ -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/spmk/SpmkServiceImpl.java
View file @
17164769
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 @
17164769
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 @
17164769
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 @
17164769
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 @
17164769
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 @
17164769
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 @
17164769
This diff is collapsed.
Click to expand it.
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