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
1be86c52
Commit
1be86c52
authored
Jun 01, 2020
by
lal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
af517ab0
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
76 additions
and
8 deletions
+76
-8
src/main/java/cn/timer/api/bean/kqmk/KqglAssoLeaveRules.java
+3
-1
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+10
-3
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
+21
-0
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRulesViceMapper.java
+3
-0
src/main/java/cn/timer/api/dto/kqmk/KqglAssoLeaveRulesDto.java
+3
-0
src/main/java/cn/timer/api/dto/kqmk/KqglAssoRulesViceDto.java
+16
-0
src/main/java/cn/timer/api/dto/kqmk/VacationInformationDto.java
+1
-1
src/main/resources/mapping/kqmk/KqglAssoLeaveRulesMapper.xml
+8
-3
src/main/resources/mapping/kqmk/KqglAssoRulesViceMapper.xml
+11
-0
No files found.
src/main/java/cn/timer/api/bean/kqmk/KqglAssoLeaveRules.java
View file @
1be86c52
...
...
@@ -64,6 +64,7 @@ public class KqglAssoLeaveRules extends Model<KqglAssoLeaveRules> {
@ApiModelProperty
(
value
=
"假期余额 0:关(该项余额为“不限余额”);1:开(该项余额为“0”)"
,
example
=
"101"
)
private
Integer
leaveBalance
;
@ApiModelProperty
(
value
=
"规则类型(1:事假;2:调休;3:病假;4:年假;5:产假;6:陪产假;7:婚假;8:例假;9:丧假;10:哺乳假)"
,
example
=
"101"
)
private
Integer
rulesType
;
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
1be86c52
...
...
@@ -93,6 +93,7 @@ import cn.timer.api.dto.kqmk.IndividualOvertimeRuleDto;
import
cn.timer.api.dto.kqmk.KqglAssoLeaveRulesDto
;
import
cn.timer.api.dto.kqmk.KqglAssoOvertimeRulesDto
;
import
cn.timer.api.dto.kqmk.KqglAssoPbmxDto
;
import
cn.timer.api.dto.kqmk.KqglAssoRulesViceDto
;
import
cn.timer.api.dto.kqmk.KqglMainKqzDto
;
import
cn.timer.api.dto.kqmk.KqzAttendanceGroupSearchDto
;
import
cn.timer.api.dto.kqmk.LeaveTypeDto
;
...
...
@@ -352,7 +353,7 @@ public class TimeCardController {
for
(
KqglAssoLeaveRules
rul
:
ruless
){
KqglAssoLeaveRules
vice
=
KqglAssoLeaveRules
.
builder
().
name
(
rul
.
getName
()).
company
(
rul
.
getCompany
()).
leaveType
(
rul
.
getLeaveType
())
.
apply
(
rul
.
getApply
()).
createTime
(
new
Date
().
getTime
()).
createUserid
(
userBean
.
getEmpNum
()).
orgCode
(
userBean
.
getOrgCode
())
.
isOpen
(
rul
.
getIsOpen
()).
leaveBalance
(
rul
.
getLeaveBalance
()).
build
();
.
isOpen
(
rul
.
getIsOpen
()).
leaveBalance
(
rul
.
getLeaveBalance
()).
rulesType
(
rul
.
getRulesType
()).
build
();
rullist
.
add
(
vice
);
}
if
(
rullist
.
size
()
>
0
)
{
...
...
@@ -388,13 +389,18 @@ public class TimeCardController {
KqglAssoLeaveBalance
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoLeaveBalance
>().
lambda
().
eq
(
KqglAssoLeaveBalance:
:
getLeaveRulesId
,
id
)
.
eq
(
KqglAssoLeaveBalance
::
getOrgCode
,
userBean
.
getOrgCode
()));
List
<
YgglMainEmp
>
yggl
=
YgglMainEmp
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
if
(
leaverules
.
getLeaveBalance
()
==
1
)
{
//假期余额 0:关(该项余额为“不限余额”);1:开(该项余额为“0”)
//该项公司员工余额为“0”
List
<
YgglMainEmp
>
yggl
=
YgglMainEmp
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
for
(
YgglMainEmp
ye:
yggl
)
{
KqglAssoLeaveBalance
.
builder
().
leaveRulesId
(
id
).
userid
(
ye
.
getEmpNum
()).
modifyAction
(
1
).
balanceDays
(
"+0"
)
.
reason
(
"系统按照规则自动"
).
modifyUserid
(
userBean
.
getEmpNum
()).
modifyTimer
(
new
Date
().
getTime
()).
orgCode
(
userBean
.
getOrgCode
()).
isAutomatic
(
1
).
modifyNumber
(
1
).
build
().
insert
();
//员工假期余额
}
}
else
{
for
(
YgglMainEmp
ye:
yggl
)
{
KqglAssoLeaveBalance
.
builder
().
leaveRulesId
(
id
).
userid
(
ye
.
getEmpNum
()).
modifyAction
(
1
).
balanceDays
(
"1-1"
)
.
reason
(
"不限制余额"
).
modifyUserid
(
userBean
.
getEmpNum
()).
modifyTimer
(
new
Date
().
getTime
()).
orgCode
(
userBean
.
getOrgCode
()).
isAutomatic
(
1
).
modifyNumber
(
1
).
build
().
insert
();
//员工假期余额
}
}
List
<
KqglAssoRulesVice
>
vices
=
new
ArrayList
<
KqglAssoRulesVice
>();
String
[]
rest
=
leaverules
.
getRange
();
...
...
@@ -441,7 +447,8 @@ public class TimeCardController {
VacationInformationDto
overrule
=
VacationInformationDto
.
builder
().
build
();
KqglAssoLeaveRules
rules
=
KqglAssoLeaveRules
.
builder
().
id
(
id
).
build
().
selectById
();
overrule
.
setRules
(
rules
);
List
<
KqglAssoRulesVice
>
vice
=
new
LambdaQueryChainWrapper
<
KqglAssoRulesVice
>(
kqglassorulesvicemapper
).
eq
(
KqglAssoRulesVice:
:
getLeaveRulesId
,
id
).
list
();
List
<
KqglAssoRulesViceDto
>
vice
=
kqglassorulesvicemapper
.
leaveRulesIdload
(
id
);
overrule
.
setRange
(
vice
);
return
ResultUtil
.
data
(
overrule
,
"操作成功!"
);
}
...
...
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
View file @
1be86c52
...
...
@@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveBalance
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveRules
;
import
cn.timer.api.bean.kqmk.KqglAssoRelationSummary
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.controller.kqgl.ClockInTool
;
...
...
@@ -43,6 +44,7 @@ public class KqglServiceImpl implements KqglService {
.
endTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
).
format
(
leaveappr
.
getEndtime
())).
build
().
insert
();
}
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
leaveappr
.
getUserid
()));
int
modifynumber
=
1
;
KqglAssoLeaveBalance
balan
=
kqglassoleavebalancemapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveBalance
>().
lambda
().
eq
(
KqglAssoLeaveBalance:
:
getUserid
,
leaveappr
.
getUserid
())
.
orderByDesc
(
KqglAssoLeaveBalance
::
getModifyNumber
).
last
(
"LIMIT 1"
));
...
...
@@ -69,6 +71,25 @@ public class KqglServiceImpl implements KqglService {
.
overtimeTypeId
(
overappr
.
getOvertimetype
()).
compensateId
(
overappr
.
getCompensate
()).
startTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
).
format
(
overappr
.
getStarttime
()))
.
endTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
).
format
(
overappr
.
getEndtime
())).
build
().
insert
();
}
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
overappr
.
getUserid
()));
//查询当前公司调休的id
KqglAssoLeaveRules
learul
=
KqglAssoLeaveRules
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveRules
>().
lambda
().
eq
(
KqglAssoLeaveRules:
:
getOrgCode
,
emp
.
getOrgCode
()).
eq
(
KqglAssoLeaveRules:
:
getRulesType
,
2
));
if
(
overappr
.
getCompensate
()
==
1
)
{
int
modifynumber
=
1
;
KqglAssoLeaveBalance
balan
=
kqglassoleavebalancemapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveBalance
>().
lambda
().
eq
(
KqglAssoLeaveBalance:
:
getUserid
,
overappr
.
getUserid
())
.
orderByDesc
(
KqglAssoLeaveBalance
::
getModifyNumber
).
last
(
"LIMIT 1"
));
if
(
balan
!=
null
)
{
modifynumber
=
balan
.
getModifyNumber
()+
1
;
}
KqglAssoLeaveBalance
.
builder
().
leaveRulesId
(
learul
.
getId
()).
userid
(
overappr
.
getUserid
()).
modifyAction
(
2
).
balanceDays
(
"+"
+
overappr
.
getDuration
())
.
reason
(
"系统按照规则自动(加班)"
).
modifyUserid
(
emp
.
getEmpNum
()).
modifyTimer
(
new
Date
().
getTime
()).
orgCode
(
emp
.
getOrgCode
()).
isAutomatic
(
1
).
modifyNumber
(
modifynumber
).
build
().
insert
();
//员工假期余额
}
return
true
;
}
...
...
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRulesViceMapper.java
View file @
1be86c52
...
...
@@ -6,6 +6,7 @@ import org.springframework.stereotype.Repository;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.kqmk.KqglAssoRulesVice
;
import
cn.timer.api.dto.kqmk.KqglAssoRulesViceDto
;
/**
...
...
@@ -17,4 +18,6 @@ public interface KqglAssoRulesViceMapper extends BaseMapper<KqglAssoRulesVice> {
int
insertrulesviceList
(
List
<
KqglAssoRulesVice
>
kqglassorulesvice
);
List
<
KqglAssoRulesViceDto
>
leaveRulesIdload
(
int
leaverulesid
);
}
src/main/java/cn/timer/api/dto/kqmk/KqglAssoLeaveRulesDto.java
View file @
1be86c52
...
...
@@ -45,6 +45,9 @@ public class KqglAssoLeaveRulesDto {
@ApiModelProperty
(
value
=
"假期余额 0:关(该项余额为“不限余额”);1:开(该项余额为“0”)"
,
example
=
"101"
)
private
Integer
leaveBalance
;
@ApiModelProperty
(
value
=
"规则类型(1:事假;2:调休;3:病假;4:年假;5:产假;6:陪产假;7:婚假;8:例假;9:丧假;10:哺乳假)"
,
example
=
"101"
)
private
Integer
rulesType
;
@ApiModelProperty
(
value
=
"适用范围集合"
,
example
=
"101"
)
private
String
[]
range
;
...
...
src/main/java/cn/timer/api/dto/kqmk/KqglAssoRulesViceDto.java
0 → 100644
View file @
1be86c52
package
cn
.
timer
.
api
.
dto
.
kqmk
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
KqglAssoRulesViceDto
{
@ApiModelProperty
(
value
=
"假期规则id 假期规则id"
,
example
=
"101"
)
private
Integer
leaveRulesId
;
}
src/main/java/cn/timer/api/dto/kqmk/VacationInformationDto.java
View file @
1be86c52
...
...
@@ -20,6 +20,6 @@ public class VacationInformationDto {
KqglAssoLeaveRules
rules
;
@ApiModelProperty
(
value
=
"假期规则-适用范围 "
,
example
=
"字段说明"
)
List
<
KqglAssoRulesVice
>
range
;
List
<
KqglAssoRulesVice
Dto
>
range
;
}
src/main/resources/mapping/kqmk/KqglAssoLeaveRulesMapper.xml
View file @
1be86c52
...
...
@@ -14,6 +14,7 @@
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"is_open"
property=
"isOpen"
/>
<result
column=
"leave_balance"
property=
"leaveBalance"
/>
<result
column=
"rules_type"
property=
"rulesType"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
...
...
@@ -26,7 +27,8 @@
create_userid,
org_code,
is_open,
leave_balance
leave_balance,
rules_type
</sql>
<sql
id=
"Base_Column_List_Alias"
>
...
...
@@ -50,7 +52,7 @@
</select>
<insert
id=
"insertleaverulesList"
parameterType=
"java.util.List"
>
insert into kqgl_asso_leave_rules (name,company,leave_type,apply,create_time,create_userid,org_code,is_open,leave_balance)
insert into kqgl_asso_leave_rules (name,company,leave_type,apply,create_time,create_userid,org_code,is_open,leave_balance
,rules_type
)
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"values "
close=
""
separator=
","
>
(
<if
test=
"item.name != null"
>
...
...
@@ -78,7 +80,10 @@
#{item.isOpen,jdbcType=INTEGER},
</if>
<if
test=
"item.leaveBalance != null"
>
#{item.leaveBalance,jdbcType=INTEGER}
#{item.leaveBalance,jdbcType=INTEGER},
</if>
<if
test=
"item.rulesType != null"
>
#{item.rulesType,jdbcType=INTEGER}
</if>
)
</foreach>
...
...
src/main/resources/mapping/kqmk/KqglAssoRulesViceMapper.xml
View file @
1be86c52
...
...
@@ -9,6 +9,10 @@
<result
column=
"attgroup_id"
property=
"attgroupId"
/>
</resultMap>
<resultMap
id=
"RulesViceDtoMap"
type=
"cn.timer.api.dto.kqmk.KqglAssoRulesViceDto"
>
<result
column=
"leave_rules_id"
property=
"leaveRulesId"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
leave_rules_id,
...
...
@@ -34,6 +38,13 @@
)
</foreach>
</insert>
<select
id=
"leaveRulesIdload"
resultMap=
"RulesViceDtoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM kqgl_asso_rules_vice
WHERE leaveRulesId = #{leaverulesid}
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoRulesVice">
...
...
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