共商
This commit is contained in:
@ -89,21 +89,61 @@
|
||||
from cosco_supplier_base
|
||||
where social_credit_code = #{socialCreditCode}
|
||||
</select>
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="agency_to_select_List">
|
||||
id, type, kind_code, kind_name, licence_accessory, licence_date, name, eng_name, social_credit_code,
|
||||
range, reg_address, work_address, parent_company_investor, legal_person, id_card, nature, capital,
|
||||
category_type_code, category_type_name, contacts_name, contacts_phone, contacts_type, contacts_email,
|
||||
telephone, nation, vat, taxpayer_id, currency, commitment, accessory, person_name, person_phone,
|
||||
person_bank, person_account, licence, status, approve_status, create_by, create_time, update_by,
|
||||
update_time, remark, in_blacklist, first_login, exit, agent, sap_code
|
||||
</sql>
|
||||
|
||||
<select id="getAccessedOfMyOrgPage"
|
||||
resultType="com.chinaunicom.zyhy.ebtp.supplier.base.dto.CoscoSupplierBaseDTO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from cosco_supplier_base
|
||||
where status = 1
|
||||
<if test="name != null and name != ''">
|
||||
AND name like concat('%', #{name}, '%')
|
||||
|
||||
SELECT
|
||||
base.id, base.name,base.agent,
|
||||
base.kind_code, base.kind_name,
|
||||
wk.end_time access_time,au.user_name access_user,(
|
||||
SELECT GROUP_CONCAT(sca.access_category_name SEPARATOR ',') goods_type_name
|
||||
FROM cosco_access_supplier_category sca
|
||||
WHERE sca.access_suppler_id=base.id
|
||||
) goods_type_name
|
||||
FROM cosco_supplier_base base,cosco_access_supplier accs, cosco_access_work wk,cosco_access_user au
|
||||
WHERE
|
||||
base.id=accs.supplier_id AND accs.access_work_id=wk.id AND wk.id=au.access_id
|
||||
AND base.agent!=1
|
||||
AND base.status='1'
|
||||
AND wk.dept_id=#{coscoSupplierBase.deptId}
|
||||
<if test="coscoSupplierBase.name != null and coscoSupplierBase.name != ''">
|
||||
AND base.name like concat('%', #{coscoSupplierBase.name}, '%')
|
||||
</if>
|
||||
<if test="categoryTypeCode != null and categoryTypeCode != ''">
|
||||
AND category_type_code = #{categoryTypeCode}
|
||||
<if test="coscoSupplierBase.kindCode != null and coscoSupplierBase.kindCode != ''">
|
||||
AND base.kind_code=#{coscoSupplierBase.kindCode}
|
||||
</if>
|
||||
<if test="agent != null">
|
||||
AND agent = #{agent}
|
||||
<if test="coscoSupplierBase.accessTime!=null and oscoSupplierBase.accessTimeEnd!=null ">
|
||||
AND wk.end_time between #{coscoSupplierBase.accessTime} and #{coscoSupplierBase.accessTimeEnd}
|
||||
</if>
|
||||
<!-- <if test="coscoSupplierBase.goodsTypeCode != null and coscoSupplierBase.goodsTypeCode != ''">-->
|
||||
<!-- AND (-->
|
||||
<!-- SELECT COUNT(casc.id)-->
|
||||
<!-- FROM cosco_access_supplier_category casc-->
|
||||
<!-- WHERE casc.access_suppler_id=base.id AND casc.access_category_id=#{coscoSupplierBase.goodsTypeCode}-->
|
||||
<!-- )>0-->
|
||||
<!-- </if>-->
|
||||
<if test="coscoSupplierBase.goodsTypeName != null and coscoSupplierBase.goodsTypeName != ''">
|
||||
AND (
|
||||
SELECT COUNT(casc.id)
|
||||
FROM cosco_access_supplier_category casc
|
||||
WHERE casc.access_suppler_id=base.id AND casc.access_category_name like concat('%', #{coscoSupplierBase.goodsTypeName}, '%')
|
||||
)>0
|
||||
</if>
|
||||
|
||||
ORDER BY base.create_time DESC
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user