律所系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
4.9 KiB

<?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="net.lab1024.sa.admin.module.service.dao.ServiceApplicationsDao">
<!-- 查询结果列 -->
<sql id="base_columns">
t_service_applications.application_id,
t_service_applications.user_id,
t_service_applications.firm_id,
t_service_applications.service_start,
t_service_applications.service_end,
t_service_applications.service_duration,
t_service_applications.beneficiary_count,
t_service_applications.organizer_name,
t_service_applications.organizer_contact,
t_service_applications.organizer_phone,
t_service_applications.service_content,
t_service_applications.workload_score,
t_service_applications.firm_audit_status,
t_service_applications.firm_audit_opinion,
t_service_applications.firm_audit_user,
t_service_applications.firm_audit_time,
t_service_applications.association_audit_status,
t_service_applications.association_audit_opinion,
t_service_applications.association_audit_user,
t_service_applications.association_audit_time,
t_service_applications.record_no,
t_service_applications.record_status,
t_service_applications.record_time,
t_service_applications.update_time,
t_service_applications.create_time,
t_service_applications.deleted_flag,
t_service_applications.certificate_number,
t_service_applications.activity_category_id,
t_service_applications.activity_name_id,
t_service_applications.attachment_ids
</sql>
<!-- 分页查询 -->
<select id="queryPage" resultType="net.lab1024.sa.admin.module.service.domain.vo.ServiceApplicationsVO">
SELECT
<include refid="base_columns"/>
FROM t_service_applications
<where>
deleted_flag = 0
<if test="queryForm.applicationId != null and queryForm.applicationId != ''">
and application_id = #{queryForm.applicationId}
</if>
<if test="queryForm.userId != null and queryForm.userId != ''">
and user_id = #{queryForm.userId}
</if>
<if test="queryForm.firmId != null and queryForm.firmId != ''">
and firm_id = #{queryForm.firmId}
</if>
<if test="queryForm.serviceStart != null and queryForm.serviceStart != ''">
and service_start &gt;= #{queryForm.serviceStart}
</if>
<if test="queryForm.serviceEnd != null and queryForm.serviceEnd != ''">
and service_end &lt;= #{queryForm.serviceEnd}
</if>
<if test="queryForm.serviceDuration != null and queryForm.serviceDuration != ''">
and service_duration = #{queryForm.serviceDuration}
</if>
<if test="queryForm.beneficiaryCount != null and queryForm.beneficiaryCount != ''">
and beneficiary_count = #{queryForm.beneficiaryCount}
</if>
<if test="queryForm.organizerName != null and queryForm.organizerName != ''">
and organizer_name = #{queryForm.organizerName}
</if>
<if test="queryForm.organizerContact != null and queryForm.organizerContact != ''">
and organizer_contact = #{queryForm.organizerContact}
</if>
<if test="queryForm.certificateNumber != null and queryForm.certificateNumber != ''">
and certificate_number = #{queryForm.certificateNumber}
</if>
<if test="queryForm.activityCategoryId != null and queryForm.activityCategoryId != ''">
and activity_category_id = #{queryForm.activityCategoryId}
</if>
<if test="queryForm.activityNameId != null and queryForm.activityNameId != ''">
and activity_name_id = #{queryForm.activityNameId}
</if>
</where>
ORDER BY create_time DESC
</select>
<update id="batchUpdateDeleted">
update t_service_applications set deleted_flag = #{deletedFlag}
where application_id in
<foreach collection="idList" open="(" close=")" separator="," item="item">
#{item}
</foreach>
</update>
<update id="updateDeleted">
update t_service_applications set deleted_flag = #{deletedFlag}
where application_id = #{applicationId}
</update>
<update id="batchSubmit">
update t_service_applications set firm_audit_status = #{deletedFlag}
where application_id in
<foreach collection="idList" open="(" close=")" separator="," item="item">
#{item}
</foreach>
</update>
</mapper>