| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.aps.core.mapper.ApsWeldSeamStatisticsMapper"> |
| | | |
| | | <resultMap type="ApsWeldSeamStatistics" id="ApsWeldSeamStatisticsResult"> |
| | | <resultMap type="com.aps.core.domain.ApsWeldSeamStatistics" id="ApsWeldSeamStatisticsResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="year" column="year" /> |
| | | <result property="month" column="month" /> |
| | |
| | | select id, year, month, production_base, piping_order_requirement, gas_order_requirement, piping_prediction_requirement, gas_prediction_requirement, reserve_emergency_order_output, total, days, requirement_day_weld_seam, production_day_weld_seam, is_satisfy, del_flag, create_by, create_time, update_by, update_time from aps_weld_seam_statistics |
| | | </sql> |
| | | |
| | | <select id="selectApsWeldSeamStatisticsList" parameterType="ApsWeldSeamStatistics" resultMap="ApsWeldSeamStatisticsResult"> |
| | | <select id="selectApsWeldSeamStatisticsList" parameterType="com.aps.core.domain.ApsWeldSeamStatistics" resultMap="ApsWeldSeamStatisticsResult"> |
| | | <include refid="selectApsWeldSeamStatisticsVo"/> |
| | | <where> |
| | | <if test="params.beginYear != null and params.beginYear != '' and params.endYear != null and params.endYear != ''"> and year between #{params.beginYear} and #{params.endYear}</if> |
| | | <if test="params.beginMonth != null and params.beginMonth != '' and params.endMonth != null and params.endMonth != ''"> and month between #{params.beginMonth} and #{params.endMonth}</if> |
| | | <if test="productionBase != null and productionBase != ''"> and production_base like concat('%', #{productionBase}, '%')</if> |
| | | <if test="pipingOrderRequirement != null "> and piping_order_requirement = #{pipingOrderRequirement}</if> |
| | | <if test="gasOrderRequirement != null "> and gas_order_requirement = #{gasOrderRequirement}</if> |
| | | <if test="pipingPredictionRequirement != null "> and piping_prediction_requirement = #{pipingPredictionRequirement}</if> |
| | | <if test="gasPredictionRequirement != null "> and gas_prediction_requirement = #{gasPredictionRequirement}</if> |
| | | <if test="reserveEmergencyOrderOutput != null "> and reserve_emergency_order_output = #{reserveEmergencyOrderOutput}</if> |
| | | <if test="total != null "> and total = #{total}</if> |
| | | <if test="days != null "> and days = #{days}</if> |
| | | <if test="requirementDayWeldSeam != null "> and requirement_day_weld_seam = #{requirementDayWeldSeam}</if> |
| | | <if test="productionDayWeldSeam != null "> and production_day_weld_seam = #{productionDayWeldSeam}</if> |
| | | <if test="isSatisfy != null and isSatisfy != ''"> and is_satisfy = #{isSatisfy}</if> |
| | | <if test="productionBase != null and productionBase != ''"> and production_base like '%'|| #{productionBase}|| '%'</if> |
| | | and del_flag='0' |
| | | </where> |
| | | order by year, month ,production_base |
| | | </select> |
| | | |
| | | <select id="selectApsWeldSeamStatisticsById" parameterType="String" resultMap="ApsWeldSeamStatisticsResult"> |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertApsWeldSeamStatistics" parameterType="ApsWeldSeamStatistics"> |
| | | <insert id="insertApsWeldSeamStatistics" parameterType="com.aps.core.domain.ApsWeldSeamStatistics"> |
| | | insert into aps_weld_seam_statistics |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateApsWeldSeamStatistics" parameterType="ApsWeldSeamStatistics"> |
| | | <update id="updateApsWeldSeamStatistics" parameterType="com.aps.core.domain.ApsWeldSeamStatistics"> |
| | | update aps_weld_seam_statistics |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="year != null">year = #{year},</if> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | <update id="removeLastBatch" parameterType="String"> |
| | | update aps_weld_seam_statistics set del_flag='1' where del_flag='0' |
| | | </update> |
| | | |
| | | </mapper> |