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
cbf55a66
Commit
cbf55a66
authored
Oct 15, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.0 预入职导入
parent
93071bf8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
2362 additions
and
26 deletions
+2362
-26
TEmployeeInfo.java
...ifu/cloud/plus/v1/yifu/archives/entity/TEmployeeInfo.java
+5
-0
TPreEmpMain.java
.../yifu/cloud/plus/v1/yifu/archives/entity/TPreEmpMain.java
+23
-0
TPreEmpOtherFile.java
.../cloud/plus/v1/yifu/archives/entity/TPreEmpOtherFile.java
+7
-0
PreUploadEmpImportVo.java
.../cloud/plus/v1/yifu/archives/vo/PreUploadEmpImportVo.java
+300
-0
PreUploadImportParamVo.java
...loud/plus/v1/yifu/archives/vo/PreUploadImportParamVo.java
+21
-0
pom.xml
yifu-archives/yifu-archives-biz/pom.xml
+6
-0
TPreEmpMainController.java
...us/v1/yifu/archives/controller/TPreEmpMainController.java
+18
-3
TEmployeeInfoMapper.java
...oud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
+2
-0
TPreEmpMainMapper.java
...cloud/plus/v1/yifu/archives/mapper/TPreEmpMainMapper.java
+17
-0
TEmployeeInfoService.java
...d/plus/v1/yifu/archives/service/TEmployeeInfoService.java
+4
-0
TEmployeeProjectService.java
...lus/v1/yifu/archives/service/TEmployeeProjectService.java
+10
-0
TPreEmpMainService.java
...oud/plus/v1/yifu/archives/service/TPreEmpMainService.java
+13
-3
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+59
-3
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+18
-0
TPreEmpMainServiceImpl.java
...v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
+1618
-7
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+11
-0
TPreEmpMainMapper.xml
...hives-biz/src/main/resources/mapper/TPreEmpMainMapper.xml
+89
-1
TCheckIdCardController.java
...loud/plus/v1/check/controller/TCheckIdCardController.java
+19
-2
TCheckIdCardService.java
...yifu/cloud/plus/v1/check/service/TCheckIdCardService.java
+13
-1
TCheckIdCardServiceImpl.java
...d/plus/v1/check/service/impl/TCheckIdCardServiceImpl.java
+48
-6
DateUtil.java
...om/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
+25
-0
TBankNameMapVo.java
...com/yifu/cloud/plus/v1/yifu/salary/vo/TBankNameMapVo.java
+18
-0
TBankSetController.java
...ud/plus/v1/yifu/salary/controller/TBankSetController.java
+18
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeInfo.java
View file @
cbf55a66
...
...
@@ -567,4 +567,9 @@ public class TEmployeeInfo extends BaseEntity {
*/
@TableField
(
exist
=
false
)
private
List
<
TEmpOtherFile
>
otherFiles
;
// 档案编辑的其他附件之外的附件,例如:身份证正反面,户口本2页、员工声明、员工确认
@TableField
(
exist
=
false
)
private
List
<
TAttaInfo
>
attaList
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TPreEmpMain.java
View file @
cbf55a66
...
...
@@ -31,6 +31,7 @@ import org.hibernate.validator.constraints.Length;
import
javax.validation.constraints.NotBlank
;
import
java.util.Date
;
import
java.util.List
;
/**
* 预入职-主表
...
...
@@ -238,6 +239,12 @@ public class TPreEmpMain extends BaseEntity {
@Schema
(
description
=
"员工申明表ID,新申明要加一条新数据,关联这个主表"
)
private
String
declarationId
;
// 数据来源 默认0: '扫码进入', 1: 'PC批量导入'
@ExcelAttribute
(
name
=
"数据来源"
,
maxLength
=
32
)
@ExcelProperty
(
"数据来源"
)
@Schema
(
description
=
"数据来源"
)
private
String
sourType
;
@Schema
(
description
=
"状态多个"
)
@TableField
(
exist
=
false
)
private
String
[]
statusArray
;
...
...
@@ -266,4 +273,20 @@ public class TPreEmpMain extends BaseEntity {
@TableField
(
exist
=
false
)
private
String
ids
;
// 导入预入职使用
@TableField
(
exist
=
false
)
private
String
firstWorkFlag
;
@TableField
(
exist
=
false
)
private
String
haveQualification
;
/**
* 其他附件
*/
@TableField
(
exist
=
false
)
private
List
<
TPreEmpOtherFile
>
otherFiles
;
// 档案编辑的其他附件之外的附件,例如:身份证正反面,户口本2页、员工声明、员工确认
@TableField
(
exist
=
false
)
private
List
<
TAttaInfo
>
attaList
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TPreEmpOtherFile.java
View file @
cbf55a66
...
...
@@ -100,4 +100,11 @@ public class TPreEmpOtherFile {
**/
@TableField
(
exist
=
false
)
private
List
<
TAttaInfo
>
attaList
;
/**
* 档案编辑其他附件分租信息处理类型 0 新增 1 更新 2 删除 3 不变
*/
@TableField
(
exist
=
false
)
private
String
handleType
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/PreUploadEmpImportVo.java
0 → 100644
View file @
cbf55a66
This diff is collapsed.
Click to expand it.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/PreUploadImportParamVo.java
0 → 100644
View file @
cbf55a66
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* @author hgw
* @description 预入职导入入参
* @date 2024-10-12 11:16:17
*/
@Getter
@Setter
public
class
PreUploadImportParamVo
{
// 结算主体;必填
String
deptId
;
// sheetName;必填
String
sheetName
;
}
yifu-archives/yifu-archives-biz/pom.xml
View file @
cbf55a66
...
...
@@ -105,6 +105,12 @@
<artifactId>
javase
</artifactId>
<version>
3.5.1
</version>
</dependency>
<!-- 读取excel -->
<dependency>
<groupId>
com.monitorjbl
</groupId>
<artifactId>
xlsx-streamer
</artifactId>
<version>
2.2.0
</version>
</dependency>
<!-- 二维码生成JAR结束 -->
</dependencies>
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TPreEmpMainController.java
View file @
cbf55a66
...
...
@@ -21,9 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpMain
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpMainService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.PreEmpMainDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TPreEmpMainSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
...
...
@@ -126,6 +124,7 @@ public class TPreEmpMainController {
/**
* 预入职批量完善信息
*
* @author hgw
* @date 2024-6-21 15:25:20
**/
...
...
@@ -152,6 +151,7 @@ public class TPreEmpMainController {
/**
* 预入职批量审核
*
* @author hgw
* @date 2024-6-24 12:00:53
**/
...
...
@@ -241,6 +241,7 @@ public class TPreEmpMainController {
**/
@Operation
(
summary
=
"导出预入职-全量"
,
description
=
"导出预入职-全量 hasPermission('archives_tpreempmain-export-all')"
)
@PostMapping
(
"/exportAll"
)
@SysLog
(
"导出预入职-全量"
)
//@PreAuthorize("@pms.hasPermission('archives_tpreempmain-export-all')")
public
void
exportAll
(
HttpServletResponse
response
,
@RequestBody
TPreEmpMainSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
...
...
@@ -248,4 +249,18 @@ public class TPreEmpMainController {
tPreEmpMainService
.
exportAll
(
response
,
searchVo
);
}
/**
* @param file
* @Description: 预入职批量导入
* @Author: hgw
* @Date: 2024/10/12 9:24
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryUploadParamVo>
**/
@SysLog
(
"预入职批量导入"
)
@Operation
(
description
=
"预入职批量导入"
)
@PostMapping
(
"/uploadPreEmp"
)
public
R
<
List
<
PreUploadEmpImportVo
>>
uploadPreEmp
(
MultipartFile
file
,
PreUploadImportParamVo
vo
)
throws
Exception
{
return
tPreEmpMainService
.
uploadPreEmp
(
file
,
vo
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
View file @
cbf55a66
...
...
@@ -51,6 +51,8 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
// hgw 2022-6-22 15:32:39 根据身份证查询一批档案
List
<
TEmployeeInfo
>
getListByIdCard
(
@Param
(
"idCardList"
)
List
<
String
>
idCardList
);
List
<
TEmployeeInfo
>
getListByIdCardList
(
@Param
(
"idCardList"
)
List
<
String
>
idCardList
);
// hgw 2022-6-22 15:32:39 根据手机号查询一批档案
List
<
TEmployeeInfo
>
getListByPhone
(
@Param
(
"phoneList"
)
List
<
String
>
phoneList
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TPreEmpMainMapper.java
View file @
cbf55a66
...
...
@@ -65,6 +65,9 @@ public interface TPreEmpMainMapper extends BaseMapper<TPreEmpMain> {
TPreEmpMain
getTPreEmpMainByCardAndDept
(
@Param
(
"empIdCard"
)
String
empIdCard
,
@Param
(
"deptId"
)
String
deptId
);
/* 导入预入职时,查询所有身份证的预入职使用的,查出来删除附属信息 */
List
<
String
>
getTPreEmpMainListByCardAndDept
(
@Param
(
"empIdCardList"
)
List
<
String
>
empIdCardList
,
@Param
(
"deptId"
)
String
deptId
);
TPreEmpMain
getTPreEmpMainByCardAndDeptNo
(
@Param
(
"empIdCard"
)
String
empIdCard
,
@Param
(
"deptNo"
)
String
deptNo
);
// 以下都是清空临时表的数据
...
...
@@ -75,5 +78,19 @@ public interface TPreEmpMainMapper extends BaseMapper<TPreEmpMain> {
void
deleteFamilyByMainId
(
@Param
(
"preMainId"
)
String
preMainId
);
void
deleteEmployeeByMainId
(
@Param
(
"preMainId"
)
String
preMainId
);
void
deleteProjectByMainId
(
@Param
(
"preMainId"
)
String
preMainId
);
// 以下都是清空临时表的数据
void
deleteBadByMainIdList
(
@Param
(
"preMainIdList"
)
List
<
String
>
preMainIdList
);
void
deleteContactByMainIdList
(
@Param
(
"preMainIdList"
)
List
<
String
>
preMainIdList
);
void
deleteDisabilityByMainIdList
(
@Param
(
"preMainIdList"
)
List
<
String
>
preMainIdList
);
void
deleteEducationByMainIdList
(
@Param
(
"preMainIdList"
)
List
<
String
>
preMainIdList
);
void
deleteFamilyByMainIdList
(
@Param
(
"preMainIdList"
)
List
<
String
>
preMainIdList
);
void
deleteEmployeeByMainIdList
(
@Param
(
"preMainIdList"
)
List
<
String
>
preMainIdList
);
void
deleteProjectByMainIdList
(
@Param
(
"preMainIdList"
)
List
<
String
>
preMainIdList
);
void
deleteWorkRecordingByMainIdList
(
@Param
(
"preMainIdList"
)
List
<
String
>
preMainIdList
);
void
deleteProfessionalByMainIdList
(
@Param
(
"preMainIdList"
)
List
<
String
>
preMainIdList
);
void
deleteOtherFileByMainIdList
(
@Param
(
"preMainIdList"
)
List
<
String
>
preMainIdList
);
void
deleteAttaByDomainIdList
(
@Param
(
"preMainIdList"
)
List
<
String
>
preMainIdList
);
void
deletePreMainIdList
(
@Param
(
"preMainIdList"
)
List
<
String
>
preMainIdList
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeInfoService.java
View file @
cbf55a66
...
...
@@ -260,4 +260,8 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
R
<
TEmployeeInfo
>
getByIdAssociate
(
String
id
);
void
exportEmployeeFile
(
String
id
,
HttpServletResponse
response
)
throws
Exception
;
// 预入职批量导入使用
List
<
TEmployeeInfo
>
getListByIdCardList
(
List
<
String
>
idList
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeProjectService.java
View file @
cbf55a66
...
...
@@ -272,4 +272,14 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
void
updateContractStatus
(
String
empId
,
String
deptId
,
int
status
);
void
updatePostByEmpDeptNo
(
String
deptNo
,
String
post
,
String
empIdcard
);
/**
* @param deptId 项目id
* @Description: 获取项目下的未删除的在项的人员
* @Author: hgw
* @Date: 2024/10/14 16:28
* @return: java.util.Map<java.lang.String, com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject>
**/
Map
<
String
,
TEmployeeProject
>
getMapByDeptIdAndDelete
(
String
deptId
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TPreEmpMainService.java
View file @
cbf55a66
...
...
@@ -21,11 +21,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpMain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.PreEmpMainDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TPreEmpMainSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
...
...
@@ -64,8 +63,10 @@ public interface TPreEmpMainService extends IService<TPreEmpMain> {
// 单个完善信息
R
<
String
>
doImproveInformation
(
PreEmpMainDetailVo
vo
);
// 草稿
R
<
String
>
saveDraftPreEmpMain
(
PreEmpMainDetailVo
vo
);
// 保存
R
<
String
>
savePreEmpMain
(
PreEmpMainDetailVo
vo
);
...
...
@@ -74,6 +75,7 @@ public interface TPreEmpMainService extends IService<TPreEmpMain> {
// 导出
void
listExport
(
HttpServletResponse
response
,
TPreEmpMainSearchVo
searchVo
);
// 导出全量
void
exportAll
(
HttpServletResponse
response
,
TPreEmpMainSearchVo
searchVo
);
...
...
@@ -85,4 +87,12 @@ public interface TPreEmpMainService extends IService<TPreEmpMain> {
// 批量审核
R
<
List
<
ErrorVO
>>
doBatchAudit
(
List
<
String
>
ids
,
String
status
,
String
auditRemark
);
/**
* @Description: 预入职批量导入
* @Author: hgw
* @Date: 2024/10/12 9:27
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.vo.PreEmpMainDetailVo>>
**/
R
<
List
<
PreUploadEmpImportVo
>>
uploadPreEmp
(
MultipartFile
file
,
PreUploadImportParamVo
vo
)
throws
Exception
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
cbf55a66
...
...
@@ -249,7 +249,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
TEmpEducation
education
=
new
TEmpEducation
();
this
.
doUpdateEducationCore
(
education
,
employeeInfo
);
// 更新附件信息 fxj 2024-09-09
// 更新
其他
附件信息 fxj 2024-09-09
if
(
updateOtherAtta
(
employeeInfo
)){
// 获取最新附件信息 fxj 2024-09-09
getAttaInfo
(
employeeInfo
);
...
...
@@ -257,8 +257,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
old
.
setOtherFiles
(
null
);
employeeInfo
.
setOtherFiles
(
null
);
}
// 更新附件信息 hgw 2024-10-15
if
(
updateAtta
(
employeeInfo
)){
// 获取最新附件信息
getEmpAttaInfo
(
employeeInfo
);
}
else
{
old
.
setAttaList
(
null
);
employeeInfo
.
setAttaList
(
null
);
}
// 记录变更日志
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
old
.
getId
(),
""
,
old
,
employeeInfo
);
return
R
.
ok
(
this
.
updateById
(
employeeInfo
));
...
...
@@ -304,6 +310,33 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
return
flag
;
}
// 仿写房工更新附件
private
boolean
updateAtta
(
TEmployeeInfo
employeeInfo
)
{
List
<
TAttaInfo
>
attaInfos
=
employeeInfo
.
getAttaList
();
boolean
flag
=
false
;
if
(
Common
.
isNotNull
(
attaInfos
)){
List
<
String
>
deleteIds
=
new
ArrayList
<>();
List
<
TAttaInfo
>
adds
=
new
ArrayList
<>();
for
(
TAttaInfo
attaInfo
:
attaInfos
){
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
attaInfo
.
getHandleType
())){
adds
.
add
(
attaInfo
);
}
if
(
CommonConstants
.
TWO_STRING
.
equals
(
attaInfo
.
getHandleType
())){
deleteIds
.
add
(
attaInfo
.
getId
());
}
}
if
(
Common
.
isNotNull
(
deleteIds
)){
attaInfoService
.
removeBatchByIds
(
deleteIds
);
flag
=
true
;
}
if
(
Common
.
isNotNull
(
adds
)){
attaInfoService
.
updateBatchById
(
adds
);
flag
=
true
;
}
}
return
flag
;
}
private
boolean
handleOtherFile
(
TEmpOtherFile
otherFile
)
{
boolean
flag
=
false
;
// 新增时先增加 empOtherFile
...
...
@@ -364,6 +397,21 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
emp
.
setOtherFiles
(
otherFiles
);
}
// 仿写房工附件接口
private
void
getEmpAttaInfo
(
TEmployeeInfo
emp
)
{
List
<
TAttaInfo
>
attaInfos
=
attaInfoService
.
list
(
Wrappers
.<
TAttaInfo
>
query
().
lambda
().
eq
(
TAttaInfo:
:
getDomainId
,
emp
.
getId
()));
if
(
Common
.
isNotNull
(
attaInfos
)){
URL
url
;
for
(
TAttaInfo
atta:
attaInfos
){
url
=
ossUtil
.
getObjectUrl
(
null
,
atta
.
getAttaSrc
());
if
(
Common
.
isNotNull
(
url
)){
atta
.
setAttaUrl
(
url
.
toString
());
}
}
}
emp
.
setAttaList
(
attaInfos
);
}
@Override
public
R
<
String
>
deleteEmployee
(
String
id
)
{
TEmployeeInfo
employee
=
this
.
getById
(
id
);
...
...
@@ -2830,6 +2878,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
getAttaInfo
(
employeeInfo
);
getEmpAttaInfo
(
employeeInfo
);
return
R
.
ok
(
employeeInfo
);
}
/**
...
...
@@ -2951,4 +3000,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
return
fileAtta
.
getAttaName
();
}
}
@Override
public
List
<
TEmployeeInfo
>
getListByIdCardList
(
List
<
String
>
idList
)
{
return
baseMapper
.
getListByIdCardList
(
idList
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
cbf55a66
...
...
@@ -1924,4 +1924,22 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
audit
.
setCreateName
(
tEmployeeContractInfo
.
getAuditUserName
());
tEmployeeContractAuditService
.
save
(
audit
);
}
@Override
public
Map
<
String
,
TEmployeeProject
>
getMapByDeptIdAndDelete
(
String
deptId
)
{
Map
<
String
,
TEmployeeProject
>
proMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
deptId
))
{
List
<
TEmployeeProject
>
projectList
=
this
.
list
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getDeptId
,
deptId
)
.
ne
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ONE_INT
)
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
if
(
projectList
!=
null
&&
!
projectList
.
isEmpty
())
{
for
(
TEmployeeProject
pro
:
projectList
)
{
proMap
.
put
(
pro
.
getEmpIdcard
(),
pro
);
}
}
}
return
proMap
;
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
View file @
cbf55a66
This diff is collapsed.
Click to expand it.
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
cbf55a66
...
...
@@ -764,6 +764,17 @@
</foreach>
</select>
<select
id=
"getListByIdCardList"
resultMap=
"tEmployeeInfoMap"
>
select
<include
refid=
"baseParam"
/>
from t_employee_info a
where
a.DELETE_FLAG = '0' and a.EMP_IDCARD in
<foreach
item=
"item"
index=
"index"
collection=
"idCardList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
<!-- hgw 根据手机号查询 -->
<select
id=
"getListByPhone"
resultMap=
"tEmployeeInfoMap"
>
select
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TPreEmpMainMapper.xml
View file @
cbf55a66
...
...
@@ -52,6 +52,7 @@
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"settleDomain"
column=
"SETTLE_DOMAIN"
/>
<result
property=
"declarationId"
column=
"DECLARATION_ID"
/>
<result
property=
"sourType"
column=
"SOUR_TYPE"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
...
...
@@ -81,7 +82,8 @@
a.CREATE_TIME,
a.UPDATE_TIME,
a.SETTLE_DOMAIN,
a.DECLARATION_ID
a.DECLARATION_ID,
a.SOUR_TYPE
</sql>
<sql
id=
"tPreEmpMain_where"
>
<if
test=
"tPreEmpMain != null"
>
...
...
@@ -514,6 +516,17 @@
limit 1
</select>
<!-- 导入预入职时,查询所有身份证的预入职使用的,查出来删除附属信息 -->
<select
id=
"getTPreEmpMainListByCardAndDept"
resultType=
"java.lang.String"
>
SELECT
a.ID
FROM t_pre_emp_main a
where a.DEPT_ID = #{deptId} AND a.EMP_IDCARD in
<foreach
collection=
"empIdCardList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
</select>
<!--tPreEmpMain简单分页查询-->
<select
id=
"getTPreEmpMainByCardAndDeptNo"
resultMap=
"tPreEmpMainMap"
>
SELECT
...
...
@@ -544,5 +557,80 @@
<delete
id=
"deleteProjectByMainId"
>
delete from t_pre_employee_project where PRE_MAIN_ID = #{preMainId}
</delete>
<delete
id=
"deleteBadByMainIdList"
>
delete from t_pre_emp_bad_record where PRE_MAIN_ID in
<foreach
collection=
"preMainIdList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
</delete>
<delete
id=
"deleteContactByMainIdList"
>
delete from t_pre_emp_contact_info where PRE_MAIN_ID = in
<foreach
collection=
"preMainIdList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
</delete>
<delete
id=
"deleteDisabilityByMainIdList"
>
delete from t_pre_emp_disability_info where PRE_MAIN_ID in
<foreach
collection=
"preMainIdList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
</delete>
<delete
id=
"deleteEducationByMainIdList"
>
delete from t_pre_emp_education where PRE_MAIN_ID in
<foreach
collection=
"preMainIdList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
</delete>
<delete
id=
"deleteFamilyByMainIdList"
>
delete from t_pre_emp_family where PRE_MAIN_ID in
<foreach
collection=
"preMainIdList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
</delete>
<delete
id=
"deleteEmployeeByMainIdList"
>
delete from t_pre_employee_info where PRE_MAIN_ID in
<foreach
collection=
"preMainIdList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
</delete>
<delete
id=
"deleteProjectByMainIdList"
>
delete from t_pre_employee_project where PRE_MAIN_ID in
<foreach
collection=
"preMainIdList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
</delete>
<delete
id=
"deleteWorkRecordingByMainIdList"
>
delete from t_pre_emp_work_recording where PRE_MAIN_ID in
<foreach
collection=
"preMainIdList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
</delete>
<delete
id=
"deleteProfessionalByMainIdList"
>
delete from t_pre_emp_professional_qualification where PRE_MAIN_ID in
<foreach
collection=
"preMainIdList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
</delete>
<delete
id=
"deleteOtherFileByMainIdList"
>
delete from t_pre_emp_other_file where PRE_MAIN_ID in
<foreach
collection=
"preMainIdList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
</delete>
<delete
id=
"deleteAttaByDomainIdList"
>
delete from t_atta_info where domain_id in
<foreach
collection=
"preMainIdList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
</delete>
<delete
id=
"deletePreMainIdList"
>
delete from t_pre_emp_main where id in
<foreach
collection=
"preMainIdList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
</delete>
</mapper>
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/controller/TCheckIdCardController.java
View file @
cbf55a66
...
...
@@ -2,8 +2,10 @@ package com.yifu.cloud.plus.v1.check.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.service.TCheckIdCardService
;
import
com.yifu.cloud.plus.v1.check.vo.CheckBatchVo
;
import
com.yifu.cloud.plus.v1.check.vo.CheckIdCardListVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
...
...
@@ -19,6 +21,7 @@ import javax.validation.Valid;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ExecutionException
;
/**
...
...
@@ -176,7 +179,21 @@ public class TCheckIdCardController {
@SysLog
(
"校验薪资姓名身份证"
)
@PostMapping
(
"/checkSalaryIdCard"
)
public
R
<
List
<
TCheckIdCard
>>
checkSalaryIdCard
(
@RequestBody
List
<
TCheckIdCard
>
checkList
)
{
return
tCheckIdCardService
.
checkSalaryIdCard
(
checkList
);
return
tCheckIdCardService
.
checkSalaryIdCard
(
checkList
,
null
);
}
/**
* @Description: 预入职导入使用的批量姓名身份证校验
* @Author: hgw
* @Date: 2024-10-15 11:54:47
* @return: com.yifu.cloud.plus.v1.check.vo.CheckBankNoVo
**/
@Operation
(
description
=
"预入职导入使用的批量姓名身份证校验"
)
@SysLog
(
"预入职导入使用的批量姓名身份证校验"
)
@Inner
@PostMapping
(
"/inner/checkIdCardBatch"
)
public
CheckBatchVo
checkIdCardBatch
(
@RequestBody
List
<
TCheckIdCard
>
list
){
return
tCheckIdCardService
.
checkIdCardBatch
(
list
);
}
/**
...
...
@@ -204,7 +221,7 @@ public class TCheckIdCardController {
@PostMapping
(
"/inner/checkIdCardList"
)
public
CheckIdCardListVo
checkIdCardList
(
@RequestBody
CheckIdCardListVo
vo
)
{
CheckIdCardListVo
returnVo
=
new
CheckIdCardListVo
();
R
<
List
<
TCheckIdCard
>>
checkR
=
tCheckIdCardService
.
checkSalaryIdCard
(
vo
.
getCheckList
());
R
<
List
<
TCheckIdCard
>>
checkR
=
tCheckIdCardService
.
checkSalaryIdCard
(
vo
.
getCheckList
()
,
null
);
if
(
checkR
!=
null
)
{
if
(
checkR
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
returnVo
.
setCode
(
CommonConstants
.
SUCCESS
);
...
...
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/TCheckIdCardService.java
View file @
cbf55a66
...
...
@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
import
com.yifu.cloud.plus.v1.check.vo.CheckBatchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -47,7 +49,17 @@ public interface TCheckIdCardService extends IService<TCheckIdCard> {
TCheckIdCard
checkIdCardSingle
(
TCheckIdCard
tCheckIdCard
);
R
<
List
<
TCheckIdCard
>>
checkSalaryIdCard
(
List
<
TCheckIdCard
>
checkList
);
R
<
List
<
TCheckIdCard
>>
checkSalaryIdCard
(
List
<
TCheckIdCard
>
checkList
,
YifuUser
user
);
/**
* @param list
* @Description: 预入职导入使用的批量姓名身份证校验
* @Author: hgw
* @Date: 2024/10/15 11:36
* @return: com.yifu.cloud.plus.v1.check.vo.CheckBatchVo
**/
CheckBatchVo
checkIdCardBatch
(
List
<
TCheckIdCard
>
list
);
/**
* @Description: C端预入职校验
* @Author: hgw
...
...
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCheckIdCardServiceImpl.java
View file @
cbf55a66
...
...
@@ -8,20 +8,21 @@ import com.yifu.cloud.plus.v1.check.entity.*;
import
com.yifu.cloud.plus.v1.check.mapper.TCheckIdCardMapper
;
import
com.yifu.cloud.plus.v1.check.service.*
;
import
com.yifu.cloud.plus.v1.check.utils.ChecksUtil
;
import
com.yifu.cloud.plus.v1.check.vo.CheckBatchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
lombok.AllArgsConstructor
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.authority.AuthorityUtils
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
...
...
@@ -430,13 +431,15 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
}
@Override
public
R
<
List
<
TCheckIdCard
>>
checkSalaryIdCard
(
List
<
TCheckIdCard
>
checkList
)
{
public
R
<
List
<
TCheckIdCard
>>
checkSalaryIdCard
(
List
<
TCheckIdCard
>
checkList
,
YifuUser
user
)
{
TCanCheck
tCanCheck
=
canCheckService
.
getById
(
1
);
boolean
canCheck
=
false
;
if
(
tCanCheck
!=
null
&&
tCanCheck
.
getCanCheck
()
==
1
)
{
canCheck
=
true
;
}
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
)
{
user
=
SecurityUtils
.
getUser
();
}
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
"请登录!"
);
}
...
...
@@ -574,6 +577,45 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
return
R
.
failed
(
"数据为空!"
);
}
/**
* @Description: 预入职导入使用的批量姓名身份证校验
* @Author: hgw
* @Date: 2024/10/15 11:54
* @return: com.yifu.cloud.plus.v1.check.vo.CheckBatchVo
**/
@Override
public
CheckBatchVo
checkIdCardBatch
(
List
<
TCheckIdCard
>
list
)
{
CheckBatchVo
vo
=
new
CheckBatchVo
();
Map
<
String
,
Boolean
>
checkMap
=
new
HashMap
<>();
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
Set
<
String
>
dbAuthsSet
=
new
HashSet
<>();
Collection
<?
extends
GrantedAuthority
>
authorities
=
AuthorityUtils
.
createAuthorityList
(
dbAuthsSet
.
toArray
(
new
String
[
0
]));
YifuUser
user
=
new
YifuUser
(
list
.
get
(
0
).
getCreateUser
(),
1L
,
""
,
list
.
get
(
0
).
getReason
(),
list
.
get
(
0
).
getReason
(),
"0"
,
SecurityConstants
.
BCRYPT
+
"123456"
,
"12345678911"
,
true
,
true
,
true
,
true
,
"1"
,
authorities
,
"1"
,
null
,
null
,
null
);
// 调用以前的批量校验
R
<
List
<
TCheckIdCard
>>
returnR
=
this
.
checkSalaryIdCard
(
list
,
user
);
if
(
returnR
!=
null
)
{
if
(
returnR
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
checkMap
.
put
(
"全部正确"
,
true
);
}
else
if
(
returnR
.
getData
()
!=
null
)
{
for
(
TCheckIdCard
c
:
returnR
.
getData
())
{
checkMap
.
put
(
c
.
getIdCard
()+
CommonConstants
.
DOWN_LINE_STRING
+
c
.
getName
(),
Common
.
isNotNull
(
c
.
getIsTrue
())
&&
c
.
getIsTrue
()
==
1
);
}
}
else
{
checkMap
.
put
(
"全部错误"
,
false
);
}
}
}
vo
.
setCheckMap
(
checkMap
);
return
vo
;
}
/**
* @Description: 多线程调用api,每次调用前查询一下数据库:
* @Author: hgw
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
View file @
cbf55a66
...
...
@@ -301,6 +301,31 @@ public class DateUtil {
}
}
/**
* @Description: 格式化字符串日期
* @Author: hgw
* @Date: 2024/10/14 21:08
* @return: java.util.Date
**/
public
static
Date
stringDateFormat
(
String
dateText
,
String
format
)
{
if
(
dateText
==
null
)
{
return
null
;
}
try
{
// 兼容多格式,格式化为没有分隔符的格式:
if
(
format
==
null
||
(
format
.
length
()
!=
4
&&
format
.
length
()
!=
6
))
{
format
=
ISO_DATE_FORMAT
;
}
DateFormat
df
=
new
SimpleDateFormat
(
format
);
df
.
setLenient
(
false
);
return
df
.
parse
(
dateText
.
replace
(
"/"
,
""
).
replace
(
"-"
,
""
)
.
replace
(
CommonConstants
.
YEAR
,
""
).
replace
(
CommonConstants
.
MONTH
,
""
)
.
replace
(
CommonConstants
.
DAY
,
""
));
}
catch
(
ParseException
e
)
{
return
null
;
}
}
/**
* @return Timestamp
*/
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TBankNameMapVo.java
0 → 100644
View file @
cbf55a66
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
import
lombok.Data
;
import
java.util.Map
;
/**
* @Description: 开户行名称合理性map
* @Author: hgw
* @Date: 2024/10/15 9:28
* @return:
**/
@Data
public
class
TBankNameMapVo
{
private
Map
<
String
,
String
>
bankMap
;
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TBankSetController.java
View file @
cbf55a66
...
...
@@ -24,8 +24,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
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
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TBankSet
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TBankSetService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TBankNameMapVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TBankSetSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
...
@@ -80,6 +82,22 @@ public class TBankSetController {
return
new
R
<>(
tBankSetService
.
getTBankSetIdNameList
(
tBankSet
));
}
/**
* @Description: 获取开户行
* @Author: hgw
* @Date: 2024/10/15 9:32
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.TBankNameMapVo
**/
@Operation
(
description
=
"获取开户行"
)
@SysLog
(
"获取开户行"
)
@Inner
@PostMapping
(
"/inner/getBankMap"
)
public
TBankNameMapVo
getBankMap
()
{
TBankNameMapVo
vo
=
new
TBankNameMapVo
();
vo
.
setBankMap
(
tBankSetService
.
getBankMap
(
null
));
return
vo
;
}
/**
* 不分页查询
*
...
...
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