<?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.ruoyi.system.mapper.WagesOverviewOriginalDateMapper"> <resultMap type="com.ruoyi.system.model.wages.dao.WagesOverviewOriginalExcelDAO" id="WagesOverviewOriginalDataResult"> <result property="year" column="year" /> <result property="month" column="month" /> <result property="unitCode" column="unit_code" /> <result property="unitName" column="unit_name" /> <result property="workerCount" column="worker_count" /> <result property="workerWagesPayable" column="worker_wages_payable" /> <result property="cadreCount" column="cadre_count" /> <result property="cadreWagesPayable" column="cadre_wages_payable" /> <result property="totalCount" column="total_count" /> <result property="totalWagesPayable" column="total_wages_payable" /> </resultMap> <sql id="selectWagesOverviewOriginalDataVo"> select id, year, month, unit_code, unit_name, worker_count, worker_wages_payable, cadre_count, cadre_wages_payable, total_count, total_wages_payable from wages_overview_original_data </sql> <select id="selectAll" parameterType="com.ruoyi.system.model.wages.dao.WagesOverviewOriginalExcelDAO" resultMap="WagesOverviewOriginalDataResult"> <include refid="selectWagesOverviewOriginalDataVo"/> <where> <if test="year != null and year != ''"> and year = #{year}</if> <if test="month != null and month != ''"> and month = #{month}</if> <if test="unitCode != null and unitCode != ''"> and unit_code = #{unitCode}</if> <if test="unitName != null and unitName != ''"> and unit_name like concat('%', #{unitName}, '%')</if> <if test="workerCount != null "> and worker_count = #{workerCount}</if> <if test="workerWagesPayable != null "> and worker_wages_payable = #{workerWagesPayable}</if> <if test="cadreCount != null "> and cadre_count = #{cadreCount}</if> <if test="cadreWagesPayable != null "> and cadre_wages_payable = #{cadreWagesPayable}</if> <if test="totalCount != null "> and total_count = #{totalCount}</if> <if test="totalWagesPayable != null "> and total_wages_payable = #{totalWagesPayable}</if> </where> </select> </mapper>