|
@@ -28,7 +28,7 @@
|
|
|
<select id="getListAll" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
|
select a.id as id,
|
|
|
a.service_type as serviceType,
|
|
|
- (select name from g_user where id = a.user_id) as userName,
|
|
|
+ u.name as userName,
|
|
|
a.pipe_type as pipeType,
|
|
|
a.pipe_length as pipeLength,
|
|
|
a.valve_type as valveType,
|
|
@@ -38,12 +38,13 @@
|
|
|
a.time as time,
|
|
|
a.whether as whether,
|
|
|
a.version as version,
|
|
|
- CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
|
+ CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
|
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 sys_dict_data f on e.district = f.dict_value
|
|
|
left join g_user u on a.user_id = u.id
|
|
|
where a.del_flag = '0'
|
|
|
and b.del_flag = '0'
|
|
@@ -51,6 +52,7 @@
|
|
|
and d.del_flag = '0'
|
|
|
and e.del_flag = '0'
|
|
|
and a.service_type not in ('004','005','006')
|
|
|
+ and f.dict_type='district'
|
|
|
<if test="p.serviceType != null and p.serviceType != ''">
|
|
|
and a.service_type = #{p.serviceType}
|
|
|
</if>
|
|
@@ -84,12 +86,15 @@
|
|
|
<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>
|
|
|
+ <if test=" p.district != null">
|
|
|
+ and e.district = #{p.district}
|
|
|
+ </if>
|
|
|
order by time desc
|
|
|
</select>
|
|
|
<select id="getListExport" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
|
select a.id as id,
|
|
|
a.service_type as serviceType,
|
|
|
- (select name from g_user where id = a.user_id) as userName,
|
|
|
+ u.name as userName,
|
|
|
a.pipe_type as pipeType,
|
|
|
a.pipe_length as pipeLength,
|
|
|
a.valve_type as valveType,
|
|
@@ -97,15 +102,17 @@
|
|
|
a.examine_status as examineStatus,
|
|
|
a.remark as remark,
|
|
|
a.time as exportTime,
|
|
|
- CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house,
|
|
|
+ CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house,
|
|
|
a.whether as whether,
|
|
|
a.version as version,
|
|
|
- a.house_id as houseId
|
|
|
+ a.house_id as houseId,
|
|
|
+ a.reason as reason
|
|
|
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 sys_dict_data f on e.district = f.dict_value
|
|
|
left join g_user u on a.user_id = u.id
|
|
|
where a.del_flag = '0'
|
|
|
and b.del_flag = '0'
|
|
@@ -113,6 +120,7 @@
|
|
|
and d.del_flag = '0'
|
|
|
and e.del_flag = '0'
|
|
|
and a.service_type not in ('004','005','006')
|
|
|
+ and f.dict_type='district'
|
|
|
<if test="p.serviceType != null and p.serviceType != ''">
|
|
|
and a.service_type = #{p.serviceType}
|
|
|
</if>
|
|
@@ -146,12 +154,15 @@
|
|
|
<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>
|
|
|
+ <if test=" p.district != null">
|
|
|
+ and e.district = #{p.district}
|
|
|
+ </if>
|
|
|
order by time desc
|
|
|
</select>
|
|
|
<select id="getListExamine" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
|
select a.id as id,
|
|
|
a.service_type as serviceType,
|
|
|
- (select name from g_user where id = a.user_id) as userName,
|
|
|
+ u.name as userName,
|
|
|
a.pipe_type as pipeType,
|
|
|
a.pipe_length as pipeLength,
|
|
|
a.valve_type as valveType,
|
|
@@ -161,12 +172,13 @@
|
|
|
a.time as time,
|
|
|
a.whether as whether,
|
|
|
a.version as version,
|
|
|
- CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
|
+ CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
|
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 sys_dict_data f on e.district = f.dict_value
|
|
|
left join g_user u on a.user_id = u.id
|
|
|
where a.del_flag = '0' and a.order_status = '001'
|
|
|
and b.del_flag = '0'
|
|
@@ -174,6 +186,7 @@
|
|
|
and d.del_flag = '0'
|
|
|
and e.del_flag = '0'
|
|
|
and a.service_type not in ('004','005','006')
|
|
|
+ and f.dict_type='district'
|
|
|
<if test="p.serviceType != null and p.serviceType != ''">
|
|
|
and a.service_type = #{p.serviceType}
|
|
|
</if>
|
|
@@ -189,6 +202,9 @@
|
|
|
<if test="p.jobNum != null and p.jobNum != ''">
|
|
|
AND SUBSTRING(u.job_num, 1,4) like CONCAT(CONCAT(#{p.jobNum}), '%')
|
|
|
</if>
|
|
|
+ <if test=" p.district != null">
|
|
|
+ and e.district = #{p.district}
|
|
|
+ </if>
|
|
|
order by time desc
|
|
|
</select>
|
|
|
<select id="getById" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
@@ -294,7 +310,7 @@
|
|
|
<select id="getListByStatus" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
|
select a.id as id,
|
|
|
a.service_type as serviceType,
|
|
|
- (select name from g_user where id = a.user_id) as userName,
|
|
|
+ u.name as userName,
|
|
|
a.pipe_type as pipeType,
|
|
|
a.pipe_length as pipeLength,
|
|
|
a.valve_type as valveType,
|
|
@@ -304,14 +320,16 @@
|
|
|
a.time as time,
|
|
|
a.whether as whether,
|
|
|
a.version as version,
|
|
|
- CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
|
+ CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
|
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 sys_dict_data f on e.district = f.dict_value
|
|
|
where a.del_flag = '0'
|
|
|
and a.service_type not in ('004','005','006')
|
|
|
+ and f.dict_type='district'
|
|
|
<if test="p.areaId != null and p.areaId != ''">
|
|
|
and e.id = #{p.areaId}
|
|
|
</if>
|
|
@@ -321,29 +339,34 @@
|
|
|
<if test="p.value != null and p.value != ''">
|
|
|
and a.examine_status = #{p.value}
|
|
|
</if>
|
|
|
+ <if test=" p.district != null">
|
|
|
+ and e.district = #{p.district}
|
|
|
+ </if>
|
|
|
order by time desc
|
|
|
</select>
|
|
|
<select id="getListAnJian" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
|
select a.id as id,
|
|
|
- (select name from g_user where id = a.user_id) as userName,
|
|
|
+ u.name as userName,
|
|
|
a.remark as remark,
|
|
|
a.time as time,
|
|
|
a.update_time as updateTime,
|
|
|
a.whether as whether,
|
|
|
a.version as version,
|
|
|
- CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
|
+ CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
|
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
|
|
|
+ left join sys_dict_data f on e.district = f.dict_value
|
|
|
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'
|
|
|
+ and f.dict_type='district'
|
|
|
<if test="p.userId != null and p.userId != ''">
|
|
|
and a.user_id = #{p.userId}
|
|
|
</if>
|
|
@@ -368,15 +391,18 @@
|
|
|
<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>
|
|
|
+ <if test=" p.district != null">
|
|
|
+ and e.district = #{p.district}
|
|
|
+ </if>
|
|
|
order by a.update_time desc
|
|
|
</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,
|
|
|
+ u.name 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,
|
|
|
+ CONCAT(f.dict_label,'-',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
|
|
@@ -384,12 +410,14 @@
|
|
|
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
|
|
|
+ left join sys_dict_data f on e.district = f.dict_value
|
|
|
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'
|
|
|
+ and f.dict_type='district'
|
|
|
<if test="p.userId != null and p.userId != ''">
|
|
|
and a.user_id = #{p.userId}
|
|
|
</if>
|
|
@@ -414,22 +442,26 @@
|
|
|
<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>
|
|
|
+ <if test=" p.district != null">
|
|
|
+ and e.district = #{p.district}
|
|
|
+ </if>
|
|
|
order by a.update_time desc,userName
|
|
|
</select>
|
|
|
<select id="getListWeiXiu" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
|
select a.id as id,
|
|
|
- (select name from g_user where id = a.user_id) as userName,
|
|
|
+ u.name as userName,
|
|
|
a.remark as remark,
|
|
|
a.time as time,
|
|
|
a.update_time as updateTime,
|
|
|
a.whether as whether,
|
|
|
a.version as version,
|
|
|
- CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
|
+ CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
|
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 sys_dict_data f on e.district = f.dict_value
|
|
|
left join g_user u on a.user_id = u.id
|
|
|
where a.del_flag = '0'
|
|
|
and b.del_flag = '0'
|
|
@@ -437,6 +469,7 @@
|
|
|
and d.del_flag = '0'
|
|
|
and e.del_flag = '0'
|
|
|
and a.service_type ='005'
|
|
|
+ and f.dict_type='district'
|
|
|
<if test="p.userId != null and p.userId != ''">
|
|
|
and a.user_id = #{p.userId}
|
|
|
</if>
|
|
@@ -461,21 +494,25 @@
|
|
|
<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>
|
|
|
+ <if test=" p.district != null">
|
|
|
+ and e.district = #{p.district}
|
|
|
+ </if>
|
|
|
order by a.update_time desc
|
|
|
</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,
|
|
|
+ u.name 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,
|
|
|
+ CONCAT(f.dict_label,'-',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 sys_dict_data f on e.district = f.dict_value
|
|
|
left join g_user u on a.user_id = u.id
|
|
|
where a.del_flag = '0'
|
|
|
and b.del_flag = '0'
|
|
@@ -483,6 +520,7 @@
|
|
|
and d.del_flag = '0'
|
|
|
and e.del_flag = '0'
|
|
|
and a.service_type ='005'
|
|
|
+ and f.dict_type='district'
|
|
|
<if test="p.userId != null and p.userId != ''">
|
|
|
and a.user_id = #{p.userId}
|
|
|
</if>
|
|
@@ -507,20 +545,24 @@
|
|
|
<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>
|
|
|
+ <if test=" p.district != null">
|
|
|
+ and e.district = #{p.district}
|
|
|
+ </if>
|
|
|
order by a.update_time desc,userName
|
|
|
</select>
|
|
|
<select id="getListKaiShuan" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
|
|
|
select a.id as id,
|
|
|
- (select name from g_user where id = a.user_id) as userName,
|
|
|
+ u.name 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
|
|
|
+ CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house
|
|
|
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 sys_dict_data f on e.district = f.dict_value
|
|
|
left join g_user u on a.user_id = u.id
|
|
|
where a.del_flag = '0'
|
|
|
and b.del_flag = '0'
|
|
@@ -528,6 +570,7 @@
|
|
|
and d.del_flag = '0'
|
|
|
and e.del_flag = '0'
|
|
|
and a.service_type ='006'
|
|
|
+ and f.dict_type='district'
|
|
|
<if test="p.userId != null and p.userId != ''">
|
|
|
and a.user_id = #{p.userId}
|
|
|
</if>
|
|
@@ -552,6 +595,9 @@
|
|
|
<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>
|
|
|
+ <if test=" p.district != null">
|
|
|
+ and e.district = #{p.district}
|
|
|
+ </if>
|
|
|
order by a.update_time desc
|
|
|
</select>
|
|
|
<select id="getByHouseId" resultType="com.ruoyi.gas.domain.GOrder">
|