|
@@ -3,7 +3,7 @@
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ruoyi.project.invoice.mapper.TInvoiceBookingworkticketMapper">
|
|
<mapper namespace="com.ruoyi.project.invoice.mapper.TInvoiceBookingworkticketMapper">
|
|
-
|
|
|
|
|
|
+
|
|
<resultMap type="TInvoiceBookingworkticket" id="TInvoiceBookingworkticketResult">
|
|
<resultMap type="TInvoiceBookingworkticket" id="TInvoiceBookingworkticketResult">
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
<result property="workUnit" column="work_unit" />
|
|
<result property="workUnit" column="work_unit" />
|
|
@@ -28,6 +28,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="userUnit" column="user_unit" />
|
|
<result property="userUnit" column="user_unit" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
+ <resultMap type="TInvoiceBookingworkticketVo" id="TInvoiceBookingworkticketResultVo">
|
|
|
|
+ <result property="workUnit" column="work_unit" />
|
|
|
|
+ <result property="workArea" column="work_area" />
|
|
|
|
+ <result property="floorLocation" column="floor_location" />
|
|
|
|
+ <result property="workStartTime" column="work_start_time" />
|
|
|
|
+ <result property="workEndTime" column="work_end_time" />
|
|
|
|
+ <result property="contact" column="contact" />
|
|
|
|
+ <result property="phonenumber" column="phonenumber" />
|
|
|
|
+ <result property="workType" column="work_type" />
|
|
|
|
+ <result property="riskLevel" column="risk_level" />
|
|
|
|
+ <result property="workDescription" column="work_description" />
|
|
|
|
+ <result property="workPeopleNumber" column="work_people_number" />
|
|
|
|
+ <result property="estimateWorktime" column="estimate_worktime" />
|
|
|
|
+ <result property="status" column="status" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
<sql id="selectTInvoiceBookingworkticketVo">
|
|
<sql id="selectTInvoiceBookingworkticketVo">
|
|
select d.id, d.work_unit, d.work_area, d.unit_number, d.floor_location, d.work_start_time, d.work_end_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.contact, d.phonenumber, d.status, d.dept_id, d.user_mg ,d.user_unit,s.dept_name,d.filename,d.reservation_number from t_invoice_bookingworkticket d
|
|
select d.id, d.work_unit, d.work_area, d.unit_number, d.floor_location, d.work_start_time, d.work_end_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.contact, d.phonenumber, d.status, d.dept_id, d.user_mg ,d.user_unit,s.dept_name,d.filename,d.reservation_number from t_invoice_bookingworkticket d
|
|
left join sys_dept s on s.dept_id = d.dept_id
|
|
left join sys_dept s on s.dept_id = d.dept_id
|
|
@@ -35,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectTInvoiceBookingworkticketList" parameterType="TInvoiceBookingworkticket" resultMap="TInvoiceBookingworkticketResult">
|
|
<select id="selectTInvoiceBookingworkticketList" parameterType="TInvoiceBookingworkticket" resultMap="TInvoiceBookingworkticketResult">
|
|
<include refid="selectTInvoiceBookingworkticketVo"/>
|
|
<include refid="selectTInvoiceBookingworkticketVo"/>
|
|
- <where>
|
|
|
|
|
|
+ <where>
|
|
<if test="workUnit != null "> and work_unit = #{workUnit}</if>
|
|
<if test="workUnit != null "> and work_unit = #{workUnit}</if>
|
|
<if test="workArea != null "> and work_area = #{workArea}</if>
|
|
<if test="workArea != null "> and work_area = #{workArea}</if>
|
|
<if test="unitNumber != null "> and unit_number = #{unitNumber}</if>
|
|
<if test="unitNumber != null "> and unit_number = #{unitNumber}</if>
|
|
@@ -59,13 +75,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<!-- 数据范围过滤 -->
|
|
<!-- 数据范围过滤 -->
|
|
${params.dataScope}
|
|
${params.dataScope}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ <select id="selectDetailById" parameterType="Long" resultMap="TInvoiceBookingworkticketResultVo">
|
|
|
|
+ select a.work_unit,a.work_area,a.floor_location,a.work_start_time,a.work_end_time,a.status,b.work_type,b.risk_level,b.work_description,b.work_people_number,b.estimate_worktime,a.contact,a.phonenumber
|
|
|
|
+ from t_invoice_bookingworkticket a,t_invoice_workcontent b
|
|
|
|
+ where a.id=b.bookingticket_id and a.id=#{id} and a.del_flag = 0
|
|
|
|
+ </select>
|
|
|
|
+
|
|
<select id="selectTInvoiceBookingworkticketById" parameterType="Long" resultMap="TInvoiceBookingworkticketResult">
|
|
<select id="selectTInvoiceBookingworkticketById" parameterType="Long" resultMap="TInvoiceBookingworkticketResult">
|
|
<include refid="selectTInvoiceBookingworkticketVo"/>
|
|
<include refid="selectTInvoiceBookingworkticketVo"/>
|
|
where id = #{id}
|
|
where id = #{id}
|
|
and d.del_flag = 0
|
|
and d.del_flag = 0
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<insert id="insertTInvoiceBookingworkticket" parameterType="TInvoiceBookingworkticket" useGeneratedKeys = "true" keyProperty = "id">
|
|
<insert id="insertTInvoiceBookingworkticket" parameterType="TInvoiceBookingworkticket" useGeneratedKeys = "true" keyProperty = "id">
|
|
<selectKey keyProperty="id" resultType="long" order="BEFORE">
|
|
<selectKey keyProperty="id" resultType="long" order="BEFORE">
|
|
SELECT t_bookingworkticket_seq.NEXTVAL as id FROM DUAL
|
|
SELECT t_bookingworkticket_seq.NEXTVAL as id FROM DUAL
|
|
@@ -153,5 +175,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
</update>
|
|
</update>
|
|
-
|
|
|
|
-</mapper>
|
|
|
|
|
|
+
|
|
|
|
+</mapper>
|