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
7b331afc
Commit
7b331afc
authored
Aug 02, 2023
by
wangzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature-wzb :公积金表格导出及代发户添加
parent
a8b26698
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
1364 additions
and
4 deletions
+1364
-4
TEmployeeContractInfo.java
...d/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
+2
-0
ChangeIssueStatusVo.java
...u/cloud/plus/v1/yifu/archives/vo/ChangeIssueStatusVo.java
+21
-0
EmployeeContractExportAuditVO.java
...us/v1/yifu/archives/vo/EmployeeContractExportAuditVO.java
+9
-0
EmployeeContractExportVO.java
...ud/plus/v1/yifu/archives/vo/EmployeeContractExportVO.java
+5
-0
TSettleDomainController.java
.../v1/yifu/archives/controller/TSettleDomainController.java
+12
-0
TSettleDomainMapper.java
...oud/plus/v1/yifu/archives/mapper/TSettleDomainMapper.java
+3
-0
TSettleDomainService.java
...d/plus/v1/yifu/archives/service/TSettleDomainService.java
+3
-0
TSettleDomainServiceImpl.java
.../yifu/archives/service/impl/TSettleDomainServiceImpl.java
+6
-0
TEmployeeContractInfoMapper.xml
...src/main/resources/mapper/TEmployeeContractInfoMapper.xml
+5
-2
TSettleDomainMapper.xml
...ves-biz/src/main/resources/mapper/TSettleDomainMapper.xml
+12
-0
TSalaryStandardExportVo.java
...cloud/plus/v1/yifu/salary/vo/TSalaryStandardExportVo.java
+6
-0
DispatchConstants.java
...loud/plus/v1/yifu/social/constants/DispatchConstants.java
+2
-0
CompanyProVo.java
...a/com/yifu/cloud/plus/v1/yifu/social/vo/CompanyProVo.java
+10
-0
HouseNameConfigVo.java
.../yifu/cloud/plus/v1/yifu/social/vo/HouseNameConfigVo.java
+20
-0
TDispatchFundPersionExportVo.java
.../plus/v1/yifu/social/vo/TDispatchFundPersionExportVo.java
+72
-0
TDispatchFundSumExportVo.java
...loud/plus/v1/yifu/social/vo/TDispatchFundSumExportVo.java
+48
-0
TDispatchFundSumVo.java
...yifu/cloud/plus/v1/yifu/social/vo/TDispatchFundSumVo.java
+20
-0
TDispatchFundSupplementaryExportVo.java
...v1/yifu/social/vo/TDispatchFundSupplementaryExportVo.java
+64
-0
TProvidentFundSearchVo.java
.../cloud/plus/v1/yifu/social/vo/TProvidentFundSearchVo.java
+22
-0
CustomCellStyleFourStrategy.java
...us/v1/yifu/social/config/CustomCellStyleFourStrategy.java
+71
-0
TDispatchInfoController.java
...us/v1/yifu/social/controller/TDispatchInfoController.java
+43
-0
TDispatchInfoMapper.java
...cloud/plus/v1/yifu/social/mapper/TDispatchInfoMapper.java
+13
-0
TDispatchInfoService.java
...oud/plus/v1/yifu/social/service/TDispatchInfoService.java
+5
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+731
-2
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+159
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
View file @
7b331afc
...
...
@@ -518,6 +518,7 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema
(
description
=
"减少原因"
)
private
String
reduceReason
;
/**
* @Author fxj
* 查询数据起
...
...
@@ -532,4 +533,5 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema
(
description
=
"查询limit 数据条数"
)
@TableField
(
exist
=
false
)
private
int
limitEnd
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/ChangeIssueStatusVo.java
0 → 100644
View file @
7b331afc
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
@Data
public
class
ChangeIssueStatusVo
{
/**
* id
*/
@Schema
(
description
=
"id"
)
private
String
id
;
/**
* 是否代发户
*/
@Schema
(
description
=
"代发户状态(0否;1是代发户)"
)
private
int
issueStatus
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeContractExportAuditVO.java
View file @
7b331afc
...
...
@@ -178,4 +178,13 @@ public class EmployeeContractExportAuditVO implements Serializable {
@Schema
(
description
=
"终止原因"
)
@ExcelProperty
(
"终止原因"
)
private
String
reduceReason
;
/**
* 备注
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelAttribute
(
name
=
"备注"
)
@Schema
(
description
=
"备注"
)
@ExcelProperty
(
"备注"
)
private
String
remark
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeContractExportVO.java
View file @
7b331afc
...
...
@@ -286,4 +286,9 @@ public class EmployeeContractExportVO implements Serializable {
private
Set
<
String
>
exportFields
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelAttribute
(
name
=
"备注"
)
@Schema
(
description
=
"备注"
)
@ExcelProperty
(
"备注"
)
private
String
memo
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TSettleDomainController.java
View file @
7b331afc
...
...
@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService
;
...
...
@@ -410,4 +411,15 @@ public class TSettleDomainController {
List
<
TSettleDomainUpServerTeamVo
>
list
=
JSONObject
.
parseArray
(
jsonStr
,
TSettleDomainUpServerTeamVo
.
class
);
return
tSettleDomainService
.
updateProjectServerTeam
(
list
);
}
/**
* 分页查询 客户信息
* @return
*/
@Operation
(
summary
=
"代发户切换按钮"
,
description
=
"代发户切换按钮"
)
@PostMapping
(
"/changeIssueStatus"
)
public
R
<
Boolean
>
changeIssueStatus
(
@RequestBody
ChangeIssueStatusVo
changeIssueStatusVo
)
{
return
tSettleDomainService
.
changeIssueStatus
(
changeIssueStatusVo
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TSettleDomainMapper.java
View file @
7b331afc
...
...
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -108,4 +109,6 @@ public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
@Param
(
"customerName"
)
String
customerName
,
@Param
(
"userId"
)
String
userId
);
void
changeIssueStatus
(
@Param
(
"changeIssueStatusVo"
)
ChangeIssueStatusVo
changeIssueStatusVo
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TSettleDomainService.java
View file @
7b331afc
...
...
@@ -21,6 +21,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.TCustomerInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
...
...
@@ -134,4 +135,6 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
R
<
IPage
<
CustomerOwnerSelectVo
>>
getCustomerOwnerPage
(
Page
<
CustomerOwnerSelectVo
>
page
,
String
customerName
,
String
userId
);
R
<
Boolean
>
updateProjectServerTeam
(
List
<
TSettleDomainUpServerTeamVo
>
list
);
R
<
Boolean
>
changeIssueStatus
(
ChangeIssueStatusVo
changeIssueStatusVo
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TSettleDomainServiceImpl.java
View file @
7b331afc
...
...
@@ -500,6 +500,12 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
return
R
.
ok
(
Boolean
.
TRUE
,
CommonConstants
.
RESULT_DATA_SUCESS
);
}
@Override
public
R
<
Boolean
>
changeIssueStatus
(
ChangeIssueStatusVo
changeIssueStatusVo
)
{
baseMapper
.
changeIssueStatus
(
changeIssueStatusVo
);
return
R
.
ok
(
Boolean
.
TRUE
,
CommonConstants
.
RESULT_DATA_SUCESS
);
}
private
void
initServerTeamPermission
(
TSettleDomain
domain
)
{
if
(
Common
.
isNotNull
(
domain
.
getServiceTeam
())){
R
<
SysUserListVo
>
res
=
upmsDaprUtils
.
getUserIdsByUserNames
(
domain
.
getServiceTeam
());
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeContractInfoMapper.xml
View file @
7b331afc
...
...
@@ -141,6 +141,7 @@
<result
property=
"workingHours"
column=
"WORKING_HOURS"
/>
<result
property=
"post"
column=
"POST"
/>
<result
property=
"remark"
column=
"REMARK"
/>
<result
property=
"memo"
column=
"MEMO"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
...
...
@@ -203,7 +204,8 @@
a.TYPE,
a.LEAVE_DATE,
a.AUDIT_USER_NAME,
a.REDUCE_REASON,a.type
a.REDUCE_REASON,
a.type
</sql>
...
...
@@ -510,6 +512,7 @@
WHEN a.type =4 THEN "派减-终止"
ELSE a.type END as "type",
b.REMARK,
a.REMARK as memo,
a.CREATE_TIME
FROM t_employee_contract_info a
LEFT JOIN sys_area a1 on a1.id=a.FILE_PROVINCE
...
...
@@ -653,7 +656,7 @@
a.LEAVE_DATE,
a.CONTRACT_NO,
a.REDUCE_REASON,
b
.REMARK
a
.REMARK
FROM t_employee_contract_info a
left join (select REMARK,LINK_ID from t_employee_contract_audit where ROOT_NAME='合同审核') b on a.ID=b.LINK_ID
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TSettleDomainMapper.xml
View file @
7b331afc
...
...
@@ -238,6 +238,12 @@
<if
test=
"tSettleDomain.buBelong != null and tSettleDomain.buBelong.trim() != ''"
>
and a.BU_BELONG = #{tSettleDomain.buBelong}
</if>
<if
test=
"tSettleDomain.buBelong != null and tSettleDomain.buBelong.trim() != ''"
>
and a.BU_BELONG = #{tSettleDomain.buBelong}
</if>
<if
test=
"tSettleDomain.issueStatus != null"
>
and a.ISSUE_STATUS = #{tSettleDomain.issueStatus}
</if>
</if>
order by CREATE_TIME desc
</select>
...
...
@@ -498,4 +504,10 @@
and a.id in (select b.settle_id from m_setttle_customer_user b where b.user_id = #{userId}) and a.DELETE_FLAG = '0'
group by a.CUSTOMER_NO order by CREATE_TIME desc
</select>
<update
id=
"changeIssueStatus"
>
update t_settle_domain a
set a.ISSUE_STATUS=#{changeIssueStatusVo.issueStatus}
WHERE a.ID=#{changeIssueStatusVo.id}
</update>
</mapper>
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TSalaryStandardExportVo.java
View file @
7b331afc
...
...
@@ -97,6 +97,12 @@ public class TSalaryStandardExportVo implements Serializable {
@ExcelProperty
(
"表单类型"
)
private
String
formType
;
@ExcelAttribute
(
name
=
"代发户状态(0正常;1代发户)"
)
@ExcelProperty
(
"代发户状态"
)
@Schema
(
description
=
"代发户状态(0正常;1代发户)"
)
private
String
issueStatus
;
/**
* 创建时间
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/constants/DispatchConstants.java
View file @
7b331afc
...
...
@@ -36,6 +36,8 @@ public class DispatchConstants {
public
static
final
String
SOCIAL_RECORD_EXPORT
=
"公积金变更清册导出"
;
public
static
final
String
SOCIAL_MEDICAL_EXPORT
=
"合肥医保花名册"
;
public
static
final
String
SOCIAL_PERSION_EXPORT
=
"合肥社保花名册"
;
public
static
final
String
FUND_RECORD_EXPORT
=
"合肥公积金变更清册"
;
public
static
final
String
FUND_SUPPLEMENTARY_EXPORT
=
"合肥公积金补缴清册"
;
public
static
final
String
DISPATCH_PENSION
=
"养老、"
;
public
static
final
String
DISPATCH_MEDICAL
=
"医疗、"
;
public
static
final
String
DISPATCH_BIRTH
=
"生育、"
;
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/CompanyProVo.java
0 → 100644
View file @
7b331afc
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
@Data
public
class
CompanyProVo
{
@Schema
(
description
=
"比例"
)
private
Double
companyPro
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/HouseNameConfigVo.java
0 → 100644
View file @
7b331afc
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
@Data
public
class
HouseNameConfigVo
{
@Schema
(
description
=
"编码"
)
private
String
customerNo
;
@Schema
(
description
=
"银行账户"
)
private
String
fundBank
;
@Schema
(
description
=
"比例"
)
private
Double
companyPro
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchFundPersionExportVo.java
0 → 100644
View file @
7b331afc
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
public
class
TDispatchFundPersionExportVo
{
/**
* 序号
*/
@Schema
(
description
=
"序号"
)
@ExcelAttribute
(
name
=
"序号"
)
@ExcelProperty
(
"序号"
)
private
Integer
num
;
@Schema
(
description
=
"个人账号"
)
@ExcelAttribute
(
name
=
"个人账号"
)
@ExcelProperty
(
"个人账号"
)
private
String
personalAccount
;
/**
* 员工姓名
*/
@Schema
(
description
=
"姓名"
)
@ExcelAttribute
(
name
=
"姓名"
)
@ExcelProperty
(
"姓名"
)
private
String
empName
;
/**
* 身份证号码
*/
@Schema
(
description
=
"身份证号码"
)
@ExcelAttribute
(
name
=
"身份证号码"
)
@ExcelProperty
(
"身份证号码"
)
private
String
empIdcard
;
/**
* 缴存基数
*/
@Schema
(
description
=
"缴存基数"
)
@ExcelAttribute
(
name
=
"缴存基数"
)
@ExcelProperty
(
"缴存基数"
)
private
BigDecimal
depositBase
;
/**
* 本月增加
*/
@Schema
(
description
=
"本月增加"
)
@ExcelAttribute
(
name
=
"本月增加"
)
@ExcelProperty
(
"本月增加"
)
private
String
monthlyIncrease
;
/**
* 本月减少
*/
@Schema
(
description
=
"本月减少"
)
@ExcelAttribute
(
name
=
"本月减少"
)
@ExcelProperty
(
"本月减少"
)
private
String
monthlyDecrease
;
/**
* 工伤
*/
@Schema
(
description
=
"变更原因"
)
@ExcelAttribute
(
name
=
"变更原因"
)
@ExcelProperty
(
"变更原因"
)
private
String
causeChange
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchFundSumExportVo.java
0 → 100644
View file @
7b331afc
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
public
class
TDispatchFundSumExportVo
{
/**
* 序号
*/
@Schema
(
description
=
"人数"
)
@ExcelAttribute
(
name
=
"人数"
)
@ExcelProperty
(
"人数"
)
private
Integer
numOne
;
/**
* 序号
*/
@Schema
(
description
=
"人数"
)
@ExcelAttribute
(
name
=
"人数"
)
@ExcelProperty
(
"人数"
)
private
Integer
numTwo
;
/**
* 缴存基数
*/
@Schema
(
description
=
"金额"
)
@ExcelAttribute
(
name
=
"金额"
)
@ExcelProperty
(
"金额"
)
private
BigDecimal
monenyOne
;
/**
* 缴存基数
*/
@Schema
(
description
=
"金额"
)
@ExcelAttribute
(
name
=
"金额"
)
@ExcelProperty
(
"金额"
)
private
BigDecimal
monenyTwo
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchFundSumVo.java
0 → 100644
View file @
7b331afc
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
public
class
TDispatchFundSumVo
{
/**
* 本月增加
*/
@Schema
(
description
=
"合计补缴金额(大写)"
)
@ExcelAttribute
(
name
=
"合计补缴金额(大写)"
)
@ExcelProperty
(
"合计补缴金额(大写)"
)
private
BigDecimal
supplementaryAmountSum
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchFundSupplementaryExportVo.java
0 → 100644
View file @
7b331afc
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
public
class
TDispatchFundSupplementaryExportVo
{
/**
* 序号
*/
@Schema
(
description
=
"序号"
)
@ExcelAttribute
(
name
=
"序号"
)
@ExcelProperty
(
"序号"
)
private
Integer
num
;
@Schema
(
description
=
"个人账号"
)
@ExcelAttribute
(
name
=
"个人账号"
)
@ExcelProperty
(
"个人账号"
)
private
String
personalAccount
;
/**
* 员工姓名
*/
@Schema
(
description
=
"姓名"
)
@ExcelAttribute
(
name
=
"姓名"
)
@ExcelProperty
(
"姓名"
)
private
String
empName
;
/**
* 缴存基数
*/
@Schema
(
description
=
"缴存基数"
)
@ExcelAttribute
(
name
=
"缴存基数"
)
@ExcelProperty
(
"缴存基数"
)
private
BigDecimal
depositBase
;
/**
* 本月增加
*/
@Schema
(
description
=
"补缴金额"
)
@ExcelAttribute
(
name
=
"补缴金额"
)
@ExcelProperty
(
"补缴金额"
)
private
BigDecimal
supplementaryAmount
;
/**
* 本月减少
*/
@Schema
(
description
=
"起始(年月日)"
)
@ExcelAttribute
(
name
=
"起始(年月日)"
)
@ExcelProperty
(
"起始(年月日)"
)
private
String
originate
;
/**
* 工伤
*/
@Schema
(
description
=
"截至(年月日)"
)
@ExcelAttribute
(
name
=
"截至(年月日)"
)
@ExcelProperty
(
"截至(年月日)"
)
private
String
end
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TProvidentFundSearchVo.java
View file @
7b331afc
...
...
@@ -16,11 +16,14 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TProvidentFund
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
import
java.util.Set
;
/**
* 公积金信息
...
...
@@ -55,4 +58,23 @@ private int limitStart;
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
/**
* 单位编号
*/
@TableField
(
exist
=
false
)
@Schema
(
description
=
"单位编号"
)
@ExcelIgnore
private
String
customerNo
;
/**
* 单位统一信用代码
*/
@TableField
(
exist
=
false
)
@Schema
(
description
=
"单位统一信用代码"
)
@ExcelIgnore
private
String
unitCreditCode
;
@Schema
(
description
=
"导出的表头的Set"
)
private
Set
<
String
>
exportFields
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/config/CustomCellStyleFourStrategy.java
0 → 100644
View file @
7b331afc
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
config
;
import
com.alibaba.excel.metadata.Head
;
import
com.alibaba.excel.write.metadata.style.WriteCellStyle
;
import
com.alibaba.excel.write.metadata.style.WriteFont
;
import
com.alibaba.excel.write.style.AbstractVerticalCellStyleStrategy
;
import
org.apache.poi.ss.usermodel.*
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Component
public
class
CustomCellStyleFourStrategy
extends
AbstractVerticalCellStyleStrategy
{
/**
* 操作列
*/
private
List
<
Integer
>
columnIndexes
;
public
CustomCellStyleFourStrategy
(
List
<
Integer
>
columnIndexes
)
{
this
.
columnIndexes
=
columnIndexes
;
}
@Override
public
void
setHeadCellStyle
(
Cell
cell
,
Head
head
,
Integer
relativeRowIndex
)
{
super
.
setHeadCellStyle
(
cell
,
head
,
relativeRowIndex
);
}
@Override
protected
WriteCellStyle
headCellStyle
(
Head
head
)
{
// 获取样式实例
WriteCellStyle
headWriteCellStyle
=
new
WriteCellStyle
();
// 获取字体实例
WriteFont
headWriteFont
=
new
WriteFont
();
// 设置字体样式
headWriteFont
.
setFontName
(
"宋体"
);
// 设置字体大小
headWriteFont
.
setFontHeightInPoints
((
short
)
12
);
// 边框
headWriteFont
.
setBold
(
false
);
headWriteCellStyle
.
setFillForegroundColor
(
IndexedColors
.
WHITE
.
getIndex
());
headWriteCellStyle
.
setWriteFont
(
headWriteFont
);
headWriteCellStyle
.
setHorizontalAlignment
(
HorizontalAlignment
.
LEFT
);
return
headWriteCellStyle
;
}
@Override
protected
WriteCellStyle
contentCellStyle
(
Head
head
)
{
// 获取样式实例
WriteCellStyle
headWriteCellStyle
=
new
WriteCellStyle
();
// 获取字体实例
WriteFont
headWriteFont
=
new
WriteFont
();
// 设置字体样式
headWriteFont
.
setFontName
(
"宋体"
);
// 设置字体大小
headWriteFont
.
setFontHeightInPoints
((
short
)
12
);
// 边框
headWriteFont
.
setBold
(
false
);
headWriteCellStyle
.
setFillForegroundColor
(
IndexedColors
.
BLACK
.
getIndex
());
headWriteCellStyle
.
setWriteFont
(
headWriteFont
);
headWriteCellStyle
.
setHorizontalAlignment
(
HorizontalAlignment
.
LEFT
);
headWriteCellStyle
.
setBorderLeft
(
BorderStyle
.
THIN
);
headWriteCellStyle
.
setBorderTop
(
BorderStyle
.
THIN
);
headWriteCellStyle
.
setBorderRight
(
BorderStyle
.
THIN
);
headWriteCellStyle
.
setBorderBottom
(
BorderStyle
.
THIN
);
return
headWriteCellStyle
;
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java
View file @
7b331afc
...
...
@@ -798,4 +798,47 @@ public class TDispatchInfoController {
searchVo
.
setCreateBy
(
user
.
getId
());
tDispatchInfoService
.
doexportSocialPensionRecord
(
response
,
searchVo
);
}
/**
* @Author wzb
* @Description 导出 导出医保花名册
* @Date 10:05 2023/7/28
* @Param
* @return
**/
@PostMapping
(
"/doexportFundInfo"
)
@Operation
(
description
=
"导出住房公积金变更清册"
)
@SysLog
(
"导出住房公积金变更清册"
)
public
void
doexportFundInfo
(
HttpServletResponse
response
,
HttpServletRequest
request
,
@RequestBody
SocialHandleSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
searchVo
);
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
())
&&
searchVo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
searchVo
.
setAuthSql
(
searchVo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"a.SETTLE_DOMAIN"
));
}
searchVo
.
setCreateBy
(
user
.
getId
());
tDispatchInfoService
.
doexportFundInfo
(
response
,
searchVo
);
}
/**
* @Author wzb
* @Description 导出 导出医保花名册
* @Date 10:05 2023/7/28
* @Param
* @return
**/
@PostMapping
(
"/doexportFundSupplementaryInfo"
)
@Operation
(
description
=
"导出住房公积金补缴申请书"
)
@SysLog
(
"导出住房公积金补缴申请书"
)
public
void
doexportFundInfoOne
(
HttpServletResponse
response
,
HttpServletRequest
request
,
@RequestBody
SocialHandleSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
searchVo
);
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
())
&&
searchVo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
searchVo
.
setAuthSql
(
searchVo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"a.SETTLE_DOMAIN"
));
}
searchVo
.
setCreateBy
(
user
.
getId
());
tDispatchInfoService
.
doexportFundInfoOne
(
response
,
searchVo
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TDispatchInfoMapper.java
View file @
7b331afc
...
...
@@ -163,6 +163,8 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
**/
int
getSocialDisRecordCount
(
@Param
(
"tDispatchInfo"
)
SocialHandleSearchVo
dispatchInfo
);
/**
* @Author huyc
* @Description 社保派单医保模版
...
...
@@ -226,4 +228,15 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
int
updateExportFundFlagById
(
@Param
(
"id"
)
String
id
,
@Param
(
"status"
)
String
status
);
List
<
TDispatchFundPersionExportVo
>
getFundPersionExportVo
(
@Param
(
"tDispatchInfo"
)
SocialHandleSearchVo
dispatchInfo
);
List
<
TDispatchFundSupplementaryExportVo
>
getFundSupplementarynExportVo
(
@Param
(
"tDispatchInfo"
)
SocialHandleSearchVo
dispatchInfo
);
TDispatchFundSumExportVo
getFundSumExportVo
(
@Param
(
"tDispatchInfo"
)
SocialHandleSearchVo
dispatchInfo
);
TDispatchFundSumVo
getFundSumExportVoOne
(
@Param
(
"tDispatchInfo"
)
SocialHandleSearchVo
dispatchInfo
);
CompanyProVo
getFundPersionExportVoOne
(
@Param
(
"houseName"
)
String
houseName
);
HouseNameConfigVo
getFundSumExportVoTwo
(
@Param
(
"houseName"
)
String
houseName
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TDispatchInfoService.java
View file @
7b331afc
...
...
@@ -130,4 +130,9 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
* @return: boolean
**/
boolean
haveRole
(
YifuUser
user
,
long
roleId
);
void
doexportFundInfo
(
HttpServletResponse
response
,
SocialHandleSearchVo
searchVo
);
void
doexportFundInfoOne
(
HttpServletResponse
response
,
SocialHandleSearchVo
searchVo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
7b331afc
...
...
@@ -20,15 +20,19 @@ import cn.hutool.core.collection.CollUtil;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.metadata.Head
;
import
com.alibaba.excel.metadata.data.WriteCellData
;
import
com.alibaba.excel.read.listener.ReadListener
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.excel.write.metadata.WriteTable
;
import
com.alibaba.excel.write.metadata.holder.WriteSheetHolder
;
import
com.alibaba.excel.write.style.row.SimpleRowHeightStyleStrategy
;
import
com.baomidou.lock.annotation.Lock4j
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
...
@@ -65,6 +69,9 @@ import com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.poi.ss.usermodel.Cell
;
import
org.apache.poi.ss.usermodel.Sheet
;
import
org.apache.shardingsphere.transaction.annotation.ShardingTransactionType
;
import
org.apache.shardingsphere.transaction.core.TransactionType
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -5244,7 +5251,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//派增的数据
searchVo
.
setType
(
CommonConstants
.
ZERO_STRING
);
long
count
=
getSocialPersionDisCount
(
searchVo
);
List
<
Integer
>
columnIndexes
=
Arrays
.
asList
(
0
,
17
);
CustomCellStyleStrategy
customCellStyleStrategy
=
new
CustomCellStyleStrategy
(
columnIndexes
);
CustomCellStyleOneStrategy
customCellStyleStrategyOne
=
new
CustomCellStyleOneStrategy
(
columnIndexes
);
...
...
@@ -5301,7 +5307,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable4
);
}
}
else
{
writeSheet
=
EasyExcel
.
writerSheet
(
"
增员
"
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
"
2023
"
).
build
();
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable0
);
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable1
);
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable2
);
...
...
@@ -5397,7 +5403,27 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private
List
<
TDispatchSocialExportVo
>
getSocialDisRecord
(
SocialHandleSearchVo
searchVo
)
{
return
baseMapper
.
getSocialDisRecord
(
searchVo
);
}
private
List
<
TDispatchFundPersionExportVo
>
getDispatchFundPersion
(
SocialHandleSearchVo
searchVo
)
{
return
baseMapper
.
getFundPersionExportVo
(
searchVo
);
}
private
List
<
TDispatchFundSupplementaryExportVo
>
getDispatchFundSupplementary
(
SocialHandleSearchVo
searchVo
)
{
return
baseMapper
.
getFundSupplementarynExportVo
(
searchVo
);
}
private
TDispatchFundSumExportVo
getFundSumExportVo
(
SocialHandleSearchVo
searchVo
)
{
return
baseMapper
.
getFundSumExportVo
(
searchVo
);
}
private
TDispatchFundSumVo
getFundSumVo
(
SocialHandleSearchVo
searchVo
)
{
return
baseMapper
.
getFundSumExportVoOne
(
searchVo
);
}
private
CompanyProVo
companyProVo
(
String
houseName
)
{
return
baseMapper
.
getFundPersionExportVoOne
(
houseName
);
}
private
HouseNameConfigVo
getFundSumExportVoTwo
(
String
houseName
){
return
baseMapper
.
getFundSumExportVoTwo
(
houseName
);
}
private
long
getSocialPersionDisCount
(
SocialHandleSearchVo
searchVo
)
{
return
baseMapper
.
getSocialPersionDisCount
(
searchVo
);
}
...
...
@@ -5963,6 +5989,301 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
false
;
}
@Override
public
void
doexportFundInfo
(
HttpServletResponse
response
,
SocialHandleSearchVo
searchVo
)
{
String
fileName
=
DispatchConstants
.
FUND_RECORD_EXPORT
+
DateUtil
.
getThisTime
()
+
CommonConstants
.
XLSX
;
//获取要导出的列表
List
<
TDispatchFundPersionExportVo
>
list
=
new
ArrayList
<>();
List
<
TDispatchFundSumExportVo
>
listOne
=
new
ArrayList
<>();
try
(
ServletOutputStream
out
=
response
.
getOutputStream
()){
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
).
build
();
WriteSheet
writeSheet
;
WriteTable
writeTable0
;
WriteTable
writeTable1
;
WriteTable
writeTable2
;
WriteTable
writeTable3
;
WriteTable
writeTable4
;
WriteTable
writeTable5
;
WriteTable
writeTable6
;
TDispatchFundPersionExportVo
vo
;
List
<
Integer
>
columnIndexes
=
Arrays
.
asList
(
0
,
7
);
CustomCellStyleStrategy
customCellStyleStrategy
=
new
CustomCellStyleStrategy
(
columnIndexes
);
CustomCellStyleOneStrategy
customCellStyleStrategyOne
=
new
CustomCellStyleOneStrategy
(
columnIndexes
);
CustomCellStyleTwoStrategy
customCellStyleStrategyTwo
=
new
CustomCellStyleTwoStrategy
(
columnIndexes
);
CustomCellStyleThreeStrategy
customCellStyleStrategyThree
=
new
CustomCellStyleThreeStrategy
(
columnIndexes
);
CustomCellStyleFourStrategy
customCellStyleStrategyFour
=
new
CustomCellStyleFourStrategy
(
columnIndexes
);
writeTable0
=
EasyExcel
.
writerTable
(
0
).
head
(
headFisrt
()).
registerWriteHandler
(
customCellStyleStrategy
).
registerWriteHandler
(
new
SimpleRowHeightStyleStrategy
((
short
)
40
,(
short
)
100
)).
build
();
writeTable1
=
EasyExcel
.
writerTable
(
1
).
head
(
headSecond
(
searchVo
.
getProvidentHouseholdName
(),
searchVo
.
getCustomerNo
())).
registerWriteHandler
(
customCellStyleStrategyOne
).
registerWriteHandler
(
new
SimpleRowHeightStyleStrategy
((
short
)
25
,(
short
)
100
)).
build
();
writeTable2
=
EasyExcel
.
writerTable
(
2
).
head
(
headW
()).
registerWriteHandler
(
customCellStyleStrategyThree
).
registerWriteHandler
(
new
CustomCellWriteWidthConfig
(){
@Override
protected
void
setColumnWidth
(
WriteSheetHolder
writeSheetHolder
,
List
<
WriteCellData
<?>>
cellDataList
,
Cell
cell
,
Head
head
,
Integer
integer
,
Boolean
isHead
)
{
boolean
needSetWidth
=
isHead
||
!
CollectionUtils
.
isEmpty
(
cellDataList
);
if
(
needSetWidth
)
{
Sheet
sheet
=
writeSheetHolder
.
getSheet
();
int
columnIndex
=
cell
.
getColumnIndex
();
// 单元格文本长度大于45换行
if
(
columnIndex
==
3
)
{
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet
.
setColumnWidth
(
0
,
3000
);
sheet
.
setColumnWidth
(
1
,
4000
);
sheet
.
setColumnWidth
(
2
,
2000
);
sheet
.
setColumnWidth
(
3
,
6000
);
sheet
.
setColumnWidth
(
4
,
4000
);
sheet
.
setColumnWidth
(
6
,
5000
);
sheet
.
setColumnWidth
(
5
,
5000
);
sheet
.
setColumnWidth
(
7
,
3500
);
}
}
}
}).
registerWriteHandler
(
new
SimpleRowHeightStyleStrategy
((
short
)
25
,(
short
)
20
))
.
build
();
writeTable3
=
EasyExcel
.
writerTable
(
3
).
head
(
headQ
(
searchVo
)).
registerWriteHandler
(
customCellStyleStrategyThree
).
registerWriteHandler
(
new
SimpleRowHeightStyleStrategy
((
short
)
50
,(
short
)
20
))
.
build
();
writeTable4
=
EasyExcel
.
writerTable
(
4
).
head
(
FundHeadR
()).
registerWriteHandler
(
customCellStyleStrategyFour
).
registerWriteHandler
(
new
SimpleRowHeightStyleStrategy
((
short
)
50
,(
short
)
20
))
.
build
();
writeTable5
=
EasyExcel
.
writerTable
(
5
).
head
(
FundHeadT
()).
registerWriteHandler
(
customCellStyleStrategyTwo
).
registerWriteHandler
(
new
SimpleRowHeightStyleStrategy
((
short
)
25
,(
short
)
20
))
.
build
();
//派增的数据
long
count
=
getSocialDisRecordCount
(
searchVo
);
if
(
count
>
CommonConstants
.
ZERO_INT
){
list
=
getDispatchFundPersion
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
//判断list的大小是否大于10
if
(
list
.
size
()
<
10
)
{
int
size
=
10
-
list
.
size
();
int
num
=
list
.
size
()
+
1
;
for
(
int
i
=
1
;
i
<=
size
;
i
++)
{
vo
=
new
TDispatchFundPersionExportVo
();
vo
.
setNum
(
num
);
num
++;
list
.
add
(
vo
);
}
}
writeSheet
=
EasyExcel
.
writerSheet
(
"变更清册"
).
build
();
// 第一次写入会创建头
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable0
);
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable1
);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter
.
write
(
list
,
writeSheet
,
writeTable2
);
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable3
);
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable4
);
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable5
);
}
}
else
{
writeSheet
=
EasyExcel
.
writerSheet
(
"增员"
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
excelWriter
!=
null
)
{
excelWriter
.
finish
();
}
}
catch
(
Exception
e
){
log
.
error
(
"执行异常"
,
e
);
}
}
@Override
public
void
doexportFundInfoOne
(
HttpServletResponse
response
,
SocialHandleSearchVo
searchVo
)
{
String
fileName
=
DispatchConstants
.
FUND_SUPPLEMENTARY_EXPORT
+
DateUtil
.
getThisTime
()
+
CommonConstants
.
XLSX
;
//获取要导出的列表
List
<
TDispatchFundSupplementaryExportVo
>
list
=
new
ArrayList
<>();
try
(
ServletOutputStream
out
=
response
.
getOutputStream
()){
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
).
build
();
WriteSheet
writeSheet
;
WriteTable
writeTable0
;
WriteTable
writeTable1
;
WriteTable
writeTable2
;
WriteTable
writeTable3
;
WriteTable
writeTable4
;
WriteTable
writeTable5
;
WriteTable
writeTable6
;
WriteTable
writeTable7
;
TDispatchFundSupplementaryExportVo
vo
;
List
<
Integer
>
columnIndexes
=
Arrays
.
asList
(
0
,
6
);
CustomCellStyleStrategy
customCellStyleStrategy
=
new
CustomCellStyleStrategy
(
columnIndexes
);
CustomCellStyleOneStrategy
customCellStyleStrategyOne
=
new
CustomCellStyleOneStrategy
(
columnIndexes
);
CustomCellStyleTwoStrategy
customCellStyleStrategyTwo
=
new
CustomCellStyleTwoStrategy
(
columnIndexes
);
CustomCellStyleThreeStrategy
customCellStyleStrategyThree
=
new
CustomCellStyleThreeStrategy
(
columnIndexes
);
writeTable0
=
EasyExcel
.
writerTable
(
0
).
head
(
headFisrtOne
()).
registerWriteHandler
(
customCellStyleStrategy
).
registerWriteHandler
(
new
SimpleRowHeightStyleStrategy
((
short
)
20
,(
short
)
25
)).
build
();
writeTable1
=
EasyExcel
.
writerTable
(
1
).
head
(
headQOne
(
searchVo
.
getProvidentHouseholdName
())).
registerWriteHandler
(
customCellStyleStrategyThree
).
registerWriteHandler
(
new
CustomCellWriteWidthConfig
(){
@Override
protected
void
setColumnWidth
(
WriteSheetHolder
writeSheetHolder
,
List
<
WriteCellData
<?>>
cellDataList
,
Cell
cell
,
Head
head
,
Integer
integer
,
Boolean
isHead
)
{
boolean
needSetWidth
=
isHead
||
!
CollectionUtils
.
isEmpty
(
cellDataList
);
if
(
needSetWidth
)
{
Sheet
sheet
=
writeSheetHolder
.
getSheet
();
int
columnIndex
=
cell
.
getColumnIndex
();
// 单元格文本长度大于45换行
if
(
columnIndex
==
2
)
{
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet
.
setColumnWidth
(
0
,
2000
);
sheet
.
setColumnWidth
(
2
,
3000
);
sheet
.
setColumnWidth
(
6
,
2000
);
sheet
.
setColumnWidth
(
4
,
1500
);
}
}
}
}).
registerWriteHandler
(
new
SimpleRowHeightStyleStrategy
((
short
)
20
,(
short
)
25
)).
build
();
writeTable2
=
EasyExcel
.
writerTable
(
2
).
head
(
headQTwo
(
searchVo
.
getProvidentHouseholdName
())).
registerWriteHandler
(
customCellStyleStrategyThree
).
registerWriteHandler
(
new
CustomCellWriteWidthConfig
(){
@Override
protected
void
setColumnWidth
(
WriteSheetHolder
writeSheetHolder
,
List
<
WriteCellData
<?>>
cellDataList
,
Cell
cell
,
Head
head
,
Integer
integer
,
Boolean
isHead
)
{
boolean
needSetWidth
=
isHead
||
!
CollectionUtils
.
isEmpty
(
cellDataList
);
if
(
needSetWidth
)
{
Sheet
sheet
=
writeSheetHolder
.
getSheet
();
int
columnIndex
=
cell
.
getColumnIndex
();
// 单元格文本长度大于45换行
if
(
columnIndex
==
3
)
{
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet
.
setColumnWidth
(
0
,
2000
);
sheet
.
setColumnWidth
(
1
,
4000
);
sheet
.
setColumnWidth
(
2
,
6000
);
sheet
.
setColumnWidth
(
3
,
6000
);
sheet
.
setColumnWidth
(
6
,
5000
);
sheet
.
setColumnWidth
(
5
,
5000
);
sheet
.
setColumnWidth
(
4
,
4500
);
}
}
}
}).
registerWriteHandler
(
new
SimpleRowHeightStyleStrategy
((
short
)
20
,(
short
)
25
)).
build
();
writeTable3
=
EasyExcel
.
writerTable
(
3
).
head
(
headWone
(
searchVo
)).
registerWriteHandler
(
customCellStyleStrategyThree
).
registerWriteHandler
(
new
CustomCellWriteWidthConfig
(){
@Override
protected
void
setColumnWidth
(
WriteSheetHolder
writeSheetHolder
,
List
<
WriteCellData
<?>>
cellDataList
,
Cell
cell
,
Head
head
,
Integer
integer
,
Boolean
isHead
)
{
boolean
needSetWidth
=
isHead
||
!
CollectionUtils
.
isEmpty
(
cellDataList
);
if
(
needSetWidth
)
{
Sheet
sheet
=
writeSheetHolder
.
getSheet
();
int
columnIndex
=
cell
.
getColumnIndex
();
// 单元格文本长度大于45换行
if
(
columnIndex
==
4
)
{
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet
.
setColumnWidth
(
0
,
3000
);
sheet
.
setColumnWidth
(
1
,
4000
);
sheet
.
setColumnWidth
(
2
,
6000
);
sheet
.
setColumnWidth
(
3
,
6000
);
sheet
.
setColumnWidth
(
6
,
6000
);
sheet
.
setColumnWidth
(
5
,
6000
);
sheet
.
setColumnWidth
(
4
,
6000
);
}
}
}
}).
registerWriteHandler
(
new
SimpleRowHeightStyleStrategy
((
short
)
25
,(
short
)
20
))
.
build
();
writeTable4
=
EasyExcel
.
writerTable
(
4
).
head
(
headQThree
(
searchVo
)).
registerWriteHandler
(
customCellStyleStrategyThree
).
registerWriteHandler
(
new
SimpleRowHeightStyleStrategy
((
short
)
20
,(
short
)
25
)).
build
();
writeTable5
=
EasyExcel
.
writerTable
(
5
).
head
(
headQFour
()).
registerWriteHandler
(
customCellStyleStrategyThree
).
registerWriteHandler
(
new
SimpleRowHeightStyleStrategy
((
short
)
20
,(
short
)
25
)).
build
();
writeTable6
=
EasyExcel
.
writerTable
(
6
).
head
(
headQFive
()).
registerWriteHandler
(
customCellStyleStrategyThree
).
registerWriteHandler
(
new
SimpleRowHeightStyleStrategy
((
short
)
25
,(
short
)
20
)).
build
();
writeTable7
=
EasyExcel
.
writerTable
(
7
).
head
(
FundSix
()).
registerWriteHandler
(
customCellStyleStrategyTwo
).
registerWriteHandler
(
new
SimpleRowHeightStyleStrategy
((
short
)
25
,(
short
)
40
)).
build
();
//派增的数据
long
count
=
getSocialDisRecordCount
(
searchVo
);
if
(
count
>
CommonConstants
.
ZERO_INT
){
list
=
getDispatchFundSupplementary
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
//判断list的大小是否大于10
if
(
list
.
size
()
<
10
)
{
int
size
=
10
-
list
.
size
();
int
num
=
list
.
size
()
+
1
;
for
(
int
i
=
1
;
i
<=
size
;
i
++)
{
vo
=
new
TDispatchFundSupplementaryExportVo
();
vo
.
setNum
(
num
);
num
++;
list
.
add
(
vo
);
}
}
writeSheet
=
EasyExcel
.
writerSheet
(
"增员"
).
build
();
// 第一次写入会创建头
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable0
);
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable1
);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable2
);
excelWriter
.
write
(
list
,
writeSheet
,
writeTable3
);
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable4
);
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable5
);
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable6
);
excelWriter
.
write
(
new
ArrayList
<>(),
writeSheet
,
writeTable7
);
}
}
else
{
writeSheet
=
EasyExcel
.
writerSheet
(
"增员"
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
excelWriter
!=
null
)
{
excelWriter
.
finish
();
}
}
catch
(
Exception
e
){
log
.
error
(
"执行异常"
,
e
);
}
}
/**
* @Author huyc
* @Description 导出社保派单花名册
...
...
@@ -6273,4 +6594,412 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
list
;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/19
*/
public
List
<
List
<
String
>>
headFisrt
()
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
//表头数据
String
a
=
"合肥市住房公积金变更清册"
;
//第一列-第十三列
for
(
int
i
=
1
;
i
<=
8
;
i
++)
{
list
.
add
(
Lists
.
newArrayList
(
a
));
}
return
list
;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/19
*/
public
List
<
List
<
String
>>
headSecond
(
String
houseName
,
String
fundAccount
)
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
//表头数据
if
(
houseName
!=
null
)
{
CompanyProVo
companyProVo
=
companyProVo
(
houseName
);
HouseNameConfigVo
vo
=
getFundSumExportVoTwo
(
houseName
);
if
(
fundAccount
==
null
)
{
fundAccount
=
""
;
}
String
a
=
"单位名称(签章): "
+
houseName
+
" 单位公积金账号:"
+
vo
.
getCustomerNo
()
+
" 单边缴纳比例:"
+
companyProVo
.
getCompanyPro
()+
"%"
;
//第一列-第十八列
for
(
int
i
=
1
;
i
<=
8
;
i
++)
{
list
.
add
(
Lists
.
newArrayList
(
a
));
}
}
return
list
;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public
List
<
List
<
String
>>
headW
()
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
//表头数据
String
c
=
"月缴存金额"
;
//第一列
list
.
add
(
Lists
.
newArrayList
(
"序号"
,
"序号"
));
//第二列
list
.
add
(
Lists
.
newArrayList
(
"个人帐号"
,
"个人帐号"
));
//第三列
list
.
add
(
Lists
.
newArrayList
(
"姓 名"
,
"姓 名"
));
//第四列
list
.
add
(
Lists
.
newArrayList
(
"身份证号码"
,
"身份证号码"
));
//第五列
list
.
add
(
Lists
.
newArrayList
(
"缴存基数"
,
"缴存基数"
));
//第六列
list
.
add
(
Lists
.
newArrayList
(
"月缴存金额"
,
"本月增加"
));
//第七列
list
.
add
(
Lists
.
newArrayList
(
"月缴存金额"
,
"本月减少"
));
//第八列
list
.
add
(
Lists
.
newArrayList
(
"变更原因"
,
"变更原因"
));
return
list
;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public
List
<
List
<
String
>>
headQ
(
SocialHandleSearchVo
searchVo
)
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
//表头数据
String
a
=
""
;
String
b
=
""
;
String
c
=
""
;
String
d
=
""
;
//第一列
TDispatchFundSumExportVo
dispatchFundSumExportVo
=
getFundSumExportVo
(
searchVo
);
if
(
Common
.
isNotNull
(
dispatchFundSumExportVo
))
{
if
(
dispatchFundSumExportVo
.
getNumOne
()!=
null
)
{
a
=
dispatchFundSumExportVo
.
getNumOne
().
toString
();
}
if
(
dispatchFundSumExportVo
.
getNumTwo
()!=
null
){
b
=
dispatchFundSumExportVo
.
getNumTwo
().
toString
();
}
if
(
dispatchFundSumExportVo
.
getMonenyOne
()!=
null
)
{
c
=
dispatchFundSumExportVo
.
getMonenyOne
().
toString
();
}
if
(
dispatchFundSumExportVo
.
getMonenyTwo
()!=
null
)
{
d
=
dispatchFundSumExportVo
.
getMonenyTwo
().
toString
();
}
list
.
add
(
Lists
.
newArrayList
(
"项目合计"
,
"项目合计"
,
"本月小计"
));
//第二列
list
.
add
(
Lists
.
newArrayList
(
"项目合计"
,
"项目合计"
,
"本月小计"
));
//第三列
list
.
add
(
Lists
.
newArrayList
(
"本月增加汇款"
,
"人数"
,
a
));
list
.
add
(
Lists
.
newArrayList
(
"本月增加汇款"
,
"金额"
,
c
));
//第四列
list
.
add
(
Lists
.
newArrayList
(
"本月减少汇款"
,
"人数"
,
b
));
//第五列
list
.
add
(
Lists
.
newArrayList
(
"本月减少汇款"
,
"金额"
,
d
));
//第六列
list
.
add
(
Lists
.
newArrayList
(
"本月汇款"
,
"人数"
,
""
));
//第七列
list
.
add
(
Lists
.
newArrayList
(
"本月汇款"
,
"金额"
,
""
));
}
return
list
;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public
List
<
List
<
String
>>
headE
()
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
//表头数据
//第一列
list
.
add
(
Lists
.
newArrayList
(
"本月小计"
,
"本月小计"
));
return
list
;
}
/**
* @return
* @Author huyc
* @Description 导出社保派单花名册
* @Date 11:12 2023/7/21
*/
public
List
<
List
<
String
>>
FundHeadR
()
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
//表头数据
list
.
add
(
Lists
.
newArrayList
(
"备注"
,
"备注"
));
list
.
add
(
Lists
.
newArrayList
(
"备注"
,
"备注"
));
String
a
=
"1、新增人员必须填写身份证号码。\n"
+
"2、本表只提供单位缴存人数变动使用。\n"
+
"3、对于工资基数调整及个人补缴业务不得使用此表。\n"
+
"4.单位封存人员启封时,如缴存基数发生变化须附基数调整清册。 本单位承诺变更清册中所填内容均真实、 \n"
+
"合法、有效,如有不实之处,单位承担相应的法律责任及由此产生的一切后果。"
;
for
(
int
i
=
2
;
i
<=
7
;
i
++)
{
list
.
add
(
Lists
.
newArrayList
(
a
));
}
return
list
;
}
/**
* @return
* @Author huyc
* @Description 导出社保派单花名册
* @Date 11:12 2023/7/21
*/
public
List
<
List
<
String
>>
FundHeadT
()
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
//表头数据
String
b
=
"制表人: 电话: "
+
"制表时间: "
+
DateUtil
.
getYear
(
DateUtil
.
getCurrentDateTime
())
+
" 年"
+
" "
+
DateUtil
.
getMonth
(
DateUtil
.
getCurrentDateTime
())
+
" 月"
+
" "
+
DateUtil
.
getDay
(
DateUtil
.
getCurrentDateTime
())
+
" 日"
;
//第一列-第十八列
for
(
int
i
=
1
;
i
<=
8
;
i
++)
{
list
.
add
(
Lists
.
newArrayList
(
b
));
}
return
list
;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/19
*/
public
List
<
List
<
String
>>
headFisrtOne
()
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
//表头数据
String
a
=
"合肥市住房公积金补缴申请书"
;
//第一列-第十三列
for
(
int
i
=
1
;
i
<=
7
;
i
++)
{
list
.
add
(
Lists
.
newArrayList
(
a
));
}
return
list
;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public
List
<
List
<
String
>>
headQOne
(
String
houseName
)
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
//表头数据
String
a
=
"项目合计"
;
String
aa
=
"本月小计"
;
String
b
=
"本月增加汇款"
;
String
c
=
"本月减少汇款"
;
String
d
=
"本月汇款"
;
//第一列
HouseNameConfigVo
houseNameConfigVo
=
getFundSumExportVoTwo
(
houseName
);
list
.
add
(
Lists
.
newArrayList
(
"单位名称(公章)"
,
"单位名称(公章)"
));
//第二列
list
.
add
(
Lists
.
newArrayList
(
houseName
,
houseName
));
list
.
add
(
Lists
.
newArrayList
(
houseName
,
houseName
));
//第三列
list
.
add
(
Lists
.
newArrayList
(
"经 办 人"
,
"电话"
));
list
.
add
(
Lists
.
newArrayList
(
"经 办 人"
,
"电话"
));
list
.
add
(
Lists
.
newArrayList
(
"赵云(默认)"
,
"63432400(默认)"
));
list
.
add
(
Lists
.
newArrayList
(
"赵云(默认)"
,
"63432400(默认)"
));
return
list
;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public
List
<
List
<
String
>>
headQTwo
(
String
houseName
)
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
HouseNameConfigVo
houseNameConfigVo
=
getFundSumExportVoTwo
(
houseName
);
//表头数据
String
a
=
"项目合计"
;
String
aa
=
"本月小计"
;
String
b
=
"本月增加汇款"
;
String
c
=
"本月减少汇款"
;
String
d
=
"本月汇款"
;
//第一列
list
.
add
(
Lists
.
newArrayList
(
"公积金承办银行"
,
"公积金承办银行"
));
list
.
add
(
Lists
.
newArrayList
(
houseNameConfigVo
.
getFundBank
(),
houseNameConfigVo
.
getFundBank
()));
list
.
add
(
Lists
.
newArrayList
(
houseNameConfigVo
.
getFundBank
(),
houseNameConfigVo
.
getFundBank
()));
//第二列
//第三列
list
.
add
(
Lists
.
newArrayList
(
"单位公积金账号"
,
"单边缴存比例"
));
list
.
add
(
Lists
.
newArrayList
(
"单位公积金账号"
,
"单边缴存比例"
));
list
.
add
(
Lists
.
newArrayList
(
houseNameConfigVo
.
getCustomerNo
(),
houseNameConfigVo
.
getCompanyPro
().
toString
()+
"%"
));
list
.
add
(
Lists
.
newArrayList
(
houseNameConfigVo
.
getCustomerNo
(),
houseNameConfigVo
.
getCompanyPro
().
toString
()+
"%"
));
return
list
;
}
/**
* @return
* @Author wzb
* @Description 导出公积金派单花名册
* @Date 09:05 2023/7/21
*/
public
List
<
List
<
String
>>
headWone
(
SocialHandleSearchVo
searchVo
)
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
//表头数据
String
c
=
"补缴时间"
;
//第一列
list
.
add
(
Lists
.
newArrayList
(
"序号"
,
"序号"
));
//第二列
list
.
add
(
Lists
.
newArrayList
(
"个人帐号"
,
"个人帐号"
));
//第三列
list
.
add
(
Lists
.
newArrayList
(
"姓 名"
,
"姓 名"
));
//第四列
//第五列
list
.
add
(
Lists
.
newArrayList
(
"缴存基数"
,
"缴存基数"
));
//第六列
list
.
add
(
Lists
.
newArrayList
(
"补缴金额"
,
"补缴金额"
));
//第七列
list
.
add
(
Lists
.
newArrayList
(
"补缴时间"
,
"起始(年月日)"
));
list
.
add
(
Lists
.
newArrayList
(
searchVo
.
getDisMonth
(),
"截至(年月日)"
));
//第八列
return
list
;
}
private
String
int2big
(
int
b
)
{
final
String
num
[]
=
{
"零"
,
"壹"
,
"贰"
,
"叁"
,
"肆"
,
"伍"
,
"陆"
,
"柒"
,
"捌"
,
"玖"
};
final
String
unit
[]
=
{
"圆"
,
"拾"
,
"佰"
,
"仟"
,
"万"
,
"拾"
,
"佰"
,
"仟"
,
"亿"
,
"拾"
,
"佰"
,
"仟"
};
String
dst
=
""
;
int
count
=
0
;
while
(
b
>
0
)
{
dst
=
(
num
[
b
%
10
]
+
unit
[
count
])
+
dst
;
b
=
b
/
10
;
count
++;
}
return
dst
.
replaceAll
(
"零[仟佰拾]"
,
"零"
).
replaceAll
(
"零+万"
,
"万"
)
.
replaceAll
(
"零+亿"
,
"亿"
).
replaceAll
(
"亿万"
,
"亿零"
)
.
replaceAll
(
"零+"
,
"零"
).
replaceAll
(
"零圆"
,
"圆"
);
}
public
List
<
List
<
String
>>
headQThree
(
SocialHandleSearchVo
searchVo
)
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
//表头数据
//第一列
TDispatchFundSumVo
tDispatchFundSumVo
=
getFundSumVo
(
searchVo
);
String
a
=
tDispatchFundSumVo
.
getSupplementaryAmountSum
().
toString
();
list
.
add
(
Lists
.
newArrayList
(
""
,
""
));
//第二列
list
.
add
(
Lists
.
newArrayList
(
"合计补缴金额(大写):"
,
"合计补缴金额(大写):"
));
//第三列
//第四列
int
b
=
Integer
.
parseInt
(
a
);
String
c
=
int2big
(
b
).
toString
();
list
.
add
(
Lists
.
newArrayList
(
a
,
a
));
//第五列
list
.
add
(
Lists
.
newArrayList
(
c
,
c
));
list
.
add
(
Lists
.
newArrayList
(
c
,
c
));
list
.
add
(
Lists
.
newArrayList
(
c
,
c
));
list
.
add
(
Lists
.
newArrayList
(
c
,
c
));
//第八列
return
list
;
}
public
List
<
List
<
String
>>
headQFour
()
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
//表头数据
//第一列
list
.
add
(
Lists
.
newArrayList
(
"单位申请\n"
+
"补缴意见"
));
list
.
add
(
Lists
.
newArrayList
(
"单位申请\n"
+
"补缴意见"
));
//第二列
list
.
add
(
Lists
.
newArrayList
(
""
,
""
,
""
,
""
,
""
,
"负责人:"
,
" 年 月 日"
));
list
.
add
(
Lists
.
newArrayList
(
""
,
""
,
""
,
""
,
""
,
"负责人:"
,
" 年 月 日"
));
//第三列
list
.
add
(
Lists
.
newArrayList
(
"补缴合计"
,
"此次申请补缴共有20人"
,
"49676"
,
"补缴原因"
,
"补缴原因"
,
"补缴原因"
));
list
.
add
(
Lists
.
newArrayList
(
""
,
""
,
""
));
list
.
add
(
Lists
.
newArrayList
(
""
,
""
,
""
));
//第四列
//第八列
return
list
;
}
public
List
<
List
<
String
>>
headQFive
()
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
//表头数据
//第一列
list
.
add
(
Lists
.
newArrayList
(
"市住房公积金管理中\n"
+
"心审核意见"
));
list
.
add
(
Lists
.
newArrayList
(
"市住房公积金管理中\n"
+
"心审核意见"
));
//第二列
list
.
add
(
Lists
.
newArrayList
(
""
,
""
,
""
,
""
,
""
,
"审批人:"
,
" 年 月 日"
));
list
.
add
(
Lists
.
newArrayList
(
""
,
""
,
""
,
""
,
""
,
"审批人:"
,
" 年 月 日"
));
//第三列
list
.
add
(
Lists
.
newArrayList
(
"承办银行\n"
+
"审核意见"
));
list
.
add
(
Lists
.
newArrayList
(
""
,
""
,
""
,
""
,
""
,
"审批人"
,
" 年 月 日"
));
list
.
add
(
Lists
.
newArrayList
(
""
,
""
,
""
,
""
,
""
,
"审批人"
,
" 年 月 日"
));
//第四列
//第八列
return
list
;
}
public
List
<
List
<
String
>>
FundSix
()
{
List
<
List
<
String
>>
list
=
new
ArrayList
<>();
//表头数据
String
b
=
"网址:www.hfgjj.com 咨询电话:0551-12329"
;
//第一列-第十八列
for
(
int
i
=
1
;
i
<=
8
;
i
++)
{
list
.
add
(
Lists
.
newArrayList
(
b
));
}
return
list
;
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
7b331afc
...
...
@@ -175,6 +175,49 @@
<result
property=
"empName"
column=
"EMP_NAME"
/>
</resultMap>
<resultMap
id=
"FundExport"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundPersionExportVo"
>
<result
property=
"num"
column=
"NUM"
/>
<result
property=
"personalAccount"
column=
"PERSON_ACCOUNT"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"depositBase"
column=
"DEPOSIT_BASE"
/>
<result
property=
"monthlyIncrease"
column=
"MOTHLY_INCREASE"
/>
<result
property=
"monthlyDecrease"
column=
"MOTHLY_DECREASE"
/>
<result
property=
"causeChange"
column=
"CAUSE_CHANGE"
/>
</resultMap>
<resultMap
id=
"CompanyProVo"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.CompanyProVo"
>
<result
property=
"companyPro"
column=
"COMPANY_PRO"
/>
</resultMap>
<resultMap
id=
"HouseNameConfigVo"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.HouseNameConfigVo"
>
<result
property=
"customerNo"
column=
"CUSTOMER_NO"
/>
<result
property=
"fundBank"
column=
"FUND_BANK"
/>
<result
property=
"companyPro"
column=
"COMPANY_PRO"
/>
</resultMap>
<resultMap
id=
"FundSupplementaryExport"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSupplementaryExportVo"
>
<result
property=
"num"
column=
"NUM"
/>
<result
property=
"personalAccount"
column=
"PERSON_ACCOUNT"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"depositBase"
column=
"DEPOSIT_BASE"
/>
<result
property=
"supplementaryAmount"
column=
"SUPPLEMENTART_AMOUNT"
/>
<result
property=
"originate"
column=
"ORIGINATE"
/>
<result
property=
"end"
column=
"END"
/>
</resultMap>
<resultMap
id=
"FundSupplementary"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumVo"
>
<result
property=
"supplementaryAmountSum"
column=
"SUPPLEMENTART_AMOUNT_SUM"
/>
</resultMap>
<resultMap
id=
"FundSumExport"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumExportVo"
>
<result
property=
"numOne"
column=
"NUM_ONE"
/>
<result
property=
"numTwo"
column=
"NUM_TWO"
/>
<result
property=
"monenyOne"
column=
"MONEY_ONE"
/>
<result
property=
"monenyTwo"
column=
"MONEY_TWO"
/>
</resultMap>
<resultMap
id=
"socialDisExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchSocialExportVo"
>
<result
property=
"num"
column=
"NUM"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
...
...
@@ -1223,6 +1266,7 @@
</where>
</select>
<!--tDispatchInfo 社保医疗花名册派单数据-->
<select
id=
"getSocialDisRecord"
resultMap=
"socialDisExportMap"
>
SELECT
...
...
@@ -1782,6 +1826,31 @@
</if>
</sql>
<sql
id=
"where_getFundDisRecord"
>
a.DELETE_FLAG = 0
AND a.fund_id is not null
AND a.STATUS = "2"
AND a.DISPATCH_ITEM like concat('%','公积金','%')
<if
test=
"tDispatchInfo != null"
>
<if
test=
"tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''"
>
AND a.PROVIDENT_HOUSEHOLD_NAME = #{tDispatchInfo.providentHouseholdName}
</if>
<if
test=
"tDispatchInfo.type != null and tDispatchInfo.type.trim() != ''"
>
AND a.TYPE = #{tDispatchInfo.type}
</if>
<if
test=
"tDispatchInfo.disMonth != null and tDispatchInfo.disMonth.trim() != ''"
>
AND replace(DATE_FORMAT(a.CREATE_TIME,"%Y-%m"),'-','') = #{tDispatchInfo.disMonth}
</if>
<if
test=
"tDispatchInfo.fundHandleStatus != null and tDispatchInfo.fundHandleStatus.trim() != ''"
>
AND a.FUND_HANDLE_STATUS = #{tDispatchInfo.fundHandleStatus}
</if>
<if
test=
"tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''"
>
${tDispatchInfo.authSql}
</if>
</if>
</sql>
<sql
id=
"where_getSocialPersionDisRecord"
>
a.DELETE_FLAG = 0
AND a.social_id is not null
...
...
@@ -1818,4 +1887,94 @@
<update
id=
"updateExportFundFlagById"
>
update t_dispatch_info a set a.EXPORT_FUND_FLAG = #{status} WHERE a.id = #{id}
</update>
<!--tDispatchInfo 社保医疗花名册派单数据-->
<select
id=
"getFundPersionExportVo"
resultMap=
"FundExport"
>
SELECT
(@i :=@i+1) as NUM,
a.EMP_NAME,
a.EMP_IDCARD,
s.UNIT_PROVIDENG_CARDINAL AS DEPOSIT_BASE ,
IF(a.TYPE=0 ,s.UNIT_PROVIDENT_FEE*2,NULL) as MOTHLY_INCREASE,
IF(a.TYPE=1 ,s.UNIT_PROVIDENT_FEE*2,NULL) as MOTHLY_DECREASE,
case when a.TYPE=0 then "新增"
else "减少" end as CAUSE_CHANGE
FROM t_dispatch_info a
left join t_provident_fund s on s.id=a.FUND_ID
,(select @i:=0) as itable
<where>
<include
refid=
"where_getFundDisRecord"
/>
</where>
</select>
<!--tDispatchInfo 社保医疗花名册派单数据-->
<select
id=
"getFundSupplementarynExportVo"
resultMap=
"FundSupplementaryExport"
>
SELECT
(@i :=@i+1) as NUM,
a.EMP_NAME,
a.EMP_IDCARD,
s.UNIT_PROVIDENG_CARDINAL AS DEPOSIT_BASE ,
replace( DATE_FORMAT(s.PROVIDENT_START,"%Y-%m"),'-','') as ORIGINATE,
replace( DATE_FORMAT(DATE(CURDATE()),"%Y-%m"),'-','') as END,
(abs(PERIOD_DIFF( replace( DATE_FORMAT(s.PROVIDENT_START,"%m"),'-',''),replace( DATE_FORMAT(DATE(CURDATE()),"%m"),'-','')))+1) *S.UNIT_PROVIDENG_CARDINAL*0.12
AS SUPPLEMENTART_AMOUNT
FROM t_dispatch_info a
left join t_provident_fund s on s.id=a.FUND_ID
,(select @i:=0) as itable
<where>
<include
refid=
"where_getFundDisRecord"
/>
</where>
</select>
<select
id=
"getFundSumExportVo"
resultType=
"com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchFundSumExportVo"
>
SELECT
SUM(IF(a.TYPE=1, 1,0)) as NUM_ONE,
SUM(IF(a.TYPE=0, 1,0)) as NUM_TWO,
SUM(IF(a.TYPE=0 ,s.UNIT_PROVIDENT_FEE*2,NULL)) AS MONENY_ONE ,
SUM(IF(a.TYPE=1 ,s.UNIT_PROVIDENT_FEE*2,NULL)) AS MONENY_TWO
FROM t_dispatch_info a
left join t_provident_fund s on s.id=a.FUND_ID
<where>
<include
refid=
"where_getFundDisRecord"
/>
</where>
</select>
<select
id=
"getFundSumExportVoOne"
resultMap=
"FundSupplementary"
>
SELECT ROUND(SUM((abs(PERIOD_DIFF(replace(DATE_FORMAT(s.PROVIDENT_START, "%m"), '-', ''),
replace(DATE_FORMAT(DATE(CURDATE()),"%m"), '-', ''))) + 1) *
S.UNIT_PROVIDENG_CARDINAL * 0.12)
) AS SUPPLEMENTART_AMOUNT_SUM
FROM t_dispatch_info a
left join t_provident_fund s on s.id = a.FUND_ID
<where>
<include
refid=
"where_getFundDisRecord"
/>
</where>
</select>
<select
id=
"getFundPersionExportVoOne"
resultMap=
"CompanyProVo"
>
SELECT
GROUP_CONCAT(DISTINCT F.COMPANY_PRO) AS COMPANY_PRO
FROM `sys_house_hold_info` A
LEFT JOIN sys_area B ON A.PROVINCE = B.ID
LEFT JOIN sys_area C ON A.CITY = C.ID
LEFT JOIN sys_area D ON A.TOWN = D.ID
LEFT JOIN sys_base_set_info E ON A.ID = E.DEPART_ID
LEFT JOIN sys_pay_proportion F ON E.ID = F.SYS_BASE_SET_ID
WHERE A.TYPE = '1' AND A.`NAME` IN (#{houseName})
GROUP BY A.`NAME`
</select>
<select
id=
"getFundSumExportVoTwo"
resultMap=
"HouseNameConfigVo"
>
SELECT
A.CUSTOMER_NO ,A.FUND_BANK ,
GROUP_CONCAT(DISTINCT F.COMPANY_PRO) AS COMPANY_PRO
FROM `sys_house_hold_info` A
LEFT JOIN sys_area B ON A.PROVINCE = B.ID
LEFT JOIN sys_area C ON A.CITY = C.ID
LEFT JOIN sys_area D ON A.TOWN = D.ID
LEFT JOIN sys_base_set_info E ON A.ID = E.DEPART_ID
LEFT JOIN sys_pay_proportion F ON E.ID = F.SYS_BASE_SET_ID
WHERE A.TYPE = '1' AND A.`NAME` IN (#{houseName})
GROUP BY A.`NAME`
</select>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment