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
5ceb9714
Commit
5ceb9714
authored
Jun 23, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huyc 项目档案代码提交
parent
aa8dfd6a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
129 additions
and
23 deletions
+129
-23
TEmpChangeInfo.java
...fu/cloud/plus/v1/yifu/archives/entity/TEmpChangeInfo.java
+36
-9
TEmployeeProject.java
.../cloud/plus/v1/yifu/archives/entity/TEmployeeProject.java
+2
-1
TElecEmployeeInfoController.java
...yifu/archives/controller/TElecEmployeeInfoController.java
+3
-1
TEmpChangeInfoController.java
...v1/yifu/archives/controller/TEmpChangeInfoController.java
+2
-8
TEmpChangeInfoService.java
.../plus/v1/yifu/archives/service/TEmpChangeInfoService.java
+18
-0
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+67
-3
TEmpChangeInfoMapper.xml
...es-biz/src/main/resources/mapper/TEmpChangeInfoMapper.xml
+1
-1
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmpChangeInfo.java
View file @
5ceb9714
...
...
@@ -37,12 +37,12 @@ import lombok.EqualsAndHashCode;
@Schema
(
description
=
"档案划转日志表"
)
public
class
TEmpChangeInfo
extends
BaseEntity
{
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"id
"
)
private
Lo
ng
id
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键
"
)
private
Stri
ng
id
;
/**
* 员工姓名
...
...
@@ -75,10 +75,10 @@ public class TEmpChangeInfo extends BaseEntity {
private
String
newSettle
;
/**
*
员工
id
*
项目档案
id
*/
@Schema
(
description
=
"
员工
id"
)
private
Long
emp
Id
;
@Schema
(
description
=
"
项目档案
id"
)
private
Long
pro
Id
;
/**
* 未结算费用 0:划转 1:不划转
...
...
@@ -112,4 +112,31 @@ public class TEmpChangeInfo extends BaseEntity {
@Schema
(
description
=
"身份证号码"
)
private
String
empIdcard
;
/**
* 客户id
*/
@Schema
(
description
=
"客户id"
)
@TableField
(
exist
=
false
)
private
String
unitId
;
/**
* 客户编码
*/
@Schema
(
description
=
"客户编码"
)
@TableField
(
exist
=
false
)
private
String
unitNo
;
/**
* 项目id
*/
@Schema
(
description
=
"项目id"
)
@TableField
(
exist
=
false
)
private
String
deptId
;
/**
* 项目编码
*/
@Schema
(
description
=
"项目编码"
)
@TableField
(
exist
=
false
)
private
String
deptNo
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeProject.java
View file @
5ceb9714
...
...
@@ -28,6 +28,7 @@ import lombok.EqualsAndHashCode;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
* 项目档案表
...
...
@@ -222,7 +223,7 @@ public class TEmployeeProject extends BaseEntity {
* 入职日期
*/
@Schema
(
description
=
"入职日期"
)
private
LocalDateTim
e
enjoinDate
;
private
Dat
e
enjoinDate
;
/**
* 试用期(单位月)
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TElecEmployeeInfoController.java
View file @
5ceb9714
...
...
@@ -29,6 +29,8 @@ import lombok.RequiredArgsConstructor;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
/**
* 电子档案信息表
...
...
@@ -79,7 +81,7 @@ public class TElecEmployeeInfoController {
@SysLog
(
"新增电子档案信息表"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('archives_telecemployeeinfo_add')"
)
public
R
save
(
@RequestBody
TElecEmployeeInfo
tElecEmployeeInfo
)
{
public
R
save
(
@
Valid
@
RequestBody
TElecEmployeeInfo
tElecEmployeeInfo
)
{
return
R
.
ok
(
tElecEmployeeInfoService
.
save
(
tElecEmployeeInfo
));
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpChangeInfoController.java
View file @
5ceb9714
...
...
@@ -55,10 +55,6 @@ public class TEmpChangeInfoController {
private
final
TEmpChangeInfoService
tEmpChangeInfoService
;
private
final
TCustomerInfoService
tCustomerInfoService
;
private
final
TSettleDomainService
tSettleDomainService
;
/**
* 分页查询
* @param page 分页对象
...
...
@@ -134,8 +130,7 @@ public class TEmpChangeInfoController {
@SysLog
(
"获取所有项目名称"
)
@GetMapping
(
"/getAllDept"
)
public
R
<
List
<
TSettleDomain
>>
getAllDept
()
{
List
<
TSettleDomain
>
list
=
tSettleDomainService
.
list
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
().
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
return
R
.
ok
(
list
);
return
tEmpChangeInfoService
.
getAllDept
();
}
...
...
@@ -149,8 +144,7 @@ public class TEmpChangeInfoController {
@SysLog
(
"获取所有单位名称"
)
@GetMapping
(
"/getAllUint"
)
public
R
<
List
<
TCustomerInfo
>>
getAllUint
()
{
List
<
TCustomerInfo
>
list
=
tCustomerInfoService
.
list
(
Wrappers
.<
TCustomerInfo
>
query
().
lambda
().
eq
(
TCustomerInfo:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
return
R
.
ok
(
list
);
return
tEmpChangeInfoService
.
getAllUint
();
}
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmpChangeInfoService.java
View file @
5ceb9714
...
...
@@ -19,7 +19,9 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.pig4cloud.plugin.excel.vo.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpChangeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpChangeInfoVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.validation.BindingResult
;
...
...
@@ -48,4 +50,20 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> {
**/
R
<
List
<
ErrorMessage
>>
batchChangeArc
(
List
<
TEmpChangeInfoVO
>
excelVOList
,
BindingResult
bindingResult
);
/**
* 获取所有项目名称
* @return R
* @Author huyc
* @Date 2022-06-22
*/
R
<
List
<
TSettleDomain
>>
getAllDept
();
/**
* 获取所有单位名称
* @return R
* @Author huyc
* @Date 2022-06-22
*/
R
<
List
<
TCustomerInfo
>>
getAllUint
();
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
5ceb9714
...
...
@@ -20,17 +20,22 @@ import cn.hutool.core.collection.CollUtil;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.pig4cloud.plugin.excel.vo.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpChangeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpChangeInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TCustomerInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpChangeInfoVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
org.springframework.validation.BindingResult
;
...
...
@@ -43,9 +48,14 @@ import java.util.*;
* @date 2022-06-18 09:39:46
*/
@Service
@RequiredArgsConstructor
public
class
TEmpChangeInfoServiceImpl
extends
ServiceImpl
<
TEmpChangeInfoMapper
,
TEmpChangeInfo
>
implements
TEmpChangeInfoService
{
private
TEmployeeProjectService
tEmployeeProjectService
;
private
final
TEmployeeProjectService
tEmployeeProjectService
;
private
final
TCustomerInfoService
tCustomerInfoService
;
private
final
TSettleDomainService
tSettleDomainService
;
/**
* @Author huyc
...
...
@@ -67,6 +77,17 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//社保公积金派单处需要直接修改为最新的项目
//社保预估库、缴费库、对比库、代理差额库,需要同步修改未结算(并且满足这个条件:数据 生成月≥此处划转起始月)的数据,已结算数据不变更;
//划转,更新项目信息
TEmployeeProject
updateTEmployeeProject
=
tEmployeeProjectService
.
getById
(
tEmpChangeInfo
.
getProId
());
if
(
Common
.
isNotNull
(
updateTEmployeeProject
))
{
updateTEmployeeProject
.
setDeptNo
(
tEmpChangeInfo
.
getDeptNo
());
updateTEmployeeProject
.
setDeptId
(
tEmpChangeInfo
.
getDeptId
());
updateTEmployeeProject
.
setDeptName
(
tEmpChangeInfo
.
getNewDept
());
updateTEmployeeProject
.
setUnitId
(
tEmpChangeInfo
.
getUnitId
());
updateTEmployeeProject
.
setUnitNo
(
tEmpChangeInfo
.
getUnitNo
());
updateTEmployeeProject
.
setUnitName
(
tEmpChangeInfo
.
getNewDept
());
tEmployeeProjectService
.
updateById
(
updateTEmployeeProject
);
}
//保存档案划转记录
this
.
save
(
tEmpChangeInfo
);
return
R
.
ok
();
...
...
@@ -89,7 +110,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
continue
;
}
errorMsg
=
new
HashSet
<>();
TEmpChangeInfoVO
excel
=
excelVOList
.
get
(
i
);
TEmpChangeInfoVO
excel
=
excelVOList
.
get
(
i
);
//待划转员工已在目标结算主体下不可划转
TEmployeeProject
tEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
...
...
@@ -100,7 +121,26 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
// 数据合法情况
if
(
CollUtil
.
isEmpty
(
errorMsg
))
{
//划转,更新项目信息
TEmployeeProject
updateTEmployeePro
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getOldSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
updateTEmployeePro
))
{
TSettleDomain
tSettleDomain
=
tSettleDomainService
.
getOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDepartNo
,
updateTEmployeePro
.
getDeptNo
()).
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
updateTEmployeePro
.
setDeptNo
(
tSettleDomain
.
getDepartNo
());
updateTEmployeePro
.
setDeptId
(
tSettleDomain
.
getId
());
updateTEmployeePro
.
setDeptName
(
tSettleDomain
.
getDepartName
());
TCustomerInfo
tCustomerInfo
=
tCustomerInfoService
.
getById
(
tSettleDomain
.
getCustomerId
());
if
(
Common
.
isNotNull
(
tCustomerInfo
))
{;
updateTEmployeePro
.
setUnitId
(
tCustomerInfo
.
getId
());
updateTEmployeePro
.
setUnitNo
(
tCustomerInfo
.
getCustomerCode
());
updateTEmployeePro
.
setUnitName
(
tCustomerInfo
.
getCustomerName
());
}
tEmployeeProjectService
.
updateById
(
updateTEmployeePro
);
}
}
}
else
{
// 数据不合法
errorMessageList
.
add
(
new
ErrorMessage
((
long
)
(
i
+
2
),
errorMsg
));
...
...
@@ -111,4 +151,28 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
return
R
.
ok
();
}
/**
* 获取所有项目名称
* @return R
* @Author huyc
* @Date 2022-06-22
*/
@Override
public
R
<
List
<
TSettleDomain
>>
getAllDept
()
{
List
<
TSettleDomain
>
list
=
tSettleDomainService
.
list
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
().
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
return
R
.
ok
(
list
);
}
/**
* 获取所有单位名称
* @return R
* @Author huyc
* @Date 2022-06-22
*/
@Override
public
R
<
List
<
TCustomerInfo
>>
getAllUint
()
{
List
<
TCustomerInfo
>
list
=
tCustomerInfoService
.
list
(
Wrappers
.<
TCustomerInfo
>
query
().
lambda
().
eq
(
TCustomerInfo:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
return
R
.
ok
(
list
);
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmpChangeInfoMapper.xml
View file @
5ceb9714
...
...
@@ -31,7 +31,7 @@
<result
property=
"newDept"
column=
"NEW_DEPT"
/>
<result
property=
"oldSettle"
column=
"OLD_SETTLE"
/>
<result
property=
"newSettle"
column=
"NEW_SETTLE"
/>
<result
property=
"
empId"
column=
"EMP
_ID"
/>
<result
property=
"
proId"
column=
"PRO
_ID"
/>
<result
property=
"unsettleDeal"
column=
"UNSETTLE_DEAL"
/>
<result
property=
"changeStartMonth"
column=
"CHANGE_START_MONTH"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
...
...
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