旭捷内部项目管理系统
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.

52 lines
1.9 KiB

10 months ago
  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="com.gaotao.modules.projectinfo.dao.ProjectInfoDao">
  4. <select id="getProjectList" resultType="java.util.Map">
  5. select pi.id,pi.project_name as projectName,
  6. pi.project_status as projectStatus,
  7. pc.totalCase,pc.undoneCase
  8. from project_info pi
  9. left join (select count(id) totalCase,count(case when status!=4 then id end) as undoneCase,project_id
  10. from project_case group by project_id) pc on pi.id=pc.project_id
  11. <where>
  12. pi.customer_id=#{param2.customerId} and pi.showin_case_sys_flag='Y'
  13. <if test="param2.projectName != null and param2.projectName != '' ">
  14. and pi.project_name = like '%'+#{param2.projectName}+'%'
  15. </if>
  16. </where>
  17. </select>
  18. <select id="getCustomer" resultType="java.util.Map">
  19. select cus.id,cus.customer_name as customerName,cus.manage_audit as manageAudit
  20. from customer cus
  21. <where>
  22. cus.id=#{id}
  23. </where>
  24. </select>
  25. <select id="getCusGroup" resultType="java.util.Map">
  26. select cg.id,cg.name as groupName
  27. from cus_group cg
  28. <where>
  29. cg.customer_id=#{id}
  30. </where>
  31. </select>
  32. <select id="getSysName" resultType="java.util.Map">
  33. select sn.id,sn.name as sysName
  34. from sys_name sn
  35. <where>
  36. sn.customer_id=#{id}
  37. </where>
  38. </select>
  39. <select id="getCustomerList" resultType="java.util.Map">
  40. select cus.id,cus.customer_name as customerName
  41. from customer cus
  42. </select>
  43. <select id="getSysUserList" resultType="java.util.Map">
  44. select sysu.user_id id,sysu.user_display as userDisplay
  45. from sys_user sysu
  46. where sysu.ext_user_flag='N'
  47. </select>
  48. </mapper>