|
@@ -1,113 +1,160 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
<!DOCTYPE mapper
|
|
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
+ "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="workUnit" column="work_unit" />
|
|
|
|
- <result property="workArea" column="work_area" />
|
|
|
|
- <result property="unitNumber" column="unit_number" />
|
|
|
|
- <result property="floorLocation" column="floor_location" />
|
|
|
|
- <result property="workStartTime" column="work_start_time" />
|
|
|
|
- <result property="workEndTime" column="work_end_time" />
|
|
|
|
- <result property="delFlag" column="del_flag" />
|
|
|
|
- <result property="createrCode" column="creater_code" />
|
|
|
|
- <result property="createdate" column="createdate" />
|
|
|
|
- <result property="updaterCode" column="updater_code" />
|
|
|
|
- <result property="updatedate" column="updatedate" />
|
|
|
|
- <result property="contact" column="contact" />
|
|
|
|
- <result property="phonenumber" column="phonenumber" />
|
|
|
|
- <result property="status" column="status" />
|
|
|
|
- <result property="deptId" column="dept_id" />
|
|
|
|
- <result property="userMg" column="user_mg" />
|
|
|
|
- <result property="deptName" column="dept_name" />
|
|
|
|
- <result property="reservationNumber" column="reservation_number" />
|
|
|
|
- <result property="filename" column="filename" />
|
|
|
|
- <result property="userUnit" column="user_unit" />
|
|
|
|
|
|
+ <result property="id" column="id"/>
|
|
|
|
+ <result property="workUnit" column="work_unit"/>
|
|
|
|
+ <result property="workArea" column="work_area"/>
|
|
|
|
+ <result property="unitNumber" column="unit_number"/>
|
|
|
|
+ <result property="floorLocation" column="floor_location"/>
|
|
|
|
+ <result property="workStartTime" column="work_start_time"/>
|
|
|
|
+ <result property="workEndTime" column="work_end_time"/>
|
|
|
|
+ <result property="delFlag" column="del_flag"/>
|
|
|
|
+ <result property="createrCode" column="creater_code"/>
|
|
|
|
+ <result property="createdate" column="createdate"/>
|
|
|
|
+ <result property="updaterCode" column="updater_code"/>
|
|
|
|
+ <result property="updatedate" column="updatedate"/>
|
|
|
|
+ <result property="contact" column="contact"/>
|
|
|
|
+ <result property="phonenumber" column="phonenumber"/>
|
|
|
|
+ <result property="status" column="status"/>
|
|
|
|
+ <result property="deptId" column="dept_id"/>
|
|
|
|
+ <result property="userMg" column="user_mg"/>
|
|
|
|
+ <result property="deptName" column="dept_name"/>
|
|
|
|
+ <result property="reservationNumber" column="reservation_number"/>
|
|
|
|
+ <result property="filename" column="filename"/>
|
|
|
|
+ <result property="userUnit" column="user_unit"/>
|
|
<!--关联属性的映射关系-->
|
|
<!--关联属性的映射关系-->
|
|
<!-- column: 对应的外键。 -->
|
|
<!-- column: 对应的外键。 -->
|
|
- <!-- <collection property="tInvoiceWorkcontentList" ofType="TInvoiceWorkcontent" column="id"
|
|
|
|
- select="getWorkcontentList"></collection>-->
|
|
|
|
|
|
+ <!-- <collection property="tInvoiceWorkcontentList" ofType="TInvoiceWorkcontent" column="id"
|
|
|
|
+ select="getWorkcontentList"></collection>-->
|
|
|
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<resultMap type="TInvoiceBookingworkticketVo" id="TInvoiceBookingworkticketResultVo">
|
|
<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" />
|
|
|
|
- <result property="bookingticketId" column="id" />
|
|
|
|
|
|
+ <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"/>
|
|
|
|
+ <result property="bookingticketId" column="id"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<resultMap type="TInvoiceWorkcontent" id="TInvoiceWorkcontentResult">
|
|
<resultMap type="TInvoiceWorkcontent" id="TInvoiceWorkcontentResult">
|
|
- <result property="id" column="id" />
|
|
|
|
- <result property="delFlag" column="del_flag" />
|
|
|
|
- <result property="createrCode" column="creater_code" />
|
|
|
|
- <result property="createdate" column="createdate" />
|
|
|
|
- <result property="updaterCode" column="updater_code" />
|
|
|
|
- <result property="updatedate" column="updatedate" />
|
|
|
|
- <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="hpjb" column="hpjb" />
|
|
|
|
- <result property="estimateWorktime" column="estimate_worktime" />
|
|
|
|
- <result property="bookingticketId" column="bookingticket_id" />
|
|
|
|
- <result property="deptId" column="dept_id" />
|
|
|
|
- <result property="deptName" column="dept_name" />
|
|
|
|
- <result property="reservationNumber" column="reservation_number" />
|
|
|
|
- <result property="whgzxkzh" column="whgzxkzh" />
|
|
|
|
- <result property="dhzyxkzh" column="dhzyxkzh" />
|
|
|
|
- <result property="xzkjxkzh" column="xzkjxkzh" />
|
|
|
|
- <result property="mbzyxkzh" column="mbzyxkzh" />
|
|
|
|
- <result property="gczyxkzh" column="gczyxkzh" />
|
|
|
|
- <result property="gczyjb" column="gczyjb" />
|
|
|
|
|
|
+ <result property="id" column="id"/>
|
|
|
|
+ <result property="delFlag" column="del_flag"/>
|
|
|
|
+ <result property="createrCode" column="creater_code"/>
|
|
|
|
+ <result property="createdate" column="createdate"/>
|
|
|
|
+ <result property="updaterCode" column="updater_code"/>
|
|
|
|
+ <result property="updatedate" column="updatedate"/>
|
|
|
|
+ <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="hpjb" column="hpjb"/>
|
|
|
|
+ <result property="estimateWorktime" column="estimate_worktime"/>
|
|
|
|
+ <result property="bookingticketId" column="bookingticket_id"/>
|
|
|
|
+ <result property="deptId" column="dept_id"/>
|
|
|
|
+ <result property="deptName" column="dept_name"/>
|
|
|
|
+ <result property="reservationNumber" column="reservation_number"/>
|
|
|
|
+ <result property="whgzxkzh" column="whgzxkzh"/>
|
|
|
|
+ <result property="dhzyxkzh" column="dhzyxkzh"/>
|
|
|
|
+ <result property="xzkjxkzh" column="xzkjxkzh"/>
|
|
|
|
+ <result property="mbzyxkzh" column="mbzyxkzh"/>
|
|
|
|
+ <result property="gczyxkzh" column="gczyxkzh"/>
|
|
|
|
+ <result property="gczyjb" column="gczyjb"/>
|
|
</resultMap>
|
|
</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
|
|
|
|
- left join sys_dept s on s.dept_id = d.dept_id
|
|
|
|
|
|
+ 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
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<sql id="selectTInvoiceWorkcontentVo">
|
|
<sql id="selectTInvoiceWorkcontentVo">
|
|
- select d.id, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.work_type, d.risk_level, d.work_description, d.work_people_number, d.hpjb, d.estimate_worktime, d.bookingticket_id, d.dept_id ,d.reservation_number,s.dept_name,
|
|
|
|
- d.whgzxkzh,d.dhzyxkzh,d.xzkjxkzh,d.mbzyxkzh,d.gczyxkzh,d.gczyjb,d.tag,d.yqxkzh,d.xpxp from t_invoice_workcontent d
|
|
|
|
- left join sys_dept s on s.dept_id = d.dept_id left join t_invoice_bookingworkticket b on d.bookingticket_id =b.id
|
|
|
|
|
|
+ select d.id,
|
|
|
|
+ d.del_flag,
|
|
|
|
+ d.creater_code,
|
|
|
|
+ d.createdate,
|
|
|
|
+ d.updater_code,
|
|
|
|
+ d.updatedate,
|
|
|
|
+ d.work_type,
|
|
|
|
+ d.risk_level,
|
|
|
|
+ d.work_description,
|
|
|
|
+ d.work_people_number,
|
|
|
|
+ d.hpjb,
|
|
|
|
+ d.estimate_worktime,
|
|
|
|
+ d.bookingticket_id,
|
|
|
|
+ d.dept_id,
|
|
|
|
+ d.reservation_number,
|
|
|
|
+ s.dept_name,
|
|
|
|
+ d.whgzxkzh,
|
|
|
|
+ d.dhzyxkzh,
|
|
|
|
+ d.xzkjxkzh,
|
|
|
|
+ d.mbzyxkzh,
|
|
|
|
+ d.gczyxkzh,
|
|
|
|
+ d.gczyjb,
|
|
|
|
+ d.tag,
|
|
|
|
+ d.yqxkzh,
|
|
|
|
+ d.xpxp
|
|
|
|
+ from t_invoice_workcontent d
|
|
|
|
+ left join sys_dept s on s.dept_id = d.dept_id
|
|
|
|
+ left join t_invoice_bookingworkticket b on d.bookingticket_id = b.id
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
- <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 workUnit != ''"> and work_unit like concat(concat('%', #{workUnit}), '%')</if>
|
|
|
|
- <if test="workArea != null and workArea != ''"> and work_area = #{workArea}</if>
|
|
|
|
- <if test="unitNumber != null and unitNumber != ''"> and unit_number = #{unitNumber}</if>
|
|
|
|
- <if test="floorLocation != null and floorLocation != ''"> and floor_location = #{floorLocation}</if>
|
|
|
|
- <if test="workStartTime != null "> and work_start_time = #{workStartTime}</if>
|
|
|
|
- <if test="workEndTime != null "> and work_end_time = #{workEndTime}</if>
|
|
|
|
- <if test="createrCode != null and createrCode != ''"> and creater_code = #{createrCode}</if>
|
|
|
|
- <if test="createdate != null "> and createdate = #{createdate}</if>
|
|
|
|
- <if test="updaterCode != null and updaterCode != ''"> and updater_code = #{updaterCode}</if>
|
|
|
|
- <if test="updatedate != null "> and updatedate = #{updatedate}</if>
|
|
|
|
- <if test="contact != null and contact != ''"> and contact = #{contact}</if>
|
|
|
|
- <if test="phonenumber != null and phonenumber != ''"> and phonenumber = #{phonenumber}</if>
|
|
|
|
- <if test="status != null "> and status = #{status}</if>
|
|
|
|
- <if test="deptId != null "> and dept_id = #{deptId}</if>
|
|
|
|
- <if test="userMg != null "> and user_mg = #{userMg}</if>
|
|
|
|
- <if test="userUnit != null "> and user_unit = #{userUnit}</if>
|
|
|
|
- <if test="reservationNumber != null "> and reservation_number = #{reservationNumber}</if>
|
|
|
|
- <if test="filename != null and filename != ''"> and filename like concat(concat('%', #{filename}), '%')</if>
|
|
|
|
- <if test="workType != null "> and b.work_type = #{workType}</if>
|
|
|
|
|
|
+ <if test="workUnit != null and workUnit != ''">and work_unit like concat(concat('%', #{workUnit}), '%')</if>
|
|
|
|
+ <if test="workArea != null and workArea != ''">and work_area = #{workArea}</if>
|
|
|
|
+ <if test="unitNumber != null and unitNumber != ''">and unit_number = #{unitNumber}</if>
|
|
|
|
+ <if test="floorLocation != null and floorLocation != ''">and floor_location = #{floorLocation}</if>
|
|
|
|
+ <if test="workStartTime != null ">and work_start_time = #{workStartTime}</if>
|
|
|
|
+ <if test="workEndTime != null ">and work_end_time = #{workEndTime}</if>
|
|
|
|
+ <if test="createrCode != null and createrCode != ''">and creater_code = #{createrCode}</if>
|
|
|
|
+ <if test="createdate != null ">and createdate = #{createdate}</if>
|
|
|
|
+ <if test="updaterCode != null and updaterCode != ''">and updater_code = #{updaterCode}</if>
|
|
|
|
+ <if test="updatedate != null ">and updatedate = #{updatedate}</if>
|
|
|
|
+ <if test="contact != null and contact != ''">and contact = #{contact}</if>
|
|
|
|
+ <if test="phonenumber != null and phonenumber != ''">and phonenumber = #{phonenumber}</if>
|
|
|
|
+ <if test="status != null ">and status = #{status}</if>
|
|
|
|
+ <if test="deptId != null ">and dept_id = #{deptId}</if>
|
|
|
|
+ <if test="userMg != null ">and user_mg = #{userMg}</if>
|
|
|
|
+ <if test="userUnit != null ">and user_unit = #{userUnit}</if>
|
|
|
|
+ <if test="reservationNumber != null ">and reservation_number = #{reservationNumber}</if>
|
|
|
|
+ <if test="filename != null and filename != ''">and filename like concat(concat('%', #{filename}), '%')</if>
|
|
|
|
+ <if test="workType != null ">and b.work_type = #{workType}</if>
|
|
and d.del_flag = 0
|
|
and d.del_flag = 0
|
|
</where>
|
|
</where>
|
|
<!-- 数据范围过滤 -->
|
|
<!-- 数据范围过滤 -->
|
|
@@ -115,35 +162,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 新的list方法 -->
|
|
<!-- 新的list方法 -->
|
|
- <select id="selectTInvoiceWorkcontentList" parameterType="TInvoiceBookingworkticket" resultMap="TInvoiceWorkcontentResult">
|
|
|
|
|
|
+ <select id="selectTInvoiceWorkcontentList" parameterType="TInvoiceBookingworkticket"
|
|
|
|
+ resultMap="TInvoiceWorkcontentResult">
|
|
<include refid="selectTInvoiceWorkcontentVo"/>
|
|
<include refid="selectTInvoiceWorkcontentVo"/>
|
|
<where>
|
|
<where>
|
|
- <if test="createrCode != null "> and creater_code = #{createrCode} </if>
|
|
|
|
- <if test="createdate != null "> and to_char(b.createdate, 'yyyy-mm-dd') = to_char(#{createdate}, 'yyyy-mm-dd')</if>
|
|
|
|
- <if test="updaterCode != null "> and updater_code = #{updaterCode}</if>
|
|
|
|
- <if test="updatedate != null "> and updatedate = #{updatedate}</if>
|
|
|
|
- <if test="workType != null "> and FIND_IN_SET (#{workType},d.work_type) >0</if>
|
|
|
|
- <!-- <!– <if test="riskLevel != null "> and risk_level = #{riskLevel}</if>–>
|
|
|
|
- <if test="workDescription != null and workDescription != ''"> and work_description = #{workDescription}</if>
|
|
|
|
- <if test="workPeopleNumber != null "> and work_people_number = #{workPeopleNumber}</if>
|
|
|
|
- <if test="guardianUnit != null and guardianUnit != ''"> and guardian_unit = #{guardianUnit}</if>
|
|
|
|
- <if test="estimateWorktime != null and estimateWorktime != ''"> and estimate_worktime = #{estimateWorktime}</if>
|
|
|
|
- <if test="bookingticketId != null "> and bookingticket_id = #{bookingticketId}</if>
|
|
|
|
- <if test="reservationNumber != null and reservationNumber != ''"> and reservation_number = #{reservationNumber}</if>
|
|
|
|
- <if test="deptId != null "> and dept_id = #{deptId}</if>-->
|
|
|
|
|
|
+ <if test="createrCode != null ">and creater_code = #{createrCode}</if>
|
|
|
|
+ <if test="createdate != null ">and to_char(b.createdate, 'yyyy-mm-dd') = to_char(#{createdate},
|
|
|
|
+ 'yyyy-mm-dd')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updaterCode != null ">and updater_code = #{updaterCode}</if>
|
|
|
|
+ <if test="updatedate != null ">and updatedate = #{updatedate}</if>
|
|
|
|
+ <if test="workType != null ">and FIND_IN_SET (#{workType},d.work_type) >0</if>
|
|
|
|
+ <!-- <!– <if test="riskLevel != null "> and risk_level = #{riskLevel}</if>–>
|
|
|
|
+ <if test="workDescription != null and workDescription != ''"> and work_description = #{workDescription}</if>
|
|
|
|
+ <if test="workPeopleNumber != null "> and work_people_number = #{workPeopleNumber}</if>
|
|
|
|
+ <if test="guardianUnit != null and guardianUnit != ''"> and guardian_unit = #{guardianUnit}</if>
|
|
|
|
+ <if test="estimateWorktime != null and estimateWorktime != ''"> and estimate_worktime = #{estimateWorktime}</if>
|
|
|
|
+ <if test="bookingticketId != null "> and bookingticket_id = #{bookingticketId}</if>
|
|
|
|
+ <if test="reservationNumber != null and reservationNumber != ''"> and reservation_number = #{reservationNumber}</if>
|
|
|
|
+ <if test="deptId != null "> and dept_id = #{deptId}</if>-->
|
|
<if test="workUnit != null and workUnit != ''">and work_unit like concat(concat('%', #{workUnit}), '%')</if>
|
|
<if test="workUnit != null and workUnit != ''">and work_unit like concat(concat('%', #{workUnit}), '%')</if>
|
|
- <if test="workArea != null and workArea != ''"> and b.work_area = #{workArea}</if>
|
|
|
|
- <if test="floorLocation != null and floorLocation != ''"> and FIND_IN_SET (#{floorLocation},b.floor_location) >0</if>
|
|
|
|
- <if test="workStartTime != null "> and b.work_start_time = #{workStartTime}</if>
|
|
|
|
- <if test="workEndTime != null "> and b.work_end_time = #{workEndTime}</if>
|
|
|
|
- <if test="contact != null and contact != ''"> and b.contact = #{contact}</if>
|
|
|
|
- <if test="phonenumber != null and phonenumber != ''"> and b.phonenumber = #{phonenumber}</if>
|
|
|
|
- <if test="whgzxkzh != null and whgzxkzh != ''"> and whgzxkzh = #{whgzxkzh}</if>
|
|
|
|
- <if test="dhzyxkzh != null and dhzyxkzh != ''"> and dhzyxkzh = #{dhzyxkzh}</if>
|
|
|
|
- <if test="xzkjxkzh != null and xzkjxkzh != ''"> and xzkjxkzh = #{xzkjxkzh}</if>
|
|
|
|
- <if test="mbzyxkzh != null and mbzyxkzh != ''"> and mbzyxkzh = #{mbzyxkzh}</if>
|
|
|
|
- <if test="gczyxkzh != null and gczyxkzh != ''"> and gczyxkzh = #{gczyxkzh}</if>
|
|
|
|
- <if test="gczyjb != null and gczyjb != ''"> and gczyjb = #{gczyjb}</if>
|
|
|
|
|
|
+ <if test="workArea != null and workArea != ''">and b.work_area = #{workArea}</if>
|
|
|
|
+ <if test="floorLocation != null and floorLocation != ''">and FIND_IN_SET (#{floorLocation},b.floor_location)
|
|
|
|
+ >0
|
|
|
|
+ </if>
|
|
|
|
+ <if test="workStartTime != null ">and b.work_start_time = #{workStartTime}</if>
|
|
|
|
+ <if test="workEndTime != null ">and b.work_end_time = #{workEndTime}</if>
|
|
|
|
+ <if test="contact != null and contact != ''">and b.contact = #{contact}</if>
|
|
|
|
+ <if test="phonenumber != null and phonenumber != ''">and b.phonenumber = #{phonenumber}</if>
|
|
|
|
+ <if test="whgzxkzh != null and whgzxkzh != ''">and whgzxkzh = #{whgzxkzh}</if>
|
|
|
|
+ <if test="dhzyxkzh != null and dhzyxkzh != ''">and dhzyxkzh = #{dhzyxkzh}</if>
|
|
|
|
+ <if test="xzkjxkzh != null and xzkjxkzh != ''">and xzkjxkzh = #{xzkjxkzh}</if>
|
|
|
|
+ <if test="mbzyxkzh != null and mbzyxkzh != ''">and mbzyxkzh = #{mbzyxkzh}</if>
|
|
|
|
+ <if test="gczyxkzh != null and gczyxkzh != ''">and gczyxkzh = #{gczyxkzh}</if>
|
|
|
|
+ <if test="gczyjb != null and gczyjb != ''">and gczyjb = #{gczyjb}</if>
|
|
and d.del_flag = 0
|
|
and d.del_flag = 0
|
|
</where>
|
|
</where>
|
|
<!-- 数据范围过滤 -->
|
|
<!-- 数据范围过滤 -->
|
|
@@ -152,10 +204,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectDetailById" parameterType="Long" resultMap="TInvoiceBookingworkticketResultVo">
|
|
<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,a.id
|
|
|
|
- ,b.whgzxkzh,b.dhzyxkzh,b.xzkjxkzh,b.mbzyxkzh,b.gczyxkzh,b.gczyjb,b.tag,b.yqxkzh,b.xpxp
|
|
|
|
- from t_invoice_bookingworkticket a,t_invoice_workcontent b
|
|
|
|
- where a.id=b.bookingticket_id and a.id=#{id} and a.del_flag = 0 and b.del_flag = 0
|
|
|
|
|
|
+ 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
|
|
|
|
+ , a.id
|
|
|
|
+ , b.whgzxkzh
|
|
|
|
+ , b.dhzyxkzh
|
|
|
|
+ , b.xzkjxkzh
|
|
|
|
+ , b.mbzyxkzh
|
|
|
|
+ , b.gczyxkzh
|
|
|
|
+ , b.gczyjb
|
|
|
|
+ , b.tag
|
|
|
|
+ , b.yqxkzh
|
|
|
|
+ , b.xpxp
|
|
|
|
+ from t_invoice_bookingworkticket a,
|
|
|
|
+ t_invoice_workcontent b
|
|
|
|
+ where a.id = b.bookingticket_id
|
|
|
|
+ and a.id = #{id}
|
|
|
|
+ and a.del_flag = 0
|
|
|
|
+ and b.del_flag = 0
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectBookingworkticketById" parameterType="Long" resultMap="TInvoiceBookingworkticketResult">
|
|
<select id="selectBookingworkticketById" parameterType="Long" resultMap="TInvoiceBookingworkticketResult">
|
|
@@ -164,30 +241,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectTInvoiceBookingworkticketById" parameterType="Long" resultMap="TInvoiceBookingworkticketResult">
|
|
<select id="selectTInvoiceBookingworkticketById" parameterType="Long" resultMap="TInvoiceBookingworkticketResult">
|
|
- 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
|
|
|
|
- ,su.nick_name as userSupName,su.PHONENUMBER as userSupPhone ,su2.nick_name as userMgName,su2.PHONENUMBER as userMgPhone
|
|
|
|
|
|
+ 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
|
|
|
|
+ , su.nick_name as userSupName
|
|
|
|
+ , su.PHONENUMBER as userSupPhone
|
|
|
|
+ , su2.nick_name as userMgName
|
|
|
|
+ , su2.PHONENUMBER as userMgPhone
|
|
from t_invoice_bookingworkticket d
|
|
from t_invoice_bookingworkticket d
|
|
- left join sys_dept s on s.dept_id = d.dept_id
|
|
|
|
- left join t_approve_reserve_invoice r on r.invoice_id = d.id
|
|
|
|
- left join sys_user su on r.DEV_SUP_ID = su.user_id
|
|
|
|
- left join sys_user su2 on d.user_mg = su2.user_id
|
|
|
|
|
|
+ left join sys_dept s on s.dept_id = d.dept_id
|
|
|
|
+ left join t_approve_reserve_invoice r on r.invoice_id = d.id
|
|
|
|
+ left join sys_user su on r.DEV_SUP_ID = su.user_id
|
|
|
|
+ left join sys_user su2 on d.user_mg = su2.user_id
|
|
where d.id = #{id}
|
|
where d.id = #{id}
|
|
- and d.del_flag = 0
|
|
|
|
- and r.status != -1
|
|
|
|
|
|
+ and d.del_flag = 0
|
|
|
|
+ and r.status != -1
|
|
and rownum = 1
|
|
and rownum = 1
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <!-- <select id="getWorkcontentList" resultType="TInvoiceWorkcontent" parameterType="int">
|
|
|
|
- SELECT
|
|
|
|
- b.id ,b.work_description, b.work_type , b.bookingticket_id
|
|
|
|
- FROM t_invoice_workcontent b
|
|
|
|
- <where>
|
|
|
|
- b.bookingticket_id = #{id}
|
|
|
|
- <if test="workType != null "> and work_type = #{workType}</if>
|
|
|
|
- </where>
|
|
|
|
- </select>-->
|
|
|
|
|
|
+ <!-- <select id="getWorkcontentList" resultType="TInvoiceWorkcontent" parameterType="int">
|
|
|
|
+ SELECT
|
|
|
|
+ b.id ,b.work_description, b.work_type , b.bookingticket_id
|
|
|
|
+ FROM t_invoice_workcontent b
|
|
|
|
+ <where>
|
|
|
|
+ b.bookingticket_id = #{id}
|
|
|
|
+ <if test="workType != null "> and work_type = #{workType}</if>
|
|
|
|
+ </where>
|
|
|
|
+ </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
|
|
</selectKey>
|
|
</selectKey>
|
|
@@ -212,7 +313,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="userUnit != null">user_unit,</if>
|
|
<if test="userUnit != null">user_unit,</if>
|
|
<if test="reservationNumber != null">reservation_number,</if>
|
|
<if test="reservationNumber != null">reservation_number,</if>
|
|
<if test="filename != null">filename,</if>
|
|
<if test="filename != null">filename,</if>
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="id != null">#{id},</if>
|
|
<if test="workUnit != null">#{workUnit},</if>
|
|
<if test="workUnit != null">#{workUnit},</if>
|
|
@@ -233,7 +334,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="userUnit != null">#{userUnit},</if>
|
|
<if test="userUnit != null">#{userUnit},</if>
|
|
<if test="reservationNumber != null">#{reservationNumber},</if>
|
|
<if test="reservationNumber != null">#{reservationNumber},</if>
|
|
<if test="filename != null">#{filename},</if>
|
|
<if test="filename != null">#{filename},</if>
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="updateTInvoiceBookingworkticket" parameterType="TInvoiceBookingworkticket">
|
|
<update id="updateTInvoiceBookingworkticket" parameterType="TInvoiceBookingworkticket">
|
|
@@ -263,7 +364,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<update id="deleteTInvoiceBookingworkticketById" parameterType="Long">
|
|
<update id="deleteTInvoiceBookingworkticketById" parameterType="Long">
|
|
- update t_invoice_bookingworkticket set del_flag = 2 where id = #{id}
|
|
|
|
|
|
+ update t_invoice_bookingworkticket
|
|
|
|
+ set del_flag = 2
|
|
|
|
+ where id = #{id}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<update id="deleteTInvoiceBookingworkticketByIds" parameterType="String">
|
|
<update id="deleteTInvoiceBookingworkticketByIds" parameterType="String">
|