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