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
a9c50c5c
Commit
a9c50c5c
authored
May 12, 2020
by
ilal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
454d5213
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
8 deletions
+56
-8
src/main/java/cn/timer/api/bean/kqmk/KqglAssoOvertimeRules.java
+1
-1
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+48
-3
src/main/java/cn/timer/api/dto/kqmk/IndividualOvertimeRuleDto.java
+2
-2
src/main/java/cn/timer/api/dto/kqmk/KqglAssoOvertimeRulesDto.java
+5
-2
No files found.
src/main/java/cn/timer/api/bean/kqmk/KqglAssoOvertimeRules.java
View file @
a9c50c5c
...
@@ -41,7 +41,7 @@ public class KqglAssoOvertimeRules extends Model<KqglAssoOvertimeRules> {
...
@@ -41,7 +41,7 @@ public class KqglAssoOvertimeRules extends Model<KqglAssoOvertimeRules> {
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"1"
)
private
Integer
appliedScope
;
private
String
appliedScope
;
@ApiModelProperty
(
value
=
"工作日是否允许加班 0:否;1:是"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"工作日是否允许加班 0:否;1:是"
,
example
=
"1"
)
private
Integer
isWorkovertime
;
private
Integer
isWorkovertime
;
...
...
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
a9c50c5c
package
cn
.
timer
.
api
.
controller
.
kqgl
;
package
cn
.
timer
.
api
.
controller
.
kqgl
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
...
@@ -177,9 +179,16 @@ public class TimeCardController {
...
@@ -177,9 +179,16 @@ public class TimeCardController {
overrules
.
setCreateTime
(
new
Date
().
getTime
());
overrules
.
setCreateTime
(
new
Date
().
getTime
());
overrules
.
setOrgCode
(
userBean
.
getOrgCode
());
overrules
.
setOrgCode
(
userBean
.
getOrgCode
());
overrules
.
setCreateUserid
(
userBean
.
getEmpNum
());
overrules
.
setCreateUserid
(
userBean
.
getEmpNum
());
String
[]
launchs
=
overrules
.
getApplyrange
();
String
appliedscope
=
StringUtils
.
join
(
launchs
,
","
);
// rul.setAppliedScope(appliedscope);//应用范围
overrules
.
setAppliedScope
(
appliedscope
);
KqglAssoOvertimeRules
rul
=
KqglAssoOvertimeRules
.
builder
().
build
();
KqglAssoOvertimeRules
rul
=
KqglAssoOvertimeRules
.
builder
().
build
();
// 克隆 KqglAssoOvertimeRulesDto对象 到 KqglAssoOvertimeRules对象
// 克隆 KqglAssoOvertimeRulesDto对象 到 KqglAssoOvertimeRules对象
BeanUtil
.
copyProperties
(
overrules
,
rul
,
"starttime"
);
BeanUtil
.
copyProperties
(
overrules
,
rul
,
"starttime"
,
"applyrange"
);
if
(!
rul
.
insertOrUpdate
())
if
(!
rul
.
insertOrUpdate
())
return
ResultUtil
.
error
(
"操作失败"
);
return
ResultUtil
.
error
(
"操作失败"
);
...
@@ -213,9 +222,14 @@ public class TimeCardController {
...
@@ -213,9 +222,14 @@ public class TimeCardController {
public
Result
<
IndividualOvertimeRuleDto
>
getOvertimeRules
(
@PathVariable
(
"id"
)
Integer
id
)
{
public
Result
<
IndividualOvertimeRuleDto
>
getOvertimeRules
(
@PathVariable
(
"id"
)
Integer
id
)
{
IndividualOvertimeRuleDto
overrule
=
IndividualOvertimeRuleDto
.
builder
().
build
();
IndividualOvertimeRuleDto
overrule
=
IndividualOvertimeRuleDto
.
builder
().
build
();
KqglAssoOvertimeRules
rules
=
KqglAssoOvertimeRules
.
builder
().
id
(
id
).
build
().
selectById
();
KqglAssoOvertimeRules
rules
=
KqglAssoOvertimeRules
.
builder
().
id
(
id
).
build
().
selectById
();
overrule
.
setRules
(
rules
);
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
();
List
<
KqglAssOvertimeVice
>
vice
=
new
LambdaQueryChainWrapper
<
KqglAssOvertimeVice
>(
kqglassovertimevicemapper
).
eq
(
KqglAssOvertimeVice:
:
getOvertimeRulesId
,
id
).
list
();
overrule
.
set
Vic
e
(
vice
);
overrule
.
set
Starttim
e
(
vice
);
return
ResultUtil
.
data
(
overrule
,
"操作成功!"
);
return
ResultUtil
.
data
(
overrule
,
"操作成功!"
);
}
}
...
@@ -639,6 +653,37 @@ public class TimeCardController {
...
@@ -639,6 +653,37 @@ public class TimeCardController {
}
}
/**
/**
* 根据组织机构代码 获取加班基础设置信息
*/
@PostMapping
(
value
=
"/overtime_basic_information"
)
@ApiOperation
(
value
=
"32:根据组织机构代码 获取加班基础设置信息"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
32
)
public
Result
<
Object
>
overtimebasicinformation
(
@CurrentUser
UserBean
userBean
)
{
KqglAssoOvertimeBasics
kqjdev
=
KqglAssoOvertimeBasics
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoOvertimeBasics
>().
lambda
().
eq
(
KqglAssoOvertimeBasics:
:
getOrgCode
,
userBean
.
getOrgCode
()));
return
ResultUtil
.
data
(
kqjdev
,
"操作成功!"
);
}
/**
* 查询列表-获取假期规则数据-分页
*/
@PostMapping
(
value
=
"/select_leave_rules"
)
@ApiOperation
(
value
=
"33:获取假期规则数据-分页"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
33
)
public
Result
<
Object
>
selectleaverules
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AttqueryCriteriaDto
attquerycriteriadto
)
{
IPage
<
KqglAssoLeaveRules
>
page
=
new
Page
<
KqglAssoLeaveRules
>(
attquerycriteriadto
.
getCurrentPage
()
==
null
?
1
:
attquerycriteriadto
.
getCurrentPage
(),
attquerycriteriadto
.
getTotalPage
()
==
null
?
10
:
attquerycriteriadto
.
getTotalPage
());
attquerycriteriadto
.
setOrgCode
(
userBean
.
getOrgCode
());
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
,
"操作成功!"
);
}
/**
* 查询列表-加班补偿方式
* 查询列表-加班补偿方式
*/
*/
@GetMapping
(
value
=
"/list_compensate"
)
@GetMapping
(
value
=
"/list_compensate"
)
...
...
src/main/java/cn/timer/api/dto/kqmk/IndividualOvertimeRuleDto.java
View file @
a9c50c5c
...
@@ -17,8 +17,8 @@ import lombok.NoArgsConstructor;
...
@@ -17,8 +17,8 @@ import lombok.NoArgsConstructor;
public
class
IndividualOvertimeRuleDto
{
public
class
IndividualOvertimeRuleDto
{
@ApiModelProperty
(
value
=
"加班规则数据 "
,
example
=
"字段说明"
)
@ApiModelProperty
(
value
=
"加班规则数据 "
,
example
=
"字段说明"
)
KqglAssoOvertimeRules
rules
;
KqglAssoOvertimeRules
Dto
rules
;
@ApiModelProperty
(
value
=
"加班规则-扣除休息时间 "
,
example
=
"字段说明"
)
@ApiModelProperty
(
value
=
"加班规则-扣除休息时间 "
,
example
=
"字段说明"
)
List
<
KqglAssOvertimeVice
>
vic
e
;
List
<
KqglAssOvertimeVice
>
starttim
e
;
}
}
src/main/java/cn/timer/api/dto/kqmk/KqglAssoOvertimeRulesDto.java
View file @
a9c50c5c
...
@@ -21,7 +21,7 @@ public class KqglAssoOvertimeRulesDto {
...
@@ -21,7 +21,7 @@ public class KqglAssoOvertimeRulesDto {
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"1"
)
private
Integer
appliedScope
;
private
String
appliedScope
;
@ApiModelProperty
(
value
=
"工作日是否允许加班 0:否;1:是"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"工作日是否允许加班 0:否;1:是"
,
example
=
"1"
)
private
Integer
isWorkovertime
;
private
Integer
isWorkovertime
;
...
@@ -97,6 +97,8 @@ public class KqglAssoOvertimeRulesDto {
...
@@ -97,6 +97,8 @@ public class KqglAssoOvertimeRulesDto {
@ApiModelProperty
(
value
=
"扣除休息时间段"
,
example
=
"12:00-13:30"
)
@ApiModelProperty
(
value
=
"扣除休息时间段"
,
example
=
"12:00-13:30"
)
private
StartTimeRestDto
[]
starttime
;
private
StartTimeRestDto
[]
starttime
;
@ApiModelProperty
(
value
=
"应用范围"
,
example
=
"[]"
)
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