|
@@ -0,0 +1,216 @@
|
|
|
+<?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.WorkOrderInfoMapper">
|
|
|
+
|
|
|
+ <resultMap type="WorkOrderInfo" id="WorkOrderInfoResult">
|
|
|
+ <result property="orderId" column="order_id" />
|
|
|
+ <result property="unitName" column="unit_name" />
|
|
|
+ <result property="provinceId" column="province_id" />
|
|
|
+ <result property="province" column="province" />
|
|
|
+ <result property="cityId" column="city_id" />
|
|
|
+ <result property="city" column="city" />
|
|
|
+ <result property="regionId" column="region_id" />
|
|
|
+ <result property="region" column="region" />
|
|
|
+ <result property="detailedAddress" column="detailed_address" />
|
|
|
+ <result property="lon" column="lon" />
|
|
|
+ <result property="lat" column="lat" />
|
|
|
+ <result property="personName" column="person_name" />
|
|
|
+ <result property="phonenumber" column="phonenumber" />
|
|
|
+ <result property="sex" column="sex" />
|
|
|
+ <result property="type" column="type" />
|
|
|
+ <result property="demand" column="demand" />
|
|
|
+ <result property="isSignature" column="is_signature" />
|
|
|
+ <result property="evaluation" column="evaluation" />
|
|
|
+ <result property="evaluationContent" column="evaluation_content" />
|
|
|
+ <result property="serviceProgress" column="service_progress" />
|
|
|
+ <result property="orderPlacement" column="order_placement" />
|
|
|
+ <result property="responsibleId" column="responsible_id" />
|
|
|
+ <result property="responsibleName" column="responsible_name" />
|
|
|
+ <result property="takeTime" column="take_time" />
|
|
|
+ <result property="projectName" column="project_name" />
|
|
|
+ <result property="shelfLife" column="shelf_life" />
|
|
|
+ <result property="isCharge" column="is_charge" />
|
|
|
+ <result property="totalCost" column="total_cost" />
|
|
|
+ <result property="totalCostDx" column="total_cost_dx" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectWorkOrderInfoVo">
|
|
|
+ select order_id, unit_name, province_id, province, city_id, city, region_id, region, detailed_address, lon, lat, person_name, phonenumber, sex, type, demand, is_signature, evaluation, evaluation_content, service_progress, order_placement, responsible_id, responsible_name,take_time, project_name, shelf_life, is_charge, total_cost, total_cost_dx, del_flag, create_by, create_time, update_by, update_time, remark from work_order_info
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectWorkOrderInfoList" parameterType="WorkOrderInfo" resultMap="WorkOrderInfoResult">
|
|
|
+ <include refid="selectWorkOrderInfoVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="unitName != null and unitName != ''"> and unit_name like concat('%', #{unitName}, '%')</if>
|
|
|
+ <if test="provinceId != null and provinceId != ''"> and province_id = #{provinceId}</if>
|
|
|
+ <if test="province != null and province != ''"> and province = #{province}</if>
|
|
|
+ <if test="cityId != null and cityId != ''"> and city_id = #{cityId}</if>
|
|
|
+ <if test="city != null and city != ''"> and city = #{city}</if>
|
|
|
+ <if test="regionId != null and regionId != ''"> and region_id = #{regionId}</if>
|
|
|
+ <if test="region != null and region != ''"> and region = #{region}</if>
|
|
|
+ <if test="detailedAddress != null and detailedAddress != ''"> and detailed_address = #{detailedAddress}</if>
|
|
|
+ <if test="lon != null and lon != ''"> and lon = #{lon}</if>
|
|
|
+ <if test="lat != null and lat != ''"> and lat = #{lat}</if>
|
|
|
+ <if test="personName != null and personName != ''"> and person_name like concat('%', #{personName}, '%')</if>
|
|
|
+ <if test="phonenumber != null and phonenumber != ''"> and phonenumber = #{phonenumber}</if>
|
|
|
+ <if test="sex != null and sex != ''"> and sex = #{sex}</if>
|
|
|
+ <if test="type != null and type != ''"> and type = #{type}</if>
|
|
|
+ <if test="demand != null and demand != ''"> and demand = #{demand}</if>
|
|
|
+ <if test="isSignature != null and isSignature != ''"> and is_signature = #{isSignature}</if>
|
|
|
+ <if test="evaluation != null and evaluation != ''"> and evaluation = #{evaluation}</if>
|
|
|
+ <if test="evaluationContent != null and evaluationContent != ''"> and evaluation_content = #{evaluationContent}</if>
|
|
|
+ <if test="serviceProgress != null and serviceProgress != ''"> and service_progress = #{serviceProgress}</if>
|
|
|
+ <if test="orderPlacement != null and orderPlacement != ''"> and order_placement = #{orderPlacement}</if>
|
|
|
+ <if test="responsibleId != null "> and responsible_id = #{responsibleId}</if>
|
|
|
+ <if test="responsibleName != null and responsibleName != ''"> and responsible_name like concat('%', #{responsibleName}, '%')</if>
|
|
|
+ <if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
|
|
|
+ <if test="shelfLife != null and shelfLife != ''"> and shelf_life = #{shelfLife}</if>
|
|
|
+ <if test="isCharge != null and isCharge != ''"> and is_charge = #{isCharge}</if>
|
|
|
+ <if test="totalCost != null and totalCost != ''"> and total_cost = #{totalCost}</if>
|
|
|
+ <if test="totalCostDx != null and totalCostDx != ''"> and total_cost_dx = #{totalCostDx}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectWorkOrderInfoByOrderId" parameterType="String" resultMap="WorkOrderInfoResult">
|
|
|
+ <include refid="selectWorkOrderInfoVo"/>
|
|
|
+ where order_id = #{orderId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertWorkOrderInfo" parameterType="WorkOrderInfo">
|
|
|
+ insert into work_order_info
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="orderId != null">order_id,</if>
|
|
|
+ <if test="unitName != null">unit_name,</if>
|
|
|
+ <if test="provinceId != null">province_id,</if>
|
|
|
+ <if test="province != null">province,</if>
|
|
|
+ <if test="cityId != null">city_id,</if>
|
|
|
+ <if test="city != null">city,</if>
|
|
|
+ <if test="regionId != null">region_id,</if>
|
|
|
+ <if test="region != null">region,</if>
|
|
|
+ <if test="detailedAddress != null">detailed_address,</if>
|
|
|
+ <if test="lon != null">lon,</if>
|
|
|
+ <if test="lat != null">lat,</if>
|
|
|
+ <if test="personName != null">person_name,</if>
|
|
|
+ <if test="phonenumber != null">phonenumber,</if>
|
|
|
+ <if test="sex != null">sex,</if>
|
|
|
+ <if test="type != null">type,</if>
|
|
|
+ <if test="demand != null">demand,</if>
|
|
|
+ <if test="isSignature != null">is_signature,</if>
|
|
|
+ <if test="evaluation != null">evaluation,</if>
|
|
|
+ <if test="evaluationContent != null">evaluation_content,</if>
|
|
|
+ <if test="serviceProgress != null">service_progress,</if>
|
|
|
+ <if test="orderPlacement != null">order_placement,</if>
|
|
|
+ <if test="responsibleId != null">responsible_id,</if>
|
|
|
+ <if test="responsibleName != null">responsible_name,</if>
|
|
|
+ <if test="takeTime != null">take_time,</if>
|
|
|
+ <if test="projectName != null">project_name,</if>
|
|
|
+ <if test="shelfLife != null">shelf_life,</if>
|
|
|
+ <if test="isCharge != null">is_charge,</if>
|
|
|
+ <if test="totalCost != null">total_cost,</if>
|
|
|
+ <if test="totalCostDx != null">total_cost_dx,</if>
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="orderId != null">#{orderId},</if>
|
|
|
+ <if test="unitName != null">#{unitName},</if>
|
|
|
+ <if test="provinceId != null">#{provinceId},</if>
|
|
|
+ <if test="province != null">#{province},</if>
|
|
|
+ <if test="cityId != null">#{cityId},</if>
|
|
|
+ <if test="city != null">#{city},</if>
|
|
|
+ <if test="regionId != null">#{regionId},</if>
|
|
|
+ <if test="region != null">#{region},</if>
|
|
|
+ <if test="detailedAddress != null">#{detailedAddress},</if>
|
|
|
+ <if test="lon != null">#{lon},</if>
|
|
|
+ <if test="lat != null">#{lat},</if>
|
|
|
+ <if test="personName != null">#{personName},</if>
|
|
|
+ <if test="phonenumber != null">#{phonenumber},</if>
|
|
|
+ <if test="sex != null">#{sex},</if>
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
+ <if test="demand != null">#{demand},</if>
|
|
|
+ <if test="isSignature != null">#{isSignature},</if>
|
|
|
+ <if test="evaluation != null">#{evaluation},</if>
|
|
|
+ <if test="evaluationContent != null">#{evaluationContent},</if>
|
|
|
+ <if test="serviceProgress != null">#{serviceProgress},</if>
|
|
|
+ <if test="orderPlacement != null">#{orderPlacement},</if>
|
|
|
+ <if test="responsibleId != null">#{responsibleId},</if>
|
|
|
+ <if test="responsibleName != null">#{responsibleName},</if>
|
|
|
+ <if test="takeTime != null">#{takeTime},</if>
|
|
|
+ <if test="projectName != null">#{projectName},</if>
|
|
|
+ <if test="shelfLife != null">#{shelfLife},</if>
|
|
|
+ <if test="isCharge != null">#{isCharge},</if>
|
|
|
+ <if test="totalCost != null">#{totalCost},</if>
|
|
|
+ <if test="totalCostDx != null">#{totalCostDx},</if>
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateWorkOrderInfo" parameterType="WorkOrderInfo">
|
|
|
+ update work_order_info
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="unitName != null">unit_name = #{unitName},</if>
|
|
|
+ <if test="provinceId != null">province_id = #{provinceId},</if>
|
|
|
+ <if test="province != null">province = #{province},</if>
|
|
|
+ <if test="cityId != null">city_id = #{cityId},</if>
|
|
|
+ <if test="city != null">city = #{city},</if>
|
|
|
+ <if test="regionId != null">region_id = #{regionId},</if>
|
|
|
+ <if test="region != null">region = #{region},</if>
|
|
|
+ <if test="detailedAddress != null">detailed_address = #{detailedAddress},</if>
|
|
|
+ <if test="lon != null">lon = #{lon},</if>
|
|
|
+ <if test="lat != null">lat = #{lat},</if>
|
|
|
+ <if test="personName != null">person_name = #{personName},</if>
|
|
|
+ <if test="phonenumber != null">phonenumber = #{phonenumber},</if>
|
|
|
+ <if test="sex != null">sex = #{sex},</if>
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
+ <if test="demand != null">demand = #{demand},</if>
|
|
|
+ <if test="isSignature != null">is_signature = #{isSignature},</if>
|
|
|
+ <if test="evaluation != null">evaluation = #{evaluation},</if>
|
|
|
+ <if test="evaluationContent != null">evaluation_content = #{evaluationContent},</if>
|
|
|
+ <if test="serviceProgress != null">service_progress = #{serviceProgress},</if>
|
|
|
+ <if test="orderPlacement != null">order_placement = #{orderPlacement},</if>
|
|
|
+ <if test="responsibleId != null">responsible_id = #{responsibleId},</if>
|
|
|
+ <if test="responsibleName != null">responsible_name = #{responsibleName},</if>
|
|
|
+ <if test="takeTime != null">take_time = #{takeTime},</if>
|
|
|
+ <if test="projectName != null">project_name = #{projectName},</if>
|
|
|
+ <if test="shelfLife != null">shelf_life = #{shelfLife},</if>
|
|
|
+ <if test="isCharge != null">is_charge = #{isCharge},</if>
|
|
|
+ <if test="totalCost != null">total_cost = #{totalCost},</if>
|
|
|
+ <if test="totalCostDx != null">total_cost_dx = #{totalCostDx},</if>
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ </trim>
|
|
|
+ where order_id = #{orderId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteWorkOrderInfoByOrderId" parameterType="String">
|
|
|
+ delete from work_order_info where order_id = #{orderId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteWorkOrderInfoByOrderIds" parameterType="String">
|
|
|
+ delete from work_order_info where order_id in
|
|
|
+ <foreach item="orderId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{orderId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|