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
d3f027b5
Commit
d3f027b5
authored
Jun 29, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
2191704e
155396a5
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
88 additions
and
38 deletions
+88
-38
TEmployeeProject.java
.../cloud/plus/v1/yifu/archives/entity/TEmployeeProject.java
+2
-2
TEmployeeInfoController.java
.../v1/yifu/archives/controller/TEmployeeInfoController.java
+1
-2
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+39
-15
TEmployeeProjectMapper.xml
...-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
+1
-1
TCheckMobileController.java
...loud/plus/v1/check/controller/TCheckMobileController.java
+13
-5
TCheckMobileService.java
...yifu/cloud/plus/v1/check/service/TCheckMobileService.java
+1
-1
TCheckIdCardServiceImpl.java
...d/plus/v1/check/service/impl/TCheckIdCardServiceImpl.java
+13
-3
TCheckMobileServiceImpl.java
...d/plus/v1/check/service/impl/TCheckMobileServiceImpl.java
+16
-7
SysDataAuthServiceImpl.java
...us.v1/yifu/admin/service/impl/SysDataAuthServiceImpl.java
+2
-2
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeProject.java
View file @
d3f027b5
...
...
@@ -27,8 +27,8 @@ import lombok.EqualsAndHashCode;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
* 项目档案表
...
...
@@ -223,7 +223,7 @@ public class TEmployeeProject extends BaseEntity {
* 入职日期
*/
@Schema
(
description
=
"入职日期"
)
private
Date
enjoinDate
;
private
Local
Date
enjoinDate
;
/**
* 试用期(单位月)
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeInfoController.java
View file @
d3f027b5
...
...
@@ -279,10 +279,9 @@ public class TEmployeeInfoController {
* @Date: 2022/6/23 17:40
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation
(
summary
=
"档案复档
temployeeinfo_restore
"
,
description
=
"档案复档 projectIds:项目档案ids"
)
@Operation
(
summary
=
"档案复档"
,
description
=
"档案复档 projectIds:项目档案ids"
)
@SysLog
(
"档案复档"
)
@GetMapping
(
"/restoreEmployee"
)
@PreAuthorize
(
"@pms.hasPermission('temployeeinfo_restore')"
)
public
R
<
String
>
restoreEmployee
(
@RequestParam
String
id
,
String
projectIds
)
{
return
tEmployeeInfoService
.
restoreEmployee
(
id
,
projectIds
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
d3f027b5
...
...
@@ -507,12 +507,20 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
return
R
.
failed
(
"该手机号已被使用!"
);
}
// 调用校验服务-校验手机号
R
<
Boolean
>
checkMobileR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckmobile/inner/checkOneMobile"
,
employeeInfo
.
getEmpPhone
(),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkMobileR
!=
null
&&
checkMobileR
.
getData
()
!=
null
)
{
if
(
Boolean
.
FALSE
.
equals
(
checkMobileR
.
getData
()))
{
return
R
.
failed
(
"手机号校验错误!"
);
TCheckMobile
checkMobile
=
new
TCheckMobile
();
checkMobile
.
setMobile
(
employeeInfo
.
getEmpPhone
());
R
<
TCheckMobile
>
a
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckmobile/inner/checkOneMobile"
,
checkMobile
,
TCheckMobile
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
a
!=
null
&&
a
.
getData
()
!=
null
)
{
checkMobile
=
a
.
getData
();
if
(
checkMobile
!=
null
&&
Common
.
isNotNull
(
checkMobile
.
getStatus
()))
{
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
checkMobile
.
getStatus
()))
{
return
R
.
failed
(
checkMobile
.
getMessage
());
}
}
else
{
return
R
.
failed
(
"校验服务错误,请联系管理员!"
);
}
}
}
...
...
@@ -757,11 +765,19 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_PHONE_EXIST_ERROR
,
existEmp
.
getEmpIdcard
()));
}
}
else
{
R
<
Boolean
>
checkMobileR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckmobile/inner/checkOneMobile"
,
excel
.
getEmpPhone
(),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkMobileR
!=
null
&&
checkMobileR
.
getData
()
!=
null
)
{
if
(
Boolean
.
FALSE
.
equals
(
checkMobileR
.
getData
()))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_PHONE_CHECK_ERROR
,
excel
.
getEmpIdcard
()));
// 调用校验服务-校验手机号
TCheckMobile
checkMobile
=
new
TCheckMobile
();
checkMobile
.
setMobile
(
excel
.
getEmpPhone
());
R
<
TCheckMobile
>
a
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckmobile/inner/checkOneMobile"
,
checkMobile
,
TCheckMobile
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
a
!=
null
&&
a
.
getData
()
!=
null
)
{
checkMobile
=
a
.
getData
();
if
(
checkMobile
!=
null
&&
Common
.
isNotNull
(
checkMobile
.
getStatus
()))
{
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
checkMobile
.
getStatus
()))
{
errorMsg
.
add
(
checkMobile
.
getMessage
());
}
}
else
{
errorMsg
.
add
(
"校验服务错误,请联系管理员!"
);
}
}
}
...
...
@@ -1126,11 +1142,19 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_PHONE_EXIST_ERROR
,
existEmp
.
getEmpIdcard
()));
}
}
else
{
R
<
Boolean
>
checkMobileR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckmobile/inner/checkOneMobile"
,
excel
.
getEmpPhone
(),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkMobileR
!=
null
&&
checkMobileR
.
getData
()
!=
null
)
{
if
(
Boolean
.
FALSE
.
equals
(
checkMobileR
.
getData
()))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_PHONE_CHECK_ERROR
,
excel
.
getEmpIdcard
()));
// 调用校验服务-校验手机号
TCheckMobile
checkMobile
=
new
TCheckMobile
();
checkMobile
.
setMobile
(
excel
.
getEmpPhone
());
R
<
TCheckMobile
>
a
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckmobile/inner/checkOneMobile"
,
checkMobile
,
TCheckMobile
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
a
!=
null
&&
a
.
getData
()
!=
null
)
{
checkMobile
=
a
.
getData
();
if
(
checkMobile
!=
null
&&
Common
.
isNotNull
(
checkMobile
.
getStatus
()))
{
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
checkMobile
.
getStatus
()))
{
errorMsg
.
add
(
checkMobile
.
getMessage
());
}
}
else
{
errorMsg
.
add
(
"校验服务错误,请联系管理员!"
);
}
}
}
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
View file @
d3f027b5
...
...
@@ -637,7 +637,7 @@
FROM
t_settle_domain
WHERE
DEPT_NO = #{deptNo}
DEP
AR
T_NO = #{deptNo}
),
'%'
)
...
...
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/controller/TCheckMobileController.java
View file @
d3f027b5
...
...
@@ -21,6 +21,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckMobile
;
import
com.yifu.cloud.plus.v1.check.service.TCheckMobileService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
...
...
@@ -133,8 +135,8 @@ public class TCheckMobileController {
@Operation
(
description
=
"检测手机号,多个手机号码用英文半角逗号隔开,仅支持国内号码"
)
@SysLog
(
"检测手机号状态"
)
@Inner
@
Ge
tMapping
(
"/inner/checkMobiles"
)
public
R
<
Map
<
String
,
TCheckMobile
>>
checkMobilesInner
(
String
mobiles
)
{
@
Pos
tMapping
(
"/inner/checkMobiles"
)
public
R
<
Map
<
String
,
TCheckMobile
>>
checkMobilesInner
(
@RequestParam
String
mobiles
)
{
return
tCheckMobileService
.
checkMobiles
(
mobiles
);
}
...
...
@@ -147,9 +149,15 @@ public class TCheckMobileController {
@Operation
(
description
=
"单个检测手机号,仅支持国内号码"
)
@SysLog
(
"单个检测手机号状态"
)
@Inner
@GetMapping
(
"/inner/checkOneMobile"
)
public
boolean
checkOneMobile
(
String
mobile
)
{
return
tCheckMobileService
.
checkOneMobile
(
mobile
);
@PostMapping
(
"/inner/checkOneMobile"
)
public
TCheckMobile
checkOneMobile
(
@RequestBody
TCheckMobile
checkMobile
)
{
if
(
Common
.
isNotNull
(
checkMobile
.
getMobile
()))
{
return
tCheckMobileService
.
checkOneMobile
(
checkMobile
.
getMobile
());
}
else
{
checkMobile
.
setStatus
(
CommonConstants
.
ZERO_STRING
);
checkMobile
.
setMessage
(
"手机号必填"
);
return
checkMobile
;
}
}
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/TCheckMobileService.java
View file @
d3f027b5
...
...
@@ -33,5 +33,5 @@ public interface TCheckMobileService extends IService<TCheckMobile> {
R
<
Map
<
String
,
TCheckMobile
>>
checkMobiles
(
String
mobiles
);
boolean
checkOneMobile
(
String
mobile
);
TCheckMobile
checkOneMobile
(
String
mobile
);
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCheckIdCardServiceImpl.java
View file @
d3f027b5
...
...
@@ -250,7 +250,13 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
.
eq
(
TCheckIdCard:
:
getIsTrue
,
CommonConstants
.
ONE_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
checkIdCard
)){
return
checkIdCard
;
if
(
name
.
equals
(
checkIdCard
.
getName
()))
{
tCheckIdCard
.
setIsTrue
(
CommonConstants
.
ONE_INT
);
}
else
{
tCheckIdCard
.
setIsTrue
(
CommonConstants
.
ZERO_INT
);
tCheckIdCard
.
setReason
(
"【"
+
name
+
"】错误,正确的姓名:"
+
checkIdCard
.
getName
());
}
return
tCheckIdCard
;
}
else
{
// 没找到正确的,再去找有没有错误的,如果还没有,再查
List
<
TCheckIdCard
>
checkList
=
baseMapper
.
selectList
(
Wrappers
.<
TCheckIdCard
>
query
().
lambda
()
...
...
@@ -258,7 +264,9 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
if
(
checkList
!=
null
&&
!
checkList
.
isEmpty
())
{
for
(
TCheckIdCard
c
:
checkList
)
{
if
(
idCard
.
equals
(
c
.
getIdCard
())
&&
name
.
equals
(
c
.
getName
()))
{
return
c
;
tCheckIdCard
.
setIsTrue
(
0
);
tCheckIdCard
.
setReason
(
c
.
getReason
());
return
tCheckIdCard
;
}
}
}
...
...
@@ -267,7 +275,9 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
c
.
setName
(
name
);
ChecksUtil
.
checkIdCard
(
c
,
canCheckService
.
getCanCheck
());
baseMapper
.
insert
(
c
);
return
c
;
tCheckIdCard
.
setIsTrue
(
c
.
getIsTrue
());
tCheckIdCard
.
setReason
(
c
.
getReason
());
return
tCheckIdCard
;
}
}
}
...
...
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCheckMobileServiceImpl.java
View file @
d3f027b5
...
...
@@ -113,7 +113,11 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
}
@Override
public
synchronized
boolean
checkOneMobile
(
String
mobile
)
{
public
synchronized
TCheckMobile
checkOneMobile
(
String
mobile
)
{
TCheckMobile
returnMobile
=
new
TCheckMobile
();
returnMobile
.
setMobile
(
mobile
);
returnMobile
.
setMessage
(
"未找到!"
);
returnMobile
.
setStatus
(
CommonConstants
.
ZERO_STRING
);
if
(
Common
.
isNotNull
(
mobile
))
{
//1.先从本地库获取正常数据
List
<
TCheckMobile
>
checkMobiles
=
baseMapper
.
selectList
(
Wrappers
.<
TCheckMobile
>
query
().
lambda
()
...
...
@@ -121,29 +125,34 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
if
(
Common
.
isNotNull
(
checkMobiles
))
{
for
(
TCheckMobile
c
:
checkMobiles
)
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
c
.
getStatus
()))
{
return
true
;
returnMobile
.
setStatus
(
CommonConstants
.
ONE_STRING
);
return
returnMobile
;
}
}
return
fals
e
;
return
returnMobil
e
;
}
else
{
//2.从远处端获取数据
R
<
Map
<
String
,
TCheckMobile
>>
mobileMapR
=
ChecksUtil
.
checkMobile
(
mobile
,
canCheckService
.
getCanCheck
());
if
(
Common
.
isEmpty
(
mobileMapR
)
||
Common
.
isEmpty
(
mobileMapR
.
getData
()))
{
return
false
;
if
(
mobileMapR
!=
null
)
{
returnMobile
.
setMessage
(
mobileMapR
.
getMsg
());
}
return
returnMobile
;
}
Map
<
String
,
TCheckMobile
>
checkMobileMap
=
mobileMapR
.
getData
();
if
(
Common
.
isNotNull
(
checkMobileMap
)
&&
checkMobileMap
.
get
(
mobile
)
!=
null
)
{
TCheckMobile
checkMobile
=
checkMobileMap
.
get
(
mobile
);
this
.
save
(
checkMobile
);
if
(
checkMobile
!=
null
&&
CommonConstants
.
ONE_STRING
.
equals
(
checkMobile
.
getStatus
()))
{
return
true
;
returnMobile
.
setStatus
(
CommonConstants
.
ONE_STRING
);
return
returnMobile
;
}
else
{
return
fals
e
;
return
returnMobil
e
;
}
}
}
}
return
fals
e
;
return
returnMobil
e
;
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDataAuthServiceImpl.java
View file @
d3f027b5
...
...
@@ -174,7 +174,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
// 缓存里放入 id_菜单id, sql
if
(!
authSqlMap
.
isEmpty
())
{
// 前缀
String
prefix
=
" and (1=
1
"
;
String
prefix
=
" and (1=
2
"
;
// 后缀
String
suffix
=
" ) "
;
for
(
Map
.
Entry
<
String
,
String
>
authSql
:
authSqlMap
.
entrySet
())
{
...
...
@@ -400,7 +400,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
// 缓存里放入 id_菜单id, sql
if
(!
authSqlMap
.
isEmpty
())
{
// 前缀
String
prefix
=
" and (1=
1
"
;
String
prefix
=
" and (1=
2
"
;
// 后缀
String
suffix
=
" ) "
;
for
(
Map
.
Entry
<
String
,
String
>
authSql
:
authSqlMap
.
entrySet
())
{
...
...
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