|
@@ -37,7 +37,7 @@
|
|
|
c.NAME,
|
|
|
'-',
|
|
|
b.NAME
|
|
|
- ) is null,null,(select go.id from g_order go where go.house_id = a.house_id and go.del_flag='0' and go.service_type='004' order by go.time desc LIMIT 1)) as anjianId,
|
|
|
+ ) is null,null,(select go.id from yq_g_order go where go.house_id = a.house_id and go.del_flag='0' and go.service_type='004' order by go.time desc LIMIT 1)) as anjianId,
|
|
|
a.id as id,
|
|
|
a.service_type as serviceType,
|
|
|
u.name as userName,
|
|
@@ -51,13 +51,13 @@
|
|
|
a.whether as whether,
|
|
|
a.version as version,
|
|
|
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 and b.del_flag = '0')
|
|
|
- left join g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
- left join g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
- left join g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
+ from yq_g_order a
|
|
|
+ left join yq_g_house b on ( a.house_id = b.id and b.del_flag = '0')
|
|
|
+ left join yq_g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
+ left join yq_g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
+ left join yq_g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
left join sys_dict_data f on ( e.district = f.dict_value and f.dict_type='district')
|
|
|
- left join g_user u on a.user_id = u.id
|
|
|
+ left join yq_g_user u on a.user_id = u.id
|
|
|
where a.del_flag = '0'
|
|
|
and a.service_type not in ('004','005','006')
|
|
|
|
|
@@ -115,13 +115,13 @@
|
|
|
a.version as version,
|
|
|
a.house_id as houseId,
|
|
|
a.reason as reason
|
|
|
- from g_order a
|
|
|
- left join g_house b on ( a.house_id = b.id and b.del_flag = '0')
|
|
|
- left join g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
- left join g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
- left join g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
+ from yq_g_order a
|
|
|
+ left join yq_g_house b on ( a.house_id = b.id and b.del_flag = '0')
|
|
|
+ left join yq_g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
+ left join yq_g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
+ left join yq_g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
left join sys_dict_data f on e.district = f.dict_value
|
|
|
- left join g_user u on a.user_id = u.id
|
|
|
+ left join yq_g_user u on a.user_id = u.id
|
|
|
where a.del_flag = '0'
|
|
|
and a.service_type not in ('004','005','006')
|
|
|
and f.dict_type='district'
|
|
@@ -177,13 +177,13 @@
|
|
|
a.whether as whether,
|
|
|
a.version as version,
|
|
|
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 and b.del_flag = '0')
|
|
|
- left join g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
- left join g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
- left join g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
+ from yq_g_order a
|
|
|
+ left join yq_g_house b on ( a.house_id = b.id and b.del_flag = '0')
|
|
|
+ left join yq_g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
+ left join yq_g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
+ left join yq_g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
left join sys_dict_data f on ( e.district = f.dict_value and f.dict_type='district')
|
|
|
- left join g_user u on a.user_id = u.id
|
|
|
+ left join yq_g_user u on a.user_id = u.id
|
|
|
where a.del_flag = '0' and a.order_status = '001'
|
|
|
and a.service_type not in ('004','005','006')
|
|
|
<if test="p.serviceType != null and p.serviceType != ''">
|
|
@@ -207,23 +207,23 @@
|
|
|
order by time desc
|
|
|
</select>
|
|
|
<select id="getById" resultType="com.ruoyi.yiqi.entity.YqGOrder">
|
|
|
- select * 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
|
|
|
+ select * from yq_g_order a
|
|
|
+ left join yq_g_house b on a.house_id = b.id
|
|
|
+ left join yq_g_unit c on b.unit_id = c.id
|
|
|
+ left join yq_g_building d on c.building_id = d.id
|
|
|
where a.id = #{id} and a.del_flag = '0'
|
|
|
</select>
|
|
|
<select id="getByIdAndVersion" resultType="java.lang.Long">
|
|
|
- select count(*) from g_order
|
|
|
+ select count(*) from yq_g_order
|
|
|
where id = #{id} and del_flag = '0' and version = #{version}
|
|
|
</select>
|
|
|
<select id="getCount" resultType="java.lang.Integer">
|
|
|
select count(DISTINCT o.house_id)
|
|
|
- from g_order o
|
|
|
- left join g_house a on ( o.house_id = a.id and a.del_flag = '0')
|
|
|
- left join g_unit b on ( a.unit_id = b.id and b.del_flag = '0')
|
|
|
- left join g_building c on ( b.building_id = c.id and c.del_flag = '0')
|
|
|
- left join g_area d on ( c.area_id = d.id and d.del_flag = '0')
|
|
|
+ from yq_g_order o
|
|
|
+ left join yq_g_house a on ( o.house_id = a.id and a.del_flag = '0')
|
|
|
+ left join yq_g_unit b on ( a.unit_id = b.id and b.del_flag = '0')
|
|
|
+ left join yq_g_building c on ( b.building_id = c.id and c.del_flag = '0')
|
|
|
+ left join yq_g_area d on ( c.area_id = d.id and d.del_flag = '0')
|
|
|
where d.id = #{id}
|
|
|
and o.del_flag = '0'
|
|
|
and o.order_status = '002'
|
|
@@ -232,11 +232,11 @@
|
|
|
<select id="getExaminePipeType" resultType="com.ruoyi.yiqi.entity.YqGCensusVo">
|
|
|
select count(DISTINCT o.id) as value,
|
|
|
o.pipe_type as name
|
|
|
- from g_order o
|
|
|
- left join g_house a on ( o.house_id = a.id and a.del_flag = '0')
|
|
|
- left join g_unit b on ( a.unit_id = b.id and b.del_flag = '0')
|
|
|
- left join g_building c on ( b.building_id = c.id and c.del_flag = '0')
|
|
|
- left join g_area d on ( c.area_id = d.id and d.del_flag = '0')
|
|
|
+ from yq_g_order o
|
|
|
+ left join yq_g_house a on ( o.house_id = a.id and a.del_flag = '0')
|
|
|
+ left join yq_g_unit b on ( a.unit_id = b.id and b.del_flag = '0')
|
|
|
+ left join yq_g_building c on ( b.building_id = c.id and c.del_flag = '0')
|
|
|
+ left join yq_g_area d on ( c.area_id = d.id and d.del_flag = '0')
|
|
|
where o.service_type = '002'
|
|
|
and o.del_flag = '0'
|
|
|
<if test="id != null and id != ''">
|
|
@@ -247,11 +247,11 @@
|
|
|
<select id="getExaminePipeLength" resultType="com.ruoyi.yiqi.entity.YqGCensusVo">
|
|
|
select count(DISTINCT o.id) as value,
|
|
|
o.pipe_length as name
|
|
|
- from g_order o
|
|
|
- left join g_house a on ( o.house_id = a.id and a.del_flag = '0')
|
|
|
- left join g_unit b on ( a.unit_id = b.id and b.del_flag = '0')
|
|
|
- left join g_building c on ( b.building_id = c.id and c.del_flag = '0')
|
|
|
- left join g_area d on ( c.area_id = d.id and d.del_flag = '0')
|
|
|
+ from yq_g_order o
|
|
|
+ left join yq_g_house a on ( o.house_id = a.id and a.del_flag = '0')
|
|
|
+ left join yq_g_unit b on ( a.unit_id = b.id and b.del_flag = '0')
|
|
|
+ left join yq_g_building c on ( b.building_id = c.id and c.del_flag = '0')
|
|
|
+ left join yq_g_area d on ( c.area_id = d.id and d.del_flag = '0')
|
|
|
where
|
|
|
o.service_type = '002'
|
|
|
and o.del_flag = '0'
|
|
@@ -263,11 +263,11 @@
|
|
|
<select id="getExamineValveType" resultType="com.ruoyi.yiqi.entity.YqGCensusVo">
|
|
|
select count(DISTINCT o.id) as value,
|
|
|
o.valve_type as name
|
|
|
- from g_order o
|
|
|
- left join g_house a on ( o.house_id = a.id and a.del_flag = '0')
|
|
|
- left join g_unit b on ( a.unit_id = b.id and b.del_flag = '0')
|
|
|
- left join g_building c on ( b.building_id = c.id and c.del_flag = '0')
|
|
|
- left join g_area d on ( c.area_id = d.id and d.del_flag = '0')
|
|
|
+ from yq_g_order o
|
|
|
+ left join yq_g_house a on ( o.house_id = a.id and a.del_flag = '0')
|
|
|
+ left join yq_g_unit b on ( a.unit_id = b.id and b.del_flag = '0')
|
|
|
+ left join yq_g_building c on ( b.building_id = c.id and c.del_flag = '0')
|
|
|
+ left join yq_g_area d on ( c.area_id = d.id and d.del_flag = '0')
|
|
|
where o.service_type = '002'
|
|
|
and o.del_flag = '0'
|
|
|
<if test="id != null and id != ''">
|
|
@@ -276,7 +276,7 @@
|
|
|
group by o.valve_type
|
|
|
</select>
|
|
|
<select id="getOrderForStatus" resultType="com.ruoyi.yiqi.entity.YqGOrder">
|
|
|
- select * from g_order
|
|
|
+ select * from yq_g_order
|
|
|
where house_id= #{houseId}
|
|
|
and del_flag = '0'
|
|
|
and service_type ='002'
|
|
@@ -302,11 +302,11 @@
|
|
|
a.whether as whether,
|
|
|
a.version as version,
|
|
|
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
|
|
|
+ from yq_g_order a
|
|
|
+ left join yq_g_house b on a.house_id = b.id
|
|
|
+ left join yq_g_unit c on b.unit_id = c.id
|
|
|
+ left join yq_g_building d on c.building_id = d.id
|
|
|
+ left join yq_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')
|
|
@@ -334,12 +334,12 @@
|
|
|
a.whether as whether,
|
|
|
a.version as version,
|
|
|
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 and b.del_flag = '0')
|
|
|
- left join g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
- left join g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
- left join g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
- left join g_user u on a.user_id = u.id
|
|
|
+ from yq_g_order a
|
|
|
+ left join yq_g_house b on ( a.house_id = b.id and b.del_flag = '0')
|
|
|
+ left join yq_g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
+ left join yq_g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
+ left join yq_g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
+ left join yq_g_user u on a.user_id = u.id
|
|
|
left join sys_dict_data f on ( e.district = f.dict_value and f.dict_type='district')
|
|
|
where a.del_flag = '0' and a.service_type ='004'
|
|
|
<if test="p.userId != null and p.userId != ''">
|
|
@@ -379,12 +379,12 @@
|
|
|
a.update_time as updateTime,
|
|
|
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 and b.del_flag = '0')
|
|
|
- left join g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
- left join g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
- left join g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
- left join g_user u on a.user_id = u.id
|
|
|
+ from yq_g_order a
|
|
|
+ left join yq_g_house b on ( a.house_id = b.id and b.del_flag = '0')
|
|
|
+ left join yq_g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
+ left join yq_g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
+ left join yq_g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
+ left join yq_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 a.service_type ='004'
|
|
@@ -427,13 +427,13 @@
|
|
|
a.whether as whether,
|
|
|
a.version as version,
|
|
|
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 and b.del_flag = '0')
|
|
|
- left join g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
- left join g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
- left join g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
+ from yq_g_order a
|
|
|
+ left join yq_g_house b on ( a.house_id = b.id and b.del_flag = '0')
|
|
|
+ left join yq_g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
+ left join yq_g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
+ left join yq_g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
left join sys_dict_data f on ( e.district = f.dict_value AND f.dict_type='district')
|
|
|
- left join g_user u on a.user_id = u.id
|
|
|
+ left join yq_g_user u on a.user_id = u.id
|
|
|
where a.service_type ='005' and a.del_flag = '0'
|
|
|
<if test="p.userId != null and p.userId != ''">
|
|
|
and a.user_id = #{p.userId}
|
|
@@ -472,13 +472,13 @@
|
|
|
a.update_time as updateTime,
|
|
|
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 and b.del_flag = '0')
|
|
|
- left join g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
- left join g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
- left join g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
+ from yq_g_order a
|
|
|
+ left join yq_g_house b on ( a.house_id = b.id and b.del_flag = '0')
|
|
|
+ left join yq_g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
+ left join yq_g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
+ left join yq_g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
left join sys_dict_data f on e.district = f.dict_value
|
|
|
- left join g_user u on a.user_id = u.id
|
|
|
+ left join yq_g_user u on a.user_id = u.id
|
|
|
where a.del_flag = '0'
|
|
|
and a.service_type ='005'
|
|
|
and f.dict_type='district'
|
|
@@ -518,13 +518,13 @@
|
|
|
a.time as time,
|
|
|
a.update_time as updateTime,
|
|
|
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 and b.del_flag = '0')
|
|
|
- left join g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
- left join g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
- left join g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
+ from yq_g_order a
|
|
|
+ left join yq_g_house b on ( a.house_id = b.id and b.del_flag = '0')
|
|
|
+ left join yq_g_unit c on ( b.unit_id = c.id and c.del_flag = '0')
|
|
|
+ left join yq_g_building d on ( c.building_id = d.id and d.del_flag = '0')
|
|
|
+ left join yq_g_area e on ( d.area_id = e.id and e.del_flag = '0')
|
|
|
left join sys_dict_data f on e.district = f.dict_value
|
|
|
- left join g_user u on a.user_id = u.id
|
|
|
+ left join yq_g_user u on a.user_id = u.id
|
|
|
where a.del_flag = '0'
|
|
|
and a.service_type ='006'
|
|
|
and f.dict_type='district'
|
|
@@ -558,16 +558,16 @@
|
|
|
order by a.update_time desc
|
|
|
</select>
|
|
|
<select id="getByHouseId" resultType="com.ruoyi.yiqi.entity.YqGOrder">
|
|
|
- select * from g_order
|
|
|
+ select * from yq_g_order
|
|
|
where house_id = #{houseId}
|
|
|
and service_type = "002"
|
|
|
and del_flag = '0'
|
|
|
</select>
|
|
|
<update id="updateOrderByHouseId" parameterType="java.lang.Long">
|
|
|
- update g_order set examine_status='001', order_status='002' where house_id=#{houseId} and service_type='002'
|
|
|
+ update yq_g_order set examine_status='001', order_status='002' where house_id=#{houseId} and service_type='002'
|
|
|
</update>
|
|
|
|
|
|
<update id="updateHouseId" parameterType="java.lang.Long">
|
|
|
- update g_order set house_id=#{xhouseId} where house_id=#{yhouseId}
|
|
|
+ update yq_g_order set house_id=#{xhouseId} where house_id=#{yhouseId}
|
|
|
</update>
|
|
|
</mapper>
|