|
|
@@ -666,7 +666,7 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="findOrganizationCustomerDetail" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerOrganizationDetailBo">
|
|
|
- select
|
|
|
+ select
|
|
|
a.id as uid,
|
|
|
a.society_tag as societyTag,
|
|
|
a.company_logo_url as companyLogoUrl,
|
|
|
@@ -693,7 +693,16 @@
|
|
|
b.contact_mobile as contactMobile,
|
|
|
b.licence_number as licenceNumber,
|
|
|
a.aid as aid,
|
|
|
- d.name as adminName
|
|
|
+ d.name as adminName,
|
|
|
+ a.information_maintainer as informationMaintainer,
|
|
|
+ a.core_technology as coreTechnology,
|
|
|
+ a. accomplish_situation as accomplishSituation,
|
|
|
+ a.intellectual_property as intellectualProperty,
|
|
|
+ b.year_sales_amount as yearSalesAmount,
|
|
|
+ b.last_year_research_amount as lastYearResearchAmount,
|
|
|
+ b.assets,
|
|
|
+ b.qualification,
|
|
|
+ b.cooperation_situation as cooperationSituation
|
|
|
from
|
|
|
user a inner join organization_identity b on a.id = b.uid
|
|
|
left join admin d on d.id = a.aid
|
|
|
@@ -1668,4 +1677,142 @@
|
|
|
and a.create_time > #{dailyStart,jdbcType=VARCHAR}
|
|
|
and a.create_time < #{dailyEnd,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="selectCustomerInformationList" resultType="com.goafanti.customer.bo.CustomerListIn">
|
|
|
+ select a.id,a.nickname as name,c.name as province,c1.name as city,c2.name as area,b.contacts,b.contact_mobile as contactMobile,
|
|
|
+ a.create_time as createTime,d.name as industry
|
|
|
+ from user a left join organization_identity b
|
|
|
+ on a.id=b.uid left join district_glossory c
|
|
|
+ on b.location_province=c.id left join district_glossory c1
|
|
|
+ on b.location_city=c1.id left join district_glossory c2
|
|
|
+ on b.location_area=c2.id left join industry_category d on b.industry = d.id
|
|
|
+ where a.information_maintainer = #{aid,jdbcType=VARCHAR}
|
|
|
+ <if test="type !=null and type!=''">
|
|
|
+ and a.`type`=#{type,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="name!=null and name!=''">
|
|
|
+ and a.nickname like concat('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="province!=null and province!=''">
|
|
|
+ and b.location_province= #{province,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="city!=null and city!=''">
|
|
|
+ and b.location_city=#{city,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="area !=null and area !=''">
|
|
|
+ and b.location_area= #{area,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ and a.create_time > #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ and a.create_time < #{endDate}
|
|
|
+ </if>
|
|
|
+ order by a.create_time desc
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectCustomerInformationCount" resultType="java.lang.Integer">
|
|
|
+ select count(0)
|
|
|
+ from user a left join organization_identity b
|
|
|
+ on a.id=b.uid
|
|
|
+ where a.information_maintainer = #{aid,jdbcType=VARCHAR}
|
|
|
+ <if test="type !=null and type!=''">
|
|
|
+ and a.`type`=#{type,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="name!=null and name!=''">
|
|
|
+ and a.nickname like concat('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="province!=null and province!=''">
|
|
|
+ and b.location_province= #{province,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="city!=null and city!=''">
|
|
|
+ and b.location_city=#{city,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="area !=null and area !=''">
|
|
|
+ and b.location_area= #{area,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ and a.create_time > #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ and a.create_time < #{endDate}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="selectDepCustomerInformationList" resultType="com.goafanti.customer.bo.CustomerListIn">
|
|
|
+ select a.id,a.nickname as name,c.name as province,c1.name as city,c2.name as area,b.contacts,b.contact_mobile as contactMobile,
|
|
|
+ a.create_time as createTime,d.name as industry
|
|
|
+ from user a left join organization_identity b
|
|
|
+ on a.id=b.uid left join district_glossory c
|
|
|
+ on b.location_province=c.id left join district_glossory c1
|
|
|
+ on b.location_city=c1.id left join district_glossory c2
|
|
|
+ on b.location_area=c2.id left join industry_category d
|
|
|
+ on b.industry = d.id inner join (select id
|
|
|
+ from admin
|
|
|
+ where id= #{aid,jdbcType=VARCHAR}
|
|
|
+ or superior_id= #{aid,jdbcType=VARCHAR}
|
|
|
+ ) y
|
|
|
+ on y.id=a.information_maintainer
|
|
|
+ where 1=1
|
|
|
+ <if test="type !=null and type!=''">
|
|
|
+ and a.`type`=#{type,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="name!=null and name!=''">
|
|
|
+ and a.nickname like concat('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="province!=null and province!=''">
|
|
|
+ and b.location_province= #{province,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="city!=null and city!=''">
|
|
|
+ and b.location_city=#{city,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="area !=null and area !=''">
|
|
|
+ and b.location_area= #{area,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ and a.create_time > #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ and a.create_time < #{endDate}
|
|
|
+ </if>
|
|
|
+ order by a.create_time desc
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectDepCustomerInformationCount" resultType="java.lang.Integer">
|
|
|
+ select count(0)
|
|
|
+ from user a left join organization_identity b
|
|
|
+ on a.id=b.uid inner join (select id
|
|
|
+ from admin
|
|
|
+ where id= #{aid,jdbcType=VARCHAR}
|
|
|
+ or superior_id= #{aid,jdbcType=VARCHAR}
|
|
|
+ ) y
|
|
|
+ on y.id=a.information_maintainer
|
|
|
+ where 1=1
|
|
|
+ <if test="type !=null and type!=''">
|
|
|
+ and a.`type`=#{type,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="name!=null and name!=''">
|
|
|
+ and a.nickname like concat('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="province!=null and province!=''">
|
|
|
+ and b.location_province= #{province,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="city!=null and city!=''">
|
|
|
+ and b.location_city=#{city,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="area !=null and area !=''">
|
|
|
+ and b.location_area= #{area,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ and a.create_time > #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ and a.create_time < #{endDate}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|