From 59e91a4e9ddaf23cebb12993c774aa899ab22d16 Mon Sep 17 00:00:00 2001
From: 郑永安 <zyazyz250@sina.com>
Date: 星期一, 19 六月 2023 14:22:45 +0800
Subject: [PATCH] 描述

---
 src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificateMapper.xml |  481 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 481 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificateMapper.xml b/src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificateMapper.xml
new file mode 100644
index 0000000..30cb3e8
--- /dev/null
+++ b/src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificateMapper.xml
@@ -0,0 +1,481 @@
+<?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.gk.firework.Mapper.TransportCertificateMapper" >
+  <resultMap id="BaseResultMap" type="com.gk.firework.Domain.TransportCertificate" >
+    <!--          -->
+    <id column="id" property="id" jdbcType="BIGINT" />
+    <result column="type" property="type" jdbcType="VARCHAR" />
+    <result column="code" property="code" jdbcType="VARCHAR" />
+    <result column="enterprisenumber" property="enterprisenumber" jdbcType="VARCHAR" />
+    <result column="contractcode" property="contractcode" jdbcType="VARCHAR" />
+    <result column="salecompanyid" property="salecompanyid" jdbcType="BIGINT" />
+    <result column="salecompanyname" property="salecompanyname" jdbcType="VARCHAR" />
+    <result column="productionlicense" property="productionlicense" jdbcType="VARCHAR" />
+    <result column="contractnumber" property="contractnumber" jdbcType="VARCHAR" />
+    <result column="shippercompanyname" property="shippercompanyname" jdbcType="VARCHAR" />
+    <result column="shipperaddress" property="shipperaddress" jdbcType="VARCHAR" />
+    <result column="shipperprincipalname" property="shipperprincipalname" jdbcType="VARCHAR" />
+    <result column="shipperprincipalphone" property="shipperprincipalphone" jdbcType="VARCHAR" />
+    <result column="shippermanagername" property="shippermanagername" jdbcType="VARCHAR" />
+    <result column="shippermanageridentify" property="shippermanageridentify" jdbcType="VARCHAR" />
+    <result column="shippermanagerphone" property="shippermanagerphone" jdbcType="VARCHAR" />
+    <result column="receivercompanyname" property="receivercompanyname" jdbcType="VARCHAR" />
+    <result column="receiveraddress" property="receiveraddress" jdbcType="VARCHAR" />
+    <result column="receiverprincipalname" property="receiverprincipalname" jdbcType="VARCHAR" />
+    <result column="receiverprincipalphone" property="receiverprincipalphone" jdbcType="VARCHAR" />
+    <result column="carrierid" property="carrierid" jdbcType="BIGINT" />
+    <result column="carriercompanyname" property="carriercompanyname" jdbcType="VARCHAR" />
+    <result column="carrieraddress" property="carrieraddress" jdbcType="VARCHAR" />
+    <result column="carrierprincipalname" property="carrierprincipalname" jdbcType="VARCHAR" />
+    <result column="carrierprincipalphone" property="carrierprincipalphone" jdbcType="VARCHAR" />
+    <result column="otherdeparture" property="otherdeparture" jdbcType="VARCHAR" />
+    <result column="otherdestination" property="otherdestination" jdbcType="VARCHAR" />
+    <result column="othershipstarttime" property="othershipstarttime" jdbcType="TIMESTAMP" />
+    <result column="othershipendtime" property="othershipendtime" jdbcType="TIMESTAMP" />
+    <result column="othermemo" property="othermemo" jdbcType="VARCHAR" />
+    <association property="transportFile"
+                 javaType="com.gk.firework.Domain.TransportCertificateFile"
+                 select="selectFile"
+                 column="ccode=code">
+
+    </association>
+    <collection property="transportPerson"
+                ofType="java.util.List"
+                select="selectPerson"
+                column="ccode=code"
+                >
+
+    </collection>
+    <collection property="transportProduct"
+                ofType="java.util.List"
+                select="selectProduct"
+                column="ccode=code">
+
+    </collection>
+    <collection property="transportApproach"
+                ofType="java.util.List"
+                select="selectApproach"
+                column="ccode=code">
+
+    </collection>
+
+  </resultMap>
+  <sql id="Base_Column_List" >
+    <!--          -->
+    id, type, salecompanyid, salecompanyname, productionlicense, contractnumber, shippercompanyname,
+    shipperaddress, shipperprincipalname, shippermanagername, shippermanageridentify,
+    shippermanagerphone, receivercompanyname, receiveraddress, receiverprincipalname,
+    receiverprincipalphone, carrierid, carriercompanyname, otherdeparture, otherdestination,
+    othershipstarttime, othershipendtime, otherapproach, othermemo
+  </sql>
+
+  <select id="selectPages" resultMap="BaseResultMap">
+        select tc.*
+        from transportcertificate as tc
+        left join enterprise as e on e.enterprisenumber = tc.enterprisenumber and e.validflag = 1
+        where tc.validflag = 1
+        <choose>
+          <when test="params.enterprisenumber != null and params.enterprisenumber != ''">
+            and tc.enterprisenumber = #{params.enterprisenumber}
+          </when>
+          <otherwise>
+            <if test="params.enterprisename != null and params.enterprisename != ''">
+              and e.enterprisename like concat("%",#{params.enterprisename},"%")
+            </if>
+            <if test="params.safetysupervision != null and params.safetysupervision != ''">
+              and e.safetysupervision = #{params.safetysupervision}
+            </if>
+            <if test="params.province != null and params.province != ''">
+              and e.province = #{params.province}
+            </if>
+            <if test="params.city != null and params.city != ''">
+              and e.city = #{params.city}
+            </if>
+            <if test="params.district != null and params.district != ''">
+              and e.district = #{params.district}
+            </if>
+            <if test="params.street != null and params.street != ''">
+              and e.street = #{params.street}
+            </if>
+            <if test="params.committee != null and params.committee != ''">
+              and e.committee = #{params.committee}
+            </if>
+          </otherwise>
+        </choose>
+    <if test="params.filterProvince != null and params.filterProvince  != ''">
+      and e.province = #{params.filterProvince}
+    </if>
+    <if test="params.filterCity != null and  params.filterCity  != ''">
+      and e.city = #{params.filterCity}
+    </if>
+    <if test="params.filterDistrict != null and params.filterDistrict  != ''">
+      and e.district = #{params.filterDistrict}
+    </if>
+    <if test="params.filterStreet != null and params.filterStreet  != ''">
+      and e.street = #{params.filterStreet}
+    </if>
+    <if test="params.filterCommittee != null and params.filterCommittee  != ''">
+      and e.committee = #{params.filterCommittee}
+    </if>
+    <if test="params.code !=null and params.code != ''">
+       and tc.code like concat("%",#{params.code},"%")
+    </if>
+    <if test="params.page != null and params.page != ''">
+      and tc.status != #{params.tosubmmit}
+    </if>
+    order by tc.createtime
+    </select>
+  <select id="selectPerson" parameterType="java.util.Map" resultType="com.gk.firework.Domain.TransportCertificatePerson" >
+    select id,
+    certificatecode,
+    personid,
+    personname,
+    personidentify,
+    validtime,
+    number,
+    phone,
+    type
+    from transportcertificateperson
+    where certificatecode = #{ccode}
+    and validflag = 1
+    order by id asc
+  </select>
+
+  <select id="selectProduct" parameterType="java.util.Map" resultType="com.gk.firework.Domain.TransportCertificateProduct" >
+    select id,
+    certificatecode,
+    productcode,
+    productnum,
+    num,
+    type,
+    name,
+    level,
+    packing,
+    specification,
+    arrivalnum
+    from transportcertificateproduct
+    where certificatecode = #{ccode}
+    and validflag = 1
+    order by id asc
+  </select>
+
+  <select id="selectApproach" parameterType="java.util.Map" resultType="com.gk.firework.Domain.TransportCertificateApproach" >
+    select id,
+    certificatecode,
+    province,
+    city,
+    district
+    from transportcertificateapproach
+    where certificatecode = #{ccode}
+    and validflag = 1
+    order by id asc
+  </select>
+
+  <select id="selectFile" parameterType="java.util.Map" resultType="com.gk.firework.Domain.TransportCertificateFile" >
+    select id,
+    certificatecode,
+    url1,
+    url2,
+    url3,
+    url4,
+    url5,
+    url6,
+    url7,
+    url8,
+    url9,
+    url10
+    from transportcertificatefile
+    where certificatecode = #{ccode}
+    and validflag = 1
+  </select>
+
+
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    <!--          -->
+    select
+    <include refid="Base_Column_List" />
+    from transportcertificate
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <select id="getOneById" resultMap="BaseResultMap">
+    select *
+    from transportcertificate
+    where id = #{id}
+  </select>
+  <select id="selectByCode" resultMap="BaseResultMap">
+        select *
+        from transportcertificate
+        where code = #{code}
+  </select>
+  <select id="selectWarnList" resultMap="BaseResultMap">
+    select *
+    from transportcertificate
+    <where>
+      createtime &gt;= #{start}
+      and createtime &lt;= #{end}
+    </where>
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    <!--          -->
+    delete from transportcertificate
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+
+
+  <insert id="insertSelective" parameterType="com.gk.firework.Domain.TransportCertificate" >
+    <!--          -->
+    insert into transportcertificate
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="type != null" >
+        type,
+      </if>
+      <if test="salecompanyid != null" >
+        salecompanyid,
+      </if>
+      <if test="salecompanyname != null" >
+        salecompanyname,
+      </if>
+      <if test="productionlicense != null" >
+        productionlicense,
+      </if>
+      <if test="contractnumber != null" >
+        contractnumber,
+      </if>
+      <if test="shippercompanyname != null" >
+        shippercompanyname,
+      </if>
+      <if test="shipperaddress != null" >
+        shipperaddress,
+      </if>
+      <if test="shipperprincipalname != null" >
+        shipperprincipalname,
+      </if>
+      <if test="shippermanagername != null" >
+        shippermanagername,
+      </if>
+      <if test="shippermanageridentify != null" >
+        shippermanageridentify,
+      </if>
+      <if test="shippermanagerphone != null" >
+        shippermanagerphone,
+      </if>
+      <if test="receivercompanyname != null" >
+        receivercompanyname,
+      </if>
+      <if test="receiveraddress != null" >
+        receiveraddress,
+      </if>
+      <if test="receiverprincipalname != null" >
+        receiverprincipalname,
+      </if>
+      <if test="receiverprincipalphone != null" >
+        receiverprincipalphone,
+      </if>
+      <if test="carrierid != null" >
+        carrierid,
+      </if>
+      <if test="carriercompanyname != null" >
+        carriercompanyname,
+      </if>
+      <if test="otherdeparture != null" >
+        otherdeparture,
+      </if>
+      <if test="otherdestination != null" >
+        otherdestination,
+      </if>
+      <if test="othershipstarttime != null" >
+        othershipstarttime,
+      </if>
+      <if test="othershipendtime != null" >
+        othershipendtime,
+      </if>
+      <if test="otherapproach != null" >
+        otherapproach,
+      </if>
+      <if test="othermemo != null" >
+        othermemo,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="type != null" >
+        #{type,jdbcType=VARCHAR},
+      </if>
+      <if test="salecompanyid != null" >
+        #{salecompanyid,jdbcType=BIGINT},
+      </if>
+      <if test="salecompanyname != null" >
+        #{salecompanyname,jdbcType=VARCHAR},
+      </if>
+      <if test="productionlicense != null" >
+        #{productionlicense,jdbcType=VARCHAR},
+      </if>
+      <if test="contractnumber != null" >
+        #{contractnumber,jdbcType=VARCHAR},
+      </if>
+      <if test="shippercompanyname != null" >
+        #{shippercompanyname,jdbcType=VARCHAR},
+      </if>
+      <if test="shipperaddress != null" >
+        #{shipperaddress,jdbcType=VARCHAR},
+      </if>
+      <if test="shipperprincipalname != null" >
+        #{shipperprincipalname,jdbcType=VARCHAR},
+      </if>
+      <if test="shippermanagername != null" >
+        #{shippermanagername,jdbcType=VARCHAR},
+      </if>
+      <if test="shippermanageridentify != null" >
+        #{shippermanageridentify,jdbcType=VARCHAR},
+      </if>
+      <if test="shippermanagerphone != null" >
+        #{shippermanagerphone,jdbcType=VARCHAR},
+      </if>
+      <if test="receivercompanyname != null" >
+        #{receivercompanyname,jdbcType=VARCHAR},
+      </if>
+      <if test="receiveraddress != null" >
+        #{receiveraddress,jdbcType=VARCHAR},
+      </if>
+      <if test="receiverprincipalname != null" >
+        #{receiverprincipalname,jdbcType=VARCHAR},
+      </if>
+      <if test="receiverprincipalphone != null" >
+        #{receiverprincipalphone,jdbcType=VARCHAR},
+      </if>
+      <if test="carrierid != null" >
+        #{carrierid,jdbcType=BIGINT},
+      </if>
+      <if test="carriercompanyname != null" >
+        #{carriercompanyname,jdbcType=VARCHAR},
+      </if>
+      <if test="otherdeparture != null" >
+        #{otherdeparture,jdbcType=VARCHAR},
+      </if>
+      <if test="otherdestination != null" >
+        #{otherdestination,jdbcType=VARCHAR},
+      </if>
+      <if test="othershipstarttime != null" >
+        #{othershipstarttime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="othershipendtime != null" >
+        #{othershipendtime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="otherapproach != null" >
+        #{otherapproach,jdbcType=VARCHAR},
+      </if>
+      <if test="othermemo != null" >
+        #{othermemo,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gk.firework.Domain.TransportCertificate" >
+    <!--          -->
+    update transportcertificate
+    <set >
+      <if test="type != null" >
+        type = #{type,jdbcType=VARCHAR},
+      </if>
+      <if test="salecompanyid != null" >
+        salecompanyid = #{salecompanyid,jdbcType=BIGINT},
+      </if>
+      <if test="salecompanyname != null" >
+        salecompanyname = #{salecompanyname,jdbcType=VARCHAR},
+      </if>
+      <if test="productionlicense != null" >
+        productionlicense = #{productionlicense,jdbcType=VARCHAR},
+      </if>
+      <if test="contractnumber != null" >
+        contractnumber = #{contractnumber,jdbcType=VARCHAR},
+      </if>
+      <if test="shippercompanyname != null" >
+        shippercompanyname = #{shippercompanyname,jdbcType=VARCHAR},
+      </if>
+      <if test="shipperaddress != null" >
+        shipperaddress = #{shipperaddress,jdbcType=VARCHAR},
+      </if>
+      <if test="shipperprincipalname != null" >
+        shipperprincipalname = #{shipperprincipalname,jdbcType=VARCHAR},
+      </if>
+      <if test="shippermanagername != null" >
+        shippermanagername = #{shippermanagername,jdbcType=VARCHAR},
+      </if>
+      <if test="shippermanageridentify != null" >
+        shippermanageridentify = #{shippermanageridentify,jdbcType=VARCHAR},
+      </if>
+      <if test="shippermanagerphone != null" >
+        shippermanagerphone = #{shippermanagerphone,jdbcType=VARCHAR},
+      </if>
+      <if test="receivercompanyname != null" >
+        receivercompanyname = #{receivercompanyname,jdbcType=VARCHAR},
+      </if>
+      <if test="receiveraddress != null" >
+        receiveraddress = #{receiveraddress,jdbcType=VARCHAR},
+      </if>
+      <if test="receiverprincipalname != null" >
+        receiverprincipalname = #{receiverprincipalname,jdbcType=VARCHAR},
+      </if>
+      <if test="receiverprincipalphone != null" >
+        receiverprincipalphone = #{receiverprincipalphone,jdbcType=VARCHAR},
+      </if>
+      <if test="carrierid != null" >
+        carrierid = #{carrierid,jdbcType=BIGINT},
+      </if>
+      <if test="carriercompanyname != null" >
+        carriercompanyname = #{carriercompanyname,jdbcType=VARCHAR},
+      </if>
+      <if test="otherdeparture != null" >
+        otherdeparture = #{otherdeparture,jdbcType=VARCHAR},
+      </if>
+      <if test="otherdestination != null" >
+        otherdestination = #{otherdestination,jdbcType=VARCHAR},
+      </if>
+      <if test="othershipstarttime != null" >
+        othershipstarttime = #{othershipstarttime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="othershipendtime != null" >
+        othershipendtime = #{othershipendtime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="otherapproach != null" >
+        otherapproach = #{otherapproach,jdbcType=VARCHAR},
+      </if>
+      <if test="othermemo != null" >
+        othermemo = #{othermemo,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gk.firework.Domain.TransportCertificate" >
+    <!--          -->
+    update transportcertificate
+    set type = #{type,jdbcType=VARCHAR},
+      salecompanyid = #{salecompanyid,jdbcType=BIGINT},
+      salecompanyname = #{salecompanyname,jdbcType=VARCHAR},
+      productionlicense = #{productionlicense,jdbcType=VARCHAR},
+      contractnumber = #{contractnumber,jdbcType=VARCHAR},
+      shippercompanyname = #{shippercompanyname,jdbcType=VARCHAR},
+      shipperaddress = #{shipperaddress,jdbcType=VARCHAR},
+      shipperprincipalname = #{shipperprincipalname,jdbcType=VARCHAR},
+      shippermanagername = #{shippermanagername,jdbcType=VARCHAR},
+      shippermanageridentify = #{shippermanageridentify,jdbcType=VARCHAR},
+      shippermanagerphone = #{shippermanagerphone,jdbcType=VARCHAR},
+      receivercompanyname = #{receivercompanyname,jdbcType=VARCHAR},
+      receiveraddress = #{receiveraddress,jdbcType=VARCHAR},
+      receiverprincipalname = #{receiverprincipalname,jdbcType=VARCHAR},
+      receiverprincipalphone = #{receiverprincipalphone,jdbcType=VARCHAR},
+      carrierid = #{carrierid,jdbcType=BIGINT},
+      carriercompanyname = #{carriercompanyname,jdbcType=VARCHAR},
+      otherdeparture = #{otherdeparture,jdbcType=VARCHAR},
+      otherdestination = #{otherdestination,jdbcType=VARCHAR},
+      othershipstarttime = #{othershipstarttime,jdbcType=TIMESTAMP},
+      othershipendtime = #{othershipendtime,jdbcType=TIMESTAMP},
+      otherapproach = #{otherapproach,jdbcType=VARCHAR},
+      othermemo = #{othermemo,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

--
Gitblit v1.9.2