FleetCompanyMsgMapper.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.basicData.mapper.FleetCompanyMsgMapper">
  6. <resultMap type="FleetCompanyMsg" id="FleetCompanyMsgResult">
  7. <result property="id" column="id" />
  8. <result property="companyName" column="company_name" />
  9. <result property="loginAccount" column="login_account" />
  10. <result property="companyAddress" column="company_address" />
  11. <result property="openingBank" column="opening_bank" />
  12. <result property="bankAccount" column="bank_account" />
  13. <result property="creditLv" column="credit_lv" />
  14. <result property="paymentDays" column="payment_days" />
  15. <result property="carNum" column="car_num" />
  16. <result property="linkMan" column="link_man" />
  17. <result property="linkPhone" column="link_phone" />
  18. <result property="fax" column="fax" />
  19. <result property="email" column="email" />
  20. <result property="headOffice" column="head_office" />
  21. <result property="registerdCapital" column="registerd_capital" />
  22. <result property="legalPerson" column="legal_person" />
  23. <result property="insdustry" column="insdustry" />
  24. <result property="creditNum" column="credit_num" />
  25. <result property="taxpayerNum" column="taxpayer_num" />
  26. <result property="industryCommerceNum" column="industry_commerce_num" />
  27. <result property="organizationNum" column="organization_num" />
  28. <result property="registerOrganization" column="register_organization" />
  29. <result property="dateOfEstablishment" column="date_of_establishment" />
  30. <result property="companyType" column="company_type" />
  31. <result property="businessDeadline" column="business_deadline" />
  32. <result property="businessArea" column="business_area" />
  33. <result property="annualDate" column="annual_date" />
  34. <result property="registerdAddress" column="registerd_address" />
  35. <result property="manageScope" column="manage_scope" />
  36. <result property="creatTime" column="creat_time" />
  37. <result property="modificationTime" column="modification_time" />
  38. <result property="billStatus" column="bill_status" />
  39. <result property="delFlag" column="del_flag" />
  40. <result property="createBy" column="create_by" />
  41. <result property="updateBy" column="update_by" />
  42. <result property="updateTime" column="update_time" />
  43. <result property="remark" column="remark" />
  44. </resultMap>
  45. <sql id="selectFleetCompanyMsgVo">
  46. select id, company_name, login_account, company_address, opening_bank, bank_account, credit_lv, payment_days, car_num, link_man, link_phone, fax, email, head_office, registerd_capital, legal_person,
  47. insdustry, credit_num, taxpayer_num, industry_commerce_num, organization_num, register_organization, date_of_establishment, company_type,
  48. business_deadline, business_area, annual_date, registerd_address, manage_scope, creat_time, modification_time , bill_status, del_flag, create_by, update_by, update_time, remark
  49. from fleet_company_msg
  50. </sql>
  51. <select id="selectFleetCompanyMsgList" parameterType="FleetCompanyMsg" resultMap="FleetCompanyMsgResult">
  52. <include refid="selectFleetCompanyMsgVo"/>
  53. <where>
  54. <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
  55. <if test="loginAccount != null and loginAccount != ''"> and login_account = #{loginAccount}</if>
  56. <if test="companyAddress != null and companyAddress != ''"> and company_address = #{companyAddress}</if>
  57. <if test="openingBank != null and openingBank != ''"> and opening_bank = #{openingBank}</if>
  58. <if test="bankAccount != null and bankAccount != ''"> and bank_account = #{bankAccount}</if>
  59. <if test="creditLv != null and creditLv != ''"> and credit_lv = #{creditLv}</if>
  60. <if test="paymentDays != null "> and payment_days = #{paymentDays}</if>
  61. <if test="carNum != null "> and car_num = #{carNum}</if>
  62. <if test="linkMan != null and linkMan != ''"> and link_man = #{linkMan}</if>
  63. <if test="linkPhone != null and linkPhone != ''"> and link_phone = #{linkPhone}</if>
  64. <if test="fax != null and fax != ''"> and fax = #{fax}</if>
  65. <if test="email != null and email != ''"> and email = #{email}</if>
  66. <if test="headOffice != null and headOffice != ''"> and head_office = #{headOffice}</if>
  67. <if test="registerdCapital != null and registerdCapital != ''"> and registerd_capital = #{registerdCapital}</if>
  68. <if test="legalPerson != null and legalPerson != ''"> and legal_person = #{legalPerson}</if>
  69. <if test="insdustry != null and insdustry != ''"> and insdustry = #{insdustry}</if>
  70. <if test="creditNum != null and creditNum != ''"> and credit_num = #{creditNum}</if>
  71. <if test="taxpayerNum != null and taxpayerNum != ''"> and taxpayer_num = #{taxpayerNum}</if>
  72. <if test="industryCommerceNum != null and industryCommerceNum != ''"> and industry_commerce_num = #{industryCommerceNum}</if>
  73. <if test="organizationNum != null and organizationNum != ''"> and organization_num = #{organizationNum}</if>
  74. <if test="registerOrganization != null and registerOrganization != ''"> and register_organization = #{registerOrganization}</if>
  75. <if test="dateOfEstablishment != null "> and date_of_establishment = #{dateOfEstablishment}</if>
  76. <if test="companyType != null and companyType != ''"> and company_type = #{companyType}</if>
  77. <if test="businessDeadline != null "> and business_deadline = #{businessDeadline}</if>
  78. <if test="businessArea != null and businessArea != ''"> and business_area = #{businessArea}</if>
  79. <if test="annualDate != null "> and annual_date = #{annualDate}</if>
  80. <if test="registerdAddress != null and registerdAddress != ''"> and registerd_address = #{registerdAddress}</if>
  81. <if test="manageScope != null and manageScope != ''"> and manage_scope = #{manageScope}</if>
  82. <if test="creatTime != null "> and creat_time = #{creatTime}</if>
  83. <if test="modificationTime != null "> and modification_time = #{modificationTime}</if>
  84. <if test="billStatus != null "> and bill_status = #{billStatus}</if>
  85. </where>
  86. </select>
  87. <select id="selectFleetCompanyMsgById" parameterType="Long" resultMap="FleetCompanyMsgResult">
  88. <include refid="selectFleetCompanyMsgVo"/>
  89. where id = #{id}
  90. </select>
  91. <select id="selectFleetCompanyMsgIdNameList" resultType="FleetCompanyMsg" resultMap="FleetCompanyMsgResult">
  92. select id, company_name from fleet_company_msg
  93. <where>
  94. <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
  95. <if test="loginAccount != null and loginAccount != ''"> and login_account = #{loginAccount}</if>
  96. <if test="companyAddress != null and companyAddress != ''"> and company_address = #{companyAddress}</if>
  97. <if test="openingBank != null and openingBank != ''"> and opening_bank = #{openingBank}</if>
  98. <if test="bankAccount != null and bankAccount != ''"> and bank_account = #{bankAccount}</if>
  99. <if test="creditLv != null and creditLv != ''"> and credit_lv = #{creditLv}</if>
  100. <if test="paymentDays != null "> and payment_days = #{paymentDays}</if>
  101. <if test="carNum != null "> and car_num = #{carNum}</if>
  102. <if test="linkMan != null and linkMan != ''"> and link_man = #{linkMan}</if>
  103. <if test="linkPhone != null and linkPhone != ''"> and link_phone = #{linkPhone}</if>
  104. <if test="fax != null and fax != ''"> and fax = #{fax}</if>
  105. <if test="email != null and email != ''"> and email = #{email}</if>
  106. <if test="headOffice != null and headOffice != ''"> and head_office = #{headOffice}</if>
  107. <if test="registerdCapital != null and registerdCapital != ''"> and registerd_capital = #{registerdCapital}</if>
  108. <if test="legalPerson != null and legalPerson != ''"> and legal_person = #{legalPerson}</if>
  109. <if test="insdustry != null and insdustry != ''"> and insdustry = #{insdustry}</if>
  110. <if test="creditNum != null and creditNum != ''"> and credit_num = #{creditNum}</if>
  111. <if test="taxpayerNum != null and taxpayerNum != ''"> and taxpayer_num = #{taxpayerNum}</if>
  112. <if test="industryCommerceNum != null and industryCommerceNum != ''"> and industry_commerce_num = #{industryCommerceNum}</if>
  113. <if test="organizationNum != null and organizationNum != ''"> and organization_num = #{organizationNum}</if>
  114. <if test="registerOrganization != null and registerOrganization != ''"> and register_organization = #{registerOrganization}</if>
  115. <if test="dateOfEstablishment != null "> and date_of_establishment = #{dateOfEstablishment}</if>
  116. <if test="companyType != null and companyType != ''"> and company_type = #{companyType}</if>
  117. <if test="businessDeadline != null "> and business_deadline = #{businessDeadline}</if>
  118. <if test="businessArea != null and businessArea != ''"> and business_area = #{businessArea}</if>
  119. <if test="annualDate != null "> and annual_date = #{annualDate}</if>
  120. <if test="registerdAddress != null and registerdAddress != ''"> and registerd_address = #{registerdAddress}</if>
  121. <if test="manageScope != null and manageScope != ''"> and manage_scope = #{manageScope}</if>
  122. <if test="creatTime != null "> and creat_time = #{creatTime}</if>
  123. <if test="modificationTime != null "> and modification_time = #{modificationTime}</if>
  124. <if test="billStatus != null "> and bill_status = #{billStatus}</if>
  125. </where>
  126. </select>
  127. <insert id="insertFleetCompanyMsg" parameterType="FleetCompanyMsg" useGeneratedKeys="true" keyProperty="id">
  128. insert into fleet_company_msg
  129. <trim prefix="(" suffix=")" suffixOverrides=",">
  130. <if test="companyName != null">company_name,</if>
  131. <if test="loginAccount != null and loginAccount != ''">login_account,</if>
  132. <if test="companyAddress != null">company_address,</if>
  133. <if test="openingBank != null">opening_bank,</if>
  134. <if test="bankAccount != null">bank_account,</if>
  135. <if test="creditLv != null">credit_lv,</if>
  136. <if test="paymentDays != null">payment_days,</if>
  137. <if test="carNum != null">car_num,</if>
  138. <if test="linkMan != null">link_man,</if>
  139. <if test="linkPhone != null">link_phone,</if>
  140. <if test="fax != null">fax,</if>
  141. <if test="email != null">email,</if>
  142. <if test="headOffice != null">head_office,</if>
  143. <if test="registerdCapital != null">registerd_capital,</if>
  144. <if test="legalPerson != null">legal_person,</if>
  145. <if test="insdustry != null">insdustry,</if>
  146. <if test="creditNum != null">credit_num,</if>
  147. <if test="taxpayerNum != null">taxpayer_num,</if>
  148. <if test="industryCommerceNum != null">industry_commerce_num,</if>
  149. <if test="organizationNum != null">organization_num,</if>
  150. <if test="registerOrganization != null">register_organization,</if>
  151. <if test="dateOfEstablishment != null">date_of_establishment,</if>
  152. <if test="companyType != null">company_type,</if>
  153. <if test="businessDeadline != null">business_deadline,</if>
  154. <if test="businessArea != null">business_area,</if>
  155. <if test="annualDate != null">annual_date,</if>
  156. <if test="registerdAddress != null">registerd_address,</if>
  157. <if test="manageScope != null">manage_scope,</if>
  158. <if test="creatTime != null">creat_time,</if>
  159. <if test="modificationTime != null">modification_time,</if>
  160. <if test="billStatus != null">bill_status,</if>
  161. <if test="delFlag != null">del_flag,</if>
  162. <if test="createBy != null">create_by,</if>
  163. <if test="updateBy != null">update_by,</if>
  164. <if test="updateTime != null">update_time,</if>
  165. <if test="remark != null">remark,</if>
  166. </trim>
  167. <trim prefix="values (" suffix=")" suffixOverrides=",">
  168. <if test="companyName != null">#{companyName},</if>
  169. <if test="loginAccount != null and loginAccount != ''">#{loginAccount},</if>
  170. <if test="companyAddress != null">#{companyAddress},</if>
  171. <if test="openingBank != null">#{openingBank},</if>
  172. <if test="bankAccount != null">#{bankAccount},</if>
  173. <if test="creditLv != null">#{creditLv},</if>
  174. <if test="paymentDays != null">#{paymentDays},</if>
  175. <if test="carNum != null">#{carNum},</if>
  176. <if test="linkMan != null">#{linkMan},</if>
  177. <if test="linkPhone != null">#{linkPhone},</if>
  178. <if test="fax != null">#{fax},</if>
  179. <if test="email != null">#{email},</if>
  180. <if test="headOffice != null">#{headOffice},</if>
  181. <if test="registerdCapital != null">#{registerdCapital},</if>
  182. <if test="legalPerson != null">#{legalPerson},</if>
  183. <if test="insdustry != null">#{insdustry},</if>
  184. <if test="creditNum != null">#{creditNum},</if>
  185. <if test="taxpayerNum != null">#{taxpayerNum},</if>
  186. <if test="industryCommerceNum != null">#{industryCommerceNum},</if>
  187. <if test="organizationNum != null">#{organizationNum},</if>
  188. <if test="registerOrganization != null">#{registerOrganization},</if>
  189. <if test="dateOfEstablishment != null">#{dateOfEstablishment},</if>
  190. <if test="companyType != null">#{companyType},</if>
  191. <if test="businessDeadline != null">#{businessDeadline},</if>
  192. <if test="businessArea != null">#{businessArea},</if>
  193. <if test="annualDate != null">#{annualDate},</if>
  194. <if test="registerdAddress != null">#{registerdAddress},</if>
  195. <if test="manageScope != null">#{manageScope},</if>
  196. <if test="creatTime != null">#{creatTime},</if>
  197. <if test="modificationTime != null">#{modificationTime},</if>
  198. <if test="billStatus != null">#{billStatus},</if>
  199. <if test="delFlag != null">#{delFlag},</if>
  200. <if test="createBy != null">#{createBy},</if>
  201. <if test="updateBy != null">#{updateBy},</if>
  202. <if test="updateTime != null">#{updateTime},</if>
  203. <if test="remark != null">#{remark},</if>
  204. </trim>
  205. </insert>
  206. <update id="updateFleetCompanyMsg" parameterType="FleetCompanyMsg">
  207. update fleet_company_msg
  208. <trim prefix="SET" suffixOverrides=",">
  209. <if test="companyName != null">company_name = #{companyName},</if>
  210. <if test="loginAccount != null and loginAccount != ''">login_account = #{loginAccount},</if>
  211. <if test="companyAddress != null">company_address = #{companyAddress},</if>
  212. <if test="openingBank != null">opening_bank = #{openingBank},</if>
  213. <if test="bankAccount != null">bank_account = #{bankAccount},</if>
  214. <if test="creditLv != null">credit_lv = #{creditLv},</if>
  215. <if test="paymentDays != null">payment_days = #{paymentDays},</if>
  216. <if test="carNum != null">car_num = #{carNum},</if>
  217. <if test="linkMan != null">link_man = #{linkMan},</if>
  218. <if test="linkPhone != null">link_phone = #{linkPhone},</if>
  219. <if test="fax != null">fax = #{fax},</if>
  220. <if test="email != null">email = #{email},</if>
  221. <if test="headOffice != null">head_office = #{headOffice},</if>
  222. <if test="registerdCapital != null">registerd_capital = #{registerdCapital},</if>
  223. <if test="legalPerson != null">legal_person = #{legalPerson},</if>
  224. <if test="insdustry != null">insdustry = #{insdustry},</if>
  225. <if test="creditNum != null">credit_num = #{creditNum},</if>
  226. <if test="taxpayerNum != null">taxpayer_num = #{taxpayerNum},</if>
  227. <if test="industryCommerceNum != null">industry_commerce_num = #{industryCommerceNum},</if>
  228. <if test="organizationNum != null">organization_num = #{organizationNum},</if>
  229. <if test="registerOrganization != null">register_organization = #{registerOrganization},</if>
  230. <if test="dateOfEstablishment != null">date_of_establishment = #{dateOfEstablishment},</if>
  231. <if test="companyType != null">company_type = #{companyType},</if>
  232. <if test="businessDeadline != null">business_deadline = #{businessDeadline},</if>
  233. <if test="businessArea != null">business_area = #{businessArea},</if>
  234. <if test="annualDate != null">annual_date = #{annualDate},</if>
  235. <if test="registerdAddress != null">registerd_address = #{registerdAddress},</if>
  236. <if test="manageScope != null">manage_scope = #{manageScope},</if>
  237. <if test="creatTime != null">creat_time = #{creatTime},</if>
  238. <if test="modificationTime != null">modification_time = #{modificationTime},</if>
  239. <if test="billStatus != null">bill_status = #{billStatus},</if>
  240. <if test="delFlag != null">del_flag = #{delFlag},</if>
  241. <if test="createBy != null">create_by = #{createBy},</if>
  242. <if test="updateBy != null">update_by = #{updateBy},</if>
  243. <if test="updateTime != null">update_time = #{updateTime},</if>
  244. <if test="remark != null">remark = #{remark},</if>
  245. </trim>
  246. where id = #{id}
  247. </update>
  248. <delete id="deleteFleetCompanyMsgById" parameterType="Long">
  249. delete from fleet_company_msg where id = #{id}
  250. </delete>
  251. <delete id="deleteFleetCompanyMsgByIds" parameterType="String">
  252. delete from fleet_company_msg where id in
  253. <foreach item="id" collection="array" open="(" separator="," close=")">
  254. #{id}
  255. </foreach>
  256. </delete>
  257. <select id="checkFNoUnique" parameterType="String" resultMap="FleetCompanyMsgResult">
  258. select id,company_name from fleet_company_msg where company_name = #{companyName} limit 1
  259. </select>
  260. <select id="selectFleetCompanyMsgListMap" parameterType="FleetCompanyMsg" resultType="Map">
  261. select
  262. <where>
  263. <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
  264. <if test="loginAccount != null and loginAccount != ''"> and login_account = #{loginAccount}</if>
  265. <if test="companyAddress != null and companyAddress != ''"> and company_address = #{companyAddress}</if>
  266. <if test="openingBank != null and openingBank != ''"> and opening_bank = #{openingBank}</if>
  267. <if test="bankAccount != null and bankAccount != ''"> and bank_account = #{bankAccount}</if>
  268. <if test="creditLv != null and creditLv != ''"> and credit_lv = #{creditLv}</if>
  269. <if test="paymentDays != null "> and payment_days = #{paymentDays}</if>
  270. <if test="carNum != null "> and car_num = #{carNum}</if>
  271. <if test="linkMan != null and linkMan != ''"> and link_man = #{linkMan}</if>
  272. <if test="linkPhone != null and linkPhone != ''"> and link_phone = #{linkPhone}</if>
  273. <if test="fax != null and fax != ''"> and fax = #{fax}</if>
  274. <if test="email != null and email != ''"> and email = #{email}</if>
  275. <if test="headOffice != null and headOffice != ''"> and head_office = #{headOffice}</if>
  276. <if test="registerdCapital != null and registerdCapital != ''"> and registerd_capital = #{registerdCapital}</if>
  277. <if test="legalPerson != null and legalPerson != ''"> and legal_person = #{legalPerson}</if>
  278. <if test="insdustry != null and insdustry != ''"> and insdustry = #{insdustry}</if>
  279. <if test="creditNum != null and creditNum != ''"> and credit_num = #{creditNum}</if>
  280. <if test="taxpayerNum != null and taxpayerNum != ''"> and taxpayer_num = #{taxpayerNum}</if>
  281. <if test="industryCommerceNum != null and industryCommerceNum != ''"> and industry_commerce_num = #{industryCommerceNum}</if>
  282. <if test="organizationNum != null and organizationNum != ''"> and organization_num = #{organizationNum}</if>
  283. <if test="registerOrganization != null and registerOrganization != ''"> and register_organization = #{registerOrganization}</if>
  284. <if test="dateOfEstablishment != null "> and date_of_establishment = #{dateOfEstablishment}</if>
  285. <if test="companyType != null and companyType != ''"> and company_type = #{companyType}</if>
  286. <if test="businessDeadline != null "> and business_deadline = #{businessDeadline}</if>
  287. <if test="businessArea != null and businessArea != ''"> and business_area = #{businessArea}</if>
  288. <if test="annualDate != null "> and annual_date = #{annualDate}</if>
  289. <if test="registerdAddress != null and registerdAddress != ''"> and registerd_address = #{registerdAddress}</if>
  290. <if test="manageScope != null and manageScope != ''"> and manage_scope = #{manageScope}</if>
  291. <if test="creatTime != null "> and creat_time = #{creatTime}</if>
  292. <if test="modificationTime != null "> and modification_time = #{modificationTime}</if>
  293. <if test="billStatus != null "> and bill_status = #{billStatus}</if>
  294. </where>
  295. </select>
  296. </mapper>