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
d48c5333
Commit
d48c5333
authored
Jun 06, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.6.5-社保士兵实缴
parent
07a89c5f
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
1462 additions
and
127 deletions
+1462
-127
SocialTask.java
...n/java/com/yifu/cloud/plus/v1/job/compont/SocialTask.java
+24
-0
TAutoPaymentDetail.java
.../cloud/plus/v1/yifu/social/entity/TAutoPaymentDetail.java
+8
-0
TAutoPaymentInfo.java
...fu/cloud/plus/v1/yifu/social/entity/TAutoPaymentInfo.java
+115
-17
TSocialSoldierShenBaoTask.java
...plus/v1/yifu/social/entity/TSocialSoldierShenBaoTask.java
+9
-1
SocialSoldierPaymentSelectOneVo.java
...us/v1/yifu/social/vo/SocialSoldierPaymentSelectOneVo.java
+43
-0
SocialSoldierPaymentSelectThreeVo.java
.../v1/yifu/social/vo/SocialSoldierPaymentSelectThreeVo.java
+30
-0
SocialSoldierPaymentSelectTwoVo.java
...us/v1/yifu/social/vo/SocialSoldierPaymentSelectTwoVo.java
+30
-0
SocialConfig.java
...m/yifu/cloud/plus/v1/yifu/social/config/SocialConfig.java
+4
-2
TAutoPaymentDetailController.java
.../yifu/social/controller/TAutoPaymentDetailController.java
+2
-2
TAutoPaymentInfoController.java
...v1/yifu/social/controller/TAutoPaymentInfoController.java
+20
-6
TSocialSoldierController.java
...s/v1/yifu/social/controller/TSocialSoldierController.java
+28
-0
TAutoPaymentDetailMapper.java
.../plus/v1/yifu/social/mapper/TAutoPaymentDetailMapper.java
+10
-0
TAutoPaymentInfoMapper.java
...ud/plus/v1/yifu/social/mapper/TAutoPaymentInfoMapper.java
+9
-0
TSocialSoldierMapper.java
...loud/plus/v1/yifu/social/mapper/TSocialSoldierMapper.java
+22
-0
TSocialSoldierShenBaoTaskMapper.java
...1/yifu/social/mapper/TSocialSoldierShenBaoTaskMapper.java
+1
-0
TAutoPaymentDetailService.java
...lus/v1/yifu/social/service/TAutoPaymentDetailService.java
+8
-0
TAutoPaymentInfoService.java
.../plus/v1/yifu/social/service/TAutoPaymentInfoService.java
+9
-0
TSocialSoldierPushService.java
...lus/v1/yifu/social/service/TSocialSoldierPushService.java
+7
-0
TSocialSoldierService.java
...ud/plus/v1/yifu/social/service/TSocialSoldierService.java
+7
-0
TSocialSoldierShenBaoTaskService.java
...yifu/social/service/TSocialSoldierShenBaoTaskService.java
+10
-0
TAutoPaymentDetailServiceImpl.java
...fu/social/service/impl/TAutoPaymentDetailServiceImpl.java
+5
-0
TAutoPaymentInfoServiceImpl.java
...yifu/social/service/impl/TAutoPaymentInfoServiceImpl.java
+11
-0
TSocialSoldierPushServiceImpl.java
...fu/social/service/impl/TSocialSoldierPushServiceImpl.java
+70
-4
TSocialSoldierServiceImpl.java
...1/yifu/social/service/impl/TSocialSoldierServiceImpl.java
+882
-86
TSocialSoldierShenBaoTaskServiceImpl.java
...al/service/impl/TSocialSoldierShenBaoTaskServiceImpl.java
+8
-0
TAutoPaymentDetailMapper.xml
...iz/src/main/resources/mapper/TAutoPaymentDetailMapper.xml
+5
-0
TAutoPaymentInfoMapper.xml
...-biz/src/main/resources/mapper/TAutoPaymentInfoMapper.xml
+46
-6
TSocialSoldierMapper.xml
...al-biz/src/main/resources/mapper/TSocialSoldierMapper.xml
+31
-3
TSocialSoldierShenBaoTaskMapper.xml
...main/resources/mapper/TSocialSoldierShenBaoTaskMapper.xml
+8
-0
No files found.
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/SocialTask.java
View file @
d48c5333
...
...
@@ -230,4 +230,28 @@ public class SocialTask {
log
.
info
(
"------------5每月5号推送工资申报、调整(实缴使用)-定时任务结束------------"
);
}
/**
* @Description: 6每月6号0点推送实缴3张表查询
* @Author: hgw
* @Date: 2024-6-6 10:54:39
* @return: void
**/
public
void
doPushPaymentThree
()
{
log
.
info
(
"------------6每月6号1点推送实缴3张表查询-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tsocialsoldier/inner/doPushPaymentThree"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------6每月6号1点推送实缴3张表查询-定时任务结束------------"
);
}
/**
* @Description: 7每月6号3点定时任务获取社保士兵实缴3张表
* @Author: hgw
* @Date: 2024-6-6 10:54:43
* @return: void
**/
public
void
doInnerGetPaymentThree
()
{
log
.
info
(
"------------7每月6号3点定时任务获取社保士兵实缴3张表-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tsocialsoldier/inner/doInnerGetPaymentThree"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------7每月6号3点定时任务获取社保士兵实缴3张表-定时任务结束------------"
);
}
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TAutoPaymentDetail.java
View file @
d48c5333
...
...
@@ -160,6 +160,14 @@ public class TAutoPaymentDetail extends BaseEntity {
@ExcelProperty
(
"社保户"
)
@Schema
(
description
=
"社保户"
)
private
String
socialSecurityAccount
;
/**
* 资源类型:1日常申报导出;2人员缴费明细打印;3单位缴费明细查询
*/
@ExcelAttribute
(
name
=
"资源类型"
,
maxLength
=
100
)
@Length
(
max
=
100
,
message
=
"资源类型不能超过100个字符"
)
@ExcelProperty
(
"资源类型"
)
@Schema
(
description
=
"资源类型:1日常申报导出;2人员缴费明细打印;3单位缴费明细查询"
)
private
String
sourceType
;
/**
* 主表ID
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TAutoPaymentInfo.java
View file @
d48c5333
...
...
@@ -18,14 +18,15 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
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
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
...
...
@@ -50,28 +51,125 @@ public class TAutoPaymentInfo extends BaseEntity {
@Schema
(
description
=
"id"
)
private
String
id
;
/**
* 数据整合:1 整合中 2已整合
* 生成月
*/
@ExcelAttribute
(
name
=
"生成月"
,
maxLength
=
6
)
@Length
(
max
=
1
,
message
=
"生成月不能超过6个字符"
)
@ExcelProperty
(
"生成月"
)
@Schema
(
description
=
"生成月"
)
private
String
createMonth
;
/**
* 数据整合之日常申报:0未整合1整合中2已整合3整合失败
*/
@ExcelAttribute
(
name
=
"数据整合之日常申报"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"数据整合之日常申报不能超过1个字符"
)
@ExcelProperty
(
"数据整合之日常申报"
)
@Schema
(
description
=
"数据整合之日常申报:0未整合1整合中2已整合3整合失败"
)
private
String
dataOneFlag
;
/**
* 数据整合之人员缴费明细:0未整合1整合中2已整合3整合失败
*/
@ExcelAttribute
(
name
=
"数据整合之人员缴费明细"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"数据整合之人员缴费明细不能超过1个字符"
)
@ExcelProperty
(
"数据整合之人员缴费明细"
)
@Schema
(
description
=
"数据整合之人员缴费明细:0未整合1整合中2已整合3整合失败"
)
private
String
dataTwoFlag
;
/**
* 数据整合之单位缴费明细:0未整合1整合中2已整合3整合失败
*/
@ExcelAttribute
(
name
=
"数据整合之单位缴费明细"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"数据整合之单位缴费明细不能超过1个字符"
)
@ExcelProperty
(
"数据整合之单位缴费明细"
)
@Schema
(
description
=
"数据整合之单位缴费明细:0未整合1整合中2已整合3整合失败"
)
private
String
dataThreeFlag
;
/**
* 数据整合之日常申报的备注
*/
@ExcelAttribute
(
name
=
"数据整合之日常申报的备注"
,
maxLength
=
100
)
@Length
(
max
=
100
,
message
=
"数据整合之日常申报的备注不能超过100个字符"
)
@ExcelProperty
(
"数据整合之日常申报的备注"
)
@Schema
(
description
=
"数据整合之日常申报的备注"
)
private
String
dataOneRemark
;
/**
* 数据整合之人员缴费明细的备注
*/
@ExcelAttribute
(
name
=
"数据整合之人员缴费明细的备注"
,
maxLength
=
100
)
@Length
(
max
=
100
,
message
=
"数据整合之人员缴费明细的备注不能超过100个字符"
)
@ExcelProperty
(
"数据整合之人员缴费明细的备注"
)
@Schema
(
description
=
"数据整合之人员缴费明细的备注"
)
private
String
dataTwoRemark
;
/**
* 数据整合之单位缴费明细的备注
*/
@ExcelAttribute
(
name
=
"数据整合
:1 整合中 2已整合"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"数据整合:1 整合中 2已整合不能超过1
个字符"
)
@ExcelProperty
(
"数据整合
:1 整合中 2已整合
"
)
@Schema
(
description
=
"数据整合
:1 整合中 2已整合
"
)
private
String
data
IntegrationFlag
;
@ExcelAttribute
(
name
=
"数据整合
之单位缴费明细的备注"
,
maxLength
=
100
)
@Length
(
max
=
1
00
,
message
=
"数据整合之单位缴费明细的备注不能超过100
个字符"
)
@ExcelProperty
(
"数据整合
之单位缴费明细的备注
"
)
@Schema
(
description
=
"数据整合
之单位缴费明细的备注
"
)
private
String
data
ThreeRemark
;
/**
* 系统复核:0
复核中1复核成功2
复核失败
* 系统复核:0
未复核1复核中2复核成功3
复核失败
*/
@ExcelAttribute
(
name
=
"系统复核
:0复核中1复核成功2复核失败
"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"系统复核
:0复核中1复核成功2复核失败
不能超过1个字符"
)
@ExcelProperty
(
"系统复核:0
复核中1复核成功2
复核失败"
)
@Schema
(
description
=
"系统复核:0
复核中1复核成功2
复核失败"
)
@ExcelAttribute
(
name
=
"系统复核"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"系统复核不能超过1个字符"
)
@ExcelProperty
(
"系统复核:0
未复核1复核中2复核成功3
复核失败"
)
@Schema
(
description
=
"系统复核:0
未复核1复核中2复核成功3
复核失败"
)
private
String
systemReviewFlag
;
/**
* 重新复核状态 0
复核中 1复核成功 2
复核失败
* 重新复核状态 0
未复核1复核中2复核成功3
复核失败
*/
@ExcelAttribute
(
name
=
"重新复核状态
0 复核中 1复核成功 2复核失败
"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"重新复核状态
0 复核中 1复核成功 2复核失败
不能超过1个字符"
)
@ExcelProperty
(
"重新复核状态 0
复核中 1复核成功 2
复核失败"
)
@Schema
(
description
=
"重新复核状态 0
复核中 1复核成功 2
复核失败"
)
@ExcelAttribute
(
name
=
"重新复核状态"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"重新复核状态不能超过1个字符"
)
@ExcelProperty
(
"重新复核状态 0
未复核1复核中2复核成功3
复核失败"
)
@Schema
(
description
=
"重新复核状态 0
未复核1复核中2复核成功3
复核失败"
)
private
String
repeatReviewFlag
;
/**
* 资源路径
*/
@ExcelAttribute
(
name
=
"资源路径"
,
maxLength
=
200
)
@Length
(
max
=
200
,
message
=
"资源路径不能超过200个字符"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"资源路径"
)
private
String
attaSrc
;
/**
* 资源地址
*/
@ExcelAttribute
(
name
=
"资源地址"
,
maxLength
=
100
)
@Length
(
max
=
100
,
message
=
"资源地址不能超过100个字符"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"资源地址"
)
private
String
attaUrl
;
/**
* 原表资源地址1
*/
@ExcelAttribute
(
name
=
"原表资源地址1"
,
maxLength
=
200
)
@Length
(
max
=
200
,
message
=
"原表资源地址1不能超过200个字符"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"原表资源地址1"
)
private
String
attaUrlOne
;
/**
* 原表资源地址2
*/
@ExcelAttribute
(
name
=
"原表资源地址2"
,
maxLength
=
200
)
@Length
(
max
=
200
,
message
=
"原表资源地址2不能超过200个字符"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"原表资源地址2"
)
private
String
attaUrlTwo
;
/**
* 原表资源地址3
*/
@ExcelAttribute
(
name
=
"原表资源地址3"
,
maxLength
=
200
)
@Length
(
max
=
200
,
message
=
"原表资源地址3不能超过200个字符"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"原表资源地址3"
)
private
String
attaUrlThree
;
/**
* 原表资源地址4
*/
@ExcelAttribute
(
name
=
"原表资源地址4"
,
maxLength
=
200
)
@Length
(
max
=
200
,
message
=
"原表资源地址4不能超过200个字符"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"原表资源地址4"
)
private
String
attaUrlFour
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialSoldierShenBaoTask.java
View file @
d48c5333
...
...
@@ -65,7 +65,15 @@ public class TSocialSoldierShenBaoTask extends BaseEntity {
@NotBlank
(
message
=
"1申报;2调整不能为空"
)
@Length
(
max
=
1
,
message
=
"1申报;2调整不能超过1个字符"
)
@ExcelProperty
(
"1申报;2调整"
)
@Schema
(
description
=
"1申报;2调整"
)
@Schema
(
description
=
"1申报;2调整
;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询
"
)
private
String
type
;
/**
* 拉取状态:0未拉取;1已拉取
*/
@ExcelAttribute
(
name
=
"拉取状态:0未拉取;1已拉取"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"拉取状态:0未拉取;1已拉取不能超过1个字符"
)
@ExcelProperty
(
"拉取状态:0未拉取;1已拉取"
)
@Schema
(
description
=
"拉取状态:0未拉取;1已拉取"
)
private
String
dataStatus
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SocialSoldierPaymentSelectOneVo.java
0 → 100644
View file @
d48c5333
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Author hgw
* @Description 社保士兵实缴3张表查询1_合肥-社保费管理客户端-日常申报导出
* @Date 2024-5-29 18:20:26
**/
@Data
public
class
SocialSoldierPaymentSelectOneVo
implements
Serializable
{
// 单位编号 单位名称 是否截图(日常申报) 费款所属期 单企业多Sheet 单企业单Sheet 多企业单Sheet 有效期起 有效期止 是否查询职工缴费工资 回传信息
// 单位编号 单位名称 是否截图(日常申报) 费款所属期 是否下载人员明细 单企业多Sheet 单企业单Sheet 多企业单Sheet 有效期起 有效期止 是否查询职工缴费工资 回传信息
@ExcelProperty
(
"单位编号"
)
private
String
companyNo
;
@ExcelProperty
(
"单位名称"
)
private
String
companyName
;
@ExcelProperty
(
"是否截图(日常申报)"
)
private
String
isPrint
;
@ExcelProperty
(
"费款所属期"
)
private
String
createMonth
;
@ExcelProperty
(
"是否下载人员明细"
)
private
String
isDownLoad
;
@ExcelProperty
(
"单企业多Sheet"
)
private
String
danDuoSheet
;
@ExcelProperty
(
"单企业单Sheet"
)
private
String
danDanSheet
;
@ExcelProperty
(
"多企业单Sheet"
)
private
String
duoDanSheet
;
@ExcelProperty
(
"有效期起"
)
private
String
startDate
;
@ExcelProperty
(
"有效期止"
)
private
String
endDate
;
@ExcelProperty
(
"是否查询职工缴费工资"
)
private
String
isSalary
;
@ExcelProperty
(
"回传信息"
)
private
String
returnInfo
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SocialSoldierPaymentSelectThreeVo.java
0 → 100644
View file @
d48c5333
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Author hgw
* @Description 社保士兵实缴3张表查询3_合肥-医保-单位缴费明细查询
* @Date 2024-5-29 18:20:26
**/
@Data
public
class
SocialSoldierPaymentSelectThreeVo
implements
Serializable
{
// 企业名称 对应费款所属期 险种类型 回传信息 回传信息1 回传信息2
@ExcelProperty
(
"企业名称"
)
private
String
companyName
;
@ExcelProperty
(
"对应费款所属期"
)
private
String
createMonth
;
@ExcelProperty
(
"险种类型"
)
private
String
paymentType
;
@ExcelProperty
(
"回传信息"
)
private
String
returnInfo
;
@ExcelProperty
(
"回传信息1"
)
private
String
returnInfoOne
;
@ExcelProperty
(
"回传信息2"
)
private
String
returnInfoTwo
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SocialSoldierPaymentSelectTwoVo.java
0 → 100644
View file @
d48c5333
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Author hgw
* @Description 社保士兵实缴3张表查询2_合肥-社保-人员缴费明细打印
* @Date 2024-5-29 18:20:26
**/
@Data
public
class
SocialSoldierPaymentSelectTwoVo
implements
Serializable
{
// 企业名称 参险类型 业务年月 回传信息 回传信息1 回传信息2
@ExcelProperty
(
"企业名称"
)
private
String
companyName
;
@ExcelProperty
(
"参险类型"
)
private
String
paymentType
;
@ExcelProperty
(
"业务年月"
)
private
String
payMonth
;
@ExcelProperty
(
"回传信息"
)
private
String
returnInfo
;
@ExcelProperty
(
"回传信息1"
)
private
String
returnInfoOne
;
@ExcelProperty
(
"回传信息2"
)
private
String
returnInfoTwo
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/config/SocialConfig.java
View file @
d48c5333
...
...
@@ -117,8 +117,8 @@ public class SocialConfig {
sheMap
.
put
(
"社保减员"
,
sheBaoArrObj
.
getString
(
"value"
));
}
else
if
(
"审核数据查询"
.
equals
(
sheBaoArrObj
.
get
(
"label"
)))
{
sheMap
.
put
(
"审核数据查询"
,
sheBaoArrObj
.
getString
(
"value"
));
}
else
if
(
"
社保批量调基文件下载
"
.
equals
(
sheBaoArrObj
.
get
(
"label"
)))
{
sheMap
.
put
(
"
社保批量调基文件下载
"
,
sheBaoArrObj
.
getString
(
"value"
));
}
else
if
(
"
人员缴费明细打印
"
.
equals
(
sheBaoArrObj
.
get
(
"label"
)))
{
sheMap
.
put
(
"
人员缴费明细打印
"
,
sheBaoArrObj
.
getString
(
"value"
));
}
}
}
else
if
(
"医保"
.
equals
(
childrenArrObj
.
get
(
"label"
)))
{
...
...
@@ -133,6 +133,8 @@ public class SocialConfig {
sheMap
.
put
(
"审核数据信息查询"
,
sheBaoArrObj
.
getString
(
"value"
));
}
else
if
(
"单位缴费明细查询"
.
equals
(
sheBaoArrObj
.
get
(
"label"
)))
{
sheMap
.
put
(
"单位缴费明细查询"
,
sheBaoArrObj
.
getString
(
"value"
));
}
else
if
(
"单位缴费明细下载"
.
equals
(
sheBaoArrObj
.
get
(
"label"
)))
{
sheMap
.
put
(
"单位缴费明细下载"
,
sheBaoArrObj
.
getString
(
"value"
));
}
}
}
else
if
(
"社保费管理客户端"
.
equals
(
childrenArrObj
.
get
(
"label"
)))
{
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TAutoPaymentDetailController.java
View file @
d48c5333
...
...
@@ -46,7 +46,7 @@ import java.util.List;
/**
* 自动化实缴
记录
表
* 自动化实缴
明细
表
*
* @author fxj
* @date 2024-05-24 10:56:42
...
...
@@ -54,7 +54,7 @@ import java.util.List;
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/tautopaymentdetail"
)
@Tag
(
name
=
"自动化实缴
记录表明细管理
"
)
@Tag
(
name
=
"自动化实缴
明细表
"
)
public
class
TAutoPaymentDetailController
{
private
final
TAutoPaymentDetailService
tAutoPaymentDetailService
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TAutoPaymentInfoController.java
View file @
d48c5333
...
...
@@ -18,26 +18,25 @@
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.OSSUtil
;
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.
media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
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.net.URL
;
import
java.util.List
;
...
...
@@ -55,6 +54,7 @@ public class TAutoPaymentInfoController {
private
final
TAutoPaymentInfoService
tAutoPaymentInfoService
;
private
final
OSSUtil
ossUtil
;
/**
* 简单分页查询
...
...
@@ -69,6 +69,20 @@ public class TAutoPaymentInfoController {
return
new
R
<>(
tAutoPaymentInfoService
.
getTAutoPaymentInfoPage
(
page
,
tAutoPaymentInfo
));
}
/**
* 获取附件下载地址
* @Author hgw
* @Date 2024-6-6 09:42:47
**/
@Schema
(
description
=
"附件预览下载地址"
)
@SysLog
(
"附件预览下载地址"
)
@PostMapping
(
"/getOssFileUrl"
)
public
R
<
String
>
ossFileUrl
(
@RequestParam
String
attaSrc
)
{
URL
url
=
ossUtil
.
getObjectUrl
(
null
,
attaSrc
);
String
urlStr
=
url
.
toString
().
replace
(
"http"
,
"https"
);
return
new
R
<>(
urlStr
);
}
/**
* 不分页查询
*
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TSocialSoldierController.java
View file @
d48c5333
...
...
@@ -141,4 +141,32 @@ public class TSocialSoldierController {
return
tSocialSoldierPushService
.
pushSalaryByShenBao
();
}
/**
* @Description: 6每月6号推送实缴3张表查询
* @Author: hgw
* @Date: 2024-5-31 16:04:09
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation
(
description
=
"6每月6号1点推送实缴3张表查询"
)
@PostMapping
(
"/inner/pushPaymentThree"
)
@SysLog
(
"6每月6号推送实缴3张表查询"
)
@Inner
public
R
<
String
>
pushPaymentThree
()
{
return
tSocialSoldierPushService
.
pushPaymentThree
();
}
/**
* @Description: 7每月6号定时任务获取社保士兵实缴3张表
* @Author: hgw
* @Date: 2024-5-30 18:00:00
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation
(
description
=
"7每月6号3点定时任务获取社保士兵实缴3张表"
)
@PostMapping
(
"/inner/doInnerGetPaymentThree"
)
@SysLog
(
"7每月6号定时任务获取社保士兵实缴3张表"
)
@Inner
public
R
<
String
>
doInnerGetPaymentThree
()
{
return
tSocialSoldierService
.
doInnerGetPaymentThree
();
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TAutoPaymentDetailMapper.java
View file @
d48c5333
...
...
@@ -39,4 +39,14 @@ public interface TAutoPaymentDetailMapper extends BaseMapper<TAutoPaymentDetail>
* @return
*/
IPage
<
TAutoPaymentDetail
>
getTAutoPaymentDetailPage
(
Page
<
TAutoPaymentDetail
>
page
,
@Param
(
"tAutoPaymentDetail"
)
TAutoPaymentDetail
tAutoPaymentDetail
);
/**
* @param parentId
* @Description: 删除明细表
* @Author: hgw
* @Date: 2024/6/6 9:55
* @return: void
**/
void
deleteByParentId
(
@Param
(
"parentId"
)
String
parentId
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TAutoPaymentInfoMapper.java
View file @
d48c5333
...
...
@@ -39,4 +39,13 @@ public interface TAutoPaymentInfoMapper extends BaseMapper<TAutoPaymentInfo> {
* @return
*/
IPage
<
TAutoPaymentInfo
>
getTAutoPaymentInfoPage
(
Page
<
TAutoPaymentInfo
>
page
,
@Param
(
"tAutoPaymentInfo"
)
TAutoPaymentInfo
tAutoPaymentInfo
);
/**
* @Description: 获取当前月的主表
* @Author: hgw
* @Date: 2024/6/4 16:12
* @return: com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentInfo
**/
TAutoPaymentInfo
getThisMonthMainAuto
();
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TSocialSoldierMapper.java
View file @
d48c5333
...
...
@@ -94,5 +94,27 @@ public interface TSocialSoldierMapper extends BaseMapper<TSocialInfo> {
**/
List
<
SocialSoldierSalaryTiaoZhengVo
>
getSoldierSalaryByTiaoZhengList
();
/**
* @Description: 实缴3张表之日常申报
* @Author: hgw
* @Date: 2024/5/29 18:32
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierSalaryShenBaoVo>
**/
List
<
SocialSoldierPaymentSelectOneVo
>
getSoldierPaymentSelectOneList
();
/**
* @Description: 实缴3张表之日常申报
* @Author: hgw
* @Date: 2024/5/29 18:32
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierSalaryShenBaoVo>
**/
List
<
SocialSoldierPaymentSelectTwoVo
>
getSoldierPaymentSelectTwoList
();
/**
* @Description: 实缴3张表之日常申报
* @Author: hgw
* @Date: 2024/5/29 18:32
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierSalaryShenBaoVo>
**/
List
<
SocialSoldierPaymentSelectThreeVo
>
getSoldierPaymentSelectThreeList
();
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TSocialSoldierShenBaoTaskMapper.java
View file @
d48c5333
...
...
@@ -39,4 +39,5 @@ public interface TSocialSoldierShenBaoTaskMapper extends BaseMapper<TSocialSoldi
* @return
*/
List
<
TSocialSoldierShenBaoTask
>
getTSocialSoldierShenBaoTaskList
(
@Param
(
"tSocialSoldierShenBaoTask"
)
TSocialSoldierShenBaoTask
tSocialSoldierShenBaoTask
);
String
getSoldierTaskAddIdByType
(
@Param
(
"type"
)
String
type
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TAutoPaymentDetailService.java
View file @
d48c5333
...
...
@@ -49,4 +49,12 @@ public interface TAutoPaymentDetailService extends IService<TAutoPaymentDetail>
void
listExport
(
HttpServletResponse
response
,
TAutoPaymentDetailSearchVo
searchVo
);
List
<
TAutoPaymentDetail
>
noPageDiy
(
TAutoPaymentDetailSearchVo
searchVo
);
/**
* @Description: 清空明细表
* @Author: hgw
* @Date: 2024/6/6 9:54
* @return: void
**/
void
deleteByParentId
(
String
parentId
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TAutoPaymentInfoService.java
View file @
d48c5333
...
...
@@ -49,4 +49,13 @@ public interface TAutoPaymentInfoService extends IService<TAutoPaymentInfo> {
void
listExport
(
HttpServletResponse
response
,
TAutoPaymentInfoSearchVo
searchVo
);
List
<
TAutoPaymentInfo
>
noPageDiy
(
TAutoPaymentInfoSearchVo
searchVo
);
/**
* @Description: 获取当前月的主表
* @Author: hgw
* @Date: 2024/6/4 16:12
* @return: com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentInfo
**/
TAutoPaymentInfo
getThisMonthMainAuto
();
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TSocialSoldierPushService.java
View file @
d48c5333
...
...
@@ -65,5 +65,12 @@ public interface TSocialSoldierPushService extends IService<TSocialInfo> {
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
pushSalaryByShenBao
();
/**
* @Description: 6每月6号推送实缴3张表查询
* @Author: hgw
* @Date: 2024-5-31 16:04:54
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
pushPaymentThree
();
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TSocialSoldierService.java
View file @
d48c5333
...
...
@@ -46,5 +46,12 @@ public interface TSocialSoldierService extends IService<TSocialInfo> {
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
getSixJobByAudit
();
/**
* @Description: 获取实缴3张表的数据
* @Author: hgw
* @Date: 2024-5-24 17:02:34
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
doInnerGetPaymentThree
();
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TSocialSoldierShenBaoTaskService.java
View file @
d48c5333
...
...
@@ -36,4 +36,14 @@ public interface TSocialSoldierShenBaoTaskService extends IService<TSocialSoldie
* @return
*/
List
<
TSocialSoldierShenBaoTask
>
getTSocialSoldierShenBaoTaskList
(
TSocialSoldierShenBaoTask
tSocialSoldierShenBaoTask
);
/**
* @param type
* @Description: 获取实缴3张表推送后的任务ID,以用来拉取数据
* @Author: hgw
* @Date: 2024/5/31 18:13
* @return: java.lang.String
**/
String
getSoldierTaskAddIdByType
(
String
type
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TAutoPaymentDetailServiceImpl.java
View file @
d48c5333
...
...
@@ -177,6 +177,11 @@ public class TAutoPaymentDetailServiceImpl extends ServiceImpl<TAutoPaymentDetai
return
baseMapper
.
selectList
(
wrapper
);
}
@Override
public
void
deleteByParentId
(
String
parentId
)
{
baseMapper
.
deleteByParentId
(
parentId
);
}
private
Long
noPageCountDiy
(
TAutoPaymentDetailSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TAutoPaymentDetail
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TAutoPaymentInfoServiceImpl.java
View file @
d48c5333
...
...
@@ -157,6 +157,17 @@ public class TAutoPaymentInfoServiceImpl extends ServiceImpl<TAutoPaymentInfoMap
return
baseMapper
.
selectList
(
wrapper
);
}
/**
* @Description: 获取当前月的主表
* @Author: hgw
* @Date: 2024/6/4 16:12
* @return: com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentInfo
**/
@Override
public
TAutoPaymentInfo
getThisMonthMainAuto
()
{
return
baseMapper
.
getThisMonthMainAuto
();
}
private
Long
noPageCountDiy
(
TAutoPaymentInfoSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TAutoPaymentInfo
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialSoldierPushServiceImpl.java
View file @
d48c5333
...
...
@@ -286,7 +286,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
this
.
getOneAppGetModuleDetailByAudit
(
socialIdList
,
file
,
sheetName
);
}
}
if
(
ygsAddlist
==
null
||
ysdXuBaolist
==
null
||
ysdAddlist
==
null
)
{
if
(
ygsAddlist
==
null
&&
ysdXuBaolist
==
null
&&
ysdAddlist
==
null
)
{
return
R
.
failed
(
"无数据,推送结束!"
);
}
return
R
.
ok
(
"推送成功!!"
);
...
...
@@ -386,7 +386,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
**/
@Override
public
R
<
String
>
pushSalaryByShenBao
()
{
//
养工失待审核列表
//
工资申报
List
<
SocialSoldierSalaryShenBaoVo
>
shenBaolist
=
baseMapper
.
getSoldierSalaryByShenBaoList
();
log
.
info
(
"工资申报列表="
+
shenBaolist
);
String
sheetName
=
"年度缴费工资申报"
;
...
...
@@ -398,7 +398,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
this
.
getOneAppGetModuleDetailByShenBao
(
task
,
file
,
sheetName
);
}
}
//
养工失待审核列表
//
工资调整
List
<
SocialSoldierSalaryTiaoZhengVo
>
tiaoZhenglist
=
baseMapper
.
getSoldierSalaryByTiaoZhengList
();
log
.
info
(
"工资调整列表="
+
tiaoZhenglist
);
sheetName
=
"年度缴费工资调整"
;
...
...
@@ -410,7 +410,73 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
this
.
getOneAppGetModuleDetailByShenBao
(
task
,
file
,
sheetName
);
}
}
if
(
shenBaolist
==
null
||
tiaoZhenglist
==
null
)
{
if
(
shenBaolist
==
null
&&
tiaoZhenglist
==
null
)
{
return
R
.
failed
(
"无数据,推送结束!"
);
}
return
R
.
ok
(
"推送成功!!"
);
}
/**
* @Description: 6每月6号推送实缴3张表查询
* @Author: hgw
* @Date: 2024-5-31 16:04:47
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public
R
<
String
>
pushPaymentThree
()
{
// 实缴3张表之1:日常申报
List
<
SocialSoldierPaymentSelectOneVo
>
shenBaolist
=
baseMapper
.
getSoldierPaymentSelectOneList
();
log
.
info
(
"实缴3张表之1:日常申报list="
+
shenBaolist
);
String
sheetName
=
"日常申报导出"
;
if
(
shenBaolist
!=
null
&&
!
shenBaolist
.
isEmpty
())
{
MultipartFile
file
=
this
.
getFile
(
shenBaolist
,
SocialSoldierPaymentSelectOneVo
.
class
,
sheetName
);
if
(
Common
.
isNotNull
(
file
))
{
TSocialSoldierShenBaoTask
task
=
new
TSocialSoldierShenBaoTask
();
// 1申报;2调整;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询
task
.
setType
(
CommonConstants
.
THREE_STRING
);
this
.
getOneAppGetModuleDetailByShenBao
(
task
,
file
,
sheetName
);
}
}
// 实缴3张表之2:人员缴费明细打印
List
<
SocialSoldierPaymentSelectTwoVo
>
shenBaoTwolist
=
baseMapper
.
getSoldierPaymentSelectTwoList
();
log
.
info
(
"实缴3张表之2:人员缴费明细打印list="
+
shenBaoTwolist
);
sheetName
=
"人员缴费明细打印"
;
if
(
shenBaoTwolist
!=
null
&&
!
shenBaoTwolist
.
isEmpty
())
{
MultipartFile
file
=
this
.
getFile
(
shenBaoTwolist
,
SocialSoldierPaymentSelectTwoVo
.
class
,
sheetName
);
if
(
Common
.
isNotNull
(
file
))
{
TSocialSoldierShenBaoTask
task
=
new
TSocialSoldierShenBaoTask
();
// 1申报;2调整;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询
task
.
setType
(
CommonConstants
.
FOUR_STRING
);
this
.
getOneAppGetModuleDetailByShenBao
(
task
,
file
,
sheetName
);
}
}
// 实缴3张表之3:单位缴费明细查询
List
<
SocialSoldierPaymentSelectThreeVo
>
shenBaoThreelist
=
baseMapper
.
getSoldierPaymentSelectThreeList
();
log
.
info
(
"实缴3张表之3:单位缴费明细查询list="
+
shenBaoThreelist
);
sheetName
=
"单位缴费明细查询"
;
if
(
shenBaoThreelist
!=
null
&&
!
shenBaoThreelist
.
isEmpty
())
{
MultipartFile
file
=
this
.
getFile
(
shenBaoThreelist
,
SocialSoldierPaymentSelectThreeVo
.
class
,
sheetName
);
if
(
Common
.
isNotNull
(
file
))
{
TSocialSoldierShenBaoTask
task
=
new
TSocialSoldierShenBaoTask
();
// 1申报;2调整;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询
task
.
setType
(
CommonConstants
.
FIVE_STRING
);
this
.
getOneAppGetModuleDetailByShenBao
(
task
,
file
,
sheetName
);
}
}
// 实缴3张表之3-2:单位缴费明细下载
List
<
SocialSoldierPaymentSelectThreeVo
>
shenBaoFourlist
=
baseMapper
.
getSoldierPaymentSelectThreeList
();
log
.
info
(
"实缴3张表之3-2:单位缴费明细下载list="
+
shenBaoFourlist
);
sheetName
=
"单位缴费明细下载"
;
if
(
shenBaoFourlist
!=
null
&&
!
shenBaoFourlist
.
isEmpty
())
{
MultipartFile
file
=
this
.
getFile
(
shenBaoFourlist
,
SocialSoldierPaymentSelectThreeVo
.
class
,
sheetName
);
if
(
Common
.
isNotNull
(
file
))
{
TSocialSoldierShenBaoTask
task
=
new
TSocialSoldierShenBaoTask
();
// 1申报;2调整;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询;6:实缴3单位缴费明细下载
task
.
setType
(
CommonConstants
.
SIX_STRING
);
this
.
getOneAppGetModuleDetailByShenBao
(
task
,
file
,
sheetName
);
}
}
if
(
shenBaolist
==
null
&&
shenBaoTwolist
==
null
&&
shenBaoThreelist
==
null
&&
shenBaoFourlist
==
null
)
{
return
R
.
failed
(
"无数据,推送结束!"
);
}
return
R
.
ok
(
"推送成功!!"
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialSoldierServiceImpl.java
View file @
d48c5333
...
...
@@ -20,14 +20,11 @@ import cn.hutool.core.util.CharsetUtil;
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.constant.SecurityConstants
;
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.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.social.config.SocialConfig
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAuditInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.*
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TSocialSoldierReturnAuditErrorVo
;
...
...
@@ -49,13 +46,14 @@ import org.springframework.stereotype.Service;
import
org.springframework.web.client.RestTemplate
;
import
java.io.*
;
import
java.math.BigDecimal
;
import
java.net.HttpURLConnection
;
import
java.net.URL
;
import
java.net.URLEncoder
;
import
java.text.DecimalFormat
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipInputStream
;
import
java.util.zip.*
;
/**
* 社保士兵
...
...
@@ -74,7 +72,872 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
private
final
TSocialInfoService
tSocialInfoService
;
private
final
FailReasonConfigService
failReasonConfigService
;
private
final
TAuditInfoService
tAuditInfoService
;
private
final
TSocialSoldierShenBaoTaskService
tSocialSoldierShenBaoTaskService
;
private
final
TAutoPaymentInfoService
tAutoPaymentInfoService
;
private
final
TAutoPaymentDetailService
tAutoPaymentDetailService
;
private
final
OSSUtil
ossUtil
;
/**
* @Description: 6每月6号定时任务获取社保士兵实缴3张表
* @Author: hgw
* @Date: 2024-5-30 18:01:11
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public
R
<
String
>
doInnerGetPaymentThree
()
{
// 3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询
String
addIdOne
=
tSocialSoldierShenBaoTaskService
.
getSoldierTaskAddIdByType
(
CommonConstants
.
THREE_STRING
);
String
addIdOTwo
=
tSocialSoldierShenBaoTaskService
.
getSoldierTaskAddIdByType
(
CommonConstants
.
FOUR_STRING
);
String
addIdThree
=
tSocialSoldierShenBaoTaskService
.
getSoldierTaskAddIdByType
(
CommonConstants
.
FIVE_STRING
);
String
addIdSix
=
tSocialSoldierShenBaoTaskService
.
getSoldierTaskAddIdByType
(
CommonConstants
.
SIX_STRING
);
HttpURLConnection
conn
;
InputStream
inRiChang
=
null
;
InputStream
inRenYuan
=
null
;
InputStream
inDanWei
=
null
;
InputStream
inDanWeiXiaZai
=
null
;
// 1日常申报导出;2人员缴费明细打印;3单位缴费明细查询
R
<
String
>
resultFile
=
socialConfig
.
getFiveJob
(
restTemplate
,
addIdOne
,
"resultAnnex"
);
R
<
String
>
resultFileTwo
=
socialConfig
.
getFiveJob
(
restTemplate
,
addIdOTwo
,
"resultAnnex"
);
R
<
String
>
resultFileThree
=
socialConfig
.
getFiveJob
(
restTemplate
,
addIdThree
,
"resultAnnex"
);
R
<
String
>
resultFileFour
=
socialConfig
.
getFiveJob
(
restTemplate
,
addIdSix
,
"resultAnnex"
);
if
(
Common
.
isNotNull
(
resultFile
)
||
Common
.
isNotNull
(
resultFileTwo
)
||
Common
.
isNotNull
(
resultFileThree
)
||
Common
.
isNotNull
(
resultFileFour
))
{
ZipOutputStream
zipOut
=
null
;
try
{
// 1查询主表
TAutoPaymentInfo
mainAuto
=
tAutoPaymentInfoService
.
getThisMonthMainAuto
();
if
(
mainAuto
==
null
||
Common
.
isEmpty
(
mainAuto
.
getId
()))
{
mainAuto
=
new
TAutoPaymentInfo
();
mainAuto
.
setCreateBy
(
CommonConstants
.
ONE_STRING
);
mainAuto
.
setCreateName
(
"定时任务生成"
);
mainAuto
.
setCreateTime
(
LocalDateTime
.
now
());
mainAuto
.
setSystemReviewFlag
(
CommonConstants
.
ZERO_STRING
);
mainAuto
.
setRepeatReviewFlag
(
CommonConstants
.
ZERO_STRING
);
mainAuto
.
setCreateMonth
(
DateUtil
.
getThisMonth
());
mainAuto
.
setDataOneFlag
(
CommonConstants
.
ZERO_STRING
);
mainAuto
.
setDataTwoFlag
(
CommonConstants
.
ZERO_STRING
);
mainAuto
.
setDataThreeFlag
(
CommonConstants
.
ZERO_STRING
);
tAutoPaymentInfoService
.
save
(
mainAuto
);
}
else
{
mainAuto
.
setSystemReviewFlag
(
CommonConstants
.
ZERO_STRING
);
mainAuto
.
setRepeatReviewFlag
(
CommonConstants
.
ZERO_STRING
);
mainAuto
.
setDataOneFlag
(
CommonConstants
.
ZERO_STRING
);
mainAuto
.
setDataTwoFlag
(
CommonConstants
.
ZERO_STRING
);
mainAuto
.
setDataThreeFlag
(
CommonConstants
.
ZERO_STRING
);
mainAuto
.
setDataOneRemark
(
CommonConstants
.
CENTER_SPLIT_LINE_STRING
);
mainAuto
.
setDataTwoFlag
(
CommonConstants
.
CENTER_SPLIT_LINE_STRING
);
mainAuto
.
setDataThreeFlag
(
CommonConstants
.
CENTER_SPLIT_LINE_STRING
);
tAutoPaymentInfoService
.
updateById
(
mainAuto
);
// 清空明细表
tAutoPaymentDetailService
.
deleteByParentId
(
mainAuto
.
getId
());
}
List
<
TAutoPaymentDetail
>
detailListOne
=
null
;
List
<
TAutoPaymentDetail
>
detailListTwo
=
null
;
List
<
TAutoPaymentDetail
>
detailListThree
=
null
;
List
<
TAutoPaymentDetail
>
detailListFour
=
null
;
URL
url
;
String
fileTeturnUrl
;
// 组装原表下载文件:
String
filePath
=
"autoPayment"
;
String
key
=
filePath
+
"/riChang_"
+
System
.
currentTimeMillis
()
+
".zip"
;
File
zipFile
=
File
.
createTempFile
(
filePath
,
".zip"
);
FileOutputStream
fos
=
new
FileOutputStream
(
zipFile
);
CheckedOutputStream
csum
=
new
CheckedOutputStream
(
fos
,
new
Adler32
());
zipOut
=
new
ZipOutputStream
(
csum
);
ZipEntry
entry
;
byte
[]
bytes
;
int
len
;
// 解决中文文件名的乱码问题
if
(
Common
.
isNotNull
(
resultFile
))
{
fileTeturnUrl
=
resultFile
.
getData
();
if
(
Common
.
isNotNull
(
fileTeturnUrl
))
{
fileTeturnUrl
=
this
.
getEncodeUrl
(
fileTeturnUrl
);
url
=
new
URL
(
fileTeturnUrl
);
conn
=
(
HttpURLConnection
)
url
.
openConnection
();
//设置超时间为30秒
conn
.
setConnectTimeout
(
30
*
1000
);
inRiChang
=
conn
.
getInputStream
();
// 原表ZIP-1日常申报流
mainAuto
.
setAttaUrlOne
(
fileTeturnUrl
);
/*zipOut.putNextEntry(new ZipEntry("riChangShenBao_file.zip"));
int bytesRead;
while((bytesRead = inRiChang.read())!=-1) {
zipOut.write(bytesRead);
}
zipOut.closeEntry();*/
/*entry = new ZipEntry("riChangShenBao_file.zip");
bytes = new byte[20480000];
if (inRiChang != null) {
zipOut.putNextEntry(entry);
while ((len = inRiChang.read(bytes)) > 0) {
zipOut.write(bytes, 0, len);
}
}*/
// 实际读取文件内容
R
<
List
<
TAutoPaymentDetail
>>
detailROne
=
this
.
readZipByPayment
(
zipOut
,
inRiChang
,
1
,
mainAuto
);
if
(
detailROne
!=
null
&&
CommonConstants
.
SUCCESS
.
equals
(
detailROne
.
getCode
())
&&
detailROne
.
getData
()
!=
null
&&
!
detailROne
.
getData
().
isEmpty
())
{
detailListOne
=
detailROne
.
getData
();
mainAuto
.
setDataOneFlag
(
CommonConstants
.
ONE_STRING
);
}
}
}
if
(
Common
.
isNotNull
(
resultFileTwo
))
{
fileTeturnUrl
=
resultFileTwo
.
getData
();
if
(
Common
.
isNotNull
(
fileTeturnUrl
))
{
fileTeturnUrl
=
this
.
getEncodeUrl
(
fileTeturnUrl
);
url
=
new
URL
(
fileTeturnUrl
);
conn
=
(
HttpURLConnection
)
url
.
openConnection
();
//设置超时间为30秒
conn
.
setConnectTimeout
(
30
*
1000
);
inRenYuan
=
conn
.
getInputStream
();
// 原表ZIP-2人员缴费明细打印;
mainAuto
.
setAttaUrlTwo
(
fileTeturnUrl
);
/*if (inRenYuan != null) {
entry = new ZipEntry("renYuanMingXi_file.zip");
zipOut.putNextEntry(entry);
bytes = new byte[20480000];
while ((len = inRenYuan.read(bytes)) > 0) {
zipOut.write(bytes, 0, len);
}
}*/
// 实际读取文件内容
R
<
List
<
TAutoPaymentDetail
>>
detailRTwo
=
this
.
readZipByPayment
(
zipOut
,
inRenYuan
,
2
,
mainAuto
);
if
(
detailRTwo
!=
null
&&
CommonConstants
.
SUCCESS
.
equals
(
detailRTwo
.
getCode
())
&&
detailRTwo
.
getData
()
!=
null
&&
!
detailRTwo
.
getData
().
isEmpty
())
{
detailListTwo
=
detailRTwo
.
getData
();
mainAuto
.
setDataTwoFlag
(
CommonConstants
.
ONE_STRING
);
}
}
}
if
(
Common
.
isNotNull
(
resultFileThree
))
{
fileTeturnUrl
=
resultFileThree
.
getData
();
if
(
Common
.
isNotNull
(
fileTeturnUrl
))
{
fileTeturnUrl
=
this
.
getEncodeUrl
(
fileTeturnUrl
);
url
=
new
URL
(
fileTeturnUrl
);
conn
=
(
HttpURLConnection
)
url
.
openConnection
();
//设置超时间为30秒
conn
.
setConnectTimeout
(
30
*
1000
);
inDanWei
=
conn
.
getInputStream
();
// 原表ZIP-3单位缴费明细查询
mainAuto
.
setAttaUrlThree
(
fileTeturnUrl
);
/*zipOut.putNextEntry(new ZipEntry("danWeiMingXi_file.zip"));
int bytesRead;
while((bytesRead = inDanWei.read())!=-1) {
zipOut.write(bytesRead);
}
zipOut.closeEntry();*/
/*if (inDanWei != null) {
entry = new ZipEntry("danWeiMingXi_file.zip");
zipOut.putNextEntry(entry);
bytes = new byte[20480000];
while ((len = inDanWei.read(bytes)) > 0) {
zipOut.write(bytes, 0, len);
}
}*/
// 实际读取文件内容
R
<
List
<
TAutoPaymentDetail
>>
detailRThree
=
this
.
readZipByPayment
(
zipOut
,
inDanWei
,
3
,
mainAuto
);
if
(
detailRThree
!=
null
&&
CommonConstants
.
SUCCESS
.
equals
(
detailRThree
.
getCode
())
&&
detailRThree
.
getData
()
!=
null
&&
!
detailRThree
.
getData
().
isEmpty
())
{
detailListThree
=
detailRThree
.
getData
();
mainAuto
.
setDataThreeFlag
(
CommonConstants
.
ONE_STRING
);
}
}
}
if
(
Common
.
isNotNull
(
resultFileFour
))
{
fileTeturnUrl
=
resultFileFour
.
getData
();
if
(
Common
.
isNotNull
(
fileTeturnUrl
))
{
fileTeturnUrl
=
this
.
getEncodeUrl
(
fileTeturnUrl
);
url
=
new
URL
(
fileTeturnUrl
);
conn
=
(
HttpURLConnection
)
url
.
openConnection
();
//设置超时间为30秒
conn
.
setConnectTimeout
(
30
*
1000
);
inDanWeiXiaZai
=
conn
.
getInputStream
();
// 原表ZIP-4单位缴费明细下载
mainAuto
.
setAttaUrlFour
(
fileTeturnUrl
);
/*if (inDanWeiXiaZai != null) {
entry = new ZipEntry("danWeiXiaZai_file.zip");
zipOut.putNextEntry(entry);
bytes = new byte[20480000];
while ((len = inDanWeiXiaZai.read(bytes)) > 0) {
zipOut.write(bytes, 0, len);
}
}*/
// 实际读取文件内容
R
<
List
<
TAutoPaymentDetail
>>
detailRFour
=
this
.
readZipByPayment
(
zipOut
,
inDanWeiXiaZai
,
3
,
mainAuto
);
if
(
detailRFour
!=
null
&&
CommonConstants
.
SUCCESS
.
equals
(
detailRFour
.
getCode
())
&&
detailRFour
.
getData
()
!=
null
&&
!
detailRFour
.
getData
().
isEmpty
())
{
detailListFour
=
detailRFour
.
getData
();
mainAuto
.
setDataThreeFlag
(
CommonConstants
.
ONE_STRING
);
}
}
}
/*ByteArrayOutputStream baos = new ByteArrayOutputStream();
// 将ZipOutputStream的内容写入ByteArrayOutputStream
byte[] buffer = new byte[1024];
int reads;
while((reads = byteArrayInputStream.read(buffer)) != -1){
zipOut.write(buffer, 0, reads);
}
InputStream byteArrayInputStream = new ByteArrayInputStream(buffer);*/
// 上传Zip
/*boolean flag = ossUtil.uploadFileByFile(zipFile, key, null);
// 完成和释放资源
//baos.close();
if (flag) {
mainAuto.setAttaSrc(key);
} else {
return R.failed("failed:上传至存储空间失败");
}*/
tAutoPaymentInfoService
.
updateById
(
mainAuto
);
// 核验
if
(
detailListOne
!=
null
&&
!
detailListOne
.
isEmpty
()
||
detailListTwo
!=
null
&&
!
detailListTwo
.
isEmpty
()
||
detailListThree
!=
null
&&
!
detailListThree
.
isEmpty
()
||
detailListFour
!=
null
&&
!
detailListFour
.
isEmpty
()
)
{
// 核验1:
if
(
detailListOne
!=
null
)
{
for
(
TAutoPaymentDetail
detail
:
detailListOne
)
{
//
//...
}
}
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
finally
{
try
{
if
(
inRiChang
!=
null
)
{
inRiChang
.
close
();
}
if
(
inRenYuan
!=
null
)
{
inRenYuan
.
close
();
}
if
(
inDanWei
!=
null
)
{
inDanWei
.
close
();
}
if
(
inDanWeiXiaZai
!=
null
)
{
inDanWeiXiaZai
.
close
();
}
if
(
zipOut
!=
null
)
{
zipOut
.
closeEntry
();
zipOut
.
close
();
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
return
R
.
ok
();
}
/**
* @param type 1日常申报导出;2人员缴费明细打印;3单位缴费明细查询
* @Description: 读取实缴3张表
* @Author: hgw
* @Date: 2024/6/3 18:17
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentDetail>>
**/
public
R
<
List
<
TAutoPaymentDetail
>>
readZipByPayment
(
ZipOutputStream
zipOut
,
InputStream
inputStream
,
int
type
,
TAutoPaymentInfo
mainAuto
)
{
TAutoPaymentDetail
detail
;
TAutoPaymentDetail
detailPerson
;
List
<
TAutoPaymentDetail
>
voList
=
new
ArrayList
<>();
XSSFWorkbook
sheets
=
null
;
XSSFSheet
sheetAt
=
null
;
XSSFRow
row
=
null
;
HSSFWorkbook
sheets97
=
null
;
HSSFSheet
sheetAt97
=
null
;
HSSFRow
row97
=
null
;
ZipInputStream
zin
=
null
;
BufferedInputStream
bs
=
null
;
// 塞生成月份所用
String
nowMonth
=
DateUtil
.
getThisMonth
();
// 资源类型:1日常申报导出;2人员缴费明细打印;3单位缴费明细查询
String
sourceType
=
String
.
valueOf
(
type
);
try
{
zin
=
new
ZipInputStream
(
inputStream
,
CharsetUtil
.
CHARSET_GBK
);
bs
=
new
BufferedInputStream
(
zin
);
byte
[]
bytes
;
ZipEntry
ze
;
//循环读取压缩包里面的文件
while
((
ze
=
zin
.
getNextEntry
())
!=
null
)
{
String
name
=
ze
.
getName
();
if
((
ze
.
toString
().
endsWith
(
".xls"
)
||
ze
.
toString
().
endsWith
(
".xlsx"
))
&&
Common
.
isNotNull
(
name
)
&&
(
name
.
contains
(
"全部"
)
||
name
.
contains
(
"汇总"
)))
{
/*zipOut.putNextEntry(ze);
byte[] buffer = new byte[(int) ze.getSize()];
int read;
while((read = bs.read(buffer)) != -1){
zipOut.write(buffer, 0, read);
}*/
//读取每个文件的字节,并放进数组
bytes
=
new
byte
[(
int
)
ze
.
getSize
()];
bs
.
read
(
bytes
,
0
,
(
int
)
ze
.
getSize
());
//将文件转成流
InputStream
byteArrayInputStream
=
new
ByteArrayInputStream
(
bytes
);
//ZipEntry ze2 = new ZipEntry("123.xls");
/*zipOut.putNextEntry(ze);
byte[] buffer = new byte[1024];
int reads;
while((reads = byteArrayInputStream.read(buffer)) != -1){
zipOut.write(buffer, 0, reads);
}*/
try
{
sheets
=
new
XSSFWorkbook
(
byteArrayInputStream
);
// sheet
sheetAt
=
sheets
.
getSheetAt
(
0
);
}
catch
(
Exception
e
)
{
sheets97
=
new
HSSFWorkbook
(
byteArrayInputStream
);
// sheet
sheetAt97
=
sheets97
.
getSheetAt
(
0
);
}
// 每个单元格内容
String
cellValue
;
// 错误信息 所在列
Integer
errorInfoNum
=
null
;
// 1、2姓名3人员姓名 所在列
Integer
empNameNum
=
null
;
// 1证件号码2社会保障号码 所在列
Integer
certNumNum
=
null
;
// 1缴费基数2个人缴费基数 所在列
Integer
paymentBaseNum
=
null
;
// 应缴费额 所在列
Integer
payLimitNum
=
null
;
// 单位缴费额 所在列
Integer
unitLimitNum
=
null
;
// 单位利息 所在列
Integer
unitLiXiNum
=
null
;
// 单位滞纳金 所在列
Integer
unitZhiNaJinNum
=
null
;
// 个人缴费额 所在列
Integer
personLimitNum
=
null
;
// 单位利息 所在列
Integer
personLiXiNum
=
null
;
// 单位滞纳金 所在列
Integer
personZhiNaJinNum
=
null
;
// 1险种2参保险种3险种类型 所在列
Integer
insuranceTypeNum
=
null
;
// 单位名称(社保户) 所在列
Integer
socialSecurityAccountNum
=
null
;
// 1费款所属期2缴费年月3起始费款所属期(社保缴纳月份) 所在列
Integer
payMonthNum
=
null
;
// 2生成月份3对应费款所属期
Integer
createMonthNum
=
null
;
// 3缴费总金额
Integer
allMoneyNum
=
null
;
// 3参保身份
Integer
shenFenNum
=
null
;
// 错误信息
String
errorInfo
;
// 姓名
String
empName
;
// 证件号码
String
certNum
;
// 缴费基数
String
paymentBase
;
// 应缴费额
String
payLimit
;
// 单位缴费额
String
unitLimit
;
// 单位利息
String
unitLiXi
;
// 单位滞纳金
String
unitZhiNaJin
;
// 个人缴费额
String
personLimit
;
// 单位利息
String
personLiXi
;
// 单位滞纳金
String
personZhiNaJin
;
// 1险种2参保险种
String
insuranceType
;
// 单位名称(社保户)
String
socialSecurityAccount
;
// 费款所属期(社保缴纳月份)
String
payMonth
;
// 2业务年月(社保生成月份)
String
createMonth
;
// 3缴费总金额
String
allMoney
;
// 3参保身份
String
shenFen
;
// 金额累计使用
BigDecimal
money
;
// 循环每个sheet
if
(
sheetAt
!=
null
&&
Common
.
isNotNull
(
sheetAt
.
getSheetName
()))
{
for
(
int
rowNum
=
0
;
rowNum
<=
sheetAt
.
getLastRowNum
();
rowNum
++)
{
row
=
sheetAt
.
getRow
(
rowNum
);
if
(
row
!=
null
)
{
// 初始化
empName
=
null
;
certNum
=
null
;
paymentBase
=
null
;
payLimit
=
null
;
insuranceType
=
null
;
socialSecurityAccount
=
null
;
payMonth
=
null
;
createMonth
=
null
;
unitLimit
=
null
;
unitLiXi
=
null
;
unitZhiNaJin
=
null
;
personLimit
=
null
;
personLiXi
=
null
;
personZhiNaJin
=
null
;
allMoney
=
null
;
shenFen
=
null
;
money
=
null
;
// 循环当前行的内容
if
(
rowNum
==
0
)
{
for
(
int
cellNum
=
0
;
cellNum
<
row
.
getLastCellNum
();
cellNum
++)
{
cellValue
=
this
.
getCellValue
(
row
,
cellNum
);
if
(
"错误信息"
.
equals
(
cellValue
))
{
errorInfoNum
=
cellNum
;
}
else
if
(
"姓名"
.
equals
(
cellValue
)
||
"人员姓名"
.
equals
(
cellValue
))
{
empNameNum
=
cellNum
;
}
else
if
(
"证件号码"
.
equals
(
cellValue
)
||
"社会保障号码"
.
equals
(
cellValue
))
{
certNumNum
=
cellNum
;
}
else
if
(
"缴费基数"
.
equals
(
cellValue
)
||
"个人缴费基数"
.
equals
(
cellValue
))
{
paymentBaseNum
=
cellNum
;
}
else
if
(
"应缴费额"
.
equals
(
cellValue
))
{
payLimitNum
=
cellNum
;
}
else
if
(
"缴费总金额"
.
equals
(
cellValue
))
{
allMoneyNum
=
cellNum
;
}
else
if
(
"参保身份"
.
equals
(
cellValue
))
{
shenFenNum
=
cellNum
;
}
// 2人员缴费明细打印 独有
else
if
(
"单位缴费额"
.
equals
(
cellValue
)
||
"单位实缴金额"
.
equals
(
cellValue
))
{
unitLimitNum
=
cellNum
;
}
else
if
(
"单位利息"
.
equals
(
cellValue
))
{
unitLiXiNum
=
cellNum
;
}
else
if
(
"单位滞纳金"
.
equals
(
cellValue
))
{
unitZhiNaJinNum
=
cellNum
;
}
else
if
(
"个人缴费额"
.
equals
(
cellValue
)
||
"个人实缴金额"
.
equals
(
cellValue
))
{
personLimitNum
=
cellNum
;
}
else
if
(
"个人利息"
.
equals
(
cellValue
))
{
personLiXiNum
=
cellNum
;
}
else
if
(
"个人滞纳金"
.
equals
(
cellValue
))
{
personZhiNaJinNum
=
cellNum
;
}
else
if
(
"险种"
.
equals
(
cellValue
)
||
"参保险种"
.
equals
(
cellValue
)
||
"险种类型"
.
equals
(
cellValue
))
{
insuranceTypeNum
=
cellNum
;
}
else
if
(
"单位名称"
.
equals
(
cellValue
))
{
socialSecurityAccountNum
=
cellNum
;
}
else
if
(
"费款所属期"
.
equals
(
cellValue
)
||
"缴费年月"
.
equals
(
cellValue
)
||
"起始费款所属期"
.
equals
(
cellValue
))
{
payMonthNum
=
cellNum
;
}
else
if
(
"业务年月"
.
equals
(
cellValue
)
||
"对应费款所属期"
.
equals
(
cellValue
))
{
createMonthNum
=
cellNum
;
}
}
}
else
{
if
(
Common
.
isEmpty
(
errorInfoNum
)
&&
Common
.
isEmpty
(
certNumNum
))
{
return
R
.
failed
(
"未找到对应表头!"
);
}
else
{
if
(
Common
.
isNotNull
(
errorInfoNum
))
{
errorInfo
=
getCellValue
(
row
,
errorInfoNum
);
return
R
.
failed
(
"数据错误:"
+
errorInfo
);
}
else
{
// 参保身份类别为退休和缴费总金额为0,2者有其一则不合并
if
(
Common
.
isNotNull
(
allMoneyNum
))
{
allMoney
=
getCellValue
(
row
,
allMoneyNum
);
if
(
Common
.
isNotNull
(
allMoney
)
&&
BigDecimal
.
ZERO
.
equals
(
new
BigDecimal
(
allMoney
)))
{
continue
;
}
}
if
(
Common
.
isNotNull
(
shenFenNum
))
{
shenFen
=
getCellValue
(
row
,
shenFenNum
);
if
(
Common
.
isNotNull
(
shenFen
)
&&
"退休"
.
equals
(
shenFen
.
trim
()))
{
continue
;
}
}
if
(
Common
.
isNotNull
(
empNameNum
))
{
empName
=
getCellValue
(
row
,
empNameNum
);
}
if
(
Common
.
isNotNull
(
certNumNum
))
{
certNum
=
getCellValue
(
row
,
certNumNum
);
}
if
(
Common
.
isNotNull
(
paymentBaseNum
))
{
paymentBase
=
getCellValue
(
row
,
paymentBaseNum
);
}
if
(
Common
.
isNotNull
(
payLimitNum
))
{
payLimit
=
getCellValue
(
row
,
payLimitNum
);
}
if
(
Common
.
isNotNull
(
unitLimitNum
))
{
unitLimit
=
getCellValue
(
row
,
unitLimitNum
);
}
if
(
Common
.
isNotNull
(
unitLiXiNum
))
{
unitLiXi
=
getCellValue
(
row
,
unitLiXiNum
);
}
if
(
Common
.
isNotNull
(
unitZhiNaJinNum
))
{
unitZhiNaJin
=
getCellValue
(
row
,
unitZhiNaJinNum
);
}
if
(
Common
.
isNotNull
(
personLimitNum
))
{
personLimit
=
getCellValue
(
row
,
personLimitNum
);
}
if
(
Common
.
isNotNull
(
personLiXiNum
))
{
personLiXi
=
getCellValue
(
row
,
personLiXiNum
);
}
if
(
Common
.
isNotNull
(
personZhiNaJinNum
))
{
personZhiNaJin
=
getCellValue
(
row
,
personZhiNaJinNum
);
}
if
(
Common
.
isNotNull
(
insuranceTypeNum
))
{
insuranceType
=
getCellValue
(
row
,
insuranceTypeNum
);
}
if
(
Common
.
isNotNull
(
socialSecurityAccountNum
))
{
socialSecurityAccount
=
getCellValue
(
row
,
socialSecurityAccountNum
);
}
if
(
Common
.
isNotNull
(
payMonthNum
))
{
payMonth
=
getCellValue
(
row
,
payMonthNum
);
if
(
Common
.
isNotNull
(
payMonth
))
{
payMonth
=
payMonth
.
replace
(
"-"
,
""
);
}
}
if
(
Common
.
isNotNull
(
createMonthNum
))
{
createMonth
=
getCellValue
(
row
,
createMonthNum
);
}
detail
=
new
TAutoPaymentDetail
();
detail
.
setParentId
(
mainAuto
.
getId
());
detail
.
setSourceType
(
sourceType
);
detail
.
setEmpName
(
empName
);
detail
.
setCertNum
(
certNum
);
if
(
Common
.
isNotNull
(
paymentBase
))
{
detail
.
setPaymentBase
(
new
BigDecimal
(
paymentBase
));
}
if
(
Common
.
isNotNull
(
payLimit
))
{
detail
.
setPayLimit
(
new
BigDecimal
(
payLimit
));
}
if
(
Common
.
isNotNull
(
unitLimit
))
{
money
=
new
BigDecimal
(
unitLimit
);
if
(
Common
.
isNotNull
(
unitLiXi
))
{
money
=
BigDecimalUtils
.
safeAdd
(
money
,
new
BigDecimal
(
unitLiXi
));
}
if
(
Common
.
isNotNull
(
unitZhiNaJin
))
{
money
=
BigDecimalUtils
.
safeAdd
(
money
,
new
BigDecimal
(
unitZhiNaJin
));
}
detail
.
setPayLimit
(
money
);
}
detail
.
setInsuranceType
(
insuranceType
);
if
(
Common
.
isNotNull
(
unitLimit
))
{
detail
.
setInsuranceType
(
"单位"
+
insuranceType
);
}
detail
.
setSocialSecurityAccount
(
socialSecurityAccount
);
detail
.
setPayMonth
(
payMonth
);
if
(
Common
.
isNotNull
(
createMonth
))
{
detail
.
setCreateMonth
(
createMonth
);
}
else
{
detail
.
setCreateMonth
(
nowMonth
);
}
voList
.
add
(
detail
);
// 个人的拆为第二条
if
(
Common
.
isNotNull
(
personLimit
))
{
money
=
new
BigDecimal
(
personLimit
);
if
(
Common
.
isNotNull
(
personLiXi
))
{
money
=
BigDecimalUtils
.
safeAdd
(
money
,
new
BigDecimal
(
personLiXi
));
}
if
(
Common
.
isNotNull
(
personZhiNaJin
))
{
money
=
BigDecimalUtils
.
safeAdd
(
money
,
new
BigDecimal
(
personZhiNaJin
));
}
detailPerson
=
new
TAutoPaymentDetail
();
detail
.
setParentId
(
mainAuto
.
getId
());
detailPerson
.
setSourceType
(
sourceType
);
detailPerson
.
setPayLimit
(
money
);
detailPerson
.
setEmpName
(
empName
);
detailPerson
.
setCertNum
(
certNum
);
if
(
Common
.
isNotNull
(
paymentBase
))
{
detailPerson
.
setPaymentBase
(
new
BigDecimal
(
paymentBase
));
}
detailPerson
.
setInsuranceType
(
"个人"
+
insuranceType
);
detailPerson
.
setSocialSecurityAccount
(
socialSecurityAccount
);
detailPerson
.
setPayMonth
(
payMonth
);
if
(
Common
.
isNotNull
(
createMonth
))
{
detailPerson
.
setCreateMonth
(
createMonth
);
}
else
{
detailPerson
.
setCreateMonth
(
nowMonth
);
}
voList
.
add
(
detailPerson
);
}
}
}
}
}
}
}
if
(
sheetAt97
!=
null
&&
Common
.
isNotNull
(
sheetAt97
.
getSheetName
()))
{
for
(
int
rowNum
=
0
;
rowNum
<=
sheetAt97
.
getLastRowNum
();
rowNum
++)
{
row97
=
sheetAt97
.
getRow
(
rowNum
);
if
(
row97
!=
null
)
{
// 初始化
empName
=
null
;
certNum
=
null
;
paymentBase
=
null
;
payLimit
=
null
;
insuranceType
=
null
;
socialSecurityAccount
=
null
;
payMonth
=
null
;
createMonth
=
null
;
unitLimit
=
null
;
unitLiXi
=
null
;
unitZhiNaJin
=
null
;
personLimit
=
null
;
personLiXi
=
null
;
personZhiNaJin
=
null
;
allMoney
=
null
;
shenFen
=
null
;
money
=
null
;
// 循环当前行的内容
if
(
rowNum
==
0
)
{
for
(
int
cellNum
=
0
;
cellNum
<
row97
.
getLastCellNum
();
cellNum
++)
{
cellValue
=
this
.
getCellValue
(
row97
,
cellNum
);
if
(
"错误信息"
.
equals
(
cellValue
))
{
errorInfoNum
=
cellNum
;
}
else
if
(
"姓名"
.
equals
(
cellValue
)
||
"人员姓名"
.
equals
(
cellValue
))
{
empNameNum
=
cellNum
;
}
else
if
(
"证件号码"
.
equals
(
cellValue
)
||
"社会保障号码"
.
equals
(
cellValue
))
{
certNumNum
=
cellNum
;
}
else
if
(
"缴费基数"
.
equals
(
cellValue
)
||
"个人缴费基数"
.
equals
(
cellValue
))
{
paymentBaseNum
=
cellNum
;
}
else
if
(
"应缴费额"
.
equals
(
cellValue
))
{
payLimitNum
=
cellNum
;
}
else
if
(
"缴费总金额"
.
equals
(
cellValue
))
{
allMoneyNum
=
cellNum
;
}
else
if
(
"参保身份"
.
equals
(
cellValue
))
{
shenFenNum
=
cellNum
;
}
// 2人员缴费明细打印 独有
else
if
(
"单位缴费额"
.
equals
(
cellValue
)
||
"单位实缴金额"
.
equals
(
cellValue
))
{
unitLimitNum
=
cellNum
;
}
else
if
(
"单位利息"
.
equals
(
cellValue
))
{
unitLiXiNum
=
cellNum
;
}
else
if
(
"单位滞纳金"
.
equals
(
cellValue
))
{
unitZhiNaJinNum
=
cellNum
;
}
else
if
(
"个人缴费额"
.
equals
(
cellValue
)
||
"个人实缴金额"
.
equals
(
cellValue
))
{
personLimitNum
=
cellNum
;
}
else
if
(
"个人利息"
.
equals
(
cellValue
))
{
personLiXiNum
=
cellNum
;
}
else
if
(
"个人滞纳金"
.
equals
(
cellValue
))
{
personZhiNaJinNum
=
cellNum
;
}
else
if
(
"险种"
.
equals
(
cellValue
)
||
"参保险种"
.
equals
(
cellValue
)
||
"险种类型"
.
equals
(
cellValue
))
{
insuranceTypeNum
=
cellNum
;
}
else
if
(
"单位名称"
.
equals
(
cellValue
))
{
socialSecurityAccountNum
=
cellNum
;
}
else
if
(
"费款所属期"
.
equals
(
cellValue
)
||
"缴费年月"
.
equals
(
cellValue
)
||
"起始费款所属期"
.
equals
(
cellValue
))
{
payMonthNum
=
cellNum
;
}
else
if
(
"业务年月"
.
equals
(
cellValue
)
||
"对应费款所属期"
.
equals
(
cellValue
))
{
createMonthNum
=
cellNum
;
}
}
}
else
{
if
(
Common
.
isEmpty
(
errorInfoNum
)
&&
Common
.
isEmpty
(
certNumNum
))
{
return
R
.
failed
(
"未找到对应表头!"
);
}
else
{
if
(
Common
.
isNotNull
(
errorInfoNum
))
{
errorInfo
=
getCellValue
(
row97
,
errorInfoNum
);
return
R
.
failed
(
"数据错误:"
+
errorInfo
);
}
else
{
// 参保身份类别为退休和缴费总金额为0,2者有其一则不合并
if
(
Common
.
isNotNull
(
allMoneyNum
))
{
allMoney
=
getCellValue
(
row97
,
allMoneyNum
);
if
(
Common
.
isNotNull
(
allMoney
)
&&
BigDecimal
.
ZERO
.
equals
(
new
BigDecimal
(
allMoney
)))
{
continue
;
}
}
if
(
Common
.
isNotNull
(
shenFenNum
))
{
shenFen
=
getCellValue
(
row97
,
shenFenNum
);
if
(
Common
.
isNotNull
(
shenFen
)
&&
"退休"
.
equals
(
shenFen
.
trim
()))
{
continue
;
}
}
if
(
Common
.
isNotNull
(
empNameNum
))
{
empName
=
getCellValue
(
row97
,
empNameNum
);
}
if
(
Common
.
isNotNull
(
certNumNum
))
{
certNum
=
getCellValue
(
row97
,
certNumNum
);
}
if
(
Common
.
isNotNull
(
paymentBaseNum
))
{
paymentBase
=
getCellValue
(
row97
,
paymentBaseNum
);
}
if
(
Common
.
isNotNull
(
payLimitNum
))
{
payLimit
=
getCellValue
(
row97
,
payLimitNum
);
}
if
(
Common
.
isNotNull
(
unitLimitNum
))
{
unitLimit
=
getCellValue
(
row97
,
unitLimitNum
);
}
if
(
Common
.
isNotNull
(
unitLiXiNum
))
{
unitLiXi
=
getCellValue
(
row97
,
unitLiXiNum
);
}
if
(
Common
.
isNotNull
(
unitZhiNaJinNum
))
{
unitZhiNaJin
=
getCellValue
(
row97
,
unitZhiNaJinNum
);
}
if
(
Common
.
isNotNull
(
personLimitNum
))
{
personLimit
=
getCellValue
(
row97
,
personLimitNum
);
}
if
(
Common
.
isNotNull
(
personLiXiNum
))
{
personLiXi
=
getCellValue
(
row97
,
personLiXiNum
);
}
if
(
Common
.
isNotNull
(
personZhiNaJinNum
))
{
personZhiNaJin
=
getCellValue
(
row97
,
personZhiNaJinNum
);
}
if
(
Common
.
isNotNull
(
insuranceTypeNum
))
{
insuranceType
=
getCellValue
(
row97
,
insuranceTypeNum
);
}
if
(
Common
.
isNotNull
(
socialSecurityAccountNum
))
{
socialSecurityAccount
=
getCellValue
(
row97
,
socialSecurityAccountNum
);
}
if
(
Common
.
isNotNull
(
payMonthNum
))
{
payMonth
=
getCellValue
(
row97
,
payMonthNum
);
if
(
Common
.
isNotNull
(
payMonth
))
{
payMonth
=
payMonth
.
replace
(
"-"
,
""
);
}
}
if
(
Common
.
isNotNull
(
createMonthNum
))
{
createMonth
=
getCellValue
(
row97
,
createMonthNum
);
}
detail
=
new
TAutoPaymentDetail
();
detail
.
setParentId
(
mainAuto
.
getId
());
detail
.
setSourceType
(
sourceType
);
detail
.
setEmpName
(
empName
);
detail
.
setCertNum
(
certNum
);
if
(
Common
.
isNotNull
(
paymentBase
))
{
detail
.
setPaymentBase
(
new
BigDecimal
(
paymentBase
));
}
if
(
Common
.
isNotNull
(
payLimit
))
{
detail
.
setPayLimit
(
new
BigDecimal
(
payLimit
));
}
if
(
Common
.
isNotNull
(
unitLimit
))
{
money
=
new
BigDecimal
(
unitLimit
);
if
(
Common
.
isNotNull
(
unitLiXi
))
{
money
=
BigDecimalUtils
.
safeAdd
(
money
,
new
BigDecimal
(
unitLiXi
));
}
if
(
Common
.
isNotNull
(
unitZhiNaJin
))
{
money
=
BigDecimalUtils
.
safeAdd
(
money
,
new
BigDecimal
(
unitZhiNaJin
));
}
detail
.
setPayLimit
(
money
);
}
detail
.
setInsuranceType
(
insuranceType
);
if
(
Common
.
isNotNull
(
unitLimit
))
{
detail
.
setInsuranceType
(
"单位"
+
insuranceType
);
}
detail
.
setSocialSecurityAccount
(
socialSecurityAccount
);
detail
.
setPayMonth
(
payMonth
);
if
(
Common
.
isNotNull
(
createMonth
))
{
detail
.
setCreateMonth
(
createMonth
);
}
else
{
detail
.
setCreateMonth
(
nowMonth
);
}
voList
.
add
(
detail
);
// 个人的拆为第二条
if
(
Common
.
isNotNull
(
personLimit
))
{
money
=
new
BigDecimal
(
personLimit
);
if
(
Common
.
isNotNull
(
personLiXi
))
{
money
=
BigDecimalUtils
.
safeAdd
(
money
,
new
BigDecimal
(
personLiXi
));
}
if
(
Common
.
isNotNull
(
personZhiNaJin
))
{
money
=
BigDecimalUtils
.
safeAdd
(
money
,
new
BigDecimal
(
personZhiNaJin
));
}
detailPerson
=
new
TAutoPaymentDetail
();
detailPerson
.
setParentId
(
mainAuto
.
getId
());
detailPerson
.
setSourceType
(
sourceType
);
detailPerson
.
setPayLimit
(
money
);
detailPerson
.
setEmpName
(
empName
);
detailPerson
.
setCertNum
(
certNum
);
if
(
Common
.
isNotNull
(
paymentBase
))
{
detailPerson
.
setPaymentBase
(
new
BigDecimal
(
paymentBase
));
}
detailPerson
.
setInsuranceType
(
"个人"
+
insuranceType
);
detailPerson
.
setSocialSecurityAccount
(
socialSecurityAccount
);
detailPerson
.
setPayMonth
(
payMonth
);
if
(
Common
.
isNotNull
(
createMonth
))
{
detailPerson
.
setCreateMonth
(
createMonth
);
}
else
{
detailPerson
.
setCreateMonth
(
nowMonth
);
}
voList
.
add
(
detailPerson
);
}
}
}
}
}
}
}
}
}
zin
.
closeEntry
();
inputStream
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
if
(
sheets
!=
null
)
{
try
{
sheets
.
close
();
}
catch
(
IOException
ex
)
{
ex
.
printStackTrace
();
}
}
}
finally
{
try
{
if
(
sheets
!=
null
)
{
sheets
.
close
();
}
if
(
zin
!=
null
)
{
zin
.
close
();
}
if
(
bs
!=
null
)
{
bs
.
close
();
}
if
(
inputStream
!=
null
)
{
inputStream
.
close
();
}
}
catch
(
IOException
ex
)
{
ex
.
printStackTrace
();
}
}
if
(
voList
!=
null
&&
!
voList
.
isEmpty
())
{
tAutoPaymentDetailService
.
saveBatch
(
voList
);
}
return
R
.
ok
(
voList
);
}
/**
* @Description: 解码URL
* @Author: hgw
* @Date: 2024/6/3 11:01
* @return: java.lang.String
**/
private
String
getEncodeUrl
(
String
fileTeturnUrl
)
{
String
dowloadUrl
=
fileTeturnUrl
;
int
indexOf
=
fileTeturnUrl
.
lastIndexOf
(
"/"
)
+
1
;
fileTeturnUrl
=
fileTeturnUrl
.
substring
(
indexOf
);
try
{
fileTeturnUrl
=
URLEncoder
.
encode
(
fileTeturnUrl
,
"UTF-8"
);
}
catch
(
UnsupportedEncodingException
e
)
{
log
.
info
(
"编码异常!"
);
}
dowloadUrl
=
dowloadUrl
.
substring
(
0
,
indexOf
)
+
fileTeturnUrl
;
return
dowloadUrl
;
}
/**
* @Description: 6 查看社保士兵审核结果查询的反馈情况
...
...
@@ -119,16 +982,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// 解决中文文件名的乱码问题
String
fileTeturnUrl
=
resultFile
.
getData
();
if
(
Common
.
isNotNull
(
fileTeturnUrl
))
{
String
dowloadUrl
=
fileTeturnUrl
;
int
indexOf
=
fileTeturnUrl
.
lastIndexOf
(
"/"
)
+
1
;
fileTeturnUrl
=
fileTeturnUrl
.
substring
(
indexOf
);
try
{
fileTeturnUrl
=
URLEncoder
.
encode
(
fileTeturnUrl
,
"UTF-8"
);
}
catch
(
UnsupportedEncodingException
e
)
{
log
.
info
(
"编码异常!"
);
}
dowloadUrl
=
dowloadUrl
.
substring
(
0
,
indexOf
)
+
fileTeturnUrl
;
URL
url
=
new
URL
(
dowloadUrl
);
fileTeturnUrl
=
this
.
getEncodeUrl
(
fileTeturnUrl
);
URL
url
=
new
URL
(
fileTeturnUrl
);
conn
=
(
HttpURLConnection
)
url
.
openConnection
();
//设置超时间为30秒
conn
.
setConnectTimeout
(
30
*
1000
);
...
...
@@ -163,12 +1018,12 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
try
{
zin
=
new
ZipInputStream
(
inputStream
,
CharsetUtil
.
CHARSET_GBK
);
bs
=
new
BufferedInputStream
(
zin
);
byte
[]
bytes
=
null
;
byte
[]
bytes
;
ZipEntry
ze
;
//循环读取压缩包里面的文件
while
((
ze
=
zin
.
getNextEntry
())
!=
null
)
{
String
name
=
ze
.
getName
();
if
(
ze
.
toString
().
endsWith
(
".xls"
)
&&
Common
.
isNotNull
(
name
)
&&
name
.
contains
(
"汇总"
))
{
if
(
(
ze
.
toString
().
endsWith
(
".xls"
)
||
ze
.
toString
().
endsWith
(
".xlsx"
)
)
&&
Common
.
isNotNull
(
name
)
&&
name
.
contains
(
"汇总"
))
{
//读取每个文件的字节,并放进数组
bytes
=
new
byte
[(
int
)
ze
.
getSize
()];
bs
.
read
(
bytes
,
0
,
(
int
)
ze
.
getSize
());
...
...
@@ -224,24 +1079,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
if
(
rowNum
==
0
)
{
for
(
int
cellNum
=
0
;
cellNum
<
row
.
getLastCellNum
();
cellNum
++)
{
// 标题行
cell
=
row
.
getCell
(
cellNum
);
cellValue
=
""
;
try
{
if
(
cell
!=
null
)
{
if
(
CellType
.
STRING
==
cell
.
getCellType
())
{
cellValue
=
row
.
getCell
(
cellNum
).
getStringCellValue
();
}
else
if
(
CellType
.
NUMERIC
==
cell
.
getCellType
())
{
cellValue
=
String
.
valueOf
(
row
.
getCell
(
cellNum
).
getNumericCellValue
());
if
(
cellValue
.
contains
(
"E"
))
{
cellValue
=
String
.
valueOf
(
new
DecimalFormat
(
"#"
).
format
(
row
.
getCell
(
cellNum
).
getNumericCellValue
()));
}
}
}
}
catch
(
NumberFormatException
e
)
{
cell
.
setCellType
(
CellType
.
STRING
);
cellValue
=
String
.
valueOf
(
row
.
getCell
(
cellNum
).
getStringCellValue
());
}
cellValue
=
this
.
getCellValue
(
row
,
cellNum
);
if
(
"错误信息"
.
equals
(
cellValue
))
{
errorInfoNum
=
cellNum
;
}
else
if
(
"企业名称"
.
equals
(
cellValue
))
{
...
...
@@ -383,16 +1221,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// 解决中文文件名的乱码问题
String
fileTeturnUrl
=
resultFile
.
getData
();
if
(
Common
.
isNotNull
(
fileTeturnUrl
))
{
String
dowloadUrl
=
fileTeturnUrl
;
int
indexOf
=
fileTeturnUrl
.
lastIndexOf
(
"/"
)
+
1
;
fileTeturnUrl
=
fileTeturnUrl
.
substring
(
indexOf
);
try
{
fileTeturnUrl
=
URLEncoder
.
encode
(
fileTeturnUrl
,
"UTF-8"
);
}
catch
(
UnsupportedEncodingException
e
)
{
log
.
info
(
"编码异常!"
);
}
dowloadUrl
=
dowloadUrl
.
substring
(
0
,
indexOf
)
+
fileTeturnUrl
;
URL
url
=
new
URL
(
dowloadUrl
);
fileTeturnUrl
=
this
.
getEncodeUrl
(
fileTeturnUrl
);
URL
url
=
new
URL
(
fileTeturnUrl
);
conn
=
(
HttpURLConnection
)
url
.
openConnection
();
//设置超时间为30秒
conn
.
setConnectTimeout
(
30
*
1000
);
...
...
@@ -682,16 +1512,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
ygsList
.
add
(
socialInfo
.
getDispatchId
());
handleRemark
=
"社保士兵自动办理成功!"
;
remark
=
handleRemark
;
if
(
Common
.
isNotNull
(
auditRemark
))
{
failConfig
=
getConfig
(
auditRemark
,
errorMap
);
if
(
failConfig
!=
null
)
{
updateSocial
.
setYgsRemark
(
failConfig
.
getSimpleReason
());
}
updateSocial
.
setYgsRemarkOld
(
handleRemark
);
}
else
{
updateSocial
.
setYgsRemark
(
handleRemark
);
updateSocial
.
setYgsRemarkOld
(
auditRemark
);
}
updateSocial
.
setYgsRemark
(
handleRemark
);
updateSocial
.
setYgsRemarkOld
(
auditRemark
);
}
else
if
(
"审核不通过"
.
equals
(
excel
.
getAuditStatus
()))
{
handleRemark
=
"社保士兵审核不通过转人工处理!"
;
remark
=
auditRemark
;
...
...
@@ -710,15 +1532,6 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
}
else
{
updateSocial
.
setYgsRemark
(
auditRemark
);
updateSocial
.
setYgsRemarkOld
(
auditRemark
);
/*// 过期自动变为终止
if (CommonConstants.ONE_STRING.equals(socialInfo.getYgsOverDueFlag())) {
handleRemark = "已过期,自动中止办理!";
updateSocial.setYgsRemarkOld(handleRemark);
ygsHandleStatus = CommonConstants.FOUR_STRING;
ygsFailList = new ArrayList<>();
ygsFailList.add(socialInfo.getDispatchId());
remark = handleRemark;
} else if (Common.isNotNull(auditRemark)) {*/
handleRemark
=
"社保士兵审核结果:"
+
excel
.
getAuditStatus
();
remark
=
auditRemark
;
handleRemark
+=
remark
;
...
...
@@ -751,16 +1564,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
ysdList
.
add
(
socialInfo
.
getDispatchId
());
handleRemark
=
"社保士兵自动办理成功!"
;
remark
=
handleRemark
;
if
(
Common
.
isNotNull
(
auditRemark
))
{
failConfig
=
getConfig
(
auditRemark
,
errorMap
);
if
(
failConfig
!=
null
)
{
updateSocial
.
setYsdRemark
(
failConfig
.
getSimpleReason
());
}
updateSocial
.
setYsdRemarkOld
(
handleRemark
);
}
else
{
updateSocial
.
setYsdRemark
(
handleRemark
);
updateSocial
.
setYsdRemarkOld
(
auditRemark
);
}
updateSocial
.
setYsdRemark
(
handleRemark
);
updateSocial
.
setYsdRemarkOld
(
auditRemark
);
}
else
if
(
"审核不通过"
.
equals
(
excel
.
getAuditStatus
()))
{
handleRemark
=
"社保士兵审核不通过转人工处理!"
;
remark
=
auditRemark
;
...
...
@@ -778,15 +1583,6 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
this
.
doSocialTAuditInfo
(
socialInfo
,
title
,
title
,
title
,
user
);
}
else
{
updateSocial
.
setYsdRemark
(
auditRemark
);
// 过期自动变为终止——这块加查询sql影响性能,且暂时没有这要求 hgw 2024-5-27 15:54:24
/*if (CommonConstants.ONE_STRING.equals(socialInfo.getYsdOverDueFlag())) {
handleRemark = "已过期,自动中止办理!";
updateSocial.setYsdRemarkOld(handleRemark);
ysdHandleStatus = CommonConstants.FOUR_STRING;
ysdFailList = new ArrayList<>();
ysdFailList.add(socialInfo.getDispatchId());
remark = handleRemark;
} else if (Common.isNotNull(auditRemark)) {*/
handleRemark
=
"社保士兵审核结果:"
+
excel
.
getAuditStatus
();
remark
=
auditRemark
;
handleRemark
+=
remark
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialSoldierShenBaoTaskServiceImpl.java
View file @
d48c5333
...
...
@@ -44,5 +44,13 @@ public class TSocialSoldierShenBaoTaskServiceImpl extends ServiceImpl<TSocialSol
public
List
<
TSocialSoldierShenBaoTask
>
getTSocialSoldierShenBaoTaskList
(
TSocialSoldierShenBaoTask
tSocialSoldierShenBaoTask
)
{
return
baseMapper
.
getTSocialSoldierShenBaoTaskList
(
tSocialSoldierShenBaoTask
);
}
/**
* 获取任务id
* @return
*/
@Override
public
String
getSoldierTaskAddIdByType
(
String
type
)
{
return
baseMapper
.
getSoldierTaskAddIdByType
(
type
);
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/TAutoPaymentDetailMapper.xml
View file @
d48c5333
...
...
@@ -146,4 +146,9 @@
<include
refid=
"tAutoPaymentDetail_where"
/>
</where>
</select>
<delete
id=
"deleteByParentId"
>
delete from t_auto_payment_detail where PARENT_ID = #{parentId}
</delete>
</mapper>
yifu-social/yifu-social-biz/src/main/resources/mapper/TAutoPaymentInfoMapper.xml
View file @
d48c5333
...
...
@@ -25,7 +25,13 @@
<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=
"createMonth"
column=
"CREATE_MONTH"
/>
<result
property=
"dataOneFlag"
column=
"DATA_ONE_FLAG"
/>
<result
property=
"dataTwoFlag"
column=
"DATA_TWO_FLAG"
/>
<result
property=
"dataThreeFlag"
column=
"DATA_THREE_FLAG"
/>
<result
property=
"dataOneRemark"
column=
"DATA_ONE_REMARK"
/>
<result
property=
"dataTwoRemark"
column=
"DATA_TWO_REMARK"
/>
<result
property=
"dataThreeRemark"
column=
"DATA_THREE_REMARK"
/>
<result
property=
"systemReviewFlag"
column=
"SYSTEM_REVIEW_FLAG"
/>
<result
property=
"repeatReviewFlag"
column=
"REPEAT_REVIEW_FLAG"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
...
...
@@ -33,25 +39,52 @@
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"attaSrc"
column=
"ATTA_SRC"
/>
<result
property=
"attaUrl"
column=
"ATTA_URL"
/>
<result
property=
"attaUrlOne"
column=
"ATTA_URL_ONE"
/>
<result
property=
"attaUrlTwo"
column=
"ATTA_URL_TWO"
/>
<result
property=
"attaUrlThree"
column=
"ATTA_URL_THREE"
/>
<result
property=
"attaUrlFour"
column=
"ATTA_URL_FOUR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.DATA_INTEGRATION_FLAG,
a.CREATE_MONTH,
a.DATA_ONE_FLAG,
a.DATA_TWO_FLAG,
a.DATA_THREE_FLAG,
a.DATA_ONE_REMARK,
a.DATA_TWO_REMARK,
a.DATA_THREE_REMARK,
a.SYSTEM_REVIEW_FLAG,
a.REPEAT_REVIEW_FLAG,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
a.UPDATE_TIME,
a.ATTA_SRC,
a.ATTA_URL,
a.ATTA_URL_ONE,
a.ATTA_URL_TWO,
a.ATTA_URL_THREE,
a.ATTA_URL_FOUR
</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
test=
"tAutoPaymentInfo.createMonth != null and tAutoPaymentInfo.createMonth.trim() != ''"
>
AND a.CREATE_MONTH = #{tAutoPaymentInfo.createMonth}
</if>
<if
test=
"tAutoPaymentInfo.dataOneFlag != null and tAutoPaymentInfo.dataOneFlag.trim() != ''"
>
AND a.DATA_ONE_FLAG = #{tAutoPaymentInfo.dataOneFlag}
</if>
<if
test=
"tAutoPaymentInfo.dataTwoFlag != null and tAutoPaymentInfo.dataTwoFlag.trim() != ''"
>
AND a.DATA_TWO_FLAG = #{tAutoPaymentInfo.dataTwoFlag}
</if>
<if
test=
"tAutoPaymentInfo.dataThreeFlag != null and tAutoPaymentInfo.dataThreeFlag.trim() != ''"
>
AND a.DATA_THREE_FLAG = #{tAutoPaymentInfo.dataThreeFlag}
</if>
<if
test=
"tAutoPaymentInfo.systemReviewFlag != null and tAutoPaymentInfo.systemReviewFlag.trim() != ''"
>
AND a.SYSTEM_REVIEW_FLAG = #{tAutoPaymentInfo.systemReviewFlag}
...
...
@@ -98,4 +131,11 @@
<include
refid=
"tAutoPaymentInfo_where"
/>
</where>
</select>
<!--获取当前月的主表-->
<select
id=
"getThisMonthMainAuto"
resultMap=
"tAutoPaymentInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_auto_payment_info a
where a.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
</select>
</mapper>
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialSoldierMapper.xml
View file @
d48c5333
...
...
@@ -171,7 +171,7 @@
</select>
<!-- 社保士兵养工失
神恶化
结果查询的模板-->
<!-- 社保士兵养工失
审核
结果查询的模板-->
<select
id=
"getSocialSoldierYgsAuditVoList"
resultType=
"com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAuditVo"
>
SELECT
s.id as socialId,
...
...
@@ -246,7 +246,7 @@
from t_social_info s
left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '
0
' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m')
<![CDATA[ < ]]>
DATE_FORMAT(now(),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '
1
' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m')
<![CDATA[ < ]]>
DATE_FORMAT(now(),'%Y%m')
) a GROUP BY a.empIdCard
</select>
<!-- 工资调整 -->
...
...
@@ -275,9 +275,37 @@
from t_social_info s
left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '
0
'
and s.HANDLE_STATUS = '3' and d.type = '
1
'
and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m')
<![CDATA[ < ]]>
DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 YEAR),'%Y12')
) a GROUP BY a.empIdCard
</select>
<!-- 社保士兵实缴3张表查询1_合肥-社保费管理客户端-日常申报导出 -->
<select
id=
"getSoldierPaymentSelectOneList"
resultType=
"com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierPaymentSelectOneVo"
>
select
'' companyNo ,s.NAME companyName,'' isPrint,'' createMonth,'是' isDownLoad,'' danDuoSheet
,'' danDanSheet,'' duoDanSheet,'' startDate,'' endDate,'' isSalary,'' returnInfo
from sys_house_hold_info s
where s.DEL_FLAG='0' and s.TYPE = '0' and s.AUTO_STATUS = '0'
</select>
<!-- 社保士兵实缴3张表查询2_合肥-社保-人员缴费明细打印 -->
<select
id=
"getSoldierPaymentSelectTwoList"
resultType=
"com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierPaymentSelectTwoVo"
>
select
s.NAME companyName,'' paymentType,'' payMonth,'' returnInfo,'' returnInfoOne,'' returnInfoTwo
from sys_house_hold_info s
where s.DEL_FLAG='0' and s.TYPE = '0' and s.AUTO_STATUS = '0'
</select>
<!-- 社保士兵实缴3张表查询3_合肥-医保-单位缴费明细查询 -->
<select
id=
"getSoldierPaymentSelectThreeList"
resultType=
"com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierPaymentSelectThreeVo"
>
select
s.NAME companyName
,'' createMonth
,'' paymentType
,'' returnInfo
,'' returnInfoOne
,'' returnInfoTwo
from sys_house_hold_info s
where s.DEL_FLAG='0' and s.TYPE = '0' and s.AUTO_STATUS = '0'
</select>
</mapper>
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialSoldierShenBaoTaskMapper.xml
View file @
d48c5333
...
...
@@ -81,4 +81,12 @@
<include
refid=
"tSocialSoldierShenBaoTask_where"
/>
</where>
</select>
<!--获取任务id-->
<select
id=
"getSoldierTaskAddIdByType"
resultType=
"java.lang.String"
>
SELECT
a.ADD_ID
FROM t_social_soldier_shen_bao_task a
where a.TYPE = #{type} and a.DATA_STATUS = '0'
ORDER BY a.CREATE_TIME desc limit 1
</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