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
c4441c0b
Commit
c4441c0b
authored
Aug 18, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预派单调整
parent
a7589c42
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
2 deletions
+35
-2
DateUtil.java
...om/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
+23
-0
PreDispatchConstants.java
...d/plus/v1/yifu/social/constants/PreDispatchConstants.java
+1
-0
TPreDispatchInfoServiceImpl.java
...yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
+11
-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 @
c4441c0b
...
...
@@ -1599,4 +1599,27 @@ public class DateUtil {
return
null
;
}
}
public
static
boolean
isDate
(
String
dateText
,
String
format
)
{
if
(
dateText
==
null
)
{
return
false
;
}
DateFormat
df
=
null
;
try
{
if
(
format
!=
null
)
{
df
=
new
SimpleDateFormat
(
format
);
}
else
{
df
=
new
SimpleDateFormat
(
ISO_DATE_FORMAT
);
}
df
.
setLenient
(
false
);
df
.
parse
(
dateText
.
replace
(
"/"
,
""
).
replace
(
"-"
,
""
)
.
replace
(
CommonConstants
.
YEAR
,
""
).
replace
(
CommonConstants
.
MONTH
,
""
)
.
replace
(
CommonConstants
.
DAY
,
""
));
}
catch
(
ParseException
e
)
{
return
false
;
}
return
true
;
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/constants/PreDispatchConstants.java
View file @
c4441c0b
...
...
@@ -45,4 +45,5 @@ public class PreDispatchConstants {
public
static
final
String
NO_SOCIAL_FUND_ADDRESS_REDUCE
=
"派减:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!"
;
public
static
final
String
GET_AREA_INFO
=
"获取区域数据失败!"
;
public
static
final
String
TEL_NOT_EMPTY
=
"联系电话2不可为空!"
;
public
static
final
String
LEAVE_DATE_FORMAT_ERROR
=
"离职日期格式错误,正确格式为'yyyy-MM-dd'"
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
View file @
c4441c0b
...
...
@@ -629,7 +629,11 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
}
}
if
(
Common
.
isNotNull
(
errorMsgList
))
{
return
R
.
ok
(
errorMsgList
,
"操作成功,存在异常数据,请核实"
);
for
(
ErrorMessage
msg:
errorMsgList
){
if
(
CommonConstants
.
RED
.
equals
(
msg
.
getColor
())){
return
R
.
ok
(
errorMsgList
,
"操作成功,存在异常数据,请核实"
);
}
}
}
return
R
.
ok
();
}
...
...
@@ -755,6 +759,11 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if
(
checkAddRepeat
(
errorList
,
existsMap
,
i
,
info
))
{
continue
;
}
if
(
Common
.
isNotNull
(
info
.
getLeaveDate
())
&&
DateUtil
.
isDate
(
info
.
getLeaveDate
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)){
errorList
.
add
(
new
ErrorMessage
(
i
,
PreDispatchConstants
.
LEAVE_DATE_FORMAT_ERROR
));
continue
;
}
// 2.基础封装 其他
initReduceBaseInfo
(
null
,
info
);
// 3.先校验已有数据
...
...
@@ -2264,7 +2273,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
errorMsgList
.
add
(
new
ErrorMessage
(
i
,
pre
.
getEmpIdcard
()
+
CommonConstants
.
COLON_STRING
+
errorMessage
.
getMessage
()));
errorMessage
.
getMessage
()
,
errorMessage
.
getColor
()
));
}
}
}
...
...
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