|
@@ -101,6 +101,12 @@
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="dto != null and dto.manufacturerFilters.size() > 0">
|
|
|
+ AND manufacturer IN
|
|
|
+ <foreach item="item" collection="dto.manufacturerFilters" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
ORDER BY sort_id
|
|
|
</select>
|
|
|
|
|
@@ -176,6 +182,12 @@
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="dto != null and dto.manufacturerFilters.size() > 0">
|
|
|
+ AND manufacturer IN
|
|
|
+ <foreach item="item" collection="dto.manufacturerFilters" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
ORDER BY data.sort_id
|
|
|
</select>
|
|
|
|
|
@@ -321,6 +333,12 @@
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="dto != null and dto.manufacturerFilters.size() > 0">
|
|
|
+ AND manufacturer IN
|
|
|
+ <foreach item="item" collection="dto.manufacturerFilters" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
ORDER BY data.sort_id
|
|
|
</select>
|
|
|
|
|
@@ -401,64 +419,4 @@
|
|
|
#{data.material1},#{data.material2},#{data.material1Quantity},#{data.material2Quantity},#{data.material1UseRatio},#{data.material2UseRatio},#{data.material1Price},#{data.material2Price})
|
|
|
</insert>
|
|
|
|
|
|
- <!--获取机器设备作价table设备名称的筛选条件-->
|
|
|
- <select id="getEqptTableNameFilters" resultType="com.dayou.vo.TableFilterVO">
|
|
|
- SELECT DISTINCT equipment_name AS filter,
|
|
|
- (SELECT COUNT(equipment_name) FROM assets_calculate_eqpt_data AS subquery WHERE subquery.equipment_name = mainquery.equipment_name AND subquery.delete_status = 0) AS count
|
|
|
- FROM assets_calculate_eqpt_data AS mainquery
|
|
|
- WHERE delete_status = 0
|
|
|
- AND assets_calculate_id = #{calculateId}
|
|
|
- <if test="eqptType != null and eqptType != ''">
|
|
|
- AND equipment_type = #{eqptType}
|
|
|
- </if>
|
|
|
- <if test="equipmentName != null and equipmentName != ''">
|
|
|
- AND equipment_name LIKE CONCAT('%', #{equipmentName}, '%')
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <!--获取机器设备作价table型号的筛选条件-->
|
|
|
- <select id="getEqptTableModelFilters" resultType="com.dayou.vo.TableFilterVO">
|
|
|
- SELECT DISTINCT model AS filter,
|
|
|
- (SELECT COUNT(model) FROM assets_calculate_eqpt_data AS subquery WHERE subquery.model = mainquery.model AND subquery.delete_status = 0) AS count
|
|
|
- FROM assets_calculate_eqpt_data AS mainquery
|
|
|
- WHERE delete_status = 0
|
|
|
- AND assets_calculate_id = #{calculateId}
|
|
|
- <if test="eqptType != null and eqptType != ''">
|
|
|
- AND equipment_type = #{eqptType}
|
|
|
- </if>
|
|
|
- <if test="model != null and model != ''">
|
|
|
- AND model LIKE CONCAT('%', #{model}, '%')
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <!--获取机器设备作价table购买日期的筛选条件-->
|
|
|
- <select id="getEqptTablePurchaseDateFilters" resultType="com.dayou.vo.TableFilterVO">
|
|
|
- SELECT DISTINCT purchase_date AS filter,
|
|
|
- (SELECT COUNT(purchase_date) FROM assets_calculate_eqpt_data AS subquery WHERE subquery.purchase_date = mainquery.purchase_date AND subquery.delete_status = 0) AS count
|
|
|
- FROM assets_calculate_eqpt_data AS mainquery
|
|
|
- WHERE delete_status = 0
|
|
|
- AND assets_calculate_id = #{calculateId}
|
|
|
- <if test="eqptType != null and eqptType != ''">
|
|
|
- AND equipment_type = #{eqptType}
|
|
|
- </if>
|
|
|
- <if test="purchaseDate != null and purchaseDate != ''">
|
|
|
- AND purchase_date = #{purchaseDate}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <!--获取机器设备作价table启用日期的筛选条件-->
|
|
|
- <select id="getEqptTableActivationDateFilters" resultType="com.dayou.vo.TableFilterVO">
|
|
|
- SELECT DISTINCT activation_date AS filter,
|
|
|
- (SELECT COUNT(activation_date) FROM assets_calculate_eqpt_data AS subquery WHERE subquery.activation_date = mainquery.activation_date AND subquery.delete_status = 0) AS count
|
|
|
- FROM assets_calculate_eqpt_data AS mainquery
|
|
|
- WHERE delete_status = 0
|
|
|
- AND assets_calculate_id = #{calculateId}
|
|
|
- <if test="eqptType != null and eqptType != ''">
|
|
|
- AND equipment_type = #{eqptType}
|
|
|
- </if>
|
|
|
- <if test="activationDate != null and activationDate != ''">
|
|
|
- AND activation_date = #{activationDate}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
</mapper>
|