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
135cebfe
Commit
135cebfe
authored
Aug 17, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
bc003539
59d84fc3
Hide whitespace changes
Inline
Side-by-side
Showing
70 changed files
with
1645 additions
and
726 deletions
+1645
-726
TDepartSettlementInfo.java
...d/plus/v1/yifu/archives/entity/TDepartSettlementInfo.java
+3
-0
TEmployeeProject.java
.../cloud/plus/v1/yifu/archives/entity/TEmployeeProject.java
+4
-0
TSettleDomain.java
...ifu/cloud/plus/v1/yifu/archives/entity/TSettleDomain.java
+16
-0
EmployeeProjectExportVO.java
...oud/plus/v1/yifu/archives/vo/EmployeeProjectExportVO.java
+12
-0
TSettleDomainController.java
.../v1/yifu/archives/controller/TSettleDomainController.java
+2
-2
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+9
-0
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+94
-75
TSettleDomainServiceImpl.java
.../yifu/archives/service/impl/TSettleDomainServiceImpl.java
+1
-1
TSettleDomainMapper.xml
...ves-biz/src/main/resources/mapper/TSettleDomainMapper.xml
+59
-56
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+1
-1
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+1
-1
MSalaryEstimate.java
...ifu/cloud/plus/v1/yifu/salary/entity/MSalaryEstimate.java
+6
-0
TSalaryAccount.java
...yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccount.java
+12
-0
TSalaryAccountItem.java
.../cloud/plus/v1/yifu/salary/entity/TSalaryAccountItem.java
+1
-1
TSalaryStandard.java
...ifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
+11
-0
TSpecialDeducationSum.java
...oud/plus/v1/yifu/salary/entity/TSpecialDeducationSum.java
+2
-18
TStatisticsBonus.java
...fu/cloud/plus/v1/yifu/salary/entity/TStatisticsBonus.java
+2
-2
TStatisticsDeclarer.java
...cloud/plus/v1/yifu/salary/entity/TStatisticsDeclarer.java
+8
-8
TStatisticsLabor.java
...fu/cloud/plus/v1/yifu/salary/entity/TStatisticsLabor.java
+0
-7
TStatisticsRemuneration.java
...d/plus/v1/yifu/salary/entity/TStatisticsRemuneration.java
+0
-7
SalaryUploadReturnVo.java
...fu/cloud/plus/v1/yifu/salary/vo/SalaryUploadReturnVo.java
+0
-29
TSalaryAccountVo.java
...m/yifu/cloud/plus/v1/yifu/salary/vo/TSalaryAccountVo.java
+4
-0
TStatisticsDeclarerVo.java
...u/cloud/plus/v1/yifu/salary/vo/TStatisticsDeclarerVo.java
+6
-6
TStatisticsLaborVo.java
...yifu/cloud/plus/v1/yifu/salary/vo/TStatisticsLaborVo.java
+0
-8
TStatisticsRemunerationVo.java
...oud/plus/v1/yifu/salary/vo/TStatisticsRemunerationVo.java
+0
-8
SalaryUploadController.java
...lus/v1/yifu/salary/controller/SalaryUploadController.java
+11
-4
TSalaryAttaController.java
...plus/v1/yifu/salary/controller/TSalaryAttaController.java
+2
-2
TSalaryStandardController.java
.../v1/yifu/salary/controller/TSalaryStandardController.java
+1
-0
TStatisticsBonusController.java
...v1/yifu/salary/controller/TStatisticsBonusController.java
+1
-1
TStatisticsDeclarerController.java
...yifu/salary/controller/TStatisticsDeclarerController.java
+17
-2
TStatisticsLaborController.java
...v1/yifu/salary/controller/TStatisticsLaborController.java
+31
-2
TStatisticsRemunerationController.java
.../salary/controller/TStatisticsRemunerationController.java
+15
-2
TSalaryAccountItemMapper.java
.../plus/v1/yifu/salary/mapper/TSalaryAccountItemMapper.java
+18
-21
TStatisticsDeclarerMapper.java
...plus/v1/yifu/salary/mapper/TStatisticsDeclarerMapper.java
+9
-0
TStatisticsLaborMapper.java
...ud/plus/v1/yifu/salary/mapper/TStatisticsLaborMapper.java
+10
-0
SalaryUploadService.java
...loud/plus/v1/yifu/salary/service/SalaryUploadService.java
+2
-2
TStatisticsDeclarerService.java
...us/v1/yifu/salary/service/TStatisticsDeclarerService.java
+7
-0
TStatisticsLaborService.java
.../plus/v1/yifu/salary/service/TStatisticsLaborService.java
+13
-0
TStatisticsRemunerationService.java
...1/yifu/salary/service/TStatisticsRemunerationService.java
+8
-0
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+631
-255
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+56
-37
TSpecialDeducationSumServiceImpl.java
...salary/service/impl/TSpecialDeducationSumServiceImpl.java
+1
-1
TStatisticsBonusServiceImpl.java
...yifu/salary/service/impl/TStatisticsBonusServiceImpl.java
+0
-1
TStatisticsDeclarerServiceImpl.java
...u/salary/service/impl/TStatisticsDeclarerServiceImpl.java
+23
-4
TStatisticsLaborServiceImpl.java
...yifu/salary/service/impl/TStatisticsLaborServiceImpl.java
+48
-2
TStatisticsRemunerationServiceImpl.java
...lary/service/impl/TStatisticsRemunerationServiceImpl.java
+27
-2
SalaryAccountUtil.java
...ifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
+19
-14
SalaryConstants.java
.../yifu/cloud/plus/v1/yifu/salary/util/SalaryConstants.java
+1
-0
TOwnDeptMapper.xml
...u-salary-biz/src/main/resources/mapper/TOwnDeptMapper.xml
+1
-1
TSalaryAccountItemMapper.xml
...iz/src/main/resources/mapper/TSalaryAccountItemMapper.xml
+34
-114
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+5
-5
TSalaryAttaMapper.xml
...alary-biz/src/main/resources/mapper/TSalaryAttaMapper.xml
+3
-3
TSalaryStandardMapper.xml
...y-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
+4
-4
TSpecialDeducationSumMapper.xml
...src/main/resources/mapper/TSpecialDeducationSumMapper.xml
+4
-4
TStatisticsBonusMapper.xml
...-biz/src/main/resources/mapper/TStatisticsBonusMapper.xml
+1
-0
TStatisticsDeclarerMapper.xml
...z/src/main/resources/mapper/TStatisticsDeclarerMapper.xml
+11
-0
TStatisticsLaborMapper.xml
...-biz/src/main/resources/mapper/TStatisticsLaborMapper.xml
+13
-5
TStatisticsRemunerationMapper.xml
...c/main/resources/mapper/TStatisticsRemunerationMapper.xml
+3
-6
TForecastLibrary.java
...fu/cloud/plus/v1/yifu/social/entity/TForecastLibrary.java
+13
-0
TForecastLibraryController.java
...v1/yifu/social/controller/TForecastLibraryController.java
+67
-0
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+50
-0
TForecastLibraryMapper.java
...ud/plus/v1/yifu/social/mapper/TForecastLibraryMapper.java
+15
-0
TPaymentInfoMapper.java
.../cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
+12
-0
TForecastLibraryService.java
.../plus/v1/yifu/social/service/TForecastLibraryService.java
+18
-0
TPaymentInfoService.java
...loud/plus/v1/yifu/social/service/TPaymentInfoService.java
+7
-0
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+42
-0
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+32
-0
spring.factories.txt
...cial-biz/src/main/resources/META-INF/spring.factories.txt
+0
-2
TForecastLibraryMapper.xml
...-biz/src/main/resources/mapper/TForecastLibraryMapper.xml
+84
-0
TPaymentInfoMapper.xml
...cial-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
+21
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TDepartSettlementInfo.java
View file @
135cebfe
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
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.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -144,6 +145,7 @@ public class TDepartSettlementInfo extends Model<TDepartSettlementInfo> {
...
@@ -144,6 +145,7 @@ public class TDepartSettlementInfo extends Model<TDepartSettlementInfo> {
*/
*/
@ExcelAttribute
(
name
=
"创建时间"
)
@ExcelAttribute
(
name
=
"创建时间"
)
@Schema
(
description
=
"创建时间"
,
name
=
"createTime"
)
@Schema
(
description
=
"创建时间"
,
name
=
"createTime"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+08:00"
)
private
LocalDateTime
createTime
;
private
LocalDateTime
createTime
;
/**
/**
* 最后更新人
* 最后更新人
...
@@ -157,6 +159,7 @@ public class TDepartSettlementInfo extends Model<TDepartSettlementInfo> {
...
@@ -157,6 +159,7 @@ public class TDepartSettlementInfo extends Model<TDepartSettlementInfo> {
*/
*/
@ExcelAttribute
(
name
=
"最后更新时间"
)
@ExcelAttribute
(
name
=
"最后更新时间"
)
@Schema
(
description
=
"最后更新时间"
,
name
=
"lastUpdateTime"
)
@Schema
(
description
=
"最后更新时间"
,
name
=
"lastUpdateTime"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+08:00"
)
private
LocalDateTime
lastUpdateTime
;
private
LocalDateTime
lastUpdateTime
;
/**
/**
* 结算主体ID
* 结算主体ID
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeProject.java
View file @
135cebfe
...
@@ -29,6 +29,7 @@ import javax.validation.constraints.NotNull;
...
@@ -29,6 +29,7 @@ import javax.validation.constraints.NotNull;
import
javax.validation.constraints.Size
;
import
javax.validation.constraints.Size
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
/**
* 项目档案表
* 项目档案表
...
@@ -364,5 +365,8 @@ public class TEmployeeProject extends BaseEntity {
...
@@ -364,5 +365,8 @@ public class TEmployeeProject extends BaseEntity {
@Schema
(
description
=
"员工类型多个"
)
@Schema
(
description
=
"员工类型多个"
)
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
[]
empNatureArray
;
private
String
[]
empNatureArray
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"选中的idList"
)
private
List
<
String
>
idList
;
}
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TSettleDomain.java
View file @
135cebfe
...
@@ -16,10 +16,12 @@
...
@@ -16,10 +16,12 @@
*/
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
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.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -328,5 +330,19 @@ public class TSettleDomain extends BaseEntity {
...
@@ -328,5 +330,19 @@ public class TSettleDomain extends BaseEntity {
@Schema
(
description
=
"回款周期1-12"
)
@Schema
(
description
=
"回款周期1-12"
)
private
String
backPayCycle
;
private
String
backPayCycle
;
/**
* 社保类型0:缴费库;1:预估库
*/
@ExcelAttribute
(
name
=
"社保类型0:缴费库;1:预估库"
)
@ExcelProperty
(
"社保类型0:缴费库;1:预估库"
)
@Schema
(
description
=
"社保类型0:缴费库;1:预估库"
)
private
String
socialType
;
/**
* 公积金类型0:缴费库;1:预估库
*/
@ExcelAttribute
(
name
=
"公积金类型0:缴费库;1:预估库"
)
@ExcelProperty
(
"公积金类型0:缴费库;1:预估库"
)
@Schema
(
description
=
"公积金类型0:缴费库;1:预估库"
)
private
String
fundType
;
}
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectExportVO.java
View file @
135cebfe
...
@@ -19,8 +19,10 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
...
@@ -19,8 +19,10 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.format.DateTimeFormat
;
import
com.alibaba.excel.annotation.format.DateTimeFormat
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.validation.constraints.Past
;
import
javax.validation.constraints.Past
;
...
@@ -428,5 +430,15 @@ public class EmployeeProjectExportVO{
...
@@ -428,5 +430,15 @@ public class EmployeeProjectExportVO{
@ExcelProperty
(
value
=
"社保所在县"
)
@ExcelProperty
(
value
=
"社保所在县"
)
private
String
socialTown
;
private
String
socialTown
;
private
String
[]
socialStatusArray
;
private
String
[]
fundStatusArray
;
private
String
[]
insuranceStatusArray
;
private
String
[]
contractStatusArray
;
private
String
[]
empNatureArray
;
private
List
<
String
>
idList
;
private
List
<
String
>
idList
;
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TSettleDomainController.java
View file @
135cebfe
...
@@ -216,7 +216,7 @@ public class TSettleDomainController {
...
@@ -216,7 +216,7 @@ public class TSettleDomainController {
**/
**/
@Inner
@Inner
@PostMapping
(
"/inner/getSettleDomainVoById"
)
@PostMapping
(
"/inner/getSettleDomainVoById"
)
public
TSettleDomainSelectVo
getSettleDomainVoById
(
String
id
)
{
public
TSettleDomainSelectVo
getSettleDomainVoById
(
@RequestBody
String
id
)
{
return
tSettleDomainService
.
getSettleDomainVoById
(
id
);
return
tSettleDomainService
.
getSettleDomainVoById
(
id
);
}
}
...
@@ -229,7 +229,7 @@ public class TSettleDomainController {
...
@@ -229,7 +229,7 @@ public class TSettleDomainController {
**/
**/
@Inner
@Inner
@PostMapping
(
"/inner/getInnerBySettlementId"
)
@PostMapping
(
"/inner/getInnerBySettlementId"
)
public
TDepartSettlementInfo
getInnerBySettlementId
(
@Request
Param
String
deptId
)
{
public
TDepartSettlementInfo
getInnerBySettlementId
(
@Request
Body
String
deptId
)
{
TDepartSettlementInfo
departSettlementInfo
=
new
TDepartSettlementInfo
();
TDepartSettlementInfo
departSettlementInfo
=
new
TDepartSettlementInfo
();
departSettlementInfo
.
setSettleId
(
deptId
);
departSettlementInfo
.
setSettleId
(
deptId
);
QueryWrapper
<
TDepartSettlementInfo
>
queryWrapperDs
=
new
QueryWrapper
<>();
QueryWrapper
<
TDepartSettlementInfo
>
queryWrapperDs
=
new
QueryWrapper
<>();
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
135cebfe
...
@@ -89,6 +89,11 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
...
@@ -89,6 +89,11 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
).
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
).
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
updateTEmployeeProject
))
{
if
(
Common
.
isNotNull
(
updateTEmployeeProject
))
{
if
(
updateTEmployeeProject
.
getSocialStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
]
||
updateTEmployeeProject
.
getFundStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
return
R
.
failed
(
"人员在原项目中存在在途的服务,请先终止后,再进行划转"
);
}
TSettleDomain
tSettleDomain
=
tSettleDomainMapper
.
selectOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
TSettleDomain
tSettleDomain
=
tSettleDomainMapper
.
selectOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDepartNo
,
tEmpChangeInfo
.
getDeptNo
()).
eq
(
TSettleDomain:
:
getDepartName
,
tEmpChangeInfo
.
getNewSettle
())
.
eq
(
TSettleDomain:
:
getDepartNo
,
tEmpChangeInfo
.
getDeptNo
()).
eq
(
TSettleDomain:
:
getDepartName
,
tEmpChangeInfo
.
getNewSettle
())
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
).
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
ZERO_STRING
));
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
).
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
ZERO_STRING
));
...
@@ -172,6 +177,10 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
...
@@ -172,6 +177,10 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getOldSettleCode
())
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getOldSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
updateTEmployeePro
))
{
if
(
Common
.
isNotNull
(
updateTEmployeePro
))
{
if
(
updateTEmployeePro
.
getSocialStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
]
||
updateTEmployeePro
.
getFundStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
QT_PROJECT_CHANGE_NOT_EXIST
,
excel
.
getOldSettleCode
()));
}
if
(
CommonConstants
.
ONE_INT
==
updateTEmployeePro
.
getProjectStatus
())
{
if
(
CommonConstants
.
ONE_INT
==
updateTEmployeePro
.
getProjectStatus
())
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_DELETE_EXIT
,
excel
.
getOldSettleCode
()));
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_DELETE_EXIT
,
excel
.
getOldSettleCode
()));
}
else
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
}
else
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
135cebfe
...
@@ -188,7 +188,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -188,7 +188,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
check
.
setBankNo
(
tEmployeeProject
.
getBankNo
());
check
.
setBankNo
(
tEmployeeProject
.
getBankNo
());
check
.
setIdNum
(
tEmployeeProject
.
getEmpIdcard
());
check
.
setIdNum
(
tEmployeeProject
.
getEmpIdcard
());
check
.
setName
(
tEmployeeProject
.
getEmpName
());
check
.
setName
(
tEmployeeProject
.
getEmpName
());
R
<
CheckBankNoVo
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
R
<
CheckBankNoVo
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckbankno/inner/checkBankNo"
,
check
,
CheckBankNoVo
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/tcheckbankno/inner/checkBankNo"
,
check
,
CheckBankNoVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
CheckBankNoVo
vo
=
checkListR
.
getData
();
CheckBankNoVo
vo
=
checkListR
.
getData
();
...
@@ -209,7 +210,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -209,7 +210,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//获取项目和单位信息
//获取项目和单位信息
TSettleDomain
tSettleDomain
=
tSettleDomainService
.
getOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
TSettleDomain
tSettleDomain
=
tSettleDomainService
.
getOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDepartNo
,
tEmployeeProject
.
getDeptNo
()).
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TSettleDomain:
:
getDepartNo
,
tEmployeeProject
.
getDeptNo
()).
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
STATUS_NORMAL
));
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
tEmployeeProject
.
setDeptId
(
tSettleDomain
.
getId
());
tEmployeeProject
.
setDeptId
(
tSettleDomain
.
getId
());
...
@@ -230,12 +232,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -230,12 +232,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
tEmployeeProject
.
getEmpNatrue
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
tEmployeeProject
.
getEmpNatrue
()))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ZERO_STRING
);
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ZERO_STRING
);
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tEmployeeProject
.
getEmpNatrue
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
tEmployeeInfo
.
getEmpNatrue
()))
{
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tEmployeeProject
.
getEmpNatrue
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
tEmployeeInfo
.
getEmpNatrue
()))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ONE_STRING
);
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ONE_STRING
);
}
}
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
().
intValue
()
+
CommonConstants
.
ONE_INT
);
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
().
intValue
()
+
CommonConstants
.
ONE_INT
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfoCompare
.
getId
(),
""
,
tEmployeeInfoCompare
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfoCompare
.
getId
(),
""
,
tEmployeeInfoCompare
,
tEmployeeInfo
);
return
R
.
ok
();
return
R
.
ok
();
}
}
return
R
.
failed
(
"未在人员档案中查到身份信息"
);
return
R
.
failed
(
"未在人员档案中查到身份信息"
);
...
@@ -292,9 +296,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -292,9 +296,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
}
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfoCompare
.
getId
(),
""
,
tEmployeeInfoCompare
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfoCompare
.
getId
(),
""
,
tEmployeeInfoCompare
,
tEmployeeInfo
);
}
}
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
compareProject
,
newProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
compareProject
,
newProject
);
return
R
.
ok
(
flag
);
return
R
.
ok
(
flag
);
}
}
...
@@ -306,7 +312,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -306,7 +312,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//对比对象
//对比对象
TEmployeeProject
compareProject
=
this
.
getById
(
id
);
TEmployeeProject
compareProject
=
this
.
getById
(
id
);
if
(
tEmployeeProject
.
getInsuranceStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
tEmployeeProject
.
getSocialStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
if
(
tEmployeeProject
.
getInsuranceStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
tEmployeeProject
.
getSocialStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
tEmployeeProject
.
getFundStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
])
{
tEmployeeProject
.
getFundStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
])
{
return
R
.
failed
(
"人员在该项目下存在进行中/未完结的服务,禁止删除"
);
return
R
.
failed
(
"人员在该项目下存在进行中/未完结的服务,禁止删除"
);
...
@@ -317,7 +324,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -317,7 +324,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
baseMapper
.
updateById
(
tEmployeeProject
);
baseMapper
.
updateById
(
tEmployeeProject
);
//更新操作记录
//更新操作记录
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
compareProject
,
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
compareProject
,
tEmployeeProject
);
List
<
TEmployeeInfo
>
updList
=
new
ArrayList
<>();
List
<
TEmployeeInfo
>
updList
=
new
ArrayList
<>();
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
...
@@ -347,7 +355,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -347,7 +355,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
empId
);
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
empId
);
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
0
]);
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
0
]);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
empId
,
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
empId
,
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
}
else
if
(
Common
.
isEmpty
(
empId
)
&&
!
Common
.
isEmpty
(
empProId
))
{
}
else
if
(
Common
.
isEmpty
(
empId
)
&&
!
Common
.
isEmpty
(
empProId
))
{
//复项
//复项
tEmployeeProjectOld
=
this
.
getById
(
empProId
);
tEmployeeProjectOld
=
this
.
getById
(
empProId
);
...
@@ -381,9 +390,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -381,9 +390,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
}
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
()
+
CommonConstants
.
ONE_INT
);
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
()
+
CommonConstants
.
ONE_INT
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
}
}
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
empProId
,
tEmployeeProjectOld
,
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
empProId
,
tEmployeeProjectOld
,
tEmployeeProject
);
}
else
{
}
else
{
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
empId
);
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
empId
);
tEmployeeProjectOld
=
this
.
getById
(
empProId
);
tEmployeeProjectOld
=
this
.
getById
(
empProId
);
...
@@ -391,7 +402,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -391,7 +402,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
TEmployeeProject
tEmployeeProject
=
this
.
getById
(
empProId
);
TEmployeeProject
tEmployeeProject
=
this
.
getById
(
empProId
);
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
0
]);
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
0
]);
this
.
updateById
(
tEmployeeProject
);
this
.
updateById
(
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
empProId
,
tEmployeeProjectOld
,
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
empProId
,
tEmployeeProjectOld
,
tEmployeeProject
);
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
empId
);
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
empId
);
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
0
]);
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
0
]);
...
@@ -415,7 +427,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -415,7 +427,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
}
tEmployeeInfo
.
setProjectNum
(
CommonConstants
.
ONE_INT
);
tEmployeeInfo
.
setProjectNum
(
CommonConstants
.
ONE_INT
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
empId
,
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
empId
,
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
}
}
}
else
{
}
else
{
return
R
.
failed
(
"传参为空!"
);
return
R
.
failed
(
"传参为空!"
);
...
@@ -425,72 +438,72 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -425,72 +438,72 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Override
@Override
public
R
deleteEmpPro
(
TEmployeeProject
tEmployeeProject
)
{
public
R
deleteEmpPro
(
TEmployeeProject
tEmployeeProject
)
{
Long
count
=
this
.
count
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
.
eq
(
TEmployeeProject:
:
getId
,
tEmployeeProject
.
getId
())
.
eq
(
TEmployeeProject:
:
getInsuranceStatus
,
CommonConstants
.
dingleDigitIntArray
[
0
])
.
eq
(
TEmployeeProject:
:
getSocialStatus
,
CommonConstants
.
dingleDigitIntArray
[
0
])
.
eq
(
TEmployeeProject:
:
getFundStatus
,
CommonConstants
.
dingleDigitIntArray
[
0
]));
if
(
count
==
CommonConstants
.
ONE_INT
)
{
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
String
code
=
""
;
String
code
=
""
;
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
if
(
CommonConstants
.
ONE_INT
==
tEmployeeProject
.
getSocialStatus
()
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
||
CommonConstants
.
ONE_INT
==
tEmployeeProject
.
getFundStatus
()
tEmployeeProject
.
setLeaveTime
(
LocalDateTime
.
now
());
||
CommonConstants
.
ZERO_INT
!=
tEmployeeProject
.
getInsuranceStatus
())
{
this
.
updateById
(
tEmployeeProject
);
return
R
.
failed
(
"人员在该项目下存在进行中/未完结的服务"
);
}
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeProject
.
setLeaveTime
(
LocalDateTime
.
now
());
this
.
updateById
(
tEmployeeProject
);
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
//查询该人员其他的项目档案
//查询该人员其他的项目档案
List
<
TEmployeeProject
>
list
=
this
.
list
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
List
<
TEmployeeProject
>
list
=
this
.
list
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmployeeProject
.
getEmpIdcard
())
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmployeeProject
.
getEmpIdcard
())
.
ne
(
TEmployeeProject:
:
getDeptNo
,
tEmployeeProject
.
getDeptNo
())
.
ne
(
TEmployeeProject:
:
getDeptNo
,
tEmployeeProject
.
getDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
if
(
tEmployeeProject
.
getIsLeaveEmployee
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
if
(
tEmployeeProject
.
getIsLeaveEmployee
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
return
R
.
failed
(
"该人员存在其他进行中的项目,禁止同步减档!"
);
return
R
.
failed
(
"该人员存在其他进行中的项目,禁止同步减档!"
);
}
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfo
.
setLeaveReason
(
tEmployeeProject
.
getLeaveReason
());
if
(
Common
.
isNotNull
(
tEmployeeProject
.
getLeaveRemark
()))
{
tEmployeeInfo
.
setLeaveRemark
(
tEmployeeProject
.
getLeaveRemark
());
}
tEmployeeInfo
.
setLeaveTime
(
DateUtil
.
getCurrentDateTime
());
YifuUser
user
=
SecurityUtils
.
getUser
();
tEmployeeInfo
.
setLeaveUser
(
user
.
getId
());
tEmployeeInfo
.
setLeaveUserName
(
user
.
getNickname
());
code
=
CommonConstants
.
ONE_STRING
;
}
else
{
//从剩下的项目档案中查找员工类型并更新
if
(
Common
.
isNotNull
(
list
))
{
Set
<
String
>
empNatrue
=
list
.
stream
().
map
(
TEmployeeProject:
:
getEmpNatrue
).
collect
(
Collectors
.
toSet
());
if
(
empNatrue
.
stream
().
anyMatch
(
e
->
e
.
equals
(
CommonConstants
.
ZERO_STRING
)))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ZERO_STRING
);
}
else
if
(
empNatrue
.
stream
().
anyMatch
(
e
->
e
.
equals
(
CommonConstants
.
ONE_STRING
)))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ONE_STRING
);
}
else
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
TWO_STRING
);
}
}
}
}
if
(
tEmployeeInfo
.
getProjectNum
()
!=
CommonConstants
.
ZERO_INT
)
{
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
()
-
CommonConstants
.
ONE_INT
);
tEmployeeInfo
.
setLeaveReason
(
tEmployeeProject
.
getLeaveReason
());
if
(
Common
.
isNotNull
(
tEmployeeProject
.
getLeaveRemark
()))
{
tEmployeeInfo
.
setLeaveRemark
(
tEmployeeProject
.
getLeaveRemark
());
}
}
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeInfo
.
setLeaveTime
(
DateUtil
.
getCurrentDateTime
());
TEmployeeProject
newInfo
=
this
.
getById
(
tEmployeeProject
.
getId
());
YifuUser
user
=
SecurityUtils
.
getUser
();
tEmployeeInfo
.
setLeaveUser
(
user
.
getId
());
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
tEmployeeInfo
.
setLeaveUserName
(
user
.
getNickname
());
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeProjectOld
,
newInfo
);
code
=
CommonConstants
.
ONE_STRING
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
code
))
{
}
else
{
return
R
.
ok
(
null
,
"减项减档成功"
);
//从剩下的项目档案中查找员工类型并更新
}
else
{
if
(
Common
.
isNotNull
(
list
))
{
return
R
.
ok
(
null
,
"减项成功,项目状态已更新为“已减项”"
);
Set
<
String
>
empNatrue
=
list
.
stream
().
map
(
TEmployeeProject:
:
getEmpNatrue
).
collect
(
Collectors
.
toSet
());
if
(
empNatrue
.
stream
().
anyMatch
(
e
->
e
.
equals
(
CommonConstants
.
ZERO_STRING
)))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ZERO_STRING
);
}
else
if
(
empNatrue
.
stream
().
anyMatch
(
e
->
e
.
equals
(
CommonConstants
.
ONE_STRING
)))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ONE_STRING
);
}
else
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
TWO_STRING
);
}
}
}
}
}
if
(
tEmployeeInfo
.
getProjectNum
()
!=
CommonConstants
.
ZERO_INT
)
{
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
()
-
CommonConstants
.
ONE_INT
);
}
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
TEmployeeProject
newInfo
=
this
.
getById
(
tEmployeeProject
.
getId
());
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeProjectOld
,
newInfo
);
if
(
CommonConstants
.
ONE_STRING
.
equals
(
code
))
{
return
R
.
ok
(
null
,
"减项减档成功"
);
}
else
{
return
R
.
ok
(
null
,
"减项成功,项目状态已更新为“已减项”"
);
}
}
}
return
R
.
failed
(
"人员在该项目下存在进行中/未完结的服务"
);
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
}
@Override
@Override
...
@@ -575,7 +588,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -575,7 +588,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
// 调用字典服务,渲染字典值
// 调用字典服务,渲染字典值
R
<
Map
<
String
,
Map
<
String
,
Map
<
String
,
String
>>>>
dictR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
R
<
Map
<
String
,
Map
<
String
,
Map
<
String
,
String
>>>>
dictR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dict/inner/getDictToValue"
,
null
,
Map
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/dict/inner/getDictToValue"
,
null
,
Map
.
class
,
SecurityConstants
.
FROM_IN
);
Map
<
String
,
Map
<
String
,
Map
<
String
,
String
>>>
dictDataMap
;
Map
<
String
,
Map
<
String
,
Map
<
String
,
String
>>>
dictDataMap
;
Map
<
String
,
Map
<
String
,
String
>>
dictMap
;
Map
<
String
,
Map
<
String
,
String
>>
dictMap
;
...
@@ -610,9 +624,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -610,9 +624,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
errorMessage
=
errorMessage
.
concat
(
" "
).
concat
(
";"
);
errorMessage
=
errorMessage
.
concat
(
" "
).
concat
(
";"
);
}
}
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
if
(
tEmployeeProject
.
getInsuranceStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
tEmployeeProject
.
getSocialStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
if
(
tEmployeeProject
.
getInsuranceStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
tEmployeeProject
.
getFundStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
])
{
tEmployeeProject
.
getSocialStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
]
||
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
errorMessage
+
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
)));
tEmployeeProject
.
getFundStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
errorMessage
+
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
)));
}
else
{
}
else
{
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
...
@@ -633,7 +649,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -633,7 +649,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
}
}
else
{
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
errorMessage
+
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_SEARCH_EXIT
)));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
errorMessage
+
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_SEARCH_EXIT
)));
}
}
}
}
if
(
errorMessageList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
if
(
errorMessageList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
...
@@ -1143,7 +1160,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -1143,7 +1160,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
infoUpdList
.
add
(
tEmployeeInfo
);
infoUpdList
.
add
(
tEmployeeInfo
);
}
else
{
}
else
{
errorList
.
add
(
new
ErrorMessage
(
i
,
delProject
.
getEmpName
()
+
";"
+
delProject
.
getEmpIdcard
()
+
";"
+
delProject
.
getDeptNo
()
+
";"
+
"项目档案状态为已审核,禁止删除"
));
errorList
.
add
(
new
ErrorMessage
(
i
,
delProject
.
getEmpName
()
+
";"
+
delProject
.
getEmpIdcard
()
+
";"
+
delProject
.
getDeptNo
()
+
";"
+
"项目档案状态为已审核,禁止删除"
));
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"项目档案批量删除异常:"
+
e
.
getMessage
());
log
.
error
(
"项目档案批量删除异常:"
+
e
.
getMessage
());
...
@@ -1295,7 +1313,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -1295,7 +1313,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
proupdateList
.
add
(
tEmployeeProject
);
proupdateList
.
add
(
tEmployeeProject
);
// 记录变更日志
// 记录变更日志
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeProjectOld
,
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeProjectOld
,
tEmployeeProject
);
}
}
/**
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TSettleDomainServiceImpl.java
View file @
135cebfe
...
@@ -100,7 +100,7 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
...
@@ -100,7 +100,7 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
@Override
@Override
public
TSettleDomainSelectVo
getSettleDomainVoById
(
String
id
)
{
public
TSettleDomainSelectVo
getSettleDomainVoById
(
String
id
)
{
return
baseMapper
.
selectSettleDomainSelectVos
ById
(
id
);
return
baseMapper
.
getSettleDomainVo
ById
(
id
);
}
}
@Override
@Override
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TSettleDomainMapper.xml
View file @
135cebfe
...
@@ -71,64 +71,65 @@
...
@@ -71,64 +71,65 @@
<result
property=
"exceptionRemark"
column=
"EXCEPTION_REMARK"
/>
<result
property=
"exceptionRemark"
column=
"EXCEPTION_REMARK"
/>
<result
property=
"existAdvancePayment"
column=
"EXIST_ADVANCE_PAYMENT"
/>
<result
property=
"existAdvancePayment"
column=
"EXIST_ADVANCE_PAYMENT"
/>
<result
property=
"backPayCycle"
column=
"BACK_PAY_CYCLE"
/>
<result
property=
"backPayCycle"
column=
"BACK_PAY_CYCLE"
/>
<result
property=
"socialType"
column=
"SOCIAL_TYPE"
/>
<result
property=
"fundType"
column=
"FUND_TYPE"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a
a.ID,
.
a.DEPART_NO,
ID
a.DEPART_NAME,
,
a.IS_NEW,
a.DEPART_NO,
a.NEW_REMARK,
a.DEPART_NAME,
a.DELETE_FLAG,
a.IS_NEW,
a.DP_AUDIT_FLAG,
a.NEW_REMARK,
a.OLD_ID,
a.DELETE_FLAG,
a.BELONG_CONTRACT,
a.DP_AUDIT_FLAG,
a.DP_AUDIT_OPINION,
a.OLD_ID,
a.DP_AUDIT_MAN,
a.BELONG_CONTRACT,
a.DP_AUDIT_MAN_NAME,
a.DP_AUDIT_OPINION,
a.LAST_AUDIT_DATE,
a.DP_AUDIT_MAN,
a.SERVER_ITEM,
a.DP_AUDIT_MAN_NAME,
a.INCOME_BELONG,
a.LAST_AUDIT_DATE,
a.INCOME_BELONG_SUB,
a.SERVER_ITEM,
a.CUSTOMER_ID,
a.INCOME_BELONG,
a.CREATE_USER_NAME,
a.INCOME_BELONG_SUB,
a.COMMIT_USER,
a.CUSTOMER_ID,
a.COMMIT_USER_NAME,
a.CREATE_USER_NAME,
a.BALANCE,
a.COMMIT_USER,
a.INVOICE_BALANCE,
a.COMMIT_USER_NAME,
a.FIRST_PASS_FLAG,
a.BALANCE,
a.FIRST_PASS_TIME,
a.INVOICE_BALANCE,
a.PROVINCE,
a.FIRST_PASS_FLAG,
a.CITY,
a.FIRST_PASS_TIME,
a.TOWN,
a.PROVINCE,
a.STOP_FLAG,
a.CITY,
a.employee_num,
a.TOWN,
a.STOP_DATE,
a.STOP_FLAG,
a.STOP_REASON,
a.employee_num,
a.STOP_USER,
a.STOP_DATE,
a.STOP_USER_NAME,
a.STOP_REASON,
a.TYPE,
a.STOP_USER,
a.BUSINESS_PRIMARY_TYPE,
a.STOP_USER_NAME,
a.BUSINESS_SECOND_TYPE,
a.TYPE,
a.BUSINESS_THIRD_TYPE,
a.BUSINESS_PRIMARY_TYPE,
a.MANAGER_AUDIT_OPINION,
a.BUSINESS_SECOND_TYPE,
a.MANAGER_AUDIT_MAN,
a.BUSINESS_THIRD_TYPE,
a.MANAGER_AUDIT_MAN_NAME,
a.MANAGER_AUDIT_OPINION,
a.AUDIT_TIME,
a.MANAGER_AUDIT_MAN,
a.MANAGER_AUDIT_TIME,
a.MANAGER_AUDIT_MAN_NAME,
a.CREATE_TYPE,
a.AUDIT_TIME,
a.RELATE_FLAG,
a.MANAGER_AUDIT_TIME,
a.EXCEPTION_REMARK,
a.CREATE_TYPE,
a.EXIST_ADVANCE_PAYMENT,
a.RELATE_FLAG,
a.BACK_PAY_CYCLE,
a.EXCEPTION_REMARK,
a.CREATE_BY,
a.EXIST_ADVANCE_PAYMENT,
a.CREATE_NAME,
a.BACK_PAY_CYCLE,
a.CREATE_TIME,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.UPDATE_TIME,
a.CREATE_TIME,
a.SOCIAL_TYPE,
a.UPDATE_BY,
a.FUND_TYPE
a.UPDATE_TIME
</sql>
</sql>
<resultMap
id=
"tSettleDomainSelectVoMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo"
>
<resultMap
id=
"tSettleDomainSelectVoMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo"
>
...
@@ -186,7 +187,8 @@
...
@@ -186,7 +187,8 @@
c.customerId,
c.customerId,
c.CUSTOMER_NAME as 'customerName',
c.CUSTOMER_NAME as 'customerName',
c.CUSTOMER_CODE as 'customerCode',
c.CUSTOMER_CODE as 'customerCode',
c.INDUSTRY_BELONG as 'industryBelong'
c.INDUSTRY_BELONG as 'industryBelong',
t.COVER_NAME as 'businessSubjectName'
FROM
FROM
t_settle_domain a
t_settle_domain a
LEFT JOIN (
LEFT JOIN (
...
@@ -195,6 +197,7 @@
...
@@ -195,6 +197,7 @@
INDUSTRY_BELONG,
INDUSTRY_BELONG,
CUSTOMER_CODE from t_customer_info
CUSTOMER_CODE from t_customer_info
) c ON a.CUSTOMER_ID = c.customerId
) c ON a.CUSTOMER_ID = c.customerId
LEFT JOIN t_table_head_salary_cover t on a.id=t.DEPART_ID and t.type = 0
WHERE a.id=#{id} GROUP BY a.id
WHERE a.id=#{id} GROUP BY a.id
</select>
</select>
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
135cebfe
...
@@ -300,7 +300,7 @@ public interface ErrorCodes {
...
@@ -300,7 +300,7 @@ public interface ErrorCodes {
*/
*/
String
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
=
"archives.project.change.not.exist"
;
String
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
=
"archives.project.change.not.exist"
;
/**
/**
*
该人员存在其他进行中的项目,禁止同步减档!
*
人员在原项目中存在在途的服务,请先终止后,再进行划转
*/
*/
String
QT_PROJECT_CHANGE_NOT_EXIST
=
"qt.project.change.not.exist"
;
String
QT_PROJECT_CHANGE_NOT_EXIST
=
"qt.project.change.not.exist"
;
/**
/**
...
...
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
135cebfe
...
@@ -99,7 +99,7 @@ archives.project.change.not.exist=\u4EBA\u5458\u5728\u8BE5\u9879\u76EE\u4E0B\u5B
...
@@ -99,7 +99,7 @@ archives.project.change.not.exist=\u4EBA\u5458\u5728\u8BE5\u9879\u76EE\u4E0B\u5B
archives.project.emp.lose.fee.not.empty
=
\u
4E0D
\u
826F
\u
8BB0
\u
5F55
\u
8D39
\u7528\u
635F
\u5931\u
548C
\u5176\u
4ED6
\u
635F
\u5931\u
4E0D
\u
53EF
\u
540C
\u
65F6
\u
4E3A
\u
7A7A
archives.project.emp.lose.fee.not.empty
=
\u
4E0D
\u
826F
\u
8BB0
\u
5F55
\u
8D39
\u7528\u
635F
\u5931\u
548C
\u5176\u
4ED6
\u
635F
\u5931\u
4E0D
\u
53EF
\u
540C
\u
65F6
\u
4E3A
\u
7A7A
qt.project.change.not.exist
=
\u
8BE5
\u
4EBA
\u5458\u
5B58
\u5728\u5176\u
4ED6
\u
8FDB
\u
884C
\u
4E2D
\u7684\u9879\u
76EE
\u
FF0C
\u7981\u
6B62
\u
540C
\u
6B65
\u
51CF
\u6863
qt.project.change.not.exist
=
\u
4EBA
\u5458\u5728\u
539F
\u9879\u
76EE
\u
4E2D
\u
5B58
\u5728\u5728\u9014\u7684\u
670D
\u
52A1
\u
FF0C
\u
8BF7
\u5148\u
7EC8
\u
6B62
\u
540E
\u
FF0C
\u
518D
\u
8FDB
\u
884C
\u5212\u
8F6C
project.search.not.exist
=
\u
672A
\u
627E
\u5230\u
5BF9
\u
5E94
\u7684\u9879\u
76EE
\u
FF0C
\u
8BF7
\u6838\u
5B9E
project.search.not.exist
=
\u
672A
\u
627E
\u5230\u
5BF9
\u
5E94
\u7684\u9879\u
76EE
\u
FF0C
\u
8BF7
\u6838\u
5B9E
change.strat.month.exit
=
\u5212\u
8F6C
\u
8D77
\u
59CB
\u6708\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
change.strat.month.exit
=
\u5212\u
8F6C
\u
8D77
\u
59CB
\u6708\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/MSalaryEstimate.java
View file @
135cebfe
...
@@ -68,6 +68,12 @@ public class MSalaryEstimate {
...
@@ -68,6 +68,12 @@ public class MSalaryEstimate {
@NotBlank
(
message
=
"类型:0:社保;1:公积金;不能为空"
)
@NotBlank
(
message
=
"类型:0:社保;1:公积金;不能为空"
)
@ExcelProperty
(
"类型:0:社保;1:公积金;"
)
@ExcelProperty
(
"类型:0:社保;1:公积金;"
)
private
Integer
isSocial
;
private
Integer
isSocial
;
/**
* 来源类型:0:缴费库;1:预估库;
*/
@ExcelAttribute
(
name
=
"来源类型:0:缴费库;1:预估库;"
,
isNotEmpty
=
true
,
errorInfo
=
"来源类型:0:缴费库;1:预估库;不能为空"
)
@ExcelProperty
(
"来源类型:0:缴费库;1:预估库;"
)
private
Integer
type
;
/**
/**
* 类型:0:正常扣缴;1:无工资人员;
* 类型:0:正常扣缴;1:无工资人员;
*/
*/
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccount.java
View file @
135cebfe
...
@@ -207,6 +207,18 @@ public class TSalaryAccount {
...
@@ -207,6 +207,18 @@ public class TSalaryAccount {
@Length
(
max
=
1
,
message
=
"公积金优先级0:生成月;1:缴纳月不能超过1个字符"
)
@Length
(
max
=
1
,
message
=
"公积金优先级0:生成月;1:缴纳月不能超过1个字符"
)
@ExcelProperty
(
"公积金优先级0:生成月;1:缴纳月"
)
@ExcelProperty
(
"公积金优先级0:生成月;1:缴纳月"
)
private
String
fundPriority
;
private
String
fundPriority
;
/**
* 社保类型0:缴费库;1:预估库
*/
@ExcelAttribute
(
name
=
"社保类型0:缴费库;1:预估库"
)
@ExcelProperty
(
"社保类型0:缴费库;1:预估库"
)
private
String
socialType
;
/**
* 公积金类型0:缴费库;1:预估库
*/
@ExcelAttribute
(
name
=
"公积金类型0:缴费库;1:预估库"
)
@ExcelProperty
(
"公积金类型0:缴费库;1:预估库"
)
private
String
fundType
;
/**
/**
* 年终奖扣税方案0:合并;1:单独
* 年终奖扣税方案0:合并;1:单独
*/
*/
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccountItem.java
View file @
135cebfe
...
@@ -97,6 +97,6 @@ public class TSalaryAccountItem extends Model<TSalaryAccountItem> {
...
@@ -97,6 +97,6 @@ public class TSalaryAccountItem extends Model<TSalaryAccountItem> {
* 财务类型0:工资;1:绩效;2:其他;3:劳务费
* 财务类型0:工资;1:绩效;2:其他;3:劳务费
*/
*/
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
salary
Type
;
private
String
form
Type
;
}
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
View file @
135cebfe
...
@@ -227,6 +227,17 @@ public class TSalaryStandard extends BaseEntity {
...
@@ -227,6 +227,17 @@ public class TSalaryStandard extends BaseEntity {
@ExcelAttribute
(
name
=
"含有特殊金额的强行提交的备注"
)
@ExcelAttribute
(
name
=
"含有特殊金额的强行提交的备注"
)
private
String
haveSpecialRemark
;
private
String
haveSpecialRemark
;
/**
* 本月是否重复金额0:否;1:是重复导入的
*/
@ExcelAttribute
(
name
=
"本月是否重复金额0:否;1:是重复导入的"
)
@ExcelProperty
(
"本月是否重复金额0:否;1:是重复导入的"
)
private
Integer
isRepeat
;
@Schema
(
description
=
"本月重复金额的备注"
,
name
=
"repeatRemark"
)
@ExcelAttribute
(
name
=
"本月重复金额的备注"
)
private
String
repeatRemark
;
/**
/**
* 提交备注
* 提交备注
*/
*/
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSpecialDeducationSum.java
View file @
135cebfe
...
@@ -4,8 +4,8 @@ import com.alibaba.excel.annotation.ExcelProperty;
...
@@ -4,8 +4,8 @@ import com.alibaba.excel.annotation.ExcelProperty;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
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.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
...
@@ -13,7 +13,6 @@ import org.hibernate.validator.constraints.Length;
...
@@ -13,7 +13,6 @@ import org.hibernate.validator.constraints.Length;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
/**
/**
...
@@ -27,7 +26,7 @@ import java.time.LocalDateTime;
...
@@ -27,7 +26,7 @@ import java.time.LocalDateTime;
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"t_special_deducation_sum"
)
@TableName
(
"t_special_deducation_sum"
)
@Tag
(
name
=
"专项扣除"
)
@Tag
(
name
=
"专项扣除"
)
public
class
TSpecialDeducationSum
extends
Model
<
TSpecialDeducationSum
>
{
public
class
TSpecialDeducationSum
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
* id
* id
...
@@ -35,21 +34,6 @@ public class TSpecialDeducationSum extends Model<TSpecialDeducationSum> {
...
@@ -35,21 +34,6 @@ public class TSpecialDeducationSum extends Model<TSpecialDeducationSum> {
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
value
=
"id"
)
@ExcelProperty
(
value
=
"id"
)
private
String
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
;
/**
/**
* 导入月份
* 导入月份
*/
*/
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TStatisticsBonus.java
View file @
135cebfe
...
@@ -39,9 +39,9 @@ import java.math.BigDecimal;
...
@@ -39,9 +39,9 @@ import java.math.BigDecimal;
*/
*/
@Data
@Data
@TableName
(
"t_statistics_bonus"
)
@TableName
(
"t_statistics_bonus"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
()
@Schema
(
description
=
"全年一次性奖金申报表"
)
@Schema
(
description
=
"全年一次性奖金申报表"
)
public
class
TStatisticsBonus
extends
BaseEntity
{
public
class
TStatisticsBonus
{
/**
/**
* ID
* ID
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TStatisticsDeclarer.java
View file @
135cebfe
...
@@ -66,9 +66,9 @@ public class TStatisticsDeclarer {
...
@@ -66,9 +66,9 @@ public class TStatisticsDeclarer {
/**
/**
* 员工姓名
* 员工姓名
*/
*/
@ExcelAttribute
(
name
=
"
员工
姓名"
,
maxLength
=
20
)
@ExcelAttribute
(
name
=
"姓名"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"
员工
姓名不能超过20个字符"
)
@Length
(
max
=
20
,
message
=
"姓名不能超过20个字符"
)
@ExcelProperty
(
"
员工
姓名"
)
@ExcelProperty
(
"姓名"
)
private
String
empName
;
private
String
empName
;
/**
/**
* 身份证号
* 身份证号
...
@@ -87,14 +87,14 @@ public class TStatisticsDeclarer {
...
@@ -87,14 +87,14 @@ public class TStatisticsDeclarer {
/**
/**
* 人员状态
* 人员状态
*/
*/
@ExcelAttribute
(
name
=
"人员状态"
,
maxLength
=
2
)
@ExcelAttribute
(
name
=
"人员状态"
,
maxLength
=
2
,
readConverterExp
=
"0=在职,1=离职"
)
@Length
(
max
=
2
,
message
=
"人员状态不能超过2个字符"
)
@Length
(
max
=
2
,
message
=
"人员状态不能超过2个字符"
)
@ExcelProperty
(
"人员状态"
)
@ExcelProperty
(
"人员状态"
)
private
String
empStatus
;
private
String
empStatus
;
/**
/**
* 任职受雇从业类型
* 任职受雇从业类型
*/
*/
@ExcelAttribute
(
name
=
"任职受雇从业类型"
,
maxLength
=
2
)
@ExcelAttribute
(
name
=
"任职受雇从业类型"
,
maxLength
=
2
,
readConverterExp
=
"0=雇员,1=其他"
)
@Length
(
max
=
2
,
message
=
"任职受雇从业类型不能超过2个字符"
)
@Length
(
max
=
2
,
message
=
"任职受雇从业类型不能超过2个字符"
)
@ExcelProperty
(
"任职受雇从业类型"
)
@ExcelProperty
(
"任职受雇从业类型"
)
private
String
occupationType
;
private
String
occupationType
;
...
@@ -108,9 +108,9 @@ public class TStatisticsDeclarer {
...
@@ -108,9 +108,9 @@ public class TStatisticsDeclarer {
/**
/**
* 本月是否申报 0 是 1 否
* 本月是否申报 0 是 1 否
*/
*/
@ExcelAttribute
(
name
=
"本
月是否申报"
,
maxLength
=
1
)
@ExcelAttribute
(
name
=
"本
期是否申报"
,
maxLength
=
1
,
readConverterExp
=
"0=是,1=否"
)
@Length
(
max
=
1
,
message
=
"本
月
是否申报不能超过1个字符"
)
@Length
(
max
=
1
,
message
=
"本
期
是否申报不能超过1个字符"
)
@ExcelProperty
(
"本
月
是否申报"
)
@ExcelProperty
(
"本
期
是否申报"
)
private
String
isDeclare
;
private
String
isDeclare
;
/**
/**
* 不申报原因
* 不申报原因
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TStatisticsLabor.java
View file @
135cebfe
...
@@ -75,13 +75,6 @@ public class TStatisticsLabor {
...
@@ -75,13 +75,6 @@ public class TStatisticsLabor {
@Length
(
max
=
32
,
message
=
"身份证号不能超过32个字符"
)
@Length
(
max
=
32
,
message
=
"身份证号不能超过32个字符"
)
@ExcelProperty
(
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
private
String
empIdcard
;
/**
* 工号
*/
@ExcelAttribute
(
name
=
"工号"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"工号不能超过32个字符"
)
@ExcelProperty
(
"工号"
)
private
String
workNo
;
/**
/**
* 证件类型
* 证件类型
*/
*/
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TStatisticsRemuneration.java
View file @
135cebfe
...
@@ -94,12 +94,5 @@ public class TStatisticsRemuneration {
...
@@ -94,12 +94,5 @@ public class TStatisticsRemuneration {
@ExcelAttribute
(
name
=
"个税"
)
@ExcelAttribute
(
name
=
"个税"
)
@ExcelProperty
(
"个税"
)
@ExcelProperty
(
"个税"
)
private
BigDecimal
personalTax
;
private
BigDecimal
personalTax
;
/**
* 工号
*/
@ExcelAttribute
(
name
=
"工号"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"工号不能超过32个字符"
)
@ExcelProperty
(
"工号"
)
private
String
workNo
;
}
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/SalaryUploadReturnVo.java
deleted
100644 → 0
View file @
bc003539
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.ToString
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Description: 工资导入的返回vo
* @Author: hgw
* @Date: 2021/11/2 15:22
* @return:
**/
@Getter
@Setter
@ToString
public
class
SalaryUploadReturnVo
implements
Serializable
{
/**
* 用于返回错误信息
*/
private
List
<
ErrorMessage
>
errorInfo
;
// 重复数据
private
List
<
ErrorMessage
>
repeatInfo
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TSalaryAccountVo.java
View file @
135cebfe
...
@@ -308,5 +308,9 @@ public class TSalaryAccountVo implements Serializable {
...
@@ -308,5 +308,9 @@ public class TSalaryAccountVo implements Serializable {
@ExcelProperty
(
"个税-单位承担"
)
@ExcelProperty
(
"个税-单位承担"
)
private
BigDecimal
salaryTaxUnit
;
private
BigDecimal
salaryTaxUnit
;
@ExcelAttribute
(
name
=
"是否新员工(默认否)"
)
@ExcelProperty
(
"是否新员工(默认否)"
)
private
String
isNewEmployee
;
private
List
<
TSalaryAccountItemVo
>
saiList
=
new
ArrayList
<>();
//工资组成部分明细
private
List
<
TSalaryAccountItemVo
>
saiList
=
new
ArrayList
<>();
//工资组成部分明细
}
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TStatisticsDeclarerVo.java
View file @
135cebfe
...
@@ -43,9 +43,9 @@ public class TStatisticsDeclarerVo extends RowIndex implements Serializable {
...
@@ -43,9 +43,9 @@ public class TStatisticsDeclarerVo extends RowIndex implements Serializable {
/**
/**
* 员工姓名
* 员工姓名
*/
*/
@ExcelAttribute
(
name
=
"
员工
姓名"
,
maxLength
=
20
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"姓名"
,
maxLength
=
20
,
isNotEmpty
=
true
)
@Schema
(
description
=
"
员工
姓名"
)
@Schema
(
description
=
"姓名"
)
@ExcelProperty
(
"
员工
姓名"
)
@ExcelProperty
(
"姓名"
)
private
String
empName
;
private
String
empName
;
/**
/**
* 身份证号
* 身份证号
...
@@ -57,9 +57,9 @@ public class TStatisticsDeclarerVo extends RowIndex implements Serializable {
...
@@ -57,9 +57,9 @@ public class TStatisticsDeclarerVo extends RowIndex implements Serializable {
/**
/**
* 本月是否申报
* 本月是否申报
*/
*/
@ExcelAttribute
(
name
=
"本
月是否申报"
,
maxLength
=
1
,
isNotEmpty
=
true
,
isDataId
=
true
,
readConverterExp
=
"0=是,1=否"
)
@ExcelAttribute
(
name
=
"本
期是否申报"
,
maxLength
=
1
,
isNotEmpty
=
true
,
readConverterExp
=
"0=是,1=否"
)
@Schema
(
description
=
"本
月
是否申报"
)
@Schema
(
description
=
"本
期
是否申报"
)
@ExcelProperty
(
"本
月
是否申报"
)
@ExcelProperty
(
"本
期
是否申报"
)
private
String
isDeclare
;
private
String
isDeclare
;
/**
/**
* 不申报原因
* 不申报原因
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TStatisticsLaborVo.java
View file @
135cebfe
...
@@ -81,14 +81,6 @@ public class TStatisticsLaborVo extends RowIndex implements Serializable {
...
@@ -81,14 +81,6 @@ public class TStatisticsLaborVo extends RowIndex implements Serializable {
@Schema
(
description
=
"身份证号"
)
@Schema
(
description
=
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
private
String
empIdcard
;
/**
* 工号
*/
@Length
(
max
=
32
,
message
=
"工号 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"工号"
,
maxLength
=
32
)
@Schema
(
description
=
"工号"
)
@ExcelProperty
(
"工号"
)
private
String
workNo
;
/**
/**
* 证件类型
* 证件类型
*/
*/
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TStatisticsRemunerationVo.java
View file @
135cebfe
...
@@ -103,13 +103,5 @@ public class TStatisticsRemunerationVo extends RowIndex implements Serializable
...
@@ -103,13 +103,5 @@ public class TStatisticsRemunerationVo extends RowIndex implements Serializable
@Schema
(
description
=
"个税"
)
@Schema
(
description
=
"个税"
)
@ExcelProperty
(
"个税"
)
@ExcelProperty
(
"个税"
)
private
BigDecimal
personalTax
;
private
BigDecimal
personalTax
;
/**
* 工号
*/
@Length
(
max
=
32
,
message
=
"工号 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"工号"
,
maxLength
=
32
)
@Schema
(
description
=
"工号"
)
@ExcelProperty
(
"工号"
)
private
String
workNo
;
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/SalaryUploadController.java
View file @
135cebfe
...
@@ -4,6 +4,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...
@@ -4,6 +4,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.SalaryUploadService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.SalaryUploadService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
...
@@ -31,7 +32,6 @@ public class SalaryUploadController {
...
@@ -31,7 +32,6 @@ public class SalaryUploadController {
* @param settleDepart 结算主体id
* @param settleDepart 结算主体id
* @param configId 配置方案id
* @param configId 配置方案id
* @param salaryType 报表类型id
* @param salaryType 报表类型id
* @param repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* @Description:
* @Description:
* @Author: hgw
* @Author: hgw
* @Date: 2019/9/11 15:21
* @Date: 2019/9/11 15:21
...
@@ -40,9 +40,9 @@ public class SalaryUploadController {
...
@@ -40,9 +40,9 @@ public class SalaryUploadController {
@Operation
(
description
=
"上传:jsonString:表格json;settleDepart:结算主体id;configId:工资配置结算月等信息的id;salaryType:工资类型"
)
@Operation
(
description
=
"上传:jsonString:表格json;settleDepart:结算主体id;configId:工资配置结算月等信息的id;salaryType:工资类型"
)
@SysLog
(
"上传薪资表"
)
@SysLog
(
"上传薪资表"
)
@PostMapping
(
"/upload"
)
@PostMapping
(
"/upload"
)
public
R
upload
(
@RequestBody
String
jsonString
,
@RequestParam
String
settleDepart
,
@RequestParam
String
configId
public
R
upload
(
@RequestBody
String
jsonString
,
@RequestParam
String
settleDepart
,
@RequestParam
(
required
=
false
)
String
configId
,
@RequestParam
String
salaryType
,
@RequestParam
int
repeatFlag
)
{
,
@RequestParam
String
salaryType
)
{
return
salaryUploadService
.
salaryUpload
(
jsonString
,
settleDepart
,
configId
,
salaryType
,
repeatFlag
);
return
salaryUploadService
.
salaryUpload
(
jsonString
,
settleDepart
,
configId
,
salaryType
);
}
}
/**
/**
...
@@ -59,4 +59,11 @@ public class SalaryUploadController {
...
@@ -59,4 +59,11 @@ public class SalaryUploadController {
return
salaryUploadService
.
saveAndSubmit
(
savList
);
return
salaryUploadService
.
saveAndSubmit
(
savList
);
}
}
@Operation
(
description
=
"打开结算单"
)
@SysLog
(
"打开结算单"
)
@PostMapping
(
"openBill"
)
public
R
<
TSalaryDetailVo
>
openBill
(
@RequestParam
String
salaryFormId
)
{
return
salaryUploadService
.
getBill
(
salaryFormId
);
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryAttaController.java
View file @
135cebfe
...
@@ -71,7 +71,7 @@ public class TSalaryAttaController {
...
@@ -71,7 +71,7 @@ public class TSalaryAttaController {
* @Date: 2021-12-8 15:36:58
* @Date: 2021-12-8 15:36:58
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.List < com.yifu.cloud.v1.hrms.api.entity.TSalaryAtta>>
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.List < com.yifu.cloud.v1.hrms.api.entity.TSalaryAtta>>
**/
**/
@Schema
(
description
=
"获取list(linkId, linkType链接类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录6:非扣税 7发放失败 8自有员工附件 9财务回执附件 10换人换卡附件;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000)
)
"
)
@Schema
(
description
=
"获取list(linkId, linkType链接类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录6:非扣税 7发放失败 8自有员工附件 9财务回执附件 10换人换卡附件;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000)
;14本月重复金额
"
)
@GetMapping
(
"/getTSalaryAttaListByIdType"
)
@GetMapping
(
"/getTSalaryAttaListByIdType"
)
public
R
<
List
<
TSalaryAtta
>>
getTSalaryAttaListByIdType
(
@RequestParam
String
linkId
,
@RequestParam
Integer
linkType
)
{
public
R
<
List
<
TSalaryAtta
>>
getTSalaryAttaListByIdType
(
@RequestParam
String
linkId
,
@RequestParam
Integer
linkType
)
{
return
new
R
<>(
tSalaryAttaService
.
getAttaListHaveSrc
(
linkId
,
linkType
));
return
new
R
<>(
tSalaryAttaService
.
getAttaListHaveSrc
(
linkId
,
linkType
));
...
@@ -86,7 +86,7 @@ public class TSalaryAttaController {
...
@@ -86,7 +86,7 @@ public class TSalaryAttaController {
* @throws IOException
* @throws IOException
*/
*/
@SysLog
(
"薪资附件上传"
)
@SysLog
(
"薪资附件上传"
)
@Schema
(
description
=
"OSS文件上传接口。linkType类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4薪资打印记录;5核准表打印记录;6:非扣税项;8自有员工附件;9:财务回执附件;10换人换卡附件;11薪资原表"
)
@Schema
(
description
=
"OSS文件上传接口。linkType类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4薪资打印记录;5核准表打印记录;6:非扣税项;8自有员工附件;9:财务回执附件;10换人换卡附件;11薪资原表
;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000);14本月重复金额
"
)
/*@ApiImplicitParams({
/*@ApiImplicitParams({
@ApiImplicitParam(name = "file", value = "Form文件上传", required = true, dataType = "__file", paramType = "form"),
@ApiImplicitParam(name = "file", value = "Form文件上传", required = true, dataType = "__file", paramType = "form"),
@ApiImplicitParam(name = "filePath", value = "文件上传路径", dataType = "String", paramType = "form"),
@ApiImplicitParam(name = "filePath", value = "文件上传路径", dataType = "String", paramType = "form"),
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryStandardController.java
View file @
135cebfe
...
@@ -172,6 +172,7 @@ public class TSalaryStandardController {
...
@@ -172,6 +172,7 @@ public class TSalaryStandardController {
tApprovalRecord
.
setApprovalTime
(
DateUtil
.
getCurrentDateTime
());
tApprovalRecord
.
setApprovalTime
(
DateUtil
.
getCurrentDateTime
());
auditLogService
.
save
(
tApprovalRecord
);
auditLogService
.
save
(
tApprovalRecord
);
tSalaryStandard
.
setSubmitTime
(
new
Date
());
tSalaryStandard
.
setSubmitTime
(
new
Date
());
tSalaryStandard
.
setStatus
(
CommonConstants
.
ONE_INT
);
tSalaryStandardService
.
updateById
(
tSalaryStandard
);
tSalaryStandardService
.
updateById
(
tSalaryStandard
);
return
R
.
ok
(
"提交成功!"
);
return
R
.
ok
(
"提交成功!"
);
}
else
{
}
else
{
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TStatisticsBonusController.java
View file @
135cebfe
...
@@ -136,7 +136,7 @@ public class TStatisticsBonusController {
...
@@ -136,7 +136,7 @@ public class TStatisticsBonusController {
@SysLog
(
"批量删除全年一次性奖金申报表"
)
@SysLog
(
"批量删除全年一次性奖金申报表"
)
@PostMapping
(
"/batchDelete"
)
@PostMapping
(
"/batchDelete"
)
@PreAuthorize
(
"@pms.hasPermission('salary_tstatisticsbonus_del')"
)
@PreAuthorize
(
"@pms.hasPermission('salary_tstatisticsbonus_del')"
)
public
R
batchDelete
(
@Request
Body
String
declareMonth
){
public
R
batchDelete
(
@Request
Param
String
declareMonth
){
return
tStatisticsBonusService
.
batchDelete
(
declareMonth
);
return
tStatisticsBonusService
.
batchDelete
(
declareMonth
);
}
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TStatisticsDeclarerController.java
View file @
135cebfe
...
@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -22,6 +22,7 @@ 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.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsDeclarerService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsDeclarerService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo
;
...
@@ -79,7 +80,7 @@ public class TStatisticsDeclarerController {
...
@@ -79,7 +80,7 @@ public class TStatisticsDeclarerController {
* @param id id
* @param id id
* @return R
* @return R
*/
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询
:hasPermission('salary_tstatisticsdeclarer_get')
"
)
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询"
)
@GetMapping
(
"/{id}"
)
@GetMapping
(
"/{id}"
)
public
R
<
TStatisticsDeclarer
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
public
R
<
TStatisticsDeclarer
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tStatisticsDeclarerService
.
getById
(
id
));
return
R
.
ok
(
tStatisticsDeclarerService
.
getById
(
id
));
...
@@ -140,6 +141,20 @@ public class TStatisticsDeclarerController {
...
@@ -140,6 +141,20 @@ public class TStatisticsDeclarerController {
return
tStatisticsDeclarerService
.
importDiy
(
file
.
getInputStream
());
return
tStatisticsDeclarerService
.
importDiy
(
file
.
getInputStream
());
}
}
/**
* @param
* @Description: 生成申报人员
* @Author: huyc
* @Date: 2022-08-17 18:17:48
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Inner
@Operation
(
description
=
"生成申报人员"
)
@PostMapping
(
"/inner/doStatisticsTaxDeclarer"
)
public
R
doStatisticsTaxDeclarer
()
{
return
tStatisticsDeclarerService
.
doStatisticsTaxDeclarer
();
}
/**
/**
* 申报对象表 批量导出
* 申报对象表 批量导出
* @author huyc
* @author huyc
...
@@ -147,7 +162,7 @@ public class TStatisticsDeclarerController {
...
@@ -147,7 +162,7 @@ public class TStatisticsDeclarerController {
**/
**/
@Operation
(
description
=
"导出申报对象表 hasPermission('salary_tstatisticsdeclarer-export')"
)
@Operation
(
description
=
"导出申报对象表 hasPermission('salary_tstatisticsdeclarer-export')"
)
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
//
@PreAuthorize("@pms.hasPermission('salary_tstatisticsdeclarer-export')")
@PreAuthorize
(
"@pms.hasPermission('salary_tstatisticsdeclarer-export')"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TStatisticsDeclarerSearchVo
searchVo
)
{
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TStatisticsDeclarerSearchVo
searchVo
)
{
tStatisticsDeclarerService
.
listExport
(
response
,
searchVo
);
tStatisticsDeclarerService
.
listExport
(
response
,
searchVo
);
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TStatisticsLaborController.java
View file @
135cebfe
...
@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsLabor
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsLabor
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsLaborService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsLaborService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsLaborSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsLaborSearchVo
;
...
@@ -36,7 +37,7 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -36,7 +37,7 @@ import javax.servlet.http.HttpServletResponse;
/**
/**
* 本期劳务费申报表
* 本期劳务费申报表
*
*
* @author h
gw
* @author h
uyc
* @date 2022-08-05 11:40:14
* @date 2022-08-05 11:40:14
*/
*/
@RestController
@RestController
...
@@ -90,7 +91,7 @@ public class TStatisticsLaborController {
...
@@ -90,7 +91,7 @@ public class TStatisticsLaborController {
/**
/**
* 本期劳务费申报表 批量导出
* 本期劳务费申报表 批量导出
*
*
* @author h
gw
* @author h
uyc
* @date 2022-08-05 11:40:14
* @date 2022-08-05 11:40:14
**/
**/
@Operation
(
description
=
"导出本期劳务费申报表 hasPermission('salary_tstatisticslabor-export')"
)
@Operation
(
description
=
"导出本期劳务费申报表 hasPermission('salary_tstatisticslabor-export')"
)
...
@@ -99,4 +100,32 @@ public class TStatisticsLaborController {
...
@@ -99,4 +100,32 @@ public class TStatisticsLaborController {
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TStatisticsLaborSearchVo
searchVo
)
{
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TStatisticsLaborSearchVo
searchVo
)
{
tStatisticsLaborService
.
listExport
(
response
,
searchVo
);
tStatisticsLaborService
.
listExport
(
response
,
searchVo
);
}
}
/**
* 本期劳务费申报表 批量删除
*
* @author huyc
* @date 2022-08-14 21:31:15
**/
@Operation
(
description
=
"批量删除本期劳务费申报表 hasPermission('salary_tstatisticslabor_del')"
)
@SysLog
(
"批量删除本期稿酬申报表"
)
@PostMapping
(
"/batchDelete"
)
@PreAuthorize
(
"@pms.hasPermission('salary_tstatisticslabor_del')"
)
public
R
batchDelete
(
@RequestParam
String
declareMonth
){
return
tStatisticsLaborService
.
batchDelete
(
declareMonth
);
}
/**
* @param
* @Description: 生成本期劳务费
* @Author: huyc
* @Date: 2022-08-17 18:17:48
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Inner
@Operation
(
description
=
"生成本期劳务费"
)
@PostMapping
(
"/inner/doStatisticsLabor"
)
public
R
doStatisticsLabor
()
{
return
tStatisticsLaborService
.
doStatisticsLabor
();
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TStatisticsRemunerationController.java
View file @
135cebfe
...
@@ -47,7 +47,6 @@ public class TStatisticsRemunerationController {
...
@@ -47,7 +47,6 @@ public class TStatisticsRemunerationController {
private
final
TStatisticsRemunerationService
tStatisticsRemunerationService
;
private
final
TStatisticsRemunerationService
tStatisticsRemunerationService
;
/**
/**
* 简单分页查询
* 简单分页查询
*
*
...
@@ -67,7 +66,7 @@ public class TStatisticsRemunerationController {
...
@@ -67,7 +66,7 @@ public class TStatisticsRemunerationController {
* @param id id
* @param id id
* @return R
* @return R
*/
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询
:hasPermission('salary_tstatisticsremuneration_get')
"
)
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询"
)
@GetMapping
(
"/{id}"
)
@GetMapping
(
"/{id}"
)
public
R
<
TStatisticsRemuneration
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
public
R
<
TStatisticsRemuneration
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tStatisticsRemunerationService
.
getById
(
id
));
return
R
.
ok
(
tStatisticsRemunerationService
.
getById
(
id
));
...
@@ -99,4 +98,18 @@ public class TStatisticsRemunerationController {
...
@@ -99,4 +98,18 @@ public class TStatisticsRemunerationController {
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TStatisticsRemunerationSearchVo
searchVo
)
{
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TStatisticsRemunerationSearchVo
searchVo
)
{
tStatisticsRemunerationService
.
listExport
(
response
,
searchVo
);
tStatisticsRemunerationService
.
listExport
(
response
,
searchVo
);
}
}
/**
* 本期稿酬申报表 批量删除
*
* @author huyc
* @date 2022-08-14 21:31:15
**/
@Operation
(
description
=
"批量删除本期稿酬申报表 hasPermission('salary_tstatisticsremuneration_del')"
)
@SysLog
(
"批量删除本期稿酬申报表"
)
@PostMapping
(
"/batchDelete"
)
@PreAuthorize
(
"@pms.hasPermission('salary_tstatisticsbonus_del')"
)
public
R
batchDelete
(
@RequestParam
String
declareMonth
){
return
tStatisticsRemunerationService
.
batchDelete
(
declareMonth
);
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccountItemMapper.java
View file @
135cebfe
...
@@ -13,9 +13,6 @@ import java.util.List;
...
@@ -13,9 +13,6 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.List
;
/**
/**
* 工资报账表附加-工资明细
* 工资报账表附加-工资明细
*
*
...
@@ -27,7 +24,7 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
...
@@ -27,7 +24,7 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
List
<
TSalaryAccountItem
>
getTSalaryAccountItemPage
(
@Param
(
"tSalaryAccountItem"
)
TSalaryAccountItem
tSalaryAccountItem
);
List
<
TSalaryAccountItem
>
getTSalaryAccountItemPage
(
@Param
(
"tSalaryAccountItem"
)
TSalaryAccountItem
tSalaryAccountItem
);
/**
/**
* @param
settleDepar
tId
* @param
dep
tId
* @param settleMonth
* @param settleMonth
* @param javaFiedName
* @param javaFiedName
* @Description: 获取报账详情信息
* @Description: 获取报账详情信息
...
@@ -35,7 +32,7 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
...
@@ -35,7 +32,7 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
* @Date: 2019/9/29 18:26
* @Date: 2019/9/29 18:26
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>
**/
**/
List
<
TSalaryAccountItem
>
getAllTSalaryAccountItem
(
@Param
(
"
settleDepartId"
)
String
settleDepar
tId
,
List
<
TSalaryAccountItem
>
getAllTSalaryAccountItem
(
@Param
(
"
deptId"
)
String
dep
tId
,
@Param
(
"settleMonth"
)
String
settleMonth
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"settleMonth"
)
String
settleMonth
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"finallyYear"
)
String
finallyYear
,
@Param
(
"empIdcard"
)
String
empIdcard
,
@Param
(
"finallyYear"
)
String
finallyYear
,
@Param
(
"empIdcard"
)
String
empIdcard
,
@Param
(
"accountId"
)
String
accountId
);
@Param
(
"accountId"
)
String
accountId
);
...
@@ -62,17 +59,17 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
...
@@ -62,17 +59,17 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
List
<
TSalaryAccountItem
>
getAllItemVoList
(
@Param
(
"idCardList"
)
List
<
String
>
idCardList
,
@Param
(
"invoiceTitle"
)
String
invoiceTitle
);
List
<
TSalaryAccountItem
>
getAllItemVoList
(
@Param
(
"idCardList"
)
List
<
String
>
idCardList
,
@Param
(
"invoiceTitle"
)
String
invoiceTitle
);
/**
/**
* @param
settleDepar
tId 结算主体id
* @param
dep
tId 结算主体id
* @param javaFiedName 属性名
* @param javaFiedName 属性名
* @param salary
Date
工资月
* @param salary
Month
工资月
* @param empIdcard 身份证
* @param empIdcard 身份证
* @Description: 获取前几个月总工资
* @Description: 获取前几个月总工资
* @Author: hgw
* @Author: hgw
* @Date: 2019/10/29 16:51
* @Date: 2019/10/29 16:51
* @return: java.math.BigDecimal
* @return: java.math.BigDecimal
**/
**/
BigDecimal
getAllMoney
(
@Param
(
"
settleDepartId"
)
String
settleDepar
tId
BigDecimal
getAllMoney
(
@Param
(
"
deptId"
)
String
dep
tId
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Date"
)
String
salaryDate
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Month"
)
String
salaryMonth
,
@Param
(
"empIdcard"
)
String
empIdcard
);
,
@Param
(
"empIdcard"
)
String
empIdcard
);
/**
/**
...
@@ -97,45 +94,45 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
...
@@ -97,45 +94,45 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
,
@Param
(
"javaFiedName"
)
String
javaFiedName
);
,
@Param
(
"javaFiedName"
)
String
javaFiedName
);
/**
/**
* @param
settleDepar
tId 结算主体id
* @param
dep
tId 结算主体id
* @param javaFiedName 属性名
* @param javaFiedName 属性名
* @param salary
Date
工资月
* @param salary
Month
工资月
* @param empIdcard 身份证
* @param empIdcard 身份证
* @Description: 获取月份条数(前12个月平均工资,要除以工资月数,这里就是工资月数)
* @Description: 获取月份条数(前12个月平均工资,要除以工资月数,这里就是工资月数)
* @Author: hgw
* @Author: hgw
* @Date: 2019/10/29 16:51
* @Date: 2019/10/29 16:51
* @return: java.long.Integer
* @return: java.long.Integer
**/
**/
Integer
getAverageSalaryItemMonthCount
(
@Param
(
"
settleDepartId"
)
String
settleDepar
tId
Integer
getAverageSalaryItemMonthCount
(
@Param
(
"
deptId"
)
String
dep
tId
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Date"
)
String
salaryDate
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Month"
)
String
salaryMonth
,
@Param
(
"empIdcard"
)
String
empIdcard
);
,
@Param
(
"empIdcard"
)
String
empIdcard
);
/**
/**
* @param
settleDepar
tId 结算主体id
* @param
dep
tId 结算主体id
* @param javaFiedName 属性名
* @param javaFiedName 属性名
* @param salary
Date
工资月
* @param salary
Month
工资月
* @param empIdcard 身份证
* @param empIdcard 身份证
* @Description: 获取前几个月总工资
* @Description: 获取前几个月总工资
* @Author: hgw
* @Author: hgw
* @Date: 2019/10/29 16:51
* @Date: 2019/10/29 16:51
* @return: java.math.BigDecimal
* @return: java.math.BigDecimal
**/
**/
BigDecimal
getEngineerAllMoney
(
@Param
(
"
settleDepartId"
)
String
settleDepar
tId
BigDecimal
getEngineerAllMoney
(
@Param
(
"
deptId"
)
String
dep
tId
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Date"
)
String
salaryDate
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Month"
)
String
salaryMonth
,
@Param
(
"empIdcard"
)
String
empIdcard
);
,
@Param
(
"empIdcard"
)
String
empIdcard
);
/**
/**
* @param
settleDepar
tId 结算主体id
* @param
dep
tId 结算主体id
* @param javaFiedName 属性名
* @param javaFiedName 属性名
* @param salary
Date
工资月
* @param salary
Month
工资月
* @param empIdcard 身份证
* @param empIdcard 身份证
* @Description: 获取月份条数(前12个月平均工资,要除以工资月数,这里就是工资月数)
* @Description: 获取月份条数(前12个月平均工资,要除以工资月数,这里就是工资月数)
* @Author: hgw
* @Author: hgw
* @Date: 2019/10/29 16:51
* @Date: 2019/10/29 16:51
* @return: java.long.Integer
* @return: java.long.Integer
**/
**/
Integer
getEngineerAverageSalaryItemMonthCount
(
@Param
(
"
settleDepartId"
)
String
settleDepar
tId
Integer
getEngineerAverageSalaryItemMonthCount
(
@Param
(
"
deptId"
)
String
dep
tId
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Date"
)
String
salaryDate
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Month"
)
String
salaryMonth
,
@Param
(
"empIdcard"
)
String
empIdcard
);
,
@Param
(
"empIdcard"
)
String
empIdcard
);
List
<
TSalaryAccountItem
>
getAccountItemList
(
@Param
(
"tSalaryAccount"
)
TSalaryAccount
tSalaryAccount
List
<
TSalaryAccountItem
>
getAccountItemList
(
@Param
(
"tSalaryAccount"
)
TSalaryAccount
tSalaryAccount
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TStatisticsDeclarerMapper.java
View file @
135cebfe
...
@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer;
...
@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
/**
* 申报对象表
* 申报对象表
*
*
...
@@ -38,4 +40,11 @@ public interface TStatisticsDeclarerMapper extends BaseMapper<TStatisticsDeclare
...
@@ -38,4 +40,11 @@ public interface TStatisticsDeclarerMapper extends BaseMapper<TStatisticsDeclare
* @return
* @return
*/
*/
IPage
<
TStatisticsDeclarer
>
getTStatisticsDeclarerPage
(
Page
<
TStatisticsDeclarer
>
page
,
@Param
(
"tStatisticsDeclarer"
)
TStatisticsDeclarer
tStatisticsDeclarer
);
IPage
<
TStatisticsDeclarer
>
getTStatisticsDeclarerPage
(
Page
<
TStatisticsDeclarer
>
page
,
@Param
(
"tStatisticsDeclarer"
)
TStatisticsDeclarer
tStatisticsDeclarer
);
/**
* @param
* @Description: 统计
* @return:
**/
List
<
TStatisticsDeclarer
>
doStatisticsTaxDeclarer
(
@Param
(
"nowMonth"
)
String
nowMonth
,
@Param
(
"lastYear"
)
String
lastYear
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TStatisticsLaborMapper.java
View file @
135cebfe
...
@@ -23,6 +23,9 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -23,6 +23,9 @@ import org.apache.ibatis.annotations.Mapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
/**
* 本期劳务费申报表
* 本期劳务费申报表
*
*
...
@@ -37,4 +40,11 @@ public interface TStatisticsLaborMapper extends BaseMapper<TStatisticsLabor> {
...
@@ -37,4 +40,11 @@ public interface TStatisticsLaborMapper extends BaseMapper<TStatisticsLabor> {
* @return
* @return
*/
*/
IPage
<
TStatisticsLabor
>
getTStatisticsLaborPage
(
Page
<
TStatisticsLabor
>
page
,
@Param
(
"tStatisticsLabor"
)
TStatisticsLabor
tStatisticsLabor
);
IPage
<
TStatisticsLabor
>
getTStatisticsLaborPage
(
Page
<
TStatisticsLabor
>
page
,
@Param
(
"tStatisticsLabor"
)
TStatisticsLabor
tStatisticsLabor
);
/**
* @param
* @Description: 统计
* @return:
**/
List
<
TStatisticsLabor
>
doStatisticsLabor
(
@Param
(
"nowMonth"
)
String
nowMonth
,
@Param
(
"lastYear"
)
String
lastYear
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/SalaryUploadService.java
View file @
135cebfe
...
@@ -18,13 +18,13 @@ public interface SalaryUploadService extends IService<TSalaryStandard> {
...
@@ -18,13 +18,13 @@ public interface SalaryUploadService extends IService<TSalaryStandard> {
/**
/**
* @param jsonString
* @param jsonString
*
@param
repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
*repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* @Description: 普通工资上传
* @Description: 普通工资上传
* @Author: hgw
* @Author: hgw
* @Date: 2019/9/4 15:58
* @Date: 2019/9/4 15:58
* @return: com.yifu.cloud.v1.common.core.util.R
* @return: com.yifu.cloud.v1.common.core.util.R
**/
**/
R
salaryUpload
(
String
jsonString
,
String
settleDepart
,
String
configId
,
String
formType
,
int
repeatFlag
);
R
salaryUpload
(
String
jsonString
,
String
settleDepart
,
String
configId
,
String
formType
);
/**
/**
* @param savList
* @param savList
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TStatisticsDeclarerService.java
View file @
135cebfe
...
@@ -58,4 +58,11 @@ public interface TStatisticsDeclarerService extends IService<TStatisticsDeclarer
...
@@ -58,4 +58,11 @@ public interface TStatisticsDeclarerService extends IService<TStatisticsDeclarer
* @return
* @return
*/
*/
R
updateFlagById
(
String
id
,
String
isDeclare
,
String
undeclareReason
);
R
updateFlagById
(
String
id
,
String
isDeclare
,
String
undeclareReason
);
/**
* @param
* @Description: 生成申报人员
* @return
**/
R
doStatisticsTaxDeclarer
();
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TStatisticsLaborService.java
View file @
135cebfe
...
@@ -48,4 +48,17 @@ public interface TStatisticsLaborService extends IService<TStatisticsLabor> {
...
@@ -48,4 +48,17 @@ public interface TStatisticsLaborService extends IService<TStatisticsLabor> {
void
listExport
(
HttpServletResponse
response
,
TStatisticsLaborSearchVo
searchVo
);
void
listExport
(
HttpServletResponse
response
,
TStatisticsLaborSearchVo
searchVo
);
List
<
TStatisticsLabor
>
noPageDiy
(
TStatisticsLaborSearchVo
searchVo
);
List
<
TStatisticsLabor
>
noPageDiy
(
TStatisticsLaborSearchVo
searchVo
);
/**
* 批量删除本期劳务费申报表
* @param declareMonth 申报月份
* @return
*/
R
batchDelete
(
String
declareMonth
);
/** 生成本期劳务费
* @param
* @return
**/
R
doStatisticsLabor
();
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TStatisticsRemunerationService.java
View file @
135cebfe
...
@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
...
@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsRemuneration
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsRemuneration
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsRemunerationSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsRemunerationSearchVo
;
...
@@ -41,4 +42,11 @@ public interface TStatisticsRemunerationService extends IService<TStatisticsRemu
...
@@ -41,4 +42,11 @@ public interface TStatisticsRemunerationService extends IService<TStatisticsRemu
void
listExport
(
HttpServletResponse
response
,
TStatisticsRemunerationSearchVo
searchVo
);
void
listExport
(
HttpServletResponse
response
,
TStatisticsRemunerationSearchVo
searchVo
);
/**
* 批量删除本期稿酬申报表
* @param declareMonth 申报月份
* @return
*/
R
batchDelete
(
String
declareMonth
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
135cebfe
...
@@ -86,15 +86,16 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -86,15 +86,16 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
/**
/**
* @param jsonString 客户原表数据
* @param jsonString 客户原表数据
*
@param
repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* @Description: 普通工资上传
* @Description: 普通工资上传
* @Author: hgw
* @Author: hgw
* @Date: 2019/9/4 15:58
* @Date: 2019/9/4 15:58
* @return: com.yifu.cloud.v1.common.core.util.R
* @return: com.yifu.cloud.v1.common.core.util.R
**/
**/
@Override
@Override
public
R
salaryUpload
(
String
jsonString
,
String
settleDepart
,
String
configId
,
String
salaryType
,
int
repeatFlag
)
{
public
R
salaryUpload
(
String
jsonString
,
String
settleDepart
,
String
configId
,
String
salaryType
)
{
if
(
Common
.
isNotNull
(
jsonString
)
&&
Common
.
isNotNull
(
settleDepart
)
&&
Common
.
isNotNull
(
configId
)
&&
Common
.
isNotNull
(
salaryType
))
{
if
(
Common
.
isNotNull
(
jsonString
)
&&
Common
.
isNotNull
(
settleDepart
)
&&
Common
.
isNotNull
(
salaryType
))
{
R
<
TSettleDomainSelectVo
>
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
R
<
TSettleDomainSelectVo
>
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
,
"/tsettledomain/inner/getSettleDomainVoById"
,
settleDepart
,
TSettleDomainSelectVo
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/tsettledomain/inner/getSettleDomainVoById"
,
settleDepart
,
TSettleDomainSelectVo
.
class
,
SecurityConstants
.
FROM_IN
);
// 结算主体
// 结算主体
...
@@ -102,14 +103,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -102,14 +103,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(
sdr
!=
null
&&
sdr
.
getData
()
!=
null
)
{
if
(
sdr
!=
null
&&
sdr
.
getData
()
!=
null
)
{
dept
=
sdr
.
getData
();
dept
=
sdr
.
getData
();
}
}
if
(
dept
==
null
||
dept
.
getId
()
==
null
)
{
return
R
.
failed
(
"新建工资主表失败-获取结算主体信息为空"
);
}
// 2020-3-29 11:24:14变更为结算主体的封面抬头
String
invoiceTitle
=
dept
.
getBusinessSubjectName
();
if
(
Common
.
isEmpty
(
invoiceTitle
))
{
return
R
.
failed
(
"上传失败-获取结算主体的-封面抬头-信息为空,请去<客户管理-结算主体>模块,编辑封面抬头后再导入"
);
}
// 薪资识别配置(原表-标准模板)
// 薪资识别配置(原表-标准模板)
List
<
TSalaryConfigStandard
>
salaryAccountList
=
tSalaryConfigStandardService
.
list
();
List
<
TSalaryConfigStandard
>
salaryAccountList
=
tSalaryConfigStandardService
.
list
();
Map
<
String
,
TSalaryConfigStandard
>
salaryConfigMap
=
new
HashMap
<>();
//存放所有字段
Map
<
String
,
TSalaryConfigStandard
>
salaryConfigMap
=
new
HashMap
<>();
//存放所有字段
...
@@ -120,68 +114,135 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -120,68 +114,135 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
isMustMap
.
put
(
sc
.
getDbFiedName
(),
true
);
isMustMap
.
put
(
sc
.
getDbFiedName
(),
true
);
}
}
}
}
// 薪资配置-结算月、社保月等信息
TConfigSalary
configSalary
=
configSalaryService
.
getById
(
configId
);
if
(
dept
==
null
||
dept
.
getId
()
==
null
)
{
return
R
.
failed
(
"新建工资主表失败-获取结算主体信息为空"
);
}
// 2020-3-29 11:24:14变更为结算主体的封面抬头
String
invoiceTitle
=
dept
.
getBusinessSubjectName
();
if
(
Common
.
isEmpty
(
invoiceTitle
))
{
return
R
.
failed
(
"上传失败-获取结算主体的-封面抬头-信息为空,请去<客户管理-结算主体>模块,编辑封面抬头后再导入"
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
"获取登录用户信息失败!"
);
return
R
.
failed
(
"获取登录用户信息失败!"
);
}
}
try
{
//薪资导入
jsonString
=
URLDecoder
.
decode
(
jsonString
,
"UTF-8"
).
replace
(
"="
,
""
);
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
salaryType
)
&&
Common
.
isNotNull
(
configId
))
{
SalaryAccountUtil
util1
=
new
SalaryAccountUtil
();
// 薪资配置-结算月、社保月等信息
TSalaryEmployee
empSearch
=
new
TSalaryEmployee
();
TConfigSalary
configSalary
=
configSalaryService
.
getById
(
configId
);
empSearch
.
setUnitId
(
dept
.
getCustomerId
());
try
{
List
<
TSalaryEmployee
>
empList
=
employeeService
.
list
(
Wrappers
.<
TSalaryEmployee
>
query
().
lambda
()
jsonString
=
URLDecoder
.
decode
(
jsonString
,
"UTF-8"
).
replace
(
"="
,
""
);
.
eq
(
TSalaryEmployee:
:
getUnitId
,
dept
.
getCustomerId
()));
SalaryAccountUtil
util1
=
new
SalaryAccountUtil
();
Map
<
String
,
TSalaryEmployee
>
empIdCardMap
=
new
HashMap
<>();
Map
<
String
,
TSalaryEmployee
>
empNameMap
=
new
HashMap
<>();
TSalaryEmployee
empSearch
=
new
TSalaryEmployee
();
boolean
isDuplicateName
=
false
;
empSearch
.
setUnitId
(
dept
.
getCustomerId
());
if
(
empList
!=
null
)
{
List
<
TSalaryEmployee
>
empList
=
employeeService
.
list
(
Wrappers
.<
TSalaryEmployee
>
query
().
lambda
()
TSalaryEmployee
es
;
//筛选人员,添加判断:非在职,或开户行为空,或 结算主体等于选择的结算主体且在职,都可以存入Map优先备用
.
eq
(
TSalaryEmployee:
:
getUnitId
,
dept
.
getCustomerId
()));
for
(
TSalaryEmployee
e
:
empList
)
{
Map
<
String
,
TSalaryEmployee
>
empIdCardMap
=
new
HashMap
<>();
es
=
empIdCardMap
.
get
(
e
.
getEmpIdcard
());
Map
<
String
,
TSalaryEmployee
>
empNameMap
=
new
HashMap
<>();
if
(
es
==
null
||
CommonConstants
.
ZERO_INT
!=
es
.
getFileStatus
()
||
Common
.
isEmpty
(
es
.
getBankName
())
boolean
isDuplicateName
=
false
;
||
(
e
.
getDeptId
().
equals
(
settleDepart
)
&&
CommonConstants
.
ZERO_INT
==
e
.
getFileStatus
()
if
(
empList
!=
null
)
{
&&
Common
.
isNotNull
(
e
.
getBankName
())))
{
TSalaryEmployee
es
;
//筛选人员,添加判断:非在职,或开户行为空,或 结算主体等于选择的结算主体且在职,都可以存入Map优先备用
empIdCardMap
.
put
(
e
.
getEmpIdcard
(),
e
);
for
(
TSalaryEmployee
e
:
empList
)
{
empNameMap
.
put
(
e
.
getEmpName
().
replace
(
" "
,
""
),
e
);
es
=
empIdCardMap
.
get
(
e
.
getEmpIdcard
());
if
(
es
==
null
||
CommonConstants
.
ZERO_INT
!=
es
.
getFileStatus
()
||
Common
.
isEmpty
(
es
.
getBankName
())
||
(
e
.
getDeptId
().
equals
(
settleDepart
)
&&
CommonConstants
.
ZERO_INT
==
e
.
getFileStatus
()
&&
Common
.
isNotNull
(
e
.
getBankName
())))
{
empIdCardMap
.
put
(
e
.
getEmpIdcard
(),
e
);
empNameMap
.
put
(
e
.
getEmpName
().
replace
(
" "
,
""
),
e
);
}
}
if
(
empNameMap
.
size
()
==
empIdCardMap
.
size
())
{
isDuplicateName
=
true
;
}
}
}
}
if
(
empNameMap
.
size
()
==
empIdCardMap
.
size
())
{
// 自有员工结算主体id,新员工使用
isDuplicateName
=
true
;
Map
<
String
,
Integer
>
ownDeptMap
=
tOwnDeptService
.
getOwnDeptMap
();
// 自有员工所在结算主体Map
Map
<
String
,
Integer
>
ownEmployeeMap
=
tOwnDeptService
.
getOwnEmpMap
();
// 2.6.6:校验导入数据重复的Map格式:#身份证号_工资月份_报表类型_应发金额
Map
<
String
,
Integer
>
checkMap
=
tSalaryAccountService
.
getAccountCheckMap
(
dept
.
getId
(),
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
()));
util1
.
getJsonStringToList
(
user
,
jsonString
,
dept
,
configSalary
,
salaryConfigMap
,
isMustMap
,
empIdCardMap
,
empNameMap
,
isDuplicateName
,
salaryType
,
invoiceTitle
,
employeeService
,
checkMap
,
ownEmployeeMap
,
ownDeptMap
,
tSalaryAccountService
);
List
<
TSalaryAccountVo
>
saList
=
util1
.
getEntityList
();
if
((
null
!=
util1
.
getErrorInfo
()
&&
!
util1
.
getErrorInfo
().
isEmpty
()))
{
return
R
.
failed
(
util1
.
getErrorInfo
());
}
else
{
if
(
null
!=
saList
&&
!
saList
.
isEmpty
())
{
// return R.ok(saList)
return
this
.
saveAndSubmit
(
saList
);
}
else
{
return
R
.
failed
(
"导入数据不可为空"
);
}
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
return
R
.
failed
(
"数据导入解析失败!"
);
}
}
// 自有员工结算主体id,新员工使用
//劳务费导入
Map
<
String
,
Integer
>
ownDeptMap
=
tOwnDeptService
.
getOwnDeptMap
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
salaryType
))
{
// 自有员工所在结算主体Map
Map
<
String
,
Integer
>
ownEmployeeMap
=
tOwnDeptService
.
getOwnEmpMap
();
TConfigSalary
configSalary
=
new
TConfigSalary
();
// 薪资配置-结算月、社保月等信息
// 2.6.6:校验导入数据重复的Map格式:#身份证号_工资月份_报表类型_应发金额
configSalary
=
configSalaryService
.
getById
(
CommonConstants
.
ONE_STRING
);
Map
<
String
,
Integer
>
checkMap
=
tSalaryAccountService
.
getAccountCheckMap
(
dept
.
getId
(),
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
()));
try
{
util1
.
getJsonStringToList
(
user
,
jsonString
,
jsonString
=
URLDecoder
.
decode
(
jsonString
,
"UTF-8"
).
replace
(
"="
,
""
);
dept
,
configSalary
,
salaryConfigMap
,
isMustMap
,
empIdCardMap
,
empNameMap
,
isDuplicateName
SalaryAccountUtil
util1
=
new
SalaryAccountUtil
();
,
salaryType
,
invoiceTitle
,
employeeService
,
checkMap
,
repeatFlag
,
ownEmployeeMap
,
ownDeptMap
,
tSalaryAccountService
);
List
<
TSalaryAccountVo
>
saList
=
util1
.
getEntityList
();
List
<
TSalaryEmployee
>
empList
=
employeeService
.
list
(
Wrappers
.<
TSalaryEmployee
>
query
().
lambda
()
.
eq
(
TSalaryEmployee:
:
getUnitId
,
dept
.
getCustomerId
()));
SalaryUploadReturnVo
returnVo
=
new
SalaryUploadReturnVo
();
Map
<
String
,
TSalaryEmployee
>
empIdCardMap
=
new
HashMap
<>();
if
((
null
!=
util1
.
getErrorInfo
()
&&
!
util1
.
getErrorInfo
().
isEmpty
())
Map
<
String
,
TSalaryEmployee
>
empNameMap
=
new
HashMap
<>();
||
(
null
!=
util1
.
getRepeatInfo
()
&&
!
util1
.
getRepeatInfo
().
isEmpty
()))
{
boolean
isDuplicateName
=
false
;
returnVo
.
setErrorInfo
(
util1
.
getErrorInfo
());
if
(
empList
!=
null
)
{
returnVo
.
setRepeatInfo
(
util1
.
getRepeatInfo
());
TSalaryEmployee
es
;
//筛选人员,添加判断:非在职,或开户行为空,或 结算主体等于选择的结算主体且在职,都可以存入Map优先备用
return
R
.
failed
(
returnVo
);
for
(
TSalaryEmployee
e
:
empList
)
{
}
else
{
es
=
empIdCardMap
.
get
(
e
.
getEmpIdcard
());
if
(
null
!=
saList
&&
!
saList
.
isEmpty
())
{
if
(
es
==
null
||
CommonConstants
.
ZERO_INT
!=
es
.
getFileStatus
()
||
Common
.
isEmpty
(
es
.
getBankName
())
// return R.ok(saList)
||
(
e
.
getDeptId
().
equals
(
settleDepart
)
&&
CommonConstants
.
ZERO_INT
==
e
.
getFileStatus
()
return
this
.
saveAndSubmit
(
saList
);
&&
Common
.
isNotNull
(
e
.
getBankName
())))
{
empIdCardMap
.
put
(
e
.
getEmpIdcard
(),
e
);
empNameMap
.
put
(
e
.
getEmpName
().
replace
(
" "
,
""
),
e
);
}
}
if
(
empNameMap
.
size
()
==
empIdCardMap
.
size
())
{
isDuplicateName
=
true
;
}
}
// 自有员工结算主体id,新员工使用
Map
<
String
,
Integer
>
ownDeptMap
=
tOwnDeptService
.
getOwnDeptMap
();
// 自有员工所在结算主体Map
Map
<
String
,
Integer
>
ownEmployeeMap
=
tOwnDeptService
.
getOwnEmpMap
();
// 2.6.6:校验导入数据重复的Map格式:#身份证号_工资月份_报表类型_应发金额
Map
<
String
,
Integer
>
checkMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
configSalary
))
{
checkMap
=
tSalaryAccountService
.
getAccountCheckMap
(
dept
.
getId
(),
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
()));
}
util1
.
getJsonStringToList
(
user
,
jsonString
,
dept
,
!
Common
.
isNotNull
(
configSalary
)
?
null
:
configSalary
,
salaryConfigMap
,
isMustMap
,
empIdCardMap
,
empNameMap
,
isDuplicateName
,
salaryType
,
null
,
employeeService
,
checkMap
,
ownEmployeeMap
,
ownDeptMap
,
tSalaryAccountService
);
List
<
TSalaryAccountVo
>
saList
=
util1
.
getEntityList
();
if
((
null
!=
util1
.
getErrorInfo
()
&&
!
util1
.
getErrorInfo
().
isEmpty
()))
{
return
R
.
failed
(
util1
.
getErrorInfo
());
}
else
{
}
else
{
return
R
.
failed
(
"导入数据不可为空"
);
if
(
null
!=
saList
&&
!
saList
.
isEmpty
())
{
return
this
.
saveLaborSubmit
(
saList
,
dept
);
}
else
{
return
R
.
failed
(
"导入数据不可为空"
);
}
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
return
R
.
failed
(
"数据导入解析失败!"
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
return
R
.
failed
(
"数据导入解析失败!"
);
}
}
}
}
return
R
.
failed
(
"导入数据不可为空"
);
return
R
.
failed
(
"导入数据不可为空"
);
...
@@ -246,6 +307,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -246,6 +307,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
s
.
setDeptId
(
dept
.
getId
());
s
.
setDeptId
(
dept
.
getId
());
s
.
setDeptName
(
dept
.
getDepartName
());
s
.
setDeptName
(
dept
.
getDepartName
());
s
.
setDeptNo
(
dept
.
getDepartNo
());
s
.
setDeptNo
(
dept
.
getDepartNo
());
s
.
setUnitId
(
dept
.
getCustomerId
());
s
.
setUnitName
(
dept
.
getCustomerName
());
s
.
setUnitNo
(
dept
.
getCustomerCode
());
if
(
dept
.
getProvince
()
!=
null
)
{
if
(
dept
.
getProvince
()
!=
null
)
{
s
.
setProvince
(
dept
.
getProvince
());
s
.
setProvince
(
dept
.
getProvince
());
}
}
...
@@ -292,7 +356,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -292,7 +356,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(
Common
.
isEmpty
(
invoiceTitle
))
{
if
(
Common
.
isEmpty
(
invoiceTitle
))
{
return
R
.
failed
(
"新建工资主表失败-获取结算主体的-封面抬头-信息为空,请去<客户管理-结算主体>模块,编辑封面抬头后再导入"
);
return
R
.
failed
(
"新建工资主表失败-获取结算主体的-封面抬头-信息为空,请去<客户管理-结算主体>模块,编辑封面抬头后再导入"
);
}
}
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
"新建工资主表失败-获取登录人信息为空"
);
return
R
.
failed
(
"新建工资主表失败-获取登录人信息为空"
);
...
@@ -369,23 +432,25 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -369,23 +432,25 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
,
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccountItem
sai
,
TSettleDomainSelectVo
dept
,
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccountItem
sai
,
TSettleDomainSelectVo
dept
,
String
invoiceTitle
,
YifuUser
user
,
LocalDateTime
nowTime
,
TSalaryStandard
salary
,
String
invoiceTitle
,
YifuUser
user
,
LocalDateTime
nowTime
,
TSalaryStandard
salary
,
boolean
isActual
)
{
,
boolean
isActual
)
{
// 社保类型0:缴费库;1:预估库
String
socialType
=
CommonConstants
.
ZERO_STRING
;
if
(
Common
.
isNotNull
(
dept
.
getSocialType
()))
{
socialType
=
dept
.
getSocialType
();
}
// 公积金类型0:缴费库;1:预估库
String
fundType
=
CommonConstants
.
ZERO_STRING
;
if
(
Common
.
isNotNull
(
dept
.
getFundType
()))
{
fundType
=
dept
.
getFundType
();
}
List
<
TSalaryAccount
>
aList
;
List
<
TSalaryAccount
>
aList
;
TSalaryAccount
a
;
//定库:
TSalaryAccount
a
;
List
<
TPaymentBySalaryVo
>
socialEstmateList
=
null
;
//社保预估库
//定库:
List
<
TPaymentBySalaryVo
>
fundEstmateList
=
null
;
//公积金预估库
List
<
TPaymentBySalaryVo
>
socialEstmateList
=
null
;
//社保缴费库
List
<
MSalaryPaymentRes
>
salaryPaymentList
=
salaryPaymentResService
.
list
(
Wrappers
.<
MSalaryPaymentRes
>
query
().
lambda
()
List
<
TPaymentBySalaryVo
>
fundEstmateList
=
null
;
//公积金缴费库
.
eq
(
MSalaryPaymentRes:
:
getDeptId
,
dept
.
getId
()));
//薪资缴费库同步表list
List
<
TPaymentBySalaryVo
>
socialForecastList
=
null
;
//社保预估库
Map
<
String
,
MSalaryPaymentRes
>
salaryPaymentMap
=
new
HashMap
<>();
//薪资缴费库同步表Map
List
<
TPaymentBySalaryVo
>
fundForecastList
=
null
;
//公积金预估库
List
<
TPaymentBySalaryVo
>
noSalarySocialEstmateList
=
null
;
//无工资人员-社保预估库
List
<
TPaymentBySalaryVo
>
noSalaryFundEstmateList
=
null
;
//无工资人员-公积金预估库
List
<
TPaymentBySalaryVo
>
noSalarySocialEstmateListCopy
;
//无工资人员-社保预估库-循环
List
<
TPaymentBySalaryVo
>
noSalaryFundEstmateListCopy
;
//无工资人员-公积金预估库-循环
TPaymentBySalaryVo
forecast
=
new
TPaymentBySalaryVo
();
TPaymentBySalaryVo
forecast
=
new
TPaymentBySalaryVo
();
if
(
salaryPaymentList
!=
null
&&
!
salaryPaymentList
.
isEmpty
())
{
for
(
MSalaryPaymentRes
res
:
salaryPaymentList
)
{
salaryPaymentMap
.
put
(
res
.
getId
(),
res
);
}
}
//不扣社保
//不扣社保
if
(
salaryAccountVo
!=
null
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
salaryAccountVo
.
getIsDeductSocial
()))
{
if
(
salaryAccountVo
!=
null
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
salaryAccountVo
.
getIsDeductSocial
()))
{
forecast
.
setSettleDomainId
(
dept
.
getId
());
forecast
.
setSettleDomainId
(
dept
.
getId
());
...
@@ -396,25 +461,20 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -396,25 +461,20 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
else
{
}
else
{
forecast
.
setSocialPayMonth
(
SalaryConstants
.
PRIORITY_ZERO
);
//没优先级,则限制住
forecast
.
setSocialPayMonth
(
SalaryConstants
.
PRIORITY_ZERO
);
//没优先级,则限制住
}
}
R
<
TPaymentVo
>
tPaymentVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
socialType
))
{
,
"/tpaymentinfo/inner/selectTPaymentBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
R
<
TPaymentVo
>
tPaymentVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
if
(
tPaymentVoR
!=
null
&&
tPaymentVoR
.
getData
()
!=
null
&&
tPaymentVoR
.
getData
().
getPaymentList
()
!=
null
)
{
,
"/tpaymentinfo/inner/selectTPaymentBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
socialEstmateList
=
tPaymentVoR
.
getData
().
getPaymentList
();
if
(
tPaymentVoR
!=
null
&&
tPaymentVoR
.
getData
()
!=
null
&&
tPaymentVoR
.
getData
().
getPaymentList
()
!=
null
)
{
// 新增一步:根据同步表里的数据更新获取到的社保缴费库数据
socialEstmateList
=
tPaymentVoR
.
getData
().
getPaymentList
();
if
(!
salaryPaymentMap
.
isEmpty
())
{
}
MSalaryPaymentRes
res
;
}
for
(
TPaymentBySalaryVo
vo
:
socialEstmateList
)
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialType
))
{
res
=
salaryPaymentMap
.
get
(
vo
.
getId
());
// 预估数据
if
(
res
!=
null
)
{
R
<
TPaymentVo
>
tForecastVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
vo
.
setSalarySocialFlag
(
res
.
getSalarySocialFlag
());
,
"/tforecastlibrary/inner/selectTForecastBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
vo
.
setSalaryFundFlag
(
res
.
getSalaryFundFlag
());
if
(
tForecastVoR
!=
null
&&
tForecastVoR
.
getData
()
!=
null
&&
tForecastVoR
.
getData
().
getPaymentList
()
!=
null
)
{
}
socialForecastList
=
tForecastVoR
.
getData
().
getPaymentList
();
}
}
}
noSalarySocialEstmateList
=
new
ArrayList
<>();
noSalarySocialEstmateList
.
addAll
(
socialEstmateList
);
}
else
{
// TODO - 预估数据
}
}
}
}
if
(
salaryAccountVo
!=
null
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
salaryAccountVo
.
getIsDeductFund
()))
{
if
(
salaryAccountVo
!=
null
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
salaryAccountVo
.
getIsDeductFund
()))
{
...
@@ -427,25 +487,20 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -427,25 +487,20 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
else
{
}
else
{
forecast
.
setProvidentPayMonth
(
SalaryConstants
.
PRIORITY_ZERO
);
//没优先级,则限制住
forecast
.
setProvidentPayMonth
(
SalaryConstants
.
PRIORITY_ZERO
);
//没优先级,则限制住
}
}
R
<
TPaymentVo
>
tPaymentVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
fundType
))
{
,
"/tpaymentinfo/inner/selectTPaymentBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
R
<
TPaymentVo
>
tPaymentVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
if
(
tPaymentVoR
!=
null
&&
tPaymentVoR
.
getData
()
!=
null
&&
tPaymentVoR
.
getData
().
getPaymentList
()
!=
null
)
{
,
"/tpaymentinfo/inner/selectTPaymentBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
fundEstmateList
=
tPaymentVoR
.
getData
().
getPaymentList
();
if
(
tPaymentVoR
!=
null
&&
tPaymentVoR
.
getData
()
!=
null
&&
tPaymentVoR
.
getData
().
getPaymentList
()
!=
null
)
{
// 新增一步:根据同步表里的数据更新获取到的社保缴费库数据
fundEstmateList
=
tPaymentVoR
.
getData
().
getPaymentList
();
if
(
salaryPaymentMap
!=
null
&&
!
salaryPaymentMap
.
isEmpty
())
{
}
MSalaryPaymentRes
res
;
}
for
(
TPaymentBySalaryVo
vo
:
fundEstmateList
)
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
fundType
))
{
res
=
salaryPaymentMap
.
get
(
vo
.
getId
());
// 预估数据
if
(
res
!=
null
)
{
R
<
TPaymentVo
>
tForecastVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
vo
.
setSalarySocialFlag
(
res
.
getSalarySocialFlag
());
,
"/tforecastlibrary/inner/selectTForecastBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
vo
.
setSalaryFundFlag
(
res
.
getSalaryFundFlag
());
if
(
tForecastVoR
!=
null
&&
tForecastVoR
.
getData
()
!=
null
&&
tForecastVoR
.
getData
().
getPaymentList
()
!=
null
)
{
}
fundForecastList
=
tForecastVoR
.
getData
().
getPaymentList
();
}
}
}
noSalaryFundEstmateList
=
new
ArrayList
<>();
noSalaryFundEstmateList
.
addAll
(
fundEstmateList
);
}
else
{
// TODO - 预估数据
}
}
}
}
aList
=
new
ArrayList
<>();
aList
=
new
ArrayList
<>();
...
@@ -454,10 +509,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -454,10 +509,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
boolean
modelPersonFundFlag
;
boolean
modelPersonFundFlag
;
boolean
modelUnitSocialFlag
;
boolean
modelUnitSocialFlag
;
boolean
modelUnitFundFlag
;
boolean
modelUnitFundFlag
;
BigDecimal
money
=
new
BigDecimal
(
CommonConstants
.
ZERO_STRING
)
;
//初始化金额备用
BigDecimal
money
;
//初始化金额备用
Set
<
String
>
socialList
=
new
HashSet
<>();
//社保需要存储的id
Set
<
String
>
socialList
=
new
HashSet
<>();
//社保需要存储的id
Set
<
String
>
fundList
=
new
HashSet
<>();
//公积金需要存储的id
Set
<
String
>
fundList
=
new
HashSet
<>();
//公积金需要存储的id
Set
<
String
>
forecastSocialList
=
new
HashSet
<>();
//预估de社保需要存储的id
Set
<
String
>
forecastFundList
=
new
HashSet
<>();
//预估de公积金需要存储的id
BigDecimal
relaySalary
;
//工资应发
BigDecimal
relaySalary
;
//工资应发
BigDecimal
relaySalarySum
=
BigDecimal
.
ZERO
;
//工资应发
BigDecimal
relaySalarySum
=
BigDecimal
.
ZERO
;
//工资应发
BigDecimal
personalDebt
;
//个人社保、公积金欠款
BigDecimal
personalDebt
;
//个人社保、公积金欠款
...
@@ -497,6 +554,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -497,6 +554,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 年终奖是否已存在 (true:已存在,不可导入)
// 年终奖是否已存在 (true:已存在,不可导入)
boolean
yearEndError
=
false
;
boolean
yearEndError
=
false
;
// 劳务费、稿酬是否含有发薪false:否;true:是
boolean
haveSalaryFlag
=
false
;
// 是否含有特殊金额false:否;true:是
boolean
haveSpecialFlag
=
false
;
// 是否重复金额false:否;true:是
boolean
repeatFlag
=
false
;
// 年终奖错误信息合计:
// 年终奖错误信息合计:
StringBuilder
yearEndInfo
=
new
StringBuilder
();
StringBuilder
yearEndInfo
=
new
StringBuilder
();
List
<
String
>
idCardList
=
new
ArrayList
<>();
List
<
String
>
idCardList
=
new
ArrayList
<>();
...
@@ -529,30 +592,21 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -529,30 +592,21 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
annousSai
=
null
;
annousSai
=
null
;
try
{
try
{
SalaryAccountUtil
.
reflectionAttr
(
savList
.
get
(
i
),
a
);
SalaryAccountUtil
.
reflectionAttr
(
savList
.
get
(
i
),
a
);
if
(!
haveSalaryFlag
&&
a
.
getHaveSalaryFlag
()
!=
null
&&
a
.
getHaveSalaryFlag
()
==
CommonConstants
.
ONE_INT
)
{
haveSalaryFlag
=
true
;
}
if
(!
haveSpecialFlag
&&
a
.
getHaveSpecialFlag
()
!=
null
&&
a
.
getHaveSpecialFlag
()
==
CommonConstants
.
ONE_INT
)
{
haveSpecialFlag
=
true
;
}
if
(!
repeatFlag
&&
a
.
getIsRepeat
()
!=
null
&&
a
.
getIsRepeat
()
==
CommonConstants
.
ONE_INT
)
{
repeatFlag
=
true
;
}
checkYearFinalStyle
=
a
.
getAnnualBonusType
();
checkYearFinalStyle
=
a
.
getAnnualBonusType
();
if
(
Common
.
isNotNull
(
a
.
getTaxMonth
()))
{
if
(
Common
.
isNotNull
(
a
.
getTaxMonth
()))
{
maxYearMonth
=
DateUtil
.
getMaxYearMonth
(
a
.
getTaxMonth
());
maxYearMonth
=
DateUtil
.
getMaxYearMonth
(
a
.
getTaxMonth
());
}
else
if
(!
isLabor
)
{
}
else
if
(!
isLabor
)
{
return
R
.
failed
(
"获取计税月错误"
);
return
R
.
failed
(
"获取计税月错误"
);
}
}
if
(
noSalarySocialEstmateList
!=
null
&&
noSalarySocialEstmateList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
noSalarySocialEstmateListCopy
=
new
ArrayList
<>();
noSalarySocialEstmateListCopy
.
addAll
(
noSalarySocialEstmateList
);
for
(
int
j
=
CommonConstants
.
ZERO_INT
;
j
<
noSalarySocialEstmateListCopy
.
size
();
j
++)
{
if
(
a
.
getEmpIdcard
().
equals
(
noSalarySocialEstmateListCopy
.
get
(
j
).
getEmpIdcard
()))
{
noSalarySocialEstmateList
.
remove
(
noSalarySocialEstmateListCopy
.
get
(
j
));
}
}
}
if
(
noSalaryFundEstmateList
!=
null
&&
noSalaryFundEstmateList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
noSalaryFundEstmateListCopy
=
new
ArrayList
<>();
noSalaryFundEstmateListCopy
.
addAll
(
noSalaryFundEstmateList
);
for
(
int
j
=
CommonConstants
.
ZERO_INT
;
j
<
noSalaryFundEstmateListCopy
.
size
();
j
++)
{
if
(
a
.
getEmpIdcard
().
equals
(
noSalaryFundEstmateListCopy
.
get
(
j
).
getEmpIdcard
()))
{
noSalaryFundEstmateList
.
remove
(
noSalaryFundEstmateListCopy
.
get
(
j
));
}
}
}
if
(
savList
.
get
(
i
).
getSaiList
()
!=
null
&&
!
savList
.
get
(
i
).
getSaiList
().
isEmpty
())
{
if
(
savList
.
get
(
i
).
getSaiList
()
!=
null
&&
!
savList
.
get
(
i
).
getSaiList
().
isEmpty
())
{
saiList
=
new
ArrayList
<>();
saiList
=
new
ArrayList
<>();
annousSai
=
null
;
annousSai
=
null
;
...
@@ -600,30 +654,32 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -600,30 +654,32 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
}
}
if
(
Common
.
isEmpty
(
a
.
getIsDeductSocial
())
||
SalaryConstants
.
IS_DEDUCT_ONE
.
equals
(
a
.
getIsDeductSocial
()))
{
if
(
Common
.
isEmpty
(
a
.
getIsDeductSocial
())
||
SalaryConstants
.
IS_DEDUCT_ONE
.
equals
(
a
.
getIsDeductSocial
()))
{
a
.
setSocialType
(
socialType
);
a
.
setIsDeductSocial
(
SalaryConstants
.
IS_DEDUCT_ONE
);
a
.
setIsDeductSocial
(
SalaryConstants
.
IS_DEDUCT_ONE
);
//社保公积金金额扣缴: true : 从库里扣除社保等;false : 走代扣
//社保公积金金额扣缴: true : 从库里扣除社保等;false : 走代扣
if
(
modelPersonSocialFlag
)
{
if
(
modelPersonSocialFlag
)
{
personalDebt
=
personalDebt
.
add
(
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
PERSONAL_SOCIAL
,
personalDebt
=
personalDebt
.
add
(
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
PERSONAL_SOCIAL
,
SalaryConstants
.
PERSONAL_SOCIAL_JAVA
,
SalaryConstants
.
PERSONAL_SOCIAL_JAVA
,
this
.
getSocialOrFundMoneyForForecast
(
deptSet
,
a
.
getEmpIdcard
(),
socialEstmateList
,
money
,
true
,
true
,
socialList
,
f
undList
),
CommonConstants
.
ONE_INT
));
this
.
getSocialOrFundMoneyForForecast
(
socialType
,
deptSet
,
a
.
getEmpIdcard
(),
socialEstmateList
,
socialForecastList
,
true
,
true
,
socialList
,
fundList
,
forecastSocialList
,
forecastF
undList
),
CommonConstants
.
ONE_INT
));
}
}
if
(
modelUnitSocialFlag
)
{
if
(
modelUnitSocialFlag
)
{
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
UNIT_SOCIAL
,
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
UNIT_SOCIAL
,
SalaryConstants
.
UNIT_SOCIAL_JAVA
,
SalaryConstants
.
UNIT_SOCIAL_JAVA
,
this
.
getSocialOrFundMoneyForForecast
(
deptSet
,
a
.
getEmpIdcard
(),
socialEstmateList
,
money
,
true
,
false
,
socialList
,
f
undList
),
CommonConstants
.
ZERO_INT
);
this
.
getSocialOrFundMoneyForForecast
(
socialType
,
deptSet
,
a
.
getEmpIdcard
(),
socialEstmateList
,
socialForecastList
,
true
,
false
,
socialList
,
fundList
,
forecastSocialList
,
forecastF
undList
),
CommonConstants
.
ZERO_INT
);
}
}
}
}
if
(
Common
.
isEmpty
(
a
.
getIsDeductFund
())
||
SalaryConstants
.
IS_DEDUCT_ONE
.
equals
(
a
.
getIsDeductFund
()))
{
if
(
Common
.
isEmpty
(
a
.
getIsDeductFund
())
||
SalaryConstants
.
IS_DEDUCT_ONE
.
equals
(
a
.
getIsDeductFund
()))
{
a
.
setFundType
(
fundType
);
a
.
setIsDeductFund
(
SalaryConstants
.
IS_DEDUCT_ONE
);
a
.
setIsDeductFund
(
SalaryConstants
.
IS_DEDUCT_ONE
);
if
(
modelPersonFundFlag
)
{
if
(
modelPersonFundFlag
)
{
personalDebt
=
personalDebt
.
add
(
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
PERSONAL_FUND
,
personalDebt
=
personalDebt
.
add
(
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
PERSONAL_FUND
,
SalaryConstants
.
PERSONAL_FUND_JAVA
,
SalaryConstants
.
PERSONAL_FUND_JAVA
,
this
.
getSocialOrFundMoneyForForecast
(
deptSet
,
a
.
getEmpIdcard
(),
fundEstmateList
,
money
,
false
,
true
,
socialList
,
f
undList
),
CommonConstants
.
ONE_INT
));
this
.
getSocialOrFundMoneyForForecast
(
fundType
,
deptSet
,
a
.
getEmpIdcard
(),
fundEstmateList
,
fundForecastList
,
false
,
true
,
socialList
,
fundList
,
forecastSocialList
,
forecastF
undList
),
CommonConstants
.
ONE_INT
));
}
}
if
(
modelUnitFundFlag
)
{
if
(
modelUnitFundFlag
)
{
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
UNIT_FUND
,
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
UNIT_FUND
,
SalaryConstants
.
UNIT_FUND_JAVA
,
SalaryConstants
.
UNIT_FUND_JAVA
,
this
.
getSocialOrFundMoneyForForecast
(
deptSet
,
a
.
getEmpIdcard
(),
fundEstmateList
,
money
,
false
,
false
,
socialList
,
f
undList
),
CommonConstants
.
ZERO_INT
);
this
.
getSocialOrFundMoneyForForecast
(
fundType
,
deptSet
,
a
.
getEmpIdcard
(),
fundEstmateList
,
fundForecastList
,
false
,
false
,
socialList
,
fundList
,
forecastSocialList
,
forecastF
undList
),
CommonConstants
.
ZERO_INT
);
}
}
}
}
}
}
...
@@ -695,7 +751,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -695,7 +751,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
//年终奖优化方案 2:自动计算
//年终奖优化方案 2:自动计算
if
(
CommonConstants
.
TWO_STRING
.
equals
(
checkYearFinalStyle
))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
checkYearFinalStyle
))
{
checkYearFinalStyle
=
checkYearFinalStyle
(
isActual
,
saiList
,
checkYearFinalStyle
,
asList
,
sdSum
checkYearFinalStyle
=
checkYearFinalStyle
(
isActual
,
saiList
,
checkYearFinalStyle
,
asList
,
sdSum
,
costReduction
,
personTax
,
sai
,
saiList
,
relaySalary
,
annualBonus
,
annousTax
);
,
costReduction
,
personTax
,
sai
,
saiList
,
relaySalary
,
annualBonus
,
annousTax
,
a
);
}
}
//年终奖单独扣税
//年终奖单独扣税
if
(
CommonConstants
.
ONE_STRING
.
equals
(
checkYearFinalStyle
))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
checkYearFinalStyle
))
{
...
@@ -713,20 +769,19 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -713,20 +769,19 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
}
}
// 薪资扣税 1:扣税
// 薪资扣税 1:扣税
//if (Common.isNotNull(a.getSalaryTaxFlag()) && CommonConstants.ONE.equals(a.getSalaryTaxFlag())) {
// 应发顺推个税
// 应发顺推个税
if
(!
isActual
)
{
if
(!
isActual
)
{
personalDebt
=
personalDebt
.
add
(
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
SALARY_TAX
,
personalDebt
=
personalDebt
.
add
(
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
SALARY_TAX
,
SalaryConstants
.
SALARY_TAX_JAVA
,
SalaryConstants
.
SALARY_TAX_JAVA
,
calculation2PersonSalary
(
isActual
,
saiList
,
checkYearFinalStyle
,
asList
,
sdSum
calculation2PersonSalary
(
isActual
,
saiList
,
checkYearFinalStyle
,
asList
,
sdSum
,
costReduction
,
personTax
,
sai
,
saiList
,
relaySalary
),
CommonConstants
.
ZERO_INT
));
,
costReduction
,
personTax
,
sai
,
saiList
,
relaySalary
,
a
),
CommonConstants
.
ZERO_INT
));
}
else
{
}
else
{
// 实发倒推个税应发
// 实发倒推个税应发
if
(!
isLabor
)
{
if
(!
isLabor
)
{
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
SALARY_TAX
,
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
SALARY_TAX
,
SalaryConstants
.
SALARY_TAX_JAVA
,
SalaryConstants
.
SALARY_TAX_JAVA
,
calculation2PersonSalary
(
isActual
,
saiList
,
checkYearFinalStyle
,
asList
,
sdSum
calculation2PersonSalary
(
isActual
,
saiList
,
checkYearFinalStyle
,
asList
,
sdSum
,
costReduction
,
personTax
,
sai
,
saiList
,
relaySalary
),
CommonConstants
.
ZERO_INT
);
,
costReduction
,
personTax
,
sai
,
saiList
,
relaySalary
,
a
),
CommonConstants
.
ZERO_INT
);
}
else
{
}
else
{
// 实发劳务费,按月累计扣税 2022-3-2 17:32:40 樊青青提的需求
// 实发劳务费,按月累计扣税 2022-3-2 17:32:40 樊青青提的需求
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
SALARY_TAX
,
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
SALARY_TAX
,
...
@@ -734,9 +789,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -734,9 +789,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
calculation2Labor
(
saiList
,
asList
calculation2Labor
(
saiList
,
asList
,
saiList
),
CommonConstants
.
ZERO_INT
);
,
saiList
),
CommonConstants
.
ZERO_INT
);
}
}
}
}
//}
if
(!
isActual
)
{
//导入应发,顺推实发
if
(!
isActual
)
{
//导入应发,顺推实发
// 个人实发合计
// 个人实发合计
...
@@ -762,88 +815,94 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -762,88 +815,94 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary
.
setOwnMoney
(
ownMoney
);
salary
.
setOwnMoney
(
ownMoney
);
TSalaryDetailVo
salaryDetailVo
=
new
TSalaryDetailVo
();
TSalaryDetailVo
salaryDetailVo
=
new
TSalaryDetailVo
();
salaryDetailVo
.
setSalaryAccountList
(
aList
);
salaryDetailVo
.
setSalaryAccountList
(
aList
);
// 版本2.7.3.3 2022-1-13 20:54:34 洪光武变更:不同步缴费库,改为存放在同步表,定时任务更新(或社保服务变更缴费库时更新)
/*String str = SalaryCommonUtil.setToStrEasy(socialList);
if (Common.isNotNull(str)) {
//更新社保状态为-待结算
R<String> socialR = archivesProperties.updatePaymentSocialStatusByIdStr(str, CommonConstants.ONE, SecurityConstants.FROM_IN);
if (socialR == null || socialR.getCode() != CommonConstants.SUCCESS) {
throw new RuntimeException((null == socialR ? "调用社保同步结算中状态服务异常,请重试!" : socialR.getMsg()));
}
}
str = SalaryCommonUtil.setToStrEasy(fundList);
if (Common.isNotNull(str)) {
//更新公积金状态为-待结算
R<String> fundR = archivesProperties.updatePaymentFundStatusByIdStr(str, CommonConstants.ONE, SecurityConstants.FROM_IN);
if (fundR == null || fundR.getCode() != CommonConstants.SUCCESS) {
throw new RuntimeException((null == fundR ? "调用公积金同步结算中状态服务异常,请重试!" : fundR.getMsg()));
}
}*/
salary
.
setSettlementAmount
(
relaySalarySum
);
salary
.
setSettlementAmount
(
relaySalarySum
);
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
salary
.
setStatus
(
SalaryConstants
.
AUDIT_STATUS
[
0
]);
if
(
haveSalaryFlag
||
haveSpecialFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
)
{
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
}
if
(
haveSpecialFlag
)
{
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ONE_INT
);
}
if
(
repeatFlag
)
{
salary
.
setIsRepeat
(
CommonConstants
.
ONE_INT
);
}
}
if
(!
socialList
.
isEmpty
())
{
//更新社保状态为-已结算
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tpaymentinfo/inner/updatePaymentSocialStatusToSettle"
,
socialList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
}
if
(!
fundList
.
isEmpty
())
{
//更新公积金状态为-已结算
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tpaymentinfo/inner/updatePaymentFundStatusToSettle"
,
fundList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
}
if
(!
forecastSocialList
.
isEmpty
())
{
//更新社保状态为-已结算
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tforecastlibrary/inner/updateForecastSocialStatusToSettle"
,
forecastSocialList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
}
if
(!
forecastFundList
.
isEmpty
())
{
//更新公积金状态为-已结算
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tforecastlibrary/inner/updateForecastFundStatusToSettle"
,
forecastFundList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
}
//保存工资表
//保存工资表
tSalaryStandardService
.
save
(
salary
);
tSalaryStandardService
.
save
(
salary
);
// 获取上一个工资条顺序,复制:
// 获取上一个工资条顺序,复制:
tSalaryStandardSetService
.
copyLastSetByDeptId
(
salary
.
getId
(),
dept
.
getId
(),
String
.
valueOf
(
user
.
getId
()));
tSalaryStandardSetService
.
copyLastSetByDeptId
(
salary
.
getId
(),
dept
.
getId
(),
String
.
valueOf
(
user
.
getId
()));
// 保存后,修改结算预警统计中的结算状态
List
<
String
>
deptIdList
=
new
ArrayList
<>();
deptIdList
.
add
(
dept
.
getId
());
salaryDetailVo
.
setSalary
(
salary
);
salaryDetailVo
.
setSalary
(
salary
);
MSalaryEstimate
se
;
MSalaryEstimate
se
;
// 新增一步:增加同步表
// 新增一步:增加同步表
MSalaryPaymentRes
res
;
if
(!
socialList
.
isEmpty
())
{
Map
<
String
,
MSalaryPaymentRes
>
saveResMap
=
new
HashMap
<>();
if
(
socialList
!=
null
&&
!
socialList
.
isEmpty
())
{
for
(
String
estId
:
socialList
)
{
for
(
String
estId
:
socialList
)
{
se
=
new
MSalaryEstimate
();
se
=
new
MSalaryEstimate
();
se
.
setSalaryId
(
salary
.
getId
());
se
.
setSalaryId
(
salary
.
getId
());
se
.
setEstimateId
(
estId
);
se
.
setEstimateId
(
estId
);
se
.
setIsSocial
(
SalaryConstants
.
IS_SOCIAL_ZERO
);
se
.
setIsSocial
(
SalaryConstants
.
IS_SOCIAL_ZERO
);
se
.
setIsNoSalary
(
SalaryConstants
.
NOT_IS_NO_SALARY_ZERO
);
se
.
setIsNoSalary
(
SalaryConstants
.
NOT_IS_NO_SALARY_ZERO
);
se
.
setType
(
CommonConstants
.
ZERO_INT
);
mSalaryEstimateService
.
save
(
se
);
mSalaryEstimateService
.
save
(
se
);
res
=
salaryPaymentMap
.
get
(
estId
);
if
(
res
==
null
)
{
res
=
new
MSalaryPaymentRes
();
res
.
setId
(
estId
);
res
.
setDeptId
(
dept
.
getId
());
}
res
.
setSalarySocialFlag
(
CommonConstants
.
ONE_STRING
);
saveResMap
.
put
(
estId
,
res
);
}
}
}
}
if
(
fundList
!=
null
&&
!
fundList
.
isEmpty
())
{
if
(!
fundList
.
isEmpty
())
{
for
(
String
estId
:
fundList
)
{
for
(
String
estId
:
fundList
)
{
se
=
new
MSalaryEstimate
();
se
=
new
MSalaryEstimate
();
se
.
setSalaryId
(
salary
.
getId
());
se
.
setSalaryId
(
salary
.
getId
());
se
.
setEstimateId
(
estId
);
se
.
setEstimateId
(
estId
);
se
.
setIsSocial
(
SalaryConstants
.
IS_FUND_ONE
);
se
.
setIsSocial
(
SalaryConstants
.
IS_FUND_ONE
);
se
.
setIsNoSalary
(
SalaryConstants
.
NOT_IS_NO_SALARY_ZERO
);
se
.
setIsNoSalary
(
SalaryConstants
.
NOT_IS_NO_SALARY_ZERO
);
se
.
setType
(
CommonConstants
.
ZERO_INT
);
mSalaryEstimateService
.
save
(
se
);
}
}
if
(!
forecastSocialList
.
isEmpty
())
{
for
(
String
estId
:
forecastSocialList
)
{
se
=
new
MSalaryEstimate
();
se
.
setSalaryId
(
salary
.
getId
());
se
.
setEstimateId
(
estId
);
se
.
setIsSocial
(
SalaryConstants
.
IS_SOCIAL_ZERO
);
se
.
setIsNoSalary
(
SalaryConstants
.
NOT_IS_NO_SALARY_ZERO
);
se
.
setType
(
CommonConstants
.
ONE_INT
);
mSalaryEstimateService
.
save
(
se
);
mSalaryEstimateService
.
save
(
se
);
res
=
saveResMap
.
get
(
estId
);
if
(
res
==
null
)
{
res
=
salaryPaymentMap
.
get
(
estId
);
}
if
(
res
==
null
)
{
res
=
new
MSalaryPaymentRes
();
res
.
setId
(
estId
);
res
.
setDeptId
(
dept
.
getId
());
}
res
.
setSalaryFundFlag
(
CommonConstants
.
ONE_STRING
);
saveResMap
.
put
(
estId
,
res
);
}
}
}
}
// 开始更新res
if
(!
forecastFundList
.
isEmpty
())
{
if
(
saveResMap
!=
null
&&
!
saveResMap
.
isEmpty
())
{
for
(
String
estId
:
forecastFundList
)
{
Iterator
<
MSalaryPaymentRes
>
iter
=
saveResMap
.
values
().
iterator
();
se
=
new
MSalaryEstimate
();
while
(
iter
.
hasNext
())
{
se
.
setSalaryId
(
salary
.
getId
());
res
=
iter
.
next
();
se
.
setEstimateId
(
estId
);
salaryPaymentResService
.
saveOrUpdate
(
res
);
se
.
setIsSocial
(
SalaryConstants
.
IS_FUND_ONE
);
se
.
setIsNoSalary
(
SalaryConstants
.
NOT_IS_NO_SALARY_ZERO
);
se
.
setType
(
CommonConstants
.
ONE_INT
);
mSalaryEstimateService
.
save
(
se
);
}
}
}
}
TPauseSalary
ps
;
TPauseSalary
ps
;
...
@@ -896,7 +955,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -896,7 +955,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
List
<
TSalaryAccountItem
>
backList
=
new
ArrayList
<>();
List
<
TSalaryAccountItem
>
backList
=
new
ArrayList
<>();
if
(
itemList
!=
null
&&
!
itemList
.
isEmpty
())
{
if
(
itemList
!=
null
&&
!
itemList
.
isEmpty
())
{
for
(
TSalaryAccountItem
item
:
itemList
)
{
for
(
TSalaryAccountItem
item
:
itemList
)
{
if
(!
"3"
.
equals
(
item
.
get
Salary
Type
())
&&
Integer
.
parseInt
(
item
.
getSettlementMonth
())
>=
maxYearMonth
)
{
if
(!
"3"
.
equals
(
item
.
get
Form
Type
())
&&
Integer
.
parseInt
(
item
.
getSettlementMonth
())
>=
maxYearMonth
)
{
backList
.
add
(
item
);
backList
.
add
(
item
);
}
}
}
}
...
@@ -916,7 +975,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -916,7 +975,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
List
<
TSalaryAccountItem
>
backList
=
new
ArrayList
<>();
List
<
TSalaryAccountItem
>
backList
=
new
ArrayList
<>();
if
(
itemList
!=
null
&&
!
itemList
.
isEmpty
())
{
if
(
itemList
!=
null
&&
!
itemList
.
isEmpty
())
{
for
(
TSalaryAccountItem
item
:
itemList
)
{
for
(
TSalaryAccountItem
item
:
itemList
)
{
if
(
"3"
.
equals
(
item
.
get
Salary
Type
())
&&
settleMonth
.
equals
(
item
.
getSettlementMonth
()))
{
if
(
"3"
.
equals
(
item
.
get
Form
Type
())
&&
settleMonth
.
equals
(
item
.
getSettlementMonth
()))
{
backList
.
add
(
item
);
backList
.
add
(
item
);
}
}
}
}
...
@@ -1025,7 +1084,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1025,7 +1084,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
/**
/**
* @param estmateList 预估库数据列表
* @param estmateList 预估库数据列表
* @param idNumber 身份证
* @param idNumber 身份证
* @param money 金额
* @param isSocial true:社保 false:公积金
* @param isSocial true:社保 false:公积金
* @param isPerson true:个人 false:单位
* @param isPerson true:个人 false:单位
* @param socialList 预估库id,社保list
* @param socialList 预估库id,社保list
...
@@ -1035,53 +1093,66 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1035,53 +1093,66 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2019/9/26 15:38
* @Date: 2019/9/26 15:38
* @return: java.math.BigDecimal
* @return: java.math.BigDecimal
**/
**/
public
BigDecimal
getSocialOrFundMoneyForForecast
(
TDepartSettlementInfo
deptSet
,
String
idNumber
public
BigDecimal
getSocialOrFundMoneyForForecast
(
String
socialFundType
,
TDepartSettlementInfo
deptSet
,
String
idNumber
,
List
<
TPaymentBySalaryVo
>
estmateList
,
BigDecimal
money
,
boolean
isSocial
,
boolean
isPerson
,
List
<
TPaymentBySalaryVo
>
estmateList
,
List
<
TPaymentBySalaryVo
>
forecastList
,
boolean
isSocial
,
boolean
isPerson
,
Set
<
String
>
socialList
,
Set
<
String
>
fundList
)
{
,
Set
<
String
>
socialList
,
Set
<
String
>
fundList
,
Set
<
String
>
forecastSocialList
,
Set
<
String
>
forecastFundList
)
{
money
=
SalaryConstants
.
B_ZERO
;
BigDecimal
money
=
SalaryConstants
.
B_ZERO
;
BigDecimal
sub
=
SalaryConstants
.
B_ZERO
;
BigDecimal
sub
=
SalaryConstants
.
B_ZERO
;
if
(
isSocial
)
{
if
(
isSocial
&&
deptSet
.
getUnitSeriousIllnessProp
()
!=
null
if
(
deptSet
.
getUnitSeriousIllnessProp
()
!=
null
&&
deptSet
.
getUnitSeriousIllnessProp
().
compareTo
(
SalaryConstants
.
B_ONEHUNDRED
)
==
SalaryConstants
.
LESS_THAN
)
{
&&
deptSet
.
getUnitSeriousIllnessProp
().
compareTo
(
SalaryConstants
.
B_ONEHUNDRED
)
==
SalaryConstants
.
LESS_THAN
)
{
sub
=
(
new
BigDecimal
(
"100"
).
subtract
(
deptSet
.
getUnitSeriousIllnessProp
()))
sub
=
(
new
BigDecimal
(
"100"
).
subtract
(
deptSet
.
getUnitSeriousIllnessProp
()))
.
divide
(
SalaryConstants
.
B_ONEHUNDRED
,
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
.
divide
(
SalaryConstants
.
B_ONEHUNDRED
,
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
}
//sub = sub.divide(SalaryConstants.B_ONEHUNDRED, SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP)
}
}
if
(
estmateList
!=
null
&&
estmateList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
socialFundType
)
&&
estmateList
!=
null
&&
!
estmateList
.
isEmpty
())
{
money
=
money
.
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
money
=
this
.
getSocialFundMoney
(
idNumber
,
estmateList
,
isSocial
,
isPerson
,
socialList
,
fundList
,
money
,
sub
);
for
(
TPaymentBySalaryVo
m
:
estmateList
)
{
}
if
(
Common
.
isNotNull
(
idNumber
)
&&
idNumber
.
equals
(
m
.
getEmpIdcard
()))
{
// 缴费库没找到,从预估库找
//社保
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundType
)
&&
forecastList
!=
null
&&
!
forecastList
.
isEmpty
())
{
if
(
isSocial
&&
(!
Common
.
isNotNull
(
m
.
getSalarySocialFlag
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
m
.
getSalarySocialFlag
()))
money
=
this
.
getSocialFundMoney
(
idNumber
,
forecastList
,
isSocial
,
isPerson
,
forecastSocialList
,
forecastFundList
,
money
,
sub
);
&&
(
m
.
getPersonalSocialSum
()
!=
null
||
m
.
getUnitSocialSum
()
!=
null
))
{
}
if
(
isPerson
&&
m
.
getPersonalSocialSum
()
!=
null
)
{
return
money
;
money
=
money
.
add
(
m
.
getPersonalSocialSum
());
}
if
(
sub
.
compareTo
(
SalaryConstants
.
B_ZERO
)
!=
SalaryConstants
.
EQUAL
&&
m
.
getUnitBitmailmentFee
()
!=
null
)
{
/**
money
=
money
.
add
(
m
.
getUnitBitmailmentFee
().
multiply
(
sub
));
* @Description: 按类型拉取社保公积金
}
* @Author: hgw
}
* @Date: 2022/8/17 11:38
if
(!
isPerson
&&
m
.
getUnitSocialSum
()
!=
null
)
{
* @return: java.math.BigDecimal
money
=
money
.
add
(
m
.
getUnitSocialSum
());
**/
if
(
sub
.
compareTo
(
SalaryConstants
.
B_ZERO
)
!=
SalaryConstants
.
EQUAL
private
BigDecimal
getSocialFundMoney
(
String
idNumber
,
List
<
TPaymentBySalaryVo
>
estmateList
,
boolean
isSocial
&&
m
.
getUnitBitmailmentFee
()
!=
null
)
{
,
boolean
isPerson
,
Set
<
String
>
socialList
,
Set
<
String
>
fundList
,
BigDecimal
money
,
BigDecimal
sub
)
{
money
=
money
.
subtract
(
m
.
getUnitBitmailmentFee
().
multiply
(
sub
));
money
=
money
.
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
}
for
(
TPaymentBySalaryVo
m
:
estmateList
)
{
if
(
Common
.
isNotNull
(
idNumber
)
&&
idNumber
.
equals
(
m
.
getEmpIdcard
()))
{
//社保
if
(
isSocial
&&
(!
Common
.
isNotNull
(
m
.
getSalarySocialFlag
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
m
.
getSalarySocialFlag
()))
&&
(
m
.
getPersonalSocialSum
()
!=
null
||
m
.
getUnitSocialSum
()
!=
null
))
{
if
(
isPerson
&&
m
.
getPersonalSocialSum
()
!=
null
)
{
money
=
money
.
add
(
m
.
getPersonalSocialSum
());
if
(
sub
.
compareTo
(
SalaryConstants
.
B_ZERO
)
!=
SalaryConstants
.
EQUAL
&&
m
.
getUnitBitmailmentFee
()
!=
null
)
{
money
=
money
.
add
(
m
.
getUnitBitmailmentFee
().
multiply
(
sub
));
}
}
socialList
.
add
(
m
.
getId
());
}
}
//公积金
if
(!
isPerson
&&
m
.
getUnitSocialSum
()
!=
null
)
{
if
(!
isSocial
&&
(!
Common
.
isNotNull
(
m
.
getSalaryFundFlag
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
m
.
getSalaryFundFlag
()))
money
=
money
.
add
(
m
.
getUnitSocialSum
());
&&
(
m
.
getPersonalFundSum
()
!=
null
||
m
.
getUnitFundSum
()
!=
null
))
{
if
(
sub
.
compareTo
(
SalaryConstants
.
B_ZERO
)
!=
SalaryConstants
.
EQUAL
if
(
isPerson
&&
m
.
getPersonalFundSum
()
!=
null
)
{
&&
m
.
getUnitBitmailmentFee
()
!=
null
)
{
money
=
money
.
add
(
m
.
getPersonalFundSum
());
money
=
money
.
subtract
(
m
.
getUnitBitmailmentFee
().
multiply
(
sub
));
}
if
(!
isPerson
&&
m
.
getUnitFundSum
()
!=
null
)
{
money
=
money
.
add
(
m
.
getUnitFundSum
());
}
}
fundList
.
add
(
m
.
getId
());
}
}
socialList
.
add
(
m
.
getId
());
}
//公积金
if
(!
isSocial
&&
(!
Common
.
isNotNull
(
m
.
getSalaryFundFlag
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
m
.
getSalaryFundFlag
()))
&&
(
m
.
getPersonalFundSum
()
!=
null
||
m
.
getUnitFundSum
()
!=
null
))
{
if
(
isPerson
&&
m
.
getPersonalFundSum
()
!=
null
)
{
money
=
money
.
add
(
m
.
getPersonalFundSum
());
}
if
(!
isPerson
&&
m
.
getUnitFundSum
()
!=
null
)
{
money
=
money
.
add
(
m
.
getUnitFundSum
());
}
fundList
.
add
(
m
.
getId
());
}
}
}
}
}
}
...
@@ -1147,7 +1218,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1147,7 +1218,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
private
static
BigDecimal
calculation2PersonSalary
(
boolean
isActual
,
List
<
TSalaryAccountItem
>
itemList
private
static
BigDecimal
calculation2PersonSalary
(
boolean
isActual
,
List
<
TSalaryAccountItem
>
itemList
,
String
checkYearFinalStyle
,
List
<
TSalaryAccountItem
>
itemHistoryList
,
BigDecimal
specialDeductionSum
,
String
checkYearFinalStyle
,
List
<
TSalaryAccountItem
>
itemHistoryList
,
BigDecimal
specialDeductionSum
,
BigDecimal
costReduction
,
List
<
TSalaryTaxConfig
>
subs
,
TSalaryAccountItem
sai
,
BigDecimal
costReduction
,
List
<
TSalaryTaxConfig
>
subs
,
TSalaryAccountItem
sai
,
List
<
TSalaryAccountItem
>
saiList
,
BigDecimal
relaySalary
)
{
,
List
<
TSalaryAccountItem
>
saiList
,
BigDecimal
relaySalary
,
TSalaryAccount
a
)
{
//本次纳税额
//本次纳税额
BigDecimal
res
=
SalaryConstants
.
B_ZERO
;
BigDecimal
res
=
SalaryConstants
.
B_ZERO
;
BigDecimal
annualBonus
=
SalaryConstants
.
B_ZERO
;
BigDecimal
annualBonus
=
SalaryConstants
.
B_ZERO
;
...
@@ -1168,9 +1239,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1168,9 +1239,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
realDeduSalary
=
realDeduSalary
.
add
(
item
.
getSalaryMoney
());
realDeduSalary
=
realDeduSalary
.
add
(
item
.
getSalaryMoney
());
actualSalarySumNow
=
actualSalarySumNow
.
add
(
item
.
getSalaryMoney
());
actualSalarySumNow
=
actualSalarySumNow
.
add
(
item
.
getSalaryMoney
());
}
}
/*if (SalaryConstants.ANNUAL_BONUS_TAX_JAVA.equals(item.getJavaFiedName())) {
sumTax = sumTax.add(item.getSalaryMoney());
}*/
if
(
CommonConstants
.
ONE_INT
==
item
.
getIsTax
())
{
if
(
CommonConstants
.
ONE_INT
==
item
.
getIsTax
())
{
res
=
res
.
subtract
(
item
.
getSalaryMoney
());
res
=
res
.
subtract
(
item
.
getSalaryMoney
());
realDeduSalary
=
realDeduSalary
.
subtract
(
item
.
getSalaryMoney
());
realDeduSalary
=
realDeduSalary
.
subtract
(
item
.
getSalaryMoney
());
...
@@ -1186,9 +1254,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1186,9 +1254,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(
SalaryConstants
.
SALARY_TAX_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
if
(
SalaryConstants
.
SALARY_TAX_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
sumTax
=
sumTax
.
add
(
item
.
getSalaryMoney
());
sumTax
=
sumTax
.
add
(
item
.
getSalaryMoney
());
}
}
/*if (SalaryConstants.ANNUAL_BONUS_TAX_JAVA.equals(item.getJavaFiedName())) {
sumTax = sumTax.add(item.getSalaryMoney());
}*/
if
(
SalaryConstants
.
RELAY_SALARY_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
if
(
SalaryConstants
.
RELAY_SALARY_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
res
=
res
.
add
(
item
.
getSalaryMoney
());
res
=
res
.
add
(
item
.
getSalaryMoney
());
realSalaryHistory
=
realSalaryHistory
.
add
(
item
.
getSalaryMoney
());
realSalaryHistory
=
realSalaryHistory
.
add
(
item
.
getSalaryMoney
());
...
@@ -1204,18 +1269,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1204,18 +1269,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(
specialDeductionSum
!=
null
)
{
if
(
specialDeductionSum
!=
null
)
{
res
=
res
.
subtract
(
specialDeductionSum
);
res
=
res
.
subtract
(
specialDeductionSum
);
realDeduSalary
=
realDeduSalary
.
subtract
(
specialDeductionSum
);
realDeduSalary
=
realDeduSalary
.
subtract
(
specialDeductionSum
);
//addRelaySalary = addRelaySalary.add(specialDeductionSum);
}
}
if
(
costReduction
!=
null
)
{
if
(
costReduction
!=
null
)
{
res
=
res
.
subtract
(
costReduction
);
res
=
res
.
subtract
(
costReduction
);
realDeduSalary
=
realDeduSalary
.
subtract
(
costReduction
);
realDeduSalary
=
realDeduSalary
.
subtract
(
costReduction
);
addRelaySalary
=
addRelaySalary
.
add
(
costReduction
);
addRelaySalary
=
addRelaySalary
.
add
(
costReduction
);
}
}
//不合并年终奖扣税
/*if (CommonConstants.ONE.equals(checkYearFinalStyle)) {
res = res.subtract(annualBonus);
addRelaySalary = addRelaySalary.add(annualBonus);
}*/
if
(!
isActual
)
{
if
(!
isActual
)
{
for
(
TSalaryTaxConfig
sub
:
subs
)
{
for
(
TSalaryTaxConfig
sub
:
subs
)
{
if
(
res
.
compareTo
(
sub
.
getMinIncome
())
==
SalaryConstants
.
MORE_THAN
if
(
res
.
compareTo
(
sub
.
getMinIncome
())
==
SalaryConstants
.
MORE_THAN
...
@@ -1238,7 +1297,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1238,7 +1297,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
for
(
TSalaryTaxConfig
sub
:
subs
)
{
for
(
TSalaryTaxConfig
sub
:
subs
)
{
//res = realDeduSalary / (1- (double) ((sub.getTaxRate() * 1.0) / 100))
//res = realDeduSalary / (1- (double) ((sub.getTaxRate() * 1.0) / 100))
// - (sub.getQuick()/ (1- (double) ((sub.getTaxRate() * 1.0) / 100)))
// - (sub.getQuick()/ (1- (double) ((sub.getTaxRate() * 1.0) / 100)))
// + addRelaySalary
;
// + addRelaySalary
res
=
realDeduSalary
.
divide
(
new
BigDecimal
(
"1"
).
subtract
(
new
BigDecimal
(
sub
.
getWithholdingRate
()).
divide
(
res
=
realDeduSalary
.
divide
(
new
BigDecimal
(
"1"
).
subtract
(
new
BigDecimal
(
sub
.
getWithholdingRate
()).
divide
(
SalaryConstants
.
B_ONEHUNDRED
,
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
)),
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
)
SalaryConstants
.
B_ONEHUNDRED
,
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
)),
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
)
.
subtract
(
sub
.
getQuickDeducation
().
divide
(
new
BigDecimal
(
"1"
).
subtract
(
new
BigDecimal
(
sub
.
getWithholdingRate
()).
divide
(
.
subtract
(
sub
.
getQuickDeducation
().
divide
(
new
BigDecimal
(
"1"
).
subtract
(
new
BigDecimal
(
sub
.
getWithholdingRate
()).
divide
(
...
@@ -1260,8 +1319,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1260,8 +1319,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
sai
.
setIsTax
(
CommonConstants
.
ZERO_INT
);
sai
.
setIsTax
(
CommonConstants
.
ZERO_INT
);
if
(
res
.
compareTo
(
SalaryConstants
.
B_ZERO
)
!=
SalaryConstants
.
MORE_THAN
)
{
if
(
res
.
compareTo
(
SalaryConstants
.
B_ZERO
)
!=
SalaryConstants
.
MORE_THAN
)
{
sai
.
setSalaryMoney
(
actualSalarySumNow
);
sai
.
setSalaryMoney
(
actualSalarySumNow
);
a
.
setRelaySalary
(
actualSalarySumNow
);
}
else
{
}
else
{
sai
.
setSalaryMoney
(
relaySalary
);
sai
.
setSalaryMoney
(
relaySalary
);
a
.
setRelaySalary
(
relaySalary
);
}
}
saiList
.
add
(
sai
);
saiList
.
add
(
sai
);
break
;
break
;
...
@@ -1271,7 +1332,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1271,7 +1332,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(
res
.
compareTo
(
SalaryConstants
.
B_ZERO
)
==
SalaryConstants
.
LESS_THAN
)
{
if
(
res
.
compareTo
(
SalaryConstants
.
B_ZERO
)
==
SalaryConstants
.
LESS_THAN
)
{
return
SalaryConstants
.
B_ZERO
;
return
SalaryConstants
.
B_ZERO
;
}
}
return
res
.
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
res
=
res
.
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
a
.
setSalaryTax
(
res
);
return
res
;
}
}
...
@@ -1359,9 +1422,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1359,9 +1422,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
public
static
String
checkYearFinalStyle
(
boolean
isActual
,
List
<
TSalaryAccountItem
>
itemList
public
static
String
checkYearFinalStyle
(
boolean
isActual
,
List
<
TSalaryAccountItem
>
itemList
,
String
checkYearFinalStyle
,
List
<
TSalaryAccountItem
>
asList
,
BigDecimal
sdSum
,
String
checkYearFinalStyle
,
List
<
TSalaryAccountItem
>
asList
,
BigDecimal
sdSum
,
BigDecimal
costReduction
,
List
<
TSalaryTaxConfig
>
personTax
,
TSalaryAccountItem
sai
,
BigDecimal
costReduction
,
List
<
TSalaryTaxConfig
>
personTax
,
TSalaryAccountItem
sai
,
List
<
TSalaryAccountItem
>
saiList
,
BigDecimal
relaySalary
,
BigDecimal
annualBonus
,
List
<
TSalaryTaxConfig
>
annousTax
)
{
,
List
<
TSalaryAccountItem
>
saiList
,
BigDecimal
relaySalary
,
BigDecimal
annualBonus
,
List
<
TSalaryTaxConfig
>
annousTax
,
TSalaryAccount
a
)
{
BigDecimal
finalSalaryWithSalary
=
calculation2PersonSalary
(
isActual
,
saiList
,
checkYearFinalStyle
,
asList
,
sdSum
BigDecimal
finalSalaryWithSalary
=
calculation2PersonSalary
(
isActual
,
saiList
,
checkYearFinalStyle
,
asList
,
sdSum
,
costReduction
,
personTax
,
sai
,
saiList
,
relaySalary
);
,
costReduction
,
personTax
,
sai
,
saiList
,
relaySalary
,
a
);
BigDecimal
finalSalaryNoSalary
=
calculation2FinalSalary
(
annualBonus
,
annousTax
);
BigDecimal
finalSalaryNoSalary
=
calculation2FinalSalary
(
annualBonus
,
annousTax
);
if
(
finalSalaryWithSalary
.
compareTo
(
finalSalaryNoSalary
)
==
SalaryConstants
.
MORE_THAN
)
{
if
(
finalSalaryWithSalary
.
compareTo
(
finalSalaryNoSalary
)
==
SalaryConstants
.
MORE_THAN
)
{
return
"1"
;
return
"1"
;
...
@@ -1415,4 +1479,316 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1415,4 +1479,316 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
return
new
R
<>(
salaryDetailVo
);
return
new
R
<>(
salaryDetailVo
);
}
}
/**
* @param savList 报账表Vo
* @Description: 保存并提交
* @Author: huyc
* @Date: 2022/8/16
* @return: com.yifu.cloud.v1.common.core.util.R
**/
public
R
saveLaborSubmit
(
List
<
TSalaryAccountVo
>
savList
,
TSettleDomainSelectVo
dept
)
{
if
(
Common
.
isNotNull
(
savList
)
&&
!
savList
.
isEmpty
())
{
TSalaryAccountVo
salaryAccountVo
=
savList
.
get
(
0
);
List
<
TSalaryAccountItem
>
saiList
=
null
;
//报账明细List
TSalaryAccountItem
sai
=
null
;
//报账明细
YifuUser
user
=
SecurityUtils
.
getUser
();
TSalaryStandard
salary
;
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
//工资主表
R
<
TSalaryStandard
>
sr
=
this
.
saveNewTSalary
(
salaryAccountVo
,
dept
,
user
,
nowTime
);
String
invoiceTitle
=
dept
.
getBusinessSubjectName
();
if
(
sr
==
null
||
sr
.
getCode
()
==
CommonConstants
.
FAIL
)
{
return
sr
;
}
else
{
salary
=
sr
.
getData
();
}
boolean
isActual
=
false
;
//false:应发导入; true:实发 倒推导入
List
<
TSalaryAccountItemVo
>
itemList
=
salaryAccountVo
.
getSaiList
();
for
(
TSalaryAccountItemVo
item
:
itemList
)
{
if
(
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
isActual
=
true
;
break
;
}
}
if
(
salary
!=
null
)
{
// 薪资导入、删除前加锁:
TSalaryLock
lock
=
salaryLockService
.
lambdaQuery
()
.
eq
(
TSalaryLock:
:
getDeptId
,
dept
.
getId
())
.
eq
(
TSalaryLock:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
"limit 1"
).
one
();
if
(
lock
!=
null
&&
Common
.
isNotNull
(
lock
.
getId
()))
{
return
R
.
failed
(
"当前结算主体已被用户锁定,请稍等!超过10分钟还没释放,请联系管理员!当前时间:"
+
nowTime
);
}
else
{
lock
=
new
TSalaryLock
();
lock
.
setCreateTime
(
nowTime
);
lock
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
lock
.
setDeptId
(
dept
.
getId
());
lock
.
setDeptName
(
dept
.
getDepartName
());
lock
.
setSettleMonth
(
salaryAccountVo
.
getSettlementMonth
());
lock
.
setType
(
CommonConstants
.
ZERO_INT
);
salaryLockService
.
save
(
lock
);
TSalaryLock
lockUpdate
;
try
{
// 薪资核心导入代码
return
this
.
doLaborCoreSalary
(
savList
,
salaryAccountVo
,
saiList
,
sai
,
dept
,
invoiceTitle
,
user
,
nowTime
,
salary
,
isActual
);
}
catch
(
Exception
e
)
{
lockUpdate
=
new
TSalaryLock
();
lockUpdate
.
setId
(
lock
.
getId
());
lockUpdate
.
setDeleteFlag
(
CommonConstants
.
ONE_INT
);
salaryLockService
.
updateById
(
lockUpdate
);
throw
new
RuntimeException
(
e
.
getMessage
()
==
null
?
"薪资导入失败!"
:
e
.
getMessage
());
}
finally
{
lockUpdate
=
new
TSalaryLock
();
lockUpdate
.
setId
(
lock
.
getId
());
lockUpdate
.
setDeleteFlag
(
CommonConstants
.
ONE_INT
);
if
(
Common
.
isNotNull
(
salary
.
getId
()))
{
lockUpdate
.
setSalaryId
(
salary
.
getId
());
lockUpdate
.
setSettleMoney
(
salary
.
getSettlementAmount
());
}
salaryLockService
.
updateById
(
lockUpdate
);
}
}
}
else
{
return
R
.
failed
(
"新建工资主表失败"
);
}
}
return
R
.
failed
(
"提交的数据不可为空"
);
}
/**
* @Description: 劳务费导入核心代码
* @Author: huyc
* @return: com.yifu.cloud.v1.common.core.util.R
**/
public
R
doLaborCoreSalary
(
List
<
TSalaryAccountVo
>
savList
,
TSalaryAccountVo
salaryAccountVo
,
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccountItem
sai
,
TSettleDomainSelectVo
dept
,
String
invoiceTitle
,
YifuUser
user
,
LocalDateTime
nowTime
,
TSalaryStandard
salary
,
boolean
isActual
)
{
List
<
TSalaryAccount
>
aList
=
new
ArrayList
<>();
TSalaryAccount
a
;
//定库:
BigDecimal
money
=
new
BigDecimal
(
CommonConstants
.
ZERO_STRING
);
//初始化金额备用
BigDecimal
relaySalarySum
=
BigDecimal
.
ZERO
;
//工资应发
List
<
TSalaryAccountItem
>
asList
;
//累计扣税
// 历史个税合计
BigDecimal
sumTax
=
BigDecimal
.
ZERO
;
int
size
=
savList
.
size
();
// 自有员工人数
int
ownNum
=
0
;
// 自有员工应发金额
BigDecimal
ownMoney
=
BigDecimal
.
ZERO
;
BigDecimal
relaySalary
;
//工资应发
// 劳务费、稿酬是否含有发薪false:否;true:是
boolean
haveSalaryFlag
=
false
;
// 是否含有特殊金额false:否;true:是
boolean
haveSpecialFlag
=
false
;
// 是否重复金额false:否;true:是
boolean
repeatFlag
=
false
;
List
<
String
>
idCardList
=
new
ArrayList
<>();
for
(
TSalaryAccountVo
vo
:
savList
)
{
if
(
Common
.
isNotNull
(
vo
.
getEmpIdcard
()))
{
idCardList
.
add
(
vo
.
getEmpIdcard
());
}
}
// 工资查询所需的全部list,组装Map来使用
Map
<
String
,
List
<
TSalaryAccountItem
>>
itemMap
=
tSalaryAccountItemService
.
getAllItemVoList
(
idCardList
,
invoiceTitle
);
for
(
int
i
=
CommonConstants
.
ZERO_INT
;
i
<
size
;
i
++)
{
relaySalary
=
BigDecimal
.
ZERO
;
a
=
new
TSalaryAccount
();
// 本次实发
BigDecimal
actualSalarySumNow
=
BigDecimal
.
ZERO
;
// 当月实发合计
BigDecimal
actualSalarySum
=
BigDecimal
.
ZERO
;
try
{
SalaryAccountUtil
.
reflectionAttr
(
savList
.
get
(
i
),
a
);
if
(!
haveSalaryFlag
&&
a
.
getHaveSalaryFlag
()
!=
null
&&
a
.
getHaveSalaryFlag
()
==
CommonConstants
.
ONE_INT
)
{
haveSalaryFlag
=
true
;
}
if
(!
haveSpecialFlag
&&
a
.
getHaveSpecialFlag
()
!=
null
&&
a
.
getHaveSpecialFlag
()
==
CommonConstants
.
ONE_INT
)
{
haveSpecialFlag
=
true
;
}
if
(!
repeatFlag
&&
a
.
getIsRepeat
()
!=
null
&&
a
.
getIsRepeat
()
==
CommonConstants
.
ONE_INT
)
{
repeatFlag
=
true
;
}
if
(
savList
.
get
(
i
).
getSaiList
()
!=
null
&&
!
savList
.
get
(
i
).
getSaiList
().
isEmpty
())
{
saiList
=
new
ArrayList
<>();
for
(
int
j
=
0
;
j
<
savList
.
get
(
i
).
getSaiList
().
size
();
j
++)
{
sai
=
new
TSalaryAccountItem
();
SalaryAccountUtil
.
reflectionAttr
(
savList
.
get
(
i
).
getSaiList
().
get
(
j
),
sai
);
//工资应发
if
(
SalaryConstants
.
RELAY_SALARY_JAVA
.
equals
(
sai
.
getJavaFiedName
()))
{
relaySalary
=
sai
.
getSalaryMoney
();
relaySalarySum
=
relaySalarySum
.
add
(
sai
.
getSalaryMoney
());
}
SalaryAccountUtil
.
reflectionAttr
(
savList
.
get
(
i
).
getSaiList
().
get
(
j
),
sai
);
//个人实发合计
if
(
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
.
equals
(
sai
.
getJavaFiedName
()))
{
actualSalarySum
=
actualSalarySum
.
add
(
sai
.
getSalaryMoney
());
actualSalarySumNow
=
actualSalarySumNow
.
add
(
sai
.
getSalaryMoney
());
}
saiList
.
add
(
sai
);
}
}
// 自有员工以及自有员工应发金额
if
(
Common
.
isNotNull
(
a
.
getOwnFlag
())
&&
a
.
getOwnFlag
()
==
1
)
{
ownNum
++;
ownMoney
=
ownMoney
.
add
(
relaySalary
);
}
//累计扣税list
asList
=
this
.
getLaborAsList
(
itemMap
.
get
(
a
.
getEmpIdcard
()),
a
.
getSettlementMonth
());
// 实发劳务费,按月累计扣税
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
SALARY_TAX
,
SalaryConstants
.
SALARY_TAX_JAVA
,
calculationLabor
(
saiList
,
asList
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
);
a
.
setSaiList
(
saiList
);
aList
.
add
(
a
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
salary
.
setOwnNums
(
ownNum
);
salary
.
setOwnMoney
(
ownMoney
);
TSalaryDetailVo
salaryDetailVo
=
new
TSalaryDetailVo
();
salaryDetailVo
.
setSalaryAccountList
(
aList
);
salary
.
setSettlementAmount
(
relaySalarySum
);
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
salary
.
setStatus
(
SalaryConstants
.
AUDIT_STATUS
[
0
]);
if
(
haveSalaryFlag
||
haveSpecialFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
)
{
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
}
if
(
haveSpecialFlag
)
{
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ONE_INT
);
}
if
(
repeatFlag
)
{
salary
.
setIsRepeat
(
CommonConstants
.
ONE_INT
);
}
}
//保存工资表
tSalaryStandardService
.
save
(
salary
);
salaryDetailVo
.
setSalary
(
salary
);
for
(
TSalaryAccount
account
:
aList
)
{
saiList
=
account
.
getSaiList
();
account
.
setSaiList
(
null
);
account
.
setSalaryFormId
(
salary
.
getId
());
tSalaryAccountService
.
save
(
account
);
money
=
SalaryConstants
.
B_ZERO
;
for
(
TSalaryAccountItem
item
:
saiList
)
{
if
(
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
money
=
item
.
getSalaryMoney
();
}
item
.
setSalaryAccountId
(
account
.
getId
());
tSalaryAccountItemService
.
save
(
item
);
}
}
return
R
.
ok
(
salaryDetailVo
);
}
/**
* @param itemList
* @param itemHistoryList
* @param saiList
* @Description: 计算劳务费个税、应发
* @Author: hgw
* @Date: 2022/3/3 11:30
* @return: java.math.BigDecimal
**/
private
static
BigDecimal
calculationLabor
(
List
<
TSalaryAccountItem
>
itemList
,
List
<
TSalaryAccountItem
>
itemHistoryList
,
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccount
a
)
{
// B7 = 当月实发合计
// 税=ROUND(IF(B7<=800,0,IF(B7<=3360,(B7-800)/4,IF(B7<=21000,0.16*B7/0.84,IF(B7<=49500,(0.24*B7-2000)/0.76,(0.32*B7-7000)/0.68)))),2)
// 本次实发
BigDecimal
actualSalarySumNow
=
BigDecimal
.
ZERO
;
// 当月实发合计
BigDecimal
actualSalarySum
=
BigDecimal
.
ZERO
;
// 历史个税合计
BigDecimal
sumTax
=
BigDecimal
.
ZERO
;
// 本次实发
for
(
TSalaryAccountItem
item
:
itemList
)
{
if
(
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
actualSalarySum
=
actualSalarySum
.
add
(
item
.
getSalaryMoney
());
actualSalarySumNow
=
actualSalarySumNow
.
add
(
item
.
getSalaryMoney
());
}
}
// 历史实发、个税
for
(
TSalaryAccountItem
item
:
itemHistoryList
)
{
if
(
SalaryConstants
.
SALARY_TAX_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
sumTax
=
sumTax
.
add
(
item
.
getSalaryMoney
());
}
if
(
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
actualSalarySum
=
actualSalarySum
.
add
(
item
.
getSalaryMoney
());
}
}
//个人承担部分税费
BigDecimal
nowTaxT
=
BigDecimal
.
ZERO
;
//个人不承担部分税费
BigDecimal
nowTaxY
=
BigDecimal
.
ZERO
;
BigDecimal
relaySalary
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
a
.
getIsPersonTax
()))
{
nowTaxT
=
getNowTax
(
actualSalarySumNow
);
nowTaxY
=
getNowTax
(
actualSalarySum
);
relaySalary
=
BigDecimalUtils
.
safeAdd
(
actualSalarySumNow
,
nowTaxT
).
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
salaryTax
=
BigDecimalUtils
.
safeSubtract
(
nowTaxY
,
BigDecimalUtils
.
safeAdd
(
nowTaxT
,
sumTax
));
a
.
setSalaryTax
(
salaryTax
);
a
.
setRelaySalaryUnit
(
relaySalary
);
a
.
setSalaryTaxUnit
(
nowTaxT
);
a
.
setActualSalary
(
BigDecimalUtils
.
safeSubtract
(
actualSalarySumNow
,
salaryTax
));
}
else
{
nowTaxY
=
getNowTax
(
actualSalarySum
);
if
(
sumTax
.
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
nowTaxY
=
BigDecimalUtils
.
safeSubtract
(
nowTaxY
,
sumTax
).
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
}
relaySalary
=
BigDecimalUtils
.
safeAdd
(
actualSalarySumNow
,
nowTaxY
).
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
}
// 本次个人应发合计
TSalaryAccountItem
sai
=
new
TSalaryAccountItem
();
sai
.
setCnName
(
SalaryConstants
.
RELAY_SALARY
);
sai
.
setJavaFiedName
(
SalaryConstants
.
RELAY_SALARY_JAVA
);
sai
.
setIsTax
(
CommonConstants
.
ZERO_INT
);
sai
.
setSalaryMoney
(
relaySalary
);
saiList
.
add
(
sai
);
return
nowTaxT
;
}
public
static
BigDecimal
getNowTax
(
BigDecimal
actualSalarySum
)
{
BigDecimal
nowTax
;
// 2022-3-3 11:24:20 运营中心郭华照提供的公式:
// ROUND(IF(B7<=800,0,IF(B7<=3360,(B7-800)/4,IF(B7<=21000,0.16*B7/0.84,IF(B7<=49500,(0.24*B7-2000)/0.76,(0.32*B7-7000)/0.68)))),2)
if
(
actualSalarySum
.
compareTo
(
new
BigDecimal
(
"800"
))
<=
0
)
{
nowTax
=
BigDecimal
.
ZERO
;
}
else
if
(
actualSalarySum
.
compareTo
(
new
BigDecimal
(
"3360"
))
<=
0
)
{
// (B7-800)/4
nowTax
=
BigDecimalUtils
.
safeDivide
(
BigDecimalUtils
.
safeSubtract
(
actualSalarySum
,
new
BigDecimal
(
"800"
))
,
new
BigDecimal
(
"4"
));
}
else
if
(
actualSalarySum
.
compareTo
(
new
BigDecimal
(
"21000"
))
<=
0
)
{
// 0.16*B7/0.84
nowTax
=
BigDecimalUtils
.
safeDivide
(
BigDecimalUtils
.
safeMultiply
(
actualSalarySum
,
new
BigDecimal
(
"0.16"
))
,
new
BigDecimal
(
"0.84"
));
}
else
if
(
actualSalarySum
.
compareTo
(
new
BigDecimal
(
"49500"
))
<=
0
)
{
// (0.24*B7-2000)/0.76
nowTax
=
BigDecimalUtils
.
safeDivide
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeMultiply
(
actualSalarySum
,
new
BigDecimal
(
"0.24"
)),
new
BigDecimal
(
"2000"
))
,
new
BigDecimal
(
"0.76"
));
}
else
{
nowTax
=
BigDecimalUtils
.
safeDivide
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeMultiply
(
actualSalarySum
,
new
BigDecimal
(
"0.32"
)),
new
BigDecimal
(
"7000"
))
,
new
BigDecimal
(
"0.68"
));
}
nowTax
=
nowTax
.
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
return
nowTax
;
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
135cebfe
...
@@ -28,9 +28,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -28,9 +28,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.*
;
...
@@ -41,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
...
@@ -41,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardVo
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
...
@@ -60,6 +66,7 @@ import java.util.*;
...
@@ -60,6 +66,7 @@ import java.util.*;
*/
*/
@Log4j2
@Log4j2
@Service
@Service
@EnableConfigurationProperties
({
DaprSocialProperties
.
class
})
public
class
TSalaryStandardServiceImpl
extends
ServiceImpl
<
TSalaryStandardMapper
,
TSalaryStandard
>
implements
TSalaryStandardService
{
public
class
TSalaryStandardServiceImpl
extends
ServiceImpl
<
TSalaryStandardMapper
,
TSalaryStandard
>
implements
TSalaryStandardService
{
@Autowired
@Autowired
...
@@ -72,8 +79,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -72,8 +79,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
private
MSalaryEstimateService
mSalaryEstimateService
;
private
MSalaryEstimateService
mSalaryEstimateService
;
@Autowired
@Autowired
private
MSalaryPaymentResService
salaryPaymentResService
;
private
DaprSocialProperties
socialProperties
;
/**
/**
* 标准薪酬工资表简单分页查询
* 标准薪酬工资表简单分页查询
*
*
...
@@ -311,51 +317,64 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -311,51 +317,64 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
MSalaryEstimate
salaryEstimate
=
new
MSalaryEstimate
();
MSalaryEstimate
salaryEstimate
=
new
MSalaryEstimate
();
salaryEstimate
.
setSalaryId
(
id
);
salaryEstimate
.
setSalaryId
(
id
);
salaryEstimate
.
setIsSocial
(
SalaryConstants
.
IS_SOCIAL_ZERO
);
salaryEstimate
.
setIsSocial
(
SalaryConstants
.
IS_SOCIAL_ZERO
);
salaryEstimate
.
setType
(
CommonConstants
.
ZERO_INT
);
QueryWrapper
<
MSalaryEstimate
>
salaryEstimateQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
MSalaryEstimate
>
salaryEstimateQueryWrapper
=
new
QueryWrapper
<>();
salaryEstimateQueryWrapper
.
setEntity
(
salaryEstimate
);
salaryEstimateQueryWrapper
.
setEntity
(
salaryEstimate
);
//社保
//
缴费库
社保
List
<
MSalaryEstimate
>
socialList
=
mSalaryEstimateService
.
list
(
salaryEstimateQueryWrapper
);
List
<
MSalaryEstimate
>
socialList
=
mSalaryEstimateService
.
list
(
salaryEstimateQueryWrapper
);
salaryEstimate
.
setIsSocial
(
SalaryConstants
.
IS_FUND_ONE
);
salaryEstimate
.
setIsSocial
(
SalaryConstants
.
IS_FUND_ONE
);
salaryEstimateQueryWrapper
.
setEntity
(
salaryEstimate
);
salaryEstimateQueryWrapper
.
setEntity
(
salaryEstimate
);
//公积金
//
缴费库
公积金
List
<
MSalaryEstimate
>
fundList
=
mSalaryEstimateService
.
list
(
salaryEstimateQueryWrapper
);
List
<
MSalaryEstimate
>
fundList
=
mSalaryEstimateService
.
list
(
salaryEstimateQueryWrapper
);
if
((
socialList
!=
null
&&
!
socialList
.
isEmpty
())
||
(
fundList
!=
null
&&
!
fundList
.
isEmpty
()))
{
salaryEstimate
.
setType
(
CommonConstants
.
ONE_INT
);
MSalaryPaymentRes
res
;
salaryEstimateQueryWrapper
.
setEntity
(
salaryEstimate
);
Map
<
String
,
MSalaryPaymentRes
>
saveResMap
=
new
HashMap
<>();
//缴费库公积金
if
(
socialList
!=
null
&&
!
socialList
.
isEmpty
())
{
List
<
MSalaryEstimate
>
forecastFundList
=
mSalaryEstimateService
.
list
(
salaryEstimateQueryWrapper
);
for
(
MSalaryEstimate
est
:
socialList
)
{
res
=
saveResMap
.
get
(
est
.
getEstimateId
());
salaryEstimate
.
setIsSocial
(
SalaryConstants
.
IS_SOCIAL_ZERO
);
if
(
res
==
null
)
{
salaryEstimateQueryWrapper
.
setEntity
(
salaryEstimate
);
res
=
new
MSalaryPaymentRes
();
//缴费库公积金
res
.
setId
(
est
.
getEstimateId
());
List
<
MSalaryEstimate
>
forecastSocialList
=
mSalaryEstimateService
.
list
(
salaryEstimateQueryWrapper
);
res
.
setDeptId
(
deptId
);
}
List
<
String
>
stringList
;
res
.
setSalarySocialFlag
(
CommonConstants
.
ZERO_STRING
);
if
(
socialList
!=
null
&&
!
socialList
.
isEmpty
())
{
saveResMap
.
put
(
est
.
getEstimateId
(),
res
);
stringList
=
new
ArrayList
<>();
}
for
(
MSalaryEstimate
s
:
socialList
)
{
stringList
.
add
(
s
.
getEstimateId
());
}
//更新社保状态为-待结算
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tpaymentinfo/inner/updatePaymentSocialStatusToNoSettle"
,
stringList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
}
if
(
fundList
!=
null
&&
!
fundList
.
isEmpty
())
{
stringList
=
new
ArrayList
<>();
for
(
MSalaryEstimate
s
:
fundList
)
{
stringList
.
add
(
s
.
getEstimateId
());
}
}
if
(
fundList
!=
null
&&
!
fundList
.
isEmpty
())
{
//更新公积金状态为-待结算
for
(
MSalaryEstimate
est
:
fundList
)
{
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
res
=
saveResMap
.
get
(
est
.
getEstimateId
());
,
"/tpaymentinfo/inner/updatePaymentFundStatusToNoSettle"
,
stringList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
res
==
null
)
{
}
res
=
new
MSalaryPaymentRes
();
if
(
forecastSocialList
!=
null
&&
!
forecastSocialList
.
isEmpty
())
{
res
.
setId
(
est
.
getEstimateId
());
stringList
=
new
ArrayList
<>();
res
.
setDeptId
(
deptId
);
for
(
MSalaryEstimate
s
:
forecastSocialList
)
{
}
stringList
.
add
(
s
.
getEstimateId
());
res
.
setSalaryFundFlag
(
CommonConstants
.
ZERO_STRING
);
saveResMap
.
put
(
est
.
getEstimateId
(),
res
);
}
}
}
// 开始更新res
//更新社保状态为-待结算
if
(!
saveResMap
.
isEmpty
())
{
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
Iterator
<
MSalaryPaymentRes
>
iter
=
saveResMap
.
values
().
iterator
();
,
"/tforecastlibrary/inner/updateForecastSocialStatusToNoSettle"
,
stringList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
while
(
iter
.
hasNext
())
{
}
res
=
iter
.
next
();
if
(
forecastFundList
!=
null
&&
!
forecastFundList
.
isEmpty
())
{
salaryPaymentResService
.
saveOrUpdate
(
res
);
stringList
=
new
ArrayList
<>();
}
for
(
MSalaryEstimate
s
:
forecastFundList
)
{
stringList
.
add
(
s
.
getEstimateId
());
}
}
//更新公积金状态为-待结算
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tforecastlibrary/inner/updateForecastFundStatusToNoSettle"
,
stringList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
}
}
}
}
//6:删除工资表
//6:删除工资表
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSpecialDeducationSumServiceImpl.java
View file @
135cebfe
...
@@ -142,7 +142,7 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
...
@@ -142,7 +142,7 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
for
(
TSpecialDeducationSum
s
:
sdsList
)
{
for
(
TSpecialDeducationSum
s
:
sdsList
)
{
s
.
setCreateMonth
(
yearMonth
);
s
.
setCreateMonth
(
yearMonth
);
s
.
setCreateTime
(
nowDate
);
s
.
setCreateTime
(
nowDate
);
s
.
setCreate
User
(
String
.
valueOf
(
user
.
getId
()
));
s
.
setCreate
By
(
user
.
getId
(
));
}
}
return
new
R
<>(
this
.
saveBatch
(
sdsList
));
return
new
R
<>(
this
.
saveBatch
(
sdsList
));
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsBonusServiceImpl.java
View file @
135cebfe
...
@@ -152,7 +152,6 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
...
@@ -152,7 +152,6 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
){
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
){
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
}
}
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
baseMapper
.
selectList
(
wrapper
);
return
baseMapper
.
selectList
(
wrapper
);
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsDeclarerServiceImpl.java
View file @
135cebfe
...
@@ -16,14 +16,13 @@
...
@@ -16,14 +16,13 @@
*/
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsDeclarerMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsDeclarerMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsDeclarerService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsDeclarerService
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.checkerframework.checker.units.qual.C
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
...
@@ -31,7 +30,6 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo;
...
@@ -31,7 +30,6 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.List
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.context.AnalysisContext
;
...
@@ -90,7 +88,7 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
...
@@ -90,7 +88,7 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TStatisticsDeclarer
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TStatisticsDeclarer
.
class
).
build
();
int
index
=
0
;
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
if
(
count
>
CommonConstants
.
ZERO_INT
){
for
(
int
i
=
0
;
i
<=
count
;
)
{
for
(
int
i
=
0
;
i
<=
count
;
)
{
...
@@ -164,6 +162,27 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
...
@@ -164,6 +162,27 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
}
@Override
public
R
doStatisticsTaxDeclarer
()
{
String
nowMonth
=
DateUtil
.
addMonth
(
0
);
//本月
TStatisticsDeclarer
std
=
new
TStatisticsDeclarer
();
std
.
setDeclareMonth
(
nowMonth
);
QueryWrapper
<
TStatisticsDeclarer
>
queryWrapperSs
=
new
QueryWrapper
<>();
queryWrapperSs
.
setEntity
(
std
);
long
num
=
this
.
count
(
queryWrapperSs
);
if
(
num
>
0
)
{
return
R
.
failed
(
"上月数据已生成,不可重复生成!"
);
}
else
{
String
lastMonth
=
DateUtil
.
addMonth
(-
1
);
//上月
String
lastYear
=
lastMonth
.
substring
(
0
,
4
);
List
<
TStatisticsDeclarer
>
stdvoList
=
baseMapper
.
doStatisticsTaxDeclarer
(
nowMonth
,
lastYear
);
for
(
TStatisticsDeclarer
declarer
:
stdvoList
)
{
this
.
save
(
declarer
);
}
return
R
.
ok
();
}
}
private
Long
noPageCountDiy
(
TStatisticsDeclarerSearchVo
searchVo
)
{
private
Long
noPageCountDiy
(
TStatisticsDeclarerSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TStatisticsDeclarer
>
wrapper
=
buildQueryWrapper
(
searchVo
);
LambdaQueryWrapper
<
TStatisticsDeclarer
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsLaborServiceImpl.java
View file @
135cebfe
...
@@ -25,6 +25,7 @@ import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
...
@@ -25,6 +25,7 @@ import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -46,6 +47,7 @@ import java.io.InputStream;
...
@@ -46,6 +47,7 @@ import java.io.InputStream;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* 本期劳务费申报表
* 本期劳务费申报表
...
@@ -74,7 +76,7 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
...
@@ -74,7 +76,7 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
*/
*/
@Override
@Override
public
void
listExport
(
HttpServletResponse
response
,
TStatisticsLaborSearchVo
searchVo
)
{
public
void
listExport
(
HttpServletResponse
response
,
TStatisticsLaborSearchVo
searchVo
)
{
String
fileName
=
"
不良记录批量
导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
String
fileName
=
"
本期劳务费
导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
//获取要导出的列表
List
<
TStatisticsLabor
>
list
=
new
ArrayList
<>();
List
<
TStatisticsLabor
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
long
count
=
noPageCountDiy
(
searchVo
);
...
@@ -85,7 +87,6 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
...
@@ -85,7 +87,6 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TStatisticsLabor
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TStatisticsLabor
.
class
).
build
();
int
index
=
0
;
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
...
@@ -156,6 +157,15 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
...
@@ -156,6 +157,15 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
private
LambdaQueryWrapper
buildQueryWrapper
(
TStatisticsLaborSearchVo
entity
)
{
private
LambdaQueryWrapper
buildQueryWrapper
(
TStatisticsLaborSearchVo
entity
)
{
LambdaQueryWrapper
<
TStatisticsLabor
>
wrapper
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
TStatisticsLabor
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
Common
.
isNotNull
(
entity
.
getDeclareMonth
()))
{
wrapper
.
eq
(
TStatisticsLabor:
:
getDeclareMonth
,
entity
.
getDeclareMonth
());
}
if
(
Common
.
isNotNull
(
entity
.
getEmpName
()))
{
wrapper
.
eq
(
TStatisticsLabor:
:
getEmpName
,
entity
.
getEmpName
());
}
if
(
Common
.
isNotNull
(
entity
.
getEmpIdcard
()))
{
wrapper
.
eq
(
TStatisticsLabor:
:
getEmpIdcard
,
entity
.
getEmpIdcard
());
}
return
wrapper
;
return
wrapper
;
}
}
...
@@ -217,6 +227,42 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
...
@@ -217,6 +227,42 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
return
R
.
ok
(
errorMessageList
);
return
R
.
ok
(
errorMessageList
);
}
}
@Override
public
R
batchDelete
(
String
declareMonth
)
{
if
(
Common
.
isNotNull
(
declareMonth
))
{
List
<
TStatisticsLabor
>
deleteList
=
baseMapper
.
selectList
(
Wrappers
.<
TStatisticsLabor
>
query
().
lambda
()
.
eq
(
TStatisticsLabor:
:
getDeclareMonth
,
declareMonth
));
if
(
Common
.
isNotNull
(
deleteList
))
{
List
<
String
>
idList
=
deleteList
.
stream
().
map
(
TStatisticsLabor:
:
getId
).
collect
(
Collectors
.
toList
());
baseMapper
.
deleteBatchIds
(
idList
);
return
R
.
ok
();
}
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
return
null
;
}
@Override
public
R
doStatisticsLabor
()
{
String
nowMonth
=
DateUtil
.
addMonth
(
0
);
//本月
TStatisticsLabor
std
=
new
TStatisticsLabor
();
std
.
setDeclareMonth
(
nowMonth
);
QueryWrapper
<
TStatisticsLabor
>
queryWrapperSs
=
new
QueryWrapper
<>();
queryWrapperSs
.
setEntity
(
std
);
long
num
=
this
.
count
(
queryWrapperSs
);
if
(
num
>
0
)
{
return
R
.
failed
(
"上月数据已生成,不可重复生成!"
);
}
else
{
String
lastMonth
=
DateUtil
.
addMonth
(-
1
);
//上月
String
lastYear
=
lastMonth
.
substring
(
0
,
4
);
List
<
TStatisticsLabor
>
stdvoList
=
baseMapper
.
doStatisticsLabor
(
nowMonth
,
lastYear
);
for
(
TStatisticsLabor
declarer
:
stdvoList
)
{
this
.
save
(
declarer
);
}
return
R
.
ok
();
}
}
private
void
importTStatisticsLabor
(
List
<
TStatisticsLaborVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
private
void
importTStatisticsLabor
(
List
<
TStatisticsLaborVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 个性化校验逻辑
// 个性化校验逻辑
ErrorMessage
errorMsg
;
ErrorMessage
errorMsg
;
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsRemunerationServiceImpl.java
View file @
135cebfe
...
@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...
@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsRemuneration
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsRemuneration
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsRemunerationMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsRemunerationMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsRemunerationService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsRemunerationService
;
...
@@ -41,6 +42,7 @@ import java.io.IOException;
...
@@ -41,6 +42,7 @@ import java.io.IOException;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* 本期稿酬申报表
* 本期稿酬申报表
...
@@ -69,7 +71,7 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
...
@@ -69,7 +71,7 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
*/
*/
@Override
@Override
public
void
listExport
(
HttpServletResponse
response
,
TStatisticsRemunerationSearchVo
searchVo
)
{
public
void
listExport
(
HttpServletResponse
response
,
TStatisticsRemunerationSearchVo
searchVo
)
{
String
fileName
=
"
不良记录批量
导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
String
fileName
=
"
本期稿酬申报表
导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
//获取要导出的列表
List
<
TStatisticsRemuneration
>
list
=
new
ArrayList
<>();
List
<
TStatisticsRemuneration
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
long
count
=
noPageCountDiy
(
searchVo
);
...
@@ -80,7 +82,6 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
...
@@ -80,7 +82,6 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TStatisticsRemuneration
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TStatisticsRemuneration
.
class
).
build
();
int
index
=
0
;
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
...
@@ -127,6 +128,21 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
...
@@ -127,6 +128,21 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
}
}
}
}
@Override
public
R
batchDelete
(
String
declareMonth
)
{
if
(
Common
.
isNotNull
(
declareMonth
))
{
List
<
TStatisticsRemuneration
>
deleteList
=
baseMapper
.
selectList
(
Wrappers
.<
TStatisticsRemuneration
>
query
().
lambda
()
.
eq
(
TStatisticsRemuneration:
:
getDeclareMonth
,
declareMonth
));
if
(
Common
.
isNotNull
(
deleteList
))
{
List
<
String
>
idList
=
deleteList
.
stream
().
map
(
TStatisticsRemuneration:
:
getId
).
collect
(
Collectors
.
toList
());
baseMapper
.
deleteBatchIds
(
idList
);
return
R
.
ok
();
}
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
return
null
;
}
private
List
<
TStatisticsRemuneration
>
noPageDiy
(
TStatisticsRemunerationSearchVo
searchVo
)
{
private
List
<
TStatisticsRemuneration
>
noPageDiy
(
TStatisticsRemunerationSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TStatisticsRemuneration
>
wrapper
=
buildQueryWrapper
(
searchVo
);
LambdaQueryWrapper
<
TStatisticsRemuneration
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
...
@@ -150,6 +166,15 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
...
@@ -150,6 +166,15 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
private
LambdaQueryWrapper
buildQueryWrapper
(
TStatisticsRemunerationSearchVo
entity
)
{
private
LambdaQueryWrapper
buildQueryWrapper
(
TStatisticsRemunerationSearchVo
entity
)
{
LambdaQueryWrapper
<
TStatisticsRemuneration
>
wrapper
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
TStatisticsRemuneration
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
Common
.
isNotNull
(
entity
.
getDeclareMonth
()))
{
wrapper
.
eq
(
TStatisticsRemuneration:
:
getDeclareMonth
,
entity
.
getDeclareMonth
());
}
if
(
Common
.
isNotNull
(
entity
.
getEmpName
()))
{
wrapper
.
eq
(
TStatisticsRemuneration:
:
getEmpName
,
entity
.
getEmpName
());
}
if
(
Common
.
isNotNull
(
entity
.
getEmpIdcard
()))
{
wrapper
.
eq
(
TStatisticsRemuneration:
:
getEmpIdcard
,
entity
.
getEmpIdcard
());
}
return
wrapper
;
return
wrapper
;
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
View file @
135cebfe
...
@@ -49,9 +49,6 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -49,9 +49,6 @@ public class SalaryAccountUtil implements Serializable {
*/
*/
private
List
<
ErrorMessage
>
errorInfo
;
private
List
<
ErrorMessage
>
errorInfo
;
// 重复数据
private
List
<
ErrorMessage
>
repeatInfo
;
/**
/**
* @param jsonStr 客户原表json内容
* @param jsonStr 客户原表json内容
* @param dept 项目
* @param dept 项目
...
@@ -60,7 +57,7 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -60,7 +57,7 @@ public class SalaryAccountUtil implements Serializable {
* @param empIdCardMap 当前项目下的员工Map
* @param empIdCardMap 当前项目下的员工Map
* @param empNameMap 当前项目下的员工Map
* @param empNameMap 当前项目下的员工Map
* @param isDuplicateName false:有重名(当前项目下的员工),则不可用姓名查找,必须含有身份证号列
* @param isDuplicateName false:有重名(当前项目下的员工),则不可用姓名查找,必须含有身份证号列
*
@param
repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* @param ownEmployeeMap 自有员工所在项目Map
* @param ownEmployeeMap 自有员工所在项目Map
* @Description: 将jsonStr数据源的数据导入到 List<TSalaryAccount>
* @Description: 将jsonStr数据源的数据导入到 List<TSalaryAccount>
* @Author: hgw
* @Author: hgw
...
@@ -71,12 +68,11 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -71,12 +68,11 @@ public class SalaryAccountUtil implements Serializable {
,
TConfigSalary
configSalary
,
Map
<
String
,
TSalaryConfigStandard
>
salaryConfigMap
,
Map
<
String
,
Boolean
>
isMustMap
,
TConfigSalary
configSalary
,
Map
<
String
,
TSalaryConfigStandard
>
salaryConfigMap
,
Map
<
String
,
Boolean
>
isMustMap
,
Map
<
String
,
TSalaryEmployee
>
empIdCardMap
,
Map
<
String
,
TSalaryEmployee
>
empNameMap
,
boolean
isDuplicateName
,
Map
<
String
,
TSalaryEmployee
>
empIdCardMap
,
Map
<
String
,
TSalaryEmployee
>
empNameMap
,
boolean
isDuplicateName
,
String
salaryType
,
String
invoiceTitle
,
TSalaryEmployeeService
tSalaryEmployeeService
,
String
salaryType
,
String
invoiceTitle
,
TSalaryEmployeeService
tSalaryEmployeeService
,
Map
<
String
,
Integer
>
checkMap
,
int
repeatFlag
,
Map
<
String
,
Integer
>
ownEmployeeMap
,
Map
<
String
,
Integer
>
checkMap
,
Map
<
String
,
Integer
>
ownEmployeeMap
,
Map
<
String
,
Integer
>
ownDeptMap
,
TSalaryAccountService
tSalaryAccountService
)
{
,
Map
<
String
,
Integer
>
ownDeptMap
,
TSalaryAccountService
tSalaryAccountService
)
{
List
<
TSalaryAccountVo
>
tList
=
new
ArrayList
<>();
List
<
TSalaryAccountVo
>
tList
=
new
ArrayList
<>();
List
<
HashMap
>
list
=
JSONObject
.
parseArray
(
jsonStr
,
HashMap
.
class
);
List
<
HashMap
>
list
=
JSONObject
.
parseArray
(
jsonStr
,
HashMap
.
class
);
List
<
ErrorMessage
>
errorList
=
new
ArrayList
<>();
List
<
ErrorMessage
>
errorList
=
new
ArrayList
<>();
List
<
ErrorMessage
>
repeatList
=
new
ArrayList
<>();
try
{
try
{
// 得到数据的条数
// 得到数据的条数
int
rows
=
list
.
size
();
int
rows
=
list
.
size
();
...
@@ -140,6 +136,7 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -140,6 +136,7 @@ public class SalaryAccountUtil implements Serializable {
salaryStyle
=
SalaryConstants
.
SALARY_STYLE_BANK
;
salaryStyle
=
SalaryConstants
.
SALARY_STYLE_BANK
;
relaySalary
=
null
;
relaySalary
=
null
;
actualSalarySum
=
null
;
actualSalarySum
=
null
;
entity
.
setSettlementMonth
(
nowMonth
);
entity
.
setAnnualBonusType
(
SalaryConstants
.
ANNUAL_BONUS_TAX_TYPE_VALUE
[
0
]);
entity
.
setAnnualBonusType
(
SalaryConstants
.
ANNUAL_BONUS_TAX_TYPE_VALUE
[
0
]);
for
(
Map
.
Entry
<
String
,
TSalaryConfigStandard
>
entry
:
salaryConfigMap
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
TSalaryConfigStandard
>
entry
:
salaryConfigMap
.
entrySet
())
{
cellValueObj
=
getFieldValueByName
(
entry
.
getKey
(),
temp
);
cellValueObj
=
getFieldValueByName
(
entry
.
getKey
(),
temp
);
...
@@ -161,6 +158,12 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -161,6 +158,12 @@ public class SalaryAccountUtil implements Serializable {
if
(
SalaryConstants
.
RELAY_SALARY_JAVA
.
equals
(
scs
.
getJavaFiedName
()))
{
if
(
SalaryConstants
.
RELAY_SALARY_JAVA
.
equals
(
scs
.
getJavaFiedName
()))
{
try
{
try
{
relaySalary
=
new
BigDecimal
(
cellValueStr
);
relaySalary
=
new
BigDecimal
(
cellValueStr
);
sai
=
new
TSalaryAccountItemVo
();
sai
.
setCnName
(
dbFiedName
);
sai
.
setJavaFiedName
(
scs
.
getJavaFiedName
());
sai
.
setIsTax
(
CommonConstants
.
ZERO_INT
);
sai
.
setSalaryMoney
(
relaySalary
);
saiList
.
add
(
sai
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
error
=
"第"
+
(
i
+
2
)
+
"行:应发工资:'"
+
cellValueStr
+
"'错误,请检查数据"
;
error
=
"第"
+
(
i
+
2
)
+
"行:应发工资:'"
+
cellValueStr
+
"'错误,请检查数据"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
...
@@ -170,6 +173,7 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -170,6 +173,7 @@ public class SalaryAccountUtil implements Serializable {
if
(
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
.
equals
(
scs
.
getJavaFiedName
()))
{
if
(
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
.
equals
(
scs
.
getJavaFiedName
()))
{
try
{
try
{
actualSalarySum
=
new
BigDecimal
(
cellValueStr
);
actualSalarySum
=
new
BigDecimal
(
cellValueStr
);
entity
.
setActualSalary
(
actualSalarySum
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
error
=
"第"
+
(
i
+
2
)
+
"行:实发工资:'"
+
cellValueStr
+
"'错误,请检查数据"
;
error
=
"第"
+
(
i
+
2
)
+
"行:实发工资:'"
+
cellValueStr
+
"'错误,请检查数据"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
...
@@ -193,7 +197,7 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -193,7 +197,7 @@ public class SalaryAccountUtil implements Serializable {
}
}
newEmp
.
setEmpName
(
empName
);
newEmp
.
setEmpName
(
empName
);
}
}
if
(
SalaryConstants
.
IF_NEW_EMPLOYEE
.
equals
(
dbFiedName
)
if
(
(
SalaryConstants
.
IF_NEW_EMPLOYEE
.
equals
(
dbFiedName
)
||
SalaryConstants
.
IS_NEW_EMPLOYEE
.
equals
(
dbFiedName
)
)
&&
SalaryConstants
.
IS_NEW
.
equals
(
cellValueStr
))
{
&&
SalaryConstants
.
IS_NEW
.
equals
(
cellValueStr
))
{
isNewEmployee
=
true
;
isNewEmployee
=
true
;
}
}
...
@@ -274,6 +278,11 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -274,6 +278,11 @@ public class SalaryAccountUtil implements Serializable {
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
continue
;
}
}
if
(
"4"
.
equals
(
salaryType
)
&&
actualSalarySum
==
null
)
{
error
=
"第"
+
(
i
+
2
)
+
"行:【稿酬】列_不可缺少"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
// 应发、实发、实发劳务费不可都为空
// 应发、实发、实发劳务费不可都为空
if
(
relaySalary
==
null
&&
actualSalarySum
==
null
)
{
if
(
relaySalary
==
null
&&
actualSalarySum
==
null
)
{
...
@@ -287,15 +296,12 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -287,15 +296,12 @@ public class SalaryAccountUtil implements Serializable {
entity
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
entity
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
if
(
relaySalary
!=
null
)
{
if
(
relaySalary
!=
null
)
{
relaySalary
=
relaySalary
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
relaySalary
=
relaySalary
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
checkMap
.
get
(
entity
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
())
if
(
!
checkMap
.
isEmpty
()
&&
checkMap
.
get
(
entity
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
())
+
CommonConstants
.
DOWN_LINE_STRING
+
salaryType
+
CommonConstants
.
DOWN_LINE_STRING
+
relaySalary
)
!=
null
)
{
+
CommonConstants
.
DOWN_LINE_STRING
+
salaryType
+
CommonConstants
.
DOWN_LINE_STRING
+
relaySalary
)
!=
null
)
{
entity
.
setIsRepeat
(
CommonConstants
.
ONE_INT
);
entity
.
setIsRepeat
(
CommonConstants
.
ONE_INT
);
if
(
repeatFlag
==
0
)
{
repeatList
.
add
(
new
ErrorMessage
((
i
+
2
),
"第"
+
(
i
+
2
)
+
"行:同一项目、结算月份、报表类型、工资月份、身份证号、应发金额,存在相同数据"
));
continue
;
}
}
}
if
(
new
BigDecimal
(
"3500"
).
equals
(
relaySalary
)
||
new
BigDecimal
(
"5000"
).
equals
(
relaySalary
))
{
if
(
new
BigDecimal
(
"3500"
).
compareTo
(
relaySalary
)
==
CommonConstants
.
ZERO_INT
||
new
BigDecimal
(
"5000"
).
compareTo
(
relaySalary
)
==
CommonConstants
.
ZERO_INT
)
{
entity
.
setHaveSpecialFlag
(
CommonConstants
.
ONE_INT
);
entity
.
setHaveSpecialFlag
(
CommonConstants
.
ONE_INT
);
}
}
}
}
...
@@ -589,7 +595,6 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -589,7 +595,6 @@ public class SalaryAccountUtil implements Serializable {
}
}
this
.
setEntityList
(
tList
);
this
.
setEntityList
(
tList
);
this
.
setErrorInfo
(
errorList
);
this
.
setErrorInfo
(
errorList
);
this
.
setRepeatInfo
(
repeatList
);
}
}
/**
/**
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryConstants.java
View file @
135cebfe
...
@@ -89,6 +89,7 @@ public class SalaryConstants {
...
@@ -89,6 +89,7 @@ public class SalaryConstants {
public
static
final
String
IS_MUST
=
"1"
;
public
static
final
String
IS_MUST
=
"1"
;
public
static
final
String
EMP_NAME
=
"姓名"
;
public
static
final
String
EMP_NAME
=
"姓名"
;
public
static
final
String
IF_NEW_EMPLOYEE
=
"是否新员工(默认否)"
;
public
static
final
String
IF_NEW_EMPLOYEE
=
"是否新员工(默认否)"
;
public
static
final
String
IS_NEW_EMPLOYEE
=
"是否新员工"
;
public
static
final
String
IS_NEW
=
"是"
;
public
static
final
String
IS_NEW
=
"是"
;
public
static
final
String
ID_NUMBER
=
"身份证号"
;
public
static
final
String
ID_NUMBER
=
"身份证号"
;
public
static
final
String
CHECK_ID_NUMBER
=
"身份证号码"
;
public
static
final
String
CHECK_ID_NUMBER
=
"身份证号码"
;
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TOwnDeptMapper.xml
View file @
135cebfe
...
@@ -50,6 +50,6 @@
...
@@ -50,6 +50,6 @@
</select>
</select>
<!--获取自有员工身份证-->
<!--获取自有员工身份证-->
<select
id=
"getOwnEmpList"
resultType=
"String"
>
<select
id=
"getOwnEmpList"
resultType=
"String"
>
SELECT EMP_IDCARD FROM view_own_employee
SELECT EMP_IDCARD FROM view_own_employee
</select>
</select>
</mapper>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountItemMapper.xml
View file @
135cebfe
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<result
property=
"isTax"
column=
"IS_TAX"
/>
<result
property=
"isTax"
column=
"IS_TAX"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"settlementMonth"
column=
"SETTLEMENT_MONTH"
/>
<result
property=
"settlementMonth"
column=
"SETTLEMENT_MONTH"
/>
<result
property=
"
salaryType"
column=
"SALARY
_TYPE"
/>
<result
property=
"
formType"
column=
"FORM
_TYPE"
/>
</resultMap>
</resultMap>
<!--tSalaryAccountItem简单分页查询-->
<!--tSalaryAccountItem简单分页查询-->
...
@@ -71,8 +71,8 @@
...
@@ -71,8 +71,8 @@
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
<where>
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0
<if
test=
"
settleDepartId != null and settleDepar
tId.trim() != ''"
>
<if
test=
"
deptId != null and dep
tId.trim() != ''"
>
AND a.
SETTLE_DEPART_ID = #{settleDepar
tId}
AND a.
DEPT_ID = #{dep
tId}
</if>
</if>
<if
test=
"settleMonth != null and settleMonth.trim() != ''"
>
<if
test=
"settleMonth != null and settleMonth.trim() != ''"
>
AND a.SETTLEMENT_MONTH = #{settleMonth}
AND a.SETTLEMENT_MONTH = #{settleMonth}
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
FROM
FROM
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
<where>
a.DELETE_FLAG = 0 and a.
SALARY
_TYPE != 7
a.DELETE_FLAG = 0 and a.
FORM
_TYPE != 7
<if
test=
"idCard != null and idCard.trim() != ''"
>
<if
test=
"idCard != null and idCard.trim() != ''"
>
AND a.EMP_IDCARD = #{idCard}
AND a.EMP_IDCARD = #{idCard}
</if>
</if>
...
@@ -124,14 +124,14 @@
...
@@ -124,14 +124,14 @@
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
<where>
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0
<if
test=
"
settleDepartId != null and settleDepar
tId.trim() != ''"
>
<if
test=
"
deptId != null and dep
tId.trim() != ''"
>
AND a.
SETTLE_DEPART_ID = #{settleDepar
tId}
AND a.
DEPT_ID = #{dep
tId}
</if>
</if>
<if
test=
"javaFiedName != null and javaFiedName.trim() != ''"
>
<if
test=
"javaFiedName != null and javaFiedName.trim() != ''"
>
AND i.JAVA_FIED_NAME = #{javaFiedName}
AND i.JAVA_FIED_NAME = #{javaFiedName}
</if>
</if>
<if
test=
"salary
Date != null and salaryDate
.trim() != ''"
>
<if
test=
"salary
Month != null and salaryMonth
.trim() != ''"
>
AND a.SALARY_
DATE > #{salaryDate
}
AND a.SALARY_
MONTH > #{salaryMonth
}
</if>
</if>
<if
test=
"empIdcard != null and empIdcard.trim() != ''"
>
<if
test=
"empIdcard != null and empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{empIdcard}
AND a.EMP_IDCARD = #{empIdcard}
...
@@ -150,19 +150,19 @@
...
@@ -150,19 +150,19 @@
<select
id=
"getAverageSalaryItemMonthCount"
resultType=
"Integer"
>
<select
id=
"getAverageSalaryItemMonthCount"
resultType=
"Integer"
>
SELECT
SELECT
count(DISTINCT a.SALARY_
DATE
)
count(DISTINCT a.SALARY_
MONTH
)
FROM
FROM
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
<where>
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0
<if
test=
"
settleDepartId != null and settleDepar
tId.trim() != ''"
>
<if
test=
"
deptId != null and dep
tId.trim() != ''"
>
AND a.
SETTLE_DEPART_ID = #{settleDepar
tId}
AND a.
DEPT_ID = #{dep
tId}
</if>
</if>
<if
test=
"javaFiedName != null and javaFiedName.trim() != ''"
>
<if
test=
"javaFiedName != null and javaFiedName.trim() != ''"
>
AND i.JAVA_FIED_NAME = #{javaFiedName}
AND i.JAVA_FIED_NAME = #{javaFiedName}
</if>
</if>
<if
test=
"salary
Date != null and salaryDate
.trim() != ''"
>
<if
test=
"salary
Month != null and salaryMonth
.trim() != ''"
>
AND a.SALARY_
DATE > #{salaryDate
}
AND a.SALARY_
MONTH > #{salaryMonth
}
</if>
</if>
<if
test=
"empIdcard != null and empIdcard.trim() != ''"
>
<if
test=
"empIdcard != null and empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{empIdcard}
AND a.EMP_IDCARD = #{empIdcard}
...
@@ -178,14 +178,14 @@
...
@@ -178,14 +178,14 @@
t_engineer_account_item i left join t_engineer_account a on i.SALARY_ACCOUNT_ID = a.ID
t_engineer_account_item i left join t_engineer_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
<where>
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0
<if
test=
"
settleDepartId != null and settleDepar
tId.trim() != ''"
>
<if
test=
"
deptId != null and dep
tId.trim() != ''"
>
AND a.
SETTLE_DEPART_ID = #{settleDepar
tId}
AND a.
DEPT_ID = #{dep
tId}
</if>
</if>
<if
test=
"javaFiedName != null and javaFiedName.trim() != ''"
>
<if
test=
"javaFiedName != null and javaFiedName.trim() != ''"
>
AND i.JAVA_FIED_NAME = #{javaFiedName}
AND i.JAVA_FIED_NAME = #{javaFiedName}
</if>
</if>
<if
test=
"salary
Date != null and salaryDate
.trim() != ''"
>
<if
test=
"salary
Month != null and salaryMonth
.trim() != ''"
>
AND a.SALARY_
DATE > #{salaryDate
}
AND a.SALARY_
MONTH > #{salaryMonth
}
</if>
</if>
<if
test=
"empIdcard != null and empIdcard.trim() != ''"
>
<if
test=
"empIdcard != null and empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{empIdcard}
AND a.EMP_IDCARD = #{empIdcard}
...
@@ -195,19 +195,19 @@
...
@@ -195,19 +195,19 @@
<select
id=
"getEngineerAverageSalaryItemMonthCount"
resultType=
"Integer"
>
<select
id=
"getEngineerAverageSalaryItemMonthCount"
resultType=
"Integer"
>
SELECT
SELECT
count(DISTINCT a.SALARY_
DATE
)
count(DISTINCT a.SALARY_
MONTH
)
FROM
FROM
t_engineer_account_item i left join t_engineer_account a on i.SALARY_ACCOUNT_ID = a.ID
t_engineer_account_item i left join t_engineer_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
<where>
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0
<if
test=
"
settleDepartId != null and settleDepar
tId.trim() != ''"
>
<if
test=
"
deptId != null and dep
tId.trim() != ''"
>
AND a.
SETTLE_DEPART_ID = #{settleDepar
tId}
AND a.
DEPT_ID = #{dep
tId}
</if>
</if>
<if
test=
"javaFiedName != null and javaFiedName.trim() != ''"
>
<if
test=
"javaFiedName != null and javaFiedName.trim() != ''"
>
AND i.JAVA_FIED_NAME = #{javaFiedName}
AND i.JAVA_FIED_NAME = #{javaFiedName}
</if>
</if>
<if
test=
"salary
Date != null and salaryDate
.trim() != ''"
>
<if
test=
"salary
Month != null and salaryMonth
.trim() != ''"
>
AND a.SALARY_
DATE > #{salaryDate
}
AND a.SALARY_
MONTH > #{salaryMonth
}
</if>
</if>
<if
test=
"empIdcard != null and empIdcard.trim() != ''"
>
<if
test=
"empIdcard != null and empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{empIdcard}
AND a.EMP_IDCARD = #{empIdcard}
...
@@ -272,8 +272,8 @@
...
@@ -272,8 +272,8 @@
<if
test=
"tSalaryAccount.salaryFormId != null and tSalaryAccount.salaryFormId.trim() != ''"
>
<if
test=
"tSalaryAccount.salaryFormId != null and tSalaryAccount.salaryFormId.trim() != ''"
>
AND a.SALARY_FORM_ID = #{tSalaryAccount.salaryFormId}
AND a.SALARY_FORM_ID = #{tSalaryAccount.salaryFormId}
</if>
</if>
<if
test=
"tSalaryAccount.salary
Date != null and tSalaryAccount.salaryDate
.trim() != ''"
>
<if
test=
"tSalaryAccount.salary
Month != null and tSalaryAccount.salaryMonth
.trim() != ''"
>
AND a.SALARY_
DATE = #{tSalaryAccount.salaryDate
}
AND a.SALARY_
MONTH = #{tSalaryAccount.salaryMonth
}
</if>
</if>
<if
test=
"tSalaryAccount.empId != null and tSalaryAccount.empId.trim() != ''"
>
<if
test=
"tSalaryAccount.empId != null and tSalaryAccount.empId.trim() != ''"
>
AND a.EMP_ID = #{tSalaryAccount.empId}
AND a.EMP_ID = #{tSalaryAccount.empId}
...
@@ -284,14 +284,14 @@
...
@@ -284,14 +284,14 @@
<if
test=
"tSalaryAccount.empNo != null and tSalaryAccount.empNo.trim() != ''"
>
<if
test=
"tSalaryAccount.empNo != null and tSalaryAccount.empNo.trim() != ''"
>
AND a.EMP_NO = #{tSalaryAccount.empNo}
AND a.EMP_NO = #{tSalaryAccount.empNo}
</if>
</if>
<if
test=
"tSalaryAccount.
settleDepartId != null and tSalaryAccount.settleDepar
tId.trim() != ''"
>
<if
test=
"tSalaryAccount.
deptId != null and tSalaryAccount.dep
tId.trim() != ''"
>
AND a.BELONG_DEPART = #{tSalaryAccount.
settleDepar
tId}
AND a.BELONG_DEPART = #{tSalaryAccount.
dep
tId}
</if>
</if>
<if
test=
"tSalaryAccount.
settleDepartNo != null and tSalaryAccount.settleDepar
tNo.trim() != ''"
>
<if
test=
"tSalaryAccount.
deptNo != null and tSalaryAccount.dep
tNo.trim() != ''"
>
AND a.
SETTLE_DEPART_NO like '%${tSalaryAccount.settleDepar
tNo}%'
AND a.
DEPT_NO like '%${tSalaryAccount.dep
tNo}%'
</if>
</if>
<if
test=
"tSalaryAccount.
settleDepartName != null and tSalaryAccount.settleDepar
tName.trim() != ''"
>
<if
test=
"tSalaryAccount.
deptName != null and tSalaryAccount.dep
tName.trim() != ''"
>
AND a.
SETTLE_DEPART_NAME like '%${tSalaryAccount.settleDepar
tName}%'
AND a.
DEPT_NAME like '%${tSalaryAccount.dep
tName}%'
</if>
</if>
<if
test=
"tSalaryAccount.empIdcard != null and tSalaryAccount.empIdcard.trim() != ''"
>
<if
test=
"tSalaryAccount.empIdcard != null and tSalaryAccount.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD like '%${tSalaryAccount.empIdcard}%'
AND a.EMP_IDCARD like '%${tSalaryAccount.empIdcard}%'
...
@@ -320,8 +320,8 @@
...
@@ -320,8 +320,8 @@
<if
test=
"tSalaryAccount.deduProvidentMonth != null and tSalaryAccount.deduProvidentMonth.trim() != ''"
>
<if
test=
"tSalaryAccount.deduProvidentMonth != null and tSalaryAccount.deduProvidentMonth.trim() != ''"
>
AND a.DEDU_PROVIDENT_MONTH = #{tSalaryAccount.deduProvidentMonth}
AND a.DEDU_PROVIDENT_MONTH = #{tSalaryAccount.deduProvidentMonth}
</if>
</if>
<if
test=
"tSalaryAccount.
salaryType != null and tSalaryAccount.salary
Type.trim() != ''"
>
<if
test=
"tSalaryAccount.
formType != null and tSalaryAccount.form
Type.trim() != ''"
>
AND a.
SALARY_TYPE = #{tSalaryAccount.salary
Type}
AND a.
FORM_TYPE = #{tSalaryAccount.form
Type}
</if>
</if>
<if
test=
"tSalaryAccount.salaryTaxFlag != null and tSalaryAccount.salaryTaxFlag.trim() != ''"
>
<if
test=
"tSalaryAccount.salaryTaxFlag != null and tSalaryAccount.salaryTaxFlag.trim() != ''"
>
AND a.SALARY_TAX_FLAG = #{tSalaryAccount.salaryTaxFlag}
AND a.SALARY_TAX_FLAG = #{tSalaryAccount.salaryTaxFlag}
...
@@ -392,25 +392,9 @@
...
@@ -392,25 +392,9 @@
</if>
</if>
</if>
</if>
</sql>
</sql>
<!--tSalaryAccountItem简单分页查询-->
<select
id=
"getTSalaryAccountItemPage"
resultMap=
"tSalaryAccountItemMap"
>
SELECT
a.SALARY_ACCOUNT_ID as 'key',
a.SALARY_MONEY as 'value'
FROM
t_salary_account_item a
WHERE
a.SALARY_ACCOUNT_ID IN
<foreach
item=
"item"
index=
"index"
collection=
"account"
open=
"("
separator=
","
close=
")"
>
#{item.id}
</foreach>
and
a.JAVA_FIED_NAME='actualSalarySum'
</select>
<!-- 获取工资明细 -->
<!-- 获取工资明细 -->
<select
id=
"getItemSet"
resultType=
"java.lang.String"
>
<select
id=
"getItemSet"
resultType=
"java.lang.String"
>
select
select
i.cn_name a
i.cn_name a
from t_salary_account_item i
from t_salary_account_item i
...
@@ -421,70 +405,6 @@
...
@@ -421,70 +405,6 @@
order by i.JAVA_FIED_NAME desc,i.id
order by i.JAVA_FIED_NAME desc,i.id
</select>
</select>
<!-- 获取所有数据,组装map,工资导入使用 -->
<select
id=
"getAllItemVoList"
resultMap=
"itemVoMap"
>
SELECT
i.ID,
i.SALARY_ACCOUNT_ID,
i.CN_NAME,
i.JAVA_FIED_NAME,
i.SALARY_MONEY,
i.TEXT_VALUE,
i.IS_TAX,
a.EMP_IDCARD,
a.SETTLEMENT_MONTH,
a.SALARY_TYPE
FROM
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
a.SETTLEMENT_MONTH like DATE_FORMAT(now(),"%Y%")
<if
test=
"idCardList != null"
>
AND a.EMP_IDCARD in
<foreach
item=
"item"
index=
"index"
collection=
"idCardList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"invoiceTitle != null and invoiceTitle.trim() != ''"
>
AND a.INVOICE_TITLE = #{invoiceTitle}
</if>
AND a.DELETE_FLAG = 0 and a.SALARY_TYPE != 7
</where>
</select>
<select
id=
"getAllTSalaryAccountItem"
resultMap=
"tSalaryAccountItemMap"
>
SELECT
i.ID,
i.SALARY_ACCOUNT_ID,
i.CN_NAME,
i.JAVA_FIED_NAME,
i.SALARY_MONEY,
i.TEXT_VALUE,
i.IS_TAX
FROM
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
a.DELETE_FLAG = 0
<if
test=
"settleDepartId != null and settleDepartId.trim() != ''"
>
AND a.SETTLE_DEPART_ID = #{settleDepartId}
</if>
<if
test=
"settleMonth != null and settleMonth.trim() != ''"
>
AND a.SETTLEMENT_MONTH = #{settleMonth}
</if>
<if
test=
"javaFiedName != null and javaFiedName.trim() != ''"
>
AND i.JAVA_FIED_NAME = #{javaFiedName}
</if>
<if
test=
"finallyYear != null and finallyYear.trim() != ''"
>
AND a.SETTLEMENT_MONTH like concat(#{finallyYear}, '%')
</if>
<if
test=
"empIdcard != null and empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{empIdcard}
</if>
<if
test=
"accountId != null and accountId.trim() != ''"
>
AND a.id != #{accountId}
</if>
</where>
</select>
<!-- 获取所有数据,组装map,工资导入使用 -->
<!-- 获取所有数据,组装map,工资导入使用 -->
<select
id=
"getAllItemVoList"
resultMap=
"itemVoMap"
>
<select
id=
"getAllItemVoList"
resultMap=
"itemVoMap"
>
SELECT
SELECT
...
@@ -497,7 +417,7 @@
...
@@ -497,7 +417,7 @@
i.IS_TAX,
i.IS_TAX,
a.EMP_IDCARD,
a.EMP_IDCARD,
a.SETTLEMENT_MONTH,
a.SETTLEMENT_MONTH,
a.
SALARY
_TYPE
a.
FORM
_TYPE
FROM
FROM
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
<where>
...
@@ -511,7 +431,7 @@
...
@@ -511,7 +431,7 @@
<if
test=
"invoiceTitle != null and invoiceTitle.trim() != ''"
>
<if
test=
"invoiceTitle != null and invoiceTitle.trim() != ''"
>
AND a.INVOICE_TITLE = #{invoiceTitle}
AND a.INVOICE_TITLE = #{invoiceTitle}
</if>
</if>
AND a.DELETE_FLAG = 0 and a.
SALARY
_TYPE != 7
AND a.DELETE_FLAG = 0 and a.
FORM
_TYPE != 7
</where>
</where>
</select>
</select>
<select
id=
"getSumByAccountId"
resultType=
"java.util.Map"
>
<select
id=
"getSumByAccountId"
resultType=
"java.util.Map"
>
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
135cebfe
...
@@ -246,25 +246,25 @@
...
@@ -246,25 +246,25 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
FROM t_salary_account a
FROM t_salary_account a
<where>
<where>
1=1
a.DELETE_FLAG = 0
<include
refid=
"tSalaryAccount_where"
/>
<include
refid=
"tSalaryAccount_where"
/>
</where>
</where>
</select>
</select>
<!-- 获取校验的报账明细 ### 格式:身份证号_工资月份_报表类型_应发金额 -->
<!-- 获取校验的报账明细 ### 格式:身份证号_工资月份_报表类型_应发金额 -->
<select
id=
"getAccountCheckList"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo"
>
<select
id=
"getAccountCheckList"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo"
>
select
select
CONCAT(a.EMP_IDCARD,"_",a.SALARY_
DATE
,"_",a.FORM_TYPE) title,ifnull(ifnull(relaySalary.SALARY_MONEY,actSalary.SALARY_MONEY),0) relaySalary
CONCAT(a.EMP_IDCARD,"_",a.SALARY_
MONTH
,"_",a.FORM_TYPE) title,ifnull(ifnull(relaySalary.SALARY_MONEY,actSalary.SALARY_MONEY),0) relaySalary
from t_salary_account a
from t_salary_account a
left join t_salary_account_item relaySalary on relaySalary.SALARY_ACCOUNT_ID = a.id and relaySalary.JAVA_FIED_NAME='relaySalary'
left join t_salary_account_item relaySalary on relaySalary.SALARY_ACCOUNT_ID = a.id and relaySalary.JAVA_FIED_NAME='relaySalary'
left join t_salary_account_item actSalary on actSalary.SALARY_ACCOUNT_ID = a.id and actSalary.JAVA_FIED_NAME='actualSalarySum'
left join t_salary_account_item actSalary on actSalary.SALARY_ACCOUNT_ID = a.id and actSalary.JAVA_FIED_NAME='actualSalarySum'
where a.DELETE_FLAG = 0 and a.
SETTLE_DEPART_ID = #{settleId} and a.SETTLEMENT
_MONTH = #{settleMonth}
where a.DELETE_FLAG = 0 and a.
DEPT_ID = #{settleId} and a.SALARY
_MONTH = #{settleMonth}
</select>
</select>
<!-- 获取当前年最小计税月 -->
<!-- 获取当前年最小计税月 -->
<select
id=
"getMinTaxMonthByNowYear"
resultType=
"java.lang.String"
>
<select
id=
"getMinTaxMonthByNowYear"
resultType=
"java.lang.String"
>
select
select
min(a.TAX_MONTH - 0
)
concat(min(a.TAX_MONTH - 0),''
)
from t_salary_account a
from t_salary_account a
where a.EMP_IDCARD = #{empIdCard} and a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH like concat(#{nowYear},"%")
where a.EMP_IDCARD = #{empIdCard} and a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH like concat(#{nowYear},"%")
and a.FORM_TYPE != '3'
and a.FORM_TYPE != '3'
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAttaMapper.xml
View file @
135cebfe
...
@@ -113,7 +113,7 @@
...
@@ -113,7 +113,7 @@
<select
id=
"getTAttaPage"
resultMap=
"tAttaMap"
>
<select
id=
"getTAttaPage"
resultMap=
"tAttaMap"
>
SELECT
SELECT
<include
refid=
"selectParams"
/>
<include
refid=
"selectParams"
/>
FROM t_salary_atta
FROM t_salary_atta
a
<where>
<where>
1=1
1=1
<include
refid=
"tSalaryAtta_where"
/>
<include
refid=
"tSalaryAtta_where"
/>
...
@@ -125,11 +125,11 @@
...
@@ -125,11 +125,11 @@
<select
id=
"getTAttaList"
resultMap=
"tAttaMap"
>
<select
id=
"getTAttaList"
resultMap=
"tAttaMap"
>
SELECT
SELECT
<include
refid=
"selectParams"
/>
<include
refid=
"selectParams"
/>
FROM t_salary_atta
FROM t_salary_atta
a
<where>
<where>
1=1
1=1
<include
refid=
"tSalaryAtta_where"
/>
<include
refid=
"tSalaryAtta_where"
/>
</where>
</where>
order by CREATE_TIME
order by CREATE_TIME
desc
</select>
</select>
</mapper>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
View file @
135cebfe
...
@@ -218,7 +218,7 @@
...
@@ -218,7 +218,7 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
FROM t_salary_standard a
FROM t_salary_standard a
<where>
<where>
1=1
a.DELETE_FLAG = 0
<include
refid=
"tSalaryStandard_where"
/>
<include
refid=
"tSalaryStandard_where"
/>
</where>
</where>
</select>
</select>
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
FROM t_salary_standard a
FROM t_salary_standard a
<where>
<where>
1=1
a.DELETE_FLAG = 0
<include
refid=
"where_page"
/>
<include
refid=
"where_page"
/>
</where>
</where>
order by a.CREATE_TIME desc
order by a.CREATE_TIME desc
...
@@ -265,7 +265,7 @@
...
@@ -265,7 +265,7 @@
a.CREATE_TIME
a.CREATE_TIME
FROM t_salary_standard a
FROM t_salary_standard a
<where>
<where>
1=1
a.DELETE_FLAG = 0
<include
refid=
"where_export"
/>
<include
refid=
"where_export"
/>
<if
test=
"searchVo != null"
>
<if
test=
"searchVo != null"
>
<if
test=
"searchVo.limitStart != null"
>
<if
test=
"searchVo.limitStart != null"
>
...
@@ -280,7 +280,7 @@
...
@@ -280,7 +280,7 @@
count(1)
count(1)
FROM t_salary_standard a
FROM t_salary_standard a
<where>
<where>
1=1
a.DELETE_FLAG = 0
<include
refid=
"where_export"
/>
<include
refid=
"where_export"
/>
</where>
</where>
</select>
</select>
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSpecialDeducationSumMapper.xml
View file @
135cebfe
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<resultMap
id=
"tSpecialDeducationSumMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum"
>
<resultMap
id=
"tSpecialDeducationSumMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum"
>
<id
property=
"id"
column=
"id"
/>
<id
property=
"id"
column=
"id"
/>
<result
property=
"create
User"
column=
"CREATE_USER
"
/>
<result
property=
"create
By"
column=
"CREATE_BY
"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"createMonth"
column=
"CREATE_MONTH"
/>
<result
property=
"createMonth"
column=
"CREATE_MONTH"
/>
<result
property=
"declareTitle"
column=
"DECLARE_TITLE"
/>
<result
property=
"declareTitle"
column=
"DECLARE_TITLE"
/>
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id,
id,
CREATE_
USER
,
CREATE_
BY
,
CREATE_TIME,
CREATE_TIME,
CREATE_MONTH,
CREATE_MONTH,
DECLARE_TITLE,
DECLARE_TITLE,
...
@@ -81,8 +81,8 @@
...
@@ -81,8 +81,8 @@
<if
test=
"tSpecialDeducationSum.id != null and tSpecialDeducationSum.id.trim() != ''"
>
<if
test=
"tSpecialDeducationSum.id != null and tSpecialDeducationSum.id.trim() != ''"
>
AND id = #{tSpecialDeducationSum.id}
AND id = #{tSpecialDeducationSum.id}
</if>
</if>
<if
test=
"tSpecialDeducationSum.create
User != null and tSpecialDeducationSum.createUser
.trim() != ''"
>
<if
test=
"tSpecialDeducationSum.create
By != null and tSpecialDeducationSum.createBy
.trim() != ''"
>
AND CREATE_
USER = #{tSpecialDeducationSum.createUser
}
AND CREATE_
BY = #{tSpecialDeducationSum.createBy
}
</if>
</if>
<if
test=
"tSpecialDeducationSum.createTime != null"
>
<if
test=
"tSpecialDeducationSum.createTime != null"
>
AND CREATE_TIME = #{tSpecialDeducationSum.createTime}
AND CREATE_TIME = #{tSpecialDeducationSum.createTime}
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsBonusMapper.xml
View file @
135cebfe
...
@@ -100,5 +100,6 @@
...
@@ -100,5 +100,6 @@
1=1
1=1
<include
refid=
"tStatisticsBonus_where"
/>
<include
refid=
"tStatisticsBonus_where"
/>
</where>
</where>
order by a.DECLARE_MONTH desc
</select>
</select>
</mapper>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsDeclarerMapper.xml
View file @
135cebfe
...
@@ -97,4 +97,15 @@
...
@@ -97,4 +97,15 @@
</where>
</where>
order by a.DECLARE_MONTH desc
order by a.DECLARE_MONTH desc
</select>
</select>
<!--统计-->
<select
id=
"doStatisticsTaxDeclarer"
resultMap=
"tStatisticsDeclarerMap"
>
select
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,b.FILE_STATUS EMP_STATUS,
b.UNIT_NAME DECLARE_UNIT,'雇员' OCCUPATION_TYPE
from t_salary_account a
left join t_salary_employee b on b.id = a.EMP_ID
where a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH like '${lastYear}%'
GROUP BY a.EMP_IDCARD
</select>
</mapper>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsLaborMapper.xml
View file @
135cebfe
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
<result
property=
"declareMonth"
column=
"DECLARE_MONTH"
/>
<result
property=
"declareMonth"
column=
"DECLARE_MONTH"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"workNo"
column=
"WORK_NO"
/>
<result
property=
"cardType"
column=
"CARD_TYPE"
/>
<result
property=
"cardType"
column=
"CARD_TYPE"
/>
<result
property=
"income"
column=
"INCOME"
/>
<result
property=
"income"
column=
"INCOME"
/>
<result
property=
"personalTax"
column=
"PERSONAL_TAX"
/>
<result
property=
"personalTax"
column=
"PERSONAL_TAX"
/>
...
@@ -41,7 +40,6 @@
...
@@ -41,7 +40,6 @@
a.DECLARE_MONTH,
a.DECLARE_MONTH,
a.EMP_NAME,
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_IDCARD,
a.WORK_NO,
a.CARD_TYPE,
a.CARD_TYPE,
a.INCOME,
a.INCOME,
a.PERSONAL_TAX,
a.PERSONAL_TAX,
...
@@ -64,9 +62,6 @@
...
@@ -64,9 +62,6 @@
<if
test=
"tStatisticsLabor.empIdcard != null and tStatisticsLabor.empIdcard.trim() != ''"
>
<if
test=
"tStatisticsLabor.empIdcard != null and tStatisticsLabor.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{tStatisticsLabor.empIdcard}
AND a.EMP_IDCARD = #{tStatisticsLabor.empIdcard}
</if>
</if>
<if
test=
"tStatisticsLabor.workNo != null and tStatisticsLabor.workNo.trim() != ''"
>
AND a.WORK_NO = #{tStatisticsLabor.workNo}
</if>
<if
test=
"tStatisticsLabor.cardType != null and tStatisticsLabor.cardType.trim() != ''"
>
<if
test=
"tStatisticsLabor.cardType != null and tStatisticsLabor.cardType.trim() != ''"
>
AND a.CARD_TYPE = #{tStatisticsLabor.cardType}
AND a.CARD_TYPE = #{tStatisticsLabor.cardType}
</if>
</if>
...
@@ -90,5 +85,18 @@
...
@@ -90,5 +85,18 @@
1=1
1=1
<include
refid=
"tStatisticsLabor_where"
/>
<include
refid=
"tStatisticsLabor_where"
/>
</where>
</where>
group by a.EMP_IDCARD,a.DECLARE_MONTH,a.EMP_NAME
order by a.DECLARE_MONTH desc
</select>
</select>
<!--统计-->
<select
id=
"doStatisticsLabor"
resultMap=
"tStatisticsLaborMap"
>
select
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,a.SALARY_TAX PERSONAL_TAX,a.ACTUAL_SALARY INCOME,
b.UNIT_NAME DECLARE_UNIT,'一般劳务报酬所得' INCOME_ITEM,'居民身份证' CARD_TYPE
from t_salary_account a
left join t_salary_employee b on b.id = a.EMP_ID
where a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH like '${lastYear}%'
GROUP BY a.EMP_IDCARD
</select>
</mapper>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsRemunerationMapper.xml
View file @
135cebfe
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
<result
property=
"cardType"
column=
"CARD_TYPE"
/>
<result
property=
"cardType"
column=
"CARD_TYPE"
/>
<result
property=
"income"
column=
"INCOME"
/>
<result
property=
"income"
column=
"INCOME"
/>
<result
property=
"personalTax"
column=
"PERSONAL_TAX"
/>
<result
property=
"personalTax"
column=
"PERSONAL_TAX"
/>
<result
property=
"workNo"
column=
"WORK_NO"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a.ID,
a.ID,
...
@@ -42,8 +41,7 @@
...
@@ -42,8 +41,7 @@
a.EMP_IDCARD,
a.EMP_IDCARD,
a.CARD_TYPE,
a.CARD_TYPE,
a.INCOME,
a.INCOME,
a.PERSONAL_TAX,
a.PERSONAL_TAX
a.WORK_NO
</sql>
</sql>
<sql
id=
"tStatisticsRemuneration_where"
>
<sql
id=
"tStatisticsRemuneration_where"
>
<if
test=
"tStatisticsRemuneration != null"
>
<if
test=
"tStatisticsRemuneration != null"
>
...
@@ -71,9 +69,6 @@
...
@@ -71,9 +69,6 @@
<if
test=
"tStatisticsRemuneration.personalTax != null"
>
<if
test=
"tStatisticsRemuneration.personalTax != null"
>
AND a.PERSONAL_TAX = #{tStatisticsRemuneration.personalTax}
AND a.PERSONAL_TAX = #{tStatisticsRemuneration.personalTax}
</if>
</if>
<if
test=
"tStatisticsRemuneration.workNo != null and tStatisticsRemuneration.workNo.trim() != ''"
>
AND a.WORK_NO = #{tStatisticsRemuneration.workNo}
</if>
</if>
</if>
</sql>
</sql>
<!--tStatisticsRemuneration简单分页查询-->
<!--tStatisticsRemuneration简单分页查询-->
...
@@ -85,5 +80,7 @@
...
@@ -85,5 +80,7 @@
1=1
1=1
<include
refid=
"tStatisticsRemuneration_where"
/>
<include
refid=
"tStatisticsRemuneration_where"
/>
</where>
</where>
group by a.EMP_IDCARD,a.DECLARE_MONTH,a.EMP_NAME
order by a.DECLARE_MONTH desc
</select>
</select>
</mapper>
</mapper>
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TForecastLibrary.java
View file @
135cebfe
...
@@ -514,6 +514,19 @@ public class TForecastLibrary extends BaseEntity {
...
@@ -514,6 +514,19 @@ public class TForecastLibrary extends BaseEntity {
@ExcelProperty
(
"数据类型:预估/差额"
)
@ExcelProperty
(
"数据类型:预估/差额"
)
private
String
diffType
;
private
String
diffType
;
/**
* 工资社保结算状态 0: 未结算 1: 待结算 2: 已结算
*/
@ExcelAttribute
(
name
=
"工资社保结算状态"
,
maxLength
=
1
,
isDataId
=
true
,
dataType
=
"settlement_flag"
)
@ExcelProperty
(
"工资社保结算状态"
)
private
String
salarySocialFlag
;
/**
* 工资公积金结算状态 0: 未结算 1: 待结算 2: 已结算
*/
@ExcelAttribute
(
name
=
"工资公积金结算状态"
,
maxLength
=
1
,
isDataId
=
true
,
dataType
=
"settlement_flag"
)
@ExcelProperty
(
"工资公积金结算状态"
)
private
String
salaryFundFlag
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
String
>
idList
;
private
List
<
String
>
idList
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TForecastLibraryController.java
View file @
135cebfe
...
@@ -23,6 +23,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
...
@@ -23,6 +23,8 @@ 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.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
...
@@ -32,6 +34,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
...
@@ -32,6 +34,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
/**
...
@@ -179,5 +182,69 @@ public class TForecastLibraryController {
...
@@ -179,5 +182,69 @@ public class TForecastLibraryController {
tForecastLibraryService
.
everyMonthCreateForecastLibary
();
tForecastLibraryService
.
everyMonthCreateForecastLibary
();
}
}
/**
* @Description: 薪资获取预估库
* @Author: hgw
* @Date: 2022/8/10 18:06
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo>
**/
@Inner
@PostMapping
(
"/inner/selectTForecastBySalaryVo"
)
public
TPaymentVo
selectTForecastBySalaryVo
(
@RequestBody
TPaymentBySalaryVo
tPaymentBySalaryVo
)
{
return
tForecastLibraryService
.
selectTForecastBySalaryVo
(
tPaymentBySalaryVo
);
}
//hgw 以下4个方法,薪资变更缴费库预估库结算状态专用
/**
* @param idList
* @Description: 社保变为结算
* @Author: hgw
* @Date: 2022/8/16 18:22
* @return: int
**/
@Inner
@PostMapping
(
"/inner/updateForecastSocialStatusToSettle"
)
public
int
updateForecastSocialStatusToSettle
(
@RequestBody
List
<
String
>
idList
)
{
return
tForecastLibraryService
.
updateForecastSocialStatusToSettle
(
idList
);
}
/**
* @param idList
* @Description: 社保变为未结算
* @Author: hgw
* @Date: 2022/8/16 18:23
* @return: int
**/
@Inner
@PostMapping
(
"/inner/updateForecastSocialStatusToNoSettle"
)
public
int
updateForecastSocialStatusToNoSettle
(
@RequestBody
List
<
String
>
idList
)
{
return
tForecastLibraryService
.
updateForecastSocialStatusToNoSettle
(
idList
);
}
/**
* @param idList
* @Description: 公积金变为结算
* @Author: hgw
* @Date: 2022/8/16 18:23
* @return: int
**/
@Inner
@PostMapping
(
"/inner/updateForecastFundStatusToSettle"
)
public
int
updateForecastFundStatusToSettle
(
@RequestBody
List
<
String
>
idList
)
{
return
tForecastLibraryService
.
updateForecastFundStatusToSettle
(
idList
);
}
/**
* @param idList
* @Description: 公积金变为未结算
* @Author: hgw
* @Date: 2022/8/16 18:23
* @return: int
**/
@Inner
@PostMapping
(
"/inner/updateForecastFundStatusToNoSettle"
)
public
int
updateForecastFundStatusToNoSettle
(
@RequestBody
List
<
String
>
idList
)
{
return
tForecastLibraryService
.
updateForecastFundStatusToNoSettle
(
idList
);
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
135cebfe
...
@@ -223,4 +223,54 @@ public class TPaymentInfoController {
...
@@ -223,4 +223,54 @@ public class TPaymentInfoController {
public
TPaymentVo
selectTPaymentBySalaryVo
(
@RequestBody
TPaymentBySalaryVo
tPaymentBySalaryVo
)
{
public
TPaymentVo
selectTPaymentBySalaryVo
(
@RequestBody
TPaymentBySalaryVo
tPaymentBySalaryVo
)
{
return
tPaymentInfoService
.
selectTPaymentBySalaryVo
(
tPaymentBySalaryVo
);
return
tPaymentInfoService
.
selectTPaymentBySalaryVo
(
tPaymentBySalaryVo
);
}
}
//hgw 以下4个方法,薪资变更缴费库预估库结算状态专用
/**
* @param idList
* @Description: 社保变为结算
* @Author: hgw
* @Date: 2022/8/16 18:22
* @return: int
**/
@Inner
@PostMapping
(
"/inner/updatePaymentSocialStatusToSettle"
)
public
int
updatePaymentSocialStatusToSettle
(
@RequestBody
List
<
String
>
idList
)
{
return
tPaymentInfoService
.
updatePaymentSocialStatusToSettle
(
idList
);
}
/**
* @param idList
* @Description: 社保变为结算
* @Author: hgw
* @Date: 2022/8/16 18:22
* @return: int
**/
@Inner
@PostMapping
(
"/inner/updatePaymentSocialStatusToNoSettle"
)
public
int
updatePaymentSocialStatusToNoSettle
(
@RequestBody
List
<
String
>
idList
)
{
return
tPaymentInfoService
.
updatePaymentSocialStatusToNoSettle
(
idList
);
}
/**
* @param idList
* @Description: 公积金变为结算
* @Author: hgw
* @Date: 2022/8/16 18:22
* @return: int
**/
@Inner
@PostMapping
(
"/inner/updatePaymentFundStatusToSettle"
)
public
int
updatePaymentFundStatusToSettle
(
@RequestBody
List
<
String
>
idList
)
{
return
tPaymentInfoService
.
updatePaymentFundStatusToSettle
(
idList
);
}
/**
* @param idList
* @Description: 公积金变为未结算
* @Author: hgw
* @Date: 2022/8/16 18:22
* @return: int
**/
@Inner
@PostMapping
(
"/inner/updatePaymentFundStatusToNoSettle"
)
public
int
updatePaymentFundStatusToNoSettle
(
@RequestBody
List
<
String
>
idList
)
{
return
tPaymentInfoService
.
updatePaymentFundStatusToNoSettle
(
idList
);
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TForecastLibraryMapper.java
View file @
135cebfe
...
@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.social.mapper;
...
@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.social.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
...
@@ -51,4 +52,18 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> {
...
@@ -51,4 +52,18 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> {
**/
**/
List
<
TForecastLibraryExportVo
>
exportLibrary
(
@Param
(
"tForecastLibrary"
)
TForecastLibrary
tForecastLibrary
);
List
<
TForecastLibraryExportVo
>
exportLibrary
(
@Param
(
"tForecastLibrary"
)
TForecastLibrary
tForecastLibrary
);
List
<
TPaymentBySalaryVo
>
selectTForecastBySalaryVo
(
@Param
(
"tPaymentInfo"
)
TPaymentBySalaryVo
tPaymentInfo
);
/**
* 更新社保结算状态
* @Author hgw
* @Date 2020-4-13 16:01:59
* @param idList
* @param status
* @return
**/
int
updateForecastSocialStatusByIdList
(
@Param
(
"idList"
)
List
<
String
>
idList
,
@Param
(
"status"
)
String
status
);
int
updateForecastFundStatusByIdList
(
@Param
(
"idList"
)
List
<
String
>
idList
,
@Param
(
"status"
)
String
status
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
View file @
135cebfe
...
@@ -94,4 +94,16 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
...
@@ -94,4 +94,16 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
**/
**/
List
<
TPaymentBySalaryVo
>
selectTPaymentBySalaryVo
(
@Param
(
"tPaymentInfo"
)
TPaymentBySalaryVo
tPaymentInfo
);
List
<
TPaymentBySalaryVo
>
selectTPaymentBySalaryVo
(
@Param
(
"tPaymentInfo"
)
TPaymentBySalaryVo
tPaymentInfo
);
/**
* 更新社保结算状态
* @Author hgw
* @Date 2020-4-13 16:01:59
* @param idList
* @param status
* @return
**/
int
updatePaymentSocialStatusByIdList
(
@Param
(
"idList"
)
List
<
String
>
idList
,
@Param
(
"status"
)
String
status
);
int
updatePaymentFundStatusByIdList
(
@Param
(
"idList"
)
List
<
String
>
idList
,
@Param
(
"status"
)
String
status
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TForecastLibraryService.java
View file @
135cebfe
...
@@ -21,11 +21,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -21,11 +21,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
/**
* 预估费用
* 预估费用
...
@@ -104,4 +107,19 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
...
@@ -104,4 +107,19 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
**/
**/
void
everyMonthCreateForecastLibary
();
void
everyMonthCreateForecastLibary
();
/**
* @param tPaymentBySalaryVo
* @Description: 获取预估库数据
* @Author: hgw
* @Date: 2022/8/16 17:46
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
**/
TPaymentVo
selectTForecastBySalaryVo
(
TPaymentBySalaryVo
tPaymentBySalaryVo
);
// 以下4个方法,薪资变更缴费库预估库结算状态专用
int
updateForecastSocialStatusToSettle
(
List
<
String
>
idList
);
int
updateForecastSocialStatusToNoSettle
(
List
<
String
>
idList
);
int
updateForecastFundStatusToSettle
(
List
<
String
>
idList
);
int
updateForecastFundStatusToNoSettle
(
List
<
String
>
idList
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TPaymentInfoService.java
View file @
135cebfe
...
@@ -122,4 +122,11 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
...
@@ -122,4 +122,11 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
**/
**/
TPaymentVo
selectTPaymentBySalaryVo
(
TPaymentBySalaryVo
tPaymentBySalaryVo
);
TPaymentVo
selectTPaymentBySalaryVo
(
TPaymentBySalaryVo
tPaymentBySalaryVo
);
// 以下4个方法,薪资变更缴费库预估库结算状态专用
int
updatePaymentSocialStatusToSettle
(
List
<
String
>
idList
);
int
updatePaymentSocialStatusToNoSettle
(
List
<
String
>
idList
);
int
updatePaymentFundStatusToSettle
(
List
<
String
>
idList
);
int
updatePaymentFundStatusToNoSettle
(
List
<
String
>
idList
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
135cebfe
...
@@ -29,6 +29,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...
@@ -29,6 +29,8 @@ 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.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
;
import
com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants
;
import
com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAgentConfig
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAgentConfig
;
...
@@ -2067,4 +2069,44 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2067,4 +2069,44 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
}
}
@Override
public
TPaymentVo
selectTForecastBySalaryVo
(
TPaymentBySalaryVo
tPaymentBySalaryVo
)
{
List
<
TPaymentBySalaryVo
>
list
=
baseMapper
.
selectTForecastBySalaryVo
(
tPaymentBySalaryVo
);
TPaymentVo
vo
=
new
TPaymentVo
();
vo
.
setPaymentList
(
list
);
return
vo
;
}
@Override
public
int
updateForecastSocialStatusToSettle
(
List
<
String
>
idList
)
{
if
(
idList
!=
null
&&
!
idList
.
isEmpty
())
{
return
baseMapper
.
updateForecastSocialStatusByIdList
(
idList
,
CommonConstants
.
ONE_STRING
);
}
return
0
;
}
@Override
public
int
updateForecastSocialStatusToNoSettle
(
List
<
String
>
idList
)
{
if
(
idList
!=
null
&&
!
idList
.
isEmpty
())
{
return
baseMapper
.
updateForecastSocialStatusByIdList
(
idList
,
CommonConstants
.
ZERO_STRING
);
}
return
0
;
}
@Override
public
int
updateForecastFundStatusToSettle
(
List
<
String
>
idList
)
{
if
(
idList
!=
null
&&
!
idList
.
isEmpty
())
{
return
baseMapper
.
updateForecastFundStatusByIdList
(
idList
,
CommonConstants
.
ONE_STRING
);
}
return
0
;
}
@Override
public
int
updateForecastFundStatusToNoSettle
(
List
<
String
>
idList
)
{
if
(
idList
!=
null
&&
!
idList
.
isEmpty
())
{
return
baseMapper
.
updateForecastFundStatusByIdList
(
idList
,
CommonConstants
.
ZERO_STRING
);
}
return
0
;
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
135cebfe
...
@@ -2345,4 +2345,36 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2345,4 +2345,36 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
vo
.
setPaymentList
(
list
);
vo
.
setPaymentList
(
list
);
return
vo
;
return
vo
;
}
}
@Override
public
int
updatePaymentSocialStatusToSettle
(
List
<
String
>
idList
)
{
if
(
idList
!=
null
&&
!
idList
.
isEmpty
())
{
return
baseMapper
.
updatePaymentSocialStatusByIdList
(
idList
,
CommonConstants
.
ONE_STRING
);
}
return
0
;
}
@Override
public
int
updatePaymentSocialStatusToNoSettle
(
List
<
String
>
idList
)
{
if
(
idList
!=
null
&&
!
idList
.
isEmpty
())
{
return
baseMapper
.
updatePaymentSocialStatusByIdList
(
idList
,
CommonConstants
.
ZERO_STRING
);
}
return
0
;
}
@Override
public
int
updatePaymentFundStatusToSettle
(
List
<
String
>
idList
)
{
if
(
idList
!=
null
&&
!
idList
.
isEmpty
())
{
return
baseMapper
.
updatePaymentFundStatusByIdList
(
idList
,
CommonConstants
.
ONE_STRING
);
}
return
0
;
}
@Override
public
int
updatePaymentFundStatusToNoSettle
(
List
<
String
>
idList
)
{
if
(
idList
!=
null
&&
!
idList
.
isEmpty
())
{
return
baseMapper
.
updatePaymentFundStatusByIdList
(
idList
,
CommonConstants
.
ZERO_STRING
);
}
return
0
;
}
}
}
yifu-social/yifu-social-biz/src/main/resources/META-INF/spring.factories.txt
deleted
100644 → 0
View file @
bc003539
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.archives.config.FddAutoConfigue
\ No newline at end of file
yifu-social/yifu-social-biz/src/main/resources/mapper/TForecastLibraryMapper.xml
View file @
135cebfe
...
@@ -102,6 +102,8 @@
...
@@ -102,6 +102,8 @@
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"salarySocialFlag"
column=
"SALARY_SOCIAL_FLAG"
/>
<result
property=
"salaryFundFlag"
column=
"SALARY_FUND_FLAG"
/>
</resultMap>
</resultMap>
<!-- 导出 -->
<!-- 导出 -->
<resultMap
id=
"exportMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo"
>
<resultMap
id=
"exportMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo"
>
...
@@ -244,6 +246,8 @@
...
@@ -244,6 +246,8 @@
a.CREATE_NAME,
a.CREATE_NAME,
a.CREATE_TIME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_BY,
a.SALARY_SOCIAL_FLAG,
a.SALARY_FUND_FLAG,
a.UPDATE_TIME
a.UPDATE_TIME
</sql>
</sql>
<sql
id=
"tForecastLibrary_where"
>
<sql
id=
"tForecastLibrary_where"
>
...
@@ -578,4 +582,84 @@
...
@@ -578,4 +582,84 @@
limit #{tForecastLibrary.limitStart},#{tForecastLibrary.limitEnd}
limit #{tForecastLibrary.limitStart},#{tForecastLibrary.limitEnd}
</if>
</if>
</select>
</select>
<!--洪光武2022-8-10 18:05:42-->
<resultMap
id=
"tPaymentBySalaryMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"unitBitmailmentFee"
column=
"UNIT_BIGMAILMENT_MONEY"
/>
<result
property=
"unitSocialSum"
column=
"UNIT_SOCIAL_SUM"
/>
<result
property=
"personalSocialSum"
column=
"SOCIAL_SECURITY_PERSONAL_SUM"
/>
<result
property=
"unitFundSum"
column=
"UNIT_PROVIDENT_SUM"
/>
<result
property=
"personalFundSum"
column=
"PERSONAL_PROVIDENT_SUM"
/>
<result
property=
"salarySocialFlag"
column=
"SALARY_SOCIAL_FLAG"
/>
<result
property=
"salaryFundFlag"
column=
"SALARY_FUND_FLAG"
/>
<result
property=
"socialPayMonth"
column=
"SOCIAL_PAY_MONTH"
/>
<result
property=
"socialCreateMonth"
column=
"SOCIAL_CREATE_MONTH"
/>
<result
property=
"providentPayMonth"
column=
"PROVIDENT_PAY_MONTH"
/>
<result
property=
"providentCreateMonth"
column=
"PROVIDENT_CREATE_MONTH"
/>
<result
property=
"settleDomainId"
column=
"SETTLE_DOMAIN_ID"
/>
</resultMap>
<!-- 薪资获取缴费库 -->
<select
id=
"selectTForecastBySalaryVo"
resultMap=
"tPaymentBySalaryMap"
>
SELECT
a.id,
a.EMP_IDCARD,
sum(ifnull(a.UNIT_BITAILMENT_FEE,0)) UNIT_BIGMAILMENT_MONEY,
sum(ifnull(a.UNIT_SOCIAL_SUM,0)) UNIT_SOCIAL_SUM,
sum(ifnull(a.PERSONAL_SOCIAL_SUM,0)) SOCIAL_SECURITY_PERSONAL_SUM,
sum(ifnull(a.UNIT_FUND_SUM,0)) UNIT_PROVIDENT_SUM,
sum(ifnull(a.PERSONAL_FUND_SUM,0)) PERSONAL_PROVIDENT_SUM,
a.SALARY_SOCIAL_FLAG,
a.SALARY_FUND_FLAG,
a.SOCIAL_PAY_MONTH,
a.SOCIAL_CREATE_MONTH,
a.PROVIDENT_PAY_MONTH,
a.PROVIDENT_CREATE_MONTH,
a.SETTLE_DOMAIN_ID
FROM t_forecast_library a
<where>
1=1
<if
test=
"tPaymentInfo != null"
>
<if
test=
"tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''"
>
AND a.SOCIAL_PAY_MONTH = #{tPaymentInfo.socialPayMonth}
</if>
<if
test=
"tPaymentInfo.socialCreateMonth != null and tPaymentInfo.socialCreateMonth.trim() != ''"
>
AND a.SOCIAL_CREATE_MONTH = #{tPaymentInfo.socialCreateMonth}
</if>
<if
test=
"tPaymentInfo.providentPayMonth != null and tPaymentInfo.providentPayMonth.trim() != ''"
>
AND a.PROVIDENT_PAY_MONTH = #{tPaymentInfo.providentPayMonth}
</if>
<if
test=
"tPaymentInfo.providentCreateMonth != null and tPaymentInfo.providentCreateMonth.trim() != ''"
>
AND a.PROVIDENT_CREATE_MONTH = #{tPaymentInfo.providentCreateMonth}
</if>
<if
test=
"tPaymentInfo.settleDomainId != null and tPaymentInfo.settleDomainId.trim() != ''"
>
AND a.SETTLE_DOMAIN_ID = #{tPaymentInfo.settleDomainId}
</if>
</if>
</where>
GROUP BY a.EMP_IDCARD
</select>
<!-- 更改薪资社保结算状态 -->
<update
id=
"updateForecastSocialStatusByIdList"
>
update t_forecast_library set SALARY_SOCIAL_FLAG = #{status}
where
ID in
<foreach
item=
"item"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</update>
<!-- 更改薪资公积金结算状态 -->
<update
id=
"updateForecastFundStatusByIdList"
>
update t_forecast_library set SALARY_FUND_FLAG = #{status}
where
ID in
<foreach
item=
"item"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</update>
</mapper>
</mapper>
yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
View file @
135cebfe
...
@@ -1032,4 +1032,25 @@
...
@@ -1032,4 +1032,25 @@
</where>
</where>
GROUP BY a.EMP_IDCARD
GROUP BY a.EMP_IDCARD
</select>
</select>
<!-- 更改薪资社保结算状态 -->
<update
id=
"updatePaymentSocialStatusByIdList"
>
update t_payment_info set SALARY_SOCIAL_FLAG = #{status}
where
ID in
<foreach
item=
"item"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</update>
<!-- 更改薪资公积金结算状态 -->
<update
id=
"updatePaymentFundStatusByIdList"
>
update t_payment_info set SALARY_FUND_FLAG = #{status}
where
ID in
<foreach
item=
"item"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</update>
</mapper>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment