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

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gaotao.modules.projectinfo.dao.ProjectInfoDao">
<select id="getProjectList" resultType="java.util.Map">
select pi.id,pi.project_name as projectName,
pi.project_status as projectStatus,
pc.totalCase,pc.undoneCase
from project_info pi
left join (select count(id) totalCase,count(case when status!=4 then id end) as undoneCase,project_id
from project_case group by project_id) pc on pi.id=pc.project_id
<where>
pi.customer_id=#{param2.customerId} and pi.showin_case_sys_flag='Y'
<if test="param2.projectName != null and param2.projectName != '' ">
and pi.project_name = like '%'+#{param2.projectName}+'%'
</if>
</where>
</select>
<select id="getCustomer" resultType="java.util.Map">
select cus.id,cus.customer_name as customerName,cus.manage_audit as manageAudit
from customer cus
<where>
cus.id=#{id}
</where>
</select>
<select id="getCusGroup" resultType="java.util.Map">
select cg.id,cg.name as groupName
from cus_group cg
<where>
cg.customer_id=#{id}
</where>
</select>
<select id="getSysName" resultType="java.util.Map">
select sn.id,sn.name as sysName
from sys_name sn
<where>
sn.customer_id=#{id}
</where>
</select>
<select id="getCustomerList" resultType="java.util.Map">
select cus.id,cus.customer_name as customerName
from customer cus
</select>
<select id="getSysUserList" resultType="java.util.Map">
select sysu.user_id id,sysu.user_display as userDisplay
from sys_user sysu
where sysu.ext_user_flag='N'
</select>
</mapper>