|
@@ -5,81 +5,121 @@
|
|
|
<mapper namespace="com.ruoyi.basicData.mapper.TCorpsMapper">
|
|
|
|
|
|
<resultMap type="TCorps" id="TCorpsResult">
|
|
|
- <result property="fId" column="f_id"/>
|
|
|
- <result property="fTypeid" column="f_typeid"/>
|
|
|
- <result property="fNo" column="f_no"/>
|
|
|
- <result property="fName" column="f_name"/>
|
|
|
- <result property="fCname" column="f_cname"/>
|
|
|
- <result property="fEname" column="f_ename"/>
|
|
|
- <result property="fTel" column="f_tel"/>
|
|
|
- <result property="fFax" column="f_fax"/>
|
|
|
- <result property="fEmail" column="f_email"/>
|
|
|
- <result property="fManage" column="f_manage"/>
|
|
|
- <result property="fAddr" column="f_addr"/>
|
|
|
- <result property="fEaddr" column="f_eaddr"/>
|
|
|
- <result property="fScale" column="f_scale"/>
|
|
|
- <result property="fProvince" column="f_province"/>
|
|
|
- <result property="fCity" column="f_city"/>
|
|
|
- <result property="fStltypeid" column="f_stltypeid"/>
|
|
|
- <result property="fStldays" column="f_stldays"/>
|
|
|
- <result property="fContractno" column="f_contractno"/>
|
|
|
- <result property="fContractb" column="f_contractb"/>
|
|
|
- <result property="fContracte" column="f_contracte"/>
|
|
|
- <result property="fTax" column="f_tax"/>
|
|
|
- <result property="fInvtel" column="f_invtel"/>
|
|
|
- <result property="fInvaddr" column="f_invaddr"/>
|
|
|
- <result property="fBankno" column="f_bankno"/>
|
|
|
- <result property="fBankname" column="f_bankname"/>
|
|
|
- <result property="fUbankno" column="f_ubankno"/>
|
|
|
- <result property="fUbankname" column="f_ubankname"/>
|
|
|
- <result property="fStatus" column="f_status"/>
|
|
|
- <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"/>
|
|
|
- <result property="remark" column="remark"/>
|
|
|
- <result property="fTypename" column="f_typename"/>
|
|
|
+ <result property="fId" column="f_id" />
|
|
|
+ <result property="fPid" column="f_pid" />
|
|
|
+ <result property="fTypeid" column="f_typeid" />
|
|
|
+ <result property="fNo" column="f_no" />
|
|
|
+ <result property="fName" column="f_name" />
|
|
|
+ <result property="fCname" column="f_cname" />
|
|
|
+ <result property="fEname" column="f_ename" />
|
|
|
+ <result property="fTel" column="f_tel" />
|
|
|
+ <result property="fFax" column="f_fax" />
|
|
|
+ <result property="fEmail" column="f_email" />
|
|
|
+ <result property="fManage" column="f_manage" />
|
|
|
+ <result property="fAddr" column="f_addr" />
|
|
|
+ <result property="fEaddr" column="f_eaddr" />
|
|
|
+ <result property="fScale" column="f_scale" />
|
|
|
+ <result property="fProvince" column="f_province" />
|
|
|
+ <result property="fCity" column="f_city" />
|
|
|
+ <result property="fStltypeid" column="f_stltypeid" />
|
|
|
+ <result property="fStldays" column="f_stldays" />
|
|
|
+ <result property="fContractno" column="f_contractno" />
|
|
|
+ <result property="fContractb" column="f_contractb" />
|
|
|
+ <result property="fContracte" column="f_contracte" />
|
|
|
+ <result property="fTax" column="f_tax" />
|
|
|
+ <result property="fInvtel" column="f_invtel" />
|
|
|
+ <result property="fInvaddr" column="f_invaddr" />
|
|
|
+ <result property="fBankno" column="f_bankno" />
|
|
|
+ <result property="fBankname" column="f_bankname" />
|
|
|
+ <result property="fUbankno" column="f_ubankno" />
|
|
|
+ <result property="fUbankname" column="f_ubankname" />
|
|
|
+ <result property="fStatus" column="f_status" />
|
|
|
+ <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" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ <result property="fTypename" column="f_typename" />
|
|
|
+ <result property="loginAccount" column="login_account" />
|
|
|
+ <result property="creditLv" column="credit_lv" />
|
|
|
+ <result property="paymentDays" column="payment_days" />
|
|
|
+ <result property="carNum" column="car_num" />
|
|
|
+ <result property="headOffice" column="head_office" />
|
|
|
+ <result property="registerdCapital" column="registerd_capital" />
|
|
|
+ <result property="legalPerson" column="legal_person" />
|
|
|
+ <result property="insdustry" column="insdustry" />
|
|
|
+ <result property="creditNum" column="credit_num" />
|
|
|
+ <result property="taxpayerNum" column="taxpayer_num" />
|
|
|
+ <result property="industryCommerceNum" column="industry_commerce_num" />
|
|
|
+ <result property="organizationNum" column="organization_num" />
|
|
|
+ <result property="registerOrganization" column="register_organization" />
|
|
|
+ <result property="dateOfEstablishment" column="date_of_establishment" />
|
|
|
+ <result property="companyType" column="company_type" />
|
|
|
+ <result property="businessDeadline" column="business_deadline" />
|
|
|
+ <result property="businessArea" column="business_area" />
|
|
|
+ <result property="annualDate" column="annual_date" />
|
|
|
+ <result property="registerdAddress" column="registerd_address" />
|
|
|
+ <result property="manageScope" column="manage_scope" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTCorpsVo">
|
|
|
- select f_id, f_typeid, f_no, f_name, f_cname, f_ename, f_tel, f_fax, f_email, f_manage, f_addr, f_eaddr, f_scale, f_province, f_city, f_stltypeid, f_stldays, f_contractno, f_contractb, f_contracte, f_tax, f_invtel, f_invaddr, f_bankno, f_bankname, f_ubankno, f_ubankname, f_status, del_flag, create_by, create_time, update_by, update_time, remark ,f_typename from t_corps
|
|
|
+ select f_id, f_pid, f_typeid, f_no, f_name, f_cname, f_ename, f_tel, f_fax, f_email, f_manage, f_addr, f_eaddr, f_scale, f_province, f_city, f_stltypeid, f_stldays, f_contractno, f_contractb, f_contracte, f_tax, f_invtel, f_invaddr, f_bankno, f_bankname, f_ubankno, f_ubankname, f_status, del_flag, create_by, create_time, update_by, update_time, remark, f_typename, login_account, credit_lv, payment_days, car_num, head_office, registerd_capital, legal_person, insdustry, credit_num, taxpayer_num, industry_commerce_num, organization_num, register_organization, date_of_establishment, company_type, business_deadline, business_area, annual_date, registerd_address, manage_scope from t_corps
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTCorpsList" parameterType="TCorps" resultMap="TCorpsResult">
|
|
|
<include refid="selectTCorpsVo"/>
|
|
|
<where>
|
|
|
- <if test="fTypeid != null and fTypeid != ''">and f_typeid like concat('%', #{fTypeid}, '%') </if>
|
|
|
- <if test="fNo != null and fNo != ''">and f_no like concat('%', #{fNo}, '%')</if>
|
|
|
- <if test="fName != null and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
|
|
|
- <if test="fCname != null and fCname != ''">and f_cname like concat('%', #{fCname}, '%')</if>
|
|
|
- <if test="fEname != null and fEname != ''">and f_ename like concat('%', #{fEname}, '%')</if>
|
|
|
- <if test="fTel != null and fTel != ''">and f_tel like concat('%', #{fTel}, '%')</if>
|
|
|
- <if test="fFax != null and fFax != ''">and f_fax = #{fFax}</if>
|
|
|
- <if test="fEmail != null and fEmail != ''">and f_email = #{fEmail}</if>
|
|
|
- <if test="fManage != null and fManage != ''">and f_manage = #{fManage}</if>
|
|
|
- <if test="fAddr != null and fAddr != ''">and f_addr = #{fAddr}</if>
|
|
|
- <if test="fEaddr != null and fEaddr != ''">and f_eaddr = #{fEaddr}</if>
|
|
|
- <if test="fScale != null and fScale != ''">and f_scale = #{fScale}</if>
|
|
|
- <if test="fProvince != null and fProvince != ''">and f_province = #{fProvince}</if>
|
|
|
- <if test="fCity != null and fCity != ''">and f_city = #{fCity}</if>
|
|
|
- <if test="fStltypeid != null ">and f_stltypeid = #{fStltypeid}</if>
|
|
|
- <if test="fStldays != null ">and f_stldays = #{fStldays}</if>
|
|
|
- <if test="fContractno != null and fContractno != ''">and f_contractno = #{fContractno}</if>
|
|
|
- <if test="fContractb != null ">and f_contractb = #{fContractb}</if>
|
|
|
- <if test="fContracte != null ">and f_contracte = #{fContracte}</if>
|
|
|
- <if test="fTax != null and fTax != ''">and f_tax = #{fTax}</if>
|
|
|
- <if test="fInvtel != null and fInvtel != ''">and f_invtel = #{fInvtel}</if>
|
|
|
- <if test="fInvaddr != null and fInvaddr != ''">and f_invaddr = #{fInvaddr}</if>
|
|
|
- <if test="fBankno != null and fBankno != ''">and f_bankno = #{fBankno}</if>
|
|
|
- <if test="fBankname != null and fBankname != ''">and f_bankname like concat('%', #{fBankname}, '%')</if>
|
|
|
- <if test="fUbankno != null and fUbankno != ''">and f_ubankno = #{fUbankno}</if>
|
|
|
- <if test="fUbankname != null and fUbankname != ''">and f_ubankname like concat('%', #{fUbankname}, '%')
|
|
|
- </if>
|
|
|
- <if test="fStatus != null and fStatus != ''">and f_status = #{fStatus}</if>
|
|
|
- <if test="fTypename != null and fTypename != ''">and f_typename like concat('%', #{fTypename}, '%') </if>
|
|
|
+ <if test="fTypeid != null and fTypeid != ''"> and f_typeid like concat('%', #{fTypeid}, '%')</if>
|
|
|
+ <if test="fPid != null and fPid != ''"> and f_pid = #{fPid}</if>
|
|
|
+ <if test="fNo != null and fNo != ''"> and f_no = #{fNo}</if>
|
|
|
+ <if test="fName != null and fName != ''"> and f_name like concat('%', #{fName}, '%')</if>
|
|
|
+ <if test="fCname != null and fCname != ''"> and f_cname like concat('%', #{fCname}, '%')</if>
|
|
|
+ <if test="fEname != null and fEname != ''"> and f_ename like concat('%', #{fEname}, '%')</if>
|
|
|
+ <if test="fTel != null and fTel != ''"> and f_tel = #{fTel}</if>
|
|
|
+ <if test="fFax != null and fFax != ''"> and f_fax = #{fFax}</if>
|
|
|
+ <if test="fEmail != null and fEmail != ''"> and f_email = #{fEmail}</if>
|
|
|
+ <if test="fManage != null and fManage != ''"> and f_manage = #{fManage}</if>
|
|
|
+ <if test="fAddr != null and fAddr != ''"> and f_addr = #{fAddr}</if>
|
|
|
+ <if test="fEaddr != null and fEaddr != ''"> and f_eaddr = #{fEaddr}</if>
|
|
|
+ <if test="fScale != null and fScale != ''"> and f_scale = #{fScale}</if>
|
|
|
+ <if test="fProvince != null and fProvince != ''"> and f_province = #{fProvince}</if>
|
|
|
+ <if test="fCity != null and fCity != ''"> and f_city = #{fCity}</if>
|
|
|
+ <if test="fStltypeid != null "> and f_stltypeid = #{fStltypeid}</if>
|
|
|
+ <if test="fStldays != null "> and f_stldays = #{fStldays}</if>
|
|
|
+ <if test="fContractno != null and fContractno != ''"> and f_contractno = #{fContractno}</if>
|
|
|
+ <if test="fContractb != null "> and f_contractb = #{fContractb}</if>
|
|
|
+ <if test="fContracte != null "> and f_contracte = #{fContracte}</if>
|
|
|
+ <if test="fTax != null and fTax != ''"> and f_tax = #{fTax}</if>
|
|
|
+ <if test="fInvtel != null and fInvtel != ''"> and f_invtel = #{fInvtel}</if>
|
|
|
+ <if test="fInvaddr != null and fInvaddr != ''"> and f_invaddr = #{fInvaddr}</if>
|
|
|
+ <if test="fBankno != null and fBankno != ''"> and f_bankno = #{fBankno}</if>
|
|
|
+ <if test="fBankname != null and fBankname != ''"> and f_bankname like concat('%', #{fBankname}, '%')</if>
|
|
|
+ <if test="fUbankno != null and fUbankno != ''"> and f_ubankno = #{fUbankno}</if>
|
|
|
+ <if test="fUbankname != null and fUbankname != ''"> and f_ubankname like concat('%', #{fUbankname}, '%')</if>
|
|
|
+ <if test="fStatus != null and fStatus != ''"> and f_status = #{fStatus}</if>
|
|
|
+ <if test="fTypename != null and fTypename != ''"> and f_typename like concat('%', #{fTypename}, '%')</if>
|
|
|
+ <if test="loginAccount != null and loginAccount != ''"> and login_account = #{loginAccount}</if>
|
|
|
+ <if test="creditLv != null and creditLv != ''"> and credit_lv = #{creditLv}</if>
|
|
|
+ <if test="paymentDays != null "> and payment_days = #{paymentDays}</if>
|
|
|
+ <if test="carNum != null "> and car_num = #{carNum}</if>
|
|
|
+ <if test="headOffice != null and headOffice != ''"> and head_office = #{headOffice}</if>
|
|
|
+ <if test="registerdCapital != null and registerdCapital != ''"> and registerd_capital = #{registerdCapital}</if>
|
|
|
+ <if test="legalPerson != null and legalPerson != ''"> and legal_person = #{legalPerson}</if>
|
|
|
+ <if test="insdustry != null and insdustry != ''"> and insdustry = #{insdustry}</if>
|
|
|
+ <if test="creditNum != null and creditNum != ''"> and credit_num = #{creditNum}</if>
|
|
|
+ <if test="taxpayerNum != null and taxpayerNum != ''"> and taxpayer_num = #{taxpayerNum}</if>
|
|
|
+ <if test="industryCommerceNum != null and industryCommerceNum != ''"> and industry_commerce_num = #{industryCommerceNum}</if>
|
|
|
+ <if test="organizationNum != null and organizationNum != ''"> and organization_num = #{organizationNum}</if>
|
|
|
+ <if test="registerOrganization != null and registerOrganization != ''"> and register_organization = #{registerOrganization}</if>
|
|
|
+ <if test="dateOfEstablishment != null "> and date_of_establishment = #{dateOfEstablishment}</if>
|
|
|
+ <if test="companyType != null and companyType != ''"> and company_type = #{companyType}</if>
|
|
|
+ <if test="businessDeadline != null "> and business_deadline = #{businessDeadline}</if>
|
|
|
+ <if test="businessArea != null and businessArea != ''"> and business_area = #{businessArea}</if>
|
|
|
+ <if test="annualDate != null "> and annual_date = #{annualDate}</if>
|
|
|
+ <if test="registerdAddress != null and registerdAddress != ''"> and registerd_address = #{registerdAddress}</if>
|
|
|
+ <if test="manageScope != null and manageScope != ''"> and manage_scope = #{manageScope}</if>
|
|
|
</where>
|
|
|
- ORDER BY CONVERT(f_name USING gbk) asc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTCorpsById" parameterType="Long" resultMap="TCorpsResult">
|
|
@@ -87,10 +127,39 @@
|
|
|
where f_id = #{fId}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectFleetDriverMsgListMap" parameterType="TCorps" resultType="Map">
|
|
|
+ SELECT
|
|
|
+ dri.id AS id,
|
|
|
+ com.company_name AS companyName,
|
|
|
+ dri.`name` AS `name`,
|
|
|
+ dri.sex AS sex,
|
|
|
+ dri.birthday AS birthday,
|
|
|
+ dri.allow_driver_car AS allowDriverCar,
|
|
|
+ dri.first_certificate_date AS firstCertificateDate,
|
|
|
+ dri.idcar_num AS idcarNum,
|
|
|
+ dri.tel AS tel,
|
|
|
+ dri.address AS address,
|
|
|
+ dri.resume_pic AS resumePic,
|
|
|
+ dri.driving_pic AS drivingPic,
|
|
|
+ dri.creat_time AS creatTime,
|
|
|
+ dri.modification_time AS modificationTime,
|
|
|
+ dri.bill_status AS billStatus,
|
|
|
+ dri.del_flag,
|
|
|
+ dri.create_by,
|
|
|
+ dri.update_by,
|
|
|
+ dri.update_time,
|
|
|
+ dri.remarks AS remarks
|
|
|
+ FROM
|
|
|
+ fleet_driver_msg dri
|
|
|
+ LEFT JOIN fleet_company_msg AS com ON dri.fleet_company_id = com.id
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
<insert id="insertTCorps" parameterType="TCorps" useGeneratedKeys="true" keyProperty="fId">
|
|
|
insert into t_corps
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="fTypeid != null">f_typeid,</if>
|
|
|
+ <if test="fPid != null and fPid != ''">f_pid,</if>
|
|
|
+ <if test="fTypeid != null and fTypeid != ''">f_typeid,</if>
|
|
|
<if test="fNo != null and fNo != ''">f_no,</if>
|
|
|
<if test="fName != null and fName != ''">f_name,</if>
|
|
|
<if test="fCname != null">f_cname,</if>
|
|
@@ -124,9 +193,30 @@
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
<if test="remark != null">remark,</if>
|
|
|
<if test="fTypename != null">f_typename,</if>
|
|
|
+ <if test="loginAccount != null">login_account,</if>
|
|
|
+ <if test="creditLv != null">credit_lv,</if>
|
|
|
+ <if test="paymentDays != null">payment_days,</if>
|
|
|
+ <if test="carNum != null">car_num,</if>
|
|
|
+ <if test="headOffice != null">head_office,</if>
|
|
|
+ <if test="registerdCapital != null">registerd_capital,</if>
|
|
|
+ <if test="legalPerson != null">legal_person,</if>
|
|
|
+ <if test="insdustry != null">insdustry,</if>
|
|
|
+ <if test="creditNum != null">credit_num,</if>
|
|
|
+ <if test="taxpayerNum != null">taxpayer_num,</if>
|
|
|
+ <if test="industryCommerceNum != null">industry_commerce_num,</if>
|
|
|
+ <if test="organizationNum != null">organization_num,</if>
|
|
|
+ <if test="registerOrganization != null">register_organization,</if>
|
|
|
+ <if test="dateOfEstablishment != null">date_of_establishment,</if>
|
|
|
+ <if test="companyType != null">company_type,</if>
|
|
|
+ <if test="businessDeadline != null">business_deadline,</if>
|
|
|
+ <if test="businessArea != null">business_area,</if>
|
|
|
+ <if test="annualDate != null">annual_date,</if>
|
|
|
+ <if test="registerdAddress != null">registerd_address,</if>
|
|
|
+ <if test="manageScope != null">manage_scope,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="fTypeid != null">#{fTypeid},</if>
|
|
|
+ <if test="fPid != null and fPid != ''">#{fPid},</if>
|
|
|
+ <if test="fTypeid != null and fTypeid != ''">#{fTypeid},</if>
|
|
|
<if test="fNo != null and fNo != ''">#{fNo},</if>
|
|
|
<if test="fName != null and fName != ''">#{fName},</if>
|
|
|
<if test="fCname != null">#{fCname},</if>
|
|
@@ -160,12 +250,33 @@
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
<if test="fTypename != null">#{fTypename},</if>
|
|
|
+ <if test="loginAccount != null">#{loginAccount},</if>
|
|
|
+ <if test="creditLv != null">#{creditLv},</if>
|
|
|
+ <if test="paymentDays != null">#{paymentDays},</if>
|
|
|
+ <if test="carNum != null">#{carNum},</if>
|
|
|
+ <if test="headOffice != null">#{headOffice},</if>
|
|
|
+ <if test="registerdCapital != null">#{registerdCapital},</if>
|
|
|
+ <if test="legalPerson != null">#{legalPerson},</if>
|
|
|
+ <if test="insdustry != null">#{insdustry},</if>
|
|
|
+ <if test="creditNum != null">#{creditNum},</if>
|
|
|
+ <if test="taxpayerNum != null">#{taxpayerNum},</if>
|
|
|
+ <if test="industryCommerceNum != null">#{industryCommerceNum},</if>
|
|
|
+ <if test="organizationNum != null">#{organizationNum},</if>
|
|
|
+ <if test="registerOrganization != null">#{registerOrganization},</if>
|
|
|
+ <if test="dateOfEstablishment != null">#{dateOfEstablishment},</if>
|
|
|
+ <if test="companyType != null">#{companyType},</if>
|
|
|
+ <if test="businessDeadline != null">#{businessDeadline},</if>
|
|
|
+ <if test="businessArea != null">#{businessArea},</if>
|
|
|
+ <if test="annualDate != null">#{annualDate},</if>
|
|
|
+ <if test="registerdAddress != null">#{registerdAddress},</if>
|
|
|
+ <if test="manageScope != null">#{manageScope},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateTCorps" parameterType="TCorps">
|
|
|
update t_corps
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="fPid != null">f_pid = #{fPid},</if>
|
|
|
<if test="fTypeid != null">f_typeid = #{fTypeid},</if>
|
|
|
<if test="fNo != null and fNo != ''">f_no = #{fNo},</if>
|
|
|
<if test="fName != null and fName != ''">f_name = #{fName},</if>
|
|
@@ -227,4 +338,8 @@
|
|
|
select f_id,f_addr from t_corps where f_cname = #{fCname} limit 1
|
|
|
</select>
|
|
|
|
|
|
+ <select id="checkULoginAccountUnique" parameterType="String" resultMap="TCorpsResult">
|
|
|
+ select f_id,f_addr from t_corps where login_account = #{loginAccount} limit 1
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|