Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
gogirl-miniapp-backend
Commits
fe2a47c3
Commit
fe2a47c3
authored
May 14, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9a52ca8c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
TakeLeaveEventCmdServiceImpl.java
...cation/store/store/impl/TakeLeaveEventCmdServiceImpl.java
+11
-11
application-pre.yml
src/main/resources/application-pre.yml
+1
-1
No files found.
src/main/java/com/gogirl/application/store/store/impl/TakeLeaveEventCmdServiceImpl.java
View file @
fe2a47c3
...
@@ -60,13 +60,13 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
...
@@ -60,13 +60,13 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
@Override
@Override
public
void
applyTakeLeave
(
ApplyTakeLeaveCommand
cmd
)
{
public
void
applyTakeLeave
(
ApplyTakeLeaveCommand
cmd
)
{
if
(
cmd
.
getStartTime
().
compareTo
(
cmd
.
getEndTime
())
<
=
0
)
{
if
(
cmd
.
getStartTime
().
compareTo
(
cmd
.
getEndTime
())
>
=
0
)
{
throw
new
RRException
(
"申请时间有误"
);
throw
new
RRException
(
"申请时间有误"
);
}
}
List
<
TakeLeaveEvent
>
appliedList
=
takeLeaveEventRepository
.
appliedList
(
cmd
.
getApplyTechnicianId
(),
cmd
.
getStartTime
().
getTime
(),
cmd
.
getEndTime
().
getTime
());
List
<
TakeLeaveEvent
>
appliedList
=
takeLeaveEventRepository
.
appliedList
(
cmd
.
getApplyTechnicianId
(),
cmd
.
getStartTime
().
getTime
(),
cmd
.
getEndTime
().
getTime
());
if
(
ListUtil
.
isNotEmpty
(
appliedList
))
{
if
(
ListUtil
.
isNotEmpty
(
appliedList
))
{
throw
new
RRException
(
"重复时间提交"
);
throw
new
RRException
(
"重复时间提交"
);
}
}
TakeLeaveEvent
takeLeaveEvent
=
applyTakeLeaveCommandAssembler
.
apply
(
cmd
);
TakeLeaveEvent
takeLeaveEvent
=
applyTakeLeaveCommandAssembler
.
apply
(
cmd
);
...
@@ -96,7 +96,7 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
...
@@ -96,7 +96,7 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
log
.
info
(
"申请时间:{}"
,
takeLeaveEvent
.
getTimeLength
());
log
.
info
(
"申请时间:{}"
,
takeLeaveEvent
.
getTimeLength
());
log
.
info
(
"选择的时间{},"
,
overTimeRecordLogList
.
stream
().
map
(
OverTimeRecordLog:
:
getLengthTime
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
));
log
.
info
(
"选择的时间{},"
,
overTimeRecordLogList
.
stream
().
map
(
OverTimeRecordLog:
:
getLengthTime
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
));
throw
new
RRException
(
500
,
"调休时间有误"
);
throw
new
RRException
(
500
,
"调休时间有误"
);
}
}
overTimeRecordLogList
.
forEach
(
overTimeRecordLog
->
{
overTimeRecordLogList
.
forEach
(
overTimeRecordLog
->
{
...
@@ -106,7 +106,7 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
...
@@ -106,7 +106,7 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
overtimeRecord
.
setLeftTimeLength
(
overtimeRecord
.
getLeftTimeLength
().
subtract
(
overTimeRecordLog
.
getLengthTime
()));
overtimeRecord
.
setLeftTimeLength
(
overtimeRecord
.
getLeftTimeLength
().
subtract
(
overTimeRecordLog
.
getLengthTime
()));
//检查调休时间和加班时间匹配
//检查调休时间和加班时间匹配
if
(
overtimeRecord
.
getLeftTimeLength
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
)
{
if
(
overtimeRecord
.
getLeftTimeLength
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
)
{
throw
new
RRException
(
500
,
"超出加班时间"
);
throw
new
RRException
(
500
,
"超出加班时间"
);
}
}
if
(
overtimeRecord
.
getLeftTimeLength
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
if
(
overtimeRecord
.
getLeftTimeLength
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
//不能调休
//不能调休
...
@@ -123,12 +123,12 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
...
@@ -123,12 +123,12 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
takeLeaveEvent
.
setApplyStoreTechnician
(
storeTechnicianRepository
.
selectById
(
cmd
.
getApplyTechnicianId
()));
takeLeaveEvent
.
setApplyStoreTechnician
(
storeTechnicianRepository
.
selectById
(
cmd
.
getApplyTechnicianId
()));
Message
message
=
Message
.
builder
()
Message
message
=
Message
.
builder
()
.
content
(
"请假审核通知"
)
.
content
(
"请假审核通知"
)
.
isRead
(
0
)
.
isRead
(
0
)
.
paramJson
(
JsonUtilByFsJson
.
beanToJson
(
takeLeaveEvent
))
.
paramJson
(
JsonUtilByFsJson
.
beanToJson
(
takeLeaveEvent
))
.
technicianId
(
takeLeaveEvent
.
getDealingTechnicianId
())
.
technicianId
(
takeLeaveEvent
.
getDealingTechnicianId
())
.
time
(
new
Date
())
.
time
(
new
Date
())
.
title
(
"请假审核"
)
.
title
(
"请假审核"
)
.
type
(
1
)
.
type
(
1
)
.
tab
(
2
)
.
tab
(
2
)
.
build
();
.
build
();
...
@@ -142,7 +142,7 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
...
@@ -142,7 +142,7 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
TakeLeaveEvent
takeLeaveEvent
=
takeLeaveEventRepository
.
selectById
(
cmd
.
getTakeLeaveEventId
());
TakeLeaveEvent
takeLeaveEvent
=
takeLeaveEventRepository
.
selectById
(
cmd
.
getTakeLeaveEventId
());
if
(!
takeLeaveEvent
.
getStatus
().
equals
(
TakeLeaveEvent
.
STATUS_UN_APPROVAL
))
{
if
(!
takeLeaveEvent
.
getStatus
().
equals
(
TakeLeaveEvent
.
STATUS_UN_APPROVAL
))
{
throw
new
RRException
(
500
,
"审批状态异常"
);
throw
new
RRException
(
500
,
"审批状态异常"
);
}
}
//加班申请通过 添加加班记录
//加班申请通过 添加加班记录
...
@@ -190,17 +190,17 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
...
@@ -190,17 +190,17 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
takeLeaveEvent
.
setApplyStoreTechnician
(
storeTechnician
);
takeLeaveEvent
.
setApplyStoreTechnician
(
storeTechnician
);
Message
message
=
Message
.
builder
()
Message
message
=
Message
.
builder
()
.
content
(
"请假申请通过了"
)
.
content
(
"请假申请通过了"
)
.
isRead
(
0
)
.
isRead
(
0
)
.
paramJson
(
JsonUtilByFsJson
.
beanToJson
(
takeLeaveEvent
))
.
paramJson
(
JsonUtilByFsJson
.
beanToJson
(
takeLeaveEvent
))
.
technicianId
(
takeLeaveEvent
.
getApplyTechnicianId
())
.
technicianId
(
takeLeaveEvent
.
getApplyTechnicianId
())
.
time
(
new
Date
())
.
time
(
new
Date
())
.
title
(
"请假申请"
)
.
title
(
"请假申请"
)
.
type
(
3
)
.
type
(
3
)
.
tab
(
2
)
.
tab
(
2
)
.
build
();
.
build
();
if
(
cmd
.
getApproval
().
equals
(
TakeLeaveEvent
.
STATUS_APPROVAL_REFUSE
))
{
if
(
cmd
.
getApproval
().
equals
(
TakeLeaveEvent
.
STATUS_APPROVAL_REFUSE
))
{
message
.
setContent
(
"请假申请被拒绝了"
);
message
.
setContent
(
"请假申请被拒绝了"
);
}
}
messageMapper
.
insert
(
message
);
messageMapper
.
insert
(
message
);
}
}
...
...
src/main/resources/application-pre.yml
View file @
fe2a47c3
# 微信小程序相关配置
# 微信小程序相关配置
wechat
:
wechat
:
#公众号
#公众号
mp-app-id
:
wx7d344dc5ffd20745
mp-app-id
:
wx7d344dc5ffd20745
...
...
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