集成bms服务模块

This commit is contained in:
hjx
2026-02-09 14:41:55 +08:00
parent 5d89fdc0a6
commit 7ab77cfbf7
267 changed files with 27070 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
server:
port: 8019
management:
metrics:
web:
server:
auto-time-requests: false # 关闭自动检测
spring:
application:
name: mhd-bms-service
profiles:
active: dev
main:
allow-circular-references: true
# nacos配置
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
# 锁定server端的配置文件(读取它的配置项)
namespace: # 命名空间id
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
file-extension: yml #默认properties
# 开启nacos自动刷新,如果这个配置没有或者为false会导致配置不能自动刷新
# 允许nacos服务端向本地同步配置
enable-remote-sync-config: true
refresh-enabled: true
@@ -0,0 +1,31 @@
<?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.mhd.bms.domain.billManage.repository.mapper.BillDetailMapper">
<select id="getDetailsByBillManageId" resultType="com.mhd.bms.domain.billManage.repository.po.BillDetailPO" parameterType="java.lang.Long">
SELECT
bd.*,
bs.settlement_entity,
bs.settlement_customers_code,
bs.business_date,
bs.cycle_begin_time,
bs.cycle_end_time,
bs.service_items_code,
bs.service_items_name,
bs.first_subject_code,
bs.first_subject_name,
bs.second_subject_code,
bs.second_subject_name
FROM
bill_detail bd
LEFT JOIN billing_statement bs ON bd.billing_statement_id = bs.billing_statement_id
WHERE
bd.del_flag = 1
AND bd.bill_manage_id = #{billManageId}
</select>
</mapper>
@@ -0,0 +1,76 @@
<?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.mhd.bms.domain.billManage.repository.mapper.BillManageMapper">
<select id="queryList" parameterType="com.mhd.bms.domain.billManage.repository.todo.BillManageDO" resultType="com.mhd.bms.domain.billManage.repository.po.BillManagePO">
select
*
from bill_manage
where del_flag = 1
<include refid="common_where"/>
ORDER BY create_time DESC
</select>
<sql id="common_where">
<if test="billManageDO.createTimeStart != null and billManageDO.createTimeStart != ''">
AND date_format(create_time,'%Y-%m-%d') <![CDATA[>=]]> #{billManageDO.createTimeStart}
</if>
<if test="billManageDO.createTimeEnd != null and billManageDO.createTimeEnd != ''">
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> #{billManageDO.createTimeEnd}
</if>
<if test="billManageDO.createByName != null and billManageDO.createByName != ''">
AND create_by_name like concat('%', #{billManageDO.createByName}, '%')
</if>
<if test="billManageDO.topOrganizationId != null and billManageDO.topOrganizationId != ''">
AND top_organization_id = #{billManageDO.topOrganizationId}
</if>
<if test="billManageDO.updateTimeStart != null and billManageDO.updateTimeStart != ''">
AND date_format(update_time,'%Y-%m-%d') <![CDATA[>=]]> #{billManageDO.updateTimeStart}
</if>
<if test="billManageDO.updateTimeEnd != null and billManageDO.updateTimeEnd != ''">
AND date_format(update_time,'%Y-%m-%d') <![CDATA[<=]]> #{billManageDO.updateTimeEnd}
</if>
<if test="billManageDO.updateByName != null and billManageDO.updateByName != ''">
AND update_by_name like concat('%', #{billManageDO.updateByName}, '%')
</if>
<if test="billManageDO.billNumber != null and billManageDO.billNumber != ''">
AND bill_number like concat('%', #{billManageDO.billNumber}, '%')
</if>
<if test="billManageDO.belongModule != null and billManageDO.belongModule != ''">
AND belong_module like concat('%', #{billManageDO.belongModule}, '%')
</if>
<if test="billManageDO.settlementEntity != null and billManageDO.settlementEntity != ''">
AND settlement_entity like concat('%', #{billManageDO.settlementEntity}, '%')
</if>
<if test="billManageDO.billState != null">
AND bill_state = #{billManageDO.billState}
</if>
<if test="billManageDO.reconciliationStatus != null">
AND reconciliation_status = #{billManageDO.reconciliationStatus}
</if>
<if test="billManageDO.billType != null">
AND bill_type = #{billManageDO.billType}
</if>
<if test="billManageDO.queryParam != null and billManageDO.queryParam == 1">
AND bill_state <![CDATA[<]]> 5
</if>
<if test="billManageDO.queryParam != null and billManageDO.queryParam == 2">
AND bill_state = 5
</if>
<if test="billManageDO.queryParam != null and billManageDO.queryParam == 3">
AND bill_state = 6
</if>
<if test="billManageDO.billManageIdSet != null and billManageDO.billManageIdSet.size() > 0">
and bill_manage_id in
<foreach item="id" collection="billManageDO.billManageIdSet" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</sql>
</mapper>
@@ -0,0 +1,67 @@
<?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.mhd.bms.domain.billOperationLog.repository.mapper.BillOperationLogMapper">
<sql id="selectBillOperationLogPo">
select * from bill_operation_log
</sql>
<sql id="selectBillOperationLogPo1">
<where>
<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>
<if test="billManageId != null ">
and bill_manage_id = #{billManageId}
</if>
<if test="billNumber != null and billNumber != ''">
and bill_number = #{billNumber}
</if>
<if test="operationType != null ">
and operation_type = #{operationType}
</if>
<if test="operationInfo != null and operationInfo != ''">
and operation_info = #{operationInfo}
</if>
<if test="operator != null and operator != ''">
and operator = #{operator}
</if>
<if test="operationTime != null ">
and operation_time = #{operationTime}
</if>
</where>
</sql>
<select id="queryList" parameterType="com.mhd.bms.domain.billOperationLog.repository.todo.BillOperationLogDO"
resultType="com.mhd.bms.domain.billOperationLog.repository.po.BillOperationLogPO">
<include refid="selectBillOperationLogPo"/>
<include refid="selectBillOperationLogPo1"/>
</select>
<select id="getDetailsById" resultType="com.mhd.bms.domain.billOperationLog.repository.po.BillOperationLogPO" parameterType="java.lang.Long">
SELECT
*
FROM
bill_operation_log
WHERE
del_flag = 1
AND bill_manage_id = #{billManageIds}
ORDER BY create_time ASC
</select>
</mapper>
@@ -0,0 +1,82 @@
<?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.mhd.bms.domain.billingRules.repository.mapper.BillingParamsMapper">
<resultMap type="com.mhd.bms.domain.billingRules.repository.po.BillingParamsPO" id="BillingParamsResult">
<result property="billingParamsId" column="billing_params_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="topOrganizationId" column="top_organization_id" />
<result property="organizationId" column="organization_id" />
<result property="organizationName" column="organization_name" />
<result property="billingParamsName" column="billing_params_name" />
<result property="billingIllustrate" column="billing_illustrate" />
<result property="billingParamsJson" column="billing_params_json" />
<result property="billingOutputJson" column="billing_output_json" />
<result property="preSetRules" column="pre_set_rules" />
</resultMap>
<sql id="selectBillingParamsPo">
select billing_params_id, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag, top_organization_id, organization_id, organization_name, billing_params_name, billing_illustrate, billing_params_json, billing_output_json, pre_set_rules from billing_params
</sql>
<sql id="selectBillingParamsPo1">
<where>
<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>
<if test="billingParamsName != null and billingParamsName != ''">
and billing_params_name like concat('%', #{billingParamsName}, '%')
</if>
<if test="billingIllustrate != null and billingIllustrate != ''">
and billing_illustrate = #{billingIllustrate}
</if>
<if test="billingParamsJson != null and billingParamsJson != ''">
and billing_params_json = #{billingParamsJson}
</if>
<if test="billingOutputJson != null and billingOutputJson != ''">
and billing_output_json = #{billingOutputJson}
</if>
<if test="preSetRules != null and preSetRules != ''">
and pre_set_rules = #{preSetRules}
</if>
</where>
</sql>
<select id="queryList" parameterType="com.mhd.bms.domain.billingRules.repository.todo.BillingParamsDO" resultMap="BillingParamsResult">
<include refid="selectBillingParamsPo"/>
<include refid="selectBillingParamsPo1"/>
</select>
<select id="queryListByRulesId" resultType="com.mhd.bms.domain.billingRules.repository.po.BillingParamsPO" parameterType="java.lang.Long">
SELECT
*
FROM
billing_params
WHERE
del_flag = 1
AND billing_rules_id = #{billingRulesId}
</select>
</mapper>
@@ -0,0 +1,105 @@
<?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.mhd.bms.domain.billingRules.repository.mapper.BillingRulesMapper">
<sql id="selectBillingRulesPo1">
<where>
<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>
<if test="serviceItemsCode != null and serviceItemsCode != ''">
and service_items_code = #{serviceItemsCode}
</if>
<if test="serviceItemsName != null and serviceItemsName != ''">
and service_items_name like concat('%', #{serviceItemsName}, '%')
</if>
<if test="firstSubjectCode != null and firstSubjectCode != ''">
and first_subject_code = #{firstSubjectCode}
</if>
<if test="firstSubjectName != null and firstSubjectName != ''">
and first_subject_name like concat('%', #{firstSubjectName}, '%')
</if>
<if test="secondSubjectCode != null and secondSubjectCode != ''">
and second_subject_code = #{secondSubjectCode}
</if>
<if test="secondSubjectName != null and secondSubjectName != ''">
and second_subject_name like concat('%', #{secondSubjectName}, '%')
</if>
<if test="documentTypeCode != null and documentTypeCode != ''">
and document_type_code = #{documentTypeCode}
</if>
<if test="documentType != null and documentType != ''">
and document_type = #{documentType}
</if>
<if test="billingRulesIllustrate != null and billingRulesIllustrate != ''">
and billing_rules_illustrate = #{billingRulesIllustrate}
</if>
<if test="billingRulesState != null ">
and billing_rules_state = #{billingRulesState}
</if>
<if test="billingParamsId != null and billingParamsId != ''">
and billing_params_id = #{billingParamsId}
</if>
<if test="billingFormula != null and billingFormula != ''">
and billing_formula = #{billingFormula}
</if>
</where>
</sql>
<select id="queryList" parameterType="com.mhd.bms.domain.billingRules.repository.todo.BillingRulesDO"
resultType="com.mhd.bms.domain.billingRules.repository.po.BillingRulesPO">
select
*
from billing_rules
where del_flag = 1
<include refid="common_where"/>
</select>
<sql id="common_where">
<if test="billingRulesDO.topOrganizationId != null ">
and top_organization_id = #{billingRulesDO.topOrganizationId}
</if>
<if test="billingRulesDO.billingRulesCode != null and billingRulesDO.billingRulesCode != ''">
and billing_rules_code like concat('%',#{billingRulesDO.billingRulesCode},'%')
</if>
<if test="billingRulesDO.billingRulesName != null and billingRulesDO.billingRulesName != ''">
and billing_rules_name like concat('%',#{billingRulesDO.billingRulesName},'%')
</if>
<if test="billingRulesDO.documentTypeCode != null and billingRulesDO.documentTypeCode != ''">
and document_type_code = #{billingRulesDO.documentTypeCode}
</if>
<if test="billingRulesDO.serviceItemsCode != null and billingRulesDO.serviceItemsCode != ''">
and service_items_code = #{billingRulesDO.serviceItemsCode}
</if>
<if test="billingRulesDO.billingRulesState != null">
and billing_rules_state = #{billingRulesDO.billingRulesState}
</if>
<if test="billingRulesDO.createTimeStart != null and billingRulesDO.createTimeStart != ''">
AND date_format(create_time,'%Y-%m-%d') <![CDATA[>=]]> #{billingRulesDO.createTimeStart}
</if>
<if test="billingRulesDO.createTimeEnd != null and billingRulesDO.createTimeEnd != ''">
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> #{billingRulesDO.createTimeEnd}
</if>
<if test="billingRulesDO.createByName != null and billingRulesDO.createByName != ''">
AND create_by_name like concat('%', #{billingRulesDO.createByName}, '%')
</if>
</sql>
</mapper>
@@ -0,0 +1,257 @@
<?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.mhd.bms.domain.billingStatement.repository.mapper.BillingStatementMapper">
<select id="queryList" parameterType="com.mhd.bms.domain.billingStatement.repository.todo.BillingStatementDO"
resultType="com.mhd.bms.domain.billingStatement.repository.po.BillingStatementPO">
select
*
from billing_statement
where del_flag = 1
<include refid="common_where"/>
ORDER BY create_time DESC
</select>
<select id="queryPaymentOutList" resultType="com.mhd.bms.domain.billingStatement.repository.po.BillingStatementPO" parameterType="com.mhd.bms.domain.billingStatement.repository.todo.BillingStatementDO">
SELECT
billing_statement_id,
billing_flow,
top_organization_id,
organization_id,
organization_name,
settlement_customers_id,
settlement_customers_code,
settlement_entity,
account_expense_type,
belong_module_code,
belong_module,
billing_amount
FROM
billing_statement
WHERE
del_flag = 1
<include refid="common_where_two"></include>
</select>
<select id="queryCollectList"
resultType="com.mhd.bms.domain.billingStatement.repository.po.BillingStatementCollectPO">
select
SUM( IF(account_expense_type=1,billing_amount,0)) receivable,
SUM( IF(account_expense_type=2,billing_amount,0)) feesPayable,
GROUP_CONCAT(billing_state) AS billingStateCount,
settlement_entity,settlement_customers_code,SUM(billing_amount) bill_amount_sum,account_expense_type,COUNT(settlement_customers_code) count_fee,MIN(business_date) business_start_date ,MAX(business_date) business_end_date,organization_name,top_organization_id,billing_state,update_by_name,update_by,update_time,create_by_name,create_by,create_time
from billing_statement
where del_flag = 1
<include refid="collect_where"/>
group by settlement_customers_code
having 1
<include refid="having_collect"/>
</select>
<select id="queryDetails"
resultType="com.mhd.bms.domain.billingStatement.repository.po.BillingStatementPO">
select
*
from billing_statement
where del_flag = 1
<include refid="common_where_details"></include>
</select>
<sql id="common_where_details">
<if test="bdo.settlementCustomersCode != null and bdo.settlementCustomersCode != ''">
and settlement_customers_code = #{bdo.settlementCustomersCode}
</if>
<if test="bdo.billingState != null and bdo.billingState == 1">
and (billing_state = 1 or billing_state = 2)
</if>
<if test="bdo.billingState != null and bdo.billingState == 2">
and billing_state = 3
</if>
<if test="bdo.billingState == null or bdo.billingState == ''">
and billing_state <![CDATA[<]]> 4
</if>
</sql>
<select id="getDetailsByManageId" resultType="com.mhd.bms.domain.billingStatement.repository.po.BillingStatementPO" parameterType="java.lang.Long">
SELECT
a.*,
b.billing_amount AS billingAmount,
b.billing_total_amount,
b.billing_discount_amount
FROM
billing_statement a
LEFT JOIN bill_detail b ON a.billing_statement_id = b.billing_statement_id
LEFT JOIN bill_manage c ON b.bill_manage_id = c.bill_manage_id
WHERE
a.del_flag = 1
AND c.bill_manage_id = #{billManageId}
GROUP BY
a.billing_statement_id
</select>
<sql id="common_where">
<if test="billingStatementDO.createTimeStart != null and billingStatementDO.createTimeStart != ''">
AND date_format(create_time,'%Y-%m-%d') <![CDATA[>=]]> #{billingStatementDO.createTimeStart}
</if>
<if test="billingStatementDO.createTimeEnd != null and billingStatementDO.createTimeEnd != ''">
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> #{billingStatementDO.createTimeEnd}
</if>
<if test="billingStatementDO.createByName != null and billingStatementDO.createByName != ''">
AND create_by_name like concat('%', #{billingStatementDO.createByName}, '%')
</if>
<if test="billingStatementDO.topOrganizationId != null and billingStatementDO.topOrganizationId != ''">
AND top_organization_id = #{billingStatementDO.topOrganizationId}
</if>
<if test="billingStatementDO.updateTimeStart != null and billingStatementDO.updateTimeStart != ''">
AND date_format(update_time,'%Y-%m-%d') <![CDATA[>=]]> #{billingStatementDO.updateTimeStart}
</if>
<if test="billingStatementDO.updateTimeEnd != null and billingStatementDO.updateTimeEnd != ''">
AND date_format(update_time,'%Y-%m-%d') <![CDATA[<=]]> #{billingStatementDO.updateTimeEnd}
</if>
<if test="billingStatementDO.updateByName != null and billingStatementDO.updateByName != ''">
AND update_by_name like concat('%', #{billingStatementDO.updateByName}, '%')
</if>
<if test="billingStatementDO.billingFlow != null and billingStatementDO.billingFlow != ''">
AND billing_flow like concat('%', #{billingStatementDO.billingFlow}, '%')
</if>
<if test="billingStatementDO.settlementEntity != null and billingStatementDO.settlementEntity != ''">
AND settlement_entity like concat('%', #{billingStatementDO.settlementEntity}, '%')
</if>
<if test="billingStatementDO.secondSubjectName != null and billingStatementDO.secondSubjectName != ''">
AND( first_subject_name like concat('%', #{billingStatementDO.secondSubjectName}, '%')
OR second_subject_name like concat('%', #{billingStatementDO.secondSubjectName}, '%') )
</if>
<if test="billingStatementDO.serviceItemsName != null and billingStatementDO.serviceItemsName != ''">
AND service_items_name like concat('%', #{billingStatementDO.serviceItemsName}, '%')
</if>
<if test="billingStatementDO.accountExpenseType != null">
AND account_expense_type = #{billingStatementDO.accountExpenseType}
</if>
<if test="billingStatementDO.settlementCustomersCode != null">
AND settlement_customers_code = #{billingStatementDO.settlementCustomersCode}
</if>
<if test="billingStatementDO.belongModuleCode != null">
AND belong_module_code = #{billingStatementDO.belongModuleCode}
</if>
<if test="billingStatementDO.cycleBeginTime != null and billingStatementDO.cycleEndTime != null">
AND date_format(cycle_end_time,'%Y-%m-%d') <![CDATA[<=]]> #{billingStatementDO.cycleEndTime}
AND date_format(cycle_begin_time,'%Y-%m-%d') <![CDATA[>=]]> #{billingStatementDO.cycleBeginTime}
</if>
<if test="billingStatementDO.billingState != null">
AND billing_state = #{billingStatementDO.billingState}
</if>
<if test="billingStatementDO.redFlushState != null">
AND red_flush_state = #{billingStatementDO.redFlushState}
</if>
<if test="billingStatementDO.belongModule != null and billingStatementDO.belongModule != ''">
AND belong_module like concat('%', #{billingStatementDO.belongModule}, '%')
</if>
<if test="billingStatementDO.documentType != null and billingStatementDO.documentType != ''">
AND document_type like concat('%', #{billingStatementDO.documentType}, '%')
</if>
<if test="billingStatementDO.originalBusinessNum != null and billingStatementDO.originalBusinessNum != ''">
AND original_business_num like concat('%', #{billingStatementDO.originalBusinessNum}, '%')
</if>
<if test="billingStatementDO.queryState != null and billingStatementDO.queryState == 1">
AND (billing_state = 1 OR billing_state = 2)
</if>
<if test="billingStatementDO.queryState != null and billingStatementDO.queryState == 2">
AND billing_state = 3
</if>
<if test="billingStatementDO.queryState != null and billingStatementDO.queryState == 3">
AND (billing_state = 4 OR billing_state = 5)
</if>
<if test="billingStatementDO.billingStatementIdSet != null">
AND billing_statement_id in
<foreach item="id" collection="billingStatementDO.billingStatementIdSet" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</sql>
<sql id="common_where_two">
<if test="billingStatementDO.billingState != null">
AND billing_state = #{billingStatementDO.billingState}
</if>
<if test="billingStatementDO.topOrganizationId != null">
AND top_organization_id = #{billingStatementDO.topOrganizationId}
</if>
<if test="billingStatementDO.organizationId != null">
AND organization_id = #{billingStatementDO.organizationId}
</if>
<if test="billingStatementDO.settlementCustomersCode != null and billingStatementDO.settlementCustomersCode != ''">
AND settlement_customers_code = #{billingStatementDO.settlementCustomersCode}
</if>
<if test="billingStatementDO.accountExpenseType != null">
AND account_expense_type = #{billingStatementDO.accountExpenseType}
</if>
<if test="billingStatementDO.belongModuleCode != null and billingStatementDO.belongModuleCode != ''">
AND belong_module_code = #{billingStatementDO.belongModuleCode}
</if>
<if test="billingStatementDO.documentTypeCode != null and billingStatementDO.documentTypeCode != ''">
AND document_type_code = #{billingStatementDO.documentTypeCode}
</if>
<if test="billingStatementDO.serviceItemsCode != null and billingStatementDO.serviceItemsCode != ''">
AND service_items_code = #{billingStatementDO.serviceItemsCode}
</if>
<if test="billingStatementDO.secondSubjectCode != null and billingStatementDO.secondSubjectCode != ''">
AND (first_subject_code = #{billingStatementDO.secondSubjectCode} OR second_subject_code = #{billingStatementDO.secondSubjectCode})
</if>
<if test="billingStatementDO.contractType != null">
AND contract_type = #{billingStatementDO.contractType}
</if>
<if test="billingStatementDO.projectCode != null and billingStatementDO.projectCode != ''">
AND project_code = #{billingStatementDO.projectCode}
</if>
<if test="billingStatementDO.businessDateStart != null and billingStatementDO.businessDateStart != ''">
AND date_format(business_date,'%Y-%m-%d') <![CDATA[>=]]> #{billingStatementDO.businessDateStart}
</if>
<if test="billingStatementDO.businessDateEnd != null and billingStatementDO.businessDateEnd != ''">
AND date_format(business_date,'%Y-%m-%d') <![CDATA[<=]]> #{billingStatementDO.businessDateEnd}
</if>
</sql>
<sql id="collect_where">
<if test="billingStatementCollectDO.settlementEntity != null and billingStatementCollectDO.settlementEntity != ''">
and settlement_entity like concat('%',#{billingStatementCollectDO.settlementEntity},'%')
</if>
<if test="billingStatementCollectDO.settlementCustomersCode != null and billingStatementCollectDO.settlementCustomersCode != ''">
and settlement_customers_code like concat('%',#{billingStatementCollectDO.settlementCustomersCode},'%')
</if>
<if test="billingStatementCollectDO.accountExpenseType != null ">
and account_expense_type = #{billingStatementCollectDO.accountExpenseType}
</if>
<if test="billingStatementCollectDO.billingState != null and billingStatementCollectDO.billingState == 1">
and (billing_state = 1 or billing_state = 2)
</if>
<if test="billingStatementCollectDO.billingState != null and billingStatementCollectDO.billingState == 2">
and billing_state = 3
</if>
<if test="billingStatementCollectDO.billingState == null or billingStatementCollectDO.billingState == ''">
and billing_state <![CDATA[<]]> 4
</if>
<if test="billingStatementCollectDO.organizationName != null and billingStatementCollectDO.organizationName != ''">
and organization_name = #{billingStatementCollectDO.organizationName}
</if>
</sql>
<sql id="having_collect">
<if test="billingStatementCollectDO.billAmountSum != null and billingStatementCollectDO.billAmountSum != ''">
and bill_amount_sum = #{billingStatementCollectDO.billAmountSum}
</if>
<if test="billingStatementCollectDO.countFee != null and billingStatementCollectDO.countFee != ''">
and count_fee = #{billingStatementCollectDO.countFee}
</if>
<if test="billingStatementCollectDO.businessStartDate != null">
and date_format(business_start_date,'%Y-%m-%d %H:%i:%s') <![CDATA[>=]]> #{billingStatementCollectDO.businessStartDate}
</if>
<if test="billingStatementCollectDO.businessEndDate != null">
and date_format(business_end_date,'%Y-%m-%d %H:%i:%s') <![CDATA[<=]]> #{billingStatementCollectDO.businessEndDate}
</if>
</sql>
</mapper>
@@ -0,0 +1,191 @@
<?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.mhd.bms.domain.businessDocument.repository.mapper.BusinessDocumentMapper">
<sql id="selectBusinessDocumentPo1">
<where>
<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>
<if test="businessFlow != null and businessFlow != ''">
and business_flow = #{businessFlow}
</if>
<if test="businessState != null ">
and business_state = #{businessState}
</if>
<if test="belongModule != null and belongModule != ''">
and belong_module = #{belongModule}
</if>
<if test="belongModuleCode != null and belongModuleCode != ''">
and belong_module_code = #{belongModuleCode}
</if>
<if test="dataSources != null ">
and data_sources = #{dataSources}
</if>
<if test="documentTypeId != null ">
and document_type_id = #{documentTypeId}
</if>
<if test="documentTypeCode != null and documentTypeCode != ''">
and document_type_code = #{documentTypeCode}
</if>
<if test="documentType != null and documentType != ''">
and document_type = #{documentType}
</if>
<if test="originalBusinessNum != null and originalBusinessNum != ''">
and original_business_num = #{originalBusinessNum}
</if>
<if test="projectCode != null and projectCode != ''">
and project_code = #{projectCode}
</if>
<if test="projectName != null and projectName != ''">
and project_name like concat('%', #{projectName}, '%')
</if>
<if test="contractNumber != null and contractNumber != ''">
and contract_number = #{contractNumber}
</if>
<if test="contractName != null and contractName != ''">
and contract_name like concat('%', #{contractName}, '%')
</if>
<if test="billAmount != null ">
and bill_amount = #{billAmount}
</if>
<if test="estimatedCost != null ">
and estimated_cost = #{estimatedCost}
</if>
<if test="firstSubjectCode != null and firstSubjectCode != ''">
and first_subject_code = #{firstSubjectCode}
</if>
<if test="firstSubjectName != null and firstSubjectName != ''">
and first_subject_name like concat('%', #{firstSubjectName}, '%')
</if>
<if test="secondSubjectCode != null and secondSubjectCode != ''">
and second_subject_code = #{secondSubjectCode}
</if>
<if test="secondSubjectName != null and secondSubjectName != ''">
and second_subject_name like concat('%', #{secondSubjectName}, '%')
</if>
<if test="settlementCustomersId != null ">
and settlement_customers_id = #{settlementCustomersId}
</if>
<if test="settlementCustomersCode != null and settlementCustomersCode != ''">
and settlement_customers_code = #{settlementCustomersCode}
</if>
<if test="settlementEntity != null and settlementEntity != ''">
and settlement_entity = #{settlementEntity}
</if>
<if test="billingTime != null ">
and billing_time = #{billingTime}
</if>
<if test="documentFormJson != null and documentFormJson != ''">
and document_form_json = #{documentFormJson}
</if>
<if test="revenueExpensesType != null ">
and revenue_expenses_type = #{revenueExpensesType}
</if>
</where>
</sql>
<select id="queryList" parameterType="com.mhd.bms.domain.businessDocument.repository.todo.BusinessDocumentDO"
resultType="com.mhd.bms.domain.businessDocument.repository.po.BusinessDocumentPO">
select
*
from business_document
where del_flag = 1
<include refid="common_where"/>
ORDER BY create_time DESC
</select>
<sql id="common_where">
<if test="businessDocumentDO.createTimeStart != null and businessDocumentDO.createTimeStart != ''">
AND date_format(create_time,'%Y-%m-%d') <![CDATA[>=]]> #{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.createByName != null and businessDocumentDO.createByName != ''">
AND create_by_name like concat('%', #{businessDocumentDO.createByName}, '%')
</if>
<if test="businessDocumentDO.topOrganizationId != null and businessDocumentDO.topOrganizationId != ''">
AND top_organization_id = #{businessDocumentDO.topOrganizationId}
</if>
<if test="businessDocumentDO.updateByName != null and businessDocumentDO.updateByName != ''">
AND update_by_name like concat('%', #{businessDocumentDO.updateByName}, '%')
</if>
<if test="businessDocumentDO.updateTimeStart != null and businessDocumentDO.updateTimeStart != ''">
AND date_format(update_time,'%Y-%m-%d') <![CDATA[>=]]> #{businessDocumentDO.updateTimeStart}
</if>
<if test="businessDocumentDO.updateTimeEnd != null and businessDocumentDO.updateTimeEnd != ''">
AND date_format(update_time,'%Y-%m-%d') <![CDATA[<=]]> #{businessDocumentDO.updateTimeEnd}
</if>
<if test="businessDocumentDO.businessFlow != null and businessDocumentDO.businessFlow != ''">
AND business_flow like concat('%', #{businessDocumentDO.businessFlow}, '%')
</if>
<if test="businessDocumentDO.dataSources != null and businessDocumentDO.dataSources != ''">
AND data_sources = #{businessDocumentDO.dataSources}
</if>
<if test="businessDocumentDO.businessState != null and businessDocumentDO.businessState != ''">
AND business_state = #{businessDocumentDO.businessState}
</if>
<if test="businessDocumentDO.belongModule != null and businessDocumentDO.belongModule != ''">
AND belong_module like concat('%', #{businessDocumentDO.belongModule}, '%')
</if>
<if test="businessDocumentDO.organizationName != null and businessDocumentDO.organizationName != ''">
AND organization_name like concat('%', #{businessDocumentDO.organizationName}, '%')
</if>
<if test="businessDocumentDO.documentType != null and businessDocumentDO.documentType != ''">
AND document_type like concat('%', #{businessDocumentDO.documentType}, '%')
</if>
<if test="businessDocumentDO.originalBusinessNum != null and businessDocumentDO.originalBusinessNum != ''">
AND original_business_num like concat('%', #{businessDocumentDO.originalBusinessNum}, '%')
</if>
<if test="businessDocumentDO.projectName != null and businessDocumentDO.projectName != ''">
AND project_name like concat('%', #{businessDocumentDO.projectName}, '%')
</if>
<if test="businessDocumentDO.contractNumber != null and businessDocumentDO.contractNumber != ''">
AND contract_number like concat('%', #{businessDocumentDO.contractNumber}, '%')
</if>
<if test="businessDocumentDO.contractName != null and businessDocumentDO.contractName != ''">
AND contract_name like concat('%', #{businessDocumentDO.contractName}, '%')
</if>
<if test="businessDocumentDO.billAmount != null and businessDocumentDO.billAmount != ''">
AND bill_amount like concat('%', #{businessDocumentDO.billAmount}, '%')
</if>
<if test="businessDocumentDO.estimatedCost != null and businessDocumentDO.estimatedCost != ''">
AND estimated_cost like concat('%', #{businessDocumentDO.estimatedCost}, '%')
</if>
<if test="businessDocumentDO.firstSubjectName != null and businessDocumentDO.firstSubjectName != ''">
AND first_subject_name like concat('%', #{businessDocumentDO.firstSubjectName}, '%')
</if>
<if test="businessDocumentDO.secondSubjectName != null and businessDocumentDO.secondSubjectName != ''">
AND second_subject_name like concat('%', #{businessDocumentDO.secondSubjectName}, '%')
</if>
<if test="businessDocumentDO.settlementEntity != null and businessDocumentDO.settlementEntity != ''">
AND settlement_entity like concat('%', #{businessDocumentDO.settlementEntity}, '%')
</if>
<if test="businessDocumentDO.businessDocumentIdSet != null">
and business_document_id in
<foreach item="id" collection="businessDocumentDO.businessDocumentIdSet" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</sql>
</mapper>
@@ -0,0 +1,34 @@
<?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.mhd.bms.domain.conditionalMapping.repository.mapper.ConditionalMappingMapper">
<select id="queryList" parameterType="com.mhd.bms.domain.conditionalMapping.repository.todo.ConditionalMappingDO"
resultType="com.mhd.bms.domain.conditionalMapping.repository.po.ConditionalMappingPO">
SELECT
*
FROM
conditional_mapping
WHERE
del_flag = 1
<include refid="common_where"></include>
</select>
<sql id="common_where">
<if test="conditionalMappingDO.topOrganizationId != null and conditionalMappingDO.topOrganizationId != ''">
AND top_organization_id = #{conditionalMappingDO.topOrganizationId}
</if>
<if test="conditionalMappingDO.sourceContent != null and conditionalMappingDO.sourceContent != ''">
AND source_content like concat('%', #{conditionalMappingDO.sourceContent}, '%')
</if>
<if test="conditionalMappingDO.afterMapping != null and conditionalMappingDO.afterMapping != ''">
AND after_mapping like concat('%', #{conditionalMappingDO.afterMapping}, '%')
</if>
</sql>
</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.mhd.bms.domain.documentType.repository.mapper.DocumentTypeMapper">
<sql id="selectDocumentTypePo">
select * from document_type
</sql>
<sql id="selectDocumentTypePo1">
<where>
<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>
<if test="documentType != null and documentType != ''">
and document_type = #{documentType}
</if>
<if test="documentTypeCode != null and documentTypeCode != ''">
and document_type_code = #{documentTypeCode}
</if>
<if test="belongModulesCode != null and belongModulesCode != ''">
and belong_modules_code = #{belongModulesCode}
</if>
<if test="belongModules != null and belongModules != ''">
and belong_modules = #{belongModules}
</if>
<if test="formJson != null and formJson != ''">
and form_json = #{formJson}
</if>
<if test="enablingStatus != null ">
and enabling_status = #{enablingStatus}
</if>
</where>
</sql>
<select id="queryList" parameterType="com.mhd.bms.domain.documentType.repository.todo.DocumentTypeDO"
resultType="com.mhd.bms.domain.documentType.repository.po.DocumentTypePO">
select
*
from
document_type
where del_flag = 1
<include refid="common_where"/>
ORDER BY create_time DESC
</select>
<sql id="common_where">
<if test="documentTypeDO.createTimeStart != null and documentTypeDO.createTimeStart != ''">
AND date_format(create_time,'%Y-%m-%d') <![CDATA[>=]]> #{documentTypeDO.createTimeStart}
</if>
<if test="documentTypeDO.createTimeEnd != null and documentTypeDO.createTimeEnd != ''">
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> #{documentTypeDO.createTimeEnd}
</if>
<if test="documentTypeDO.createByName != null and documentTypeDO.createByName != ''">
AND create_by_name like concat('%', #{documentTypeDO.createByName}, '%')
</if>
<if test="documentTypeDO.topOrganizationId != null and documentTypeDO.topOrganizationId != ''">
AND top_organization_id = #{documentTypeDO.topOrganizationId}
</if>
<if test="documentTypeDO.documentType != null and documentTypeDO.documentType != ''">
AND document_type like concat('%', #{documentTypeDO.documentType}, '%')
</if>
<if test="documentTypeDO.documentTypeCode != null and documentTypeDO.documentTypeCode != ''">
AND document_type_code like concat('%', #{documentTypeDO.documentTypeCode}, '%')
</if>
<if test="documentTypeDO.remark != null and documentTypeDO.remark != ''">
AND remark like concat('%', #{documentTypeDO.remark}, '%')
</if>
<if test="documentTypeDO.enablingStatus != null">
AND enabling_status = #{documentTypeDO.enablingStatus}
</if>
<if test="documentTypeDO.documentTypeCodeSet != null">
and document_type_code in
<foreach item="code" collection="documentTypeDO.documentTypeCodeSet" open="(" separator="," close=")">
#{code}
</foreach>
</if>
</sql>
</mapper>
@@ -0,0 +1,32 @@
<?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.mhd.bms.domain.reportForm.repository.mapper.FormQueryManageMapper">
<select id="queryList" parameterType="com.mhd.bms.domain.reportForm.repository.todo.FormQueryManageDO" resultType="com.mhd.bms.domain.reportForm.repository.po.FormQueryManagePO">
SELECT
*
FROM
form_query_manage
WHERE
del_flag = 1
<include refid="common_where"></include>
</select>
<sql id="common_where">
<if test="formQueryManageDO.topOrganizationId != null and formQueryManageDO.topOrganizationId != ''">
AND top_organization_id = #{formQueryManageDO.topOrganizationId}
</if>
<if test="formQueryManageDO.createBy != null and formQueryManageDO.createBy != ''">
AND create_by = #{formQueryManageDO.createBy}
</if>
<if test="formQueryManageDO.reportFormId != null and formQueryManageDO.reportFormId != ''">
AND report_form_id = #{formQueryManageDO.reportFormId}
</if>
</sql>
</mapper>
@@ -0,0 +1,41 @@
<?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.mhd.bms.domain.reportForm.repository.mapper.FormQueryParamsMapper">
<select id="queryList" parameterType="com.mhd.bms.domain.reportForm.repository.todo.FormQueryParamsDO"
resultType="com.mhd.bms.domain.reportForm.repository.po.FormQueryParamsPO">
SELECT
*
FROM
form_query_params a
WHERE
a.del_flag = 1
<include refid="common_where"></include>
</select>
<select id="queryListByManageId" resultType="com.mhd.bms.domain.reportForm.repository.po.FormQueryParamsPO" parameterType="java.lang.Long">
SELECT
*
FROM
form_query_params
WHERE
del_flag = 1
AND form_query_manage_id = #{formQueryManageId}
</select>
<sql id="common_where">
<if test="formQueryParamsDO.topOrganizationId != null and formQueryParamsDO.topOrganizationId != ''">
AND a.top_organization_id = #{formQueryParamsDO.topOrganizationId}
</if>
<if test="formQueryParamsDO.createBy != null and formQueryParamsDO.createBy != ''">
AND a.create_by = #{formQueryParamsDO.createBy}
</if>
<if test="formQueryParamsDO.formType != null and formQueryParamsDO.formType != ''">
AND a.form_type = #{formQueryParamsDO.formType}
</if>
</sql>
</mapper>
@@ -0,0 +1,31 @@
<?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.mhd.bms.domain.mappingMethod.repository.mapper.MappingMethodMapper">
<select id="queryList" parameterType="com.mhd.bms.domain.mappingMethod.repository.todo.MappingMethodDO"
resultType="com.mhd.bms.domain.mappingMethod.repository.po.MappingMethodPO">
select
*
from mapping_method
where del_flag = 1
<include refid="common_where"/>
</select>
<sql id="common_where">
<if test="mappingMethodDO.topOrganizationId != null and mappingMethodDO.topOrganizationId != ''">
AND top_organization_id = #{mappingMethodDO.topOrganizationId}
</if>
<if test="mappingMethodDO.methodName != null and mappingMethodDO.methodName != ''">
and method_name like concat('%', #{mappingMethodDO.methodName}, '%')
</if>
<if test="mappingMethodDO.mappingMethod != null and mappingMethodDO.mappingMethod != ''">
and mapping_method like concat('%', #{mappingMethodDO.mappingMethod}, '%')
</if>
</sql>
</mapper>
@@ -0,0 +1,50 @@
<?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.mhd.bms.domain.paymentManage.repository.mapper.PaymentManageMapper">
<resultMap type="com.mhd.bms.domain.paymentManage.repository.po.PaymentManagePO" id="PaymentManageResult">
<result property="paymentManageId" column="payment_manage_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="topOrganizationId" column="top_organization_id" />
<result property="organizationId" column="organization_id" />
<result property="organizationName" column="organization_name" />
<result property="paymentMethodCode" column="payment_method_code" />
<result property="paymentMethod" column="payment_method" />
</resultMap>
<sql id="selectPaymentManagePo1">
<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>
</sql>
<select id="queryList" parameterType="com.mhd.bms.domain.paymentManage.repository.todo.PaymentManageDO" resultMap="PaymentManageResult">
select
*
from payment_manage
where del_flag = 1
<include refid="selectPaymentManagePo1"/>
</select>
</mapper>
@@ -0,0 +1,7 @@
<?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.mhd.bms.domain.paymentOrder.repository.mapper.PaymentOrderDetailsMapper">
</mapper>
@@ -0,0 +1,58 @@
<?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.mhd.bms.domain.paymentOrder.repository.mapper.PaymentOrderMapper">
<select id="queryList" parameterType="com.mhd.bms.domain.paymentOrder.repository.todo.PaymentOrderDO"
resultType="com.mhd.bms.domain.paymentOrder.repository.po.PaymentOrderPO">
SELECT
a.*,
b.payment_amount,
b.bill_number
FROM
payment_order a left JOIN payment_order_details b ON a.payment_order_id = b.payment_order_id
WHERE
a.del_flag = 1
<include refid="common_where"></include>
ORDER BY
a.create_time DESC
</select>
<select id="getDetailsByBillManageId" resultType="com.mhd.bms.domain.paymentOrder.repository.po.PaymentOrderPO" parameterType="java.lang.Long">
SELECT
a.*,
b.payment_amount,
b.bill_number
FROM
payment_order a
left JOIN payment_order_details b ON a.payment_order_id = b.payment_order_id
WHERE
a.del_flag = 1
and b.bill_manage_id = #{billManageId}
</select>
<sql id="common_where">
<if test="paymentOrderDO.topOrganizationId != null and paymentOrderDO.topOrganizationId != ''">
AND a.top_organization_id = #{paymentOrderDO.topOrganizationId}
</if>
<if test="paymentOrderDO.createTimeStart != null and paymentOrderDO.createTimeStart != ''">
AND date_format(a.create_time,'%Y-%m-%d') <![CDATA[>=]]> #{paymentOrderDO.createTimeStart}
</if>
<if test="paymentOrderDO.createTimeEnd != null and paymentOrderDO.createTimeEnd != ''">
AND date_format(a.create_time,'%Y-%m-%d') <![CDATA[<=]]> #{paymentOrderDO.createTimeEnd}
</if>
<if test="paymentOrderDO.paymentOrderNum != null and paymentOrderDO.paymentOrderNum != ''">
AND a.payment_order_num like concat('%', #{paymentOrderDO.paymentOrderNum}, '%')
</if>
<if test="paymentOrderDO.transactionFlow != null and paymentOrderDO.transactionFlow != ''">
AND a.transaction_flow like concat('%', #{paymentOrderDO.transactionFlow}, '%')
</if>
<if test="paymentOrderDO.settlementEntity != null and paymentOrderDO.settlementEntity != ''">
AND a.settlement_entity like concat('%', #{paymentOrderDO.settlementEntity}, '%')
</if>
</sql>
</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.mhd.bms.domain.paymentWallet.repository.mapper.PaymentWalletMapper">
<resultMap type="com.mhd.bms.domain.paymentWallet.repository.po.PaymentWalletPO" id="PaymentWalletResult">
<result property="paymentWalletId" column="payment_wallet_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="topOrganizationId" column="top_organization_id" />
<result property="organizationId" column="organization_id" />
<result property="organizationName" column="organization_name" />
<result property="mainNumber" column="main_number" />
<result property="mainName" column="main_name" />
<result property="bankName" column="bank_name" />
<result property="bankDeposi" column="bank_deposi" />
<result property="phone" column="phone" />
<result property="paymentMethodCode" column="payment_method_code" />
<result property="paymentMethod" column="payment_method" />
<result property="paymentManageId" column="payment_manage_id" />
</resultMap>
<sql id="selectPaymentWalletPo1">
<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>
<if test="mainNumber != null and mainNumber != ''">
and main_number = #{mainNumber}
</if>
<if test="mainName != null and mainName != ''">
and main_name like concat('%', #{mainName}, '%')
</if>
<if test="bankName != null and bankName != ''">
and bank_name like concat('%', #{bankName}, '%')
</if>
<if test="bankDeposi != null and bankDeposi != ''">
and bank_deposi = #{bankDeposi}
</if>
<if test="phone != null and phone != ''">
and phone = #{phone}
</if>
<if test="paymentMethodCode != null and paymentMethodCode != ''">
and payment_method_code = #{paymentMethodCode}
</if>
<if test="paymentMethod != null and paymentMethod != ''">
and payment_method = #{paymentMethod}
</if>
<if test="paymentManageId != null ">
and payment_manage_id = #{paymentManageId}
</if>
</sql>
<select id="queryList" parameterType="com.mhd.bms.domain.paymentWallet.repository.todo.PaymentWalletDO" resultMap="PaymentWalletResult">
select
*
from payment_wallet
where del_flag = 1
<include refid="selectPaymentWalletPo1"/>
</select>
</mapper>
@@ -0,0 +1,64 @@
<?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.mhd.bms.domain.receiptManage.repository.mapper.ReceiptDetailMapper">
<sql id="selectReceiptDetailPo">
select receipt_detail_id, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag, top_organization_id, organization_id, organization_name, bill_manage_id, bill_number, collected_discount, bill_amount, bill_amount_settlement, bill_amount_unsettled, collected_amount, receipt_manage_id, collection_num from receipt_detail
</sql>
<sql id="selectReceiptDetailPo1">
<where>
<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>
<if test="billManageId != null ">
and bill_manage_id = #{billManageId}
</if>
<if test="billNumber != null and billNumber != ''">
and bill_number = #{billNumber}
</if>
<if test="collectedDiscount != null ">
and collected_discount = #{collectedDiscount}
</if>
<if test="billAmount != null ">
and bill_amount = #{billAmount}
</if>
<if test="billAmountSettlement != null ">
and bill_amount_settlement = #{billAmountSettlement}
</if>
<if test="billAmountUnsettled != null ">
and bill_amount_unsettled = #{billAmountUnsettled}
</if>
<if test="collectedAmount != null ">
and collected_amount = #{collectedAmount}
</if>
<if test="receiptManageId != null ">
and receipt_manage_id = #{receiptManageId}
</if>
<if test="collectionNum != null and collectionNum != ''">
and collection_num = #{collectionNum}
</if>
</where>
</sql>
<select id="queryList"
resultType="com.mhd.bms.domain.receiptManage.repository.po.ReceiptDetailPO">
<include refid="selectReceiptDetailPo"/>
<include refid="selectReceiptDetailPo1"/>
</select>
</mapper>
@@ -0,0 +1,99 @@
<?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.mhd.bms.domain.receiptManage.repository.mapper.ReceiptManageMapper">
<select id="queryList" parameterType="com.mhd.bms.domain.receiptManage.repository.todo.ReceiptManageDO"
resultType="com.mhd.bms.domain.receiptManage.repository.po.ReceiptManagePO">
SELECT
a.* ,
CONCAT(b.bill_number) AS billNumbers
FROM
receipt_manage a
LEFT JOIN receipt_detail b ON a.receipt_manage_id = b.receipt_manage_id
WHERE
a.del_flag = 1
<include refid="common_where"/>
GROUP BY
a.receipt_manage_id
ORDER BY
a.collection_time DESC
</select>
<sql id="common_where">
<if test="receiptManageDO.createTimeStart != null and receiptManageDO.createTimeStart != ''">
AND date_format(a.create_time,'%Y-%m-%d') <![CDATA[>=]]> #{receiptManageDO.createTimeStart}
</if>
<if test="receiptManageDO.createTimeEnd != null and receiptManageDO.createTimeEnd != ''">
AND date_format(a.create_time,'%Y-%m-%d') <![CDATA[<=]]> #{receiptManageDO.createTimeEnd}
</if>
<if test="receiptManageDO.createByName != null and receiptManageDO.createByName != ''">
AND a.create_by_name like concat('%', #{receiptManageDO.createByName}, '%')
</if>
<if test="receiptManageDO.topOrganizationId != null and receiptManageDO.topOrganizationId != ''">
AND a.top_organization_id = #{receiptManageDO.topOrganizationId}
</if>
<if test="receiptManageDO.updateTimeStart != null and receiptManageDO.updateTimeStart != ''">
AND date_format(a.update_time,'%Y-%m-%d') <![CDATA[>=]]> #{receiptManageDO.updateTimeStart}
</if>
<if test="receiptManageDO.updateTimeEnd != null and receiptManageDO.updateTimeEnd != ''">
AND date_format(a.update_time,'%Y-%m-%d') <![CDATA[<=]]> #{receiptManageDO.updateTimeEnd}
</if>
<if test="receiptManageDO.updateByName != null and receiptManageDO.updateByName != ''">
AND a.update_by_name like concat('%', #{receiptManageDO.updateByName}, '%')
</if>
<if test="receiptManageDO.collectionTimeStart != null and receiptManageDO.collectionTimeStart != ''">
AND date_format(a.collection_time,'%Y-%m-%d') <![CDATA[>=]]> #{receiptManageDO.collectionTimeStart}
</if>
<if test="receiptManageDO.collectionTimeEnd != null and receiptManageDO.collectionTimeEnd != ''">
AND date_format(a.collection_time,'%Y-%m-%d') <![CDATA[<=]]> #{receiptManageDO.collectionTimeEnd}
</if>
<if test="receiptManageDO.settlementEntity != null and receiptManageDO.settlementEntity != ''">
AND a.settlement_entity like concat('%', #{receiptManageDO.settlementEntity}, '%')
</if>
<if test="receiptManageDO.paymentCard != null and receiptManageDO.paymentCard != ''">
AND a.payment_card like concat('%', #{receiptManageDO.paymentCard}, '%')
</if>
<if test="receiptManageDO.transactionFlow != null and receiptManageDO.transactionFlow != ''">
AND a.transaction_flow like concat('%', #{receiptManageDO.transactionFlow}, '%')
</if>
<if test="receiptManageDO.receiptNumber != null and receiptManageDO.receiptNumber != ''">
AND a.receipt_number like concat('%', #{receiptManageDO.receiptNumber}, '%')
</if>
<if test="receiptManageDO.payeeName != null and receiptManageDO.payeeName != ''">
AND a.payee_name like concat('%', #{receiptManageDO.payeeName}, '%')
</if>
</sql>
<select id="getDetailsByBillManageId" resultType="com.mhd.bms.domain.receiptManage.repository.po.ReceiptDetailPO" parameterType="java.lang.Long">
SELECT
a.*,
b.settlement_customers_id,
b.settlement_customers_code,
b.settlement_entity,
b.payment_method_code,
b.payment_method,
b.payment_card_id,
b.payment_card,
b.transaction_flow,
b.receipt_number,
b.collection_time,
b.receipt_voucher,
b.collection_remark,
b.payee_user_id,
b.payee_name,
b.collection_source,
(a.collected_discount+a.collected_amount) AS collectedTotaAmount
FROM
receipt_detail a
LEFT JOIN receipt_manage b ON a.receipt_manage_id = b.receipt_manage_id
WHERE
a.bill_manage_id = #{billManageId}
</select>
</mapper>
@@ -0,0 +1,33 @@
<?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.mhd.bms.domain.reportForm.repository.mapper.ReportFormMapper">
<select id="queryList" parameterType="com.mhd.bms.domain.reportForm.repository.todo.ReportFormDO"
resultType="com.mhd.bms.domain.reportForm.repository.po.ReportFormPO">
SELECT
*
FROM
report_form
WHERE
del_flag = 1
<include refid="common_where"></include>
ORDER BY create_time DESC
</select>
<sql id="common_where">
<if test="reportFormDO.topOrganizationId != null and reportFormDO.topOrganizationId != ''">
AND top_organization_id = #{reportFormDO.topOrganizationId}
</if>
<if test="reportFormDO.organizationId != null and reportFormDO.organizationId != ''">
AND organization_id = #{reportFormDO.organizationId}
</if>
<if test="reportFormDO.formType != null and reportFormDO.formType != ''">
AND form_type = #{reportFormDO.formType}
</if>
</sql>
</mapper>
@@ -0,0 +1,112 @@
<?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.mhd.bms.domain.settlementCustomers.repository.mapper.SettlementCustomersMapper">
<sql id="selectSettlementCustomersPo">
select * from settlement_customers
</sql>
<sql id="selectSettlementCustomersPo1">
<where>
<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>
<if test="settlementCustomersCode != null and settlementCustomersCode != ''">
and settlement_customers_code = #{settlementCustomersCode}
</if>
<if test="settlementEntityId != null ">
and settlement_entity_id = #{settlementEntityId}
</if>
<if test="settlementEntity != null and settlementEntity != ''">
and settlement_entity = #{settlementEntity}
</if>
<if test="settlementMethod != null and settlementMethod != ''">
and settlement_method = #{settlementMethod}
</if>
<if test="settlementMethodCode != null and settlementMethodCode != ''">
and settlement_method_code = #{settlementMethodCode}
</if>
<if test="settlementDirection != null and settlementDirection != ''">
and settlement_direction = #{settlementDirection}
</if>
<if test="settlementDirectionCode != null and settlementDirectionCode != ''">
and settlement_direction_code = #{settlementDirectionCode}
</if>
<if test="bankName != null and bankName != ''">
and bank_name like concat('%', #{bankName}, '%')
</if>
<if test="bankCardNumber != null and bankCardNumber != ''">
and bank_card_number = #{bankCardNumber}
</if>
<if test="bankBindingName != null and bankBindingName != ''">
and bank_binding_name like concat('%', #{bankBindingName}, '%')
</if>
</where>
</sql>
<select id="queryList" parameterType="com.mhd.bms.domain.settlementCustomers.repository.todo.SettlementCustomersDO"
resultType="com.mhd.bms.domain.settlementCustomers.repository.po.SettlementCustomersPO">
select
*
from settlement_customers
where del_flag = 1
<include refid="common_where"/>
ORDER BY create_time DESC
</select>
<select id="querySettlementObjects"
resultType="com.mhd.bms.domain.settlementCustomers.repository.po.SettlementCustomersPO">
select
settlement_customers_code,settlement_entity,CONCAT(settlement_customers_code,settlement_entity) settlement_object
from settlement_customers
where del_flag = 1
</select>
<sql id="common_where">
<if test="settlementCustomersDO.settlementEntity != null and settlementCustomersDO.settlementEntity != ''">
and settlement_entity like concat('%', #{settlementCustomersDO.settlementEntity}, '%')
</if>
<if test="settlementCustomersDO.settlementCustomersCode != null and settlementCustomersDO.settlementCustomersCode != ''">
and settlement_customers_code like concat('%', #{settlementCustomersDO.settlementCustomersCode}, '%')
</if>
<if test="settlementCustomersDO.settlementEntity != null and settlementCustomersDO.settlementCustomersCode != ''">
and settlement_customers_code like concat('%', #{settlementCustomersDO.settlementCustomersCode}, '%')
</if>
<if test="settlementCustomersDO.settlementMethod != null and settlementCustomersDO.settlementMethod != ''">
and settlement_method like concat('%', #{settlementCustomersDO.settlementMethod}, '%')
</if>
<if test="settlementCustomersDO.remark != null and settlementCustomersDO.remark != ''">
and remark like concat('%', #{settlementCustomersDO.remark}, '%')
</if>
<if test="settlementCustomersDO.createTimeStart != null and settlementCustomersDO.createTimeStart != ''">
AND date_format(create_time,'%Y-%m-%d') <![CDATA[>=]]> #{settlementCustomersDO.createTimeStart}
</if>
<if test="settlementCustomersDO.createTimeEnd != null and settlementCustomersDO.createTimeEnd != ''">
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> #{settlementCustomersDO.createTimeEnd}
</if>
<if test="settlementCustomersDO.createByName != null and settlementCustomersDO.createByName != ''">
and create_by_name like concat('%', #{settlementCustomersDO.createByName}, '%')
</if>
<if test="settlementCustomersDO.mainRole != null and settlementCustomersDO.mainRole != ''">
and main_role = #{settlementCustomersDO.mainRole}
</if>
<if test="settlementCustomersDO.topOrganizationId != null and settlementCustomersDO.topOrganizationId != ''">
and top_organization_id = #{settlementCustomersDO.topOrganizationId}
</if>
</sql>
</mapper>
@@ -0,0 +1,157 @@
<?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.mhd.bms.domain.taskFlowRecords.repository.mapper.TaskFlowRecordsMapper">
<sql id="selectTaskFlowRecordsPo1">
<where>
<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>
<if test="taskFlow != null and taskFlow != ''">
and task_flow = #{taskFlow}
</if>
<if test="belongModuleCode != null and belongModuleCode != ''">
and belong_module_code = #{belongModuleCode}
</if>
<if test="belongModule != null and belongModule != ''">
and belong_module = #{belongModule}
</if>
<if test="documentTypeId != null ">
and document_type_id = #{documentTypeId}
</if>
<if test="documentTypeCode != null and documentTypeCode != ''">
and document_type_code = #{documentTypeCode}
</if>
<if test="documentType != null and documentType != ''">
and document_type = #{documentType}
</if>
<if test="subjectCode != null and subjectCode != ''">
and subject_code = #{subjectCode}
</if>
<if test="subjectName != null and subjectName != ''">
and subject_name like concat('%', #{subjectName}, '%')
</if>
<if test="originalBusinessNum != null ">
and original_business_num = #{originalBusinessNum}
</if>
<if test="settlementEntity != null and settlementEntity != ''">
and settlement_entity = #{settlementEntity}
</if>
<if test="settlementCustomersId != null ">
and settlement_customers_id = #{settlementCustomersId}
</if>
<if test="mainRole != null ">
and main_role = #{mainRole}
</if>
<if test="contractNumber != null and contractNumber != ''">
and contract_number = #{contractNumber}
</if>
<if test="contractName != null and contractName != ''">
and contract_name like concat('%', #{contractName}, '%')
</if>
<if test="billingRulesId != null ">
and billing_rules_id = #{billingRulesId}
</if>
<if test="billingRules != null and billingRules != ''">
and billing_rules = #{billingRules}
</if>
<if test="billingRulesCode != null and billingRulesCode != ''">
and billing_rules_code = #{billingRulesCode}
</if>
<if test="billingProcess != null and billingProcess != ''">
and billing_process = #{billingProcess}
</if>
<if test="billingResults != null and billingResults != ''">
and billing_results = #{billingResults}
</if>
<if test="requestParams != null and requestParams != ''">
and request_params = #{requestParams}
</if>
</where>
</sql>
<select id="queryList" parameterType="com.mhd.bms.domain.taskFlowRecords.repository.todo.TaskFlowRecordsDO"
resultType="com.mhd.bms.domain.taskFlowRecords.repository.po.TaskFlowRecordsPO">
select
*
from task_flow_records
where del_flag = 1
<include refid="common_where"/>
ORDER BY create_time DESC
</select>
<sql id="common_where">
<if test="taskFlowRecordsDO.createTimeStart != null and taskFlowRecordsDO.createTimeStart != ''">
AND date_format(create_time,'%Y-%m-%d') <![CDATA[>=]]> #{taskFlowRecordsDO.createTimeStart}
</if>
<if test="taskFlowRecordsDO.createTimeEnd != null and taskFlowRecordsDO.createTimeEnd != ''">
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> #{taskFlowRecordsDO.createTimeEnd}
</if>
<if test="taskFlowRecordsDO.createByName != null and taskFlowRecordsDO.createByName != ''">
and create_by_name like concat('%', #{taskFlowRecordsDO.createByName}, '%')
</if>
<if test="taskFlowRecordsDO.topOrganizationId != null and taskFlowRecordsDO.topOrganizationId != ''">
and top_organization_id = #{taskFlowRecordsDO.topOrganizationId}
</if>
<if test="taskFlowRecordsDO.updateByName != null and taskFlowRecordsDO.updateByName != ''">
and update_by_name like concat('%', #{taskFlowRecordsDO.updateByName}, '%')
</if>
<if test="taskFlowRecordsDO.updateTimeStart != null and taskFlowRecordsDO.updateTimeStart != ''">
AND date_format(update_time,'%Y-%m-%d') <![CDATA[>=]]> #{taskFlowRecordsDO.updateTimeStart}
</if>
<if test="taskFlowRecordsDO.updateTimeEnd != null and taskFlowRecordsDO.updateTimeEnd != ''">
AND date_format(update_time,'%Y-%m-%d') <![CDATA[<=]]> #{taskFlowRecordsDO.updateTimeEnd}
</if>
<if test="taskFlowRecordsDO.taskFlow != null and taskFlowRecordsDO.taskFlow != ''">
and task_flow like concat('%', #{taskFlowRecordsDO.taskFlow}, '%')
</if>
<if test="taskFlowRecordsDO.belongModuleCode != null and taskFlowRecordsDO.belongModuleCode != ''">
and belong_module_code like concat('%', #{taskFlowRecordsDO.belongModuleCode}, '%')
</if>
<if test="taskFlowRecordsDO.documentType != null and taskFlowRecordsDO.documentType != ''">
and document_type like concat('%', #{taskFlowRecordsDO.documentType}, '%')
</if>
<if test="taskFlowRecordsDO.secondSubjectName != null and taskFlowRecordsDO.secondSubjectName != ''">
AND( first_subject_name like concat('%', #{taskFlowRecordsDO.secondSubjectName}, '%')
OR second_subject_name like concat('%', #{taskFlowRecordsDO.secondSubjectName}, '%') )
</if>
<if test="taskFlowRecordsDO.billingResults != null and taskFlowRecordsDO.billingResults != ''">
and billing_results like concat('%', #{taskFlowRecordsDO.billingResults}, '%')
</if>
<if test="taskFlowRecordsDO.originalBusinessNum != null and taskFlowRecordsDO.originalBusinessNum != ''">
and original_business_num like concat('%', #{taskFlowRecordsDO.originalBusinessNum}, '%')
</if>
<if test="taskFlowRecordsDO.settlementEntity != null and taskFlowRecordsDO.settlementEntity != ''">
and settlement_entity like concat('%', #{taskFlowRecordsDO.settlementEntity}, '%')
</if>
<if test="taskFlowRecordsDO.mainRole != null">
and main_role = #{taskFlowRecordsDO.mainRole}
</if>
<if test="taskFlowRecordsDO.contractNumber != null and taskFlowRecordsDO.contractNumber != ''">
and contract_number like concat('%', #{taskFlowRecordsDO.contractNumber}, '%')
</if>
<if test="taskFlowRecordsDO.contractName != null and taskFlowRecordsDO.contractName != ''">
and contract_name like concat('%', #{taskFlowRecordsDO.contractName}, '%')
</if>
</sql>
</mapper>