INSERT INTO financial_expenditure (batch_no_, financial_process_no_, dingtalk_process_no_, organ_id_, cooperation_organ_id_, apply_user_, amount_, item_detail_, payment_time_, cause_, create_time_, update_time_, fee_project_, type_, tenant_id_) 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},#{tenantId}) INSERT INTO financial_expenditure (batch_no_,financial_process_no_,dingtalk_process_no_, organ_id_,cooperation_organ_id_,apply_user_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_,fee_project_,type_,tenant_id_) VALUES (#{item.batchNo},#{item.financialProcessNo},#{item.dingtalkProcessNo},#{item.organId}, #{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},#{item.tenantId}) UPDATE financial_expenditure fee_project_ = #{feeProject,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, batch_no_ = #{batchNo}, financial_process_no_ = #{financialProcessNo}, dingtalk_process_no_ = #{dingtalkProcessNo}, organ_id_ = #{organId}, cooperation_organ_id_ = #{cooperationOrganId}, apply_user_ = #{applyUser}, amount_ = #{amount}, item_detail_ = #{itemDetail}, payment_time_ = #{paymentTime}, cause_ = #{cause}, update_time_ = NOW() WHERE id_ = #{id} and tenant_id_ = #{tenantId} UPDATE financial_expenditure SET del_flag_ = 1 WHERE id_ = #{id} UPDATE financial_expenditure SET del_flag_ = 1 WHERE FIND_IN_SET(id_, #{ids}) fe.del_flag_ = 0 and fe.tenant_id_ = #{tenantId} AND fe.batch_no_ = #{batchNo} AND fe.fee_project_ = #{feeProject} AND fe.type_ = #{type} AND fe.financial_process_no_ = #{financialProcessNo} AND fe.dingtalk_process_no_ = #{dingtalkProcessNo} AND (fe.id_ LIKE CONCAT('%',#{search},'%') OR fe.financial_process_no_ LIKE CONCAT('%',#{search},'%') OR fe.dingtalk_process_no_ LIKE CONCAT('%',#{search},'%') OR fe.apply_user_ LIKE CONCAT('%',#{search},'%')) AND FIND_IN_SET(fe.organ_id_,#{organId}) AND fe.cooperation_organ_id_ = #{cooperationOrganId} AND DATE_FORMAT(fe.payment_time_,'%Y-%m-%d') >= #{startTime} AND DATE_FORMAT(fe.payment_time_,'%Y-%m-%d') <= #{endTime}