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
d94a4ec1
Commit
d94a4ec1
authored
Feb 22, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.1' into MVP1.5.1
parents
516a30a0
42534844
Show whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
2314 additions
and
254 deletions
+2314
-254
LUnitInfoForProve.java
...cloud/plus/v1/yifu/archives/entity/LUnitInfoForProve.java
+61
-0
MSalaryProvaAtta.java
.../cloud/plus/v1/yifu/archives/entity/MSalaryProvaAtta.java
+45
-0
TProveApply.java
.../yifu/cloud/plus/v1/yifu/archives/entity/TProveApply.java
+152
-0
TProveRecord.java
...yifu/cloud/plus/v1/yifu/archives/entity/TProveRecord.java
+266
-0
FileUploadController.java
...lus/v1/yifu/archives/controller/FileUploadController.java
+1
-1
SalaryProveController.java
...us/v1/yifu/archives/controller/SalaryProveController.java
+423
-0
LUnitInfoForProveMapper.java
...plus/v1/yifu/archives/mapper/LUnitInfoForProveMapper.java
+14
-0
MSalaryProvaAttaMapper.java
.../plus/v1/yifu/archives/mapper/MSalaryProvaAttaMapper.java
+16
-0
TAttaInfoMapper.java
...u/cloud/plus/v1/yifu/archives/mapper/TAttaInfoMapper.java
+2
-0
TProveApplyMapper.java
...cloud/plus/v1/yifu/archives/mapper/TProveApplyMapper.java
+24
-0
TProveRecordMapper.java
...loud/plus/v1/yifu/archives/mapper/TProveRecordMapper.java
+45
-0
LUnitInfoForProveService.java
...us/v1/yifu/archives/service/LUnitInfoForProveService.java
+12
-0
MSalaryProvaAttaService.java
...lus/v1/yifu/archives/service/MSalaryProvaAttaService.java
+14
-0
TAttaInfoService.java
...cloud/plus/v1/yifu/archives/service/TAttaInfoService.java
+11
-0
TProveApplyService.java
...oud/plus/v1/yifu/archives/service/TProveApplyService.java
+26
-0
TProveRecordService.java
...ud/plus/v1/yifu/archives/service/TProveRecordService.java
+27
-0
LUnitInfoForProveServiceImpl.java
...u/archives/service/impl/LUnitInfoForProveServiceImpl.java
+16
-0
MSalaryProvaAttaServiceImpl.java
...fu/archives/service/impl/MSalaryProvaAttaServiceImpl.java
+18
-0
TAttaInfoServiceImpl.java
...s/v1/yifu/archives/service/impl/TAttaInfoServiceImpl.java
+17
-0
TElecEmployeeInfoServiceImpl.java
...u/archives/service/impl/TElecEmployeeInfoServiceImpl.java
+31
-36
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+12
-7
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+10
-5
TProveApplyServiceImpl.java
...v1/yifu/archives/service/impl/TProveApplyServiceImpl.java
+83
-0
TProveRecordServiceImpl.java
...1/yifu/archives/service/impl/TProveRecordServiceImpl.java
+147
-0
NumberToCN.java
...om/yifu/cloud/plus/v1/yifu/archives/utils/NumberToCN.java
+132
-0
LUnitInfoForProveMapper.xml
...biz/src/main/resources/mapper/LUnitInfoForProveMapper.xml
+37
-0
MSalaryProvaAttaMapper.xml
...-biz/src/main/resources/mapper/MSalaryProvaAttaMapper.xml
+27
-0
TAttaInfoMapper.xml
...rchives-biz/src/main/resources/mapper/TAttaInfoMapper.xml
+12
-4
TProveApplyMapper.xml
...hives-biz/src/main/resources/mapper/TProveApplyMapper.xml
+99
-0
TProveRecordMapper.xml
...ives-biz/src/main/resources/mapper/TProveRecordMapper.xml
+176
-0
WageProofDto.java
...a/com/yifu/cloud/plus/v1/yifu/salary/vo/WageProofDto.java
+24
-0
TSalaryAccountController.java
...s/v1/yifu/salary/controller/TSalaryAccountController.java
+73
-0
TSalaryAccountMapper.java
...loud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
+6
-0
TSalaryAccountService.java
...ud/plus/v1/yifu/salary/service/TSalaryAccountService.java
+4
-0
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+9
-0
SalaryCommonUtil.java
...yifu/cloud/plus/v1/yifu/salary/util/SalaryCommonUtil.java
+44
-3
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+25
-0
TSalaryStandardMapper.xml
...y-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
+3
-0
TPaymentInfo.java
...m/yifu/cloud/plus/v1/yifu/social/entity/TPaymentInfo.java
+7
-9
TProvidentFund.java
...yifu/cloud/plus/v1/yifu/social/entity/TProvidentFund.java
+9
-0
TSocialInfo.java
...om/yifu/cloud/plus/v1/yifu/social/entity/TSocialInfo.java
+9
-0
TPaymentInfoPushVo.java
...yifu/cloud/plus/v1/yifu/social/vo/TPaymentInfoPushVo.java
+7
-0
TPaymentInfoVo.java
...com/yifu/cloud/plus/v1/yifu/social/vo/TPaymentInfoVo.java
+0
-9
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+2
-0
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+129
-165
DoJointSocialTask.java
...ifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
+2
-10
TPaymentInfoMapper.xml
...cial-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
+3
-5
TProvidentFundMapper.xml
...al-biz/src/main/resources/mapper/TProvidentFundMapper.xml
+1
-0
TSocialInfoMapper.xml
...ocial-biz/src/main/resources/mapper/TSocialInfoMapper.xml
+1
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/LUnitInfoForProve.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"l_unit_info_for_prove"
)
@Schema
(
description
=
"工资证明用户操作数据表"
)
public
class
LUnitInfoForProve
extends
Model
<
LUnitInfoForProve
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
*
*/
@NotBlank
(
message
=
"创建人不能为空"
)
@ExcelAttribute
(
name
=
""
,
isNotEmpty
=
true
,
errorInfo
=
"不能为空"
)
@Schema
(
description
=
"创建人"
,
name
=
"creatUser"
)
private
String
creatUser
;
/**
*
*/
@NotBlank
(
message
=
"单位全称不能为空"
)
@Length
(
max
=
20
,
message
=
"单位全称不能超过20个字符"
)
@Schema
(
description
=
"单位全称"
,
name
=
"unitName"
)
private
String
unitName
;
/**
*
*/
@NotBlank
(
message
=
"单位地址不能为空"
)
@Length
(
max
=
50
,
message
=
"单位地址不能超过50个字符"
)
@Schema
(
description
=
"单位地址"
,
name
=
"unitAddr"
)
private
String
unitAddr
;
/**
* 单位固定电话
*/
@NotBlank
(
message
=
"单位固定电话不能为空"
)
@Length
(
max
=
20
,
message
=
"单位固定电话不能超过20个字符"
)
@ExcelAttribute
(
name
=
"单位固定电话"
,
isNotEmpty
=
true
,
errorInfo
=
"单位固定电话不能为空"
,
maxLength
=
20
)
@Schema
(
description
=
"单位固定电话"
,
name
=
"phone"
)
private
String
phone
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/MSalaryProvaAtta.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
/**
* 收入证明附件关系表
*
* @author pwang
* @date 2019-11-08 11:23:53
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"m_salary_prova_atta"
)
@Schema
(
description
=
"收入证明附件关系表"
)
public
class
MSalaryProvaAtta
extends
Model
<
MSalaryProvaAtta
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
,
name
=
"id"
)
private
String
id
;
/**
* 收入证明申请id
*/
@NotBlank
(
message
=
"收入证明申请id不能为空"
)
@Length
(
max
=
32
,
message
=
"收入证明申请id不能超过32个字符"
)
private
String
salaryProvaId
;
/**
* 附件id
*/
@NotBlank
(
message
=
"附件id不能为空"
)
@Length
(
max
=
32
,
message
=
"附件id不能超过32个字符"
)
private
String
attaId
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TProveApply.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"t_prove_apply"
)
@Schema
(
description
=
"工资证明申请表"
)
public
class
TProveApply
extends
Model
<
TProveApply
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
,
name
=
"id"
)
private
String
id
;
/**
* 员工id
*/
@NotBlank
(
message
=
"员工id不能为空"
)
@Length
(
max
=
32
,
message
=
"员工id不能超过32个字符"
)
@ExcelAttribute
(
name
=
"员工id"
,
isNotEmpty
=
true
,
errorInfo
=
"员工id不能为空"
,
maxLength
=
32
)
@Schema
(
description
=
"员工id"
,
name
=
"employeeInfo"
)
private
String
employeeInfo
;
/**
* 申请人
*/
@ExcelAttribute
(
name
=
"申请人"
,
isNotEmpty
=
true
,
errorInfo
=
"申请人不能为空"
)
@Schema
(
description
=
"申请人"
,
name
=
"creatUser"
)
private
String
creatUser
;
@Schema
(
description
=
"申请人名称"
)
private
String
creatUserName
;
/**
* 申请日期
*/
@ExcelAttribute
(
name
=
"申请日期"
,
isNotEmpty
=
true
,
errorInfo
=
"申请日期不能为空"
)
@Schema
(
description
=
"申请日期"
,
name
=
"creatDate"
)
private
LocalDate
creatDate
;
/**
* 开始月
*/
@NotBlank
(
message
=
"开始月不能为空"
)
@Length
(
max
=
6
,
message
=
"开始月不能超过6个字符"
)
@ExcelAttribute
(
name
=
"开始月"
,
isNotEmpty
=
true
,
errorInfo
=
"开始月不能为空"
,
maxLength
=
6
)
@Schema
(
description
=
"开始月"
,
name
=
"startMonth"
)
private
String
startMonth
;
/**
* 结束月
*/
@NotBlank
(
message
=
"结束月不能为空"
)
@Length
(
max
=
6
,
message
=
"结束月不能超过6个字符"
)
@ExcelAttribute
(
name
=
"结束月"
,
isNotEmpty
=
true
,
errorInfo
=
"结束月不能为空"
,
maxLength
=
6
)
@Schema
(
description
=
"结束月"
,
name
=
"endMonth"
)
private
String
endMonth
;
/**
* 证明的工资
*/
@NotNull
(
message
=
"证明的工资不能为空"
)
@ExcelAttribute
(
name
=
"证明的工资"
)
@Schema
(
description
=
"证明的工资"
,
name
=
"proveSalary"
)
private
BigDecimal
proveSalary
;
/**
* 申请理由
*/
@Length
(
max
=
100
,
message
=
"申请理由不能超过100个字符"
)
@ExcelAttribute
(
name
=
"申请理由"
,
maxLength
=
100
)
@Schema
(
description
=
"申请理由"
,
name
=
"applyReason"
)
private
String
applyReason
;
/**
* 审核状态 0待审核1审核通过2审核不通过
*/
@Length
(
max
=
1
,
message
=
"审核状态不能超过1个字符"
)
@Schema
(
description
=
"审核状态 0待审核1审核通过2审核不通过"
,
name
=
"auditStatus"
)
private
String
auditStatus
;
/**
* 审核人
*/
@ExcelAttribute
(
name
=
"审核人"
)
@Schema
(
description
=
"审核人"
,
name
=
"auditUser"
)
private
String
auditUser
;
@Schema
(
description
=
"审核人名称"
)
private
String
auditUserName
;
/**
* 审核日期
*/
@ExcelAttribute
(
name
=
"审核日期"
)
@Schema
(
description
=
"审核日期"
,
name
=
"auditDate"
)
private
LocalDate
auditDate
;
/* @Length(max = 100, message = "附件id逗号隔开不能超过100个字符")
@ExcelAttribute(name = "附件id逗号隔开", maxLength = 100)
@Schema(description = "附件id逗号隔开", name = "fileId")
private String fileId;*/
/**
* 0实发平均1应发平均
*/
@NotBlank
(
message
=
"实发应发不能为空"
)
@Length
(
max
=
1
,
message
=
"实发应发类型不能超过1个字符"
)
@Schema
(
description
=
"0实发平均1应发平均"
,
name
=
"sumType"
)
private
String
sumType
;
/**
* 实际工资
*/
@NotNull
(
message
=
"实际工资不能为空"
)
@ExcelAttribute
(
name
=
"实际工资"
)
@Schema
(
description
=
"实际工资"
,
name
=
"salary"
)
private
BigDecimal
salary
;
/**
* 员工身份证号
*
* @Author pwang
* @Date 2019-11-07 10:27
* @return
**/
@Schema
(
description
=
"员工身份证号"
)
private
String
employeeIdCard
;
@Schema
(
description
=
"员工姓名"
)
@ExcelAttribute
(
name
=
"姓名"
)
private
String
employeeName
;
/**
* 结算主体id
*
* @Author pwang
* @Date 2019-11-07 10:27
* @return
**/
@Schema
(
description
=
"结算主体id"
)
private
String
settleDomain
;
@Schema
(
description
=
"结算主体名称"
)
private
String
settleDomainName
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TProveRecord.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Set
;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"t_prove_record"
)
@Schema
(
description
=
"工资证明记录表"
)
public
class
TProveRecord
extends
Model
<
TProveRecord
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
String
id
;
/**
* 员工id
*/
@NotBlank
(
message
=
"员工id不能为空"
)
@Length
(
max
=
32
,
message
=
"员工id不能超过32个字符"
)
private
String
employeeInfo
;
/**
* 员工姓名
*
* @Author pwang
* @Date 2019-11-07 10:27
* @return
**/
@Schema
(
description
=
"员工姓名"
)
@ExcelAttribute
(
name
=
"姓名"
)
@NotBlank
(
message
=
"员工姓名不能为空"
)
@ExcelProperty
(
"姓名"
)
private
String
employeeName
;
/**
* 员工身份证号
*
* @Author pwang
* @Date 2019-11-07 10:27
* @return
**/
@Schema
(
description
=
"员工身份证号"
)
@NotBlank
(
message
=
"员工身份证号不能为空"
)
@ExcelAttribute
(
name
=
"身份证"
)
@ExcelProperty
(
"身份证"
)
private
String
employeeIdCard
;
/**
* 结算主体(部门)名称
*
* @Author pwang
* @Date 2019-11-07 10:27
* @return
**/
@Schema
(
description
=
"结算主体(部门)名称"
)
@NotBlank
(
message
=
"结算主体名称不能为空"
)
@ExcelAttribute
(
name
=
"结算主体"
)
@ExcelProperty
(
"结算主体"
)
private
String
employeeSettleDepartName
;
/**
*
*/
private
String
creatUser
;
@Schema
(
description
=
"申请人名称"
)
@ExcelAttribute
(
name
=
"开具人"
)
@ExcelProperty
(
"开具人"
)
private
String
creatUserName
;
/**
* 创建日期
*/
@Schema
(
description
=
"创建日期"
,
name
=
"creatDate"
)
@ExcelAttribute
(
name
=
"开具日期"
)
@ExcelProperty
(
"开具日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDate
creatDate
;
/**
* 开始月份
*/
@NotBlank
(
message
=
"开始月份不能为空"
)
@Length
(
max
=
6
,
message
=
"开始月份(yyyyMM)不能超过6个字符"
)
@ExcelAttribute
(
name
=
"开始月份"
,
isNotEmpty
=
true
,
errorInfo
=
"不能为空"
,
maxLength
=
6
)
@Schema
(
description
=
"开始月份"
,
name
=
"startMonth"
)
@ExcelProperty
(
"开始月份"
)
private
String
startMonth
;
/**
* 结束月份
*/
@NotBlank
(
message
=
"结束月份不能为空"
)
@Length
(
max
=
6
,
message
=
"结束月份(yyyyMM)不能超过6个字符"
)
@ExcelAttribute
(
name
=
"结束月份"
,
isNotEmpty
=
true
,
errorInfo
=
"不能为空"
,
maxLength
=
6
)
@Schema
(
description
=
"结束月份"
,
name
=
"endMonth"
)
@ExcelProperty
(
"结束月份"
)
private
String
endMonth
;
/**
* 计算的工资
*/
@NotNull
(
message
=
"计算的工资不能为空"
)
@ExcelAttribute
(
name
=
"计算的工资"
)
@Schema
(
description
=
"计算的工资(数据库数字)"
,
name
=
"salary"
)
private
BigDecimal
salary
;
/**
* 证明的工资
*/
@NotNull
(
message
=
"证明的工资不能为空"
)
@ExcelAttribute
(
name
=
"平均工资"
)
@Schema
(
description
=
"证明的工资(显示的数字)"
,
name
=
"proveSalary"
)
@ExcelProperty
(
"平均工资"
)
private
BigDecimal
proveSalary
;
/**
* 是否作废 0否1是
*/
@Length
(
max
=
1
,
message
=
"是否作废不能超过1个字符"
)
@ExcelAttribute
(
name
=
"是否作废"
,
dataType
=
"isInvalid"
,
isDataId
=
true
)
@ExcelProperty
(
"是否作废"
)
private
String
isInvalid
;
/**
* 作废原因
*/
@Length
(
max
=
100
,
message
=
"作废原因不能超过100个字符"
)
@ExcelAttribute
(
name
=
"作废原因"
)
@ExcelProperty
(
"作废原因"
)
@Schema
(
description
=
"作废原因"
,
name
=
"invalidReason"
)
private
String
invalidReason
;
/**
* 证明编号
*/
@Length
(
max
=
20
,
message
=
"证明编号不能超过20个字符"
)
@ExcelAttribute
(
name
=
"证明编号"
)
@Schema
(
description
=
"证明编号"
,
name
=
"no"
)
@ExcelProperty
(
"证明编号"
)
private
String
no
;
/**
* 用途
*/
@Length
(
max
=
100
,
message
=
"用途不能超过100个字符"
)
@ExcelAttribute
(
name
=
"用途"
)
@Schema
(
description
=
"用途"
,
name
=
"purpose"
)
@ExcelProperty
(
"用途"
)
private
String
purpose
;
/**
* 0实发平均1应发平均
*/
@NotBlank
(
message
=
"实发应发不能为空"
)
@Length
(
max
=
1
,
message
=
"实发应发不能超过1个字符"
)
@ExcelAttribute
(
name
=
"计算类型"
,
dataType
=
"sumType"
,
isDataId
=
true
)
@Schema
(
description
=
"0实发平均1应发平均"
,
name
=
"sumType"
)
@ExcelProperty
(
"计算类型"
)
private
String
sumType
;
/**
* 证明类型 0正式员工证明1试用期员工证明
*/
@NotBlank
(
message
=
"证明类型不能为空"
)
@Length
(
max
=
1
,
message
=
"证明类型不能超过1个字符"
)
@Schema
(
description
=
"证明类型 0正式员工证明1试用期员工证明"
,
name
=
"proveType"
)
private
String
proveType
;
/**
* 打印次数
*/
@ExcelAttribute
(
name
=
"打印次数"
)
@Schema
(
description
=
"打印次数"
,
name
=
"number"
)
private
Integer
number
;
/**
*
*/
@NotBlank
(
message
=
"单位全称不能为空"
)
@Length
(
max
=
20
,
message
=
"不能超过20个字符"
)
@Schema
(
description
=
"单位全称"
,
name
=
"unitName"
)
private
String
unitName
;
/**
*
*/
@NotBlank
(
message
=
"单位地址不能为空"
)
@Length
(
max
=
50
,
message
=
"不能超过50个字符"
)
@Schema
(
description
=
"单位地址"
,
name
=
"unitAddr"
)
private
String
unitAddr
;
/**
* 单位固定电话
*/
@NotBlank
(
message
=
"单位固定电话不能为空"
)
@Length
(
max
=
20
,
message
=
"单位固定电话不能超过20个字符"
)
@Schema
(
description
=
"单位固定电话"
,
name
=
"phone"
)
private
String
phone
;
/**
* 合同结束时间
*/
@Schema
(
description
=
"合同结束时间"
)
private
Date
contractEndDate
;
/**
* 入职时间
*/
@Schema
(
description
=
"入职时间"
)
private
LocalDate
entryDate
;
/**
* 合同类型
*/
@Schema
(
description
=
"合同类型"
)
private
String
contractType
;
/**
* 岗位
*
* @Author
* @Date 2019-11-07 10:27pwang
* @return
**/
@Schema
(
description
=
"岗位"
)
private
String
post
;
@Schema
(
description
=
"计算月份数"
)
private
Integer
mouthCount
;
/**
* 申请人部门所在城市id
*
* @Author pwang
* @Date 2019-11-07 18:18
* @param null
* @return
**/
private
String
belongDepartCity
;
/**
* 根据证明工资手动在方法中转换NumberToCN.number2CNMontrayUnit(re.getProveSalary())
*
* @Author pwang
* @Date 2019-11-07 10:43
* @return
**/
@Schema
(
description
=
"大写"
)
@TableField
(
exist
=
false
)
private
String
capital
;
@TableField
(
exist
=
false
)
private
List
<
String
>
idList
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"导出的表头的Set"
)
private
Set
<
String
>
exportFields
;
@Schema
(
description
=
"查询limit 开始"
)
private
int
limitStart
;
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/FileUploadController.java
View file @
d94a4ec1
...
...
@@ -51,7 +51,7 @@ public class FileUploadController {
@Operation
(
description
=
"OSS文件上传接口"
+
"@ApiImplicitParam(name = \"file\", value = \"Form文件上传\", required = true, dataType = \"__file\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"filePath\", value = \"文件上传路径\", required = false, dataType = \"String\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业 3.员工附件-不良记录 4.员工附件-合同)\", required = true, dataType = \"int\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业 3.员工附件-不良记录 4.员工附件-合同
;5收入证明
)\", required = true, dataType = \"int\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n"
+
"\t"
)
/*@ApiImplicitParams({
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/SalaryProveController.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.utils.NumberToCN
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalaryProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.WageProofDto
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.util.List
;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@RestController
@AllArgsConstructor
@RequestMapping
(
"/salaryProve"
)
@Tag
(
name
=
"工资证明"
)
@Slf4j
@EnableConfigurationProperties
(
DaprSalaryProperties
.
class
)
public
class
SalaryProveController
{
private
final
TProveApplyService
tProveApplyService
;
private
final
TProveRecordService
tProveRecordService
;
private
final
TEmployeeProjectService
employeeProjectService
;
private
final
TEmployeeContractInfoService
employeeContractInfoService
;
private
final
LUnitInfoForProveService
unitInfoForProveService
;
private
final
TAttaInfoService
attaInfoService
;
private
final
DaprSalaryProperties
daprSalaryProperties
;
private
static
final
String
CREAT_DATE
=
"CREAT_DATE"
;
//证明申请的申请时间
/**
* 简单分页查询
*
* @param page 分页对象
* @param tProveApply
* @return
*/
@Operation
(
summary
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TProveApply
>>
getTProveApplyPage
(
Page
<
TProveApply
>
page
,
TProveApply
tProveApply
)
{
return
new
R
<>(
tProveApplyService
.
getTProveApplyPage
(
page
,
tProveApply
));
}
/**
* 通过id查询单条记录
* @return R
*/
@Operation
(
summary
=
"id查询"
)
@GetMapping
(
"/{id}"
)
public
R
<
TProveApply
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
new
R
<>(
tProveApplyService
.
getById
(
id
));
}
/**
* 新增记录
* @return R
*/
@Operation
(
summary
=
"新增(tproveapply_add)"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('tproveapply_add')"
)
public
R
save
(
@Valid
@RequestBody
TProveApply
tProveApply
)
{
return
new
R
<>(
tProveApplyService
.
save
(
tProveApply
));
}
/**
* 修改记录
*
* @param tProveApply
* @return R
*/
@Operation
(
summary
=
"修改(tproveapply_edit)"
)
@SysLog
(
"修改"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('tproveapply_edit')"
)
public
R
update
(
@RequestBody
TProveApply
tProveApply
)
{
return
new
R
<>(
tProveApplyService
.
updateById
(
tProveApply
));
}
/**
* 通过id删除一条记录
*
* @param id
* @return R
*/
@Operation
(
summary
=
"删除(tproveapply_del)"
)
@SysLog
(
"删除"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('tproveapply_del')"
)
public
R
removeById
(
@PathVariable
String
id
)
{
return
new
R
<>(
tProveApplyService
.
removeById
(
id
));
}
/**
* 证明预览页面
*
* @param record
* @return
*/
@Operation
(
summary
=
"证明预览"
)
@PostMapping
(
value
=
"/prove"
)
public
R
<
TProveRecord
>
prove
(
@RequestBody
TProveRecord
record
)
{
String
startDate
;
String
endDate
;
String
sumType
;
String
emId
;
int
count
;
String
proveType
;
if
(
record
!=
null
)
{
startDate
=
record
.
getStartMonth
();
endDate
=
record
.
getEndMonth
();
sumType
=
record
.
getSumType
();
emId
=
record
.
getEmployeeInfo
();
proveType
=
record
.
getProveType
();
}
else
{
return
R
.
failed
(
"参数错误!"
);
}
if
(
Common
.
isNotNull
(
startDate
)
&&
Common
.
isNotNull
(
endDate
)
&&
Common
.
isNotNull
(
sumType
)
&&
Common
.
isNotNull
(
emId
)
&&
Common
.
isNotNull
(
proveType
))
{
//员工信息
TEmployeeProject
em
=
employeeProjectService
.
getById
(
emId
);
if
(
null
==
em
)
{
return
R
.
failed
(
"无此员工"
);
}
record
.
setEmployeeName
(
em
.
getEmpName
());
record
.
setEmployeeIdCard
(
em
.
getEmpIdcard
());
record
.
setEmployeeInfo
(
emId
);
record
.
setCreatDate
(
LocalDate
.
now
());
record
.
setEmployeeSettleDepartName
(
em
.
getDeptName
());
record
.
setPost
(
em
.
getPost
());
count
=
LocalDateTimeUtils
.
getBeginOfMonth
(
endDate
.
concat
(
"01"
),
startDate
.
concat
(
"01"
),
"yyyyMMdd"
)
+
1
;
record
.
setMouthCount
(
count
);
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
proveType
))
{
//正式员工证明
//合同信息
List
<
TEmployeeContractInfo
>
contractList
=
employeeContractInfoService
.
list
(
Wrappers
.<
TEmployeeContractInfo
>
lambdaQuery
().
eq
(
TEmployeeContractInfo:
:
getEmpId
,
emId
).
eq
(
TEmployeeContractInfo:
:
getIsObsolete
,
CommonConstants
.
ZERO_STRING
).
orderByDesc
(
TEmployeeContractInfo:
:
getContractStart
));
if
(
Common
.
isNotNull
(
contractList
))
{
record
.
setContractEndDate
(
contractList
.
get
(
0
).
getContractEnd
());
record
.
setContractType
(
contractList
.
get
(
0
).
getContractType
());
}
}
else
{
//试用期证明
record
.
setEntryDate
(
em
.
getEnjoinDate
()
==
null
?
em
.
getCreateTime
().
toLocalDate
()
:
em
.
getEnjoinDate
());
}
//申请信息
LambdaQueryWrapper
<
TProveApply
>
eq
=
Wrappers
.<
TProveApply
>
lambdaQuery
().
eq
(
TProveApply:
:
getEmployeeInfo
,
emId
).
eq
(
TProveApply:
:
getAuditStatus
,
CommonConstants
.
dingleDigitStrArray
[
1
])
.
eq
(
TProveApply:
:
getSumType
,
sumType
).
eq
(
TProveApply:
:
getStartMonth
,
startDate
).
eq
(
TProveApply:
:
getEndMonth
,
endDate
);
List
<
TProveApply
>
list
=
tProveApplyService
.
list
(
eq
);
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
//通过的申请
BigDecimal
salary
=
list
.
get
(
0
).
getProveSalary
();
record
.
setProveSalary
(
salary
);
record
.
setSalary
(
list
.
get
(
0
).
getSalary
());
record
.
setCapital
(
NumberToCN
.
number2CNMontrayUnit
(
salary
));
}
else
{
try
{
WageProofDto
pd
=
new
WageProofDto
();
pd
.
setStartMouth
(
startDate
);
pd
.
setEndMouth
(
endDate
);
pd
.
setEmIdCard
(
em
.
getEmpIdcard
());
pd
.
setSumType
(
sumType
);
R
<
WageProofDto
>
wpR
=
HttpDaprUtil
.
invokeMethodPost
(
daprSalaryProperties
.
getAppUrl
(),
daprSalaryProperties
.
getAppId
()
,
"/tsalaryaccount/inner/findAverageSalaryForProve"
,
pd
,
WageProofDto
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
null
!=
wpR
)
{
WageProofDto
wp
=
wpR
.
getData
();
if
(
CommonConstants
.
SUCCESS
.
equals
(
wpR
.
getCode
())
&&
null
!=
wp
)
{
record
.
setProveSalary
(
wp
.
getSalary
());
record
.
setSalary
(
wp
.
getSalary
());
record
.
setCapital
(
NumberToCN
.
number2CNMontrayUnit
(
wp
.
getSalary
()));
}
else
{
return
R
.
failed
(
Common
.
isNotNull
(
wpR
.
getMsg
())
?
wpR
.
getMsg
()
:
"调取工资服务返回数据出错!"
);
}
}
else
{
return
R
.
failed
(
"调取工资服务返回数据出错!"
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"调取工资服务出错!"
,
e
);
return
R
.
failed
(
"调取工资服务出错!"
);
}
}
}
else
{
return
R
.
failed
(
"参数出错!"
);
}
return
new
R
(
record
);
}
/**
* 证明记录展示页面
*/
@Operation
(
summary
=
"证明记录展示页面"
)
@GetMapping
(
value
=
"/printing/{id}"
)
public
R
printing
(
@PathVariable
String
id
)
{
TProveRecord
re
=
tProveRecordService
.
getById
(
id
);
if
(
re
!=
null
)
{
re
.
setCapital
(
NumberToCN
.
number2CNMontrayUnit
(
re
.
getProveSalary
()));
}
else
{
return
R
.
failed
(
"无此记录!"
);
}
return
new
R
(
re
);
}
/**
* 打印次数加一
*
* @param id
*/
@Operation
(
summary
=
"打印次数加一"
)
@GetMapping
(
value
=
"/addone/{id}"
)
public
R
addone
(
@PathVariable
String
id
)
{
TProveRecord
re
=
tProveRecordService
.
getById
(
id
);
if
(
null
!=
re
&&
null
!=
re
.
getNumber
())
{
re
.
setNumber
(
re
.
getNumber
()
+
1
);
tProveRecordService
.
updateById
(
re
);
return
R
.
ok
(
"操作成功"
);
}
else
{
return
R
.
failed
(
"无此记录"
);
}
}
/**
* 证明记录处理
*/
@Operation
(
summary
=
"证明记录处理"
)
@PostMapping
(
value
=
"/proveRecord"
)
public
R
<
String
>
proveRecord
(
@Valid
@RequestBody
TProveRecord
record
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
//记录用户单位信息
String
userId
=
String
.
valueOf
(
user
.
getId
());
if
(!
Common
.
isNotNull
(
record
.
getUnitAddr
())
&&
!
Common
.
isNotNull
(
record
.
getUnitName
())
&&
!
Common
.
isNotNull
(
record
.
getPhone
()))
{
//有效数据
try
{
LUnitInfoForProve
unitInfo
=
new
LUnitInfoForProve
();
unitInfo
.
setPhone
(
record
.
getPhone
());
unitInfo
.
setUnitAddr
(
record
.
getUnitAddr
());
unitInfo
.
setUnitName
(
record
.
getUnitName
());
unitInfo
.
setCreatUser
(
userId
);
if
(
null
!=
record
.
getId
())
{
unitInfo
.
setId
(
record
.
getId
());
unitInfoForProveService
.
updateById
(
unitInfo
);
}
else
{
//没有id检查数据有没有名称重复
if
(
CommonConstants
.
dingleDigitIntArray
[
0
]
==
unitInfoForProveService
.
count
(
Wrappers
.<
LUnitInfoForProve
>
lambdaQuery
()
.
eq
(
LUnitInfoForProve:
:
getCreatUser
,
userId
).
eq
(
LUnitInfoForProve:
:
getUnitName
,
unitInfo
.
getUnitName
())))
{
unitInfoForProveService
.
save
(
unitInfo
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"用户操作数据保存出错"
,
e
);
}
}
record
.
setId
(
null
);
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
record
.
getProveType
())
&&
Common
.
isEmpty
(
record
.
getPost
()))
{
return
R
.
failed
(
"正式员工证明岗位不能为空!"
);
}
//处理证明记录
record
.
setNumber
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
record
.
setCreatUser
(
userId
);
record
.
setCreatUserName
(
user
.
getNickname
());
record
.
setIsInvalid
(
CommonConstants
.
ZERO_STRING
);
tProveRecordService
.
saveNo
(
record
);
//保存并自动生成编号
return
new
R
(
record
.
getNo
());
}
/**
* 证明记录分页
*/
@Operation
(
summary
=
"证明记录分页查询"
)
@GetMapping
(
"/findProveRecordPage"
)
public
R
<
IPage
<
TProveRecord
>>
findProveRecordPage
(
Page
<
TProveRecord
>
page
,
TProveRecord
pr
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
&&
Common
.
isNotNull
(
user
.
getId
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getSystemFlag
()))
{
pr
.
setCreatUser
(
String
.
valueOf
(
user
.
getId
()));
}
page
.
addOrder
(
OrderItem
.
desc
(
CREAT_DATE
));
return
new
R
<>(
tProveRecordService
.
getTProveRecordPage
(
page
,
pr
));
}
/**
* 修改作废状态
*/
@Operation
(
summary
=
"收入证明修改作废状态(tproveapply_invalid) status:是否作废(0否1是);invalidReason:作废理由"
)
@SysLog
(
"收入证明修改作废状态"
)
@PostMapping
(
value
=
"/updateStatus"
)
@PreAuthorize
(
"@pms.hasPermission('tproveapply_invalid')"
)
public
R
updateStatus
(
String
id
,
String
status
,
String
invalidReason
)
{
if
(
id
!=
null
)
{
if
(
Common
.
isEmpty
(
status
))
{
return
R
.
failed
(
"作废状态不能为空!"
);
}
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
status
)
&&
invalidReason
==
null
)
{
return
R
.
failed
(
"作废原因不能为空!"
);
}
else
{
TProveRecord
pr
=
tProveRecordService
.
getById
(
id
);
if
(
pr
!=
null
)
{
pr
.
setIsInvalid
(
status
);
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
status
))
{
pr
.
setInvalidReason
(
invalidReason
);
}
tProveRecordService
.
updateById
(
pr
);
return
R
.
ok
(
"操作成功!"
);
}
else
{
return
R
.
failed
(
"无此证明记录!"
);
}
}
}
else
{
return
R
.
failed
(
"id不能为空!"
);
}
}
/**
* 证明记录
*/
@Operation
(
summary
=
"证明记录导出(tproveRecord_export接收流返回的文件,文件格式xls),idList:id 集合"
)
@PostMapping
(
value
=
"/exportProveRecord"
)
@PreAuthorize
(
"@pms.hasPermission('tproveRecord_export')"
)
public
void
exportProveRecord
(
HttpServletResponse
response
,
@RequestBody
TProveRecord
pr
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
&&
Common
.
isNotNull
(
user
.
getId
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getSystemFlag
()))
{
pr
.
setCreatUser
(
String
.
valueOf
(
user
.
getId
()));
}
tProveRecordService
.
listExport
(
response
,
pr
);
}
/**
* 新增证明申请
*/
@Operation
(
summary
=
"新增证明申请(tproveapply_apply)"
)
@PostMapping
(
value
=
"/proveApply"
)
@PreAuthorize
(
"@pms.hasPermission('tproveapply_apply')"
)
public
R
proveApply
(
@Valid
@RequestBody
TProveApply
proveApply
,
String
[]
attaIdArray
)
{
TEmployeeProject
em
=
employeeProjectService
.
getById
(
proveApply
.
getEmployeeInfo
());
if
(
null
==
em
)
{
return
R
.
failed
(
"无此员工!"
);
}
proveApply
.
setEmployeeIdCard
(
em
.
getEmpIdcard
());
proveApply
.
setEmployeeName
(
em
.
getEmpName
());
proveApply
.
setSettleDomain
(
em
.
getDeptId
());
proveApply
.
setSettleDomainName
(
em
.
getDeptName
());
return
tProveApplyService
.
validSave
(
proveApply
,
attaIdArray
);
}
/**
* 证明申请审核分页
*/
@Operation
(
summary
=
"证明申请分页查询"
)
@GetMapping
(
"/proveApplyPage"
)
public
R
<
IPage
<
TProveApply
>>
findproveApplyPage
(
Page
<
TProveApply
>
page
,
TProveApply
proveApply
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
&&
Common
.
isNotNull
(
user
.
getId
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getSystemFlag
()))
{
proveApply
.
setCreatUser
(
String
.
valueOf
(
user
.
getId
()));
}
if
(
Common
.
isEmpty
(
proveApply
.
getAuditStatus
())
||
!
CommonConstants
.
dingleDigitStrArray
[
1
].
equals
(
proveApply
.
getAuditStatus
()))
{
page
.
addOrder
(
OrderItem
.
desc
(
CREAT_DATE
));
}
return
new
R
<>(
tProveApplyService
.
getTProveApplyPage
(
page
,
proveApply
));
}
/**
* @Author pwang
* @Date 2019-11-08 14:32
**/
@Operation
(
summary
=
"证明申请详情查询"
)
@GetMapping
(
"/lookApply/{id}"
)
public
R
<
TProveApply
>
lookApply
(
@PathVariable
(
value
=
"id"
,
required
=
true
)
String
id
)
{
return
new
R
(
tProveApplyService
.
getById
(
id
));
}
@Operation
(
summary
=
"证明申请附件查询"
)
@GetMapping
(
"/atta/{applyId}"
)
public
R
<
List
<
TAttaInfo
>>
lookApplyAtta
(
@PathVariable
(
value
=
"applyId"
)
String
applyId
)
{
return
attaInfoService
.
getAttaByApplyId
(
applyId
);
}
/**
* 审核接口
*/
@Operation
(
summary
=
"审核接口(tproveapply_audit) auditStatus:审核结果(1审核通过2审核不通过)"
)
@GetMapping
(
"/updateApplyStatus"
)
@PreAuthorize
(
"@pms.hasPermission('tproveapply_audit')"
)
public
R
updateApplyStatus
(
@RequestParam
String
id
,
@RequestParam
String
auditStatus
)
{
TProveApply
pa
=
tProveApplyService
.
getById
(
id
);
if
(
pa
!=
null
)
{
if
(!
CommonConstants
.
dingleDigitStrArray
[
1
].
equals
(
auditStatus
)
&&
!
CommonConstants
.
dingleDigitStrArray
[
2
].
equals
(
auditStatus
))
{
return
R
.
failed
(
"审核结果出错!"
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
pa
.
setAuditUser
(
String
.
valueOf
(
user
.
getId
()));
pa
.
setAuditUserName
(
user
.
getNickname
());
pa
.
setAuditDate
(
LocalDate
.
now
());
pa
.
setAuditStatus
(
auditStatus
);
tProveApplyService
.
updateById
(
pa
);
return
R
.
ok
(
"操作成功!"
);
}
else
{
return
R
.
failed
(
"无此证明记录!"
);
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/LUnitInfoForProveMapper.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.LUnitInfoForProve
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Mapper
public
interface
LUnitInfoForProveMapper
extends
BaseMapper
<
LUnitInfoForProve
>
{
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/MSalaryProvaAttaMapper.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.MSalaryProvaAtta
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 收入证明附件关系表
*
* @author pwang
* @date 2019-11-08 11:23:53
*/
@Mapper
public
interface
MSalaryProvaAttaMapper
extends
BaseMapper
<
MSalaryProvaAtta
>
{
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TAttaInfoMapper.java
View file @
d94a4ec1
...
...
@@ -39,4 +39,6 @@ public interface TAttaInfoMapper extends BaseMapper<TAttaInfo> {
List
<
TAttaInfo
>
getKeenAtta
(
@Param
(
"dayStart"
)
LocalDateTime
dayStart
,
@Param
(
"values"
)
Collection
<
String
>
values
);
int
updateDomainId
(
@Param
(
"domainId"
)
String
domainId
,
@Param
(
"ids"
)
List
<
String
>
ids
);
List
<
TAttaInfo
>
getAttaByApplyId
(
@Param
(
"applyId"
)
String
applyId
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TProveApplyMapper.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
mapper
;
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.TProveApply
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Mapper
public
interface
TProveApplyMapper
extends
BaseMapper
<
TProveApply
>
{
/**
* 简单分页查询
*
* @param tProveApply
* @return
*/
IPage
<
TProveApply
>
getTProveApplyPage
(
Page
page
,
@Param
(
"tProveApply"
)
TProveApply
tProveApply
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TProveRecordMapper.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
mapper
;
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.TProveRecord
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Mapper
public
interface
TProveRecordMapper
extends
BaseMapper
<
TProveRecord
>
{
/**
* 简单分页查询
*
* @param tProveRecord
* @return
*/
IPage
<
TProveRecord
>
getTProveRecordPage
(
Page
page
,
@Param
(
"tProveRecord"
)
TProveRecord
tProveRecord
);
/**
* @param tProveRecord
* @Description: 导出查条数
* @Author: hgw
* @Date: 2023/2/22 14:56
* @return: int
**/
int
getCountByExport
(
@Param
(
"tProveRecord"
)
TProveRecord
tProveRecord
);
/**
* @param tProveRecord
* @Description: 导出list
* @Author: hgw
* @Date: 2023/2/22 14:56
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TProveRecord>
**/
List
<
TProveRecord
>
getRecordInfoNoPage
(
@Param
(
"tProveRecord"
)
TProveRecord
tProveRecord
);
Integer
createNo
(
@Param
(
"str"
)
String
str
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/LUnitInfoForProveService.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.LUnitInfoForProve
;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
public
interface
LUnitInfoForProveService
extends
IService
<
LUnitInfoForProve
>
{
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/MSalaryProvaAttaService.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.MSalaryProvaAtta
;
/**
* 收入证明附件关系表
*
* @author pwang
* @date 2019-11-08 11:23:53
*/
public
interface
MSalaryProvaAttaService
extends
IService
<
MSalaryProvaAtta
>
{
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TAttaInfoService.java
View file @
d94a4ec1
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
java.time.LocalDateTime
;
import
java.util.Collection
;
...
...
@@ -51,4 +52,14 @@ public interface TAttaInfoService extends IService<TAttaInfo> {
List
<
TAttaInfo
>
getKeenAtta
(
LocalDateTime
dayStart
,
Collection
<
String
>
values
);
Boolean
updateDomainId
(
String
domainId
,
List
<
String
>
ids
);
/**
* @param applyId
* @Description: 收入证明使用
* @Author: hgw
* @Date: 2023/2/22 10:50
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo>>
**/
R
<
List
<
TAttaInfo
>>
getAttaByApplyId
(
String
applyId
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TProveApplyService.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TProveApply
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
public
interface
TProveApplyService
extends
IService
<
TProveApply
>
{
/**
* 简单分页查询
*
* @param tProveApply
* @return
*/
IPage
<
TProveApply
>
getTProveApplyPage
(
Page
<
TProveApply
>
page
,
TProveApply
tProveApply
);
R
validSave
(
TProveApply
proveApply
,
String
[]
attaIdArray
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TProveRecordService.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TProveRecord
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
public
interface
TProveRecordService
extends
IService
<
TProveRecord
>
{
/**
* 简单分页查询
*/
IPage
<
TProveRecord
>
getTProveRecordPage
(
Page
<
TProveRecord
>
page
,
TProveRecord
tProveRecord
);
void
saveNo
(
TProveRecord
record
);
List
<
TProveRecord
>
getRecordInfoNoPage
(
TProveRecord
pr
);
void
listExport
(
HttpServletResponse
response
,
TProveRecord
searchVo
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/LUnitInfoForProveServiceImpl.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.LUnitInfoForProve
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.LUnitInfoForProveMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.LUnitInfoForProveService
;
import
org.springframework.stereotype.Service
;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Service
public
class
LUnitInfoForProveServiceImpl
extends
ServiceImpl
<
LUnitInfoForProveMapper
,
LUnitInfoForProve
>
implements
LUnitInfoForProveService
{
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/MSalaryProvaAttaServiceImpl.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.MSalaryProvaAtta
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.MSalaryProvaAttaMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.MSalaryProvaAttaService
;
import
org.springframework.stereotype.Service
;
/**
* 收入证明附件关系表
*
* @author pwang
* @date 2019-11-08 11:23:53
*/
@Service
public
class
MSalaryProvaAttaServiceImpl
extends
ServiceImpl
<
MSalaryProvaAttaMapper
,
MSalaryProvaAtta
>
implements
MSalaryProvaAttaService
{
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TAttaInfoServiceImpl.java
View file @
d94a4ec1
...
...
@@ -8,9 +8,11 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TAttaInfoService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.net.URL
;
import
java.time.LocalDateTime
;
import
java.util.Collection
;
import
java.util.List
;
...
...
@@ -107,4 +109,19 @@ public class TAttaInfoServiceImpl extends ServiceImpl<TAttaInfoMapper, TAttaInfo
}
return
baseMapper
.
updateDomainId
(
domainId
,
ids
)
>
0
;
}
@Override
public
R
<
List
<
TAttaInfo
>>
getAttaByApplyId
(
String
applyId
)
{
List
<
TAttaInfo
>
list
=
baseMapper
.
getAttaByApplyId
(
applyId
);
if
(
Common
.
isNotNull
(
list
))
{
URL
url
;
for
(
TAttaInfo
atta:
list
)
{
url
=
ossUtil
.
getObjectUrl
(
null
,
atta
.
getAttaSrc
());
atta
.
setAttaUrl
(
url
.
toString
());
}
return
R
.
ok
(
list
);
}
else
{
return
R
.
failed
(
"没有附件"
);
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TElecEmployeeInfoServiceImpl.java
View file @
d94a4ec1
...
...
@@ -28,12 +28,12 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TElecEmployeeInfoMapper;
import
com.yifu.cloud.plus.v1.yifu.archives.service.FileUploadService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TElecEmployeeInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService
;
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.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.fileupload.FileItem
;
import
org.apache.commons.fileupload.FileItemFactory
;
...
...
@@ -145,19 +145,19 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
*/
private
R
unZip
(
File
srcFile
,
String
destDirPath
)
throws
RuntimeException
{
// 调用字典服务,渲染字典值
R
<
Map
<
String
,
Map
<
String
,
Map
<
String
,
String
>>>>
dictR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dict/inner/getDictToLable"
,
null
,
Map
.
class
,
SecurityConstants
.
FROM_IN
);
Map
<
String
,
Map
<
String
,
Map
<
String
,
String
>>>
dictMap
;
// 电子档案类型
Map
<
String
,
Map
<
String
,
String
>>
elecTypeMapData
;
Map
<
String
,
String
>
elecTypeMap
;
if
(
dictR
==
null
)
{
Map
<
String
,
String
>
elecTypeMap
=
new
HashMap
<>();
// 渲染字典值
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
()
.
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"literature_types"
);
if
(
Common
.
isNotNull
(
dicObj
))
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
dicObj
.
entrySet
())
{
elecTypeMap
.
put
(
entry
.
getValue
(),
entry
.
getKey
());
}
}
if
(!
elecTypeMap
.
isEmpty
())
{
return
R
.
failed
(
"获取字典失败!"
);
}
else
{
dictMap
=
dictR
.
getData
();
elecTypeMapData
=
dictMap
.
get
(
"data"
);
elecTypeMap
=
elecTypeMapData
.
get
(
"literature_types"
);
}
// 判断源文件是否存在
if
(!
srcFile
.
exists
())
{
...
...
@@ -173,15 +173,18 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
Set
<
String
>
infoList
=
new
HashSet
<>();
Set
<
String
>
idCardList
=
new
HashSet
<>();
Set
<
String
>
cardType
=
new
HashSet
<>();
TEmployeeInfo
tEmployeeInfo
;
ZipEntry
entry
;
while
(
entriesCheck
.
hasMoreElements
())
{
ZipEntry
entry
=
(
ZipEntry
)
entriesCheck
.
nextElement
();
entry
=
(
ZipEntry
)
entriesCheck
.
nextElement
();
//添加进filesName
String
empInfo
=
entry
.
getName
();
infoList
.
add
(
empInfo
);
String
dataType
=
""
;
if
(
empInfo
.
length
()
==
empInfo
.
lastIndexOf
(
"/"
)
+
1
)
{
String
idCard
=
empInfo
.
substring
(
0
,
empInfo
.
indexOf
(
"/"
));
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
tEmployeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
idCard
)).
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
));
...
...
@@ -191,7 +194,6 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
idCardList
.
add
(
idCard
);
if
(
empInfo
.
length
()
>
20
)
{
dataType
=
empInfo
.
substring
(
empInfo
.
indexOf
(
"/"
)
+
1
,
empInfo
.
lastIndexOf
(
"/"
));
if
(
Common
.
isNotNull
(
elecTypeMap
))
{
if
(!
Common
.
isNotNull
(
elecTypeMap
.
get
(
dataType
)))
{
return
R
.
failed
(
"资料类型错误:"
+
dataType
);
}
...
...
@@ -199,26 +201,23 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
}
}
}
}
for
(
String
idCarInfo
:
idCardList
)
{
if
(
!
infoList
.
stream
().
any
Match
(
e
->
containsCheckTwo
(
e
,
idCarInfo
)))
{
if
(
infoList
.
stream
().
none
Match
(
e
->
containsCheckTwo
(
e
,
idCarInfo
)))
{
return
R
.
failed
(
idCarInfo
+
":"
+
"证件数据不可为空"
);
}
}
if
(
cardType
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
for
(
String
typeInfo
:
cardType
)
{
if
(
!
infoList
.
stream
().
any
Match
(
e
->
containsCheckOne
(
e
,
typeInfo
)))
{
if
(
infoList
.
stream
().
none
Match
(
e
->
containsCheckOne
(
e
,
typeInfo
)))
{
return
R
.
failed
(
typeInfo
+
":"
+
"证件数据不可为空"
);
}
}
}
Map
<
String
,
String
>
insMap
=
new
HashMap
<>();
List
<
TElecEmployeeInfo
>
infolist
=
new
ArrayList
<>();
List
<
String
>
list
=
new
ArrayList
<>();
TEmployeeInfo
employeeInfo
;
while
(
entries
.
hasMoreElements
())
{
ZipEntry
entry
=
(
ZipEntry
)
entries
.
nextElement
();
entry
=
(
ZipEntry
)
entries
.
nextElement
();
//添加进filesName
String
empInfo
=
entry
.
getName
();
// 如果是文件夹,就创建个文件夹
...
...
@@ -249,26 +248,22 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
String
idCard
=
empInfo
.
substring
(
0
,
empInfo
.
indexOf
(
"/"
));
String
dataType
=
empInfo
.
substring
(
empInfo
.
indexOf
(
"/"
)
+
1
,
empInfo
.
lastIndexOf
(
"/"
));
String
empName
=
""
;
TEmployeeInfo
tE
mployeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
e
mployeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
idCard
)).
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
if
(
Common
.
isNotNull
(
tE
mployeeInfo
))
{
empName
=
tE
mployeeInfo
.
getEmpName
();
if
(
Common
.
isNotNull
(
e
mployeeInfo
))
{
empName
=
e
mployeeInfo
.
getEmpName
();
}
tElecEmployeeInfo
.
setEmpIdcard
(
idCard
);
tElecEmployeeInfo
.
setEmpName
(
empName
);
if
(
Common
.
isNotNull
(
elecTypeMap
))
{
if
(
Common
.
isNotNull
(
elecTypeMap
.
get
(
dataType
)))
{
tElecEmployeeInfo
.
setDataType
(
elecTypeMap
.
get
(
dataType
));
}
}
String
id
=
insMap
.
get
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
);
if
(
Common
.
isEmpty
(
id
))
{
infolist
.
add
(
tElecEmployeeInfo
);
this
.
save
(
tElecEmployeeInfo
);
insMap
.
put
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
,
tElecEmployeeInfo
.
getId
());
}
list
.
add
(
insMap
.
get
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
));
fileUploadService
.
uploadImg
(
fileCovertMultipartFile
(
targetFile
),
""
,
CommonConstants
.
EIGHT_INT
,
insMap
.
get
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
));
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
d94a4ec1
...
...
@@ -159,6 +159,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
List
<
TEmployeeProject
>
updateList
=
new
ArrayList
<>();
Set
<
String
>
errorMsg
;
//对象声明
TEmpChangeInfoVO
excel
;
TSettleDomain
tSettleDomain
;
TEmployeeProject
employeeProject
;
TEmployeeProject
updateTEmployeePro
;
TEmployeeProject
tEmployeeProjectOld
;
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
// 已有验证报错直接下一个
...
...
@@ -166,7 +172,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
continue
;
}
errorMsg
=
new
HashSet
<>();
TEmpChangeInfoVO
excel
=
excelVOList
.
get
(
i
);
excel
=
excelVOList
.
get
(
i
);
excel
.
setUnsettleDeal
(
CommonConstants
.
IS_NO_CHANGE
);
if
(
Common
.
isNotNull
(
excel
.
getChangeStartMonth
())
&&
excel
.
getChangeStartMonth
().
length
()
>
CommonConstants
.
dingleDigitIntArray
[
6
])
{
errorMsg
.
add
(
"划转起始月长度不能超过6位"
);
...
...
@@ -184,7 +190,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
//项目编码校验
TSettleDomain
tSettleDomain
=
tSettleDomainMapper
.
selectOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
tSettleDomain
=
tSettleDomainMapper
.
selectOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDepartNo
,
excel
.
getNewSettleCode
())
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
...
...
@@ -193,17 +199,17 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
//待划转员工已在目标项目下不可划转
TEmployeeProject
tE
mployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
e
mployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getNewSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
tE
mployeeProject
))
{
if
(
Common
.
isNotNull
(
e
mployeeProject
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_NEW_SEARCH_NOT_EXIST
,
excel
.
getNewSettleCode
()));
}
// 数据合法情况
if
(
CollUtil
.
isEmpty
(
errorMsg
))
{
//划转,更新项目信息
TEmployeeProject
updateTEmployeePro
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
updateTEmployeePro
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getOldSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
updateTEmployeePro
))
{
...
...
@@ -214,7 +220,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
if
(
CommonConstants
.
ONE_INT
==
updateTEmployeePro
.
getProjectStatus
())
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_DELETE_EXIT
,
excel
.
getOldSettleCode
()));
}
else
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
TEmployeeProject
tEmployeeProjectOld
=
tEmployeeProjectService
.
getById
(
updateTEmployeePro
.
getId
());
tEmployeeProjectOld
=
tEmployeeProjectService
.
getById
(
updateTEmployeePro
.
getId
());
updateTEmployeePro
.
setDeptNo
(
tSettleDomain
.
getDepartNo
());
updateTEmployeePro
.
setDeptId
(
tSettleDomain
.
getId
());
updateTEmployeePro
.
setDeptName
(
tSettleDomain
.
getDepartName
());
...
...
@@ -300,7 +306,6 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
*/
@Override
public
R
<
List
<
TCustomerInfo
>>
getAllUint
(
String
customerName
)
{
//List<TCustomerInfo> list = tCustomerInfoService.list(Wrappers.<TCustomerInfo>query().lambda().eq(TCustomerInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
List
<
TCustomerInfo
>
list
=
tCustomerInfoService
.
getAllUnit
(
customerName
);
return
R
.
ok
(
list
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
d94a4ec1
...
...
@@ -949,9 +949,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
// 新老项目档案List
List
<
EmployeeProjectNewOldVO
>
updateProjectList
=
new
ArrayList
<>();
EmployeeProjectUpdateVO
excel
;
TEmployeeProject
tEmployeeProject
;
TEmployeeInfo
tEmployeeInfo
;
TEmployeeProject
tEmployeeProjectOld
;
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
EmployeeProjectUpdateVO
excel
=
excelVOList
.
get
(
i
);
excel
=
excelVOList
.
get
(
i
);
String
checkCount
=
excel
.
getEmpIdcard
().
concat
(
excel
.
getDeptNo
());
if
(
Common
.
isNotNull
(
checkCountMap
.
get
(
checkCount
)))
{
...
...
@@ -960,7 +964,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
checkCountMap
.
put
(
checkCount
,
i
+
2
);
}
//根据身份证和项目编码获取项目档案
TEmployeeProject
tEmployeeProject
=
this
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
tEmployeeProject
=
this
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
...
...
@@ -971,13 +975,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_EMP_DELETE_ERROR
)));
}
else
{
updateExcelProj
(
excel
,
updateList
,
tEmployeeProject
);
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
newOldProject
=
new
EmployeeProjectNewOldVO
();
newOldProject
.
setOldProjectEmployee
(
tEmployeeProjectOld
);
newOldProject
.
setNewProjectEmployee
(
tEmployeeProject
);
updateProjectList
.
add
(
newOldProject
);
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
...
...
@@ -1065,6 +1069,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
}
if
(
Common
.
isNotEmpty
(
list
))
{
TEmployeeInfo
tEmployeeInfo
;
int
i
=
0
;
for
(
TEmployeeProject
delProject
:
list
)
{
++
i
;
...
...
@@ -1072,7 +1077,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if
(
CommonConstants
.
dingleDigitIntArray
[
0
]
==
delProject
.
getStatus
())
{
delProject
.
setDeleteFlag
(
CommonConstants
.
ONE_STRING
);
updList
.
add
(
delProject
);
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
delProject
.
getEmpIdcard
())
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
infoUpdList
.
add
(
tEmployeeInfo
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TProveApplyServiceImpl.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
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.entity.MSalaryProvaAtta
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TProveApply
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TProveApplyMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.MSalaryProvaAttaService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TProveApplyService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDate
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Service
public
class
TProveApplyServiceImpl
extends
ServiceImpl
<
TProveApplyMapper
,
TProveApply
>
implements
TProveApplyService
{
@Autowired
private
MSalaryProvaAttaService
salaryProvaAttaService
;
/**
* 简单分页查询
*
* @param tProveApply
* @return
*/
@Override
public
IPage
<
TProveApply
>
getTProveApplyPage
(
Page
<
TProveApply
>
page
,
TProveApply
tProveApply
)
{
return
baseMapper
.
getTProveApplyPage
(
page
,
tProveApply
);
}
@Override
public
R
validSave
(
TProveApply
proveApply
,
String
[]
attaIdArray
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
//查重
long
count
=
this
.
count
(
Wrappers
.<
TProveApply
>
lambdaQuery
()
.
eq
(
TProveApply:
:
getEmployeeInfo
,
proveApply
.
getEmployeeInfo
())
.
eq
(
TProveApply:
:
getStartMonth
,
proveApply
.
getStartMonth
())
.
eq
(
TProveApply:
:
getEndMonth
,
proveApply
.
getEndMonth
())
.
eq
(
TProveApply:
:
getSumType
,
proveApply
.
getSumType
())
.
ne
(
TProveApply:
:
getAuditStatus
,
CommonConstants
.
dingleDigitStrArray
[
2
]));
if
(
count
>
0
)
{
return
R
.
failed
(
"该员工这段时间内已存在申请记录"
);
}
proveApply
.
setId
(
null
);
//初始化数据填充
proveApply
.
setAuditStatus
(
CommonConstants
.
ZERO_STRING
);
//待审核
proveApply
.
setCreatDate
(
LocalDate
.
now
());
proveApply
.
setCreatUser
(
user
.
getId
());
proveApply
.
setCreatUserName
(
user
.
getNickname
());
//保存数据
this
.
save
(
proveApply
);
if
(
Common
.
isNotNull
(
attaIdArray
))
{
//保存关系
List
<
MSalaryProvaAtta
>
mList
=
new
ArrayList
<>();
MSalaryProvaAtta
m
;
for
(
String
id
:
attaIdArray
)
{
m
=
new
MSalaryProvaAtta
();
m
.
setAttaId
(
id
);
m
.
setSalaryProvaId
(
proveApply
.
getId
());
mList
.
add
(
m
);
}
salaryProvaAttaService
.
saveBatch
(
mList
);
}
return
R
.
ok
(
"操作成功!"
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TProveRecordServiceImpl.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
import
com.alibaba.excel.EasyExcelFactory
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TProveRecord
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TProveRecordMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TProveRecordService
;
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.DateUtil
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.text.DecimalFormat
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.concurrent.locks.Lock
;
import
java.util.concurrent.locks.ReentrantLock
;
import
java.util.stream.Collectors
;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Service
public
class
TProveRecordServiceImpl
extends
ServiceImpl
<
TProveRecordMapper
,
TProveRecord
>
implements
TProveRecordService
{
private
Lock
lock
=
new
ReentrantLock
();
/**
* 简单分页查询
*
* @param tProveRecord
* @return
*/
@Override
public
IPage
<
TProveRecord
>
getTProveRecordPage
(
Page
<
TProveRecord
>
page
,
TProveRecord
tProveRecord
)
{
return
baseMapper
.
getTProveRecordPage
(
page
,
tProveRecord
);
}
@Override
public
synchronized
void
saveNo
(
TProveRecord
record
)
{
String
str
=
"WX-"
;
if
(
record
.
getUnitName
()
!=
null
)
{
if
(
record
.
getUnitName
().
contains
(
"易服"
))
{
str
=
"YF-"
;
}
else
if
(
record
.
getUnitName
().
contains
(
"柯恩"
))
{
str
=
"KE-"
;
}
}
Integer
count
=
0
;
//cityName = cityName.replace("市", "");
//str += PingYinUtil.getPYIndexStr(cityName, true) + "-";
count
=
baseMapper
.
createNo
(
str
);
if
(
count
!=
null
)
{
count
++;
if
(
count
<
10000
)
{
str
+=
new
DecimalFormat
(
"00000"
).
format
(
count
);
}
else
{
str
+=
String
.
valueOf
(
count
);
}
}
else
{
str
+=
"00001"
;
}
record
.
setNo
(
str
);
this
.
save
(
record
);
}
@Override
public
List
<
TProveRecord
>
getRecordInfoNoPage
(
TProveRecord
pr
)
{
return
baseMapper
.
getRecordInfoNoPage
(
pr
);
}
/**
* 工资报账主表(工资条)批量导出
*
* @return
*/
@Override
public
void
listExport
(
HttpServletResponse
response
,
TProveRecord
searchVo
)
{
String
fileName
=
"证明记录导出"
+
DateUtil
.
getThisTime
()
+
CommonConstants
.
XLSX
;
//获取要导出的列表
List
<
TProveRecord
>
list
=
new
ArrayList
<>();
int
count
=
baseMapper
.
getCountByExport
(
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,然后文件流会自动关闭
if
(
Common
.
isEmpty
(
searchVo
.
getExportFields
()))
{
//String[] exportFields = {"姓名", "证明编号", "身份证", "结算主体", "计算类型", "开始月份", "结束月份"
// , "平均工资", "开具人", "开具日期", "用途", "是否作废", "作废原因"}
String
[]
exportFields
=
{
"employeeName"
,
"no"
,
"employeeIdCard"
,
"employeeSettleDepartName"
,
"sumType"
,
"startMonth"
,
"endMonth"
,
"proveSalary"
,
"creatUserName"
,
"creatDate"
,
"purpose"
,
"isInvalid"
,
"invalidReason"
};
Set
<
String
>
exportSet
=
Arrays
.
stream
(
exportFields
).
collect
(
Collectors
.
toSet
());
searchVo
.
setExportFields
(
exportSet
);
}
ExcelWriter
excelWriter
=
EasyExcelFactory
.
write
(
out
,
TProveRecord
.
class
).
includeColumnFiledNames
(
searchVo
.
getExportFields
()).
build
();
int
index
=
0
;
WriteSheet
writeSheet
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT_3
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT_3
);
list
=
baseMapper
.
getRecordInfoNoPage
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
writeSheet
=
EasyExcelFactory
.
writerSheet
(
"证明记录"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
list
.
clear
();
}
}
}
else
{
writeSheet
=
EasyExcelFactory
.
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
);
}
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/utils/NumberToCN.java
0 → 100644
View file @
d94a4ec1
/**
* Copyright © 2017yifu. All rights reserved.
*
* @Title: NumberToCN.java
* @Prject: wanxin_hr
* @Package: com.yifu.util
* @Description: TODO
* @author: Administrator
* @date: 2017年5月8日 下午6:45:01
* @version: V1.0
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
utils
;
import
java.math.BigDecimal
;
/**
* @Author: wangan
* @Date: 2019/8/9
* @Description: 金额转换金额大写, 从老hr复制过
* @return:
**/
public
class
NumberToCN
{
/**
* 汉语中数字大写
*/
private
static
final
String
[]
CN_UPPER_NUMBER
=
{
"零"
,
"壹"
,
"贰"
,
"叁"
,
"肆"
,
"伍"
,
"陆"
,
"柒"
,
"捌"
,
"玖"
};
/**
* 汉语中货币单位大写,这样的设计类似于占位符
*/
private
static
final
String
[]
CN_UPPER_MONETRAY_UNIT
=
{
"分"
,
"角"
,
"元"
,
"拾"
,
"佰"
,
"仟"
,
"万"
,
"拾"
,
"佰"
,
"仟"
,
"亿"
,
"拾"
,
"佰"
,
"仟"
,
"兆"
,
"拾"
,
"佰"
,
"仟"
};
/**
* 特殊字符:整
*/
private
static
final
String
CN_FULL
=
"整"
;
/**
* 特殊字符:负
*/
private
static
final
String
CN_NEGATIVE
=
"负"
;
/**
* 金额的精度,默认值为2
*/
private
static
final
int
MONEY_PRECISION
=
2
;
/**
* 特殊字符:零元整
*/
private
static
final
String
CN_ZEOR_FULL
=
"零元"
+
CN_FULL
;
/**
* 把输入的金额转换为汉语中人民币的大写
*
* @param numberOfMoney
* 输入的金额
* @return 对应的汉语大写
*/
public
static
String
number2CNMontrayUnit
(
BigDecimal
numberOfMoney
)
{
if
(
null
==
numberOfMoney
)
{
numberOfMoney
=
BigDecimal
.
ZERO
;
}
StringBuffer
sb
=
new
StringBuffer
();
// -1, 0, or 1 as the value of this BigDecimal is negative, zero, or
// positive.
int
signum
=
numberOfMoney
.
signum
();
// 零元整的情况
if
(
signum
==
0
)
{
return
CN_ZEOR_FULL
;
}
// 这里会进行金额的四舍五入
long
number
=
numberOfMoney
.
movePointRight
(
MONEY_PRECISION
).
setScale
(
0
,
4
).
abs
().
longValue
();
// 得到小数点后两位值
long
scale
=
number
%
100
;
int
numUnit
=
0
;
int
numIndex
=
0
;
boolean
getZero
=
false
;
// 判断最后两位数,一共有四中情况:00 = 0, 01 = 1, 10, 11
if
(!(
scale
>
0
))
{
numIndex
=
2
;
number
=
number
/
100
;
getZero
=
true
;
}
if
((
scale
>
0
)
&&
(!(
scale
%
10
>
0
)))
{
numIndex
=
1
;
number
=
number
/
10
;
getZero
=
true
;
}
int
zeroSize
=
0
;
while
(
true
)
{
if
(
number
<=
0
)
{
break
;
}
// 每次获取到最后一个数
numUnit
=
(
int
)
(
number
%
10
);
if
(
numUnit
>
0
)
{
if
((
numIndex
==
9
)
&&
(
zeroSize
>=
3
))
{
sb
.
insert
(
0
,
CN_UPPER_MONETRAY_UNIT
[
6
]);
}
if
((
numIndex
==
13
)
&&
(
zeroSize
>=
3
))
{
sb
.
insert
(
0
,
CN_UPPER_MONETRAY_UNIT
[
10
]);
}
sb
.
insert
(
0
,
CN_UPPER_MONETRAY_UNIT
[
numIndex
]);
sb
.
insert
(
0
,
CN_UPPER_NUMBER
[
numUnit
]);
getZero
=
false
;
zeroSize
=
0
;
}
else
{
++
zeroSize
;
if
(!(
getZero
))
{
sb
.
insert
(
0
,
CN_UPPER_NUMBER
[
numUnit
]);
}
if
(
numIndex
==
2
)
{
if
(
number
>
0
)
{
sb
.
insert
(
0
,
CN_UPPER_MONETRAY_UNIT
[
numIndex
]);
}
}
else
if
(((
numIndex
-
2
)
%
4
==
0
)
&&
(
number
%
1000
>
0
))
{
sb
.
insert
(
0
,
CN_UPPER_MONETRAY_UNIT
[
numIndex
]);
}
getZero
=
true
;
}
// 让number每次都去掉最后一个数
number
=
number
/
10
;
++
numIndex
;
}
// 如果signum == -1,则说明输入的数字为负数,就在最前面追加特殊字符:负
if
(
signum
==
-
1
)
{
sb
.
insert
(
0
,
CN_NEGATIVE
);
}
// 输入的数字小数点后两位为"00"的情况,则要在最后追加特殊字符:整
if
(!(
scale
>
0
))
{
sb
.
append
(
CN_FULL
);
}
return
sb
.
toString
();
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/LUnitInfoForProveMapper.xml
0 → 100644
View file @
d94a4ec1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.archives.mapper.LUnitInfoForProveMapper"
>
<resultMap
id=
"lUnitInfoForProveMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.entity.LUnitInfoForProve"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"creatUser"
column=
"creat_user"
/>
<result
property=
"unitName"
column=
"unit_name"
/>
<result
property=
"unitAddr"
column=
"unit_addr"
/>
<result
property=
"phone"
column=
"phone"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.id,
a.creat_user,
a.unit_name,
a.unit_addr,
a.phone
</sql>
<sql
id=
"lUnitInfoForProve_where"
>
<if
test=
"lUnitInfoForProve != null"
>
<if
test=
"lUnitInfoForProve.id != null"
>
AND a.id = #{lUnitInfoForProve.id}
</if>
<if
test=
"lUnitInfoForProve.creatUser != null"
>
AND a.creat_user = #{lUnitInfoForProve.creatUser}
</if>
<if
test=
"lUnitInfoForProve.unitName != null and lUnitInfoForProve.unitName.trim() != ''"
>
AND a.unit_name = #{lUnitInfoForProve.unitName}
</if>
<if
test=
"lUnitInfoForProve.unitAddr != null and lUnitInfoForProve.unitAddr.trim() != ''"
>
AND a.unit_addr = #{lUnitInfoForProve.unitAddr}
</if>
<if
test=
"lUnitInfoForProve.phone != null and lUnitInfoForProve.phone.trim() != ''"
>
AND a.phone = #{lUnitInfoForProve.phone}
</if>
</if>
</sql>
</mapper>
yifu-archives/yifu-archives-biz/src/main/resources/mapper/MSalaryProvaAttaMapper.xml
0 → 100644
View file @
d94a4ec1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.archives.mapper.MSalaryProvaAttaMapper"
>
<resultMap
id=
"mSalaryProvaAttaMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.entity.MSalaryProvaAtta"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"salaryProvaId"
column=
"SALARY_PROVA_ID"
/>
<result
property=
"attaId"
column=
"ATTA_ID"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.id,
a.SALARY_PROVA_ID,
a.ATTA_ID
</sql>
<sql
id=
"mSalaryProvaAtta_where"
>
<if
test=
"mSalaryProvaAtta != null"
>
<if
test=
"mSalaryProvaAtta.id != null and mSalaryProvaAtta.id.trim() != ''"
>
AND a.id = #{mSalaryProvaAtta.id}
</if>
<if
test=
"mSalaryProvaAtta.salaryProvaId != null and mSalaryProvaAtta.salaryProvaId.trim() != ''"
>
AND a.SALARY_PROVA_ID = #{mSalaryProvaAtta.salaryProvaId}
</if>
<if
test=
"mSalaryProvaAtta.attaId != null and mSalaryProvaAtta.attaId.trim() != ''"
>
AND a.ATTA_ID = #{mSalaryProvaAtta.attaId}
</if>
</if>
</sql>
</mapper>
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TAttaInfoMapper.xml
View file @
d94a4ec1
...
...
@@ -8,7 +8,7 @@
<result
property=
"attaSrc"
column=
"atta_src"
/>
<result
property=
"attaSize"
column=
"atta_size"
/>
<result
property=
"attaType"
column=
"atta_type"
/>
<result
property=
"create
User"
column=
"create_user
"
/>
<result
property=
"create
By"
column=
"create_by
"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"relationType"
column=
"relation_type"
/>
<result
property=
"domainId"
column=
"domain_id"
/>
...
...
@@ -19,7 +19,7 @@
a.atta_src,
a.atta_size,
a.atta_type,
a.create_
user
,
a.create_
by
,
a.create_time,
a.relation_type,
a.domain_id
...
...
@@ -41,8 +41,8 @@
<if
test=
"tAttaInfo.attaType != null and tAttaInfo.attaType.trim() != ''"
>
AND a.atta_type = #{tAttaInfo.attaType}
</if>
<if
test=
"tAttaInfo.create
User != null and tAttaInfo.createUser
.trim() != ''"
>
AND a.create_
user = #{tAttaInfo.createUser
}
<if
test=
"tAttaInfo.create
By != null and tAttaInfo.createBy
.trim() != ''"
>
AND a.create_
by = #{tAttaInfo.createBy
}
</if>
<if
test=
"tAttaInfo.createTime != null"
>
AND a.create_time = #{tAttaInfo.createTime}
...
...
@@ -106,4 +106,12 @@
</foreach>
</if>
</update>
<select
id=
"getAttaByApplyId"
resultMap=
"tAttaInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_atta_info a
where EXISTS (select 1 from m_salary_prova_atta b where b.SALARY_PROVA_ID = #{applyId} and a.id = b.ATTA_ID);
</select>
</mapper>
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TProveApplyMapper.xml
0 → 100644
View file @
d94a4ec1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.archives.mapper.TProveApplyMapper"
>
<resultMap
id=
"tProveApplyMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.entity.TProveApply"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"employeeInfo"
column=
"employee_info"
/>
<result
property=
"creatUser"
column=
"creat_user"
/>
<result
property=
"creatDate"
column=
"creat_date"
/>
<result
property=
"startMonth"
column=
"start_month"
/>
<result
property=
"endMonth"
column=
"end_month"
/>
<result
property=
"proveSalary"
column=
"prove_salary"
/>
<result
property=
"applyReason"
column=
"apply_reason"
/>
<result
property=
"auditStatus"
column=
"audit_status"
/>
<result
property=
"auditUser"
column=
"audit_user"
/>
<result
property=
"auditDate"
column=
"audit_date"
/>
<result
property=
"sumType"
column=
"sum_type"
/>
<result
property=
"salary"
column=
"salary"
/>
<result
property=
"employeeName"
column=
"EMPLOYEE_NAME"
/>
<result
property=
"employeeIdCard"
column=
"EMPLOYEE_ID_CARD"
/>
<result
property=
"settleDomainName"
column=
"SETTLE_DOMAIN_NAME"
/>
<result
property=
"creatUserName"
column=
"CREAT_USER_NAME"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.id,
a.employee_info,
a.creat_user,
a.creat_date,
a.start_month,
a.end_month,
a.prove_salary,
a.apply_reason,
a.audit_status,
a.audit_user,
a.audit_date,
a.sum_type,
a.salary,
a.EMPLOYEE_NAME,
a.EMPLOYEE_ID_CARD,
a.SETTLE_DOMAIN_NAME,
a.AUDIT_USER_NAME,
a.CREAT_USER_NAME
</sql>
<sql
id=
"tProveApply_where"
>
<if
test=
"tProveApply != null"
>
<if
test=
"tProveApply.employeeIdCard != null and tProveApply.employeeIdCard.trim() != ''"
>
AND a.EMPLOYEE_ID_CARD like '%${tProveApply.employeeIdCard}%'
</if>
<if
test=
"tProveApply.employeeName != null and tProveApply.employeeName.trim() != ''"
>
AND a.EMPLOYEE_NAME like '%${tProveApply.employeeName}%'
</if>
<if
test=
"tProveApply.employeeInfo != null and tProveApply.employeeInfo.trim() != ''"
>
AND a.employee_info = #{tProveApply.employeeInfo}
</if>
<if
test=
"tProveApply.creatUser != null"
>
AND a.creat_user = #{tProveApply.creatUser}
</if>
<if
test=
"tProveApply.creatDate != null"
>
AND a.creat_date = #{tProveApply.creatDate}
</if>
<if
test=
"tProveApply.startMonth != null and tProveApply.startMonth.trim() != ''"
>
AND a.start_month = #{tProveApply.startMonth}
</if>
<if
test=
"tProveApply.endMonth != null and tProveApply.endMonth.trim() != ''"
>
AND a.end_month = #{tProveApply.endMonth}
</if>
<if
test=
"tProveApply.proveSalary != null"
>
AND a.prove_salary = #{tProveApply.proveSalary}
</if>
<if
test=
"tProveApply.applyReason != null and tProveApply.applyReason.trim() != ''"
>
AND a.apply_reason = #{tProveApply.applyReason}
</if>
<if
test=
"tProveApply.auditStatus != null"
>
AND a.audit_status = #{tProveApply.auditStatus}
</if>
<if
test=
"tProveApply.auditUser != null"
>
AND a.audit_user = #{tProveApply.auditUser}
</if>
<if
test=
"tProveApply.auditDate != null"
>
AND a.audit_date = #{tProveApply.auditDate}
</if>
<if
test=
"tProveApply.sumType != null"
>
AND a.sum_type = #{tProveApply.sumType}
</if>
<if
test=
"tProveApply.salary != null"
>
AND a.salary = #{tProveApply.salary}
</if>
</if>
</sql>
<!--tProveApply简单分页查询-->
<select
id=
"getTProveApplyPage"
resultMap=
"tProveApplyMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_prove_apply a
<where>
1=1
<include
refid=
"tProveApply_where"
/>
</where>
</select>
</mapper>
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TProveRecordMapper.xml
0 → 100644
View file @
d94a4ec1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.archives.mapper.TProveRecordMapper"
>
<resultMap
id=
"tProveRecordMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.entity.TProveRecord"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"employeeInfo"
column=
"employee_info"
/>
<result
property=
"creatUser"
column=
"creat_user"
/>
<result
property=
"creatDate"
column=
"creat_date"
/>
<result
property=
"startMonth"
column=
"start_month"
/>
<result
property=
"endMonth"
column=
"end_month"
/>
<result
property=
"salary"
column=
"salary"
/>
<result
property=
"proveSalary"
column=
"prove_salary"
/>
<result
property=
"isInvalid"
column=
"is_invalid"
/>
<result
property=
"invalidReason"
column=
"invalid_reason"
/>
<result
property=
"no"
column=
"no"
/>
<result
property=
"purpose"
column=
"purpose"
/>
<result
property=
"sumType"
column=
"sum_type"
/>
<result
property=
"proveType"
column=
"prove_type"
/>
<result
property=
"number"
column=
"number"
/>
<result
property=
"unitName"
column=
"unit_name"
/>
<result
property=
"unitAddr"
column=
"unit_addr"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"employeeIdCard"
column=
"EMPLOYEE_ID_CARD"
/>
<result
property=
"employeeName"
column=
"EMPLOYEE_NAME"
/>
<result
property=
"employeeSettleDepartName"
column=
"EMPLOYEE_SETTLE_DEPART_NAME"
/>
<result
property=
"creatUserName"
column=
"CREAT_USER_NAME"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.id,
a.employee_info,
a.creat_user,
a.creat_date,
a.start_month,
a.end_month,
a.salary,
a.prove_salary,
a.is_invalid,
a.invalid_reason,
a.no,
a.purpose,
a.sum_type,
a.prove_type,
a.number,
a.unit_name,
a.unit_addr,
a.phone,
a.EMPLOYEE_ID_CARD,
a.EMPLOYEE_NAME,
a.EMPLOYEE_SETTLE_DEPART_NAME,
a.CREAT_USER_NAME
</sql>
<sql
id=
"tProveRecord_where"
>
<if
test=
"tProveRecord != null"
>
<if
test=
"tProveRecord.idList != null and tProveRecord.idList.size>0"
>
AND a.id in
<foreach
item=
"idStr"
index=
"index"
collection=
"tProveRecord.idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
</if>
<if
test=
"tProveRecord.creatUser != null"
>
AND a.creat_user = #{tProveRecord.creatUser}
</if>
<if
test=
"tProveRecord.employeeIdCard != null and tProveRecord.employeeIdCard.trim() != ''"
>
AND a.EMPLOYEE_ID_CARD like '%${tProveRecord.employeeIdCard}%'
</if>
<if
test=
"tProveRecord.employeeName != null and tProveRecord.employeeName.trim() != ''"
>
AND a.EMPLOYEE_NAME like '%${tProveRecord.employeeName}%'
</if>
<if
test=
"tProveRecord.creatDate != null"
>
AND a.creat_date = #{tProveRecord.creatDate}
</if>
<if
test=
"tProveRecord.startMonth != null and tProveRecord.startMonth.trim() != ''"
>
AND a.start_month = #{tProveRecord.startMonth}
</if>
<if
test=
"tProveRecord.endMonth != null and tProveRecord.endMonth.trim() != ''"
>
AND a.end_month = #{tProveRecord.endMonth}
</if>
<if
test=
"tProveRecord.salary != null"
>
AND a.salary = #{tProveRecord.salary}
</if>
<if
test=
"tProveRecord.proveSalary != null"
>
AND a.prove_salary = #{tProveRecord.proveSalary}
</if>
<if
test=
"tProveRecord.isInvalid != null"
>
AND a.is_invalid = #{tProveRecord.isInvalid}
</if>
<if
test=
"tProveRecord.invalidReason != null and tProveRecord.invalidReason.trim() != ''"
>
AND a.invalid_reason = #{tProveRecord.invalidReason}
</if>
<if
test=
"tProveRecord.no != null and tProveRecord.no.trim() != ''"
>
AND a.no = #{tProveRecord.no}
</if>
<if
test=
"tProveRecord.purpose != null and tProveRecord.purpose.trim() != ''"
>
AND a.purpose = #{tProveRecord.purpose}
</if>
<if
test=
"tProveRecord.sumType != null"
>
AND a.sum_type = #{tProveRecord.sumType}
</if>
<if
test=
"tProveRecord.proveType != null"
>
AND a.prove_type = #{tProveRecord.proveType}
</if>
<if
test=
"tProveRecord.number != null"
>
AND a.number = #{tProveRecord.number}
</if>
<if
test=
"tProveRecord.unitName != null and tProveRecord.unitName.trim() != ''"
>
AND a.unit_name = #{tProveRecord.unitName}
</if>
<if
test=
"tProveRecord.unitAddr != null and tProveRecord.unitAddr.trim() != ''"
>
AND a.unit_addr = #{tProveRecord.unitAddr}
</if>
<if
test=
"tProveRecord.phone != null and tProveRecord.phone.trim() != ''"
>
AND a.phone = #{tProveRecord.phone}
</if>
</if>
</sql>
<!--tProveRecord简单分页查询-->
<select
id=
"getTProveRecordPage"
resultMap=
"tProveRecordMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_prove_record a
<where>
1=1
<include
refid=
"tProveRecord_where"
/>
</where>
</select>
<!--导出查条数-->
<select
id=
"getCountByExport"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM t_prove_record a
<where>
1=1
<include
refid=
"tProveRecord_where"
/>
</where>
</select>
<!--导出list-->
<select
id=
"getRecordInfoNoPage"
resultMap=
"tProveRecordMap"
>
SELECT
a.id,
a.creat_date,
a.start_month,
a.end_month,
a.salary,
a.prove_salary,
if(a.is_invalid='0','否','是') as is_invalid,
a.invalid_reason,
a.no,
a.purpose,
if(a.sum_type='0','实发平均','应发平均') as sum_type,
if(a.prove_type='0','正式员工证明','试用期员工证明') as prove_type,
a.number,
a.unit_name,
a.unit_addr,
a.phone,
a.EMPLOYEE_ID_CARD,
a.EMPLOYEE_NAME,
a.EMPLOYEE_SETTLE_DEPART_NAME,
a.CREAT_USER_NAME
FROM t_prove_record a
<where>
1=1
<include
refid=
"tProveRecord_where"
/>
</where>
<if
test=
"tProveRecord != null"
>
<if
test=
"tProveRecord.limitStart != null"
>
limit #{tProveRecord.limitStart},#{tProveRecord.limitEnd}
</if>
</if>
</select>
<select
id=
"createNo"
resultType=
"java.lang.Integer"
>
select max(right(a.`no`,5))+1 from t_prove_record a where a.`no` like '${str}%'
</select>
</mapper>
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/WageProofDto.java
0 → 100644
View file @
d94a4ec1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* @program: master
* @description: 工资证明数据
* @author: pwang
* @create: 2019-11-06 12:01
**/
@Data
public
class
WageProofDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
BigDecimal
salary
;
//应发平均
private
Integer
realMonthCount
;
//实发月数
private
String
startMouth
;
private
String
endMouth
;
private
String
emIdCard
;
private
String
sumType
;
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryAccountController.java
View file @
d94a4ec1
...
...
@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
...
...
@@ -39,8 +40,10 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountItemService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService
;
import
com.yifu.cloud.plus.v1.yifu.salary.util.SalaryCommonUtil
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.WageProofDto
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -48,6 +51,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -316,4 +320,73 @@ public class TSalaryAccountController {
public
Boolean
updateSalarySettleStatus
(
@RequestBody
List
<
EkpSocialViewVo
>
viewVo
)
{
return
tSalaryAccountService
.
updateSalarySettleStatus
(
viewVo
);
}
/**
* 服务间调用
* @Author pwang
* @Date 2019-11-06 17:14
* @return
**/
@Inner
@PostMapping
(
"/inner/findAverageSalaryForProve"
)
public
R
<
WageProofDto
>
findAverageSalaryForProve
(
WageProofDto
pd
)
{
return
getWageProofDtoR
(
pd
.
getStartMouth
(),
pd
.
getEndMouth
(),
pd
.
getEmIdCard
(),
pd
.
getSumType
(),
null
);
}
/**
* 获取证明工资数据接口
* @Author pwang
* @Date 2019-11-06 17:14
* @param startMouth 开始月
* @param endMouth 结束月
* @param emIdCard 员工身份证
* @param settleDepartId 结算主体id
* @param sumType 0实发平均 1应发平均
* @return
**/
@Operation
(
summary
=
"获取证明工资数据"
,
description
=
"获取证明工资数据"
)
@GetMapping
(
"/getAverageSalaryForProve"
)
public
R
<
WageProofDto
>
getAverageSalaryForProve
(
String
startMouth
,
String
endMouth
,
String
emIdCard
,
String
sumType
,
String
settleDepartId
)
{
if
(
Common
.
isEmpty
(
startMouth
)
||
Common
.
isEmpty
(
endMouth
)
||
Common
.
isEmpty
(
emIdCard
)
||
Common
.
isEmpty
(
sumType
)
){
return
R
.
failed
(
"参数不完整"
);
}
return
getWageProofDtoR
(
startMouth
,
endMouth
,
emIdCard
,
sumType
,
settleDepartId
);
}
private
R
<
WageProofDto
>
getWageProofDtoR
(
String
startMouth
,
String
endMouth
,
String
emIdCard
,
String
sumType
,
String
settleDepartId
)
{
WageProofDto
wp
=
new
WageProofDto
();
List
<
String
>
accountIdForProve
=
tSalaryAccountService
.
getAccountIdForProve
(
startMouth
,
endMouth
,
emIdCard
,
settleDepartId
);
String
accIdStr
;
int
realMonthCount
=
0
;
BigDecimal
salary
=
null
;
List
<
String
>
accountMonthForProve
=
null
;
if
(
Common
.
isNotNull
(
accountIdForProve
))
{
accountMonthForProve
=
tSalaryAccountService
.
getAccountMonthForProve
(
startMouth
,
endMouth
,
emIdCard
,
settleDepartId
);
if
(
Common
.
isNotNull
(
accountMonthForProve
))
{
realMonthCount
=
accountMonthForProve
.
size
();
int
count
=
LocalDateTimeUtils
.
getBeginOfMonth
(
endMouth
.
concat
(
"01"
),
startMouth
.
concat
(
"01"
),
"yyyyMMdd"
)
+
1
;
if
(
count
!=
realMonthCount
)
{
return
R
.
failed
(
"信息不一致,实际发工资月份为:"
+
SalaryCommonUtil
.
listToStrEasy
(
accountMonthForProve
));
}
}
else
{
return
R
.
failed
(
"实发工资月份有误!"
);
}
//普通工资信息
accIdStr
=
SalaryCommonUtil
.
listForSqlIn
(
accountIdForProve
);
if
(
"0"
.
equals
(
sumType
))
{
salary
=
tSalaryAccountItemService
.
getAllMoneyByAccountIdAndFiedName
(
accIdStr
,
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
);
//实发合计
}
else
{
salary
=
tSalaryAccountItemService
.
getAllMoneyByAccountIdAndFiedName
(
accIdStr
,
SalaryConstants
.
RELAY_SALARY_JAVA
);
//应发合计
}
}
if
(
null
==
salary
)
{
return
R
.
failed
(
"无工资信息!"
);
}
wp
.
setRealMonthCount
(
realMonthCount
);
wp
.
setSalary
(
salary
.
divide
(
new
BigDecimal
(
realMonthCount
),
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
));
return
new
R
(
wp
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
View file @
d94a4ec1
...
...
@@ -176,4 +176,10 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
List
<
TSalaryAccount
>
getListByIdList
(
@Param
(
"idList"
)
List
<
String
>
idList
);
List
<
String
>
getAccountIdForProve
(
@Param
(
"startMouth"
)
String
startMouth
,
@Param
(
"endMouth"
)
String
endMouth
,
@Param
(
"emIdCard"
)
String
emIdCard
,
@Param
(
"settleDepartId"
)
String
settleDepartId
);
List
<
String
>
getAccountMonthForProve
(
@Param
(
"startMouth"
)
String
startMouth
,
@Param
(
"endMouth"
)
String
endMouth
,
@Param
(
"emIdCard"
)
String
emIdCard
,
@Param
(
"settleDepartId"
)
String
settleDepartId
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryAccountService.java
View file @
d94a4ec1
...
...
@@ -193,4 +193,8 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
**/
List
<
TSalaryAccount
>
getListByIdList
(
List
<
String
>
idList
);
// 收入证明使用的
List
<
String
>
getAccountIdForProve
(
String
startMouth
,
String
endMouth
,
String
emIdCard
,
String
settleDepartId
);
List
<
String
>
getAccountMonthForProve
(
String
startMouth
,
String
endMouth
,
String
emIdCard
,
String
settleDepartId
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
d94a4ec1
...
...
@@ -365,4 +365,13 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
public
List
<
TSalaryAccount
>
getListByIdList
(
List
<
String
>
idList
)
{
return
baseMapper
.
getListByIdList
(
idList
);
}
@Override
public
List
<
String
>
getAccountIdForProve
(
String
startMouth
,
String
endMouth
,
String
emIdCard
,
String
settleDepartId
)
{
return
baseMapper
.
getAccountIdForProve
(
startMouth
,
endMouth
,
emIdCard
,
settleDepartId
);
}
@Override
public
List
<
String
>
getAccountMonthForProve
(
String
startMouth
,
String
endMouth
,
String
emIdCard
,
String
settleDepartId
)
{
return
baseMapper
.
getAccountMonthForProve
(
startMouth
,
endMouth
,
emIdCard
,
settleDepartId
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryCommonUtil.java
View file @
d94a4ec1
...
...
@@ -18,9 +18,7 @@ import java.math.BigDecimal;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.Date
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.*
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
...
...
@@ -524,4 +522,47 @@ public class SalaryCommonUtil implements Serializable {
entity
.
setFormType
(
salaryType
);
}
/**
* @param strList
* @Description: 简单的list转化为String
* @Author: hgw
* @Date: 2019/9/27 17:19
* @return: java.lang.String
**/
public
static
String
listToStrEasy
(
List
<
String
>
strList
)
{
StringBuilder
result
=
new
StringBuilder
();
if
(
strList
!=
null
&&
!
strList
.
isEmpty
())
{
for
(
int
i
=
0
;
i
<
strList
.
size
();
i
++)
{
if
(
i
==
0
)
{
result
.
append
(
strList
.
get
(
0
));
}
else
{
result
.
append
(
","
).
append
(
strList
.
get
(
i
));
}
}
}
return
result
.
toString
();
}
/**
* 拼成带'的串xml里用$取值
*
* @param list
* @return
*/
public
static
String
listForSqlIn
(
List
<
String
>
list
)
{
String
result
=
""
;
if
(
Common
.
isNotNull
(
list
))
{
// 去重
Set
<
String
>
set
=
new
HashSet
<
String
>(
list
);
for
(
String
str
:
set
)
{
if
(
""
.
equals
(
result
))
{
result
=
"'"
+
str
+
"'"
;
}
else
{
result
+=
",'"
+
str
+
"'"
;
}
}
}
return
result
;
}
}
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
d94a4ec1
...
...
@@ -1136,4 +1136,29 @@
#{ids}
</foreach>
</select>
<!-- 收入证明使用的 -->
<select
id=
"getAccountIdForProve"
resultType=
"java.lang.String"
>
SELECT a.id
FROM t_salary_account a
WHERE a.EMP_IDCARD = #{emIdCard}
<if
test=
"settleDepartId != null"
>
and a.DEPT_ID = #{settleDepartId}
</if>
and a.DELETE_FLAG = 0
AND PERIOD_DIFF(a.SALARY_MONTH, #{startMouth}) >= 0
AND PERIOD_DIFF(#{endMouth}, a.SALARY_MONTH) >= 0
</select>
<select
id=
"getAccountMonthForProve"
resultType=
"java.lang.String"
>
SELECT a.SALARY_MONTH
FROM t_salary_account a
WHERE a.EMP_IDCARD = #{emIdCard}
<if
test=
"settleDepartId != null"
>
and a.DEPT_ID = #{settleDepartId}
</if>
and a.DELETE_FLAG = 0
AND PERIOD_DIFF(a.SALARY_MONTH, #{startMouth}) >= 0
AND PERIOD_DIFF(#{endMouth}, a.SALARY_MONTH) >= 0
group by a.SALARY_MONTH
</select>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
View file @
d94a4ec1
...
...
@@ -473,6 +473,9 @@
<if
test=
"searchVo.status != null"
>
AND a.STATUS = #{searchVo.status}
</if>
<if
test=
"searchVo.createName != null and searchVo.createName.trim() != ''"
>
AND a.CREATE_NAME = #{searchVo.createName}
</if>
</if>
</sql>
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TPaymentInfo.java
View file @
d94a4ec1
...
...
@@ -356,15 +356,6 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty
(
"就职班组"
)
private
String
inauguralTeam
;
/**
* 排序字段
*/
@ExcelAttribute
(
name
=
"排序字段"
)
@Schema
(
description
=
"排序字段"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"排序字段"
)
private
String
sortTime
;
/**
* 推送状态
*/
...
...
@@ -663,6 +654,13 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty
(
"支出信息付款状态"
)
private
String
payCollectFlag
;
/**
* EKP的 是否BPO: 是 否
*/
@Schema
(
description
=
"是否BPO"
,
name
=
"bpoFlag"
)
@ExcelIgnore
private
String
bpoFlag
;
/**
* 是否需要生成收入
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TProvidentFund.java
View file @
d94a4ec1
...
...
@@ -211,6 +211,15 @@ public class TProvidentFund extends BaseEntity {
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"项目"
)
private
String
settleDomain
;
/**
* 项目编码
*/
@Length
(
max
=
32
,
message
=
"项目编码 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
32
)
@Schema
(
description
=
"项目编码"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"项目编码"
)
private
String
settleDomainCode
;
/**
* 缴纳地-省
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialInfo.java
View file @
d94a4ec1
...
...
@@ -314,6 +314,15 @@ public class TSocialInfo extends BaseEntity {
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"项目"
)
private
String
settleDomain
;
/**
* 项目编码
*/
@Length
(
max
=
32
,
message
=
"项目编码 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
32
)
@Schema
(
description
=
"项目编码"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"项目编码"
)
private
String
settleDomainCode
;
/**
* 缴纳地-省
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TPaymentInfoPushVo.java
View file @
d94a4ec1
...
...
@@ -260,5 +260,12 @@ public class TPaymentInfoPushVo implements Serializable {
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"创建时间"
)
private
String
createTime
;
/**
* 是否bpo标识
*/
@Schema
(
description
=
"是否bpo标识"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否bpo标识"
)
private
String
bpoFlag
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TPaymentInfoVo.java
View file @
d94a4ec1
...
...
@@ -337,15 +337,6 @@ public class TPaymentInfoVo extends RowIndex implements Serializable {
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"就职班组"
)
private
String
inauguralTeam
;
/**
* 排序字段
*/
@Length
(
max
=
32
,
message
=
"排序字段 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"排序字段"
,
maxLength
=
32
)
@Schema
(
description
=
"排序字段"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"排序字段"
)
private
String
sortTime
;
/**
* 单位补缴利息
*/
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
d94a4ec1
...
...
@@ -1373,6 +1373,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
fund
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
fund
.
setBelongUnit
(
excel
.
getCustomerId
());
fund
.
setSettleDomain
(
excel
.
getSettleDomainId
());
fund
.
setSettleDomainCode
(
excel
.
getSettleDomainCode
());
if
(
Common
.
isNotNull
(
empVo
)){
fund
.
setEmpId
(
empVo
.
getId
());
fund
.
setEmpNo
(
empVo
.
getEmpNo
());
...
...
@@ -1504,6 +1505,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 封装单位信息 结算信息
social
.
setBelongUnit
(
excel
.
getCustomerId
());
social
.
setSettleDomain
(
excel
.
getSettleDomainId
());
social
.
setSettleDomainCode
(
excel
.
getSettleDomainCode
());
if
(
Common
.
isNotNull
(
empVo
)){
social
.
setEmpId
(
empVo
.
getId
());
social
.
setEmpName
(
empVo
.
getEmpName
());
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
d94a4ec1
...
...
@@ -422,7 +422,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
importSuccessKey
)))
{
redisUtil
.
remove
(
importSuccessKey
);
}
List
<
ErrorDetailVO
>
errorMessageList
=
new
ArrayList
<>();
ConcurrentHashMap
<
String
,
ErrorDetailVO
>
errorMessageMap
=
new
ConcurrentHashMap
<>();
//养老
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
=
new
ConcurrentHashMap
<>();
//大病救助金
...
...
@@ -437,7 +437,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
=
new
ConcurrentHashMap
<>();
//补缴利息
ConcurrentHashMap
<
String
,
BigDecimal
>
accrualMoneyMap
=
new
ConcurrentHashMap
<>();
//获取所有项目信息
Map
<
String
,
TSettleDomainSelectVo
>
domainMap
=
this
.
getSelectVoMap
();
ExcelUtil
<
TPaymentInfoVo
>
util1
=
new
ExcelUtil
<>(
TPaymentInfoVo
.
class
);
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
...
...
@@ -464,7 +465,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
data
.
setRowIndex
(
rowIndex
+
1
);
ErrorMessage
errorMessage
=
util1
.
checkEntity
(
data
,
data
.
getRowIndex
());
if
(
Common
.
isNotNull
(
errorMessage
))
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
errorMessage
.
getLineNum
(),
errorMessage
.
getMessage
()));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
errorMessage
.
getLineNum
(),
errorMessage
.
getMessage
()));
}
else
{
cachedDataList
.
add
(
data
);
}
...
...
@@ -485,9 +486,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importTPaymentSocialInfo
(
cachedDataList
,
sumNumKey
,
importSuccessKey
,
errorMessage
List
,
user
,
importTPaymentSocialInfo
(
cachedDataList
,
sumNumKey
,
importSuccessKey
,
errorMessage
Map
,
user
,
rowNumber
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
,
accrualMoneyMap
);
medicalMoneyMap
,
accrualMoneyMap
,
domainMap
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
...
...
@@ -495,6 +496,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
domainMap
.
clear
();
pensionMoneyMap
.
clear
();
bigMoneyMap
.
clear
();
unEmpMoneyMap
.
clear
();
...
...
@@ -502,6 +504,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
injuryMoneyMap
.
clear
();
medicalMoneyMap
.
clear
();
accrualMoneyMap
.
clear
();
List
<
ErrorDetailVO
>
errorMessageList
=
new
ArrayList
<>(
errorMessageMap
.
values
());
errorMessageMap
.
clear
();
return
this
.
judgeAllMessage
(
errorMessageList
);
}
...
...
@@ -517,7 +521,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
boolean
isAllTrue
=
true
;
for
(
ErrorDetailVO
d
:
errorMessageList
)
{
try
{
if
(
Common
.
isEmpty
(
d
.
getResult
())
||
d
.
getResult
()
==
0
)
{
if
(
Common
.
isEmpty
(
d
)
||
(
Common
.
isEmpty
(
d
.
getResult
())
||
0
==
d
.
getResult
())
)
{
isAllTrue
=
false
;
break
;
}
...
...
@@ -536,7 +540,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
private
void
importTPaymentSocialInfo
(
List
<
TPaymentInfoVo
>
list
,
String
sumNumKey
,
String
importSuccessKey
,
List
<
ErrorDetailVO
>
errorMessageList
,
ConcurrentHashMap
<
String
,
ErrorDetailVO
>
errorMessageMap
,
YifuUser
user
,
Integer
rowNumber
,
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
,
...
...
@@ -544,7 +548,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap
<
String
,
BigDecimal
>
birMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
accrualMoneyMap
)
{
ConcurrentHashMap
<
String
,
BigDecimal
>
accrualMoneyMap
,
Map
<
String
,
TSettleDomainSelectVo
>
domainMap
)
{
HashMap
<
String
,
String
>
areaMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
areaMap2
=
new
HashMap
<>();
R
<
AreaVo
>
areaListR
=
upmsDaprUtils
.
getAreaListR
();
...
...
@@ -563,7 +568,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 判断是否有相同的用户在导入社保费用 存在提示稍后重试
String
key
=
user
.
getId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
PAYMENT_SOCIAL_IMPORT
;
if
(
redisUtil
.
exists
(
key
))
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(-
1
,
"当前用户数据导入中,请稍后重试!"
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(-
1
,
"当前用户数据导入中,请稍后重试!"
));
redisUtil
.
remove
(
key
);
}
else
{
redisUtil
.
set
(
key
,
user
.
getId
(),
360L
);
...
...
@@ -573,7 +578,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
int
taskSize
=
list
.
size
()
/
partSize
+
CommonConstants
.
ONE_INT
;
int
residualCapacity
=
yfSocialImportThreadPoolExecutor
.
getResidualCapacity
();
if
(
taskSize
>
residualCapacity
)
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(-
1
,
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIALINFO_LIST_NUM_LARGE
)));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(-
1
,
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIALINFO_LIST_NUM_LARGE
)));
}
else
{
// -----------------------------生成paymentInfoMap本段开始--------------------------------
//已存在的档案数据
...
...
@@ -767,9 +772,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// -----------------------------生成paymentInfoMap本段结束--------------------------------
// -----------------------------线程池处理list,批量保存社保信息开始--------------------------------
List
<
TPaymentInfoVo
>
tempList
=
new
ArrayList
<>();
List
<
CompletableFuture
<
List
<
ErrorDetailVO
>>>
completableFutureList
=
new
ArrayList
<>();
List
<
CompletableFuture
<
ConcurrentHashMap
<
String
,
ErrorDetailVO
>>>
completableFutureList
=
new
ArrayList
<>();
// 创建一个数值格式化对象
NumberFormat
numberFormat
=
NumberFormat
.
getInstance
();
...
...
@@ -797,81 +800,36 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
redisUtil
.
set
(
importSuccessKey
,
maerialRatio
,
360L
);
try
{
// 1.list.size()不足partSize,直接执行
if
(
list
.
size
()
<
partSize
)
{
CompletableFuture
<
List
<
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialList
(
user
,
list
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
,
accrualMoneyMap
,
paymentInfoaccrualMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
}
// 2.list.size()大于partSize,循环分批执行
int
lastIdx
=
0
;
if
(
partSize
<=
list
.
size
())
{
// 处理第一个0位元素
final
List
<
TPaymentInfoVo
>
finalList
=
list
.
subList
(
0
,
1
);
CompletableFuture
<
List
<
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialList
(
user
,
finalList
,
areaMap
,
areaMap2
,
// 1.list.size()不足100时直接执行
if
(
list
.
size
()
<
100
)
{
CompletableFuture
<
ConcurrentHashMap
<
String
,
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialList
(
user
,
list
,
areaMap
,
areaMap2
,
domainMap
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessage
List
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
errorMessage
Map
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
,
accrualMoneyMap
,
paymentInfoaccrualMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
lastIdx
=
1
;
for
(
int
i
=
1
;
i
<
list
.
size
();
i
++)
{
// partSize数量的list为一个执行单元
tempList
.
add
(
list
.
get
(
i
));
if
(
i
%
partSize
==
0
)
{
lastIdx
=
i
;
List
<
TPaymentInfoVo
>
finalTempList
=
tempList
;
CompletableFuture
<
List
<
ErrorDetailVO
>>
oneCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialList
(
user
,
finalTempList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
,
accrualMoneyMap
,
paymentInfoaccrualMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
oneCompletableFuture
);
tempList
=
new
ArrayList
<>();
}
}
}
// 3.第2种方式执行完后,有余数的情况下,执行3
if
(
lastIdx
!=
0
)
{
tempList
=
new
ArrayList
<>();
if
(
lastIdx
==
1
)
{
for
(
int
i
=
lastIdx
;
i
<
list
.
size
();
i
++)
{
tempList
.
add
(
list
.
get
(
i
));
}
}
else
{
for
(
int
i
=
lastIdx
+
1
;
i
<
list
.
size
();
i
++)
{
tempList
.
add
(
list
.
get
(
i
));
}
lastIdx
+=
1
;
}
List
<
TPaymentInfoVo
>
finalTempList
=
tempList
;
CompletableFuture
<
List
<
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialList
(
user
,
finalTempList
,
areaMap
,
areaMap2
,
int
j
=
25
;
for
(
int
i
=
0
;
i
<
100
;
i
=
i
+
25
)
{
// 单个线程每次执行25条
final
List
<
TPaymentInfoVo
>
finalList
=
list
.
subList
(
i
,
i
+
j
);
CompletableFuture
<
ConcurrentHashMap
<
String
,
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialList
(
user
,
finalList
,
areaMap
,
areaMap2
,
domainMap
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
errorMessageMap
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
,
accrualMoneyMap
,
paymentInfoaccrualMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
}
}
// 阻塞当前线程,等待所有的线程执行完毕
boolean
computeFlag
;
do
{
computeFlag
=
false
;
for
(
CompletableFuture
<
List
<
ErrorDetailVO
>>
listCompletableFuture
:
completableFutureList
)
{
for
(
CompletableFuture
<
ConcurrentHashMap
<
String
,
ErrorDetailVO
>>
listCompletableFuture
:
completableFutureList
)
{
if
(!
listCompletableFuture
.
isDone
())
{
computeFlag
=
true
;
}
...
...
@@ -928,17 +886,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
* @date: 2022/7/25
* @return:
*/
private
List
<
ErrorDetailVO
>
executeImportSocialList
(
YifuUser
user
,
private
ConcurrentHashMap
<
String
,
ErrorDetailVO
>
executeImportSocialList
(
YifuUser
user
,
List
<
TPaymentInfoVo
>
list
,
HashMap
<
String
,
String
>
areaMap
,
HashMap
<
String
,
String
>
areaMap2
,
Map
<
String
,
TSettleDomainSelectVo
>
domainMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoPensionMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoBigMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoBirMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoMedicalMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoUnEmpMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoInjuryMap
,
List
<
ErrorDetailVO
>
errorMessageList
,
ConcurrentHashMap
<
String
,
ErrorDetailVO
>
errorMessageMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
,
...
...
@@ -952,10 +911,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TSocialFundInfo
socialInfo
;
TSocialInfo
tSocialInfo
=
null
;
String
temp
;
int
res
;
List
<
TSocialInfo
>
socialist
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
R
<
TSettleDomainListVo
>
listVo
;
TSettleDomain
domain
;
List
<
TSocialFundInfo
>
socialInfoList
=
socialFundInfoMapper
.
selectList
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
()
.
in
(
TSocialFundInfo:
:
getEmpIdcard
,
Common
.
listObjectToStrList
(
list
,
ExcelAttributeConstants
.
EMPIDCARD
)));
...
...
@@ -980,15 +937,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
//导入校验
if
(!
Common
.
isNotNull
(
infoVo
.
getSocialPayMonth
()))
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"社保缴纳月份不可为空!"
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"社保缴纳月份不可为空!"
));
continue
;
}
if
(!
Common
.
isNotNull
(
infoVo
.
getSocialCreateMonth
()))
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"社保生成月份不可为空!"
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"社保生成月份不可为空!"
));
continue
;
}
if
(!
Common
.
isNotNull
(
infoVo
.
getSocialPayAddr
()))
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"社保缴纳地不可为空!"
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"社保缴纳地不可为空!"
));
continue
;
}
//无对应员工的社保数据
...
...
@@ -1002,11 +959,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
?
"null"
:
infoVo
.
getSocialTown
()));
//对身份证与人员姓名的对应关系进行校验
if
(
socialInfo
!=
null
&&
!
socialInfo
.
getEmpName
().
equals
(
infoVo
.
getEmpName
()))
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"姓名与身份证信息不一致,请核实后再次尝试!"
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"姓名与身份证信息不一致,请核实后再次尝试!"
));
continue
;
}
if
(
socialInfo
!=
null
&&
socialInfo
.
getSocialStartDate
()
==
null
)
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpIdcard
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的社保起缴日期为空!"
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpIdcard
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的社保起缴日期为空!"
));
continue
;
}
...
...
@@ -1030,7 +987,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
if
(!
isTrueAdder
)
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"无对应员工"
+
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"无对应员工"
+
infoVo
.
getEmpIdcard
()
+
"的社保数据(请查验社保缴纳地)"
));
continue
;
}
...
...
@@ -1041,7 +998,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(
pensionMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitPensionMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalPensionMoney
())),
pensionMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的养老缴费数据"
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的养老缴费数据"
));
continue
;
}
else
{
pensionMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitPensionMoney
()),
...
...
@@ -1052,7 +1009,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(
accrualMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalAccrual
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getCompanyAccrual
())),
accrualMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的补缴缴费数据"
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的补缴缴费数据"
));
continue
;
}
else
{
accrualMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
...
...
@@ -1064,7 +1021,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(
medicalMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMedicalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMedicalMoney
())),
medicalMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的医保缴费数据"
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的医保缴费数据"
));
continue
;
}
else
{
medicalMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
...
...
@@ -1076,7 +1033,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(
unEmpMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitUnemploymentMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalUnemploymentMoney
())),
unEmpMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的失业缴费数据"
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的失业缴费数据"
));
continue
;
}
else
{
unEmpMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
...
...
@@ -1087,7 +1044,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
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
)
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的工伤缴费数据"
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的工伤缴费数据"
));
continue
;
}
else
{
injuryMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitInjuryMoney
()));
...
...
@@ -1096,7 +1053,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
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
)
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的生育缴费数据"
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的生育缴费数据"
));
continue
;
}
else
{
birMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitBirthMoney
()));
...
...
@@ -1107,7 +1064,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitBigmailmentMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalBigmailmentMoney
())),
bigMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的医疗救助金缴费数据"
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
infoVo
.
getSocialHousehold
(),
infoVo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的医疗救助金缴费数据"
));
continue
;
}
else
{
bigMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
...
...
@@ -1134,7 +1091,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalPensionMoney
())),
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
paymentInfo
.
getUnitPensionMoney
()),
BigDecimalUtils
.
isNullToZero
(
paymentInfo
.
getPersonalPensionMoney
()))).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)))
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的养老缴费数据,请勿重复导入!"
));
continue
;
}
...
...
@@ -1159,7 +1116,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getCompanyAccrual
())),
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
paymentInfo
.
getPersonalAccrual
()),
BigDecimalUtils
.
isNullToZero
(
paymentInfo
.
getCompanyAccrual
()))).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)))
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的补缴缴费数据,请勿重复导入!"
));
continue
;
}
...
...
@@ -1184,7 +1141,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalUnemploymentMoney
())),
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
paymentInfo
.
getUnitUnemploymentMoney
()),
BigDecimalUtils
.
isNullToZero
(
paymentInfo
.
getPersonalUnemploymentMoney
()))).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)))
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的失业缴费数据,请勿重复导入!"
));
continue
;
}
...
...
@@ -1210,7 +1167,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMedicalMoney
())),
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
paymentInfo
.
getUnitMedicalMoney
()),
BigDecimalUtils
.
isNullToZero
(
paymentInfo
.
getPersonalMedicalMoney
()))).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)))
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的医保缴费数据,请勿重复导入!"
));
continue
;
}
...
...
@@ -1235,7 +1192,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalBigmailmentMoney
())),
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
paymentInfo
.
getUnitBigmailmentMoney
()),
BigDecimalUtils
.
isNullToZero
(
paymentInfo
.
getPersonalBigmailmentMoney
()))).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)))
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的医疗救助金缴费数据,请勿重复导入!"
));
continue
;
}
...
...
@@ -1256,7 +1213,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(
null
!=
paymentInfo
&&
((
null
!=
paymentInfo
.
getGsSameFlg
()
&&
CommonConstants
.
ONE_STRING
.
equals
(
paymentInfo
.
getGsSameFlg
()))
||
(
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitInjuryMoney
()),
BigDecimalUtils
.
isNullToZero
(
paymentInfo
.
getUnitInjuryMoney
())).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)))
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的单位工伤缴费数据,请勿重复导入!"
));
continue
;
}
...
...
@@ -1277,7 +1234,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(
null
!=
paymentInfo
&&
((
null
!=
paymentInfo
.
getBrSameFlg
()
&&
CommonConstants
.
ONE_STRING
.
equals
(
paymentInfo
.
getBrSameFlg
()))
||
(
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitBirthMoney
()),
BigDecimalUtils
.
isNullToZero
(
paymentInfo
.
getUnitBirthMoney
())).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)))
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的单位生育缴费数据,请勿重复导入!"
));
continue
;
}
...
...
@@ -1294,6 +1251,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo
.
setEmpId
(
socialInfo
.
getEmpId
());
paymentInfo
.
setEmpIdcard
(
socialInfo
.
getEmpIdcard
());
paymentInfo
.
setEmpName
(
socialInfo
.
getEmpName
());
//获取项目信息
if
(
Common
.
isNotNull
(
domainMap
))
{
domain
=
domainMap
.
get
(
socialInfo
.
getSettleDomainCode
());
}
else
{
domain
=
null
;
}
if
(
Common
.
isNotNull
(
domain
))
{
paymentInfo
.
setBpoFlag
(
domain
.
getBpoFlag
());
}
else
{
errorMessageMap
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"未找到对应的项目信息,请核实"
));
continue
;
}
paymentInfo
.
setSettleDomainId
(
socialInfo
.
getSettleDomain
());
paymentInfo
.
setSettleDomainName
(
socialInfo
.
getSettleDomainName
());
paymentInfo
.
setSettleDomainCode
(
socialInfo
.
getSettleDomainCode
());
...
...
@@ -1307,20 +1276,23 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo
.
setEmpId
(
tSocialInfo
.
getEmpId
());
paymentInfo
.
setEmpIdcard
(
tSocialInfo
.
getEmpIdcard
());
paymentInfo
.
setEmpName
(
tSocialInfo
.
getEmpName
());
paymentInfo
.
setSettleDomainId
(
tSocialInfo
.
getSettleDomain
());
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoById
(
tSocialInfo
.
getSettleDomain
());
if
(
Common
.
isNotNull
(
listVo
))
{
TSettleDomainListVo
tSettleDomainListVo
=
listVo
.
getData
();
if
(
Common
.
isNotNull
(
tSettleDomainListVo
)
&&
Common
.
isNotEmpty
(
tSettleDomainListVo
.
getListSelectVO
()))
{
settleDomainR
=
tSettleDomainListVo
.
getListSelectVO
();
for
(
TSettleDomainSelectVo
vo
:
settleDomainR
)
{
paymentInfo
.
setSettleDomainName
(
vo
.
getDepartName
());
paymentInfo
.
setSettleDomainCode
(
vo
.
getDepartNo
());
paymentInfo
.
setUnitId
(
vo
.
getCustomerId
());
paymentInfo
.
setUnitName
(
vo
.
getCustomerName
());
}
//获取项目信息
if
(
Common
.
isNotNull
(
domainMap
))
{
domain
=
domainMap
.
get
(
tSocialInfo
.
getSettleDomainCode
());
}
else
{
domain
=
null
;
}
if
(
Common
.
isNotNull
(
domain
))
{
paymentInfo
.
setSettleDomainName
(
domain
.
getDepartName
());
paymentInfo
.
setUnitId
(
domain
.
getCustomerId
());
paymentInfo
.
setUnitName
(
domain
.
getCustomerName
());
paymentInfo
.
setBpoFlag
(
domain
.
getBpoFlag
());
}
else
{
errorMessageMap
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"未找到对应的项目信息,请核实"
));
continue
;
}
paymentInfo
.
setSettleDomainId
(
tSocialInfo
.
getSettleDomainCode
());
paymentInfo
.
setSettleDomainCode
(
tSocialInfo
.
getSettleDomain
());
paymentInfo
.
setSocialProvince
(
tSocialInfo
.
getSocialProvince
());
paymentInfo
.
setSocialCity
(
tSocialInfo
.
getSocialCity
());
paymentInfo
.
setSocialTown
(
tSocialInfo
.
getSocialTown
());
...
...
@@ -1397,31 +1369,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo
.
setCreateBy
(
user
.
getId
());
paymentInfo
.
setCreateName
(
user
.
getNickname
());
paymentInfo
.
setSocialId
(
UUID
.
randomUUID
().
toString
());
res
=
insertAndSTimestamp
(
paymentInfo
);
int
res
=
baseMapper
.
insert
(
paymentInfo
);
if
(
res
<
0
)
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
CommonConstants
.
SAVE_FAILED
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
CommonConstants
.
SAVE_FAILED
));
}
else
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ONE_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
CommonConstants
.
SAVE_SUCCESS
));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ONE_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
CommonConstants
.
SAVE_SUCCESS
));
}
}
}
return
errorMessageList
;
}
/**
* 拼接排序字段并插入
*
* @param entity
* @return
* @Author huyc
* @Date 2022-07-25
**/
private
int
insertAndSTimestamp
(
TPaymentInfo
entity
)
{
if
(
Common
.
isNotNull
(
entity
.
getSocialCreateMonth
())
&&
Common
.
isNotNull
(
entity
.
getSocialPayMonth
()))
{
entity
.
setSortTime
(
entity
.
getSocialCreateMonth
().
concat
(
entity
.
getSocialPayMonth
()).
concat
(
String
.
valueOf
(
System
.
currentTimeMillis
())));
}
return
baseMapper
.
insert
(
entity
);
return
errorMessageMap
;
}
@Override
...
...
@@ -1444,7 +1400,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//医疗插入的集合
ConcurrentHashMap
<
String
,
TPaymentInfo
>
batchYyInsertList
=
new
ConcurrentHashMap
<>();
//获取所有项目信息
Map
<
String
,
TSettleDomainSelectVo
>
domainMap
=
this
.
getSelectVoMap
ById
();
Map
<
String
,
TSettleDomainSelectVo
>
domainMap
=
this
.
getSelectVoMap
();
//地区数据
HashMap
<
String
,
String
>
areaMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
areaMap2
=
new
HashMap
<>();
...
...
@@ -1574,7 +1530,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//批量插入的集合
List
<
TPaymentInfo
>
batchInsertList
=
new
ArrayList
<>();
//获取所有项目信息
Map
<
String
,
TSettleDomainSelectVo
>
domainMap
=
this
.
getSelectVoMap
ById
();
Map
<
String
,
TSettleDomainSelectVo
>
domainMap
=
this
.
getSelectVoMap
();
//地区数据
HashMap
<
String
,
String
>
areaMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
areaMap2
=
new
HashMap
<>();
...
...
@@ -1794,6 +1750,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo
.
setEmpId
(
fund
.
getEmpId
());
paymentInfo
.
setEmpIdcard
(
fund
.
getEmpIdcard
());
paymentInfo
.
setEmpName
(
fund
.
getEmpName
());
if
(
Common
.
isNotNull
(
domainMap
))
{
domain
=
domainMap
.
get
(
fund
.
getSettleDomainCodeFund
());
}
else
{
domain
=
null
;
}
if
(
Common
.
isNotNull
(
domain
))
{
paymentInfo
.
setBpoFlag
(
domain
.
getBpoFlag
());
}
else
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"未找到对应的项目信息,请核实"
));
continue
;
}
paymentInfo
.
setSettleDomainId
(
fund
.
getSettleDomainFund
());
paymentInfo
.
setSettleDomainName
(
fund
.
getSettleDomainNameFund
());
paymentInfo
.
setSettleDomainCode
(
fund
.
getSettleDomainCodeFund
());
...
...
@@ -1807,24 +1774,23 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo
.
setEmpId
(
tProvidentFund
.
getEmpId
());
paymentInfo
.
setEmpIdcard
(
tProvidentFund
.
getEmpIdcard
());
paymentInfo
.
setEmpName
(
tProvidentFund
.
getEmpName
());
paymentInfo
.
setSettleDomainId
(
tProvidentFund
.
getSettleDomain
());
//获取项目信息
if
(
Common
.
isNotNull
(
domainMap
))
{
domain
=
domainMap
.
get
(
tProvidentFund
.
getSettleDomain
());
domain
=
domainMap
.
get
(
tProvidentFund
.
getSettleDomain
Code
());
}
else
{
domain
=
null
;
}
if
(
Common
.
isNotNull
(
domain
))
{
paymentInfo
.
setSettleDomainName
(
domain
.
getDepartName
());
paymentInfo
.
setSettleDomainCode
(
domain
.
getDepartNo
());
paymentInfo
.
setUnitId
(
domain
.
getCustomerId
());
paymentInfo
.
setUnitName
(
domain
.
getCustomerName
());
paymentInfo
.
setBpoFlag
(
domain
.
getBpoFlag
());
}
else
{
paymentInfo
.
setSettleDomainName
(
""
);
paymentInfo
.
setSettleDomainCode
(
""
);
paymentInfo
.
setUnitId
(
""
);
paymentInfo
.
setUnitName
(
""
);
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
paymentInfo
.
getSocialHousehold
(),
paymentInfo
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"未找到对应的项目信息,请核实"
));
continue
;
}
paymentInfo
.
setSettleDomainId
(
tProvidentFund
.
getSettleDomain
());
paymentInfo
.
setSettleDomainCode
(
tProvidentFund
.
getSettleDomainCode
());
paymentInfo
.
setFundProvince
(
tProvidentFund
.
getFundProvince
());
paymentInfo
.
setFundCity
(
tProvidentFund
.
getFundCity
());
paymentInfo
.
setFundTown
(
tProvidentFund
.
getFundTown
());
...
...
@@ -2088,7 +2054,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
redisUtil
.
set
(
importSuccessKey
,
maerialRatio
,
360L
);
try
{
// 1.list.size()不足
partSize,
直接执行
// 1.list.size()不足
100时
直接执行
if
(
list
.
size
()
<
100
)
{
CompletableFuture
<
ConcurrentHashMap
<
String
,
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
list
,
areaMap
,
areaMap2
,
...
...
@@ -2101,7 +2067,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
else
{
int
j
=
25
;
for
(
int
i
=
0
;
i
<
100
;
i
=
i
+
25
)
{
//
partSize数量的list为一个执行单元
//
单个线程每次执行25条
List
<
TPaymentHeFeiVo
>
finalTempList1
=
list
.
subList
(
i
,
i
+
j
);
CompletableFuture
<
ConcurrentHashMap
<
String
,
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
finalTempList1
...
...
@@ -2453,6 +2419,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists
.
setEmpId
(
socialInfo
.
getEmpId
());
payExists
.
setEmpIdcard
(
socialInfo
.
getEmpIdcard
());
payExists
.
setEmpName
(
socialInfo
.
getEmpName
());
if
(
Common
.
isNotNull
(
domainMap
))
{
domain
=
domainMap
.
get
(
tSocialInfo
.
getSettleDomainCode
());
}
else
{
domain
=
null
;
}
if
(
Common
.
isNotNull
(
domain
))
{
payExists
.
setBpoFlag
(
domain
.
getBpoFlag
());
}
else
{
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
payExists
.
getSocialHousehold
(),
payExists
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"未找到对应的项目信息,请核实"
));
continue
;
}
payExists
.
setSettleDomainId
(
socialInfo
.
getSettleDomain
());
payExists
.
setSettleDomainCode
(
Common
.
isNotNull
(
socialInfo
.
getSettleDomainCode
())
?
socialInfo
.
getSettleDomainCode
():
""
);
payExists
.
setUnitId
(
Common
.
isNotNull
(
socialInfo
.
getUnitId
())
?
socialInfo
.
getUnitId
():
""
);
...
...
@@ -2466,23 +2443,22 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists
.
setEmpId
(
tSocialInfo
.
getEmpId
());
payExists
.
setEmpIdcard
(
tSocialInfo
.
getEmpIdcard
());
payExists
.
setEmpName
(
tSocialInfo
.
getEmpName
());
payExists
.
setSettleDomainId
(
tSocialInfo
.
getSettleDomain
());
if
(
Common
.
isNotNull
(
domainMap
))
{
domain
=
domainMap
.
get
(
tSocialInfo
.
getSettleDomain
());
domain
=
domainMap
.
get
(
tSocialInfo
.
getSettleDomain
Code
());
}
else
{
domain
=
null
;
}
if
(
Common
.
isNotNull
(
domain
))
{
payExists
.
setSettleDomainName
(
domain
.
getDepartName
());
payExists
.
setSettleDomainCode
(
domain
.
getDepartNo
());
payExists
.
setUnitId
(
domain
.
getCustomerId
());
payExists
.
setUnitName
(
domain
.
getCustomerName
());
payExists
.
setBpoFlag
(
domain
.
getBpoFlag
());
}
else
{
payExists
.
setSettleDomainName
(
""
);
payExists
.
setSettleDomainCode
(
""
);
payExists
.
setUnitId
(
""
);
payExists
.
setUnitName
(
""
);
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
payExists
.
getSocialHousehold
(),
payExists
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"未找到对应的项目信息,请核实"
));
continue
;
}
payExists
.
setSettleDomainId
(
tSocialInfo
.
getSettleDomain
());
payExists
.
setSettleDomainCode
(
tSocialInfo
.
getSettleDomainCode
());
payExists
.
setSocialProvince
(
tSocialInfo
.
getSocialProvince
());
payExists
.
setSocialCity
(
tSocialInfo
.
getSocialCity
());
payExists
.
setSocialTown
(
tSocialInfo
.
getSocialTown
());
...
...
@@ -3443,18 +3419,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return
mapSelectVo
;
}
private
Map
<
String
,
TSettleDomainSelectVo
>
getSelectVoMapById
()
{
R
<
TSettleDomainListVo
>
settleDomainR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVo
();
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
=
null
;
if
(
Common
.
isNotNull
(
settleDomainR
)
&&
Common
.
isNotNull
(
settleDomainR
.
getData
())){
mapSelectVo
=
settleDomainR
.
getData
().
getMapSelectVo
();
}
if
(
Common
.
isEmpty
(
mapSelectVo
)){
ServiceUtil
.
runTimeExceptionDiy
(
CommonConstants
.
SETTLE_DOMAIN_GET_ERROR
);
}
return
mapSelectVo
;
}
// hgw2023-1-6 10:44:00以下:B端相关接口
/**
* 按年查询指定人的缴费库数据
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
View file @
d94a4ec1
...
...
@@ -510,11 +510,7 @@ public class DoJointSocialTask {
socialParam
.
setFd_3adfe8c73cb5a4
(
CommonConstants
.
EMPTY_STRING
);
}
//是否为BPO业务
if
(
Common
.
isNotNull
(
settleDomain
)
&&
Common
.
isNotNull
(
settleDomain
.
getBpoFlag
()))
{
socialParam
.
setFd_3b178dfcf9e3e6
(
settleDomain
.
getBpoFlag
());
}
else
{
socialParam
.
setFd_3b178dfcf9e3e6
(
CommonConstants
.
EMPTY_STRING
);
}
socialParam
.
setFd_3b178dfcf9e3e6
(
library
.
getBpoFlag
());
//客户名称
if
(
Common
.
isNotNull
(
library
.
getUnitName
()))
{
socialParam
.
setFd_3adfe8c81a0e42
(
library
.
getUnitName
());
...
...
@@ -809,11 +805,7 @@ public class DoJointSocialTask {
fundParam
.
setFd_3adfe8c73cb5a4
(
CommonConstants
.
EMPTY_STRING
);
}
//是否为BPO业务
if
(
Common
.
isNotNull
(
settleDomain
)
&&
Common
.
isNotNull
(
settleDomain
.
getBpoFlag
()))
{
fundParam
.
setFd_3b178ea361cabe
(
settleDomain
.
getBpoFlag
());
}
else
{
fundParam
.
setFd_3b178ea361cabe
(
CommonConstants
.
EMPTY_STRING
);
}
fundParam
.
setFd_3b178ea361cabe
(
library
.
getBpoFlag
());
//单位代缴
if
(
Common
.
isNotNull
(
library
.
getUnitProvidentSum
()))
{
fundParam
.
setFd_3adfeb52fbe966
(
library
.
getUnitProvidentSum
().
toString
());
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
View file @
d94a4ec1
...
...
@@ -58,7 +58,6 @@
<result
property=
"socialSecurityPersonalSum"
column=
"SOCIAL_SECURITY_PERSONAL_SUM"
/>
<result
property=
"providentSum"
column=
"PROVIDENT_SUM"
/>
<result
property=
"inauguralTeam"
column=
"INAUGURAL_TEAM"
/>
<result
property=
"sortTime"
column=
"SORT_TIME"
/>
<result
property=
"companyAccrual"
column=
"COMPANY_ACCRUAL"
/>
<result
property=
"personalAccrual"
column=
"PERSONAL_ACCRUAL"
/>
<result
property=
"unitPensionSet"
column=
"UNIT_PENSION_SET"
/>
...
...
@@ -105,6 +104,7 @@
<result
property=
"incomeCollectFlag"
column=
"INCOME_COLLECT_FLAG"
/>
<result
property=
"paySettleFlag"
column=
"PAY_SETTLE_FLAG"
/>
<result
property=
"payCollectFlag"
column=
"PAY_COLLECT_FLAG"
/>
<result
property=
"bpoFlag"
column=
"BPO_FLAG"
/>
</resultMap>
<resultMap
id=
"tPaymentInfoSumMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo"
>
<result
property=
"empName"
column=
"EMP_NAME"
/>
...
...
@@ -188,6 +188,7 @@
<result
property=
"personalBigmailmentMoney"
column=
"PERSONAL_BIGMAILMENT_MONEY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"bpoFlag"
column=
"BPO_FLAG"
/>
</resultMap>
<resultMap
id=
"tPaymentInfoBatchMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoBatchVo"
>
...
...
@@ -286,7 +287,6 @@
a.SOCIAL_SECURITY_PERSONAL_SUM,
a.PROVIDENT_SUM,
a.INAUGURAL_TEAM,
a.SORT_TIME,
a.SALARY_SOCIAL_FLAG,
a.SALARY_FUND_FLAG,
a.COMPANY_ACCRUAL,
...
...
@@ -430,9 +430,6 @@
<if
test=
"tPaymentInfo.inauguralTeam != null and tPaymentInfo.inauguralTeam.trim() != ''"
>
AND a.INAUGURAL_TEAM = #{tPaymentInfo.inauguralTeam}
</if>
<if
test=
"tPaymentInfo.sortTime != null and tPaymentInfo.sortTime.trim() != ''"
>
AND a.SORT_TIME = #{tPaymentInfo.sortTime}
</if>
<if
test=
"tPaymentInfo.companyAccrual != null"
>
AND a.COMPANY_ACCRUAL = #{tPaymentInfo.companyAccrual}
</if>
...
...
@@ -1178,6 +1175,7 @@
SUM( a.PERSONAL_MEDICAL_MONEY ) AS PERSONAL_MEDICAL_MONEY,
SUM( a.PERSONAL_UNEMPLOYMENT_MONEY ) AS PERSONAL_UNEMPLOYMENT_MONEY,
SUM( a.PERSONAL_BIGMAILMENT_MONEY ) AS PERSONAL_BIGMAILMENT_MONEY,
a.BPO_FLAG,
a.CREATE_NAME,
DATE_FORMAT(a.CREATE_TIME,'%Y-%m-%d') AS CREATE_NAME
FROM t_payment_info a
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TProvidentFundMapper.xml
View file @
d94a4ec1
...
...
@@ -43,6 +43,7 @@
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"settleDomain"
column=
"SETTLE_DOMAIN"
/>
<result
property=
"settleDomainCode"
column=
"SETTLE_DOMAIN_CODE"
/>
<result
property=
"fundProvince"
column=
"FUND_PROVINCE"
/>
<result
property=
"fundCity"
column=
"FUND_CITY"
/>
<result
property=
"fundTown"
column=
"FUND_TOWN"
/>
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialInfoMapper.xml
View file @
d94a4ec1
...
...
@@ -56,6 +56,7 @@
<result
property=
"cardinalId"
column=
"CARDINAL_ID"
/>
<result
property=
"oldId"
column=
"OLD_ID"
/>
<result
property=
"settleDomain"
column=
"SETTLE_DOMAIN"
/>
<result
property=
"settleDomainCode"
column=
"SETTLE_DOMAIN_CODE"
/>
<result
property=
"socialProvince"
column=
"SOCIAL_PROVINCE"
/>
<result
property=
"socialCity"
column=
"SOCIAL_CITY"
/>
<result
property=
"socialTown"
column=
"SOCIAL_TOWN"
/>
...
...
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