万材erp项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

162 lines
11 KiB

<?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.ruoyi.system.mapper.SysCompanyInformationMapper">
<resultMap type="SysCompanyInformation" id="SysCompanyInformationResult">
<result property="companyId" column="company_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="englishName" column="english_name" />
<result property="companyAddress" column="company_address" />
<result property="companyPostalCode" column="company_postal_code" />
<result property="country" column="country" />
<result property="legalRepresentative" column="legal_representative" />
<result property="contacts" column="contacts" />
<result property="contactNumber" column="contact_number" />
<result property="companyFax" column="company_fax" />
<result property="enterpriseCustomsCode" column="enterprise_customs_code" />
<result property="enterpriseOrganizationCode" column="enterprise_organization_code" />
<result property="industryCode" column="Industry_code" />
<result property="enterpriseNature" column="enterprise_nature" />
<result property="establishedTime" column="established_time" />
<result property="settlementBank" column="settlement_bank" />
<result property="exchangeSettlementAccount" column="exchange_settlement_account" />
<result property="depositBank" column="deposit_bank" />
<result property="bankAccount" column="bank_account" />
<result property="companyEmail" column="company_email" />
<result property="website" column="website" />
<result property="importDeclarant" column="import_declarant" />
<result property="exportDeclarant" column="export_declarant" />
<result property="exchangeOffice" column="exchange_office" />
<result property="rmbRegisteredCapital" column="rmb_registered_capital" />
<result property="foreignCurrencyRegistration" column="foreign_currency_registration" />
<result property="registeredCapital" column="registered_capital" />
<result property="firstAddTime" column="first_add_time" />
<result property="updateInfoTime" column="update_info_time" />
</resultMap>
<sql id="selectSysCompanyInformationVo">
select company_id, enterprise_name, english_name, company_address, company_postal_code, country, legal_representative, contacts, contact_number, company_fax, enterprise_customs_code, enterprise_organization_code, Industry_code, enterprise_nature, established_time, settlement_bank, exchange_settlement_account, deposit_bank, bank_account, company_email, website, import_declarant, export_declarant, exchange_office, rmb_registered_capital, foreign_currency_registration, registered_capital, first_add_time, update_info_time from sys_company_information
</sql>
<select id="selectSysCompanyInformationList" parameterType="SysCompanyInformation" resultMap="SysCompanyInformationResult">
<include refid="selectSysCompanyInformationVo"/>
<where>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
</where>
</select>
<select id="selectSysCompanyInformationById" parameterType="Long" resultMap="SysCompanyInformationResult">
<include refid="selectSysCompanyInformationVo"/>
where company_id = #{companyId}
</select>
<insert id="insertSysCompanyInformation" parameterType="SysCompanyInformation" useGeneratedKeys="true" keyProperty="companyId">
insert into sys_company_information
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseName != null">enterprise_name,</if>
<if test="englishName != null">english_name,</if>
<if test="companyAddress != null">company_address,</if>
<if test="companyPostalCode != null">company_postal_code,</if>
<if test="country != null">country,</if>
<if test="legalRepresentative != null">legal_representative,</if>
<if test="contacts != null">contacts,</if>
<if test="contactNumber != null">contact_number,</if>
<if test="companyFax != null">company_fax,</if>
<if test="enterpriseCustomsCode != null">enterprise_customs_code,</if>
<if test="enterpriseOrganizationCode != null">enterprise_organization_code,</if>
<if test="industryCode != null">Industry_code,</if>
<if test="enterpriseNature != null">enterprise_nature,</if>
<if test="establishedTime != null">established_time,</if>
<if test="settlementBank != null">settlement_bank,</if>
<if test="exchangeSettlementAccount != null">exchange_settlement_account,</if>
<if test="depositBank != null">deposit_bank,</if>
<if test="bankAccount != null">bank_account,</if>
<if test="companyEmail != null">company_email,</if>
<if test="website != null">website,</if>
<if test="importDeclarant != null">import_declarant,</if>
<if test="exportDeclarant != null">export_declarant,</if>
<if test="exchangeOffice != null">exchange_office,</if>
<if test="rmbRegisteredCapital != null">rmb_registered_capital,</if>
<if test="foreignCurrencyRegistration != null">foreign_currency_registration,</if>
<if test="registeredCapital != null">registered_capital,</if>
first_add_time,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="englishName != null">#{englishName},</if>
<if test="companyAddress != null">#{companyAddress},</if>
<if test="companyPostalCode != null">#{companyPostalCode},</if>
<if test="country != null">#{country},</if>
<if test="legalRepresentative != null">#{legalRepresentative},</if>
<if test="contacts != null">#{contacts},</if>
<if test="contactNumber != null">#{contactNumber},</if>
<if test="companyFax != null">#{companyFax},</if>
<if test="enterpriseCustomsCode != null">#{enterpriseCustomsCode},</if>
<if test="enterpriseOrganizationCode != null">#{enterpriseOrganizationCode},</if>
<if test="industryCode != null">#{industryCode},</if>
<if test="enterpriseNature != null">#{enterpriseNature},</if>
<if test="establishedTime != null">#{establishedTime},</if>
<if test="settlementBank != null">#{settlementBank},</if>
<if test="exchangeSettlementAccount != null">#{exchangeSettlementAccount},</if>
<if test="depositBank != null">#{depositBank},</if>
<if test="bankAccount != null">#{bankAccount},</if>
<if test="companyEmail != null">#{companyEmail},</if>
<if test="website != null">#{website},</if>
<if test="importDeclarant != null">#{importDeclarant},</if>
<if test="exportDeclarant != null">#{exportDeclarant},</if>
<if test="exchangeOffice != null">#{exchangeOffice},</if>
<if test="rmbRegisteredCapital != null">#{rmbRegisteredCapital},</if>
<if test="foreignCurrencyRegistration != null">#{foreignCurrencyRegistration},</if>
<if test="registeredCapital != null">#{registeredCapital},</if>
now(),
</trim>
</insert>
<update id="updateSysCompanyInformation" parameterType="SysCompanyInformation">
update sys_company_information
<trim prefix="SET" suffixOverrides=",">
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="englishName != null">english_name = #{englishName},</if>
<if test="companyAddress != null">company_address = #{companyAddress},</if>
<if test="companyPostalCode != null">company_postal_code = #{companyPostalCode},</if>
<if test="country != null">country = #{country},</if>
<if test="legalRepresentative != null">legal_representative = #{legalRepresentative},</if>
<if test="contacts != null">contacts = #{contacts},</if>
<if test="contactNumber != null">contact_number = #{contactNumber},</if>
<if test="companyFax != null">company_fax = #{companyFax},</if>
<if test="enterpriseCustomsCode != null">enterprise_customs_code = #{enterpriseCustomsCode},</if>
<if test="enterpriseOrganizationCode != null">enterprise_organization_code = #{enterpriseOrganizationCode},</if>
<if test="industryCode != null">Industry_code = #{industryCode},</if>
<if test="enterpriseNature != null">enterprise_nature = #{enterpriseNature},</if>
<if test="establishedTime != null">established_time = #{establishedTime},</if>
<if test="settlementBank != null">settlement_bank = #{settlementBank},</if>
<if test="exchangeSettlementAccount != null">exchange_settlement_account = #{exchangeSettlementAccount},</if>
<if test="depositBank != null">deposit_bank = #{depositBank},</if>
<if test="bankAccount != null">bank_account = #{bankAccount},</if>
<if test="companyEmail != null">company_email = #{companyEmail},</if>
<if test="website != null">website = #{website},</if>
<if test="importDeclarant != null">import_declarant = #{importDeclarant},</if>
<if test="exportDeclarant != null">export_declarant = #{exportDeclarant},</if>
<if test="exchangeOffice != null">exchange_office = #{exchangeOffice},</if>
<if test="rmbRegisteredCapital != null">rmb_registered_capital = #{rmbRegisteredCapital},</if>
<if test="foreignCurrencyRegistration != null">foreign_currency_registration = #{foreignCurrencyRegistration},</if>
<if test="registeredCapital != null">registered_capital = #{registeredCapital},</if>
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
</trim>
where company_id = #{companyId}
</update>
<delete id="deleteSysCompanyInformationById" parameterType="Long">
delete from sys_company_information where company_id = #{companyId}
</delete>
<delete id="deleteSysCompanyInformationByIds" parameterType="String">
delete from sys_company_information where company_id in
<foreach item="companyId" collection="array" open="(" separator="," close=")">
#{companyId}
</foreach>
</delete>
</mapper>