zn-cloud/yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/oa/BpmOALoanMapper.xml
furongxin f7e3d0f3d7 feat(bpm): 新增借支管理功能
- 添加借支申请、审批相关接口和页面
- 实现借支金额统计功能- 优化开支管理页面,增加统计功能
- 新增工厂信息相关接口
- 修复相机设备和工厂信息相关问题
2025-03-14 10:11:15 +08:00

30 lines
1.2 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOALoanMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select id="selectSumByStaffId" resultType="cn.iocoder.yudao.module.bpm.api.oa.vo.loan.BpmOALoanSumDTO">
SELECT
sf_user_id AS sfUserId,
SUM(total_money) AS totalAmount
FROM
bpm_oa_loan
WHERE
deleted = 0
AND result = 2
AND return_date = #{month}
sf_user_id IN
<foreach item="item" index="index" collection="staffId" open="(" separator="," close=")">
#{item}
</foreach>
GROUP BY
sf_user_id
</select>
</mapper>