|
|
@@ -1,51 +1,53 @@
|
|
|
<?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">
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<!-- namespace必须指向DAO接口 -->
|
|
|
<mapper namespace="com.jpsoft.employment.modules.base.dao.WorkOrderDAO">
|
|
|
<resultMap id="WorkOrderMap" type="com.jpsoft.employment.modules.base.entity.WorkOrder">
|
|
|
<id property="id" column="id_" />
|
|
|
- <result property="number" column="number_" />
|
|
|
- <result property="title" column="title_" />
|
|
|
- <result property="address" column="address_" />
|
|
|
- <result property="date" column="date_" />
|
|
|
- <result property="tag" column="tag_" />
|
|
|
- <result property="image" column="image_" />
|
|
|
- <result property="status" column="status_" />
|
|
|
- <result property="price" column="price_" />
|
|
|
- <result property="location" column="location_" />
|
|
|
- <result property="companyId" column="company_id" />
|
|
|
- <result property="map" column="map_" />
|
|
|
- <result property="constructionLocation" column="construction_location" />
|
|
|
- <result property="environment" column="environment" />
|
|
|
- <result property="volume" column="volume_" />
|
|
|
- <result property="technicianId" column="technician_id" />
|
|
|
- <result property="payStatus" column="pay_status" />
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
- <result property="updateTime" column="update_time" />
|
|
|
- <result property="delFlag" column="del_flag" />
|
|
|
- <result property="createBy" column="create_by" />
|
|
|
- <result property="updateBy" column="update_by" />
|
|
|
- <result property="customerName" column="customer_name" />
|
|
|
- <result property="customerPhone" column="customer_phone" />
|
|
|
- <result property="viewNum" column="view_num" />
|
|
|
- <result property="certificate" column="certificate_" />
|
|
|
- <result property="cancelCauses" column="cancel_causes" />
|
|
|
- <result property="cancelReasons" column="cancel_reasons" />
|
|
|
- <result property="cancelImages" column="cancel_images" />
|
|
|
- <result property="peopleSeenNum" column="people_seen_num" />
|
|
|
+ <result property="number" column="number_" />
|
|
|
+ <result property="title" column="title_" />
|
|
|
+ <result property="address" column="address_" />
|
|
|
+ <result property="date" column="date_" />
|
|
|
+ <result property="tag" column="tag_" />
|
|
|
+ <result property="image" column="image_" />
|
|
|
+ <result property="status" column="status_" />
|
|
|
+ <result property="price" column="price_" />
|
|
|
+ <result property="location" column="location_" />
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
+ <result property="map" column="map_" />
|
|
|
+ <result property="constructionLocation" column="construction_location" />
|
|
|
+ <result property="environment" column="environment" />
|
|
|
+ <result property="volume" column="volume_" />
|
|
|
+ <result property="technicianId" column="technician_id" />
|
|
|
+ <result property="payStatus" column="pay_status" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="customerName" column="customer_name" />
|
|
|
+ <result property="customerPhone" column="customer_phone" />
|
|
|
+ <result property="viewNum" column="view_num" />
|
|
|
+ <result property="certificate" column="certificate_" />
|
|
|
+ <result property="cancelCauses" column="cancel_causes" />
|
|
|
+ <result property="cancelReasons" column="cancel_reasons" />
|
|
|
+ <result property="cancelImages" column="cancel_images" />
|
|
|
+ <result property="peopleSeenNum" column="people_seen_num" />
|
|
|
+ <result property="bak" column="bak_" />
|
|
|
+ <result property="payCertificate" column="pay_certificate" />
|
|
|
|
|
|
</resultMap>
|
|
|
<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.WorkOrder">
|
|
|
- <!--
|
|
|
- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
- select sys_guid() from dual
|
|
|
- </selectKey>
|
|
|
- -->
|
|
|
- <![CDATA[
|
|
|
+ <!--
|
|
|
+ <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
+ select sys_guid() from dual
|
|
|
+ </selectKey>
|
|
|
+ -->
|
|
|
+ <![CDATA[
|
|
|
insert into base_work_order
|
|
|
(id_,number_,title_,address_,date_,tag_,image_,status_,price_,location_,company_id,map_,construction_location,environment,volume_,technician_id,pay_status,create_time,update_time,del_flag,create_by,update_by,
|
|
|
- customer_name,customer_phone,view_num,certificate_,cancel_causes,cancel_reasons,cancel_images,people_seen_num)
|
|
|
+ customer_name,customer_phone,view_num,certificate_,cancel_causes,cancel_reasons,cancel_images,people_seen_num,bak_,pay_certificate)
|
|
|
values
|
|
|
(
|
|
|
#{id,jdbcType=VARCHAR}
|
|
|
@@ -78,6 +80,8 @@
|
|
|
,#{cancelReasons,jdbcType=VARCHAR}
|
|
|
,#{cancelImages,jdbcType=VARCHAR}
|
|
|
,#{peopleSeenNum,jdbcType= NUMERIC }
|
|
|
+,#{bak,jdbcType=VARCHAR}
|
|
|
+,#{payCertificate,jdbcType=VARCHAR}
|
|
|
)
|
|
|
]]>
|
|
|
</insert>
|
|
|
@@ -87,69 +91,69 @@
|
|
|
<update id="update" parameterType="com.jpsoft.employment.modules.base.entity.WorkOrder">
|
|
|
update base_work_order
|
|
|
<set>
|
|
|
- <if test="number!=null">
|
|
|
- number_=#{number,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="title!=null">
|
|
|
- title_=#{title,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="address!=null">
|
|
|
- address_=#{address,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="date!=null">
|
|
|
- date_=#{date,jdbcType= TIMESTAMP },
|
|
|
- </if>
|
|
|
- <if test="tag!=null">
|
|
|
- tag_=#{tag,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="image!=null">
|
|
|
- image_=#{image,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="status!=null">
|
|
|
- status_=#{status,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="price!=null">
|
|
|
- price_=#{price,jdbcType= NUMERIC },
|
|
|
- </if>
|
|
|
- <if test="location!=null">
|
|
|
- location_=#{location,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="companyId!=null">
|
|
|
- company_id=#{companyId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="map!=null">
|
|
|
- map_=#{map,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="constructionLocation!=null">
|
|
|
- construction_location=#{constructionLocation,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="environment!=null">
|
|
|
- environment=#{environment,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="volume!=null">
|
|
|
- volume_=#{volume,jdbcType= NUMERIC },
|
|
|
- </if>
|
|
|
- <if test="technicianId!=null">
|
|
|
- technician_id=#{technicianId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="payStatus!=null">
|
|
|
- pay_status=#{payStatus,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="createTime!=null">
|
|
|
- create_time=#{createTime,jdbcType= TIMESTAMP },
|
|
|
- </if>
|
|
|
- <if test="updateTime!=null">
|
|
|
- update_time=#{updateTime,jdbcType= TIMESTAMP },
|
|
|
- </if>
|
|
|
- <if test="delFlag!=null">
|
|
|
- del_flag=#{delFlag,jdbcType= NUMERIC },
|
|
|
- </if>
|
|
|
- <if test="createBy!=null">
|
|
|
- create_by=#{createBy,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="updateBy!=null">
|
|
|
- update_by=#{updateBy,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
+ <if test="number!=null">
|
|
|
+ number_=#{number,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="title!=null">
|
|
|
+ title_=#{title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="address!=null">
|
|
|
+ address_=#{address,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="date!=null">
|
|
|
+ date_=#{date,jdbcType= TIMESTAMP },
|
|
|
+ </if>
|
|
|
+ <if test="tag!=null">
|
|
|
+ tag_=#{tag,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="image!=null">
|
|
|
+ image_=#{image,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status!=null">
|
|
|
+ status_=#{status,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="price!=null">
|
|
|
+ price_=#{price,jdbcType= NUMERIC },
|
|
|
+ </if>
|
|
|
+ <if test="location!=null">
|
|
|
+ location_=#{location,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyId!=null">
|
|
|
+ company_id=#{companyId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="map!=null">
|
|
|
+ map_=#{map,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="constructionLocation!=null">
|
|
|
+ construction_location=#{constructionLocation,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="environment!=null">
|
|
|
+ environment=#{environment,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="volume!=null">
|
|
|
+ volume_=#{volume,jdbcType= NUMERIC },
|
|
|
+ </if>
|
|
|
+ <if test="technicianId!=null">
|
|
|
+ technician_id=#{technicianId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="payStatus!=null">
|
|
|
+ pay_status=#{payStatus,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime!=null">
|
|
|
+ create_time=#{createTime,jdbcType= TIMESTAMP },
|
|
|
+ </if>
|
|
|
+ <if test="updateTime!=null">
|
|
|
+ update_time=#{updateTime,jdbcType= TIMESTAMP },
|
|
|
+ </if>
|
|
|
+ <if test="delFlag!=null">
|
|
|
+ del_flag=#{delFlag,jdbcType= NUMERIC },
|
|
|
+ </if>
|
|
|
+ <if test="createBy!=null">
|
|
|
+ create_by=#{createBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy!=null">
|
|
|
+ update_by=#{updateBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="customerName!=null">
|
|
|
customer_name=#{customerName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -174,8 +178,14 @@
|
|
|
<if test="peopleSeenNum!=null">
|
|
|
people_seen_num=#{peopleSeenNum,jdbcType= NUMERIC },
|
|
|
</if>
|
|
|
+ <if test="bak!=null">
|
|
|
+ bak_=#{bak,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="payCertificate!=null">
|
|
|
+ pay_certificate=#{payCertificate,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
- where id_=#{id}
|
|
|
+ where id_=#{id}
|
|
|
</update>
|
|
|
<select id="get" parameterType="string" resultMap="WorkOrderMap">
|
|
|
select * from base_work_order where id_=#{0}
|
|
|
@@ -232,8 +242,8 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
<foreach item="sort" collection="sortList" open="order by" separator=",">
|
|
|
- ${sort.name} ${sort.order}
|
|
|
- </foreach>
|
|
|
+ ${sort.name} ${sort.order}
|
|
|
+ </foreach>
|
|
|
</select>
|
|
|
|
|
|
<select id="searchMobile" parameterType="hashmap" resultMap="WorkOrderMap">
|
|
|
@@ -245,6 +255,9 @@
|
|
|
<if test="searchParams.title != null">
|
|
|
and title_ like #{searchParams.title}
|
|
|
</if>
|
|
|
+ <if test="searchParams.companyId != null">
|
|
|
+ and company_id = #{searchParams.companyId}
|
|
|
+ </if>
|
|
|
<if test="searchParams.status != null">
|
|
|
and status_ = #{searchParams.status}
|
|
|
</if>
|