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
cbcc250c
Commit
cbcc250c
authored
Aug 25, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG修复
parent
cb2eb69c
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
313 additions
and
104 deletions
+313
-104
TSalaryAccount.java
...yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccount.java
+42
-39
TSalaryEmployee.java
...ifu/cloud/plus/v1/yifu/salary/entity/TSalaryEmployee.java
+21
-21
TSalaryEmployeeExportVo.java
...cloud/plus/v1/yifu/salary/vo/TSalaryEmployeeExportVo.java
+142
-0
TSalaryStandardExportVo.java
...cloud/plus/v1/yifu/salary/vo/TSalaryStandardExportVo.java
+9
-9
TSalaryAccountController.java
...s/v1/yifu/salary/controller/TSalaryAccountController.java
+1
-0
TSalaryEmployeeController.java
.../v1/yifu/salary/controller/TSalaryEmployeeController.java
+2
-1
TSalaryStandardController.java
.../v1/yifu/salary/controller/TSalaryStandardController.java
+1
-0
TSalaryEmployeeMapper.java
...oud/plus/v1/yifu/salary/mapper/TSalaryEmployeeMapper.java
+7
-0
TSalaryStandardMapper.java
...oud/plus/v1/yifu/salary/mapper/TSalaryStandardMapper.java
+2
-2
TSalaryEmployeeService.java
...d/plus/v1/yifu/salary/service/TSalaryEmployeeService.java
+2
-1
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+2
-2
TMinSalaryServiceImpl.java
...us/v1/yifu/salary/service/impl/TMinSalaryServiceImpl.java
+3
-0
TSalaryEmployeeServiceImpl.java
.../yifu/salary/service/impl/TSalaryEmployeeServiceImpl.java
+7
-15
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+4
-2
SalaryAccountUtil.java
...ifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
+5
-5
TSalaryEmployeeMapper.xml
...y-biz/src/main/resources/mapper/TSalaryEmployeeMapper.xml
+46
-1
TSalaryStandardMapper.xml
...y-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
+17
-6
No files found.
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccount.java
View file @
cbcc250c
...
...
@@ -64,14 +64,7 @@ public class TSalaryAccount {
@Length
(
max
=
32
,
message
=
"工资表ID不能超过32个字符"
)
@ExcelProperty
(
"工资表ID"
)
private
String
salaryFormId
;
/**
* 薪酬月份
*/
@ExcelAttribute
(
name
=
"薪酬月份"
,
isNotEmpty
=
true
,
errorInfo
=
"薪酬月份不能为空"
,
maxLength
=
6
)
@NotBlank
(
message
=
"薪酬月份不能为空"
)
@Length
(
max
=
6
,
message
=
"薪酬月份不能超过6个字符"
)
@ExcelProperty
(
"薪酬月份"
)
private
String
salaryMonth
;
/**
* 员工 ID
*/
...
...
@@ -93,6 +86,13 @@ public class TSalaryAccount {
@Length
(
max
=
25
,
message
=
"身份证号不能超过25个字符"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
/**
* 手机号
*/
@ExcelAttribute
(
name
=
"手机号码"
,
maxLength
=
11
)
@Length
(
max
=
11
,
message
=
"手机号码不能超过11个字符"
)
@ExcelProperty
(
"手机号码"
)
private
String
empPhone
;
/**
* 银行卡号
*/
...
...
@@ -107,6 +107,25 @@ public class TSalaryAccount {
@Length
(
max
=
50
,
message
=
"开户行总行不能超过50个字符"
)
@ExcelProperty
(
"开户行总行"
)
private
String
bankName
;
/**
* 开户行省
*/
@ExcelAttribute
(
name
=
"开户行省"
,
isArea
=
true
)
@ExcelProperty
(
"开户行省"
)
private
String
bankProvince
;
/**
* 开户行市
*/
@ExcelAttribute
(
name
=
"开户行市"
,
isArea
=
true
,
parentField
=
"bankProvince"
)
@ExcelProperty
(
"开户行市"
)
private
String
bankCity
;
/**
* 开户行支行
*/
@ExcelAttribute
(
name
=
"开户行支行"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"开户行支行不能超过50个字符"
)
@ExcelProperty
(
"开户行支行"
)
private
String
bankSubName
;
/**
* 项目id
*/
...
...
@@ -169,13 +188,21 @@ public class TSalaryAccount {
@ExcelProperty
(
"公积金扣缴月份"
)
private
String
deduProvidentMonth
;
/**
*
报表
类型0:薪资;1:绩效;2:其他;3:劳务费;4:稿酬
*
表单
类型0:薪资;1:绩效;2:其他;3:劳务费;4:稿酬
*/
@ExcelAttribute
(
name
=
"
报表
类型"
,
readConverterExp
=
"0=薪资,1=绩效,2=其他,3=劳务费,4=稿酬"
)
@NotBlank
(
message
=
"
报表
类型不能为空"
)
@Length
(
max
=
32
,
message
=
"
报表
类型不能超过32个字符"
)
@ExcelProperty
(
"
报表
类型"
)
@ExcelAttribute
(
name
=
"
表单
类型"
,
readConverterExp
=
"0=薪资,1=绩效,2=其他,3=劳务费,4=稿酬"
)
@NotBlank
(
message
=
"
表单
类型不能为空"
)
@Length
(
max
=
32
,
message
=
"
表单
类型不能超过32个字符"
)
@ExcelProperty
(
"
表单
类型"
)
private
String
formType
;
/**
* 薪酬月份
*/
@ExcelAttribute
(
name
=
"薪酬月份"
,
isNotEmpty
=
true
,
errorInfo
=
"薪酬月份不能为空"
,
maxLength
=
6
)
@NotBlank
(
message
=
"薪酬月份不能为空"
)
@Length
(
max
=
6
,
message
=
"薪酬月份不能超过6个字符"
)
@ExcelProperty
(
"薪酬月份"
)
private
String
salaryMonth
;
/**
* 结算月
*/
...
...
@@ -265,13 +292,7 @@ public class TSalaryAccount {
@ExcelAttribute
(
name
=
"县"
)
@ExcelProperty
(
"县"
)
private
Integer
town
;
/**
* 手机号
*/
@ExcelAttribute
(
name
=
"手机号码"
,
maxLength
=
11
)
@Length
(
max
=
11
,
message
=
"手机号码不能超过11个字符"
)
@ExcelProperty
(
"手机号码"
)
private
String
empPhone
;
/**
* 是否自有员工0:否;1:是自有员工
*/
...
...
@@ -295,25 +316,7 @@ public class TSalaryAccount {
@ExcelAttribute
(
name
=
"本月是否重复金额0:否;1:是重复导入的"
)
@ExcelProperty
(
"本月是否重复金额0:否;1:是重复导入的"
)
private
Integer
isRepeat
;
/**
* 开户行支行
*/
@ExcelAttribute
(
name
=
"开户行支行"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"开户行支行不能超过50个字符"
)
@ExcelProperty
(
"开户行支行"
)
private
String
bankSubName
;
/**
* 开户行省
*/
@ExcelAttribute
(
name
=
"开户行省"
,
isArea
=
true
)
@ExcelProperty
(
"开户行省"
)
private
String
bankProvince
;
/**
* 开户行市
*/
@ExcelAttribute
(
name
=
"开户行市"
,
isArea
=
true
,
parentField
=
"bankProvince"
)
@ExcelProperty
(
"开户行市"
)
private
String
bankCity
;
/**
* 是否个人承担部分税费:0否1是
*/
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryEmployee.java
View file @
cbcc250c
...
...
@@ -19,9 +19,8 @@ package com.yifu.cloud.plus.v1.yifu.salary.entity;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
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
;
...
...
@@ -30,6 +29,7 @@ import lombok.EqualsAndHashCode;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.time.LocalDateTime
;
/**
* 薪酬人员表
...
...
@@ -74,6 +74,20 @@ public class TSalaryEmployee extends BaseEntity {
@ExcelProperty
(
"客户id"
)
@ExcelIgnore
private
String
unitId
;
/**
* 项目名称
*/
@ExcelAttribute
(
name
=
"项目名称"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"项目名称不能超过50个字符"
)
@ExcelProperty
(
"项目名称"
)
private
String
deptName
;
/**
* 项目编码
*/
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
30
)
@Length
(
max
=
30
,
message
=
"项目编码不能超过30个字符"
)
@ExcelProperty
(
"项目编码"
)
private
String
deptNo
;
/**
* 封面抬头
*/
...
...
@@ -104,20 +118,7 @@ public class TSalaryEmployee extends BaseEntity {
@ExcelProperty
(
"项目id"
)
@ExcelIgnore
private
String
deptId
;
/**
* 项目名称
*/
@ExcelAttribute
(
name
=
"项目名称"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"项目名称不能超过50个字符"
)
@ExcelProperty
(
"项目名称"
)
private
String
deptName
;
/**
* 项目编码
*/
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
30
)
@Length
(
max
=
30
,
message
=
"项目编码不能超过30个字符"
)
@ExcelProperty
(
"项目编码"
)
private
String
deptNo
;
/**
* 开户行总行
*/
...
...
@@ -130,13 +131,13 @@ public class TSalaryEmployee extends BaseEntity {
*/
@ExcelAttribute
(
name
=
"开户行省"
,
isArea
=
true
)
@ExcelProperty
(
"开户行省"
)
private
Integer
bankProvince
;
private
String
bankProvince
;
/**
* 开户行市
*/
@ExcelAttribute
(
name
=
"开户行市"
,
isArea
=
true
,
parentField
=
"bankProvince"
)
@ExcelProperty
(
"开户行市"
)
private
Integer
bankCity
;
private
String
bankCity
;
/**
* 开户行支行
*/
...
...
@@ -170,6 +171,5 @@ public class TSalaryEmployee extends BaseEntity {
*/
@ExcelAttribute
(
name
=
"在职状态"
,
isDataId
=
true
,
readConverterExp
=
"0=在职,1=离职"
)
@ExcelProperty
(
"在职状态"
)
private
Integer
fileStatus
;
private
String
fileStatus
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TSalaryEmployeeExportVo.java
0 → 100644
View file @
cbcc250c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
/**
* @Author fxj
* @Date 2022/8/25
* @Description
* @Version 1.0
*/
@Data
public
class
TSalaryEmployeeExportVo
{
/**
* 员工姓名
*/
@ExcelAttribute
(
name
=
"员工姓名"
,
isNotEmpty
=
true
,
errorInfo
=
"员工姓名不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"员工姓名不能为空"
)
@Length
(
max
=
32
,
message
=
"员工姓名不能超过32个字符"
)
@ExcelProperty
(
"员工姓名"
)
private
String
empName
;
/**
* 身份证号
*/
@ExcelAttribute
(
name
=
"身份证号"
,
isNotEmpty
=
true
,
errorInfo
=
"身份证号不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"身份证号不能为空"
)
@Length
(
max
=
32
,
message
=
"身份证号不能超过32个字符"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
/**
* 客户id
*/
@ExcelAttribute
(
name
=
"客户id"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"客户id不能超过32个字符"
)
@ExcelProperty
(
"客户id"
)
@ExcelIgnore
private
String
unitId
;
/**
* 项目名称
*/
@ExcelAttribute
(
name
=
"项目名称"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"项目名称不能超过50个字符"
)
@ExcelProperty
(
"项目名称"
)
private
String
deptName
;
/**
* 项目编码
*/
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
30
)
@Length
(
max
=
30
,
message
=
"项目编码不能超过30个字符"
)
@ExcelProperty
(
"项目编码"
)
private
String
deptNo
;
/**
* 封面抬头
*/
@ExcelAttribute
(
name
=
"封面抬头"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"封面抬头不能超过50个字符"
)
@ExcelProperty
(
"封面抬头"
)
private
String
invoiceTitle
;
/**
* 客户名称
*/
@ExcelAttribute
(
name
=
"客户名称"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"客户名称不能超过50个字符"
)
@ExcelProperty
(
"客户名称"
)
private
String
unitName
;
/**
* 客户编码
*/
@ExcelAttribute
(
name
=
"客户编码"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"客户编码不能超过32个字符"
)
@ExcelProperty
(
"客户编码"
)
@ExcelIgnore
private
String
unitNo
;
/**
* 项目id
*/
@ExcelAttribute
(
name
=
"项目id"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"项目id不能超过32个字符"
)
@ExcelProperty
(
"项目id"
)
@ExcelIgnore
private
String
deptId
;
/**
* 开户行总行
*/
@ExcelAttribute
(
name
=
"开户行总行"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"开户行总行不能超过50个字符"
)
@ExcelProperty
(
"开户行总行"
)
private
String
bankName
;
/**
* 开户行省
*/
@ExcelAttribute
(
name
=
"开户行省"
,
isArea
=
true
)
@ExcelProperty
(
"开户行省"
)
private
String
bankProvince
;
/**
* 开户行市
*/
@ExcelAttribute
(
name
=
"开户行市"
,
isArea
=
true
,
parentField
=
"bankProvince"
)
@ExcelProperty
(
"开户行市"
)
private
String
bankCity
;
/**
* 开户行支行
*/
@ExcelAttribute
(
name
=
"开户行支行"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"开户行支行不能超过50个字符"
)
@ExcelProperty
(
"开户行支行"
)
private
String
bankSubName
;
/**
* 银行卡号
*/
@ExcelAttribute
(
name
=
"银行卡号"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"银行卡号不能超过50个字符"
)
@ExcelProperty
(
"银行卡号"
)
private
String
bankNo
;
/**
* 手机号码
*/
@ExcelAttribute
(
name
=
"手机号码"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"手机号码不能超过32个字符"
)
@ExcelProperty
(
"手机号码"
)
private
String
empPhone
;
/**
* 计税月份
*/
@ExcelAttribute
(
name
=
"计税月份"
,
maxLength
=
6
)
@Length
(
max
=
6
,
message
=
"计税月份不能超过6个字符"
)
@ExcelProperty
(
"计税月份"
)
private
String
taxMonth
;
/**
* 在职状态(0在职;1离职)
*/
@ExcelAttribute
(
name
=
"在职状态"
,
isDataId
=
true
,
readConverterExp
=
"0=在职,1=离职"
)
@ExcelProperty
(
"在职状态"
)
private
String
fileStatus
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TSalaryStandardExportVo.java
View file @
cbcc250c
...
...
@@ -27,7 +27,7 @@ public class TSalaryStandardExportVo implements Serializable {
*/
@ExcelAttribute
(
name
=
"状态"
,
isDataId
=
true
,
readConverterExp
=
"0=待提交,1=待审核,2=待推送,3=已推送待发放,4=已发放,5=审核不通过,6=确认不通过,7=财务退回,8=结算单调整待审核,9=结算单调整待打印"
)
@NotBlank
(
message
=
"状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)不能为空"
)
@ExcelProperty
(
"状态"
)
@ExcelProperty
(
"
薪酬
状态"
)
private
String
status
;
/**
* 推送月份(YYYYMM)
...
...
@@ -35,7 +35,7 @@ public class TSalaryStandardExportVo implements Serializable {
@ExcelAttribute
(
name
=
"推送月份"
,
isNotEmpty
=
true
,
errorInfo
=
"推送月份(YYYYMM)不能为空"
,
maxLength
=
6
)
@NotBlank
(
message
=
"推送月份(YYYYMM)不能为空"
)
@Length
(
max
=
6
,
message
=
"推送月份(YYYYMM)不能超过6个字符"
)
@ExcelProperty
(
"
推送
月份"
)
@ExcelProperty
(
"
发放
月份"
)
private
String
sendMonth
;
/**
* 项目名称
...
...
@@ -65,13 +65,6 @@ public class TSalaryStandardExportVo implements Serializable {
@Length
(
max
=
50
,
message
=
"封面抬头不能超过50个字符"
)
@ExcelProperty
(
"封面抬头"
)
private
String
invoiceTitle
;
/**
* 创建者-姓名
*/
@Schema
(
description
=
"创建人-姓名"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@ExcelProperty
(
"创建人"
)
private
String
createName
;
/**
* 工资月份(YYYYMM)
*/
...
...
@@ -97,4 +90,11 @@ public class TSalaryStandardExportVo implements Serializable {
@TableField
(
fill
=
FieldFill
.
INSERT
)
@ExcelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
/**
* 创建者-姓名
*/
@Schema
(
description
=
"创建人-姓名"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@ExcelProperty
(
"创建人"
)
private
String
createName
;
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryAccountController.java
View file @
cbcc250c
...
...
@@ -72,6 +72,7 @@ public class TSalaryAccountController {
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TSalaryAccount
>>
getTSalaryAccountPage
(
Page
<
TSalaryAccount
>
page
,
TSalaryAccountSearchVo
tSalaryAccount
)
{
tSalaryAccount
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
return
new
R
<>(
tSalaryAccountService
.
getTSalaryAccountPage
(
page
,
tSalaryAccount
));
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryEmployeeController.java
View file @
cbcc250c
...
...
@@ -23,6 +23,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmployeeService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
...
@@ -71,7 +72,7 @@ public class TSalaryEmployeeController {
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@PostMapping
(
"/noPage"
)
//@PreAuthorize("@pms.hasPermission('salary_tsalaryemployee_get')" )
public
R
<
List
<
TSalaryEmployee
>>
getTSalaryEmployeeNoPage
(
@RequestBody
TSalaryEmployeeSearchVo
tSalaryEmployee
)
{
public
R
<
List
<
TSalaryEmployee
ExportVo
>>
getTSalaryEmployeeNoPage
(
@RequestBody
TSalaryEmployeeSearchVo
tSalaryEmployee
)
{
return
R
.
ok
(
tSalaryEmployeeService
.
noPageDiy
(
tSalaryEmployee
));
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryStandardController.java
View file @
cbcc250c
...
...
@@ -68,6 +68,7 @@ public class TSalaryStandardController {
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TSalaryStandard
>>
getTSalaryStandardPage
(
Page
<
TSalaryStandard
>
page
,
TSalaryStandardSearchVo
tSalaryStandard
)
{
tSalaryStandard
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
return
new
R
<>(
tSalaryStandardService
.
getTSalaryStandardPage
(
page
,
tSalaryStandard
));
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryEmployeeMapper.java
View file @
cbcc250c
...
...
@@ -21,8 +21,13 @@ 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.salary.entity.TSalaryEmployee
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 薪酬人员表
*
...
...
@@ -37,4 +42,6 @@ public interface TSalaryEmployeeMapper extends BaseMapper<TSalaryEmployee> {
* @return
*/
IPage
<
TSalaryEmployee
>
getTSalaryEmployeePage
(
Page
<
TSalaryEmployee
>
page
,
@Param
(
"tSalaryEmployee"
)
TSalaryEmployee
tSalaryEmployee
);
List
<
TSalaryEmployeeExportVo
>
noPageDiy
(
@Param
(
"tSalaryEmployee"
)
TSalaryEmployeeSearchVo
searchVo
,
@Param
(
"idList"
)
List
<
String
>
idList
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryStandardMapper.java
View file @
cbcc250c
...
...
@@ -50,7 +50,7 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> {
*/
IPage
<
TSalaryStandard
>
getTSalaryStandardAuditPage
(
Page
<
TSalaryStandard
>
page
,
@Param
(
"tSalaryStandard"
)
TSalaryStandard
tSalaryStandard
);
List
<
TSalaryStandardExportVo
>
getSalaryStandardExport
(
@Param
(
"searchVo"
)
TSalaryStandardSearchVo
searchVo
);
List
<
TSalaryStandardExportVo
>
getSalaryStandardExport
(
@Param
(
"searchVo"
)
TSalaryStandardSearchVo
searchVo
,
@Param
(
"idList"
)
List
<
String
>
idList
);
int
getSalaryStandardExportCount
(
@Param
(
"searchVo"
)
TSalaryStandardSearchVo
searchVo
);
int
getSalaryStandardExportCount
(
@Param
(
"searchVo"
)
TSalaryStandardSearchVo
searchVo
,
@Param
(
"idList"
)
List
<
String
>
idList
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryEmployeeService.java
View file @
cbcc250c
...
...
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -47,7 +48,7 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
void
listExport
(
HttpServletResponse
response
,
TSalaryEmployeeSearchVo
searchVo
);
List
<
TSalaryEmployee
>
noPageDiy
(
TSalaryEmployeeSearchVo
searchVo
);
List
<
TSalaryEmployee
ExportVo
>
noPageDiy
(
TSalaryEmployeeSearchVo
searchVo
);
/**
* @param employee
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
cbcc250c
...
...
@@ -149,8 +149,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
TSalaryEmployee
es
;
//筛选人员,添加判断:非在职,或开户行为空,或 结算主体等于选择的结算主体且在职,都可以存入Map优先备用
for
(
TSalaryEmployee
e
:
empList
)
{
es
=
empIdCardMap
.
get
(
e
.
getEmpIdcard
());
if
(
es
==
null
||
CommonConstants
.
ZERO_
INT
!=
es
.
getFileStatus
()
||
Common
.
isEmpty
(
es
.
getBankName
())
||
(
e
.
getDeptId
().
equals
(
settleDepart
)
&&
CommonConstants
.
ZERO_
INT
==
e
.
getFileStatus
()
if
(
es
==
null
||
CommonConstants
.
ZERO_
STRING
!=
es
.
getFileStatus
()
||
Common
.
isEmpty
(
es
.
getBankName
())
||
(
e
.
getDeptId
().
equals
(
settleDepart
)
&&
CommonConstants
.
ZERO_
STRING
==
e
.
getFileStatus
()
&&
Common
.
isNotNull
(
e
.
getBankName
())))
{
empIdCardMap
.
put
(
e
.
getEmpIdcard
(),
e
);
empNameMap
.
put
(
e
.
getEmpName
().
replace
(
" "
,
""
),
e
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TMinSalaryServiceImpl.java
View file @
cbcc250c
...
...
@@ -54,6 +54,9 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
if
(
Common
.
isNotNull
(
tMinSalary
.
getTown
())){
query
.
eq
(
TMinSalary:
:
getTown
,
tMinSalary
.
getTown
());
}
if
(
Common
.
isEmpty
(
tMinSalary
.
getTown
())){
query
.
isNull
(
TMinSalary:
:
getTown
);
}
query
.
eq
(
TMinSalary:
:
getStatus
,
CommonConstants
.
ONE_INT
);
long
res
=
baseMapper
.
selectCount
(
query
);
if
(
res
>
CommonConstants
.
ZERO_INT
){
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryEmployeeServiceImpl.java
View file @
cbcc250c
...
...
@@ -43,6 +43,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryEmployeeMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmployeeService
;
import
com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeVo
;
import
lombok.extern.log4j.Log4j2
;
...
...
@@ -92,7 +93,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
public
void
listExport
(
HttpServletResponse
response
,
TSalaryEmployeeSearchVo
searchVo
)
{
String
fileName
=
"薪酬人员表批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
TSalaryEmployee
>
list
=
new
ArrayList
<>();
List
<
TSalaryEmployee
ExportVo
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
ServletOutputStream
out
=
null
;
try
{
...
...
@@ -102,7 +103,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
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
,
TSalaryEmployee
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TSalaryEmployee
ExportVo
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
)
{
...
...
@@ -111,8 +112,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TSalaryEmployee
>
util
=
new
ExcelUtil
<>(
TSalaryEmployee
.
class
);
for
(
TSalaryEmployee
vo
:
list
)
{
ExcelUtil
<
TSalaryEmployee
ExportVo
>
util
=
new
ExcelUtil
<>(
TSalaryEmployeeExportVo
.
class
);
for
(
TSalaryEmployee
ExportVo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
...
...
@@ -149,17 +150,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
}
@Override
public
List
<
TSalaryEmployee
>
noPageDiy
(
TSalaryEmployeeSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TSalaryEmployee
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TSalaryEmployee:
:
getId
,
idList
);
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
)
{
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
}
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
baseMapper
.
selectList
(
wrapper
);
public
List
<
TSalaryEmployeeExportVo
>
noPageDiy
(
TSalaryEmployeeSearchVo
searchVo
)
{
return
baseMapper
.
noPageDiy
(
searchVo
,
Common
.
getList
(
searchVo
.
getIds
()));
}
private
Long
noPageCountDiy
(
TSalaryEmployeeSearchVo
searchVo
)
{
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
cbcc250c
...
...
@@ -161,11 +161,13 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
@Override
public
List
<
TSalaryStandardExportVo
>
noPageDiy
(
TSalaryStandardSearchVo
searchVo
)
{
return
baseMapper
.
getSalaryStandardExport
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
return
baseMapper
.
getSalaryStandardExport
(
searchVo
,
idList
);
}
private
int
noPageCountDiy
(
TSalaryStandardSearchVo
searchVo
)
{
return
baseMapper
.
getSalaryStandardExportCount
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
return
baseMapper
.
getSalaryStandardExportCount
(
searchVo
,
idList
);
}
@Override
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
View file @
cbcc250c
...
...
@@ -418,7 +418,7 @@ public class SalaryAccountUtil implements Serializable {
}
else
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
entity
.
getBankProvince
().
trim
());
if
(
Common
.
isNotNull
(
areaStr
))
{
newEmp
.
setBankProvince
(
Integer
.
parseInt
(
areaStr
)
);
newEmp
.
setBankProvince
(
areaStr
);
}
else
{
error
=
"第"
+
(
i
+
2
)
+
"行:新员工-开户行省错误:"
+
entity
.
getBankProvince
();
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
...
...
@@ -427,7 +427,7 @@ public class SalaryAccountUtil implements Serializable {
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
entity
.
getBankCity
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
entity
.
getBankProvince
().
trim
());
if
(
Common
.
isNotNull
(
areaStr
))
{
newEmp
.
setBankCity
(
Integer
.
parseInt
(
areaStr
)
);
newEmp
.
setBankCity
(
areaStr
);
}
else
{
error
=
"第"
+
(
i
+
2
)
+
"行:新员工-开户行市错误:"
+
entity
.
getBankCity
();
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
...
...
@@ -457,19 +457,19 @@ public class SalaryAccountUtil implements Serializable {
if
(
Common
.
isNotNull
(
entity
.
getBankProvince
()))
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
entity
.
getBankProvince
().
trim
());
if
(
Common
.
isNotNull
(
areaStr
))
{
newEmp
.
setBankProvince
(
Integer
.
parseInt
(
areaStr
)
);
newEmp
.
setBankProvince
(
areaStr
);
}
if
(
Common
.
isNotNull
(
entity
.
getBankCity
()))
{
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
entity
.
getBankCity
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
entity
.
getBankProvince
().
trim
());
if
(
Common
.
isNotNull
(
areaStr
))
{
newEmp
.
setBankCity
(
Integer
.
parseInt
(
areaStr
)
);
newEmp
.
setBankCity
(
areaStr
);
}
}
}
}
}
newEmp
.
setFileStatus
(
CommonConstants
.
ZERO_
INT
);
//临时
newEmp
.
setFileStatus
(
CommonConstants
.
ZERO_
STRING
);
//临时
newEmp
.
setDeptId
(
dept
.
getId
());
newEmp
.
setDeptName
(
dept
.
getDepartName
());
newEmp
.
setDeptNo
(
dept
.
getDepartNo
());
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryEmployeeMapper.xml
View file @
cbcc250c
...
...
@@ -48,6 +48,25 @@
<result
property=
"taxMonth"
column=
"TAX_MONTH"
/>
<result
property=
"fileStatus"
column=
"FILE_STATUS"
/>
</resultMap>
<resultMap
id=
"salaryEmployeeExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo"
>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"unitId"
column=
"UNIT_ID"
/>
<result
property=
"unitName"
column=
"UNIT_NAME"
/>
<result
property=
"unitNo"
column=
"UNIT_NO"
/>
<result
property=
"deptId"
column=
"DEPT_ID"
/>
<result
property=
"deptName"
column=
"DEPT_NAME"
/>
<result
property=
"deptNo"
column=
"DEPT_NO"
/>
<result
property=
"bankName"
column=
"BANK_NAME"
/>
<result
property=
"bankSubName"
column=
"BANK_SUB_NAME"
/>
<result
property=
"bankNo"
column=
"BANK_NO"
/>
<result
property=
"invoiceTitle"
column=
"INVOICE_TITLE"
/>
<result
property=
"bankProvince"
column=
"BANK_PROVINCE"
/>
<result
property=
"bankCity"
column=
"BANK_CITY"
/>
<result
property=
"empPhone"
column=
"EMP_PHONE"
/>
<result
property=
"taxMonth"
column=
"TAX_MONTH"
/>
<result
property=
"fileStatus"
column=
"FILE_STATUS"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.EMP_NAME,
...
...
@@ -154,6 +173,32 @@
<where>
1=1
<include
refid=
"tSalaryEmployee_where"
/>
</where>
ORDER BY a.CREATE_TIME DESC
</where>
</select>
<select
id=
"noPageDiy"
resultMap=
"salaryEmployeeExportMap"
parameterType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_salary_employee a
<where>
1=1
<include
refid=
"where_export"
/>
ORDER BY a.CREATE_TIME DESC
</where>
<if
test=
"tSalaryEmployee != null"
>
<if
test=
"tSalaryEmployee.limitStart != null"
>
limit #{tSalaryEmployee.limitStart},#{tSalaryEmployee.limitEnd}
</if>
</if>
</select>
<sql
id=
"where_export"
>
<include
refid=
"tSalaryEmployee_where"
/>
<if
test=
"idList != null and idList.size>0"
>
AND a.id in
<foreach
item=
"idStr"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
</if>
</sql>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
View file @
cbcc250c
...
...
@@ -256,8 +256,11 @@
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_salary_standard a
left join t_dept_see d on a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0
<!-- 薪资是否可查看 0 是 1否-->
and d.CAN_SEE= 0
<include
refid=
"tSalaryStandard_where"
/>
</where>
ORDER BY a.CREATE_TIME desc
...
...
@@ -304,8 +307,9 @@
a.FORM_TYPE,
a.CREATE_TIME
FROM t_salary_standard a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0
AND d.CAN_SEE = 0
<include
refid=
"where_export"
/>
</where>
ORDER BY a.CREATE_TIME desc
...
...
@@ -320,8 +324,9 @@
SELECT
count(1)
FROM t_salary_standard a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0
AND d.CAN_SEE = 0
<include
refid=
"where_export"
/>
</where>
</select>
...
...
@@ -336,15 +341,21 @@
<if
test=
"tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''"
>
AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth}
</if>
<if
test=
"tSalaryStandard.status == null"
>
<
!--<
if test="tSalaryStandard.status == null">
AND (a.STATUS = 1 OR a.STATUS = 2 OR a.STATUS = 5)
</if>
</if>
-->
<if
test=
"tSalaryStandard.status != null"
>
AND a.STATUS = #{tSalaryStandard.status}
</if>
</if>
</sql>
<sql
id=
"where_export"
>
<if
test=
"idList != null and idList.size>0"
>
AND a.id in
<foreach
item=
"idStr"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
</if>
<if
test=
"searchVo != null"
>
<if
test=
"searchVo.deptName != null and searchVo.deptName.trim() != ''"
>
AND a.DEPT_NAME like concat('%',#{searchVo.deptName},'%')
...
...
@@ -355,9 +366,9 @@
<if
test=
"searchVo.salaryMonth != null and searchVo.salaryMonth.trim() != ''"
>
AND a.SALARY_MONTH = #{searchVo.salaryMonth}
</if>
<if
test=
"searchVo.status == null"
>
<
!--<
if test="searchVo.status == null">
AND (a.STATUS = 1 OR a.STATUS = 2 OR a.STATUS = 5)
</if>
</if>
-->
<if
test=
"searchVo.status != null"
>
AND a.STATUS = #{searchVo.status}
</if>
...
...
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