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
87da0765
Commit
87da0765
authored
May 24, 2024
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
社保士兵自动化实缴 复核表及详情实现
parent
8dbef77e
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1862 additions
and
0 deletions
+1862
-0
TAutoPaymentDetail.java
.../cloud/plus/v1/yifu/social/entity/TAutoPaymentDetail.java
+174
-0
TAutoPaymentInfo.java
...fu/cloud/plus/v1/yifu/social/entity/TAutoPaymentInfo.java
+77
-0
TAutoPaymentDetailSearchVo.java
...ud/plus/v1/yifu/social/vo/TAutoPaymentDetailSearchVo.java
+42
-0
TAutoPaymentDetailVo.java
...fu/cloud/plus/v1/yifu/social/vo/TAutoPaymentDetailVo.java
+77
-0
TAutoPaymentInfoSearchVo.java
...loud/plus/v1/yifu/social/vo/TAutoPaymentInfoSearchVo.java
+42
-0
TAutoPaymentInfoVo.java
...yifu/cloud/plus/v1/yifu/social/vo/TAutoPaymentInfoVo.java
+114
-0
TAutoPaymentDetailController.java
.../yifu/social/controller/TAutoPaymentDetailController.java
+186
-0
TAutoPaymentInfoController.java
...v1/yifu/social/controller/TAutoPaymentInfoController.java
+166
-0
TAutoPaymentDetailMapper.java
.../plus/v1/yifu/social/mapper/TAutoPaymentDetailMapper.java
+42
-0
TAutoPaymentInfoMapper.java
...ud/plus/v1/yifu/social/mapper/TAutoPaymentInfoMapper.java
+42
-0
TAutoPaymentDetailService.java
...lus/v1/yifu/social/service/TAutoPaymentDetailService.java
+52
-0
TAutoPaymentInfoService.java
.../plus/v1/yifu/social/service/TAutoPaymentInfoService.java
+52
-0
TAutoPaymentDetailServiceImpl.java
...fu/social/service/impl/TAutoPaymentDetailServiceImpl.java
+296
-0
TAutoPaymentInfoServiceImpl.java
...yifu/social/service/impl/TAutoPaymentInfoServiceImpl.java
+262
-0
TAutoPaymentDetailMapper.xml
...iz/src/main/resources/mapper/TAutoPaymentDetailMapper.xml
+149
-0
TAutoPaymentInfoMapper.xml
...-biz/src/main/resources/mapper/TAutoPaymentInfoMapper.xml
+89
-0
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TAutoPaymentDetail.java
0 → 100644
View file @
87da0765
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
entity
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.math.BigDecimal
;
/**
* 自动化实缴记录表
*
* @author fxj
* @date 2024-05-24 10:56:42
*/
@Data
@TableName
(
"t_auto_payment_detail"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"自动化实缴记录表"
)
public
class
TAutoPaymentDetail
extends
BaseEntity
{
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelIgnore
@Schema
(
description
=
"id"
)
private
String
id
;
/**
* 是否重新办理 0 是 1 否
*/
@ExcelAttribute
(
name
=
"是否重新办理 0 是 1 否"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"是否重新办理 0 是 1 否不能超过1个字符"
)
@ExcelProperty
(
"是否重新办理 0 是 1 否"
)
@Schema
(
description
=
"是否重新办理 0 是 1 否"
)
private
String
repeatHandleFlag
;
/**
* 姓名
*/
@ExcelAttribute
(
name
=
"姓名"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"姓名不能超过32个字符"
)
@ExcelProperty
(
"姓名"
)
@Schema
(
description
=
"姓名"
)
private
String
empName
;
/**
* 证件类型
*/
@ExcelAttribute
(
name
=
"证件类型"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"证件类型不能超过50个字符"
)
@ExcelProperty
(
"证件类型"
)
@Schema
(
description
=
"证件类型"
)
private
String
certType
;
/**
* 证件号码
*/
@ExcelAttribute
(
name
=
"证件号码"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"证件号码不能超过50个字符"
)
@ExcelProperty
(
"证件号码"
)
@Schema
(
description
=
"证件号码"
)
private
String
certNum
;
/**
* 缴费工资
*/
@ExcelAttribute
(
name
=
"缴费工资"
)
@ExcelProperty
(
"缴费工资"
)
@Schema
(
description
=
"缴费工资"
)
private
BigDecimal
paymentSalary
;
/**
* 缴费基数
*/
@ExcelAttribute
(
name
=
"缴费基数"
)
@ExcelProperty
(
"缴费基数"
)
@Schema
(
description
=
"缴费基数"
)
private
BigDecimal
paymentBase
;
/**
* 费率
*/
@ExcelAttribute
(
name
=
"费率"
,
maxLength
=
10
)
@Length
(
max
=
10
,
message
=
"费率不能超过10个字符"
)
@ExcelProperty
(
"费率"
)
@Schema
(
description
=
"费率"
)
private
String
rate
;
/**
* 应缴费额
*/
@ExcelAttribute
(
name
=
"应缴费额"
)
@ExcelProperty
(
"应缴费额"
)
@Schema
(
description
=
"应缴费额"
)
private
BigDecimal
payLimit
;
/**
* 人员编号
*/
@ExcelAttribute
(
name
=
"人员编号"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"人员编号不能超过32个字符"
)
@ExcelProperty
(
"人员编号"
)
@Schema
(
description
=
"人员编号"
)
private
String
empCode
;
/**
* 险种
*/
@ExcelAttribute
(
name
=
"险种"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"险种不能超过50个字符"
)
@ExcelProperty
(
"险种"
)
@Schema
(
description
=
"险种"
)
private
String
insuranceType
;
/**
* 社保缴纳月份
*/
@ExcelAttribute
(
name
=
"社保缴纳月份"
,
maxLength
=
10
)
@Length
(
max
=
10
,
message
=
"社保缴纳月份不能超过10个字符"
)
@ExcelProperty
(
"社保缴纳月份"
)
@Schema
(
description
=
"社保缴纳月份"
)
private
String
payMonth
;
/**
* 社保生成月份
*/
@ExcelAttribute
(
name
=
"社保生成月份"
,
maxLength
=
10
)
@Length
(
max
=
10
,
message
=
"社保生成月份不能超过10个字符"
)
@ExcelProperty
(
"社保生成月份"
)
@Schema
(
description
=
"社保生成月份"
)
private
String
createMonth
;
/**
* 社保缴纳地
*/
@ExcelAttribute
(
name
=
"社保缴纳地"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"社保缴纳地不能超过50个字符"
)
@ExcelProperty
(
"社保缴纳地"
)
@Schema
(
description
=
"社保缴纳地"
)
private
String
socialAddress
;
/**
* 社保户
*/
@ExcelAttribute
(
name
=
"社保户"
,
maxLength
=
100
)
@Length
(
max
=
100
,
message
=
"社保户不能超过100个字符"
)
@ExcelProperty
(
"社保户"
)
@Schema
(
description
=
"社保户"
)
private
String
socialSecurityAccount
;
/**
* 主表ID
*/
@ExcelAttribute
(
name
=
"主表ID"
,
isNotEmpty
=
true
,
errorInfo
=
"主表ID不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"主表ID不能为空"
)
@Length
(
max
=
32
,
message
=
"主表ID不能超过32个字符"
)
@ExcelIgnore
@Schema
(
description
=
"主表ID"
)
private
String
parentId
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TAutoPaymentInfo.java
0 → 100644
View file @
87da0765
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
/**
* 自动化实缴记录表
*
* @author fxj
* @date 2024-05-24 10:56:42
*/
@Data
@TableName
(
"t_auto_payment_info"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"自动化实缴记录表"
)
public
class
TAutoPaymentInfo
extends
BaseEntity
{
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"id"
)
@Schema
(
description
=
"id"
)
private
String
id
;
/**
* 数据整合:1 整合中 2已整合
*/
@ExcelAttribute
(
name
=
"数据整合:1 整合中 2已整合"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"数据整合:1 整合中 2已整合不能超过1个字符"
)
@ExcelProperty
(
"数据整合:1 整合中 2已整合"
)
@Schema
(
description
=
"数据整合:1 整合中 2已整合"
)
private
String
dataIntegrationFlag
;
/**
* 系统复核:0复核中1复核成功2复核失败
*/
@ExcelAttribute
(
name
=
"系统复核:0复核中1复核成功2复核失败"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"系统复核:0复核中1复核成功2复核失败不能超过1个字符"
)
@ExcelProperty
(
"系统复核:0复核中1复核成功2复核失败"
)
@Schema
(
description
=
"系统复核:0复核中1复核成功2复核失败"
)
private
String
systemReviewFlag
;
/**
* 重新复核状态 0 复核中 1复核成功 2复核失败
*/
@ExcelAttribute
(
name
=
"重新复核状态 0 复核中 1复核成功 2复核失败"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"重新复核状态 0 复核中 1复核成功 2复核失败不能超过1个字符"
)
@ExcelProperty
(
"重新复核状态 0 复核中 1复核成功 2复核失败"
)
@Schema
(
description
=
"重新复核状态 0 复核中 1复核成功 2复核失败"
)
private
String
repeatReviewFlag
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TAutoPaymentDetailSearchVo.java
0 → 100644
View file @
87da0765
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentDetail
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* 自动化实缴记录表
*
* @author fxj
* @date 2024-05-24 10:56:42
*/
@Data
public
class
TAutoPaymentDetailSearchVo
extends
TAutoPaymentDetail
{
/**
* 多选导出或删除等操作
*/
@Schema
(
description
=
"选中ID,多个逗号分割"
)
private
String
ids
;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema
(
description
=
"创建时间区间"
)
private
LocalDateTime
[]
createTimes
;
/**
* @Author fxj
* 查询数据起
**/
@Schema
(
description
=
"查询limit 开始"
)
private
int
limitStart
;
/**
* @Author fxj
* 查询数据止
**/
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TAutoPaymentDetailVo.java
0 → 100644
View file @
87da0765
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 自动化实缴记录表
*
* @author fxj
* @date 2024-05-24 10:56:42
*/
@Data
public
class
TAutoPaymentDetailVo
extends
RowIndex
implements
Serializable
{
/**
* 是否重新办理 0 是 1 否
*/
@ExcelAttribute
(
name
=
"是否重新办理"
,
maxLength
=
1
,
readConverterExp
=
"0=是,1=否"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"是否重新办理 0 是 1 否"
)
@ExcelProperty
(
"是否重新办理"
)
private
String
repeatHandleFlag
;
/**
* 姓名
*/
@Length
(
max
=
32
,
message
=
"姓名 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"姓名"
,
maxLength
=
32
,
isNotEmpty
=
true
)
@Schema
(
description
=
"姓名"
)
@ExcelProperty
(
"姓名"
)
private
String
empName
;
/**
* 证件号码
*/
@ExcelAttribute
(
name
=
"证件号码"
,
maxLength
=
50
,
isNotEmpty
=
true
)
@Schema
(
description
=
"证件号码"
)
@ExcelProperty
(
"证件号码"
)
private
String
certNum
;
/**
* 社保户
*/
@Length
(
max
=
100
,
message
=
"社保户 不能超过100 个字符"
)
@ExcelAttribute
(
name
=
"社保户"
,
maxLength
=
100
,
isNotEmpty
=
true
)
@Schema
(
description
=
"社保户"
)
@ExcelProperty
(
"社保户"
)
private
String
socialSecurityAccount
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TAutoPaymentInfoSearchVo.java
0 → 100644
View file @
87da0765
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentInfo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* 自动化实缴记录表
*
* @author fxj
* @date 2024-05-24 10:56:42
*/
@Data
public
class
TAutoPaymentInfoSearchVo
extends
TAutoPaymentInfo
{
/**
* 多选导出或删除等操作
*/
@Schema
(
description
=
"选中ID,多个逗号分割"
)
private
String
ids
;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema
(
description
=
"创建时间区间"
)
private
LocalDateTime
[]
createTimes
;
/**
* @Author fxj
* 查询数据起
**/
@Schema
(
description
=
"查询limit 开始"
)
private
int
limitStart
;
/**
* @Author fxj
* 查询数据止
**/
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TAutoPaymentInfoVo.java
0 → 100644
View file @
87da0765
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 自动化实缴记录表
*
* @author fxj
* @date 2024-05-24 10:56:42
*/
@Data
public
class
TAutoPaymentInfoVo
extends
RowIndex
implements
Serializable
{
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@NotBlank
(
message
=
"id 不能为空"
)
@Length
(
max
=
32
,
message
=
"id 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"id"
,
isNotEmpty
=
true
,
errorInfo
=
"id 不能为空"
,
maxLength
=
32
)
@Schema
(
description
=
"id"
)
@ExcelProperty
(
"id"
)
private
String
id
;
/**
* 数据整合:1 整合中 2已整合
*/
@Length
(
max
=
1
,
message
=
"数据整合:1 整合中 2已整合 不能超过1 个字符"
)
@ExcelAttribute
(
name
=
"数据整合:1 整合中 2已整合"
,
maxLength
=
1
)
@Schema
(
description
=
"数据整合:1 整合中 2已整合"
)
@ExcelProperty
(
"数据整合:1 整合中 2已整合"
)
private
String
dataIntegrationFlag
;
/**
* 系统复核:0复核中1复核成功2复核失败
*/
@Length
(
max
=
1
,
message
=
"系统复核:0复核中1复核成功2复核失败 不能超过1 个字符"
)
@ExcelAttribute
(
name
=
"系统复核:0复核中1复核成功2复核失败"
,
maxLength
=
1
)
@Schema
(
description
=
"系统复核:0复核中1复核成功2复核失败"
)
@ExcelProperty
(
"系统复核:0复核中1复核成功2复核失败"
)
private
String
systemReviewFlag
;
/**
* 重新复核状态 0 复核中 1复核成功 2复核失败
*/
@Length
(
max
=
1
,
message
=
"重新复核状态 0 复核中 1复核成功 2复核失败 不能超过1 个字符"
)
@ExcelAttribute
(
name
=
"重新复核状态 0 复核中 1复核成功 2复核失败"
,
maxLength
=
1
)
@Schema
(
description
=
"重新复核状态 0 复核中 1复核成功 2复核失败"
)
@ExcelProperty
(
"重新复核状态 0 复核中 1复核成功 2复核失败"
)
private
String
repeatReviewFlag
;
/**
* 创建人id
*/
@Length
(
max
=
32
,
message
=
"创建人id 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"创建人id"
,
maxLength
=
32
)
@Schema
(
description
=
"创建人id"
)
@ExcelProperty
(
"创建人id"
)
private
String
createBy
;
/**
* 创建人姓名
*/
@Length
(
max
=
32
,
message
=
"创建人姓名 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"创建人姓名"
,
maxLength
=
32
)
@Schema
(
description
=
"创建人姓名"
)
@ExcelProperty
(
"创建人姓名"
)
private
String
createName
;
/**
* 创建时间
*/
@ExcelAttribute
(
name
=
"创建时间"
,
isDate
=
true
)
@Schema
(
description
=
"创建时间"
)
@ExcelProperty
(
"创建时间"
)
private
Date
createTime
;
/**
* 更新人id
*/
@Length
(
max
=
32
,
message
=
"更新人id 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"更新人id"
,
maxLength
=
32
)
@Schema
(
description
=
"更新人id"
)
@ExcelProperty
(
"更新人id"
)
private
String
updateBy
;
/**
* 更新时间
*/
@ExcelAttribute
(
name
=
"更新时间"
,
isDate
=
true
)
@Schema
(
description
=
"更新时间"
)
@ExcelProperty
(
"更新时间"
)
private
Date
updateTime
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TAutoPaymentDetailController.java
0 → 100644
View file @
87da0765
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TAutoPaymentDetailService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TAutoPaymentDetailSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.SneakyThrows
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 自动化实缴记录表
*
* @author fxj
* @date 2024-05-24 10:56:42
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/tautopaymentdetail"
)
@Tag
(
name
=
"自动化实缴记录表管理"
)
public
class
TAutoPaymentDetailController
{
private
final
TAutoPaymentDetailService
tAutoPaymentDetailService
;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tAutoPaymentDetail 自动化实缴记录表
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TAutoPaymentDetail
>>
getTAutoPaymentDetailPage
(
Page
<
TAutoPaymentDetail
>
page
,
TAutoPaymentDetailSearchVo
tAutoPaymentDetail
)
{
return
new
R
<>(
tAutoPaymentDetailService
.
getTAutoPaymentDetailPage
(
page
,
tAutoPaymentDetail
));
}
/**
* 不分页查询
*
* @param tAutoPaymentDetail 自动化实缴记录表
* @return
*/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@PostMapping
(
"/noPage"
)
public
R
<
List
<
TAutoPaymentDetail
>>
getTAutoPaymentDetailNoPage
(
@RequestBody
TAutoPaymentDetailSearchVo
tAutoPaymentDetail
)
{
return
R
.
ok
(
tAutoPaymentDetailService
.
noPageDiy
(
tAutoPaymentDetail
));
}
/**
* 通过id查询自动化实缴记录表
*
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('social_tautopaymentdetail_get')"
)
@GetMapping
(
"/{id}"
)
public
R
<
TAutoPaymentDetail
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tAutoPaymentDetailService
.
getById
(
id
));
}
/**
* 新增自动化实缴记录表
*
* @param tAutoPaymentDetail 自动化实缴记录表
* @return R
*/
@Operation
(
summary
=
"新增自动化实缴记录表"
,
description
=
"新增自动化实缴记录表:hasPermission('social_tautopaymentdetail_add')"
)
@SysLog
(
"新增自动化实缴记录表"
)
@PostMapping
public
R
<
Boolean
>
save
(
@RequestBody
TAutoPaymentDetail
tAutoPaymentDetail
)
{
return
R
.
ok
(
tAutoPaymentDetailService
.
save
(
tAutoPaymentDetail
));
}
/**
* 修改自动化实缴记录表
*
* @param tAutoPaymentDetail 自动化实缴记录表
* @return R
*/
@Operation
(
summary
=
"修改自动化实缴记录表"
,
description
=
"修改自动化实缴记录表:hasPermission('social_tautopaymentdetail_edit')"
)
@SysLog
(
"修改自动化实缴记录表"
)
@PutMapping
public
R
<
Boolean
>
updateById
(
@RequestBody
TAutoPaymentDetail
tAutoPaymentDetail
)
{
return
R
.
ok
(
tAutoPaymentDetailService
.
updateById
(
tAutoPaymentDetail
));
}
/**
* 通过id删除自动化实缴记录表
*
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id删除自动化实缴记录表"
,
description
=
"通过id删除自动化实缴记录表:hasPermission('social_tautopaymentdetail_del')"
)
@SysLog
(
"通过id删除自动化实缴记录表"
)
@DeleteMapping
(
"/{id}"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tAutoPaymentDetailService
.
removeById
(
id
));
}
/**
* 自动化实缴记录表 批量导入
*
* @author fxj
* @date 2024-05-24 10:56:42
**/
@SneakyThrows
@Operation
(
description
=
"标记重新办理数据"
)
@SysLog
(
"标记重新办理数据"
)
@PostMapping
(
"/importListAdd"
)
public
R
<
List
<
ErrorMessage
>>
importListAdd
(
@RequestBody
MultipartFile
file
,
@RequestParam
String
parentId
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
))
{
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
// 获取redis分布式事务锁
String
key
=
CacheConstants
.
FUND_IMPORT_HANDLE_LOCK
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
();
String
requestId
;
try
{
requestId
=
RedisDistributedLock
.
getLock
(
key
,
"10"
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
ResultConstants
.
NO_GETLOCK_DATA
+
CommonConstants
.
DOWN_LINE_STRING
+
e
.
getMessage
());
}
try
{
if
(
Common
.
isNotNull
(
requestId
))
{
return
tAutoPaymentDetailService
.
importDiy
(
file
.
getInputStream
(),
parentId
);
}
else
{
return
R
.
failed
(
ResultConstants
.
NO_GETLOCK_DATA
);
}
}
finally
{
//主动释放锁
RedisDistributedLock
.
unlock
(
key
,
requestId
);
}
}
/**
* 自动化实缴记录表 批量导出
*
* @author fxj
* @date 2024-05-24 10:56:42
**/
@Operation
(
description
=
"导出自动化实缴记录表 hasPermission('social_tautopaymentdetail-export')"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TAutoPaymentDetailSearchVo
searchVo
)
{
tAutoPaymentDetailService
.
listExport
(
response
,
searchVo
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TAutoPaymentInfoController.java
0 → 100644
View file @
87da0765
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
controller
;
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.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TAutoPaymentInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TAutoPaymentInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TAutoPaymentInfoSearchVo
;
import
lombok.SneakyThrows
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 自动化实缴记录表
*
* @author fxj
* @date 2024-05-24 10:56:42
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/tautopaymentinfo"
)
@Tag
(
name
=
"自动化实缴记录表管理"
)
public
class
TAutoPaymentInfoController
{
private
final
TAutoPaymentInfoService
tAutoPaymentInfoService
;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tAutoPaymentInfo 自动化实缴记录表
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TAutoPaymentInfo
>>
getTAutoPaymentInfoPage
(
Page
<
TAutoPaymentInfo
>
page
,
TAutoPaymentInfoSearchVo
tAutoPaymentInfo
)
{
return
new
R
<>(
tAutoPaymentInfoService
.
getTAutoPaymentInfoPage
(
page
,
tAutoPaymentInfo
));
}
/**
* 不分页查询
*
* @param tAutoPaymentInfo 自动化实缴记录表
* @return
*/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@PostMapping
(
"/noPage"
)
public
R
<
List
<
TAutoPaymentInfo
>>
getTAutoPaymentInfoNoPage
(
@RequestBody
TAutoPaymentInfoSearchVo
tAutoPaymentInfo
)
{
return
R
.
ok
(
tAutoPaymentInfoService
.
noPageDiy
(
tAutoPaymentInfo
));
}
/**
* 通过id查询自动化实缴记录表
*
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('social_tautopaymentinfo_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('social_tautopaymentinfo_get')"
)
public
R
<
TAutoPaymentInfo
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tAutoPaymentInfoService
.
getById
(
id
));
}
/**
* 新增自动化实缴记录表
*
* @param tAutoPaymentInfo 自动化实缴记录表
* @return R
*/
@Operation
(
summary
=
"新增自动化实缴记录表"
,
description
=
"新增自动化实缴记录表:hasPermission('social_tautopaymentinfo_add')"
)
@SysLog
(
"新增自动化实缴记录表"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('social_tautopaymentinfo_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TAutoPaymentInfo
tAutoPaymentInfo
)
{
return
R
.
ok
(
tAutoPaymentInfoService
.
save
(
tAutoPaymentInfo
));
}
/**
* 修改自动化实缴记录表
*
* @param tAutoPaymentInfo 自动化实缴记录表
* @return R
*/
@Operation
(
summary
=
"修改自动化实缴记录表"
,
description
=
"修改自动化实缴记录表:hasPermission('social_tautopaymentinfo_edit')"
)
@SysLog
(
"修改自动化实缴记录表"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('social_tautopaymentinfo_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TAutoPaymentInfo
tAutoPaymentInfo
)
{
return
R
.
ok
(
tAutoPaymentInfoService
.
updateById
(
tAutoPaymentInfo
));
}
/**
* 通过id删除自动化实缴记录表
*
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id删除自动化实缴记录表"
,
description
=
"通过id删除自动化实缴记录表:hasPermission('social_tautopaymentinfo_del')"
)
@SysLog
(
"通过id删除自动化实缴记录表"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('social_tautopaymentinfo_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tAutoPaymentInfoService
.
removeById
(
id
));
}
/**
* 自动化实缴记录表 批量导入
*
* @author fxj
* @date 2024-05-24 10:56:42
**/
@SneakyThrows
@Operation
(
description
=
"批量新增自动化实缴记录表 hasPermission('social_tautopaymentinfo-batch-import')"
)
@SysLog
(
"批量新增自动化实缴记录表"
)
@PostMapping
(
"/importListAdd"
)
@PreAuthorize
(
"@pms.hasPermission('social_tautopaymentinfo-batch-import')"
)
public
R
<
List
<
ErrorMessage
>>
importListAdd
(
@RequestBody
MultipartFile
file
)
{
return
tAutoPaymentInfoService
.
importDiy
(
file
.
getInputStream
());
}
/**
* 自动化实缴记录表 批量导出
*
* @author fxj
* @date 2024-05-24 10:56:42
**/
@Operation
(
description
=
"导出自动化实缴记录表 hasPermission('social_tautopaymentinfo-export')"
)
@PostMapping
(
"/export"
)
@PreAuthorize
(
"@pms.hasPermission('social_tautopaymentinfo-export')"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TAutoPaymentInfoSearchVo
searchVo
)
{
tAutoPaymentInfoService
.
listExport
(
response
,
searchVo
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TAutoPaymentDetailMapper.java
0 → 100644
View file @
87da0765
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
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.social.entity.TAutoPaymentDetail
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* 自动化实缴记录表
*
* @author fxj
* @date 2024-05-24 10:56:42
*/
@Mapper
public
interface
TAutoPaymentDetailMapper
extends
BaseMapper
<
TAutoPaymentDetail
>
{
/**
* 自动化实缴记录表简单分页查询
*
* @param tAutoPaymentDetail 自动化实缴记录表
* @return
*/
IPage
<
TAutoPaymentDetail
>
getTAutoPaymentDetailPage
(
Page
<
TAutoPaymentDetail
>
page
,
@Param
(
"tAutoPaymentDetail"
)
TAutoPaymentDetail
tAutoPaymentDetail
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TAutoPaymentInfoMapper.java
0 → 100644
View file @
87da0765
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
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.social.entity.TAutoPaymentInfo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* 自动化实缴记录表
*
* @author fxj
* @date 2024-05-24 10:56:42
*/
@Mapper
public
interface
TAutoPaymentInfoMapper
extends
BaseMapper
<
TAutoPaymentInfo
>
{
/**
* 自动化实缴记录表简单分页查询
*
* @param tAutoPaymentInfo 自动化实缴记录表
* @return
*/
IPage
<
TAutoPaymentInfo
>
getTAutoPaymentInfoPage
(
Page
<
TAutoPaymentInfo
>
page
,
@Param
(
"tAutoPaymentInfo"
)
TAutoPaymentInfo
tAutoPaymentInfo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TAutoPaymentDetailService.java
0 → 100644
View file @
87da0765
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentDetail
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TAutoPaymentDetailSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.List
;
/**
* 自动化实缴记录表
*
* @author fxj
* @date 2024-05-24 10:56:42
*/
public
interface
TAutoPaymentDetailService
extends
IService
<
TAutoPaymentDetail
>
{
/**
* 自动化实缴记录表简单分页查询
*
* @param tAutoPaymentDetail 自动化实缴记录表
* @return
*/
IPage
<
TAutoPaymentDetail
>
getTAutoPaymentDetailPage
(
Page
<
TAutoPaymentDetail
>
page
,
TAutoPaymentDetailSearchVo
tAutoPaymentDetail
);
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
,
String
parentId
);
void
listExport
(
HttpServletResponse
response
,
TAutoPaymentDetailSearchVo
searchVo
);
List
<
TAutoPaymentDetail
>
noPageDiy
(
TAutoPaymentDetailSearchVo
searchVo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TAutoPaymentInfoService.java
0 → 100644
View file @
87da0765
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentInfo
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TAutoPaymentInfoSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.List
;
/**
* 自动化实缴记录表
*
* @author fxj
* @date 2024-05-24 10:56:42
*/
public
interface
TAutoPaymentInfoService
extends
IService
<
TAutoPaymentInfo
>
{
/**
* 自动化实缴记录表简单分页查询
*
* @param tAutoPaymentInfo 自动化实缴记录表
* @return
*/
IPage
<
TAutoPaymentInfo
>
getTAutoPaymentInfoPage
(
Page
<
TAutoPaymentInfo
>
page
,
TAutoPaymentInfoSearchVo
tAutoPaymentInfo
);
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
);
void
listExport
(
HttpServletResponse
response
,
TAutoPaymentInfoSearchVo
searchVo
);
List
<
TAutoPaymentInfo
>
noPageDiy
(
TAutoPaymentInfoSearchVo
searchVo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TAutoPaymentDetailServiceImpl.java
0 → 100644
View file @
87da0765
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TAutoPaymentInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TAutoPaymentInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TAutoPaymentDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TAutoPaymentDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TAutoPaymentDetailService
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TAutoPaymentDetailSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.awt.*
;
import
java.io.InputStream
;
import
java.util.List
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.read.listener.ReadListener
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
javax.servlet.ServletOutputStream
;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
/**
* 自动化实缴记录表
*
* @author fxj
* @date 2024-05-24 10:56:42
*/
@Log4j2
@AllArgsConstructor
@Service
public
class
TAutoPaymentDetailServiceImpl
extends
ServiceImpl
<
TAutoPaymentDetailMapper
,
TAutoPaymentDetail
>
implements
TAutoPaymentDetailService
{
@Autowired
private
RedisUtil
redisUtil
;
private
final
TAutoPaymentInfoMapper
paymentInfoMapper
;
/**
* 自动化实缴记录表简单分页查询
*
* @param tAutoPaymentDetail 自动化实缴记录表
* @return
*/
@Override
public
IPage
<
TAutoPaymentDetail
>
getTAutoPaymentDetailPage
(
Page
<
TAutoPaymentDetail
>
page
,
TAutoPaymentDetailSearchVo
tAutoPaymentDetail
)
{
return
baseMapper
.
getTAutoPaymentDetailPage
(
page
,
tAutoPaymentDetail
);
}
/**
* 自动化实缴记录表批量导出
*
* @param searchVo 自动化实缴记录表
* @return
*/
@Override
public
void
listExport
(
HttpServletResponse
response
,
TAutoPaymentDetailSearchVo
searchVo
)
{
String
fileName
=
"自动化实缴记录表批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
TAutoPaymentDetail
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
ServletOutputStream
out
=
null
;
YifuUser
user
=
SecurityUtils
.
getUser
();
String
key
=
CacheConstants
.
PAYMENT_SOCIAL_EXPORT
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
()
;
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
,
CommonConstants
.
UTF8
));
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
key
)))
{
out
.
write
(
CommonConstants
.
SOCIAL_EXPORT_CONTINUE
.
getBytes
(
"GBK"
));
out
.
close
();
return
;
}
else
{
redisUtil
.
set
(
key
,
user
.
getId
(),
600L
);
}
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TAutoPaymentDetail
.
class
).
build
();
WriteSheet
writeSheet
;
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TAutoPaymentDetail
>
util
=
new
ExcelUtil
<>(
TAutoPaymentDetail
.
class
);
for
(
TAutoPaymentDetail
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
writeSheet
=
EasyExcel
.
writerSheet
(
"自动化实缴记录表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
else
{
writeSheet
=
EasyExcel
.
writerSheet
(
"自动化实缴记录表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
redisUtil
.
remove
(
key
);
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
redisUtil
.
remove
(
key
);
}
catch
(
IOException
e
)
{
redisUtil
.
remove
(
key
);
log
.
error
(
"执行异常"
,
e
);
}
}
}
@Override
public
List
<
TAutoPaymentDetail
>
noPageDiy
(
TAutoPaymentDetailSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TAutoPaymentDetail
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TAutoPaymentDetail:
:
getId
,
idList
);
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
)
{
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
}
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
baseMapper
.
selectList
(
wrapper
);
}
private
Long
noPageCountDiy
(
TAutoPaymentDetailSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TAutoPaymentDetail
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TAutoPaymentDetail:
:
getId
,
idList
);
}
return
baseMapper
.
selectCount
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
TAutoPaymentDetailSearchVo
entity
)
{
LambdaQueryWrapper
<
TAutoPaymentDetail
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TAutoPaymentDetail:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TAutoPaymentDetail:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
()))
{
wrapper
.
eq
(
TAutoPaymentDetail:
:
getCreateName
,
entity
.
getCreateName
());
}
return
wrapper
;
}
@Override
public
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
,
String
parentId
)
{
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
TAutoPaymentDetailVo
>
util1
=
new
ExcelUtil
<>(
TAutoPaymentDetailVo
.
class
);
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try
{
EasyExcel
.
read
(
inputStream
,
TAutoPaymentDetailVo
.
class
,
new
ReadListener
<
TAutoPaymentDetailVo
>()
{
/**
* 单次缓存的数据量
*/
public
static
final
int
BATCH_COUNT
=
CommonConstants
.
BATCH_COUNT
;
/**
*临时存储
*/
private
List
<
TAutoPaymentDetailVo
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
@Override
public
void
invoke
(
TAutoPaymentDetailVo
data
,
AnalysisContext
context
)
{
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
data
.
setRowIndex
(
rowIndex
+
1
);
ErrorMessage
errorMessage
=
util1
.
checkEntity
(
data
,
data
.
getRowIndex
());
if
(
Common
.
isNotNull
(
errorMessage
))
{
errorMessageList
.
add
(
errorMessage
);
}
else
{
cachedDataList
.
add
(
data
);
}
if
(
cachedDataList
.
size
()
>=
BATCH_COUNT
)
{
saveData
();
// 存储完成清理 list
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
}
}
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
saveData
();
}
/**
* 加上存储数据库
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importTAutoPaymentDetail
(
cachedDataList
,
errorMessageList
,
parentId
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
return
R
.
ok
(
errorMessageList
);
}
private
void
importTAutoPaymentDetail
(
List
<
TAutoPaymentDetailVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
String
parentId
)
{
// 执行数据插入操作 组装
TAutoPaymentDetailVo
excel
;
TAutoPaymentDetail
detail
;
TAutoPaymentInfo
paymentInfo
=
paymentInfoMapper
.
selectById
(
parentId
);
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
excel
=
excelVOList
.
get
(
i
);
if
(
Common
.
isEmpty
(
paymentInfo
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
PARAM_IS_NOT_ERROR
));
continue
;
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
paymentInfo
.
getRepeatReviewFlag
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"重新复核中,禁止更新!"
));
continue
;
}
// 数据合法情况
if
(!
CommonConstants
.
IS_TRUE
.
equals
(
excel
.
getRepeatHandleFlag
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"'是否重新办理'填写不正确!"
));
continue
;
}
detail
=
baseMapper
.
selectOne
(
Wrappers
.<
TAutoPaymentDetail
>
query
().
lambda
()
.
eq
(
TAutoPaymentDetail:
:
getParentId
,
parentId
)
.
eq
(
TAutoPaymentDetail:
:
getEmpName
,
excel
.
getEmpName
())
.
eq
(
TAutoPaymentDetail:
:
getCertNum
,
excel
.
getCertNum
())
.
eq
(
TAutoPaymentDetail:
:
getSocialSecurityAccount
,
excel
.
getSocialSecurityAccount
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isEmpty
(
detail
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"对应姓名+证件号码+社保户的数据不存在!"
));
continue
;
}
detail
.
setRepeatHandleFlag
(
"0"
);
// 插入
baseMapper
.
updateById
(
detail
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TAutoPaymentInfoServiceImpl.java
0 → 100644
View file @
87da0765
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TAutoPaymentInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TAutoPaymentInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TAutoPaymentInfoService
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TAutoPaymentInfoSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.List
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.read.listener.ReadListener
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 自动化实缴记录表
*
* @author fxj
* @date 2024-05-24 10:56:42
*/
@Log4j2
@Service
public
class
TAutoPaymentInfoServiceImpl
extends
ServiceImpl
<
TAutoPaymentInfoMapper
,
TAutoPaymentInfo
>
implements
TAutoPaymentInfoService
{
/**
* 自动化实缴记录表简单分页查询
*
* @param tAutoPaymentInfo 自动化实缴记录表
* @return
*/
@Override
public
IPage
<
TAutoPaymentInfo
>
getTAutoPaymentInfoPage
(
Page
<
TAutoPaymentInfo
>
page
,
TAutoPaymentInfoSearchVo
tAutoPaymentInfo
)
{
return
baseMapper
.
getTAutoPaymentInfoPage
(
page
,
tAutoPaymentInfo
);
}
/**
* 自动化实缴记录表批量导出
*
* @param searchVo 自动化实缴记录表
* @return
*/
@Override
public
void
listExport
(
HttpServletResponse
response
,
TAutoPaymentInfoSearchVo
searchVo
)
{
String
fileName
=
"自动化实缴记录表批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
TAutoPaymentInfo
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
ServletOutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TAutoPaymentInfo
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TAutoPaymentInfo
>
util
=
new
ExcelUtil
<>(
TAutoPaymentInfo
.
class
);
for
(
TAutoPaymentInfo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"自动化实缴记录表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"自动化实缴记录表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
@Override
public
List
<
TAutoPaymentInfo
>
noPageDiy
(
TAutoPaymentInfoSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TAutoPaymentInfo
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TAutoPaymentInfo:
:
getId
,
idList
);
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
)
{
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
}
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
baseMapper
.
selectList
(
wrapper
);
}
private
Long
noPageCountDiy
(
TAutoPaymentInfoSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TAutoPaymentInfo
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TAutoPaymentInfo:
:
getId
,
idList
);
}
return
baseMapper
.
selectCount
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
TAutoPaymentInfoSearchVo
entity
)
{
LambdaQueryWrapper
<
TAutoPaymentInfo
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TAutoPaymentInfo:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TAutoPaymentInfo:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
()))
{
wrapper
.
eq
(
TAutoPaymentInfo:
:
getCreateName
,
entity
.
getCreateName
());
}
return
wrapper
;
}
@Override
public
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
)
{
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
TAutoPaymentInfoVo
>
util1
=
new
ExcelUtil
<>(
TAutoPaymentInfoVo
.
class
);
;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try
{
EasyExcel
.
read
(
inputStream
,
TAutoPaymentInfoVo
.
class
,
new
ReadListener
<
TAutoPaymentInfoVo
>()
{
/**
* 单次缓存的数据量
*/
public
static
final
int
BATCH_COUNT
=
CommonConstants
.
BATCH_COUNT
;
/**
*临时存储
*/
private
List
<
TAutoPaymentInfoVo
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
@Override
public
void
invoke
(
TAutoPaymentInfoVo
data
,
AnalysisContext
context
)
{
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
data
.
setRowIndex
(
rowIndex
+
1
);
ErrorMessage
errorMessage
=
util1
.
checkEntity
(
data
,
data
.
getRowIndex
());
if
(
Common
.
isNotNull
(
errorMessage
))
{
errorMessageList
.
add
(
errorMessage
);
}
else
{
cachedDataList
.
add
(
data
);
}
if
(
cachedDataList
.
size
()
>=
BATCH_COUNT
)
{
saveData
();
// 存储完成清理 list
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
}
}
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
saveData
();
}
/**
* 加上存储数据库
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importTAutoPaymentInfo
(
cachedDataList
,
errorMessageList
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
return
R
.
ok
(
errorMessageList
);
}
private
void
importTAutoPaymentInfo
(
List
<
TAutoPaymentInfoVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 个性化校验逻辑
ErrorMessage
errorMsg
;
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
TAutoPaymentInfoVo
excel
=
excelVOList
.
get
(
i
);
// 数据合法情况 TODO
// 插入
insertExcel
(
excel
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
}
}
/**
* 插入excel bad record
*/
private
void
insertExcel
(
TAutoPaymentInfoVo
excel
)
{
TAutoPaymentInfo
insert
=
new
TAutoPaymentInfo
();
BeanUtil
.
copyProperties
(
excel
,
insert
);
this
.
save
(
insert
);
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/TAutoPaymentDetailMapper.xml
0 → 100644
View file @
87da0765
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.social.mapper.TAutoPaymentDetailMapper"
>
<resultMap
id=
"tAutoPaymentDetailMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentDetail"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"repeatHandleFlag"
column=
"REPEAT_HANDLE_FLAG"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"certType"
column=
"CERT_TYPE"
/>
<result
property=
"certNum"
column=
"CERT_NUM"
/>
<result
property=
"paymentSalary"
column=
"PAYMENT_SALARY"
/>
<result
property=
"paymentBase"
column=
"PAYMENT_BASE"
/>
<result
property=
"rate"
column=
"RATE"
/>
<result
property=
"payLimit"
column=
"PAY_LIMIT"
/>
<result
property=
"empCode"
column=
"EMP_CODE"
/>
<result
property=
"insuranceType"
column=
"INSURANCE_TYPE"
/>
<result
property=
"payMonth"
column=
"PAY_MONTH"
/>
<result
property=
"createMonth"
column=
"CREATE_MONTH"
/>
<result
property=
"socialAddress"
column=
"SOCIAL_ADDRESS"
/>
<result
property=
"socialSecurityAccount"
column=
"SOCIAL_SECURITY_ACCOUNT"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"parentId"
column=
"PARENT_ID"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.REPEAT_HANDLE_FLAG,
a.EMP_NAME,
a.CERT_TYPE,
a.CERT_NUM,
a.PAYMENT_SALARY,
a.PAYMENT_BASE,
a.RATE,
a.PAY_LIMIT,
a.EMP_CODE,
a.INSURANCE_TYPE,
a.PAY_MONTH,
a.CREATE_MONTH,
a.SOCIAL_ADDRESS,
a.SOCIAL_SECURITY_ACCOUNT,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME,
a.PARENT_ID
</sql>
<sql
id=
"tAutoPaymentDetail_where"
>
<if
test=
"tAutoPaymentDetail != null"
>
<if
test=
"tAutoPaymentDetail.id != null and tAutoPaymentDetail.id.trim() != ''"
>
AND a.ID = #{tAutoPaymentDetail.id}
</if>
<if
test=
"tAutoPaymentDetail.repeatHandleFlag != null and tAutoPaymentDetail.repeatHandleFlag.trim() != ''"
>
AND a.REPEAT_HANDLE_FLAG = #{tAutoPaymentDetail.repeatHandleFlag}
</if>
<if
test=
"tAutoPaymentDetail.empName != null and tAutoPaymentDetail.empName.trim() != ''"
>
AND a.EMP_NAME = #{tAutoPaymentDetail.empName}
</if>
<if
test=
"tAutoPaymentDetail.certType != null and tAutoPaymentDetail.certType.trim() != ''"
>
AND a.CERT_TYPE = #{tAutoPaymentDetail.certType}
</if>
<if
test=
"tAutoPaymentDetail.certNum != null and tAutoPaymentDetail.certNum.trim() != ''"
>
AND a.CERT_NUM = #{tAutoPaymentDetail.certNum}
</if>
<if
test=
"tAutoPaymentDetail.paymentSalary != null"
>
AND a.PAYMENT_SALARY = #{tAutoPaymentDetail.paymentSalary}
</if>
<if
test=
"tAutoPaymentDetail.paymentBase != null"
>
AND a.PAYMENT_BASE = #{tAutoPaymentDetail.paymentBase}
</if>
<if
test=
"tAutoPaymentDetail.rate != null and tAutoPaymentDetail.rate.trim() != ''"
>
AND a.RATE = #{tAutoPaymentDetail.rate}
</if>
<if
test=
"tAutoPaymentDetail.payLimit != null"
>
AND a.PAY_LIMIT = #{tAutoPaymentDetail.payLimit}
</if>
<if
test=
"tAutoPaymentDetail.empCode != null and tAutoPaymentDetail.empCode.trim() != ''"
>
AND a.EMP_CODE = #{tAutoPaymentDetail.empCode}
</if>
<if
test=
"tAutoPaymentDetail.insuranceType != null and tAutoPaymentDetail.insuranceType.trim() != ''"
>
AND a.INSURANCE_TYPE = #{tAutoPaymentDetail.insuranceType}
</if>
<if
test=
"tAutoPaymentDetail.payMonth != null and tAutoPaymentDetail.payMonth.trim() != ''"
>
AND a.PAY_MONTH = #{tAutoPaymentDetail.payMonth}
</if>
<if
test=
"tAutoPaymentDetail.createMonth != null and tAutoPaymentDetail.createMonth.trim() != ''"
>
AND a.CREATE_MONTH = #{tAutoPaymentDetail.createMonth}
</if>
<if
test=
"tAutoPaymentDetail.socialAddress != null and tAutoPaymentDetail.socialAddress.trim() != ''"
>
AND a.SOCIAL_ADDRESS = #{tAutoPaymentDetail.socialAddress}
</if>
<if
test=
"tAutoPaymentDetail.socialSecurityAccount != null and tAutoPaymentDetail.socialSecurityAccount.trim() != ''"
>
AND a.SOCIAL_SECURITY_ACCOUNT = #{tAutoPaymentDetail.socialSecurityAccount}
</if>
<if
test=
"tAutoPaymentDetail.createBy != null and tAutoPaymentDetail.createBy.trim() != ''"
>
AND a.CREATE_BY = #{tAutoPaymentDetail.createBy}
</if>
<if
test=
"tAutoPaymentDetail.createName != null and tAutoPaymentDetail.createName.trim() != ''"
>
AND a.CREATE_NAME = #{tAutoPaymentDetail.createName}
</if>
<if
test=
"tAutoPaymentDetail.createTime != null"
>
AND a.CREATE_TIME = #{tAutoPaymentDetail.createTime}
</if>
<if
test=
"tAutoPaymentDetail.updateBy != null and tAutoPaymentDetail.updateBy.trim() != ''"
>
AND a.UPDATE_BY = #{tAutoPaymentDetail.updateBy}
</if>
<if
test=
"tAutoPaymentDetail.updateTime != null"
>
AND a.UPDATE_TIME = #{tAutoPaymentDetail.updateTime}
</if>
<if
test=
"tAutoPaymentDetail.parentId != null and tAutoPaymentDetail.parentId.trim() != ''"
>
AND a.PARENT_ID = #{tAutoPaymentDetail.parentId}
</if>
</if>
</sql>
<!--tAutoPaymentDetail简单分页查询-->
<select
id=
"getTAutoPaymentDetailPage"
resultMap=
"tAutoPaymentDetailMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_auto_payment_detail a
<where>
1=1
<include
refid=
"tAutoPaymentDetail_where"
/>
</where>
</select>
</mapper>
yifu-social/yifu-social-biz/src/main/resources/mapper/TAutoPaymentInfoMapper.xml
0 → 100644
View file @
87da0765
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.social.mapper.TAutoPaymentInfoMapper"
>
<resultMap
id=
"tAutoPaymentInfoMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentInfo"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"dataIntegrationFlag"
column=
"DATA_INTEGRATION_FLAG"
/>
<result
property=
"systemReviewFlag"
column=
"SYSTEM_REVIEW_FLAG"
/>
<result
property=
"repeatReviewFlag"
column=
"REPEAT_REVIEW_FLAG"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.DATA_INTEGRATION_FLAG,
a.SYSTEM_REVIEW_FLAG,
a.REPEAT_REVIEW_FLAG,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
<sql
id=
"tAutoPaymentInfo_where"
>
<if
test=
"tAutoPaymentInfo != null"
>
<if
test=
"tAutoPaymentInfo.id != null and tAutoPaymentInfo.id.trim() != ''"
>
AND a.ID = #{tAutoPaymentInfo.id}
</if>
<if
test=
"tAutoPaymentInfo.dataIntegrationFlag != null and tAutoPaymentInfo.dataIntegrationFlag.trim() != ''"
>
AND a.DATA_INTEGRATION_FLAG = #{tAutoPaymentInfo.dataIntegrationFlag}
</if>
<if
test=
"tAutoPaymentInfo.systemReviewFlag != null and tAutoPaymentInfo.systemReviewFlag.trim() != ''"
>
AND a.SYSTEM_REVIEW_FLAG = #{tAutoPaymentInfo.systemReviewFlag}
</if>
<if
test=
"tAutoPaymentInfo.repeatReviewFlag != null and tAutoPaymentInfo.repeatReviewFlag.trim() != ''"
>
AND a.REPEAT_REVIEW_FLAG = #{tAutoPaymentInfo.repeatReviewFlag}
</if>
<if
test=
"tAutoPaymentInfo.createBy != null and tAutoPaymentInfo.createBy.trim() != ''"
>
AND a.CREATE_BY = #{tAutoPaymentInfo.createBy}
</if>
<if
test=
"tAutoPaymentInfo.createName != null and tAutoPaymentInfo.createName.trim() != ''"
>
AND a.CREATE_NAME = #{tAutoPaymentInfo.createName}
</if>
<if
test=
"tAutoPaymentInfo.createTime != null"
>
AND a.CREATE_TIME = #{tAutoPaymentInfo.createTime}
</if>
<if
test=
"tAutoPaymentInfo.updateBy != null and tAutoPaymentInfo.updateBy.trim() != ''"
>
AND a.UPDATE_BY = #{tAutoPaymentInfo.updateBy}
</if>
<if
test=
"tAutoPaymentInfo.updateTime != null"
>
AND a.UPDATE_TIME = #{tAutoPaymentInfo.updateTime}
</if>
</if>
</sql>
<!--tAutoPaymentInfo简单分页查询-->
<select
id=
"getTAutoPaymentInfoPage"
resultMap=
"tAutoPaymentInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_auto_payment_info a
<where>
1=1
<include
refid=
"tAutoPaymentInfo_where"
/>
</where>
</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