CompanyReportDao.xml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="platform.modules.government.dao.CompanyReportDao">
  4. <select id="countCompanyReport" resultType="Integer">
  5. select count(id) from c_report where report_month=#{month} and report_year=#{year} and build_id=#{buildId}
  6. and status=1
  7. </select>
  8. <select id="getCompanyReportByDate" resultType="platform.modules.government.entity.CompanyReport">
  9. select * from c_report where report_month=#{month} and report_year=#{year} and company_id=#{companyId}
  10. </select>
  11. <select id="findListByRequest" resultType="platform.modules.sys.report.CompanyReportExport">
  12. select * from c_report
  13. where del_flag=0
  14. <if test="keyword!=null and keyword!=''">
  15. and name like CONCAT('%',#{keyword},'%')
  16. </if>
  17. <if test="year!=null and year!=''">
  18. and report_year=#{year}
  19. </if>
  20. <if test="month!=null and month!=''">
  21. and report_month=#{month}
  22. </if>
  23. and build_id=#{build_id}
  24. </select>
  25. <select id="findCompanyReportByRequest" resultType="platform.modules.government.entity.CompanyReport">
  26. select * from c_report
  27. where del_flag=0
  28. <if test="keyword!=null and keyword!=''">
  29. and name like CONCAT('%',#{keyword},'%')
  30. </if>
  31. <if test="year!=null and year!=''">
  32. and report_year=#{year}
  33. </if>
  34. <if test="month!=null and month!=''">
  35. and report_month=#{month}
  36. </if>
  37. <if test="company_id!=null and company_id!=''">
  38. and company_id=#{company_id}
  39. </if>
  40. and build_id=#{build_id}
  41. and status=1
  42. </select>
  43. </mapper>