2025-06-30 09:14:45 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.bonus.canteen.core.ims.mapper.SupplierMapper">
|
|
|
|
|
<resultMap type="com.bonus.canteen.core.ims.domain.Supplier" id="SupplierResult">
|
|
|
|
|
<result property="supplierId" column="supplier_id" />
|
|
|
|
|
<result property="supplierCode" column="supplier_code" />
|
|
|
|
|
<result property="supplierName" column="supplier_name" />
|
|
|
|
|
<result property="areaId" column="area_id" />
|
|
|
|
|
<result property="address" column="address" />
|
|
|
|
|
<result property="linkman" column="linkman" />
|
|
|
|
|
<result property="linkmanPhone" column="linkman_phone" />
|
|
|
|
|
<result property="email" column="email" />
|
|
|
|
|
<result property="openingBank" column="opening_bank" />
|
|
|
|
|
<result property="bankAccount" column="bank_account" />
|
|
|
|
|
<result property="supplierSimpleName" column="supplier_simple_name" />
|
|
|
|
|
<result property="telephone" column="telephone" />
|
|
|
|
|
<result property="companyWeb" column="company_web" />
|
|
|
|
|
<result property="regionProvince" column="region_province" />
|
|
|
|
|
<result property="regionCity" column="region_city" />
|
|
|
|
|
<result property="regionDistrict" column="region_district" />
|
|
|
|
|
<result property="ifReceiveNotice" column="if_receive_notice" />
|
|
|
|
|
<result property="noticeStyle" column="notice_style" />
|
|
|
|
|
<result property="supplierUserId" column="supplier_user_id" />
|
|
|
|
|
<result property="status" column="status" />
|
|
|
|
|
<result property="wechat" column="wechat" />
|
|
|
|
|
<result property="taxRate" column="tax_rate" />
|
|
|
|
|
<result property="paymentDays" column="payment_days" />
|
|
|
|
|
<result property="standbyLinkman" column="standby_linkman" />
|
|
|
|
|
<result property="standbyPhone" column="standby_phone" />
|
|
|
|
|
<result property="standbyWechat" column="standby_wechat" />
|
|
|
|
|
<result property="standbyEmail" column="standby_email" />
|
|
|
|
|
<result property="registFund" column="regist_fund" />
|
|
|
|
|
<result property="establishDate" column="establish_date" />
|
|
|
|
|
<result property="workersNum" column="workers_num" />
|
|
|
|
|
<result property="clientNum" column="client_num" />
|
|
|
|
|
<result property="lastYearOperatingIncome" column="last_year_operating_income" />
|
|
|
|
|
<result property="beforeYearOperatingIncome" column="before_year_operating_income" />
|
|
|
|
|
<result property="businessScope" column="business_scope" />
|
|
|
|
|
<result property="topFiveClient" column="top_five_client" />
|
|
|
|
|
<result property="topFiveSupplier" column="top_five_supplier" />
|
|
|
|
|
<result property="companyIntroduction" column="company_introduction" />
|
|
|
|
|
<result property="mainAdvantage" column="main_advantage" />
|
|
|
|
|
<result property="supplierScore" column="supplier_score" />
|
|
|
|
|
<result property="idCardImgZ" column="id_card_img_z" />
|
|
|
|
|
<result property="idCardImgF" column="id_card_img_f" />
|
|
|
|
|
<result property="attachment" column="attachment" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectSupplierVo">
|
|
|
|
|
select supplier_id, supplier_code, supplier_name, area_id, address, linkman, linkman_phone, email, opening_bank, bank_account, supplier_simple_name, telephone, company_web, region_province, region_city, region_district, if_receive_notice, notice_style, supplier_user_id, status, wechat, tax_rate, payment_days, standby_linkman, standby_phone, standby_wechat, standby_email, regist_fund, establish_date, workers_num, client_num, last_year_operating_income, before_year_operating_income, business_scope, top_five_client, top_five_supplier, company_introduction, main_advantage, supplier_score, id_card_img_z, id_card_img_f, attachment, remark, del_flag, create_by, create_time, update_by, update_time from ims_supplier
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectSupplierList" parameterType="com.bonus.canteen.core.ims.domain.Supplier" resultMap="SupplierResult">
|
|
|
|
|
<include refid="selectSupplierVo"/>
|
2025-06-30 17:35:05 +08:00
|
|
|
<where>
|
2025-06-30 09:14:45 +08:00
|
|
|
<if test="supplierCode != null and supplierCode != ''"> and supplier_code = #{supplierCode}</if>
|
|
|
|
|
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
|
|
|
|
<if test="areaId != null "> and area_id = #{areaId}</if>
|
|
|
|
|
<if test="address != null and address != ''"> and address = #{address}</if>
|
|
|
|
|
<if test="linkman != null and linkman != ''"> and linkman = #{linkman}</if>
|
|
|
|
|
<if test="linkmanPhone != null and linkmanPhone != ''"> and linkman_phone = #{linkmanPhone}</if>
|
|
|
|
|
<if test="email != null and email != ''"> and email = #{email}</if>
|
|
|
|
|
<if test="openingBank != null and openingBank != ''"> and opening_bank = #{openingBank}</if>
|
|
|
|
|
<if test="bankAccount != null and bankAccount != ''"> and bank_account = #{bankAccount}</if>
|
|
|
|
|
<if test="supplierSimpleName != null and supplierSimpleName != ''"> and supplier_simple_name like concat('%', #{supplierSimpleName}, '%')</if>
|
|
|
|
|
<if test="telephone != null and telephone != ''"> and telephone = #{telephone}</if>
|
|
|
|
|
<if test="companyWeb != null and companyWeb != ''"> and company_web = #{companyWeb}</if>
|
|
|
|
|
<if test="regionProvince != null and regionProvince != ''"> and region_province = #{regionProvince}</if>
|
|
|
|
|
<if test="regionCity != null and regionCity != ''"> and region_city = #{regionCity}</if>
|
|
|
|
|
<if test="regionDistrict != null and regionDistrict != ''"> and region_district = #{regionDistrict}</if>
|
|
|
|
|
<if test="ifReceiveNotice != null "> and if_receive_notice = #{ifReceiveNotice}</if>
|
|
|
|
|
<if test="noticeStyle != null "> and notice_style = #{noticeStyle}</if>
|
|
|
|
|
<if test="supplierUserId != null "> and supplier_user_id = #{supplierUserId}</if>
|
|
|
|
|
<if test="status != null "> and status = #{status}</if>
|
|
|
|
|
<if test="wechat != null and wechat != ''"> and wechat = #{wechat}</if>
|
|
|
|
|
<if test="taxRate != null "> and tax_rate = #{taxRate}</if>
|
|
|
|
|
<if test="paymentDays != null "> and payment_days = #{paymentDays}</if>
|
|
|
|
|
<if test="standbyLinkman != null and standbyLinkman != ''"> and standby_linkman = #{standbyLinkman}</if>
|
|
|
|
|
<if test="standbyPhone != null and standbyPhone != ''"> and standby_phone = #{standbyPhone}</if>
|
|
|
|
|
<if test="standbyWechat != null and standbyWechat != ''"> and standby_wechat = #{standbyWechat}</if>
|
|
|
|
|
<if test="standbyEmail != null and standbyEmail != ''"> and standby_email = #{standbyEmail}</if>
|
|
|
|
|
<if test="registFund != null "> and regist_fund = #{registFund}</if>
|
|
|
|
|
<if test="establishDate != null "> and establish_date = #{establishDate}</if>
|
|
|
|
|
<if test="workersNum != null "> and workers_num = #{workersNum}</if>
|
|
|
|
|
<if test="clientNum != null "> and client_num = #{clientNum}</if>
|
|
|
|
|
<if test="lastYearOperatingIncome != null "> and last_year_operating_income = #{lastYearOperatingIncome}</if>
|
|
|
|
|
<if test="beforeYearOperatingIncome != null "> and before_year_operating_income = #{beforeYearOperatingIncome}</if>
|
|
|
|
|
<if test="businessScope != null and businessScope != ''"> and business_scope = #{businessScope}</if>
|
|
|
|
|
<if test="topFiveClient != null and topFiveClient != ''"> and top_five_client = #{topFiveClient}</if>
|
|
|
|
|
<if test="topFiveSupplier != null and topFiveSupplier != ''"> and top_five_supplier = #{topFiveSupplier}</if>
|
|
|
|
|
<if test="companyIntroduction != null and companyIntroduction != ''"> and company_introduction = #{companyIntroduction}</if>
|
|
|
|
|
<if test="mainAdvantage != null and mainAdvantage != ''"> and main_advantage = #{mainAdvantage}</if>
|
|
|
|
|
<if test="supplierScore != null "> and supplier_score = #{supplierScore}</if>
|
|
|
|
|
<if test="idCardImgZ != null and idCardImgZ != ''"> and id_card_img_z = #{idCardImgZ}</if>
|
|
|
|
|
<if test="idCardImgF != null and idCardImgF != ''"> and id_card_img_f = #{idCardImgF}</if>
|
|
|
|
|
<if test="attachment != null and attachment != ''"> and attachment = #{attachment}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
2025-06-30 17:35:05 +08:00
|
|
|
|
2025-06-30 09:14:45 +08:00
|
|
|
<select id="selectSupplierBySupplierId" parameterType="Long" resultMap="SupplierResult">
|
|
|
|
|
<include refid="selectSupplierVo"/>
|
|
|
|
|
where supplier_id = #{supplierId}
|
|
|
|
|
</select>
|
2025-06-30 17:35:05 +08:00
|
|
|
|
2025-06-30 09:14:45 +08:00
|
|
|
<insert id="insertSupplier" parameterType="com.bonus.canteen.core.ims.domain.Supplier" useGeneratedKeys="true" keyProperty="supplierId">
|
|
|
|
|
insert into ims_supplier
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="supplierCode != null">supplier_code,</if>
|
|
|
|
|
<if test="supplierName != null and supplierName != ''">supplier_name,</if>
|
|
|
|
|
<if test="areaId != null">area_id,</if>
|
|
|
|
|
<if test="address != null">address,</if>
|
|
|
|
|
<if test="linkman != null">linkman,</if>
|
|
|
|
|
<if test="linkmanPhone != null">linkman_phone,</if>
|
|
|
|
|
<if test="email != null">email,</if>
|
|
|
|
|
<if test="openingBank != null">opening_bank,</if>
|
|
|
|
|
<if test="bankAccount != null">bank_account,</if>
|
|
|
|
|
<if test="supplierSimpleName != null">supplier_simple_name,</if>
|
|
|
|
|
<if test="telephone != null">telephone,</if>
|
|
|
|
|
<if test="companyWeb != null">company_web,</if>
|
|
|
|
|
<if test="regionProvince != null">region_province,</if>
|
|
|
|
|
<if test="regionCity != null">region_city,</if>
|
|
|
|
|
<if test="regionDistrict != null">region_district,</if>
|
|
|
|
|
<if test="ifReceiveNotice != null">if_receive_notice,</if>
|
|
|
|
|
<if test="noticeStyle != null">notice_style,</if>
|
|
|
|
|
<if test="supplierUserId != null">supplier_user_id,</if>
|
|
|
|
|
<if test="status != null">status,</if>
|
|
|
|
|
<if test="wechat != null">wechat,</if>
|
|
|
|
|
<if test="taxRate != null">tax_rate,</if>
|
|
|
|
|
<if test="paymentDays != null">payment_days,</if>
|
|
|
|
|
<if test="standbyLinkman != null">standby_linkman,</if>
|
|
|
|
|
<if test="standbyPhone != null">standby_phone,</if>
|
|
|
|
|
<if test="standbyWechat != null">standby_wechat,</if>
|
|
|
|
|
<if test="standbyEmail != null">standby_email,</if>
|
|
|
|
|
<if test="registFund != null">regist_fund,</if>
|
|
|
|
|
<if test="establishDate != null">establish_date,</if>
|
|
|
|
|
<if test="workersNum != null">workers_num,</if>
|
|
|
|
|
<if test="clientNum != null">client_num,</if>
|
|
|
|
|
<if test="lastYearOperatingIncome != null">last_year_operating_income,</if>
|
|
|
|
|
<if test="beforeYearOperatingIncome != null">before_year_operating_income,</if>
|
|
|
|
|
<if test="businessScope != null">business_scope,</if>
|
|
|
|
|
<if test="topFiveClient != null">top_five_client,</if>
|
|
|
|
|
<if test="topFiveSupplier != null">top_five_supplier,</if>
|
|
|
|
|
<if test="companyIntroduction != null">company_introduction,</if>
|
|
|
|
|
<if test="mainAdvantage != null">main_advantage,</if>
|
|
|
|
|
<if test="supplierScore != null">supplier_score,</if>
|
|
|
|
|
<if test="idCardImgZ != null">id_card_img_z,</if>
|
|
|
|
|
<if test="idCardImgF != null">id_card_img_f,</if>
|
|
|
|
|
<if test="attachment != null">attachment,</if>
|
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
|
<if test="delFlag != null">del_flag,</if>
|
|
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="supplierCode != null">#{supplierCode},</if>
|
|
|
|
|
<if test="supplierName != null and supplierName != ''">#{supplierName},</if>
|
|
|
|
|
<if test="areaId != null">#{areaId},</if>
|
|
|
|
|
<if test="address != null">#{address},</if>
|
|
|
|
|
<if test="linkman != null">#{linkman},</if>
|
|
|
|
|
<if test="linkmanPhone != null">#{linkmanPhone},</if>
|
|
|
|
|
<if test="email != null">#{email},</if>
|
|
|
|
|
<if test="openingBank != null">#{openingBank},</if>
|
|
|
|
|
<if test="bankAccount != null">#{bankAccount},</if>
|
|
|
|
|
<if test="supplierSimpleName != null">#{supplierSimpleName},</if>
|
|
|
|
|
<if test="telephone != null">#{telephone},</if>
|
|
|
|
|
<if test="companyWeb != null">#{companyWeb},</if>
|
|
|
|
|
<if test="regionProvince != null">#{regionProvince},</if>
|
|
|
|
|
<if test="regionCity != null">#{regionCity},</if>
|
|
|
|
|
<if test="regionDistrict != null">#{regionDistrict},</if>
|
|
|
|
|
<if test="ifReceiveNotice != null">#{ifReceiveNotice},</if>
|
|
|
|
|
<if test="noticeStyle != null">#{noticeStyle},</if>
|
|
|
|
|
<if test="supplierUserId != null">#{supplierUserId},</if>
|
|
|
|
|
<if test="status != null">#{status},</if>
|
|
|
|
|
<if test="wechat != null">#{wechat},</if>
|
|
|
|
|
<if test="taxRate != null">#{taxRate},</if>
|
|
|
|
|
<if test="paymentDays != null">#{paymentDays},</if>
|
|
|
|
|
<if test="standbyLinkman != null">#{standbyLinkman},</if>
|
|
|
|
|
<if test="standbyPhone != null">#{standbyPhone},</if>
|
|
|
|
|
<if test="standbyWechat != null">#{standbyWechat},</if>
|
|
|
|
|
<if test="standbyEmail != null">#{standbyEmail},</if>
|
|
|
|
|
<if test="registFund != null">#{registFund},</if>
|
|
|
|
|
<if test="establishDate != null">#{establishDate},</if>
|
|
|
|
|
<if test="workersNum != null">#{workersNum},</if>
|
|
|
|
|
<if test="clientNum != null">#{clientNum},</if>
|
|
|
|
|
<if test="lastYearOperatingIncome != null">#{lastYearOperatingIncome},</if>
|
|
|
|
|
<if test="beforeYearOperatingIncome != null">#{beforeYearOperatingIncome},</if>
|
|
|
|
|
<if test="businessScope != null">#{businessScope},</if>
|
|
|
|
|
<if test="topFiveClient != null">#{topFiveClient},</if>
|
|
|
|
|
<if test="topFiveSupplier != null">#{topFiveSupplier},</if>
|
|
|
|
|
<if test="companyIntroduction != null">#{companyIntroduction},</if>
|
|
|
|
|
<if test="mainAdvantage != null">#{mainAdvantage},</if>
|
|
|
|
|
<if test="supplierScore != null">#{supplierScore},</if>
|
|
|
|
|
<if test="idCardImgZ != null">#{idCardImgZ},</if>
|
|
|
|
|
<if test="idCardImgF != null">#{idCardImgF},</if>
|
|
|
|
|
<if test="attachment != null">#{attachment},</if>
|
|
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateSupplier" parameterType="com.bonus.canteen.core.ims.domain.Supplier">
|
|
|
|
|
update ims_supplier
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
|
|
|
|
|
<if test="supplierName != null and supplierName != ''">supplier_name = #{supplierName},</if>
|
|
|
|
|
<if test="areaId != null">area_id = #{areaId},</if>
|
|
|
|
|
<if test="address != null">address = #{address},</if>
|
|
|
|
|
<if test="linkman != null">linkman = #{linkman},</if>
|
|
|
|
|
<if test="linkmanPhone != null">linkman_phone = #{linkmanPhone},</if>
|
|
|
|
|
<if test="email != null">email = #{email},</if>
|
|
|
|
|
<if test="openingBank != null">opening_bank = #{openingBank},</if>
|
|
|
|
|
<if test="bankAccount != null">bank_account = #{bankAccount},</if>
|
|
|
|
|
<if test="supplierSimpleName != null">supplier_simple_name = #{supplierSimpleName},</if>
|
|
|
|
|
<if test="telephone != null">telephone = #{telephone},</if>
|
|
|
|
|
<if test="companyWeb != null">company_web = #{companyWeb},</if>
|
|
|
|
|
<if test="regionProvince != null">region_province = #{regionProvince},</if>
|
|
|
|
|
<if test="regionCity != null">region_city = #{regionCity},</if>
|
|
|
|
|
<if test="regionDistrict != null">region_district = #{regionDistrict},</if>
|
|
|
|
|
<if test="ifReceiveNotice != null">if_receive_notice = #{ifReceiveNotice},</if>
|
|
|
|
|
<if test="noticeStyle != null">notice_style = #{noticeStyle},</if>
|
|
|
|
|
<if test="supplierUserId != null">supplier_user_id = #{supplierUserId},</if>
|
|
|
|
|
<if test="status != null">status = #{status},</if>
|
|
|
|
|
<if test="wechat != null">wechat = #{wechat},</if>
|
|
|
|
|
<if test="taxRate != null">tax_rate = #{taxRate},</if>
|
|
|
|
|
<if test="paymentDays != null">payment_days = #{paymentDays},</if>
|
|
|
|
|
<if test="standbyLinkman != null">standby_linkman = #{standbyLinkman},</if>
|
|
|
|
|
<if test="standbyPhone != null">standby_phone = #{standbyPhone},</if>
|
|
|
|
|
<if test="standbyWechat != null">standby_wechat = #{standbyWechat},</if>
|
|
|
|
|
<if test="standbyEmail != null">standby_email = #{standbyEmail},</if>
|
|
|
|
|
<if test="registFund != null">regist_fund = #{registFund},</if>
|
|
|
|
|
<if test="establishDate != null">establish_date = #{establishDate},</if>
|
|
|
|
|
<if test="workersNum != null">workers_num = #{workersNum},</if>
|
|
|
|
|
<if test="clientNum != null">client_num = #{clientNum},</if>
|
|
|
|
|
<if test="lastYearOperatingIncome != null">last_year_operating_income = #{lastYearOperatingIncome},</if>
|
|
|
|
|
<if test="beforeYearOperatingIncome != null">before_year_operating_income = #{beforeYearOperatingIncome},</if>
|
|
|
|
|
<if test="businessScope != null">business_scope = #{businessScope},</if>
|
|
|
|
|
<if test="topFiveClient != null">top_five_client = #{topFiveClient},</if>
|
|
|
|
|
<if test="topFiveSupplier != null">top_five_supplier = #{topFiveSupplier},</if>
|
|
|
|
|
<if test="companyIntroduction != null">company_introduction = #{companyIntroduction},</if>
|
|
|
|
|
<if test="mainAdvantage != null">main_advantage = #{mainAdvantage},</if>
|
|
|
|
|
<if test="supplierScore != null">supplier_score = #{supplierScore},</if>
|
|
|
|
|
<if test="idCardImgZ != null">id_card_img_z = #{idCardImgZ},</if>
|
|
|
|
|
<if test="idCardImgF != null">id_card_img_f = #{idCardImgF},</if>
|
|
|
|
|
<if test="attachment != null">attachment = #{attachment},</if>
|
|
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where supplier_id = #{supplierId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteSupplierBySupplierId" parameterType="Long">
|
|
|
|
|
delete from ims_supplier where supplier_id = #{supplierId}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteSupplierBySupplierIds" parameterType="String">
|
2025-06-30 17:35:05 +08:00
|
|
|
<!-- delete from ims_supplier where supplier_id in-->
|
|
|
|
|
<!-- <foreach item="supplierId" collection="array" open="(" separator="," close=")">-->
|
|
|
|
|
<!-- #{supplierId}-->
|
|
|
|
|
<!-- </foreach>-->
|
|
|
|
|
update ims_supplier set del_flag = 2,supplier_user_id = null where supplier_id in
|
2025-06-30 09:14:45 +08:00
|
|
|
<foreach item="supplierId" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{supplierId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
2025-06-30 17:35:05 +08:00
|
|
|
|
|
|
|
|
<select id="getMaxSupplierCode" resultType="java.lang.String">
|
|
|
|
|
select MAX(supplier_code) from ims_supplier WHERE LENGTH(supplier_code ) =6
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectAllList" resultType="com.bonus.canteen.core.ims.vo.SupplierPageVO">
|
|
|
|
|
SELECT DISTINCT
|
|
|
|
|
a.supplier_id,
|
|
|
|
|
a.supplier_code,
|
|
|
|
|
a.supplier_name,
|
|
|
|
|
a.area_id,
|
|
|
|
|
aa.area_name,
|
|
|
|
|
a.address,
|
|
|
|
|
a.linkman,
|
|
|
|
|
a.linkman_phone,
|
|
|
|
|
a.email,
|
|
|
|
|
a.wechat,
|
|
|
|
|
a.opening_bank,
|
|
|
|
|
a.bank_account,
|
|
|
|
|
a.supplier_simple_name,
|
|
|
|
|
a.telephone,
|
|
|
|
|
a.company_web,
|
|
|
|
|
a.region_province,
|
|
|
|
|
a.region_city,
|
|
|
|
|
a.region_district,
|
|
|
|
|
a.tax_rate,
|
|
|
|
|
a.payment_days,
|
|
|
|
|
a.standby_linkman,
|
|
|
|
|
a.standby_phone,
|
|
|
|
|
a.standby_email,
|
|
|
|
|
a.standby_wechat,
|
|
|
|
|
a.regist_fund,
|
|
|
|
|
a.establish_date,
|
|
|
|
|
a.workers_num,
|
|
|
|
|
a.client_num,
|
|
|
|
|
a.last_year_operating_income,
|
|
|
|
|
a.before_year_operating_income,
|
|
|
|
|
a.business_scope,
|
|
|
|
|
a.top_five_client,
|
|
|
|
|
a.top_five_supplier,
|
|
|
|
|
a.company_introduction,
|
|
|
|
|
a.main_advantage,
|
|
|
|
|
a.if_receive_notice,
|
|
|
|
|
a.notice_style,
|
|
|
|
|
a.supplier_user_id,
|
|
|
|
|
a.`status`,
|
|
|
|
|
a.supplier_score,
|
|
|
|
|
a.create_time,
|
|
|
|
|
a.create_by,
|
|
|
|
|
a.update_time,
|
|
|
|
|
a.update_by,
|
|
|
|
|
a.id_card_img_z,
|
|
|
|
|
a.id_card_img_f,
|
|
|
|
|
a.attachment
|
|
|
|
|
FROM
|
|
|
|
|
ims_supplier a
|
|
|
|
|
LEFT JOIN ims_supplier_category b on a.supplier_id = b.supplier_id
|
|
|
|
|
LEFT JOIN basic_area aa on a.area_id = aa.area_id
|
|
|
|
|
where
|
|
|
|
|
a.del_flag = #{delFlag}
|
|
|
|
|
<if test="content.supplierId != null">
|
|
|
|
|
and a.supplier_id = #{content.supplierId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="content.supplierCode != null and content.supplierCode != ''">
|
|
|
|
|
and a.supplier_num = #{content.supplierCode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="content.supplierName != null and content.supplierName != ''">
|
|
|
|
|
and a.supplier_name like #{content.supplierName}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="content.areaIdList != null and content.areaIdList.size() > 0">
|
|
|
|
|
AND a.area_id in
|
|
|
|
|
<foreach collection="content.areaIdList" item="item" separator="," open="(" close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="content.linkman != null and content.linkman != ''">
|
|
|
|
|
and a.linkman like #{content.linkman}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="content.status != null">
|
|
|
|
|
and a.status = #{content.status}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="content.ifBindSupplierUser != null and content.ifBindSupplierUser == 1">
|
|
|
|
|
and a.supplier_user_id is not null
|
|
|
|
|
</if>
|
|
|
|
|
<if test="content.ifBindSupplierUser != null and content.ifBindSupplierUser == 2">
|
|
|
|
|
and a.supplier_user_id is null
|
|
|
|
|
</if>
|
|
|
|
|
<if test="content.supplierScore != null">
|
|
|
|
|
and a.supplier_score <![CDATA[ >= ]]> #{content.supplierScore}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="content.categoryIdList != null and content.categoryIdList.size() > 0">
|
|
|
|
|
and b.category_id in
|
|
|
|
|
<foreach collection="content.categoryIdList" item="categoryId" separator="," open="(" close=")">
|
|
|
|
|
#{categoryId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|