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
2be14fa2
Commit
2be14fa2
authored
Aug 11, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报账薪资导出
parent
13d12c22
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
607 additions
and
215 deletions
+607
-215
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+8
-0
TSalaryAccount.java
...yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccount.java
+39
-28
TSalaryStandard.java
...ifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
+19
-0
TSalaryAccountSearchVo.java
.../cloud/plus/v1/yifu/salary/vo/TSalaryAccountSearchVo.java
+8
-10
TSalaryDetailVo.java
...om/yifu/cloud/plus/v1/yifu/salary/vo/TSalaryDetailVo.java
+2
-0
TSalaryAttaController.java
...plus/v1/yifu/salary/controller/TSalaryAttaController.java
+88
-67
TSalaryAttaMapper.java
...u/cloud/plus/v1/yifu/salary/mapper/TSalaryAttaMapper.java
+12
-6
SalaryUploadService.java
...loud/plus/v1/yifu/salary/service/SalaryUploadService.java
+3
-0
TSalaryAttaService.java
...cloud/plus/v1/yifu/salary/service/TSalaryAttaService.java
+67
-9
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+50
-1
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+6
-14
TSalaryAttaServiceImpl.java
...s/v1/yifu/salary/service/impl/TSalaryAttaServiceImpl.java
+216
-25
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+5
-1
TSalaryAttaMapper.xml
...alary-biz/src/main/resources/mapper/TSalaryAttaMapper.xml
+73
-52
TSalaryStandardMapper.xml
...y-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
+8
-0
TSocialFundHistoryVo.java
...fu/cloud/plus/v1/yifu/social/vo/TSocialFundHistoryVo.java
+2
-2
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+1
-0
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
2be14fa2
...
...
@@ -447,4 +447,12 @@ public interface CommonConstants {
public
static
final
String
[]
SOCIAL_HANDLE_TYPE
=
{
"0"
,
"养老"
,
"医疗"
,
"失业"
,
"工伤"
,
"生育"
,
"大病"
};
public
static
final
int
SIXTY_INT
=
60
;
/**
* param error
* @Author fxj
* @Date 2020-08-25
**/
public
static
final
String
PARAM_INFO_ERROR
=
"传参有误!"
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccount.java
View file @
2be14fa2
...
...
@@ -68,12 +68,12 @@ public class TSalaryAccount extends BaseEntity {
@ExcelProperty
(
"工资表ID"
)
private
String
salaryFormId
;
/**
*
工资月
*
薪酬月份
*/
@ExcelAttribute
(
name
=
"
工资月"
,
isNotEmpty
=
true
,
errorInfo
=
"工资月
不能为空"
,
maxLength
=
6
)
@NotBlank
(
message
=
"
工资月
不能为空"
)
@Length
(
max
=
6
,
message
=
"
工资月
不能超过6个字符"
)
@ExcelProperty
(
"
工资月
"
)
@ExcelAttribute
(
name
=
"
薪酬月份"
,
isNotEmpty
=
true
,
errorInfo
=
"薪酬月份
不能为空"
,
maxLength
=
6
)
@NotBlank
(
message
=
"
薪酬月份
不能为空"
)
@Length
(
max
=
6
,
message
=
"
薪酬月份
不能超过6个字符"
)
@ExcelProperty
(
"
薪酬月份
"
)
private
String
salaryMonth
;
/**
* 员工 ID
...
...
@@ -92,9 +92,9 @@ public class TSalaryAccount extends BaseEntity {
/**
* 员工身份证号
*/
@ExcelAttribute
(
name
=
"
员工
身份证号"
,
maxLength
=
25
)
@Length
(
max
=
25
,
message
=
"
员工
身份证号不能超过25个字符"
)
@ExcelProperty
(
"
员工
身份证号"
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
25
)
@Length
(
max
=
25
,
message
=
"身份证号不能超过25个字符"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
/**
* 银行卡号
...
...
@@ -104,11 +104,11 @@ public class TSalaryAccount extends BaseEntity {
@ExcelProperty
(
"银行卡号"
)
private
String
bankNo
;
/**
* 开户行
* 开户行
总行
*/
@ExcelAttribute
(
name
=
"开户行"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"开户行不能超过50个字符"
)
@ExcelProperty
(
"开户行"
)
@ExcelAttribute
(
name
=
"开户行
总行
"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"开户行
总行
不能超过50个字符"
)
@ExcelProperty
(
"开户行
总行
"
)
private
String
bankName
;
/**
* 结算部门id
...
...
@@ -172,12 +172,12 @@ public class TSalaryAccount extends BaseEntity {
@ExcelProperty
(
"公积金扣缴月份"
)
private
String
deduProvidentMonth
;
/**
*
表单类型0:工
资;1:绩效;2:其他;3:劳务费;4:稿酬
*
报表类型0:薪
资;1:绩效;2:其他;3:劳务费;4:稿酬
*/
@ExcelAttribute
(
name
=
"
表单类型0:工资;1:绩效;2:其他;3:劳务费;4:稿酬"
,
isNotEmpty
=
true
,
errorInfo
=
"表单类型0:工资;1:绩效;2:其他;3:劳务费;4:稿酬不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"
表单类型0:工资;1:绩效;2:其他;3:劳务费;4:稿酬
不能为空"
)
@Length
(
max
=
32
,
message
=
"
表单类型0:工资;1:绩效;2:其他;3:劳务费;4:稿酬
不能超过32个字符"
)
@ExcelProperty
(
"
表单类型0:工资;1:绩效;2:其他;3:劳务费;4:稿酬
"
)
@ExcelAttribute
(
name
=
"
报表类型"
,
readConverterExp
=
"0=薪资,1=绩效,2=其他,3=劳务费,4=稿酬"
)
@NotBlank
(
message
=
"
报表类型
不能为空"
)
@Length
(
max
=
32
,
message
=
"
报表类型
不能超过32个字符"
)
@ExcelProperty
(
"
报表类型
"
)
private
String
formType
;
/**
* 结算月
...
...
@@ -260,9 +260,9 @@ public class TSalaryAccount extends BaseEntity {
/**
* 手机号
*/
@ExcelAttribute
(
name
=
"手机号"
,
maxLength
=
11
)
@Length
(
max
=
11
,
message
=
"手机号不能超过11个字符"
)
@ExcelProperty
(
"手机号"
)
@ExcelAttribute
(
name
=
"手机号
码
"
,
maxLength
=
11
)
@Length
(
max
=
11
,
message
=
"手机号
码
不能超过11个字符"
)
@ExcelProperty
(
"手机号
码
"
)
private
String
empPhone
;
/**
* 是否自有员工0:否;1:是自有员工
...
...
@@ -270,6 +270,17 @@ public class TSalaryAccount extends BaseEntity {
@ExcelAttribute
(
name
=
"是否自有员工0:否;1:是自有员工"
)
@ExcelProperty
(
"是否自有员工0:否;1:是自有员工"
)
private
Integer
ownFlag
;
@Schema
(
description
=
"劳务费、稿酬是否含有发薪0:否;1:是"
)
@ExcelAttribute
(
name
=
"劳务费、稿酬是否含有发薪"
)
@ExcelProperty
(
"劳务费、稿酬是否含有发薪"
)
private
Integer
haveSalaryFlag
;
@Schema
(
description
=
"是否含有特殊金额0:否;1:是"
)
@ExcelAttribute
(
name
=
"是否含有特殊金额"
)
@ExcelProperty
(
"是否含有特殊金额"
)
private
Integer
haveSpecialFlag
;
/**
* 本月是否重复金额0:否;1:是重复导入的
*/
...
...
@@ -286,13 +297,13 @@ public class TSalaryAccount extends BaseEntity {
/**
* 开户行省
*/
@ExcelAttribute
(
name
=
"开户行省"
)
@ExcelAttribute
(
name
=
"开户行省"
,
isArea
=
true
)
@ExcelProperty
(
"开户行省"
)
private
String
bankProvince
;
/**
* 开户行市
*/
@ExcelAttribute
(
name
=
"开户行市"
)
@ExcelAttribute
(
name
=
"开户行市"
,
isArea
=
true
,
parentField
=
"bankProvince"
)
@ExcelProperty
(
"开户行市"
)
private
String
bankCity
;
/**
...
...
@@ -303,10 +314,10 @@ public class TSalaryAccount extends BaseEntity {
@ExcelProperty
(
"是否个人承担部分税费:0否1是"
)
private
String
isPersonTax
;
/**
* 应发(劳务费、稿酬)
* 应发
薪酬
(劳务费、稿酬)
*/
@ExcelAttribute
(
name
=
"应发
(劳务费、稿酬)
"
)
@ExcelProperty
(
"应发
(劳务费、稿酬)
"
)
@ExcelAttribute
(
name
=
"应发
薪酬
"
)
@ExcelProperty
(
"应发
薪酬
"
)
private
BigDecimal
relaySalary
;
/**
* 实发(个人实收)
...
...
@@ -315,10 +326,10 @@ public class TSalaryAccount extends BaseEntity {
@ExcelProperty
(
"实发(个人实收)"
)
private
BigDecimal
actualSalary
;
/**
* 个税(个人承担)
* 个税
金额
(个人承担)
*/
@ExcelAttribute
(
name
=
"个税
(个人承担)
"
)
@ExcelProperty
(
"个税
(个人承担)
"
)
@ExcelAttribute
(
name
=
"个税
金额
"
)
@ExcelProperty
(
"个税
金额
"
)
private
BigDecimal
salaryTax
;
/**
* 公司应发
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
View file @
2be14fa2
...
...
@@ -208,6 +208,25 @@ public class TSalaryStandard extends BaseEntity {
@Length
(
max
=
200
,
message
=
"自有员工强行提交的备注不能超过200个字符"
)
@ExcelProperty
(
"自有员工强行提交的备注"
)
private
String
ownRemark
;
@Schema
(
description
=
"劳务费、稿酬是否含有发薪0:否;1:是"
)
@ExcelAttribute
(
name
=
"劳务费、稿酬是否含有发薪"
)
@ExcelProperty
(
"劳务费、稿酬是否含有发薪"
)
private
Integer
haveSalaryFlag
;
@Schema
(
description
=
"含有发薪的强行提交的备注"
,
name
=
"haveSalaryRemark"
)
@ExcelAttribute
(
name
=
"含有发薪的强行提交的备注"
)
private
String
haveSalaryRemark
;
@Schema
(
description
=
"是否含有特殊金额0:否;1:是"
)
@ExcelAttribute
(
name
=
"是否含有特殊金额"
)
@ExcelProperty
(
"是否含有特殊金额"
)
private
Integer
haveSpecialFlag
;
@Schema
(
description
=
"含有特殊金额的强行提交的备注"
,
name
=
"haveSpecialRemark"
)
@ExcelAttribute
(
name
=
"含有特殊金额的强行提交的备注"
)
private
String
haveSpecialRemark
;
/**
* 提交备注
*/
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TSalaryAccountSearchVo.java
View file @
2be14fa2
...
...
@@ -16,11 +16,14 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.Set
;
/**
* 工资报账主表(工资条)
...
...
@@ -31,17 +34,12 @@ import java.time.LocalDateTime;
@Data
public
class
TSalaryAccountSearchVo
extends
TSalaryAccount
{
/**
* 多选导出或删除等操作
*/
@Schema
(
description
=
"选中ID,多个逗号分割"
)
private
String
ids
;
@TableField
(
exist
=
false
)
private
List
<
String
>
idList
;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema
(
description
=
"创建时间区间"
)
private
LocalDateTime
[]
createTimes
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"导出的表头的Set"
)
private
Set
<
String
>
exportFields
;
/**
* @Author fxj
* 查询数据起
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TSalaryDetailVo.java
View file @
2be14fa2
...
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.vo;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAtta
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -30,6 +31,7 @@ public class TSalaryDetailVo implements Serializable {
private
Map
<
String
,
String
>
accountTitle
=
new
HashMap
<>();
//报账表浮动表头Map
private
List
<
String
>
titleSortList
=
new
ArrayList
<>();
//报账表浮动表头排序List
//非扣税项附件
private
List
<
TSalaryAtta
>
attaList
=
new
ArrayList
<>();
/**
* 薪资类审核记录 fxj 2021-11-15
*/
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryAttaController.java
View file @
2be14fa2
...
...
@@ -17,19 +17,20 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAtta
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAttaService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAttaSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.net.URL
;
import
java.util.List
;
...
...
@@ -39,93 +40,113 @@ import java.util.List;
* @author hgw
* @date 2022-08-05 11:40:14
*/
@Log4j2
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/tsalaryatta"
)
@Tag
(
name
=
"薪资结算附件表
管理
"
)
@Tag
(
name
=
"薪资结算附件表"
)
public
class
TSalaryAttaController
{
private
final
TSalaryAttaService
tSalaryAttaService
;
private
OSSUtil
ossUtil
;
/**
*
简单分页查询
*
* @
param page 分页对象
* @
param tSalaryAtta 薪资结算附件表
* @return
*/
@
Operation
(
description
=
"简单分页查询
"
)
@GetMapping
(
"/
page
"
)
public
R
<
IPage
<
TSalaryAtta
>>
getTSalaryAttaPage
(
Page
<
TSalaryAtta
>
page
,
TSalaryAttaSearchVo
tSalaryAtta
)
{
return
new
R
<>(
tSalaryAttaService
.
get
TSalaryAttaPage
(
page
,
tSalaryAtta
));
*
@param recordId 工程薪资暂停发发放记录的id
*
@Description:
* @
Author: hgw
* @
Date: 2021/10/27 17:31
* @return
: com.yifu.cloud.v1.common.core.util.R<java.util.List < com.yifu.cloud.v1.hrms.api.entity.TSalaryAtta>>
*
*
/
@
Schema
(
description
=
"获取list(recordId 工程薪资暂停发发放记录的id)
"
)
@GetMapping
(
"/
getTSalaryAttaList
"
)
public
R
<
List
<
TSalaryAtta
>>
getTSalaryAttaList
(
@RequestParam
String
recordId
)
{
return
new
R
<>(
tSalaryAttaService
.
get
AttaListByRecordId
(
recordId
));
}
/**
*
不分页查询
*
* @
param tSalaryAtta 薪资结算附件表
* @
return
*
/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@
PostMapping
(
"/noPage
"
)
//@PreAuthorize("@pms.hasPermission('salary_tsalaryatta_get')"
)
public
R
<
List
<
TSalaryAtta
>>
getTSalaryAtta
NoPage
(
@RequestBody
TSalaryAttaSearchVo
tSalaryAtta
)
{
return
R
.
ok
(
tSalaryAttaService
.
noPageDiy
(
tSalaryAtta
));
*
@param linkId id
*
@Description: 获取附件
* @
Author: hgw
* @
Date: 2021-12-8 15:36:58
*
@return: com.yifu.cloud.v1.common.core.util.R<java.util.List < com.yifu.cloud.v1.hrms.api.entity.TSalaryAtta>>
**/
@
Schema
(
description
=
"获取list(linkId, linkType链接类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录6:非扣税 7发放失败 8自有员工附件 9财务回执附件 10换人换卡附件;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000))
"
)
@GetMapping
(
"/getTSalaryAttaListByIdType"
)
public
R
<
List
<
TSalaryAtta
>>
getTSalaryAtta
ListByIdType
(
@RequestParam
String
linkId
,
@RequestParam
Integer
linkType
)
{
return
new
R
<>(
tSalaryAttaService
.
getAttaListHaveSrc
(
linkId
,
linkType
));
}
/**
*
通过id查询薪资结算附件表
*
阿里云处理文件上传
*
* @param id id
* @return R
* @param file 文件
* @param filePath 如: import 或 import/test/test..../test
* @return
* @throws IOException
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('salary_tsalaryatta_get')"
)
@GetMapping
(
"/{id}"
)
public
R
<
TSalaryAtta
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tSalaryAttaService
.
getById
(
id
));
@SysLog
(
"薪资附件上传"
)
@Schema
(
description
=
"OSS文件上传接口。linkType类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4薪资打印记录;5核准表打印记录;6:非扣税项;8自有员工附件;9:财务回执附件;10换人换卡附件;11薪资原表"
)
/*@ApiImplicitParams({
@ApiImplicitParam(name = "file", value = "Form文件上传", required = true, dataType = "__file", paramType = "form"),
@ApiImplicitParam(name = "filePath", value = "文件上传路径", dataType = "String", paramType = "form"),
@ApiImplicitParam(name = "linkId", value = "链接ID(工资主表id、工程主表id、自定义项表id等)", required = true, dataType = "String", paramType = "form"),
@ApiImplicitParam(name = "linkType", value = "类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4薪资打印记录;5核准表打印记录;6:非扣税项;8自有员工附件;9:财务回执附件;10换人换卡附件;11薪资原表", required = true, dataType = "int", paramType = "form"),
@ApiImplicitParam(name = "engineerType", value = "工程文件类型:0三方协议;1委托付款函;2劳务费;3其他", required = true, dataType = "int", paramType = "form")
})*/
@PostMapping
(
value
=
"/ossUploadFile"
)
public
R
uploadImg
(
@RequestBody
MultipartFile
file
,
String
filePath
,
String
linkId
,
Integer
linkType
,
Integer
engineerType
,
String
printRemark
,
String
recordId
)
throws
IOException
{
return
tSalaryAttaService
.
uploadAtta
(
file
,
filePath
,
linkId
,
linkType
,
engineerType
,
printRemark
,
recordId
);
}
/**
*
新增薪资结算附件表
*
获取附件下载地址
*
* @param tSalaryAtta 薪资结算附件表
* @return R
*/
@Operation
(
summary
=
"新增薪资结算附件表"
,
description
=
"新增薪资结算附件表:hasPermission('salary_tsalaryatta_add')"
)
@SysLog
(
"新增薪资结算附件表"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('salary_tsalaryatta_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TSalaryAtta
tSalaryAtta
)
{
return
R
.
ok
(
tSalaryAttaService
.
save
(
tSalaryAtta
));
* @param id
* @return
* @Author fxj
* @Date 2019-08-16
**/
@Schema
(
description
=
"附件预览下载地址"
)
@SysLog
(
"附件预览下载地址"
)
@GetMapping
(
"/ossFileUrl/{id}"
)
public
R
ossFileUrl
(
@PathVariable
String
id
)
{
TSalaryAtta
salaryAtta
=
tSalaryAttaService
.
getById
(
id
);
if
(
null
==
salaryAtta
)
{
return
R
.
failed
(
"无对应附件信息"
);
}
/**
* 修改薪资结算附件表
*
* @param tSalaryAtta 薪资结算附件表
* @return R
*/
@Operation
(
summary
=
"修改薪资结算附件表"
,
description
=
"修改薪资结算附件表:hasPermission('salary_tsalaryatta_edit')"
)
@SysLog
(
"修改薪资结算附件表"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('salary_tsalaryatta_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TSalaryAtta
tSalaryAtta
)
{
return
R
.
ok
(
tSalaryAttaService
.
updateById
(
tSalaryAtta
));
URL
url
=
ossUtil
.
getObjectUrl
(
null
,
salaryAtta
.
getAttaSrc
());
salaryAtta
.
setAttaUrl
(
url
.
toString
());
return
new
R
<>(
salaryAtta
);
}
/**
*
通过id删除薪资结算附件表
*
删除数据库记录和OSS文件
*
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id删除薪资结算附件表"
,
description
=
"通过id删除薪资结算附件表:hasPermission('salary_tsalaryatta_del')"
)
@SysLog
(
"通过id删除薪资结算附件表"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('salary_tsalaryatta_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tSalaryAttaService
.
removeById
(
id
));
* @param id
* @return
* @Author fxj
* @Date 2019-09-09
**/
@Schema
(
description
=
"客户/员工表单附件删除"
)
@SysLog
(
"客户/员工表单附件删除"
)
@GetMapping
(
"/ossFileDelete/{id}"
)
public
R
ossFileDelete
(
@PathVariable
String
id
)
{
try
{
TSalaryAtta
salaryAtta
=
tSalaryAttaService
.
getById
(
id
);
if
(
null
==
salaryAtta
)
{
return
R
.
failed
(
"无对应附件信息"
);
}
if
(
tSalaryAttaService
.
removeById
(
id
))
{
ossUtil
.
deleteObject
(
null
,
salaryAtta
.
getAttaSrc
());
return
R
.
ok
(
"删除成功!"
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"附件删除异常:"
+
e
.
getMessage
());
return
R
.
failed
(
"附件删除异常!"
);
}
return
R
.
ok
(
"删除失败!"
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAttaMapper.java
View file @
2be14fa2
...
...
@@ -23,6 +23,9 @@ import org.apache.ibatis.annotations.Mapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 薪资结算附件表
*
...
...
@@ -33,8 +36,11 @@ import org.apache.ibatis.annotations.Param;
public
interface
TSalaryAttaMapper
extends
BaseMapper
<
TSalaryAtta
>
{
/**
* 薪资结算附件表简单分页查询
* @param tSalaryAtta 薪资结算附件表
*
* @param tAtta 薪资结算附件表
* @return
*/
IPage
<
TSalaryAtta
>
getTSalaryAttaPage
(
Page
<
TSalaryAtta
>
page
,
@Param
(
"tSalaryAtta"
)
TSalaryAtta
tSalaryAtta
);
IPage
<
TSalaryAtta
>
getTAttaPage
(
Page
page
,
@Param
(
"tAtta"
)
TSalaryAtta
tAtta
);
List
<
TSalaryAtta
>
getTAttaList
(
@Param
(
"tAtta"
)
TSalaryAtta
tAtta
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/SalaryUploadService.java
View file @
2be14fa2
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo
;
import
java.util.List
;
...
...
@@ -34,5 +35,7 @@ public interface SalaryUploadService extends IService<TSalaryStandard> {
**/
R
<
String
>
saveAndSubmit
(
List
<
TSalaryAccountVo
>
savList
);
R
<
TSalaryDetailVo
>
getBill
(
String
salaryFormId
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryAttaService.java
View file @
2be14fa2
...
...
@@ -20,9 +20,12 @@ package com.yifu.cloud.plus.v1.yifu.salary.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.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAtta
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAttaSearchVo
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.util.List
;
/**
...
...
@@ -34,10 +37,65 @@ import java.util.List;
public
interface
TSalaryAttaService
extends
IService
<
TSalaryAtta
>
{
/**
* 薪资结算附件表简单分页查询
* @param tSalaryAtta 薪资结算附件表
*
* @param tAtta 薪资结算附件表
* @return
*/
IPage
<
TSalaryAtta
>
getTSalaryAttaPage
(
Page
<
TSalaryAtta
>
page
,
TSalaryAttaSearchVo
tSalaryAtta
);
IPage
<
TSalaryAtta
>
getTAttaPage
(
Page
<
TSalaryAtta
>
page
,
TSalaryAtta
tAtta
);
/**
* @param linkId 工程工资id
* @param recordId 暂停发发放id
* @Description: 工程薪资暂停发附件上传
* @Author: hgw
* @Date: 2021/10/27 15:43
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
R
<
String
>
uploadEngineerPauseSalaryAtta
(
MultipartFile
[]
file
,
String
filePath
,
String
linkId
,
Integer
linkType
,
Integer
[]
engineerType
,
String
recordId
)
throws
IOException
;
/**
* @param linkId 工资id
* @param recordId 自定义暂停发发放id
* @Description: 自定义暂停发附件上传
* @Author: hgw
* @Date: 2021-11-22 17:37:24
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
R
<
String
>
uploadPauseDiyAtta
(
MultipartFile
[]
file
,
String
filePath
,
String
linkId
,
Integer
linkType
,
String
recordId
)
throws
IOException
;
/**
* @param linkId 工资id
* @Description: 自定义暂停发附件上传
* @Author: hgw
* @Date: 2021-11-22 17:37:24
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
R
<
String
>
uploadLostAndFoundAtta
(
MultipartFile
[]
file
,
String
filePath
,
String
linkId
,
Integer
linkType
)
throws
IOException
;
/**
* @Description: 薪资附件上传-通用
* @Author: hgw
* @Date: 2021/10/27 15:43
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
R
<
FileVo
>
uploadAtta
(
MultipartFile
file
,
String
filePath
,
String
linkId
,
Integer
linkType
,
Integer
engineerType
,
String
printRemark
,
String
recordId
)
throws
IOException
;
/**
* @param linkId
* @param linkType
* @Description: 获取list,并且从oss服务器根据AttaSrc获取路径,塞入AttaUrl
* @Author: hgw
* @Date: 2021/11/19 16:03
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryAtta>
**/
List
<
TSalaryAtta
>
getAttaListHaveSrc
(
String
linkId
,
Integer
linkType
);
List
<
TSalaryAtta
>
getAttaListByRecordId
(
String
recordId
);
void
updateAttaByLinkId
(
List
<
String
>
salaryAttaIds
,
String
linkId
);
List
<
TSalaryAtta
>
noPageDiy
(
TSalaryAttaSearchVo
searchVo
);
void
setSrc
(
List
<
TSalaryAtta
>
attaList
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
2be14fa2
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo
;
...
...
@@ -49,7 +50,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
private
final
DaprArchivesProperties
archivesProperties
;
private
final
DaprCheckProperties
daprCheckProperties
;
private
final
DaprSocialProperties
socialProperties
;
private
final
DaprInsurancesProperties
insurancesProperties
;
private
final
TSalaryStandardService
tSalaryStandardService
;
...
...
@@ -80,6 +80,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
private
final
MSalaryPaymentResService
salaryPaymentResService
;
private
final
TSalaryAttaService
tSalaryAttaService
;
private
final
TApprovalRecordService
auditLogService
;
/**
* @param jsonString 客户原表数据
* @param repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
...
...
@@ -1420,5 +1424,50 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
return
"0"
;
}
/**
* @param salaryFormId 工资表id
* @Description: 获取结算单
* @Author: hgw
* @Date: 2019/9/9 17:49
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Override
public
R
<
TSalaryDetailVo
>
getBill
(
String
salaryFormId
)
{
//工资主表
TSalaryStandard
salary
=
tSalaryStandardService
.
getById
(
salaryFormId
);
TSalaryDetailVo
salaryDetailVo
=
new
TSalaryDetailVo
();
if
(
salary
!=
null
)
{
List
<
TSalaryAtta
>
attaList
=
null
;
if
(
salary
.
getType
()
==
null
||
salary
.
getType
()
!=
CommonConstants
.
ONE_INT
)
{
//报账表
TSalaryAccount
salaryAccount
=
new
TSalaryAccount
();
salaryAccount
.
setSalaryFormId
(
salaryFormId
);
QueryWrapper
<
TSalaryAccount
>
queryWrapperSa
=
new
QueryWrapper
<>();
queryWrapperSa
.
setEntity
(
salaryAccount
);
List
<
TSalaryAccount
>
salaryAccountList
=
tSalaryAccountService
.
list
(
queryWrapperSa
);
//报账表明细
if
(
salaryAccountList
!=
null
&&
salaryAccountList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
TSalaryAccountItem
item
;
QueryWrapper
<
TSalaryAccountItem
>
queryWrapperAi
;
List
<
TSalaryAccountItem
>
itemList
;
for
(
TSalaryAccount
a
:
salaryAccountList
)
{
item
=
new
TSalaryAccountItem
();
item
.
setSalaryAccountId
(
a
.
getId
());
queryWrapperAi
=
new
QueryWrapper
<>();
queryWrapperAi
.
setEntity
(
item
);
itemList
=
tSalaryAccountItemService
.
list
(
queryWrapperAi
);
a
.
setSaiList
(
itemList
);
}
}
salaryDetailVo
.
setSalaryAccountList
(
salaryAccountList
);
attaList
=
tSalaryAttaService
.
getAttaListHaveSrc
(
salary
.
getId
(),
230
);
}
salaryDetailVo
.
setAttaList
(
attaList
);
salaryDetailVo
.
setAuditLogList
(
auditLogService
.
list
(
Wrappers
.<
TApprovalRecord
>
query
().
lambda
().
eq
(
TApprovalRecord:
:
getSalaryId
,
salary
.
getId
())));
}
//结算单
salaryDetailVo
.
setSalary
(
salary
);
return
new
R
<>(
salaryDetailVo
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
2be14fa2
...
...
@@ -80,7 +80,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
*/
@Override
public
void
listExport
(
HttpServletResponse
response
,
TSalaryAccountSearchVo
searchVo
)
{
String
fileName
=
"
不良记录
批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
String
fileName
=
"
员工报账
批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
TSalaryAccount
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
...
...
@@ -91,8 +91,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TSalaryAccount
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TSalaryAccount
.
class
).
includeColumnFiledNames
(
searchVo
.
getExportFields
()).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
)
{
...
...
@@ -141,9 +140,8 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
@Override
public
List
<
TSalaryAccount
>
noPageDiy
(
TSalaryAccountSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TSalaryAccount
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TSalaryAccount:
:
getId
,
idList
);
if
(
Common
.
isNotNull
(
searchVo
.
getIdList
()))
{
wrapper
.
in
(
TSalaryAccount:
:
getId
,
searchVo
.
getIdList
());
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
)
{
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
...
...
@@ -154,20 +152,14 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
private
Long
noPageCountDiy
(
TSalaryAccountSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TSalaryAccount
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TSalaryAccount:
:
getId
,
idList
);
if
(
Common
.
isNotNull
(
searchVo
.
getIdList
()))
{
wrapper
.
in
(
TSalaryAccount:
:
getId
,
searchVo
.
getIdList
());
}
return
baseMapper
.
selectCount
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
TSalaryAccountSearchVo
entity
)
{
LambdaQueryWrapper
<
TSalaryAccount
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TSalaryAccount:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TSalaryAccount:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
()))
{
wrapper
.
eq
(
TSalaryAccount:
:
getCreateName
,
entity
.
getCreateName
());
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAttaServiceImpl.java
View file @
2be14fa2
...
...
@@ -16,21 +16,30 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo
;
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.salary.entity.TSalaryAtta
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAttaMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAttaService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAttaSearchVo
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.net.URL
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
...
...
@@ -41,43 +50,225 @@ import java.util.List;
*/
@Log4j2
@Service
@AllArgsConstructor
public
class
TSalaryAttaServiceImpl
extends
ServiceImpl
<
TSalaryAttaMapper
,
TSalaryAtta
>
implements
TSalaryAttaService
{
private
final
OSSUtil
ossUtil
;
/**
* 薪资结算附件表简单分页查询
*
* @param t
Salary
Atta 薪资结算附件表
* @param tAtta 薪资结算附件表
* @return
*/
@Override
public
IPage
<
TSalaryAtta
>
getTSalaryAttaPage
(
Page
<
TSalaryAtta
>
page
,
TSalaryAttaSearchVo
tSalaryAtta
)
{
return
baseMapper
.
getTSalaryAttaPage
(
page
,
tSalaryAtta
);
public
IPage
<
TSalaryAtta
>
getTAttaPage
(
Page
<
TSalaryAtta
>
page
,
TSalaryAtta
tAtta
)
{
return
baseMapper
.
getTAttaPage
(
page
,
tAtta
);
}
/**
* @Description: 工程薪资暂停发附件上传
* @Author: hgw
* @Date: 2021/10/27 15:43
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Override
public
R
<
String
>
uploadEngineerPauseSalaryAtta
(
MultipartFile
[]
file
,
String
filePath
,
String
linkId
,
Integer
linkType
,
Integer
[]
engineerType
,
String
recordId
)
throws
IOException
{
if
(
Common
.
isEmpty
(
file
)
||
Common
.
isEmpty
(
engineerType
)
||
engineerType
.
length
!=
file
.
length
)
{
return
R
.
failed
(
CommonConstants
.
PARAM_INFO_ERROR
);
}
for
(
int
i
=
0
;
i
<
file
.
length
;
i
++)
{
this
.
uploadAtta
(
file
[
i
],
filePath
,
linkId
,
linkType
,
engineerType
[
i
],
null
,
recordId
);
}
return
R
.
ok
(
"上传成功!"
);
}
/**
* @Description: 自定义暂停发附件上传
* @Author: hgw
* @Date: 2021-11-22 17:37:39
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Override
public
R
<
String
>
uploadPauseDiyAtta
(
MultipartFile
[]
file
,
String
filePath
,
String
linkId
,
Integer
linkType
,
String
recordId
)
throws
IOException
{
if
(
Common
.
isEmpty
(
file
))
{
return
R
.
failed
(
CommonConstants
.
PARAM_INFO_ERROR
);
}
for
(
int
i
=
0
;
i
<
file
.
length
;
i
++)
{
this
.
uploadAtta
(
file
[
i
],
filePath
,
linkId
,
linkType
,
null
,
null
,
recordId
);
}
return
R
.
ok
(
"上传成功!"
);
}
/**
* @Description: 自定义暂停发附件上传
* @Author: hgw
* @Date: 2021-11-22 17:37:39
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Override
public
R
<
String
>
uploadLostAndFoundAtta
(
MultipartFile
[]
file
,
String
filePath
,
String
linkId
,
Integer
linkType
)
throws
IOException
{
if
(
Common
.
isEmpty
(
file
))
{
return
R
.
failed
(
CommonConstants
.
PARAM_INFO_ERROR
);
}
for
(
int
i
=
0
;
i
<
file
.
length
;
i
++)
{
this
.
uploadAtta
(
file
[
i
],
filePath
,
linkId
,
linkType
,
null
,
null
,
null
);
}
return
R
.
ok
(
"上传成功!"
);
}
@Override
public
R
<
FileVo
>
uploadAtta
(
@RequestBody
MultipartFile
file
,
String
filePath
,
String
linkId
,
Integer
linkType
,
Integer
engineerType
,
String
printRemark
,
String
recordId
)
throws
IOException
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
file
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String
key
=
""
;
if
(!
Common
.
isNotNull
(
filePath
))
{
key
=
fileName
;
}
else
{
key
=
filePath
+
"/"
+
fileName
;
}
boolean
flag
=
ossUtil
.
uploadFileByStream
(
file
.
getInputStream
(),
key
,
null
);
FileVo
fileVo
;
TSalaryAtta
salaryAtta
;
URL
url
=
null
;
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
salaryAtta
=
this
.
saveTSalaryAtta
(
fileName
,
key
,
file
.
getSize
(),
linkId
,
linkType
,
engineerType
,
printRemark
,
recordId
);
try
{
this
.
save
(
salaryAtta
);
}
catch
(
Exception
e
)
{
log
.
error
(
"OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
url
=
ossUtil
.
getObjectUrl
(
null
,
salaryAtta
.
getAttaSrc
());
fileVo
=
new
FileVo
(
salaryAtta
.
getId
(),
salaryAtta
.
getAttaName
(),
url
.
toString
());
return
R
.
ok
(
fileVo
);
}
else
{
return
R
.
failed
(
"failed:上传至存储空间失败"
);
}
}
/**
* @param fileName 文件名
* @param key 路径
* @param fileSize 大小
* @Description: 保存附件信息
* @Author: hgw
* @Date: 2019/10/25 15:49
* @return: com.yifu.cloud.v1.hrms.api.entity.TSalaryAtta
**/
private
TSalaryAtta
saveTSalaryAtta
(
String
fileName
,
String
key
,
Long
fileSize
,
String
linkId
,
Integer
linkType
,
Integer
engineerType
,
String
printRemark
,
String
recordId
)
{
TSalaryAtta
salaryAtta
=
new
TSalaryAtta
();
char
slash
=
'/'
;
char
point
=
'.'
;
if
(
fileName
.
lastIndexOf
(
slash
)
>=
0
)
{
salaryAtta
.
setAttaName
(
key
.
substring
(
fileName
.
lastIndexOf
(
slash
),
fileName
.
length
()));
}
else
{
salaryAtta
.
setAttaName
(
fileName
);
}
salaryAtta
.
setAttaSize
(
fileSize
);
salaryAtta
.
setAttaSrc
(
key
);
if
(
key
.
lastIndexOf
(
point
)
>=
0
)
{
salaryAtta
.
setAttaType
(
key
.
substring
(
fileName
.
lastIndexOf
(
point
),
fileName
.
length
()));
}
salaryAtta
.
setAttaUrl
(
""
);
salaryAtta
.
setCreateTime
(
LocalDateTime
.
now
());
salaryAtta
.
setUpdateTime
(
LocalDateTime
.
now
());
YifuUser
user
=
SecurityUtils
.
getUser
();
salaryAtta
.
setCreateBy
(
null
==
user
?
""
:
user
.
getId
());
salaryAtta
.
setUpdateBy
(
null
==
user
?
""
:
user
.
getId
());
salaryAtta
.
setLinkId
(
linkId
);
salaryAtta
.
setLinkType
(
linkType
);
salaryAtta
.
setEngineerType
(
engineerType
);
salaryAtta
.
setPrintRemark
(
printRemark
);
salaryAtta
.
setRecordId
(
recordId
);
salaryAtta
.
setRecordStatus
(
CommonConstants
.
ZERO_INT
);
return
salaryAtta
;
}
/**
* @param linkId
* @param linkType
* @Description: 获取list,并且从oss服务器根据AttaSrc获取路径,塞入AttaUrl
* @Author: hgw
* @Date: 2021/11/19 16:03
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryAtta>
**/
@Override
public
List
<
TSalaryAtta
>
getAttaListHaveSrc
(
String
linkId
,
Integer
linkType
)
{
// 附件
TSalaryAtta
sa
=
new
TSalaryAtta
();
sa
.
setLinkId
(
linkId
);
// 附件类型:0工资;1工程工资;2暂停发;3自定义项暂停发 8 自有员工校验附件
sa
.
setLinkType
(
linkType
);
sa
.
setRecordStatus
(
0
);
List
<
TSalaryAtta
>
attaList
=
baseMapper
.
getTAttaList
(
sa
);
this
.
setSrc
(
attaList
);
return
attaList
;
}
/**
* @param recordId
* @Description: 获取list,并且从oss服务器根据AttaSrc获取路径,塞入AttaUrl
* @Author: hgw
* @Date: 2021/11/19 16:03
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryAtta>
**/
@Override
public
List
<
TSalaryAtta
>
noPageDiy
(
TSalaryAttaSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TSalaryAtta
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TSalaryAtta:
:
getId
,
idList
);
public
List
<
TSalaryAtta
>
getAttaListByRecordId
(
String
recordId
)
{
// 附件
TSalaryAtta
sa
=
new
TSalaryAtta
();
sa
.
setRecordId
(
recordId
);
List
<
TSalaryAtta
>
attaList
=
baseMapper
.
getTAttaList
(
sa
);
this
.
setSrc
(
attaList
);
return
attaList
;
}
/**
* @param salaryAttaIds
* @param linkId
* @author fxj
* @date 2021-12-03
* @description 更新附件关联id
*/
@Transactional
@Override
public
void
updateAttaByLinkId
(
List
<
String
>
salaryAttaIds
,
String
linkId
)
{
if
(
Common
.
isNotNull
(
salaryAttaIds
)
&&
Common
.
isNotNull
(
linkId
))
{
List
<
TSalaryAtta
>
attaList
=
baseMapper
.
selectList
(
Wrappers
.<
TSalaryAtta
>
query
().
lambda
().
in
(
TSalaryAtta:
:
getId
,
salaryAttaIds
));
if
(
Common
.
isNotNull
(
attaList
))
{
for
(
TSalaryAtta
atta
:
attaList
)
{
atta
.
setLinkId
(
linkId
);
baseMapper
.
updateById
(
atta
);
}
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
)
{
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
}
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
baseMapper
.
selectList
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
TSalaryAttaSearchVo
entity
)
{
LambdaQueryWrapper
<
TSalaryAtta
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TSalaryAtta:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TSalaryAtta:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
/**
* @param attaList
* @Description: 塞路径
* @Author: hgw
* @Date: 2021/11/23 17:37
* @return: void
**/
@Override
public
void
setSrc
(
List
<
TSalaryAtta
>
attaList
)
{
if
(
attaList
!=
null
&&
!
attaList
.
isEmpty
())
{
URL
url
;
for
(
TSalaryAtta
tsa
:
attaList
)
{
if
(
Common
.
isNotNull
(
tsa
.
getAttaSrc
()))
{
url
=
ossUtil
.
getObjectUrl
(
null
,
tsa
.
getAttaSrc
());
tsa
.
setAttaUrl
(
String
.
valueOf
(
url
));
}
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
()))
{
wrapper
.
eq
(
TSalaryAtta:
:
getCreateName
,
entity
.
getCreateName
());
}
return
wrapper
;
}
}
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
2be14fa2
...
...
@@ -65,6 +65,8 @@
<result
property=
"salaryTax"
column=
"SALARY_TAX"
/>
<result
property=
"relaySalaryUnit"
column=
"RELAY_SALARY_UNIT"
/>
<result
property=
"salaryTaxUnit"
column=
"SALARY_TAX_UNIT"
/>
<result
property=
"haveSalaryFlag"
column=
"HAVE_SALARY_FLAG"
/>
<result
property=
"haveSpecialFlag"
column=
"HAVE_SPECIAL_FLAG"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
...
...
@@ -107,7 +109,9 @@
a.ACTUAL_SALARY,
a.SALARY_TAX,
a.RELAY_SALARY_UNIT,
a.SALARY_TAX_UNIT
a.SALARY_TAX_UNIT,
a.HAVE_SALARY_FLAG,
a.HAVE_SPECIAL_FLAG
</sql>
<sql
id=
"tSalaryAccount_where"
>
<if
test=
"tSalaryAccount != null"
>
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAttaMapper.xml
View file @
2be14fa2
...
...
@@ -23,7 +23,7 @@
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAttaMapper"
>
<resultMap
id=
"t
Salary
AttaMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAtta"
>
<resultMap
id=
"tAttaMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAtta"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"attaName"
column=
"ATTA_NAME"
/>
<result
property=
"attaSrc"
column=
"ATTA_SRC"
/>
...
...
@@ -42,7 +42,7 @@
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
</resultMap>
<sql
id=
"
Base_Column_List
"
>
<sql
id=
"
selectParams
"
>
a.ID,
a.ATTA_NAME,
a.ATTA_SRC,
...
...
@@ -61,54 +61,75 @@
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
<!-- 基础查询 -->
<sql
id=
"tSalaryAtta_where"
>
<if
test=
"tSalary
Atta != null"
>
<if
test=
"tSalaryAtta.id != null and tSalary
Atta.id.trim() != ''"
>
AND a.ID = #{tSalary
Atta.id}
<if
test=
"t
Atta != null"
>
<if
test=
"tAtta.id != null and t
Atta.id.trim() != ''"
>
AND ID = #{t
Atta.id}
</if>
<if
test=
"tSalaryAtta.attaName != null and tSalary
Atta.attaName.trim() != ''"
>
AND a.ATTA_NAME = #{tSalary
Atta.attaName}
<if
test=
"tAtta.attaName != null and t
Atta.attaName.trim() != ''"
>
AND ATTA_NAME = #{t
Atta.attaName}
</if>
<if
test=
"tSalaryAtta.attaSrc != null and tSalary
Atta.attaSrc.trim() != ''"
>
AND a.ATTA_SRC = #{tSalary
Atta.attaSrc}
<if
test=
"tAtta.attaSrc != null and t
Atta.attaSrc.trim() != ''"
>
AND ATTA_SRC = #{t
Atta.attaSrc}
</if>
<if
test=
"tSalaryAtta.attaUrl != null and tSalary
Atta.attaUrl.trim() != ''"
>
AND a.ATTA_URL = #{tSalary
Atta.attaUrl}
<if
test=
"tAtta.attaUrl != null and t
Atta.attaUrl.trim() != ''"
>
AND ATTA_URL = #{t
Atta.attaUrl}
</if>
<if
test=
"tSalaryAtta.attaSize != null
"
>
AND a.ATTA_SIZE = #{tSalary
Atta.attaSize}
<if
test=
"tAtta.attaSize != null and tAtta.attaSize.trim() != ''
"
>
AND ATTA_SIZE = #{t
Atta.attaSize}
</if>
<if
test=
"tSalaryAtta.attaType != null and tSalary
Atta.attaType.trim() != ''"
>
AND a.ATTA_TYPE = #{tSalary
Atta.attaType}
<if
test=
"tAtta.attaType != null and t
Atta.attaType.trim() != ''"
>
AND ATTA_TYPE = #{t
Atta.attaType}
</if>
<if
test=
"tSalaryAtta.linkId != null and tSalary
Atta.linkId.trim() != ''"
>
AND a.LINK_ID = #{tSalary
Atta.linkId}
<if
test=
"tAtta.linkId != null and t
Atta.linkId.trim() != ''"
>
AND LINK_ID = #{t
Atta.linkId}
</if>
<if
test=
"tSalaryAtta.linkType != null"
>
AND a.LINK_TYPE = #{tSalaryAtta.linkType}
<if
test=
"tAtta.linkType != null"
>
<if
test=
"tAtta.linkType != 230 and tAtta.linkType != 236"
>
AND LINK_TYPE = #{tAtta.linkType}
</if>
<if
test=
"tSalaryAtta.engineerType != null"
>
AND a.ENGINEER_TYPE = #{tSalaryAtta.engineerType}
/* 普通工资以及暂停发以及自定义暂停发流转 */
<if
test=
"tAtta.linkType == 230"
>
AND LINK_TYPE in (2,3,0,8)
</if>
<if
test=
"tSalaryAtta.printRemark != null and tSalaryAtta.printRemark.trim() != ''"
>
AND a.print_remark = #{tSalaryAtta.printRemark}
/* 非扣税以及自定义暂停发流转 */
<if
test=
"tAtta.linkType == 236"
>
AND LINK_TYPE in (2,3,6)
</if>
<if
test=
"tSalaryAtta.recordId != null and tSalaryAtta.recordId.trim() != ''"
>
AND a.record_id = #{tSalaryAtta.recordId}
</if>
<if
test=
"tSalaryAtta.recordStatus != null"
>
AND a.record_status = #{tSalaryAtta.recordStatus}
<if
test=
"tAtta.engineerType != null"
>
AND ENGINEER_TYPE = #{tAtta.engineerType}
</if>
<if
test=
"tAtta.recordId != null and tAtta.recordId.trim() != ''"
>
AND record_id = #{tAtta.recordId}
</if>
<if
test=
"tAtta.recordStatus != null"
>
AND record_status = #{tAtta.recordStatus}
</if>
</if>
</sql>
<!--tSalaryAtta简单分页查询-->
<select
id=
"getTSalaryAttaPage"
resultMap=
"tSalaryAttaMap"
>
<!--tAtta简单分页查询-->
<select
id=
"getTAttaPage"
resultMap=
"tAttaMap"
>
SELECT
<include
refid=
"selectParams"
/>
FROM t_salary_atta
<where>
1=1
<include
refid=
"tSalaryAtta_where"
/>
</where>
order by CREATE_TIME
</select>
<!--tAtta简单分页查询-->
<select
id=
"getTAttaList"
resultMap=
"tAttaMap"
>
SELECT
<include
refid=
"Base_Column_List
"
/>
FROM t_salary_atta
a
<include
refid=
"selectParams
"
/>
FROM t_salary_att
a
<where>
1=1
<include
refid=
"tSalaryAtta_where"
/>
</where>
order by CREATE_TIME
</select>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
View file @
2be14fa2
...
...
@@ -48,6 +48,10 @@
<result
property=
"ownNums"
column=
"OWN_NUMS"
/>
<result
property=
"ownMoney"
column=
"OWN_MONEY"
/>
<result
property=
"ownRemark"
column=
"OWN_REMARK"
/>
<result
property=
"haveSalaryFlag"
column=
"HAVE_SALARY_FLAG"
/>
<result
property=
"haveSpecialFlag"
column=
"HAVE_SPECIAL_FLAG"
/>
<result
property=
"haveSalaryRemark"
column=
"HAVE_SALARY_REMARK"
/>
<result
property=
"haveSpecialRemark"
column=
"HAVE_SPECIAL_REMARK"
/>
<result
property=
"submitRemark"
column=
"SUBMIT_REMARK"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
...
...
@@ -85,6 +89,10 @@
a.OWN_NUMS,
a.OWN_MONEY,
a.OWN_REMARK,
a.HAVE_SALARY_FLAG,
a.HAVE_SALARY_REMARK,
a.HAVE_SPECIAL_FLAG,
a.HAVE_SPECIAL_REMARK,
a.SUBMIT_REMARK,
a.CREATE_BY,
a.CREATE_NAME,
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TSocialFundHistoryVo.java
View file @
2be14fa2
...
...
@@ -50,8 +50,8 @@ public class TSocialFundHistoryVo extends RowIndex implements Serializable {
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
@ExcelAttribute
(
name
=
"缴纳类型"
,
readConverterExp
=
"0=最低,1=自定义
缴纳
,2=最高"
)
@Schema
(
description
=
"缴纳类型(0最低、1自定义
缴纳
、2最高)"
)
@ExcelAttribute
(
name
=
"缴纳类型"
,
readConverterExp
=
"0=最低,1=自定义,2=最高"
)
@Schema
(
description
=
"缴纳类型(0最低、1自定义、2最高)"
)
@ExcelProperty
(
"缴纳类型"
)
private
String
paymentType
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
2be14fa2
...
...
@@ -1460,6 +1460,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
);
for
(
TSocialFundInfo
socialFundInfo
:
socialFundInfoList
)
{
this
.
changeFundInfoByBase
(
socialFundInfo
,
sysBaseSetInfo
);
socialFundInfo
.
setDoMonth
(
sysBaseSetInfo
.
getDoMonth
());
socialFundInfoMap
.
put
(
socialFundInfo
.
getId
(),
socialFundInfo
);
}
}
...
...
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