|
@@ -306,7 +306,7 @@
|
|
|
d.loc_desc,
|
|
|
sc.customer_name,
|
|
|
sb.name as building_name,
|
|
|
- sil.is_accepted,
|
|
|
+ IFNULL(sil.is_accepted,1) as is_accepted,
|
|
|
sdt1.equipment_type as new_equipment_type,
|
|
|
sdt1.model as new_model,
|
|
|
sdm1.name as new_manufacturer_name,
|
|
@@ -334,8 +334,8 @@
|
|
|
<if test="replaceMethod != null"> and rl.replace_method = #{replaceMethod}</if>
|
|
|
<if test="customerId != null"> and d.customer_id = #{customerId}</if>
|
|
|
<if test="replaceUsername != null and replaceUsername != ''"> and rl.replace_username LIKE concat('%',#{replaceUsername},'%')</if>
|
|
|
- <if test="isAccepted != null and isAccepted == 1"> and sil.is_accepted = #{isAccepted}</if>
|
|
|
- <if test="isAccepted != null and isAccepted == 0"> and (sil.is_accepted = #{isAccepted} or sil.is_accepted is null)</if>
|
|
|
+ <if test="isAccepted != null and isAccepted == 1"> and (sil.is_accepted = #{isAccepted} or sil.is_accepted is null)</if>
|
|
|
+ <if test="isAccepted != null and isAccepted == 0"> and sil.is_accepted = #{isAccepted} </if>
|
|
|
<if test="provinceId != null"> and sb.province = #{provinceId}</if>
|
|
|
<if test="cityId != null"> and sb.city = #{cityId}</if>
|
|
|
<if test="regionId != null"> and sb.region = #{regionId}</if>
|
|
@@ -370,8 +370,8 @@
|
|
|
<if test="replaceMethod != null"> and rl.replace_method = #{replaceMethod}</if>
|
|
|
<if test="customerId != null"> and d.customer_id = #{customerId}</if>
|
|
|
<if test="replaceUsername != null and replaceUsername != ''"> and rl.replace_username LIKE concat('%',#{replaceUsername},'%')</if>
|
|
|
- <if test="isAccepted != null and isAccepted == 1"> and sil.is_accepted = #{isAccepted}</if>
|
|
|
- <if test="isAccepted != null and isAccepted == 0"> and (sil.is_accepted = #{isAccepted} or sil.is_accepted is null)</if>
|
|
|
+ <if test="isAccepted != null and isAccepted == 1"> and (sil.is_accepted = #{isAccepted} or sil.is_accepted is null)</if>
|
|
|
+ <if test="isAccepted != null and isAccepted == 0"> and sil.is_accepted = #{isAccepted} </if>
|
|
|
<if test="provinceId != null"> and sb.province = #{provinceId}</if>
|
|
|
<if test="cityId != null"> and sb.city = #{cityId}</if>
|
|
|
<if test="regionId != null"> and sb.region = #{regionId}</if>
|
|
@@ -415,8 +415,8 @@
|
|
|
<if test="replaceMethod != null"> and rl.replace_method = #{replaceMethod}</if>
|
|
|
<if test="customerId != null"> and sd.customer_id = #{customerId}</if>
|
|
|
<if test="replaceUsername != null and replaceUsername != ''"> and rl.replace_username LIKE concat('%',#{replaceUsername},'%')</if>
|
|
|
- <if test="isAccepted != null and isAccepted == 1"> and sil.is_accepted = #{isAccepted}</if>
|
|
|
- <if test="isAccepted != null and isAccepted == 0"> and (sil.is_accepted = #{isAccepted} or sil.is_accepted is null)</if>
|
|
|
+ <if test="isAccepted != null and isAccepted == 1"> and (sil.is_accepted = #{isAccepted} or sil.is_accepted is null)</if>
|
|
|
+ <if test="isAccepted != null and isAccepted == 0"> and sil.is_accepted = #{isAccepted} </if>
|
|
|
<if test="startDate != null"> and rl.date_create <![CDATA[ >= ]]> #{startDate}</if>
|
|
|
<if test="endDate != null"> and rl.date_create <![CDATA[ <= ]]> #{endDate}</if>
|
|
|
<if test="programItems != null and programItems.size() != 0"> and
|