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
9fb3109c
Commit
9fb3109c
authored
May 30, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.4' into MVP1.5.4
parents
2def2dea
10ff5f86
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
2081 additions
and
260 deletions
+2081
-260
ArchivesConstants.java
...ud/plus/v1/yifu/archives/constants/ArchivesConstants.java
+13
-0
TEmployeeRetirement.java
...oud/plus/v1/yifu/archives/entity/TEmployeeRetirement.java
+193
-0
TEmployeeRetirementFlagDetail.java
...1/yifu/archives/entity/TEmployeeRetirementFlagDetail.java
+61
-0
ChangeHandleFlagAllVo.java
...cloud/plus/v1/yifu/archives/vo/ChangeHandleFlagAllVo.java
+23
-0
ChangeHandleFlagVo.java
...fu/cloud/plus/v1/yifu/archives/vo/ChangeHandleFlagVo.java
+22
-0
TEmployeeRetirementExportVo.java
...plus/v1/yifu/archives/vo/TEmployeeRetirementExportVo.java
+188
-0
TEmployeeRetirementSearchVo.java
...plus/v1/yifu/archives/vo/TEmployeeRetirementSearchVo.java
+42
-0
ArchivesApplication.java
...yifu/cloud/plus/v1/yifu/archives/ArchivesApplication.java
+2
-0
TEmployeeRetirementController.java
...fu/archives/controller/TEmployeeRetirementController.java
+106
-0
TEmployeeRetirementFlagDetailMapper.java
.../archives/mapper/TEmployeeRetirementFlagDetailMapper.java
+23
-0
TEmployeeRetirementMapper.java
...us/v1/yifu/archives/mapper/TEmployeeRetirementMapper.java
+46
-0
TEmployeeRetirementFlagDetailService.java
...rchives/service/TEmployeeRetirementFlagDetailService.java
+15
-0
TEmployeeRetirementService.java
.../v1/yifu/archives/service/TEmployeeRetirementService.java
+78
-0
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+29
-16
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+179
-81
TEmployeeRetirementFlagDetailServiceImpl.java
...ervice/impl/TEmployeeRetirementFlagDetailServiceImpl.java
+19
-0
TEmployeeRetirementServiceImpl.java
...archives/service/impl/TEmployeeRetirementServiceImpl.java
+226
-0
TEmployeeRetirementFlagDetailMapper.xml
.../resources/mapper/TEmployeeRetirementFlagDetailMapper.xml
+29
-0
TEmployeeRetirementMapper.xml
...z/src/main/resources/mapper/TEmployeeRetirementMapper.xml
+265
-0
ExcelAttributeConstants.java
...v1/yifu/common/core/constant/ExcelAttributeConstants.java
+6
-1
ErrorCodes.java
.../cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java
+4
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+2
-1
ArchiveTask.java
.../java/com/yifu/cloud/plus/v1/job/compont/ArchiveTask.java
+8
-0
TMinSalaryImportVo.java
...yifu/cloud/plus/v1/yifu/salary/vo/TMinSalaryImportVo.java
+8
-5
TMinSalaryMapper.java
...fu/cloud/plus/v1/yifu/salary/mapper/TMinSalaryMapper.java
+6
-2
TMinSalaryService.java
.../cloud/plus/v1/yifu/salary/service/TMinSalaryService.java
+7
-0
TMinSalaryServiceImpl.java
...us/v1/yifu/salary/service/impl/TMinSalaryServiceImpl.java
+314
-88
TMinSalaryMapper.xml
...salary-biz/src/main/resources/mapper/TMinSalaryMapper.xml
+23
-1
FundImportHandleVo.java
...yifu/cloud/plus/v1/yifu/social/vo/FundImportHandleVo.java
+3
-10
SocialHandleSearchVo.java
...fu/cloud/plus/v1/yifu/social/vo/SocialHandleSearchVo.java
+8
-0
SocialImportHandleVo.java
...fu/cloud/plus/v1/yifu/social/vo/SocialImportHandleVo.java
+3
-2
TDispatchInfoController.java
...us/v1/yifu/social/controller/TDispatchInfoController.java
+13
-4
TForecastLibraryMapper.java
...ud/plus/v1/yifu/social/mapper/TForecastLibraryMapper.java
+3
-0
TDispatchInfoService.java
...oud/plus/v1/yifu/social/service/TDispatchInfoService.java
+2
-2
TForecastLibraryService.java
.../plus/v1/yifu/social/service/TForecastLibraryService.java
+4
-4
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+78
-29
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+24
-14
TForecastLibraryMapper.xml
...-biz/src/main/resources/mapper/TForecastLibraryMapper.xml
+6
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/constants/ArchivesConstants.java
View file @
9fb3109c
...
...
@@ -20,6 +20,7 @@ public class ArchivesConstants {
*/
public
static
final
String
PROJECT_CONTENT
=
"复项"
;
/**
* 复档复项
*/
...
...
@@ -136,4 +137,16 @@ public class ArchivesConstants {
*/
public
static
final
String
CONTRACT_AUDIT_REMARK_TOO_LONG
=
"审核说明不可超过200字!"
;
/**
* 处理状态
*/
public
static
final
String
HANDLE_FLAG_ONE
=
"未处理-已处理"
;
/**
* 处理状态
*/
public
static
final
String
HANDLE_FLAG_TWO
=
"已处理-未处理"
;
public
static
final
int
MYEAR_MONTH
=-
717
;
public
static
final
int
WYEAR_MONTH
=-
597
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeRetirement.java
0 → 100644
View file @
9fb3109c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
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.TableField
;
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
java.io.Serializable
;
/**
* @author wzb
* @description 人员退休提醒
* @date 2023-05-18 15:11:11
*/
@Data
@TableName
(
"t_employee_retirement"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"项目档案表"
)
public
class
TEmployeeRetirement
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 员工姓名
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"员工姓名"
)
@ExcelAttribute
(
name
=
"员工姓名"
)
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 身份证号码
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"身份证号码"
)
@ExcelAttribute
(
name
=
"身份证号码"
)
@Schema
(
description
=
"身份证号码"
)
private
String
empIdcard
;
/**
* 手机号码
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"手机号码"
)
@ExcelAttribute
(
name
=
"手机号码"
)
@Schema
(
description
=
"手机号码"
)
private
String
empPhone
;
/**
* 性别
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"性别"
)
@ExcelAttribute
(
name
=
"性别"
)
@Schema
(
description
=
"性别"
)
private
String
empSex
;
/**
* 年龄
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"年龄"
)
@ExcelAttribute
(
name
=
"年龄"
)
@Schema
(
description
=
"年龄"
)
private
Integer
empAge
;
/**
* 员工类型(字典值,0外包1派遣2代理)
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"员工类型"
)
@ExcelAttribute
(
name
=
"员工类型"
)
@Schema
(
description
=
"员工类型"
)
private
String
empNatrue
;
/**
* 档案-省
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"省"
)
@ExcelAttribute
(
name
=
"省"
)
@Schema
(
description
=
"档案-省"
)
private
Integer
fileProvince
;
/**
* 档案-市
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"市"
)
@ExcelAttribute
(
name
=
"市"
)
@Schema
(
description
=
"档案-市"
)
private
Integer
fileCity
;
/**
* 档案-县
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"县"
)
@ExcelAttribute
(
name
=
"县"
)
@Schema
(
description
=
"档案-县"
)
private
Integer
fileTown
;
/**
* 社保-省
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保-省"
)
@ExcelAttribute
(
name
=
"社保-省"
)
@Schema
(
description
=
"社保-省"
)
private
Integer
socialProvince
;
/**
* 社保-市
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保-市"
)
@ExcelAttribute
(
name
=
"社保-市"
)
@Schema
(
description
=
"社保-市"
)
private
Integer
socialCity
;
/**
* 社保-县
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保-县"
)
@ExcelAttribute
(
name
=
"社保-县"
)
@Schema
(
description
=
"社保-县"
)
private
Integer
socialTown
;
/**
* 项目名称
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"项目名称"
)
@ExcelAttribute
(
name
=
"项目名称"
)
@Schema
(
description
=
"项目名称"
)
private
String
deptName
;
/**
* 客户名称
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"客户名称"
)
@ExcelAttribute
(
name
=
"客户名称"
)
@Schema
(
description
=
"客户名称"
)
private
String
unitName
;
/**
* 客户编码
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"客户编码"
)
@ExcelAttribute
(
name
=
"客户编码"
)
@Schema
(
description
=
"客户编码"
)
private
String
unitNo
;
/**
* 项目编码
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"客户编码"
)
@ExcelAttribute
(
name
=
"客户编码"
)
@Schema
(
description
=
"客户编码"
)
private
String
deptNo
;
/**
* 是否处理(0未处理,1处理)
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否处理"
)
@ExcelAttribute
(
name
=
"是否处理"
)
@Schema
(
description
=
"是否处理"
)
private
Integer
handleFlag
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeRetirementFlagDetail.java
0 → 100644
View file @
9fb3109c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
*
* @TableName t_employee_retirement_flag_detail
*/
@Data
@TableName
(
"t_employee_retirement_Flag_detail"
)
@Schema
(
description
=
"项目档案表"
)
public
class
TEmployeeRetirementFlagDetail
implements
Serializable
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
id
;
private
String
datailId
;
/**
* 创建人id
*/
private
String
createBy
;
/**
* 创建人姓名
*/
private
String
createName
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新人id
*/
private
String
updateBy
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 操作内容
*/
private
String
context
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/ChangeHandleFlagAllVo.java
0 → 100644
View file @
9fb3109c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
lombok.Data
;
/**
* @author wzb
* @description 批量修改处理状态类
* @date 2023-05-19 16:30:29
*/
@Data
public
class
ChangeHandleFlagAllVo
{
/**
* id集合
*/
private
String
[]
ids
;
/**
* 处理状态
*/
private
Integer
handleFlag
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/ChangeHandleFlagVo.java
0 → 100644
View file @
9fb3109c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
lombok.Data
;
/**
* @author wzb
* @description 修改处理状态类
* @date 2023-05-22 17:09:54
*/
@Data
public
class
ChangeHandleFlagVo
{
/**
* id
*/
private
String
id
;
/**
* 处理状态
*/
private
Integer
handleFlag
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TEmployeeRetirementExportVo.java
0 → 100644
View file @
9fb3109c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelIgnoreUnannotated
;
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.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirement
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirementFlagDetail
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.Set
;
/**
* @author wzb
* @description TODO
* @date 2023-05-22 17:44:35
*/
@Data
@ExcelIgnoreUnannotated
public
class
TEmployeeRetirementExportVo
{
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 员工姓名
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"员工姓名"
)
@ExcelAttribute
(
name
=
"员工姓名"
)
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 身份证号码
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"身份证号码"
)
@ExcelAttribute
(
name
=
"身份证号码"
)
@Schema
(
description
=
"身份证号码"
)
private
String
empIdcard
;
/**
* 手机号码
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"手机号码"
)
@ExcelAttribute
(
name
=
"手机号码"
)
@Schema
(
description
=
"手机号码"
)
private
String
empPhone
;
/**
* 性别
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"性别"
)
@ExcelAttribute
(
name
=
"性别"
,
readConverterExp
=
"1=男,2=女"
)
@Schema
(
description
=
"性别"
)
private
String
empSex
;
/**
* 年龄
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"年龄"
)
@ExcelAttribute
(
name
=
"年龄"
)
@Schema
(
description
=
"年龄"
)
private
Integer
empAge
;
/**
* 员工类型(字典值,0外包1派遣2代理)
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"员工类型"
)
@ExcelAttribute
(
name
=
"员工类型"
,
readConverterExp
=
"0=外包,1=派遣,2=代理"
)
@Schema
(
description
=
"员工类型"
)
private
String
empNatrue
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"档案"
)
@ExcelAttribute
(
name
=
"档案"
)
@Schema
(
description
=
"档案"
)
private
String
fileAddress
;
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保"
)
@ExcelAttribute
(
name
=
"社保"
)
@Schema
(
description
=
"社保"
)
private
String
socialAddress
;
/**
* 档案-省
*/
@Schema
(
description
=
"档案-省"
)
private
Integer
fileProvince
;
/**
* 档案-市
*/
@JsonIgnore
@Schema
(
description
=
"档案-市"
)
private
Integer
fileCity
;
/**
* 档案-县
*/
@Schema
(
description
=
"档案-县"
)
private
Integer
fileTown
;
/**
* 社保-省
*/
@Schema
(
description
=
"社保-省"
)
private
Integer
socialProvince
;
/**
* 社保-市
*/
@Schema
(
description
=
"社保-市"
)
private
Integer
socialCity
;
/**
* 社保-县
*/
@Schema
(
description
=
"社保-县"
)
private
Integer
socialTown
;
/**
* 项目名称
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"项目名称"
)
@ExcelAttribute
(
name
=
"项目名称"
)
@Schema
(
description
=
"项目名称"
)
private
String
deptName
;
/**
* 客户名称
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"客户名称"
)
@ExcelAttribute
(
name
=
"客户名称"
)
@Schema
(
description
=
"客户名称"
)
private
String
unitName
;
/**
* 客户编码
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"客户编码"
)
@ExcelAttribute
(
name
=
"客户编码"
)
@Schema
(
description
=
"客户编码"
)
private
String
unitNo
;
/**
* 项目编码
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"客户编码"
)
@ExcelAttribute
(
name
=
"客户编码"
)
@Schema
(
description
=
"客户编码"
)
private
String
deptNo
;
/**
* 是否处理(0未处理,1处理)
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否处理"
)
@ExcelAttribute
(
name
=
"是否处理"
)
@Schema
(
description
=
"是否处理"
)
private
String
handleFlag
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TEmployeeRetirementSearchVo.java
0 → 100644
View file @
9fb3109c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirement
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
/**
* @author wzb
* @description TODO
* @date 2023-05-22 19:37:37
*/
@Data
public
class
TEmployeeRetirementSearchVo
extends
TEmployeeRetirement
{
/**
* 员工类型下拉多选
*/
@TableField
(
exist
=
false
)
@Schema
(
description
=
"员工类型下拉多选"
)
private
String
[]
empTypeList
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"id集合"
)
private
String
[]
idList
;
/**
* @Author fxj
* 查询数据起
**/
private
int
limitStart
;
/**
* @Author fxj
* 查询数据止
**/
private
int
limitEnd
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/ArchivesApplication.java
View file @
9fb3109c
...
...
@@ -3,12 +3,14 @@ package com.yifu.cloud.plus.v1.yifu.archives;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.EnableYifuResourceServer
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
/**
* @author pig archetype
* <p>
* 项目启动类
*/
@EnableYifuResourceServer
@SpringBootApplication
public
class
ArchivesApplication
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeRetirementController.java
0 → 100644
View file @
9fb3109c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirement
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeRetirementService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeHandleFlagAllVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeHandleFlagVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeRetirementExportVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeRetirementSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Set
;
/**
* @author wzb
* @description 退休人员提醒
* @date 2023-05-18 16:11:02
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/temployeeretirement"
)
@Tag
(
name
=
"退休人员提醒"
)
public
class
TEmployeeRetirementController
{
private
final
TEmployeeRetirementService
tEmployeeRetirementService
;
/**
* 分页查询
*
* @author wzb
* @param page
* @param searchVo
* @return {@link R< IPage< TEmployeeRetirement>>}
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TEmployeeRetirement
>>
getTEmployeeRetirementPage
(
Page
page
,
TEmployeeRetirementSearchVo
searchVo
)
{
return
R
.
ok
(
tEmployeeRetirementService
.
getTEmployeeRetirementPage
(
page
,
searchVo
));
}
@Inner
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/inner/retireeRemind"
)
public
void
retireeRemind
()
{
tEmployeeRetirementService
.
retireeRemind
();
}
/**
* 批量修改状态
*
* @author wzb
* @param changeHandleFlagAllVo
* @return {@link R}
*/
@Operation
(
summary
=
"批量修改状态"
,
description
=
"修改状态"
)
@PostMapping
(
"/changeHandleFlagAll"
)
public
R
changeHandleFlagAll
(
@RequestBody
ChangeHandleFlagAllVo
changeHandleFlagAllVo
)
{
return
R
.
ok
(
tEmployeeRetirementService
.
changeHandleFlagAll
(
changeHandleFlagAllVo
));
}
/**
* 修改状态
*
* @author wzb
* @param changeHandleFlagVo
* @return {@link R}
*/
@Operation
(
summary
=
"修改状态"
,
description
=
"修改状态"
)
@PostMapping
(
"/changeHandleFlag"
)
public
R
changeHandleFlag
(
@RequestBody
ChangeHandleFlagVo
changeHandleFlagVo
)
{
return
R
.
ok
(
tEmployeeRetirementService
.
changeHandleFlag
(
changeHandleFlagVo
));
}
/**
* 修改状态
*/
@Operation
(
summary
=
"操作日志详情"
,
description
=
"操作日志详情"
)
@GetMapping
(
"/getHandleFlagDetail"
)
public
R
getHandleFlagDetail
(
String
id
)
{
return
R
.
ok
(
tEmployeeRetirementService
.
getHandleFlagDetail
(
id
));
}
/**
* 人员退休提醒批量导出
*
* @author wzb
* @param response
* @param searchVo
* @return void
*/
@Operation
(
summary
=
"人员退休提醒批量导出"
,
description
=
"人员退休提醒批量导出"
)
@GetMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
TEmployeeRetirementSearchVo
searchVo
)
{
tEmployeeRetirementService
.
listExport
(
response
,
searchVo
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeRetirementFlagDetailMapper.java
0 → 100644
View file @
9fb3109c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirementFlagDetail
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @author 86187
* @description 针对表【t_employee_retirement_flag_detail】的数据库操作Mapper
* @createDate 2023-05-20 16:18:07
* @Entity generator.domain.TEmployeeRetirementFlagDetail
*/
@Mapper
public
interface
TEmployeeRetirementFlagDetailMapper
extends
BaseMapper
<
TEmployeeRetirementFlagDetail
>
{
List
<
TEmployeeRetirementFlagDetail
>
getDatail
(
@Param
(
"id"
)
String
id
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeRetirementMapper.java
0 → 100644
View file @
9fb3109c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirement
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
java.util.List
;
/**
* @author 86187
* @description 针对表【t_employee_retirement】的数据库操作Mapper
* @createDate 2023-05-18 15:40:46
* @Entity generator.domain.TEmployeeRetirement
*/
@Mapper
public
interface
TEmployeeRetirementMapper
extends
BaseMapper
<
TEmployeeRetirement
>
{
IPage
<
TEmployeeRetirement
>
getTEmployeeRetirementPage
(
Page
page
,
@Param
(
"searchVo"
)
TEmployeeRetirementSearchVo
searchVo
);
List
<
TEmployeeRetirement
>
getBirthday
(
@Param
(
"TT"
)
String
TT
,
@Param
(
"LL"
)
String
LL
);
boolean
changeHandleFlagAll
(
@Param
(
"changeHandleFlagAllVo"
)
ChangeHandleFlagAllVo
changeHandleFlagAllVo
);
boolean
changeHandleFlag
(
@Param
(
"changeHandleFlagVo"
)
ChangeHandleFlagVo
changeHandleFlagVo
);
int
selectByEmpIdcard
(
@Param
(
"empIdCard"
)
String
empIdCard
);
int
add
(
@Param
(
"tEmployeeRetirement"
)
TEmployeeRetirement
tEmployeeRetirement
);
long
selectExportCount
(
@Param
(
"tEmployeeRetirement"
)
TEmployeeRetirementExportVo
tEmployeeRetirement
);
List
<
TEmployeeRetirementExportVo
>
noPageDiy
(
@Param
(
"searchVo"
)
TEmployeeRetirementSearchVo
searchVo
);
int
noPageCountDiy
(
@Param
(
"searchVo"
)
TEmployeeRetirementSearchVo
searchVo
);
String
selectByIdd
(
@Param
(
"id"
)
Integer
id
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeRetirementFlagDetailService.java
0 → 100644
View file @
9fb3109c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirementFlagDetail
;
;
/**
* @author wzb
* @description 针对表【t_employee_retirement_flag_detail】的数据库操作Service
* @createDate 2023-05-20 16:18:07
*/
public
interface
TEmployeeRetirementFlagDetailService
extends
IService
<
TEmployeeRetirementFlagDetail
>
{
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeRetirementService.java
0 → 100644
View file @
9fb3109c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirement
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirementFlagDetail
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeHandleFlagAllVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeHandleFlagVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeRetirementSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* @author 86187
* @description 针对表【t_employee_retirement】的数据库操作Service
* @createDate 2023-05-18 15:40:46
*/
public
interface
TEmployeeRetirementService
extends
IService
<
TEmployeeRetirement
>
{
/**
* 人员退休提醒分页列表
*
* @author wzb
* @param page
* @param searchVo
* @return {@link IPage< TEmployeeRetirement>}
*/
IPage
<
TEmployeeRetirement
>
getTEmployeeRetirementPage
(
Page
page
,
TEmployeeRetirementSearchVo
searchVo
);
/**
* 批量修改状态
*
* @author wzb
* @param changeHandleFlagAllVo
* @return {@link boolean}
*/
boolean
changeHandleFlagAll
(
ChangeHandleFlagAllVo
changeHandleFlagAllVo
);
/**
* 修改状态
*
* @author wzb
* @param changeHandleFlagVo
* @return {@link boolean}
*/
boolean
changeHandleFlag
(
ChangeHandleFlagVo
changeHandleFlagVo
);
/**
* 退休提醒人员导出
*
* @author wzb
* @param response
* @param searchVo
* @return void
*/
void
listExport
(
HttpServletResponse
response
,
TEmployeeRetirementSearchVo
searchVo
);
/**
* 退休提醒定时任务
*
* @author wzb
* @param
* @return void
*/
void
retireeRemind
()
;
/**
* 获取处理日志
*
* @author wzb
* @param id
* @return {@link List< TEmployeeRetirementFlagDetail>}
*/
List
<
TEmployeeRetirementFlagDetail
>
getHandleFlagDetail
(
String
id
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
9fb3109c
...
...
@@ -395,6 +395,11 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
TEmployeeProject
newEmpProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
vo
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
vo
.
getNewDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
newEmpProject
)
&&
Common
.
isNotNull
(
newEmpProject
.
getProjectStatus
())
&&
newEmpProject
.
getProjectStatus
().
intValue
()
==
CommonConstants
.
ONE_INT
){
return
R
.
failed
(
"目标项目档案已减项,请复项后重新划转!"
);
}
//社保公积金派单处需要直接修改为最新的项目
//社保预估库、缴费库、对比库、代理差额库,需要同步修改未结算(并且满足这个条件:数据 生成月≥此处划转起始月)的数据,已结算数据不变更;
//划转,更新项目信息
...
...
@@ -420,6 +425,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
newEmpProject
=
new
TEmployeeProject
();
BeanUtil
.
copyProperties
(
oldEmpProject
,
newEmpProject
);
newEmpProject
.
setId
(
null
);
newEmpProject
.
setEmpNo
(
tEmployeeProjectService
.
getEmpNo
(
newEmpProject
.
getDeptNo
()));
newEmpProject
.
setDeptId
(
vo
.
getNewDeptId
());
newEmpProject
.
setDeptName
(
vo
.
getNewDeptName
());
newEmpProject
.
setDeptNo
(
vo
.
getNewDeptNo
());
...
...
@@ -430,7 +436,14 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
newEmpProject
.
setBusinessSecondType
(
tSettleDomain
.
getBusinessSecondType
());
newEmpProject
.
setBusinessThirdType
(
tSettleDomain
.
getBusinessThirdType
());
newEmpProject
.
setInsuranceStatus
(
null
);
newEmpProject
.
setSocialStatus
(
null
);
newEmpProject
.
setSocialProvince
(
null
);
newEmpProject
.
setSocialCity
(
null
);
newEmpProject
.
setSocialTown
(
null
);
newEmpProject
.
setFundStatus
(
null
);
newEmpProject
.
setContractStatus
(
null
);
newEmpProject
.
setContractType
(
null
);
}
updateTEmployeeProject
.
setDeptName
(
vo
.
getNewDeptName
());
updateTEmployeeProject
.
setDeptNo
(
vo
.
getNewDeptNo
());
updateTEmployeeProject
.
setDeptId
(
vo
.
getNewDeptId
());
...
...
@@ -440,7 +453,6 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateTEmployeeProject
.
setBusinessPrimaryType
(
tSettleDomain
.
getBusinessPrimaryType
());
updateTEmployeeProject
.
setBusinessSecondType
(
tSettleDomain
.
getBusinessSecondType
());
updateTEmployeeProject
.
setBusinessThirdType
(
tSettleDomain
.
getBusinessThirdType
());
}
// 记录变更日志
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
updateTEmployeeProject
.
getId
(),
oldEmpProject
,
updateTEmployeeProject
);
updateTEmployeeProject
.
setOdlDeptId
(
oldEmpProject
.
getDeptId
());
...
...
@@ -456,8 +468,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updatesf
.
setUnitName
(
updateTEmployeeProject
.
getUnitName
());
// 处理社保 目标项目档案已有项目档案不做处理
if
(
vo
.
getChangeItems
().
indexOf
(
CommonConstants
.
ONE_STRING
)
>=
CommonConstants
.
ZERO_INT
)
{
if
(
!(
Common
.
isEmpty
(
newEmpProject
.
getSocialStatus
())
||
CommonConstants
.
ZERO_INT
==
newEmpProject
.
getSocialStatus
())
)
{
if
(
Common
.
isEmpty
(
newEmpProject
.
getSocialStatus
())
||
CommonConstants
.
ZERO_INT
==
newEmpProject
.
getSocialStatus
()){
newEmpProject
.
setSocialStatus
(
oldEmpProject
.
getSocialStatus
());
newEmpProject
.
setSocialProvince
(
oldEmpProject
.
getSocialProvince
());
newEmpProject
.
setSocialCity
(
oldEmpProject
.
getSocialCity
());
...
...
@@ -475,8 +487,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
// 处理公积金 如果目标项目档案已存在公积金 不划转
if
(
vo
.
getChangeItems
().
indexOf
(
CommonConstants
.
TWO_STRING
)
>=
CommonConstants
.
ZERO_INT
)
{
if
(
!(
Common
.
isEmpty
(
newEmpProject
.
getFundStatus
())
||
CommonConstants
.
ZERO_INT
==
newEmpProject
.
getFundStatus
())
)
{
if
(
Common
.
isEmpty
(
newEmpProject
.
getFundStatus
())
||
CommonConstants
.
ZERO_INT
==
newEmpProject
.
getFundStatus
()){
newEmpProject
.
setFundStatus
(
oldEmpProject
.
getFundStatus
());
updatesf
.
setFlag
(
CommonConstants
.
ONE_STRING
);
socialDaprUtils
.
updateSocialAndFoundInfo
(
updatesf
);
...
...
@@ -488,8 +500,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
// 处理員工合同 目标 已有合同状态 不在处理合同划转
if
(
vo
.
getChangeItems
().
indexOf
(
CommonConstants
.
ZERO_STRING
)
>=
CommonConstants
.
ZERO_INT
){
if
(
!(
Common
.
isEmpty
(
newEmpProject
.
getContractStatus
())
||
CommonConstants
.
ZERO_INT
!=
newEmpProject
.
getContractStatus
()
)){
if
(
Common
.
isEmpty
(
newEmpProject
.
getContractStatus
())
||
CommonConstants
.
ZERO_INT
==
newEmpProject
.
getContractStatus
(
)){
newEmpProject
.
setContractStatus
(
oldEmpProject
.
getContractStatus
());
newEmpProject
.
setContractType
(
oldEmpProject
.
getContractType
());
// 合同同步划转---只划转在用合同 fxj 2023-03-06
...
...
@@ -506,6 +518,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
tEmployeeProjectService
.
saveOrUpdate
(
newEmpProject
);
//同步减项老项目档案
if
(
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getChangeType
())){
oldEmpProject
.
setIsLeaveEmployee
(
CommonConstants
.
ZERO_INT
);
R
res
=
tEmployeeProjectService
.
deleteEmpPro
(
oldEmpProject
);
resStr
.
append
(
res
.
getMsg
());
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
9fb3109c
...
...
@@ -191,7 +191,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
return
R
.
failed
(
validity
.
getErrorInfo
(),
ResultConstants
.
VALIDITY_FAIL
);
}
return
this
.
saveContractAndAtta
(
tEmployeeContractInfo
,
user
);
return
this
.
saveContractAndAtta
(
tEmployeeContractInfo
,
user
);
}
/**
...
...
@@ -223,7 +223,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if
(
contractInfo
==
null
)
{
return
R
.
failed
(
"无在用合同,无法续签"
);
}
else
if
(
contractInfo
.
getContractEnd
()
==
null
||
!(
DateUtil
.
formatDate
(
DateUtil
.
addDayByDate
(
contractInfo
.
getContractEnd
(),
1
)).
equals
(
DateUtil
.
formatDate
(
tEmployeeContractInfo
.
getContractStart
())))
||
!(
DateUtil
.
formatDate
(
DateUtil
.
addDayByDate
(
contractInfo
.
getContractEnd
(),
1
)).
equals
(
DateUtil
.
formatDate
(
tEmployeeContractInfo
.
getContractStart
())))
)
{
return
R
.
failed
(
"续签请注意上一份合同的截止日期!"
);
}
...
...
@@ -246,22 +246,40 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
}
if
(
EmployeeConstants
.
SITUATION_ONE
.
equals
(
tEmployeeContractInfo
.
getSituation
()))
{
if
(!
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
tEmployeeContractInfo
.
getSituation
())
&&
!
EmployeeConstants
.
SITUATION_SIX
.
equals
(
tEmployeeContractInfo
.
getSituation
()))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
tEmployeeContractInfo
.
getContractType
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
tEmployeeContractInfo
.
getContractType
()))
{
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
tEmployeeContractInfo
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getContractStart
,
tEmployeeContractInfo
.
getContractStart
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
return
R
.
failed
(
"该员工已存在相同起始日期的合同,禁止重复添加"
);
}
}
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
tEmployeeContractInfo
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getContractStart
,
tEmployeeContractInfo
.
getContractStart
())
.
eq
(
TEmployeeContractInfo:
:
getContractEnd
,
tEmployeeContractInfo
.
getContractEnd
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ZERO
_INT
)
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE
_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
return
R
.
failed
(
"
不能
重复添加"
);
return
R
.
failed
(
"
该员工已存在相同起始和截止日期的合同,禁止
重复添加"
);
}
}
}
return
null
;
}
...
...
@@ -278,7 +296,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// 初始化
tEmployeeContractInfo
.
setUpdateBy
(
user
.
getId
());
tEmployeeContractInfo
.
setUpdateTime
(
LocalDateTime
.
now
());
if
(
CommonConstants
.
TWO_STRING
.
equals
(
tEmployeeContractInfo
.
getContractType
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
tEmployeeContractInfo
.
getContractType
()))
{
tEmployeeContractInfo
.
setContractEnd
(
null
);
}
//是否归档:否
tEmployeeContractInfo
.
setIsFile
(
CommonConstants
.
ONE_STRING
);
//是否在用:否
...
...
@@ -289,6 +310,38 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if
(
null
!=
validity
.
getErrorInfo
()
&&
!
validity
.
getErrorInfo
().
isEmpty
())
{
return
R
.
failed
(
validity
.
getErrorInfo
(),
ResultConstants
.
VALIDITY_FAIL
);
}
if
(!
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
tEmployeeContractInfo
.
getSituation
())
&&
!
EmployeeConstants
.
SITUATION_SIX
.
equals
(
tEmployeeContractInfo
.
getSituation
()))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
tEmployeeContractInfo
.
getContractType
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
tEmployeeContractInfo
.
getContractType
()))
{
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
tEmployeeContractInfo
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getContractStart
,
tEmployeeContractInfo
.
getContractStart
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
return
R
.
failed
(
"该员工已存在相同起始日期的合同,禁止重复添加"
);
}
}
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
tEmployeeContractInfo
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getContractStart
,
tEmployeeContractInfo
.
getContractStart
())
.
eq
(
TEmployeeContractInfo:
:
getContractEnd
,
tEmployeeContractInfo
.
getContractEnd
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
return
R
.
failed
(
"该员工已存在相同起始和截止日期的合同,禁止重复添加"
);
}
}
return
this
.
saveContractAndAtta
(
tEmployeeContractInfo
,
user
);
}
catch
(
Exception
e
)
{
log
.
error
(
"员工合同保存异常:"
+
e
.
getMessage
());
...
...
@@ -418,7 +471,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
initType
(
tEmployeeContractInfo
);
// 标准合同、劳动派遣合同、其他。————社保公积金都派减,自动审核通过
this
.
judgeAuditStatus
(
tEmployeeContractInfo
,
user
);
this
.
judgeAuditStatus
(
tEmployeeContractInfo
,
user
);
if
(
Common
.
isEmpty
(
tEmployeeContractInfo
.
getId
()))
{
// 针对编码再做一次重复性校验
...
...
@@ -451,22 +504,22 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
**/
private
void
initType
(
TEmployeeContractInfo
tEmployeeContractInfo
)
{
// 初始化审核类型 审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
if
(
ArchivesConstants
.
contractSituation
[
0
].
equals
(
tEmployeeContractInfo
.
getSituation
())){
if
(
ArchivesConstants
.
contractSituation
[
0
].
equals
(
tEmployeeContractInfo
.
getSituation
()))
{
// 作废
tEmployeeContractInfo
.
setType
(
CommonConstants
.
THREE_STRING
);
}
if
(
ArchivesConstants
.
contractSituation
[
6
].
equals
(
tEmployeeContractInfo
.
getSituation
())){
if
(
ArchivesConstants
.
contractSituation
[
6
].
equals
(
tEmployeeContractInfo
.
getSituation
()))
{
// 终止
tEmployeeContractInfo
.
setType
(
CommonConstants
.
FOUR_STRING
);
}
if
(
ArchivesConstants
.
contractSituation
[
1
].
equals
(
tEmployeeContractInfo
.
getSituation
())
||
ArchivesConstants
.
contractSituation
[
2
].
equals
(
tEmployeeContractInfo
.
getSituation
())
||
ArchivesConstants
.
contractSituation
[
4
].
equals
(
tEmployeeContractInfo
.
getSituation
())
||
ArchivesConstants
.
contractSituation
[
5
].
equals
(
tEmployeeContractInfo
.
getSituation
())){
||
ArchivesConstants
.
contractSituation
[
5
].
equals
(
tEmployeeContractInfo
.
getSituation
()))
{
// 离职再入职 合同未到期重新签订 商务合同更改 正常续签
tEmployeeContractInfo
.
setType
(
CommonConstants
.
TWO_STRING
);
}
if
(
ArchivesConstants
.
contractSituation
[
3
].
equals
(
tEmployeeContractInfo
.
getSituation
())){
if
(
ArchivesConstants
.
contractSituation
[
3
].
equals
(
tEmployeeContractInfo
.
getSituation
()))
{
//正常签订
tEmployeeContractInfo
.
setType
(
CommonConstants
.
ONE_STRING
);
}
...
...
@@ -597,10 +650,12 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeProjectService
.
updateById
(
tEmployeeProject
);
}
}
@Override
public
boolean
updateInUseStatusById
(
String
empId
,
String
deptNo
,
String
ContractId
)
{
return
baseMapper
.
updateInUseStatusById
(
empId
,
deptNo
,
ContractId
,
CommonConstants
.
ONE_STRING
)
>
0
;
public
boolean
updateInUseStatusById
(
String
empId
,
String
deptNo
,
String
ContractId
)
{
return
baseMapper
.
updateInUseStatusById
(
empId
,
deptNo
,
ContractId
,
CommonConstants
.
ONE_STRING
)
>
0
;
}
@Override
public
R
<
String
>
auditContract
(
TEmployeeContractInfo
tEmployeeContractInfo
,
YifuUser
user
)
{
if
(
tEmployeeContractInfo
!=
null
)
{
...
...
@@ -677,7 +732,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// 判断人员有无审核通过的其他合同
TEmployeeContractInfo
contractInfoInUse
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
()
.
lambda
().
eq
(
TEmployeeContractInfo:
:
getEmpId
,
contractInfo
.
getEmpId
())
.
and
(
obj
->
obj
.
ge
(
TEmployeeContractInfo:
:
getContractEnd
,
DateUtil
.
getThisDayByPatten
(
"yyyy-MM-dd"
))
.
and
(
obj
->
obj
.
ge
(
TEmployeeContractInfo:
:
getContractEnd
,
DateUtil
.
getThisDayByPatten
(
"yyyy-MM-dd"
))
.
or
().
isNull
(
TEmployeeContractInfo:
:
getContractEnd
))
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
...
...
@@ -1082,7 +1137,45 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
errorInfo
.
append
(
EmployeeConstants
.
WORKING_HOURS_EMPTY
);
}
}
if
(!
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
insert
.
getSituation
())
&&
!
EmployeeConstants
.
SITUATION_SIX
.
equals
(
insert
.
getSituation
()))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
insert
.
getContractType
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
insert
.
getContractType
()))
{
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
insert
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getContractStart
,
insert
.
getContractStart
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"该员工已存在相同起始日期的合同,禁止重复添加!"
));
return
;
}
}
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
insert
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getContractStart
,
insert
.
getContractStart
())
.
eq
(
TEmployeeContractInfo:
:
getContractEnd
,
insert
.
getContractEnd
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"该员工已存在相同起始和截止日期的合同,禁止重复添加"
));
return
;
}
}
}
if
(
Common
.
isEmpty
(
errorInfo
.
toString
()))
{
TEmployeeProject
project
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
insert
.
getEmpIdcard
())
...
...
@@ -1136,7 +1229,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
sf
.
setSettleDomain
(
insert
.
getSettleDomain
());
R
<
Integer
>
socialFundR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tsocialfundinfo/inner/selectSocialFoundByContract"
,
sf
,
Integer
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
CommonConstants
.
ONE_STRING
.
equals
(
insert
.
getSituation
())
||
CommonConstants
.
TWO_STRING
.
equals
(
insert
.
getSituation
())
||
CommonConstants
.
THREE_STRING
.
equals
(
insert
.
getSituation
())
||
CommonConstants
.
FOUR_STRING
.
equals
(
insert
.
getSituation
()))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
insert
.
getSituation
())
||
CommonConstants
.
TWO_STRING
.
equals
(
insert
.
getSituation
())
||
CommonConstants
.
THREE_STRING
.
equals
(
insert
.
getSituation
())
||
CommonConstants
.
FOUR_STRING
.
equals
(
insert
.
getSituation
()))
{
if
(
socialFundR
!=
null
&&
socialFundR
.
getData
()
!=
null
&&
socialFundR
.
getData
()
>
0
)
{
insert
.
setAuditStatus
(
CommonConstants
.
TWO_INT
);
insert
.
setAuditUserName
(
user
.
getNickname
());
...
...
@@ -1164,12 +1257,12 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
response
.
setCharacterEncoding
(
CommonConstants
.
UTF8
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 获取所有字典type
Map
<
String
,
String
>
nameAndDicTypeMap
=
util
.
getConverterDicType
();
Map
<
String
,
String
>
nameAndDicTypeMap
=
util
.
getConverterDicType
();
// 获取所有字典对应的值
Map
<
String
,
String
>
redisLabelMap
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
REDIS_DICT_LABLE
);
Map
<
String
,
String
>
redisLabelMap
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
REDIS_DICT_LABLE
);
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
EmployeeContractExportVO
.
class
)
.
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
))
.
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
))
.
includeColumnFieldNames
(
contractInfo
.
getExportFields
()).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
...
...
@@ -1226,12 +1319,12 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
response
.
setCharacterEncoding
(
CommonConstants
.
UTF8
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 获取所有字典type
Map
<
String
,
String
>
nameAndDicTypeMap
=
util
.
getConverterDicType
();
Map
<
String
,
String
>
nameAndDicTypeMap
=
util
.
getConverterDicType
();
// 获取所有字典对应的值
Map
<
String
,
String
>
redisLabelMap
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
REDIS_DICT_LABLE
);
Map
<
String
,
String
>
redisLabelMap
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
REDIS_DICT_LABLE
);
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
EmployeeContractExportVO
.
class
)
.
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
))
.
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
))
.
includeColumnFieldNames
(
contractInfo
.
getExportFields
()).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
...
...
@@ -1285,12 +1378,12 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
out
=
response
.
getOutputStream
();
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
EmployeeContractExportAuditVO
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
Field
[]
allFields
=
EmployeeContractExportAuditVO
.
class
.
getDeclaredFields
();
WriteSheet
writeSheet
;
ExcelUtil
<
EmployeeContractExportAuditVO
>
util
;
...
...
@@ -1299,34 +1392,34 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
if
(
Common
.
isNotNull
(
list
))
{
util
=
new
ExcelUtil
<>(
EmployeeContractExportAuditVO
.
class
);
for
(
EmployeeContractExportAuditVO
vo
:
list
)
{
util
.
convertEntityAsso
(
vo
,
null
,
null
,
null
,
allFields
);
for
(
EmployeeContractExportAuditVO
vo
:
list
)
{
util
.
convertEntityAsso
(
vo
,
null
,
null
,
null
,
allFields
);
}
}
if
(
Common
.
isNotNull
(
list
)){
writeSheet
=
EasyExcel
.
writerSheet
(
"合同审核批量导出"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
if
(
Common
.
isNotNull
(
list
))
{
writeSheet
=
EasyExcel
.
writerSheet
(
"合同审核批量导出"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
if
(
Common
.
isNotNull
(
list
)){
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"合同审核批量导出"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"合同审核批量导出"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
)){
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
...
...
@@ -1353,20 +1446,21 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
@Override
public
R
<
List
<
ErrorMessage
>>
auditContractBatch
(
EmpContractAuditVo
contractAuditVo
,
YifuUser
user
)
{
List
<
TEmployeeContractInfo
>
contractInfos
=
baseMapper
.
selectBatchIds
(
contractAuditVo
.
getIds
());
if
(
Common
.
isEmpty
(
contractInfos
)){
if
(
Common
.
isEmpty
(
contractInfos
))
{
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
List
<
ErrorMessage
>
errorMessages
=
new
ArrayList
<>();
TEmployeeContractInfo
tEmployeeContractInfo
;
TEmployeeContractInfo
contractInfoInUse
;
TEmployeeProject
tEmployeeProject
;
TEmployeeInfo
tEmployeeInfo
;
int
i
=
1
;
int
errorCount
=
0
;
for
(
TEmployeeContractInfo
contract
:
contractInfos
)
{
int
i
=
1
;
int
errorCount
=
0
;
for
(
TEmployeeContractInfo
contract
:
contractInfos
)
{
i
++;
if
(
contract
.
getAuditStatus
()
!=
CommonConstants
.
ONE_INT
)
{
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"不是待审核状态!"
,
CommonConstants
.
RED
,
contract
.
getApplyNo
()));
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"不是待审核状态!"
,
CommonConstants
.
RED
,
contract
.
getApplyNo
()));
errorCount
++;
continue
;
}
...
...
@@ -1376,6 +1470,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeContractInfo
.
setContractNo
(
contract
.
getContractNo
());
tEmployeeContractInfo
.
setAuditUserName
(
user
.
getNickname
());
tEmployeeContractInfo
.
setId
(
contract
.
getId
());
if
(
tEmployeeContractInfo
.
getAuditStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
2
])
{
// 非作废、终止,本条变为在用
if
(
Common
.
isEmpty
(
contract
.
getSituation
())
...
...
@@ -1409,7 +1504,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
TEmployeeContractInfo
old
=
this
.
getById
(
contract
.
getOldContractId
());
if
(
old
!=
null
&&
Common
.
isNotNull
(
old
.
getId
()))
{
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
old
.
getInUse
()))
{
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"关联的原合同已不在用!"
,
CommonConstants
.
RED
,
contract
.
getApplyNo
()));
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"关联的原合同已不在用!"
,
CommonConstants
.
RED
,
contract
.
getApplyNo
()));
errorCount
++;
continue
;
}
else
{
...
...
@@ -1417,12 +1512,12 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
this
.
updateById
(
old
);
}
}
else
{
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"未找到关联的原合同!"
,
CommonConstants
.
RED
,
contract
.
getApplyNo
()));
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"未找到关联的原合同!"
,
CommonConstants
.
RED
,
contract
.
getApplyNo
()));
errorCount
++;
continue
;
}
}
else
{
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"未找到关联的原合同!"
,
CommonConstants
.
RED
,
contract
.
getApplyNo
()));
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"未找到关联的原合同!"
,
CommonConstants
.
RED
,
contract
.
getApplyNo
()));
errorCount
++;
continue
;
}
...
...
@@ -1446,7 +1541,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// 判断人员有无审核通过的其他合同
contractInfoInUse
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
()
.
lambda
().
eq
(
TEmployeeContractInfo:
:
getEmpId
,
contract
.
getEmpId
())
.
and
(
obj
->
obj
.
ge
(
TEmployeeContractInfo:
:
getContractEnd
,
DateUtil
.
getThisDayByPatten
(
"yyyy-MM-dd"
))
.
and
(
obj
->
obj
.
ge
(
TEmployeeContractInfo:
:
getContractEnd
,
DateUtil
.
getThisDayByPatten
(
"yyyy-MM-dd"
))
.
or
().
isNull
(
TEmployeeContractInfo:
:
getContractEnd
))
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
...
...
@@ -1463,9 +1558,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// 不是待提交,记录审核记录
this
.
setAuditInfo
(
tEmployeeContractInfo
);
this
.
updateById
(
tEmployeeContractInfo
);
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"审核成功!"
,
CommonConstants
.
GREEN
,
contract
.
getApplyNo
()));
errorMessages
.
add
(
new
ErrorMessage
(
i
,
"审核成功!"
,
CommonConstants
.
GREEN
,
contract
.
getApplyNo
()));
}
if
(
errorCount
==
CommonConstants
.
ZERO_INT
){
if
(
errorCount
==
CommonConstants
.
ZERO_INT
)
{
return
R
.
ok
();
}
return
R
.
ok
(
errorMessages
);
...
...
@@ -1473,40 +1568,41 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
/**
* B端合同列表查询接口
* @Author fxj
* @Date 2020-08-25
*
* @param page
* @param contractBusinessPageVo
* @param flag 0 按3个月内到期提醒 1 不安提醒查询
* @return
* @Author fxj
* @Date 2020-08-25
**/
@Override
public
IPage
<
EmpContractBusinessPageVo
>
getContractBusinessPage
(
Page
<
EmpContractBusinessPageVo
>
page
,
EmpContractBusinessPageVo
contractBusinessPageVo
,
List
<
String
>
settleDomainIds
,
Integer
flag
)
{
IPage
<
EmpContractBusinessPageVo
>
pageVoList
=
baseMapper
.
getContractBusinessPage
(
page
,
contractBusinessPageVo
,
settleDomainIds
,
flag
);
IPage
<
EmpContractBusinessPageVo
>
pageVoList
=
baseMapper
.
getContractBusinessPage
(
page
,
contractBusinessPageVo
,
settleDomainIds
,
flag
);
List
<
EmpContractBusinessPageVo
>
voList
=
pageVoList
.
getRecords
();
List
<
TEmployeeContractInfo
>
contractInfoList
=
null
;
List
<
String
>
empIds
=
new
ArrayList
<>();
if
(
Common
.
isNotNull
(
voList
)){
for
(
EmpContractBusinessPageVo
vo
:
voList
)
{
if
(
Common
.
isNotNull
(
voList
))
{
for
(
EmpContractBusinessPageVo
vo
:
voList
)
{
empIds
.
add
(
vo
.
getEmpId
());
}
}
if
(
Common
.
isNotNull
(
empIds
)){
if
(
Common
.
isNotNull
(
empIds
))
{
contractInfoList
=
baseMapper
.
selectList
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getIsObsolete
,
CommonConstants
.
ZERO_STRING
)
.
in
(
TEmployeeContractInfo:
:
getEmpId
,
empIds
));
.
eq
(
TEmployeeContractInfo:
:
getIsObsolete
,
CommonConstants
.
ZERO_STRING
)
.
in
(
TEmployeeContractInfo:
:
getEmpId
,
empIds
));
}
HashMap
<
String
,
Integer
>
countMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
contractInfoList
)){
HashMap
<
String
,
Integer
>
countMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
contractInfoList
))
{
Integer
count
;
for
(
TEmployeeContractInfo
contractInfo
:
contractInfoList
)
{
for
(
TEmployeeContractInfo
contractInfo
:
contractInfoList
)
{
count
=
countMap
.
get
(
contractInfo
.
getEmpId
());
count
=
null
==
count
?
1
:(
count
+
1
);
countMap
.
put
(
contractInfo
.
getEmpId
(),
count
);
count
=
null
==
count
?
1
:
(
count
+
1
);
countMap
.
put
(
contractInfo
.
getEmpId
(),
count
);
}
}
if
(
Common
.
isNotNull
(
voList
)){
for
(
EmpContractBusinessPageVo
pageVo
:
voList
)
{
if
(
Common
.
isNotNull
(
voList
))
{
for
(
EmpContractBusinessPageVo
pageVo
:
voList
)
{
pageVo
.
setRenewCount
(
countMap
.
get
(
pageVo
.
getEmpId
()));
}
}
...
...
@@ -1516,30 +1612,32 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
/**
* B端查询合同到期提醒数(查询3个月内到期的合同)
* @Author fxj
* @Date 2020-08-25
*
* @param
* @return
* @Author fxj
* @Date 2020-08-25
**/
@Override
public
Integer
getContractBusinessAlertCount
(
List
<
String
>
settleDomainIds
)
{
EmpContractBusinessPageVo
contractBusinessPageVo
=
new
EmpContractBusinessPageVo
();
contractBusinessPageVo
.
setInUse
(
CommonConstants
.
ZERO_STRING
);
contractBusinessPageVo
.
setIsObsolete
(
CommonConstants
.
ZERO_STRING
);
return
baseMapper
.
getContractBusinessAlertCount
(
contractBusinessPageVo
,
settleDomainIds
,
CommonConstants
.
THREE_INT
);
return
baseMapper
.
getContractBusinessAlertCount
(
contractBusinessPageVo
,
settleDomainIds
,
CommonConstants
.
THREE_INT
);
}
/**
* B端查询对应员工指定合同ID之外的其他合同信息
* @Author fxj
* @Date 2020-08-25
*
* @param empId
* @param contractId
* @return
* @Author fxj
* @Date 2020-08-25
**/
@Override
public
List
<
EmpContractBusinessPageVo
>
getOtherContractBusinessInfo
(
String
empId
,
String
contractId
)
{
return
baseMapper
.
getOtherContractBusinessInfo
(
empId
,
contractId
);
return
baseMapper
.
getOtherContractBusinessInfo
(
empId
,
contractId
);
}
@Override
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeRetirementFlagDetailServiceImpl.java
0 → 100644
View file @
9fb3109c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirementFlagDetail
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeRetirementFlagDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeRetirementFlagDetailService
;
import
org.springframework.stereotype.Service
;
/**
* @author 86187
* @description 针对表【t_employee_retirement_flag_detail】的数据库操作Service实现
* @createDate 2023-05-20 16:18:07
*/
@Service
public
class
TEmployeeRetirementFlagDetailServiceImpl
extends
ServiceImpl
<
TEmployeeRetirementFlagDetailMapper
,
TEmployeeRetirementFlagDetail
>
implements
TEmployeeRetirementFlagDetailService
{
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeRetirementServiceImpl.java
0 → 100644
View file @
9fb3109c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
import
cn.hutool.core.date.DateTime
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirement
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirementFlagDetail
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeRetirementFlagDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeRetirementMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeRetirementService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
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.vo.TDispatchAuditExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
/**
* @author 86187
* @description 针对表【t_employee_retirement】的数据库操作Service实现
* @createDate 2023-05-18 15:40:46
*/
@Service
public
class
TEmployeeRetirementServiceImpl
extends
ServiceImpl
<
TEmployeeRetirementMapper
,
TEmployeeRetirement
>
implements
TEmployeeRetirementService
{
@Autowired
private
TEmployeeRetirementMapper
tEmployeeRetirementMapper
;
@Autowired
private
TEmployeeRetirementFlagDetailMapper
tEmployeeRetirementFlagDetailMapper
;
@Override
public
IPage
<
TEmployeeRetirement
>
getTEmployeeRetirementPage
(
Page
page
,
TEmployeeRetirementSearchVo
searchVo
)
{
return
baseMapper
.
getTEmployeeRetirementPage
(
page
,
searchVo
);
}
@Override
@Scheduled
(
cron
=
"0 */1 * * * ?"
)
public
void
retireeRemind
()
{
Date
date
=
new
Date
();
YifuUser
user
=
SecurityUtils
.
getUser
();
SimpleDateFormat
formatterMenYear
=
new
SimpleDateFormat
(
"YYYYMM"
);
String
YearMonth
=
formatterMenYear
.
format
(
date
);
SimpleDateFormat
formatterManDate
=
new
SimpleDateFormat
(
"dd"
);
String
dateOne
=
formatterManDate
.
format
(
date
);
String
mRemainTime
=
DateUtil
.
getYearAndMonth
(
YearMonth
,
ArchivesConstants
.
MYEAR_MONTH
);
String
wRemainTime
=
DateUtil
.
getYearAndMonth
(
YearMonth
,
ArchivesConstants
.
WYEAR_MONTH
);
String
TT
=
mRemainTime
+
dateOne
;
StringBuffer
stringBuffer
=
new
StringBuffer
(
TT
);
stringBuffer
.
insert
(
CommonConstants
.
FOUR_INT
,
"-"
);
stringBuffer
.
insert
(
CommonConstants
.
SEVEN_INT
,
"-"
);
String
LL
=
wRemainTime
+
dateOne
;
StringBuffer
stringBufferOne
=
new
StringBuffer
(
LL
);
stringBufferOne
.
insert
(
CommonConstants
.
FOUR_INT
,
"-"
);
stringBufferOne
.
insert
(
CommonConstants
.
SEVEN_INT
,
"-"
);
List
<
TEmployeeRetirement
>
list
=
baseMapper
.
getBirthday
(
TT
,
LL
);
for
(
TEmployeeRetirement
tEmployeeRetirement
:
list
)
{
int
i
=
baseMapper
.
selectByEmpIdcard
(
tEmployeeRetirement
.
getEmpIdcard
());
if
(
i
==
0
)
{
tEmployeeRetirement
.
setHandleFlag
(
0
);
tEmployeeRetirement
.
setCreateBy
(
"1"
);
tEmployeeRetirementMapper
.
insert
(
tEmployeeRetirement
);
}
}
}
@Override
public
boolean
changeHandleFlagAll
(
ChangeHandleFlagAllVo
changeHandleFlagAllVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
for
(
int
i
=
0
;
i
<
changeHandleFlagAllVo
.
getIds
().
length
;
i
++)
{
TEmployeeRetirementFlagDetail
tEmployeeRetirementFlagDetail
=
new
TEmployeeRetirementFlagDetail
();
if
(
changeHandleFlagAllVo
.
getHandleFlag
()
==
0
)
{
tEmployeeRetirementFlagDetail
.
setDatailId
(
changeHandleFlagAllVo
.
getIds
()[
i
]);
tEmployeeRetirementFlagDetail
.
setContext
(
ArchivesConstants
.
HANDLE_FLAG_ONE
);
tEmployeeRetirementFlagDetail
.
setCreateBy
(
user
.
getId
());
tEmployeeRetirementFlagDetail
.
setCreateName
(
user
.
getNickname
());
tEmployeeRetirementFlagDetail
.
setCreateTime
(
DateTime
.
now
());
tEmployeeRetirementFlagDetailMapper
.
insert
(
tEmployeeRetirementFlagDetail
);
}
if
(
changeHandleFlagAllVo
.
getHandleFlag
()
==
1
)
{
tEmployeeRetirementFlagDetail
.
setDatailId
(
changeHandleFlagAllVo
.
getIds
()[
i
]);
tEmployeeRetirementFlagDetail
.
setContext
(
ArchivesConstants
.
HANDLE_FLAG_TWO
);
tEmployeeRetirementFlagDetail
.
setCreateBy
(
user
.
getId
());
tEmployeeRetirementFlagDetail
.
setCreateName
(
user
.
getNickname
());
tEmployeeRetirementFlagDetail
.
setCreateTime
(
DateTime
.
now
());
tEmployeeRetirementFlagDetailMapper
.
insert
(
tEmployeeRetirementFlagDetail
);
}
}
return
baseMapper
.
changeHandleFlagAll
(
changeHandleFlagAllVo
);
}
@Override
public
boolean
changeHandleFlag
(
ChangeHandleFlagVo
changeHandleFlagVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
TEmployeeRetirementFlagDetail
tEmployeeRetirementFlagDetail
=
new
TEmployeeRetirementFlagDetail
();
if
(
changeHandleFlagVo
.
getHandleFlag
()==
0
){
tEmployeeRetirementFlagDetail
.
setDatailId
(
changeHandleFlagVo
.
getId
());
tEmployeeRetirementFlagDetail
.
setContext
(
ArchivesConstants
.
HANDLE_FLAG_ONE
);
tEmployeeRetirementFlagDetail
.
setCreateBy
(
user
.
getId
());
tEmployeeRetirementFlagDetail
.
setCreateTime
(
DateTime
.
now
());
tEmployeeRetirementFlagDetail
.
setCreateName
(
user
.
getNickname
());
tEmployeeRetirementFlagDetailMapper
.
insert
(
tEmployeeRetirementFlagDetail
);
}
if
(
changeHandleFlagVo
.
getHandleFlag
()==
1
){
tEmployeeRetirementFlagDetail
.
setDatailId
(
changeHandleFlagVo
.
getId
());
tEmployeeRetirementFlagDetail
.
setContext
(
ArchivesConstants
.
HANDLE_FLAG_TWO
);
tEmployeeRetirementFlagDetail
.
setCreateBy
(
user
.
getId
());
tEmployeeRetirementFlagDetail
.
setCreateTime
(
DateTime
.
now
());
tEmployeeRetirementFlagDetail
.
setCreateName
(
user
.
getNickname
());
tEmployeeRetirementFlagDetailMapper
.
insert
(
tEmployeeRetirementFlagDetail
);
}
return
baseMapper
.
changeHandleFlag
(
changeHandleFlagVo
);
}
@Override
public
void
listExport
(
HttpServletResponse
response
,
TEmployeeRetirementSearchVo
searchVo
)
{
String
fileName
=
"人员退休提醒批量导出"
+
DateUtil
.
getThisTime
()
+
CommonConstants
.
XLSX
;
List
<
TEmployeeRetirementExportVo
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
try
(
ServletOutputStream
out
=
response
.
getOutputStream
()){
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
ExcelUtil
<
TEmployeeRetirementExportVo
>
util
=
new
ExcelUtil
<>(
TEmployeeRetirementExportVo
.
class
);
// 获取所有字典type
Map
<
String
,
String
>
nameAndDicTypeMap
=
util
.
getConverterDicType
();
// 获取所有字典对应的值
Map
<
String
,
String
>
redisLabelMap
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
REDIS_DICT_LABLE
);
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TEmployeeRetirementExportVo
.
class
)
.
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
))
.
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
for
(
TEmployeeRetirementExportVo
tEmployeeRetirementExportVo
:
list
)
{
String
fileProvince
=
baseMapper
.
selectByIdd
(
tEmployeeRetirementExportVo
.
getFileProvince
());
String
fileCity
=
baseMapper
.
selectByIdd
(
tEmployeeRetirementExportVo
.
getFileCity
());
String
fileTown
=
baseMapper
.
selectByIdd
(
tEmployeeRetirementExportVo
.
getFileTown
());
if
(
null
!=
fileProvince
&&
null
!=
fileCity
&&
null
!=
fileTown
)
{
if
(
null
!=
fileCity
&&
null
==
fileTown
)
{
tEmployeeRetirementExportVo
.
setFileAddress
(
fileProvince
+
"/"
+
fileCity
);
}
else
{
tEmployeeRetirementExportVo
.
setFileAddress
(
fileProvince
+
"/"
+
fileCity
+
"/"
+
fileTown
);
}
}
String
socialProvince
=
baseMapper
.
selectByIdd
(
tEmployeeRetirementExportVo
.
getSocialProvince
());
String
socialCity
=
baseMapper
.
selectByIdd
(
tEmployeeRetirementExportVo
.
getSocialCity
());
String
socailTown
=
baseMapper
.
selectByIdd
(
tEmployeeRetirementExportVo
.
getSocialTown
());
if
(
null
!=
socialProvince
&&
null
!=
socialCity
&&
null
!=
socailTown
)
{
if
(
null
!=
socialCity
&&
null
==
socailTown
)
{
tEmployeeRetirementExportVo
.
setSocialAddress
(
socialProvince
+
"/"
+
socialCity
);
}
else
{
tEmployeeRetirementExportVo
.
setFileAddress
(
socialProvince
+
"/"
+
socialCity
+
"/"
+
socailTown
);
}
}
}
if
(
Common
.
isNotNull
(
list
)){
writeSheet
=
EasyExcel
.
writerSheet
(
"人员退休提醒批量导出"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"人员退休提醒批量导出"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
excelWriter
.
finish
();
}
catch
(
Exception
e
){
log
.
error
(
"执行异常"
,
e
);
}
}
@Override
public
List
<
TEmployeeRetirementFlagDetail
>
getHandleFlagDetail
(
String
id
)
{
return
tEmployeeRetirementFlagDetailMapper
.
getDatail
(
id
);
}
private
List
<
TEmployeeRetirementExportVo
>
noPageDiy
(
TEmployeeRetirementSearchVo
searchVo
)
{
return
baseMapper
.
noPageDiy
(
searchVo
);
}
private
int
noPageCountDiy
(
TEmployeeRetirementSearchVo
searchVo
)
{
return
baseMapper
.
noPageCountDiy
(
searchVo
);
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeRetirementFlagDetailMapper.xml
0 → 100644
View file @
9fb3109c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeRetirementFlagDetailMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirementFlagDetail"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"datailId"
column=
"DATAIL_ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"context"
column=
"CONTEXT"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,CREATE_BY,CREATE_NAME,DATAIL_ID,
CREATE_TIME,UPDATE_BY,UPDATE_TIME,
CONTEXT
</sql>
<select
id=
"getDatail"
resultType=
"com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirementFlagDetail"
>
SELECT a.ID,a.DATAIL_ID,a.CREATE_NAME,a.CREATE_BY,a.CREATE_TIME,a.CONTEXT
FROM t_employee_retirement_flag_detail a
where a.DATAIL_ID=#{id}
</select>
</mapper>
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeRetirementMapper.xml
0 → 100644
View file @
9fb3109c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeRetirementMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeRetirement"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"empName"
column=
"EMP_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
jdbcType=
"VARCHAR"
/>
<result
property=
"empPhone"
column=
"EMP_PHONE"
jdbcType=
"VARCHAR"
/>
<result
property=
"empSex"
column=
"EMP_SEX"
jdbcType=
"VARCHAR"
/>
<result
property=
"empAge"
column=
"EMP_AGE"
jdbcType=
"INTEGER"
/>
<result
property=
"empNatrue"
column=
"EMP_NATRUE"
jdbcType=
"VARCHAR"
/>
<result
property=
"fileProvince"
column=
"FILE_PROVINCE"
jdbcType=
"INTEGER"
/>
<result
property=
"fileCity"
column=
"FILE_CITY"
jdbcType=
"INTEGER"
/>
<result
property=
"fileTown"
column=
"FILE_TOWN"
jdbcType=
"INTEGER"
/>
<result
property=
"socialProvince"
column=
"SOCIAL_PROVINCE"
jdbcType=
"INTEGER"
/>
<result
property=
"socialCity"
column=
"SOCIAL_CITY"
jdbcType=
"INTEGER"
/>
<result
property=
"socialTown"
column=
"SOCIAL_TOWN"
jdbcType=
"INTEGER"
/>
<result
property=
"deptName"
column=
"DEPT_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"unitName"
column=
"UNIT_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"unitNo"
column=
"UNIT_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"deptNo"
column=
"DEPT_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"handleFlag"
column=
"HANDLE_FLAG"
jdbcType=
"INTEGER"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,EMP_NAME,EMP_IDCARD,
EMP_PHONE,EMP_SEX,EMP_AGE,
EMP_NATRUE,FILE_PROVINCE,FILE_CITY,
FILE_TOWN,SOCIAL_PROVINCE,SOCIAL_CITY,
SOCIAL_TOWN,DEPT_NAME,UNIT_NAME,
UNIT_NO,DEPT_NO,HANDLE_FLAG,
CREATE_BY,CREATE_NAME,CREATE_TIME,
UPDATE_BY,UPDATE_TIME
</sql>
<sql
id=
"tEmployeeRetirement_pageWhere"
>
<if
test=
"searchVo.empName != null and searchVo.empName.trim() != ''"
>
AND a.EMP_NAME like concat('%',#{searchVo.empName},'%')
</if>
<if
test=
"searchVo.empIdcard != null and searchVo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD like concat('%',#{searchVo.empIdcard},'%')
</if>
<if
test=
"searchVo.fileProvince != null"
>
AND a.FILE_PROVINCE = #{searchVo.fileProvince}
</if>
<if
test=
"searchVo.fileCity != null"
>
AND a.FILE_CITY = #{searchVo.fileCity}
</if>
<if
test=
"searchVo.fileTown != null"
>
AND a.FILE_TOWN = #{searchVo.fileTown}
</if>
<if
test=
"searchVo.socialProvince != null"
>
AND a.SOCIAL_PROVINCE = #{searchVo.socialProvince}
</if>
<if
test=
"searchVo.socialCity != null"
>
AND a.SOCIAL_CITY = #{searchVo.socialCity}
</if>
<if
test=
"searchVo.socialTown != null"
>
AND a.SOCIAL_TOWN = #{searchVo.socialTown}
</if>
<if
test=
"searchVo.unitName!= null"
>
AND a.UNIT_NAME = #{searchVo.unitName}
</if>
<if
test=
"searchVo.unitNo!= null"
>
AND a.UNIT_NO = #{searchVo.unitNo}
</if>
<if
test=
"searchVo.deptName!= null"
>
AND a.DEPT_NAME like concat('%',#{searchVo.deptName},'%')
</if>
<if
test=
"searchVo.deptNo!= null"
>
AND a.DEPT_NO =#{searchVo.deptNo}
</if>
<if
test=
"searchVo.handleFlag!= null"
>
AND a.HANDLE_FLAG =#{searchVo.handleFlag}
</if>
<if
test=
"searchVo.empTypeList != null and searchVo.empTypeList.length>0"
>
AND a.EMP_NATRUE IN
<foreach
collection=
"searchVo.empTypeList"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"searchVo.idList != null and searchVo.idList.length > 0"
>
and a.ID in
<foreach
collection=
"searchVo.idList"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</sql>
<sql
id=
"tEmployeeRetirement_where"
>
<if
test=
"searchVo.empName != null and searchVo.empName.trim() != ''"
>
AND a.EMP_NAME like concat('%',#{searchVo.empName},'%')
</if>
<if
test=
"searchVo.empIdcard != null and searchVo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD like concat('%',#{searchVo.empIdcard},'%')
</if>
<if
test=
"searchVo.fileProvince != null"
>
AND b.FILE_PROVINCE = #{searchVo.fileProvince}
</if>
<if
test=
"searchVo.fileCity != null"
>
AND b.FILE_CITY = #{searchVo.fileCity}
</if>
<if
test=
"searchVo.fileTown != null"
>
AND b.FILE_TOWN = #{searchVo.fileTown}
</if>
<if
test=
"searchVo.socialProvince != null"
>
AND a.SOCIAL_PROVINCE = #{searchVo.socialProvince}
</if>
<if
test=
"searchVo.socialCity != null"
>
AND a.SOCIAL_CITY = #{searchVo.socialCity}
</if>
<if
test=
"searchVo.socialTown != null"
>
AND a.SOCIAL_TOWN = #{searchVo.socialTown}
</if>
<if
test=
"searchVo.unitName!= null"
>
AND a.UNIT_NAME = #{searchVo.unitName}
</if>
<if
test=
"searchVo.unitNo!= null"
>
AND a.UNIT_NO = #{searchVo.unitNo}
</if>
<if
test=
"searchVo.deptName!= null"
>
AND a.DEPT_NAME like concat('%',#{searchVo.deptName},'%')
</if>
<if
test=
"searchVo.deptNo!= null"
>
AND a.DEPART_NO =#{searchVo.deptNo}
</if>
<if
test=
"searchVo.handleFlag!= null"
>
AND a.HANDLE_FLAG =#{searchVo.handleFlag}
</if>
<if
test=
"searchVo.empTypeList != null and searchVo.empTypeList.length>0"
>
AND a.EMP_NATRUE IN
<foreach
collection=
"searchVo.empTypeList"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</sql>
<select
id=
"getTEmployeeRetirementPage"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_employee_retirement a
<where>
<include
refid=
"tEmployeeRetirement_pageWhere"
/>
</where>
order by a.CREATE_TIME desc
</select>
<select
id=
"selectByEmpIdcard"
resultType=
"Integer"
>
SELECT count(*)
<include
refid=
"Base_Column_List"
/>
FROM t_employee_retirement a
where EMP_IDCARD=#{empIdCard}
</select>
<select
id=
"getBirthday"
parameterType=
"String"
resultMap=
"BaseResultMap"
>
SELECT a.EMP_NAME,
a.EMP_IDCARD,
b.EMP_SEX,
b.EMP_AGE,
b.EMP_PHONE,
CASE
WHEN MAX(a.EMP_NATRUE)=3 THEN "3"
WHEN MIN(a.EMP_NATRUE)=0 THEN "0"
WHEN MIN(a.EMP_NATRUE)=1 THEN "1"
ELSE a.EMP_NATRUE END as EMP_NATRUE,
a.UNIT_NAME,
a.UNIT_NO,
a.DEPT_NAME,
a.DEPT_NO,
b.FILE_PROVINCE,
b.FILE_CITY,
b.FILE_TOWN,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
b.EMP_BIRTHDAY
FROM t_employee_project a
LEFT JOIN t_employee_info b ON a.EMP_IDCARD = b.EMP_IDCARD
where datediff(#{TT}, b.EMP_BIRTHDAY) = 0
and
b.EMP_SEX = '1'
and b.FILE_STATUS = 0
or datediff(#{LL}, b.EMP_BIRTHDAY) = 0
and b.EMP_SEX = '2'
and b.FILE_STATUS = 0
GROUP BY a.EMP_ID
</select>
<update
id=
"changeHandleFlagAll"
parameterType=
"com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeHandleFlagAllVo"
>
update t_employee_retirement a
set a.HANDLE_FLAG=#{changeHandleFlagAllVo.handleFlag}
where a.ID in
<foreach
item=
"idStr"
index=
"index"
collection=
"changeHandleFlagAllVo.ids"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
</update>
<update
id=
"changeHandleFlag"
parameterType=
"com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeHandleFlagVo"
>
update t_employee_retirement a
set a.HANDLE_FLAG=#{changeHandleFlagVo.handleFlag}
where a.ID = #{changeHandleFlagVo.id}
</update>
<insert
id=
"add"
>
insert into t_employee_retirement (EMP_NAME)
value (#{tEmployeeRetirement.empName})
</insert>
<select
id=
"selectExportCount"
resultType=
"java.lang.Long"
>
SELECT
count(1)
from t_employee_retirement a
<where>
<include
refid=
"tEmployeeRetirement_pageWhere"
/>
</where>
</select>
<select
id=
"noPageDiy"
resultType=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeRetirementExportVo"
>
SELECT a.ID,
EMP_NAME,
EMP_IDCARD,
EMP_PHONE,
CASE WHEN a.EMP_SEX=1 THEN "男"
WHEN a.EMP_SEX =2 THEN "女"
ELSE "" END as "EMP_SEX",
EMP_AGE,
CASE WHEN a.EMP_NATRUE='0' THEN "外包"
WHEN a.EMP_NATRUE='1' THEN "派遣"
WHEN a.EMP_NATRUE='2' THEN "代理"
WHEN a.EMP_NATRUE='3' THEN "内部员工"
ELSE "" END as "EMP_NATRUE",
FILE_PROVINCE,
CASE WHEN a.HANDLE_FLAG=0 THEN "未处理"
WHEN a.HANDLE_FLAG =1 THEN "已处理"
ELSE "" END as "HANDLE_FLAG",
FILE_CITY, FILE_TOWN, SOCIAL_PROVINCE, SOCIAL_CITY, SOCIAL_TOWN,
DEPT_NAME, UNIT_NAME, UNIT_NO, DEPT_NO
<include
refid=
"Base_Column_List"
/>
FROM t_employee_retirement a
<where>
<include
refid=
"tEmployeeRetirement_pageWhere"
/>
</where>
order by a.CREATE_TIME desc
</select>
<!--tEmployeeInfo导出查询count改造 fxj 2022-11-03-->
<select
id=
"noPageCountDiy"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
from t_employee_retirement a
<where>
<include
refid=
"tEmployeeRetirement_pageWhere"
/>
</where>
</select>
<select
id=
"selectByIdd"
resultType=
"String"
>
SELECT a.AREA_NAME
from mvp_salary.sys_area a
where id = #{id}
</select>
</mapper>
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/ExcelAttributeConstants.java
View file @
9fb3109c
...
...
@@ -153,5 +153,10 @@ public class ExcelAttributeConstants {
public
static
final
String
CUSTOMER
=
"customer"
;
public
static
final
String
HOUSEHOLD
=
"household"
;
// 派单办理失败类型
public
static
final
String
DISPATCH_HANDLE_REASON
=
"dispatch-audit-add-reason"
;
// 社保办理失败类型
public
static
final
String
SOCIAL_DISPATCH_HANDLE_REASON
=
"social-conduct-add-reason"
;
// 公积金办理失败类型
public
static
final
String
FUND_DISPATCH_HANDLE_REASON
=
"fund-conduct-add-reason"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java
View file @
9fb3109c
...
...
@@ -567,4 +567,8 @@ public interface ErrorCodes {
* 社保办理:无办理权限或无可需要办理的社保数据
*/
String
SOCIAL_IMPORT_HANDLE_NOT_EXITS
=
"social.import.handle.not.exits"
;
/**
* 社保办理:该数据已处理,请勿重复操作
*/
String
SOCIAL_IMPORT_SAME_INFO
=
"social.import.same.info"
;
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
9fb3109c
...
...
@@ -218,9 +218,10 @@ fund.import.handle.not.exits=\u65E0\u529E\u7406\u6743\u9650\u6216\u65E0\u53EF\u9
fund_import_handle_reason_not_empty
=
\u
516C
\u
79EF
\u
91D1
\u
529E
\u7406\u
FF1A
\u
529E
\u7406\u5931\u
8D25
\u
FF0C
\u5931\u
8D25
\u
7C7B
\u
578B
\u
5FC5
\u
586B
social_import_handle_reason_not_empty
=
\u
793E
\u
4FDD
\u
529E
\u7406\u
FF1A
\u
4EFB
\u
4E00
\u9669\u
79CD
\u
529E
\u7406\u5931\u
8D25
\u
FF0C
\u5931\u
8D25
\u
539F
\u
56E0
\u
5FC5
\u
586B
social_import_handle_reason_not_empty
=
\u
793E
\u
4FDD
\u
529E
\u7406\u
FF1A
\u
4EFB
\u
4E00
\u9669\u
79CD
\u
529E
\u7406\u5931\u
8D25
\u
FF0C
\u5931\u
8D25
\u
7C7B
\u
578B
\u
5FC5
\u
586B
social_import_handle_not_empty
=
\u
793E
\u
4FDD
\u
529E
\u7406\u5931\u
8D25
\u
FF0C
\u
5FC5
\u
987B
\u
529E
\u7406\u5176\u
4E2D
\u
4E00
\u
4E2A
\u9669\u
79CD
social.import.handle.not.exits
=
\u
65E0
\u
529E
\u7406\u6743\u9650\u6216\u
65E0
\u
53EF
\u9700\u8981\u
529E
\u7406\u7684\u
793E
\u
4FDD
\u6570\u
636E
social.import.same.info
=
\u
8BE5
\u6570\u
636E
\u
5DF2
\u5904\u7406\u
FF0C
\u
8BF7
\u
52FF
\u
91CD
\u
590D
\u
64CD
\u
4F5C
...
...
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/ArchiveTask.java
View file @
9fb3109c
...
...
@@ -52,4 +52,12 @@ public class ArchiveTask {
log
.
info
(
"-------------每天更新人员档案、项目档案的过期合同为2不在用-定时任务结束------------"
);
}
public
void
retireeRemind
()
{
log
.
info
(
"-------------每日凌晨1点人员退休提醒-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/temployeeretirement/inner/everyDayRemind"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每日凌晨1点人员退休提醒-定时任务开始------------"
);
}
}
\ No newline at end of file
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TMinSalaryImportVo.java
View file @
9fb3109c
...
...
@@ -40,17 +40,19 @@ public class TMinSalaryImportVo extends RowIndex implements Serializable {
/**
* TODO
*/
@ExcelProperty
(
value
=
"所在地"
)
private
String
location
;
/**
* 省
*/
@ExcelAttribute
(
name
=
"所在地-省"
,
isArea
=
true
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
private
Integer
province
;
/**
* 市
*/
@ExcelAttribute
(
name
=
"户籍所在市"
,
isArea
=
true
,
parentField
=
"province"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Integer
city
;
...
...
@@ -58,23 +60,24 @@ public class TMinSalaryImportVo extends RowIndex implements Serializable {
/**
* 县
*/
@ExcelAttribute
(
name
=
"户籍所在市"
,
isArea
=
true
,
parentField
=
"city"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Integer
town
;
/**
* 最低工资标准
*/
@NotBlank
(
message
=
"最低工资标准不能为空"
)
@Length
(
max
=
11
,
message
=
"最低工资标准不能超过11个字符"
)
@ExcelAttribute
(
name
=
"最低工资(元)"
,
isNotEmpty
=
true
,
errorInfo
=
"最低工资标准不能为空"
,
maxLength
=
11
)
@ExcelAttribute
(
name
=
"最低工资(元)"
,
maxLength
=
11
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"最低工资(元)"
)
private
String
salaryBase
;
/**
* 状态
*/
@NotNull
(
message
=
"状态不能为空"
)
@ExcelAttribute
(
name
=
"状态"
,
isNotEmpty
=
true
,
errorInfo
=
"状态不能为空"
)
@ExcelAttribute
(
name
=
"状态"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"状态"
)
private
String
status
;
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TMinSalaryMapper.java
View file @
9fb3109c
...
...
@@ -31,8 +31,8 @@ public interface TMinSalaryMapper extends BaseMapper<TMinSalary> {
/**
*
缴费库简单分页查询
* @param tMinSalary
缴费库
*
最低工资分页列表总数
* @param tMinSalary
最低工资标准
* @return
*/
Integer
selectCountTMinSalary
(
@Param
(
"tMinSalary"
)
TMinSalarySearchVo
tMinSalary
);
...
...
@@ -56,5 +56,9 @@ public interface TMinSalaryMapper extends BaseMapper<TMinSalary> {
*/
Integer
selectByAreaName
(
String
areaName
);
Integer
selectByPName
(
Integer
id
);
Integer
selectByCName
(
Integer
id
);
Integer
selectByTName
(
Integer
id
);
Integer
selectId
(
String
Id
);
TMinSalary
selectAddress
();
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TMinSalaryService.java
View file @
9fb3109c
...
...
@@ -39,6 +39,13 @@ public interface TMinSalaryService extends IService<TMinSalary> {
R
<
Boolean
>
updateByIdDIy
(
TMinSalary
tMinSalary
);
/**
* 最低工资批量更新
*
* @author wzb
* @param inputStream
* @return {@link R}
*/
R
importList
(
InputStream
inputStream
);
/**
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TMinSalaryServiceImpl.java
View file @
9fb3109c
...
...
@@ -14,10 +14,14 @@ 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.CacheConstants
;
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.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAddParam
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TMinSalaryMapper
;
...
...
@@ -51,7 +55,7 @@ import java.util.stream.Collectors;
* @Date 13:17 2022/8/6
* @Param
* @return
**/
**/
@Service
(
"tMinSalaryService"
)
public
class
TMinSalaryServiceImpl
extends
ServiceImpl
<
TMinSalaryMapper
,
TMinSalary
>
implements
TMinSalaryService
{
...
...
@@ -131,8 +135,6 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
}
@Override
public
List
<
TMinSalaryExportVo
>
exportList
(
TMinSalarySearchVo
tMinSalary
)
{
return
baseMapper
.
getTMinSalaryNoPage
(
tMinSalary
);
...
...
@@ -140,11 +142,11 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
/**
*
最低工资导出
*
批量更新
*
* @author wzb
* @param inputStream
* @return {@link R}
* @author wzb
*/
@Override
public
R
importList
(
InputStream
inputStream
)
{
...
...
@@ -157,33 +159,232 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
data
.
setRowIndex
(
rowIndex
+
1
);
StringBuilder
errorMessage
=
new
StringBuilder
(
""
);
if
(
Common
.
isEmpty
(
data
.
getId
()))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"更新的ID为空;"
);
errorMessage
.
append
(
"ID为空;"
);
}
else
{
TMinSalary
ll
=
baseMapper
.
selectById
(
data
.
getId
());
if
(
Common
.
isEmpty
(
baseMapper
.
selectById
(
data
.
getId
())))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"ID不存在无法更新,请核实后再操作!;"
);
}
if
(
Common
.
isEmpty
(
data
.
getLocation
())
&&
Common
.
isEmpty
(
data
.
getSalaryBase
())
&&
Common
.
isEmpty
(
data
.
getStatus
()))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"所在地、最低工资(元)、状态为空;"
);
if
(
null
!=
data
.
getLocation
())
{
if
(
data
.
getLocation
().
contains
(
"/"
))
{
String
location
[]
=
data
.
getLocation
().
split
(
"/"
);
if
(!
data
.
getLocation
().
isEmpty
())
{
if
(
location
.
length
==
1
)
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"所在地”请精确到市或县/区;"
);
}
String
redisProvinceName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisProvinceName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
}
if
(
location
.
length
==
2
)
{
String
redisProvinceName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisProvinceName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
String
redisCityName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ONE_INT
]
+
"_"
+
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisCityName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
TMinSalary
entity
=
baseMapper
.
selectById
(
data
.
getId
());
if
(
Common
.
isNotNull
(
entity
))
{
LambdaQueryWrapper
<
TMinSalary
>
query
=
new
LambdaQueryWrapper
<>();
if
(
Common
.
isNotNull
(
redisProvinceName
))
{
query
.
eq
(
TMinSalary:
:
getProvince
,
redisProvinceName
);
}
if
(
Common
.
isNotNull
(
redisCityName
))
{
query
.
eq
(
TMinSalary:
:
getCity
,
redisCityName
);
}
query
.
ne
(
TMinSalary:
:
getId
,
data
.
getId
());
long
res
=
baseMapper
.
selectCount
(
query
);
if
(
res
>
CommonConstants
.
ZERO_INT
)
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"已存在对应区域在用的配置信息;"
);
}
}
}
if
(
location
.
length
>
2
)
{
String
redisProvinceName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisProvinceName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
String
redisCityName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ONE_INT
]
+
"_"
+
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisCityName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
String
redisTownName
=
getRedisAreaValue
(
location
[
CommonConstants
.
TWO_INT
]
+
"_"
+
location
[
CommonConstants
.
ONE_INT
]);
if
(
Common
.
isEmpty
(
redisTownName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
TMinSalary
entity
=
baseMapper
.
selectById
(
data
.
getId
());
if
(
Common
.
isNotNull
(
entity
))
{
LambdaQueryWrapper
<
TMinSalary
>
query
=
new
LambdaQueryWrapper
<>();
if
(
Common
.
isNotNull
(
redisCityName
))
{
query
.
eq
(
TMinSalary:
:
getProvince
,
redisCityName
);
}
if
(
Common
.
isNotNull
(
redisCityName
))
{
query
.
eq
(
TMinSalary:
:
getCity
,
redisCityName
);
}
if
(
Common
.
isNotNull
(
redisTownName
))
{
query
.
eq
(
TMinSalary:
:
getTown
,
redisTownName
);
}
if
(
Common
.
isEmpty
(
location
[
2
]))
{
query
.
isNull
(
TMinSalary:
:
getTown
);
}
query
.
ne
(
TMinSalary:
:
getId
,
data
.
getId
());
long
res
=
baseMapper
.
selectCount
(
query
);
if
(
res
>
CommonConstants
.
ZERO_INT
)
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"已存在对应区域在用的配置信息;"
);
}
}
}
if
(
null
!=
data
.
getSalaryBase
())
{
if
(!
ValidityUtil
.
validateStandard
(
data
.
getSalaryBase
()))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"最低工资,请填写>0的两位小数;"
);
}
}
if
(!
data
.
getStatus
().
isEmpty
())
{
if
(!(
CommonConstants
.
START
.
equals
(
data
.
getStatus
())
||
CommonConstants
.
STOP
.
equals
(
data
.
getStatus
())))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"填写的状态不是启用或停用"
);
}
}
}
if
(
data
.
getLocation
().
contains
(
"-"
))
{
String
location
[]
=
data
.
getLocation
().
split
(
"-"
);
if
(!
data
.
getLocation
().
isEmpty
())
{
if
(
location
.
length
==
1
)
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"所在地”请精确到市或县/区;"
);
}
String
redisProvinceName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisProvinceName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
}
if
(
Common
.
isEmpty
(
data
.
getLocation
()))
{
if
(
location
.
length
==
2
)
{
String
redisProvinceName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisProvinceName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"所在地为空;"
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
String
redisCityName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ONE_INT
]
+
"_"
+
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisCityName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
TMinSalary
entity
=
baseMapper
.
selectById
(
data
.
getId
());
if
(
Common
.
isNotNull
(
entity
))
{
LambdaQueryWrapper
<
TMinSalary
>
query
=
new
LambdaQueryWrapper
<>();
if
(
Common
.
isNotNull
(
redisProvinceName
))
{
query
.
eq
(
TMinSalary:
:
getProvince
,
redisProvinceName
);
}
if
(
Common
.
isNotNull
(
redisCityName
))
{
query
.
eq
(
TMinSalary:
:
getCity
,
redisCityName
);
}
query
.
ne
(
TMinSalary:
:
getId
,
data
.
getId
());
long
res
=
baseMapper
.
selectCount
(
query
);
if
(
res
>
CommonConstants
.
ZERO_INT
)
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"已存在对应区域在用的配置信息;"
);
}
}
if
(
Common
.
isEmpty
(
data
.
getSalaryBase
()))
{
}
if
(
location
.
length
>
2
)
{
String
redisProvinceName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisProvinceName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
String
redisCityName
=
getRedisAreaValue
(
location
[
CommonConstants
.
ONE_INT
]
+
"_"
+
location
[
CommonConstants
.
ZERO_INT
]);
if
(
Common
.
isEmpty
(
redisCityName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
String
redisTownName
=
getRedisAreaValue
(
location
[
CommonConstants
.
TWO_INT
]
+
"_"
+
location
[
CommonConstants
.
ONE_INT
]);
if
(
Common
.
isEmpty
(
redisTownName
))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"对应区域不存在;"
);
}
TMinSalary
entity
=
baseMapper
.
selectById
(
data
.
getId
());
if
(
Common
.
isNotNull
(
entity
))
{
LambdaQueryWrapper
<
TMinSalary
>
query
=
new
LambdaQueryWrapper
<>();
if
(
Common
.
isNotNull
(
redisCityName
))
{
query
.
eq
(
TMinSalary:
:
getProvince
,
redisCityName
);
}
if
(
Common
.
isNotNull
(
redisCityName
))
{
query
.
eq
(
TMinSalary:
:
getCity
,
redisCityName
);
}
if
(
Common
.
isNotNull
(
redisTownName
))
{
query
.
eq
(
TMinSalary:
:
getTown
,
redisTownName
);
}
if
(
Common
.
isEmpty
(
location
[
2
]))
{
query
.
isNull
(
TMinSalary:
:
getTown
);
}
query
.
ne
(
TMinSalary:
:
getId
,
data
.
getId
());
long
res
=
baseMapper
.
selectCount
(
query
);
if
(
res
>
CommonConstants
.
ZERO_INT
)
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"最低工资标准为空;"
);
errorMessage
.
append
(
"已存在对应区域在用的配置信息;"
);
}
}
if
(
Common
.
isEmpty
(
data
.
getStatus
()))
{
}
if
(
null
!=
data
.
getSalaryBase
())
{
if
(!
ValidityUtil
.
validateStandard
(
data
.
getSalaryBase
()))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"状态为空;"
);
errorMessage
.
append
(
"最低工资,请填写>0的两位小数;"
);
}
}
if
(
CommonConstants
.
ZERO_INT
==
baseMapper
.
selectId
(
data
.
getId
()))
{
if
(
null
!=
data
.
getStatus
())
{
if
(!(
CommonConstants
.
START
.
equals
(
data
.
getStatus
())
||
CommonConstants
.
STOP
.
equals
(
data
.
getStatus
())))
{
data
.
setErrorFlag
(
true
);
errorMessage
.
append
(
"不是系统内的数据;"
);
errorMessage
.
append
(
"填写的状态不是启用或停用"
);
}
}
}
}
}
if
(
data
.
isErrorFlag
()){
}
if
(
data
.
isErrorFlag
())
{
data
.
setErrorMessage
(
errorMessage
.
toString
());
}
tMinSalaryImportVoList
.
add
(
data
);
}
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
saveData
();
...
...
@@ -191,38 +392,64 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
private
void
saveData
()
{
List
<
TMinSalaryImportVo
>
salaryImportsSuccessList
=
tMinSalaryImportVoList
.
stream
().
filter
(
e
->
e
.
isErrorFlag
()
!=
true
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
salaryImportsSuccessList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
salaryImportsSuccessList
))
{
//将成功的数据转换成需要入库的格式
salaryImportsSuccessList
.
stream
().
forEach
(
e
->
{
salaryImportsSuccessList
.
stream
().
forEach
(
e
->
{
TMinSalary
selectOne
=
new
TMinSalary
();
selectOne
.
setId
(
e
.
getId
());
String
location
[]=
e
.
getLocation
().
split
(
"/"
);
for
(
int
i
=
0
;
i
<
location
.
length
;
i
++){
if
(
i
==
0
){
int
province
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
if
(
null
!=
e
.
getLocation
())
{
if
(
e
.
getLocation
().
contains
(
"/"
))
{
String
location
[]
=
e
.
getLocation
().
split
(
"/"
);
if
(
location
.
length
>
1
)
{
for
(
int
i
=
0
;
i
<
location
.
length
;
i
++)
{
if
(
i
==
CommonConstants
.
ZERO_INT
)
{
int
province
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
selectOne
.
setProvince
(
province
);
}
if
(
i
==
1
)
{
int
city
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
if
(
i
==
CommonConstants
.
ONE_INT
)
{
int
city
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
selectOne
.
setCity
(
city
);
}
if
(
i
==
2
){
int
town
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
selectOne
.
setTown
(
town
);;
if
(
i
==
CommonConstants
.
TWO_INT
)
{
int
town
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
selectOne
.
setTown
(
town
);
}
}
}
if
(
e
.
getStatus
().
equals
(
"启用"
)){
}
if
(
e
.
getLocation
().
contains
(
"-"
))
{
String
location
[]
=
e
.
getLocation
().
split
(
"-"
);
if
(
location
.
length
>
1
)
{
for
(
int
i
=
0
;
i
<
location
.
length
;
i
++)
{
if
(
i
==
CommonConstants
.
ZERO_INT
)
{
int
province
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
selectOne
.
setProvince
(
province
);
}
if
(
i
==
CommonConstants
.
ONE_INT
)
{
int
city
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
selectOne
.
setCity
(
city
);
}
if
(
i
==
CommonConstants
.
TWO_INT
)
{
int
town
=
baseMapper
.
selectByAreaName
(
location
[
i
]);
selectOne
.
setTown
(
town
);
}
}
}
}
}
if
(
CommonConstants
.
START
.
equals
(
e
.
getStatus
()))
{
selectOne
.
setStatus
(
CommonConstants
.
ONE_INT
);
}
if
(
e
.
getStatus
().
equals
(
"停用"
))
{
if
(
CommonConstants
.
STOP
.
equals
(
e
.
getStatus
()
))
{
selectOne
.
setStatus
(
CommonConstants
.
TWO_INT
);
}
selectOne
.
setSalaryBase
(
e
.
getSalaryBase
());
selectOne
.
setUpdateTime
(
LocalDateTime
.
now
());
baseMapper
.
updateById
(
selectOne
);
}
);
}
);
}
}
...
...
@@ -236,13 +463,12 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
List
<
TMinSalaryImportVo
>
errorImportErrorList
=
tMinSalaryImportVoList
.
stream
().
filter
(
e
->
e
.
isErrorFlag
()
==
true
).
collect
(
Collectors
.
toList
());
return
R
.
ok
(
errorImportErrorList
);
}
}
private
String
getRedisAreaValue
(
String
areaString
)
{
return
String
.
valueOf
(
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_VALUE
+
areaString
));
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TMinSalaryMapper.xml
View file @
9fb3109c
...
...
@@ -230,16 +230,38 @@
</select>
<select
id=
"selectByAreaName"
resultType=
"
i
nteger"
>
<select
id=
"selectByAreaName"
resultType=
"
I
nteger"
>
select id from sys_area
WHERE AREA_NAME=#{areaName}
limit 1
</select>
<select
id=
"selectByPName"
resultType=
"Integer"
>
select count(1) from t_min_salary
WHERE PROVINCE=#{id}
limit 1
</select>
<select
id=
"selectByTName"
resultType=
"Integer"
>
select count(1) from t_min_salary
WHERE CITY=#{id}
limit 1
</select>
<select
id=
"selectByCName"
resultType=
"Integer"
>
select count(1) from t_min_salary
WHERE TOWN=#{id}
limit 1
</select>
<select
id=
"selectId"
resultType=
"java.lang.Integer"
>
select count(1)
from t_min_salary
WHERE ID=#{Id}
</select>
<select
id=
"selectAddress"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary"
>
select * from t_min_salary
</select>
</mapper>
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/FundImportHandleVo.java
View file @
9fb3109c
...
...
@@ -16,21 +16,14 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
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
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 派单信息记录表
...
...
@@ -65,14 +58,14 @@ public class FundImportHandleVo extends RowIndex implements Serializable {
/**
* 办理意见
*/
@ExcelAttribute
(
name
=
"办理意见"
)
@ExcelAttribute
(
name
=
"办理意见"
,
maxLength
=
150
,
errorInfo
=
"办理意见长度不可超过150!"
)
@Schema
(
description
=
"办理意见"
)
@ExcelProperty
(
"办理意见"
)
@ExcelProperty
(
"办理意见"
)
private
String
remark
;
/**
* 失败类型
*/
@ExcelAttribute
(
name
=
"失败类型"
)
@ExcelAttribute
(
name
=
"失败类型"
,
isDataId
=
true
,
isConvert
=
false
,
dataType
=
ExcelAttributeConstants
.
FUND_DISPATCH_HANDLE_REASON
)
@Schema
(
description
=
"失败类型"
)
@ExcelProperty
(
"失败类型"
)
private
String
reasonType
;
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SocialHandleSearchVo.java
View file @
9fb3109c
...
...
@@ -83,4 +83,12 @@ public class SocialHandleSearchVo extends TDispatchInfo {
@ExcelAttribute
(
name
=
"派单项查询"
)
@Schema
(
description
=
"派单项查询"
)
private
List
<
String
>
dispatchItems
;
/**
* 菜单id
*/
@TableField
(
exist
=
false
)
@Schema
(
description
=
"mid"
)
@ExcelIgnore
private
String
mId
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SocialImportHandleVo.java
View file @
9fb3109c
...
...
@@ -18,6 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.social.vo;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -100,7 +101,7 @@ public class SocialImportHandleVo extends RowIndex implements Serializable {
/**
* 办理意见
*/
@ExcelAttribute
(
name
=
"办理意见"
)
@ExcelAttribute
(
name
=
"办理意见"
,
maxLength
=
150
)
@Schema
(
description
=
"办理意见"
)
@ExcelProperty
(
"办理意见"
)
private
String
remark
;
...
...
@@ -108,7 +109,7 @@ public class SocialImportHandleVo extends RowIndex implements Serializable {
/**
* 失败类型
*/
@ExcelAttribute
(
name
=
"失败类型"
)
@ExcelAttribute
(
name
=
"失败类型"
,
isDataId
=
true
,
isConvert
=
false
,
dataType
=
ExcelAttributeConstants
.
SOCIAL_DISPATCH_HANDLE_REASON
)
@Schema
(
description
=
"失败类型"
)
@ExcelProperty
(
"失败类型"
)
private
String
reasonType
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java
View file @
9fb3109c
...
...
@@ -512,7 +512,7 @@ public class TDispatchInfoController {
@Operation
(
description
=
"社保批量办理导入"
)
@SysLog
(
"社保批量办理导入"
)
@PostMapping
(
"/importSocialHandler"
)
public
R
<
List
<
ErrorMessage
>>
importSocialHandler
(
@RequestBody
MultipartFile
file
){
public
R
<
List
<
ErrorMessage
>>
importSocialHandler
(
@RequestBody
MultipartFile
file
,
@RequestParam
String
mId
){
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
...
...
@@ -528,7 +528,7 @@ public class TDispatchInfoController {
try
{
if
(
Common
.
isNotNull
(
requestId
))
{
//主动释放锁
return
tDispatchInfoService
.
importSocialHandler
(
file
.
getInputStream
());
return
tDispatchInfoService
.
importSocialHandler
(
file
.
getInputStream
()
,
mId
);
}
else
{
return
R
.
failed
(
ResultConstants
.
NO_GETLOCK_DATA
);
}
...
...
@@ -643,7 +643,7 @@ public class TDispatchInfoController {
@Operation
(
summary
=
"单个派增 权限:social_dispatchinfo_add"
,
description
=
"单个派增"
)
@PostMapping
(
"/fundImportHandle"
)
//@PreAuthorize("@pms.hasPermission('fund_import_handle')")
public
R
<
List
<
ErrorMessage
>>
fundImportHandle
(
@RequestBody
MultipartFile
file
)
{
public
R
<
List
<
ErrorMessage
>>
fundImportHandle
(
@RequestBody
MultipartFile
file
,
@RequestParam
(
required
=
true
)
String
mId
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
))
{
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
...
...
@@ -659,7 +659,16 @@ public class TDispatchInfoController {
try
{
if
(
Common
.
isNotNull
(
requestId
))
{
//主动释放锁
return
tDispatchInfoService
.
fundImportHandle
(
file
.
getInputStream
());
TDispatchInfo
tDispatchInfo
=
new
TDispatchInfo
();
tDispatchInfo
.
setMId
(
mId
);
tDispatchInfo
.
setMenuInfo
(
mId
);
tDispatchInfo
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
menuUtil
.
setAuthSql
(
user
,
tDispatchInfo
);
if
(
Common
.
isNotNull
(
tDispatchInfo
.
getAuthSql
())
&&
tDispatchInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
tDispatchInfo
.
setAuthSql
(
tDispatchInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"a.SETTLE_DOMAIN"
));
}
tDispatchInfo
.
setCreateBy
(
user
.
getId
());
return
tDispatchInfoService
.
fundImportHandle
(
file
.
getInputStream
(),
tDispatchInfo
);
}
else
{
return
R
.
failed
(
ResultConstants
.
NO_GETLOCK_DATA
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TForecastLibraryMapper.java
View file @
9fb3109c
...
...
@@ -69,6 +69,9 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> {
int
updateForecastFundStatusByIdList
(
@Param
(
"idList"
)
List
<
String
>
idList
,
@Param
(
"status"
)
String
status
);
int
deleteForecastSocial
(
@Param
(
"idCard"
)
String
idCard
,
@Param
(
"socialPayMonth"
)
String
socialPayMonth
,
@Param
(
"socialCreateMonth"
)
String
socialCreateMonth
,
@Param
(
"fundPayMonth"
)
String
fundPayMonth
,
@Param
(
"fundCreateMonth"
)
String
fundCreateMonth
);
void
updateForSocialAndFound
(
@Param
(
"infoVo"
)
UpdateSocialFoundVo
infoVo
);
/**
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TDispatchInfoService.java
View file @
9fb3109c
...
...
@@ -53,7 +53,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
,
String
orderId
);
R
<
List
<
ErrorMessage
>>
importSocialHandler
(
InputStream
inputStream
);
R
<
List
<
ErrorMessage
>>
importSocialHandler
(
InputStream
inputStream
,
String
mId
);
void
listExport
(
HttpServletResponse
response
,
TDispatchInfoSearchVo
searchVo
);
...
...
@@ -111,7 +111,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
**/
R
<
List
<
ErrorMessage
>>
dispatchAdd
(
TDispatchImportVo
importVo
);
R
<
List
<
ErrorMessage
>>
fundImportHandle
(
InputStream
inputStream
);
R
<
List
<
ErrorMessage
>>
fundImportHandle
(
InputStream
inputStream
,
TDispatchInfo
tDispatchInfo
);
R
<
Boolean
>
updateExportSocialFlagById
(
String
id
,
String
status
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TForecastLibraryService.java
View file @
9fb3109c
...
...
@@ -78,21 +78,21 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
/**
* @param socialFundInfo
* @Description: 派单
变更预估库
* @Description: 派单
减少变更预估库-派减
* @Author: hgw
* @Date: 2022/7/26 19:02
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
updateForecastLibaryByDispatch
(
TSocialFundInfo
socialFundInfo
);
R
<
String
>
updateForecastLibaryByDispatch
Reduce
(
TSocialFundInfo
socialFundInfo
,
int
forecastFlag
);
/**
* @param socialFundInfo
* @Description: 派单
减少变更预估库-派减
* @Description: 派单
变更预估库
* @Author: hgw
* @Date: 2022/7/26 19:02
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
updateForecastLibaryByDispatch
Reduce
(
TSocialFundInfo
socialFundInfo
,
int
forecastFlag
);
R
<
String
>
updateForecastLibaryByDispatch
(
TSocialFundInfo
socialFundInfo
);
/**
* @Description: 户调基-基数变更,同步社保公积金查询、预估库
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
9fb3109c
...
...
@@ -78,6 +78,7 @@ import java.math.BigDecimal;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -3650,13 +3651,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
temp
.
append
(
DispatchConstants
.
DISPATCH_SOCIAL_ADD
);
temp
.
append
(
Common
.
isNullToString
(
socialTypeRemark
));
temp
.
append
(
DispatchConstants
.
DISPATCH_HANDLE_SUCCESS
);
initAuditInfo
(
auditInfo
,
(
temp
+
ServiceUtil
.
ifNullToEmpty
(
handleRemark
)),
CommonConstants
.
THREE_STRING
,
user
,
temp
.
toString
().
concat
(
handleRemark
),
remark
);
initAuditInfo
(
auditInfo
,
(
temp
+
ServiceUtil
.
ifNullToEmpty
(
handleRemark
)),
CommonConstants
.
THREE_STRING
,
user
,
temp
.
toString
().
concat
(
ServiceUtil
.
ifNullToEmpty
(
handleRemark
)
),
remark
);
}
else
{
temp
.
setLength
(
CommonConstants
.
ZERO_INT
);
temp
.
append
(
DispatchConstants
.
DISPATCH_SOCIAL_ADD
);
temp
.
append
(
Common
.
isNullToString
(
socialTypeRemark
));
temp
.
append
(
DispatchConstants
.
DISPATCH_HANDLE_FAIL
);
initAuditInfo
(
auditInfo
,
(
temp
+
ServiceUtil
.
ifNullToEmpty
(
handleRemark
)),
CommonConstants
.
FOUR_STRING
,
user
,
temp
.
toString
().
concat
(
handleRemark
),
remark
);
initAuditInfo
(
auditInfo
,
(
temp
+
ServiceUtil
.
ifNullToEmpty
(
handleRemark
)),
CommonConstants
.
FOUR_STRING
,
user
,
temp
.
toString
().
concat
(
ServiceUtil
.
ifNullToEmpty
(
handleRemark
)
),
remark
);
}
auditInfo
.
setSocialId
(
dis
.
getId
());
}
...
...
@@ -3872,20 +3873,20 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 全部办理失败 社保和公积金派增办理失败 减少预估
if
(
CommonConstants
.
ONE_INT
==
flag
&&
(
CommonConstants
.
FIVE_STRING
.
equals
(
sf
.
getSocialStatus
())
||
CommonConstants
.
FOUR_STRING
.
equals
(
sf
.
getFundStatus
()))){
||
CommonConstants
.
FOUR_STRING
.
equals
(
sf
.
getFundStatus
())))
{
// 派增办理,全部失败 同步预估库数据
socialTask
.
asynchronousDisPatchHandle
(
sf
,
forecastFlag
,
null
,
null
,
CommonConstants
.
ZERO_INT
);
socialTask
.
asynchronousDisPatchHandle
(
sf
,
forecastFlag
,
null
,
null
,
CommonConstants
.
ZERO_INT
);
}
// 社保办理只要办理成功就刷新预估数据 公积金办理不用处理(前面公积金办理成功的时候处理过了)
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
typeSub
)
&&
(
Common
.
isNotNull
(
dis
.
getSocialId
())
&&
CommonConstants
.
FOUR_STRING
.
equals
(
sf
.
getSocialStatus
())
||
CommonConstants
.
TWO_STRING
.
equals
(
sf
.
getSocialStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
sf
.
getSocialStatus
()))){
if
(
partSuccess
){
||
CommonConstants
.
THREE_STRING
.
equals
(
sf
.
getSocialStatus
())))
{
if
(
partSuccess
)
{
forecastLibraryService
.
updateForecastLibaryByDispatch
(
sf
);
}
else
{
socialTask
.
asynchronousDisPatchHandle
(
sf
,
0
,
null
,
null
,
CommonConstants
.
ONE_INT
);
}
else
{
socialTask
.
asynchronousDisPatchHandle
(
sf
,
0
,
null
,
null
,
CommonConstants
.
ONE_INT
);
}
}
}
...
...
@@ -5022,13 +5023,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Transactional
(
rollbackFor
=
Exception
.
class
)
@ShardingTransactionType
(
TransactionType
.
BASE
)
@Override
public
R
<
List
<
ErrorMessage
>>
fundImportHandle
(
InputStream
inputStream
)
{
public
R
<
List
<
ErrorMessage
>>
fundImportHandle
(
InputStream
inputStream
,
TDispatchInfo
tDispatchInfo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
FundImportHandleVo
>
util1
=
new
ExcelUtil
<>(
FundImportHandleVo
.
class
);
ConcurrentHashMap
<
String
,
String
>
map
=
new
ConcurrentHashMap
<>();
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
...
...
@@ -5073,7 +5075,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
fundImportHandle
(
cachedDataList
,
errorMessageList
,
user
);
fundImportHandle
(
cachedDataList
,
errorMessageList
,
user
,
tDispatchInfo
,
map
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
...
...
@@ -5091,7 +5093,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Param
* @return
**/
public
void
fundImportHandle
(
List
<
FundImportHandleVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
)
{
public
void
fundImportHandle
(
List
<
FundImportHandleVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
TDispatchInfo
dispatchInfo
,
ConcurrentHashMap
<
String
,
String
>
map
)
{
if
(!
Common
.
isNotNull
(
excelVOList
))
{
return
;
}
...
...
@@ -5101,6 +5104,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
String
handleStatus
=
"2"
;
SocialHandleSearchVo
tDispatchInfo
=
new
SocialHandleSearchVo
();
tDispatchInfo
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
tDispatchInfo
.
setAuthSql
(
dispatchInfo
.
getAuthSql
());
tDispatchInfo
.
setCreateBy
(
dispatchInfo
.
getCreateBy
());
tDispatchInfo
.
setMId
(
dispatchInfo
.
getMId
());
tDispatchInfo
.
setMenuInfo
(
dispatchInfo
.
getMenuInfo
());
menuUtil
.
setAuthSql
(
user
,
tDispatchInfo
);
if
(
Common
.
isNotNull
(
tDispatchInfo
.
getAuthSql
())
&&
tDispatchInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
tDispatchInfo
.
setAuthSql
(
tDispatchInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"a.SETTLE_DOMAIN"
));
...
...
@@ -5123,6 +5130,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
CommonConstants
.
PARAM_INFO_ERROR
),
excel
));
continue
;
}
//表内数据重复 员工身份证
if
(
null
==
map
.
get
(
excel
.
getEmpIdcard
()))
{
map
.
put
(
excel
.
getEmpIdcard
(),
excel
.
getRowIndex
().
toString
());
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIAL_IMPORT_SAME_INFO
)
,
excel
));
continue
;
}
// 办理失败,原因必填
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getHandleStatus
())
&&
Common
.
isEmpty
(
excel
.
getReasonType
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
FUND_IMPORT_HANDLE_REASON_NOT_EMPY
),
excel
));
...
...
@@ -5131,6 +5145,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getHandleStatus
()))
{
flag
=
CommonConstants
.
ZERO_INT
;
handleStatus
=
CommonConstants
.
ONE_STRING
;
excel
.
setReasonType
(
CommonConstants
.
EMPTY_STRING
);
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getHandleStatus
()))
{
flag
=
CommonConstants
.
ONE_INT
;
...
...
@@ -5141,10 +5156,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
FUND_IMPORT_HANDLE_NOT_EXITS
),
excel
));
continue
;
}
if
(
Common
.
isEmpty
(
excel
.
getRemark
())){
excel
.
setRemark
(
CommonConstants
.
EMPTY_STRING
);
}
try
{
// 执行数据插入操作 组装
messageList
=
addBatchApplyHandle
(
Collections
.
singletonList
(
dispatch
.
getId
()),
CommonConstants
.
ONE_STRING
,
user
,
flag
,
handleStatus
,
excel
.
getReasonType
(),
null
,
excel
.
getReasonType
()+
CommonConstants
.
COLON_STRING
+
excel
.
getRemark
());
,
flag
,
handleStatus
,
(
Common
.
isEmpty
(
excel
.
getReasonType
())?
""
:
excel
.
getReasonType
()+
CommonConstants
.
COLON_STRING
)
+
excel
.
getRemark
(),
null
,
excel
.
getReasonType
());
if
(
Common
.
isNotNull
(
messageList
)){
errorMessage
=
messageList
.
get
(
CommonConstants
.
ZERO_INT
);
errorMessage
.
setData
(
excel
);
...
...
@@ -5169,13 +5188,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Transactional
(
rollbackFor
=
Exception
.
class
)
@ShardingTransactionType
(
TransactionType
.
BASE
)
@Override
public
R
<
List
<
ErrorMessage
>>
importSocialHandler
(
InputStream
inputStream
)
{
public
R
<
List
<
ErrorMessage
>>
importSocialHandler
(
InputStream
inputStream
,
String
mId
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
SocialImportHandleVo
>
util1
=
new
ExcelUtil
<>(
SocialImportHandleVo
.
class
);
ConcurrentHashMap
<
String
,
String
>
idcardMap
=
new
ConcurrentHashMap
<>();
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
...
...
@@ -5220,7 +5240,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
socialImportHandle
(
cachedDataList
,
errorMessageList
,
user
);
socialImportHandle
(
cachedDataList
,
errorMessageList
,
user
,
mId
,
idcardMap
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
...
...
@@ -5238,7 +5258,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Param
* @return
**/
public
void
socialImportHandle
(
List
<
SocialImportHandleVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
)
{
public
void
socialImportHandle
(
List
<
SocialImportHandleVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
String
mId
,
ConcurrentHashMap
<
String
,
String
>
map
)
{
if
(!
Common
.
isNotNull
(
excelVOList
))
{
return
;
}
...
...
@@ -5246,6 +5267,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
SocialImportHandleVo
excel
;
SocialHandleSearchVo
tDispatchInfo
=
new
SocialHandleSearchVo
();
tDispatchInfo
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
tDispatchInfo
.
setMId
(
mId
);
menuUtil
.
setAuthSql
(
user
,
tDispatchInfo
);
if
(
Common
.
isNotNull
(
tDispatchInfo
.
getAuthSql
())
&&
tDispatchInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
tDispatchInfo
.
setAuthSql
(
tDispatchInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"a.SETTLE_DOMAIN"
));
...
...
@@ -5260,12 +5282,22 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TDispatchInfo
dispatch
;
ErrorMessage
errorMessage
;
List
<
ErrorMessage
>
messageList
=
new
ArrayList
<>();
List
<
ErrorMessage
>
messageList
;
String
handlerRemaek
;
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
StringBuilder
socialSucessType
=
new
StringBuilder
();
StringBuilder
socialFailureType
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
excel
=
excelVOList
.
get
(
i
);
//表内数据重复 员工身份证
if
(
null
==
map
.
get
(
excel
.
getEmpIdcard
()))
{
map
.
put
(
excel
.
getEmpIdcard
(),
excel
.
getRowIndex
().
toString
());
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIAL_IMPORT_SAME_INFO
)
,
excel
));
continue
;
}
//身份证加任一险种必填
if
(
Common
.
isEmpty
(
excel
.
getDbHandleStatus
())
&&
Common
.
isEmpty
(
excel
.
getGsHandleStatus
())
&&
Common
.
isEmpty
(
excel
.
getSjHandleStatus
())
&&
Common
.
isEmpty
(
excel
.
getSyHandleStatus
())
...
...
@@ -5284,7 +5316,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
=
dispatchMap
.
get
(
excel
.
getEmpIdcard
());
if
(
Common
.
isEmpty
(
dispatch
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIAL_IMPORT_HANDLE_NOT_E
MPY
),
excel
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIAL_IMPORT_HANDLE_NOT_E
XITS
),
excel
));
continue
;
}
...
...
@@ -5320,19 +5352,35 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFailureType
.
append
(
"6,"
);
}
try
{
if
(
Common
.
isNotNull
(
excel
.
getReasonType
()))
{
handlerRemaek
=
excel
.
getReasonType
()
+
CommonConstants
.
COLON_STRING
;
}
else
{
handlerRemaek
=
""
;
}
//办理成功处理
if
(
socialSucessType
.
length
()
>
1
)
{
if
(!
CommonConstants
.
TWO_STRING
.
equals
(
dispatch
.
getStatus
()))
{
continue
;
}
// 执行数据插入操作 组装
messageList
=
addBatchApplyHandle
(
Collections
.
singletonList
(
dispatch
.
getId
()),
CommonConstants
.
ZERO_STRING
,
user
,
0
,
CommonConstants
.
ONE_STRING
,
""
,
socialSucessType
.
substring
(
0
,
socialSucessType
.
length
()
-
1
),
excel
.
getRemark
());
,
0
,
CommonConstants
.
ONE_STRING
,
ServiceUtil
.
ifNullToEmpty
(
excel
.
getRemark
()),
socialSucessType
.
substring
(
0
,
socialSucessType
.
length
()
-
1
),
ServiceUtil
.
ifNullToEmpty
(
excel
.
getRemark
()));
if
(
Common
.
isNotNull
(
messageList
))
{
errorMessage
=
messageList
.
get
(
CommonConstants
.
ZERO_INT
);
errorMessage
.
setData
(
excel
);
}
else
{
errorMessage
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
,
CommonConstants
.
GREEN
,
excel
);
}
errorMessageList
.
add
(
errorMessage
);
}
//办理失败处理
if
(
socialFailureType
.
length
()
>
1
)
{
if
(!
CommonConstants
.
TWO_STRING
.
equals
(
dispatch
.
getStatus
()))
{
continue
;
}
// 执行数据插入操作 组装
messageList
=
addBatchApplyHandle
(
Collections
.
singletonList
(
dispatch
.
getId
()),
CommonConstants
.
ZERO_STRING
,
user
,
1
,
CommonConstants
.
TWO_STRING
,
excel
.
getReasonType
(),
socialFailureType
.
substring
(
0
,
socialFailureType
.
length
()
-
1
),
excel
.
getReasonType
()
+
CommonConstants
.
COLON_STRING
+
excel
.
getRemark
());
}
,
1
,
CommonConstants
.
TWO_STRING
,
handlerRemaek
+
ServiceUtil
.
ifNullToEmpty
(
excel
.
getRemark
()),
socialFailureType
.
substring
(
0
,
socialFailureType
.
length
()
-
1
),
handlerRemaek
+
ServiceUtil
.
ifNullToEmpty
(
excel
.
getRemark
()));
if
(
Common
.
isNotNull
(
messageList
))
{
errorMessage
=
messageList
.
get
(
CommonConstants
.
ZERO_INT
);
errorMessage
.
setData
(
excel
);
...
...
@@ -5340,6 +5388,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessage
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
,
CommonConstants
.
GREEN
,
excel
);
}
errorMessageList
.
add
(
errorMessage
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"批量导入办理异常:"
,
e
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_FAILED
,
excel
));
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
9fb3109c
...
...
@@ -1862,12 +1862,16 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return
R
.
failed
(
"无需要重新生成的数据(无数据或数据已结算不可重新生成!)"
);
}
//先删除然后重新生成
boolean
isSaveAndUpdate
=
false
;
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
librarySocialList
))
{
baseMapper
.
deleteBatchIds
(
librarySocialList
);
}
if
(
Common
.
isNotNull
(
libraryFundList
))
{
baseMapper
.
deleteBatchIds
(
libraryFundList
);
}
}
// 新基数,老比例,存放Map
HashMap
<
String
,
TForecastLibrary
>
socialHistoryMap
=
new
HashMap
<>();
HashMap
<
String
,
TForecastLibrary
>
fundHistoryMap
=
new
HashMap
<>();
...
...
@@ -1877,14 +1881,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
// 组建基础Map
this
.
getBaseMap
(
librarySocialList
,
librarySocialListTemp
,
libraryFundList
,
libraryFundListTemp
,
socialHistoryMap
,
fundHistoryMap
,
socialPushMap
,
fundPushMap
);
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
=
new
HashMap
<>();
boolean
isReduceSocial
=
false
;
boolean
isReduceFund
=
false
;
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
=
new
HashMap
<>();
// 核心刷新
R
<
String
>
coreR
=
this
.
doCore
(
payMonthList
,
socialInfoList
,
fundList
,
agentConfigHashMap
,
socialHistoryMap
,
fundHistoryMap
,
socialPushMap
,
fundPushMap
,
saveLibraryMap
,
isReduceSocial
,
isReduceFund
,
isOnly
);
if
(
coreR
!=
null
)
return
coreR
;
boolean
isSaveAndUpdate
=
false
;
YifuUser
user
=
SecurityUtils
.
getUser
();
String
userId
=
"305"
;
String
userName
=
"系统"
;
...
...
@@ -1892,6 +1895,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
userId
=
user
.
getId
();
userName
=
user
.
getNickname
();
}
for
(
TForecastLibrary
library
:
saveLibraryMap
.
values
())
{
if
(
Common
.
isEmpty
(
library
.
getSocialId
())
&&
Common
.
isEmpty
(
library
.
getProvidentId
()))
{
continue
;
...
...
@@ -1904,8 +1908,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
log
.
error
(
"更新一条预估耗时:"
+
times
+
"毫秒"
);
isSaveAndUpdate
=
true
;
}
else
{
synchronized
(
this
)
{
if
(
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
library
.
getUnitSocialSum
()))
!=
CommonConstants
.
ZERO_INT
||
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
library
.
getUnitFundSum
()))
!=
CommonConstants
.
ZERO_INT
)
{
//判断是否有重复数据有则删除
baseMapper
.
deleteForecastSocial
(
library
.
getEmpIdcard
(),
library
.
getSocialPayMonth
(),
library
.
getSocialCreateMonth
()
,
library
.
getProvidentPayMonth
(),
library
.
getProvidentCreateMonth
());
library
.
setCreateBy
(
userId
);
library
.
setCreateName
(
userName
);
library
.
setCreateTime
(
LocalDateTime
.
now
());
...
...
@@ -1914,6 +1922,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
}
}
saveLibraryMap
.
clear
();
if
(
Common
.
isNotNull
(
socialFundInfo
.
getSocialId
())
&&
CommonConstants
.
FOUR_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
()))
{
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TForecastLibraryMapper.xml
View file @
9fb3109c
...
...
@@ -678,6 +678,12 @@
</foreach>
</update>
<delete
id=
"deleteForecastSocial"
>
delete from t_forecast_library where (SOCIAL_PAY_MONTH = #{socialPayMonth} and SOCIAL_CREATE_MONTH = #{socialCreateMonth})
or (PROVIDENT_PAY_MONTH = #{fundPayMonth} and PROVIDENT_CREATE_MONTH = #{fundCreateMonth})
and EMP_IDCARD = #{idCard} and DATA_PUSH = 0
</delete>
<!-- 更改薪资公积金结算状态 -->
<update
id=
"updateForSocialAndFound"
>
update t_forecast_library
...
...
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