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
2312743e
Commit
2312743e
authored
Oct 25, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.0 优化长度
parent
1610d5a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
34 deletions
+29
-34
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+10
-3
TPreEmpMainServiceImpl.java
...v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
+19
-31
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
2312743e
...
...
@@ -3503,7 +3503,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if
(
Common
.
isNotNull
(
info
.
getBankNo
()))
{
resultB
=
bankNoMap
.
get
(
info
.
getBankNo
());
if
(
resultB
!=
null
)
{
if
(
!
resultB
)
{
if
(
Boolean
.
FALSE
.
equals
(
resultB
)
)
{
errorCheck
.
append
(
"姓名&银行卡号不一致;"
);
}
}
else
{
...
...
@@ -3517,7 +3517,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
// 手机号码(紧急联系人)
if
(
Common
.
isNotNull
(
info
.
getTel
()))
{
checkPhoneInfo
(
errorCheck
,
existPhoneMap
,
phoneMap
,
info
,
info
.
getTel
(),
"手机号码(紧急联系人)"
);
resultB
=
phoneMap
.
get
(
info
.
getTel
());
if
(
resultB
!=
null
)
{
if
(
Boolean
.
FALSE
.
equals
(
resultB
))
{
errorCheck
.
append
(
"手机号码(紧急联系人)"
).
append
(
"校验不通过;"
);
}
}
else
{
errorCheck
.
append
(
"手机号码(紧急联系人)"
).
append
(
"未校验;"
);
}
}
if
(
errorCheck
.
length
()
>
0
)
{
info
.
setErrorInfo
(
info
.
getErrorInfo
()
+
"校验未通过:"
+
errorCheck
);
...
...
@@ -3764,7 +3771,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
else
{
resultB
=
phoneMap
.
get
(
phone
);
if
(
resultB
!=
null
)
{
if
(
!
resultB
)
{
if
(
Boolean
.
FALSE
.
equals
(
resultB
)
)
{
errorCheck
.
append
(
phoneName
).
append
(
"校验不通过;"
);
}
}
else
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
View file @
2312743e
...
...
@@ -18,7 +18,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcelFactory
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
...
...
@@ -32,7 +31,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.monitorjbl.xlsx.StreamingReader
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckBankNo
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
import
com.yifu.cloud.plus.v1.check.vo.CheckBatchVo
;
...
...
@@ -42,8 +40,10 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmpMainMapper;
import
com.yifu.cloud.plus.v1.yifu.archives.service.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.utils.ExcelStyle
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.AliSmsResult
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.SmsUtil
;
...
...
@@ -58,12 +58,9 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.ListStringVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TBankNameMapVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoImportLogVo
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.compress.utils.Lists
;
import
org.apache.poi.hssf.usermodel.HSSFDateUtil
;
import
org.apache.poi.ss.usermodel.*
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.authority.AuthorityUtils
;
...
...
@@ -78,11 +75,8 @@ import java.io.InputStream;
import
java.lang.reflect.Field
;
import
java.net.URL
;
import
java.net.URLEncoder
;
import
java.text.DecimalFormat
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
/**
* 预入职-主表
...
...
@@ -158,7 +152,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
private
static
final
String
ID
=
"id"
;
public
static
final
String
taxMonthRegex
=
"^2\\d{5}"
;
public
static
final
String
TAX_MONTH_REGEX
=
"^2\\d{5}"
;
private
final
RedisUtil
redisUtil
;
...
...
@@ -915,7 +909,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
if
(
Common
.
isNotNull
(
tPreEmployee
.
getTaxMonth
()))
{
String
taxMonth
=
tPreEmployee
.
getTaxMonth
().
trim
();
if
(!
taxMonth
.
matches
(
taxMonthRegex
))
{
if
(!
taxMonth
.
matches
(
TAX_MONTH_REGEX
))
{
return
R
.
failed
(
"计税月份为6位年月,例如:202407!"
);
}
if
(
Common
.
isNotNull
(
main
.
getSourType
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
main
.
getSourType
()))
{
...
...
@@ -1065,11 +1059,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
// 删除时
}
if
(
CommonConstants
.
THREE_STRING
.
equals
(
otherFile
.
getHandleType
())){
if
(
Common
.
isNotNull
(
otherFile
.
getId
())){
if
(
Common
.
isNotNull
(
otherFile
.
getAttaList
())){
for
(
TAttaInfo
info:
otherFile
.
getAttaList
()){
info
.
setDomainId
(
otherFile
.
getId
());
}
if
(
Common
.
isNotNull
(
otherFile
.
getId
())
&&
Common
.
isNotNull
(
otherFile
.
getAttaList
())){
for
(
TAttaInfo
info:
otherFile
.
getAttaList
()){
info
.
setDomainId
(
otherFile
.
getId
());
}
}
// 删除时
...
...
@@ -2177,8 +2169,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TPreEmployeeInfo
employee
;
TPreEmployeeProject
project
;
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
TPreEmpMainVo
excel
=
excelVOList
.
get
(
i
);
for
(
TPreEmpMainVo
excel
:
excelVOList
)
{
if
(
Common
.
isEmpty
(
excel
.
getDeptNo
())
||
Common
.
isEmpty
(
excel
.
getEmpIdcard
())
||
Common
.
isEmpty
(
excel
.
getEmpNatrue
())
||
Common
.
isEmpty
(
excel
.
getFileProvince
()))
{
errorMessageList
.
add
(
new
ErrorMessage
<>(
excel
.
getRowIndex
(),
"完善信息不可为空!"
));
}
else
{
...
...
@@ -2204,7 +2195,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
if
(
Common
.
isNotNull
(
excel
.
getTaxMonth
()))
{
String
taxMonth
=
excel
.
getTaxMonth
().
trim
();
if
(!
taxMonth
.
matches
(
taxMonthRegex
))
{
if
(!
taxMonth
.
matches
(
TAX_MONTH_REGEX
))
{
errorMessageList
.
add
(
new
ErrorMessage
<>(
excel
.
getRowIndex
(),
"计税月份为6位年月,例如:202407!"
));
continue
;
}
...
...
@@ -2232,7 +2223,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
employee
.
setFileTown
(
Integer
.
parseInt
(
excel
.
getFileTown
()));
}
catch
(
Exception
e
)
{
//errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "未找到县!")); 2024-09-26 mvp1.6.11 预入职档案地区县选填
//continue;
throw
new
RuntimeException
(
"档案地址-区/县转换异常"
);
}
}
...
...
@@ -2888,11 +2878,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
field
=
fieldsMap
.
get
(
shuName
);
if
(
field
!=
null
)
{
attr
=
field
.
getAnnotation
(
ExcelAttribute
.
class
);
if
(
curVo
==
null
)
{
// 必填
if
(
attr
.
isNotEmpty
()
&&
Common
.
isEmpty
(
shuValue
))
{
errorMust
.
append
(
attr
.
name
()).
append
(
";"
);
}
// 必填
if
(
curVo
==
null
&&
attr
.
isNotEmpty
()
&&
Common
.
isEmpty
(
shuValue
))
{
errorMust
.
append
(
attr
.
name
()).
append
(
";"
);
}
if
(
Common
.
isNotNull
(
shuValue
))
{
shuValue
=
shuValue
.
trim
();
...
...
@@ -3084,7 +3072,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(
Common
.
isNotNull
(
info
.
getEmpIdcard
()))
{
resultB
=
idCardMap
.
get
(
info
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getEmpName
());
if
(
resultB
!=
null
)
{
if
(
!
resultB
)
{
if
(
Boolean
.
FALSE
.
equals
(
resultB
)
)
{
errorCheck
.
append
(
"姓名&身份证号不一致;"
);
}
}
else
{
...
...
@@ -3097,7 +3085,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(
Common
.
isNotNull
(
info
.
getBankNo
()))
{
resultB
=
bankNoMap
.
get
(
info
.
getBankNo
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getEmpName
());
if
(
resultB
!=
null
)
{
if
(
!
resultB
)
{
if
(
Boolean
.
FALSE
.
equals
(
resultB
)
)
{
errorCheck
.
append
(
"姓名&银行卡号不一致;"
);
}
}
else
{
...
...
@@ -3109,7 +3097,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(
Common
.
isNotNull
(
info
.
getEmpPhone
()))
{
resultB
=
phoneMap
.
get
(
info
.
getEmpPhone
());
if
(
resultB
!=
null
)
{
if
(
!
resultB
)
{
if
(
Boolean
.
FALSE
.
equals
(
resultB
)
)
{
errorCheck
.
append
(
"手机号码校验不通过;"
);
}
}
else
{
...
...
@@ -3120,7 +3108,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(
Common
.
isNotNull
(
info
.
getTel
()))
{
resultB
=
phoneMap
.
get
(
info
.
getTel
());
if
(
resultB
!=
null
)
{
if
(
!
resultB
)
{
if
(
Boolean
.
FALSE
.
equals
(
resultB
)
)
{
errorCheck
.
append
(
"手机号码(紧急联系人)校验不通过;"
);
}
}
else
{
...
...
@@ -3131,7 +3119,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(
Common
.
isNotNull
(
info
.
getContractTel
()))
{
resultB
=
phoneMap
.
get
(
info
.
getContractTel
());
if
(
resultB
!=
null
)
{
if
(
!
resultB
)
{
if
(
Boolean
.
FALSE
.
equals
(
resultB
)
)
{
errorCheck
.
append
(
"手机号码(家庭成员)校验不通过;"
);
}
}
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