|
@@ -13,7 +13,7 @@
|
|
|
<result column="dingtalk_process_no_" property="dingtalkProcessNo"/>
|
|
|
<result column="organ_id_" property="organId"/>
|
|
|
<result column="cooperation_organ_id_" property="cooperationOrganId"/>
|
|
|
- <result column="apply_user_id_" property="applyUserId"/>
|
|
|
+ <result column="apply_user_" property="applyUser"/>
|
|
|
<result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
<result column="fee_project_" property="feeProject" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
<result column="amount_" property="amount"/>
|
|
@@ -39,19 +39,19 @@
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.FinancialExpenditure" useGeneratedKeys="true" keyColumn="id"
|
|
|
keyProperty="id">
|
|
|
INSERT INTO financial_expenditure (batch_no_,financial_process_no_,dingtalk_process_no_,
|
|
|
- organ_id_,cooperation_organ_id_,apply_user_id_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_,fee_project_,type_)
|
|
|
- VALUES(#{batchNo},#{financialProcessNo},#{dingtalkProcessNo},#{organId},#{cooperationOrganId},#{applyUserId},#{amount},
|
|
|
+ organ_id_,cooperation_organ_id_,apply_user_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_,fee_project_,type_)
|
|
|
+ VALUES(#{batchNo},#{financialProcessNo},#{dingtalkProcessNo},#{organId},#{cooperationOrganId},#{applyUser},#{amount},
|
|
|
#{itemDetail},#{paymentTime},#{cause},now(),now(),#{feeProject,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
|
|
|
</insert>
|
|
|
|
|
|
<insert id="batchInsert">
|
|
|
INSERT INTO financial_expenditure (batch_no_,financial_process_no_,dingtalk_process_no_,
|
|
|
- organ_id_,cooperation_organ_id_,apply_user_id_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_,fee_project_,type_)
|
|
|
+ organ_id_,cooperation_organ_id_,apply_user_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_,fee_project_,type_)
|
|
|
VALUES
|
|
|
<foreach collection="financialExpenditures" item="item" separator=",">
|
|
|
(#{item.batchNo},#{item.financialProcessNo},#{item.dingtalkProcessNo},#{item.organId},
|
|
|
- #{item.cooperationOrganId},#{item.applyUserId},#{item.amount},
|
|
|
+ #{item.cooperationOrganId},#{item.applyUser},#{item.amount},
|
|
|
#{item.itemDetail},#{item.paymentTime},#{item.cause},now(),now(),
|
|
|
#{item.feeProject,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
#{item.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
|
|
@@ -83,8 +83,8 @@
|
|
|
<if test="cooperationOrganId != null">
|
|
|
cooperation_organ_id_ = #{cooperationOrganId},
|
|
|
</if>
|
|
|
- <if test="applyUserId != null">
|
|
|
- apply_user_id_ = #{applyUserId},
|
|
|
+ <if test="applyUser != null">
|
|
|
+ apply_user_ = #{applyUser},
|
|
|
</if>
|
|
|
<if test="amount != null">
|
|
|
amount_ = #{amount},
|
|
@@ -131,7 +131,7 @@
|
|
|
</if>
|
|
|
<if test="search != null and search != ''">
|
|
|
AND (fe.batch_no_ LIKE CONCAT('%',#{search},'%') OR fe.financial_process_no_ LIKE CONCAT('%',#{search},'%')
|
|
|
- OR fe.dingtalk_process_no_ LIKE CONCAT('%',#{search},'%') OR su.real_name_ LIKE CONCAT('%',#{search},'%'))
|
|
|
+ OR fe.dingtalk_process_no_ LIKE CONCAT('%',#{search},'%') OR fe.apply_user_ LIKE CONCAT('%',#{search},'%'))
|
|
|
</if>
|
|
|
<if test="organId != null">
|
|
|
AND fe.organ_id_ = #{organId}
|
|
@@ -139,9 +139,6 @@
|
|
|
<if test="cooperationOrganId != null">
|
|
|
AND fe.cooperation_organ_id_ = #{cooperationOrganId}
|
|
|
</if>
|
|
|
- <if test="applyUserId != null">
|
|
|
- AND fe.apply_user_id_ = #{applyUserId}
|
|
|
- </if>
|
|
|
<if test="startTime != null and startTime != ''">
|
|
|
AND DATE_FORMAT(fe.payment_time_,'%Y%m%d') >= #{startTime}
|
|
|
</if>
|
|
@@ -156,7 +153,6 @@
|
|
|
SELECT fe.*,o.name_ organ_name_,co.name_ cooperation_name_,su.real_name_
|
|
|
FROM financial_expenditure fe
|
|
|
LEFT JOIN organization o ON o.id_ = fe.organ_id_
|
|
|
- LEFT JOIN sys_user su ON su.id_ = fe.apply_user_id_
|
|
|
LEFT JOIN cooperation_organ co ON co.id_ = fe.cooperation_organ_id_
|
|
|
<include refid="queryPageSql"/>
|
|
|
<include refid="global.limit"/>
|
|
@@ -165,26 +161,22 @@
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
|
<select id="queryCount" resultType="int">
|
|
|
SELECT COUNT(DISTINCT fe.id_) FROM financial_expenditure fe
|
|
|
- LEFT JOIN sys_user su ON su.id_ = fe.apply_user_id_
|
|
|
<include refid="queryPageSql"/>
|
|
|
</select>
|
|
|
|
|
|
<resultMap type="com.ym.mec.biz.dal.dto.FinancialExpenditureDto" id="FinancialExpenditureDto" extends="FinancialExpenditure">
|
|
|
<result column="organ_name_" property="organName"/>
|
|
|
<result column="cooperation_name_" property="cooperationName"/>
|
|
|
- <result column="real_name_" property="realName"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="findFinancialExpenditureCount" resultType="java.lang.Integer">
|
|
|
SELECT COUNT(DISTINCT fe.id_) FROM financial_expenditure fe
|
|
|
- LEFT JOIN sys_user su ON su.id_ = fe.apply_user_id_
|
|
|
<include refid="queryPageSql"/>
|
|
|
</select>
|
|
|
<select id="queryFinancialExpenditurePage" resultMap="FinancialExpenditureDto">
|
|
|
- SELECT fe.*,o.name_ organ_name_,co.name_ cooperation_name_,su.real_name_
|
|
|
+ SELECT fe.*,o.name_ organ_name_,co.name_ cooperation_name_
|
|
|
FROM financial_expenditure fe
|
|
|
LEFT JOIN organization o ON o.id_ = fe.organ_id_
|
|
|
- LEFT JOIN sys_user su ON su.id_ = fe.apply_user_id_
|
|
|
LEFT JOIN cooperation_organ co ON co.id_ = fe.cooperation_organ_id_
|
|
|
<include refid="queryPageSql"/>
|
|
|
<include refid="global.limit"/>
|