InspectionApplyMapper.xml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~
  4. ~ Copyright (c) 2018-2025, zhoutao All rights reserved.
  5. ~
  6. ~ Redistribution and use in source and binary forms, with or without
  7. ~ modification, are permitted provided that the following conditions are met:
  8. ~
  9. ~ Redistributions of source code must retain the above copyright notice,
  10. ~ this list of conditions and the following disclaimer.
  11. ~ Redistributions in binary form must reproduce the above copyright
  12. ~ notice, this list of conditions and the following disclaimer in the
  13. ~ documentation and/or other materials provided with the distribution.
  14. ~ Neither the name of the pig4cloud.com developer nor the names of its
  15. ~ contributors may be used to endorse or promote products derived from
  16. ~ this software without specific prior written permission.
  17. ~ Author: zhoutao (zhoutao9006@163.com)
  18. ~
  19. -->
  20. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  21. <mapper namespace="com.pig4cloud.pigx.qa.mapper.InspectionApplyMapper">
  22. <select id="getByParm" resultType="com.pig4cloud.pigx.qa.entity.InspectionApply">
  23. select ia.* FROM Inspection_Apply ia
  24. inner join SG_SUPPLIER sp on ia.s_id=sp.s_id
  25. where 1=1
  26. <if test="scCode != null and scCode !=''">
  27. and ia.sc_code like '%'+#{scCode}+'%'
  28. </if>
  29. <if test="poCode != null and poCode !=''">
  30. and ia.po_code like '%'+#{poCode}+'%'
  31. </if>
  32. <if test="sId != null and sId !=''">
  33. and ia.s_id = #{sId}
  34. </if>
  35. <if test="eId != null and eId !=''">
  36. and ia.e_id = #{eId}
  37. </if>
  38. <if test="createTime != null and createTime !=''">
  39. and ia.create_time >= CONCAT(left(#{createTime},10),' 00:00:00')
  40. </if>
  41. <if test="dateStart != null and dateStart !=''">
  42. and ia.date_start >= CONCAT(left(#{dateStart},10),' 00:00:00')
  43. </if>
  44. <if test="dateEnd != null and dateEnd !=''">
  45. and ia.date_end &lt; CONCAT(left(#{dateEnd},10),' 23:59:59')
  46. </if>
  47. <if test="areaCode != null and areaCode !=''">
  48. and sp.area_code like '%'+#{areaCode}+'%'
  49. </if>
  50. order by ia.date_start asc ,ia.sc_id desc
  51. </select>
  52. </mapper>