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
b23508c5
Commit
b23508c5
authored
Aug 08, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
2b54ba92
cdf9d75e
Show whitespace changes
Inline
Side-by-side
Showing
71 changed files
with
3522 additions
and
2806 deletions
+3522
-2806
TEmployeeProject.java
.../cloud/plus/v1/yifu/archives/entity/TEmployeeProject.java
+4
-3
UpProjectSocialFundVo.java
...cloud/plus/v1/yifu/archives/vo/UpProjectSocialFundVo.java
+23
-0
TEmployeeProjectController.java
.../yifu/archives/controller/TEmployeeProjectController.java
+14
-0
TEmployeeContractInfoService.java
...1/yifu/archives/service/TEmployeeContractInfoService.java
+2
-0
TEmployeeProjectService.java
...lus/v1/yifu/archives/service/TEmployeeProjectService.java
+3
-0
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+4
-1
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+5
-2
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+52
-0
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+6
-0
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+23
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+19
-5
TInsuranceDetail.java
...loud/plus/v1/yifu/insurances/entity/TInsuranceDetail.java
+2
-0
InsuranceExportListParam.java
.../plus/v1/yifu/insurances/vo/InsuranceExportListParam.java
+6
-0
InsuranceListParam.java
.../cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
+12
-0
InsuranceRefundHandlingParam.java
...s/v1/yifu/insurances/vo/InsuranceRefundHandlingParam.java
+12
-0
RefundExportListParam.java
...oud/plus/v1/yifu/insurances/vo/RefundExportListParam.java
+6
-0
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+14
-12
TInsuranceDetailMapper.java
...lus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
+0
-9
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+244
-66
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+20
-65
SalaryConstants.java
.../cloud/plus/v1/yifu/salary/constants/SalaryConstants.java
+271
-0
TConfigSalary.java
.../yifu/cloud/plus/v1/yifu/salary/entity/TConfigSalary.java
+105
-104
TMinSalary.java
...com/yifu/cloud/plus/v1/yifu/salary/entity/TMinSalary.java
+76
-79
TOwnDept.java
...a/com/yifu/cloud/plus/v1/yifu/salary/entity/TOwnDept.java
+22
-33
TSalaryConfigStandard.java
...oud/plus/v1/yifu/salary/entity/TSalaryConfigStandard.java
+85
-81
TSalaryTaxConfig.java
...fu/cloud/plus/v1/yifu/salary/entity/TSalaryTaxConfig.java
+72
-83
TSpecialDeducationSum.java
...oud/plus/v1/yifu/salary/entity/TSpecialDeducationSum.java
+226
-223
package-info.java
...java/com/yifu/cloud/plus/v1/yifu/salary/package-info.java
+0
-1
TConfigSalaryController.java
...us/v1/yifu/salary/controller/TConfigSalaryController.java
+56
-65
TMinSalaryController.java
.../plus/v1/yifu/salary/controller/TMinSalaryController.java
+45
-67
TOwnDeptController.java
...ud/plus/v1/yifu/salary/controller/TOwnDeptController.java
+100
-0
TSalaryConfigStandardController.java
...fu/salary/controller/TSalaryConfigStandardController.java
+126
-61
TSalaryTaxConfigController.java
...v1/yifu/salary/controller/TSalaryTaxConfigController.java
+76
-59
TSpecialDeducationSumController.java
...fu/salary/controller/TSpecialDeducationSumController.java
+95
-90
package-info.java
...fu/cloud/plus/v1/yifu/salary/controller/package-info.java
+0
-1
TConfigSalaryMapper.java
...cloud/plus/v1/yifu/salary/mapper/TConfigSalaryMapper.java
+18
-28
TMinSalaryMapper.java
...fu/cloud/plus/v1/yifu/salary/mapper/TMinSalaryMapper.java
+14
-28
TOwnDeptMapper.java
...yifu/cloud/plus/v1/yifu/salary/mapper/TOwnDeptMapper.java
+20
-27
TSalaryConfigStandardMapper.java
...us/v1/yifu/salary/mapper/TSalaryConfigStandardMapper.java
+20
-28
TSalaryTaxConfigMapper.java
...ud/plus/v1/yifu/salary/mapper/TSalaryTaxConfigMapper.java
+34
-28
TSpecialDeducationSumMapper.java
...us/v1/yifu/salary/mapper/TSpecialDeducationSumMapper.java
+47
-29
TConfigSalaryService.java
...oud/plus/v1/yifu/salary/service/TConfigSalaryService.java
+14
-32
TMinSalaryService.java
.../cloud/plus/v1/yifu/salary/service/TMinSalaryService.java
+14
-32
TOwnDeptService.java
...fu/cloud/plus/v1/yifu/salary/service/TOwnDeptService.java
+36
-22
TSalaryConfigStandardService.java
.../v1/yifu/salary/service/TSalaryConfigStandardService.java
+17
-30
TSalaryTaxConfigService.java
.../plus/v1/yifu/salary/service/TSalaryTaxConfigService.java
+34
-29
TSpecialDeducationSumService.java
.../v1/yifu/salary/service/TSpecialDeducationSumService.java
+63
-35
TConfigSalaryServiceImpl.java
...v1/yifu/salary/service/impl/TConfigSalaryServiceImpl.java
+38
-64
TMinSalaryServiceImpl.java
...us/v1/yifu/salary/service/impl/TMinSalaryServiceImpl.java
+16
-68
TOwnDeptServiceImpl.java
...plus/v1/yifu/salary/service/impl/TOwnDeptServiceImpl.java
+59
-24
TSalaryConfigStandardServiceImpl.java
...salary/service/impl/TSalaryConfigStandardServiceImpl.java
+21
-65
TSalaryTaxConfigServiceImpl.java
...yifu/salary/service/impl/TSalaryTaxConfigServiceImpl.java
+45
-35
TSpecialDeducationSumServiceImpl.java
...salary/service/impl/TSpecialDeducationSumServiceImpl.java
+128
-229
package-info.java
.../yifu/cloud/plus/v1/yifu/salary/service/package-info.java
+0
-1
TConfigSalaryMapper.xml
...ary-biz/src/main/resources/mapper/TConfigSalaryMapper.xml
+85
-92
TMinSalaryMapper.xml
...salary-biz/src/main/resources/mapper/TMinSalaryMapper.xml
+63
-87
TOwnDeptMapper.xml
...u-salary-biz/src/main/resources/mapper/TOwnDeptMapper.xml
+36
-50
TSalaryConfigStandardMapper.xml
...src/main/resources/mapper/TSalaryConfigStandardMapper.xml
+65
-76
TSalaryTaxConfigMapper.xml
...-biz/src/main/resources/mapper/TSalaryTaxConfigMapper.xml
+135
-75
TSpecialDeducationSumMapper.xml
...src/main/resources/mapper/TSpecialDeducationSumMapper.xml
+228
-188
TPaymentInfoVo.java
...com/yifu/cloud/plus/v1/yifu/social/vo/TPaymentInfoVo.java
+1
-11
YFSocialImportThreadPoolExecutor.java
...ncurrent/threadpool/YFSocialImportThreadPoolExecutor.java
+0
-0
YFThreadFactory.java
...v1/yifu/social/concurrent/threadpool/YFThreadFactory.java
+0
-0
YFThreadPoolConfig.java
...yifu/social/concurrent/threadpool/YFThreadPoolConfig.java
+0
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+208
-78
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+228
-198
TPreDispatchInfoServiceImpl.java
...yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
+1
-1
ServiceUtil.java
.../com/yifu/cloud/plus/v1/yifu/social/util/ServiceUtil.java
+2
-2
spring.factories
...u-social-biz/src/main/resources/META-INF/spring.factories
+2
-0
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+3
-3
ServiceImpl.java.vm
...u-codegen/src/main/resources/template/ServiceImpl.java.vm
+1
-1
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeProject.java
View file @
b23508c5
...
...
@@ -285,15 +285,16 @@ public class TEmployeeProject extends BaseEntity {
private
Integer
insuranceStatus
;
/**
* 社保状态(字典)
* 社保状态(字典)
: 0 无社保 1 处理中 2.部分购买 3.正常 4.已派减
*/
@Schema
(
description
=
"社保状态(字典)"
)
@Schema
(
description
=
"社保状态(字典): 0 无社保 1 处理中 2.部分购买 3.正常 4.已派减"
)
private
Integer
socialStatus
;
/**
* 公积金状态(字典)
*/
@Schema
(
description
=
"公积金状态(字典)"
)
@Schema
(
description
=
"公积金状态(字典)
: 0 无公积金 1 处理中 2.部分购买 3.正常 4.已派减
"
)
private
Integer
fundStatus
;
/**
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/UpProjectSocialFundVo.java
0 → 100644
View file @
b23508c5
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Author fxj
* @Date 2022/8/5
* @Description
* @Version 1.0
*/
@Data
public
class
UpProjectSocialFundVo
implements
Serializable
{
// 社保状态
String
socialStatus
;
// 公积金状态
String
fundStatus
;
// 项目编码
String
departNo
;
// 身份证
String
empIdCard
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeProjectController.java
View file @
b23508c5
...
...
@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpDispatchAddVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.UpdateEmpVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
...
...
@@ -291,4 +293,16 @@ public class TEmployeeProjectController {
public
TEmployeeProject
getByEmpIdAndDeptId
(
@RequestBody
TEmployeeProject
employeeProject
)
{
return
tEmployeeProjectService
.
getByEmpIdAndDeptId
(
employeeProject
.
getEmpId
(),
employeeProject
.
getDeptId
());
}
/**
* @Description: 更新社保公积金状态
* @Author: fxj
* @Date: 2022/08/01 18:52
**/
@Operation
(
summary
=
"更新社保公积金状态"
,
description
=
"更新社保公积金状态"
)
@Inner
@PostMapping
(
"/inner/updateProjectSocialFund"
)
public
Boolean
updateProjectSocialFund
(
@RequestBody
UpProjectSocialFundVo
vo
)
{
return
tEmployeeProjectService
.
updateProjectSocialFund
(
vo
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeContractInfoService.java
View file @
b23508c5
...
...
@@ -97,6 +97,8 @@ public interface TEmployeeContractInfoService extends IService<TEmployeeContract
String
getCode
(
boolean
isNew
);
boolean
updateInUseStatusById
(
String
empId
,
String
deptId
,
String
ContractId
);
/**
* @param tEmployeeContractInfo
* @Description: 审核
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeProjectService.java
View file @
b23508c5
...
...
@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeXProjectVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo
;
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.validation.BindingResult
;
...
...
@@ -190,4 +191,6 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
//获取员工编码
String
getEmpNo
(
String
deptNo
);
Boolean
updateProjectSocialFund
(
UpProjectSocialFundVo
vo
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
b23508c5
...
...
@@ -405,7 +405,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
employeeInfo
.
setContractStatus
(
CommonConstants
.
ONE_INT
);
}
}
@Override
public
boolean
updateInUseStatusById
(
String
empId
,
String
deptId
,
String
ContractId
){
return
baseMapper
.
updateInUseStatusById
(
empId
,
deptId
,
ContractId
,
CommonConstants
.
ONE_STRING
)
>
0
;
}
@Override
public
R
<
String
>
auditContract
(
TEmployeeContractInfo
tEmployeeContractInfo
)
{
if
(
tEmployeeContractInfo
!=
null
)
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
b23508c5
...
...
@@ -2094,9 +2094,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
@Override
public
Boolean
updateEmpInfo
(
UpdateEmpVo
vo
)
{
if
(
Common
.
isNotNull
(
vo
)){
TEmployeeInfo
employeeInfo
;
TEmployeeProject
p
=
null
;
if
(
Common
.
isNotNull
(
vo
.
getEmpIdCard
())){
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
vo
.
getType
())){
TEmployeeInfo
employeeInfo
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
employeeInfo
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
vo
.
getEmpIdCard
())
.
eq
(
TEmployeeInfo:
:
getStatus
,
CommonConstants
.
ZERO_INT
)
...
...
@@ -2107,7 +2109,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
if
(
Common
.
isNotNull
(
vo
.
getProjectNo
())){
TEmployeeProject
p
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
p
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
vo
.
getEmpIdCard
())
.
eq
(
TEmployeeProject:
:
getDeptNo
,
vo
.
getProjectNo
())
...
...
@@ -2134,6 +2136,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
c
.
setAuditStatus
(
CommonConstants
.
THREE_INT
);
c
.
setInUse
(
CommonConstants
.
ONE_STRING
);
}
contractServicer
.
updateInUseStatusById
(
c
.
getEmpId
(),
c
.
getDeptNo
(),
c
.
getSettleDomain
());
contractServicer
.
updateById
(
c
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
b23508c5
...
...
@@ -1407,4 +1407,56 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
return
false
;
}
/**
* @Description: 更新社保公积金状态 : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
* 派增:
* 1、派单处社保或公积金状态为待审核、待办理、办理中,项目档案处社保或公积金状态为处理中1;
* 2、派单处社保或公积金状态为审核不通过或办理失败,项目档案处社保状态为无社保,公积金状态为无公积金0;
* 3、派单处社保状态为部分办理失败,项目档案处社保状态为部分购买 2
* 4、派单处社保或公积金状态为办理成功,项目档案处社保或公积金状态为正常 3
* 派减:
* 1、派减状态为待审核、待办理、审核不通过、办理失败,项目档案处社保或公积金状态不变;
* 2、派减状态为办理成功,项目档案处社保或公积金状态变为已派减 4
* 人员档案处社保或公积金状态根据身份证+项目进行整合:
* 社保状态优先级:正常>部分购买>处理中>已派减>无社保
* 公积金状态优先级:正常>处理中>已派减>无公积金
* @Author: fxj
* @Date: 2022/08/01 18:52
**/
@Override
public
Boolean
updateProjectSocialFund
(
UpProjectSocialFundVo
vo
)
{
if
(
Common
.
isEmpty
(
vo
)
||
Common
.
isEmpty
(
vo
.
getEmpIdCard
())
||
Common
.
isEmpty
(
vo
.
getDepartNo
())){
return
false
;
}
TEmployeeInfo
employee
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
vo
.
getEmpIdCard
())
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
).
last
(
CommonConstants
.
LAST_ONE_SQL
));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if
(
Common
.
isNotNull
(
employee
)){
if
(
Common
.
isNotNull
(
vo
.
getSocialStatus
())){
employee
.
setSocialStatus
(
Integer
.
parseInt
(
vo
.
getSocialStatus
()));
}
if
(
Common
.
isNotNull
(
vo
.
getFundStatus
())){
employee
.
setFundStatus
(
Integer
.
parseInt
(
vo
.
getFundStatus
()));
}
tEmployeeInfoMapper
.
updateById
(
employee
);
}
TEmployeeProject
project
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getDeptNo
,
vo
.
getDepartNo
())
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
vo
.
getEmpIdCard
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if
(
Common
.
isNotNull
(
project
)){
if
(
Common
.
isNotNull
(
vo
.
getSocialStatus
())){
project
.
setSocialStatus
(
Integer
.
parseInt
(
vo
.
getSocialStatus
()));
}
if
(
Common
.
isNotNull
(
vo
.
getFundStatus
())){
project
.
setFundStatus
(
Integer
.
parseInt
(
vo
.
getFundStatus
()));
}
baseMapper
.
updateById
(
project
);
}
return
true
;
}
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
b23508c5
...
...
@@ -130,6 +130,12 @@ public interface CommonConstants {
String
THIRTEEN_STRING
=
"13"
;
String
FOURTEEN_STRING
=
"14"
;
String
FIFTEEN_STRING
=
"15"
;
String
SIXTEEN_STRING
=
"16"
;
/**
* number 0
*/
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
b23508c5
...
...
@@ -205,4 +205,27 @@ public class ArchivesDaprUtil {
}
return
res
;
}
/**
* @Author fxj
* @Description 更新项目档案和人员档案的社保公积金状态
* @Date 19:30 2022/8/1
* @Param type 0 审核通过 1 审核不通过
* @return
**/
public
R
<
Boolean
>
updateProjectSocialFund
(
UpProjectSocialFundVo
vo
){
if
(
Common
.
isEmpty
(
vo
.
getEmpIdCard
())
||
(
Common
.
isEmpty
(
vo
.
getSocialStatus
())
&&
Common
.
isEmpty
(
vo
.
getFundStatus
()))
||
Common
.
isEmpty
(
vo
.
getDepartNo
())){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
R
<
Boolean
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
()
,
"/temployeeproject/inner/updateProjectSocialFund"
,
JSON
.
toJSONString
(
vo
),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"更新人员档案、项目档案社保公积金状态信息失败!"
);
}
return
res
;
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
b23508c5
...
...
@@ -11,6 +11,10 @@ public class InsurancesConstants {
* 新增
*/
public
static
final
String
ADD
=
"新增"
;
/**
* 离职
*/
public
static
final
String
QUIT
=
"离职"
;
/**
* 批增
*/
...
...
@@ -69,13 +73,13 @@ public class InsurancesConstants {
*/
public
static
final
String
EDIT_NOT_ALLOW
=
"不允许编辑"
;
/**
* 投保
信息
已存在
* 投保
记录
已存在
*/
public
static
final
String
DATA_IS_EXIST
=
"投保
信息
已存在"
;
public
static
final
String
DATA_IS_EXIST
=
"投保
记录
已存在"
;
/**
* 投保
信息
不存在
* 投保
记录
不存在
*/
public
static
final
String
DATA_IS_NOT_EXIST
=
"投保
信息
不存在"
;
public
static
final
String
DATA_IS_NOT_EXIST
=
"投保
记录
不存在"
;
/**
* 结算信息不存在
*/
...
...
@@ -560,7 +564,12 @@ public class InsurancesConstants {
/**
* 替换项目不存在
*/
public
static
final
String
DEPT_NO_CHANGE_IS_NOT_EXIST
=
"替换项目不存在"
;
public
static
final
String
DEPT_NO_CHANGE_NEW_IS_NOT_EXIST
=
"替换项目不存在"
;
/**
* 被替换的项目不存在
*/
public
static
final
String
DEPT_NO_CHANGE_OLD_IS_NOT_EXIST
=
"被替换的项目不存在"
;
/**
...
...
@@ -771,5 +780,10 @@ public class InsurancesConstants {
*/
public
static
final
String
NOT_CREATE_USER_DELETE_ERROR
=
"非创建人无法删除保单信息"
;
/**
* 无更新当前保单信息的权限
*/
public
static
final
String
NO_UPDATE_DETAIL_JURISDICTION
=
"无更新当前保单信息的权限"
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceDetail.java
View file @
b23508c5
...
...
@@ -121,6 +121,7 @@ public class TInsuranceDetail extends BaseEntity {
* 保单生效日期
*/
@Schema
(
description
=
"保单生效日期"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
LocalDate
policyEffect
;
/**
...
...
@@ -255,6 +256,7 @@ public class TInsuranceDetail extends BaseEntity {
* 是否过期 0未过期 1已过期
*/
@Schema
(
description
=
"是否过期 0未过期 1已过期"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Integer
isOverdue
;
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceExportListParam.java
View file @
b23508c5
...
...
@@ -45,4 +45,10 @@ public class InsuranceExportListParam implements Serializable {
*/
@Schema
(
description
=
"商险id集合"
)
private
List
<
String
>
idList
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
View file @
b23508c5
...
...
@@ -63,4 +63,16 @@ public class InsuranceListParam implements Serializable {
*/
@Schema
(
description
=
"项目编码列表"
)
private
List
<
String
>
deptNoList
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
/**
* 保单办理人
*/
@Schema
(
description
=
"保单办理人"
)
private
String
updateBy
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundHandlingParam.java
View file @
b23508c5
...
...
@@ -77,5 +77,17 @@ public class InsuranceRefundHandlingParam implements Serializable {
@Schema
(
description
=
"是否过期 0未过期 1已过期"
)
private
Integer
isOverdue
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
/**
* 办理人
*/
@Schema
(
description
=
"办理人"
)
private
String
updateBy
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/RefundExportListParam.java
View file @
b23508c5
...
...
@@ -52,4 +52,10 @@ public class RefundExportListParam implements Serializable {
@Schema
(
description
=
"商险id集合"
)
private
List
<
String
>
idList
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
b23508c5
...
...
@@ -76,6 +76,19 @@ public class TInsuranceDetailController {
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceHandleListPage
(
page
,
param
));
}
/**
* 投保办理不分页查询
*
* @author licancan
* @param param
* @return {@link R<List<InsuranceListVO>>}
*/
@Operation
(
summary
=
"投保办理不分页查询"
,
description
=
"投保办理不分页查询"
)
@PostMapping
(
"/getInsuranceHandleList"
)
public
R
<
List
<
InsuranceListVO
>>
getInsuranceHandleList
(
@RequestBody
InsuranceListParam
param
)
{
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceHandleList
(
param
));
}
/**
* 投保分页查询
*
...
...
@@ -103,18 +116,7 @@ public class TInsuranceDetailController {
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceList
(
param
));
}
/**
* 投保办理不分页查询
*
* @author licancan
* @param param
* @return {@link R<List<InsuranceListVO>>}
*/
@Operation
(
summary
=
"投保办理不分页查询"
,
description
=
"投保办理不分页查询"
)
@PostMapping
(
"/getInsuranceHandleList"
)
public
R
<
List
<
InsuranceListVO
>>
getInsuranceHandleList
(
@RequestBody
InsuranceListParam
param
)
{
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceHandleList
(
param
));
}
/**
* 商险新增
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
View file @
b23508c5
...
...
@@ -134,15 +134,6 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
IPage
<
RefundExportListVo
>
getInsuranceRefundHandlingPageList
(
Page
<
InsuranceRefundHandlingParam
>
page
,
@Param
(
"param"
)
InsuranceRefundHandlingParam
param
);
/**
* 减员办理列表不分页查询
*
* @author zhaji
* @param param 查询参数
* @return {@link List< RefundExportListVo >}
*/
List
<
RefundExportListVo
>
getInsuranceRefundHandlingList
(
@Param
(
"param"
)
InsuranceRefundHandlingParam
param
);
/**
* 减员办理
*
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
b23508c5
...
...
@@ -228,6 +228,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
IPage
<
InsuranceListVO
>
getInsuranceHandleListPage
(
Page
<
InsuranceListVO
>
page
,
InsuranceListParam
param
)
{
//todo 根据登录人获取数据权限
IPage
<
InsuranceListVO
>
iPage
=
new
Page
<>();
YifuUser
user
=
SecurityUtils
.
getUser
();
String
regionSQL
=
getRegionSQL
(
user
);
if
(
StringUtils
.
isBlank
(
regionSQL
)){
return
iPage
;
}
param
.
setRegionSql
(
regionSQL
);
Integer
buyHandleStatus
=
param
.
getBuyHandleStatus
();
if
(
buyHandleStatus
==
CommonConstants
.
TWO_INT
||
buyHandleStatus
==
CommonConstants
.
THREE_INT
){
param
.
setUpdateBy
(
user
.
getId
());
}
IPage
<
InsuranceListVO
>
insuranceList
=
baseMapper
.
getInsuranceHandleListPage
(
page
,
param
);
//根据项目编码获取项目名称
setProjectNameByDeptNo
(
insuranceList
.
getRecords
());
...
...
@@ -249,6 +260,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
@Override
public
List
<
InsuranceListVO
>
getInsuranceHandleList
(
InsuranceListParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
String
regionSQL
=
getRegionSQL
(
user
);
param
.
setRegionSql
(
regionSQL
);
//todo 根据登录人获取数据权限
List
<
InsuranceListVO
>
insuranceList
=
baseMapper
.
getInsuranceHandleList
(
param
);
//根据项目编码获取项目名称
...
...
@@ -391,6 +405,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
BeanCopyUtils
.
copyProperties
(
detail
,
newDetail
);
...
...
@@ -411,6 +426,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
newDetail
.
setIsUse
(
null
);
newDetail
.
setIsEffect
(
null
);
newDetail
.
setReduceHandleStatus
(
null
);
newDetail
.
setSignFlag
(
CommonConstants
.
ZERO_INT
);
//创建时间是新数据插入时间
newDetail
.
setCreateTime
(
LocalDateTime
.
now
());
newDetail
.
setCreateBy
(
user
.
getId
());
...
...
@@ -428,6 +444,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
replace
.
setToInsuranceDetailId
(
newDetail
.
getId
());
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
detail
.
getId
())
.
orderByDesc
(
TInsuranceReplace:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
...
...
@@ -539,6 +556,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceCompany
insuranceCompany
=
tInsuranceCompanyService
.
getOne
(
Wrappers
.<
TInsuranceCompany
>
query
().
lambda
()
.
eq
(
TInsuranceCompany:
:
getCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceCompany:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
insuranceCompany
).
isPresent
()){
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EXIST
);
...
...
@@ -550,6 +569,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceType:
:
getInsuranceCompanyId
,
insuranceCompany
.
getId
())
.
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceType:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
insuranceType
).
isPresent
()){
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EXIST
);
...
...
@@ -559,6 +580,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceTypeStandard:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceTypeStandard:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
typeStandard
).
isPresent
()){
return
R
.
failed
(
InsurancesConstants
.
BUY_STANDARD_NOT_EXIST
);
...
...
@@ -578,6 +601,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceTypeRate:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeRate:
:
getMonth
,
month
)
.
eq
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceTypeRate:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
typeRate
).
isPresent
()){
...
...
@@ -613,6 +637,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()
&&
!
insuranceDetail
.
getId
().
equals
(
param
.
getId
())){
...
...
@@ -644,6 +669,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
...
...
@@ -655,6 +681,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
byId
.
setBuyHandleStatus
(
CommonConstants
.
ONE_INT
);
byId
.
setPolicyStart
(
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()));
byId
.
setPolicyEnd
(
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()));
//如果不是补单的,需要更新创建时间
if
(
byId
.
getSignFlag
()
==
CommonConstants
.
ZERO_INT
){
byId
.
setCreateTime
(
LocalDateTime
.
now
());
}
byId
.
setUpdateBy
(
user
.
getId
());
byId
.
setUpdateTime
(
LocalDateTime
.
now
());
this
.
updateById
(
byId
);
...
...
@@ -679,6 +709,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
byId
.
getId
())
.
orderByDesc
(
TInsuranceReplace:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
TInsuranceDetail
insuranceDetail
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
...
...
@@ -691,6 +722,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//被替换者无效
insuranceDetail
.
setIsEffect
(
CommonConstants
.
ONE_INT
);
insuranceDetail
.
setUpdateTime
(
LocalDateTime
.
now
());
this
.
updateById
(
insuranceDetail
);
//替换记录成功
one
.
setReplaceStatus
(
CommonConstants
.
ONE_INT
);
...
...
@@ -702,6 +734,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
byId
.
setEmpName
(
param
.
getEmpName
());
byId
.
setEmpIdcardNo
(
param
.
getEmpIdcardNo
());
byId
.
setPost
(
param
.
getPost
());
if
(
byId
.
getSignFlag
()
==
CommonConstants
.
ZERO_INT
){
byId
.
setCreateTime
(
LocalDateTime
.
now
());
}
byId
.
setUpdateBy
(
user
.
getId
());
byId
.
setUpdateTime
(
LocalDateTime
.
now
());
this
.
updateById
(
byId
);
...
...
@@ -748,9 +783,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
List
<
InsuranceExportListVO
>
getInsuranceExportList
(
InsuranceExportListParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
InsuranceExportListVO
>
insuranceExportList
;
List
<
InsuranceExportListVO
>
insuranceExportList
=
new
ArrayList
<>()
;
//todo 根据登录人获取数据权限
String
regionSQL
=
getRegionSQL
(
user
);
param
.
setRegionSql
(
regionSQL
);
if
(
StringUtils
.
isBlank
(
regionSQL
)){
return
insuranceExportList
;
}
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待投保」的结果集
if
(
CollectionUtils
.
isNotEmpty
(
param
.
getIdList
())){
insuranceExportList
=
baseMapper
.
getInsuranceExportListBySelect
(
param
.
getIdList
());
...
...
@@ -792,6 +831,49 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
EXPORT
);
//针对是替换类型的做处理,每一条替换数据对应一条被替换数据
List
<
InsuranceExportListVO
>
listVOS
=
insuranceExportList
.
stream
().
filter
(
e
->
e
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
).
collect
(
Collectors
.
toList
());
List
<
InsuranceExportListVO
>
list
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listVOS
)){
for
(
InsuranceExportListVO
listVO
:
listVOS
)
{
listVO
.
setRemark
(
InsurancesConstants
.
ADD
);
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
listVO
.
getId
())
.
orderByDesc
(
TInsuranceReplace:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
TInsuranceDetail
byId
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
if
(
Optional
.
ofNullable
(
byId
).
isPresent
()){
InsuranceExportListVO
vo
=
new
InsuranceExportListVO
();
BeanCopyUtils
.
copyProperties
(
byId
,
vo
);
//购买月数
vo
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
vo
.
getPolicyStart
().
toString
(),
vo
.
getPolicyEnd
().
toString
()));
//购买天数
vo
.
setBuyDay
(
LocalDateUtil
.
betweenDay
(
vo
.
getPolicyStart
().
toString
(),
vo
.
getPolicyEnd
().
toString
()));
vo
.
setRemark
(
InsurancesConstants
.
QUIT
);
vo
.
setBuyType
(
CommonConstants
.
FOUR_INT
);
list
.
add
(
vo
);
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
//根据项目编码获取项目名称
List
<
String
>
collectList
=
list
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodesList
=
archivesDaprUtil
.
getSetInfoByCodes
(
collectList
);
if
(
null
!=
setInfoByCodesList
&&
setInfoByCodesList
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodesList
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodesList
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuranceExportListVO
record
:
list
)
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
}
}
}
insuranceExportList
.
addAll
(
list
);
}
}
}
return
insuranceExportList
;
}
...
...
@@ -840,6 +922,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
detail
.
getId
())
.
orderByDesc
(
TInsuranceReplace:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
//替换记录变为失败
...
...
@@ -856,6 +939,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 记录状态置为「退回」
detail
.
setBuyHandleStatus
(
CommonConstants
.
FOUR_INT
);
//投保成功后再次投保退回,需要将保单生效日期、是否有效、是否过期置为空
if
(
detail
.
getSignFlag
()
==
CommonConstants
.
ONE_INT
){
detail
.
setPolicyEffect
(
null
);
detail
.
setIsEffect
(
null
);
detail
.
setIsOverdue
(
null
);
}
detail
.
setUpdateBy
(
user
.
getId
());
detail
.
setUpdateTime
(
LocalDateTime
.
now
());
successList
.
add
(
detail
);
...
...
@@ -1059,7 +1148,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
Map
<
String
,
List
<
InsuranceRegisterParam
>>
map
=
registeredPolicyPremiumCheck
(
paramList
);
Map
<
String
,
List
<
InsuranceRegisterParam
>>
map
=
registeredPolicyPremiumCheck
(
paramList
,
user
);
//返回给前端的结果
List
<
InsuranceRegisterParam
>
listResult
=
map
.
get
(
"listResult"
);
//保存到数据库中的结果
...
...
@@ -1077,6 +1166,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
StringUtils
.
isNotBlank
(
success
.
getInvoiceNo
())){
...
...
@@ -1270,12 +1360,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
//校验当前项目是否在权限范围内
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种、起止时间(有交叉)
for
(
int
j
=
0
;
j
<
distinctList
.
size
();
j
++)
{
InsuranceAddParam
repeat
=
distinctList
.
get
(
j
);
...
...
@@ -1332,7 +1417,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
//校验当前项目是否在权限范围内
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
//省市区域校验是否正确并设置对应id
String
redisProvinceName
=
getRedisAreaValue
(
param
.
getInsuranceProvinceName
());
if
(
Common
.
isEmpty
(
redisProvinceName
)){
...
...
@@ -1371,6 +1461,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceCompany
insuranceCompany
=
tInsuranceCompanyService
.
getOne
(
Wrappers
.<
TInsuranceCompany
>
query
().
lambda
()
.
eq
(
TInsuranceCompany:
:
getCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceCompany:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
insuranceCompany
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EXIST
);
...
...
@@ -1384,6 +1476,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceType:
:
getInsuranceCompanyId
,
insuranceCompany
.
getId
())
.
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceType:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
insuranceType
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EXIST
);
...
...
@@ -1395,6 +1489,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceTypeStandard:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceTypeStandard:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
typeStandard
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EXIST
);
...
...
@@ -1416,6 +1512,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceTypeRate:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeRate:
:
getMonth
,
month
)
.
eq
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceTypeRate:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
typeRate
).
isPresent
()){
...
...
@@ -1465,6 +1562,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()){
...
...
@@ -1499,6 +1597,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
...
...
@@ -1621,12 +1720,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
//校验当前项目是否在权限范围内
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种
for
(
int
j
=
0
;
j
<
distinctList
.
size
();
j
++)
{
InsuranceBatchParam
repeat
=
distinctList
.
get
(
j
);
...
...
@@ -1682,7 +1775,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
//校验当前项目是否在权限范围内
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
//省市区域校验是否正确并设置对应id
String
redisProvinceName
=
getRedisAreaValue
(
param
.
getInsuranceProvinceName
());
if
(
Common
.
isEmpty
(
redisProvinceName
)){
...
...
@@ -1732,6 +1830,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
limitOne
).
isPresent
()){
...
...
@@ -1747,6 +1846,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceCompany
insuranceCompany
=
tInsuranceCompanyService
.
getOne
(
Wrappers
.<
TInsuranceCompany
>
query
().
lambda
()
.
eq
(
TInsuranceCompany:
:
getCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceCompany:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
insuranceCompany
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EXIST
);
...
...
@@ -1760,6 +1861,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceType:
:
getInsuranceCompanyId
,
insuranceCompany
.
getId
())
.
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceType:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
insuranceType
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EXIST
);
...
...
@@ -1771,6 +1874,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceTypeStandard:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceTypeStandard:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
typeStandard
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EXIST
);
...
...
@@ -1792,6 +1897,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceTypeRate:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeRate:
:
getMonth
,
month
)
.
eq
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceTypeRate:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
typeRate
).
isPresent
()){
...
...
@@ -1852,6 +1958,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()){
...
...
@@ -1974,18 +2081,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
//校验当前项目是否在权限范围内
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
OLD_DEPT_NO_NOT_IN_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
//校验当前项目是否在权限范围内
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getReplaceDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
NEW_DEPT_NO_NOT_IN_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种、起止时间(有交叉)
for
(
int
j
=
0
;
j
<
distinctList
.
size
();
j
++)
{
InsuranceReplaceParam
repeat
=
distinctList
.
get
(
j
);
...
...
@@ -2020,7 +2115,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
//根据项目编码查询项目是否存在
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
param
.
getReplaceDeptNo
()));
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
...
...
@@ -2048,7 +2142,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
//校验当前项目是否在权限范围内
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
OLD_DEPT_NO_NOT_IN_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
//校验当前项目是否在权限范围内
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getReplaceDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
NEW_DEPT_NO_NOT_IN_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
//原数据查重校验:姓名 + 身份证号 + 项目编码 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
...
...
@@ -2059,6 +2164,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
detail
).
isPresent
()){
...
...
@@ -2144,6 +2250,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
replace
).
isPresent
()){
...
...
@@ -2177,6 +2284,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
...
...
@@ -2200,10 +2308,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param paramList
* @return {@link Map<String, List<InsuranceRegisterParam>>}
*/
private
Map
<
String
,
List
<
InsuranceRegisterParam
>>
registeredPolicyPremiumCheck
(
List
<
InsuranceRegisterParam
>
paramList
){
private
Map
<
String
,
List
<
InsuranceRegisterParam
>>
registeredPolicyPremiumCheck
(
List
<
InsuranceRegisterParam
>
paramList
,
YifuUser
user
){
Map
<
String
,
List
<
InsuranceRegisterParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceRegisterParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceRegisterParam
>
listSuccess
=
new
ArrayList
<>();
String
regionSQL
=
getRegionSQL
(
user
);
for
(
InsuranceRegisterParam
param
:
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
()))
{
// 必填校验
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
...
...
@@ -2277,6 +2386,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
detail
).
isPresent
()){
...
...
@@ -2284,6 +2394,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
else
{
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
TInsuranceDetail
detailByRegionSQL
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
regionSQL
+
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
detailByRegionSQL
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
NO_UPDATE_DETAIL_JURISDICTION
);
listResult
.
add
(
param
);
continue
;
}
// 如果保费不存在,保单号、保费必填
if
(
detail
.
getActualPremium
()
==
null
){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyNo
())){
...
...
@@ -2304,6 +2430,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceDetail
batchPolicyNo
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
batchPolicyNo
).
isPresent
()){
...
...
@@ -2327,6 +2454,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceDetail
addPolicyNo
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
addPolicyNo
).
isPresent
()){
...
...
@@ -2626,6 +2754,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
@Override
public
List
<
InsuranceRefundListVo
>
getInsuranceRefundList
(
InsuranceRefundParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
String
>
deptNoList
=
getDeptNoList
(
user
);
param
.
setDeptNoList
(
deptNoList
);
List
<
InsuranceRefundListVo
>
insuranceRefundList
=
this
.
baseMapper
.
getInsuranceRefundList
(
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundList
)){
//根据项目编码获取项目名称
...
...
@@ -2656,7 +2787,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
@Override
public
IPage
<
RefundExportListVo
>
getInsuranceRefundHandlingPageList
(
Page
<
InsuranceRefundHandlingParam
>
page
,
InsuranceRefundHandlingParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
String
id
=
user
.
getId
();
Integer
reduceHandleStatus
=
param
.
getReduceHandleStatus
();
if
(
null
!=
reduceHandleStatus
&&
reduceHandleStatus
!=
CommonConstants
.
ONE_INT
){
param
.
setUpdateBy
(
id
);
}
String
regionSQL
=
getRegionSQL
(
user
);
param
.
setRegionSql
(
regionSQL
);
IPage
<
RefundExportListVo
>
insuranceRefundHandlingPageList
=
this
.
baseMapper
.
getInsuranceRefundHandlingPageList
(
page
,
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundHandlingPageList
.
getRecords
())){
//根据项目编码获取项目名称
...
...
@@ -2692,7 +2830,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
RefundExportListVo
>
refundExportList
;
//todo 根据登录人获取数据权限
String
regionSQL
=
getRegionSQL
(
user
);
param
.
setRegionSql
(
regionSQL
);
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集
if
(
CollectionUtils
.
isNotEmpty
(
param
.
getIdList
())){
refundExportList
=
baseMapper
.
getRefundExportListBySelect
(
param
.
getIdList
());
...
...
@@ -2740,7 +2879,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for
(
TInsuranceRefund
refund
:
refundList
)
{
tInsuranceRefundService
.
updateByInsDetailId
(
refund
);
}
}
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
INSURANCE_REFUND_EXPORT
);
...
...
@@ -2787,6 +2925,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceDetail
.
setUpdateBy
(
user
.
getId
());
tInsuranceDetail
.
setReduceHandleStatus
(
refundType
);
if
(
CommonConstants
.
FOUR_INT
==
refundType
){
tInsuranceDetail
.
setIsOverdue
(
null
);
tInsuranceDetail
.
setBuyHandleStatus
(
CommonConstants
.
FIVE_INT
);
}
else
{
tInsuranceDetail
.
setBuyHandleStatus
(
CommonConstants
.
THREE_INT
);
...
...
@@ -3431,11 +3570,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
LambdaQueryWrapper
<
TInsuranceDetail
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceDetail
::
getDeleteFlag
,
CommonConstants
.
ZERO_INT
).
eq
(
TInsuranceDetail
::
getEmpName
,
empName
)
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdCardNo
).
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
queryWrapper
.
eq
(
TInsuranceDetail
::
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail
::
getEmpName
,
empName
)
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdCardNo
)
.
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
))
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
)).
last
(
CommonConstants
.
LAST_ONE_SQL
);
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
))
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
if
(
list
.
size
()>
1
){
param
.
setErrorMessage
(
InsurancesConstants
.
MULTIPLE_RECORDS_UNDER_WARRANTY
);
...
...
@@ -3699,12 +3842,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//必填格式校通过后查询对应的保单信息
LambdaQueryWrapper
<
TInsuranceDetail
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceDetail
::
getDeleteFlag
,
CommonConstants
.
ZERO_INT
).
eq
(
TInsuranceDetail
::
getEmpName
,
empName
)
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdCardNo
).
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
queryWrapper
.
eq
(
TInsuranceDetail
::
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail
::
getEmpName
,
empName
)
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdCardNo
)
.
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail
::
getDeptNo
,
deptNo
).
eq
(
TInsuranceDetail
::
getBuyStandard
,
buyStandard
)
.
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
)
)
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
)).
last
(
CommonConstants
.
LAST_ONE_SQL
);
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
))
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
if
(
list
.
size
()>
1
){
param
.
setErrorMessage
(
InsurancesConstants
.
MULTIPLE_RECORDS_UNDER_WARRANTY
);
...
...
@@ -3820,11 +3967,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
newDeptNo
))){
param
.
setErrorMessage
(
InsurancesConstants
.
NEW_DEPT_NO_NOT_IN_DEPT_LIST
);
errorList
.
add
(
param
);
continue
;
}
//员工姓名
String
empName
=
param
.
getEmpName
();
if
(
StringUtils
.
isBlank
(
empName
)){
...
...
@@ -3846,11 +3988,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
oldDeptNo
))){
param
.
setErrorMessage
(
InsurancesConstants
.
OLD_DEPT_NO_NOT_IN_DEPT_LIST
);
errorList
.
add
(
param
);
continue
;
}
//保险公司名称
String
insuranceCompanyName
=
param
.
getInsuranceCompanyName
();
if
(
StringUtils
.
isBlank
(
insuranceCompanyName
)){
...
...
@@ -3909,13 +4047,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
if
(
MapUtils
.
isEmpty
(
data
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_CHANGE_IS_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_CHANGE_
NEW_
IS_NOT_EXIST
);
errorList
.
add
(
param
);
continue
;
}
else
{
//结算类型,根据项目编码获取,并冗余到明细记录中
ProjectSetInfoVo
jsonObject
=
data
.
get
(
newDeptNo
);
if
(
Common
.
isEmpty
(
jsonObject
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_CHANGE_NEW_IS_NOT_EXIST
);
errorList
.
add
(
param
);
continue
;
}
ProjectSetInfoVo
oldJsonObject
=
data
.
get
(
oldDeptNo
);
if
(
Common
.
isEmpty
(
oldJsonObject
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_CHANGE_OLD_IS_NOT_EXIST
);
errorList
.
add
(
param
);
continue
;
}
param
.
setOldDeptName
(
oldJsonObject
.
getDepartName
());
param
.
setNewDeptName
(
jsonObject
.
getDepartName
());
String
settleType
=
jsonObject
.
getInsuranceSettleType
();
...
...
@@ -3928,14 +4076,31 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
//旧项目ID不在当前权限范围内
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
oldDeptNo
))){
param
.
setErrorMessage
(
InsurancesConstants
.
OLD_DEPT_NO_NOT_IN_DEPT_LIST
);
errorList
.
add
(
param
);
continue
;
}
//新项目ID不在当前权限范围内
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
newDeptNo
))){
param
.
setErrorMessage
(
InsurancesConstants
.
NEW_DEPT_NO_NOT_IN_DEPT_LIST
);
errorList
.
add
(
param
);
continue
;
}
//必填格式校通过后查询对应的保单信息
LambdaQueryWrapper
<
TInsuranceDetail
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceDetail
::
getDeleteFlag
,
CommonConstants
.
ZERO_INT
).
eq
(
TInsuranceDetail
::
getEmpName
,
empName
)
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdCardNo
).
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getBuyStandard
,
buyStandard
).
eq
(
TInsuranceDetail:
:
getDeptNo
,
oldDeptNo
)
queryWrapper
.
eq
(
TInsuranceDetail
::
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail
::
getEmpName
,
empName
)
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdCardNo
)
.
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getBuyStandard
,
buyStandard
)
.
eq
(
TInsuranceDetail:
:
getDeptNo
,
oldDeptNo
)
.
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
))
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
)).
last
(
CommonConstants
.
LAST_ONE_SQL
);
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
))
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
if
(
list
.
size
()>
1
){
param
.
setErrorMessage
(
InsurancesConstants
.
MULTIPLE_RECORDS_UNDER_WARRANTY
);
...
...
@@ -4178,21 +4343,34 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
deptList
.
add
(
"皖M02023"
);
deptList
.
add
(
"皖M02002"
);
}
else
{
deptList
.
add
(
"A0001"
);
deptList
.
add
(
"皖M02002"
);
deptList
.
add
(
"皖A12345678"
);
deptList
.
add
(
"皖B29203"
);
deptList
.
add
(
"皖AFA10M"
);
deptList
.
add
(
"皖AFA11F"
);
deptList
.
add
(
"皖M02023"
);
deptList
.
add
(
"皖M02045"
);
R
<
TSettleDomainListVo
>
tSettleDomainListVoR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
(
);
if
(
null
!=
tSettleDomainListVoR
&&
tSettleDomainListVoR
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
tSettleDomainListVoR
.
getData
()))
{
TSettleDomainListVo
data
=
tSettleDomainListVoR
.
getData
(
);
List
<
TSettleDomainSelectVo
>
listSelectVO
=
data
.
getListSelectVO
(
);
for
(
TSettleDomainSelectVo
tSettleDomainSelectVo
:
listSelectVO
)
{
deptList
.
add
(
tSettleDomainSelectVo
.
getDepartNo
()
);
}
}
}
return
deptList
;
}
public
String
getRegionSQL
(
YifuUser
user
){
return
null
;
String
id
=
user
.
getId
();
String
sql
;
//user_id=14, 合肥办理1
//user_id=15,合肥办理2
//user_id=16,上海办理
if
(
CommonConstants
.
FOURTEEN_STRING
.
equals
(
id
)){
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (12) and detail.INSURANCE_HANDLE_CITY in (135)"
;
}
else
if
(
CommonConstants
.
FIFTEEN_STRING
.
equals
(
id
)){
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (12) and detail.INSURANCE_HANDLE_CITY in (135)"
;
}
else
if
(
CommonConstants
.
SIXTEEN_STRING
.
equals
(
id
)){
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (9) and detail.INSURANCE_HANDLE_CITY in (109)"
;
}
else
{
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (12,9) and detail.INSURANCE_HANDLE_CITY in (135,109)"
;
}
return
sql
;
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
b23508c5
...
...
@@ -168,6 +168,12 @@
#{item}
</foreach>
</if>
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and detail.UPDATE_BY = #{param.updateBy}
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
...
...
@@ -272,6 +278,7 @@
#{item}
</foreach>
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<select
id=
"getInsuranceDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO"
>
...
...
@@ -342,13 +349,13 @@
detail.CREATE_NAME as createName,
detail.REMARK as remark
from t_insurance_detail detail
where detail.id in
where detail.
DELETE_FLAG = 0 and detail.BUY_HANDLE_STATUS = 1 and detail.
id in
<foreach
collection=
"idList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
ORDER BY detail.CREATE_TIME DESC
</select>
<!--出办理非勾选查询结果-->
<select
id=
"getInsuranceExportList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO"
>
select detail.id as id,
detail.DEPT_NO as deptNo,
...
...
@@ -385,6 +392,9 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
...
...
@@ -713,12 +723,6 @@
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and detail.DEPT_NO = #{param.deptNo}
</if>
<if
test=
"param.deptNo == null or param.deptNo.trim() == ''"
>
and detail.DEPT_NO in
<foreach
collection=
"param.deptNoList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"param.reduceHandleStatus != null"
>
and detail.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
...
...
@@ -728,65 +732,13 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
ORDER BY refund.CREATE_TIME DESC,detail.ID ASC
</select>
<!-- 减员办理列表不分页查询-->
<select
id=
"getInsuranceRefundHandlingList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo"
>
select
DISTINCT
detail.id as id,
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
detail.POST as post,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth,
refund.CREATE_NAME as createName,
detail.REMARK as remark,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus
from
t_insurance_detail detail,
t_insurance_refund refund
where
detail.DELETE_FLAG = 0
and
detail.ID = refund.INS_DETAIL_ID
and
detail.REDUCE_HANDLE_STATUS = 1
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.empIdcardNo != null and param.empIdcardNo.trim() != ''"
>
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and detail.DEPT_NO = #{param.deptNo}
</if>
<if
test=
"param.deptNo == null or param.deptNo.trim() == ''"
>
and detail.DEPT_NO in
<foreach
collection=
"param.deptNoList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and refund.UPDATE_BY = #{param.updateBy}
</if>
<if
test=
"param.isOverdue != null "
>
and detail.IS_OVERDUE = #{param.isOverdue}
</if>
<if
test=
"param.isUse != null"
>
and detail.IS_USE = #{param.isUse}
</if>
ORDER BY detail.REFUND_CREATE_TIME DESC
ORDER BY refund.CREATE_TIME DESC,detail.ID ASC
</select>
<!-- 查询保单列表-->
<select
id=
"selectDetailListByIds"
...
...
@@ -907,6 +859,9 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
<!-- 减员办理-->
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/constants/SalaryConstants.java
0 → 100644
View file @
b23508c5
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
constants
;
import
java.math.BigDecimal
;
public
class
SalaryConstants
{
//cellValueBig.setScale(2, BigDecimal.ROUND_HALF_UP); //四舍五入
//在使用BigDecmial进行比较的时候不能使用equals与==比较了,需要使用compareTo()进行比较
//if ( temp1.compareTo(temp2)==0)
//结果是true比较大小可以用 temp2.compareTo(temp2) 返回值 -1 小于 0 等于 1 大于
//例子:if (yearFinal != null && yearFinal.compareTo(SalaryConstants.B_ZERO) == SalaryConstants.MORE_THAN )
//加法 + bigDecimal1.add(bigDecimal2)
//减法 - bigDecimal1.subtract(bigDecimal2)
//乘法 x bigDecimal1.multiply(bigDecimal2)
//除法 / bigDecimal1.divide(bigDecimal2)
// 项目报销的 数据来源:0企业微信;1固资划转
public
static
final
Integer
[]
DATA_SOURCE
=
{
0
,
1
};
// 保存类型:0:保存;1不保存
public
static
final
Integer
[]
SAVE_TYPE
=
{
0
,
1
};
//应发工资、年终奖、薪资扣税、年终奖扣税、个人社保扣缴、代扣个人社保、个人公积金扣缴、代扣个人公积金、年个税个人代扣、企业年金、专项扣除、减除费用、实发工资
public
static
final
String
[]
ACCOUNT_SORT
=
{
"应发工资"
,
"年终奖"
,
"个税"
,
"年终奖单独扣税"
,
"个人社保"
,
"代扣个人社保"
,
"个人公积金"
,
"代扣个人公积金"
,
"免个税个人代扣"
,
"企业(职业)年金"
,
"累计专项扣除总额"
,
"减除费用"
,
"实发工资"
,
"个人实发合计"
};
//通用身份证号长度
public
static
final
int
idCardLength
=
18
;
public
static
final
String
NON_TAX
=
"非扣税项"
;
/*
* @Description: 0待提交1待审核 3待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印
* @Author: hgw
* @Date: 2019/10/10 14:55
* @return:
**/
public
static
final
Integer
[]
AUDIT_STATUS
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
public
static
final
String
[]
AUDIT_STATUS_STRING
=
{
"待提交"
,
"待审核"
,
"-"
,
"待发放"
,
"已发放"
,
"审核不通过"
,
"确认不通过"
,
"财务退回"
,
"结算单调整待审核"
,
"结算单调整待打印"
};
//发放失败-认领状态 0待认领1待出账2已发放3再次失败待认领
public
static
final
Integer
[]
LOST_STATUS
=
{
0
,
1
,
2
,
3
};
//申请垫付流程状态( 0:未申请 1已申请 2申请不通过 3申请已通过)
public
static
final
Integer
[]
ADVANCE_STATUS
=
{
0
,
1
,
2
,
3
};
//收入表(TIncomeTable)//来源类型(fromType):(1工资结算单/2代理预估单/3商险结算单/4一次性业务结算单/5其他收入)/6工程工资结算单/7纯收入
public
static
final
Integer
[]
INCOME_TABLE_FROM_TYPE
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
};
//发放失败关联报账类型:0工资;1工程工资 2:非扣税项3暂停发 4自定义暂停发
public
static
final
Integer
[]
ACCOUNT_TYPE
=
{
0
,
1
,
2
,
3
,
4
};
//开票关联结算单类型:0普通工资/1工程工资/2商险/3预估结算单/4一次性业务结算单
public
static
final
String
[]
INVOICE_TYPE
=
{
"0"
,
"1"
,
"2"
,
"3"
,
"4"
};
//开票审核状态(0待提交/1待审核/2审核通过/3审核不通过)
public
static
final
String
[]
INVOICE_AUDITFLAG
=
{
"0"
,
"1"
,
"2"
,
"3"
};
//开票状态(0待开票/1已开票)
public
static
final
String
[]
INVOICE_STATUS
=
{
"0"
,
"1"
};
//附件类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4薪资打印记录;5核准表打印记录;6:非扣税项 7发放失败 8自有员工附件 10换人换卡附件
public
static
final
Integer
[]
LINK_TYPE
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
10
};
//打印来源:0:工资结算单;1:工程结算单;2:暂停发发放记录;
public
static
final
Integer
[]
PRINT_FROM_TYPE
=
{
0
,
1
,
2
};
//暂停发发放记录类型:0:工资暂停发;1:工程工资暂停发;2:普通自定义项暂停发 5:工程自定义项暂停发
public
static
final
Integer
[]
TYPE_OF_CHARGE
=
{
0
,
1
,
2
,
3
,
4
,
5
};
//工程文件类型:0三方协议;1委托付款函;2劳务费;3其他
public
static
final
Integer
[]
ENGINEER_TYPE
=
{
0
,
1
,
2
,
3
};
//发放状态 0: 未发放 1: 发放成功 2:发放失败
public
static
final
String
[]
DISTRIBUTION_FLAG
=
{
"0"
,
"1"
,
"2"
};
//暂停发-发放状态 0: 待发放 1: 发放成功 2:发放失败;3:待审核4:审核退回 5失败待认领 6失败待发放 7失败已发放 8再次失败待认领9不发放
public
static
final
Integer
[]
CHARGE_STATUS
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
public
static
final
String
[]
SALARY_FORM_TYPE
=
{
"工资"
,
"绩效"
,
"其他"
,
"劳务费"
,
""
,
""
,
""
,
"非扣税项"
};
//款项来源(0客户到款/1垫付)
public
static
final
Integer
[]
MONEY_FROM
=
{
0
,
1
};
//暂停发类型 0: 工资 1: 工程
public
static
final
Integer
[]
PAUSE_TYPE
=
{
0
,
1
};
//付款方式 0: 现金 1: 银行
public
static
final
Integer
[]
SALARY_PAY_TYPE
=
{
0
,
1
};
//所得税类型:0:工资;1:年终奖
public
static
final
Integer
[]
SALARY_TAX_TYPE
=
{
0
,
1
};
//小数位
public
static
final
int
PLACES
=
2
;
public
static
final
int
TAX_FEE_PLACES
=
6
;
public
static
final
BigDecimal
B_ZERO
=
new
BigDecimal
(
"0"
);
public
static
final
BigDecimal
B_ONE
=
new
BigDecimal
(
"1"
);
public
static
final
BigDecimal
B_TWELVE
=
new
BigDecimal
(
"12"
);
public
static
final
BigDecimal
B_ONEHUNDRED
=
new
BigDecimal
(
"100"
);
//小于
public
static
final
int
LESS_THAN
=
-
1
;
//等于
public
static
final
int
EQUAL
=
0
;
//大于
public
static
final
int
MORE_THAN
=
1
;
//模板列必填
public
static
final
String
IS_MUST
=
"1"
;
public
static
final
String
EMP_NAME
=
"姓名"
;
public
static
final
String
IF_NEW_EMPLOYEE
=
"是否新员工(默认否)"
;
public
static
final
String
IS_NEW
=
"是"
;
public
static
final
String
ID_NUMBER
=
"身份证号"
;
public
static
final
String
CHECK_ID_NUMBER
=
"身份证号码"
;
public
static
final
String
SALARY_GIVE_TIME
=
"暂停发"
;
public
static
final
String
SOCIAL_CRATE_MONTH
=
"社保生成月份"
;
public
static
final
String
SOCIAL_MONTH
=
"社保缴纳月份"
;
public
static
final
String
FUND_CRATE_MONTH
=
"公积金生成月份"
;
public
static
final
String
FUND_MONTH
=
"公积金缴纳月份"
;
//结算主体-管理费项目
public
static
final
String
MANAGE_SERVER_ITEM
=
"MANAGE_SERVER_ITEM"
;
//结算主体-风险金项目
public
static
final
String
RISK_SERVER_ITEM
=
"RISK_SERVER_ITEM"
;
//暂停发
public
static
final
String
SALARY_GIVE_TIME_VALUE
=
"1"
;
//0:生成月;
public
static
final
String
PRIORITY_ZERO
=
"0"
;
//1:缴纳月
public
static
final
String
PRIORITY_ONE
=
"1"
;
//deleteFlag; //0:未删除; 1:已删除
public
static
final
Integer
NOT_DELETE
=
0
;
//deleteFlag; //0:未删除; 1:已删除
public
static
final
Integer
DELETED
=
1
;
//扣缴(社保、公积金)
public
static
final
String
IS_DEDUCT_ONE
=
"1"
;
//扣缴(社保、公积金)int
public
static
final
Integer
IS_DEDUCT_ONE_INT
=
1
;
//社保
public
static
final
Integer
IS_SOCIAL_ZERO
=
0
;
//公积金
public
static
final
Integer
IS_FUND_ONE
=
1
;
//正常扣缴社保
public
static
final
Integer
NOT_IS_NO_SALARY_ZERO
=
0
;
//无工资人员扣缴社保
public
static
final
Integer
IS_NO_SALARY_ONE
=
1
;
public
static
final
String
CASH
=
"现金"
;
//工资发放方式-现金
public
static
final
String
SALARY_STYLE_CASH
=
"0"
;
//工资发放方式-银行
public
static
final
String
SALARY_STYLE_BANK
=
"1"
;
//工资发放方式-线下
public
static
final
Integer
SALARY_STYLE_OFFLINE
=
2
;
//发放方式 1: 银付 0.现金 2:线下
public
static
final
Integer
[]
CHARGE_TYPE
=
{
0
,
1
,
2
};
public
static
final
String
COST_REDUCTION
=
"减除费用"
;
//减除费用
public
static
final
String
COST_REDUCTION_JAVA
=
"costReduction"
;
//代扣个人社保
public
static
final
String
WITHHOLIDING_PERSON_SOCIAL
=
"withholidingPersonSocial"
;
//代扣个人公积金
public
static
final
String
WITHHOLIDING_PERSON_FUND
=
"withholidingPersonFund"
;
//代扣单位社保"
public
static
final
String
WITHHOLIDING_UNIT_SOCIAL
=
"withholidingUnitSocial"
;
//代扣单位公积金
public
static
final
String
WITHHOLIDING_UNIT_FUND
=
"withholidingUnitFund"
;
public
static
final
String
PERSONAL_SOCIAL
=
"个人社保"
;
public
static
final
String
PERSONAL_FUND
=
"个人公积金"
;
public
static
final
String
UNIT_SOCIAL
=
"单位社保"
;
public
static
final
String
UNIT_FUND
=
"单位公积金"
;
public
static
final
String
PERSONAL_DEBT
=
"个人社保、公积金欠款"
;
public
static
final
String
PERSONAL_DEBT_JAVA
=
"personalDebt"
;
// 工程工资的叫法
public
static
final
String
ENG_SALARY_RELAY
=
"工资应发"
;
public
static
final
String
RELAY_SALARY
=
"应发工资"
;
//工资应发
public
static
final
String
RELAY_SALARY_JAVA
=
"relaySalary"
;
//个人社保
public
static
final
String
PERSONAL_SOCIAL_JAVA
=
"personalSocial"
;
//个人公积金
public
static
final
String
PERSONAL_FUND_JAVA
=
"personalFund"
;
//单位社保
public
static
final
String
UNIT_SOCIAL_JAVA
=
"unitSocial"
;
//单位公积金
public
static
final
String
UNIT_FUND_JAVA
=
"unitFund"
;
//商险
public
static
final
String
TAKING_RISKS_JAVA
=
"takingRisks"
;
//单位待补足——报账表,计算的是个人社保、公积金欠款——PERSONAL_DEBT_JAVA
public
static
final
String
UNIT_SUPPLEMENT_JAVA
=
"unitSupplement"
;
//个人待补足
public
static
final
String
CURRENT_SUPPLY_JAVA
=
"currentSupply"
;
//年终奖
public
static
final
String
ANNUAL_BONUS_JAVA
=
"annualBonus"
;
public
static
final
String
PRE_CURRENT_SUPPLY
=
"前次个人待补足"
;
//前次个人待补足
public
static
final
String
PRE_CURRENT_SUPPLY_JAVA
=
"preCurrentSupply"
;
//专项扣除-专区
public
static
final
String
SPECIAL_DEDU_MONEY_SUM
=
"累计专项扣除总额"
;
//累计专项扣除总额
public
static
final
String
SPECIAL_DEDU_MONEY_SUM_JAVA
=
"specialDeduMoney"
;
public
static
final
String
SUM_CHILD_EDU_MONEY
=
"累计子女教育"
;
//累计子女教育
public
static
final
String
SUM_CHILD_EDU_MONEY_JAVA
=
"sumChildEduMoney"
;
public
static
final
String
SUM_HOUSING_LOAN_MONEY
=
"累计住房贷款利息"
;
//累计住房贷款利息
public
static
final
String
SUM_HOUSING_LOAN_MONEY_JAVA
=
"sumHousingLoanMoney"
;
public
static
final
String
SUM_HOUSING_RENT_MONEY
=
"累计住房租金"
;
//累计住房租金
public
static
final
String
SUM_HOUSING_RENT_MONEY_JAVA
=
"sumHousingRentMoney"
;
public
static
final
String
SUM_SUPPORT_ELDERLY_MONEY
=
"累计赡养老人"
;
//累计赡养老人
public
static
final
String
SUM_SUPPORT_ELDERLY_MONEY_JAVA
=
"sumSupportElderlyMoney"
;
public
static
final
String
SUM_CONTINUING_EDUCATION_MONEY
=
"累计继续教育"
;
//累计继续教育
public
static
final
String
SUM_CONTINUING_EDUCATION_MONEY_JAVA
=
"sumContinuingEducationMoney"
;
//累计婴幼儿照护费用
public
static
final
String
SUM_BABY_MONEY
=
"累计婴幼儿照护费用"
;
public
static
final
String
SUM_BABY_MONEY_JAVA
=
"sumBabyMoney"
;
public
static
final
String
ANNUAL_BONUS_TAX
=
"年终奖单独扣税"
;
//年终奖扣税
public
static
final
String
ANNUAL_BONUS_TAX_JAVA
=
"annualBonusTax"
;
//薪资扣税
public
static
final
String
SALARY_TAX
=
"个税"
;
//薪资扣税
public
static
final
String
SALARY_TAX_JAVA
=
"salaryTax"
;
public
static
final
String
ACTUAL_SALARY_SUM
=
"个人实发合计"
;
//个人实发合计
public
static
final
String
ACTUAL_SALARY_SUM_JAVA
=
"actualSalarySum"
;
//个人代扣
public
static
final
String
PDEDUCTION_JAVA
=
"pdeduction"
;
//单位代扣
public
static
final
String
UDEDUCTION_JAVA
=
"udeduction"
;
//免个税个人代扣
public
static
final
String
EXEMPTION_PERSION_TAX_JAVA
=
"exemptionPersionTax"
;
//企业(职业)年金
public
static
final
String
ENTERPRISE_ANNUITY_JAVA
=
"enterpriseAnnuity"
;
//独保费
public
static
final
String
ONLY_CHILD_JAVA
=
"onlyChild"
;
//风险抵押金
public
static
final
String
RISK_MORTGAGE_MONEY_JAVA
=
"riskMortgageMoney"
;
//单位补足扣返
public
static
final
String
UNIT_SUPPLY_JAVA
=
"unitSupply"
;
//其他费用1
public
static
final
String
OTHER_MONEY_ONE_JAVA
=
"otherMoneyOne"
;
//其他费用2
public
static
final
String
OTHER_MONEY_TWO_JAVA
=
"otherMoneyTwo"
;
//其他费用3
public
static
final
String
OTHER_MONEY_THREE_JAVA
=
"otherMoneyThree"
;
//个人社保卡费
public
static
final
String
PERSONAL_SOCIAL_CARD_JAVA
=
"personalSocialCard"
;
//单位社保卡费
public
static
final
String
UNIT_SOCIAL_CARD_JAVA
=
"unitSocialCard"
;
//工程类设置:
//应发工资
public
static
final
String
SALARY_SUM_JAVA
=
"relaySalary"
;
/**
* 未找到工资表
**/
public
static
final
String
NO_SALARY
=
"未找到工资表"
;
/**
* 未找到工程工资表
**/
public
static
final
String
NO_ENGINEER_SALARY
=
"未找到工程工资表"
;
//标记发放失败
public
static
final
String
FAILUE_MARK
=
"标记“发放失败”"
;
//发放失败重新发放
public
static
final
String
FAILUE_RESENDER
=
"重新发放"
;
//发放失败出账
public
static
final
String
FAILUE_SENDER
=
"“发放失败”出账"
;
//发放失败出账退回
public
static
final
String
FAILUE_SENDER_BACK
=
"“发放失败”出账退回"
;
//员工姓名/收款单位
public
static
final
String
FILE_EMPNAME_ORGNAME
=
"员工姓名/收款单位"
;
//银行账号
public
static
final
String
FILE_BANK_NO
=
"银行账号"
;
//派单限制统计表更新类型(0认领更新/1撤销认领更新/2匹配更新/3取消匹配更新)
public
static
final
Integer
[]
DISPATCH_UPDTYPE
=
{
0
,
1
,
2
,
3
};
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TConfigSalary.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
/**
*
项目基础薪酬配置-薪资配置2
*
工资报账配置
*
* @author hgw
* @date 20
22-08-05 11:40:14
* @date 20
19-09-12 15:46:57
*/
@Data
@TableName
(
"t_config_salary"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"项目基础薪酬配置-薪资配置2"
)
public
class
TConfigSalary
extends
BaseEntity
{
@TableName
(
"t_config_salary"
)
@Tag
(
name
=
"薪资配置-普通薪资配置"
)
public
class
TConfigSalary
extends
Model
<
TConfigSalary
>
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"主键"
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 配置名称
*/
@ExcelAttribute
(
name
=
"配置名称"
,
isNotEmpty
=
true
,
errorInfo
=
"配置名称不能为空"
,
maxLength
=
50
)
@NotBlank
(
message
=
"配置名称不能为空"
)
@Length
(
max
=
50
,
message
=
"配置名称不能超过50个字符"
)
@ExcelProperty
(
"配置名称"
)
@Length
(
max
=
50
,
message
=
"配置名称不能超过50个字符"
)
@ExcelAttribute
(
name
=
"配置名称"
,
isNotEmpty
=
true
,
errorInfo
=
"配置名称不能为空"
,
maxLength
=
50
)
@ExcelProperty
(
value
=
"配置名称"
)
private
String
name
;
/**
* 结算主体ID
*/
@ExcelAttribute
(
name
=
"结算主体ID"
,
isNotEmpty
=
true
,
errorInfo
=
"结算主体ID不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"结算主体ID不能为空"
)
@Length
(
max
=
32
,
message
=
"结算主体ID不能超过32个字符"
)
@ExcelProperty
(
"结算主体ID"
)
@Length
(
max
=
32
,
message
=
"结算主体ID不能超过32个字符"
)
@ExcelAttribute
(
name
=
"结算主体ID"
,
isNotEmpty
=
true
,
errorInfo
=
"结算主体ID不能为空"
,
maxLength
=
32
)
@ExcelProperty
(
value
=
"结算主体ID"
)
private
String
departId
;
/**
* 结算主体编码
*/
@ExcelAttribute
(
name
=
"结算主体编码"
,
isNotEmpty
=
true
,
errorInfo
=
"结算主体编码不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"结算主体编码不能为空"
)
@Length
(
max
=
32
,
message
=
"结算主体编码不能超过32个字符"
)
@ExcelProperty
(
"结算主体编码"
)
@Length
(
max
=
32
,
message
=
"结算主体编码不能超过32个字符"
)
@ExcelAttribute
(
name
=
"结算主体编码"
,
isNotEmpty
=
true
,
errorInfo
=
"结算主体编码不能为空"
,
maxLength
=
32
)
@ExcelProperty
(
value
=
"结算主体编码"
)
private
String
departNo
;
/**
* 结算主体名称
*/
@ExcelAttribute
(
name
=
"结算主体名称"
,
isNotEmpty
=
true
,
errorInfo
=
"结算主体名称不能为空"
,
maxLength
=
50
)
@NotBlank
(
message
=
"结算主体名称不能为空"
)
@Length
(
max
=
50
,
message
=
"结算主体名称不能超过50个字符"
)
@ExcelProperty
(
"结算主体名称"
)
@Length
(
max
=
50
,
message
=
"结算主体名称不能超过50个字符"
)
@ExcelAttribute
(
name
=
"结算主体名称"
,
isNotEmpty
=
true
,
errorInfo
=
"结算主体名称不能为空"
,
maxLength
=
50
)
@ExcelProperty
(
value
=
"结算主体名称"
)
private
String
departName
;
/**
* 薪酬
月份
* 工资
月份
*/
@ExcelAttribute
(
name
=
"薪酬月份"
,
isNotEmpty
=
true
,
errorInfo
=
"薪酬
月份不能为空"
)
@NotBlank
(
message
=
"薪酬月份不能为空"
)
@ExcelProperty
(
"薪酬
月份"
)
@NotNull
(
message
=
"工资
月份不能为空"
)
@ExcelAttribute
(
name
=
"工资月份"
,
isNotEmpty
=
true
,
errorInfo
=
"工资月份不能为空"
)
@ExcelProperty
(
value
=
"工资
月份"
)
private
Integer
salaryMonth
;
/**
* 结算月份
*/
@NotNull
(
message
=
"结算月份不能为空"
)
@ExcelAttribute
(
name
=
"结算月份"
,
isNotEmpty
=
true
,
errorInfo
=
"结算月份不能为空"
)
@ExcelProperty
(
value
=
"结算月份"
)
private
Integer
settleMonth
;
/**
* 社保月份
*/
@ExcelAttribute
(
name
=
"社保月份"
,
isNotEmpty
=
true
,
errorInfo
=
"社保月份不能为空"
)
@NotBlank
(
message
=
"社保月份不能为空"
)
@ExcelProperty
(
"社保月份"
)
@NotNull
(
message
=
"社保月份不能为空"
)
@ExcelAttribute
(
name
=
"社保月份"
,
isNotEmpty
=
true
,
errorInfo
=
"社保月份不能为空"
)
@ExcelProperty
(
value
=
"社保月份"
)
private
Integer
socialMonth
;
/**
* 公积金月份
*/
@ExcelAttribute
(
name
=
"公积金月份"
,
isNotEmpty
=
true
,
errorInfo
=
"公积金月份不能为空"
)
@NotBlank
(
message
=
"公积金月份不能为空"
)
@ExcelProperty
(
"公积金月份"
)
@NotNull
(
message
=
"公积金月份不能为空"
)
@ExcelAttribute
(
name
=
"公积金月份"
,
isNotEmpty
=
true
,
errorInfo
=
"公积金月份不能为空"
)
@ExcelProperty
(
value
=
"公积金月份"
)
private
Integer
fundMonth
;
/**
* 社保优先级0:生成月;1:缴纳月
* 社保优先级
*/
@ExcelAttribute
(
name
=
"社保优先级0:生成月;1:缴纳月"
,
isNotEmpty
=
true
,
errorInfo
=
"社保优先级0:生成月;1:缴纳月
不能为空"
)
@NotBlank
(
message
=
"社保优先级0:生成月;1:缴纳月不能为空"
)
@ExcelProperty
(
"社保优先级0:生成月;1:缴纳月
"
)
@NotNull
(
message
=
"社保优先级
不能为空"
)
@ExcelAttribute
(
name
=
"社保优先级"
,
isNotEmpty
=
true
,
errorInfo
=
"社保优先级不能为空"
)
@ExcelProperty
(
value
=
"社保优先级(0:生成;1:缴纳)
"
)
private
Integer
socialPriority
;
/**
* 公积金优先级0:生成月;1:缴纳月
* 公积金优先级
*/
@ExcelAttribute
(
name
=
"公积金优先级0:生成月;1:缴纳月"
,
isNotEmpty
=
true
,
errorInfo
=
"公积金优先级0:生成月;1:缴纳月
不能为空"
)
@NotBlank
(
message
=
"公积金优先级0:生成月;1:缴纳月不能为空"
)
@ExcelProperty
(
"公积金优先级0:生成月;1:缴纳月
"
)
@NotNull
(
message
=
"公积金优先级
不能为空"
)
@ExcelAttribute
(
name
=
"公积金优先级"
,
isNotEmpty
=
true
,
errorInfo
=
"公积金优先级不能为空"
)
@ExcelProperty
(
value
=
"公积金优先级(0:生成;1:缴纳)
"
)
private
Integer
fundPriority
;
/**
* 发放方式(0现金/1银行)
* 发放方式
*/
@ExcelAttribute
(
name
=
"发放方式(0现金/1银行)"
,
isNotEmpty
=
true
,
errorInfo
=
"发放方式(0现金/1银行)
不能为空"
)
@NotBlank
(
message
=
"发放方式(0现金/1银行)不能为空"
)
@ExcelProperty
(
"发放方式(0现金/1银行
)"
)
@NotNull
(
message
=
"发放方式
不能为空"
)
@ExcelAttribute
(
name
=
"发放方式"
,
isNotEmpty
=
true
,
errorInfo
=
"发放方式不能为空"
)
@ExcelProperty
(
value
=
"发放方式(0:现金;1:转账
)"
)
private
Integer
grantType
;
/**
* 年终奖扣税方案
*/
@NotNull
(
message
=
"年终奖扣税方案不能为空"
)
@ExcelAttribute
(
name
=
"年终奖扣税方案"
,
errorInfo
=
"年终奖扣税方案不能为空"
)
@ExcelProperty
(
value
=
"年终奖扣税方案(0:合并;1:单独;2:自动计算)"
)
private
Integer
annualBonusType
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TMinSalary.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.util.Date
;
import
javax.validation.constraints.NotNull
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
/**
*
最低工资配置-薪资配置4
*
各地市最低工资标准
*
* @author hgw
* @date 20
22-08-05 11:40:14
* @date 20
19-10-15 21:45:23
*/
@Data
@TableName
(
"t_min_salary"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"最低工资配置-薪资配置4"
)
public
class
TMinSalary
extends
BaseEntity
{
@TableName
(
"t_min_salary"
)
@Tag
(
name
=
"薪资配置-最低工资配置"
)
public
class
TMinSalary
extends
Model
<
TMinSalary
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"id"
)
@ExcelProperty
(
value
=
"id"
)
private
String
id
;
/**
* 省
*/
@ExcelAttribute
(
name
=
"省"
)
@ExcelProperty
(
"省"
)
@ExcelProperty
(
value
=
"省"
)
private
Integer
province
;
/**
* 市
*/
@ExcelAttribute
(
name
=
"市"
)
@ExcelProperty
(
"市"
)
@ExcelProperty
(
value
=
"市"
)
private
Integer
city
;
/**
* 县
*/
@ExcelAttribute
(
name
=
"县"
)
@ExcelProperty
(
"县"
)
@ExcelProperty
(
value
=
"县"
)
private
Integer
town
;
/**
* 最低工资标准
*/
@ExcelAttribute
(
name
=
"最低工资标准"
,
isNotEmpty
=
true
,
errorInfo
=
"最低工资标准不能为空"
,
maxLength
=
11
)
@NotBlank
(
message
=
"最低工资标准不能为空"
)
@Length
(
max
=
11
,
message
=
"最低工资标准不能超过11个字符"
)
@ExcelProperty
(
"最低工资标准"
)
@ExcelAttribute
(
name
=
"最低工资标准"
,
isNotEmpty
=
true
,
errorInfo
=
"最低工资标准不能为空"
,
maxLength
=
11
)
@ExcelProperty
(
value
=
"最低工资标准"
)
private
String
salaryBase
;
/**
* 1.启用 2.停用
*/
@NotNull
(
message
=
"1.启用 2.停用不能为空"
)
@ExcelAttribute
(
name
=
"1.启用 2.停用"
,
isNotEmpty
=
true
,
errorInfo
=
"1.启用 2.停用不能为空"
)
@NotBlank
(
message
=
"1.启用 2.停用不能为空"
)
@ExcelProperty
(
"1.启用 2.停用"
)
@ExcelProperty
(
value
=
"1.启用 2.停用"
)
private
Integer
status
;
/**
* 起始时间
*/
@ExcelAttribute
(
name
=
"起始时间"
,
isDate
=
true
)
@ExcelProperty
(
"起始时间"
)
private
Date
startDate
;
@ExcelAttribute
(
name
=
"起始时间"
)
@ExcelProperty
(
value
=
"起始时间"
)
private
Local
Date
startDate
;
/**
* 终止时间
*/
@ExcelAttribute
(
name
=
"终止时间"
,
isDate
=
true
)
@ExcelProperty
(
"终止时间"
)
private
Date
endDate
;
@ExcelAttribute
(
name
=
"终止时间"
)
@ExcelProperty
(
value
=
"终止时间"
)
private
LocalDate
endDate
;
/**
* 创建人
*/
@Length
(
max
=
32
,
message
=
"创建人不能超过32个字符"
)
@ExcelAttribute
(
name
=
"创建人"
,
maxLength
=
32
)
@ExcelProperty
(
value
=
"创建人"
)
private
String
createUser
;
/**
* 创建时间
*/
@ExcelAttribute
(
name
=
"创建时间"
)
@ExcelProperty
(
value
=
"创建时间"
)
private
LocalDateTime
createDate
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TOwnDept.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.
media.Schema
;
import
io.swagger.v3.oas.annotations.
tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
/**
* 自有员工所在结算主体大全表
*
* @author hgw
* @date 202
2-08-05 11:40:1
4
* @date 202
1-11-02 17:29:5
4
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"t_own_dept"
)
@
Schema
(
description
=
"自有员工所在结算主体大全表"
)
public
class
TOwnDept
{
@
Tag
(
name
=
"自有员工所在结算主体大全表"
)
public
class
TOwnDept
extends
Model
<
TOwnDept
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
id
*
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"id
"
)
@ExcelProperty
(
value
=
"
"
)
private
Integer
id
;
/**
* 结算主体id
*/
@
ExcelAttribute
(
name
=
"结算主体id"
,
maxLength
=
32
)
@
NotBlank
(
message
=
"结算主体id不能为空"
)
@Length
(
max
=
32
,
message
=
"结算主体id不能超过32个字符"
)
@ExcelProperty
(
"结算主体id"
)
@ExcelAttribute
(
name
=
"结算主体id"
,
isNotEmpty
=
true
,
errorInfo
=
"结算主体id不能为空"
,
maxLength
=
32
)
@ExcelProperty
(
value
=
"结算主体id"
)
private
String
deptId
;
/**
* 结算主体编码
*/
@ExcelAttribute
(
name
=
"结算主体编码"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"结算主体编码不能超过50个字符"
)
@ExcelProperty
(
"结算主体编码"
)
@ExcelAttribute
(
name
=
"结算主体编码"
,
maxLength
=
50
)
@ExcelProperty
(
value
=
"结算主体编码"
)
private
String
deptNo
;
/**
* 结算主体名称
*/
@ExcelAttribute
(
name
=
"结算主体名称"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"结算主体名称不能超过50个字符"
)
@ExcelProperty
(
"结算主体名称"
)
@ExcelAttribute
(
name
=
"结算主体名称"
,
maxLength
=
50
)
@ExcelProperty
(
value
=
"结算主体名称"
)
private
String
deptName
;
/**
* 客户名称
*/
@ExcelAttribute
(
name
=
"客户名称"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"客户名称不能超过50个字符"
)
@ExcelProperty
(
"客户名称"
)
@ExcelAttribute
(
name
=
"客户名称"
,
maxLength
=
50
)
@ExcelProperty
(
value
=
"客户名称"
)
private
String
unitName
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryConfigStandard.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
*
工资报表配置-薪资配置6
*
薪资识别配置(标准模板)
*
* @author hgw
* @date 20
22-08-05 11:40:14
* @date 20
19-07-30 15:00:05
*/
@Data
@TableName
(
"t_salary_config_standard"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"工资报表配置-薪资配置6"
)
public
class
TSalaryConfigStandard
extends
BaseEntity
{
@TableName
(
"t_salary_config_standard"
)
@Tag
(
name
=
"薪资识别配置(标准模板)"
)
public
class
TSalaryConfigStandard
extends
Model
<
TSalaryConfigStandard
>
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"主键"
)
@ExcelProperty
(
value
=
"主键"
)
private
String
id
;
/**
* 中文名(Excel表头)
*/
@ExcelAttribute
(
name
=
"中文名(Excel表头)"
,
isNotEmpty
=
true
,
errorInfo
=
"中文名(Excel表头)不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"中文名(Excel表头)不能为空"
)
@ExcelProperty
(
value
=
"中文名(Excel表头)"
)
@Length
(
max
=
32
,
message
=
"中文名(Excel表头)不能超过32个字符"
)
@ExcelProperty
(
"中文名(Excel表头)"
)
@NotBlank
(
message
=
"中文名(Excel表头)不能为空"
)
@ExcelAttribute
(
name
=
"中文名(Excel表头)"
,
isNotEmpty
=
true
,
errorInfo
=
"中文名(Excel表头)不能为空"
,
maxLength
=
32
)
private
String
cnName
;
/**
* 数据库字段名
*/
@ExcelAttribute
(
name
=
"数据库字段名"
,
maxLength
=
32
)
@ExcelProperty
(
value
=
"数据库字段名"
)
@Length
(
max
=
32
,
message
=
"数据库字段名不能超过32个字符"
)
@ExcelProperty
(
"数据库字段名"
)
@ExcelAttribute
(
name
=
"数据库字段名"
,
maxLength
=
32
)
private
String
dbFiedName
;
/**
* JAVA属性字段名
*/
@ExcelAttribute
(
name
=
"JAVA属性字段名"
,
maxLength
=
32
)
@ExcelProperty
(
value
=
"JAVA属性字段名"
)
@Length
(
max
=
32
,
message
=
"JAVA属性字段名不能超过32个字符"
)
@ExcelProperty
(
"JAVA属性字段名"
)
@ExcelAttribute
(
name
=
"JAVA属性字段名"
,
maxLength
=
32
)
private
String
javaFiedName
;
/**
* 模板类型(数据字典)
*/
@ExcelAttribute
(
name
=
"模板类型(数据字典)"
,
isNotEmpty
=
true
,
errorInfo
=
"模板类型(数据字典)不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"模板类型(数据字典)不能为空"
)
@ExcelProperty
(
value
=
"模板类型(数据字典)"
)
@Length
(
max
=
32
,
message
=
"模板类型(数据字典)不能超过32个字符"
)
@ExcelProperty
(
"模板类型(数据字典)"
)
@NotBlank
(
message
=
"模板类型(数据字典)不能为空"
)
@ExcelAttribute
(
name
=
"模板类型(数据字典)"
,
isNotEmpty
=
true
,
errorInfo
=
"模板类型(数据字典)不能为空"
,
maxLength
=
32
)
private
String
modelType
;
/**
* 是否是必须
*/
@ExcelAttribute
(
name
=
"是否是必须"
,
isNotEmpty
=
true
,
errorInfo
=
"是否是必须不能为空"
,
maxLength
=
1
)
@ExcelProperty
(
value
=
"是否是必须(0:不是;1:必填)"
)
@NotBlank
(
message
=
"是否是必须不能为空"
)
@Length
(
max
=
1
,
message
=
"是否是必须不能超过1个字符"
)
@ExcelProperty
(
"是否是必须"
)
@ExcelAttribute
(
name
=
"是否是必须"
,
isNotEmpty
=
true
,
errorInfo
=
"是否是必须不能为空"
)
private
String
isMustNeed
;
/**
* 是否进行计算扣税:1:计算;0:不计算
*/
@ExcelAttribute
(
name
=
"是否进行计算扣税:1:计算;0:不计算"
,
isNotEmpty
=
true
,
errorInfo
=
"是否进行计算扣税:1:计算;0:不计算不能为空
"
)
@NotBlank
(
message
=
"是否进行计算扣税:1:计算;0:不计算
不能为空"
)
@ExcelProperty
(
"是否进行计算扣税:1:计算;0:不计算
"
)
@ExcelProperty
(
value
=
"是否进行计算扣税:1:计算;0:不计算
"
)
@NotBlank
(
message
=
"是否进行计算扣税
不能为空"
)
@ExcelAttribute
(
name
=
"是否进行计算扣税"
,
isNotEmpty
=
true
,
errorInfo
=
"是否进行计算扣税不能为空
"
)
private
Integer
isTax
;
/**
* 创建人
*/
@ExcelProperty
(
value
=
"创建人"
)
@Length
(
max
=
32
,
message
=
"创建人不能超过32个字符"
)
@NotBlank
(
message
=
"创建人不能为空"
)
@ExcelAttribute
(
name
=
"创建人"
,
isNotEmpty
=
true
,
errorInfo
=
"创建人不能为空"
,
maxLength
=
32
)
private
String
createUser
;
/**
* 创建时间
*/
@ExcelProperty
(
value
=
"创建时间"
)
@NotBlank
(
message
=
"创建时间不能为空"
)
@ExcelAttribute
(
name
=
"创建时间"
,
isNotEmpty
=
true
,
errorInfo
=
"创建时间不能为空"
)
private
LocalDateTime
createTime
;
/**
* 排序项
*/
@ExcelAttribute
(
nam
e
=
"排序项"
)
@ExcelProperty
(
"排序项"
)
private
Integer
orderLine
;
@ExcelProperty
(
valu
e
=
"排序项"
)
@ExcelAttribute
(
name
=
"排序项"
,
maxLength
=
32
)
private
String
orderLine
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryTaxConfig.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.
media.Schema
;
import
io.swagger.v3.oas.annotations.
tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.math.BigDecimal
;
/**
*
所得税配置-薪资配置3
*
个税比例及速算扣除数的配置表
*
* @author hgw
* @date 20
22-08-05 11:40:14
* @date 20
19-07-30 15:00:05
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"t_salary_tax_config"
)
@Schema
(
description
=
"所得税配置-薪资配置3"
)
public
class
TSalaryTaxConfig
{
@Tag
(
name
=
"薪资配置-所得税配置"
)
public
class
TSalaryTaxConfig
extends
Model
<
TSalaryTaxConfig
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"主键"
)
@ExcelProperty
(
value
=
"主键"
)
private
String
id
;
/**
* 累计预扣预缴应纳税所得额说明
*/
@ExcelAttribute
(
name
=
"累计预扣预缴应纳税所得额说明"
,
maxLength
=
32
)
@ExcelProperty
(
value
=
"累计预扣预缴应纳税所得额说明"
)
@Length
(
max
=
32
,
message
=
"累计预扣预缴应纳税所得额说明不能超过32个字符"
)
@ExcelProperty
(
"累计预扣预缴应纳税所得额说明"
)
@ExcelAttribute
(
name
=
"累计预扣预缴应纳税所得额说明"
,
maxLength
=
32
)
private
String
taxableIncomeRemark
;
/**
* 预扣率(%)
*/
@ExcelAttribute
(
name
=
"预扣率(%)"
,
isNotEmpty
=
true
,
errorInfo
=
"预扣率(%)不能为空
"
)
@ExcelProperty
(
value
=
"预扣率(%)
"
)
@NotBlank
(
message
=
"预扣率(%)不能为空"
)
@ExcelProperty
(
"预扣率(%)
"
)
@ExcelAttribute
(
name
=
"预扣率(%)"
,
isNotEmpty
=
true
,
errorInfo
=
"预扣率(%)不能为空
"
)
private
Integer
withholdingRate
;
/**
* 速算扣除数
*/
@ExcelAttribute
(
name
=
"速算扣除数"
,
isNotEmpty
=
true
,
errorInfo
=
"速算扣除数不能为空
"
)
@ExcelProperty
(
value
=
"速算扣除数
"
)
@NotBlank
(
message
=
"速算扣除数不能为空"
)
@ExcelProperty
(
"速算扣除数
"
)
@ExcelAttribute
(
name
=
"速算扣除数"
,
isNotEmpty
=
true
,
errorInfo
=
"速算扣除数不能为空
"
)
private
BigDecimal
quickDeducation
;
/**
* 最小区间值
*/
@ExcelAttribute
(
name
=
"最小区间值"
,
isNotEmpty
=
true
,
errorInfo
=
"最小区间值不能为空
"
)
@ExcelProperty
(
value
=
"最小区间值
"
)
@NotBlank
(
message
=
"最小区间值不能为空"
)
@ExcelProperty
(
"最小区间值
"
)
@ExcelAttribute
(
name
=
"最小区间值"
,
isNotEmpty
=
true
,
errorInfo
=
"最小区间值不能为空
"
)
private
BigDecimal
minIncome
;
/**
* 最大区间值
*/
@ExcelAttribute
(
name
=
"最大区间值"
,
isNotEmpty
=
true
,
errorInfo
=
"最大区间值不能为空
"
)
@ExcelProperty
(
value
=
"最大区间值
"
)
@NotBlank
(
message
=
"最大区间值不能为空"
)
@ExcelProperty
(
"最大区间值
"
)
@ExcelAttribute
(
name
=
"最大区间值"
,
isNotEmpty
=
true
,
errorInfo
=
"最大区间值不能为空
"
)
private
BigDecimal
maxIncome
;
/**
* 等级
*/
@ExcelAttribute
(
name
=
"等级"
,
isNotEmpty
=
true
,
errorInfo
=
"等级不能为空
"
)
@ExcelProperty
(
value
=
"等级
"
)
@NotBlank
(
message
=
"等级不能为空"
)
@ExcelProperty
(
"等级
"
)
@ExcelAttribute
(
name
=
"等级"
,
isNotEmpty
=
true
,
errorInfo
=
"等级不能为空
"
)
private
Integer
level
;
/**
* 类型:0:工资;1:年终奖
*/
@ExcelAttribute
(
name
=
"类型:0:工资;1:年终奖"
,
isNotEmpty
=
true
,
errorInfo
=
"类型:0:工资;1:年终奖不能为空
"
)
@NotBlank
(
message
=
"类型:0:工资;1:年终奖
不能为空"
)
@ExcelProperty
(
"类型:0:工资;1:年终奖
"
)
@ExcelProperty
(
value
=
"类型:0:工资;1:年终奖
"
)
@NotBlank
(
message
=
"类型
不能为空"
)
@ExcelAttribute
(
name
=
"类型"
,
isNotEmpty
=
true
,
errorInfo
=
"类型不能为空
"
)
private
Integer
type
;
/**
* 个税起征点或年终奖个税临界值
*/
@ExcelProperty
(
value
=
"个税起征点或年终奖个税临界值"
)
@ExcelAttribute
(
name
=
"个税起征点或年终奖个税临界值"
)
@ExcelProperty
(
"个税起征点或年终奖个税临界值"
)
private
BigDecimal
startPoint
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSpecialDeducationSum.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
/**
* 专项扣除配置表-薪资配置5
*
* @author hgw
* @date 2022-08-05 11:40:14
*/
* @Author fxj
* @Description 专项扣除
* @Date 13:40 2022/8/6
* @Param
* @return
**/
@Data
@TableName
(
"t_special_deducation_sum"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"专项扣除配置表-薪资配置5"
)
public
class
TSpecialDeducationSum
extends
BaseEntity
{
@TableName
(
"t_special_deducation_sum"
)
@Tag
(
name
=
"专项扣除"
)
public
class
TSpecialDeducationSum
extends
Model
<
TSpecialDeducationSum
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"id"
)
@ExcelProperty
(
value
=
"id"
)
private
String
id
;
/**
* 创建人
*/
@NotBlank
(
message
=
"创建人不能为空"
)
@Length
(
max
=
32
,
message
=
"创建人不能超过32个字符"
)
@ExcelAttribute
(
name
=
"创建人"
,
isNotEmpty
=
true
,
errorInfo
=
"创建人不能为空"
,
maxLength
=
32
)
@ExcelProperty
(
value
=
"创建人"
)
private
String
createUser
;
/**
* 创建时间
*/
@NotBlank
(
message
=
"创建时间不能为空"
)
@ExcelAttribute
(
name
=
"创建时间"
,
isNotEmpty
=
true
,
errorInfo
=
"创建时间不能为空"
)
@ExcelProperty
(
value
=
"创建时间"
)
private
LocalDateTime
createTime
;
/**
* 导入月份
*/
@ExcelAttribute
(
name
=
"导入月份"
,
isNotEmpty
=
true
,
errorInfo
=
"导入月份不能为空"
,
maxLength
=
6
)
@NotBlank
(
message
=
"导入月份不能为空"
)
@Length
(
max
=
6
,
message
=
"导入月份不能超过6个字符"
)
@ExcelProperty
(
"导入月份"
)
@ExcelAttribute
(
name
=
"导入月份"
,
isNotEmpty
=
true
,
errorInfo
=
"导入月份不能为空"
,
maxLength
=
6
)
@ExcelProperty
(
value
=
"导入月份"
)
private
String
createMonth
;
/**
* 申报单位
*/
@ExcelAttribute
(
name
=
"申报单位"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"申报单位不能超过20个字符"
)
@ExcelProperty
(
"申报单位"
)
@ExcelAttribute
(
name
=
"申报单位"
,
maxLength
=
20
)
@ExcelProperty
(
value
=
"申报单位"
)
private
String
declareTitle
;
/**
* 工号
*/
@ExcelAttribute
(
name
=
"工号"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"工号不能超过50个字符"
)
@ExcelProperty
(
"工号"
)
@ExcelAttribute
(
name
=
"工号"
,
maxLength
=
50
)
@ExcelProperty
(
value
=
"工号"
)
private
String
jobNumber
;
/**
* 姓名
*/
@ExcelAttribute
(
name
=
"姓名"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"姓名不能超过20个字符"
)
@ExcelProperty
(
"姓名"
)
@ExcelAttribute
(
name
=
"姓名"
,
maxLength
=
20
)
@ExcelProperty
(
value
=
"姓名"
)
private
String
name
;
/**
* 证照类型
*/
@ExcelAttribute
(
name
=
"证照类型"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"证照类型不能超过20个字符"
)
@ExcelProperty
(
"证照类型"
)
@ExcelAttribute
(
name
=
"证照类型"
,
maxLength
=
20
)
@ExcelProperty
(
value
=
"证照类型"
)
private
String
type
;
/**
* 证照号码
*/
@ExcelAttribute
(
name
=
"证照号码"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"证照号码不能超过20个字符"
)
@ExcelProperty
(
"证照号码"
)
@ExcelAttribute
(
name
=
"证照号码"
,
maxLength
=
20
)
@ExcelProperty
(
value
=
"证照号码"
)
private
String
idNumber
;
/**
* 所得期间起
*/
@ExcelAttribute
(
name
=
"所得期间起"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"所得期间起不能超过20个字符"
)
@ExcelProperty
(
"所得期间起"
)
@ExcelAttribute
(
name
=
"所得期间起"
,
maxLength
=
20
)
@ExcelProperty
(
value
=
"所得期间起"
)
private
String
createStart
;
/**
* 所得期间止
*/
@ExcelAttribute
(
name
=
"所得期间止"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"所得期间止不能超过20个字符"
)
@ExcelProperty
(
"所得期间止"
)
@ExcelAttribute
(
name
=
"所得期间止"
,
maxLength
=
20
)
@ExcelProperty
(
value
=
"所得期间止"
)
private
String
createEnd
;
/**
* 本期收入
*/
@ExcelAttribute
(
name
=
"本期收入"
)
@ExcelProperty
(
"本期收入"
)
@ExcelProperty
(
value
=
"本期收入"
)
private
BigDecimal
currentIncome
;
/**
* 本期免税收入
*/
@ExcelAttribute
(
name
=
"本期免税收入"
)
@ExcelProperty
(
"本期免税收入"
)
@ExcelProperty
(
value
=
"本期免税收入"
)
private
BigDecimal
currentIncomeTaxFree
;
/**
* 基本医疗保险费
*/
@ExcelAttribute
(
name
=
"基本医疗保险费"
)
@ExcelProperty
(
"基本医疗保险费"
)
@ExcelProperty
(
value
=
"基本医疗保险费"
)
private
BigDecimal
insurancePension
;
/**
* 基本医疗保险费
*/
@ExcelAttribute
(
name
=
"基本医疗保险费"
)
@ExcelProperty
(
"基本医疗保险费"
)
@ExcelProperty
(
value
=
"基本医疗保险费"
)
private
BigDecimal
insuranceMedical
;
/**
* 失业保险费
*/
@ExcelAttribute
(
name
=
"失业保险费"
)
@ExcelProperty
(
"失业保险费"
)
@ExcelProperty
(
value
=
"失业保险费"
)
private
BigDecimal
insuranceUnemployment
;
/**
* 住房公积金
*/
@ExcelAttribute
(
name
=
"住房公积金"
)
@ExcelProperty
(
"住房公积金"
)
@ExcelProperty
(
value
=
"住房公积金"
)
private
BigDecimal
fund
;
/**
* 累计子女教育
*/
@ExcelAttribute
(
name
=
"累计子女教育"
)
@ExcelProperty
(
"累计子女教育"
)
@ExcelProperty
(
value
=
"累计子女教育"
)
private
BigDecimal
sumChildEduMoney
;
/**
* 累计住房租金
*/
@ExcelAttribute
(
name
=
"累计住房租金"
)
@ExcelProperty
(
"累计住房租金"
)
@ExcelProperty
(
value
=
"累计住房租金"
)
private
BigDecimal
sumHousingLoanMoney
;
/**
* 累计住房租金
*/
@ExcelAttribute
(
name
=
"累计住房租金"
)
@ExcelProperty
(
"累计住房租金"
)
@ExcelProperty
(
value
=
"累计住房租金"
)
private
BigDecimal
sumHousingRentMoney
;
/**
* 累计赡养老人
*/
@ExcelAttribute
(
name
=
"累计赡养老人"
)
@ExcelProperty
(
"累计赡养老人"
)
@ExcelProperty
(
value
=
"累计赡养老人"
)
private
BigDecimal
sumSupportElderlyMoney
;
/**
* 累计继续教育
*/
@ExcelAttribute
(
name
=
"累计继续教育"
)
@ExcelProperty
(
"累计继续教育"
)
@ExcelProperty
(
value
=
"累计继续教育"
)
private
BigDecimal
sumContinuingEducationMoney
;
/**
* 累计婴幼儿照护费用
* hgw 2022-4-2 11:05:44 樊青青提的需求
*/
@ExcelAttribute
(
name
=
"累计婴幼儿照护费用"
)
@ExcelProperty
(
"累计婴幼儿照护费用"
)
@ExcelProperty
(
value
=
"累计婴幼儿照护费用"
)
private
BigDecimal
sumBabyMoney
;
/**
* 企业(职业)年金
*/
@ExcelAttribute
(
name
=
"企业(职业)年金"
)
@ExcelProperty
(
"企业(职业)年金"
)
@ExcelProperty
(
value
=
"企业(职业)年金"
)
private
BigDecimal
enterpriseAnnuity
;
/**
* 商业健康保险
*/
@ExcelAttribute
(
name
=
"商业健康保险"
)
@ExcelProperty
(
"商业健康保险"
)
@ExcelProperty
(
value
=
"商业健康保险"
)
private
BigDecimal
takingRisks
;
/**
* 税延养老保险
*/
@ExcelAttribute
(
name
=
"税延养老保险"
)
@ExcelProperty
(
"税延养老保险"
)
@ExcelProperty
(
value
=
"税延养老保险"
)
private
BigDecimal
taxDeferredInsurance
;
/**
* 其他
*/
@ExcelAttribute
(
name
=
"其他"
)
@ExcelProperty
(
"其他"
)
@ExcelProperty
(
value
=
"其他"
)
private
BigDecimal
otherMoney
;
/**
* 准予扣除的捐赠额
*/
@ExcelAttribute
(
name
=
"准予扣除的捐赠额"
)
@ExcelProperty
(
"准予扣除的捐赠额"
)
@ExcelProperty
(
value
=
"准予扣除的捐赠额"
)
private
BigDecimal
donationAmount
;
/**
* 税前扣除项目合计
*/
@ExcelAttribute
(
name
=
"税前扣除项目合计"
)
@ExcelProperty
(
"税前扣除项目合计"
)
@ExcelProperty
(
value
=
"税前扣除项目合计"
)
private
BigDecimal
preTaxDeduction
;
/**
* 减免税额
*/
@ExcelAttribute
(
name
=
"减免税额"
)
@ExcelProperty
(
"减免税额"
)
@ExcelProperty
(
value
=
"减免税额"
)
private
BigDecimal
taxSavings
;
/**
* 减除费用
*/
@ExcelAttribute
(
name
=
"减除费用"
)
@ExcelProperty
(
"减除费用"
)
@ExcelProperty
(
value
=
"减除费用"
)
private
BigDecimal
costReduction
;
/**
* 已扣缴税额
*/
@ExcelAttribute
(
name
=
"已扣缴税额"
)
@ExcelProperty
(
"已扣缴税额"
)
@ExcelProperty
(
value
=
"已扣缴税额"
)
private
BigDecimal
taxesWithheld
;
/**
* 备注
*/
@ExcelAttribute
(
name
=
"备注"
,
maxLength
=
500
)
@Length
(
max
=
500
,
message
=
"备注不能超过500个字符"
)
@ExcelProperty
(
"备注"
)
@ExcelAttribute
(
name
=
"备注"
,
maxLength
=
500
)
@ExcelProperty
(
value
=
"备注"
)
private
String
remark
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/package-info.java
deleted
100644 → 0
View file @
2b54ba92
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
;
\ No newline at end of file
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TConfigSalaryController.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.salary.entity.TConfigSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TConfigSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TConfigSalarySearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.
Required
ArgsConstructor
;
import
lombok.
All
ArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
java.util.List
;
/**
* 项目基础薪酬配置-薪资配置2
*
* @author hgw
* @date 2022-08-05 11:40:14
*/
* @Author fxj
* @Description 工资报账配置
* @Date 13:32 2022/8/6
* @Param
* @return
**/
@RestController
@
Required
ArgsConstructor
@
All
ArgsConstructor
@RequestMapping
(
"/tconfigsalary"
)
@Tag
(
name
=
"
项目基础薪酬配置-薪资配置2管理
"
)
@Tag
(
name
=
"
薪资配置-普通工资配置
"
)
public
class
TConfigSalaryController
{
private
final
TConfigSalaryService
tConfigSalaryService
;
/**
* @param settleDepart 结算主体id
* @Description: 获取结算主体下的配置信息
* @Author: hgw
* @Date: 2019/9/12 17:05
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Operation
(
description
=
"获取结算主体下的配置列表"
)
@SysLog
(
"获取结算主体下的配置列表"
)
@PostMapping
(
"getTConfigSalaryList"
)
//@PreAuthorize("@pms.hasPermission('wxhr:salary_upload')")
public
R
getTConfigSalaryList
(
@RequestParam
String
settleDepart
)
{
TConfigSalary
configSalary
=
new
TConfigSalary
();
configSalary
.
setDepartId
(
settleDepart
);
QueryWrapper
<
TConfigSalary
>
queryWrapperCs
=
new
QueryWrapper
<>();
queryWrapperCs
.
setEntity
(
configSalary
);
List
<
TConfigSalary
>
configSalaryList
=
tConfigSalaryService
.
list
(
queryWrapperCs
);
return
new
R
<>(
configSalaryList
);
}
/**
* 简单分页查询
*
* @param page 分页对象
* @param tConfigSalary
项目基础薪酬配置-薪资配置2
* @param tConfigSalary
工资报账配置
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TConfigSalary
>>
getTConfigSalaryPage
(
Page
<
TConfigSalary
>
page
,
TConfigSalary
SearchVo
tConfigSalary
)
{
public
R
<
IPage
<
TConfigSalary
>>
getTConfigSalaryPage
(
Page
<
TConfigSalary
>
page
,
TConfigSalary
tConfigSalary
)
{
return
new
R
<>(
tConfigSalaryService
.
getTConfigSalaryPage
(
page
,
tConfigSalary
));
}
/**
* 不分页查询
*
* @param tConfigSalary 项目基础薪酬配置-薪资配置2
* @return
*/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@PostMapping
(
"/noPage"
)
//@PreAuthorize("@pms.hasPermission('salary_tconfigsalary_get')" )
public
R
<
List
<
TConfigSalary
>>
getTConfigSalaryNoPage
(
@RequestBody
TConfigSalarySearchVo
tConfigSalary
)
{
return
R
.
ok
(
tConfigSalaryService
.
noPageDiy
(
tConfigSalary
));
}
/**
* 通过id查询
项目基础薪酬配置-薪资配置2
* 通过id查询
单条记录
*
* @param id
id
* @param id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('salary_tconfigsalary_get')
"
)
@Operation
(
description
=
"id查询
"
)
@GetMapping
(
"/{id}"
)
public
R
<
TConfigSalary
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tConfigSalaryService
.
getById
(
id
));
return
new
R
<>
(
tConfigSalaryService
.
getById
(
id
));
}
/**
* 新增
项目基础薪酬配置-薪资配置2
* 新增
记录
*
* @param tConfigSalary
项目基础薪酬配置-薪资配置2
* @param tConfigSalary
* @return R
*/
@Operation
(
summary
=
"新增项目基础薪酬配置-薪资配置2"
,
description
=
"新增项目基础薪酬配置-薪资配置2:hasPermission('salary_tconfigsalary_add')"
)
@SysLog
(
"新增项目基础薪酬配置-薪资配置2"
)
@Operation
(
description
=
"新增(wxhr:tconfigsalary_add)"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('
salary_
tconfigsalary_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TConfigSalary
tConfigSalary
)
{
return
R
.
ok
(
tConfigSalaryService
.
save
(
tConfigSalary
));
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tconfigsalary_add')"
)
public
R
save
(
@Valid
@RequestBody
TConfigSalary
tConfigSalary
)
{
return
new
R
<>
(
tConfigSalaryService
.
save
(
tConfigSalary
));
}
/**
* 修改
项目基础薪酬配置-薪资配置2
* 修改
记录
*
* @param tConfigSalary
项目基础薪酬配置-薪资配置2
* @param tConfigSalary
* @return R
*/
@Operation
(
summary
=
"修改项目基础薪酬配置-薪资配置2"
,
description
=
"修改项目基础薪酬配置-薪资配置2:hasPermission('salary_tconfigsalary_edit'
)"
)
@SysLog
(
"修改
项目基础薪酬配置-薪资配置2
"
)
@Operation
(
description
=
"修改(wxhr:tconfigsalary_edit
)"
)
@SysLog
(
"修改
工资报账配置
"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('
salary_
tconfigsalary_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TConfigSalary
tConfigSalary
)
{
return
R
.
ok
(
tConfigSalaryService
.
updateById
(
tConfigSalary
));
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tconfigsalary_edit')"
)
public
R
update
(
@RequestBody
TConfigSalary
tConfigSalary
)
{
return
new
R
<>
(
tConfigSalaryService
.
updateById
(
tConfigSalary
));
}
/**
* 通过id删除
项目基础薪酬配置-薪资配置2
* 通过id删除
一条记录
*
* @param id
id
* @param id
* @return R
*/
@Operation
(
summary
=
"通过id删除项目基础薪酬配置-薪资配置2"
,
description
=
"通过id删除项目基础薪酬配置-薪资配置2:hasPermission('salary_tconfigsalary_del'
)"
)
@SysLog
(
"
通过id删除项目基础薪酬配置-薪资配置2
"
)
@Operation
(
description
=
"删除(wxhr:tconfigsalary_del
)"
)
@SysLog
(
"
删除工资报账配置
"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('
salary_
tconfigsalary_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tConfigSalaryService
.
removeById
(
id
));
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tconfigsalary_del')"
)
public
R
removeById
(
@PathVariable
String
id
)
{
return
new
R
<>
(
tConfigSalaryService
.
removeById
(
id
));
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TMinSalaryController.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TMinSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TMinSalarySearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.
Required
ArgsConstructor
;
import
lombok.
All
ArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
javax.validation.Valid
;
import
java.time.LocalDateTime
;
/**
* 最低工资配置-薪资配置4
*
* @author hgw
* @date 2022-08-05 11:40:14
*/
* @Author fxj
* @Description 各地市最低工资标准
* @Date 13:32 2022/8/6
* @Param
* @return
**/
@RestController
@
Required
ArgsConstructor
@
All
ArgsConstructor
@RequestMapping
(
"/tminsalary"
)
@Tag
(
name
=
"
最低工资配置-薪资配置4管理
"
)
@Tag
(
name
=
"
薪资配置-最低工资配置
"
)
public
class
TMinSalaryController
{
private
final
TMinSalaryService
tMinSalaryService
;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tMinSalary
最低工资配置-薪资配置4
* @param tMinSalary
各地市最低工资标准
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TMinSalary
>>
getTMinSalaryPage
(
Page
<
TMinSalary
>
page
,
TMinSalary
SearchVo
tMinSalary
)
{
public
R
<
IPage
<
TMinSalary
>>
getTMinSalaryPage
(
Page
<
TMinSalary
>
page
,
TMinSalary
tMinSalary
)
{
return
new
R
<>(
tMinSalaryService
.
getTMinSalaryPage
(
page
,
tMinSalary
));
}
/**
* 不分页查询
*
* @param tMinSalary 最低工资配置-薪资配置4
* @return
*/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@PostMapping
(
"/noPage"
)
//@PreAuthorize("@pms.hasPermission('salary_tminsalary_get')" )
public
R
<
List
<
TMinSalary
>>
getTMinSalaryNoPage
(
@RequestBody
TMinSalarySearchVo
tMinSalary
)
{
return
R
.
ok
(
tMinSalaryService
.
noPageDiy
(
tMinSalary
));
}
/**
* 通过id查询
最低工资配置-薪资配置4
* 通过id查询
单条记录
*
* @param id
id
* @param id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('salary_tminsalary_get')
"
)
@Operation
(
description
=
"id查询
"
)
@GetMapping
(
"/{id}"
)
public
R
<
TMinSalary
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tMinSalaryService
.
getById
(
id
));
return
new
R
<>
(
tMinSalaryService
.
getById
(
id
));
}
/**
* 新增
最低工资配置-薪资配置4
* 新增
记录
*
* @param tMinSalary
最低工资配置-薪资配置4
* @param tMinSalary
* @return R
*/
@Operation
(
summary
=
"新增最低工资配置-薪资配置4"
,
description
=
"新增最低工资配置-薪资配置4:hasPermission('salary_tminsalary_add')"
)
@SysLog
(
"新增最低工资配置-薪资配置4"
)
@Operation
(
description
=
"新增(wxhr:tminsalary_add)"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('salary_tminsalary_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TMinSalary
tMinSalary
)
{
return
R
.
ok
(
tMinSalaryService
.
save
(
tMinSalary
));
@PreAuthorize
(
"@pms.hasPermission('wxhr:tminsalary_add')"
)
public
R
save
(
@Valid
@RequestBody
TMinSalary
tMinSalary
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
"获取登录用户信息失败!"
);
}
tMinSalary
.
setCreateDate
(
LocalDateTime
.
now
());
tMinSalary
.
setCreateUser
(
String
.
valueOf
(
user
.
getId
()));
return
new
R
<>(
tMinSalaryService
.
save
(
tMinSalary
));
}
/**
* 修改
最低工资配置-薪资配置4
* 修改
记录
*
* @param tMinSalary
最低工资配置-薪资配置4
* @param tMinSalary
* @return R
*/
@Operation
(
summary
=
"修改最低工资配置-薪资配置4"
,
description
=
"修改最低工资配置-薪资配置4:hasPermission('salary_tminsalary_edit'
)"
)
@SysLog
(
"修改
最低工资配置-薪资配置4
"
)
@Operation
(
description
=
"修改(wxhr:tminsalary_edit
)"
)
@SysLog
(
"修改
各地市最低工资标准
"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('
salary_
tminsalary_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TMinSalary
tMinSalary
)
{
return
R
.
ok
(
tMinSalaryService
.
updateById
(
tMinSalary
));
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tminsalary_edit')"
)
public
R
update
(
@RequestBody
TMinSalary
tMinSalary
)
{
return
new
R
<>
(
tMinSalaryService
.
updateById
(
tMinSalary
));
}
/**
* 通过id删除
最低工资配置-薪资配置4
* 通过id删除
一条记录
*
* @param id
id
* @param id
* @return R
*/
@Operation
(
summary
=
"通过id删除最低工资配置-薪资配置4"
,
description
=
"通过id删除最低工资配置-薪资配置4:hasPermission('salary_tminsalary_del'
)"
)
@SysLog
(
"
通过id删除最低工资配置-薪资配置4
"
)
@Operation
(
description
=
"删除(wxhr:tminsalary_del
)"
)
@SysLog
(
"
删除各地市最低工资标准
"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('
salary_
tminsalary_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tMinSalaryService
.
removeById
(
id
));
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tminsalary_del')"
)
public
R
removeById
(
@PathVariable
String
id
)
{
return
new
R
<>
(
tMinSalaryService
.
removeById
(
id
));
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TOwnDeptController.java
0 → 100644
View file @
b23508c5
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.salary.entity.TOwnDept
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TOwnDeptService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.AllArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
/**
* @Author fxj
* @Description 自有员工所在结算主体大全表
* @Date 13:32 2022/8/6
* @Param
* @return
**/
@RestController
@AllArgsConstructor
@RequestMapping
(
"/towndept"
)
@Tag
(
name
=
"自有员工所在结算主体大全表"
)
public
class
TOwnDeptController
{
private
final
TOwnDeptService
tOwnDeptService
;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tOwnDept 自有员工所在结算主体大全表
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TOwnDept
>>
getTOwnDeptPage
(
Page
<
TOwnDept
>
page
,
TOwnDept
tOwnDept
)
{
return
new
R
<>(
tOwnDeptService
.
getTOwnDeptPage
(
page
,
tOwnDept
));
}
/**
* 通过id查询单条记录
*
* @param id
* @return R
*/
@Operation
(
description
=
"id查询"
)
@GetMapping
(
"/{id}"
)
public
R
<
TOwnDept
>
getById
(
@PathVariable
(
"id"
)
Integer
id
)
{
return
new
R
<>(
tOwnDeptService
.
getById
(
id
));
}
/**
* 新增记录
*
* @param tOwnDept
* @return R
*/
@Operation
(
description
=
"新增(wxhr:towndept_add)"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('wxhr:towndept_add')"
)
public
R
<
Boolean
>
save
(
@Valid
@RequestBody
TOwnDept
tOwnDept
)
{
return
new
R
<>(
tOwnDeptService
.
save
(
tOwnDept
));
}
/**
* 修改记录
*
* @param tOwnDept
* @return R
*/
@Operation
(
description
=
"修改(wxhr:towndept_edit)"
)
@SysLog
(
"修改自有员工所在结算主体大全表"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('wxhr:towndept_edit')"
)
public
R
<
Boolean
>
update
(
@RequestBody
TOwnDept
tOwnDept
)
{
return
new
R
<>(
tOwnDeptService
.
updateById
(
tOwnDept
));
}
/**
* 通过id删除一条记录
*
* @param id
* @return R
*/
@Operation
(
description
=
"删除(wxhr:towndept_del)"
)
@SysLog
(
"删除自有员工所在结算主体大全表"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:towndept_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
Integer
id
)
{
return
new
R
<>(
tOwnDeptService
.
removeById
(
id
));
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryConfigStandardController.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryConfigStandard
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryConfigStandardService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryConfigStandardSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.
Required
ArgsConstructor
;
import
lombok.
All
ArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* 工资报表配置-薪资配置6
*
* @author hgw
* @date 2022-08-05 11:40:14
*/
* @Author fxj
* @Description 薪资识别配置(标准模板)
* @Date 13:32 2022/8/6
* @Param
* @return
**/
@RestController
@
Required
ArgsConstructor
@
All
ArgsConstructor
@RequestMapping
(
"/tsalaryconfigstandard"
)
@Tag
(
name
=
"
工资报表配置-薪资配置6管理
"
)
@Tag
(
name
=
"
薪资识别配置(标准模板)
"
)
public
class
TSalaryConfigStandardController
{
private
final
TSalaryConfigStandardService
tSalaryConfigStandardService
;
// 获取登录人信息为空
private
static
final
String
NO_USER
=
"获取登录人信息为空"
;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tSalaryConfigStandard
工资报表配置-薪资配置6
* @param tSalaryConfigStandard
薪资识别配置(标准模板)
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TSalaryConfigStandard
>>
getTSalaryConfigStandardPage
(
Page
<
TSalaryConfigStandard
>
page
,
TSalaryConfigStandard
SearchVo
tSalaryConfigStandard
)
{
public
R
<
IPage
<
TSalaryConfigStandard
>>
getTSalaryConfigStandardPage
(
Page
<
TSalaryConfigStandard
>
page
,
TSalaryConfigStandard
tSalaryConfigStandard
)
{
return
new
R
<>(
tSalaryConfigStandardService
.
getTSalaryConfigStandardPage
(
page
,
tSalaryConfigStandard
));
}
/**
*
不分页查询
*
* @
param tSalaryConfigStandard 工资报表配置-薪资配置6
* @
return
*
/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@
PostMapping
(
"/noPage
"
)
//@PreAuthorize("@pms.hasPermission('salary_tsalaryconfigstandard_get')"
)
public
R
<
List
<
TSalaryConfigStandard
>>
getTSalaryConfigStandard
NoPage
(
@RequestBody
TSalaryConfigStandardSearchVo
tSalaryConfigStandard
)
{
return
R
.
ok
(
tSalaryConfigStandardService
.
noPageDiy
(
tSalaryConfigStandard
));
*
@param tSalaryConfigStandard
*
@Description: 获取列表
* @
Author: hgw
* @
Date: 2021/1/7 11:39
*
@return: com.yifu.cloud.v1.common.core.util.R<java.util.List < com.yifu.cloud.v1.hrms.api.entity.TSalaryConfigStandard>>
**/
@
Operation
(
description
=
"获取配置列表
"
)
@GetMapping
(
"/getTSalaryConfigStandardList"
)
public
R
<
List
<
TSalaryConfigStandard
>>
getTSalaryConfigStandard
List
(
TSalaryConfigStandard
tSalaryConfigStandard
)
{
return
new
R
<>(
tSalaryConfigStandardService
.
getTSalaryConfigStandardList
(
tSalaryConfigStandard
));
}
/**
* 通过id查询
工资报表配置-薪资配置6
* 通过id查询
单条记录
*
* @param id
id
* @param id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('salary_tsalaryconfigstandard_get')
"
)
@Operation
(
description
=
"id查询
"
)
@GetMapping
(
"/{id}"
)
public
R
<
TSalaryConfigStandard
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tSalaryConfigStandardService
.
getById
(
id
));
return
new
R
<>(
tSalaryConfigStandardService
.
getById
(
id
));
}
/**
* 新增记录
*
* @param tSalaryConfigStandard
* @return R
*/
@Operation
(
description
=
"查询薪资识别配置是否已存在"
)
@SysLog
(
"查询薪资识别配置是否已存在"
)
@PostMapping
(
"/findExistence"
)
public
R
<
String
>
findExistence
(
@RequestBody
TSalaryConfigStandard
tSalaryConfigStandard
)
{
if
(
tSalaryConfigStandard
!=
null
)
{
if
(
Common
.
isNotNull
(
tSalaryConfigStandard
.
getCnName
())
&&
Common
.
isNotNull
(
tSalaryConfigStandard
.
getDbFiedName
()))
{
IPage
<
TSalaryConfigStandard
>
scsPage
=
tSalaryConfigStandardService
.
getTSalaryConfigStandardPage
(
new
Page
(),
tSalaryConfigStandard
);
if
(
scsPage
!=
null
&&
scsPage
.
getTotal
()
>
CommonConstants
.
ZERO_INT
)
{
return
R
.
failed
(
"已存在配置"
);
}
else
{
return
R
.
ok
(
"可以保存"
);
}
}
else
{
return
R
.
failed
(
"查找的信息不全"
);
}
}
return
R
.
failed
(
"查找的信息不全"
);
}
/**
* 新增
工资报表配置-薪资配置6
* 新增
记录
*
* @param tSalaryConfigStandard
工资报表配置-薪资配置6
* @param tSalaryConfigStandard
* @return R
*/
@Operation
(
summary
=
"新增工资报表配置-薪资配置6"
,
description
=
"新增工资报表配置-薪资配置6:hasPermission('salary_tsalaryconfigstandard_add')
"
)
@SysLog
(
"新增
工资报表配置-薪资配置6
"
)
@Operation
(
description
=
"新增
"
)
@SysLog
(
"新增
薪资识别配置(标准模板)
"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('
salary_
tsalaryconfigstandard_add')"
)
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tsalaryconfigstandard_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TSalaryConfigStandard
tSalaryConfigStandard
)
{
return
R
.
ok
(
tSalaryConfigStandardService
.
save
(
tSalaryConfigStandard
));
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
NO_USER
);
}
// 填充个人代扣等java字段
this
.
setJavaFiedName
(
tSalaryConfigStandard
);
tSalaryConfigStandard
.
setCreateUser
(
String
.
valueOf
(
user
.
getId
()));
tSalaryConfigStandard
.
setCreateTime
(
LocalDateTime
.
now
());
tSalaryConfigStandard
.
setIsMustNeed
(
CommonConstants
.
ZERO_STRING
);
tSalaryConfigStandard
.
setModelType
(
CommonConstants
.
ONE_STRING
);
tSalaryConfigStandard
.
setIsTax
(
CommonConstants
.
ZERO_INT
);
return
new
R
<>(
tSalaryConfigStandardService
.
save
(
tSalaryConfigStandard
));
}
/**
* 修改
工资报表配置-薪资配置6
* 修改
记录
*
* @param tSalaryConfigStandard
工资报表配置-薪资配置6
* @param tSalaryConfigStandard
* @return R
*/
@Operation
(
summary
=
"修改工资报表配置-薪资配置6"
,
description
=
"修改工资报表配置-薪资配置6:hasPermission('salary_tsalaryconfigstandard_edit')
"
)
@SysLog
(
"修改
工资报表配置-薪资配置6
"
)
@Operation
(
description
=
"修改
"
)
@SysLog
(
"修改
薪资识别配置(标准模板)
"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('salary_tsalaryconfigstandard_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TSalaryConfigStandard
tSalaryConfigStandard
)
{
return
R
.
ok
(
tSalaryConfigStandardService
.
updateById
(
tSalaryConfigStandard
));
@PreAuthorize
(
"@pms.hasPermission('wxhr:tsalaryconfigstandard_edit')"
)
public
R
<
Boolean
>
update
(
@RequestBody
TSalaryConfigStandard
tSalaryConfigStandard
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
NO_USER
);
}
// 填充个人代扣等java字段
this
.
setJavaFiedName
(
tSalaryConfigStandard
);
if
(
String
.
valueOf
(
user
.
getId
()).
equals
(
tSalaryConfigStandard
.
getCreateUser
()))
{
return
new
R
<>(
tSalaryConfigStandardService
.
updateById
(
tSalaryConfigStandard
));
}
else
{
return
R
.
failed
(
"不可修改非自己创建的!"
);
}
}
/**
* 通过id删除工资报表配置-薪资配置6
* @param tSalaryConfigStandard
* @Description: 填充个人代扣等java字段
* @Author: hgw
* @Date: 2022/4/26 16:50
* @return: void
**/
private
void
setJavaFiedName
(
@RequestBody
TSalaryConfigStandard
tSalaryConfigStandard
)
{
if
(
Common
.
isNotNull
(
tSalaryConfigStandard
.
getCnName
()))
{
if
(
tSalaryConfigStandard
.
getCnName
().
contains
(
"个人代扣-"
))
{
tSalaryConfigStandard
.
setJavaFiedName
(
SalaryConstants
.
PDEDUCTION_JAVA
);
}
else
if
(
tSalaryConfigStandard
.
getCnName
().
contains
(
"单位代扣-"
))
{
tSalaryConfigStandard
.
setJavaFiedName
(
SalaryConstants
.
UDEDUCTION_JAVA
);
}
}
}
/**
* 通过id删除一条记录
*
* @param id
id
* @param id
* @return R
*/
@Operation
(
summary
=
"通过id删除工资报表配置-薪资配置6"
,
description
=
"通过id删除工资报表配置-薪资配置6:hasPermission('salary_tsalaryconfigstandard_del')
"
)
@SysLog
(
"
通过id删除工资报表配置-薪资配置6
"
)
@Operation
(
description
=
"删除
"
)
@SysLog
(
"
删除薪资识别配置(标准模板)
"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('
salary_
tsalaryconfigstandard_del')"
)
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tsalaryconfigstandard_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tSalaryConfigStandardService
.
removeById
(
id
));
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
NO_USER
);
}
TSalaryConfigStandard
sc
=
tSalaryConfigStandardService
.
getById
(
id
);
if
(
String
.
valueOf
(
user
.
getId
()).
equals
(
sc
.
getCreateUser
()))
{
return
new
R
<>(
tSalaryConfigStandardService
.
removeById
(
id
));
}
else
{
return
R
.
failed
(
"不可删除非自己创建的!"
);
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryTaxConfigController.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.salary.constants.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryTaxConfig
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryTaxConfigService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryTaxConfigSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.
Required
ArgsConstructor
;
import
lombok.
All
ArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 所得税配置-薪资配置3
*
* @author hgw
* @date 2022-08-05 11:40:14
*/
* @Author fxj
* @Description 个税比例及速算扣除数的配置表
* @Date 13:33 2022/8/6
* @Param
* @return
**/
@RestController
@
Required
ArgsConstructor
@
All
ArgsConstructor
@RequestMapping
(
"/tsalarytaxconfig"
)
@Tag
(
name
=
"
所得税配置-薪资配置3管理
"
)
@Tag
(
name
=
"
薪资配置-所得税配置
"
)
public
class
TSalaryTaxConfigController
{
private
final
TSalaryTaxConfigService
tSalaryTaxConfigService
;
/**
* @param page 分页对象
* @param tSalaryTaxConfig 个税比例及速算扣除数的配置表
* @Description: 工资个税-分页查询
* @Author: hgw
* @Date: 2019/10/15 18:06
* @return: com.yifu.cloud.v1.common.core.util.R<com.baomidou.mybatisplus.core.metadata.IPage < com.yifu.cloud.v1.hrms.api.entity.TSalaryTaxConfig>>
**/
@Operation
(
description
=
"工资个税-分页查询"
)
@GetMapping
(
"/salaryPage"
)
public
R
<
IPage
<
TSalaryTaxConfig
>>
getTSalaryTaxConfigPageBySalary
(
Page
<
TSalaryTaxConfig
>
page
,
TSalaryTaxConfig
tSalaryTaxConfig
)
{
tSalaryTaxConfig
.
setType
(
SalaryConstants
.
SALARY_TAX_TYPE
[
0
]);
//根据 level 顺序排序
List
<
OrderItem
>
orders
=
new
ArrayList
<>();
OrderItem
oi
=
new
OrderItem
();
oi
.
setColumn
(
"level"
);
oi
.
setAsc
(
true
);
orders
.
add
(
oi
);
page
.
setOrders
(
orders
);
return
new
R
<>(
tSalaryTaxConfigService
.
getTSalaryTaxConfigPage
(
page
,
tSalaryTaxConfig
));
}
/**
* 简单分页查询
*
* @param page 分页对象
* @param tSalaryTaxConfig 所得税配置-薪资配置3
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TSalaryTaxConfig
>>
getTSalaryTaxConfigPage
(
Page
<
TSalaryTaxConfig
>
page
,
TSalaryTaxConfigSearchVo
tSalaryTaxConfig
)
{
* @param tSalaryTaxConfig 个税比例及速算扣除数的配置表
* @Description: 年终奖个税-分页查询
* @Author: hgw
* @Date: 2019/10/15 18:05
* @return: com.yifu.cloud.v1.common.core.util.R<com.baomidou.mybatisplus.core.metadata.IPage < com.yifu.cloud.v1.hrms.api.entity.TSalaryTaxConfig>>
**/
@Operation
(
description
=
"年终奖个税-分页查询"
)
@GetMapping
(
"/yearPage"
)
public
R
<
IPage
<
TSalaryTaxConfig
>>
getTSalaryTaxConfigPageByYear
(
Page
<
TSalaryTaxConfig
>
page
,
TSalaryTaxConfig
tSalaryTaxConfig
)
{
tSalaryTaxConfig
.
setType
(
SalaryConstants
.
SALARY_TAX_TYPE
[
1
]);
//根据 level 顺序排序
List
<
OrderItem
>
orders
=
new
ArrayList
<>();
OrderItem
oi
=
new
OrderItem
();
oi
.
setColumn
(
"level"
);
oi
.
setAsc
(
true
);
orders
.
add
(
oi
);
page
.
setOrders
(
orders
);
return
new
R
<>(
tSalaryTaxConfigService
.
getTSalaryTaxConfigPage
(
page
,
tSalaryTaxConfig
));
}
/**
* 通过id查询
所得税配置-薪资配置3
* 通过id查询
单条记录
*
* @param id
id
* @param id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('salary_tsalarytaxconfig_get')
"
)
@Operation
(
description
=
"id查询
"
)
@GetMapping
(
"/{id}"
)
public
R
<
TSalaryTaxConfig
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tSalaryTaxConfigService
.
getById
(
id
));
return
new
R
<>
(
tSalaryTaxConfigService
.
getById
(
id
));
}
/**
* 新增
所得税配置-薪资配置3
* 新增
记录
*
* @param tSalaryTaxConfig
所得税配置-薪资配置3
* @param tSalaryTaxConfig
* @return R
*/
@Operation
(
summary
=
"新增所得税配置-薪资配置3"
,
description
=
"新增所得税配置-薪资配置3:hasPermission('salary_tsalarytaxconfig_add')
"
)
@SysLog
(
"新增
所得税配置-薪资配置3
"
)
@Operation
(
description
=
"新增
"
)
@SysLog
(
"新增
个税比例及速算扣除数的配置表
"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('
salary_
tsalarytaxconfig_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TSalaryTaxConfig
tSalaryTaxConfig
)
{
return
R
.
ok
(
tSalaryTaxConfigService
.
save
(
tSalaryTaxConfig
));
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tsalarytaxconfig_add')"
)
public
R
save
(
@RequestBody
TSalaryTaxConfig
tSalaryTaxConfig
)
{
return
new
R
<>
(
tSalaryTaxConfigService
.
save
(
tSalaryTaxConfig
));
}
/**
* 修改
所得税配置-薪资配置3
* 修改
记录
*
* @param tSalaryTaxConfig
所得税配置-薪资配置3
* @param tSalaryTaxConfig
* @return R
*/
@Operation
(
summary
=
"修改所得税配置-薪资配置3"
,
description
=
"修改所得税配置-薪资配置3:hasPermission('salary_tsalarytaxconfig_edit')
"
)
@SysLog
(
"修改
所得税配置-薪资配置3
"
)
@Operation
(
description
=
"修改
"
)
@SysLog
(
"修改
个税比例及速算扣除数的配置表
"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('
salary_
tsalarytaxconfig_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TSalaryTaxConfig
tSalaryTaxConfig
)
{
return
R
.
ok
(
tSalaryTaxConfigService
.
updateById
(
tSalaryTaxConfig
));
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tsalarytaxconfig_edit')"
)
public
R
update
(
@RequestBody
TSalaryTaxConfig
tSalaryTaxConfig
)
{
return
new
R
<>
(
tSalaryTaxConfigService
.
updateById
(
tSalaryTaxConfig
));
}
/**
* 通过id删除
所得税配置-薪资配置3
* 通过id删除
一条记录
*
* @param id
id
* @param id
* @return R
*/
@Operation
(
summary
=
"通过id删除所得税配置-薪资配置3"
,
description
=
"通过id删除所得税配置-薪资配置3:hasPermission('salary_tsalarytaxconfig_del')
"
)
@SysLog
(
"
通过id删除所得税配置-薪资配置3
"
)
@Operation
(
description
=
"删除
"
)
@SysLog
(
"
删除个税比例及速算扣除数的配置表
"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('
salary_
tsalarytaxconfig_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tSalaryTaxConfigService
.
removeById
(
id
));
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tsalarytaxconfig_del')"
)
public
R
removeById
(
@PathVariable
String
id
)
{
return
new
R
<>
(
tSalaryTaxConfigService
.
removeById
(
id
));
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSpecialDeducationSumController.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
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.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSpecialDeducationSumService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSpecialDeducationSumSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.SneakyThrows
;
import
lombok.AllArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
/**
* 专项扣除配置表-薪资配置5
*
* @author hgw
* @date 2022-08-05 11:40:14
*/
* @Author fxj
* @Description
* @Date 13:33 2022/8/6
* @Param
* @return
**/
@RestController
@
Required
ArgsConstructor
@
All
ArgsConstructor
@RequestMapping
(
"/tspecialdeducationsum"
)
@Tag
(
name
=
"专项扣除
配置表-薪资配置5管理
"
)
@Tag
(
name
=
"专项扣除
信息
"
)
public
class
TSpecialDeducationSumController
{
private
final
TSpecialDeducationSumService
tSpecialDeducationSumService
;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tSpecialDeducationSum
专项扣除配置表-薪资配置5
* @param tSpecialDeducationSum
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TSpecialDeducationSum
>>
getTSpecialDeducationSumPage
(
Page
<
TSpecialDeducationSum
>
page
,
TSpecialDeducationSumSearchVo
tSpecialDeducationSum
)
{
public
R
<
IPage
<
TSpecialDeducationSum
>>
getTSpecialDeducationSumPage
(
Page
<
TSpecialDeducationSum
>
page
,
TSpecialDeducationSum
tSpecialDeducationSum
)
{
page
.
addOrder
(
OrderItem
.
desc
(
"CREATE_TIME"
));
return
new
R
<>(
tSpecialDeducationSumService
.
getTSpecialDeducationSumPage
(
page
,
tSpecialDeducationSum
));
}
/**
* 不分页查询
*
* @param tSpecialDeducationSum 专项扣除配置表-薪资配置5
* @return
*/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@PostMapping
(
"/noPage"
)
//@PreAuthorize("@pms.hasPermission('salary_tspecialdeducationsum_get')" )
public
R
<
List
<
TSpecialDeducationSum
>>
getTSpecialDeducationSumNoPage
(
@RequestBody
TSpecialDeducationSumSearchVo
tSpecialDeducationSum
)
{
return
R
.
ok
(
tSpecialDeducationSumService
.
noPageDiy
(
tSpecialDeducationSum
));
}
/**
* 通过id查询
专项扣除配置表-薪资配置5
* 通过id查询
单条记录
*
* @param id
id
* @param id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('salary_tspecialdeducationsum_get')
"
)
@Operation
(
description
=
"id查询
"
)
@GetMapping
(
"/{id}"
)
public
R
<
TSpecialDeducationSum
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tSpecialDeducationSumService
.
getById
(
id
));
return
new
R
<>
(
tSpecialDeducationSumService
.
getById
(
id
));
}
/**
* 新增
专项扣除配置表-薪资配置5
* 新增
记录
*
* @param tSpecialDeducationSum
专项扣除配置表-薪资配置5
* @param tSpecialDeducationSum
* @return R
*/
@Operation
(
summary
=
"新增专项扣除配置表-薪资配置5"
,
description
=
"新增专项扣除配置表-薪资配置5:hasPermission('salary_tspecialdeducationsum_add')"
)
@SysLog
(
"新增专项扣除配置表-薪资配置5"
)
@Operation
(
description
=
"新增(wxhr:tspecialdeducationsum_add)"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('
salary_
tspecialdeducationsum_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TSpecialDeducationSum
tSpecialDeducationSum
)
{
return
R
.
ok
(
tSpecialDeducationSumService
.
save
(
tSpecialDeducationSum
));
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tspecialdeducationsum_add')"
)
public
R
save
(
@Valid
@RequestBody
TSpecialDeducationSum
tSpecialDeducationSum
)
{
return
new
R
<>
(
tSpecialDeducationSumService
.
save
(
tSpecialDeducationSum
));
}
/**
* 修改
专项扣除配置表-薪资配置5
* 修改
记录
*
* @param tSpecialDeducationSum
专项扣除配置表-薪资配置5
* @param tSpecialDeducationSum
* @return R
*/
@Operation
(
summary
=
"修改专项扣除配置表-薪资配置5"
,
description
=
"修改专项扣除配置表-薪资配置5:hasPermission('salary_tspecialdeducationsum_edit'
)"
)
@SysLog
(
"修改
专项扣除配置表-薪资配置5
"
)
@Operation
(
description
=
"修改(wxhr:tspecialdeducationsum_edit
)"
)
@SysLog
(
"修改"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('
salary_
tspecialdeducationsum_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TSpecialDeducationSum
tSpecialDeducationSum
)
{
return
R
.
ok
(
tSpecialDeducationSumService
.
updateById
(
tSpecialDeducationSum
));
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tspecialdeducationsum_edit')"
)
public
R
update
(
@RequestBody
TSpecialDeducationSum
tSpecialDeducationSum
)
{
return
new
R
<>
(
tSpecialDeducationSumService
.
updateById
(
tSpecialDeducationSum
));
}
/**
* 通过id删除
专项扣除配置表-薪资配置5
* 通过id删除
一条记录
*
* @param id
id
* @param id
* @return R
*/
@Operation
(
summary
=
"通过id删除专项扣除配置表-薪资配置5"
,
description
=
"通过id删除专项扣除配置表-薪资配置5:hasPermission('salary_tspecialdeducationsum_del'
)"
)
@SysLog
(
"
通过id删除专项扣除配置表-薪资配置5
"
)
@Operation
(
description
=
"删除(wxhr:tspecialdeducationsum_del
)"
)
@SysLog
(
"
删除
"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('
salary_
tspecialdeducationsum_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tSpecialDeducationSumService
.
removeById
(
id
));
@PreAuthorize
(
"@pms.hasPermission('
wxhr:
tspecialdeducationsum_del')"
)
public
R
removeById
(
@PathVariable
String
id
)
{
return
new
R
<>
(
tSpecialDeducationSumService
.
removeById
(
id
));
}
/**
* 专项扣除配置表-薪资配置5 批量导入
*
* @author hgw
* @date 2022-08-05 11:40:14
* @param savList
* @Description: 保存专项
* @Author: hgw
* @Date: 2019/10/14 14:48
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@SneakyThrows
@Operation
(
description
=
"批量新增专项扣除配置表-薪资配置5 hasPermission('salary_tspecialdeducationsum-batch-import')"
)
@SysLog
(
"批量新增专项扣除配置表-薪资配置5"
)
@PostMapping
(
"/importListAdd"
)
@PreAuthorize
(
"@pms.hasPermission('salary_tspecialdeducationsum-batch-import')"
)
public
R
<
List
<
ErrorMessage
>>
importListAdd
(
@RequestBody
MultipartFile
file
)
{
return
tSpecialDeducationSumService
.
importDiy
(
file
.
getInputStream
());
@Operation
(
description
=
"上传专项扣除"
)
@SysLog
(
"上传专项扣除"
)
@PostMapping
(
"/uploadSds"
)
//@PreAuthorize("@pms.hasPermission('wxhr:salary_upload')")
public
R
uploadSds
(
@RequestBody
List
<
TSpecialDeducationSum
>
savList
)
{
return
tSpecialDeducationSumService
.
uploadSds
(
savList
);
}
/**
* 专项扣除配置表-薪资配置5 批量导出
*
* @author hgw
* @date 2022-08-05 11:40:14
* @param declareTitle
* @Description: 删除当月全部-专项扣除汇总
* @Author: hgw
* @Date: 2020/4/1 14:47
* @return: java.lang.String
**/
@Operation
(
description
=
"删除本月全部专项扣除"
)
@SysLog
(
"删除本月全部专项扣除"
)
@PostMapping
(
"/doDeleteTSumSpecialDeducationAll"
)
public
R
doDeleteTSumSpecialDeducationAll
(
String
yearMonth
,
String
declareTitle
)
{
if
(
Common
.
isEmpty
(
yearMonth
))
{
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyyMM"
);
yearMonth
=
df
.
format
(
new
Date
());
}
if
(
Common
.
isEmpty
(
declareTitle
))
{
return
R
.
failed
(
"申报单位不可为空!"
);
}
int
num
=
tSpecialDeducationSumService
.
deleteByUnitAndMonth
(
yearMonth
,
declareTitle
);
if
(
num
==
0
)
{
return
R
.
failed
(
"当前条件查询无数据,未删除"
);
}
else
{
return
new
R
<>(
"已删除"
+
num
+
"条数据"
);
}
}
/**
* @param tSpecialDeducationSum
* @Description: 导出专项扣除
* @Author: hgw
* @Date: 2020-6-17 17:30:12
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Operation
(
description
=
"导出专项扣除配置表-薪资配置5 hasPermission('salary_tspecialdeducationsum-export')"
)
@PostMapping
(
"/export"
)
@PreAuthorize
(
"@pms.hasPermission('salary_tspecialdeducationsum-export')"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TSpecialDeducationSumSearchVo
searchVo
)
{
tSpecialDeducationSumService
.
listExport
(
response
,
searchVo
);
@Operation
(
description
=
"导出专项扣除"
)
@SysLog
(
"导出专项扣除"
)
@GetMapping
(
"/doExportSpecialDeducationSum"
)
public
R
doExportSpecialDeducationSum
(
TSpecialDeducationSum
tSpecialDeducationSum
)
{
if
(
Common
.
isEmpty
(
tSpecialDeducationSum
.
getCreateMonth
()))
{
String
nowMonth
=
DateUtil
.
addMonth
(
0
);
//本月
tSpecialDeducationSum
.
setCreateMonth
(
nowMonth
);
}
List
<
TSpecialDeducationSum
>
sPage
=
tSpecialDeducationSumService
.
getTSpecialDeducationSumList
(
tSpecialDeducationSum
);
return
new
R
<>(
sPage
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/package-info.java
deleted
100644 → 0
View file @
2b54ba92
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
\ No newline at end of file
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TConfigSalaryMapper.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TConfigSalary
;
import
org.apache.ibatis.annotations.Mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
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.salary.entity.TConfigSalary
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
*
项目基础薪酬配置-薪资配置2
*
工资报账配置
*
* @author
hgw
* @date 2022-08-0
5 11:40:14
* @author
fxj
* @date 2022-08-0
6 13:00
*/
@Mapper
public
interface
TConfigSalaryMapper
extends
BaseMapper
<
TConfigSalary
>
{
/**
* 项目基础薪酬配置-薪资配置2
简单分页查询
* @param tConfigSalary 项目基础薪酬配置-薪资配置2
* 工资报账配置
简单分页查询
* @param tConfigSalary 工资报账配置
* @return
*/
IPage
<
TConfigSalary
>
getTConfigSalaryPage
(
Page
<
TConfigSalary
>
page
,
@Param
(
"tConfigSalary"
)
TConfigSalary
tConfigSalary
);
IPage
<
TConfigSalary
>
getTConfigSalaryPage
(
Page
page
,
@Param
(
"tConfigSalary"
)
TConfigSalary
tConfigSalary
,
@Param
(
"settleDomainVos"
)
List
<
TSettleDomainSelectVo
>
settleDomainVos
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TMinSalaryMapper.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary
;
import
org.apache.ibatis.annotations.Mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
*
最低工资配置-薪资配置4
*
各地市最低工资标准
*
* @author
hgw
* @date 2022-08-0
5 11:40:14
* @author
fxj
* @date 2022-08-0
6 13:00
*/
@Mapper
public
interface
TMinSalaryMapper
extends
BaseMapper
<
TMinSalary
>
{
/**
* 最低工资配置-薪资配置4
简单分页查询
* @param tMinSalary 最低工资配置-薪资配置4
* 各地市最低工资标准
简单分页查询
* @param tMinSalary 各地市最低工资标准
* @return
*/
IPage
<
TMinSalary
>
getTMinSalaryPage
(
Page
<
TMinSalary
>
page
,
@Param
(
"tMinSalary"
)
TMinSalary
tMinSalary
);
IPage
<
TMinSalary
>
getTMinSalaryPage
(
Page
page
,
@Param
(
"tMinSalary"
)
TMinSalary
tMinSalary
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TOwnDeptMapper.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TOwnDept
;
import
org.apache.ibatis.annotations.Mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TOwnDept
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 自有员工所在结算主体大全表
*
* @author
hgw
* @date 2022-08-0
5 11:40:14
* @author
fxj
* @date 2022-08-0
6 13:00
*/
@Mapper
public
interface
TOwnDeptMapper
extends
BaseMapper
<
TOwnDept
>
{
/**
* 自有员工所在结算主体大全表简单分页查询
*
* @param tOwnDept 自有员工所在结算主体大全表
* @return
*/
IPage
<
TOwnDept
>
getTOwnDeptPage
(
Page
<
TOwnDept
>
page
,
@Param
(
"tOwnDept"
)
TOwnDept
tOwnDept
);
List
<
String
>
getOwnEmpList
();
List
<
String
>
getTOwnDeptIdList
();
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryConfigStandardMapper.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryConfigStandard
;
import
org.apache.ibatis.annotations.Mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryConfigStandard
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
*
工资报表配置-薪资配置6
*
薪资识别配置(标准模板)
*
* @author
hgw
* @date 2022-08-0
5 11:40:14
* @author
fxj
* @date 2022-08-0
6 13:00
*/
@Mapper
public
interface
TSalaryConfigStandardMapper
extends
BaseMapper
<
TSalaryConfigStandard
>
{
/**
* 工资报表配置-薪资配置6简单分页查询
* @param tSalaryConfigStandard 工资报表配置-薪资配置6
* 薪资识别配置(标准模板)简单分页查询
*
* @param tSalaryConfigStandard 薪资识别配置(标准模板)
* @return
*/
IPage
<
TSalaryConfigStandard
>
getTSalaryConfigStandardPage
(
Page
<
TSalaryConfigStandard
>
page
,
@Param
(
"tSalaryConfigStandard"
)
TSalaryConfigStandard
tSalaryConfigStandard
);
IPage
<
TSalaryConfigStandard
>
getTSalaryConfigStandardPage
(
Page
<
TSalaryConfigStandard
>
page
,
@Param
(
"tSalaryConfigStandard"
)
TSalaryConfigStandard
tSalaryConfigStandard
);
List
<
TSalaryConfigStandard
>
getTSalaryConfigStandardList
(
@Param
(
"tSalaryConfigStandard"
)
TSalaryConfigStandard
tSalaryConfigStandard
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryTaxConfigMapper.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryTaxConfig
;
import
org.apache.ibatis.annotations.Mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryTaxConfig
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
*
所得税配置-薪资配置3
*
个税比例及速算扣除数的配置表
*
* @author
hgw
* @date 2022-08-0
5 11:40:14
* @author
fxj
* @date 2022-08-0
6 13:00
*/
@Mapper
public
interface
TSalaryTaxConfigMapper
extends
BaseMapper
<
TSalaryTaxConfig
>
{
/**
* 所得税配置-薪资配置3
简单分页查询
* @param tSalaryTaxConfig 所得税配置-薪资配置3
* 个税比例及速算扣除数的配置表
简单分页查询
* @param tSalaryTaxConfig 个税比例及速算扣除数的配置表
* @return
*/
IPage
<
TSalaryTaxConfig
>
getTSalaryTaxConfigPage
(
Page
<
TSalaryTaxConfig
>
page
,
@Param
(
"tSalaryTaxConfig"
)
TSalaryTaxConfig
tSalaryTaxConfig
);
IPage
<
TSalaryTaxConfig
>
getTSalaryTaxConfigPage
(
Page
page
,
@Param
(
"tSalaryTaxConfig"
)
TSalaryTaxConfig
tSalaryTaxConfig
);
/**
* @param tSalaryTaxConfig
* @Description: 获取个税配置
* @Author: hgw
* @Date: 2019/10/8 14:39
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryTaxConfig>
**/
List
<
TSalaryTaxConfig
>
getTaxConfigByPersonList
(
@Param
(
"tSalaryTaxConfig"
)
TSalaryTaxConfig
tSalaryTaxConfig
);
/**
* @param tSalaryTaxConfig
* @Description: 获取年终奖配置
* @Author: hgw
* @Date: 2019/10/8 14:40
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryTaxConfig>
**/
List
<
TSalaryTaxConfig
>
getTaxConfigByAnnualBonusList
(
@Param
(
"tSalaryTaxConfig"
)
TSalaryTaxConfig
tSalaryTaxConfig
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSpecialDeducationSumMapper.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum
;
import
org.apache.ibatis.annotations.Mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 专项扣除配置表-薪资配置5
*
* @author hgw
* @date 2022-08-05 11:40:14
* @author fxj
* @date 2022-08-06 13:00
*/
@Mapper
public
interface
TSpecialDeducationSumMapper
extends
BaseMapper
<
TSpecialDeducationSum
>
{
/**
* 专项扣除配置表-薪资配置5简单分页查询
* @param tSpecialDeducationSum 专项扣除配置表-薪资配置5
* 简单分页查询
*
* @param tSpecialDeducationSum
* @return
*/
IPage
<
TSpecialDeducationSum
>
getTSpecialDeducationSumPage
(
Page
<
TSpecialDeducationSum
>
page
,
@Param
(
"tSpecialDeducationSum"
)
TSpecialDeducationSum
tSpecialDeducationSum
);
IPage
<
TSpecialDeducationSum
>
getTSpecialDeducationSumPage
(
Page
page
,
@Param
(
"tSpecialDeducationSum"
)
TSpecialDeducationSum
tSpecialDeducationSum
);
/**
* @param tSpecialDeducationSum
* @Description: 查找专项信息,返回list
* @Author: hgw
* @Date: 2019/9/30 16:18
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSpecialDeducationSum>
**/
List
<
TSpecialDeducationSum
>
getTSpecialDeducationSumList
(
@Param
(
"tSpecialDeducationSum"
)
TSpecialDeducationSum
tSpecialDeducationSum
);
/**
* @param yearMonth
* @param idNumber
* @Description: 获取当月专项信息
* @Author: hgw
* @Date: 2019/9/30 16:29
* @return: com.yifu.cloud.v1.hrms.api.entity.TSpecialDeducationSum
**/
TSpecialDeducationSum
getTSpecialDeducationSum
(
@Param
(
"yearMonth"
)
String
yearMonth
,
@Param
(
"idNumber"
)
String
idNumber
,
@Param
(
"invoiceTitle"
)
String
invoiceTitle
);
/**
* @param yearMonth
* @param idCardList
* @Description: 工资查询所需的全部list,组装Map来使用
* @Author: hgw
* @Date: 2022/1/26 16:45
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSpecialDeducationSum>
**/
List
<
TSpecialDeducationSum
>
getListByIdCardList
(
@Param
(
"yearMonth"
)
String
yearMonth
,
@Param
(
"idCardList"
)
List
<
String
>
idCardList
);
int
deleteByUnitAndMonth
(
@Param
(
"yearMonth"
)
String
yearMonth
,
@Param
(
"invoiceTitle"
)
String
invoiceTitle
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TConfigSalaryService.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
;
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.salary.entity.TConfigSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TConfigSalarySearchVo
;
import
java.util.List
;
/**
* 项目基础薪酬配置-薪资配置2
*
* @author hgw
* @date 2022-08-05 11:40:14
*/
* @Author fxj
* @Description 工资报账配置
* @Date 13:12 2022/8/6
* @Param
* @return
**/
public
interface
TConfigSalaryService
extends
IService
<
TConfigSalary
>
{
/**
* 项目基础薪酬配置-薪资配置2
简单分页查询
* @param tConfigSalary 项目基础薪酬配置-薪资配置2
* 工资报账配置
简单分页查询
* @param tConfigSalary 工资报账配置
* @return
*/
IPage
<
TConfigSalary
>
getTConfigSalaryPage
(
Page
<
TConfigSalary
>
page
,
TConfigSalarySearchVo
tConfigSalary
);
IPage
<
TConfigSalary
>
getTConfigSalaryPage
(
Page
<
TConfigSalary
>
page
,
TConfigSalary
tConfigSalary
);
List
<
TConfigSalary
>
noPageDiy
(
TConfigSalarySearchVo
searchVo
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TMinSalaryService.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
;
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.salary.entity.TMinSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TMinSalarySearchVo
;
import
java.util.List
;
/**
* 最低工资配置-薪资配置4
*
* @author hgw
* @date 2022-08-05 11:40:14
*/
* @Author fxj
* @Description 各地市最低工资标准
* @Date 13:13 2022/8/6
* @Param
* @return
**/
public
interface
TMinSalaryService
extends
IService
<
TMinSalary
>
{
/**
* 最低工资配置-薪资配置4
简单分页查询
* @param tMinSalary 最低工资配置-薪资配置4
* 各地市最低工资标准
简单分页查询
* @param tMinSalary 各地市最低工资标准
* @return
*/
IPage
<
TMinSalary
>
getTMinSalaryPage
(
Page
<
TMinSalary
>
page
,
TMinSalarySearchVo
tMinSalary
);
IPage
<
TMinSalary
>
getTMinSalaryPage
(
Page
<
TMinSalary
>
page
,
TMinSalary
tMinSalary
);
List
<
TMinSalary
>
noPageDiy
(
TMinSalarySearchVo
searchVo
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TOwnDeptService.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
;
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.salary.entity.TOwnDept
;
import
java.util.Map
;
/**
* 自有员工所在结算主体大全表
* @Author fxj
* @Description 自有员工所在结算主体大全表
* @Date 13:13 2022/8/6
* @Param
* @return
**/
public
interface
TOwnDeptService
extends
IService
<
TOwnDept
>
{
/**
* 自有员工所在结算主体大全表简单分页查询
*
* @author hgw
* @date 2022-08-05 11:40:14
* @param tOwnDept 自有员工所在结算主体大全表
* @return
*/
public
interface
TOwnDeptService
extends
IService
<
TOwnDept
>
{
IPage
<
TOwnDept
>
getTOwnDeptPage
(
Page
<
TOwnDept
>
page
,
TOwnDept
tOwnDept
);
/**
* @param
* @Description: 获取自有员工结算主体id
* @Author: hgw
* @Date: 2021/12/28 10:44
* @return: Map
**/
Map
<
String
,
Integer
>
getOwnDeptMap
();
/**
* @Description: 自有员工所在结算主体Map
* @Author: hgw
* @Date: 2021/11/2 17:51
* @return: java.util.Map<java.lang.String, java.lang.Integer>
**/
Map
<
String
,
Integer
>
getOwnEmpMap
();
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryConfigStandardService.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
;
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.salary.entity.TSalaryConfigStandard
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryConfigStandardSearchVo
;
import
java.util.List
;
/**
* 工资报表配置-薪资配置6
*
* @author hgw
* @date 2022-08-05 11:40:14
*/
* @Author fxj
* @Description 薪资识别配置(标准模板)
* @Date 13:13 2022/8/6
* @Param
* @return
**/
public
interface
TSalaryConfigStandardService
extends
IService
<
TSalaryConfigStandard
>
{
/**
* 工资报表配置-薪资配置6简单分页查询
* @param tSalaryConfigStandard 工资报表配置-薪资配置6
* 薪资识别配置(标准模板)简单分页查询
*
* @param tSalaryConfigStandard 薪资识别配置(标准模板)
* @return
*/
IPage
<
TSalaryConfigStandard
>
getTSalaryConfigStandardPage
(
Page
<
TSalaryConfigStandard
>
page
,
TSalaryConfigStandardSearchVo
tSalaryConfigStandard
);
IPage
<
TSalaryConfigStandard
>
getTSalaryConfigStandardPage
(
Page
<
TSalaryConfigStandard
>
page
,
TSalaryConfigStandard
tSalaryConfigStandard
);
List
<
TSalaryConfigStandard
>
getTSalaryConfigStandardList
(
TSalaryConfigStandard
tSalaryConfigStandard
);
List
<
TSalaryConfigStandard
>
noPageDiy
(
TSalaryConfigStandardSearchVo
searchVo
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryTaxConfigService.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
;
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.salary.entity.TSalaryTaxConfig
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryTaxConfigSearchVo
;
import
java.util.List
;
/**
* 所得税配置-薪资配置3
*
* @author hgw
* @date 2022-08-05 11:40:14
*/
* @Author fxj
* @Description 个税比例及速算扣除数的配置表
* @Date 13:13 2022/8/6
* @Param
* @return
**/
public
interface
TSalaryTaxConfigService
extends
IService
<
TSalaryTaxConfig
>
{
/**
* 所得税配置-薪资配置3
简单分页查询
* @param tSalaryTaxConfig 所得税配置-薪资配置3
* 个税比例及速算扣除数的配置表
简单分页查询
* @param tSalaryTaxConfig 个税比例及速算扣除数的配置表
* @return
*/
IPage
<
TSalaryTaxConfig
>
getTSalaryTaxConfigPage
(
Page
<
TSalaryTaxConfig
>
page
,
TSalaryTaxConfigSearchVo
tSalaryTaxConfig
);
IPage
<
TSalaryTaxConfig
>
getTSalaryTaxConfigPage
(
Page
<
TSalaryTaxConfig
>
page
,
TSalaryTaxConfig
tSalaryTaxConfig
);
/**
* @param tSalaryTaxConfig
* @Description: 获取个税配置
* @Author: hgw
* @Date: 2019/10/8 14:39
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryTaxConfig>
**/
List
<
TSalaryTaxConfig
>
getTaxConfigByPersonList
(
TSalaryTaxConfig
tSalaryTaxConfig
);
/**
* @param tSalaryTaxConfig
* @Description: 获取年终奖配置
* @Author: hgw
* @Date: 2019/10/8 14:40
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryTaxConfig>
**/
List
<
TSalaryTaxConfig
>
getTaxConfigByAnnualBonusList
(
TSalaryTaxConfig
tSalaryTaxConfig
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSpecialDeducationSumService.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
;
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.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSpecialDeducationSumSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.Map
;
/**
* 专项扣除配置表-薪资配置5
*
* @author hgw
* @date 2022-08-05 11:40:14
*/
* @Author fxj
* @Description 专项扣除
* @Date 13:14 2022/8/6
* @Param
* @return
**/
public
interface
TSpecialDeducationSumService
extends
IService
<
TSpecialDeducationSum
>
{
/**
* 专项扣除配置表-薪资配置5简单分页查询
* @param tSpecialDeducationSum 专项扣除配置表-薪资配置5
* 简单分页查询
*
* @param tSpecialDeducationSum
* @return
*/
IPage
<
TSpecialDeducationSum
>
getTSpecialDeducationSumPage
(
Page
<
TSpecialDeducationSum
>
page
,
TSpecialDeducationSumSearchVo
tSpecialDeducationSum
);
IPage
<
TSpecialDeducationSum
>
getTSpecialDeducationSumPage
(
Page
<
TSpecialDeducationSum
>
page
,
TSpecialDeducationSum
tSpecialDeducationSum
);
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
);
/**
* @param tSpecialDeducationSum
* @Description: 查找专项信息
* @Author: hgw
* @Date: 2019/9/30 16:19
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSpecialDeducationSum>
**/
List
<
TSpecialDeducationSum
>
getTSpecialDeducationSumList
(
TSpecialDeducationSum
tSpecialDeducationSum
);
/**
* @param yearMonth 年月
* @param idNumber 身份证
* @param invoiceTitle 封面抬头
* @Description:
* @Author: hgw
* @Date: 2019/9/30 17:23
* @return: com.yifu.cloud.v1.hrms.api.entity.TSpecialDeducationSum
**/
TSpecialDeducationSum
getTSpecialDeducationSum
(
String
yearMonth
,
String
idNumber
,
String
invoiceTitle
);
/**
* @param yearMonth 年月
* @param idCardList 身份证
* @Description: 工资查询所需的全部list,组装Map来使用
* @Author: hgw
* @Date: 2019/9/30 17:23
* @return: com.yifu.cloud.v1.hrms.api.entity.TSpecialDeducationSum
**/
Map
<
String
,
TSpecialDeducationSum
>
getTSpecialDeducationSumMap
(
String
yearMonth
,
List
<
String
>
idCardList
);
/**
* @param yearMonth 年月
* @param invoiceTitle 申报单位
* @Description: 删除专项扣除
* @Author: hgw
* @Date: 2020/4/1 15:12
* @return: int
**/
int
deleteByUnitAndMonth
(
String
yearMonth
,
String
invoiceTitle
);
/**
* @param sdsList
* @Description: 保存专项
* @Author: hgw
* @Date: 2019/10/14 14:48
* @return: com.yifu.cloud.v1.common.core.util.R
**/
R
uploadSds
(
List
<
TSpecialDeducationSum
>
sdsList
);
void
listExport
(
HttpServletResponse
response
,
TSpecialDeducationSumSearchVo
searchVo
);
List
<
TSpecialDeducationSum
>
noPageDiy
(
TSpecialDeducationSumSearchVo
searchVo
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TConfigSalaryServiceImpl.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.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.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
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
com.yifu.cloud.plus.v1.yifu.salary.entity.TConfigSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TConfigSalaryMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TConfigSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TConfigSalarySearchVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
*
项目基础薪酬配置-薪资配置2
*
* @
author hgw
* @
date 2022-08-05 11:40:14
*
/
@Log4j2
@Service
*
@Author fxj
*
@Description 工资报账配置
* @
Date 13:17 2022/8/6
* @
Param
*
@return
**/
@Service
(
"tConfigSalaryService"
)
public
class
TConfigSalaryServiceImpl
extends
ServiceImpl
<
TConfigSalaryMapper
,
TConfigSalary
>
implements
TConfigSalaryService
{
/**
* 项目基础薪酬配置-薪资配置2简单分页查询
*
* @param tConfigSalary 项目基础薪酬配置-薪资配置2
* 工资报账配置简单分页查询
* @param tConfigSalary 工资报账配置
* @return
*/
@Override
public
IPage
<
TConfigSalary
>
getTConfigSalaryPage
(
Page
<
TConfigSalary
>
page
,
TConfigSalarySearchVo
tConfigSalary
)
{
return
baseMapper
.
getTConfigSalaryPage
(
page
,
tConfigSalary
);
public
IPage
<
TConfigSalary
>
getTConfigSalaryPage
(
Page
<
TConfigSalary
>
page
,
TConfigSalary
tConfigSalary
){
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
TSettleDomainSelectVo
>
remoteSettleDomainVoData
=
null
;
if
(
Common
.
isNotNull
(
user
))
{
// TODO
R
<
List
<
TSettleDomainSelectVo
>>
remoteGetTSettleDomainVo
=
null
;
if
(
remoteGetTSettleDomainVo
==
null
)
{
throw
new
RuntimeException
(
"调用结算服务失败"
);
}
@Override
public
List
<
TConfigSalary
>
noPageDiy
(
TConfigSalarySearchVo
searchVo
)
{
LambdaQueryWrapper
<
TConfigSalary
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TConfigSalary:
:
getId
,
idList
);
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
)
{
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
if
(
CommonConstants
.
SUCCESS
!=
remoteGetTSettleDomainVo
.
getCode
())
{
throw
new
RuntimeException
(
"调用结算服务返回失败"
);
}
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
baseMapper
.
selectList
(
wrapper
);
remoteSettleDomainVoData
=
remoteGetTSettleDomainVo
.
getData
();
if
(
remoteSettleDomainVoData
==
null
)
{
throw
new
RuntimeException
(
"未获取到相关结算信息"
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
TConfigSalarySearchVo
entity
)
{
LambdaQueryWrapper
<
TConfigSalary
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TConfigSalary:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TConfigSalary:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
()))
{
wrapper
.
eq
(
TConfigSalary:
:
getCreateName
,
entity
.
getCreateName
());
}
return
wrapper
;
return
baseMapper
.
getTConfigSalaryPage
(
page
,
tConfigSalary
,
remoteSettleDomainVoData
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TMinSalaryServiceImpl.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TMinSalaryMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TMinSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TMinSalarySearchVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
*
最低工资配置-薪资配置4
*
* @
author hgw
* @
date 2022-08-05 11:40:14
*
/
@Log4j2
@Service
*
@Author fxj
*
@Description 各地市最低工资标准
* @
Date 13:17 2022/8/6
* @
Param
*
@return
**/
@Service
(
"tMinSalaryService"
)
public
class
TMinSalaryServiceImpl
extends
ServiceImpl
<
TMinSalaryMapper
,
TMinSalary
>
implements
TMinSalaryService
{
/**
* 最低工资配置-薪资配置4简单分页查询
*
* @param tMinSalary 最低工资配置-薪资配置4
* 各地市最低工资标准简单分页查询
* @param tMinSalary 各地市最低工资标准
* @return
*/
@Override
public
IPage
<
TMinSalary
>
getTMinSalaryPage
(
Page
<
TMinSalary
>
page
,
TMinSalarySearchVo
tMinSalary
)
{
return
baseMapper
.
getTMinSalaryPage
(
page
,
tMinSalary
);
}
@Override
public
List
<
TMinSalary
>
noPageDiy
(
TMinSalarySearchVo
searchVo
)
{
LambdaQueryWrapper
<
TMinSalary
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TMinSalary:
:
getId
,
idList
);
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
)
{
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
}
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
baseMapper
.
selectList
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
TMinSalarySearchVo
entity
)
{
LambdaQueryWrapper
<
TMinSalary
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TMinSalary:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TMinSalary:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
()))
{
wrapper
.
eq
(
TMinSalary:
:
getCreateName
,
entity
.
getCreateName
());
}
return
wrapper
;
public
IPage
<
TMinSalary
>
getTMinSalaryPage
(
Page
<
TMinSalary
>
page
,
TMinSalary
tMinSalary
){
return
baseMapper
.
getTMinSalaryPage
(
page
,
tMinSalary
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TOwnDeptServiceImpl.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TOwnDept
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TOwnDeptMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TOwnDeptService
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 自有员工所在结算主体大全表
* @Author fxj
* @Description 自有员工所在结算主体大全表
* @Date 13:18 2022/8/6
* @Param
* @return
**/
@Service
(
"tOwnDeptService"
)
public
class
TOwnDeptServiceImpl
extends
ServiceImpl
<
TOwnDeptMapper
,
TOwnDept
>
implements
TOwnDeptService
{
/**
* 自有员工所在结算主体大全表简单分页查询
*
* @author hgw
* @date 2022-08-05 11:40:14
* @param tOwnDept 自有员工所在结算主体大全表
* @return
*/
@Log4j2
@Service
public
class
TOwnDeptServiceImpl
extends
ServiceImpl
<
TOwnDeptMapper
,
TOwnDept
>
implements
TOwnDeptService
{
@Override
public
IPage
<
TOwnDept
>
getTOwnDeptPage
(
Page
<
TOwnDept
>
page
,
TOwnDept
tOwnDept
)
{
return
baseMapper
.
getTOwnDeptPage
(
page
,
tOwnDept
);
}
/**
* @param
* @Description: 获取自有员工结算主体id
* @Author: hgw
* @Date: 2021/12/28 10:44
* @return: java.util.List<java.lang.String>
**/
@Override
public
Map
<
String
,
Integer
>
getOwnDeptMap
()
{
Map
<
String
,
Integer
>
ownDeptMap
=
new
HashMap
<>();
List
<
String
>
ownDeptList
=
baseMapper
.
getTOwnDeptIdList
();
if
(
ownDeptList
!=
null
&&
!
ownDeptList
.
isEmpty
())
{
for
(
String
s
:
ownDeptList
)
{
ownDeptMap
.
put
(
s
,
CommonConstants
.
ZERO_INT
);
}
}
return
ownDeptMap
;
}
/**
* 自有员工所在结算主体Map
*/
@Override
public
Map
<
String
,
Integer
>
getOwnEmpMap
()
{
Map
<
String
,
Integer
>
ownEmpMap
=
new
HashMap
<>();
List
<
String
>
ownEmpList
=
baseMapper
.
getOwnEmpList
();
if
(
ownEmpList
!=
null
&&
!
ownEmpList
.
isEmpty
())
{
for
(
String
s
:
ownEmpList
)
{
ownEmpMap
.
put
(
s
,
CommonConstants
.
ZERO_INT
);
}
}
return
ownEmpMap
;
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryConfigStandardServiceImpl.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryConfigStandard
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryConfigStandardMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryConfigStandardService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryConfigStandardSearchVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
*
工资报表配置-薪资配置6
*
* @
author hgw
* @
date 2022-08-05 11:40:14
*
/
@Log4j2
@Service
*
@Author fxj
*
@Description 薪资识别配置(标准模板)
* @
Date 13:18 2022/8/6
* @
Param
*
@return
**/
@Service
(
"tSalaryConfigStandardService"
)
public
class
TSalaryConfigStandardServiceImpl
extends
ServiceImpl
<
TSalaryConfigStandardMapper
,
TSalaryConfigStandard
>
implements
TSalaryConfigStandardService
{
/**
* 工资报表配置-薪资配置6
简单分页查询
* 薪资识别配置(标准模板)
简单分页查询
*
* @param tSalaryConfigStandard 工资报表配置-薪资配置6
* @param tSalaryConfigStandard 薪资识别配置(标准模板)
* @return
*/
@Override
public
IPage
<
TSalaryConfigStandard
>
getTSalaryConfigStandardPage
(
Page
<
TSalaryConfigStandard
>
page
,
TSalaryConfigStandardSearchVo
tSalaryConfigStandard
)
{
public
IPage
<
TSalaryConfigStandard
>
getTSalaryConfigStandardPage
(
Page
<
TSalaryConfigStandard
>
page
,
TSalaryConfigStandard
tSalaryConfigStandard
)
{
return
baseMapper
.
getTSalaryConfigStandardPage
(
page
,
tSalaryConfigStandard
);
}
@Override
public
List
<
TSalaryConfigStandard
>
noPageDiy
(
TSalaryConfigStandardSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TSalaryConfigStandard
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TSalaryConfigStandard:
:
getId
,
idList
);
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
)
{
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
}
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
baseMapper
.
selectList
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
TSalaryConfigStandardSearchVo
entity
)
{
LambdaQueryWrapper
<
TSalaryConfigStandard
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TSalaryConfigStandard:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TSalaryConfigStandard:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
()))
{
wrapper
.
eq
(
TSalaryConfigStandard:
:
getCreateName
,
entity
.
getCreateName
());
}
return
wrapper
;
public
List
<
TSalaryConfigStandard
>
getTSalaryConfigStandardList
(
TSalaryConfigStandard
tSalaryConfigStandard
)
{
return
baseMapper
.
getTSalaryConfigStandardList
(
tSalaryConfigStandard
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryTaxConfigServiceImpl.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -22,27 +6,53 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryTaxConfig
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryTaxConfigMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryTaxConfigService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryTaxConfigSearchVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
*
所得税配置-薪资配置3
*
* @
author hgw
* @
date 2022-08-05 11:40:14
*
/
@Log4j2
@Service
*
@Author fxj
*
@Description 个税比例及速算扣除数的配置表
* @
Date 13:19 2022/8/6
* @
Param
*
@return
**/
@Service
(
"tSalaryTaxConfigService"
)
public
class
TSalaryTaxConfigServiceImpl
extends
ServiceImpl
<
TSalaryTaxConfigMapper
,
TSalaryTaxConfig
>
implements
TSalaryTaxConfigService
{
/**
* 所得税配置-薪资配置3
简单分页查询
* 个税比例及速算扣除数的配置表
简单分页查询
*
* @param tSalaryTaxConfig 所得税配置-薪资配置3
* @param tSalaryTaxConfig 个税比例及速算扣除数的配置表
* @return
*/
@Override
public
IPage
<
TSalaryTaxConfig
>
getTSalaryTaxConfigPage
(
Page
<
TSalaryTaxConfig
>
page
,
TSalaryTaxConfigSearchVo
tSalaryTaxConfig
)
{
public
IPage
<
TSalaryTaxConfig
>
getTSalaryTaxConfigPage
(
Page
<
TSalaryTaxConfig
>
page
,
TSalaryTaxConfig
tSalaryTaxConfig
)
{
return
baseMapper
.
getTSalaryTaxConfigPage
(
page
,
tSalaryTaxConfig
);
}
/**
* @param tSalaryTaxConfig
* @Description: 获取个税配置
* @Author: hgw
* @Date: 2019/10/8 14:39
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryTaxConfig>
**/
@Override
public
List
<
TSalaryTaxConfig
>
getTaxConfigByPersonList
(
TSalaryTaxConfig
tSalaryTaxConfig
)
{
return
baseMapper
.
getTaxConfigByPersonList
(
tSalaryTaxConfig
);
}
/**
* @param tSalaryTaxConfig
* @Description: 获取年终奖配置
* @Author: hgw
* @Date: 2019/10/8 14:40
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryTaxConfig>
**/
@Override
public
List
<
TSalaryTaxConfig
>
getTaxConfigByAnnualBonusList
(
TSalaryTaxConfig
tSalaryTaxConfig
)
{
return
baseMapper
.
getTaxConfigByAnnualBonusList
(
tSalaryTaxConfig
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSpecialDeducationSumServiceImpl.java
View file @
b23508c5
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.read.listener.ReadListener
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
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.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
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
com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSpecialDeducationSumMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSpecialDeducationSumService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSpecialDeducationSumSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSpecialDeducationSumVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.time.LocalDateTime
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
*
专项扣除配置表-薪资配置5
*
* @
author hgw
* @
date 2022-08-05 11:40:14
*
/
@Log4j2
@Service
*
@Author fxj
*
@Description 专项扣除
* @
Date 13:19 2022/8/6
* @
Param
*
@return
**/
@Service
(
"tSpecialDeducationSumService"
)
public
class
TSpecialDeducationSumServiceImpl
extends
ServiceImpl
<
TSpecialDeducationSumMapper
,
TSpecialDeducationSum
>
implements
TSpecialDeducationSumService
{
/**
* 专项扣除配置表-薪资配置5
简单分页查询
*
简单分页查询
*
* @param tSpecialDeducationSum 专项扣除配置表-薪资配置5
* @param tSpecialDeducationSum
* @return
*/
@Override
public
IPage
<
TSpecialDeducationSum
>
getTSpecialDeducationSumPage
(
Page
<
TSpecialDeducationSum
>
page
,
TSpecialDeducationSumSearchVo
tSpecialDeducationSum
)
{
public
IPage
<
TSpecialDeducationSum
>
getTSpecialDeducationSumPage
(
Page
<
TSpecialDeducationSum
>
page
,
TSpecialDeducationSum
tSpecialDeducationSum
)
{
return
baseMapper
.
getTSpecialDeducationSumPage
(
page
,
tSpecialDeducationSum
);
}
/**
* 专项扣除配置表-薪资配置5批量导出
*
* @return
*/
* @param tSpecialDeducationSum
* @Description: 查找专项信息
* @Author: hgw
* @Date: 2019/9/30 16:19
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.v1.hrms.api.entity.TSpecialDeducationSum>
**/
@Override
public
void
listExport
(
HttpServletResponse
response
,
TSpecialDeducationSumSearchVo
searchVo
)
{
String
fileName
=
"不良记录批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
TSpecialDeducationSum
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
ServletOutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
"multipart/form-data"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TSpecialDeducationSum
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TSpecialDeducationSum
>
util
=
new
ExcelUtil
<>(
TSpecialDeducationSum
.
class
);
for
(
TSpecialDeducationSum
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"专项扣除配置表-薪资配置5"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"专项扣除配置表-薪资配置5"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
public
List
<
TSpecialDeducationSum
>
getTSpecialDeducationSumList
(
TSpecialDeducationSum
tSpecialDeducationSum
)
{
return
baseMapper
.
getTSpecialDeducationSumList
(
tSpecialDeducationSum
);
}
/**
* @Description: 查找专项信息
* @Author: hgw
* @Date: 2019/9/30 16:19
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.v1.hrms.api.entity.TSpecialDeducationSum>
**/
@Override
public
List
<
TSpecialDeducationSum
>
noPageDiy
(
TSpecialDeducationSumSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TSpecialDeducationSum
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TSpecialDeducationSum:
:
getId
,
idList
);
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
)
{
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
}
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
baseMapper
.
selectList
(
wrapper
);
public
TSpecialDeducationSum
getTSpecialDeducationSum
(
String
yearMonth
,
String
idNumber
,
String
invoiceTitle
)
{
return
baseMapper
.
getTSpecialDeducationSum
(
yearMonth
,
idNumber
,
invoiceTitle
);
}
private
Long
noPageCountDiy
(
TSpecialDeducationSumSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TSpecialDeducationSum
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TSpecialDeducationSum:
:
getId
,
idList
);
}
return
baseMapper
.
selectCount
(
wrapper
);
/**
* @param yearMonth
* @param idCardList
* @Description: 工资查询所需的全部list,组装Map来使用
* @Author: hgw
* @Date: 2022/1/26 16:45
* @return: java.util.Map<java.lang.String, com.yifu.cloud.v1.hrms.api.entity.TSpecialDeducationSum>
**/
@Override
public
Map
<
String
,
TSpecialDeducationSum
>
getTSpecialDeducationSumMap
(
String
yearMonth
,
List
<
String
>
idCardList
)
{
Map
<
String
,
TSpecialDeducationSum
>
sdsMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
yearMonth
)
&&
idCardList
!=
null
&&
!
idCardList
.
isEmpty
())
{
List
<
TSpecialDeducationSum
>
sdsList
=
baseMapper
.
getListByIdCardList
(
yearMonth
,
idCardList
);
if
(
sdsList
!=
null
&&
!
sdsList
.
isEmpty
())
{
for
(
TSpecialDeducationSum
sds
:
sdsList
)
{
sdsMap
.
put
(
sds
.
getIdNumber
()
+
CommonConstants
.
DOWN_LINE_STRING
+
sds
.
getDeclareTitle
(),
sds
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
TSpecialDeducationSumSearchVo
entity
)
{
LambdaQueryWrapper
<
TSpecialDeducationSum
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TSpecialDeducationSum:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TSpecialDeducationSum:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
()))
{
wrapper
.
eq
(
TSpecialDeducationSum:
:
getCreateName
,
entity
.
getCreateName
());
}
return
wrapper
;
return
sdsMap
;
}
@Override
public
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
)
{
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
TSpecialDeducationSumVo
>
util1
=
new
ExcelUtil
<>(
TSpecialDeducationSumVo
.
class
);
;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try
{
EasyExcel
.
read
(
inputStream
,
TSpecialDeducationSumVo
.
class
,
new
ReadListener
<
TSpecialDeducationSumVo
>()
{
/**
* 单次缓存的数据量
*/
public
static
final
int
BATCH_COUNT
=
CommonConstants
.
BATCH_COUNT
;
/**
*临时存储
*/
private
List
<
TSpecialDeducationSumVo
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
* @param yearMonth 年月
* @param invoiceTitle 申报单位
* @Description: 删除专项扣除
* @Author: hgw
* @Date: 2020/4/1 15:11
* @return: int
**/
@Override
public
void
invoke
(
TSpecialDeducationSumVo
data
,
AnalysisContext
context
)
{
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
data
.
setRowIndex
(
rowIndex
+
1
);
ErrorMessage
errorMessage
=
util1
.
checkEntity
(
data
,
data
.
getRowIndex
());
if
(
Common
.
isNotNull
(
errorMessage
))
{
errorMessageList
.
add
(
errorMessage
);
}
else
{
cachedDataList
.
add
(
data
);
}
if
(
cachedDataList
.
size
()
>=
BATCH_COUNT
)
{
saveData
();
// 存储完成清理 list
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
}
public
int
deleteByUnitAndMonth
(
String
yearMonth
,
String
invoiceTitle
)
{
return
baseMapper
.
deleteByUnitAndMonth
(
yearMonth
,
invoiceTitle
);
}
/**
* @param sdsList
* @Description: 保存专项
* @Author: hgw
* @Date: 2019/10/14 14:48
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
saveData
();
public
R
uploadSds
(
List
<
TSpecialDeducationSum
>
sdsList
)
{
if
(
sdsList
!=
null
&&
sdsList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
TSpecialDeducationSum
sds
=
null
;
int
rowNum
=
sdsList
.
size
();
String
nowYearMonth
=
DateUtil
.
getCurrentDateString
(
"yyyyMM"
);
String
yearMonth
=
DateUtil
.
getYearMonth
(
sdsList
.
get
(
0
).
getCreateStart
());
if
(
Common
.
isNotNull
(
yearMonth
))
{
if
(!
yearMonth
.
equals
(
nowYearMonth
))
{
return
R
.
failed
(
"所得期间-不是当前年月:"
+
nowYearMonth
+
",不允许导入"
);
}
}
else
{
return
R
.
failed
(
"请检查‘所得期间起’单元格格式是文本格式,且满足日期格式yyyy-MM-dd或yyyyMMdd"
);
}
String
declareTitle
=
sdsList
.
get
(
0
).
getDeclareTitle
();
if
(
Common
.
isEmpty
(
declareTitle
))
{
return
R
.
failed
(
"申报单位不能为空"
);
}
/**
* 加上存储数据库
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importTSpecialDeducationSum
(
cachedDataList
,
errorMessageList
);
log
.
info
(
"存储数据库成功!"
);
TSpecialDeducationSum
sdsCheck
=
new
TSpecialDeducationSum
();
sdsCheck
.
setCreateMonth
(
yearMonth
);
sdsCheck
.
setDeclareTitle
(
declareTitle
);
QueryWrapper
<
TSpecialDeducationSum
>
queryWrapperSc
=
new
QueryWrapper
<>();
queryWrapperSc
.
setEntity
(
sdsCheck
);
List
<
TSpecialDeducationSum
>
scList
=
this
.
list
(
queryWrapperSc
);
if
(
scList
!=
null
&&
scList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
return
R
.
failed
(
"当前月同一申报单位已存在数据,请先删除"
);
}
}).
sheet
().
doRead
();
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
"新建失败-获取登录人信息为空"
);
}
return
R
.
ok
(
errorMessageList
);
LocalDateTime
nowDate
=
LocalDateTime
.
now
();
for
(
TSpecialDeducationSum
s
:
sdsList
)
{
s
.
setCreateMonth
(
yearMonth
);
s
.
setCreateTime
(
nowDate
);
s
.
setCreateUser
(
String
.
valueOf
(
user
.
getId
()));
}
private
void
importTSpecialDeducationSum
(
List
<
TSpecialDeducationSumVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 个性化校验逻辑
ErrorMessage
errorMsg
;
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
TSpecialDeducationSumVo
excel
=
excelVOList
.
get
(
i
);
// 数据合法情况 TODO
// 插入
insertExcel
(
excel
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
return
new
R
<>(
this
.
saveBatch
(
sdsList
));
}
return
R
.
failed
(
"数据不可为空"
);
}
/**
* 插入excel bad record
*/
private
void
insertExcel
(
TSpecialDeducationSumVo
excel
)
{
TSpecialDeducationSum
insert
=
new
TSpecialDeducationSum
();
BeanUtil
.
copyProperties
(
excel
,
insert
);
this
.
save
(
insert
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/package-info.java
deleted
100644 → 0
View file @
2b54ba92
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
;
\ No newline at end of file
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TConfigSalaryMapper.xml
View file @
b23508c5
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.salary.mapper.TConfigSalaryMapper"
>
...
...
@@ -30,70 +11,82 @@
<result
property=
"departNo"
column=
"DEPART_NO"
/>
<result
property=
"departName"
column=
"DEPART_NAME"
/>
<result
property=
"salaryMonth"
column=
"SALARY_MONTH"
/>
<result
property=
"settleMonth"
column=
"SETTLE_MONTH"
/>
<result
property=
"socialMonth"
column=
"SOCIAL_MONTH"
/>
<result
property=
"fundMonth"
column=
"FUND_MONTH"
/>
<result
property=
"socialPriority"
column=
"SOCIAL_PRIORITY"
/>
<result
property=
"fundPriority"
column=
"FUND_PRIORITY"
/>
<result
property=
"grantType"
column=
"GRANT_TYPE"
/>
<result
property=
"annualBonusType"
column=
"ANNUAL_BONUS_TYPE"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.NAME,
a.DEPART_ID,
a.DEPART_NO,
a.DEPART_NAME,
a.SALARY_MONTH,
a.SOCIAL_MONTH,
a.FUND_MONTH,
a.SOCIAL_PRIORITY,
a.FUND_PRIORITY,
a.GRANT_TYPE
</sql>
<sql
id=
"tConfigSalary_where"
>
<if
test=
"tConfigSalary != null"
>
<!--tConfigSalary简单分页查询-->
<select
id=
"getTConfigSalaryPage"
resultMap=
"tConfigSalaryMap"
>
SELECT
ID,
NAME,
DEPART_ID,
DEPART_NO,
DEPART_NAME,
SALARY_MONTH,
SETTLE_MONTH,
SOCIAL_MONTH,
FUND_MONTH,
SOCIAL_PRIORITY,
FUND_PRIORITY,
GRANT_TYPE,
ANNUAL_BONUS_TYPE
FROM t_config_salary
<where>
1=1
<if
test=
"tConfigSalary.id != null and tConfigSalary.id.trim() != ''"
>
AND a.
ID = #{tConfigSalary.id}
AND
ID = #{tConfigSalary.id}
</if>
<if
test=
"tConfigSalary.name != null and tConfigSalary.name.trim() != ''"
>
AND a.NAME = #{tConfigSalary.name}
AND NAME like '%${tConfigSalary.name}%'
</if>
<if
test=
"tConfigSalary.departId != null and tConfigSalary.departId.trim() != ''"
>
AND a.
DEPART_ID = #{tConfigSalary.departId}
AND
DEPART_ID = #{tConfigSalary.departId}
</if>
<if
test=
"tConfigSalary.departNo != null and tConfigSalary.departNo.trim() != ''"
>
AND a.
DEPART_NO = #{tConfigSalary.departNo}
AND
DEPART_NO = #{tConfigSalary.departNo}
</if>
<if
test=
"tConfigSalary.departName != null and tConfigSalary.departName.trim() != ''"
>
AND a.
DEPART_NAME = #{tConfigSalary.departName}
AND
DEPART_NAME = #{tConfigSalary.departName}
</if>
<if
test=
"tConfigSalary.salaryMonth != null
"
>
AND a.
SALARY_MONTH = #{tConfigSalary.salaryMonth}
<if
test=
"tConfigSalary.salaryMonth != null
"
>
AND
SALARY_MONTH = #{tConfigSalary.salaryMonth}
</if>
<if
test=
"tConfigSalary.socialMonth != null
"
>
AND a.SOCIAL_MONTH = #{tConfigSalary.social
Month}
<if
test=
"tConfigSalary.settleMonth != null
"
>
AND SETTLE_MONTH = #{tConfigSalary.settle
Month}
</if>
<if
test=
"tConfigSalary.fundMonth != null
"
>
AND a.FUND_MONTH = #{tConfigSalary.fund
Month}
<if
test=
"tConfigSalary.socialMonth != null
"
>
AND SOCIAL_MONTH = #{tConfigSalary.social
Month}
</if>
<if
test=
"tConfigSalary.socialPriority != null
"
>
AND a.SOCIAL_PRIORITY = #{tConfigSalary.socialPriority
}
<if
test=
"tConfigSalary.fundMonth != null
"
>
AND FUND_MONTH = #{tConfigSalary.fundMonth
}
</if>
<if
test=
"tConfigSalary.fundPriority != null
"
>
AND a.FUND_PRIORITY = #{tConfigSalary.fund
Priority}
<if
test=
"tConfigSalary.socialPriority != null
"
>
AND SOCIAL_PRIORITY = #{tConfigSalary.social
Priority}
</if>
<if
test=
"tConfigSalary.grantType != null
"
>
AND a.GRANT_TYPE = #{tConfigSalary.grantType
}
<if
test=
"tConfigSalary.fundPriority != null
"
>
AND FUND_PRIORITY = #{tConfigSalary.fundPriority
}
</if>
<if
test=
"tConfigSalary.grantType != null "
>
AND GRANT_TYPE = #{tConfigSalary.grantType}
</if>
<if
test=
"tConfigSalary.annualBonusType != null "
>
AND ANNUAL_BONUS_TYPE = #{tConfigSalary.annualBonusType}
</if>
<!--数据权限判断-->
<if
test=
"settleDomainVos != null and settleDomainVos.size() > 0"
>
and DEPART_ID in
<foreach
collection=
"settleDomainVos"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param.id}
</foreach>
</if>
</sql>
<!--tConfigSalary简单分页查询-->
<select
id=
"getTConfigSalaryPage"
resultMap=
"tConfigSalaryMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_config_salary a
<where>
1=1
<include
refid=
"tConfigSalary_where"
/>
</where>
</select>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TMinSalaryMapper.xml
View file @
b23508c5
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.salary.mapper.TMinSalaryMapper"
>
...
...
@@ -32,63 +13,58 @@
<result
property=
"status"
column=
"status"
/>
<result
property=
"startDate"
column=
"start_date"
/>
<result
property=
"endDate"
column=
"end_date"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"createUser"
column=
"create_user"
/>
<result
property=
"createDate"
column=
"create_date"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.id,
a.province,
a.city,
a.town
,
a.salary_bas
e,
a.status
,
a.start_date
,
a.end_dat
e,
a.CREATE_BY
,
a.CREATE_NAME
,
a.CREATE_TIME
,
a.UPDATE_BY
,
a.UPDATE_TIME
</sql>
<sql
id=
"tMinSalary_where"
>
<if
test=
"tMinSalary != null"
>
<!--tMinSalary简单分页查询-->
<select
id=
"getTMinSalaryPage"
resultMap=
"tMinSalaryMap"
>
SELECT
id
,
provinc
e,
city
,
town
,
salary_bas
e,
status
,
start_date
,
end_date
,
create_user
,
create_date
FROM t_min_salary
<where
>
1=1
<if
test=
"tMinSalary.id != null and tMinSalary.id.trim() != ''"
>
AND a.
id = #{tMinSalary.id}
AND
id = #{tMinSalary.id}
</if>
<if
test=
"tMinSalary.province != null"
>
AND a.
province = #{tMinSalary.province}
AND
province = #{tMinSalary.province}
</if>
<if
test=
"tMinSalary.city != null"
>
AND a.
city = #{tMinSalary.city}
AND
city = #{tMinSalary.city}
</if>
<if
test=
"tMinSalary.town != null"
>
AND a.
town = #{tMinSalary.town}
AND
town = #{tMinSalary.town}
</if>
<if
test=
"tMinSalary.salaryBase != null and tMinSalary.salaryBase.trim() != ''"
>
AND a.
salary_base = #{tMinSalary.salaryBase}
AND
salary_base = #{tMinSalary.salaryBase}
</if>
<if
test=
"tMinSalary.status != null"
>
AND a.
status = #{tMinSalary.status}
AND
status = #{tMinSalary.status}
</if>
<if
test=
"tMinSalary.startDate != null"
>
AND a.
start_date = #{tMinSalary.startDate}
AND
start_date = #{tMinSalary.startDate}
</if>
<if
test=
"tMinSalary.endDate != null"
>
AND a.
end_date = #{tMinSalary.endDate}
AND
end_date = #{tMinSalary.endDate}
</if>
<if
test=
"tMinSalary.createUser != null and tMinSalary.createUser.trim() != ''"
>
AND create_user = #{tMinSalary.createUser}
</if>
<if
test=
"tMinSalary.createDate != null"
>
AND create_date = #{tMinSalary.createDate}
</if>
</sql>
<!--tMinSalary简单分页查询-->
<select
id=
"getTMinSalaryPage"
resultMap=
"tMinSalaryMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_min_salary a
<where>
1=1
<include
refid=
"tMinSalary_where"
/>
</where>
</select>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TOwnDeptMapper.xml
View file @
b23508c5
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.salary.mapper.TOwnDeptMapper"
>
<resultMap
id=
"tOwnDeptMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.entity.TOwnDept"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"deptId"
column=
"dept_id"
/>
...
...
@@ -66,4 +44,12 @@
<include
refid=
"tOwnDept_where"
/>
</where>
</select>
<!--tOwnDept简单list查询-->
<select
id=
"getTOwnDeptIdList"
resultType=
"String"
>
SELECT a.dept_id FROM t_own_dept a
</select>
<!--获取自有员工身份证-->
<select
id=
"getOwnEmpList"
resultType=
"String"
>
SELECT EMP_IDCARD FROM view_own_employee
</select>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryConfigStandardMapper.xml
View file @
b23508c5
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryConfigStandardMapper"
>
...
...
@@ -31,64 +12,72 @@
<result
property=
"modelType"
column=
"MODEL_TYPE"
/>
<result
property=
"isMustNeed"
column=
"IS_MUST_NEED"
/>
<result
property=
"isTax"
column=
"IS_TAX"
/>
<result
property=
"orderLine"
column=
"order_line"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createUser"
column=
"CREATE_USER"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"orderLine"
column=
"order_line"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.CN_NAME,
a.DB_FIED_NAME,
a.JAVA_FIED_NAME,
a.MODEL_TYPE,
a.IS_MUST_NEED,
a.IS_TAX,
a.order_line,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
<sql
id=
"tSalaryConfigStandard_where"
>
<if
test=
"tSalaryConfigStandard != null"
>
<if
test=
"tSalaryConfigStandard != null
"
>
<if
test=
"tSalaryConfigStandard.id != null and tSalaryConfigStandard.id.trim() != ''"
>
AND a.
ID = #{tSalaryConfigStandard.id}
AND
ID = #{tSalaryConfigStandard.id}
</if>
<if
test=
"tSalaryConfigStandard.cnName != null and tSalaryConfigStandard.cnName.trim() != ''"
>
AND a.
CN_NAME = #{tSalaryConfigStandard.cnName}
AND
CN_NAME = #{tSalaryConfigStandard.cnName}
</if>
<if
test=
"tSalaryConfigStandard.dbFiedName != null and tSalaryConfigStandard.dbFiedName.trim() != ''"
>
AND a.
DB_FIED_NAME = #{tSalaryConfigStandard.dbFiedName}
AND
DB_FIED_NAME = #{tSalaryConfigStandard.dbFiedName}
</if>
<if
test=
"tSalaryConfigStandard.javaFiedName != null and tSalaryConfigStandard.javaFiedName.trim() != ''"
>
AND a.
JAVA_FIED_NAME = #{tSalaryConfigStandard.javaFiedName}
AND
JAVA_FIED_NAME = #{tSalaryConfigStandard.javaFiedName}
</if>
<if
test=
"tSalaryConfigStandard.modelType != null and tSalaryConfigStandard.modelType.trim() != ''"
>
AND a.
MODEL_TYPE = #{tSalaryConfigStandard.modelType}
AND
MODEL_TYPE = #{tSalaryConfigStandard.modelType}
</if>
<if
test=
"tSalaryConfigStandard.isMustNeed != null and tSalaryConfigStandard.isMustNeed.trim() != ''"
>
AND a.
IS_MUST_NEED = #{tSalaryConfigStandard.isMustNeed}
AND
IS_MUST_NEED = #{tSalaryConfigStandard.isMustNeed}
</if>
<if
test=
"tSalaryConfigStandard.isTax != null
"
>
AND a.IS_TAX = #{tSalaryConfigStandard.isTax
}
<if
test=
"tSalaryConfigStandard.createUser != null and tSalaryConfigStandard.createUser.trim() != ''
"
>
AND CREATE_USER = #{tSalaryConfigStandard.createUser
}
</if>
<if
test=
"tSalaryConfigStandard.orderLin
e != null"
>
AND a.order_line = #{tSalaryConfigStandard.orderLin
e}
<if
test=
"tSalaryConfigStandard.createTim
e != null"
>
AND CREATE_TIME = #{tSalaryStandard.createTim
e}
</if>
</if>
</sql>
<!--tSalaryConfigStandard简单分页查询-->
<select
id=
"getTSalaryConfigStandardPage"
resultMap=
"tSalaryConfigStandardMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_salary_config_standard a
ID,
CN_NAME,
DB_FIED_NAME,
JAVA_FIED_NAME,
MODEL_TYPE,
IS_MUST_NEED,
IS_TAX,
CREATE_USER,
CREATE_TIME
FROM t_salary_config_standard
<where>
1=1
<include
refid=
"tSalaryConfigStandard_where"
/>
</where>
</select>
<!--tSalaryConfigStandard列表-->
<select
id=
"getTSalaryConfigStandardList"
resultMap=
"tSalaryConfigStandardMap"
>
SELECT
ID,
DB_FIED_NAME,
JAVA_FIED_NAME
FROM t_salary_config_standard
<where>
order_line != 999
<include
refid=
"tSalaryConfigStandard_where"
/>
</where>
order by order_line asc
</select>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryTaxConfigMapper.xml
View file @
b23508c5
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryTaxConfigMapper"
>
...
...
@@ -34,56 +15,135 @@
<result
property=
"type"
column=
"TYPE"
/>
<result
property=
"startPoint"
column=
"START_POINT"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.TAXABLE_INCOME_REMARK,
a.WITHHOLDING_RATE,
a.QUICK_DEDUCATION,
a.MIN_INCOME,
a.MAX_INCOME,
a.LEVEL,
a.TYPE,
a.START_POINT
</sql>
<sql
id=
"tSalaryTaxConfig_where"
>
<if
test=
"tSalaryTaxConfig != null"
>
<!--tSalaryTaxConfig简单分页查询-->
<select
id=
"getTSalaryTaxConfigPage"
resultMap=
"tSalaryTaxConfigMap"
>
SELECT
ID,
TAXABLE_INCOME_REMARK,
WITHHOLDING_RATE,
QUICK_DEDUCATION,
MIN_INCOME,
MAX_INCOME,
LEVEL,
TYPE,
START_POINT
FROM t_salary_tax_config
<where>
1=1
<if
test=
"tSalaryTaxConfig.id != null and tSalaryTaxConfig.id.trim() != ''"
>
AND a.
ID = #{tSalaryTaxConfig.id}
AND
ID = #{tSalaryTaxConfig.id}
</if>
<if
test=
"tSalaryTaxConfig.taxableIncomeRemark != null and tSalaryTaxConfig.taxableIncomeRemark.trim() != ''"
>
AND a.
TAXABLE_INCOME_REMARK = #{tSalaryTaxConfig.taxableIncomeRemark}
AND
TAXABLE_INCOME_REMARK = #{tSalaryTaxConfig.taxableIncomeRemark}
</if>
<if
test=
"tSalaryTaxConfig.withholdingRate != null"
>
AND a.
WITHHOLDING_RATE = #{tSalaryTaxConfig.withholdingRate}
AND
WITHHOLDING_RATE = #{tSalaryTaxConfig.withholdingRate}
</if>
<if
test=
"tSalaryTaxConfig.quickDeducation != null"
>
AND a.
QUICK_DEDUCATION = #{tSalaryTaxConfig.quickDeducation}
AND
QUICK_DEDUCATION = #{tSalaryTaxConfig.quickDeducation}
</if>
<if
test=
"tSalaryTaxConfig.minIncome != null"
>
AND a.
MIN_INCOME = #{tSalaryTaxConfig.minIncome}
AND
MIN_INCOME = #{tSalaryTaxConfig.minIncome}
</if>
<if
test=
"tSalaryTaxConfig.maxIncome != null"
>
AND a.
MAX_INCOME = #{tSalaryTaxConfig.maxIncome}
AND
MAX_INCOME = #{tSalaryTaxConfig.maxIncome}
</if>
<if
test=
"tSalaryTaxConfig.level != null"
>
AND a.
LEVEL = #{tSalaryTaxConfig.level}
AND
LEVEL = #{tSalaryTaxConfig.level}
</if>
<if
test=
"tSalaryTaxConfig.type != null"
>
AND a.
TYPE = #{tSalaryTaxConfig.type}
AND
TYPE = #{tSalaryTaxConfig.type}
</if>
<if
test=
"tSalaryTaxConfig.startPoint != null"
>
AND a.START_POINT = #{tSalaryTaxConfig.startPoint}
AND START_POINT = #{tSalaryTaxConfig.startPoint}
</if>
</where>
</select>
<!--tSalaryTaxConfig获取个税配置-->
<select
id=
"getTaxConfigByPersonList"
resultMap=
"tSalaryTaxConfigMap"
>
SELECT
ID,
TAXABLE_INCOME_REMARK,
WITHHOLDING_RATE,
QUICK_DEDUCATION,
MIN_INCOME,
MAX_INCOME,
LEVEL,
TYPE,
START_POINT
FROM t_salary_tax_config
<where>
TYPE = 0
<if
test=
"tSalaryTaxConfig.id != null and tSalaryTaxConfig.id.trim() != ''"
>
AND ID = #{tSalaryTaxConfig.id}
</if>
<if
test=
"tSalaryTaxConfig.taxableIncomeRemark != null and tSalaryTaxConfig.taxableIncomeRemark.trim() != ''"
>
AND TAXABLE_INCOME_REMARK = #{tSalaryTaxConfig.taxableIncomeRemark}
</if>
</sql>
<!--tSalaryTaxConfig简单分页查询-->
<select
id=
"getTSalaryTaxConfigPage"
resultMap=
"tSalaryTaxConfigMap"
>
<if
test=
"tSalaryTaxConfig.withholdingRate != null"
>
AND WITHHOLDING_RATE = #{tSalaryTaxConfig.withholdingRate}
</if>
<if
test=
"tSalaryTaxConfig.quickDeducation != null"
>
AND QUICK_DEDUCATION = #{tSalaryTaxConfig.quickDeducation}
</if>
<if
test=
"tSalaryTaxConfig.minIncome != null"
>
AND MIN_INCOME = #{tSalaryTaxConfig.minIncome}
</if>
<if
test=
"tSalaryTaxConfig.maxIncome != null"
>
AND MAX_INCOME = #{tSalaryTaxConfig.maxIncome}
</if>
<if
test=
"tSalaryTaxConfig.level != null"
>
AND LEVEL = #{tSalaryTaxConfig.level}
</if>
<if
test=
"tSalaryTaxConfig.startPoint != null"
>
AND START_POINT = #{tSalaryTaxConfig.startPoint}
</if>
</where>
</select>
<!--tSalaryTaxConfig获取年终奖配置-->
<select
id=
"getTaxConfigByAnnualBonusList"
resultMap=
"tSalaryTaxConfigMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_salary_tax_config a
ID,
TAXABLE_INCOME_REMARK,
WITHHOLDING_RATE,
QUICK_DEDUCATION,
MIN_INCOME,
MAX_INCOME,
LEVEL,
TYPE,
START_POINT
FROM t_salary_tax_config
<where>
1=1
<include
refid=
"tSalaryTaxConfig_where"
/>
TYPE = 1
<if
test=
"tSalaryTaxConfig.id != null and tSalaryTaxConfig.id.trim() != ''"
>
AND ID = #{tSalaryTaxConfig.id}
</if>
<if
test=
"tSalaryTaxConfig.taxableIncomeRemark != null and tSalaryTaxConfig.taxableIncomeRemark.trim() != ''"
>
AND TAXABLE_INCOME_REMARK = #{tSalaryTaxConfig.taxableIncomeRemark}
</if>
<if
test=
"tSalaryTaxConfig.withholdingRate != null"
>
AND WITHHOLDING_RATE = #{tSalaryTaxConfig.withholdingRate}
</if>
<if
test=
"tSalaryTaxConfig.quickDeducation != null"
>
AND QUICK_DEDUCATION = #{tSalaryTaxConfig.quickDeducation}
</if>
<if
test=
"tSalaryTaxConfig.minIncome != null"
>
AND MIN_INCOME = #{tSalaryTaxConfig.minIncome}
</if>
<if
test=
"tSalaryTaxConfig.maxIncome != null"
>
AND MAX_INCOME = #{tSalaryTaxConfig.maxIncome}
</if>
<if
test=
"tSalaryTaxConfig.level != null"
>
AND LEVEL = #{tSalaryTaxConfig.level}
</if>
<if
test=
"tSalaryTaxConfig.startPoint != null"
>
AND START_POINT = #{tSalaryTaxConfig.startPoint}
</if>
</where>
</select>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSpecialDeducationSumMapper.xml
View file @
b23508c5
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.salary.mapper.TSpecialDeducationSumMapper"
>
<resultMap
id=
"tSpecialDeducationSumMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"createUser"
column=
"CREATE_USER"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"createMonth"
column=
"CREATE_MONTH"
/>
<result
property=
"declareTitle"
column=
"DECLARE_TITLE"
/>
<result
property=
"jobNumber"
column=
"JOB_NUMBER"
/>
...
...
@@ -55,155 +38,212 @@
<result
property=
"costReduction"
column=
"COST_REDUCTION"
/>
<result
property=
"taxesWithheld"
column=
"TAXES_WITHHELD"
/>
<result
property=
"remark"
column=
"REMARK"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.id,
a.CREATE_MONTH,
a.DECLARE_TITLE,
a.JOB_NUMBER,
a.NAME,
a.TYPE,
a.ID_NUMBER,
a.CREATE_START,
a.CREATE_END,
a.CURRENT_INCOME,
a.CURRENT_INCOME_TAX_FREE,
a.INSURANCE_PENSION,
a.INSURANCE_MEDICAL,
a.INSURANCE_UNEMPLOYMENT,
a.FUND,
a.SUM_CHILD_EDU_MONEY,
a.SUM_HOUSING_LOAN_MONEY,
a.SUM_HOUSING_RENT_MONEY,
a.SUM_SUPPORT_ELDERLY_MONEY,
a.SUM_CONTINUING_EDUCATION_MONEY,
a.SUM_BABY_MONEY,
a.ENTERPRISE_ANNUITY,
a.TAKING_RISKS,
a.TAX_DEFERRED_INSURANCE,
a.OTHER_MONEY,
a.DONATION_AMOUNT,
a.PRE_TAX_DEDUCTION,
a.TAX_SAVINGS,
a.COST_REDUCTION,
a.TAXES_WITHHELD,
a.REMARK,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
id,
CREATE_USER,
CREATE_TIME,
CREATE_MONTH,
DECLARE_TITLE,
JOB_NUMBER,
NAME,
TYPE,
ID_NUMBER,
CREATE_START,
CREATE_END,
CURRENT_INCOME,
CURRENT_INCOME_TAX_FREE,
INSURANCE_PENSION,
INSURANCE_MEDICAL,
INSURANCE_UNEMPLOYMENT,
FUND,
SUM_CHILD_EDU_MONEY,
SUM_HOUSING_LOAN_MONEY,
SUM_HOUSING_RENT_MONEY,
SUM_SUPPORT_ELDERLY_MONEY,
SUM_CONTINUING_EDUCATION_MONEY,
SUM_BABY_MONEY,
ENTERPRISE_ANNUITY,
TAKING_RISKS,
TAX_DEFERRED_INSURANCE,
OTHER_MONEY,
DONATION_AMOUNT,
PRE_TAX_DEDUCTION,
TAX_SAVINGS,
COST_REDUCTION,
TAXES_WITHHELD,
REMARK
</sql>
<sql
id=
"tSpecialDeducationSum_where"
>
<if
test=
"tSpecialDeducationSum != null"
>
<if
test=
"tSpecialDeducationSum.id != null and tSpecialDeducationSum.id.trim() != ''"
>
AND a.id = #{tSpecialDeducationSum.id}
AND id = #{tSpecialDeducationSum.id}
</if>
<if
test=
"tSpecialDeducationSum.createUser != null and tSpecialDeducationSum.createUser.trim() != ''"
>
AND CREATE_USER = #{tSpecialDeducationSum.createUser}
</if>
<if
test=
"tSpecialDeducationSum.createTime != null"
>
AND CREATE_TIME = #{tSpecialDeducationSum.createTime}
</if>
<if
test=
"tSpecialDeducationSum.createMonth != null and tSpecialDeducationSum.createMonth.trim() != ''"
>
AND a.
CREATE_MONTH = #{tSpecialDeducationSum.createMonth}
AND
CREATE_MONTH = #{tSpecialDeducationSum.createMonth}
</if>
<if
test=
"tSpecialDeducationSum.declareTitle != null and tSpecialDeducationSum.declareTitle.trim() != ''"
>
AND a.DECLARE_TITLE = #{tSpecialDeducationSum.declareTitle}
AND DECLARE_TITLE like '%${tSpecialDeducationSum.declareTitle}%'
</if>
<if
test=
"tSpecialDeducationSum.jobNumber != null and tSpecialDeducationSum.jobNumber.trim() != ''"
>
AND a.
JOB_NUMBER = #{tSpecialDeducationSum.jobNumber}
AND
JOB_NUMBER = #{tSpecialDeducationSum.jobNumber}
</if>
<if
test=
"tSpecialDeducationSum.name != null and tSpecialDeducationSum.name.trim() != ''"
>
AND a.NAME = #{tSpecialDeducationSum.name}
AND NAME like '%${tSpecialDeducationSum.name}%'
</if>
<if
test=
"tSpecialDeducationSum.type != null and tSpecialDeducationSum.type.trim() != ''"
>
AND a.
TYPE = #{tSpecialDeducationSum.type}
AND
TYPE = #{tSpecialDeducationSum.type}
</if>
<if
test=
"tSpecialDeducationSum.idNumber != null and tSpecialDeducationSum.idNumber.trim() != ''"
>
AND a.
ID_NUMBER = #{tSpecialDeducationSum.idNumber}
AND
ID_NUMBER = #{tSpecialDeducationSum.idNumber}
</if>
<if
test=
"tSpecialDeducationSum.createStart != null and tSpecialDeducationSum.createStart.trim() != ''"
>
AND a.
CREATE_START = #{tSpecialDeducationSum.createStart}
AND
CREATE_START = #{tSpecialDeducationSum.createStart}
</if>
<if
test=
"tSpecialDeducationSum.createEnd != null and tSpecialDeducationSum.createEnd.trim() != ''"
>
AND a.
CREATE_END = #{tSpecialDeducationSum.createEnd}
AND
CREATE_END = #{tSpecialDeducationSum.createEnd}
</if>
<if
test=
"tSpecialDeducationSum.currentIncome != null"
>
AND a.
CURRENT_INCOME = #{tSpecialDeducationSum.currentIncome}
AND
CURRENT_INCOME = #{tSpecialDeducationSum.currentIncome}
</if>
<if
test=
"tSpecialDeducationSum.currentIncomeTaxFree != null"
>
AND a.
CURRENT_INCOME_TAX_FREE = #{tSpecialDeducationSum.currentIncomeTaxFree}
AND
CURRENT_INCOME_TAX_FREE = #{tSpecialDeducationSum.currentIncomeTaxFree}
</if>
<if
test=
"tSpecialDeducationSum.insurancePension != null"
>
AND a.
INSURANCE_PENSION = #{tSpecialDeducationSum.insurancePension}
AND
INSURANCE_PENSION = #{tSpecialDeducationSum.insurancePension}
</if>
<if
test=
"tSpecialDeducationSum.insuranceMedical != null"
>
AND a.
INSURANCE_MEDICAL = #{tSpecialDeducationSum.insuranceMedical}
AND
INSURANCE_MEDICAL = #{tSpecialDeducationSum.insuranceMedical}
</if>
<if
test=
"tSpecialDeducationSum.insuranceUnemployment != null"
>
AND a.
INSURANCE_UNEMPLOYMENT = #{tSpecialDeducationSum.insuranceUnemployment}
AND
INSURANCE_UNEMPLOYMENT = #{tSpecialDeducationSum.insuranceUnemployment}
</if>
<if
test=
"tSpecialDeducationSum.fund != null"
>
AND a.
FUND = #{tSpecialDeducationSum.fund}
AND
FUND = #{tSpecialDeducationSum.fund}
</if>
<if
test=
"tSpecialDeducationSum.sumChildEduMoney != null"
>
AND a.
SUM_CHILD_EDU_MONEY = #{tSpecialDeducationSum.sumChildEduMoney}
AND
SUM_CHILD_EDU_MONEY = #{tSpecialDeducationSum.sumChildEduMoney}
</if>
<if
test=
"tSpecialDeducationSum.sumHousingLoanMoney != null"
>
AND a.
SUM_HOUSING_LOAN_MONEY = #{tSpecialDeducationSum.sumHousingLoanMoney}
AND
SUM_HOUSING_LOAN_MONEY = #{tSpecialDeducationSum.sumHousingLoanMoney}
</if>
<if
test=
"tSpecialDeducationSum.sumHousingRentMoney != null"
>
AND a.
SUM_HOUSING_RENT_MONEY = #{tSpecialDeducationSum.sumHousingRentMoney}
AND
SUM_HOUSING_RENT_MONEY = #{tSpecialDeducationSum.sumHousingRentMoney}
</if>
<if
test=
"tSpecialDeducationSum.sumSupportElderlyMoney != null"
>
AND a.
SUM_SUPPORT_ELDERLY_MONEY = #{tSpecialDeducationSum.sumSupportElderlyMoney}
AND
SUM_SUPPORT_ELDERLY_MONEY = #{tSpecialDeducationSum.sumSupportElderlyMoney}
</if>
<if
test=
"tSpecialDeducationSum.sumContinuingEducationMoney != null"
>
AND a.
SUM_CONTINUING_EDUCATION_MONEY = #{tSpecialDeducationSum.sumContinuingEducationMoney}
AND
SUM_CONTINUING_EDUCATION_MONEY = #{tSpecialDeducationSum.sumContinuingEducationMoney}
</if>
<if
test=
"tSpecialDeducationSum.sumBabyMoney != null"
>
AND a.
SUM_BABY_MONEY = #{tSpecialDeducationSum.sumBabyMoney}
AND
SUM_BABY_MONEY = #{tSpecialDeducationSum.sumBabyMoney}
</if>
<if
test=
"tSpecialDeducationSum.enterpriseAnnuity != null"
>
AND a.
ENTERPRISE_ANNUITY = #{tSpecialDeducationSum.enterpriseAnnuity}
AND
ENTERPRISE_ANNUITY = #{tSpecialDeducationSum.enterpriseAnnuity}
</if>
<if
test=
"tSpecialDeducationSum.takingRisks != null"
>
AND a.
TAKING_RISKS = #{tSpecialDeducationSum.takingRisks}
AND
TAKING_RISKS = #{tSpecialDeducationSum.takingRisks}
</if>
<if
test=
"tSpecialDeducationSum.taxDeferredInsurance != null"
>
AND a.
TAX_DEFERRED_INSURANCE = #{tSpecialDeducationSum.taxDeferredInsurance}
AND
TAX_DEFERRED_INSURANCE = #{tSpecialDeducationSum.taxDeferredInsurance}
</if>
<if
test=
"tSpecialDeducationSum.otherMoney != null"
>
AND a.
OTHER_MONEY = #{tSpecialDeducationSum.otherMoney}
AND
OTHER_MONEY = #{tSpecialDeducationSum.otherMoney}
</if>
<if
test=
"tSpecialDeducationSum.donationAmount != null"
>
AND a.
DONATION_AMOUNT = #{tSpecialDeducationSum.donationAmount}
AND
DONATION_AMOUNT = #{tSpecialDeducationSum.donationAmount}
</if>
<if
test=
"tSpecialDeducationSum.preTaxDeduction != null"
>
AND a.
PRE_TAX_DEDUCTION = #{tSpecialDeducationSum.preTaxDeduction}
AND
PRE_TAX_DEDUCTION = #{tSpecialDeducationSum.preTaxDeduction}
</if>
<if
test=
"tSpecialDeducationSum.taxSavings != null"
>
AND a.
TAX_SAVINGS = #{tSpecialDeducationSum.taxSavings}
AND
TAX_SAVINGS = #{tSpecialDeducationSum.taxSavings}
</if>
<if
test=
"tSpecialDeducationSum.costReduction != null"
>
AND a.
COST_REDUCTION = #{tSpecialDeducationSum.costReduction}
AND
COST_REDUCTION = #{tSpecialDeducationSum.costReduction}
</if>
<if
test=
"tSpecialDeducationSum.taxesWithheld != null"
>
AND a.
TAXES_WITHHELD = #{tSpecialDeducationSum.taxesWithheld}
AND
TAXES_WITHHELD = #{tSpecialDeducationSum.taxesWithheld}
</if>
<if
test=
"tSpecialDeducationSum.remark != null and tSpecialDeducationSum.remark.trim() != ''"
>
AND a.
REMARK = #{tSpecialDeducationSum.remark}
AND
REMARK = #{tSpecialDeducationSum.remark}
</if>
</if>
</sql>
<!--tSpecialDeducationSum简单分页查询-->
<select
id=
"getTSpecialDeducationSumPage"
resultMap=
"tSpecialDeducationSumMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_special_deducation_sum
a
FROM t_special_deducation_sum
<where>
1=1
<include
refid=
"tSpecialDeducationSum_where"
/>
</where>
</select>
<select
id=
"getTSpecialDeducationSumList"
resultMap=
"tSpecialDeducationSumMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_special_deducation_sum
<where>
1=1
<include
refid=
"tSpecialDeducationSum_where"
/>
</where>
order by CREATE_TIME desc
</select>
<select
id=
"getTSpecialDeducationSum"
resultMap=
"tSpecialDeducationSumMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_special_deducation_sum
<where>
1=1
<if
test=
"yearMonth != null and yearMonth.trim() != ''"
>
AND CREATE_MONTH = #{yearMonth}
</if>
<if
test=
"idNumber != null and idNumber.trim() != ''"
>
AND ID_NUMBER = #{idNumber}
</if>
<if
test=
"invoiceTitle != null and invoiceTitle.trim() != ''"
>
AND DECLARE_TITLE = #{invoiceTitle}
</if>
</where>
limit 1
</select>
<!-- 工资查询所需的全部list,组装Map来使用 -->
<select
id=
"getListByIdCardList"
resultMap=
"tSpecialDeducationSumMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_special_deducation_sum
<where>
1=1
<if
test=
"yearMonth != null and yearMonth.trim() != ''"
>
AND CREATE_MONTH = #{yearMonth}
</if>
<if
test=
"idCardList != null"
>
and ID_NUMBER in
<foreach
item=
"item"
index=
"index"
collection=
"idCardList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</where>
</select>
<!--删除专项扣除-->
<delete
id=
"deleteByUnitAndMonth"
>
DELETE FROM t_special_deducation_sum WHERE CREATE_MONTH = #{yearMonth} AND DECLARE_TITLE = #{invoiceTitle}
</delete>
</mapper>
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TPaymentInfoVo.java
View file @
b23508c5
...
...
@@ -38,16 +38,6 @@ import java.util.Date;
@Data
public
class
TPaymentInfoVo
extends
RowIndex
implements
Serializable
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@NotBlank
(
message
=
"主键 不能为空"
)
@Length
(
max
=
32
,
message
=
"主键 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"主键"
,
isNotEmpty
=
true
,
errorInfo
=
"主键 不能为空"
,
maxLength
=
32
)
@Schema
(
description
=
"主键"
)
@ExcelProperty
(
"主键"
)
private
String
id
;
/**
* 员工姓名
*/
...
...
@@ -69,7 +59,7 @@ public class TPaymentInfoVo extends RowIndex implements Serializable {
*/
@NotBlank
(
message
=
"员工ID 不能为空"
)
@Length
(
max
=
32
,
message
=
"员工ID 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"员工ID"
,
isNotEmpty
=
true
,
errorInfo
=
"员工ID 不能为空"
,
maxLength
=
32
)
@ExcelAttribute
(
name
=
"员工ID"
,
maxLength
=
32
)
@Schema
(
description
=
"员工ID"
)
@ExcelProperty
(
"员工ID"
)
private
String
empId
;
...
...
yifu-social/yifu-social-
api
/src/main/java/com/yifu/cloud/plus/v1/yifu/social/concurrent/threadpool/YFSocialImportThreadPoolExecutor.java
→
yifu-social/yifu-social-
biz
/src/main/java/com/yifu/cloud/plus/v1/yifu/social/concurrent/threadpool/YFSocialImportThreadPoolExecutor.java
View file @
b23508c5
File moved
yifu-social/yifu-social-
api
/src/main/java/com/yifu/cloud/plus/v1/yifu/social/concurrent/threadpool/YFThreadFactory.java
→
yifu-social/yifu-social-
biz
/src/main/java/com/yifu/cloud/plus/v1/yifu/social/concurrent/threadpool/YFThreadFactory.java
View file @
b23508c5
File moved
yifu-social/yifu-social-
api
/src/main/java/com/yifu/cloud/plus/v1/yifu/social/concurrent/threadpool/YFThreadPoolConfig.java
→
yifu-social/yifu-social-
biz
/src/main/java/com/yifu/cloud/plus/v1/yifu/social/concurrent/threadpool/YFThreadPoolConfig.java
View file @
b23508c5
File moved
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
b23508c5
...
...
@@ -521,6 +521,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isNotNull
(
socialFund
)
&&
Common
.
isNotNull
(
socialFund
.
getId
())){
forecastLibraryService
.
updateForecastLibaryByDispatch
(
socialFund
);
}
// 同步更新人员档案和项目档案的社保公积金状态
updateDocSocialFund
(
social
,
fund
,
socialFund
);
}
catch
(
Exception
e
){
log
.
error
(
"派单新增异常:"
,
e
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"派单新增异常:"
+
e
.
getMessage
()));
...
...
@@ -534,6 +536,23 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
Common
.
clear
(
projectsMap
);
}
private
void
updateDocSocialFund
(
TSocialInfo
social
,
TProvidentFund
fund
,
TSocialFundInfo
socialFund
)
{
UpProjectSocialFundVo
vo
=
new
UpProjectSocialFundVo
();
if
(
Common
.
isNotNull
(
social
)){
vo
.
setSocialStatus
(
CommonConstants
.
ONE_STRING
);
vo
.
setDepartNo
(
socialFund
.
getSettleDomainCode
());
}
if
(
Common
.
isNotNull
(
fund
)){
vo
.
setFundStatus
(
CommonConstants
.
ONE_STRING
);
vo
.
setDepartNo
(
socialFund
.
getSettleDomainCodeFund
());
}
vo
.
setEmpIdCard
(
socialFund
.
getEmpIdcard
());
R
<
Boolean
>
resUp
=
archivesDaprUtil
.
updateProjectSocialFund
(
vo
);
if
(
Common
.
isEmpty
(
resUp
)
||
!(
CommonConstants
.
SUCCESS
.
intValue
()
==
resUp
.
getCode
())
||
!
resUp
.
getData
().
booleanValue
()){
ServiceUtil
.
runTimeExceptionDiy
(
"同步人员档案、项目档案的社保公积金状态失败!"
);
}
}
private
void
insertSocial
(
EmpAddDispatchVo
emp
,
TSocialInfo
social
)
{
if
(
Common
.
isNotNull
(
social
)){
if
(
Common
.
isNotNull
(
emp
)){
...
...
@@ -593,28 +612,58 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isEmpty
(
socialFund
.
getFirstBuyMonthSocial
())){
socialFund
.
setFirstBuyMonthSocial
(
social
.
getSocialStartDate
());
}
socialFund
.
setUnitPersionMoney
(
BigDecimal
.
ZERO
);
socialFund
.
setUnitMedicalMoney
(
BigDecimal
.
ZERO
);
socialFund
.
setUnitUnemploymentMoney
(
BigDecimal
.
ZERO
);
socialFund
.
setUnitInjuryMoney
(
BigDecimal
.
ZERO
);
socialFund
.
setUnitBirthMoney
(
BigDecimal
.
ZERO
);
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getBigailmentHandle
())){
socialFund
.
setUnitBigailmentMoney
(
social
.
getUnitBigailmentMoney
());
socialFund
.
setPersonalBigailmentMoney
(
social
.
getPersonalBigailmentMoney
());
}
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getPensionHandle
())){
socialFund
.
setUnitPensionCardinal
(
social
.
getUnitPensionCardinal
());
socialFund
.
setUnitMedicalCardinal
(
social
.
getUnitMedicalCardinal
());
socialFund
.
setUnitUnemploymentCardinal
(
social
.
getUnitUnemploymentCardinal
());
socialFund
.
setUnitBigailmentCardinal
(
social
.
getUnitBigailmentCardinal
());
socialFund
.
setUnitWorkInjuryCardinal
(
social
.
getUnitWorkInjuryCardinal
());
socialFund
.
setUnitBirthCardinal
(
social
.
getUnitBirthCardinal
());
socialFund
.
setPersonalPensionCardinal
(
social
.
getPersonalPensionCardinal
());
socialFund
.
setPersonalMedicalCardinal
(
social
.
getPersonalMedicalCardinal
());
socialFund
.
setPersonalBigailmentCardinal
(
social
.
getPersonalBigailmentCardinal
());
socialFund
.
setPersonalUnemploymentCardinal
(
social
.
getPersonalUnemploymentCardinal
());
socialFund
.
setUnitPensionPer
(
social
.
getUnitPensionPer
());
socialFund
.
setPersonalPensionPer
(
social
.
getPersonalPensionPer
());
socialFund
.
setUnitPersionMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitPensionCardinal
(),
social
.
getUnitPensionPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
socialFund
.
setPersonalPersionMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getPersonalPensionCardinal
(),
social
.
getPersonalPensionPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
}
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getMedicalHandle
())){
socialFund
.
setUnitMedicalCardinal
(
social
.
getUnitMedicalCardinal
());
socialFund
.
setPersonalMedicalCardinal
(
social
.
getPersonalMedicalCardinal
());
socialFund
.
setUnitMedicalPer
(
social
.
getUnitMedicalPer
());
socialFund
.
setPersonalMedicalPer
(
social
.
getPersonalMedicalPer
());
socialFund
.
setUnitMedicalMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitMedicalCardinal
(),
social
.
getUnitMedicalPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
socialFund
.
setPersonalMedicalMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getPersonalMedicalCardinal
(),
social
.
getPersonalMedicalPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
}
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getUnemployHandle
())){
socialFund
.
setUnitUnemploymentCardinal
(
social
.
getUnitUnemploymentCardinal
());
socialFund
.
setPersonalUnemploymentCardinal
(
social
.
getPersonalUnemploymentCardinal
());
socialFund
.
setPersonalUnemploymentPer
(
social
.
getPersonalUnemploymentPer
());
socialFund
.
setUnitUnemploymentPer
(
social
.
getUnitUnemploymentPer
());
socialFund
.
setUnitUnemploymentMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitUnemploymentCardinal
(),
social
.
getUnitUnemploymentPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
socialFund
.
setPersonalUnemploymentMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getPersonalUnemploymentCardinal
(),
social
.
getPersonalUnemploymentPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
}
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getBigailmentHandle
())){
socialFund
.
setUnitBigailmentCardinal
(
social
.
getUnitBigailmentCardinal
());
socialFund
.
setPersonalBigailmentCardinal
(
social
.
getPersonalBigailmentCardinal
());
socialFund
.
setUnitBigailmentPer
(
social
.
getUnitBigailmentPer
());
socialFund
.
setPersonalBigailmentPer
(
social
.
getPersonalBigailmentPer
());
socialFund
.
setUnitBigailmentMoney
(
social
.
getUnitBigailmentMoney
());
socialFund
.
setPersonalBigailmentMoney
(
social
.
getPersonalBigailmentMoney
());
}
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getWorkInjuryHandle
())){
socialFund
.
setUnitWorkInjuryCardinal
(
social
.
getUnitWorkInjuryCardinal
());
socialFund
.
setUnitWorkUnjuryPer
(
social
.
getUnitWorkUnjuryPer
());
socialFund
.
setUnitInjuryMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitWorkInjuryCardinal
(),
social
.
getUnitWorkUnjuryPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
}
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getBirthHandle
())){
socialFund
.
setUnitBirthCardinal
(
social
.
getUnitBirthCardinal
());
socialFund
.
setUnitBirthPer
(
social
.
getUnitBirthPer
());
socialFund
.
setPersonalPensionPer
(
social
.
getPersonalPensionPer
());
socialFund
.
setPersonalMedicalPer
(
social
.
getPersonalMedicalPer
());
socialFund
.
setPersonalUnemploymentPer
(
social
.
getPersonalUnemploymentPer
());
socialFund
.
setPersonalBigailmentPer
(
social
.
getPersonalBigailmentPer
());
socialFund
.
setUnitBirthMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitBirthCardinal
(),
social
.
getUnitBirthPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
}
socialFund
.
setCanOverpay
(
social
.
getCanOverpay
());
socialFund
.
setOverpayNumber
(
social
.
getOverpayNumber
());
socialFund
.
setHaveThisMonth
(
social
.
getHaveThisMonth
());
...
...
@@ -645,22 +694,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund
.
setBirthHandle
(
social
.
getBirthHandle
());
socialFund
.
setBigailmentHandle
(
social
.
getBigailmentHandle
());
socialFund
.
setUnitPersionMoney
(
BigDecimal
.
ZERO
);
socialFund
.
setUnitMedicalMoney
(
BigDecimal
.
ZERO
);
socialFund
.
setUnitUnemploymentMoney
(
BigDecimal
.
ZERO
);
socialFund
.
setUnitInjuryMoney
(
BigDecimal
.
ZERO
);
socialFund
.
setUnitBirthMoney
(
BigDecimal
.
ZERO
);
socialFund
.
setUnitPersionMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitPensionCardinal
(),
social
.
getUnitPensionPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
socialFund
.
setUnitMedicalMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitMedicalCardinal
(),
social
.
getUnitMedicalPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
socialFund
.
setUnitBirthMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitBirthCardinal
(),
social
.
getUnitBirthPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
socialFund
.
setUnitInjuryMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitWorkInjuryCardinal
(),
social
.
getUnitWorkUnjuryPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
socialFund
.
setUnitUnemploymentMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitUnemploymentCardinal
(),
social
.
getUnitUnemploymentPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
socialFund
.
setPersonalPersionMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getPersonalPensionCardinal
(),
social
.
getPersonalPensionPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
socialFund
.
setPersonalMedicalMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getPersonalMedicalCardinal
(),
social
.
getPersonalMedicalPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
socialFund
.
setPersonalUnemploymentMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getPersonalUnemploymentCardinal
(),
social
.
getPersonalUnemploymentPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
socialFund
.
setUnitSocialSum
(
BigDecimalUtils
.
safeAdd
(
socialFund
.
getUnitPersionMoney
()
,
socialFund
.
getUnitMedicalMoney
(),
socialFund
.
getUnitBirthMoney
()
,
socialFund
.
getUnitInjuryMoney
()
...
...
@@ -1320,7 +1353,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
social
.
setUnemployHandle
(
null
);
social
.
setUnitUnemploymentCardinal
(
null
);
social
.
setUnitUnemploymentPer
(
null
);
social
.
setUnitUnemploymentCardinal
(
null
);
social
.
setUnitUnemploymentMoney
(
null
);
social
.
setPersonalUnemploymentPer
(
null
);
social
.
setPersonalUnemploymentCardinal
(
null
);
social
.
setPersonalUnemploymentMoney
(
null
);
}
if
(
Common
.
isEmpty
(
social
.
getWorkInjuryStart
())){
social
.
setWorkInjuryHandle
(
null
);
...
...
@@ -1352,7 +1388,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund
=
socialFundMap
.
get
(
excel
.
getEmpIdcard
());
if
(
Common
.
isNotNull
(
socialFund
)){
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getPensionHandle
())){
social
.
setPensionHandle
(
socialFund
.
getPensionHandle
());
social
.
setPensionHandle
(
null
);
social
.
setUnitPensionCardinal
(
null
);
social
.
setUnitPensionPer
(
null
);
social
.
setPersonalPensionCardinal
(
null
);
social
.
setPersonalPensionPer
(
null
);
social
.
setUnitPersionMoney
(
null
);
social
.
setPersonalPersionMoney
(
null
);
social
.
setPensionStart
(
null
);
}
else
{
socialFund
.
setUnitPensionCardinal
(
social
.
getUnitPensionCardinal
());
socialFund
.
setUnitPensionPer
(
social
.
getUnitPensionPer
());
...
...
@@ -1360,7 +1403,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund
.
setPersonalPensionPer
(
social
.
getPersonalPensionPer
());
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getMedicalHandle
())){
social
.
setMedicalHandle
(
socialFund
.
getMedicalHandle
());
social
.
setMedicalHandle
(
null
);
social
.
setUnitMedicalCardinal
(
null
);
social
.
setUnitMedicalPer
(
null
);
social
.
setPersonalMedicalCardinal
(
null
);
social
.
setPersonalMedicalPer
(
null
);
social
.
setUnitMedicalMoney
(
null
);
social
.
setPersonalMedicalMoney
(
null
);
social
.
setMedicalStart
(
null
);
}
else
{
socialFund
.
setUnitMedicalCardinal
(
social
.
getUnitMedicalCardinal
());
socialFund
.
setUnitMedicalPer
(
social
.
getUnitMedicalPer
());
...
...
@@ -1368,7 +1418,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund
.
setPersonalMedicalPer
(
social
.
getUnitMedicalPer
());
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getUnemployHandle
())){
social
.
setUnemployHandle
(
socialFund
.
getUnemployHandle
());
social
.
setUnemployHandle
(
null
);
social
.
setUnitUnemploymentCardinal
(
null
);
social
.
setUnitUnemploymentPer
(
null
);
social
.
setPersonalUnemploymentCardinal
(
null
);
social
.
setPersonalUnemploymentPer
(
null
);
social
.
setUnitUnemploymentMoney
(
null
);
social
.
setPersonalUnemploymentMoney
(
null
);
social
.
setUnemployStart
(
null
);
}
else
{
socialFund
.
setUnitUnemploymentCardinal
(
social
.
getUnitUnemploymentCardinal
());
socialFund
.
setUnitUnemploymentPer
(
social
.
getUnitUnemploymentPer
());
...
...
@@ -1376,19 +1433,34 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund
.
setPersonalUnemploymentPer
(
social
.
getUnitUnemploymentPer
());
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getWorkInjuryHandle
())){
social
.
setWorkInjuryHandle
(
socialFund
.
getWorkInjuryHandle
());
social
.
setWorkInjuryHandle
(
null
);
social
.
setUnitWorkInjuryCardinal
(
null
);
social
.
setUnitWorkUnjuryPer
(
null
);
social
.
setUnitInjuryMoney
(
null
);
social
.
setWorkInjuryStart
(
null
);
}
else
{
socialFund
.
setUnitWorkInjuryCardinal
(
social
.
getUnitWorkInjuryCardinal
());
socialFund
.
setPersonalWorkInjuryCardinal
(
social
.
getUnitWorkInjuryCardinal
());
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getBirthHandle
())){
social
.
setBirthHandle
(
socialFund
.
getBirthHandle
());
social
.
setBirthHandle
(
null
);
social
.
setUnitBirthCardinal
(
null
);
social
.
setUnitBirthPer
(
null
);
social
.
setUnitBirthMoney
(
null
);
social
.
setBirthStart
(
null
);
}
else
{
socialFund
.
setUnitBirthCardinal
(
social
.
getUnitBirthCardinal
());
socialFund
.
setUnitBirthPer
(
social
.
getUnitBirthPer
());
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getBigailmentHandle
())){
social
.
setBigailmentHandle
(
socialFund
.
getBigailmentHandle
());
social
.
setBigailmentHandle
(
null
);
social
.
setUnitBigailmentCardinal
(
null
);
social
.
setUnitBigailmentPer
(
null
);
social
.
setPersonalBigailmentCardinal
(
null
);
social
.
setPersonalBigailmentPer
(
null
);
social
.
setUnitBigailmentMoney
(
null
);
social
.
setPersonalBigailmentMoney
(
null
);
social
.
setBigailmentStart
(
null
);
}
else
{
socialFund
.
setUnitBigailmentCardinal
(
social
.
getUnitBigailmentCardinal
());
socialFund
.
setUnitBigailmentPer
(
social
.
getUnitBigailmentPer
());
...
...
@@ -1561,48 +1633,47 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isNotNull
(
socialFundMap
))
{
sf
=
socialFundMap
.
get
(
excel
.
getEmpIdcard
());
if
(
Common
.
isNotNull
(
sf
)
&&
Common
.
isNotNull
(
excel
.
getSocialHousehold
()))
{
// 拒绝新增1:派单待审核、派单待办理、办理成功且未派减成功------ 先排除兼职工伤
// 拒绝新增1:派单待审核、派单待办理、办理
中、办理
成功且未派减成功------ 先排除兼职工伤
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
sf
.
getSocialAddStatus
())
||
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getSocialAddStatus
())
||
CommonConstants
.
SIX_STRING
.
equals
(
sf
.
getSocialAddStatus
())
||
(
CommonConstants
.
TWO_STRING
.
equals
(
sf
.
getSocialAddStatus
())
&&
!
CommonConstants
.
TWO_STRING
.
equals
(
sf
.
getSocialReduceStatus
())
&&
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
excel
.
getPensionCardinal
()))
!=
0
&&
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
sf
.
getUnitPensionCardinal
()))
!=
0
)
&&
!
CommonConstants
.
TWO_STRING
.
equals
(
sf
.
getSocialReduceStatus
()))
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_EXISTING
)));
return
true
;
}
// 拒绝新增2:新增兼职工伤---有兼职工伤不可重复增、
if
(
Common
.
isEmpty
(
excel
.
getPensionCardinal
())
||
BigDecimal
.
ZERO
.
compareTo
(
excel
.
getPensionCardinal
())
==
0
)
{
// 拒绝新增2:新增兼职工伤---全部办理失败或全部派减成功才可以派减兼职工伤
boolean
flag
=
Common
.
isEmpty
(
excel
.
getPensionStart
())
&&
Common
.
isEmpty
(
excel
.
getMedicalStart
())
&&
Common
.
isEmpty
(
excel
.
getBirthStart
())
&&
Common
.
isEmpty
(
excel
.
getUnemployStart
())
&&
Common
.
isEmpty
(
excel
.
getBigailmentStart
())
&&
Common
.
isNotNull
(
excel
.
getWorkInjuryStart
())
&&
Common
.
isEmpty
(
BigDecimal
.
ZERO
.
compareTo
(
excel
.
getWorkInjuryCardinal
())
>
0
);
if
(
flag
)
{
// 有兼职工伤不可重复增 (未派减成功不可新增兼职工伤)
if
((
Common
.
isEmpty
(
sf
.
getUnitPensionCardinal
())
||
BigDecimal
.
ZERO
.
compareTo
(
sf
.
getUnitPensionCardinal
())
==
0
)
&&
Common
.
isNotNull
(
sf
.
getSocialReduceStatus
())
&&
!
CommonConstants
.
TWO_STRING
.
equals
(
sf
.
getSocialReduceStatus
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
sf
.
getWorkInjuryHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getWorkInjuryHandle
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_INJURY_EXISTING
)));
return
true
;
}
// 有五险未派减不给新增兼职工伤
if
(
Common
.
isNotNull
(
sf
.
getUnitPensionCardinal
())
&&
BigDecimal
.
ZERO
.
compareTo
(
sf
.
getUnitPensionCardinal
())
!=
0
&&
Common
.
isEmpty
(
sf
.
getSocialReduceStatus
()))
{
flag
=
CommonConstants
.
ZERO_STRING
.
equals
(
sf
.
getPensionHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getPensionHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
sf
.
getMedicalHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getMedicalHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
sf
.
getBirthHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getBirthHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
sf
.
getUnemployHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getUnemployHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
sf
.
getBigailmentHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
sf
.
getBigailmentHandle
());
if
(
flag
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_NOT_REDUCE
)));
return
true
;
}
}
// 拒绝新增3:新增五险对应兼职工伤逻辑---有兼职工伤未派减不给增五险、
if
(
Common
.
isNotNull
(
excel
.
getPensionCardinal
())
&&
BigDecimal
.
ZERO
.
compareTo
(
excel
.
getPensionCardinal
())
!=
0
)
{
// 有兼职工伤未派减不给增五险
if
(
Common
.
isNotNull
(
sf
.
getSocialHousehold
())
&&
(
Common
.
isEmpty
(
sf
.
getUnitPensionCardinal
())
||
BigDecimal
.
ZERO
.
compareTo
(
sf
.
getUnitPensionCardinal
())
==
0
)
&&
Common
.
isEmpty
(
sf
.
getSocialReduceStatus
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_INJURY_NOT_REDUCE
)));
return
true
;
}
}
}
}
return
false
;
...
...
@@ -2411,6 +2482,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Param
* @return
**/
@GlobalTransactional
@Override
public
List
<
ErrorMessage
>
addBatchApplyAudit
(
List
<
String
>
idsList
,
YifuUser
user
,
Integer
flag
,
String
auditStatus
,
String
auditRemark
,
String
remark
)
{
List
<
ErrorMessage
>
errorList
=
new
ArrayList
<>();
...
...
@@ -2593,6 +2665,19 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 更新预估数据
forecastLibraryService
.
updateForecastLibaryByDispatch
(
sf
);
}
UpProjectSocialFundVo
vo
=
new
UpProjectSocialFundVo
();
if
(
Common
.
isNotNull
(
dis
.
getSocialId
())){
vo
.
setSocialStatus
(
CommonConstants
.
ZERO_STRING
);
}
if
(
Common
.
isNotNull
(
dis
.
getFundId
())){
vo
.
setFundStatus
(
CommonConstants
.
ZERO_STRING
);
}
vo
.
setEmpIdCard
(
dis
.
getEmpIdcard
());
vo
.
setDepartNo
(
dis
.
getSettleDomainCode
());
R
<
Boolean
>
resUp
=
archivesDaprUtil
.
updateProjectSocialFund
(
vo
);
if
(
Common
.
isEmpty
(
resUp
)
||
!(
CommonConstants
.
SUCCESS
.
intValue
()
==
resUp
.
getCode
())
||
!
resUp
.
getData
().
booleanValue
()){
ServiceUtil
.
runTimeExceptionDiy
(
"同步人员档案、项目档案的社保公积金状态失败!"
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
DispatchConstants
.
DISPATCH_AUDIT_ERROR
,
e
);
...
...
@@ -2692,6 +2777,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Author fxj
* @Date 2022-07-26
**/
@GlobalTransactional
public
List
<
ErrorMessage
>
addBatchApplyHandle
(
List
<
String
>
idsList
,
String
typeSub
,
YifuUser
user
,
int
flag
,
String
handleStatus
,
String
handleRemark
,
String
socialType
,
String
remark
)
{
List
<
ErrorMessage
>
errorList
=
new
ArrayList
<>();
...
...
@@ -2958,15 +3044,45 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
auditInfoMapper
.
insert
(
auditInfo
);
baseMapper
.
updateById
(
dis
);
socialFundMapper
.
updateById
(
sf
);
UpProjectSocialFundVo
vo
=
new
UpProjectSocialFundVo
();
//1.派增办理失败 刷新预估数据
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dis
.
getType
())
&&
Common
.
isNotNull
(
socialInfo
)
&&
CommonConstants
.
TWO_STRING
.
equals
(
socialInfo
.
getHandleStatus
()))
{
// 派增办理,全部失败,清空社保状态
if
(
Common
.
isNotNull
(
socialInfo
)
&&
CommonConstants
.
TWO_STRING
.
equals
(
socialInfo
.
getHandleStatus
()))
{
// 同步预估库数据
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dis
.
getType
()))
{
// 办理失败
if
(
CommonConstants
.
ONE_INT
==
flag
){
// 派增办理,全部失败 同步预估库数据
forecastLibraryService
.
updateForecastLibaryByDispatch
(
sf
);
if
(
Common
.
isNotNull
(
socialInfo
)){
if
(
typeSub
.
equals
(
CommonConstants
.
ZERO_STRING
)
&&
CommonConstants
.
TWO_STRING
.
equals
(
socialInfo
.
getHandleStatus
())){
vo
.
setSocialStatus
(
CommonConstants
.
ZERO_STRING
);
}
if
(
typeSub
.
equals
(
CommonConstants
.
ZERO_STRING
)
&&
CommonConstants
.
FIVE_STRING
.
equals
(
socialInfo
.
getHandleStatus
())){
vo
.
setSocialStatus
(
CommonConstants
.
TWO_STRING
);
}
}
if
(
typeSub
.
equals
(
CommonConstants
.
ONE_STRING
)
&&
Common
.
isNotNull
(
providentFund
)
&&
CommonConstants
.
TWO_STRING
.
equals
(
providentFund
.
getHandleStatus
())){
vo
.
setFundStatus
(
CommonConstants
.
ZERO_STRING
);
}
}
if
(
CommonConstants
.
ZERO_INT
==
flag
){
if
(
Common
.
isNotNull
(
socialInfo
)){
if
(
typeSub
.
equals
(
CommonConstants
.
ZERO_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getHandleStatus
())){
vo
.
setSocialStatus
(
CommonConstants
.
THREE_STRING
);
}
if
(
typeSub
.
equals
(
CommonConstants
.
ZERO_STRING
)
&&
CommonConstants
.
FIVE_STRING
.
equals
(
socialInfo
.
getHandleStatus
())){
vo
.
setSocialStatus
(
CommonConstants
.
TWO_STRING
);
}
}
if
(
typeSub
.
equals
(
CommonConstants
.
ONE_STRING
)
&&
Common
.
isNotNull
(
providentFund
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
providentFund
.
getHandleStatus
())){
vo
.
setFundStatus
(
CommonConstants
.
THREE_STRING
);
}
}
}
// 2.派减办理成功 处理预估
...
...
@@ -2974,6 +3090,20 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&&
CommonConstants
.
ZERO_INT
==
flag
){
// 同步预估库数据
forecastLibraryService
.
updateForecastLibaryByDispatchReduce
(
sf
);
if
(
typeSub
.
equals
(
CommonConstants
.
ZERO_STRING
)
&&
Common
.
isNotNull
(
socialInfo
)){
vo
.
setSocialStatus
(
CommonConstants
.
FOUR_STRING
);
}
if
(
typeSub
.
equals
(
CommonConstants
.
ONE_STRING
)
&&
Common
.
isNotNull
(
providentFund
)){
vo
.
setFundStatus
(
CommonConstants
.
FOUR_STRING
);
}
}
vo
.
setEmpIdCard
(
dis
.
getEmpIdcard
());
vo
.
setDepartNo
(
dis
.
getSettleDomainCode
());
R
<
Boolean
>
resUp
=
archivesDaprUtil
.
updateProjectSocialFund
(
vo
);
if
(
Common
.
isEmpty
(
resUp
)
||
!(
CommonConstants
.
SUCCESS
.
intValue
()
==
resUp
.
getCode
())
||
!
resUp
.
getData
().
booleanValue
()){
ServiceUtil
.
runTimeExceptionDiy
(
"同步人员档案、项目档案的社保公积金状态失败!"
);
}
}
else
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"派单数据错误!"
));
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
b23508c5
...
...
@@ -34,7 +34,6 @@ import com.yifu.cloud.plus.v1.yifu.social.concurrent.threadpool.YFSocialImportTh
import
com.yifu.cloud.plus.v1.yifu.social.constants.PaymentConstants
;
import
com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfoImportLog
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TProvidentFund
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TPaymentInfoMapper
;
...
...
@@ -91,7 +90,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Autowired
private
RedisUtil
redisUtil
;
@
Qualifier
(
"yfSocialImportThreadPoolExecutor"
)
@
Autowired
private
YFSocialImportThreadPoolExecutor
yfSocialImportThreadPoolExecutor
;
@Autowired
...
...
@@ -374,7 +373,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
int
residualCapacity
=
yfSocialImportThreadPoolExecutor
.
getResidualCapacity
();
if
(
taskSize
>
residualCapacity
)
{
errorMessageList
.
add
(
new
ErrorMessage
(-
1
,
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIALINFO_LIST_NUM_LARGE
)));
}
}
else
{
// -----------------------------生成paymentInfoMap本段开始--------------------------------
//已存在的档案数据
...
...
@@ -482,14 +480,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// -----------------------------线程池处理list,批量保存社保信息开始--------------------------------
List
<
TPaymentInfoVo
>
tempList
=
new
ArrayList
<>();
AtomicInteger
atomicLine
=
new
AtomicInteger
(
CommonConstants
.
ZERO_INT
);
List
<
CompletableFuture
<
List
<
ErrorMessage
>>>
completableFutureList
=
new
ArrayList
<>();
try
{
// 1.list.size()不足partSize,直接执行
if
(
list
.
size
()
<
partSize
)
{
CompletableFuture
.
supplyAsync
(()
->
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialList
(
user
,
atomicLine
,
random
,
list
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
CommonConstants
.
ONE_INT
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
}
// 2.list.size()大于partSize,循环分批执行
...
...
@@ -497,11 +497,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(
partSize
<=
list
.
size
())
{
// 处理第一个0位元素
final
List
<
TPaymentInfoVo
>
finalList
=
list
.
subList
(
0
,
1
);
CompletableFuture
.
supplyAsync
(()
->
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialList
(
user
,
atomicLine
,
random
,
list
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
CommonConstants
.
ONE_INT
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
lastIdx
=
1
;
for
(
int
i
=
1
;
i
<
list
.
size
();
i
++)
{
// partSize数量的list为一个执行单元
...
...
@@ -536,12 +538,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List
<
TPaymentInfoVo
>
finalTempList
=
tempList
;
int
finalLastIdx
=
lastIdx
+
1
;
CompletableFuture
.
supplyAsync
(()
->
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialList
(
user
,
atomicLine
,
random
,
list
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
finalLastIdx
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
}
// 阻塞当前线程,等待所有的线程执行完毕
boolean
computeFlag
;
do
{
computeFlag
=
false
;
for
(
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
:
completableFutureList
)
{
if
(!
listCompletableFuture
.
isDone
())
{
computeFlag
=
true
;
}
}
}
while
(
computeFlag
);
String
importSuccessKey
=
user
.
getId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
PAYMENT_SOCIAL_WAIT_EXPORT
;
redisUtil
.
set
(
importSuccessKey
,
random
,
1800L
);
...
...
@@ -564,6 +578,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
}
/**
* 转换缴纳地址为省市县ID
...
...
@@ -723,7 +738,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
if
(
null
==
socialInfo
||
(
null
!=
socialInfo
&&
!
ServiceUtil
.
checkMothForPaymentImport
(
socialInfo
.
getSocialStartDate
(),
infoVo
.
getSocialPayMonth
(),
socialInfo
.
getSocialReduceDate
())))
{
if
(
null
!=
socialMapTemp
)
{
if
(
socialMapTemp
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
socialInfo
=
socialMapTemp
.
get
(
infoVo
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getSocialProvince
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getSocialCity
()
...
...
@@ -752,8 +767,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
if
(
null
==
socialInfo
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
infoVo
.
getEmpIdcard
()
+
"无对应员工"
+
infoVo
.
getEmpIdcard
()
+
"的社保数据(请查验社保办理状态|缴纳地|起缴月份|停缴月份)"
));
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
"无对应员工"
+
infoVo
.
getEmpIdcard
()
+
"的社保数据(请查验社保办理状态|缴纳地|起缴月份|停缴月份)"
));
continue
;
}
//如果导入项目数大于办理成功项目数给提示,少于给进,有问题自行删除后导入
...
...
@@ -1007,7 +1022,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo
.
setSocialSum
(
BigDecimalUtils
.
safeAdd
(
paymentInfo
.
getUnitSocialSum
(),
paymentInfo
.
getSocialSecurityPersonalSum
()));
paymentInfo
.
setSumAll
(
paymentInfo
.
getSocialSum
());
paymentInfo
.
setUpdateBy
(
user
.
getId
());
if
(
null
!=
paymentInfo
&&
Common
.
isEmpty
(
paymentInfo
.
getSocialId
()))
{
paymentInfo
.
setSocialId
(
UUID
.
randomUUID
().
toString
());
}
...
...
@@ -1648,13 +1662,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// -----------------------------线程池处理list,批量保存社保信息开始--------------------------------
List
<
TPaymentHeFeiVo
>
tempList
=
new
ArrayList
<>();
AtomicInteger
atomicLine
=
new
AtomicInteger
(
CommonConstants
.
ZERO_INT
);
List
<
CompletableFuture
<
List
<
ErrorMessage
>>>
completableFutureList
=
new
ArrayList
<>();
try
{
// 1.list.size()不足partSize,直接执行
if
(
list
.
size
()
<
partSize
)
{
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
random
,
list
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
random
,
list
,
areaMap
,
areaMap2
,
paymentInfo
PensionMap
,
paymentInfo
MedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
CommonConstants
.
ONE_INT
,
type
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
}
// 2.list.size()大于partSize,循环分批执行
...
...
@@ -1662,11 +1678,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(
partSize
<=
list
.
size
())
{
// 处理第一个0位元素
final
List
<
TPaymentHeFeiVo
>
finalList
=
list
.
subList
(
0
,
1
);
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
random
,
finalList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
CompletableFuture
<
List
<
ErrorMessage
>>
oneCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
random
,
finalList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
CommonConstants
.
ONE_INT
,
type
,
errorMessageList
)
,
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
oneCompletableFuture
);
lastIdx
=
1
;
for
(
int
i
=
1
;
i
<
list
.
size
();
i
++)
{
// partSize数量的list为一个执行单元
...
...
@@ -1675,11 +1692,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
lastIdx
=
i
;
final
int
idx
=
i
-
partSize
+
2
;
List
<
TPaymentHeFeiVo
>
finalTempList1
=
tempList
;
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
random
,
finalTempList1
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmp
Map
,
paymentInfoInjuryMap
,
idx
,
type
,
errorMessageList
)
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
random
,
finalTempList1
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedical
Map
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
idx
,
type
,
errorMessageList
)
,
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
tempList
=
new
ArrayList
<>();
}
}
...
...
@@ -1701,12 +1719,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List
<
TPaymentHeFeiVo
>
finalTempList
=
tempList
;
int
finalLastIdx
=
lastIdx
+
1
;
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
random
,
finalTempList
,
areaMap
,
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
random
,
finalTempList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
finalLastIdx
,
type
,
errorMessageList
)
,
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
}
// 阻塞当前线程,等待所有的线程执行完毕
boolean
computeFlag
;
do
{
computeFlag
=
false
;
for
(
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
:
completableFutureList
)
{
if
(!
listCompletableFuture
.
isDone
())
{
computeFlag
=
true
;
}
}
}
while
(
computeFlag
);
String
importSuccessKey
=
user
.
getId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
PAYMENT_SOCIAL_WAIT_EXPORT
;
redisUtil
.
set
(
importSuccessKey
,
random
,
1800L
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
View file @
b23508c5
...
...
@@ -854,7 +854,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
TPreDispatchInfo
preInfo
=
new
TPreDispatchInfo
();
if
(
Common
.
isNotNull
(
list
)){
for
(
TPreDispatchReduceVo
info:
list
){
BeanUtils
.
copyProperties
(
preInfo
,
i
nfo
);
BeanUtils
.
copyProperties
(
info
,
preI
nfo
);
listInfo
.
add
(
preInfo
);
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ServiceUtil.java
View file @
b23508c5
...
...
@@ -87,12 +87,12 @@ public class ServiceUtil {
public
static
boolean
checkMothForPaymentImport
(
Date
socialStartDate
,
String
socialPayMonth
,
Date
reduceDate
)
{
if
(
socialStartDate
!=
null
)
{
if
(
null
==
reduceDate
){
if
(
Integer
.
parseInt
(
socialPayMonth
)
>=
Integer
.
parseInt
(
DateUtil
.
dateToString
(
socialStartDate
))){
if
(
Integer
.
parseInt
(
socialPayMonth
)
>=
Integer
.
parseInt
(
DateUtil
.
dateToString
(
socialStartDate
)
.
replace
(
"-"
,
""
)
)){
return
true
;
}
}
else
{
if
(
Integer
.
parseInt
(
socialPayMonth
)
>=
Integer
.
parseInt
(
DateUtil
.
dateToString
(
socialStartDate
))
&&
Integer
.
parseInt
(
socialPayMonth
)
<
Integer
.
parseInt
(
DateUtil
.
dateToString
(
reduceDate
))){
&&
Integer
.
parseInt
(
socialPayMonth
)
<
Integer
.
parseInt
(
DateUtil
.
dateToString
(
reduceDate
)
.
replace
(
"-"
,
""
)
)){
return
true
;
}
}
...
...
yifu-social/yifu-social-biz/src/main/resources/META-INF/spring.factories
0 → 100644
View file @
b23508c5
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.social.concurrent.threadpool.YFThreadPoolConfig
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
b23508c5
...
...
@@ -217,7 +217,7 @@
</sql>
<sql
id=
"tDispatchInfo_where"
>
<if
test=
"tDispatchInfo != null"
>
<if
test=
"tDispatchInfo.idList != null"
>
<if
test=
"tDispatchInfo.idList != null
and tDispatchInfo.idList.size >0
"
>
AND a.ID in
<foreach
item=
"idStr"
index=
"index"
collection=
"tDispatchInfo.idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
...
...
@@ -662,7 +662,7 @@
left join t_social_info b on a.SOCIAL_ID = b.id
<where>
1=1 and b.DELETE_FLAG = 0
<if
test=
"idsStr != null"
>
<if
test=
"idsStr != null
and idsStr.size > 0
"
>
AND a.ID in
<foreach
item=
"items"
index=
"index"
collection=
"idsStr"
open=
"("
separator=
","
close=
")"
>
#{items}
...
...
@@ -764,7 +764,7 @@
left join t_provident_fund c on a.FUND_ID = c.id
<where>
1=1 and a.DELETE_FLAG = 0
<if
test=
"idsStr != null"
>
<if
test=
"idsStr != null
and idsStr.size > 0
"
>
AND a.ID in
<foreach
item=
"items"
index=
"index"
collection=
"idsStr"
open=
"("
separator=
","
close=
")"
>
#{items}
...
...
yifu-visual/yifu-codegen/src/main/resources/template/ServiceImpl.java.vm
View file @
b23508c5
...
...
@@ -79,7 +79,7 @@ public class ${className}ServiceImpl extends ServiceImpl<${className}Mapper, ${c
*/
@
Override
public
void
listExport
(
HttpServletResponse
response
,
${
className
}
SearchVo
searchVo
){
String
fileName
=
"
不良记录
批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
String
fileName
=
"
${comments}
批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//
获取要导出的列表
List
<${
className
}>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
...
...
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