first commit
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
server:
|
||||
port: 8011
|
||||
management:
|
||||
metrics:
|
||||
web:
|
||||
server:
|
||||
request:
|
||||
autotime:
|
||||
enabled: false
|
||||
spring:
|
||||
application:
|
||||
name: mhd-finance-service
|
||||
profiles:
|
||||
active: seata
|
||||
main:
|
||||
allow-circular-references: true
|
||||
# nacos配置
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
#server-addr: 192.168.0.69:8848
|
||||
# server-addr: 127.0.0.1:8848
|
||||
server-addr: 116.204.23.92:8848
|
||||
# namespace: 4dd3256a-22c0-42db-9af1-de513a05c6a9
|
||||
config:
|
||||
# 配置中心地址
|
||||
#server-addr: 192.168.0.69:8848
|
||||
# server-addr: 127.0.0.1:8848
|
||||
server-addr: 116.204.23.92:8848
|
||||
|
||||
# 锁定server端的配置文件(读取它的配置项)
|
||||
# namespace: 4dd3256a-22c0-42db-9af1-de513a05c6a9
|
||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||
file-extension: yml #默认properties
|
||||
seata:
|
||||
enabled: off
|
||||
feign:
|
||||
client:
|
||||
config:
|
||||
default:
|
||||
# 超时设置 2 分钟超时
|
||||
connectTimeout: 120000
|
||||
readTimeout: 120000
|
||||
@@ -0,0 +1,61 @@
|
||||
<?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.accountManage.repository.mapper.AccountBankCardMapper">
|
||||
|
||||
|
||||
<sql id="selectAccountBankCardVo">
|
||||
select
|
||||
a.*
|
||||
from account_bank_card a
|
||||
where a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectAccountBankCardList" parameterType="com.linke.finance.domain.accountManage.repository.todo.AccountBankCardDo"
|
||||
resultType="com.linke.finance.domain.accountManage.repository.po.AccountBankCardPo">
|
||||
<include refid="selectAccountBankCardVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="accountBankCardDo.createBy != null"> and a.user_id = #{accountBankCardDo.createBy}</if>
|
||||
<if test="accountBankCardDo.organizationIdList != null ">
|
||||
AND a.organization_id in
|
||||
<foreach item="id" collection="accountBankCardDo.organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="accountBankCardDo.userInfo != null and accountBankCardDo.userInfo != ''">
|
||||
AND (a.user_name like concat('%', #{accountBankCardDo.userInfo}, '%')
|
||||
or a.user_phone like concat('%', #{accountBankCardDo.userInfo}, '%')
|
||||
or a.vehicle_license_plate_number like concat('%', #{accountBankCardDo.userInfo}, '%'))
|
||||
</if>
|
||||
<if test="accountBankCardDo.cardInfo != null and accountBankCardDo.cardInfo != ''">
|
||||
AND (a.bank_card_number like concat('%', #{accountBankCardDo.cardInfo}, '%')
|
||||
or a.bank_name like concat('%', #{accountBankCardDo.cardInfo}, '%'))
|
||||
</if>
|
||||
<if test="accountBankCardDo.companyName != null and accountBankCardDo.companyName != ''">
|
||||
AND a.company_name like concat('%', #{accountBankCardDo.companyName}, '%')
|
||||
</if>
|
||||
<if test="accountBankCardDo.accountInfo != null and accountBankCardDo.accountInfo != ''">
|
||||
AND (a.bank_binding_name like concat('%', #{accountBankCardDo.accountInfo}, '%')
|
||||
or a.bank_binding_phone like concat('%', #{accountBankCardDo.accountInfo}, '%'))
|
||||
</if>
|
||||
<if test="accountBankCardDo.accountBankType != null"> and a.account_bank_type = #{accountBankCardDo.accountBankType}</if>
|
||||
<if test="accountBankCardDo.userAccount != null"> and a.user_account = #{accountBankCardDo.userAccount}</if>
|
||||
<!-- 创建时间所在区间 -->
|
||||
<if test="accountBankCardDo.createStartTime!=null and accountBankCardDo.createEndTime!=null ">
|
||||
and DATE_FORMAT(a.create_time,'%Y-%m-%d') <![CDATA[>=]]> DATE_FORMAT(#{accountBankCardDo.createStartTime},'%Y-%m-%d')
|
||||
and DATE_FORMAT(a.create_time,'%Y-%m-%d') <![CDATA[<=]]> DATE_FORMAT(#{accountBankCardDo.createEndTime},'%Y-%m-%d')
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectAccountBankCardByAccountBankCardId" parameterType="java.lang.Long"
|
||||
resultType="com.linke.finance.domain.accountManage.repository.po.AccountBankCardPo">
|
||||
<include refid="selectAccountBankCardVo"/>
|
||||
and a.account_bank_card_id = #{accountBankCardId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,94 @@
|
||||
<?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.accountManage.repository.mapper.AccountCashWalletMapper">
|
||||
|
||||
<sql id="selectAccountCashWalletVo">
|
||||
select
|
||||
a.*
|
||||
from account_cash_wallet a
|
||||
where a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<!--<update id="updateCreditLimit">
|
||||
UPDATE `account_cash_wallet` SET `credit_limit` =
|
||||
CASE
|
||||
WHEN `credit_limit` - #{creditLimit} >= 0 THEN `credit_limit` - #{creditLimit}
|
||||
ELSE credit_limit
|
||||
END
|
||||
WHERE user_id = #{userId}
|
||||
</update>-->
|
||||
|
||||
<select id="selectAccountCashWalletList" parameterType="com.linke.finance.domain.accountManage.repository.todo.AccountCashWalletDo" resultType="com.linke.finance.domain.accountManage.repository.po.AccountCashWalletPo">
|
||||
<include refid="selectAccountCashWalletVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="accountCashWalletDo.userName != null and accountCashWalletDo.userName != ''">
|
||||
AND a.user_name like concat('%', #{accountCashWalletDo.userName}, '%')
|
||||
</if>
|
||||
<if test="accountCashWalletDo.userAccount != null and accountCashWalletDo.userAccount != ''">
|
||||
AND a.user_account like concat('%', #{accountCashWalletDo.userAccount}, '%')
|
||||
</if>
|
||||
<if test="accountCashWalletDo.enterpriseName != null and accountCashWalletDo.enterpriseName != ''">
|
||||
AND a.enterprise_name like concat('%', #{accountCashWalletDo.enterpriseName}, '%')
|
||||
</if>
|
||||
<if test="accountCashWalletDo.updateTimeStart != null and accountCashWalletDo.updateTimeStart != ''">
|
||||
AND date_format(a.update_time,'%Y-%m-%d') >= #{accountCashWalletDo.updateTimeStart}
|
||||
</if>
|
||||
<if test="accountCashWalletDo.updateTimeEnd != null and accountCashWalletDo.updateTimeEnd != ''">
|
||||
AND date_format(a.update_time,'%Y-%m-%d') <![CDATA[<=]]> #{accountCashWalletDo.updateTimeEnd}
|
||||
</if>
|
||||
<if test="accountCashWalletDo.accountWalletStatus != null"> and a.account_wallet_status = #{accountCashWalletDo.accountWalletStatus}</if>
|
||||
<if test="accountCashWalletDo.userIdcardNumber != null and accountCashWalletDo.userIdcardNumber != ''">
|
||||
AND a.user_idcard_number like concat('%', #{accountCashWalletDo.userIdcardNumber}, '%')
|
||||
</if>
|
||||
<if test="accountCashWalletDo.userPhone != null and accountCashWalletDo.userPhone != ''">
|
||||
AND a.user_phone like concat('%', #{accountCashWalletDo.userPhone}, '%')
|
||||
</if>
|
||||
<if test="accountCashWalletDo.accountWalletId != null and accountCashWalletDo.accountWalletId != ''">
|
||||
AND a.account_wallet_id like concat('%', #{accountCashWalletDo.accountWalletId}, '%')
|
||||
</if>
|
||||
<if test="accountCashWalletDo.walletBalanceBegin != null and accountCashWalletDo.walletBalanceEnd != null">
|
||||
AND a.wallet_balance between #{accountCashWalletDo.walletBalanceBegin} and #{accountCashWalletDo.walletBalanceEnd}
|
||||
</if>
|
||||
<if test="accountCashWalletDo.walletAvailableBalanceBegin != null and accountCashWalletDo.walletAvailableBalanceEnd != null">
|
||||
AND a.wallet_available_balance between #{accountCashWalletDo.walletAvailableBalanceBegin} and #{accountCashWalletDo.walletAvailableBalanceEnd}
|
||||
</if>
|
||||
<if test="accountCashWalletDo.walletFreezeBalanceBegin != null and accountCashWalletDo.walletFreezeBalanceEnd != null">
|
||||
AND a.wallet_freeze_balance between #{accountCashWalletDo.walletFreezeBalanceBegin} and #{accountCashWalletDo.walletFreezeBalanceEnd}
|
||||
</if>
|
||||
<if test="accountCashWalletDo.createBy != null and accountCashWalletDo.organizationIdList == null"> and a.create_by = #{accountCashWalletDo.createBy}</if>
|
||||
<if test="accountCashWalletDo.organizationIdList != null and accountCashWalletDo.createBy == null">
|
||||
AND a.organization_id in
|
||||
<foreach item="id" collection="accountCashWalletDo.organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="accountCashWalletDo.organizationIdList != null and accountCashWalletDo.createBy != null">
|
||||
AND (a.organization_id in
|
||||
<foreach item="id" collection="accountCashWalletDo.organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
OR a.create_by = #{accountCashWalletDo.createBy})
|
||||
</if>
|
||||
<if test="accountCashWalletDo.accountType != null">
|
||||
AND a.account_type = #{accountCashWalletDo.accountType}
|
||||
</if>
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectAccountCashWalletByAccountCashWalletId" parameterType="java.lang.Long" resultType="com.linke.finance.domain.accountManage.repository.po.AccountCashWalletPo">
|
||||
<include refid="selectAccountCashWalletVo"/>
|
||||
and a.account_cash_wallet_id = #{accountCashWalletId}
|
||||
</select>
|
||||
|
||||
<select id="selectUserWalletInfo" resultType="com.linke.finance.domain.accountManage.repository.po.AccountCashWalletAppPo" parameterType="java.lang.Long">
|
||||
<include refid="selectAccountCashWalletVo"/>
|
||||
and a.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,121 @@
|
||||
<?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.accountManage.repository.mapper.AccountExpendRecordsMapper">
|
||||
|
||||
<sql id="selectAccountExpendRecordsVo">
|
||||
select
|
||||
a.*
|
||||
from
|
||||
account_expend_records a
|
||||
where
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectAccountExpendRecordsList" parameterType="com.linke.finance.domain.accountManage.repository.todo.AccountExpendRecordsDo"
|
||||
resultType="com.linke.finance.domain.accountManage.repository.po.AccountExpendRecordsPo">
|
||||
<include refid="selectAccountExpendRecordsVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY a.transaction_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<!-- <if test="accountExpendRecordsDo.createBy != null"> and a.create_by = #{accountExpendRecordsDo.createBy}</if>-->
|
||||
<!-- <if test="accountExpendRecordsDo.createBy != null and accountExpendRecordsDo.organizationIdList == null">-->
|
||||
<!-- and a.create_by = #{accountExpendRecordsDo.createBy}</if>-->
|
||||
<!-- <if test="accountExpendRecordsDo.organizationIdList != null and accountExpendRecordsDo.createBy == null">-->
|
||||
<!-- AND a.organization_id in-->
|
||||
<!-- <foreach item="id" collection="accountExpendRecordsDo.organizationIdList" open="(" separator="," close=")">-->
|
||||
<!-- #{id}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="accountExpendRecordsDo.organizationIdList != null and accountExpendRecordsDo.createBy != null">-->
|
||||
<!-- AND (a.organization_id in-->
|
||||
<!-- <foreach item="id" collection="accountExpendRecordsDo.organizationIdList" open="(" separator="," close=")">-->
|
||||
<!-- #{id}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- OR a.create_by = #{accountExpendRecordsDo.createBy})-->
|
||||
<!-- </if>-->
|
||||
|
||||
<if test="accountExpendRecordsDo.organizationId != null"> and a.organization_id = #{accountExpendRecordsDo.organizationId}</if>
|
||||
<if test="accountExpendRecordsDo.organizationIdList != null">
|
||||
AND a.organization_id in
|
||||
<foreach item="id" collection="accountExpendRecordsDo.organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="accountExpendRecordsDo.userId != null"> and a.user_id = #{accountExpendRecordsDo.userId}</if>
|
||||
<if test="accountExpendRecordsDo.transactionTimeStart != null and accountExpendRecordsDo.transactionTimeStart != ''">
|
||||
AND date_format(a.transaction_time,'%Y-%m-%d') >= #{accountExpendRecordsDo.transactionTimeStart}
|
||||
</if>
|
||||
<if test="accountExpendRecordsDo.transactionTimeEnd != null and accountExpendRecordsDo.transactionTimeEnd != ''">
|
||||
AND date_format(a.transaction_time,'%Y-%m-%d') <![CDATA[<=]]> #{accountExpendRecordsDo.transactionTimeEnd}
|
||||
</if>
|
||||
<if test="accountExpendRecordsDo.accountSerialNumber != null and accountExpendRecordsDo.accountSerialNumber != ''">
|
||||
AND a.account_serial_number like concat('%', #{accountExpendRecordsDo.accountSerialNumber}, '%')
|
||||
</if>
|
||||
<if test="accountExpendRecordsDo.waybillNumber != null and accountExpendRecordsDo.waybillNumber != ''">
|
||||
AND a.waybill_number like concat('%', #{accountExpendRecordsDo.waybillNumber}, '%')
|
||||
</if>
|
||||
<if test="accountExpendRecordsDo.accountRecordsRemark != null and accountExpendRecordsDo.accountRecordsRemark != ''">
|
||||
AND a.account_records_remark like concat('%', #{accountExpendRecordsDo.accountRecordsRemark}, '%')
|
||||
</if>
|
||||
<if test="accountExpendRecordsDo.accountUserInfo != null and accountExpendRecordsDo.accountUserInfo != ''">
|
||||
AND (a.user_name like concat('%', #{accountExpendRecordsDo.accountUserInfo}, '%')
|
||||
OR a.enterprise_name like concat('%', #{accountExpendRecordsDo.accountUserInfo}, '%')
|
||||
OR a.user_account like concat('%', #{accountExpendRecordsDo.accountUserInfo}, '%'))
|
||||
</if>
|
||||
<if test="accountExpendRecordsDo.accountFirstCode != null and accountExpendRecordsDo.accountFirstCode != ''"> and a.account_first_code = #{accountExpendRecordsDo.accountFirstCode}</if>
|
||||
<if test="accountExpendRecordsDo.accountSecondCode != null and accountExpendRecordsDo.accountSecondCode != ''"> and a.account_second_code = #{accountExpendRecordsDo.accountSecondCode}</if>
|
||||
<if test="accountExpendRecordsDo.subjectFirstCode != null and accountExpendRecordsDo.subjectFirstCode != ''"> and a.subject_first_code = #{accountExpendRecordsDo.subjectFirstCode}</if>
|
||||
<if test="accountExpendRecordsDo.subjectSecondCode != null and accountExpendRecordsDo.subjectSecondCode != ''"> and a.subject_second_code = #{accountExpendRecordsDo.subjectSecondCode}</if>
|
||||
<if test="accountExpendRecordsDo.transactionAmountBegin != null and accountExpendRecordsDo.transactionAmountEnd != null">
|
||||
AND a.transaction_amount between #{accountExpendRecordsDo.transactionAmountBegin} and #{accountExpendRecordsDo.transactionAmountEnd}
|
||||
</if>
|
||||
<if test="accountExpendRecordsDo.accountExpendOperator != null and accountExpendRecordsDo.accountExpendOperator != ''">
|
||||
AND a.account_expend_operator like concat('%', #{accountExpendRecordsDo.accountExpendOperator}, '%')
|
||||
</if>
|
||||
<if test="accountExpendRecordsDo.bankSerialNumber != null and accountExpendRecordsDo.bankSerialNumber != ''">
|
||||
AND a.bank_serial_number like concat('%', #{accountExpendRecordsDo.bankSerialNumber}, '%')
|
||||
</if>
|
||||
<if test="accountExpendRecordsDo.accountWalletId != null and accountExpendRecordsDo.accountWalletId != ''">
|
||||
AND a.account_wallet_id like concat('%', #{accountExpendRecordsDo.accountWalletId}, '%')
|
||||
</if>
|
||||
<if test="accountExpendRecordsDo.orderSourceCode != null and accountExpendRecordsDo.orderSourceCode != ''"> and a.order_source_code = #{accountExpendRecordsDo.orderSourceCode}</if>
|
||||
<if test="accountExpendRecordsDo.accountEnterType != null and accountExpendRecordsDo.accountEnterType != ''"> and a.account_enter_type = #{accountExpendRecordsDo.accountEnterType}</if>
|
||||
<if test="accountExpendRecordsDo.capitalFlowStatus != null and accountExpendRecordsDo.capitalFlowStatus != ''"> and a.capital_flow_status = #{accountExpendRecordsDo.capitalFlowStatus}</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectAccountExpendRecordsByAccountExpendRecordsId" parameterType="java.lang.Long"
|
||||
resultType="com.linke.finance.domain.accountManage.repository.po.AccountExpendRecordsPo">
|
||||
<include refid="selectAccountExpendRecordsVo"/>
|
||||
and account_expend_records_id = #{accountExpendRecordsId}
|
||||
</select>
|
||||
<select id="selectAccountExpendRecordsAppList" resultType="com.linke.finance.domain.accountManage.repository.po.AccountExpendRecordsAppPo" parameterType="com.linke.finance.domain.accountManage.repository.todo.AccountExpendRecordsDo">
|
||||
<include refid="selectAccountExpendRecordsVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY a.transaction_time DESC
|
||||
</select>
|
||||
|
||||
<select id="getWalletByUserId" resultType="com.linke.finance.domain.accountManage.repository.po.AccountCashWalletPo" parameterType="java.lang.Long">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
account_cash_wallet
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="queryAccountExpendRecordsByUserId" resultType="java.lang.String" parameterType="java.lang.Long">
|
||||
SELECT
|
||||
sum(transaction_amount)
|
||||
FROM
|
||||
account_expend_records
|
||||
WHERE
|
||||
del_flag = 1 and subject_second_code='wanghuo_freight'
|
||||
AND user_id = #{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?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.accountManage.repository.mapper.AccountTransferRechargeMapper">
|
||||
|
||||
<sql id="selectAccountTransferRechargeVo">
|
||||
select
|
||||
a.*
|
||||
from
|
||||
account_transfer_recharge a
|
||||
where
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectAccountTransferRechargeList" parameterType="com.linke.finance.domain.accountManage.repository.todo.AccountTransferRechargeDo"
|
||||
resultType="com.linke.finance.domain.accountManage.repository.po.AccountTransferRechargePo">
|
||||
<include refid="selectAccountTransferRechargeVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="accountTransferRechargeDo.accountTransferStatus != null and accountTransferRechargeDo.accountTransferStatus != ''">
|
||||
and a.account_transfer_status = #{accountTransferRechargeDo.accountTransferStatus}
|
||||
</if>
|
||||
<if test="accountTransferRechargeDo.userInfo != null and accountTransferRechargeDo.userInfo != ''">
|
||||
AND (a.user_name like concat('%', #{accountTransferRechargeDo.userInfo}, '%')
|
||||
or a.user_phone like concat('%', #{accountTransferRechargeDo.userInfo}, '%'))
|
||||
</if>
|
||||
<if test="accountTransferRechargeDo.accountTransferTimeStart != null and accountTransferRechargeDo.accountTransferTimeStart != ''">
|
||||
AND date_format(a.account_transfer_time,'%Y-%m-%d') >= #{accountTransferRechargeDo.accountTransferTimeStart}
|
||||
</if>
|
||||
<if test="accountTransferRechargeDo.accountTransferTimeEnd != null and accountTransferRechargeDo.accountTransferTimeEnd != ''">
|
||||
AND date_format(a.account_transfer_time,'%Y-%m-%d') <![CDATA[<=]]> #{accountTransferRechargeDo.accountTransferTimeEnd}
|
||||
</if>
|
||||
<if test="accountTransferRechargeDo.accountTransferNumber != null and accountTransferRechargeDo.accountTransferNumber != ''">
|
||||
AND a.account_transfer_number like concat('%', #{accountTransferRechargeDo.accountTransferNumber}, '%')
|
||||
</if>
|
||||
<if test="accountTransferRechargeDo.accountFirstCode != null and accountTransferRechargeDo.accountFirstCode != ''">
|
||||
and a.account_first_code = #{accountTransferRechargeDo.accountFirstCode}
|
||||
</if>
|
||||
<if test="accountTransferRechargeDo.accountSecondCode != null and accountTransferRechargeDo.accountSecondCode != ''">
|
||||
and a.account_second_code = #{accountTransferRechargeDo.accountSecondCode}
|
||||
</if>
|
||||
|
||||
<if test="accountTransferRechargeDo.accountTransferOperator != null and accountTransferRechargeDo.accountTransferOperator != ''">
|
||||
AND a.account_transfer_operator like concat('%', #{accountTransferRechargeDo.accountTransferOperator}, '%')
|
||||
</if>
|
||||
|
||||
<if test="accountTransferRechargeDo.accountTransferAmountBegin != null">
|
||||
AND a.account_transfer_amount <![CDATA[<=]]> #{accountTransferRechargeDo.accountTransferAmountBegin}
|
||||
</if>
|
||||
<if test="accountTransferRechargeDo.accountTransferAmountEnd != null">
|
||||
AND a.account_transfer_amount >= #{accountTransferRechargeDo.accountTransferAmountEnd}
|
||||
</if>
|
||||
|
||||
<if test="accountTransferRechargeDo.createTimeStart != null and accountTransferRechargeDo.createTimeStart != ''">
|
||||
AND date_format(a.create_time,'%Y-%m-%d') >= #{accountTransferRechargeDo.createTimeStart}
|
||||
</if>
|
||||
<if test="accountTransferRechargeDo.createTimeEnd != null and accountTransferRechargeDo.createTimeEnd != ''">
|
||||
AND date_format(a.create_time,'%Y-%m-%d') <![CDATA[<=]]> #{accountTransferRechargeDo.createTimeEnd}
|
||||
</if>
|
||||
|
||||
<if test="accountTransferRechargeDo.transferReviewerTimeStart != null and accountTransferRechargeDo.transferReviewerTimeStart != ''">
|
||||
AND date_format(a.transfer_reviewer_time,'%Y-%m-%d') >= #{accountTransferRechargeDo.transferReviewerTimeStart}
|
||||
</if>
|
||||
<if test="accountTransferRechargeDo.transferReviewerTimeEnd != null and accountTransferRechargeDo.transferReviewerTimeEnd != ''">
|
||||
AND date_format(a.transfer_reviewer_time,'%Y-%m-%d') <![CDATA[<=]]> #{accountTransferRechargeDo.transferReviewerTimeEnd}
|
||||
</if>
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectAccountTransferRechargeById" parameterType="java.lang.Long"
|
||||
resultType="com.linke.finance.domain.accountManage.repository.po.AccountTransferRechargePo">
|
||||
<include refid="selectAccountTransferRechargeVo"/>
|
||||
and a.account_transfer_recharge_id = #{accountTransferRechargeId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,107 @@
|
||||
<?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.approvalDocument.repository.mapper.ApprovalDocumentMapper">
|
||||
|
||||
<resultMap type="com.linke.finance.domain.approvalDocument.repository.po.ApprovalDocumentPO" id="ApprovalDocumentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="approvalOrderNumber" column="approval_order_number" />
|
||||
<result property="approvalType" column="approval_type" />
|
||||
<result property="approvalTitle" column="approval_title" />
|
||||
<result property="approvalStatus" column="approval_status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="finishTime" column="finish_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="approvalOpinion" column="approval_opinion" />
|
||||
<result property="approvalFormSource" column="approval_form_source" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="allNumber" column="all_number" />
|
||||
<result property="underApprovalNumber" column="under_approval_number" />
|
||||
<result property="passNumber" column="pass_number" />
|
||||
<result property="revocationsNumber" column="revocations_number" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectApprovalDocumentPo">
|
||||
select id, approval_order_number, approval_type, approval_title, approval_status, create_by, create_by_name, create_time, finish_time, update_by, update_by_name, update_time, approval_opinion, approval_form_source, del_flag, organization_id, top_organization_id, organization_name from approval_document
|
||||
</sql>
|
||||
|
||||
<sql id="selectApprovalDocumentPo1">
|
||||
<where>
|
||||
del_flag=1
|
||||
<if test="approvalOrderNumber != null and approvalOrderNumber != ''">
|
||||
and approval_order_number = #{approvalOrderNumber}
|
||||
</if>
|
||||
<if test="approvalNumber != null and approvalNumber != ''">
|
||||
and approval_number like concat('%', #{approvalNumber}, '%')
|
||||
</if>
|
||||
|
||||
<if test="approvalType != null and approvalType != ''">
|
||||
and approval_type like concat('%', #{approvalType}, '%')
|
||||
</if>
|
||||
<if test="approvalTitle != null and approvalTitle != ''">
|
||||
and approval_title like concat('%', #{approvalTitle}, '%')
|
||||
</if>
|
||||
<if test="approvalStatus != null">
|
||||
and approval_status = #{approvalStatus}
|
||||
</if>
|
||||
<!-- <if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>-->
|
||||
<if test="finishTime != null ">
|
||||
and finish_time = #{finishTime}
|
||||
</if>
|
||||
<!-- <if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>-->
|
||||
<if test="approvalOpinion != null and approvalOpinion != ''">
|
||||
and approval_opinion like concat('%', #{approvalOpinion}, '%')
|
||||
</if>
|
||||
<if test="approvalFormSource != null and approvalFormSource != ''">
|
||||
and approval_form_source like concat('%', #{approvalFormSource}, '%')
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.linke.finance.domain.approvalDocument.repository.todo.ApprovalDocumentDO" resultMap="ApprovalDocumentResult">
|
||||
|
||||
select id, approval_order_number, approval_type, approval_title, approval_status,
|
||||
create_by, create_by_name, create_time, finish_time,
|
||||
update_by, update_by_name, update_time, approval_opinion,
|
||||
approval_form_source, del_flag, organization_id,
|
||||
top_organization_id, organization_name,approval_number,documents_number,current_approver_name
|
||||
from approval_document
|
||||
<include refid="selectApprovalDocumentPo1"/>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="countByStatus" resultType="com.linke.finance.interfaces.vo.ApprovalStatsVO">
|
||||
SELECT COUNT(*) AS allNumber,
|
||||
SUM(CASE WHEN approval_status = 0 THEN 1 ELSE 0 END) AS pendingCount,
|
||||
SUM(CASE WHEN approval_status = 1 THEN 1 ELSE 0 END) AS inProgressCount,
|
||||
SUM(CASE WHEN approval_status = 2 THEN 1 ELSE 0 END) AS approvedCount,
|
||||
SUM(CASE WHEN approval_status = 3 THEN 1 ELSE 0 END) AS rejectedCount,
|
||||
SUM(CASE WHEN approval_status = 4 THEN 1 ELSE 0 END) AS cancelledCount
|
||||
FROM approval_document
|
||||
WHERE del_flag = 1
|
||||
<if test="orgId != null">
|
||||
AND organization_id = #{orgId}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
<?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.approvalDocumentDetail.repository.mapper.ApprovalDocumentDetailMapper">
|
||||
|
||||
<resultMap type="com.linke.finance.domain.approvalDocumentDetail.repository.po.ApprovalDocumentDetailPO" id="ApprovalDocumentDetailResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="approvalDocumentId" column="approval_document_id" />
|
||||
<result property="waybillNumber" column="waybill_number" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="payName" column="pay_name" />
|
||||
<result property="licenseNumber" column="license_number" />
|
||||
<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="organizationId" column="organization_id" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectApprovalDocumentDetailPo">
|
||||
select id, approval_document_id, waybill_number, amount, pay_name, license_number, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag, organization_id, top_organization_id, organization_name from approval_document_detail
|
||||
</sql>
|
||||
|
||||
<sql id="selectApprovalDocumentDetailPo1">
|
||||
<where>
|
||||
<if test="approvalDocumentId != null ">
|
||||
and approval_document_id = #{approvalDocumentId}
|
||||
</if>
|
||||
<if test="waybillNumber != null and waybillNumber != ''">
|
||||
and waybill_number = #{waybillNumber}
|
||||
</if>
|
||||
<if test="amount != null ">
|
||||
and amount = #{amount}
|
||||
</if>
|
||||
<if test="payName != null and payName != ''">
|
||||
and pay_name like concat('%', #{payName}, '%')
|
||||
</if>
|
||||
<if test="licenseNumber != null and licenseNumber != ''">
|
||||
and license_number = #{licenseNumber}
|
||||
</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="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.linke.finance.domain.approvalDocumentDetail.repository.todo.ApprovalDocumentDetailDO" resultMap="ApprovalDocumentDetailResult">
|
||||
<include refid="selectApprovalDocumentDetailPo"/>
|
||||
<include refid="selectApprovalDocumentDetailPo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?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.auditConfiguration.repository.mapper.AuditConfigurationMapper">
|
||||
|
||||
<resultMap type="com.mhd.common.core.domain.po.AuditConfigurationPO" id="AuditConfigurationResult">
|
||||
<result property="auditConfigurationId" column="audit_configuration_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="roleId" column="role_id" />
|
||||
<result property="roleCode" column="role_code" />
|
||||
<result property="roleName" column="role_name" />
|
||||
<result property="sort" column="sort" />
|
||||
<result property="auditType" column="audit_type" />
|
||||
<result property="isEnabled" column="is_enabled" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectAuditConfigurationPo">
|
||||
select audit_configuration_id, organization_id, top_organization_id, role_id, role_code, role_name, sort, audit_type, is_enabled, create_time, create_by, update_time, update_by, del_flag from audit_configuration
|
||||
</sql>
|
||||
|
||||
<sql id="selectAuditConfigurationPo1">
|
||||
<where>
|
||||
del_flag = 1
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="roleId != null ">
|
||||
and role_id = #{roleId}
|
||||
</if>
|
||||
<if test="roleCode != null ">
|
||||
and role_code = #{roleCode}
|
||||
</if>
|
||||
<if test="roleName != null ">
|
||||
and role_name like concat('%', #{roleName}, '%')
|
||||
</if>
|
||||
<if test="sort != null ">
|
||||
and sort = #{sort}
|
||||
</if>
|
||||
<if test="auditType != null ">
|
||||
and audit_type = #{auditType}
|
||||
</if>
|
||||
<if test="isEnabled != null ">
|
||||
and is_enabled = #{isEnabled}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.linke.finance.domain.auditConfiguration.repository.todo.AuditConfigurationDO" resultMap="AuditConfigurationResult">
|
||||
<include refid="selectAuditConfigurationPo"/>
|
||||
<include refid="selectAuditConfigurationPo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?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.branchBillOtherFee.repository.mapper.BranchBillOtherFeeMapper">
|
||||
|
||||
<resultMap type="com.linke.finance.domain.branchBillOtherFee.repository.po.BranchBillOtherFeePO" id="BranchBillOtherFeeResult">
|
||||
<result property="branchBillOtherFeeId" column="branch_bill_other_fee_id" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="firstSubject" column="first_subject" />
|
||||
<result property="firstSubjectName" column="first_subject_name" />
|
||||
<result property="secondSubject" column="second_subject" />
|
||||
<result property="secondSubjectName" column="second_subject_name" />
|
||||
<result property="revenueExpensesType" column="revenue_expenses_type" />
|
||||
<result property="money" column="money" />
|
||||
<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" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectBranchBillOtherFeePo">
|
||||
select branch_bill_other_fee_id, top_organization_id, organization_id, organization_name, bill_code, first_subject, first_subject_name, second_subject, second_subject_name, revenue_expenses_type, money, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from branch_bill_other_fee
|
||||
</sql>
|
||||
|
||||
<sql id="selectBranchBillOtherFeePo1">
|
||||
<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="billCode != null and billCode != ''">
|
||||
and bill_code = #{billCode}
|
||||
</if>
|
||||
<if test="firstSubject != null and firstSubject != ''">
|
||||
and first_subject = #{firstSubject}
|
||||
</if>
|
||||
<if test="firstSubjectName != null and firstSubjectName != ''">
|
||||
and first_subject_name like concat('%', #{firstSubjectName}, '%')
|
||||
</if>
|
||||
<if test="secondSubject != null and secondSubject != ''">
|
||||
and second_subject = #{secondSubject}
|
||||
</if>
|
||||
<if test="secondSubjectName != null and secondSubjectName != ''">
|
||||
and second_subject_name like concat('%', #{secondSubjectName}, '%')
|
||||
</if>
|
||||
<if test="revenueExpensesType != null ">
|
||||
and revenue_expenses_type = #{revenueExpensesType}
|
||||
</if>
|
||||
<if test="money != null ">
|
||||
and money = #{money}
|
||||
</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>
|
||||
<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.branchBillOtherFee.repository.todo.BranchBillOtherFeeDO" resultMap="BranchBillOtherFeeResult">
|
||||
<include refid="selectBranchBillOtherFeePo"/>
|
||||
<include refid="selectBranchBillOtherFeePo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,162 @@
|
||||
<?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.branchFreightBill.repository.mapper.BranchFreightBillMapper">
|
||||
|
||||
<resultMap type="com.linke.finance.domain.branchFreightBill.repository.po.BranchFreightBillPO" id="BranchFreightBillResult">
|
||||
<result property="branchFreightId" column="branch_freight_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="authStatus" column="auth_status" />
|
||||
<result property="associationOrderId" column="association_order_id" />
|
||||
<result property="associationOrderCode" column="association_order_code" />
|
||||
<result property="associationOrderStatus" column="association_order_status" />
|
||||
<result property="customFreight" column="custom_freight" />
|
||||
<result property="freight" column="freight" />
|
||||
<result property="deliveryExpense" column="delivery_expense" />
|
||||
<result property="totalFreight" column="total_freight" />
|
||||
<result property="retainedAmount" column="retained_amount" />
|
||||
<result property="otherExpenses" column="other_expenses" />
|
||||
<result property="billingTime" column="billing_time" />
|
||||
<result property="signTime" column="sign_time" />
|
||||
<result property="authTime" column="auth_time" />
|
||||
<result property="authId" column="auth_id" />
|
||||
<result property="authName" column="auth_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" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectBranchFreightBillPo">
|
||||
select branch_freight_id, top_organization_id, organization_id, organization_name, branch_in_id, branch_in_name, branch_out_id, branch_out_name, bill_code, auth_status, association_order_id, association_order_code, association_order_status, custom_freight, freight, delivery_expense, total_freight, other_expenses, retained_amount, billing_time, sign_time, auth_time, auth_id, auth_name, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from branch_freight_bill
|
||||
</sql>
|
||||
|
||||
<sql id="selectBranchFreightBillPo1">
|
||||
<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="authStatus != null ">
|
||||
and auth_status = #{authStatus}
|
||||
</if>
|
||||
<if test="associationOrderId != null ">
|
||||
and association_order_id = #{associationOrderId}
|
||||
</if>
|
||||
<if test="associationOrderCode != null and associationOrderCode != ''">
|
||||
and association_order_code = #{associationOrderCode}
|
||||
</if>
|
||||
<if test="associationOrderStatus != null and associationOrderStatus != '' ">
|
||||
and association_order_status = #{associationOrderStatus}
|
||||
</if>
|
||||
<if test="customFreight != null ">
|
||||
and custom_freight = #{customFreight}
|
||||
</if>
|
||||
<if test="freight != null ">
|
||||
and freight = #{freight}
|
||||
</if>
|
||||
<if test="deliveryExpense != null ">
|
||||
and delivery_expense = #{deliveryExpense}
|
||||
</if>
|
||||
<if test="totalFreight != null ">
|
||||
and total_freight = #{totalFreight}
|
||||
</if>
|
||||
<if test="retainedAmount != null ">
|
||||
and retained_amount = #{retainedAmount}
|
||||
</if>
|
||||
<if test="billingTime != null ">
|
||||
and billing_time = #{billingTime}
|
||||
</if>
|
||||
<if test="signTime != null ">
|
||||
and sign_time = #{signTime}
|
||||
</if>
|
||||
<if test="authTime != null ">
|
||||
and auth_time = #{authTime}
|
||||
</if>
|
||||
<if test="authId != null and authId != ''">
|
||||
and auth_id = #{authId}
|
||||
</if>
|
||||
<if test="authName != null and authName != ''">
|
||||
and auth_name like concat('%', #{authName}, '%')
|
||||
</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="billingTimeStart != null and billingTimeStart != '' ">
|
||||
AND date_format(billing_time,'%Y-%m-%d') >= #{billingTimeStart}
|
||||
</if>
|
||||
<if test="billingTimeEnd != null and billingTimeEnd != ''">
|
||||
AND date_format(billing_time,'%Y-%m-%d') <= #{billingTimeEnd}
|
||||
</if>
|
||||
<if test="signTimeStart != null and signTimeStart != ''">
|
||||
AND date_format(sign_time,'%Y-%m-%d') >= #{signTimeStart}
|
||||
</if>
|
||||
<if test="signTimeEnd != null and signTimeEnd != ''">
|
||||
AND date_format(sign_time,'%Y-%m-%d') <= #{signTimeEnd}
|
||||
</if>
|
||||
<if test="authTimeStart != null and authTimeStart != ''">
|
||||
AND date_format(auth_time,'%Y-%m-%d') >= #{authTimeStart}
|
||||
</if>
|
||||
<if test="authTimeEnd != null and authTimeEnd != ''">
|
||||
AND date_format(auth_time,'%Y-%m-%d') <= #{authTimeEnd}
|
||||
</if>
|
||||
<if test="branchId != null">
|
||||
<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>
|
||||
</if>
|
||||
<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.branchFreightBill.repository.todo.BranchFreightBillDO" resultMap="BranchFreightBillResult">
|
||||
<include refid="selectBranchFreightBillPo"/>
|
||||
<include refid="selectBranchFreightBillPo1"/>
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,291 @@
|
||||
<?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.businessDocument.repository.mapper.BusinessDocumentMapper">
|
||||
|
||||
<resultMap type="com.linke.finance.domain.businessDocument.repository.po.BusinessDocumentPO" id="BusinessDocumentResult">
|
||||
<result property="businessDocumentId" column="business_document_id" />
|
||||
<result property="reconciliationId" column="reconciliation_id" />
|
||||
<result property="verificationMoney" column="verification_money" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="waybillNumber" column="waybill_number" />
|
||||
<result property="waybillSource" column="waybill_source" />
|
||||
<result property="waybillSourceName" column="waybill_source_name" />
|
||||
<result property="receivableType" column="receivable_type" />
|
||||
<result property="loadingAdress" column="loading_adress" />
|
||||
<result property="unloadAdress" column="unload_adress" />
|
||||
<result property="payableAmount" column="payable_amount" />
|
||||
<result property="receivableAmount" column="receivable_amount" />
|
||||
<result property="carrierName" column="carrier_name" />
|
||||
<result property="driverName" column="driver_name" />
|
||||
<result property="shipperName" column="shipper_name" />
|
||||
<result property="vehicleLicensePlateNumber" column="vehicle_license_plate_number" />
|
||||
<result property="receptionTime" column="reception_time" />
|
||||
<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="organizationId" column="organization_id" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectBusinessDocumentPo">
|
||||
select * from business_document
|
||||
</sql>
|
||||
|
||||
<sql id="selectBusinessDocumentPo1">
|
||||
<if test="reconciliationId != null ">
|
||||
and reconciliation_id = #{reconciliationId}
|
||||
</if>
|
||||
<if test="auditStatus != null ">
|
||||
and audit_status = #{auditStatus}
|
||||
</if>
|
||||
<if test="verificationMoney != null ">
|
||||
and verification_money = #{verificationMoney}
|
||||
</if>
|
||||
<if test="userId != null ">
|
||||
and user_id = #{userId}
|
||||
</if>
|
||||
<if test="waybillNumber != null and waybillNumber != ''">
|
||||
and waybill_number = #{waybillNumber}
|
||||
</if>
|
||||
<if test="waybillSource != null and waybillSource != ''">
|
||||
and waybill_source = #{waybillSource}
|
||||
</if>
|
||||
<if test="waybillSourceName != null and waybillSourceName != ''">
|
||||
and waybill_source_name like concat('%', #{waybillSourceName}, '%')
|
||||
</if>
|
||||
<if test="receivableType != null ">
|
||||
and receivable_type = #{receivableType}
|
||||
</if>
|
||||
<if test="payStatus != null ">
|
||||
and pay_status = #{payStatus}
|
||||
</if>
|
||||
<if test="loadingAdress != null and loadingAdress != ''">
|
||||
and loading_adress = #{loadingAdress}
|
||||
</if>
|
||||
<if test="unloadAdress != null and unloadAdress != ''">
|
||||
and unload_adress = #{unloadAdress}
|
||||
</if>
|
||||
<if test="payableAmount != null ">
|
||||
and payable_amount = #{payableAmount}
|
||||
</if>
|
||||
<if test="receivableAmount != null ">
|
||||
and receivable_amount = #{receivableAmount}
|
||||
</if>
|
||||
<if test="carrierName != null and carrierName != ''">
|
||||
and carrier_name like concat('%', #{carrierName}, '%')
|
||||
</if>
|
||||
<if test="driverName != null and driverName != ''">
|
||||
and driver_name like concat('%', #{driverName}, '%')
|
||||
</if>
|
||||
<if test="shipperName != null and shipperName != ''">
|
||||
and shipper_name like concat('%', #{shipperName}, '%')
|
||||
</if>
|
||||
|
||||
<if test="shipperInfo != null and shipperInfo != ''">
|
||||
and (shipper_name like concat('%', #{shipperInfo}, '%')
|
||||
or phone like concat('%', #{shipperInfo}, '%'))
|
||||
</if>
|
||||
|
||||
<if test="vehicleLicensePlateNumber != null and vehicleLicensePlateNumber != ''">
|
||||
and vehicle_license_plate_number = #{vehicleLicensePlateNumber}
|
||||
</if>
|
||||
<if test="receptionTime != null ">
|
||||
and reception_time = #{receptionTime}
|
||||
</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="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="waybillNoList != null and waybillNoList.size() > 0">
|
||||
and waybill_number in
|
||||
<foreach item="waybillNo" index="index" collection="waybillNoList" open="(" separator=" , " close=")">
|
||||
#{waybillNo}
|
||||
</foreach>
|
||||
</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>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.linke.finance.domain.businessDocument.repository.todo.BusinessDocumentDO" resultMap="BusinessDocumentResult">
|
||||
<include refid="selectBusinessDocumentPo"/>
|
||||
where del_flag = 1
|
||||
<include refid="selectBusinessDocumentPo1"/>
|
||||
</select>
|
||||
|
||||
<select id="queryInvoiceList" resultType="com.linke.finance.domain.businessDocument.repository.po.BusinessDocumentPO" parameterType="com.linke.finance.domain.businessDocument.repository.todo.BusinessDocumentDO">
|
||||
<include refid="selectBusinessDocumentPo"/>
|
||||
where del_flag = 1
|
||||
<include refid="common_where_one"></include>
|
||||
</select>
|
||||
|
||||
<select id="initiateReconciliation"
|
||||
resultType="com.linke.finance.domain.businessDocument.repository.po.BusinessDocumentPO">
|
||||
SELECT
|
||||
user_id,
|
||||
organization_name,
|
||||
shipper_name,
|
||||
phone,
|
||||
SUM( receivable_amount ) receivable_amount,
|
||||
COUNT( 1 ) waybillCount,
|
||||
waybill_source_name
|
||||
FROM
|
||||
`business_document`
|
||||
where del_flag = 1
|
||||
<include refid="selectBusinessDocumentPo1"/>
|
||||
GROUP BY
|
||||
user_id,waybill_source
|
||||
</select>
|
||||
|
||||
<select id="queryListByInvoiceId" resultType="com.linke.finance.domain.businessDocument.repository.po.BusinessDocumentAppPO" parameterType="java.lang.Long">
|
||||
<include refid="selectBusinessDocumentPo"/>
|
||||
where del_flag = 1
|
||||
and invoice_info_id = #{invoiceInfoId}
|
||||
</select>
|
||||
|
||||
<select id="businessDocumentList" resultType="com.linke.finance.domain.businessDocument.repository.po.AccountsReceivableAppPO" parameterType="com.linke.finance.domain.businessDocumentDetali.repository.todo.BusinessDocumentDetaliDO">
|
||||
SELECT
|
||||
bdd.*
|
||||
FROM
|
||||
business_document_detali bdd
|
||||
<!-- LEFT JOIN business_document bd ON bdd.business_document_id = bd.business_document_id-->
|
||||
WHERE
|
||||
bdd.del_flag = 1
|
||||
AND bdd.payment_status = 1
|
||||
<include refid="common_where_two"></include>
|
||||
ORDER BY bdd.create_time DESC
|
||||
</select>
|
||||
<select id="queryListByReconciliation"
|
||||
resultType="com.linke.finance.domain.businessDocument.repository.po.BusinessDocumentPO">
|
||||
SELECT
|
||||
a.*
|
||||
FROM
|
||||
`business_document` a
|
||||
LEFT JOIN reconciliation_business_document c ON a.business_document_id = c.business_document_id
|
||||
LEFT JOIN reconciliation d ON c.reconciliation_id = d.reconciliation_id
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
AND d.del_flag = 1
|
||||
AND d.inner_number IN
|
||||
<foreach item="waybillNo" collection="waybillNoList" open="(" separator="," close=")">
|
||||
#{waybillNo}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<sql id="common_where_two">
|
||||
<if test="businessDocumentDO.carrierId != null ">
|
||||
AND bdd.pay_id = #{businessDocumentDO.carrierId}
|
||||
</if>
|
||||
<if test="businessDocumentDO.receptionTimeStart != null and businessDocumentDO.receptionTimeStart != ''">
|
||||
AND date_format(bdd.create_time,'%Y-%m-%d') >= #{businessDocumentDO.receptionTimeStart}
|
||||
</if>
|
||||
<if test="businessDocumentDO.receptionTimeEnd != null and businessDocumentDO.receptionTimeEnd != ''">
|
||||
AND date_format(bdd.create_time,'%Y-%m-%d') <![CDATA[<=]]> #{businessDocumentDO.receptionTimeEnd}
|
||||
</if>
|
||||
|
||||
</sql>
|
||||
|
||||
<sql id="common_where_one">
|
||||
<if test="businessDocumentDO.userId != null ">
|
||||
and user_id = #{businessDocumentDO.userId}
|
||||
</if>
|
||||
<if test="businessDocumentDO.receivableType != null ">
|
||||
and receivable_type = #{businessDocumentDO.receivableType}
|
||||
</if>
|
||||
<if test="businessDocumentDO.waybillVerifyFlag != null ">
|
||||
and waybill_verify_flag = #{businessDocumentDO.waybillVerifyFlag}
|
||||
</if>
|
||||
<if test="businessDocumentDO.invoiceApplyStatus != null ">
|
||||
and invoice_apply_status = #{businessDocumentDO.invoiceApplyStatus}
|
||||
</if>
|
||||
<if test="businessDocumentDO.payStatus != null ">
|
||||
and pay_status = #{businessDocumentDO.payStatus}
|
||||
</if>
|
||||
<if test="businessDocumentDO.payStatusShipper != null ">
|
||||
and pay_status_shipper = #{businessDocumentDO.payStatusShipper}
|
||||
</if>
|
||||
<if test="businessDocumentDO.organizationId != null ">
|
||||
and organization_id = #{businessDocumentDO.organizationId}
|
||||
</if>
|
||||
<if test="businessDocumentDO.topOrganizationId != null ">
|
||||
and top_organization_id = #{businessDocumentDO.topOrganizationId}
|
||||
</if>
|
||||
<if test="businessDocumentDO.createTimeStart != null and businessDocumentDO.createTimeStart != ''">
|
||||
AND date_format(create_time,'%Y-%m-%d') >= #{businessDocumentDO.createTimeStart}
|
||||
</if>
|
||||
<if test="businessDocumentDO.createTimeEnd != null and businessDocumentDO.createTimeEnd != ''">
|
||||
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> #{businessDocumentDO.createTimeEnd}
|
||||
</if>
|
||||
<if test="businessDocumentDO.payTimeStart != null and businessDocumentDO.payTimeStart != ''">
|
||||
AND date_format(pay_time,'%Y-%m-%d') >= #{businessDocumentDO.payTimeStart}
|
||||
</if>
|
||||
<if test="businessDocumentDO.payTimeEnd != null and businessDocumentDO.payTimeEnd != ''">
|
||||
AND date_format(pay_time,'%Y-%m-%d') <![CDATA[<=]]> #{businessDocumentDO.payTimeEnd}
|
||||
</if>
|
||||
<if test="businessDocumentDO.payTimeShipperStart != null and businessDocumentDO.payTimeShipperStart != ''">
|
||||
AND date_format(pay_time_shipper,'%Y-%m-%d') >= #{businessDocumentDO.payTimeShipperStart}
|
||||
</if>
|
||||
<if test="businessDocumentDO.payTimeShipperEnd != null and businessDocumentDO.payTimeShipperEnd != ''">
|
||||
AND date_format(pay_time_shipper,'%Y-%m-%d') <![CDATA[<=]]> #{businessDocumentDO.payTimeShipperEnd}
|
||||
</if>
|
||||
<if test="businessDocumentDO.createByName != null and businessDocumentDO.createByName != ''">
|
||||
AND create_by_name like concat('%', #{businessDocumentDO.createByName}, '%')
|
||||
</if>
|
||||
<if test="businessDocumentDO.waybillNumber != null and businessDocumentDO.waybillNumber != ''">
|
||||
AND waybill_number like concat('%', #{businessDocumentDO.waybillNumber}, '%')
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="querySettlementList" resultType="com.linke.finance.domain.businessDocumentDetali.repository.po.BusinessDocumentDetaliPO" parameterType="com.linke.finance.domain.businessDocument.repository.todo.BusinessDocumentDO">
|
||||
SELECT
|
||||
amount,
|
||||
first_subject,
|
||||
first_subject_name,
|
||||
second_subject,
|
||||
second_subject_name,
|
||||
pay_time,
|
||||
update_by_name,
|
||||
service
|
||||
FROM
|
||||
business_document_detali
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND audit_status = 2
|
||||
<include refid="common_where_three"></include>
|
||||
</select>
|
||||
|
||||
<sql id="common_where_three">
|
||||
<if test="businessDocumentDO.topOrganizationId != null ">
|
||||
and top_organization_id = #{businessDocumentDO.topOrganizationId}
|
||||
</if>
|
||||
<if test="businessDocumentDO.waybillNumber != null and businessDocumentDO.waybillNumber != ''">
|
||||
AND waybill_number = #{businessDocumentDO.waybillNumber}
|
||||
</if>
|
||||
<if test="businessDocumentDO.queryType != null and businessDocumentDO.queryType==1">
|
||||
AND pay_status_shipper = 1
|
||||
</if>
|
||||
<if test="businessDocumentDO.queryType != null and businessDocumentDO.queryType==2">
|
||||
AND pay_status = 1
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?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.businessDocumentDetali.repository.mapper.AuditRecordsMapper">
|
||||
|
||||
<resultMap type="com.linke.finance.domain.businessDocumentDetali.repository.po.AuditRecordsPO" id="AuditRecordsResult">
|
||||
<result property="auditRecordsId" column="audit_records_id" />
|
||||
<result property="sort" column="sort" />
|
||||
<result property="roleId" column="role_id" />
|
||||
<result property="roleCode" column="role_code" />
|
||||
<result property="roleName" column="role_name" />
|
||||
<result property="businessDocumentDetaliId" column="business_document_detali_id" />
|
||||
<result property="businessDocumentId" column="business_document_id" />
|
||||
<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="organizationId" column="organization_id" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectAuditRecordsPo">
|
||||
select audit_records_id, sort, role_id, role_code, role_name, business_document_detali_id, business_document_id, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag, organization_id, top_organization_id, organization_name from audit_records
|
||||
</sql>
|
||||
|
||||
<sql id="selectAuditRecordsPo1">
|
||||
<where>
|
||||
<if test="sort != null ">
|
||||
and sort = #{sort}
|
||||
</if>
|
||||
<if test="roleId != null ">
|
||||
and role_id = #{roleId}
|
||||
</if>
|
||||
<if test="roleCode != null and roleCode != ''">
|
||||
and role_code = #{roleCode}
|
||||
</if>
|
||||
<if test="roleName != null and roleName != ''">
|
||||
and role_name like concat('%', #{roleName}, '%')
|
||||
</if>
|
||||
<if test="businessDocumentDetaliId != null ">
|
||||
and business_document_detali_id = #{businessDocumentDetaliId}
|
||||
</if>
|
||||
<if test="businessDocumentId != null ">
|
||||
and business_document_id = #{businessDocumentId}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
and create_by = #{createBy}
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.linke.finance.domain.businessDocumentDetali.repository.todo.AuditRecordsDO" resultMap="AuditRecordsResult">
|
||||
<include refid="selectAuditRecordsPo"/>
|
||||
<include refid="selectAuditRecordsPo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
+270
@@ -0,0 +1,270 @@
|
||||
<?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.businessDocumentDetali.repository.mapper.BusinessDocumentDetaliMapper">
|
||||
|
||||
<resultMap type="com.linke.finance.domain.businessDocumentDetali.repository.po.BusinessDocumentDetaliPO" id="BusinessDocumentDetaliResult">
|
||||
<result property="businessDocumentDetaliId" column="business_document_detali_id" />
|
||||
<result property="businessDocumentId" column="business_document_id" />
|
||||
<result property="firstSubject" column="first_subject" />
|
||||
<result property="firstSubjectName" column="first_subject_name" />
|
||||
<result property="secondSubject" column="second_subject" />
|
||||
<result property="secondSubjectName" column="second_subject_name" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="amountPaid" column="amount_paid" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="waybillNumber" column="waybill_number" />
|
||||
<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="organizationId" column="organization_id" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectBusinessDocumentDetaliPo">
|
||||
select * from business_document_detali
|
||||
</sql>
|
||||
|
||||
<sql id="selectBusinessDocumentDetaliPo1">
|
||||
<where>
|
||||
del_flag = 1
|
||||
<if test="businessDocumentId != null ">
|
||||
and business_document_id = #{businessDocumentId}
|
||||
</if>
|
||||
<if test="firstSubject != null and firstSubject != ''">
|
||||
and first_subject = #{firstSubject}
|
||||
</if>
|
||||
<if test="firstSubjectName != null and firstSubjectName != ''">
|
||||
and first_subject_name like concat('%', #{firstSubjectName}, '%')
|
||||
</if>
|
||||
<if test="secondSubject != null and secondSubject != ''">
|
||||
and second_subject = #{secondSubject}
|
||||
</if>
|
||||
<if test="secondSubjectName != null and secondSubjectName != ''">
|
||||
and second_subject_name like concat('%', #{secondSubjectName}, '%')
|
||||
</if>
|
||||
<if test="amount != null ">
|
||||
and amount = #{amount}
|
||||
</if>
|
||||
<if test="userId != null ">
|
||||
and user_id = #{userId}
|
||||
</if>
|
||||
<if test="waybillNumber != null and waybillNumber != ''">
|
||||
and waybill_number = #{waybillNumber}
|
||||
</if>
|
||||
<if test="waybillNoList != null">
|
||||
AND waybill_number in
|
||||
<foreach item="waybillNo" collection="waybillNoList" open="(" separator="," close=")">
|
||||
#{waybillNo}
|
||||
</foreach>
|
||||
</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="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="payStatus != null ">
|
||||
and pay_status = #{payStatus}
|
||||
</if>
|
||||
<if test="payStatusShipper != null ">
|
||||
and pay_status_shipper = #{payStatusShipper}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.linke.finance.domain.businessDocumentDetali.repository.todo.BusinessDocumentDetaliDO" resultMap="BusinessDocumentDetaliResult">
|
||||
<include refid="selectBusinessDocumentDetaliPo"/>
|
||||
<include refid="selectBusinessDocumentDetaliPo1"/>
|
||||
</select>
|
||||
|
||||
<select id="selectDetailsByOrderNo" resultType="com.linke.finance.domain.businessDocumentDetali.repository.po.BusinessDocumentDetaliPO">
|
||||
SELECT
|
||||
a.*
|
||||
FROM
|
||||
business_document_detali a
|
||||
LEFT JOIN business_document b ON a.business_document_id = b.business_document_id
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
AND b.waybill_source = #{orderSource}
|
||||
AND b.waybill_number = #{orderNo}
|
||||
</select>
|
||||
<select id="auditList" resultType="com.linke.finance.domain.businessDocumentDetali.repository.po.BusinessDocumentDetaliAuditPO">
|
||||
SELECT
|
||||
a.*,b.approval_number
|
||||
FROM business_document_detali a
|
||||
left join approval_document b on a.instance_id=b.approval_order_number
|
||||
WHERE a.del_flag = 1
|
||||
<if test="auditStatus != null">
|
||||
and a.audit_status = #{auditStatus}
|
||||
</if>
|
||||
<if test="paymentMethod != null">
|
||||
and a.payment_method = #{paymentMethod}
|
||||
</if>
|
||||
<if test="waybillNumber != null and waybillNumber != ''">
|
||||
and a.waybill_number like concat('%', #{waybillNumber}, '%')
|
||||
</if>
|
||||
<if test="approvalNumber != null and approvalNumber != ''">
|
||||
and b.approval_number like concat('%', #{approvalNumber}, '%')
|
||||
</if>
|
||||
<!-- <if test="waybillSource != null and waybillSource != ''">-->
|
||||
<!-- and b.waybill_source = #{waybillSource}-->
|
||||
<!-- </if>-->
|
||||
<if test="organizationId != null and organizationId != ''">
|
||||
and a.organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="firstSubject != null and firstSubject != ''">
|
||||
and a.first_subject = #{firstSubject}
|
||||
</if>
|
||||
<if test="secondSubject != null and secondSubject != ''">
|
||||
and a.second_subject = #{secondSubject}
|
||||
</if>
|
||||
<if test="secondSubject != null and secondSubject != ''">
|
||||
and a.second_subject = #{secondSubject}
|
||||
</if>
|
||||
<if test="expenseItem != null and expenseItem != ''">
|
||||
and a.expense_item = #{expenseItem}
|
||||
</if>
|
||||
<if test="paymentStatus != null">
|
||||
and a.payment_status = #{paymentStatus}
|
||||
</if>
|
||||
|
||||
<if test="auditType != null">
|
||||
and a.audit_type = #{auditType}
|
||||
</if>
|
||||
|
||||
<if test="payee != null and payee != ''">
|
||||
and a.payee like concat('%', #{payee}, '%')
|
||||
</if>
|
||||
|
||||
<if test="payName != null and payName != ''">
|
||||
and a.pay_name like concat('%', #{payName}, '%')
|
||||
</if>
|
||||
|
||||
<if test="licenseNumber != null and licenseNumber != ''">
|
||||
and a.license_number like concat('%', #{licenseNumber}, '%')
|
||||
</if>
|
||||
|
||||
<if test="departmentName != null and departmentName != ''">
|
||||
and a.department_name like concat('%', #{departmentName}, '%')
|
||||
</if>
|
||||
|
||||
<if test="remark != null and remark != ''">
|
||||
and a.remark like concat('%', #{remark}, '%')
|
||||
</if>
|
||||
|
||||
<if test="auditNumber != null and auditNumber != ''">
|
||||
and a.audit_number like concat('%', #{auditNumber}, '%')
|
||||
</if>
|
||||
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and a.create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
|
||||
<if test="businessDocumentDetaliNumber != null and businessDocumentDetaliNumber != ''">
|
||||
and a.business_document_detali_number like concat('%', #{businessDocumentDetaliNumber }, '%')
|
||||
</if>
|
||||
|
||||
<if test="departmentName != null and departmentName != ''">
|
||||
and a.department_name like concat('%', #{departmentName }, '%')
|
||||
</if>
|
||||
|
||||
|
||||
<if test="businessType != null">
|
||||
and a.business_type = #{businessType}
|
||||
</if>
|
||||
|
||||
<if test="starTime != null and endTime != null">
|
||||
and DATE_FORMAT(a.create_time,'%Y-%m-%d') <![CDATA[>=]]> DATE_FORMAT(#{starTime},'%Y-%m-%d')
|
||||
and DATE_FORMAT(a.create_time,'%Y-%m-%d') <![CDATA[<=]]> DATE_FORMAT(#{endTime},'%Y-%m-%d')
|
||||
</if>
|
||||
<!-- <if test="roleIds != null">-->
|
||||
<!-- and a.role_id in-->
|
||||
<!-- <foreach item="id" collection="roleIds" open="(" separator="," close=")">-->
|
||||
<!-- #{id}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="waybillNumberList != null">-->
|
||||
<!-- and b.waybill_number in-->
|
||||
<!-- <foreach item="waybillNumber" collection="waybillNumberList" open="(" separator="," close=")">-->
|
||||
<!-- #{waybillNumber}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
<select id="auditDetailList"
|
||||
resultType="com.linke.finance.domain.businessDocumentDetali.repository.po.BusinessDocumentDetaliAuditPO">
|
||||
SELECT
|
||||
a.create_time,
|
||||
a.remark,
|
||||
b.second_subject_name,
|
||||
b.amount,
|
||||
b.service,
|
||||
b.audit_status,
|
||||
b.audit_role,
|
||||
b.audit_time,
|
||||
a.role_id,
|
||||
a.role_code,
|
||||
a.role_name,
|
||||
c.waybill_source_name,
|
||||
c.organization_name,
|
||||
c.waybill_number,
|
||||
c.loading_adress,
|
||||
c.unload_adress,
|
||||
c.carrier_name,
|
||||
c.driver_name,
|
||||
c.vehicle_license_plate_number
|
||||
FROM
|
||||
audit_records a
|
||||
LEFT JOIN business_document_detali b ON a.business_document_detali_id = b.business_document_detali_id
|
||||
LEFT JOIN business_document c ON b.business_document_id = c.business_document_id
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
AND b.del_flag = 1
|
||||
and c.del_flag = 1
|
||||
<if test="createBy != null">
|
||||
and a.create_by = #{createBy}
|
||||
</if>
|
||||
<if test="waybillNumber != null and waybillNumber != ''">
|
||||
and c.waybill_number like concat('%', #{waybillNumber}, '%')
|
||||
</if>
|
||||
<if test="createTimeStart != null and createTimeEnd != null">
|
||||
AND date_format(a.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{createTimeStart},'%Y-%m-%d')
|
||||
AND date_format(a.create_time,'%Y-%m-%d') <![CDATA[<=]]> DATE_FORMAT(#{createTimeEnd},'%Y-%m-%d')
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="queryListByReconciliation"
|
||||
resultType="com.linke.finance.domain.businessDocumentDetali.repository.po.BusinessDocumentDetaliPO">
|
||||
SELECT
|
||||
a.*
|
||||
FROM
|
||||
`business_document_detali` a
|
||||
LEFT JOIN reconciliation_business_document c ON a.business_document_id = c.business_document_id
|
||||
LEFT JOIN reconciliation d ON c.reconciliation_id = d.reconciliation_id
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
AND d.del_flag = 1
|
||||
<if test="payStatusShipper != null ">
|
||||
and a.pay_status_shipper = #{payStatusShipper}
|
||||
</if>
|
||||
AND d.inner_number IN
|
||||
<foreach item="waybillNo" collection="waybillNoList" open="(" separator="," close=")">
|
||||
#{waybillNo}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?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.invoice.repository.mapper.InvoiceInfoDetailsMapper">
|
||||
|
||||
<sql id="selectInvoiceInfoDetailsVo">
|
||||
SELECT
|
||||
a.*
|
||||
FROM
|
||||
invoice_info_details a
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectInvoiceInfoDetailsList" parameterType="com.linke.finance.domain.invoice.repository.todo.InvoiceInfoDetailsDo"
|
||||
resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoDetailsPo">
|
||||
<include refid="selectInvoiceInfoDetailsVo"/>
|
||||
</select>
|
||||
|
||||
<select id="selectInvoiceInfoDetailsById" parameterType="java.lang.Long"
|
||||
resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoDetailsPo">
|
||||
<include refid="selectInvoiceInfoDetailsVo"/>
|
||||
and invoice_info_details_id = #{invoiceInfoDetailsId}
|
||||
</select>
|
||||
|
||||
<select id="selectDetailsListByInvoiceInfoId" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoDetailsPo" parameterType="java.lang.Long">
|
||||
<include refid="selectInvoiceInfoDetailsVo"/>
|
||||
AND a.invoice_info_id = #{invoiceInfoId}
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteInvoiceInfoDetailsByInvoiceInfoDetailsId" parameterType="java.lang.Long">
|
||||
delete from invoice_info_details where invoice_info_details_id = #{invoiceInfoDetailsId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInvoiceInfoDetailsByInvoiceInfoDetailsIds" parameterType="java.lang.String">
|
||||
delete from invoice_info_details where invoice_info_details_id in
|
||||
<foreach item="invoiceInfoDetailsId" collection="array" open="(" separator="," close=")">
|
||||
#{invoiceInfoDetailsId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?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.invoice.repository.mapper.InvoiceInfoManageMapper">
|
||||
|
||||
<sql id="selectInvoiceInfoManageVo">
|
||||
SELECT
|
||||
a.*
|
||||
FROM
|
||||
invoice_info_manage a
|
||||
where
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectInvoiceInfoManageList" parameterType="com.linke.finance.domain.invoice.repository.todo.InvoiceInfoManageDo" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoManagePo">
|
||||
<include refid="selectInvoiceInfoManageVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="createBy != null">
|
||||
and a.create_by = #{createBy}
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
and a.user_id = #{userId}
|
||||
</if>
|
||||
<if test="organizationId != null">
|
||||
and a.organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null">
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationIdList != null ">
|
||||
AND a.organization_id in
|
||||
<foreach item="id" collection="organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectInvoiceInfoManageByInvoiceInfoId" parameterType="java.lang.Long" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoManagePo">
|
||||
<include refid="selectInvoiceInfoManageVo"/>
|
||||
and a.invoice_info_manage_id = #{invoiceInfoManageId}
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteInvoiceInfoManageByInvoiceInfoId" parameterType="java.lang.Long">
|
||||
delete from invoice_info_manage where invoice_info_manage_id = #{invoiceInfoManageId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInvoiceInfoManageByInvoiceInfoIds" parameterType="java.lang.String">
|
||||
delete from invoice_info_manage where invoice_info_manage_id in
|
||||
<foreach item="invoiceInfoManageId" collection="array" open="(" separator="," close=")">
|
||||
#{invoiceInfoManageId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,185 @@
|
||||
<?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.invoice.repository.mapper.InvoiceInfoMapper">
|
||||
|
||||
<sql id="selectInvoiceInfoVo">
|
||||
SELECT
|
||||
a.*,
|
||||
(CASE
|
||||
a.invoice_status
|
||||
WHEN 1 THEN
|
||||
'未开票'
|
||||
WHEN 2 THEN
|
||||
'已撤回'
|
||||
WHEN 3 THEN
|
||||
'已驳回'
|
||||
WHEN 4 THEN
|
||||
'已开票'
|
||||
WHEN 5 THEN
|
||||
'已寄出'
|
||||
WHEN 6 THEN
|
||||
'已取消'
|
||||
WHEN 7 THEN
|
||||
'已作废'
|
||||
ELSE NULL
|
||||
END
|
||||
) AS invoiceStatusName
|
||||
FROM
|
||||
invoice_info a
|
||||
LEFT JOIN business_document b ON a.invoice_info_id = b.invoice_info_id
|
||||
LEFT JOIN invoice_info_details c ON a.invoice_info_id = c.invoice_info_id
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectInvoiceInfoList" parameterType="com.linke.finance.domain.invoice.repository.todo.InvoiceInfoDo"
|
||||
resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoPo">
|
||||
<include refid="selectInvoiceInfoVo"/>
|
||||
<include refid="common_where"></include>
|
||||
GROUP BY
|
||||
a.invoice_info_id
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="invoiceInfoDo.createTimeStart != null and invoiceInfoDo.createTimeStart != ''">
|
||||
AND date_format(a.create_time,'%Y-%m-%d') >= #{invoiceInfoDo.createTimeStart}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.createTimeEnd != null and invoiceInfoDo.createTimeEnd != ''">
|
||||
AND date_format(a.create_time,'%Y-%m-%d') <![CDATA[<=]]> #{invoiceInfoDo.createTimeEnd}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceApplyNum != null and invoiceInfoDo.invoiceApplyNum != ''">
|
||||
AND a.invoice_apply_num like concat('%', #{invoiceInfoDo.invoiceApplyNum}, '%')
|
||||
</if>
|
||||
<if test="invoiceInfoDo.createByName != null and invoiceInfoDo.createByName != ''">
|
||||
AND a.create_by_name like concat('%', #{invoiceInfoDo.createByName}, '%')
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceStatus != null and invoiceInfoDo.invoiceStatus != ''">
|
||||
AND a.invoice_status = #{invoiceInfoDo.invoiceStatus}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceHeader != null and invoiceInfoDo.invoiceHeader != ''">
|
||||
AND a.invoice_remark like concat('%', #{invoiceInfoDo.invoiceHeader}, '%')
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceRemark != null and invoiceInfoDo.invoiceRemark != ''">
|
||||
AND a.invoice_header like concat('%', #{invoiceInfoDo.invoiceRemark}, '%')
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceMakeTimeStart != null and invoiceInfoDo.invoiceMakeTimeStart != ''">
|
||||
AND date_format(a.invoice_make_time,'%Y-%m-%d') >= #{invoiceInfoDo.invoiceMakeTimeStart}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceMakeTimeEnd != null and invoiceInfoDo.invoiceMakeTimeEnd != ''">
|
||||
AND date_format(a.invoice_make_time,'%Y-%m-%d') <![CDATA[<=]]> #{invoiceInfoDo.invoiceMakeTimeEnd}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceRejectTimeStart != null and invoiceInfoDo.invoiceRejectTimeStart != ''">
|
||||
AND date_format(a.invoice_reject_time,'%Y-%m-%d') >= #{invoiceInfoDo.invoiceRejectTimeStart}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceRejectTimeEnd != null and invoiceInfoDo.invoiceRejectTimeEnd != ''">
|
||||
AND date_format(a.invoice_reject_time,'%Y-%m-%d') <![CDATA[<=]]> #{invoiceInfoDo.invoiceRejectTimeEnd}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceNullifyTimeStart != null and invoiceInfoDo.invoiceNullifyTimeStart != ''">
|
||||
AND date_format(a.invoice_nullify_time,'%Y-%m-%d') >= #{invoiceInfoDo.invoiceNullifyTimeStart}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceNullifyTimeEnd != null and invoiceInfoDo.invoiceNullifyTimeEnd != ''">
|
||||
AND date_format(a.invoice_nullify_time,'%Y-%m-%d') <![CDATA[<=]]> #{invoiceInfoDo.invoiceNullifyTimeEnd}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.exportFlag != null and invoiceInfoDo.exportFlag != ''">
|
||||
AND a.export_flag = #{invoiceInfoDo.exportFlag}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.mailFlag != null and invoiceInfoDo.mailFlag != ''">
|
||||
AND a.mail_flag = #{invoiceInfoDo.mailFlag}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.waybillNumber != null and invoiceInfoDo.waybillNumber != ''">
|
||||
AND b.waybill_number like concat('%', #{invoiceInfoDo.waybillNumber}, '%')
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceNumber != null and invoiceInfoDo.invoiceNumber != ''">
|
||||
AND c.invoice_number like concat('%', #{invoiceInfoDo.invoiceNumber}, '%')
|
||||
</if>
|
||||
<if test="invoiceInfoDo.createBy != null"> and a.create_by = #{invoiceInfoDo.createBy}</if>
|
||||
<if test="invoiceInfoDo.organizationId != null"> and a.organization_id = #{invoiceInfoDo.organizationId}</if>
|
||||
<if test="invoiceInfoDo.organizationIdList != null ">
|
||||
AND a.organization_id in
|
||||
<foreach item="id" collection="invoiceInfoDo.organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectInvoiceInfoById" parameterType="java.lang.Long" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoPo">
|
||||
SELECT
|
||||
a.*,
|
||||
(CASE
|
||||
a.invoice_status
|
||||
WHEN 1 THEN
|
||||
'未开票'
|
||||
WHEN 2 THEN
|
||||
'已撤回'
|
||||
WHEN 3 THEN
|
||||
'已驳回'
|
||||
WHEN 4 THEN
|
||||
'已开票'
|
||||
WHEN 5 THEN
|
||||
'已寄出'
|
||||
WHEN 6 THEN
|
||||
'已取消'
|
||||
WHEN 7 THEN
|
||||
'已作废'
|
||||
ELSE NULL
|
||||
END
|
||||
) AS invoiceStatusName
|
||||
FROM
|
||||
invoice_info a
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
and a.invoice_info_id = #{invoiceInfoId}
|
||||
</select>
|
||||
|
||||
<select id="invoiceInfoAppList" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoAppPo" parameterType="com.linke.finance.domain.invoice.repository.todo.InvoiceInfoDo">
|
||||
<include refid="selectInvoiceInfoVo"/>
|
||||
<include refid="common_where"></include>
|
||||
GROUP BY
|
||||
a.invoice_info_id
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="invoiceInfoDetailApp" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoAppPo" parameterType="java.lang.Long">
|
||||
SELECT
|
||||
a.*,
|
||||
(CASE
|
||||
a.invoice_status
|
||||
WHEN 1 THEN
|
||||
'未开票'
|
||||
WHEN 2 THEN
|
||||
'已撤回'
|
||||
WHEN 3 THEN
|
||||
'已驳回'
|
||||
WHEN 4 THEN
|
||||
'已开票'
|
||||
WHEN 5 THEN
|
||||
'已寄出'
|
||||
WHEN 6 THEN
|
||||
'已取消'
|
||||
WHEN 7 THEN
|
||||
'已作废'
|
||||
ELSE NULL
|
||||
END
|
||||
) AS invoiceStatusName
|
||||
FROM
|
||||
invoice_info a
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
and a.invoice_info_id = #{invoiceInfoId}
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteInvoiceInfoByInvoiceInfoId" parameterType="java.lang.Long">
|
||||
delete from invoice_info where invoice_info_id = #{invoiceInfoId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInvoiceInfoByInvoiceInfoIds" parameterType="java.lang.String">
|
||||
delete from invoice_info where invoice_info_id in
|
||||
<foreach item="invoiceInfoId" collection="array" open="(" separator="," close=")">
|
||||
#{invoiceInfoId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,123 @@
|
||||
<?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.invoice.repository.mapper.InvoiceOrderMapper">
|
||||
|
||||
<sql id="selectInvoiceOrderVo">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
invoice_order
|
||||
where
|
||||
del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectInvoiceOrderList" parameterType="com.linke.finance.domain.invoice.repository.todo.InvoiceOrderDo" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceOrderPo">
|
||||
<include refid="selectInvoiceOrderVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="invoiceOrderDo.waybillVerifyFlag != null and invoiceOrderDo.waybillVerifyFlag != ''">
|
||||
AND waybill_verify_flag = #{invoiceOrderDo.waybillVerifyFlag}
|
||||
</if>
|
||||
<if test="invoiceOrderDo.applyStatus != null and invoiceOrderDo.applyStatus != ''">
|
||||
AND apply_status = #{invoiceOrderDo.applyStatus}
|
||||
</if>
|
||||
<if test="invoiceOrderDo.waybillNumber != null and invoiceOrderDo.waybillNumber != ''">
|
||||
AND waybill_number like concat('%', #{invoiceOrderDo.waybillNumber}, '%')
|
||||
</if>
|
||||
<if test="invoiceOrderDo.createTimeStart != null and invoiceOrderDo.createTimeStart != ''">
|
||||
AND date_format(create_time,'%Y-%m-%d') >= #{invoiceOrderDo.createTimeStart}
|
||||
</if>
|
||||
<if test="invoiceOrderDo.createTimeEnd != null and invoiceOrderDo.createTimeEnd != ''">
|
||||
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> #{invoiceOrderDo.createTimeEnd}
|
||||
</if>
|
||||
<if test="invoiceOrderDo.payTimeStart != null and invoiceOrderDo.payTimeStart != ''">
|
||||
AND date_format(waybill_pay_time,'%Y-%m-%d') >= #{invoiceOrderDo.payTimeStart}
|
||||
</if>
|
||||
<if test="invoiceOrderDo.payTimeEnd != null and invoiceOrderDo.payTimeEnd != ''">
|
||||
AND date_format(waybill_pay_time,'%Y-%m-%d') <![CDATA[<=]]> #{invoiceOrderDo.payTimeEnd}
|
||||
</if>
|
||||
<if test="invoiceOrderDo.createBy != null"> and create_by = #{invoiceOrderDo.createBy}</if>
|
||||
<if test="invoiceOrderDo.createByName != null and invoiceOrderDo.createByName != ''">
|
||||
AND create_by_name like concat('%', #{invoiceOrderDo.createByName}, '%')
|
||||
</if>
|
||||
<if test="invoiceOrderDo.organizationId != null"> and organization_id = #{invoiceOrderDo.organizationId}</if>
|
||||
<if test="invoiceOrderDo.organizationIdList != null ">
|
||||
AND organization_id in
|
||||
<foreach item="id" collection="invoiceOrderDo.organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectInvoiceOrderByInvoiceOrderId" parameterType="java.lang.Long" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceOrderPo">
|
||||
<include refid="selectInvoiceOrderVo"/>
|
||||
where invoice_order_id = #{invoiceOrderId}
|
||||
</select>
|
||||
|
||||
<select id="getInvoiceCostCan" resultType="java.util.Map" parameterType="com.linke.finance.domain.invoice.repository.todo.InvoiceOrderDo">
|
||||
SELECT
|
||||
SUM( invoice_cost_can ) AS invoiceCostCan,
|
||||
SUM( invoice_cost_has ) AS invoiceCostHas
|
||||
FROM
|
||||
invoice_order
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND waybill_verify_flag = 2
|
||||
<include refid="common_where_two"></include>
|
||||
</select>
|
||||
|
||||
<sql id="common_where_two">
|
||||
<if test="invoiceOrderDo.applyStatus != null"> and apply_status = #{invoiceOrderDo.applyStatus}</if>
|
||||
<if test="invoiceOrderDo.createBy != null"> and create_by = #{invoiceOrderDo.createBy}</if>
|
||||
<if test="invoiceOrderDo.organizationId != null">
|
||||
and organization_id = #{invoiceOrderDo.organizationId}
|
||||
</if>
|
||||
<if test="invoiceOrderDo.organizationIdList != null ">
|
||||
AND organization_id in
|
||||
<foreach item="id" collection="invoiceOrderDo.organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectOrderListByInvoiceInfoId" resultType="com.linke.finance.domain.invoice.entity.InvoiceOrder" parameterType="java.lang.Long">
|
||||
<include refid="selectInvoiceOrderVo"/>
|
||||
and invoice_info_id = #{invoiceInfoId}
|
||||
</select>
|
||||
|
||||
<select id="selectOrderListByInvoiceOrderIds" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceOrderPo" parameterType="java.util.List">
|
||||
<include refid="selectInvoiceOrderVo"/>
|
||||
<if test="invoiceOrderIdList != null ">
|
||||
AND invoice_order_id in
|
||||
<foreach item="id" collection="invoiceOrderIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="invoiceOrderAppList" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceOrderAppPo" parameterType="com.linke.finance.domain.invoice.repository.todo.InvoiceOrderDo">
|
||||
<include refid="selectInvoiceOrderVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<update id="unBindInvoiceInfo" parameterType="com.linke.finance.domain.invoice.entity.InvoiceOrder">
|
||||
UPDATE invoice_order
|
||||
SET
|
||||
update_by = #{invoiceOrder.updateBy},
|
||||
update_by_name = #{invoiceOrder.updateByName},
|
||||
update_time = #{invoiceOrder.updateTime},
|
||||
apply_status = 2,
|
||||
invoice_info_id = null,
|
||||
invoice_cost_has = 0
|
||||
WHERE
|
||||
invoice_info_id = #{invoiceOrder.invoiceInfoId}
|
||||
and del_flag = 1
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?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.address.repository.mapper.ReceivingAddressManageMapper">
|
||||
|
||||
<sql id="selectReceivingAddressManageVo">
|
||||
SELECT
|
||||
a.*
|
||||
FROM
|
||||
receiving_address_manage a
|
||||
where
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectReceivingAddressManageList" parameterType="com.linke.finance.domain.address.repository.todo.ReceivingAddressManageDo" resultType="com.linke.finance.domain.address.repository.po.ReceivingAddressManagePo">
|
||||
<include refid="selectReceivingAddressManageVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="userId != null">
|
||||
and a.user_id = #{userId}
|
||||
</if>
|
||||
<if test="organizationId != null">
|
||||
and a.organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null">
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationIdList != null ">
|
||||
AND a.organization_id in
|
||||
<foreach item="id" collection="organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectByReceivingAddressId" parameterType="java.lang.Long" resultType="com.linke.finance.domain.address.repository.po.ReceivingAddressManagePo">
|
||||
<include refid="selectReceivingAddressManageVo"/>
|
||||
and a.receiving_address_id = #{receivingAddressId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByReceivingAddressId" parameterType="java.lang.Long">
|
||||
delete from receiving_address_manage where receiving_address_id = #{receivingAddressId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByReceivingAddressIds" parameterType="java.lang.String">
|
||||
delete from receiving_address_manage where receiving_address_id in
|
||||
<foreach item="receivingAddressId" collection="array" open="(" separator="," close=")">
|
||||
#{receivingAddressId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,193 @@
|
||||
<?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.reconciliation.repository.mapper.ReconciliationMapper">
|
||||
|
||||
<resultMap type="com.linke.finance.domain.reconciliation.repository.po.ReconciliationPO" id="ReconciliationResult">
|
||||
<result property="reconciliationId" column="reconciliation_id" />
|
||||
<result property="verificationMoney" column="verification_money" />
|
||||
<result property="settlementCount" column="settlement_count" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="shipperName" column="shipper_name" />
|
||||
<result property="waybillSource" column="waybill_source" />
|
||||
<result property="waybillSourceName" column="waybill_source_name" />
|
||||
<result property="reconciliationStart" column="reconciliation_start" />
|
||||
<result property="reconciliationEnd" column="reconciliation_end" />
|
||||
<result property="billName" column="bill_name" />
|
||||
<result property="collectionAmount" column="collection_amount" />
|
||||
<result property="changeAmount" column="change_amount" />
|
||||
<result property="otherAmount" column="other_amount" />
|
||||
<result property="receivable" column="receivable" />
|
||||
<result property="actualReceivable" column="actual_receivable" />
|
||||
<result property="uncollectedReceivable" column="uncollected_receivable" />
|
||||
<result property="collectionState" column="collection_state" />
|
||||
<result property="auditState" column="audit_state" />
|
||||
<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="organizationId" column="organization_id" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="approvalNumber" column="approval_number" />
|
||||
<result property="isInvoice" column="is_invoice" />
|
||||
<result property="invoiceMakeTime" column="invoice_make_time" />
|
||||
<result property="applyNumber" column="apply_number" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectReconciliationPo">
|
||||
select a.*,b.approval_number from reconciliation a LEFT JOIN approval_document b ON a.instance_id = b.approval_order_number
|
||||
</sql>
|
||||
|
||||
<sql id="selectReconciliationPo1">
|
||||
<where>
|
||||
a.del_flag =1
|
||||
<if test="invoiceApplyStatus != null ">
|
||||
and a.invoice_apply_status = #{invoiceApplyStatus}
|
||||
</if>
|
||||
<if test="verificationMoney != null ">
|
||||
and a.verification_money = #{verificationMoney}
|
||||
</if>
|
||||
<if test="isInvoice != null ">
|
||||
and a.is_invoice = #{isInvoice}
|
||||
</if>
|
||||
<if test="settlementCount != null ">
|
||||
and a.settlement_count = #{settlementCount}
|
||||
</if>
|
||||
<if test="userId != null ">
|
||||
and a.user_id = #{userId}
|
||||
</if>
|
||||
<if test="applyNumber != null and applyNumber != ''">
|
||||
and a.apply_number like concat('%', #{applyNumber}, '%')
|
||||
</if>
|
||||
<if test="shipperName != null and shipperName != ''">
|
||||
and a.shipper_name like concat('%', #{shipperName}, '%')
|
||||
</if>
|
||||
<if test="innerNumber != null and innerNumber != ''">
|
||||
and a.inner_number like concat('%', #{innerNumber}, '%')
|
||||
</if>
|
||||
<if test="partyName != null and partyName != ''">
|
||||
and a.inner_number like concat('%', #{partyName}, '%')
|
||||
</if>
|
||||
<if test="billRemark != null and billRemark != ''">
|
||||
and a.bill_remark like concat('%', #{billRemark}, '%')
|
||||
</if>
|
||||
<if test="settlementRemark != null and settlementRemark != ''">
|
||||
and a.settlement_remark like concat('%', #{settlementRemark}, '%')
|
||||
</if>
|
||||
<if test="auditNumber != null and auditNumber != ''">
|
||||
and a.audit_number like concat('%', #{auditNumber}, '%')
|
||||
</if>
|
||||
<if test="waybillSource != null and waybillSource != ''">
|
||||
and a.waybill_source = #{waybillSource}
|
||||
</if>
|
||||
<if test="waybillSourceName != null and waybillSourceName != ''">
|
||||
and a.waybill_source_name like concat('%', #{waybillSourceName}, '%')
|
||||
</if>
|
||||
<if test="reconciliationStart != null ">
|
||||
and a.reconciliation_start = #{reconciliationStart}
|
||||
</if>
|
||||
<if test="reconciliationEnd != null ">
|
||||
and a.reconciliation_end = #{reconciliationEnd}
|
||||
</if>
|
||||
<if test="billName != null and billName != ''">
|
||||
and a.bill_name like concat('%', #{billName}, '%')
|
||||
</if>
|
||||
<if test="collectionAmount != null ">
|
||||
and a.collection_amount = #{collectionAmount}
|
||||
</if>
|
||||
<if test="changeAmount != null ">
|
||||
and a.change_amount = #{changeAmount}
|
||||
</if>
|
||||
<if test="otherAmount != null ">
|
||||
and a.other_amount = #{otherAmount}
|
||||
</if>
|
||||
<if test="receivable != null ">
|
||||
and a.receivable = #{receivable}
|
||||
</if>
|
||||
<if test="actualReceivable != null ">
|
||||
and a.actual_receivable = #{actualReceivable}
|
||||
</if>
|
||||
<if test="uncollectedReceivable != null ">
|
||||
and a.uncollected_receivable = #{uncollectedReceivable}
|
||||
</if>
|
||||
<if test="collectionState != null and collectionState>=0">
|
||||
and a.collection_state = #{collectionState}
|
||||
</if>
|
||||
<if test="auditState != null ">
|
||||
and a.audit_state = #{auditState}
|
||||
</if>
|
||||
<if test="auditType != null ">
|
||||
and a.audit_type = #{auditType}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and a.create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and a.update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and a.organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="collectionTimeStart != null and collectionTimeEnd != null">
|
||||
AND (date_format(a.collection_time,'%Y-%m-%d') >= date_format(#{collectionTimeStart},'%Y-%m-%d')
|
||||
and date_format(a.collection_time,'%Y-%m-%d') <![CDATA[<=]]> date_format(#{collectionTimeEnd},'%Y-%m-%d'))
|
||||
</if>
|
||||
<if test="createTimeStart != null and createTimeEnd != null">
|
||||
AND (date_format(a.create_time,'%Y-%m-%d') >= date_format(#{createTimeStart},'%Y-%m-%d')
|
||||
and date_format(a.create_time,'%Y-%m-%d') <![CDATA[<=]]> date_format(#{createTimeEnd},'%Y-%m-%d'))
|
||||
</if>
|
||||
<if test="authTimeStart != null and authTimeEnd != null">
|
||||
AND (date_format(a.auth_time,'%Y-%m-%d') >= date_format(#{authTimeStart},'%Y-%m-%d')
|
||||
and date_format(a.auth_time,'%Y-%m-%d') <![CDATA[<=]]> date_format(#{authTimeEnd},'%Y-%m-%d'))
|
||||
</if>
|
||||
<if test="innerNumberList != null and innerNumberList.size > 0">
|
||||
and a.inner_number in
|
||||
<foreach item="innerNumber" collection="innerNumberList" open="(" separator="," close=")">
|
||||
#{innerNumber}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
<insert id="saveBatchReconciliationBusinessDocument">
|
||||
insert into reconciliation_business_document(business_document_id,reconciliation_id) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.businessDocumentId},#{item.reconciliationId})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="delReconciliationBusinessDocumentByReconciliationId">
|
||||
update reconciliation_business_document set del_flag = 2 where reconciliation_id = #{reconciliationId}
|
||||
</update>
|
||||
|
||||
<select id="queryList" parameterType="com.linke.finance.domain.reconciliation.repository.todo.ReconciliationDO" resultMap="ReconciliationResult">
|
||||
<include refid="selectReconciliationPo"/>
|
||||
<include refid="selectReconciliationPo1"/>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="selectBusinessByReconciliationId"
|
||||
resultType="com.linke.finance.domain.businessDocument.entity.BusinessDocument">
|
||||
SELECT
|
||||
a.*
|
||||
FROM
|
||||
business_document a
|
||||
LEFT JOIN reconciliation_business_document b ON a.business_document_id = b.business_document_id
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
and b.del_flag = 1
|
||||
AND b.reconciliation_id = #{reconciliationId}
|
||||
</select>
|
||||
|
||||
<update id="delReconciliationByInnerNumber">
|
||||
update reconciliation set del_flag = 2 where inner_number = #{innerNumber}
|
||||
</update>
|
||||
<update id="delReconciliationDetailByInnerNumber">
|
||||
update reconciliation_order_detail set del_flag = 2 where reconciliation_id = #{reconciliationId}
|
||||
</update>
|
||||
</mapper>
|
||||
+444
@@ -0,0 +1,444 @@
|
||||
<?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.revenueExpensesRecord.repository.mapper.RevenueExpensesRecordMapper">
|
||||
|
||||
<resultMap type="com.linke.finance.domain.revenueExpensesRecord.repository.po.RevenueExpensesRecordPo" id="RevenueExpensesRecordResult">
|
||||
<result property="revenueExpensesRecordId" column="revenue_expenses_record_id" />
|
||||
<result property="innerNumber" column="inner_number" />
|
||||
<result property="revenueExpensesType" column="revenue_expenses_type" />
|
||||
<result property="money" column="money" />
|
||||
<result property="firstSubject" column="first_subject" />
|
||||
<result property="secondSubject" column="second_subject" />
|
||||
<result property="firstSubjectName" column="first_subject_name" />
|
||||
<result property="secondSubjectName" column="second_subject_name" />
|
||||
<result property="firstSubjectSort" column="first_subject_sort" />
|
||||
<result property="payChannel" column="pay_channel" />
|
||||
<result property="payChannelName" column="pay_channel_name" />
|
||||
<result property="entryValue" column="entry_value" />
|
||||
<result property="dayToDayStatus" column="day_to_day_status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="bankNumber" column="bank_number" />
|
||||
<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="payType" column="pay_type" />
|
||||
<result property="expenseItem" column="expense_item" />
|
||||
<result property="payee" column="payee" />
|
||||
<result property="payId" column="pay_id" />
|
||||
<result property="payName" column="pay_name" />
|
||||
<result property="licenseNumber" column="license_number" />
|
||||
<result property="departmentId" column="department_id" />
|
||||
<result property="departmentName" column="department_name" />
|
||||
<result property="accountingReasons" column="accounting_reasons" />
|
||||
<result property="businessDocumentId" column="business_document_id" />
|
||||
<result property="businessDocumentNumber" column="business_document_number" />
|
||||
<result property="businessTypeItem" column="business_type_item" />
|
||||
<result property="accountHolderName" column="account_holder_name" />
|
||||
<result property="accountHolderBank" column="account_holder_bank" />
|
||||
<result property="bankAccount" column="bank_account" />
|
||||
<result property="oilNumber" column="oil_number" />
|
||||
<result property="voucherImages" column="voucher_images" />
|
||||
<result property="payChannel" column="pay_channel" />
|
||||
<result property="payChannelName" column="pay_channel_name" />
|
||||
|
||||
<result property="kingdee" column="kingdee" />
|
||||
<result property="kingdeeSubjectCode" column="kingdee_subject_code" />
|
||||
<result property="kingdeeSubjectName" column="kingdee_subject_name" />
|
||||
<result property="kingdeePushStatus" column="kingdee_push_status" />
|
||||
<result property="kingdeePushTime" column="kingdee_push_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRevenueExpensesRecordVo">
|
||||
SELECT
|
||||
revenue_expenses_record_id,
|
||||
inner_number,
|
||||
revenue_expenses_type,
|
||||
money,
|
||||
first_subject,
|
||||
second_subject,
|
||||
first_subject_name,
|
||||
second_subject_name,
|
||||
first_subject_sort,
|
||||
pay_channel,
|
||||
pay_channel_name,
|
||||
entry_value,
|
||||
day_to_day_status,
|
||||
remark,
|
||||
bank_number,
|
||||
create_time,
|
||||
create_by,
|
||||
create_by_name,
|
||||
update_time,
|
||||
update_by,
|
||||
update_by_name,
|
||||
del_flag,
|
||||
pay_type,
|
||||
expense_item,
|
||||
payee,pay_id,
|
||||
pay_name,
|
||||
license_number,
|
||||
department_id,
|
||||
department_name,
|
||||
accounting_reasons,
|
||||
business_document_id,
|
||||
business_document_number,
|
||||
business_type_item,
|
||||
account_holder_name,
|
||||
account_holder_bank,
|
||||
bank_account,
|
||||
oil_number,
|
||||
voucher_images,
|
||||
pay_channel,
|
||||
pay_channel_name,
|
||||
kingdee,
|
||||
kingdee_subject_code,
|
||||
kingdee_subject_name,
|
||||
kingdee_push_status,
|
||||
kingdee_push_time
|
||||
|
||||
FROM
|
||||
revenue_expenses_record
|
||||
</sql>
|
||||
<sql id="common_where">
|
||||
<if test="revenueExpensesRecordIds != null and revenueExpensesRecordIds.size > 0">
|
||||
and revenue_expenses_record_id in
|
||||
<foreach item="revenueExpensesRecordId" collection="revenueExpensesRecordIds" open="(" separator="," close=")">
|
||||
#{revenueExpensesRecordId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="departmentName != null and departmentName != ''"> and department_name like concat('%', #{departmentName}, '%')</if>
|
||||
<if test="licenseNumber != null and licenseNumber != ''"> and license_number like concat('%', #{licenseNumber}, '%')</if>
|
||||
<if test="payName != null and payName != ''"> and pay_name like concat('%', #{payName}, '%')</if>
|
||||
<if test="firstSubjectName != null and firstSubjectName != ''"> and first_subject_name like concat('%', #{firstSubjectName}, '%')</if>
|
||||
<if test="secondSubjectName != null and secondSubjectName != ''"> and second_subject_name like concat('%', #{secondSubjectName}, '%')</if>
|
||||
<if test="businessDocumentNumber != null and businessDocumentNumber != ''"> and business_document_number like concat('%', #{businessDocumentNumber}, '%')</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
|
||||
|
||||
<if test="innerNumber != null and innerNumber != ''"> and inner_number like concat('%', #{innerNumber}, '%')</if>
|
||||
<if test="revenueExpensesType != null "> and revenue_expenses_type = #{revenueExpensesType}</if>
|
||||
<if test="money != null "> and money = #{money}</if>
|
||||
<if test="firstSubject != null and firstSubject != ''"> and first_subject = #{firstSubject}</if>
|
||||
<if test="secondSubject != null and secondSubject != ''"> and second_subject = #{secondSubject}</if>
|
||||
<if test="payChannel != null and payChannel != ''"> and pay_channel = #{payChannel}</if>
|
||||
<if test="entryValue != null "> and entry_value = #{entryValue}</if>
|
||||
<if test="dayToDayStatus != null "> and day_to_day_status = #{dayToDayStatus}</if>
|
||||
<if test="bankNumber != null and bankNumber != ''"> and bank_number like concat('%', #{bankNumber}, '%')</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>
|
||||
<if test="deadlineTime != null and deadlineTime != ''">
|
||||
AND date_format(create_time,'%Y-%m-%d %H:%i:%S') <![CDATA[<=]]> #{deadlineTime}
|
||||
</if>
|
||||
<if test="moneyStart != null and moneyStart != ''">
|
||||
AND money >= #{moneyStart}
|
||||
</if>
|
||||
<if test="moneyEnd != null and moneyEnd != ''">
|
||||
AND money <![CDATA[<=]]> #{moneyEnd}
|
||||
</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>
|
||||
<choose>
|
||||
<when test="delFlag != null"> AND del_flag = #{delFlag} </when>
|
||||
<otherwise> AND del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
<if test=" revenueExpensesRecordIdList != null and revenueExpensesRecordIdList.size() > 0 ">
|
||||
AND revenue_expenses_record_id IN
|
||||
<foreach item="revenueExpensesRecordId" collection="revenueExpensesRecordIdList" open="(" separator="," close=")">
|
||||
#{revenueExpensesRecordId}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.linke.finance.domain.revenueExpensesRecord.repository.po.RevenueExpensesRecordPo" resultMap="RevenueExpensesRecordResult">
|
||||
<include refid="selectRevenueExpensesRecordVo"/>
|
||||
<where>
|
||||
<include refid="common_where"/>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="orderBy != null and orderBy != '' and sortOrder != null and sortOrder != ''"> order by ${orderBy} ${sortOrder} </when>
|
||||
<when test="orderBy != null and orderBy != '' "> order by ${orderBy} desc </when>
|
||||
<otherwise> order by create_time desc </otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="selectRevenueExpensesRecordList" parameterType="com.linke.finance.domain.revenueExpensesRecord.repository.po.RevenueExpensesRecordPo" resultMap="RevenueExpensesRecordResult">
|
||||
<include refid="selectRevenueExpensesRecordVo"/>
|
||||
<where>
|
||||
<include refid="common_where"/>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectRevenueExpensesRecordByRevenueExpensesRecordId" parameterType="java.lang.Long" resultMap="RevenueExpensesRecordResult">
|
||||
<include refid="selectRevenueExpensesRecordVo"/>
|
||||
where revenue_expenses_record_id = #{revenueExpensesRecordId} and del_flag = 1
|
||||
</select>
|
||||
|
||||
<insert id="batchAddRevenueExpensesRecord" parameterType="java.util.List">
|
||||
insert into revenue_expenses_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
branch_id,
|
||||
inner_number,
|
||||
revenue_expenses_type,
|
||||
money,
|
||||
first_subject,
|
||||
second_subject,
|
||||
first_subject_name,
|
||||
second_subject_name,
|
||||
pay_channel,
|
||||
pay_channel_name,
|
||||
entry_value,
|
||||
day_to_day_status,
|
||||
waybill_id,
|
||||
waybill_number,
|
||||
remark,
|
||||
settle_accounts_status,
|
||||
bank_number,
|
||||
waybill_source,
|
||||
waybill_source_name,
|
||||
handled_by_name,
|
||||
create_time,
|
||||
create_by,
|
||||
create_by_name,
|
||||
</trim>
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{item.branchId},
|
||||
#{item.innerNumber},
|
||||
#{item.revenueExpensesType},
|
||||
#{item.money},
|
||||
#{item.firstSubject},
|
||||
#{item.secondSubject},
|
||||
#{item.firstSubjectName},
|
||||
#{item.secondSubjectName},
|
||||
#{item.payChannel},
|
||||
#{item.payChannelName},
|
||||
#{item.entryValue},
|
||||
#{item.dayToDayStatus},
|
||||
#{item.waybillId},
|
||||
#{item.waybillNumber},
|
||||
#{item.remark},
|
||||
#{item.settleAccountsStatus},
|
||||
#{item.bankNumber},
|
||||
#{item.waybillSource},
|
||||
#{item.waybillSourceName},
|
||||
#{item.handledByName},
|
||||
#{item.createTime},
|
||||
#{item.createBy},
|
||||
#{item.createByName},
|
||||
</trim>
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<insert id="insertRevenueExpensesRecord" parameterType="com.linke.finance.domain.revenueExpensesRecord.entity.RevenueExpensesRecord" useGeneratedKeys="true" keyProperty="revenueExpensesRecordId">
|
||||
insert into revenue_expenses_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="branchId != null">branch_id,</if>
|
||||
<if test="innerNumber != null">inner_number,</if>
|
||||
<if test="revenueExpensesType != null">revenue_expenses_type,</if>
|
||||
<if test="money != null">money,</if>
|
||||
<if test="firstSubject != null">first_subject,</if>
|
||||
<if test="secondSubject != null">second_subject,</if>
|
||||
<if test="firstSubjectName != null">first_subject_name,</if>
|
||||
<if test="secondSubjectName != null">second_subject_name,</if>
|
||||
<if test="payChannel != null">pay_channel,</if>
|
||||
<if test="payChannelName != null">pay_channel_name,</if>
|
||||
<if test="entryValue != null">entry_value,</if>
|
||||
<if test="dayToDayStatus != null">day_to_day_status,</if>
|
||||
<if test="waybillId != null">waybill_id,</if>
|
||||
<if test="waybillNumber != null">waybill_number,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="settleAccountsStatus != null">settle_accounts_status,</if>
|
||||
<if test="bankNumber != null">bank_number,</if>
|
||||
<if test="waybillSource != null">waybill_source,</if>
|
||||
<if test="waybillSourceName != null">waybill_source_name,</if>
|
||||
<if test="handledByName != null">handled_by_name,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createByName != null">create_by_name,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateByName != null">update_by_name,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="branchId != null">#{branchId},</if>
|
||||
<if test="innerNumber != null">#{innerNumber},</if>
|
||||
<if test="revenueExpensesType != null">#{revenueExpensesType},</if>
|
||||
<if test="money != null">#{money},</if>
|
||||
<if test="firstSubject != null">#{firstSubject},</if>
|
||||
<if test="secondSubject != null">#{secondSubject},</if>
|
||||
<if test="firstSubjectName != null">#{firstSubjectName},</if>
|
||||
<if test="secondSubjectName != null">#{secondSubjectName},</if>
|
||||
<if test="payChannel != null">#{payChannel},</if>
|
||||
<if test="payChannelName != null">#{payChannelName},</if>
|
||||
<if test="entryValue != null">#{entryValue},</if>
|
||||
<if test="dayToDayStatus != null">#{dayToDayStatus},</if>
|
||||
<if test="waybillId != null">#{waybillId},</if>
|
||||
<if test="waybillNumber != null">#{waybillNumber},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="settleAccountsStatus != null">#{settleAccountsStatus},</if>
|
||||
<if test="bankNumber != null">#{bankNumber},</if>
|
||||
<if test="waybillSource != null">#{waybillSource},</if>
|
||||
<if test="waybillSourceName != null">#{waybillSourceName},</if>
|
||||
<if test="handledByName != null">#{handledByName},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createByName != null">#{createByName},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateByName != null">#{updateByName},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRevenueExpensesRecord" parameterType="com.linke.finance.domain.revenueExpensesRecord.entity.RevenueExpensesRecord">
|
||||
update revenue_expenses_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="branchId != null">branch_id = #{branchId},</if>
|
||||
<if test="innerNumber != null">inner_number = #{innerNumber},</if>
|
||||
<if test="revenueExpensesType != null">revenue_expenses_type = #{revenueExpensesType},</if>
|
||||
<if test="money != null">money = #{money},</if>
|
||||
<if test="firstSubject != null">first_subject = #{firstSubject},</if>
|
||||
<if test="secondSubject != null">second_subject = #{secondSubject},</if>
|
||||
<if test="firstSubjectName != null">first_subject_name = #{firstSubjectName},</if>
|
||||
<if test="secondSubjectName != null">second_subject_name = #{secondSubjectName},</if>
|
||||
<if test="payChannel != null">pay_channel = #{payChannel},</if>
|
||||
<if test="payChannelName != null">pay_channel_name = #{payChannelName},</if>
|
||||
<if test="entryValue != null">entry_value = #{entryValue},</if>
|
||||
<if test="dayToDayStatus != null">day_to_day_status = #{dayToDayStatus},</if>
|
||||
<if test="waybillId != null">waybill_id = #{waybillId},</if>
|
||||
<if test="waybillNumber != null">waybill_number = #{waybillNumber},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="settleAccountsStatus != null">settle_accounts_status = #{settleAccountsStatus},</if>
|
||||
<if test="bankNumber != null">bank_number = #{bankNumber},</if>
|
||||
<if test="waybillSource != null">waybill_source = #{waybillSource},</if>
|
||||
<if test="waybillSourceName != null">waybill_source_name = #{waybillSourceName},</if>
|
||||
<if test="handledByName != null">handled_by_name = #{handledByName},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createByName != null">create_by_name = #{createByName},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateByName != null">update_by_name = #{updateByName},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where revenue_expenses_record_id = #{revenueExpensesRecordId}
|
||||
</update>
|
||||
|
||||
<update id="updateRevenueExpensesRecords" parameterType="com.linke.finance.domain.revenueExpensesRecord.repository.po.RevenueExpensesRecordPo">
|
||||
update revenue_expenses_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="branchId != null">branch_id = #{branchId},</if>
|
||||
<if test="innerNumber != null">inner_number = #{innerNumber},</if>
|
||||
<if test="revenueExpensesType != null">revenue_expenses_type = #{revenueExpensesType},</if>
|
||||
<if test="money != null">money = #{money},</if>
|
||||
<if test="firstSubject != null">first_subject = #{firstSubject},</if>
|
||||
<if test="secondSubject != null">second_subject = #{secondSubject},</if>
|
||||
<if test="firstSubjectName != null">first_subject_name = #{firstSubjectName},</if>
|
||||
<if test="secondSubjectName != null">second_subject_name = #{secondSubjectName},</if>
|
||||
<if test="payChannel != null">pay_channel = #{payChannel},</if>
|
||||
<if test="payChannelName != null">pay_channel_name = #{payChannelName},</if>
|
||||
<if test="entryValue != null">entry_value = #{entryValue},</if>
|
||||
<if test="dayToDayStatus != null">day_to_day_status = #{dayToDayStatus},</if>
|
||||
<if test="waybillId != null">waybill_id = #{waybillId},</if>
|
||||
<if test="waybillNumber != null">waybill_number = #{waybillNumber},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="settleAccountsStatus != null">settle_accounts_status = #{settleAccountsStatus},</if>
|
||||
<if test="bankNumber != null">bank_number = #{bankNumber},</if>
|
||||
<if test="waybillSource != null">waybill_source = #{waybillSource},</if>
|
||||
<if test="waybillSourceName != null">waybill_source_name = #{waybillSourceName},</if>
|
||||
<if test="handledByName != null">handled_by_name = #{handledByName},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createByName != null">create_by_name = #{createByName},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateByName != null">update_by_name = #{updateByName},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where revenue_expenses_record_id in
|
||||
<foreach item="revenueExpensesRecordId" collection="revenueExpensesRecordIds" open="(" separator="," close=")">
|
||||
#{revenueExpensesRecordId}
|
||||
</foreach>
|
||||
</update>
|
||||
<select id="branchProfitStatistics" parameterType="com.linke.finance.domain.revenueExpensesRecord.repository.todo.RevenueExpensesRecordDO" resultType="com.linke.finance.domain.report.repository.po.BranchProfitStatisticsPO">
|
||||
SELECT
|
||||
a.branch_id,
|
||||
/** 运费合计=现付+到付+月结+回单付+扣付 */
|
||||
SUM(CASE WHEN a.first_subject = 'consignment_freight' AND a.second_subject IN ('spot_payment', 'freight_collect_payment', 'monthly_statement', 'payment_against_documents', 'withhold_payment') THEN (CASE WHEN a.revenue_expenses_type = 1 THEN a.money ELSE -a.money END) ELSE 0.00 END) AS freight_total,
|
||||
/** 异动收入 */
|
||||
SUM(CASE WHEN a.first_subject = 'variance_cost' AND a.second_subject = 'variable_income' THEN (CASE WHEN a.revenue_expenses_type = 1 THEN a.money ELSE -a.money END) ELSE 0.00 END) AS variable_income,
|
||||
/** 异常罚款 */
|
||||
SUM(CASE WHEN a.first_subject = 'anomaly_fee' AND a.second_subject = 'abnormal_penalty' THEN (CASE WHEN a.revenue_expenses_type = 1 THEN a.money ELSE -a.money END) ELSE 0.00 END) AS abnormal_penalty,
|
||||
/** 代收手续费 */
|
||||
SUM(CASE WHEN a.first_subject = 'collection_delivery' AND a.second_subject = 'service_charge' THEN (CASE WHEN a.revenue_expenses_type = 1 THEN a.money ELSE -a.money END) ELSE 0.00 END) AS service_charge,
|
||||
/** 服务费收入 */
|
||||
SUM(CASE WHEN a.first_subject = 'operating_expenses' AND a.second_subject = 'service_fee_income' THEN (CASE WHEN a.revenue_expenses_type = 1 THEN a.money ELSE -a.money END) ELSE 0.00 END) AS service_fee_income,
|
||||
/** 网点运费收入 */
|
||||
SUM(CASE WHEN a.first_subject = 'consignment_freight' AND a.second_subject = 'branch_freight_income' THEN (CASE WHEN a.revenue_expenses_type = 1 THEN a.money ELSE -a.money END) ELSE 0.00 END) AS branch_freight_income,
|
||||
/** 回扣 */
|
||||
SUM(CASE WHEN a.first_subject = 'consignment_freight' AND a.second_subject = 'kickback' THEN (CASE WHEN a.revenue_expenses_type = 1 THEN a.money ELSE -a.money END) ELSE 0.00 END) AS withhold_payment,
|
||||
/** 中转费 */
|
||||
SUM(CASE WHEN a.first_subject = 'transhipment_charges' AND a.second_subject IN ('external_transfer','internal_transfer','transfer_goods') THEN (CASE WHEN a.revenue_expenses_type = 1 THEN a.money ELSE -a.money END) ELSE 0.00 END) AS transhipment_charges,
|
||||
/** 车费合计=油卡+月结+回单付+到付+现付 */
|
||||
SUM(CASE WHEN a.first_subject = 'dispatch_fare' AND a.second_subject IN ('fuel_card','monthly_statement','payment_against_documents', 'freight_collect_payment','spot_payment') THEN (CASE WHEN a.revenue_expenses_type = 1 THEN a.money ELSE -a.money END) ELSE 0.00 END) AS total_fare,
|
||||
/** 异动支出 */
|
||||
SUM(CASE WHEN a.first_subject = 'variance_cost' AND a.second_subject = 'abnormal_expenditure' THEN (CASE WHEN a.revenue_expenses_type = 1 THEN a.money ELSE -a.money END) ELSE 0.00 END) AS abnormal_expenditure,
|
||||
/** 异常赔偿 */
|
||||
SUM(CASE WHEN a.first_subject = 'anomaly_fee' AND a.second_subject = 'abnormal_compensation' THEN (CASE WHEN a.revenue_expenses_type = 1 THEN a.money ELSE -a.money END) ELSE 0.00 END) AS abnormal_compensation,
|
||||
/** 服务费支出 */
|
||||
SUM(CASE WHEN a.first_subject = 'operating_expenses' AND a.second_subject = 'service_fee_expenditure' THEN (CASE WHEN a.revenue_expenses_type = 1 THEN a.money ELSE -a.money END) ELSE 0.00 END) AS service_fee_expenditure,
|
||||
/** 网点运费支出 */
|
||||
SUM(CASE WHEN a.first_subject = 'consignment_freight' AND a.second_subject = 'branch_freight_expenditure' THEN (CASE WHEN a.revenue_expenses_type = 1 THEN a.money ELSE -a.money END) ELSE 0.00 END) AS branch_freight_expenditure
|
||||
FROM
|
||||
revenue_expenses_record a
|
||||
<where>
|
||||
<if test="branchId != null and branchId != '' "> AND a.branch_id = #{branchId}</if>
|
||||
<if test="branchIdList != null and branchIdList.size() > 0 ">
|
||||
AND a.branch_id IN
|
||||
<foreach collection="branchIdList" item="branchId" index="index" open="(" separator="," close=")">
|
||||
#{branchId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="createTimeStart != null and createTimeStart != ''">
|
||||
AND date_format(a.create_time,'%Y-%m-%d') >= #{createTimeStart}
|
||||
</if>
|
||||
<if test="createTimeEnd != null and createTimeEnd != ''">
|
||||
AND date_format(a.create_time,'%Y-%m-%d') <= #{createTimeEnd}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and a.del_flag = #{delFlag}</when>
|
||||
<otherwise> and a.del_flag = 1</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
GROUP BY
|
||||
a.branch_id
|
||||
ORDER BY
|
||||
a.create_time DESC, a.revenue_expenses_record_id DESC
|
||||
</select>
|
||||
|
||||
<delete id="deleteRevenueExpensesRecordByRevenueExpensesRecordId" parameterType="java.lang.Long">
|
||||
delete from revenue_expenses_record where revenue_expenses_record_id = #{revenueExpensesRecordId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRevenueExpensesRecordByRevenueExpensesRecordIds" parameterType="java.lang.String">
|
||||
delete from revenue_expenses_record where revenue_expenses_record_id in
|
||||
<foreach item="revenueExpensesRecordId" collection="array" open="(" separator="," close=")">
|
||||
#{revenueExpensesRecordId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,152 @@
|
||||
<?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.serviceBill.repository.mapper.ServiceBillMapper">
|
||||
|
||||
<resultMap type="com.linke.finance.domain.serviceBill.repository.po.ServiceBillPO" id="ServiceBillResult">
|
||||
<result property="serviceBillId" column="service_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="billStatus" column="bill_status" />
|
||||
<result property="billCode" column="bill_code" />
|
||||
<result property="associationOrderId" column="association_order_id" />
|
||||
<result property="associationOrderCode" column="association_order_code" />
|
||||
<result property="associationOrderStatus" column="association_order_status" />
|
||||
<result property="serviceFeeRules" column="service_fee_rules" />
|
||||
<result property="serviceFeeOrder" column="service_fee_order" />
|
||||
<result property="serviceFee" column="service_fee" />
|
||||
<result property="freight" column="freight" />
|
||||
<result property="billingTime" column="billing_time" />
|
||||
<result property="signTime" column="sign_time" />
|
||||
<result property="reportTime" column="report_time" />
|
||||
<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" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectServiceBillPo">
|
||||
select service_bill_id, top_organization_id, organization_id, organization_name, branch_in_id, branch_in_name, branch_out_id, branch_out_name, bill_status, bill_code, association_order_id, association_order_code, association_order_status, service_fee_rules, service_fee_order, service_fee, freight, billing_time, sign_time, report_time, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from service_bill
|
||||
</sql>
|
||||
|
||||
<sql id="selectServiceBillPo1">
|
||||
<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="billStatus != null and billStatus != '' ">
|
||||
and bill_status = #{billStatus}
|
||||
</if>
|
||||
<if test="billCode != null and billCode != ''">
|
||||
and bill_code = #{billCode}
|
||||
</if>
|
||||
<if test="associationOrderCode != null and associationOrderCode != ''">
|
||||
and association_order_code = #{associationOrderCode}
|
||||
</if>
|
||||
<if test="associationOrderStatus != null and associationOrderStatus != ''">
|
||||
and association_order_status = #{associationOrderStatus}
|
||||
</if>
|
||||
<if test="serviceFeeRules != null ">
|
||||
and service_fee_rules = #{serviceFeeRules}
|
||||
</if>
|
||||
<if test="billingTime != null ">
|
||||
and billing_time = #{billingTime}
|
||||
</if>
|
||||
<if test="signTime != null ">
|
||||
and sign_time = #{signTime}
|
||||
</if>
|
||||
<if test="reportTime != null ">
|
||||
and report_time = #{reportTime}
|
||||
</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="billingTimeStart != null and billingTimeStart != '' ">
|
||||
AND date_format(billing_time,'%Y-%m-%d') >= #{billingTimeStart}
|
||||
</if>
|
||||
<if test="billingTimeEnd != null and billingTimeEnd != ''">
|
||||
AND date_format(billing_time,'%Y-%m-%d') <= #{billingTimeEnd}
|
||||
</if>
|
||||
<if test="signTimeStart != null and signTimeStart != ''">
|
||||
AND date_format(sign_time,'%Y-%m-%d') >= #{signTimeStart}
|
||||
</if>
|
||||
<if test="signTimeEnd != null and signTimeEnd != ''">
|
||||
AND date_format(sign_time,'%Y-%m-%d') <= #{signTimeEnd}
|
||||
</if>
|
||||
<if test="reportTimeStart != null and reportTimeStart != ''">
|
||||
AND date_format(report_time,'%Y-%m-%d') >= #{signTimeStart}
|
||||
</if>
|
||||
<if test="reportTimeEnd != null and reportTimeEnd != ''">
|
||||
AND date_format(report_time,'%Y-%m-%d') <= #{signTimeEnd}
|
||||
</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.serviceBill.repository.todo.ServiceBillDO" resultMap="ServiceBillResult">
|
||||
<include refid="selectServiceBillPo"/>
|
||||
<include refid="selectServiceBillPo1"/>
|
||||
order by billing_time desc
|
||||
</select>
|
||||
|
||||
<select id="countTabTotal" parameterType="com.linke.finance.domain.serviceBill.repository.todo.ServiceBillDO" resultMap="ServiceBillResult">
|
||||
SELECT
|
||||
(
|
||||
SELECT COUNT(*) FROM service_bill
|
||||
WHERE del_flag = 1
|
||||
<if test="branchInId != null ">
|
||||
and branch_in_id = #{branchInId}
|
||||
</if>
|
||||
) branch_in_num,
|
||||
(
|
||||
SELECT COUNT(*) FROM service_bill
|
||||
WHERE del_flag = 1
|
||||
<if test="branchOutId != null ">
|
||||
AND branch_out_id = #{branchOutId}
|
||||
</if>
|
||||
) branch_out_num
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?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.tmsReceipt.repository.mapper.TmsReceiptMapper">
|
||||
|
||||
<resultMap type="com.linke.finance.domain.tmsReceipt.repository.po.TmsReceiptPO" id="TmsReceiptResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="receivePaymentNumber" column="receive_payment_number" />
|
||||
<!--<result property="settlementPartyId" column="settlement_party_id" />-->
|
||||
<result property="settlementPartyName" column="settlement_party_name" />
|
||||
<result property="departmentName" column="department_name" />
|
||||
<!--<result property="settlementPartyType" column="settlement_party_type" />-->
|
||||
<result property="receivePaymentAmount" column="receive_payment_amount" />
|
||||
<result property="receivePaymentTime" column="receive_payment_time" />
|
||||
<result property="receiveVoucherUrl" column="receive_voucher_url" />
|
||||
|
||||
<result property="assignableAmount" column="assignable_amount" />
|
||||
<result property="assignmentStatus" column="assignment_status" />
|
||||
<result property="creditAmount" column="credit_amount" />
|
||||
<result property="creditReason" column="credit_reason" />
|
||||
<result property="serialNumber" column="serial_number" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectTmsReceiptPo">
|
||||
select id, top_organization_id,organization_id,organization_name,department_name,settlement_party_name,receive_payment_number, receive_payment_amount,
|
||||
assignable_amount,assignment_status,credit_amount,credit_reason, receive_payment_time, serial_number,receive_voucher_url,
|
||||
remark, create_by,create_by_name, create_time, update_by,update_by_name, update_time, del_flag from tms_receipt
|
||||
</sql>
|
||||
|
||||
<sql id="selectTmsReceiptPo1">
|
||||
<where>
|
||||
and del_flag = 1
|
||||
<if test="assignmentStatus != null and assignmentStatus > -1">
|
||||
and assignment_status = #{assignmentStatus}
|
||||
</if>
|
||||
<if test="greaterThanAssignmentStatus != null and greaterThanAssignmentStatus > -1">
|
||||
and assignment_status > #{greaterThanAssignmentStatus}
|
||||
</if>
|
||||
<if test="assignableStatusIn != null and assignableStatusIn > -1">
|
||||
and assignment_status in (0,1)
|
||||
</if>
|
||||
<if test="receivePaymentTimeStart != null and receivePaymentTimeStart != ''">
|
||||
AND date_format(receive_payment_time,'%Y-%m-%d') >= #{receivePaymentTimeStart}
|
||||
</if>
|
||||
<if test="receivePaymentTimeEnd != null and receivePaymentTimeEnd != ''">
|
||||
AND date_format(receive_payment_time,'%Y-%m-%d') <= #{receivePaymentTimeEnd}
|
||||
</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') <= #{createTimeEnd}
|
||||
</if>
|
||||
|
||||
<if test="receivePaymentNumber != null and receivePaymentNumber != ''">
|
||||
and receive_payment_number = #{receivePaymentNumber}
|
||||
</if>
|
||||
<!-- <if test="settlementPartyId != null and settlementPartyId != ''">
|
||||
and settlement_party_id = #{settlementPartyId}
|
||||
</if>-->
|
||||
<if test="settlementPartyName != null and settlementPartyName != ''">
|
||||
and settlement_party_name = #{settlementPartyName}
|
||||
</if>
|
||||
<if test="departmentName != null and departmentName != ''">
|
||||
and department_name LIKE CONCAT('%', #{departmentName},'%')
|
||||
</if>
|
||||
<if test="receivePaymentAmount != null ">
|
||||
and receive_payment_amount = #{receivePaymentAmount}
|
||||
</if>
|
||||
<if test="receivePaymentTime != null ">
|
||||
and receive_payment_time = #{receivePaymentTime}
|
||||
</if>
|
||||
<if test="serialNumber != null and serialNumber != ''">
|
||||
and serial_number = #{serialNumber}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name = #{createByName}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark = #{remark}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.linke.finance.domain.tmsReceipt.repository.todo.TmsReceiptDO" resultMap="TmsReceiptResult">
|
||||
<include refid="selectTmsReceiptPo"/>
|
||||
<include refid="selectTmsReceiptPo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
File diff suppressed because it is too large
Load Diff
+156
@@ -0,0 +1,156 @@
|
||||
<?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.withdrawApplication.repository.mapper.WithdrawApplicationMapper">
|
||||
|
||||
<resultMap type="com.linke.finance.domain.withdrawApplication.repository.po.WithdrawApplicationPO" id="WithdrawApplicationResult">
|
||||
<result property="withdrawApplicationId" column="withdraw_application_id" />
|
||||
<result property="serialNumber" column="serial_number" />
|
||||
<result property="applicantId" column="applicant_id" />
|
||||
<result property="applicantName" column="applicant_name" />
|
||||
<result property="applicantPhone" column="applicant_phone" />
|
||||
<result property="applicantLicenseNumber" column="applicant_license_number" />
|
||||
<result property="applyTime" column="apply_time" />
|
||||
<result property="applyAmount" column="apply_amount" />
|
||||
<result property="applicationStatus" column="application_status" />
|
||||
<result property="payBatchNumber" column="pay_batch_number" />
|
||||
<result property="bankCardId" column="bank_card_id" />
|
||||
<result property="bankName" column="bank_name" />
|
||||
<result property="accountOwnerName" column="account_owner_name" />
|
||||
<result property="bankCardNumber" column="bank_card_number" />
|
||||
<result property="bindingPhone" column="binding_phone" />
|
||||
<result property="transferTime" column="transfer_time" />
|
||||
<result property="transferById" column="transfer_by_id" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="arriveAccountTime" column="arrive_account_time" />
|
||||
<result property="transferType" column="transfer_type" />
|
||||
<result property="withdrawPeopleType" column="withdraw_people_type" />
|
||||
<result property="paymentMethod" column="payment_method" />
|
||||
<result property="isPush" column="is_push" />
|
||||
<result property="tmsTransportId" column="tms_transport_id" />
|
||||
<result property="cnsmrSeqNo" column="cnsmr_seq_no" />
|
||||
<result property="failureReason" column="failure_reason" />
|
||||
<result property="type" column="type" />
|
||||
<result property="withdrawApplicationType" column="withdraw_application_type" />
|
||||
<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="topOrganizationId" column="top_organization_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectWithdrawApplicationPo">
|
||||
select withdraw_application_id, serial_number, applicant_id, applicant_name, applicant_phone, applicant_license_number, apply_time, apply_amount, application_status, pay_batch_number, bank_card_id, bank_name, account_owner_name, bank_card_number, binding_phone, transfer_time, transfer_by_id, remark, arrive_account_time, transfer_type, withdraw_people_type, payment_method, is_push, tms_transport_id, cnsmr_seq_no, failure_reason, type, withdraw_application_type, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag, top_organization_id, organization_id, organization_name from withdraw_application
|
||||
</sql>
|
||||
|
||||
<sql id="selectWithdrawApplicationPo1">
|
||||
<where>
|
||||
<if test="serialNumber != null and serialNumber != ''">
|
||||
and serial_number = #{serialNumber}
|
||||
</if>
|
||||
<if test="applicantId != null ">
|
||||
and applicant_id = #{applicantId}
|
||||
</if>
|
||||
<if test="applicantName != null and applicantName != ''">
|
||||
and applicant_name like concat('%', #{applicantName}, '%')
|
||||
</if>
|
||||
<if test="applicantPhone != null and applicantPhone != ''">
|
||||
and applicant_phone = #{applicantPhone}
|
||||
</if>
|
||||
<if test="applicantLicenseNumber != null and applicantLicenseNumber != ''">
|
||||
and applicant_license_number = #{applicantLicenseNumber}
|
||||
</if>
|
||||
<if test="applyTime != null ">
|
||||
and apply_time = #{applyTime}
|
||||
</if>
|
||||
<if test="applyAmount != null ">
|
||||
and apply_amount = #{applyAmount}
|
||||
</if>
|
||||
<if test="applicationStatus != null ">
|
||||
and application_status = #{applicationStatus}
|
||||
</if>
|
||||
<if test="payBatchNumber != null and payBatchNumber != ''">
|
||||
and pay_batch_number = #{payBatchNumber}
|
||||
</if>
|
||||
<if test="bankCardId != null ">
|
||||
and bank_card_id = #{bankCardId}
|
||||
</if>
|
||||
<if test="bankName != null and bankName != ''">
|
||||
and bank_name like concat('%', #{bankName}, '%')
|
||||
</if>
|
||||
<if test="accountOwnerName != null and accountOwnerName != ''">
|
||||
and account_owner_name like concat('%', #{accountOwnerName}, '%')
|
||||
</if>
|
||||
<if test="bankCardNumber != null and bankCardNumber != ''">
|
||||
and bank_card_number = #{bankCardNumber}
|
||||
</if>
|
||||
<if test="bindingPhone != null and bindingPhone != ''">
|
||||
and binding_phone = #{bindingPhone}
|
||||
</if>
|
||||
<if test="transferTime != null ">
|
||||
and transfer_time = #{transferTime}
|
||||
</if>
|
||||
<if test="transferById != null ">
|
||||
and transfer_by_id = #{transferById}
|
||||
</if>
|
||||
<if test="arriveAccountTime != null ">
|
||||
and arrive_account_time = #{arriveAccountTime}
|
||||
</if>
|
||||
<if test="transferType != null ">
|
||||
and transfer_type = #{transferType}
|
||||
</if>
|
||||
<if test="withdrawPeopleType != null ">
|
||||
and withdraw_people_type = #{withdrawPeopleType}
|
||||
</if>
|
||||
<if test="paymentMethod != null ">
|
||||
and payment_method = #{paymentMethod}
|
||||
</if>
|
||||
<if test="isPush != null ">
|
||||
and is_push = #{isPush}
|
||||
</if>
|
||||
<if test="tmsTransportId != null and tmsTransportId != ''">
|
||||
and tms_transport_id = #{tmsTransportId}
|
||||
</if>
|
||||
<if test="cnsmrSeqNo != null and cnsmrSeqNo != ''">
|
||||
and cnsmr_seq_no = #{cnsmrSeqNo}
|
||||
</if>
|
||||
<if test="failureReason != null and failureReason != ''">
|
||||
and failure_reason = #{failureReason}
|
||||
</if>
|
||||
<if test="type != null ">
|
||||
and type = #{type}
|
||||
</if>
|
||||
<if test="withdrawApplicationType != null ">
|
||||
and withdraw_application_type = #{withdrawApplicationType}
|
||||
</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="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>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.linke.finance.domain.withdrawApplication.repository.todo.WithdrawApplicationDO" resultMap="WithdrawApplicationResult">
|
||||
<include refid="selectWithdrawApplicationPo"/>
|
||||
<include refid="selectWithdrawApplicationPo1"/>
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user