Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
homekeeper
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Peter Cheng
homekeeper
Commits
2103989e
Commit
2103989e
authored
Jun 26, 2019
by
Peter Cheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正時間計算方式
parent
034d2450
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
punchclock.go
controllers/punchclock.go
+1
-1
env.swp
env/env.swp
+6
-0
No files found.
controllers/punchclock.go
View file @
2103989e
...
@@ -89,7 +89,7 @@ func calcLeaveScope(params *beans.Punchclock) (diffDay int, diffHour int, diffMi
...
@@ -89,7 +89,7 @@ func calcLeaveScope(params *beans.Punchclock) (diffDay int, diffHour int, diffMi
beginHour
,
beginMinute
,
endHour
,
endMinute
=
changeToLunchTime
(
beginTime
,
endTime
,
beginHour
,
beginMinute
,
endHour
,
endMinute
)
beginHour
,
beginMinute
,
endHour
,
endMinute
=
changeToLunchTime
(
beginTime
,
endTime
,
beginHour
,
beginMinute
,
endHour
,
endMinute
)
if
isSameDay
(
params
)
{
//只請當天
if
isSameDay
(
params
)
{
//只請當天
if
beginTime
<
1200
&&
endTime
>
133
0
{
//有跨午休
if
beginTime
<
1200
&&
endTime
>
=
120
0
{
//有跨午休
diffHour
,
diffMinute
=
calcTime
(
beginHour
,
endHour
,
beginMinute
,
endMinute
,
true
)
diffHour
,
diffMinute
=
calcTime
(
beginHour
,
endHour
,
beginMinute
,
endMinute
,
true
)
}
else
{
//沒跨午休
}
else
{
//沒跨午休
diffHour
,
diffMinute
=
calcTime
(
beginHour
,
endHour
,
beginMinute
,
endMinute
,
false
)
diffHour
,
diffMinute
=
calcTime
(
beginHour
,
endHour
,
beginMinute
,
endMinute
,
false
)
...
...
env/env.swp
View file @
2103989e
...
@@ -24,6 +24,10 @@ type Config struct {
...
@@ -24,6 +24,10 @@ type Config struct {
Host
string
Host
string
Protocol
string
Protocol
string
}
}
GoMyPay
struct
{
URL
string
CustomerID
string
}
}
}
var
cfg
=
&
Config
{}
var
cfg
=
&
Config
{}
...
@@ -45,6 +49,8 @@ func init() {
...
@@ -45,6 +49,8 @@ func init() {
cfg
.
Mail
.
Password
=
""
cfg
.
Mail
.
Password
=
""
cfg
.
Redis
.
Host
=
"127.0.0.1:6379"
cfg
.
Redis
.
Host
=
"127.0.0.1:6379"
cfg
.
Redis
.
Protocol
=
"tcp"
cfg
.
Redis
.
Protocol
=
"tcp"
cfg
.
GoMyPay
.
URL
=
"https://n.gomypay.asia/TestShuntClass.aspx"
cfg
.
GoMyPay
.
CustomerID
=
""
}
}
//
GetEnv
取得環境參數
//
GetEnv
取得環境參數
...
...
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