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
02bf4ff2
Commit
02bf4ff2
authored
Apr 21, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.10-工资条暂时提交
parent
98580dfc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
302 additions
and
63 deletions
+302
-63
TSalaryAccountController.java
...s/v1/yifu/salary/controller/TSalaryAccountController.java
+38
-58
TSalaryAccountMapper.java
...loud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
+6
-0
TSalaryAccountService.java
...ud/plus/v1/yifu/salary/service/TSalaryAccountService.java
+9
-0
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+182
-5
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+67
-0
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryAccountController.java
View file @
02bf4ff2
...
...
@@ -227,6 +227,32 @@ public class TSalaryAccountController {
tSalaryAccountService
.
exportAsso
(
response
,
searchVo
,
CommonConstants
.
ONE_INT
);
}
/**
* 获取工资条导出
* @author hgw
* @date 2025-4-21 09:30:56
**/
@Operation
(
description
=
"获取工资条导出"
)
@PostMapping
(
"/getEmpAccountExport"
)
@SysLog
(
"获取工资条导出"
)
public
void
getEmpAccountExport
(
HttpServletResponse
response
,
@RequestBody
TSalaryAccountSearchVo
searchVo
)
{
String
empIdCard
=
searchVo
.
getEmpIdcard
();
String
settleDepartId
=
searchVo
.
getDeptId
();
String
settlementMonth
=
searchVo
.
getSettlementMonth
();
String
deptNo
=
searchVo
.
getDeptNo
();
String
empName
=
searchVo
.
getEmpName
();
if
(
Common
.
isEmpty
(
empIdCard
)
&&
Common
.
isEmpty
(
settleDepartId
)
&&
Common
.
isEmpty
(
settlementMonth
)
&&
Common
.
isEmpty
(
deptNo
)
&&
Common
.
isEmpty
(
empName
))
{
tSalaryAccountService
.
exportError
(
response
,
"请输入查询条件"
);
}
else
if
(
Common
.
isNotNull
(
settlementMonth
)
&&
Common
.
isEmpty
(
empIdCard
)
&&
Common
.
isEmpty
(
settleDepartId
)
&&
Common
.
isEmpty
(
deptNo
)
&&
Common
.
isEmpty
(
empName
))
{
tSalaryAccountService
.
exportError
(
response
,
"结算月需配合其他查询条件一起使用,请输入其他查询条件!"
);
}
else
{
tSalaryAccountService
.
exportAsso
(
response
,
searchVo
,
CommonConstants
.
TWO_INT
);
}
}
/**
* @Author fxj
* @Description 获取工资条
...
...
@@ -236,68 +262,22 @@ public class TSalaryAccountController {
**/
@Operation
(
description
=
"获取工资条"
)
@GetMapping
(
"/getEmpAccount"
)
public
R
<
TSalaryDetailVo
>
getEmpAccount
(
String
empIdcard
,
String
settleDepartId
,
String
settlementMonth
,
String
deptNo
,
String
deptName
,
String
empName
)
{
TSalaryDetailVo
salaryDetailVo
=
new
TSalaryDetailVo
();
if
(
Common
.
isEmpty
(
empIdcard
)
&&
Common
.
isEmpty
(
settleDepartId
)
&&
Common
.
isEmpty
(
settlementMonth
)
&&
Common
.
isEmpty
(
deptNo
)
&&
Common
.
isEmpty
(
deptName
)
&&
Common
.
isEmpty
(
empName
))
{
public
R
<
IPage
<
TSalaryAccount
>>
getEmpAccount
(
Page
<
TSalaryAccount
>
page
,
TSalaryAccountSearchVo
searchVo
)
{
String
empIdCard
=
searchVo
.
getEmpIdcard
();
String
settleDepartId
=
searchVo
.
getDeptId
();
String
settlementMonth
=
searchVo
.
getSettlementMonth
();
String
deptNo
=
searchVo
.
getDeptNo
();
String
empName
=
searchVo
.
getEmpName
();
if
(
Common
.
isEmpty
(
empIdCard
)
&&
Common
.
isEmpty
(
settleDepartId
)
&&
Common
.
isEmpty
(
settlementMonth
)
&&
Common
.
isEmpty
(
deptNo
)
&&
Common
.
isEmpty
(
empName
))
{
return
R
.
failed
(
"请输入查询条件"
);
}
if
(
Common
.
isNotNull
(
settlementMonth
)
&&
Common
.
isEmpty
(
empId
c
ard
)
&&
Common
.
isEmpty
(
settleDepartId
)
&&
Common
.
isEmpty
(
deptNo
)
&&
Common
.
isEmpty
(
deptName
)
&&
Common
.
isEmpty
(
empName
))
{
if
(
Common
.
isNotNull
(
settlementMonth
)
&&
Common
.
isEmpty
(
empId
C
ard
)
&&
Common
.
isEmpty
(
settleDepartId
)
&&
Common
.
isEmpty
(
deptNo
)
&&
Common
.
isEmpty
(
empName
))
{
return
R
.
failed
(
"结算月需配合其他查询条件一起使用,请输入其他查询条件!"
);
}
//报账表
TSalaryAccount
salaryAccount
=
new
TSalaryAccount
();
salaryAccount
.
setDeleteFlag
(
SalaryConstants
.
NOT_DELETE
);
if
(
Common
.
isNotNull
(
empIdcard
))
{
salaryAccount
.
setEmpIdcard
(
empIdcard
);
}
if
(
Common
.
isNotNull
(
settleDepartId
))
{
salaryAccount
.
setDeptId
(
settleDepartId
);
}
if
(
Common
.
isNotNull
(
settlementMonth
)
&&
settlementMonth
.
length
()
==
6
)
{
salaryAccount
.
setSettlementMonth
(
settlementMonth
);
}
QueryWrapper
<
TSalaryAccount
>
queryWrapperSa
=
new
QueryWrapper
<>();
queryWrapperSa
.
setEntity
(
salaryAccount
);
if
(
Common
.
isNotNull
(
empName
))
{
queryWrapperSa
.
eq
(
"EMP_NAME"
,
empName
);
}
if
(
Common
.
isNotNull
(
deptNo
))
{
queryWrapperSa
.
eq
(
"DEPT_NO"
,
deptNo
);
}
if
(
Common
.
isNotNull
(
settleDepartId
))
{
queryWrapperSa
.
eq
(
"DEPT_ID"
,
settleDepartId
);
}
if
(
Common
.
isNotNull
(
settlementMonth
)
&&
settlementMonth
.
length
()
<
6
)
{
queryWrapperSa
.
eq
(
"SETTLEMENT_MONTH"
,
settlementMonth
);
}
queryWrapperSa
.
orderByAsc
(
"SETTLEMENT_MONTH"
);
List
<
TSalaryAccount
>
salaryAccountList
=
tSalaryAccountService
.
list
(
queryWrapperSa
);
Map
<
String
,
String
>
accountTitle
=
new
HashMap
<>();
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
);
if
(
itemList
!=
null
&&
itemList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
for
(
TSalaryAccountItem
items
:
itemList
)
{
accountTitle
.
put
(
items
.
getCnName
(),
items
.
getJavaFiedName
());
}
}
a
.
setSaiList
(
itemList
);
}
}
salaryDetailVo
.
setSalaryAccountList
(
salaryAccountList
);
salaryDetailVo
.
setAccountTitle
(
accountTitle
);
return
new
R
<>(
salaryDetailVo
);
return
new
R
<>(
tSalaryAccountService
.
getEmpAccountPage
(
page
,
searchVo
));
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
View file @
02bf4ff2
...
...
@@ -47,6 +47,12 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
@Param
(
"tSalaryAccount"
)
TSalaryAccount
tSalaryAccount
,
@Param
(
"deptNos"
)
List
<
String
>
deptNos
);
IPage
<
TSalaryAccount
>
getEmpAccountPage
(
Page
<
TSalaryAccount
>
page
,
@Param
(
"tSalaryAccount"
)
TSalaryAccount
tSalaryAccount
);
int
getEmpAccountCount
(
@Param
(
"tSalaryAccount"
)
TSalaryAccount
tSalaryAccount
);
List
<
TSalaryAccount
>
getEmpAccountExport
(
@Param
(
"tSalaryAccount"
)
TSalaryAccount
tSalaryAccount
);
List
<
TSalaryAccount
>
getTSalaryAccountPageDataByIds
(
@Param
(
"tSalaryAccount"
)
TSalaryAccount
tSalaryAccount
,
@Param
(
"ids"
)
List
<
String
>
ids
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryAccountService.java
View file @
02bf4ff2
...
...
@@ -44,6 +44,15 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @return
*/
IPage
<
TSalaryAccount
>
getTSalaryAccountPage
(
Page
<
TSalaryAccount
>
page
,
TSalaryAccountSearchVo
tSalaryAccount
);
/**
* @Description: 项目薪酬查询-工资条查询
* @Author: hgw
* @Date: 2025/4/18 14:58
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
IPage
<
TSalaryAccount
>
getEmpAccountPage
(
Page
<
TSalaryAccount
>
page
,
TSalaryAccountSearchVo
searchVo
);
/**
* @Author fxj
* @Description 薪资报账导出统一导出限制
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
02bf4ff2
This diff is collapsed.
Click to expand it.
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
02bf4ff2
...
...
@@ -568,6 +568,73 @@
</where>
order by a.CREATE_TIME desc
</select>
<!--项目薪酬查询-工资条查询-导出条数-->
<select
id=
"getEmpAccountCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM
<if
test=
"settlementMonth == null or settlementMonth.trim() >= '202201' "
>
t_salary_account a
</if>
<if
test=
"settlementMonth != null and settlementMonth.trim() < '202201' "
>
t_salary_account_hro_2021 a
</if>
where a.DELETE_FLAG = 0
<include
refid=
"tSalaryAccount_where"
/>
</select>
<!--项目薪酬查询-工资条查询-导出-->
<select
id=
"getEmpAccountExport"
resultMap=
"tSalaryAccountMap"
>
SELECT
a.SALARY_MONTH,
if(a.DISTRIBUTION_FLAG='1','发放成功',if(a.DISTRIBUTION_FLAG='2','发放失败','未发放')) DISTRIBUTION_FLAG,
a.SETTLEMENT_MONTH,
a.DEPT_NAME,
a.EMP_NAME,
a.BANK_NO,
a.BANK_NAME,
a.EMP_IDCARD,
if(a.SALARY_STYLE='0','现金',if(a.SALARY_STYLE='1','转账','线下')) SALARY_STYLE,
a.DEDU_SOCIAL_MONTH,
a.DEDU_PROVIDENT_MONTH,
if(a.SOCIAL_PRIORITY='0','生成','缴纳') SOCIAL_PRIORITY,
if(a.FUND_PRIORITY='0','生成','缴纳') FUND_PRIORITY,
if(a.ANNUAL_BONUS_TYPE='0','合并','单独') ANNUAL_BONUS_TYPE,
if(a.IS_DEDUCT_SOCIAL='0','否','是') IS_DEDUCT_SOCIAL,
if(a.IS_DEDUCT_FUND='0','否','是') IS_DEDUCT_FUND
FROM
<if
test=
"settlementMonth == null or settlementMonth.trim() >= '202201' "
>
t_salary_account a
</if>
<if
test=
"settlementMonth != null and settlementMonth.trim() < '202201' "
>
t_salary_account_hro_2021 a
</if>
where a.DELETE_FLAG = 0
<include
refid=
"tSalaryAccount_where"
/>
order by a.SETTLEMENT_MONTH asc
<if
test=
"searchVo != null"
>
<if
test=
"searchVo.limitStart != null"
>
limit #{searchVo.limitStart},#{searchVo.limitEnd}
</if>
</if>
</select>
<!--项目薪酬查询-工资条查询-->
<select
id=
"getEmpAccountPage"
resultMap=
"tSalaryAccountMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
<if
test=
"settlementMonth == null or settlementMonth.trim() >= '202201' "
>
t_salary_account a
</if>
<if
test=
"settlementMonth != null and settlementMonth.trim() < '202201' "
>
t_salary_account_hro_2021 a
</if>
where a.DELETE_FLAG = 0
<include
refid=
"tSalaryAccount_where"
/>
order by a.SETTLEMENT_MONTH asc
</select>
<!--tSalaryAccount简单分页查询-->
<select
id=
"getTSalaryAccountPageDataByIds"
resultMap=
"tSalaryAccountMap"
>
SELECT
...
...
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