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
c448ec09
Commit
c448ec09
authored
Nov 08, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
6222be69
33cce394
Hide whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
807 additions
and
427 deletions
+807
-427
ArchivesConstants.java
...ud/plus/v1/yifu/archives/constants/ArchivesConstants.java
+4
-0
TEmployeeContractInfo.java
...d/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
+26
-0
EmployeeContractExportAuditVO.java
...us/v1/yifu/archives/vo/EmployeeContractExportAuditVO.java
+77
-131
EmployeeContractExportVO.java
...ud/plus/v1/yifu/archives/vo/EmployeeContractExportVO.java
+14
-1
TEmployeeContractSearchVo.java
...d/plus/v1/yifu/archives/vo/TEmployeeContractSearchVo.java
+59
-0
TEmployeeContractInfoController.java
.../archives/controller/TEmployeeContractInfoController.java
+12
-6
TEmployeeContractInfoMapper.java
.../v1/yifu/archives/mapper/TEmployeeContractInfoMapper.java
+6
-0
TEmployeeContractInfoService.java
...1/yifu/archives/service/TEmployeeContractInfoService.java
+2
-1
TEmpBadRecordServiceImpl.java
.../yifu/archives/service/impl/TEmpBadRecordServiceImpl.java
+4
-2
TEmpContractAlertServiceImpl.java
...u/archives/service/impl/TEmpContractAlertServiceImpl.java
+4
-2
TEmployeeContractAreaResServiceImpl.java
...ves/service/impl/TEmployeeContractAreaResServiceImpl.java
+4
-2
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+107
-5
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+5
-2
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+4
-2
TEmployeeContractInfoMapper.xml
...src/main/resources/mapper/TEmployeeContractInfoMapper.xml
+83
-4
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+1
-1
TEmployeeProjectMapper.xml
...-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
+4
-4
ekpInsuranceConfig.properties
...mmon-ekp/src/main/resources/ekpInsuranceConfig.properties
+2
-1
ekpOrderConfig.properties
...u-common-ekp/src/main/resources/ekpOrderConfig.properties
+2
-1
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+4
-0
TInsuranceCompany.java
...oud/plus/v1/yifu/insurances/entity/TInsuranceCompany.java
+24
-0
InsuranceRegisterParam.java
...ud/plus/v1/yifu/insurances/vo/InsuranceRegisterParam.java
+6
-0
TInsuranceAreaResServiceImpl.java
.../service/insurance/impl/TInsuranceAreaResServiceImpl.java
+4
-2
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+63
-140
TInsuranceCompanyMapper.xml
...n/resources/mapper/insurances/TInsuranceCompanyMapper.xml
+6
-1
SysMessageSalaryServiceImpl.java
...yifu/salary/service/impl/SysMessageSalaryServiceImpl.java
+4
-2
THaveSalaryNosocialServiceImpl.java
...u/salary/service/impl/THaveSalaryNosocialServiceImpl.java
+4
-2
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+4
-2
TSalaryEmployeeServiceImpl.java
.../yifu/salary/service/impl/TSalaryEmployeeServiceImpl.java
+4
-2
TStatisticsBonusServiceImpl.java
...yifu/salary/service/impl/TStatisticsBonusServiceImpl.java
+4
-2
TStatisticsCurrentReportServiceImpl.java
...ary/service/impl/TStatisticsCurrentReportServiceImpl.java
+4
-2
TStatisticsDeclarerServiceImpl.java
...u/salary/service/impl/TStatisticsDeclarerServiceImpl.java
+4
-2
TStatisticsLaborServiceImpl.java
...yifu/salary/service/impl/TStatisticsLaborServiceImpl.java
+4
-2
TStatisticsRemunerationServiceImpl.java
...lary/service/impl/TStatisticsRemunerationServiceImpl.java
+4
-2
TStatisticsTaxSalaryServiceImpl.java
.../salary/service/impl/TStatisticsTaxSalaryServiceImpl.java
+4
-2
YFSocialImportThreadPoolExecutor.java
...ncurrent/threadpool/YFSocialImportThreadPoolExecutor.java
+2
-2
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+1
-1
TPaymentInfoService.java
...loud/plus/v1/yifu/social/service/TPaymentInfoService.java
+1
-1
TAuditInfoServiceImpl.java
...us/v1/yifu/social/service/impl/TAuditInfoServiceImpl.java
+4
-2
TDispatchDayConfServiceImpl.java
...yifu/social/service/impl/TDispatchDayConfServiceImpl.java
+4
-2
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+27
-11
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+163
-50
TProvidentFundServiceImpl.java
...1/yifu/social/service/impl/TProvidentFundServiceImpl.java
+4
-2
TSocialFundHistoryServiceImpl.java
...fu/social/service/impl/TSocialFundHistoryServiceImpl.java
+4
-2
TSocialFundInfoServiceImpl.java
.../yifu/social/service/impl/TSocialFundInfoServiceImpl.java
+4
-2
TSocialInfoServiceImpl.java
...s/v1/yifu/social/service/impl/TSocialInfoServiceImpl.java
+4
-2
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+8
-8
TPaymentInfoMapper.xml
...cial-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
+12
-12
TSocialFundInfoMapper.xml
...l-biz/src/main/resources/mapper/TSocialFundInfoMapper.xml
+2
-2
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/constants/ArchivesConstants.java
View file @
c448ec09
...
...
@@ -29,4 +29,8 @@ public class ArchivesConstants {
* 减档减项
*/
public
static
final
String
REDUCE_EMP_PROJECT_CONTENT
=
"减档减项"
;
/**
* 员工合同签订类型
*/
public
static
final
String
[]
contractSituation
=
{
"作废"
,
"离职再入职"
,
"合同未到期重新签订"
,
"正常签订"
,
"商务合同更改"
,
"正常续签"
,
"终止"
};
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
View file @
c448ec09
...
...
@@ -478,4 +478,30 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema
(
description
=
"归档列表查询标志,1:是归档,去除作废、终止两种"
)
private
Integer
isFilePage
;
/**
* @Author fxj
* @Description
* 1、增加“审核类型”,内容为:派增-社保派单、派增-无社保新签、派增-续签、派减-作废、派减-终止
* 2、社保派单过来的合同,审核类型统一为:派增-社保派单;
* 3、合同申请处申请类型为:新签(正常签订)——审核类型为:派增-无社保新签、;续签(合同未到期重新签订、离职再入职、商务合同更改)——审核类型统一为:派增-续签;
* 3、合同申请处申请类型为:作废——审核类型统一为:派减-作废;终止——审核类型统一为:派减-终止;
* @Date 14:50 2022/11/7
**/
@ExcelAttribute
(
name
=
"审核类型"
,
readConverterExp
=
"0=派增,1=派减"
)
@Schema
(
description
=
"审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止"
)
private
String
type
;
/**
* 离职日期
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@ExcelAttribute
(
name
=
"离职日期"
)
@Schema
(
description
=
"离职日期"
,
name
=
"contractEnd"
)
private
String
leaveDate
;
/**
* 减少原因
*/
@ExcelAttribute
(
name
=
"减少原因"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
REDUCE_SOCIAL_REASON
)
@Schema
(
description
=
"减少原因"
,
name
=
"workingHours"
)
private
String
reduceReason
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeContractExportAuditVO.java
View file @
c448ec09
...
...
@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
...
...
@@ -44,189 +45,134 @@ import java.util.Set;
public
class
EmployeeContractExportAuditVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* @Author fxj
* @Description 0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
* 1、增加“审核类型”,内容为:派增-社保派单、派增-无社保新签、派增-续签、派减-作废、派减-终止
* 2、社保派单过来的合同,审核类型统一为:派增-社保派单;
* 3、合同申请处申请类型为:新签(正常签订)——审核类型为:派增-无社保新签、;续签(合同未到期重新签订、离职再入职、商务合同更改)——审核类型统一为:派增-续签;
* 3、合同申请处申请类型为:作废——审核类型统一为:派减-作废;终止——审核类型统一为:派减-终止;
* @Date 14:50 2022/11/7
**/
@ExcelAttribute
(
name
=
"审核类型"
,
readConverterExp
=
"0=派增-社保派单,1=派增-无社保新签,2=派增-续签,3=派减-作废,4=派减-终止"
)
@Schema
(
description
=
"审核类型"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"审核类型"
)
private
String
type
;
@Schema
(
description
=
"申请编号"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"申请编号"
)
private
String
applyNo
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"员工编码"
)
@Length
(
max
=
32
,
message
=
"员工编码不能超过32个字符"
)
@ExcelAttribute
(
name
=
"员工编码"
,
isNotEmpty
=
true
,
errorInfo
=
"员工编码不能为空"
,
maxLength
=
32
)
@Schema
(
description
=
"员工编码"
,
name
=
"empNo"
)
private
String
empNo
;
@ExcelProperty
(
"创建时间"
)
private
String
createTime
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"员工姓名"
)
@Length
(
max
=
32
,
message
=
"员工姓名不能超过32个字符"
)
@ExcelAttribute
(
name
=
"员工姓名"
,
maxLength
=
32
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"员工姓名"
,
maxLength
=
32
)
@Schema
(
description
=
"员工姓名"
,
name
=
"empName"
)
private
String
empName
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"身份证号"
)
@Length
(
max
=
32
,
message
=
"身份证号不能超过32个字符"
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
32
,
isIdCard
=
true
,
needExport
=
true
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
32
)
@Schema
(
description
=
"身份证号"
,
name
=
"empIdcard"
)
private
String
empIdcard
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"合同起始日期"
)
@NotBlank
(
message
=
"合同起始日期不能为空"
)
@ExcelAttribute
(
name
=
"合同起始日期"
,
isNotEmpty
=
true
,
errorInfo
=
"合同起始日期不能为空"
)
@Schema
(
description
=
"合同起始日期"
,
name
=
"contractStart"
)
private
String
contractStart
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"合同截止日期"
)
@ExcelAttribute
(
name
=
"合同截止日期"
,
needExport
=
true
)
@Schema
(
description
=
"合同截止日期"
,
name
=
"contractEnd"
)
private
String
contractEnd
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"档案-省"
)
@ExcelAttribute
(
name
=
"档案-省"
,
maxLength
=
32
,
isArea
=
true
)
@Schema
(
description
=
"档案-省"
,
name
=
"fileProvince"
)
private
String
fileProvince
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"档案-市"
)
@ExcelAttribute
(
name
=
"档案-市"
,
maxLength
=
32
,
isArea
=
true
,
parentField
=
"fileProvince"
)
@Schema
(
description
=
"档案-市"
,
name
=
"fileCity"
)
private
String
fileCity
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"档案-县"
)
@ExcelAttribute
(
name
=
"档案-县"
,
maxLength
=
32
,
isArea
=
true
,
parentField
=
"fileCity"
)
@Schema
(
description
=
"档案-县"
,
name
=
"fileTown"
)
private
String
fileTown
;
@ExcelProperty
(
"客户名称"
)
@ExcelAttribute
(
name
=
"客户名称"
,
maxLength
=
128
)
@Schema
(
description
=
"客户名称"
,
name
=
"subjectDepart"
)
private
String
subjectUnit
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"项目名称"
)
@Length
(
max
=
128
,
message
=
"项目名称不能超过128个字符"
)
@ExcelAttribute
(
name
=
"项目名称"
,
maxLength
=
128
)
@Schema
(
description
=
"项目名称"
,
name
=
"subjectDepart"
)
private
String
subjectDepart
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"项目编码"
)
@Schema
(
description
=
"项目编码"
)
private
String
deptNo
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"员工类型"
)
@ExcelAttribute
(
name
=
"员工类型"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATRUE
)
@Schema
(
description
=
"员工类型(字典值,0外包1派遣2代理3内部员工)"
)
private
String
empNatrue
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"合同类型"
)
@NotBlank
(
message
=
"合同类型不能为空"
)
@Length
(
max
=
32
,
message
=
"合同类型不能超过32个字符"
)
@ExcelAttribute
(
name
=
"合同类型"
,
isNotEmpty
=
true
,
errorInfo
=
"合同类型不能为空"
,
maxLength
=
32
,
needExport
=
true
)
@Schema
(
description
=
"合同类型"
,
name
=
"contractName"
)
private
String
contractName
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"业务细分"
)
@NotBlank
(
message
=
"业务细分不能为空"
)
@Length
(
max
=
32
,
message
=
"业务细分不能超过32个字符"
)
@ExcelAttribute
(
name
=
"业务细分"
,
maxLength
=
32
,
needExport
=
true
)
@Schema
(
description
=
"业务细分"
,
name
=
"contractName"
)
private
String
contractSubName
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"签订类型"
)
@NotBlank
(
message
=
"签订类型不能为空"
)
@Length
(
max
=
1
,
message
=
"签订类型不能超过1个字符"
)
@ExcelAttribute
(
name
=
"签订类型"
,
isNotEmpty
=
true
,
errorInfo
=
"签订类型不能为空"
,
maxLength
=
100
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMPLOYEE_SITUATION_TYPE
)
@ExcelAttribute
(
name
=
"签订类型"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMPLOYEE_SITUATION_TYPE
)
@Schema
(
description
=
"签订类型"
,
name
=
"situation"
)
private
String
situation
;
/**
* 签订期限employee_contract_type
* 0 已完成一定工作任务为期限
* 1 固定期限
* 2 无固定期限
* 原因说明-- 委托备注
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"签订期限"
)
@NotBlank
(
message
=
"签订期限不能为空"
)
@Length
(
max
=
32
,
message
=
"签订期限不能超过32个字符"
)
@ExcelAttribute
(
name
=
"签订期限"
,
isNotEmpty
=
true
,
errorInfo
=
"签订期限不能为空"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMPLOYEE_CONTRACT_TYPE
,
needExport
=
true
)
@Schema
(
description
=
"签订期限"
,
name
=
"contractType"
)
private
String
contractType
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"合同甲方"
)
@ExcelAttribute
(
name
=
"合同甲方"
)
@Schema
(
description
=
"合同甲方"
)
@Size
(
max
=
50
,
message
=
"合同甲方不可超过50位"
)
private
String
contractParty
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"客户名称"
)
@Length
(
max
=
128
,
message
=
"客户名称不能超过128个字符"
)
@ExcelAttribute
(
name
=
"客户名称"
,
maxLength
=
128
)
@Schema
(
description
=
"客户名称"
,
name
=
"subjectUnit"
)
private
String
subjectUnit
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"审核状态"
)
@ExcelAttribute
(
name
=
"审核状态"
,
readConverterExp
=
"0=待提交,1=待审核,2=审核通过,3=审核不通过"
)
@Schema
(
description
=
"审核状态"
)
private
String
auditStatus
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"合同状态"
)
@ExcelAttribute
(
name
=
"合同状态"
,
readConverterExp
=
"0=可用,1=不可用"
)
@Schema
(
description
=
"合同状态"
,
name
=
"inUse"
)
private
String
inUse
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"附件状态"
)
@ExcelAttribute
(
name
=
"附件状态"
)
@Schema
(
description
=
"附件状态"
,
name
=
"isFile"
)
private
String
files
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"归档状态"
)
@ExcelAttribute
(
name
=
"归档状态"
,
readConverterExp
=
"0=已归档,1=未归档"
)
@Schema
(
description
=
"归档状态"
,
name
=
"isFile"
)
private
String
isFile
;
@ExcelAttribute
(
name
=
"原因说明"
,
maxLength
=
200
,
needExport
=
true
)
@Schema
(
description
=
"原因说明"
,
name
=
"reason"
)
@ExcelProperty
(
"原因说明"
)
private
String
reason
;
/**
* 创建者-姓名
*/
@Schema
(
description
=
"创建人"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"创建人"
)
private
String
createName
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"创建时间"
)
private
String
createTime
;
@ExcelProperty
(
"合同起始日期"
)
@ExcelAttribute
(
name
=
"合同起始日期"
,
isNotEmpty
=
true
,
errorInfo
=
"合同起始日期不能为空"
)
@Schema
(
description
=
"合同起始日期"
,
name
=
"contractStart"
)
private
String
contractStart
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"累计签订次数"
)
private
String
createNum
;
@ExcelProperty
(
"合同截止时间"
)
@ExcelAttribute
(
name
=
"合同截止时间"
,
needExport
=
true
)
@Schema
(
description
=
"合同截止时间"
,
name
=
"contractEnd"
)
private
String
contractEnd
;
/**
* 签订期限employee_contract_type
* 0 已完成一定工作任务为期限
* 1 固定期限
* 2 无固定期限
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"首签日期"
)
private
String
startDate
;
@ExcelProperty
(
"签订期限"
)
@ExcelAttribute
(
name
=
"签订期限"
,
isNotEmpty
=
true
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMPLOYEE_CONTRACT_TYPE
,
needExport
=
true
)
@Schema
(
description
=
"签订期限"
,
name
=
"contractType"
)
private
String
contractType
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"最晚到期日期"
)
private
String
endDate
;
/**
* 工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制
*/
@ExcelAttribute
(
name
=
"工时制"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
WORKING_HOURS
)
@Schema
(
description
=
"工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制"
,
name
=
"workingHours"
)
@ExcelProperty
(
"工时制"
)
private
String
workingHours
;
/**
* 离职日期
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"历次记录"
)
private
String
history
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"选中的idList"
)
private
List
<
String
>
idList
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"导出的表头的Set"
)
private
Set
<
String
>
exportFields
;
@ExcelProperty
(
"离职日期"
)
@ExcelAttribute
(
name
=
"离职日期"
)
@Schema
(
description
=
"离职日期"
,
name
=
"contractEnd"
)
private
String
leaveDate
;
/**
* 减少原因
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelAttribute
(
name
=
"减少原因"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
REDUCE_SOCIAL_REASON
)
@Schema
(
description
=
"减少原因"
,
name
=
"workingHours"
)
@ExcelProperty
(
"减少原因"
)
private
String
reduceReason
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeContractExportVO.java
View file @
c448ec09
...
...
@@ -44,7 +44,20 @@ import java.util.Set;
public
class
EmployeeContractExportVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* @Author fxj
* @Description 0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
* 1、增加“审核类型”,内容为:派增-社保派单、派增-无社保新签、派增-续签、派减-作废、派减-终止
* 2、社保派单过来的合同,审核类型统一为:派增-社保派单;
* 3、合同申请处申请类型为:新签(正常签订)——审核类型为:派增-无社保新签、;续签(合同未到期重新签订、离职再入职、商务合同更改)——审核类型统一为:派增-续签;
* 3、合同申请处申请类型为:作废——审核类型统一为:派减-作废;终止——审核类型统一为:派减-终止;
* @Date 14:50 2022/11/7
**/
@ExcelAttribute
(
name
=
"审核类型"
,
readConverterExp
=
"0=派增-社保派单,1=派增-无社保新签,2=派增-续签,3=派减-作废,4=派减-终止"
)
@Schema
(
description
=
"审核类型"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"审核类型"
)
private
String
type
;
@Schema
(
description
=
"申请编号"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"申请编号"
)
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TEmployeeContractSearchVo.java
0 → 100644
View file @
c448ec09
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractAreaRes
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* 合同查询
*
* @author fxj
* @date 2022-11-01 10:30:12
*/
@Data
public
class
TEmployeeContractSearchVo
extends
TEmployeeContractInfo
{
/**
* 多选导出或删除等操作
*/
@Schema
(
description
=
"选中ID,多个逗号分割"
)
private
String
ids
;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema
(
description
=
"创建时间区间"
)
private
LocalDateTime
[]
createTimes
;
/**
* @Author fxj
* 查询数据起
**/
@Schema
(
description
=
"查询limit 开始"
)
private
int
limitStart
;
/**
* @Author fxj
* 查询数据止
**/
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeContractInfoController.java
View file @
c448ec09
...
...
@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractSearchVo
;
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.ErrorMessage
;
...
...
@@ -331,18 +332,23 @@ public class TEmployeeContractInfoController {
}
/**
* 批量导出合同审核
*
* @Author hgw
* @Date 2022-6-24 09:36:06
**/
* @Author fxj
* @Description 批量导出合同审核
* @Date 15:22 2022/11/4
* @Param
* @return
**/
@Operation
(
summary
=
"批量导出合同审核(记得传参mId)employee_export_contract"
,
description
=
"批量导出合同审核 hasPermission('employee_export_contract_audit')"
)
@SysLog
(
"批量导出合同审核"
)
@PostMapping
(
"/exportAuditContractInfo"
)
@PreAuthorize
(
"@pms.hasPermission('employee_export_contract_audit')"
)
public
void
exportAuditContractInfo
(
@RequestBody
(
required
=
false
)
TEmployeeContractInfo
contractInfo
,
HttpServletResponse
response
)
{
public
void
exportAuditContractInfo
(
@RequestBody
(
required
=
false
)
TEmployeeContractSearchVo
contractInfo
,
HttpServletResponse
response
)
{
if
(
Common
.
isEmpty
(
contractInfo
)){
contractInfo
=
new
TEmployeeContractSearchVo
();
}
contractInfo
.
setAuditStatus
(
CommonConstants
.
ONE_INT
);
this
.
setAuth
(
contractInfo
);
tEmployeeContractInfoService
.
exportAuditContractInfo
(
contractInfo
,
response
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeContractInfoMapper.java
View file @
c448ec09
...
...
@@ -21,7 +21,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportAuditVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractSearchVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -81,4 +84,7 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac
**/
String
getContractByApplyNo
(
@Param
(
"applyNo"
)
String
applyNo
);
List
<
EmployeeContractExportAuditVO
>
noPageDiy
(
@Param
(
"tEmployeeContractInfo"
)
TEmployeeContractSearchVo
searchVo
);
int
noPageCountDiy
(
@Param
(
"tEmployeeContractInfo"
)
TEmployeeContractSearchVo
searchVo
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeContractInfoService.java
View file @
c448ec09
...
...
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
...
...
@@ -173,5 +174,5 @@ public interface TEmployeeContractInfoService extends IService<TEmployeeContract
* @Param
* @return
**/
void
exportAuditContractInfo
(
TEmployeeContract
Inf
o
contractInfo
,
HttpServletResponse
response
);
void
exportAuditContractInfo
(
TEmployeeContract
SearchV
o
contractInfo
,
HttpServletResponse
response
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpBadRecordServiceImpl.java
View file @
c448ec09
...
...
@@ -219,19 +219,21 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TEmpBadRecord
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
ExcelUtil
<
TEmpBadRecord
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TEmpBadRecord
>
util
=
new
ExcelUtil
<>(
TEmpBadRecord
.
class
);
util
=
new
ExcelUtil
<>(
TEmpBadRecord
.
class
);
for
(
TEmpBadRecord
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"不良记录"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"不良记录"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpContractAlertServiceImpl.java
View file @
c448ec09
...
...
@@ -117,19 +117,21 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TEmpBadRecord
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
ExcelUtil
<
TEmpContractAlert
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
listDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TEmpContractAlert
>
util
=
new
ExcelUtil
<>(
TEmpContractAlert
.
class
);
util
=
new
ExcelUtil
<>(
TEmpContractAlert
.
class
);
for
(
TEmpContractAlert
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
ArchivesConstants
.
EMP_BAD_RECORD
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
ArchivesConstants
.
EMP_BAD_RECORD
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractAreaResServiceImpl.java
View file @
c448ec09
...
...
@@ -95,19 +95,21 @@ public class TEmployeeContractAreaResServiceImpl extends ServiceImpl<TEmployeeCo
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TEmpContractAreaExportVo
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
ExcelUtil
<
TEmpContractAreaExportVo
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
,
null
,
Common
.
getList
(
searchVo
.
getIds
()),
null
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TEmpContractAreaExportVo
>
util
=
new
ExcelUtil
<>(
TEmpContractAreaExportVo
.
class
);
util
=
new
ExcelUtil
<>(
TEmpContractAreaExportVo
.
class
);
for
(
TEmpContractAreaExportVo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"合同审核权限配置表"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"合同审核权限配置表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
c448ec09
...
...
@@ -17,25 +17,26 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcelFactory
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.read.listener.ReadListener
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants
;
import
com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants
;
import
com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeContractConstants
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractUpdateVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants
;
...
...
@@ -55,6 +56,7 @@ import javax.servlet.ServletOutputStream;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.lang.reflect.Field
;
import
java.math.BigDecimal
;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
...
...
@@ -310,6 +312,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
}
//初始化审核类型 审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
initType
(
tEmployeeContractInfo
);
if
(
Common
.
isEmpty
(
tEmployeeContractInfo
.
getId
()))
{
// 针对编码再做一次重复性校验
String
isCur
=
baseMapper
.
getContractByApplyNo
(
tEmployeeContractInfo
.
getApplyNo
());
...
...
@@ -332,6 +337,34 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
return
R
.
ok
(
null
,
CommonConstants
.
SAVE_SUCCESS
);
}
/**
* @Author fxj
* @Description 初始化审核类型 审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
* @Date 15:28 2022/11/7
**/
private
void
initType
(
TEmployeeContractInfo
tEmployeeContractInfo
)
{
// 初始化审核类型 审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
if
(
ArchivesConstants
.
contractSituation
[
0
].
equals
(
tEmployeeContractInfo
.
getSituation
())){
// 作废
tEmployeeContractInfo
.
setType
(
CommonConstants
.
THREE_STRING
);
}
if
(
ArchivesConstants
.
contractSituation
[
6
].
equals
(
tEmployeeContractInfo
.
getSituation
())){
// 终止
tEmployeeContractInfo
.
setType
(
CommonConstants
.
FOUR_STRING
);
}
if
(
ArchivesConstants
.
contractSituation
[
1
].
equals
(
tEmployeeContractInfo
.
getSituation
())
||
ArchivesConstants
.
contractSituation
[
2
].
equals
(
tEmployeeContractInfo
.
getSituation
())
||
ArchivesConstants
.
contractSituation
[
4
].
equals
(
tEmployeeContractInfo
.
getSituation
())
||
ArchivesConstants
.
contractSituation
[
5
].
equals
(
tEmployeeContractInfo
.
getSituation
())){
// 离职再入职 合同未到期重新签订 商务合同更改 正常续签
tEmployeeContractInfo
.
setType
(
CommonConstants
.
TWO_STRING
);
}
if
(
ArchivesConstants
.
contractSituation
[
3
].
equals
(
tEmployeeContractInfo
.
getSituation
())){
//正常签订
tEmployeeContractInfo
.
setType
(
CommonConstants
.
ONE_STRING
);
}
}
/**
* @param tEmployeeContractInfo
* @Description: 更新附件的合同id
...
...
@@ -984,8 +1017,77 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
@Override
public
void
exportAuditContractInfo
(
TEmployeeContractInfo
contractInfo
,
HttpServletResponse
response
)
{
public
void
exportAuditContractInfo
(
TEmployeeContractSearchVo
searchVo
,
HttpServletResponse
response
)
{
String
fileName
=
"合同审核批量导出"
+
DateUtil
.
getThisTime
()
+
CommonConstants
.
XLSX
;
//获取要导出的列表
List
<
EmployeeContractExportAuditVO
>
list
=
new
ArrayList
<>();
//获取要导出的列表
searchVo
.
setAuditStatus
(
CommonConstants
.
ONE_INT
);
searchVo
.
setIdList
(
Common
.
getList
(
searchVo
.
getIds
()));
long
count
=
noPageCountDiy
(
searchVo
);
ServletOutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
EmployeeContractExportAuditVO
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
Field
[]
allFields
=
EmployeeContractExportAuditVO
.
class
.
getDeclaredFields
();
WriteSheet
writeSheet
;
ExcelUtil
<
EmployeeContractExportAuditVO
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
util
=
new
ExcelUtil
<>(
EmployeeContractExportAuditVO
.
class
);
for
(
EmployeeContractExportAuditVO
vo:
list
){
util
.
convertEntityAsso
(
vo
,
null
,
null
,
null
,
allFields
);
}
}
if
(
Common
.
isNotNull
(
list
)){
writeSheet
=
EasyExcel
.
writerSheet
(
"合同审核批量导出"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"合同审核批量导出"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
){
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
private
List
<
EmployeeContractExportAuditVO
>
noPageDiy
(
TEmployeeContractSearchVo
searchVo
)
{
return
baseMapper
.
noPageDiy
(
searchVo
);
}
private
int
noPageCountDiy
(
TEmployeeContractSearchVo
searchVo
)
{
return
baseMapper
.
noPageCountDiy
(
searchVo
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
c448ec09
...
...
@@ -2011,19 +2011,21 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
Field
[]
allFields
=
EmployeeExportVO
.
class
.
getDeclaredFields
();
WriteSheet
writeSheet
;
ExcelUtil
<
EmployeeExportVO
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
EmployeeExportVO
>
util
=
new
ExcelUtil
<>(
EmployeeExportVO
.
class
);
util
=
new
ExcelUtil
<>(
EmployeeExportVO
.
class
);
for
(
EmployeeExportVO
vo:
list
){
util
.
convertEntityAsso
(
vo
,
null
,
null
,
null
,
allFields
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"人员档案批量导出"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"人员档案批量导出"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
@@ -2270,6 +2272,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
contract
.
setInUse
(
CommonConstants
.
ONE_STRING
);
contract
.
setIsObsolete
(
CommonConstants
.
ZERO_ONE
);
contract
.
setDispatchFlag
(
CommonConstants
.
ONE_STRING
);
contract
.
setType
(
CommonConstants
.
ZERO_STRING
);
contractServicer
.
save
(
contract
);
contractAdd
.
setId
(
contract
.
getId
());
contractAdd
.
setEmpNo
(
contract
.
getEmpNo
());
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
c448ec09
...
...
@@ -1195,19 +1195,21 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
Field
[]
allFields
=
EmployeeProjectExportVO
.
class
.
getDeclaredFields
();
WriteSheet
writeSheet
;
ExcelUtil
<
EmployeeProjectExportVO
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
EmployeeProjectExportVO
>
util
=
new
ExcelUtil
<>(
EmployeeProjectExportVO
.
class
);
util
=
new
ExcelUtil
<>(
EmployeeProjectExportVO
.
class
);
for
(
EmployeeProjectExportVO
vo:
list
){
util
.
convertEntityAsso
(
vo
,
null
,
null
,
null
,
allFields
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"项目档案批量导出"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"项目档案批量导出"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeContractInfoMapper.xml
View file @
c448ec09
...
...
@@ -80,8 +80,31 @@
<result
property=
"reason"
column=
"REASON"
/>
<result
property=
"auditTimeLast"
column=
"AUDIT_TIME_LAST"
/>
<result
property=
"type"
column=
"TYPE"
/>
<result
property=
"leaveDate"
column=
"LEAVE_DATE"
/>
<result
property=
"reduceReason"
column=
"REDUCE_REASON"
/>
</resultMap>
<!-- 合同审核导出 -->
<resultMap
id=
"empContractExportAuditMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportAuditVO"
>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"contractName"
column=
"CONTRACT_NAME"
/>
<result
property=
"contractType"
column=
"CONTRACT_TYPE"
/>
<result
property=
"contractEnd"
column=
"CONTRACT_END"
/>
<result
property=
"subjectDepart"
column=
"SUBJECT_DEPART"
/>
<result
property=
"subjectUnit"
column=
"SUBJECT_UNIT"
/>
<result
property=
"situation"
column=
"SITUATION"
/>
<result
property=
"workingHours"
column=
"WORKING_HOURS"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"contractSubName"
column=
"CONTRACT_SUB_NAME"
/>
<result
property=
"reason"
column=
"REASON"
/>
<result
property=
"type"
column=
"TYPE"
/>
<result
property=
"leaveDate"
column=
"LEAVE_DATE"
/>
<result
property=
"reduceReason"
column=
"REDUCE_REASON"
/>
</resultMap>
<!-- 合同导出 -->
<resultMap
id=
"tEmployeeContrctInfoExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO"
>
<result
property=
"applyNo"
column=
"APPLY_NO"
/>
...
...
@@ -112,6 +135,7 @@
<result
property=
"startDate"
column=
"START_DATE"
/>
<result
property=
"endDate"
column=
"END_DATE"
/>
<result
property=
"history"
column=
"HISTORY"
/>
<result
property=
"type"
column=
"TYPE"
/>
</resultMap>
...
...
@@ -171,7 +195,10 @@
a.CONTRACT_PARTY,
a.CONTRACT_SUB_NAME,
a.REASON,
a.AUDIT_TIME_LAST
a.AUDIT_TIME_LAST,
a.TYPE,
a.LEAVE_DATE,
a.REDUCE_REASON
</sql>
...
...
@@ -214,6 +241,9 @@
<if
test=
"tEmployeeContractInfo.id != null and tEmployeeContractInfo.id.trim() != ''"
>
AND a.ID = #{tEmployeeContractInfo.id}
</if>
<if
test=
"tEmployeeContractInfo.type != null and tEmployeeContractInfo.type.trim() != ''"
>
AND a.type = #{tEmployeeContractInfo.type}
</if>
<if
test=
"tEmployeeContractInfo.empNo != null and tEmployeeContractInfo.empNo.trim() != ''"
>
AND a.EMP_NO = #{tEmployeeContractInfo.empNo}
</if>
...
...
@@ -221,10 +251,10 @@
AND a.EMP_ID = #{tEmployeeContractInfo.empId}
</if>
<if
test=
"tEmployeeContractInfo.empName != null and tEmployeeContractInfo.empName.trim() != ''"
>
AND a.EMP_NAME
= #{tEmployeeContractInfo.empName}
AND a.EMP_NAME
like concat('%',#{tEmployeeContractInfo.empName},'%')
</if>
<if
test=
"tEmployeeContractInfo.empIdcard != null and tEmployeeContractInfo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD
= #{tEmployeeContractInfo.empIdcard}
AND a.EMP_IDCARD
like concat('%',#{tEmployeeContractInfo.empIdcard},'%')
</if>
<if
test=
"tEmployeeContractInfo.contractName != null and tEmployeeContractInfo.contractName.trim() != ''"
>
AND a.CONTRACT_NAME = #{tEmployeeContractInfo.contractName}
...
...
@@ -419,7 +449,7 @@
<!--导出-->
<select
id=
"getTEmployeeContractExport"
resultMap=
"tEmployeeContrctInfoExportMap"
>
SELECT
<include
refid=
"Base_Export_Column_List"
/>
<include
refid=
"Base_Export_Column_List"
/>
,a.type
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0
...
...
@@ -478,4 +508,53 @@
SELECT e.id FROM t_employee_contract_info e where e.APPLY_NO = #{applyNo}
</select>
<!--tEmployeeContractInfo简单分页查询审核导出fxj-2022-11-04-->
<select
id=
"noPageDiy"
resultMap=
"empContractExportAuditMap"
>
SELECT
a.EMP_NAME,
a.EMP_IDCARD,
a.CONTRACT_NAME,
a.CONTRACT_TYPE,
a.CONTRACT_START,
a.CONTRACT_END,
a.SUBJECT_DEPART,
a.SUBJECT_UNIT,
a.SITUATION,
a.WORKING_HOURS,
a.CREATE_NAME,
a.CREATE_TIME,
a.CONTRACT_SUB_NAME,
a.REASON,
a.TYPE,
a.LEAVE_DATE,
a.REDUCE_REASON
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0
<include
refid=
"tEmployeeContractInfo_where"
/>
<if
test=
"tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''"
>
${tEmployeeContractInfo.authSql}
</if>
</where>
order by a.CREATE_TIME desc
<if
test=
"tEmployeeContractInfo != null"
>
<if
test=
"tEmployeeContractInfo.limitStart != null"
>
limit #{tEmployeeContractInfo.limitStart},#{tEmployeeContractInfo.limitEnd}
</if>
</if>
</select>
<!--tEmployeeContractInfo简单分页查询审核导出fxj-2022-11-04-->
<select
id=
"noPageCountDiy"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0
<include
refid=
"tEmployeeContractInfo_where"
/>
<if
test=
"tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''"
>
${tEmployeeContractInfo.authSql}
</if>
</where>
</select>
</mapper>
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
c448ec09
...
...
@@ -295,7 +295,7 @@
AND a.EMP_NAME like concat('%',#{tEmployeeInfo.empName},'%')
</if>
<if
test=
"tEmployeeInfo.empIdcard != null and tEmployeeInfo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD
= #{tEmployeeInfo.empIdcard}
AND a.EMP_IDCARD
like concat('%',#{tEmployeeInfo.empIdcard},'%')
</if>
<if
test=
"tEmployeeInfo.nameOrIdcard != null and tEmployeeInfo.nameOrIdcard.trim() != ''"
>
AND (
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
View file @
c448ec09
...
...
@@ -246,10 +246,10 @@
AND a.EMP_NATRUE in (${tEmployeeProject.empNatrue})
</if>
<if
test=
"tEmployeeProject.empName != null and tEmployeeProject.empName.trim() != ''"
>
AND a.EMP_NAME
= #{tEmployeeProject.empName}
AND a.EMP_NAME
like concat('%',#{tEmployeeProject.empName},'%')
</if>
<if
test=
"tEmployeeProject.empIdcard != null and tEmployeeProject.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD
= #{tEmployeeProject.empIdcard}
AND a.EMP_IDCARD
like concat('%',#{tEmployeeProject.empIdcard},'%')
</if>
<if
test=
"tEmployeeProject.bankName != null and tEmployeeProject.bankName.trim() != ''"
>
AND a.BANK_NAME = #{tEmployeeProject.bankName}
...
...
@@ -430,10 +430,10 @@
AND a.EMP_NATRUE in (${tEmployeeProject.empNatrue})
</if>
<if
test=
"tEmployeeProject.empName != null and tEmployeeProject.empName.trim() != ''"
>
AND a.EMP_NAME
= #{tEmployeeProject.empName}
AND a.EMP_NAME
like concat('%',#{tEmployeeProject.empName},'%')
</if>
<if
test=
"tEmployeeProject.empIdcard != null and tEmployeeProject.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD
= #{tEmployeeProject.empIdcard}
AND a.EMP_IDCARD
like concat('%',#{tEmployeeProject.empIdcard},'%')
</if>
<if
test=
"tEmployeeProject.bankName != null and tEmployeeProject.bankName.trim() != ''"
>
AND a.BANK_NAME = #{tEmployeeProject.bankName}
...
...
yifu-common/yifu-common-ekp/src/main/resources/ekpInsuranceConfig.properties
View file @
c448ec09
insurance.insuranceUrl
=
http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel
#insurance.insuranceUrl=http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel
insurance.insuranceUrl
=
http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
insurance.insuranceFdModelId
=
181d73279372e5a55438a47d7436ab7e
insurance.insuranceFdFlowId
=
18267f206233f29cbd3c5ee425c9408a
insurance.insuranceDocStatus
=
20
...
...
yifu-common/yifu-common-ekp/src/main/resources/ekpOrderConfig.properties
View file @
c448ec09
ekporder.url
=
http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel
#ekporder.url=http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel
ekporder.url
=
http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
ekporder.orderFdModelId
=
182f1b7ffe2e96f975564e44e559847d
ekporder.orderFdFlowId
=
182f1c098ce991ca96bc927408792beb
ekporder.replyFdModelId
=
182f1bb35bb2156fb9a02904bc88dd8a
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
c448ec09
...
...
@@ -277,6 +277,10 @@ public class InsurancesConstants {
* 购买标准不存在
*/
public
static
final
String
BUY_STANDARD_NOT_EXIST
=
"购买标准不存在"
;
/**
* 购买标准格式错误
*/
public
static
final
String
BUY_STANDARD_PARSE_ERROR
=
"购买标准格式错误"
;
/**
* 商险购买地省名称不能为空
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceCompany.java
View file @
c448ec09
...
...
@@ -70,4 +70,28 @@ public class TInsuranceCompany extends BaseEntity {
@Schema
(
description
=
"是否删除 0否/1是"
)
private
Integer
deleteFlag
;
/**
* 商险办理省code
*/
@Schema
(
description
=
"商险办理省code"
)
private
Integer
insuranceHandleProvince
;
/**
* 商险办理省
*/
@Schema
(
description
=
"商险办理省"
)
private
String
insuranceHandleProvinceName
;
/**
* 商险办理城市code
*/
@Schema
(
description
=
"商险办理城市code"
)
private
Integer
insuranceHandleCity
;
/**
* 商险办理城市
*/
@Schema
(
description
=
"商险办理城市"
)
private
String
insuranceHandleCityName
;
}
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRegisterParam.java
View file @
c448ec09
...
...
@@ -50,6 +50,12 @@ public class InsuranceRegisterParam implements Serializable {
@Schema
(
description
=
"保单结束时间"
)
private
String
policyEnd
;
/**
* 购买标准
*/
@Schema
(
description
=
"购买标准"
)
private
String
buyStandard
;
/**
* 保单编号
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceAreaResServiceImpl.java
View file @
c448ec09
...
...
@@ -94,19 +94,21 @@ public class TInsuranceAreaResServiceImpl extends ServiceImpl<TInsuranceAreaResM
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TInsuranceAreaExportVo
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
ExcelUtil
<
TInsuranceAreaExportVo
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
,
null
,
Common
.
getList
(
searchVo
.
getIds
()),
null
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TInsuranceAreaExportVo
>
util
=
new
ExcelUtil
<>(
TInsuranceAreaExportVo
.
class
);
util
=
new
ExcelUtil
<>(
TInsuranceAreaExportVo
.
class
);
for
(
TInsuranceAreaExportVo
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"商险办理权限配置表"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"商险办理权限配置表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
c448ec09
...
...
@@ -234,9 +234,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceList
=
baseMapper
.
getInsuranceList
(
param
);
// 购买月数
if
(
CollectionUtils
.
isNotEmpty
(
insuranceList
)){
if
(
insuranceList
.
size
()
>
CommonConstants
.
EXPORT_TWENTY_THOUSAND
){
/*
if(insuranceList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}
}
*/
insuranceList
.
stream
().
forEach
(
e
->{
e
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
e
.
getPolicyStart
().
toString
(),
e
.
getPolicyEnd
().
toString
()));
});
...
...
@@ -657,7 +657,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种 + 保单开始日期~保单结束日期
区间
是唯一(剔除退回、过期状态的记录)
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种 + 保单开始日期~保单结束日期 是唯一(剔除退回、过期状态的记录)
//待投保、投保中、已投保(有效、未过期)
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
...
...
@@ -687,43 +687,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()
&&
!
insuranceDetail
.
getId
().
equals
(
param
.
getId
())){
return
R
.
failed
(
InsurancesConstants
.
DATA_IS_EXIST
);
}
//时间区间
TInsuranceDetail
insuranceDetailBetween
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
wrapper
->
wrapper
.
and
(
s
->
s
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
)
.
or
(
e
->
e
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
insuranceDetailBetween
).
isPresent
()
&&
!
insuranceDetailBetween
.
getId
().
equals
(
param
.
getId
())){
return
R
.
failed
(
"当前员工在["
+
insuranceDetailBetween
.
getPolicyStart
()+
"-"
+
insuranceDetailBetween
.
getPolicyEnd
()+
"]期间内有投保记录"
);
}
BeanCopyUtils
.
copyProperties
(
param
,
byId
);
//投保状态:待投保
byId
.
setBuyHandleStatus
(
CommonConstants
.
ONE_INT
);
...
...
@@ -819,6 +782,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//购买周期
String
buyCycle
=
month
+
"个月/"
+
day
+
"天"
;
insuranceDetailVO
.
setBuyCycle
(
buyCycle
);
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
if
(
CommonConstants
.
THREE_INT
==
insuranceDetailVO
.
getBuyType
()){
if
(
Objects
.
isNull
(
insuranceDetailVO
.
getPolicyEffect
())){
insuranceDetailVO
.
setBuyCycle
(
null
);
}
else
{
day
=
LocalDateUtil
.
betweenDay
(
insuranceDetailVO
.
getPolicyEffect
().
toString
(),
insuranceDetailVO
.
getPolicyEnd
().
toString
());
month
=
LocalDateUtil
.
betweenMonth
(
insuranceDetailVO
.
getPolicyEffect
().
toString
(),
insuranceDetailVO
.
getPolicyEnd
().
toString
());
buyCycle
=
month
+
"个月/"
+
day
+
"天"
;
insuranceDetailVO
.
setBuyCycle
(
buyCycle
);
}
}
//派单类型
insuranceDetailVO
.
setDistributeType
(
insuranceDetailVO
.
getReduceHandleStatus
()
==
null
?
insuranceDetailVO
.
getBuyType
():
CommonConstants
.
FIVE_INT
);
//派单状态
...
...
@@ -863,9 +837,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
insuranceDetailVO
.
getDeptNo
()));
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
ProjectSetInfoVo
jsonObject
=
data
.
get
(
insuranceDetailVO
.
getDeptNo
());
if
(
null
!=
jsonObject
){
insuranceDetailVO
.
setInvoiceTitle
(
Optional
.
ofNullable
(
jsonObject
.
getInvoiceTitleInsurance
()).
orElse
(
""
));
if
(
Objects
.
nonNull
(
data
)){
ProjectSetInfoVo
jsonObject
=
data
.
get
(
insuranceDetailVO
.
getDeptNo
());
if
(
null
!=
jsonObject
){
insuranceDetailVO
.
setInvoiceTitle
(
Optional
.
ofNullable
(
jsonObject
.
getInvoiceTitleInsurance
()).
orElse
(
""
));
}
}
}
}
...
...
@@ -923,9 +899,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceExportList
=
baseMapper
.
getInsuranceExportList
(
param
);
}
if
(
CollectionUtils
.
isNotEmpty
(
insuranceExportList
)){
if
(
insuranceExportList
.
size
()
>
CommonConstants
.
EXPORT_TWENTY_THOUSAND
){
/*
if(insuranceExportList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}
}
*/
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceExportList
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
...
...
@@ -1344,12 +1320,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//按天
//计算起止时间的天数
long
day
=
LocalDateUtil
.
betweenDay
(
detail
.
getPolicyStart
().
toString
(),
detail
.
getPolicyEnd
().
toString
());
//预估保费 = (购买标准 / 365) * 天数
BigDecimal
estimatePremium
=
new
BigDecimal
(
detail
.
getBuyStandard
()).
multiply
(
new
BigDecimal
(
day
)).
divide
(
new
BigDecimal
(
"365"
),
CommonConstants
.
TWO_INT
,
BigDecimal
.
ROUND_HALF_UP
);
detail
.
setEstimatePremium
(
estimatePremium
);
if
(
detail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
day
=
LocalDateUtil
.
betweenDay
(
detail
.
getPolicyEffect
().
toString
(),
detail
.
getPolicyEnd
().
toString
());
}
//预估保费 = (购买标准 / 365) * 天数
BigDecimal
estimatePremium
=
new
BigDecimal
(
detail
.
getBuyStandard
()).
multiply
(
new
BigDecimal
(
day
)).
divide
(
new
BigDecimal
(
"365"
),
CommonConstants
.
TWO_INT
,
BigDecimal
.
ROUND_HALF_UP
);
detail
.
setEstimatePremium
(
estimatePremium
);
//记录状态均置为「已投保」
detail
.
setBuyHandleStatus
(
CommonConstants
.
THREE_INT
);
detail
.
setSignFlag
(
CommonConstants
.
ONE_INT
);
...
...
@@ -1924,14 +1901,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种、起止时间
(有交叉)
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种、起止时间
for
(
int
j
=
0
;
j
<
distinctList
.
size
();
j
++)
{
InsuranceAddParam
repeat
=
distinctList
.
get
(
j
);
if
(
param
.
getEmpName
().
equals
(
repeat
.
getEmpName
())
&&
param
.
getEmpIdcardNo
().
equals
(
repeat
.
getEmpIdcardNo
())
&&
param
.
getInsuranceCompanyName
().
equals
(
repeat
.
getInsuranceCompanyName
())
&&
param
.
getInsuranceTypeName
().
equals
(
repeat
.
getInsuranceTypeName
())
&&
LocalDateUtil
.
hasOverlap
(
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()),
LocalDateUtil
.
parseLocalDate
(
repeat
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
repeat
.
getPolicyEnd
()))
//20221107 现在需求要求允许同一个人同时存在多个不同的在保信息
//&& LocalDateUtil.hasOverlap(LocalDateUtil.parseLocalDate(param.getPolicyStart()),LocalDateUtil.parseLocalDate(param.getPolicyEnd()),LocalDateUtil.parseLocalDate(repeat.getPolicyStart()),LocalDateUtil.parseLocalDate(repeat.getPolicyEnd()))
&&
param
.
getPolicyStart
().
equals
(
repeat
.
getPolicyStart
())
&&
param
.
getPolicyEnd
().
equals
(
repeat
.
getPolicyEnd
())
&&
i
!=
j
){
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
listResult
.
add
(
param
);
...
...
@@ -2112,7 +2091,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种 + 保单开始日期~保单结束日期
区间
是唯一(剔除退回、过期状态的记录)
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种 + 保单开始日期~保单结束日期 是唯一(剔除退回、过期状态的记录)
//待投保、投保中、已投保(有效、未过期)
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
...
...
@@ -2144,46 +2123,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//时间区间
TInsuranceDetail
insuranceDetailBetween
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
wrapper
->
wrapper
.
and
(
s
->
s
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
)
.
or
(
e
->
e
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
insuranceDetailBetween
).
isPresent
()){
param
.
setErrorMessage
(
"当前员工在["
+
insuranceDetailBetween
.
getPolicyStart
()+
"-"
+
insuranceDetailBetween
.
getPolicyEnd
()+
"]期间内有投保记录"
);
listResult
.
add
(
param
);
continue
;
}
listSuccess
.
add
(
param
);
}
map
.
put
(
"listResult"
,
listResult
);
...
...
@@ -2308,8 +2247,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
InsuranceBatchParam
repeat
=
distinctList
.
get
(
j
);
if
(
param
.
getEmpName
().
equals
(
repeat
.
getEmpName
())
&&
param
.
getEmpIdcardNo
().
equals
(
repeat
.
getEmpIdcardNo
())
&&
param
.
getPolicyNo
().
equals
(
repeat
.
getPolicyNo
())
&&
param
.
getInsuranceCompanyName
().
equals
(
repeat
.
getInsuranceCompanyName
())
&&
param
.
getInsuranceTypeName
().
equals
(
repeat
.
getInsuranceTypeName
())
&&
param
.
getBuyStandard
().
equals
(
repeat
.
getBuyStandard
())
&&
i
!=
j
){
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
listResult
.
add
(
param
);
...
...
@@ -2536,8 +2477,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceDetail
insuranceDetail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
//有效
...
...
@@ -2685,14 +2628,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种、起止时间
(有交叉)
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种、起止时间
for
(
int
j
=
0
;
j
<
distinctList
.
size
();
j
++)
{
InsuranceReplaceParam
repeat
=
distinctList
.
get
(
j
);
if
(((
param
.
getEmpName
().
equals
(
repeat
.
getEmpName
())
&&
param
.
getEmpIdcardNo
().
equals
(
repeat
.
getEmpIdcardNo
()))
||(
param
.
getReplaceEmpName
().
equals
(
repeat
.
getReplaceEmpName
())
&&
param
.
getReplaceEmpIdcardNo
().
equals
(
repeat
.
getReplaceEmpIdcardNo
())))
&&
param
.
getInsuranceCompanyName
().
equals
(
repeat
.
getInsuranceCompanyName
())
&&
param
.
getInsuranceTypeName
().
equals
(
repeat
.
getInsuranceTypeName
())
&&
LocalDateUtil
.
hasOverlap
(
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()),
LocalDateUtil
.
parseLocalDate
(
repeat
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
repeat
.
getPolicyEnd
()))
//20221107 现在需求要求允许同一个人同时存在多个不同的在保信息
//&& LocalDateUtil.hasOverlap(LocalDateUtil.parseLocalDate(param.getPolicyStart()),LocalDateUtil.parseLocalDate(param.getPolicyEnd()),LocalDateUtil.parseLocalDate(repeat.getPolicyStart()),LocalDateUtil.parseLocalDate(repeat.getPolicyEnd()))
&&
param
.
getPolicyStart
().
equals
(
repeat
.
getPolicyStart
())
&&
param
.
getPolicyEnd
().
equals
(
repeat
.
getPolicyEnd
())
&&
i
!=
j
){
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
listResult
.
add
(
param
);
...
...
@@ -2875,45 +2820,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
//时间区间
TInsuranceDetail
insuranceDetailBetween
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getReplaceEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getReplaceEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
wrapper
->
wrapper
.
and
(
s
->
s
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
)
.
or
(
e
->
e
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
.
or
(
s
->
s
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
le
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
insuranceDetailBetween
).
isPresent
()){
param
.
setErrorMessage
(
"替换员工在["
+
insuranceDetailBetween
.
getPolicyStart
()+
"-"
+
insuranceDetailBetween
.
getPolicyEnd
()+
"]期间内有投保记录"
);
listResult
.
add
(
param
);
continue
;
}
listSuccess
.
add
(
param
);
}
...
...
@@ -2975,6 +2881,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
if
(!
ValidityUtil
.
validateMoney
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
}
if
(!
ValidityUtil
.
validateMoneyMax
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_STANDARD_MAX_ERROR
);
listResult
.
add
(
param
);
continue
;
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyNo
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getPolicyNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_MORE_THAN_50
);
...
...
@@ -2996,7 +2918,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
}
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
+ 购买标准
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getEmpIdcardNo
())
...
...
@@ -3004,6 +2926,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
...
@@ -3417,9 +3340,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuredListVo
>
insuredList
;
insuredList
=
this
.
baseMapper
.
getInsuredList
(
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuredList
)){
if
(
insuredList
.
size
()
>
CommonConstants
.
EXPORT_TWENTY_THOUSAND
){
return
R
.
failed
(
InsurancesConstants
.
IM
PORT_TOO_LONG
);
}
/*
if(insuredList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.
EX
PORT_TOO_LONG);
}
*/
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuredList
.
stream
().
map
(
InsuredListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
try
{
...
...
@@ -3497,9 +3420,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
List
<
InsuranceRefundListVo
>
insuranceRefundList
=
this
.
baseMapper
.
getInsuranceRefundList
(
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundList
)){
if
(
insuranceRefundList
.
size
()
>
CommonConstants
.
EXPORT_TWENTY_THOUSAND
){
/*
if(insuranceRefundList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}
}
*/
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundList
.
stream
().
map
(
InsuranceRefundListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
...
...
@@ -3584,9 +3507,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
refundExportList
=
baseMapper
.
getRefundExportList
(
param
);
}
if
(
CollectionUtils
.
isNotEmpty
(
refundExportList
)){
if
(
refundExportList
.
size
()
>
CommonConstants
.
EXPORT_TWENTY_THOUSAND
){
/*
if(refundExportList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}
}
*/
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
List
<
TInsuranceRefund
>
refundList
=
new
ArrayList
<>();
//根据项目编码获取项目名称
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceCompanyMapper.xml
View file @
c448ec09
...
...
@@ -15,12 +15,17 @@
<result
property=
"updateBy"
column=
"UPDATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"deleteFlag"
column=
"DELETE_FLAG"
jdbcType=
"TINYINT"
/>
<result
property=
"insuranceHandleProvince"
column=
"INSURANCE_HANDLE_PROVINCE"
jdbcType=
"TINYINT"
/>
<result
property=
"insuranceHandleProvinceName"
column=
"INSURANCE_HANDLE_PROVINCE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceHandleCity"
column=
"INSURANCE_HANDLE_CITY"
jdbcType=
"TINYINT"
/>
<result
property=
"insuranceHandleCityName"
column=
"INSURANCE_HANDLE_CITY_NAME"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,COMPANY_NAME,COMPANY_ADDRESS,
COMPANY_DOCKING,CREATE_BY,CREATE_NAME,
CREATE_TIME,UPDATE_BY,UPDATE_TIME,
DELETE_FLAG
DELETE_FLAG,
INSURANCE_HANDLE_PROVINCE,INSURANCE_HANDLE_PROVINCE_NAME,INSURANCE_HANDLE_CITY,INSURANCE_HANDLE_CITY_NAME
</sql>
</mapper>
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SysMessageSalaryServiceImpl.java
View file @
c448ec09
...
...
@@ -140,19 +140,21 @@ public class SysMessageSalaryServiceImpl extends ServiceImpl<SysMessageSalaryMap
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
SysMessageSalaryExportVo
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
ExcelUtil
<
SysMessageSalaryExportVo
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
,
settleDomainIds
,
ids
,
sql
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
SysMessageSalaryExportVo
>
util
=
new
ExcelUtil
<>(
SysMessageSalaryExportVo
.
class
);
util
=
new
ExcelUtil
<>(
SysMessageSalaryExportVo
.
class
);
for
(
SysMessageSalaryExportVo
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"消息提醒"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"消息提醒"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/THaveSalaryNosocialServiceImpl.java
View file @
c448ec09
...
...
@@ -198,19 +198,21 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
THaveSalaryNoSocialExportVo
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
ExcelUtil
<
THaveSalaryNoSocialExportVo
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
,
settleDomainIds
,
ids
,
sql
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
THaveSalaryNoSocialExportVo
>
util
=
new
ExcelUtil
<>(
THaveSalaryNoSocialExportVo
.
class
);
util
=
new
ExcelUtil
<>(
THaveSalaryNoSocialExportVo
.
class
);
for
(
THaveSalaryNoSocialExportVo
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"消息提醒"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"消息提醒"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
c448ec09
...
...
@@ -89,13 +89,15 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TSalaryAccount
.
class
).
includeColumnFiledNames
(
searchVo
.
getExportFields
()).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
ExcelUtil
<
TSalaryAccount
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TSalaryAccount
>
util
=
new
ExcelUtil
<>(
TSalaryAccount
.
class
);
util
=
new
ExcelUtil
<>(
TSalaryAccount
.
class
);
for
(
TSalaryAccount
vo
:
list
)
{
if
(
CommonConstants
.
THREE_STRING
.
equals
(
vo
.
getFormType
())){
vo
.
setRelaySalary
(
vo
.
getRelaySalaryUnit
());
...
...
@@ -105,7 +107,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"工资报账主表(工资条)"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"工资报账主表(工资条)"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryEmployeeServiceImpl.java
View file @
c448ec09
...
...
@@ -110,19 +110,21 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TSalaryEmployeeExportVo
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
ExcelUtil
<
TSalaryEmployeeExportVo
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TSalaryEmployeeExportVo
>
util
=
new
ExcelUtil
<>(
TSalaryEmployeeExportVo
.
class
);
util
=
new
ExcelUtil
<>(
TSalaryEmployeeExportVo
.
class
);
for
(
TSalaryEmployeeExportVo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"薪酬人员表"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"薪酬人员表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsBonusServiceImpl.java
View file @
c448ec09
...
...
@@ -112,19 +112,21 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TStatisticsBonus
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
ExcelUtil
<
TStatisticsBonus
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TStatisticsBonus
>
util
=
new
ExcelUtil
<>(
TStatisticsBonus
.
class
);
util
=
new
ExcelUtil
<>(
TStatisticsBonus
.
class
);
for
(
TStatisticsBonus
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"全年一次性奖金申报表"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"全年一次性奖金申报表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsCurrentReportServiceImpl.java
View file @
c448ec09
...
...
@@ -84,19 +84,21 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TStatisticsCurrentReport
.
class
).
includeColumnFiledNames
(
searchVo
.
getExportFields
()).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
ExcelUtil
<
TStatisticsCurrentReport
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TStatisticsCurrentReport
>
util
=
new
ExcelUtil
<>(
TStatisticsCurrentReport
.
class
);
util
=
new
ExcelUtil
<>(
TStatisticsCurrentReport
.
class
);
for
(
TStatisticsCurrentReport
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"本期申报"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"本期申报"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsDeclarerServiceImpl.java
View file @
c448ec09
...
...
@@ -90,19 +90,21 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TStatisticsDeclarer
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
ExcelUtil
<
TStatisticsDeclarer
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TStatisticsDeclarer
>
util
=
new
ExcelUtil
<>(
TStatisticsDeclarer
.
class
);
util
=
new
ExcelUtil
<>(
TStatisticsDeclarer
.
class
);
for
(
TStatisticsDeclarer
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"申报对象表"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"申报对象表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsLaborServiceImpl.java
View file @
c448ec09
...
...
@@ -97,19 +97,21 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TStatisticsLabor
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
ExcelUtil
<
TStatisticsLabor
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TStatisticsLabor
>
util
=
new
ExcelUtil
<>(
TStatisticsLabor
.
class
);
util
=
new
ExcelUtil
<>(
TStatisticsLabor
.
class
);
for
(
TStatisticsLabor
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"本期劳务费申报表"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"本期劳务费申报表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsRemunerationServiceImpl.java
View file @
c448ec09
...
...
@@ -93,19 +93,21 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TStatisticsRemuneration
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
ExcelUtil
<
TStatisticsRemuneration
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TStatisticsRemuneration
>
util
=
new
ExcelUtil
<>(
TStatisticsRemuneration
.
class
);
util
=
new
ExcelUtil
<>(
TStatisticsRemuneration
.
class
);
for
(
TStatisticsRemuneration
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"本期稿酬申报表"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"本期稿酬申报表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsTaxSalaryServiceImpl.java
View file @
c448ec09
...
...
@@ -99,19 +99,21 @@ public class TStatisticsTaxSalaryServiceImpl extends ServiceImpl<TStatisticsTaxS
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TStatisticsTaxSalary
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
ExcelUtil
<
TStatisticsTaxSalary
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TStatisticsTaxSalary
>
util
=
new
ExcelUtil
<>(
TStatisticsTaxSalary
.
class
);
util
=
new
ExcelUtil
<>(
TStatisticsTaxSalary
.
class
);
for
(
TStatisticsTaxSalary
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"统计-工资薪金"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"统计-工资薪金"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/concurrent/threadpool/YFSocialImportThreadPoolExecutor.java
View file @
c448ec09
...
...
@@ -13,8 +13,8 @@ import java.util.concurrent.TimeUnit;
public
class
YFSocialImportThreadPoolExecutor
extends
ThreadPoolExecutor
{
private
static
final
int
CORE_POOL_SIZE
=
8
;
private
static
final
int
MAX_POOL_SIZE
=
12
;
private
static
final
int
CORE_POOL_SIZE
=
30
;
private
static
final
int
MAX_POOL_SIZE
=
30
;
private
static
final
long
KEEP_ALIVE_TIME
=
15
;
private
static
final
int
CAPACITY
=
1024
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
c448ec09
...
...
@@ -149,7 +149,7 @@ public class TPaymentInfoController {
@PostMapping
(
"/importListAdd"
)
@PreAuthorize
(
"@pms.hasPermission('social_tpaymentinfo_batchImport')"
)
public
R
<
List
<
ErrorMessage
>>
importListAdd
(
@RequestBody
MultipartFile
file
,
@RequestParam
String
random
)
{
return
tPaymentInfoService
.
importSocialDiy
(
file
.
getInputStream
()
,
random
);
return
tPaymentInfoService
.
importSocialDiy
(
file
.
getInputStream
());
}
/**
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TPaymentInfoService.java
View file @
c448ec09
...
...
@@ -49,7 +49,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
* @param inputStream
* @return
*/
R
<
List
<
ErrorMessage
>>
importSocialDiy
(
InputStream
inputStream
,
String
random
);
R
<
List
<
ErrorMessage
>>
importSocialDiy
(
InputStream
inputStream
);
/**
* 批量新增缴费库-合肥三险
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TAuditInfoServiceImpl.java
View file @
c448ec09
...
...
@@ -87,19 +87,21 @@ public class TAuditInfoServiceImpl extends ServiceImpl<TAuditInfoMapper, TAuditI
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TAuditInfo
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
ExcelUtil
<
TAuditInfo
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TAuditInfo
>
util
=
new
ExcelUtil
<>(
TAuditInfo
.
class
);
util
=
new
ExcelUtil
<>(
TAuditInfo
.
class
);
for
(
TAuditInfo
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"审核信息表(社保、公积金、预估结算单、社保核准表、公积金核准表 、基数变更 审核记录"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"审核信息表(社保、公积金、预估结算单、社保核准表、公积金核准表 、基数变更 审核记录"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchDayConfServiceImpl.java
View file @
c448ec09
...
...
@@ -88,19 +88,21 @@ public class TDispatchDayConfServiceImpl extends ServiceImpl<TDispatchDayConfMap
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TDispatchDayConf
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
ExcelUtil
<
TDispatchDayConf
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TDispatchDayConf
>
util
=
new
ExcelUtil
<>(
TDispatchDayConf
.
class
);
util
=
new
ExcelUtil
<>(
TDispatchDayConf
.
class
);
for
(
TDispatchDayConf
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"各个地市派单日期"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"各个地市派单日期"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
c448ec09
...
...
@@ -29,7 +29,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
...
...
@@ -150,19 +149,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TDispatchInfoExportVo
.
class
).
includeColumnFiledNames
(
searchVo
.
getExportFields
()).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
ExcelUtil
<
TDispatchInfoExportVo
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
exportDispatch
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TDispatchInfoExportVo
>
util
=
new
ExcelUtil
<>(
TDispatchInfoExportVo
.
class
);
util
=
new
ExcelUtil
<>(
TDispatchInfoExportVo
.
class
);
for
(
TDispatchInfoExportVo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"派单"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"派单"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
@@ -209,19 +210,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TDispatchAuditExportVo
.
class
).
includeColumnFiledNames
(
searchVo
.
getExportFields
()).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
ExcelUtil
<
TDispatchAuditExportVo
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
exportAuditDispatch
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TDispatchAuditExportVo
>
util
=
new
ExcelUtil
<>(
TDispatchAuditExportVo
.
class
);
util
=
new
ExcelUtil
<>(
TDispatchAuditExportVo
.
class
);
for
(
TDispatchAuditExportVo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"派单审核"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"派单审核"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
@@ -1652,6 +1655,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
social
.
setUnitBigailmentPer
(
null
);
social
.
setUnitBigailmentCardinal
(
null
);
}
social
.
setUnitSocialSum
(
BigDecimalUtils
.
safeAdd
(
social
.
getUnitPersionMoney
()
,
social
.
getUnitMedicalMoney
(),
social
.
getUnitBirthMoney
()
,
social
.
getUnitInjuryMoney
()
,
social
.
getUnitUnemploymentMoney
()
,
social
.
getUnitBigailmentMoney
()));
social
.
setPersonalSocialSum
(
BigDecimalUtils
.
safeAdd
(
social
.
getPersonalBigailmentMoney
()
,
social
.
getPersonalPersionMoney
()
,
social
.
getPersonalMedicalMoney
()
,
social
.
getPersonalUnemploymentMoney
()));
}
private
void
initHandleStatus
(
TDispatchImportVo
excel
,
...
...
@@ -1803,9 +1815,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
EmpContractDispatchVo
contract
;
contract
=
new
EmpContractDispatchVo
();
contract
.
setContractEnd
(
excel
.
getContractEnd
());
contract
.
setContractName
(
excel
.
getContract
Nam
e
());
contract
.
setContractName
(
excel
.
getContract
Typ
e
());
contract
.
setContractSubName
(
excel
.
getContractSubName
());
contract
.
setContractType
(
excel
.
getContract
Typ
e
());
contract
.
setContractType
(
excel
.
getContract
Nam
e
());
contract
.
setContractStart
(
excel
.
getContractStart
());
contract
.
setContractSubName
(
excel
.
getContractSubName
());
contract
.
setDeptNo
(
excel
.
getSettleDomainCode
());
...
...
@@ -3958,19 +3970,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
SocialHandleExportVo
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
ExcelUtil
<
SocialHandleExportVo
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
getRecordRosterList
(
searchVo
,
idStr
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
SocialHandleExportVo
>
util
=
new
ExcelUtil
<>(
SocialHandleExportVo
.
class
);
util
=
new
ExcelUtil
<>(
SocialHandleExportVo
.
class
);
for
(
SocialHandleExportVo
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
DispatchConstants
.
SOCIAL_RECORD_ROSTER_EXPORT
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
DispatchConstants
.
SOCIAL_RECORD_ROSTER_EXPORT
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
...
...
@@ -4070,19 +4084,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
FundHandleExportVo
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
ExcelUtil
<
FundHandleExportVo
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
getFundRecordList
(
searchVo
,
idStr
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
FundHandleExportVo
>
util
=
new
ExcelUtil
<>(
FundHandleExportVo
.
class
);
util
=
new
ExcelUtil
<>(
FundHandleExportVo
.
class
);
for
(
FundHandleExportVo
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"公积金变更清册"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"公积金变更清册"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
c448ec09
...
...
@@ -162,19 +162,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TPaymentInfo
.
class
).
includeColumnFiledNames
(
searchVo
.
getExportFields
()).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
ExcelUtil
<
TPaymentInfo
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
baseMapper
.
getTPaymentInfoNoPage
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TPaymentInfo
>
util
=
new
ExcelUtil
<>(
TPaymentInfo
.
class
);
util
=
new
ExcelUtil
<>(
TPaymentInfo
.
class
);
for
(
TPaymentInfo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"缴费库"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"缴费库"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
@@ -227,19 +229,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TPaymentInfoExportVo
.
class
).
includeColumnFiledNames
(
searchVo
.
getExportFields
()).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
ExcelUtil
<
TPaymentInfoExportVo
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
baseMapper
.
getTPaymentInfoSumNoPage
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TPaymentInfoExportVo
>
util
=
new
ExcelUtil
<>(
TPaymentInfoExportVo
.
class
);
util
=
new
ExcelUtil
<>(
TPaymentInfoExportVo
.
class
);
for
(
TPaymentInfoExportVo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"缴费库合并导出"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"缴费库合并导出"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
@@ -395,9 +399,22 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
@Override
public
R
<
List
<
ErrorMessage
>>
importSocialDiy
(
InputStream
inputStream
,
String
random
)
{
public
R
<
List
<
ErrorMessage
>>
importSocialDiy
(
InputStream
inputStream
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
//养老
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
=
new
ConcurrentHashMap
<>();
//大病救助金
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
=
new
ConcurrentHashMap
<>();
//失业
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
=
new
ConcurrentHashMap
<>();
//生育
ConcurrentHashMap
<
String
,
BigDecimal
>
birMoneyMap
=
new
ConcurrentHashMap
<>();
//工伤
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
=
new
ConcurrentHashMap
<>();
//医保
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
=
new
ConcurrentHashMap
<>();
ExcelUtil
<
TPaymentInfoVo
>
util1
=
new
ExcelUtil
<>(
TPaymentInfoVo
.
class
);
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
...
...
@@ -445,7 +462,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importTPaymentSocialInfo
(
cachedDataList
,
errorMessageList
,
user
,
rowNumber
);
importTPaymentSocialInfo
(
cachedDataList
,
errorMessageList
,
user
,
rowNumber
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
...
...
@@ -453,11 +471,23 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
pensionMoneyMap
.
clear
();
bigMoneyMap
.
clear
();
unEmpMoneyMap
.
clear
();
birMoneyMap
.
clear
();
injuryMoneyMap
.
clear
();
medicalMoneyMap
.
clear
();
return
R
.
ok
(
errorMessageList
);
}
private
void
importTPaymentSocialInfo
(
List
<
TPaymentInfoVo
>
list
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
Integer
rowNumber
)
{
YifuUser
user
,
Integer
rowNumber
,
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
birMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
)
{
HashMap
<
String
,
String
>
areaMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
areaMap2
=
new
HashMap
<>();
R
<
AreaVo
>
areaListR
=
upmsDaprUtils
.
getAreaListR
();
...
...
@@ -616,6 +646,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
redisUtil
.
set
(
sumNumKey
,
bfInt
,
360L
);
}
else
{
maerialRatio
=
"100"
;
redisUtil
.
remove
(
sumNumKey
);
}
}
redisUtil
.
set
(
importSuccessKey
,
maerialRatio
,
360L
);
...
...
@@ -627,7 +658,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList
(
user
,
list
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
}
...
...
@@ -640,7 +672,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList
(
user
,
finalList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
lastIdx
=
1
;
...
...
@@ -654,7 +687,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList
(
user
,
finalTempList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
),
yfSocialImportThreadPoolExecutor
);
tempList
=
new
ArrayList
<>();
}
}
...
...
@@ -678,7 +712,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList
(
user
,
finalTempList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
}
// 阻塞当前线程,等待所有的线程执行完毕
...
...
@@ -752,7 +787,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoMedicalMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoUnEmpMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoInjuryMap
,
List
<
ErrorMessage
>
errorMessageList
)
{
List
<
ErrorMessage
>
errorMessageList
,
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
birMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
)
{
if
(
Common
.
isNotNull
(
list
))
{
TPaymentInfo
paymentInfo
;
TSocialFundInfo
socialInfo
;
...
...
@@ -760,19 +801,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String
temp
;
int
res
;
//养老
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
=
new
ConcurrentHashMap
<>();
//大病救助金
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
=
new
ConcurrentHashMap
<>();
//失业
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
=
new
ConcurrentHashMap
<>();
//生育
ConcurrentHashMap
<
String
,
BigDecimal
>
birMoneyMap
=
new
ConcurrentHashMap
<>();
//工伤
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
=
new
ConcurrentHashMap
<>();
//医保
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
=
new
ConcurrentHashMap
<>();
List
<
TSocialFundInfo
>
socialInfoList
=
socialFundInfoMapper
.
selectList
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
()
.
in
(
TSocialFundInfo:
:
getEmpIdcard
,
Common
.
listObjectToStrList
(
list
,
ExcelAttributeConstants
.
EMPIDCARD
)));
...
...
@@ -833,7 +861,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
//导入模板判重 养老
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
socialInfo
.
getSettleDomainCode
()).
concat
(
SocialConstants
.
YL
));
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
infoVo
.
getSocialCreateMonth
()).
concat
(
SocialConstants
.
YL
));
if
(
pensionMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitPensionMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalPensionMoney
())),
pensionMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
...
...
@@ -845,7 +873,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalPensionMoney
())));
}
//医疗
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
socialInfo
.
getSettleDomainCode
()).
concat
(
SocialConstants
.
YB
));
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
infoVo
.
getSocialCreateMonth
()).
concat
(
SocialConstants
.
YB
));
if
(
medicalMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMedicalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMedicalMoney
())),
medicalMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
...
...
@@ -858,7 +886,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMedicalMoney
())));
}
//失业
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
socialInfo
.
getSettleDomainCode
()).
concat
(
SocialConstants
.
SY
));
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
infoVo
.
getSocialCreateMonth
()).
concat
(
SocialConstants
.
SY
));
if
(
unEmpMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitUnemploymentMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalUnemploymentMoney
())),
unEmpMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
...
...
@@ -871,7 +899,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalUnemploymentMoney
())));
}
//工伤
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
socialInfo
.
getSettleDomainCode
()).
concat
(
SocialConstants
.
GS
));
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
infoVo
.
getSocialCreateMonth
()).
concat
(
SocialConstants
.
GS
));
if
(
injuryMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitInjuryMoney
()),
injuryMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
SocialConstants
.
ERROR_TEMPLATE
+
...
...
@@ -881,7 +909,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
injuryMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitInjuryMoney
()));
}
//生育
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
socialInfo
.
getSettleDomainCode
()).
concat
(
SocialConstants
.
BIR
));
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
infoVo
.
getSocialCreateMonth
()).
concat
(
SocialConstants
.
BIR
));
if
(
birMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitBirthMoney
()),
birMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
SocialConstants
.
ERROR_TEMPLATE
+
...
...
@@ -891,7 +919,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
birMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitBirthMoney
()));
}
//医疗救助金
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
socialInfo
.
getSettleDomainCode
()).
concat
(
SocialConstants
.
DB
));
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
infoVo
.
getSocialCreateMonth
()).
concat
(
SocialConstants
.
DB
));
if
(
bigMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitBigmailmentMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalBigmailmentMoney
())),
...
...
@@ -1161,6 +1189,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
TPaymentHeFeiVo
>
util1
=
new
ExcelUtil
<>(
TPaymentHeFeiVo
.
class
);
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
=
new
ConcurrentHashMap
<>();
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
=
new
ConcurrentHashMap
<>();
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
=
new
ConcurrentHashMap
<>();
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
=
new
ConcurrentHashMap
<>();
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
=
new
ConcurrentHashMap
<>();
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
...
...
@@ -1207,7 +1240,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importTPaymentSocialHeFei
(
cachedDataList
,
errorMessageList
,
user
,
type
,
rowNumber
);
importTPaymentSocialHeFei
(
cachedDataList
,
errorMessageList
,
user
,
type
,
rowNumber
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
...
...
@@ -1215,6 +1249,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
pensionMoneyMap
.
clear
();
bigMoneyMap
.
clear
();
unEmpMoneyMap
.
clear
();
injuryMoneyMap
.
clear
();
medicalMoneyMap
.
clear
();
return
R
.
ok
(
errorMessageList
);
}
...
...
@@ -1377,12 +1416,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+
"的公积金数据(请查验公积金缴纳地)!"
));
continue
;
}
//查看是否有操作对应主体的权限
if
(!
Common
.
isNotNull
(
infoVo
.
getProvidentPayMonth
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
infoVo
.
getEmpName
()
+
CommonConstants
.
DOWN_LINE_STRING
+
"必填项校验失败:公积金缴纳月份不可为空!"
));
continue
;
}
//计算公积金合计,个人金额和单位金额一致
infoVo
.
setProvidentSum
(
BigDecimalUtils
.
safeAdd
(
infoVo
.
getUnitProvidentSum
(),
infoVo
.
getUnitProvidentSum
()));
// 判重
...
...
@@ -1487,7 +1520,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
private
void
importTPaymentSocialHeFei
(
List
<
TPaymentHeFeiVo
>
list
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
String
type
,
Integer
rowNumber
)
{
YifuUser
user
,
String
type
,
Integer
rowNumber
,
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
)
{
HashMap
<
String
,
String
>
areaMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
areaMap2
=
new
HashMap
<>();
...
...
@@ -1640,7 +1678,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
list
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
),
paymentInfoBigMap
,
type
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
}
...
...
@@ -1654,7 +1693,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
->
executeImportSocialListThree
(
user
,
finalList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
oneCompletableFuture
);
lastIdx
=
1
;
for
(
int
i
=
1
;
i
<
list
.
size
();
i
++)
{
...
...
@@ -1667,7 +1707,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
->
executeImportSocialListThree
(
user
,
finalTempList1
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
tempList
=
new
ArrayList
<>();
}
...
...
@@ -1691,7 +1732,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
finalTempList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
)
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
)
,
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
}
...
...
@@ -1723,7 +1765,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoUnEmpMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoInjuryMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoBigMap
,
String
type
,
List
<
ErrorMessage
>
errorMessageList
)
{
String
type
,
List
<
ErrorMessage
>
errorMessageList
,
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
)
{
if
(
Common
.
isNotNull
(
list
))
{
TPaymentInfo
payExists
;
TSocialFundInfo
socialInfo
=
null
;
...
...
@@ -1747,6 +1794,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
String
[]
areaArray
;
String
exitMoney
;
for
(
TPaymentHeFeiVo
infoVo
:
list
)
{
if
(
Common
.
isNotNull
(
infoVo
.
getEmpIdcard
()))
{
...
...
@@ -1782,14 +1830,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
continue
;
}
//查看缴纳月是否为空
if
(!
Common
.
isNotNull
(
infoVo
.
getSocialPayMonth
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
"必填项校验失败:社保缴纳月份不可为空!"
));
continue
;
}
//判断是否存在养老缴费数据
if
(
PaymentConstants
.
PENSION_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
//导入模板判重 养老
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
infoVo
.
getSocialCreateMonth
()).
concat
(
SocialConstants
.
YL
));
if
(
pensionMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
())),
pensionMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
SocialConstants
.
ERROR_TEMPLATE
+
infoVo
.
getEmpIdcard
()
+
"的养老缴费数据"
));
continue
;
}
else
{
pensionMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
())));
}
payExists
=
paymentInfoPensionMap
.
get
(
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
...
...
@@ -1813,6 +1868,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在失业缴费数据
if
(
PaymentConstants
.
UNEMPLOYEEMENT_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
//导入模板判重 失业
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
infoVo
.
getSocialCreateMonth
()).
concat
(
SocialConstants
.
SY
));
if
(
unEmpMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
())),
unEmpMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
SocialConstants
.
ERROR_TEMPLATE
+
infoVo
.
getEmpIdcard
()
+
"的失业缴费数据"
));
continue
;
}
else
{
unEmpMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
())));
}
payExists
=
paymentInfoUnEmpMap
.
get
(
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
...
...
@@ -1836,6 +1905,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在医保缴费数据
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
//导入模板判重 医疗
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
infoVo
.
getSocialCreateMonth
()).
concat
(
SocialConstants
.
YB
));
if
(
medicalMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMedicalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMedicalMoney
())),
medicalMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
SocialConstants
.
ERROR_TEMPLATE
+
infoVo
.
getEmpIdcard
()
+
"的医保缴费数据"
));
continue
;
}
else
{
medicalMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMedicalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMedicalMoney
())));
}
payExists
=
paymentInfoMedicalMap
.
get
(
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
...
...
@@ -1860,6 +1943,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在工伤缴费数据
if
(
PaymentConstants
.
INJURY_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
//导入模板判重 工伤
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
infoVo
.
getSocialCreateMonth
()).
concat
(
SocialConstants
.
GS
));
if
(
injuryMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
())),
injuryMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
SocialConstants
.
ERROR_TEMPLATE
+
infoVo
.
getEmpIdcard
()
+
"的工伤缴费数据"
));
continue
;
}
else
{
injuryMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
())));
}
payExists
=
paymentInfoInjuryMap
.
get
(
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
...
...
@@ -1883,6 +1981,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在医疗救助金缴费数据
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
//导入模板判重 医疗救助金
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
infoVo
.
getSocialCreateMonth
()).
concat
(
SocialConstants
.
DB
));
if
(
bigMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitBigailmentMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalBigailmentMoney
())),
bigMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
SocialConstants
.
ERROR_TEMPLATE
+
infoVo
.
getEmpIdcard
()
+
"的医疗救助金缴费数据"
));
continue
;
}
else
{
bigMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitBigailmentMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalBigailmentMoney
())));
}
payExists
=
paymentInfoBigMap
.
get
(
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TProvidentFundServiceImpl.java
View file @
c448ec09
...
...
@@ -88,19 +88,21 @@ public class TProvidentFundServiceImpl extends ServiceImpl<TProvidentFundMapper,
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TProvidentFund
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
ExcelUtil
<
TProvidentFund
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TProvidentFund
>
util
=
new
ExcelUtil
<>(
TProvidentFund
.
class
);
util
=
new
ExcelUtil
<>(
TProvidentFund
.
class
);
for
(
TProvidentFund
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"公积金信息"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"公积金信息"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFundHistoryServiceImpl.java
View file @
c448ec09
...
...
@@ -88,19 +88,21 @@ public class TSocialFundHistoryServiceImpl extends ServiceImpl<TSocialFundHistor
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TSocialFundHistory
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
ExcelUtil
<
TSocialFundHistory
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TSocialFundHistory
>
util
=
new
ExcelUtil
<>(
TSocialFundHistory
.
class
);
util
=
new
ExcelUtil
<>(
TSocialFundHistory
.
class
);
for
(
TSocialFundHistory
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"社保公积金调基历史记录表"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"社保公积金调基历史记录表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFundInfoServiceImpl.java
View file @
c448ec09
...
...
@@ -112,19 +112,21 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TSocialFundInfoExportVo
.
class
).
includeColumnFiledNames
(
searchVo
.
getExportFields
()).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
ExcelUtil
<
TSocialFundInfoExportVo
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
export
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TSocialFundInfoExportVo
>
util
=
new
ExcelUtil
<>(
TSocialFundInfoExportVo
.
class
);
util
=
new
ExcelUtil
<>(
TSocialFundInfoExportVo
.
class
);
for
(
TSocialFundInfoExportVo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
list
!=
null
)
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"社保公积金查询表"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"社保公积金查询表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
list
.
clear
();
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialInfoServiceImpl.java
View file @
c448ec09
...
...
@@ -87,19 +87,21 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TSocialInfo
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
ExcelUtil
<
TSocialInfo
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TSocialInfo
>
util
=
new
ExcelUtil
<>(
TSocialInfo
.
class
);
util
=
new
ExcelUtil
<>(
TSocialInfo
.
class
);
for
(
TSocialInfo
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"社保明细表"
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"社保明细表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
c448ec09
...
...
@@ -279,13 +279,13 @@
AND a.EMP_ID = #{tDispatchInfo.empId}
</if>
<if
test=
"tDispatchInfo.empName != null and tDispatchInfo.empName.trim() != ''"
>
AND a.EMP_NAME
= #{tDispatchInfo.empName}
AND a.EMP_NAME
like concat('%',#{tDispatchInfo.empName},'%')
</if>
<if
test=
"tDispatchInfo.empNo != null and tDispatchInfo.empNo.trim() != ''"
>
AND a.EMP_NO = #{tDispatchInfo.empNo}
</if>
<if
test=
"tDispatchInfo.empIdcard != null and tDispatchInfo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD
= #{tDispatchInfo.empIdcard}
AND a.EMP_IDCARD
like concat('%',#{tDispatchInfo.empIdcard},'%')
</if>
<if
test=
"tDispatchInfo.empType != null and tDispatchInfo.empType.trim() != ''"
>
AND a.EMP_TYPE = #{tDispatchInfo.empType}
...
...
@@ -485,10 +485,10 @@
</foreach>
</if>
<if
test=
"tDispatchInfo.empName != null and tDispatchInfo.empName.trim() != ''"
>
AND a.EMP_NAME
= #{tDispatchInfo.empName}
AND a.EMP_NAME
like concat('%',#{tDispatchInfo.empName},'%')
</if>
<if
test=
"tDispatchInfo.empIdcard != null and tDispatchInfo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD
= #{tDispatchInfo.empIdcard}
AND a.EMP_IDCARD
like concat('%',#{tDispatchInfo.empIdcard},'%')
</if>
<if
test=
"tDispatchInfo.settleDomainName != null and tDispatchInfo.settleDomainName.trim() != ''"
>
AND a.SETTLE_DOMAIN_NAME like CONCAT(#{tDispatchInfo.settleDomainName}, '%')
...
...
@@ -917,10 +917,10 @@
</if>
</if>
<if
test=
"tDispatchInfo.empName != null and tDispatchInfo.empName.trim() != ''"
>
AND a.EMP_NAME
= #{tDispatchInfo.empName}
AND a.EMP_NAME
like concat('%',#{tDispatchInfo.empName},'%')
</if>
<if
test=
"tDispatchInfo.empIdcard != null and tDispatchInfo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD
= #{tDispatchInfo.empIdcard}
AND a.EMP_IDCARD
like concat('%',#{tDispatchInfo.empIdcard},'%')
</if>
<if
test=
"tDispatchInfo.status != null and tDispatchInfo.status.trim() != ''"
>
AND a.STATUS = #{tDispatchInfo.status}
...
...
@@ -1030,10 +1030,10 @@
AND a.FUND_TOWN = #{tDispatchInfo.fundTown}
</if>
<if
test=
"tDispatchInfo.empName != null and tDispatchInfo.empName.trim() != ''"
>
AND a.EMP_NAME
= #{tDispatchInfo.empName}
AND a.EMP_NAME
like concat('%',#{tDispatchInfo.empName},'%')
</if>
<if
test=
"tDispatchInfo.empIdcard != null and tDispatchInfo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD
= #{tDispatchInfo.empIdcard}
AND a.EMP_IDCARD
like concat('%',#{tDispatchInfo.empIdcard},'%')
</if>
<if
test=
"tDispatchInfo.status != null and tDispatchInfo.status.trim() != ''"
>
AND a.STATUS = #{tDispatchInfo.status}
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
View file @
c448ec09
...
...
@@ -242,7 +242,7 @@
AND a.ID = #{tPaymentInfo.id}
</if>
<if
test=
"tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''"
>
AND a.EMP_NAME
= #{tPaymentInfo.empName}
AND a.EMP_NAME
like concat('%',#{tPaymentInfo.empName},'%')
</if>
<if
test=
"tPaymentInfo.empNo != null and tPaymentInfo.empNo.trim() != ''"
>
AND a.EMP_NO like CONCAT(#{tPaymentInfo.empNo},'%')
...
...
@@ -251,7 +251,7 @@
AND a.EMP_ID = #{tPaymentInfo.empId}
</if>
<if
test=
"tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD
= #{tPaymentInfo.empIdcard}
AND a.EMP_IDCARD
like concat('%',#{tPaymentInfo.empIdcard},'%')
</if>
<if
test=
"tPaymentInfo.unitId != null and tPaymentInfo.unitId.trim() != ''"
>
AND a.UNIT_ID = #{tPaymentInfo.unitId}
...
...
@@ -269,7 +269,7 @@
AND a.SETTLE_DOMAIN_ID = #{tPaymentInfo.settleDomainId}
</if>
<if
test=
"tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''"
>
AND a.SOCIAL_HOUSEHOLD
like CONCAT(#{tPaymentInfo.socialHousehold},'%')
AND a.SOCIAL_HOUSEHOLD
= #{tPaymentInfo.socialHousehold}
</if>
<if
test=
"tPaymentInfo.socialSecurityNo != null and tPaymentInfo.socialSecurityNo.trim() != ''"
>
AND a.SOCIAL_SECURITY_NO like CONCAT(#{tPaymentInfo.socialSecurityNo},'%')
...
...
@@ -293,7 +293,7 @@
AND a.SUM_ALL = #{tPaymentInfo.sumAll}
</if>
<if
test=
"tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''"
>
AND a.PROVIDENT_HOUSEHOLD
like CONCAT(#{tPaymentInfo.providentHousehold},'%')
AND a.PROVIDENT_HOUSEHOLD
= #{tPaymentInfo.providentHousehold}
</if>
<if
test=
"tPaymentInfo.providentPayAddr != null and tPaymentInfo.providentPayAddr.trim() != ''"
>
AND a.PROVIDENT_PAY_ADDR = #{tPaymentInfo.providentPayAddr}
...
...
@@ -471,13 +471,13 @@
AND a.ID = #{tPaymentInfo.id}
</if>
<if
test=
"tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''"
>
AND a.EMP_NAME
= #{tPaymentInfo.empName}
AND a.EMP_NAME
like concat('%',#{tPaymentInfo.empName},'%')
</if>
<if
test=
"tPaymentInfo.empNo != null and tPaymentInfo.empNo.trim() != ''"
>
AND a.EMP_NO like CONCAT(#{tPaymentInfo.empNo},'%')
</if>
<if
test=
"tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD
= #{tPaymentInfo.empIdcard}
AND a.EMP_IDCARD
like concat('%',#{tPaymentInfo.empIdcard},'%')
</if>
<if
test=
"tPaymentInfo.settleDomainName != null and tPaymentInfo.settleDomainName.trim() != ''"
>
AND a.SETTLE_DOMAIN_NAME = #{tPaymentInfo.settleDomainName}
...
...
@@ -492,7 +492,7 @@
AND a.SETTLE_DOMAIN_ID = #{tPaymentInfo.settleDomainId}
</if>
<if
test=
"tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''"
>
AND a.SOCIAL_HOUSEHOLD
like CONCAT(#{tPaymentInfo.socialHousehold},'%')
AND a.SOCIAL_HOUSEHOLD
= #{tPaymentInfo.socialHousehold}
</if>
<if
test=
"tPaymentInfo.socialSecurityNo != null and tPaymentInfo.socialSecurityNo.trim() != ''"
>
AND a.SOCIAL_SECURITY_NO like CONCAT(#{tPaymentInfo.socialSecurityNo},'%')
...
...
@@ -507,7 +507,7 @@
AND (a.SOCIAL_CREATE_MONTH = '${tPaymentInfo.socialCreateMonth}' or a.PROVIDENT_CREATE_MONTH = '${tPaymentInfo.socialCreateMonth}')
</if>
<if
test=
"tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''"
>
AND a.PROVIDENT_HOUSEHOLD
like CONCAT(#{tPaymentInfo.providentHousehold},'%')
AND a.PROVIDENT_HOUSEHOLD
= #{tPaymentInfo.providentHousehold}
</if>
<if
test=
"tPaymentInfo.providentPayAddr != null and tPaymentInfo.providentPayAddr.trim() != ''"
>
AND a.PROVIDENT_PAY_ADDR = #{tPaymentInfo.providentPayAddr}
...
...
@@ -522,10 +522,10 @@
AND a.FUND_TOWN = #{tPaymentInfo.fundTown}
</if>
<if
test=
"tPaymentInfo.socialProvince != null and tPaymentInfo.socialProvince.trim() != ''"
>
AND
a.SOCIAL_PROVINCE = #{tPaymentInfo.socialProvince}
AND
(a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' or a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}')
</if>
<if
test=
"tPaymentInfo.socialCity != null and tPaymentInfo.socialCity.trim() != ''"
>
AND
a.SOCIAL_CITY = #{tPaymentInfo.socialCity}
AND
(a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' or a.FUND_CITY = '${tPaymentInfo.socialCity}')
</if>
<if
test=
"tPaymentInfo.socialTown == null"
>
<if
test=
"tPaymentInfo.socialCity != null"
>
...
...
@@ -675,7 +675,7 @@
w.SETTLE_DOMAIN_CODE,
w.SETTLE_DOMAIN_NAME,
w.SOCIAL_HOUSEHOLD,
w.
SOCIAL_SECURITY_NO,
MAX( w.SOCIAL_SECURITY_NO ) AS
SOCIAL_SECURITY_NO,
w.SOCIAL_PAY_ADDR,
w.SOCIAL_PAY_MONTH,
w.SOCIAL_CREATE_MONTH,
...
...
@@ -732,7 +732,7 @@
a.SETTLE_DOMAIN_CODE,
a.SETTLE_DOMAIN_NAME,
a.SOCIAL_HOUSEHOLD,
a.
SOCIAL_SECURITY_NO,
MAX( a.SOCIAL_SECURITY_NO ) AS
SOCIAL_SECURITY_NO,
a.SOCIAL_PAY_ADDR,
a.SOCIAL_PAY_MONTH,
a.SOCIAL_CREATE_MONTH,
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialFundInfoMapper.xml
View file @
c448ec09
...
...
@@ -546,10 +546,10 @@
AND a.EMP_NO = #{tSocialFundInfo.empNo}
</if>
<if
test=
"tSocialFundInfo.empName != null and tSocialFundInfo.empName.trim() != ''"
>
AND a.EMP_NAME
= #{tSocialFundInfo.empName}
AND a.EMP_NAME
like concat('%',#{tSocialFundInfo.empName},'%')
</if>
<if
test=
"tSocialFundInfo.empIdcard != null and tSocialFundInfo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD
= #{tSocialFundInfo.empIdcard}
AND a.EMP_IDCARD
like concat('%',#{tSocialFundInfo.empIdcard},'%')
</if>
<if
test=
"tSocialFundInfo.empType != null and tSocialFundInfo.empType.trim() != ''"
>
AND a.EMP_TYPE = #{tSocialFundInfo.empType}
...
...
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