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
9f4fbc5f
Commit
9f4fbc5f
authored
Jul 16, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.6.7-同步薪资人员信息
parent
6222166f
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
207 additions
and
16 deletions
+207
-16
TPreEmployeeInfo.java
.../cloud/plus/v1/yifu/archives/entity/TPreEmployeeInfo.java
+9
-0
TPreEmpMainServiceImpl.java
...v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
+69
-1
TPreEmployeeInfoMapper.xml
...-biz/src/main/resources/mapper/TPreEmployeeInfoMapper.xml
+3
-1
TSalaryEmpModLog.java
...fu/cloud/plus/v1/yifu/salary/entity/TSalaryEmpModLog.java
+2
-2
TSalaryEmployeeController.java
.../v1/yifu/salary/controller/TSalaryEmployeeController.java
+27
-0
TSalaryAccountMapper.java
...loud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
+10
-0
TSalaryEmpModLogService.java
.../plus/v1/yifu/salary/service/TSalaryEmpModLogService.java
+8
-11
TSalaryEmployeeService.java
...d/plus/v1/yifu/salary/service/TSalaryEmployeeService.java
+11
-0
TSalaryEmpModLogServiceImpl.java
...yifu/salary/service/impl/TSalaryEmpModLogServiceImpl.java
+1
-1
TSalaryEmployeeServiceImpl.java
.../yifu/salary/service/impl/TSalaryEmployeeServiceImpl.java
+61
-0
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+6
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TPreEmployeeInfo.java
View file @
9f4fbc5f
...
@@ -452,6 +452,15 @@ public class TPreEmployeeInfo extends BaseEntity {
...
@@ -452,6 +452,15 @@ public class TPreEmployeeInfo extends BaseEntity {
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"计税月份"
)
@ExcelProperty
(
"计税月份"
)
private
String
taxMonth
;
private
String
taxMonth
;
/**
* 计税月份是否可编辑:0否;1是(默认是)
*/
@ExcelAttribute
(
name
=
"计税月份是否可编辑"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"计税月份是否可编辑不能超过6个字符"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"计税月份是否可编辑"
)
private
String
taxMonthFlag
;
/**
/**
* 封面抬头
* 封面抬头
*/
*/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
View file @
9f4fbc5f
...
@@ -40,11 +40,15 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...
@@ -40,11 +40,15 @@ 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.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalaryProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.compress.utils.Lists
;
import
org.apache.commons.compress.utils.Lists
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.authority.AuthorityUtils
;
import
org.springframework.security.core.authority.AuthorityUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -68,6 +72,7 @@ import java.util.*;
...
@@ -68,6 +72,7 @@ import java.util.*;
@Log4j2
@Log4j2
@AllArgsConstructor
@AllArgsConstructor
@Service
@Service
@EnableConfigurationProperties
(
DaprSalaryProperties
.
class
)
public
class
TPreEmpMainServiceImpl
extends
ServiceImpl
<
TPreEmpMainMapper
,
TPreEmpMain
>
implements
TPreEmpMainService
{
public
class
TPreEmpMainServiceImpl
extends
ServiceImpl
<
TPreEmpMainMapper
,
TPreEmpMain
>
implements
TPreEmpMainService
{
// 预入职-员工不良记录表
// 预入职-员工不良记录表
private
final
TPreEmpBadRecordService
tPreEmpBadRecordService
;
private
final
TPreEmpBadRecordService
tPreEmpBadRecordService
;
...
@@ -116,6 +121,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -116,6 +121,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 审核日志
// 审核日志
private
final
TPreEmpMainLogService
tPreEmpMainLogService
;
private
final
TPreEmpMainLogService
tPreEmpMainLogService
;
// 薪资服务,获取计税月份
private
final
DaprSalaryProperties
salaryProperties
;
private
final
OSSUtil
ossUtil
;
private
final
OSSUtil
ossUtil
;
private
static
final
String
ID
=
"id"
;
private
static
final
String
ID
=
"id"
;
...
@@ -924,6 +932,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -924,6 +932,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeInfo
.
setCreateBy
(
user
.
getId
());
tPreEmployeeInfo
.
setCreateBy
(
user
.
getId
());
tPreEmployeeInfo
.
setCreateName
(
user
.
getNickname
());
tPreEmployeeInfo
.
setCreateName
(
user
.
getNickname
());
tPreEmployeeInfo
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmployeeInfo
.
setCreateTime
(
LocalDateTime
.
now
());
// 塞计税月份标志
this
.
setTaxMonthAndFlag
(
status
,
tPreEmployeeInfo
);
tPreEmployeeInfoService
.
saveOrUpdate
(
tPreEmployeeInfo
);
tPreEmployeeInfoService
.
saveOrUpdate
(
tPreEmployeeInfo
);
}
}
// 预入职-项目档案表
// 预入职-项目档案表
...
@@ -998,6 +1010,28 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -998,6 +1010,28 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
}
}
}
/**
* @param status 1:保存
* @Description: 获取计税月份和是否可编辑的标志
* @Author: hgw
* @Date: 2024/7/16 16:15
* @return: java.lang.String
**/
private
void
setTaxMonthAndFlag
(
String
status
,
TPreEmployeeInfo
employeeInfo
)
{
String
taxMonth
=
DateUtil
.
getThisMonth
();
employeeInfo
.
setTaxMonthFlag
(
CommonConstants
.
ONE_STRING
);
if
(
CommonConstants
.
ONE_STRING
.
equals
(
status
))
{
// 去薪资服务获取
R
<
String
>
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
salaryProperties
.
getAppUrl
(),
salaryProperties
.
getAppId
()
,
"/tsalaryemployee/inner/getEmpTaxMonth"
,
employeeInfo
.
getEmpIdcard
(),
String
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
sdr
!=
null
&&
sdr
.
getData
()
!=
null
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sdr
.
getData
()))
{
taxMonth
=
sdr
.
getData
();
employeeInfo
.
setTaxMonthFlag
(
CommonConstants
.
ZERO_STRING
);
}
}
employeeInfo
.
setTaxMonth
(
taxMonth
);
}
private
YifuUser
getNewYifuUser
()
{
private
YifuUser
getNewYifuUser
()
{
Set
<
String
>
dbAuthsSet
=
new
HashSet
<>();
Set
<
String
>
dbAuthsSet
=
new
HashSet
<>();
Collection
<?
extends
GrantedAuthority
>
authorities
=
AuthorityUtils
Collection
<?
extends
GrantedAuthority
>
authorities
=
AuthorityUtils
...
@@ -1086,7 +1120,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -1086,7 +1120,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(
Common
.
isEmpty
(
tPreEmployeeProject
.
getTryPeriod
()))
{
if
(
Common
.
isEmpty
(
tPreEmployeeProject
.
getTryPeriod
()))
{
tPreEmployeeProject
.
setTryPeriod
(
""
);
tPreEmployeeProject
.
setTryPeriod
(
""
);
}
}
BeanUtil
.
copyProperties
(
tPreEmployee
Info
,
project
,
ID
);
BeanUtil
.
copyProperties
(
tPreEmployee
Project
,
project
,
ID
);
if
(
CommonConstants
.
ONE_INT
==
project
.
getProjectStatus
())
{
if
(
CommonConstants
.
ONE_INT
==
project
.
getProjectStatus
())
{
project
.
setCreateTime
(
LocalDateTime
.
now
());
project
.
setCreateTime
(
LocalDateTime
.
now
());
project
.
setDeleteFlag
(
CommonConstants
.
STATUS_NORMAL
);
project
.
setDeleteFlag
(
CommonConstants
.
STATUS_NORMAL
);
...
@@ -1113,6 +1147,40 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -1113,6 +1147,40 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(
emp
==
null
)
{
if
(
emp
==
null
)
{
return
R
.
failed
(
"新建员工失败!"
);
return
R
.
failed
(
"新建员工失败!"
);
}
}
// 更新或新增薪资人员
if
(
Common
.
isNotNull
(
tPreEmployeeInfo
.
getBankNo
())
&&
Common
.
isNotNull
(
tPreEmployeeInfo
.
getTaxMonth
()))
{
TSalaryEmployee
newEmp
=
new
TSalaryEmployee
();
newEmp
.
setFileStatus
(
CommonConstants
.
ZERO_STRING
);
newEmp
.
setDeptId
(
dept
.
getId
());
newEmp
.
setDeptName
(
dept
.
getDepartName
());
newEmp
.
setDeptNo
(
dept
.
getDepartNo
());
newEmp
.
setUnitId
(
dept
.
getCustomerId
());
newEmp
.
setUnitName
(
dept
.
getCustomerName
());
newEmp
.
setUnitNo
(
dept
.
getCustomerNo
());
newEmp
.
setCreateBy
(
String
.
valueOf
(
user
.
getId
()));
newEmp
.
setCreateName
(
user
.
getNickname
());
newEmp
.
setCreateTime
(
LocalDateTime
.
now
());
newEmp
.
setUpdateBy
(
String
.
valueOf
(
user
.
getId
()));
newEmp
.
setUpdateTime
(
LocalDateTime
.
now
());
newEmp
.
setInvoiceTitle
(
dept
.
getInvoiceTitleSalary
());
newEmp
.
setEmpName
(
tPreEmployeeInfo
.
getEmpName
());
newEmp
.
setEmpIdcard
(
tPreEmployeeInfo
.
getEmpIdcard
());
newEmp
.
setBankProvince
(
tPreEmployeeInfo
.
getBankProvince
());
newEmp
.
setBankCity
(
tPreEmployeeInfo
.
getBankCity
());
newEmp
.
setBankNo
(
tPreEmployeeInfo
.
getBankNo
());
newEmp
.
setTaxMonth
(
tPreEmployeeInfo
.
getTaxMonth
());
newEmp
.
setBankName
(
tPreEmployeeInfo
.
getBankName
());
newEmp
.
setBankSubName
(
tPreEmployeeInfo
.
getBankSubName
());
newEmp
.
setEmpPhone
(
tPreEmployeeInfo
.
getEmpPhone
());
// 保存薪资人员(含判断是否有发薪)
R
<
String
>
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
salaryProperties
.
getAppUrl
(),
salaryProperties
.
getAppId
()
,
"/tsalaryemployee/inner/savePreNewEmpInfo"
,
newEmp
,
String
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
sdr
==
null
||
Common
.
isEmpty
(
sdr
.
getData
()))
{
return
R
.
failed
(
"同步薪资人员失败!"
);
}
}
// 3:其他附属信息
// 3:其他附属信息
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TPreEmployeeInfoMapper.xml
View file @
9f4fbc5f
...
@@ -89,6 +89,7 @@
...
@@ -89,6 +89,7 @@
<result
property=
"contactProvince"
column=
"CONTACT_PROVINCE"
/>
<result
property=
"contactProvince"
column=
"CONTACT_PROVINCE"
/>
<result
property=
"contactCity"
column=
"CONTACT_CITY"
/>
<result
property=
"contactCity"
column=
"CONTACT_CITY"
/>
<result
property=
"contactTown"
column=
"CONTACT_TOWN"
/>
<result
property=
"contactTown"
column=
"CONTACT_TOWN"
/>
<result
property=
"taxMonthFlag"
column=
"TAX_MONTH_FLAG"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
@@ -156,7 +157,8 @@
...
@@ -156,7 +157,8 @@
a.TAX_MONTH,
a.TAX_MONTH,
a.CONTACT_PROVINCE,
a.CONTACT_PROVINCE,
a.CONTACT_CITY,
a.CONTACT_CITY,
a.CONTACT_TOWN
a.CONTACT_TOWN,
a.TAX_MONTH_FLAG
</sql>
</sql>
<sql
id=
"tPreEmployeeInfo_where"
>
<sql
id=
"tPreEmployeeInfo_where"
>
<if
test=
"tPreEmployeeInfo != null"
>
<if
test=
"tPreEmployeeInfo != null"
>
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryEmpModLog.java
View file @
9f4fbc5f
...
@@ -58,13 +58,13 @@ public class TSalaryEmpModLog extends BaseEntity {
...
@@ -58,13 +58,13 @@ public class TSalaryEmpModLog extends BaseEntity {
@Schema
(
description
=
"content"
)
@Schema
(
description
=
"content"
)
private
String
content
;
private
String
content
;
/**
/**
* 0编辑、1批量更新、2EKP变更银行卡号
* 0编辑、1批量更新、2EKP变更银行卡号
;3预入职更新
*/
*/
@ExcelAttribute
(
name
=
"0编辑、1批量更新、2EKP变更银行卡号"
,
isNotEmpty
=
true
,
errorInfo
=
"0编辑、1批量更新、2EKP变更银行卡号不能为空"
,
maxLength
=
1
)
@ExcelAttribute
(
name
=
"0编辑、1批量更新、2EKP变更银行卡号"
,
isNotEmpty
=
true
,
errorInfo
=
"0编辑、1批量更新、2EKP变更银行卡号不能为空"
,
maxLength
=
1
)
@NotBlank
(
message
=
"0编辑、1批量更新、2EKP变更银行卡号不能为空"
)
@NotBlank
(
message
=
"0编辑、1批量更新、2EKP变更银行卡号不能为空"
)
@Length
(
max
=
1
,
message
=
"0编辑、1批量更新、2EKP变更银行卡号不能超过1个字符"
)
@Length
(
max
=
1
,
message
=
"0编辑、1批量更新、2EKP变更银行卡号不能超过1个字符"
)
@ExcelProperty
(
"0编辑、1批量更新、2EKP变更银行卡号"
)
@ExcelProperty
(
"0编辑、1批量更新、2EKP变更银行卡号"
)
@Schema
(
description
=
"0编辑、1批量更新、2EKP变更银行卡号"
)
@Schema
(
description
=
"0编辑、1批量更新、2EKP变更银行卡号
;3预入职更新
"
)
private
String
type
;
private
String
type
;
/**
/**
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryEmployeeController.java
View file @
9f4fbc5f
...
@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.controller;
...
@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
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.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
...
@@ -223,4 +224,30 @@ public class TSalaryEmployeeController {
...
@@ -223,4 +224,30 @@ public class TSalaryEmployeeController {
res
.
setRosterVos
(
tSalaryEmployeeService
.
getSalaryEmpRoster
(
idCardList
));
res
.
setRosterVos
(
tSalaryEmployeeService
.
getSalaryEmpRoster
(
idCardList
));
return
res
;
return
res
;
}
}
/**
* @param empIdCard 身份证
* @Description: 根据身份证获取计税月份
* @Author: hgw
* @Date: 2022/8/10 17:01
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo>
**/
@Inner
@PostMapping
(
"/inner/getEmpTaxMonth"
)
public
String
getEmpTaxMonth
(
@RequestBody
String
empIdCard
)
{
return
tSalaryEmployeeService
.
getEmpTaxMonth
(
empIdCard
);
}
/**
* @Description: 预入职保存薪资人员
* @Author: hgw
* @Date: 2022/8/10 17:01
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo>
**/
@Inner
@PostMapping
(
"/inner/savePreNewEmpInfo"
)
public
String
savePreNewEmpInfo
(
@RequestBody
TSalaryEmployee
newEmp
)
{
return
tSalaryEmployeeService
.
savePreNewEmpInfo
(
newEmp
);
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
View file @
9f4fbc5f
...
@@ -200,4 +200,14 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
...
@@ -200,4 +200,14 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
List
<
TSalaryTypeThreeExportEkpVo
>
getAccountThreeListByApplyNo
(
String
applyNo
);
List
<
TSalaryTypeThreeExportEkpVo
>
getAccountThreeListByApplyNo
(
String
applyNo
);
List
<
TSalaryTypeFourExportEkpVo
>
getAccountFourListByApplyNo
(
String
applyNo
);
List
<
TSalaryTypeFourExportEkpVo
>
getAccountFourListByApplyNo
(
String
applyNo
);
/**
* @param empIdCard 身份证
* @Description: C端预入职查询薪资当前年度是否有发薪记录,无则返回0,有则返回数量
* @Author: hgw
* @Date: 2024/7/16 17:01
* @return: java.lang.String
**/
int
getAccountIdByIdCard
(
@Param
(
"empIdCard"
)
String
empIdCard
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryEmpModLogService.java
View file @
9f4fbc5f
...
@@ -20,15 +20,11 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
...
@@ -20,15 +20,11 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmpModLog
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmpModLog
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmpModLogSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmpModLogSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -38,14 +34,15 @@ import java.util.List;
...
@@ -38,14 +34,15 @@ import java.util.List;
* @date 2023-10-11 17:48:31
* @date 2023-10-11 17:48:31
*/
*/
public
interface
TSalaryEmpModLogService
extends
IService
<
TSalaryEmpModLog
>
{
public
interface
TSalaryEmpModLogService
extends
IService
<
TSalaryEmpModLog
>
{
/**
/**
* 薪资人员档案变更记录简单分页查询
* 薪资人员档案变更记录简单分页查询
* @param tSalaryEmpModLog 薪资人员档案变更记录
*
* @return
* @param tSalaryEmpModLog 薪资人员档案变更记录
*/
* @return
IPage
<
TSalaryEmpModLog
>
getTSalaryEmpModLogPage
(
Page
<
TSalaryEmpModLog
>
page
,
TSalaryEmpModLogSearchVo
tSalaryEmpModLog
);
*/
IPage
<
TSalaryEmpModLog
>
getTSalaryEmpModLogPage
(
Page
<
TSalaryEmpModLog
>
page
,
TSalaryEmpModLogSearchVo
tSalaryEmpModLog
);
List
<
TSalaryEmpModLog
>
noPageDiy
(
TSalaryEmpModLogSearchVo
searchVo
);
List
<
TSalaryEmpModLog
>
noPageDiy
(
TSalaryEmpModLogSearchVo
searchVo
);
void
initModLog
(
TSalaryEmployee
newEntity
,
TSalaryEmployee
oldEntity
,
String
type
,
String
userName
,
ExcelUtil
<
TSalaryEmployee
>
util
);
void
initModLog
(
TSalaryEmployee
newEntity
,
TSalaryEmployee
oldEntity
,
String
type
,
String
userName
,
ExcelUtil
<
TSalaryEmployee
>
util
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryEmployeeService.java
View file @
9f4fbc5f
...
@@ -126,4 +126,15 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
...
@@ -126,4 +126,15 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
R
<
Boolean
>
updateByIdDiy
(
TSalaryEmployee
tSalaryEmployee
);
R
<
Boolean
>
updateByIdDiy
(
TSalaryEmployee
tSalaryEmployee
);
/**
* @param empIdCard 身份证
* @Description: C端预入职获取计税月份
* @Author: hgw
* @Date: 2024/7/16 16:11
* @return: java.lang.String
**/
String
getEmpTaxMonth
(
String
empIdCard
);
String
savePreNewEmpInfo
(
TSalaryEmployee
newEmp
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryEmpModLogServiceImpl.java
View file @
9f4fbc5f
...
@@ -72,7 +72,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
...
@@ -72,7 +72,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
* @Author fxj
* @Author fxj
* @Description 记录变更日志
* @Description 记录变更日志
* @Date 17:59 2023/10/24
* @Date 17:59 2023/10/24
* @Param type 0 编辑 1 批量更新
3 EKP
更新
* @Param type 0 编辑 1 批量更新
2 EKP更新 3 预入职
更新
* @return
* @return
**/
**/
@Override
@Override
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryEmployeeServiceImpl.java
View file @
9f4fbc5f
...
@@ -47,6 +47,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
...
@@ -47,6 +47,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryEmployeeMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryEmployeeMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TBankSetService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TBankSetService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmpModLogService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmpModLogService
;
...
@@ -88,6 +89,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
...
@@ -88,6 +89,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
@Autowired
@Autowired
private
TSalaryEmpModLogService
logService
;
private
TSalaryEmpModLogService
logService
;
@Autowired
private
TSalaryAccountMapper
salaryAccountMapper
;
/**
/**
* 薪酬人员表简单分页查询
* 薪酬人员表简单分页查询
*
*
...
@@ -1064,4 +1067,62 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
...
@@ -1064,4 +1067,62 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
}
}
return
null
;
return
null
;
}
}
/**
* @param empIdCard 身份证
* @Description: C端预入职获取计税月份
* @Author: hgw
* @Date: 2024/7/16 16:11
* @return: java.lang.String
**/
@Override
public
String
getEmpTaxMonth
(
String
empIdCard
)
{
// 0表示 未找到薪资记录,C端可编辑
String
taxMonth
=
CommonConstants
.
ZERO_STRING
;
TSalaryEmployee
employee
=
baseMapper
.
getByEmpIdCard
(
empIdCard
);
if
(
employee
!=
null
&&
Common
.
isNotNull
(
employee
.
getTaxMonth
()))
{
// 查找本年度薪资,有则返回薪资人员的计税月份,无则返回空,可编辑
int
count
=
salaryAccountMapper
.
getAccountIdByIdCard
(
empIdCard
);
if
(
count
>
0
)
{
taxMonth
=
employee
.
getTaxMonth
();
}
}
return
taxMonth
;
}
/**
* @Description: C端预入职获取计税月份
* @Author: hgw
* @Date: 2024/7/16 16:11
* @return: java.lang.String
**/
@Override
public
String
savePreNewEmpInfo
(
TSalaryEmployee
newEmp
)
{
// 0表示 未找到薪资记录,C端可编辑
boolean
canSaveFlag
=
true
;
TSalaryEmployee
employee
=
baseMapper
.
getByEmpIdCard
(
newEmp
.
getEmpIdcard
());
if
(
employee
!=
null
)
{
// 查找本年度薪资,有则返回薪资人员的计税月份,无则返回空,可编辑
int
count
=
salaryAccountMapper
.
getAccountIdByIdCard
(
newEmp
.
getEmpIdcard
());
if
(
count
>
0
)
{
canSaveFlag
=
false
;
}
}
if
(
canSaveFlag
)
{
if
(
employee
!=
null
)
{
// 变更日志 hgw 2024-7-16 18:19:57
logService
.
initModLog
(
employee
,
newEmp
,
CommonConstants
.
THREE_STRING
,
newEmp
.
getCreateName
(),
null
);
String
[]
ignoreProperties
=
new
String
[]{
"id"
,
"createBy"
,
"createName"
,
"createTime"
};
BeanUtil
.
copyProperties
(
newEmp
,
employee
,
ignoreProperties
);
this
.
updateById
(
employee
);
}
else
{
this
.
save
(
newEmp
);
}
}
return
CommonConstants
.
SAVE_SUCCESS
;
}
}
}
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
9f4fbc5f
...
@@ -1485,4 +1485,10 @@
...
@@ -1485,4 +1485,10 @@
where s.APPLY_NO = #{applyNo} and a.DELETE_FLAG = 0
where s.APPLY_NO = #{applyNo} and a.DELETE_FLAG = 0
GROUP BY a.id ORDER BY a.ROW_INDEX ASC
GROUP BY a.id ORDER BY a.ROW_INDEX ASC
</select>
</select>
<!-- C端预入职查询薪资当前年度是否有发薪记录,无则返回空,有则返回Id -->
<select
id=
"getAccountIdByIdCard"
resultType=
"java.lang.Integer"
>
select count(1) from t_salary_account a where a.EMP_IDCARD = #{empIdCard} and a.SETTLEMENT_MONTH like concat(DATE_FORMAT(NOW(), '%Y'), '%')
</select>
</mapper>
</mapper>
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