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
c2829e01
Commit
c2829e01
authored
Mar 31, 2021
by
lal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
02cbfe45
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+20
-0
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+2
-8
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
c2829e01
...
...
@@ -28,6 +28,26 @@ import org.apache.commons.lang3.ArrayUtils;
public
class
ClockInTool
{
static
SimpleDateFormat
famt
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
isLegalDate
(
"2020-9-12"
));
System
.
out
.
println
(
isLegalDate
(
"2020-09-12"
));
}
public
static
boolean
isLegalDate
(
String
sDate
)
{
int
legalLen
=
10
;
if
((
sDate
==
null
)
||
(
sDate
.
length
()
!=
legalLen
))
{
return
false
;
}
DateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
try
{
Date
date
=
formatter
.
parse
(
sDate
);
return
sDate
.
equals
(
formatter
.
format
(
date
));
}
catch
(
Exception
e
)
{
return
false
;
}
}
public
static
String
[]
shuzuqucong
(
String
[]
temp
)
{
...
...
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
c2829e01
...
...
@@ -1520,19 +1520,13 @@ public class SalaryManagementController {
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
if
(
emp
!=
null
)
{
if
(
ClockInTool
.
Str_Time_formatting
(
file
.
getSxrq
().
replace
(
"/"
,
"-"
),
"yyyy-MM-dd"
).
length
()
==
10
)
{
if
(
ClockInTool
.
isLegalDate
(
file
.
getSxrq
())
)
{
//0:定薪 1:调薪
if
(
file
.
getSfdx
()
==
0
)
{
XcglAssoXzdadx
xzdadx
=
XcglAssoXzdadx
.
builder
().
build
();
xzdadx
.
setUserid
(
emp
.
getEmpNum
());
//用户id
String
sxrq
=
file
.
getSxrq
().
substring
(
0
,
5
)
+
"20"
+
file
.
getSxrq
().
substring
(
5
,
7
);
if
(
sxrq
.
contains
(
"/"
))
{
xzdadx
.
setSxrq
(
SalaryTool
.
SlashDate
(
sxrq
));
//生效日期
}
else
{
xzdadx
.
setSxrq
(
file
.
getSxrq
());
//生效日期
}
xzdadx
.
setAddtime
(
new
Date
().
getTime
());
xzdadx
.
setRemarks
(
""
);
xzdadx
.
setQyid
(
userBean
.
getOrgCode
());
...
...
@@ -1627,7 +1621,7 @@ public class SalaryManagementController {
}
else
{
failure
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
"日期格式不对(
Excel中输入时间处设置为“短日期”即可
)"
);
map
.
put
(
"msg"
,
"日期格式不对(
必须是:YYYY-MM-dd
)"
);
reasons
.
add
(
map
);
}
}
else
{
...
...
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