first commit

This commit is contained in:
陈现府
2025-11-20 10:45:16 +08:00
commit 8355431361
2643 changed files with 291314 additions and 0 deletions
@@ -0,0 +1,173 @@
<?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="com.linke.finance.domain.branchBill.repository.mapper.BranchBillMapper">
<resultMap type="com.linke.finance.domain.branchBill.repository.po.BranchBillPO" id="BranchBillResult">
<result property="branchBillId" column="branch_bill_id" />
<result property="topOrganizationId" column="top_organization_id" />
<result property="organizationId" column="organization_id" />
<result property="organizationName" column="organization_name" />
<result property="branchInId" column="branch_in_id" />
<result property="branchInName" column="branch_in_name" />
<result property="branchOutId" column="branch_out_id" />
<result property="branchOutName" column="branch_out_name" />
<result property="billCode" column="bill_code" />
<result property="billStatus" column="bill_status" />
<result property="billTimeStart" column="bill_time_start" />
<result property="billTimeEnd" column="bill_time_end" />
<result property="payableAmount" column="payable_amount" />
<result property="actualAmount" column="actual_amount" />
<result property="totalIncome" column="total_income" />
<result property="totalExpense" column="total_expense" />
<result property="number" column="number" />
<result property="lastRemainingAmount" column="last_remaining_amount" />
<result property="remainingAmount" column="remaining_amount" />
<result property="authTime" column="auth_time" />
<result property="authBranchId" column="auth_branch_id" />
<result property="authBranchName" column="auth_branch_name" />
<result property="authUserId" column="auth_user_id" />
<result property="authUserName" column="auth_user_name" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="createByName" column="create_by_name" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="updateByName" column="update_by_name" />
<result property="delFlag" column="del_flag" />
<result property="branchInNum" column="branch_in_num" />
<result property="branchOutNum" column="branch_out_num" />
</resultMap>
<sql id="selectBranchBillPo">
select * from branch_bill
</sql>
<sql id="selectBranchBillPo1">
<where>
<if test="topOrganizationId != null ">
and top_organization_id = #{topOrganizationId}
</if>
<if test="organizationId != null ">
and organization_id = #{organizationId}
</if>
<if test="organizationName != null and organizationName != ''">
and organization_name like concat('%', #{organizationName}, '%')
</if>
<if test="branchInId != null ">
and branch_in_id = #{branchInId}
</if>
<if test="branchInName != null and branchInName != ''">
and branch_in_name like concat('%', #{branchInName}, '%')
</if>
<if test="branchOutId != null ">
and branch_out_id = #{branchOutId}
</if>
<if test="branchOutName != null and branchOutName != ''">
and branch_out_name like concat('%', #{branchOutName}, '%')
</if>
<if test="billCode != null and billCode != ''">
and bill_code = #{billCode}
</if>
<if test="billStatus != null ">
and bill_status = #{billStatus}
</if>
<if test="billTimeStart != null ">
and bill_time_start = #{billTimeStart}
</if>
<if test="billTimeEnd != null ">
and bill_time_end = #{billTimeEnd}
</if>
<if test="payableAmount != null ">
and payable_amount = #{payableAmount}
</if>
<if test="actualAmount != null ">
and actual_amount = #{actualAmount}
</if>
<if test="totalIncome != null ">
and total_income = #{totalIncome}
</if>
<if test="totalExpense != null ">
and total_expense = #{totalExpense}
</if>
<if test="payMethod != null ">
and pay_method = #{payMethod}
</if>
<if test="number != null ">
and number = #{number}
</if>
<if test="lastRemainingAmount != null ">
and last_remaining_amount = #{lastRemainingAmount}
</if>
<if test="remainingAmount != null ">
and remaining_amount = #{remainingAmount}
</if>
<if test="authTime != null ">
and auth_time = #{authTime}
</if>
<if test="authBranchId != null ">
and auth_branch_id = #{authBranchId}
</if>
<if test="authBranchName != null and authBranchName != ''">
and auth_branch_name like concat('%', #{authBranchName}, '%')
</if>
<if test="authUserId != null ">
and auth_user_id = #{authUserId}
</if>
<if test="authUserName != null and authUserName != '' ">
and auth_user_name like concat('%', #{authUserName}, '%')
</if>
<if test="createByName != null and createByName != ''">
and create_by_name like concat('%', #{createByName}, '%')
</if>
<if test="updateByName != null and updateByName != ''">
and update_by_name like concat('%', #{updateByName}, '%')
</if>
<if test="createTimeStart != null and createTimeStart != ''">
AND date_format(create_time,'%Y-%m-%d') >= #{createTimeStart}
</if>
<if test="createTimeEnd != null and createTimeEnd != ''">
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> #{createTimeEnd}
</if>
<choose>
<when test="type != null and type == 1">
and branch_in_id = #{branchId}
</when>
<when test="type != null and type == 2">
and branch_out_id = #{branchId}
</when>
<otherwise>and (branch_in_id = #{branchId} or branch_out_id = #{branchId}) </otherwise>
</choose>
<choose>
<when test=" delFlag != null "> AND del_flag = #{delFlag} </when>
<otherwise> AND del_flag = 1 </otherwise>
</choose>
</where>
</sql>
<select id="queryList" parameterType="com.linke.finance.domain.branchBill.repository.todo.BranchBillDO" resultMap="BranchBillResult">
<include refid="selectBranchBillPo"/>
<include refid="selectBranchBillPo1"/>
order by create_time desc
</select>
<select id="countTabTotal" parameterType="com.linke.finance.domain.branchBill.repository.todo.BranchBillDO" resultMap="BranchBillResult">
SELECT
(
SELECT COUNT(*) FROM branch_bill
WHERE del_flag = 1
<if test="branchInId != null ">
and branch_in_id = #{branchInId}
</if>
) branch_in_num,
(
SELECT COUNT(*) FROM branch_bill
WHERE del_flag = 1
<if test="branchOutId != null ">
AND branch_out_id = #{branchOutId}
</if>
) branch_out_num
</select>
</mapper>