Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
47b46414
Commit
47b46414
authored
Aug 21, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预派单调整
parent
d2956930
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
DateUtil.java
...om/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
+14
-10
TPreDispatchInfoServiceImpl.java
...yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
+1
-2
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
View file @
47b46414
...
@@ -1600,23 +1600,27 @@ public class DateUtil {
...
@@ -1600,23 +1600,27 @@ public class DateUtil {
}
}
}
}
public
static
boolean
isDate
(
String
dateText
,
String
format
)
{
public
static
boolean
isDate
(
String
dateText
)
{
if
(
dateText
==
null
)
{
if
(
dateText
==
null
)
{
return
true
;
return
true
;
}
}
DateFormat
df
=
null
;
DateFormat
df
=
null
;
try
{
try
{
if
(
dateText
.
indexOf
(
"-"
)
>=
0
)
{
if
(
format
!=
null
)
{
df
=
new
SimpleDateFormat
(
ISO_EXPANDED_DATE_FORMAT
);
df
=
new
SimpleDateFormat
(
format
);
df
.
setLenient
(
false
);
}
else
{
df
.
parse
(
dateText
);
}
else
if
(
dateText
.
indexOf
(
"/"
)
>=
0
)
{
df
=
new
SimpleDateFormat
(
DateUtil
.
DATETIME_PATTERN_XIEGANG
);
df
.
setLenient
(
false
);
df
.
parse
(
dateText
);
}
else
{
df
=
new
SimpleDateFormat
(
ISO_DATE_FORMAT
);
df
=
new
SimpleDateFormat
(
ISO_DATE_FORMAT
);
}
df
.
setLenient
(
false
);
df
.
setLenient
(
false
);
df
.
parse
(
dateText
.
replace
(
"/"
,
""
).
replace
(
"-"
,
""
)
df
.
parse
(
dateText
.
replace
(
"/"
,
""
).
replace
(
"-"
,
""
)
.
replace
(
CommonConstants
.
YEAR
,
""
).
replace
(
CommonConstants
.
MONTH
,
""
)
.
replace
(
CommonConstants
.
YEAR
,
""
).
replace
(
CommonConstants
.
MONTH
,
""
)
.
replace
(
CommonConstants
.
DAY
,
""
));
.
replace
(
CommonConstants
.
DAY
,
""
));
}
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
return
true
;
return
true
;
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
View file @
47b46414
...
@@ -759,8 +759,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
...
@@ -759,8 +759,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if
(
checkAddRepeat
(
errorList
,
existsMap
,
i
,
info
))
{
if
(
checkAddRepeat
(
errorList
,
existsMap
,
i
,
info
))
{
continue
;
continue
;
}
}
if
(
Common
.
isNotNull
(
info
.
getLeaveDate
())
if
(
Common
.
isNotNull
(
info
.
getLeaveDate
())
&&
DateUtil
.
isDate
(
info
.
getLeaveDate
())){
&&
DateUtil
.
isDate
(
info
.
getLeaveDate
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)){
errorList
.
add
(
new
ErrorMessage
(
i
,
PreDispatchConstants
.
LEAVE_DATE_FORMAT_ERROR
));
errorList
.
add
(
new
ErrorMessage
(
i
,
PreDispatchConstants
.
LEAVE_DATE_FORMAT_ERROR
));
continue
;
continue
;
}
}
...
...
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