Commit 9f5be791 authored by huyuchen's avatar huyuchen

年终奖测算工具修改

parent 39e243da
......@@ -58,6 +58,16 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
**/
List<TSalaryAccountItem> getAllItemVoList(@Param("idCardList") List<String> idCardList, @Param("invoiceTitle") String invoiceTitle);
/**
* @param idCardList
* @param invoiceTitle
* @Description: 获取所有工资报账,组装map,计算年终奖使用
* @Author: hgw
* @Date: 2022/1/27 17:04
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>
**/
List<TSalaryAccountItem> getSalaryItemVoList(@Param("idCardList") List<String> idCardList, @Param("invoiceTitle") String invoiceTitle);
/**
* @param deptId 结算主体id
* @param javaFiedName 属性名
......
......@@ -41,6 +41,15 @@ public interface TSalaryAccountItemService extends IService<TSalaryAccountItem>
**/
Map<String, List<TSalaryAccountItem>> getAllItemVoList(List<String> idCardList, String invoiceTitle);
/**
* @param idCardList
* @param invoiceTitle
* @Description: 获取所有工资报账,组装map,计算年终奖使用
* @Author: huyc
* @Date: 2022/1/27 17:25
* @return: java.util.Map<java.lang.String, java.util.List < com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>>
**/
Map<String, List<TSalaryAccountItem>> getSalaryItemVoList(List<String> idCardList, String invoiceTitle);
/**
* 工资报账表附加-工资明细简单分页查询
......
......@@ -100,6 +100,32 @@ public class TSalaryAccountItemServiceImpl extends ServiceImpl<TSalaryAccountIte
return itemMap;
}
/**
* @param idCardList
* @param invoiceTitle
* @Description: 获取所有工资报账,组装map,计算年终奖使用
* @Author: hgw
* @Date: 2022/1/27 17:25
* @return: java.util.Map<java.lang.String, java.util.List < com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>>
**/
@Override
public Map<String, List<TSalaryAccountItem>> getSalaryItemVoList(List<String> idCardList, String invoiceTitle) {
List<TSalaryAccountItem> list = baseMapper.getSalaryItemVoList(idCardList, invoiceTitle);
Map<String, List<TSalaryAccountItem>> itemMap = new HashMap<>();
if (list != null && !list.isEmpty()) {
List<TSalaryAccountItem> voList;
for (TSalaryAccountItem item : list) {
voList = itemMap.get(item.getEmpIdcard());
if (voList == null) {
voList = new ArrayList<>();
}
voList.add(item);
itemMap.put(item.getEmpIdcard(), voList);
}
}
return itemMap;
}
/**
* @param settleDepartId 结算主体id
* @param javaFiedName 属性名
......
......@@ -434,6 +434,36 @@
AND a.DELETE_FLAG = 0 and a.FORM_TYPE != 7
</where>
</select>
<!-- 获取所有数据,组装map,工资导入使用 -->
<select id="getSalaryItemVoList" 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.FORM_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.FORM_TYPE = 0
</where>
</select>
<select id="getSumByAccountId" resultType="java.util.Map">
SELECT
a.SALARY_ACCOUNT_ID as 'key',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment