|
@@ -958,4 +958,184 @@ sb.check_type
|
|
|
<!-- </if>-->
|
|
|
<!-- </where>-->
|
|
|
<!-- </select>-->
|
|
|
+
|
|
|
+ <select id="selectList2" parameterType="com.platform.dao.dto.sb.SbInfoDTO"
|
|
|
+ resultType="java.lang.String">
|
|
|
+ select distinct (info.id) from t_sb_info info inner join t_long_yan_purchase_order orders
|
|
|
+ on info.id = orders.sb_id
|
|
|
+ <where>
|
|
|
+ 1 = 1
|
|
|
+ <if test="keyword != null and keyword != ''">
|
|
|
+ and (
|
|
|
+ sb.name like concat('%',#{keyword},'%')
|
|
|
+ or sb.no like concat('%',#{keyword},'%')
|
|
|
+ or sb.position_no like concat('%',#{keyword},'%')
|
|
|
+ or sb.remark like concat('%',#{keyword},'%')
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name!=''">
|
|
|
+ and sb.name like concat('%',#{name},'%')
|
|
|
+ </if>
|
|
|
+ <if test="zbh != null and zbh!=''">
|
|
|
+ and sb.zbh like concat('%',#{zbh},'%')
|
|
|
+ </if>
|
|
|
+ <if test="producerName != null and producerName!=''">
|
|
|
+ and sb.producer_id like concat('%',#{producerName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="producerId != null and producerId!=''">
|
|
|
+ and sb.producer_id like concat('%',#{producerId},'%')
|
|
|
+ </if>
|
|
|
+ <if test="positionId != null and positionId!=''">
|
|
|
+ and sb.position_id = #{positionId}
|
|
|
+ </if>
|
|
|
+ <if test="positionNo != null and positionNo!=''">
|
|
|
+ and sb.position_no like concat('%',#{positionNo},'%')
|
|
|
+ </if>
|
|
|
+ <if test="ppNo != null and ppNo!=''">
|
|
|
+ and sb.pp_no like concat('%',#{ppNo},'%')
|
|
|
+ </if>
|
|
|
+ <if test="likeDeptCode != null and likeDeptCode!=''">
|
|
|
+ and sdDept.dept_code like concat(#{likeDeptCode},'%')
|
|
|
+ </if>
|
|
|
+ <if test="financingNo != null and financingNo!=''">
|
|
|
+ and sb.financing_no like concat(#{financingNo},'%')
|
|
|
+ </if>
|
|
|
+ <if test="positionIds != null">
|
|
|
+ AND sb.position_id in
|
|
|
+ <foreach item="item" index="index" collection="positionIds" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="ids != null">
|
|
|
+ AND sb.id in
|
|
|
+ <foreach item="item" index="index" collection="ids" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="typeList != null">
|
|
|
+ AND sb.type_id in
|
|
|
+ <foreach item="item" index="index" collection="typeList" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="useType != null">
|
|
|
+ and sb.use_type = #{useType}
|
|
|
+ </if>
|
|
|
+ <if test="id != null">
|
|
|
+ and sb.id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="checkId != null">
|
|
|
+ and sb.check_id = #{checkId}
|
|
|
+ </if>
|
|
|
+ <if test="isChild != null">
|
|
|
+ and sb.is_child = #{isChild}
|
|
|
+ </if>
|
|
|
+ <if test="isMeasure != null">
|
|
|
+ and sb.is_measure = #{isMeasure}
|
|
|
+ </if>
|
|
|
+ <if test="isSelf != null">
|
|
|
+ and sb.is_self = #{isSelf}
|
|
|
+ </if>
|
|
|
+ <if test="measureStatus != null">
|
|
|
+ and sb.measure_status = #{measureStatus}
|
|
|
+ </if>
|
|
|
+ <if test="isShow != null">
|
|
|
+ and sb.is_show = #{isShow}
|
|
|
+ </if>
|
|
|
+ <if test="isFinancing != null">
|
|
|
+ and sb.is_financing = #{isFinancing}
|
|
|
+ </if>
|
|
|
+ <if test="useArea != null">
|
|
|
+ and sb.use_area = #{useArea}
|
|
|
+ </if>
|
|
|
+ <if test="useCompany != null">
|
|
|
+ and sb.use_company = #{useCompany}
|
|
|
+ </if>
|
|
|
+ <if test="useProject != null">
|
|
|
+ and sb.use_project = #{useProject}
|
|
|
+ </if>
|
|
|
+ <if test="baoyangTimes != null">
|
|
|
+ and sb.baoyang_times = #{baoyangTimes}
|
|
|
+ </if>
|
|
|
+ <if test="typeId != null and typeId != ''">
|
|
|
+ and sb.type_id = #{typeId}
|
|
|
+ </if>
|
|
|
+ <if test="parentId != null">
|
|
|
+ and sb.parent_id = #{parentId}
|
|
|
+ </if>
|
|
|
+ <if test="model != null">
|
|
|
+ and sb.model like concat('%',#{model},'%')
|
|
|
+ </if>
|
|
|
+ <if test="cph != null">
|
|
|
+ and sb.model like concat('%',#{cph},'%')
|
|
|
+ </if>
|
|
|
+ <if test="useDept != null">
|
|
|
+ and sb.use_dept = #{useDept}
|
|
|
+ </if>
|
|
|
+ <if test="useGroup != null">
|
|
|
+ and sb.use_group = #{useGroup}
|
|
|
+ </if>
|
|
|
+ <if test="saveDept != null">
|
|
|
+ and sb.save_dept = #{saveDept}
|
|
|
+ </if>
|
|
|
+ <if test="saveUser != null">
|
|
|
+ and sb.save_user = #{saveUser}
|
|
|
+ </if>
|
|
|
+ <if test="checkDateStart != null">
|
|
|
+ and sb.check_date <![CDATA[ >= ]]> #{checkDateStart}
|
|
|
+ </if>
|
|
|
+ <if test="checkDateEnd != null">
|
|
|
+ and sb.check_date <![CDATA[ <= ]]> #{checkDateEnd}
|
|
|
+ </if>
|
|
|
+ <if test="nextCheckDateStart != null">
|
|
|
+ and sb.next_check_date <![CDATA[ >= ]]> #{nextCheckDateStart}
|
|
|
+ </if>
|
|
|
+ <if test="nextCheckDateEnd != null">
|
|
|
+ and sb.next_check_date <![CDATA[ <= ]]> #{nextCheckDateEnd}
|
|
|
+ </if>
|
|
|
+ <if test="repairUser != null">
|
|
|
+ and sb.repair_user = #{repairUser}
|
|
|
+ </if>
|
|
|
+ <if test="repairUserSecond != null">
|
|
|
+ and sb.repair_user_second = #{repairUserSecond}
|
|
|
+ </if>
|
|
|
+ <if test="repairUserSearch != null">
|
|
|
+ and (
|
|
|
+ sb.repair_user = #{repairUserSearch}
|
|
|
+ or
|
|
|
+ sb.repair_user_second = #{repairUserSearch}
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ and sb.status = #{status}
|
|
|
+ </if>
|
|
|
+ <if test="modelId != null">
|
|
|
+ and sb.model_id = #{modelId}
|
|
|
+ </if>
|
|
|
+ <if test="notStatusList != null and notStatusList.size > 0">
|
|
|
+ AND sb.status not in
|
|
|
+ <foreach item="item" index="index" collection="notStatusList" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="statusList != null and statusList.size > 0">
|
|
|
+ AND sb.status in
|
|
|
+ <foreach item="item" index="index" collection="statusList" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="sbIds != null and sbIds.size > 0">
|
|
|
+ AND sb.id in
|
|
|
+ <foreach item="item" index="index" collection="sbIds" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="checkType!=null">
|
|
|
+ and sb.check_type = #{checkType}
|
|
|
+ </if>
|
|
|
+ <if test="ascriptionDept != null and ascriptionDept">
|
|
|
+ <include refid="deptSql"/>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|