|
@@ -22,6 +22,7 @@
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
<result property="reason" column="reason"/>
|
|
<result property="reason" column="reason"/>
|
|
|
|
+ <result property="version" column="version"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<select id="getListAll" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
<select id="getListAll" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
@@ -35,6 +36,7 @@
|
|
a.examine_status as examineStatus,
|
|
a.examine_status as examineStatus,
|
|
a.remark as remark,
|
|
a.remark as remark,
|
|
a.time as time,
|
|
a.time as time,
|
|
|
|
+ a.whether as whether,
|
|
CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
from g_order a
|
|
from g_order a
|
|
left join g_house b on a.house_id = b.id
|
|
left join g_house b on a.house_id = b.id
|
|
@@ -73,7 +75,7 @@
|
|
and a.house_id = #{p.houseId}
|
|
and a.house_id = #{p.houseId}
|
|
</if>
|
|
</if>
|
|
<if test="p.jobNum != null and p.jobNum != ''">
|
|
<if test="p.jobNum != null and p.jobNum != ''">
|
|
- AND u.job_num like CONCAT(CONCAT(#{p.jobNum}), '%')
|
|
|
|
|
|
+ AND SUBSTRING(u.job_num, 1,4) like CONCAT(CONCAT(#{p.jobNum}), '%')
|
|
</if>
|
|
</if>
|
|
<if test=" p.starTime != null">
|
|
<if test=" p.starTime != null">
|
|
and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> DATE_FORMAT(#{p.starTime},'%Y-%m-%d 00:00:00')
|
|
and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> DATE_FORMAT(#{p.starTime},'%Y-%m-%d 00:00:00')
|
|
@@ -93,8 +95,9 @@
|
|
a.order_status as orderStatus,
|
|
a.order_status as orderStatus,
|
|
a.examine_status as examineStatus,
|
|
a.examine_status as examineStatus,
|
|
a.remark as remark,
|
|
a.remark as remark,
|
|
- a.time as time,
|
|
|
|
|
|
+ a.time as exportTime,
|
|
CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house,
|
|
CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house,
|
|
|
|
+ a.whether as whether,
|
|
a.house_id as houseId
|
|
a.house_id as houseId
|
|
from g_order a
|
|
from g_order a
|
|
left join g_house b on a.house_id = b.id
|
|
left join g_house b on a.house_id = b.id
|
|
@@ -133,7 +136,7 @@
|
|
and a.house_id = #{p.houseId}
|
|
and a.house_id = #{p.houseId}
|
|
</if>
|
|
</if>
|
|
<if test="p.jobNum != null and p.jobNum != ''">
|
|
<if test="p.jobNum != null and p.jobNum != ''">
|
|
- AND u.job_num like CONCAT(CONCAT(#{p.jobNum}), '%')
|
|
|
|
|
|
+ AND SUBSTRING(u.job_num, 1,4) like CONCAT(CONCAT(#{p.jobNum}), '%')
|
|
</if>
|
|
</if>
|
|
<if test=" p.starTime != null">
|
|
<if test=" p.starTime != null">
|
|
and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> DATE_FORMAT(#{p.starTime},'%Y-%m-%d 00:00:00')
|
|
and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> DATE_FORMAT(#{p.starTime},'%Y-%m-%d 00:00:00')
|
|
@@ -154,12 +157,14 @@
|
|
a.examine_status as examineStatus,
|
|
a.examine_status as examineStatus,
|
|
a.remark as remark,
|
|
a.remark as remark,
|
|
a.time as time,
|
|
a.time as time,
|
|
|
|
+ a.whether as whether,
|
|
CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
from g_order a
|
|
from g_order a
|
|
left join g_house b on a.house_id = b.id
|
|
left join g_house b on a.house_id = b.id
|
|
left join g_unit c on b.unit_id = c.id
|
|
left join g_unit c on b.unit_id = c.id
|
|
left join g_building d on c.building_id = d.id
|
|
left join g_building d on c.building_id = d.id
|
|
left join g_area e on d.area_id = e.id
|
|
left join g_area e on d.area_id = e.id
|
|
|
|
+ left join g_user u on a.user_id = u.id
|
|
where a.del_flag = '0' and a.order_status = '001'
|
|
where a.del_flag = '0' and a.order_status = '001'
|
|
and b.del_flag = '0'
|
|
and b.del_flag = '0'
|
|
and c.del_flag = '0'
|
|
and c.del_flag = '0'
|
|
@@ -178,6 +183,9 @@
|
|
<if test="p.examineStatus != null and p.examineStatus != ''">
|
|
<if test="p.examineStatus != null and p.examineStatus != ''">
|
|
and a.examine_status = #{p.examineStatus}
|
|
and a.examine_status = #{p.examineStatus}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="p.jobNum != null and p.jobNum != ''">
|
|
|
|
+ AND SUBSTRING(u.job_num, 1,4) like CONCAT(CONCAT(#{p.jobNum}), '%')
|
|
|
|
+ </if>
|
|
order by time desc
|
|
order by time desc
|
|
</select>
|
|
</select>
|
|
<select id="getById" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
<select id="getById" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
@@ -287,6 +295,7 @@
|
|
a.examine_status as examineStatus,
|
|
a.examine_status as examineStatus,
|
|
a.remark as remark,
|
|
a.remark as remark,
|
|
a.time as time,
|
|
a.time as time,
|
|
|
|
+ a.whether as whether,
|
|
CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
from g_order a
|
|
from g_order a
|
|
left join g_house b on a.house_id = b.id
|
|
left join g_house b on a.house_id = b.id
|
|
@@ -312,6 +321,7 @@
|
|
a.remark as remark,
|
|
a.remark as remark,
|
|
a.time as time,
|
|
a.time as time,
|
|
a.update_time as updateTime,
|
|
a.update_time as updateTime,
|
|
|
|
+ a.whether as whether,
|
|
CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
from g_order a
|
|
from g_order a
|
|
left join g_house b on a.house_id = b.id
|
|
left join g_house b on a.house_id = b.id
|
|
@@ -351,12 +361,59 @@
|
|
</if>
|
|
</if>
|
|
order by a.update_time desc
|
|
order by a.update_time desc
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="getListAnJianExport" resultType="com.ruoyi.gas.domain.vo.GOrderExportVoAnJian">
|
|
|
|
+ select a.id as id,
|
|
|
|
+ (select name from g_user where id = a.user_id) as userName,
|
|
|
|
+ a.remark as remark,
|
|
|
|
+ a.time as time,
|
|
|
|
+ a.update_time as updateTime,
|
|
|
|
+ CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house,
|
|
|
|
+ a.whether as whether
|
|
|
|
+ from g_order a
|
|
|
|
+ left join g_house b on a.house_id = b.id
|
|
|
|
+ left join g_unit c on b.unit_id = c.id
|
|
|
|
+ left join g_building d on c.building_id = d.id
|
|
|
|
+ left join g_area e on d.area_id = e.id
|
|
|
|
+ left join g_user u on a.user_id = u.id
|
|
|
|
+ where a.del_flag = '0'
|
|
|
|
+ and b.del_flag = '0'
|
|
|
|
+ and c.del_flag = '0'
|
|
|
|
+ and d.del_flag = '0'
|
|
|
|
+ and e.del_flag = '0'
|
|
|
|
+ and a.service_type ='004'
|
|
|
|
+ <if test="p.userId != null and p.userId != ''">
|
|
|
|
+ and a.user_id = #{p.userId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.areaId != null and p.areaId != ''">
|
|
|
|
+ and e.id = #{p.areaId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.buildingId != null and p.buildingId != ''">
|
|
|
|
+ and d.id = #{p.buildingId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.unitId != null and p.unitId != ''">
|
|
|
|
+ and c.id = #{p.unitId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.houseId != null and p.houseId != ''">
|
|
|
|
+ and a.house_id = #{p.houseId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.jobNum != null and p.jobNum != ''">
|
|
|
|
+ AND u.job_num like CONCAT(CONCAT(#{p.jobNum}), '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test=" p.starTime != null">
|
|
|
|
+ and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> DATE_FORMAT(#{p.starTime},'%Y-%m-%d 00:00:00')
|
|
|
|
+ </if>
|
|
|
|
+ <if test=" p.endTime != null">
|
|
|
|
+ and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> DATE_FORMAT(#{p.endTime},'%Y-%m-%d 23:59:59')
|
|
|
|
+ </if>
|
|
|
|
+ order by a.update_time desc,userName
|
|
|
|
+ </select>
|
|
<select id="getListWeiXiu" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
<select id="getListWeiXiu" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
select a.id as id,
|
|
select a.id as id,
|
|
(select name from g_user where id = a.user_id) as userName,
|
|
(select name from g_user where id = a.user_id) as userName,
|
|
a.remark as remark,
|
|
a.remark as remark,
|
|
a.time as time,
|
|
a.time as time,
|
|
a.update_time as updateTime,
|
|
a.update_time as updateTime,
|
|
|
|
+ a.whether as whether,
|
|
CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
from g_order a
|
|
from g_order a
|
|
left join g_house b on a.house_id = b.id
|
|
left join g_house b on a.house_id = b.id
|
|
@@ -396,6 +453,52 @@
|
|
</if>
|
|
</if>
|
|
order by a.update_time desc
|
|
order by a.update_time desc
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="getListWeiXiuExport" resultType="com.ruoyi.gas.domain.vo.GOrderExportVoWeiXiu">
|
|
|
|
+ select a.id as id,
|
|
|
|
+ (select name from g_user where id = a.user_id) as userName,
|
|
|
|
+ a.remark as remark,
|
|
|
|
+ a.time as time,
|
|
|
|
+ a.update_time as updateTime,
|
|
|
|
+ CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house,
|
|
|
|
+ a.whether as whether
|
|
|
|
+ from g_order a
|
|
|
|
+ left join g_house b on a.house_id = b.id
|
|
|
|
+ left join g_unit c on b.unit_id = c.id
|
|
|
|
+ left join g_building d on c.building_id = d.id
|
|
|
|
+ left join g_area e on d.area_id = e.id
|
|
|
|
+ left join g_user u on a.user_id = u.id
|
|
|
|
+ where a.del_flag = '0'
|
|
|
|
+ and b.del_flag = '0'
|
|
|
|
+ and c.del_flag = '0'
|
|
|
|
+ and d.del_flag = '0'
|
|
|
|
+ and e.del_flag = '0'
|
|
|
|
+ and a.service_type ='005'
|
|
|
|
+ <if test="p.userId != null and p.userId != ''">
|
|
|
|
+ and a.user_id = #{p.userId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.areaId != null and p.areaId != ''">
|
|
|
|
+ and e.id = #{p.areaId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.buildingId != null and p.buildingId != ''">
|
|
|
|
+ and d.id = #{p.buildingId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.unitId != null and p.unitId != ''">
|
|
|
|
+ and c.id = #{p.unitId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.houseId != null and p.houseId != ''">
|
|
|
|
+ and a.house_id = #{p.houseId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.jobNum != null and p.jobNum != ''">
|
|
|
|
+ AND u.job_num like CONCAT(CONCAT(#{p.jobNum}), '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test=" p.starTime != null">
|
|
|
|
+ and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> DATE_FORMAT(#{p.starTime},'%Y-%m-%d 00:00:00')
|
|
|
|
+ </if>
|
|
|
|
+ <if test=" p.endTime != null">
|
|
|
|
+ and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> DATE_FORMAT(#{p.endTime},'%Y-%m-%d 23:59:59')
|
|
|
|
+ </if>
|
|
|
|
+ order by a.update_time desc,userName
|
|
|
|
+ </select>
|
|
<select id="getListKaiShuan" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
<select id="getListKaiShuan" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
select a.id as id,
|
|
select a.id as id,
|
|
(select name from g_user where id = a.user_id) as userName,
|
|
(select name from g_user where id = a.user_id) as userName,
|