|
@@ -0,0 +1,93 @@
|
|
|
+<?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.iamberry.rst.service.approval.mapper.ApprovalProductionMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="ApprovalProduction" >
|
|
|
+ <result column="production_id" property="productionId" />
|
|
|
+ <result column="approval_id" property="approvalId" />
|
|
|
+ <result column="applicant_order_no" property="applicantOrderNo" />
|
|
|
+ <result column="applicant_name" property="applicantName" />
|
|
|
+ <result column="applicant_id" property="applicantId" />
|
|
|
+ <result column="order_name" property="orderName" />
|
|
|
+ <result column="company_name" property="companyName" />
|
|
|
+ <result column="contact_name" property="contactName" />
|
|
|
+ <result column="contact_tel" property="contactTel" />
|
|
|
+ <result column="production_delivery_date" property="productionDeliveryDate" />
|
|
|
+ <result column="production_delivery_way" property="productionDeliveryWay" />
|
|
|
+ <result column="production_delivery_desc" property="productionDeliveryDesc" />
|
|
|
+ <result column="production_state" property="productionState" />
|
|
|
+ <result column="production_packing_way" property="productionPackingWay" />
|
|
|
+ <result column="production_remark" property="productionRemark" />
|
|
|
+ <result column="production_create_time" property="productionCreateTime" />
|
|
|
+ <result column="production_update_time" property="productionUpdateTime" />
|
|
|
+ <result column="contract_name" property="contractName" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_List" >
|
|
|
+ t.production_id,
|
|
|
+ t.approval_id,
|
|
|
+ t.applicant_order_no,
|
|
|
+ t.applicant_name,
|
|
|
+ t.applicant_id,
|
|
|
+ t.order_name,
|
|
|
+ t.company_name,
|
|
|
+ t.contact_name,
|
|
|
+ t.contact_tel,
|
|
|
+ t.production_delivery_date,
|
|
|
+ t.production_delivery_way,
|
|
|
+ t.production_delivery_desc,
|
|
|
+ t.production_state,
|
|
|
+ t.production_packing_way,
|
|
|
+ t.production_remark,
|
|
|
+ t.production_create_time,
|
|
|
+ t.production_update_time,
|
|
|
+ t.contract_name
|
|
|
+ </sql>
|
|
|
+ <select id="getApprovalProductionList" resultMap="BaseResultMap" parameterType="ApprovalProduction" >
|
|
|
+ select
|
|
|
+ <include refid="Base_List" />
|
|
|
+ from tb_rst_approval_production t
|
|
|
+ <where>
|
|
|
+ <if test="productionId != null ">
|
|
|
+ AND t.production_id = #{productionId}
|
|
|
+ </if >
|
|
|
+ <if test="approvalId != null ">
|
|
|
+ AND t.approval_id = #{approvalId}
|
|
|
+ </if >
|
|
|
+ <if test="applicantOrderNo != null and applicantOrderNo != ''">
|
|
|
+ AND t.applicant_order_no = #{applicantOrderNo}
|
|
|
+ </if >
|
|
|
+ <if test="applicantName != null and applicantName != ''">
|
|
|
+ AND t.applicant_name like CONCAT ('%',#{applicantName},'%')
|
|
|
+ </if >
|
|
|
+ <if test="applicantId != null ">
|
|
|
+ AND t.applicant_id = #{applicantId}
|
|
|
+ </if >
|
|
|
+ <if test="orderName != null and orderName != ''">
|
|
|
+ AND t.order_name like CONCAT ('%',#{orderName},'%')
|
|
|
+ </if >
|
|
|
+ <if test="companyName != null and companyName != ''">
|
|
|
+ AND t.company_name like CONCAT ('%',#{companyName},'%')
|
|
|
+ </if >
|
|
|
+ <if test="contactName != null and contactName != ''">
|
|
|
+ AND t.contact_name like CONCAT ('%',#{contactName},'%')
|
|
|
+ </if >
|
|
|
+ <if test="contactTel != null and contactTel != ''">
|
|
|
+ AND t.contact_tel like CONCAT ('%',#{contactTel},'%')
|
|
|
+ </if >
|
|
|
+ <if test="productionDeliveryWay != null and productionDeliveryWay != ''">
|
|
|
+ AND t.production_delivery_way = #{productionDeliveryWay}
|
|
|
+ </if >
|
|
|
+ <if test="productionState != null and productionState != ''">
|
|
|
+ AND t.production_state = #{productionState}
|
|
|
+ </if >
|
|
|
+ <if test="contractName != null and contractName != ''">
|
|
|
+ AND t.contract_name like CONCAT ('%',#{contractName},'%')
|
|
|
+ </if >
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <select id="getApprovalProductionById" resultMap="BaseResultMap" parameterType="Integer" >
|
|
|
+ select
|
|
|
+ <include refid="Base_List" />
|
|
|
+ from tb_rst_approval_production t
|
|
|
+ where t.production_id= #{productionId}
|
|
|
+ </select>
|
|
|
+</mapper>
|