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
4ed286a9
Commit
4ed286a9
authored
Aug 16, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化导入,精简字段
parent
ef0d09f5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
129 deletions
+49
-129
TSalaryAccountItemMapper.java
.../plus/v1/yifu/salary/mapper/TSalaryAccountItemMapper.java
+18
-18
TSalaryAccountItemMapper.xml
...iz/src/main/resources/mapper/TSalaryAccountItemMapper.xml
+28
-108
TSalaryAttaMapper.xml
...alary-biz/src/main/resources/mapper/TSalaryAttaMapper.xml
+3
-3
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccountItemMapper.java
View file @
4ed286a9
...
...
@@ -27,7 +27,7 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
List
<
TSalaryAccountItem
>
getTSalaryAccountItemPage
(
@Param
(
"tSalaryAccountItem"
)
TSalaryAccountItem
tSalaryAccountItem
);
/**
* @param
settleDepar
tId
* @param
dep
tId
* @param settleMonth
* @param javaFiedName
* @Description: 获取报账详情信息
...
...
@@ -35,7 +35,7 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
* @Date: 2019/9/29 18:26
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>
**/
List
<
TSalaryAccountItem
>
getAllTSalaryAccountItem
(
@Param
(
"
settleDepartId"
)
String
settleDepar
tId
,
List
<
TSalaryAccountItem
>
getAllTSalaryAccountItem
(
@Param
(
"
deptId"
)
String
dep
tId
,
@Param
(
"settleMonth"
)
String
settleMonth
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"finallyYear"
)
String
finallyYear
,
@Param
(
"empIdcard"
)
String
empIdcard
,
@Param
(
"accountId"
)
String
accountId
);
...
...
@@ -62,17 +62,17 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
List
<
TSalaryAccountItem
>
getAllItemVoList
(
@Param
(
"idCardList"
)
List
<
String
>
idCardList
,
@Param
(
"invoiceTitle"
)
String
invoiceTitle
);
/**
* @param
settleDepar
tId 结算主体id
* @param
dep
tId 结算主体id
* @param javaFiedName 属性名
* @param salary
Date
工资月
* @param salary
Month
工资月
* @param empIdcard 身份证
* @Description: 获取前几个月总工资
* @Author: hgw
* @Date: 2019/10/29 16:51
* @return: java.math.BigDecimal
**/
BigDecimal
getAllMoney
(
@Param
(
"
settleDepartId"
)
String
settleDepar
tId
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Date"
)
String
salaryDate
BigDecimal
getAllMoney
(
@Param
(
"
deptId"
)
String
dep
tId
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Month"
)
String
salaryMonth
,
@Param
(
"empIdcard"
)
String
empIdcard
);
/**
...
...
@@ -97,45 +97,45 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
,
@Param
(
"javaFiedName"
)
String
javaFiedName
);
/**
* @param
settleDepar
tId 结算主体id
* @param
dep
tId 结算主体id
* @param javaFiedName 属性名
* @param salary
Date
工资月
* @param salary
Month
工资月
* @param empIdcard 身份证
* @Description: 获取月份条数(前12个月平均工资,要除以工资月数,这里就是工资月数)
* @Author: hgw
* @Date: 2019/10/29 16:51
* @return: java.long.Integer
**/
Integer
getAverageSalaryItemMonthCount
(
@Param
(
"
settleDepartId"
)
String
settleDepar
tId
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Date"
)
String
salaryDate
Integer
getAverageSalaryItemMonthCount
(
@Param
(
"
deptId"
)
String
dep
tId
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Month"
)
String
salaryMonth
,
@Param
(
"empIdcard"
)
String
empIdcard
);
/**
* @param
settleDepar
tId 结算主体id
* @param
dep
tId 结算主体id
* @param javaFiedName 属性名
* @param salary
Date
工资月
* @param salary
Month
工资月
* @param empIdcard 身份证
* @Description: 获取前几个月总工资
* @Author: hgw
* @Date: 2019/10/29 16:51
* @return: java.math.BigDecimal
**/
BigDecimal
getEngineerAllMoney
(
@Param
(
"
settleDepartId"
)
String
settleDepar
tId
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Date"
)
String
salaryDate
BigDecimal
getEngineerAllMoney
(
@Param
(
"
deptId"
)
String
dep
tId
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Month"
)
String
salaryMonth
,
@Param
(
"empIdcard"
)
String
empIdcard
);
/**
* @param
settleDepar
tId 结算主体id
* @param
dep
tId 结算主体id
* @param javaFiedName 属性名
* @param salary
Date
工资月
* @param salary
Month
工资月
* @param empIdcard 身份证
* @Description: 获取月份条数(前12个月平均工资,要除以工资月数,这里就是工资月数)
* @Author: hgw
* @Date: 2019/10/29 16:51
* @return: java.long.Integer
**/
Integer
getEngineerAverageSalaryItemMonthCount
(
@Param
(
"
settleDepartId"
)
String
settleDepar
tId
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Date"
)
String
salaryDate
Integer
getEngineerAverageSalaryItemMonthCount
(
@Param
(
"
deptId"
)
String
dep
tId
,
@Param
(
"javaFiedName"
)
String
javaFiedName
,
@Param
(
"salary
Month"
)
String
salaryMonth
,
@Param
(
"empIdcard"
)
String
empIdcard
);
List
<
TSalaryAccountItem
>
getAccountItemList
(
@Param
(
"tSalaryAccount"
)
TSalaryAccount
tSalaryAccount
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountItemMapper.xml
View file @
4ed286a9
...
...
@@ -71,8 +71,8 @@
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
a.DELETE_FLAG = 0
<if
test=
"
settleDepartId != null and settleDepar
tId.trim() != ''"
>
AND a.
SETTLE_DEPART_ID = #{settleDepar
tId}
<if
test=
"
deptId != null and dep
tId.trim() != ''"
>
AND a.
DEPT_ID = #{dep
tId}
</if>
<if
test=
"settleMonth != null and settleMonth.trim() != ''"
>
AND a.SETTLEMENT_MONTH = #{settleMonth}
...
...
@@ -124,14 +124,14 @@
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
a.DELETE_FLAG = 0
<if
test=
"
settleDepartId != null and settleDepar
tId.trim() != ''"
>
AND a.
SETTLE_DEPART_ID = #{settleDepar
tId}
<if
test=
"
deptId != null and dep
tId.trim() != ''"
>
AND a.
DEPT_ID = #{dep
tId}
</if>
<if
test=
"javaFiedName != null and javaFiedName.trim() != ''"
>
AND i.JAVA_FIED_NAME = #{javaFiedName}
</if>
<if
test=
"salary
Date != null and salaryDate
.trim() != ''"
>
AND a.SALARY_
DATE > #{salaryDate
}
<if
test=
"salary
Month != null and salaryMonth
.trim() != ''"
>
AND a.SALARY_
MONTH > #{salaryMonth
}
</if>
<if
test=
"empIdcard != null and empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{empIdcard}
...
...
@@ -150,19 +150,19 @@
<select
id=
"getAverageSalaryItemMonthCount"
resultType=
"Integer"
>
SELECT
count(DISTINCT a.SALARY_
DATE
)
count(DISTINCT a.SALARY_
MONTH
)
FROM
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
a.DELETE_FLAG = 0
<if
test=
"
settleDepartId != null and settleDepar
tId.trim() != ''"
>
AND a.
SETTLE_DEPART_ID = #{settleDepar
tId}
<if
test=
"
deptId != null and dep
tId.trim() != ''"
>
AND a.
DEPT_ID = #{dep
tId}
</if>
<if
test=
"javaFiedName != null and javaFiedName.trim() != ''"
>
AND i.JAVA_FIED_NAME = #{javaFiedName}
</if>
<if
test=
"salary
Date != null and salaryDate
.trim() != ''"
>
AND a.SALARY_
DATE > #{salaryDate
}
<if
test=
"salary
Month != null and salaryMonth
.trim() != ''"
>
AND a.SALARY_
MONTH > #{salaryMonth
}
</if>
<if
test=
"empIdcard != null and empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{empIdcard}
...
...
@@ -178,14 +178,14 @@
t_engineer_account_item i left join t_engineer_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
a.DELETE_FLAG = 0
<if
test=
"
settleDepartId != null and settleDepar
tId.trim() != ''"
>
AND a.
SETTLE_DEPART_ID = #{settleDepar
tId}
<if
test=
"
deptId != null and dep
tId.trim() != ''"
>
AND a.
DEPT_ID = #{dep
tId}
</if>
<if
test=
"javaFiedName != null and javaFiedName.trim() != ''"
>
AND i.JAVA_FIED_NAME = #{javaFiedName}
</if>
<if
test=
"salary
Date != null and salaryDate
.trim() != ''"
>
AND a.SALARY_
DATE > #{salaryDate
}
<if
test=
"salary
Month != null and salaryMonth
.trim() != ''"
>
AND a.SALARY_
MONTH > #{salaryMonth
}
</if>
<if
test=
"empIdcard != null and empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{empIdcard}
...
...
@@ -195,19 +195,19 @@
<select
id=
"getEngineerAverageSalaryItemMonthCount"
resultType=
"Integer"
>
SELECT
count(DISTINCT a.SALARY_
DATE
)
count(DISTINCT a.SALARY_
MONTH
)
FROM
t_engineer_account_item i left join t_engineer_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
a.DELETE_FLAG = 0
<if
test=
"
settleDepartId != null and settleDepar
tId.trim() != ''"
>
AND a.
SETTLE_DEPART_ID = #{settleDepar
tId}
<if
test=
"
deptId != null and dep
tId.trim() != ''"
>
AND a.
DEPT_ID = #{dep
tId}
</if>
<if
test=
"javaFiedName != null and javaFiedName.trim() != ''"
>
AND i.JAVA_FIED_NAME = #{javaFiedName}
</if>
<if
test=
"salary
Date != null and salaryDate
.trim() != ''"
>
AND a.SALARY_
DATE > #{salaryDate
}
<if
test=
"salary
Month != null and salaryMonth
.trim() != ''"
>
AND a.SALARY_
MONTH > #{salaryMonth
}
</if>
<if
test=
"empIdcard != null and empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{empIdcard}
...
...
@@ -272,8 +272,8 @@
<if
test=
"tSalaryAccount.salaryFormId != null and tSalaryAccount.salaryFormId.trim() != ''"
>
AND a.SALARY_FORM_ID = #{tSalaryAccount.salaryFormId}
</if>
<if
test=
"tSalaryAccount.salary
Date != null and tSalaryAccount.salaryDate
.trim() != ''"
>
AND a.SALARY_
DATE = #{tSalaryAccount.salaryDate
}
<if
test=
"tSalaryAccount.salary
Month != null and tSalaryAccount.salaryMonth
.trim() != ''"
>
AND a.SALARY_
MONTH = #{tSalaryAccount.salaryMonth
}
</if>
<if
test=
"tSalaryAccount.empId != null and tSalaryAccount.empId.trim() != ''"
>
AND a.EMP_ID = #{tSalaryAccount.empId}
...
...
@@ -284,14 +284,14 @@
<if
test=
"tSalaryAccount.empNo != null and tSalaryAccount.empNo.trim() != ''"
>
AND a.EMP_NO = #{tSalaryAccount.empNo}
</if>
<if
test=
"tSalaryAccount.
settleDepartId != null and tSalaryAccount.settleDepar
tId.trim() != ''"
>
AND a.BELONG_DEPART = #{tSalaryAccount.
settleDepar
tId}
<if
test=
"tSalaryAccount.
deptId != null and tSalaryAccount.dep
tId.trim() != ''"
>
AND a.BELONG_DEPART = #{tSalaryAccount.
dep
tId}
</if>
<if
test=
"tSalaryAccount.
settleDepartNo != null and tSalaryAccount.settleDepar
tNo.trim() != ''"
>
AND a.
SETTLE_DEPART_NO like '%${tSalaryAccount.settleDepar
tNo}%'
<if
test=
"tSalaryAccount.
deptNo != null and tSalaryAccount.dep
tNo.trim() != ''"
>
AND a.
DEPT_NO like '%${tSalaryAccount.dep
tNo}%'
</if>
<if
test=
"tSalaryAccount.
settleDepartName != null and tSalaryAccount.settleDepar
tName.trim() != ''"
>
AND a.
SETTLE_DEPART_NAME like '%${tSalaryAccount.settleDepar
tName}%'
<if
test=
"tSalaryAccount.
deptName != null and tSalaryAccount.dep
tName.trim() != ''"
>
AND a.
DEPT_NAME like '%${tSalaryAccount.dep
tName}%'
</if>
<if
test=
"tSalaryAccount.empIdcard != null and tSalaryAccount.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD like '%${tSalaryAccount.empIdcard}%'
...
...
@@ -392,25 +392,9 @@
</if>
</if>
</sql>
<!--tSalaryAccountItem简单分页查询-->
<select
id=
"getTSalaryAccountItemPage"
resultMap=
"tSalaryAccountItemMap"
>
SELECT
a.SALARY_ACCOUNT_ID as 'key',
a.SALARY_MONEY as 'value'
FROM
t_salary_account_item a
WHERE
a.SALARY_ACCOUNT_ID IN
<foreach
item=
"item"
index=
"index"
collection=
"account"
open=
"("
separator=
","
close=
")"
>
#{item.id}
</foreach>
and
a.JAVA_FIED_NAME='actualSalarySum'
</select>
<!-- 获取工资明细 -->
<select
id=
"getItemSet"
resultType=
"java.lang.String"
>
select
i.cn_name a
from t_salary_account_item i
...
...
@@ -421,70 +405,6 @@
order by i.JAVA_FIED_NAME desc,i.id
</select>
<!-- 获取所有数据,组装map,工资导入使用 -->
<select
id=
"getAllItemVoList"
resultMap=
"itemVoMap"
>
SELECT
i.ID,
i.SALARY_ACCOUNT_ID,
i.CN_NAME,
i.JAVA_FIED_NAME,
i.SALARY_MONEY,
i.TEXT_VALUE,
i.IS_TAX,
a.EMP_IDCARD,
a.SETTLEMENT_MONTH,
a.SALARY_TYPE
FROM
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
a.SETTLEMENT_MONTH like DATE_FORMAT(now(),"%Y%")
<if
test=
"idCardList != null"
>
AND a.EMP_IDCARD in
<foreach
item=
"item"
index=
"index"
collection=
"idCardList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"invoiceTitle != null and invoiceTitle.trim() != ''"
>
AND a.INVOICE_TITLE = #{invoiceTitle}
</if>
AND a.DELETE_FLAG = 0 and a.SALARY_TYPE != 7
</where>
</select>
<select
id=
"getAllTSalaryAccountItem"
resultMap=
"tSalaryAccountItemMap"
>
SELECT
i.ID,
i.SALARY_ACCOUNT_ID,
i.CN_NAME,
i.JAVA_FIED_NAME,
i.SALARY_MONEY,
i.TEXT_VALUE,
i.IS_TAX
FROM
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
a.DELETE_FLAG = 0
<if
test=
"settleDepartId != null and settleDepartId.trim() != ''"
>
AND a.SETTLE_DEPART_ID = #{settleDepartId}
</if>
<if
test=
"settleMonth != null and settleMonth.trim() != ''"
>
AND a.SETTLEMENT_MONTH = #{settleMonth}
</if>
<if
test=
"javaFiedName != null and javaFiedName.trim() != ''"
>
AND i.JAVA_FIED_NAME = #{javaFiedName}
</if>
<if
test=
"finallyYear != null and finallyYear.trim() != ''"
>
AND a.SETTLEMENT_MONTH like concat(#{finallyYear}, '%')
</if>
<if
test=
"empIdcard != null and empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{empIdcard}
</if>
<if
test=
"accountId != null and accountId.trim() != ''"
>
AND a.id != #{accountId}
</if>
</where>
</select>
<!-- 获取所有数据,组装map,工资导入使用 -->
<select
id=
"getAllItemVoList"
resultMap=
"itemVoMap"
>
SELECT
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAttaMapper.xml
View file @
4ed286a9
...
...
@@ -113,7 +113,7 @@
<select
id=
"getTAttaPage"
resultMap=
"tAttaMap"
>
SELECT
<include
refid=
"selectParams"
/>
FROM t_salary_atta
FROM t_salary_atta
a
<where>
1=1
<include
refid=
"tSalaryAtta_where"
/>
...
...
@@ -125,11 +125,11 @@
<select
id=
"getTAttaList"
resultMap=
"tAttaMap"
>
SELECT
<include
refid=
"selectParams"
/>
FROM t_salary_atta
FROM t_salary_atta
a
<where>
1=1
<include
refid=
"tSalaryAtta_where"
/>
</where>
order by CREATE_TIME
order by CREATE_TIME
desc
</select>
</mapper>
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