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
de18710c
Commit
de18710c
authored
May 12, 2020
by
ilal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时提交
parent
6187f27b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
11 deletions
+56
-11
src/main/java/cn/timer/api/bean/kqmk/KqglAssoLeaveRules.java
+4
-1
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+47
-9
src/main/java/cn/timer/api/dto/kqmk/KqglAssoLeaveRulesDto.java
+5
-1
No files found.
src/main/java/cn/timer/api/bean/kqmk/KqglAssoLeaveRules.java
View file @
de18710c
...
...
@@ -47,7 +47,7 @@ public class KqglAssoLeaveRules extends Model<KqglAssoLeaveRules> {
private
Integer
leaveType
;
@ApiModelProperty
(
value
=
"适用范围 "
,
example
=
"0:全公司 >0:考勤组id"
)
private
String
apply
;
private
Integer
apply
;
@ApiModelProperty
(
value
=
"创建时间 创建时间"
,
example
=
"101"
)
private
Long
createTime
;
...
...
@@ -63,5 +63,7 @@ public class KqglAssoLeaveRules extends Model<KqglAssoLeaveRules> {
@ApiModelProperty
(
value
=
"假期余额 0:关(该项余额为“不限余额”);1:开(该项余额为“0”)"
,
example
=
"101"
)
private
Integer
leaveBalance
;
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
de18710c
package
cn
.
timer
.
api
.
controller
.
kqgl
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -15,7 +16,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -26,9 +26,6 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.lang.Console
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.bean.kqgl.AttConditions
;
import
cn.timer.api.bean.kqgl.AttendanceCardList
;
import
cn.timer.api.bean.kqmk.KqglAssOvertimeVice
;
import
cn.timer.api.bean.kqmk.KqglAssoBcsz
;
import
cn.timer.api.bean.kqmk.KqglAssoDkdz
;
...
...
@@ -40,7 +37,6 @@ import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics;
import
cn.timer.api.bean.kqmk.KqglAssoOvertimeRules
;
import
cn.timer.api.bean.kqmk.KqglAssoRulesVice
;
import
cn.timer.api.bean.kqmk.KqglMainKqz
;
import
cn.timer.api.bean.spmk.SpmkInitiatorConfig
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.dao.kqmk.KqglAssOvertimeViceMapper
;
...
...
@@ -154,11 +150,13 @@ public class TimeCardController {
/**
* 查询列表-获取加班规则数据-分页
* @throws InvocationTargetException
* @throws IllegalAccessException
*/
@PostMapping
(
value
=
"/select_overtime_rules"
)
@ApiOperation
(
value
=
"6.获取加班规则数据-根据 组织机构代码-分页"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
6
)
public
Result
<
Object
>
selectOvertimeRules
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AttqueryCriteriaDto
attquerycriteriadto
)
{
public
Result
<
Object
>
selectOvertimeRules
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AttqueryCriteriaDto
attquerycriteriadto
)
throws
IllegalAccessException
,
InvocationTargetException
{
IPage
<
KqglAssoOvertimeRules
>
page
=
new
Page
<
KqglAssoOvertimeRules
>(
attquerycriteriadto
.
getCurrentPage
()
==
null
?
1
:
attquerycriteriadto
.
getCurrentPage
(),
attquerycriteriadto
.
getTotalPage
()
==
null
?
10
:
attquerycriteriadto
.
getTotalPage
());
...
...
@@ -166,7 +164,20 @@ public class TimeCardController {
attquerycriteriadto
.
setEmpNum
(
userBean
.
getEmpNum
());
IPage
<
KqglAssoOvertimeRules
>
pageAs
=
kqglassoovertimerulesmapper
.
selectPage
(
page
,
new
QueryWrapper
<
KqglAssoOvertimeRules
>().
lambda
().
eq
(
KqglAssoOvertimeRules:
:
getOrgCode
,
userBean
.
getOrgCode
()));
List
<
KqglAssoOvertimeRules
>
listAs
=
pageAs
.
getRecords
();
return
ResultUtil
.
data
(
pageAs
,
listAs
,
"操作成功!"
);
List
<
KqglAssoOvertimeRulesDto
>
rulesdto
=
new
ArrayList
<
KqglAssoOvertimeRulesDto
>();
for
(
int
i
=
0
,
n
=
listAs
.
size
();
i
<
n
;
i
++)
{
String
[]
arr
=
listAs
.
get
(
i
).
getAppliedScope
().
split
(
","
);
// 用,分割
String
[]
nary
=
new
String
[
arr
.
length
];
//用户名
for
(
int
y
=
0
;
y
<
arr
.
length
;
y
++){
KqglMainKqz
kqzmc
=
kqglmainkqzmapper
.
selectOne
(
new
QueryWrapper
<
KqglMainKqz
>().
lambda
().
eq
(
KqglMainKqz:
:
getId
,
arr
[
y
]));
nary
[
y
]
=
kqzmc
.
getName
();
}
KqglAssoOvertimeRulesDto
ruldto
=
KqglAssoOvertimeRulesDto
.
builder
().
build
();
ruldto
.
setApplyrange
(
nary
);
BeanUtil
.
copyProperties
(
listAs
.
get
(
i
),
ruldto
,
"starttime"
,
"applyrange"
);
rulesdto
.
add
(
ruldto
);
}
return
ResultUtil
.
data
(
pageAs
,
rulesdto
,
"操作成功!"
);
}
/**
...
...
@@ -221,13 +232,16 @@ public class TimeCardController {
@ApiOperationSupport
(
order
=
8
)
public
Result
<
IndividualOvertimeRuleDto
>
getOvertimeRules
(
@PathVariable
(
"id"
)
Integer
id
)
{
IndividualOvertimeRuleDto
overrule
=
IndividualOvertimeRuleDto
.
builder
().
build
();
KqglAssoOvertimeRules
rules
=
KqglAssoOvertimeRules
.
builder
().
id
(
id
).
build
().
selectById
();
String
str
=
rules
.
getAppliedScope
();
String
[]
arr
=
str
.
split
(
","
);
// 用,分割
KqglAssoOvertimeRulesDto
ruldto
=
KqglAssoOvertimeRulesDto
.
builder
().
build
();
ruldto
.
setApplyrange
(
arr
);
BeanUtil
.
copyProperties
(
rules
,
ruldto
,
"starttime"
,
"applyrange"
);
overrule
.
setRules
(
ruldto
);
List
<
KqglAssOvertimeVice
>
vice
=
new
LambdaQueryChainWrapper
<
KqglAssOvertimeVice
>(
kqglassovertimevicemapper
).
eq
(
KqglAssOvertimeVice:
:
getOvertimeRulesId
,
id
).
list
();
overrule
.
setStarttime
(
vice
);
return
ResultUtil
.
data
(
overrule
,
"操作成功!"
);
...
...
@@ -680,7 +694,31 @@ public class TimeCardController {
attquerycriteriadto
.
setEmpNum
(
userBean
.
getEmpNum
());
IPage
<
KqglAssoLeaveRules
>
pageAs
=
kqglassoleaverulesmapper
.
selectPage
(
page
,
new
QueryWrapper
<
KqglAssoLeaveRules
>().
lambda
().
eq
(
KqglAssoLeaveRules:
:
getOrgCode
,
userBean
.
getOrgCode
()));
List
<
KqglAssoLeaveRules
>
listAs
=
pageAs
.
getRecords
();
return
ResultUtil
.
data
(
pageAs
,
listAs
,
"操作成功!"
);
List
<
KqglAssoLeaveRulesDto
>
leadto
=
new
ArrayList
<
KqglAssoLeaveRulesDto
>();
for
(
int
i
=
0
,
n
=
listAs
.
size
();
i
<
n
;
i
++)
{
String
[]
nary
=
null
;
if
(
listAs
.
get
(
i
).
getApply
()
==
0
)
{
//全公司
nary
=
new
String
[
1
];
//用户名
nary
[
0
]
=
"全公司"
;
}
else
{
//考勤组
List
<
KqglAssoRulesVice
>
vice
=
kqglassorulesvicemapper
.
selectList
(
new
QueryWrapper
<
KqglAssoRulesVice
>().
lambda
().
eq
(
KqglAssoRulesVice:
:
getLeaveRulesId
,
listAs
.
get
(
i
).
getId
()));
nary
=
new
String
[
vice
.
size
()];
//用户名
for
(
int
y
=
0
,
l
=
vice
.
size
();
y
<
l
;
y
++)
{
KqglMainKqz
kqzmc
=
kqglmainkqzmapper
.
selectOne
(
new
QueryWrapper
<
KqglMainKqz
>().
lambda
().
eq
(
KqglMainKqz:
:
getId
,
vice
.
get
(
y
).
getAttgroupId
()));
nary
[
y
]
=
kqzmc
.
getName
();
}
}
KqglAssoLeaveRulesDto
learul
=
KqglAssoLeaveRulesDto
.
builder
().
build
();
learul
.
setApplyrange
(
nary
);
BeanUtil
.
copyProperties
(
listAs
.
get
(
i
),
learul
,
"range"
,
"applyrange"
);
leadto
.
add
(
learul
);
}
return
ResultUtil
.
data
(
pageAs
,
leadto
,
"操作成功!"
);
}
/**
...
...
src/main/java/cn/timer/api/dto/kqmk/KqglAssoLeaveRulesDto.java
View file @
de18710c
...
...
@@ -28,7 +28,7 @@ public class KqglAssoLeaveRulesDto {
private
Integer
leaveType
;
@ApiModelProperty
(
value
=
"适用范围 "
,
example
=
"0:全公司 -1:考勤组id"
)
private
String
apply
;
private
Integer
apply
;
@ApiModelProperty
(
value
=
"创建时间 创建时间"
,
example
=
"101"
)
private
Long
createTime
;
...
...
@@ -47,5 +47,8 @@ public class KqglAssoLeaveRulesDto {
@ApiModelProperty
(
value
=
"适用范围集合"
,
example
=
"101"
)
private
String
[]
range
;
@ApiModelProperty
(
value
=
"适用范围名称"
,
example
=
"101"
)
private
String
[]
applyrange
;
}
\ No newline at end of file
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