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
c77c8816
Commit
c77c8816
authored
Oct 24, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目薪资查询、导出、count等接口,添加工资月范围查询;
薪资报账查询、导出、count等接口,添加工资月范围查询; 详情接口,转化为sql查询;
parent
5996cd1e
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
144 additions
and
16 deletions
+144
-16
TSalaryAccount.java
...yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccount.java
+11
-0
TSalaryAccountItem.java
.../cloud/plus/v1/yifu/salary/entity/TSalaryAccountItem.java
+6
-0
TSalaryStandard.java
...ifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
+11
-0
TSalaryAccountMapper.java
...loud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
+2
-0
TSalaryAccountService.java
...ud/plus/v1/yifu/salary/service/TSalaryAccountService.java
+9
-0
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+5
-8
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+6
-0
TSalaryAccountItemMapper.xml
...iz/src/main/resources/mapper/TSalaryAccountItemMapper.xml
+7
-1
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+47
-3
TSalaryStandardMapper.xml
...y-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
+40
-4
No files found.
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccount.java
View file @
c77c8816
...
...
@@ -506,4 +506,15 @@ public class TSalaryAccount extends BaseEntity {
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"年终奖单独扣税税费"
)
private
BigDecimal
annualBonusTax
;
/**
* 工资月份-起
*/
@TableField
(
exist
=
false
)
private
String
salaryMonthStart
;
/**
* 工资月份-止
*/
@TableField
(
exist
=
false
)
private
String
salaryMonthEnd
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccountItem.java
View file @
c77c8816
...
...
@@ -107,4 +107,10 @@ public class TSalaryAccountItem extends Model<TSalaryAccountItem> {
@TableField
(
exist
=
false
)
private
String
formType
;
/**
* 工资月
*/
@TableField
(
exist
=
false
)
private
String
salaryMonth
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
View file @
c77c8816
...
...
@@ -21,6 +21,7 @@ import com.alibaba.excel.annotation.ExcelIgnore;
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
;
...
...
@@ -395,4 +396,14 @@ public class TSalaryStandard extends BaseEntity {
@ExcelIgnore
private
String
bpoFlag
;
/**
* 工资月份-起
*/
@TableField
(
exist
=
false
)
private
String
salaryMonthStart
;
/**
* 工资月份-止
*/
@TableField
(
exist
=
false
)
private
String
salaryMonthEnd
;
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
View file @
c77c8816
...
...
@@ -108,6 +108,8 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
List
<
TSalaryAccount
>
noPageDiy
(
@Param
(
"searchVo"
)
TSalaryAccountSearchVo
searchVo
,
@Param
(
"idList"
)
List
<
String
>
idList
);
List
<
TSalaryAccount
>
getAccountListBySalaryId
(
@Param
(
"searchVo"
)
TSalaryAccountSearchVo
searchVo
);
/**
* @Description: 根据工资id,返回报账明细(字段较少且有计算,其他地方勿用)
* @Author: hgw
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryAccountService.java
View file @
c77c8816
...
...
@@ -57,6 +57,15 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
List
<
TSalaryAccount
>
noPageDiy
(
TSalaryAccountSearchVo
searchVo
);
/**
* @param searchVo
* @Description: 无需权限仅按照工资id查询报账
* @Author: hgw
* @Date: 2022/10/24 16:36
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
List
<
TSalaryAccount
>
getAccountListBySalaryId
(
TSalaryAccountSearchVo
searchVo
);
/**
* @param settleId
* @param settleMonth
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
c77c8816
...
...
@@ -1376,22 +1376,19 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
List
<
TSalaryAtta
>
attaList
=
null
;
if
(
salary
.
getType
()
==
null
||
salary
.
getType
()
!=
CommonConstants
.
ONE_INT
)
{
//报账表
TSalaryAccount
salaryAccount
=
new
TSalaryAccount
();
TSalaryAccount
SearchVo
salaryAccount
=
new
TSalaryAccountSearchVo
();
salaryAccount
.
setSalaryFormId
(
salaryFormId
);
QueryWrapper
<
TSalaryAccount
>
queryWrapperSa
=
new
QueryWrapper
<>();
queryWrapperSa
.
setEntity
(
salaryAccount
);
List
<
TSalaryAccount
>
salaryAccountList
=
tSalaryAccountService
.
list
(
queryWrapperSa
);
salaryAccount
.
setSalaryMonthStart
(
salary
.
getSalaryMonth
());
List
<
TSalaryAccount
>
salaryAccountList
=
tSalaryAccountService
.
getAccountListBySalaryId
(
salaryAccount
);
//报账表明细
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
);
item
.
setSalaryMonth
(
salary
.
getSalaryMonth
());
itemList
=
tSalaryAccountItemService
.
getTSalaryAccountItemNoPage
(
item
);
a
.
setSaiList
(
itemList
);
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
c77c8816
...
...
@@ -35,6 +35,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
...
...
@@ -151,6 +152,11 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
return
baseMapper
.
noPageDiy
(
searchVo
,
searchVo
.
getIdList
());
}
@Override
public
List
<
TSalaryAccount
>
getAccountListBySalaryId
(
TSalaryAccountSearchVo
searchVo
)
{
return
baseMapper
.
getAccountListBySalaryId
(
searchVo
);
}
private
int
noPageCountDiy
(
TSalaryAccountSearchVo
searchVo
)
{
return
baseMapper
.
noPageCountDiy
(
searchVo
,
searchVo
.
getIdList
());
}
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountItemMapper.xml
View file @
c77c8816
...
...
@@ -38,7 +38,13 @@
SALARY_MONEY,
TEXT_VALUE,
IS_TAX
FROM t_salary_account_item
FROM
<if
test=
"tSalaryAccountItem.salaryMonth == null or tSalaryAccountItem.salaryMonth.trim() >= '202201'"
>
t_salary_account_item a
</if>
<if
test=
"tSalaryAccountItem.salaryMonth != null and tSalaryAccountItem.salaryMonth.trim() < '202201' "
>
t_salary_account_item_hro_2021 a
</if>
<where>
<if
test=
"tSalaryAccountItem.id != null and tSalaryAccountItem.id.trim() != ''"
>
AND ID = #{tSalaryAccountItem.id}
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
c77c8816
...
...
@@ -253,6 +253,12 @@
<if
test=
"tSalaryAccount.salaryMonth != null and tSalaryAccount.salaryMonth.trim() != ''"
>
AND a.SALARY_MONTH = #{tSalaryAccount.salaryMonth}
</if>
<if
test=
"tSalaryAccount.salaryMonthStart != null and tSalaryAccount.salaryMonthStart.trim() != ''"
>
AND a.SALARY_MONTH >= #{tSalaryAccount.salaryMonthStart}
</if>
<if
test=
"tSalaryAccount.salaryMonthEnd != null and tSalaryAccount.salaryMonthEnd.trim() != ''"
>
AND a.SALARY_MONTH
<![CDATA[<=]]>
#{tSalaryAccount.salaryMonthEnd}
</if>
<if
test=
"tSalaryAccount.empId != null and tSalaryAccount.empId.trim() != ''"
>
AND a.EMP_ID = #{tSalaryAccount.empId}
</if>
...
...
@@ -373,7 +379,13 @@
<select
id=
"getTSalaryAccountPage"
resultMap=
"tSalaryAccountMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_salary_account a
FROM
<if
test=
"tSalaryAccount.salaryMonthStart == null or tSalaryAccount.salaryMonthStart.trim() >= '202201' "
>
t_salary_account a
</if>
<if
test=
"tSalaryAccount.salaryMonthStart != null and tSalaryAccount.salaryMonthStart.trim() < '202201' "
>
t_salary_account_hro_2021 a
</if>
<where>
a.DELETE_FLAG = 0
and not EXISTS (
...
...
@@ -605,7 +617,13 @@
<select
id=
"noPageDiy"
resultMap=
"tSalaryAccountMap"
parameterType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_salary_account a
FROM
<if
test=
"searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201'"
>
t_salary_account a
</if>
<if
test=
"searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() < '202201' "
>
t_salary_account_hro_2021 a
</if>
<where>
a.DELETE_FLAG = 0 and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
...
...
@@ -624,6 +642,20 @@
</select>
<select
id=
"getAccountListBySalaryId"
resultMap=
"tSalaryAccountMap"
parameterType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
<if
test=
"searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201'"
>
t_salary_account a
</if>
<if
test=
"searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() < '202201' "
>
t_salary_account_hro_2021 a
</if>
where a.SALARY_FORM_ID = #{searchVo.salaryFormId}
ORDER BY a.CREATE_TIME desc
</select>
<!-- 计算收入需要的报账明细 -->
<select
id=
"getListByIncome"
resultMap=
"tSalaryAccountMap"
>
SELECT
...
...
@@ -645,7 +677,13 @@
<select
id=
"noPageCountDiy"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM t_salary_account a
FROM
<if
test=
"searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201' "
>
t_salary_account a
</if>
<if
test=
"searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() < '202201' "
>
t_salary_account_hro_2021 a
</if>
<where>
a.DELETE_FLAG = 0 and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
...
...
@@ -676,6 +714,12 @@
<if
test=
"searchVo.salaryMonth != null and searchVo.salaryMonth.trim() != ''"
>
AND a.SALARY_MONTH = #{searchVo.salaryMonth}
</if>
<if
test=
"searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() != ''"
>
AND a.SALARY_MONTH >= #{searchVo.salaryMonthStart}
</if>
<if
test=
"searchVo.salaryMonthEnd != null and searchVo.salaryMonthEnd.trim() != ''"
>
AND a.SALARY_MONTH
<![CDATA[<=]]>
#{searchVo.salaryMonthEnd}
</if>
<if
test=
"searchVo.empId != null and searchVo.empId.trim() != ''"
>
AND a.EMP_ID = #{searchVo.empId}
</if>
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
View file @
c77c8816
...
...
@@ -169,6 +169,12 @@
<if
test=
"tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''"
>
AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth}
</if>
<if
test=
"tSalaryStandard.salaryMonthStart != null and tSalaryStandard.salaryMonthStart.trim() != ''"
>
AND a.SALARY_MONTH >= #{tSalaryStandard.salaryMonthStart}
</if>
<if
test=
"tSalaryStandard.salaryMonthEnd != null and tSalaryStandard.salaryMonthEnd.trim() != ''"
>
AND a.SALARY_MONTH
<![CDATA[<=]]>
#{tSalaryStandard.salaryMonthEnd}
</if>
<if
test=
"tSalaryStandard.moneyFrom != null"
>
AND a.MONEY_FROM = #{tSalaryStandard.moneyFrom}
</if>
...
...
@@ -265,7 +271,13 @@
<select
id=
"getTSalaryStandardPage"
resultMap=
"tSalaryStandardMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_salary_standard a
FROM
<if
test=
"tSalaryStandard.salaryMonthStart == null or tSalaryStandard.salaryMonthStart.trim() >= '202201' "
>
t_salary_standard a
</if>
<if
test=
"tSalaryStandard.salaryMonthStart != null and tSalaryStandard.salaryMonthStart.trim() < '202201' "
>
t_salary_standard_hro_2021 a
</if>
left join t_dept_see d on a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0
...
...
@@ -282,7 +294,13 @@
<select
id=
"getTSalaryStandardPageApply"
resultMap=
"tSalaryStandardMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_salary_standard a
FROM
<if
test=
"tSalaryStandard.salaryMonthStart == null or tSalaryStandard.salaryMonthStart.trim() >= '202201' "
>
t_salary_standard a
</if>
<if
test=
"tSalaryStandard.salaryMonthStart != null and tSalaryStandard.salaryMonthStart.trim() < '202201' "
>
t_salary_standard_hro_2021 a
</if>
<where>
a.DELETE_FLAG = 0
<!-- 薪资是否可查看 0 是 1否-->
...
...
@@ -351,7 +369,13 @@
a.SALARY_MONTH,
a.FORM_TYPE,
a.CREATE_TIME
FROM t_salary_standard a
FROM
<if
test=
"searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201' "
>
t_salary_standard a
</if>
<if
test=
"searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() < '202201' "
>
t_salary_standard_hro_2021 a
</if>
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
...
...
@@ -371,7 +395,13 @@
<select
id=
"getSalaryStandardExportCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM t_salary_standard a
FROM
<if
test=
"searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201' "
>
t_salary_standard a
</if>
<if
test=
"searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() < '202201' "
>
t_salary_standard_hro_2021 a
</if>
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
...
...
@@ -417,6 +447,12 @@
<if
test=
"searchVo.salaryMonth != null and searchVo.salaryMonth.trim() != ''"
>
AND a.SALARY_MONTH = #{searchVo.salaryMonth}
</if>
<if
test=
"searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() != ''"
>
AND a.SALARY_MONTH >= #{searchVo.salaryMonthStart}
</if>
<if
test=
"searchVo.salaryMonthEnd != null and searchVo.salaryMonthEnd.trim() != ''"
>
AND a.SALARY_MONTH
<![CDATA[<=]]>
#{searchVo.salaryMonthEnd}
</if>
<!--<if test="searchVo.status == null">
AND (a.STATUS = 1 OR a.STATUS = 2 OR a.STATUS = 5)
</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