Commit 086357dc by chaizheng

大搜车工单需求

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@26577 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 739100f2
...@@ -9,10 +9,9 @@ ...@@ -9,10 +9,9 @@
<result column="install_location" jdbcType="VARCHAR" property="installLocation" /> <result column="install_location" jdbcType="VARCHAR" property="installLocation" />
<result column="sort" jdbcType="INTEGER" property="sort" /> <result column="sort" jdbcType="INTEGER" property="sort" />
<result column="deviceTypeName" jdbcType="VARCHAR" property="deviceTypeName" /> <result column="deviceTypeName" jdbcType="VARCHAR" property="deviceTypeName" />
<result column="repair_type" jdbcType="INTEGER" property="repairType" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, order_id, device_no, device_type, install_location, sort, repair_type id, order_id, device_no, device_type, install_location, sort
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -29,9 +28,9 @@ ...@@ -29,9 +28,9 @@
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sys_order_device (order_id, device_no, device_type, insert into sys_order_device (order_id, device_no, device_type,
install_location, sort, repair_type) install_location, sort)
values (#{orderId,jdbcType=INTEGER}, #{deviceNo,jdbcType=VARCHAR}, #{deviceType,jdbcType=VARCHAR}, values (#{orderId,jdbcType=INTEGER}, #{deviceNo,jdbcType=VARCHAR}, #{deviceType,jdbcType=VARCHAR},
#{installLocation,jdbcType=VARCHAR}, #{sort}, #{repairType}) #{installLocation,jdbcType=VARCHAR}, #{sort})
</insert> </insert>
<insert id="insertSelective" parameterType="com.glsx.ordercenter.pojo.SysOrderDevice"> <insert id="insertSelective" parameterType="com.glsx.ordercenter.pojo.SysOrderDevice">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
...@@ -54,9 +53,6 @@ ...@@ -54,9 +53,6 @@
<if test="sort != null"> <if test="sort != null">
sort, sort,
</if> </if>
<if test="repairType != null">
repair_type,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null"> <if test="orderId != null">
...@@ -74,9 +70,6 @@ ...@@ -74,9 +70,6 @@
<if test="sort != null"> <if test="sort != null">
#{sort,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
</if> </if>
<if test="repairType != null">
repair_type = #{repairType,jdbcType=INTEGER},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.glsx.ordercenter.pojo.SysOrderDevice"> <update id="updateByPrimaryKeySelective" parameterType="com.glsx.ordercenter.pojo.SysOrderDevice">
...@@ -97,9 +90,6 @@ ...@@ -97,9 +90,6 @@
<if test="sort != null"> <if test="sort != null">
sort = #{sort,jdbcType=INTEGER}, sort = #{sort,jdbcType=INTEGER},
</if> </if>
<if test="repairType != null">
repair_type = #{repairType,jdbcType=INTEGER},
</if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
...@@ -116,7 +106,7 @@ ...@@ -116,7 +106,7 @@
<select id="getOrderDeviceList" parameterType="com.glsx.ordercenter.pojo.SysOrderDevice" resultMap="BaseResultMap"> <select id="getOrderDeviceList" parameterType="com.glsx.ordercenter.pojo.SysOrderDevice" resultMap="BaseResultMap">
select select
sod.id, sod.order_id, sod.device_no, sod.device_type, sod.install_location, sod.sort, sod.id, sod.order_id, sod.device_no, sod.device_type, sod.install_location, sod.sort,
sod.repair_type, sdd.data_value as deviceTypeName sdd.data_value as deviceTypeName
from sys_order_device sod from sys_order_device sod
LEFT JOIN sys_dict_data sdd ON sod.device_type = sdd.data_key LEFT JOIN sys_dict_data sdd ON sod.device_type = sdd.data_key
where order_id = #{orderId,jdbcType=INTEGER} where order_id = #{orderId,jdbcType=INTEGER}
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
id, order_id, supplier, supplier_type, choose_supplier, create_time,update_time id, order_id, supplier, supplier_type, choose_supplier, create_time,update_time
</sql> </sql>
<parameterMap id="SysOrderDeviceSupplier" type="com.glsx.ordercenter.pojo.SysOrderDeviceSupplier"/>
<select id="getDeviceSupplierByType" resultMap="BaseResultMap"> <select id="getDeviceSupplierByType" resultMap="BaseResultMap">
select select
...@@ -31,6 +32,42 @@ ...@@ -31,6 +32,42 @@
</foreach> </foreach>
</insert> </insert>
<update id="updateByPrimaryKey" parameterMap="SysOrderDeviceSupplier">
update sys_order_device_supplier
<set>
<if test="supplier != null">
supplier = #{supplier},
</if>
<if test="supplierType != null">
supplier_type = #{supplierType},
</if>
<if test="chooseSupplier != null">
choose_supplier = #{chooseSupplier},
</if>
</set>
where order_id = #{orderId}
</update>
<update id="batchUpdateSupplier" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
update sys_order_device_supplier
<trim prefix="set" suffixOverrides=",">
<if test="item.supplier !=null and item.supplier != ''" >
supplier = #{item.supplier},
</if>
<if test="item.supplierType !=null and item.supplierType != ''" >
supplier_type = #{item.supplierType},
</if>
<if test="item.chooseSupplier !=null and item.chooseSupplier != ''" >
choose_supplier = #{item.chooseSupplier},
</if>
</trim>
where order_id = #{item.orderId} AND supplier_type = #{item.supplierType}
</foreach>
</update>
<select id="getSupplierByOrderId" resultMap="BaseResultMap"> <select id="getSupplierByOrderId" resultMap="BaseResultMap">
SELECT id, order_id, supplier, supplier_type, choose_supplier FROM sys_order_device_supplier WHERE order_id=#{order_id} SELECT id, order_id, supplier, supplier_type, choose_supplier FROM sys_order_device_supplier WHERE order_id=#{order_id}
</select> </select>
......
...@@ -1720,7 +1720,7 @@ ...@@ -1720,7 +1720,7 @@
</update> </update>
<select id="queryOrderByWorkOrderNo" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="queryOrderByWorkOrderNo" parameterType="java.lang.String" resultMap="BaseResultMap">
SELECT id,order_sn,active_status,canceled,order_type FROM sys_order WHERE canceled = 1 AND work_order_no = #{workOrderNo} order by create_time desc SELECT id,order_sn,active_status,canceled,order_type FROM sys_order WHERE canceled = 1 AND work_order_no = #{workOrderNo} order by id ,create_time desc
</select> </select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!