update code
parent
645944e305
commit
e21756cd24
|
@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<!--普通用户查询项目人员-->
|
<!--普通用户查询项目人员-->
|
||||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
|
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
|
||||||
<where>
|
<where>
|
||||||
sp.isDel = 0
|
sp.isDel = 0 and sp.progressVisible=0
|
||||||
<if test="deptId != null "> and sp.deptId like concat('%', #{deptId}, '%')</if>
|
<if test="deptId != null "> and sp.deptId like concat('%', #{deptId}, '%')</if>
|
||||||
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
||||||
<if test="projectCode != null and projectCode != ''"> and sp.projectCode = #{projectCode}</if>
|
<if test="projectCode != null and projectCode != ''"> and sp.projectCode = #{projectCode}</if>
|
||||||
|
@ -286,9 +286,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
SELECT b.dict_value id,b.dict_label projectName,cnt deptId FROM (
|
SELECT b.dict_value id,b.dict_label projectName,cnt deptId FROM (
|
||||||
SELECT b.dict_value, b.dict_label,sum(c.money)
|
SELECT b.dict_value, b.dict_label,sum(c.money)
|
||||||
cnt FROM sur_project a, sys_dict_data b,sur_project_cost_output c WHERE b.dict_type='project_category' AND a.id=c.project_id AND c.cost_type=2 and c.year=#{isDel}
|
cnt FROM sur_project a, sys_dict_data b,sur_project_cost_output c WHERE b.dict_type='project_category' AND a.id=c.project_id AND c.cost_type=2 and c.year=#{isDel}
|
||||||
AND a.projectType=b.dict_value and a.isDel=0
|
AND a.projectType=b.dict_value and a.isDel=0 and a.progressVisible=0
|
||||||
<if test="deptId>0">AND deptid=#{deptId}</if>
|
<if test="deptId>0">AND deptid=#{deptId}</if>
|
||||||
<if test="proType != null and proType != ''"> and projectType = #{proType}</if>
|
<if test="proType != null and proType != ''"> and a.projectType = #{proType}</if>
|
||||||
GROUP BY dict_value,dict_label
|
GROUP BY dict_value,dict_label
|
||||||
) a RIGHT JOIN sys_dict_data b ON a.dict_value=b.dict_value WHERE b.dict_type='project_category' ORDER BY cnt DESC
|
) a RIGHT JOIN sys_dict_data b ON a.dict_value=b.dict_value WHERE b.dict_type='project_category' ORDER BY cnt DESC
|
||||||
</if>
|
</if>
|
||||||
|
@ -299,7 +299,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="id==1">SUM(c.totalInvestment)</if>
|
<if test="id==1">SUM(c.totalInvestment)</if>
|
||||||
<if test="id==2">COUNT(1)*10000</if>
|
<if test="id==2">COUNT(1)*10000</if>
|
||||||
cnt FROM sur_project a, sys_dict_data b,vw_sur_project_cost_output c WHERE b.dict_type='project_category' AND a.id=c.project_id
|
cnt FROM sur_project a, sys_dict_data b,vw_sur_project_cost_output c WHERE b.dict_type='project_category' AND a.id=c.project_id
|
||||||
AND a.projectType=b.dict_value and a.isDel=0
|
AND a.projectType=b.dict_value and a.isDel=0 and a.progressVisible=0
|
||||||
<if test="deptId>0">AND deptid=#{deptId}</if>
|
<if test="deptId>0">AND deptid=#{deptId}</if>
|
||||||
<if test="proType != null and proType != ''"> and projectType = #{proType}</if>
|
<if test="proType != null and proType != ''"> and projectType = #{proType}</if>
|
||||||
GROUP BY dict_value,dict_label
|
GROUP BY dict_value,dict_label
|
||||||
|
@ -312,7 +312,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
SELECT b.dict_value id,b.dict_label projectName,cnt deptId FROM (
|
SELECT b.dict_value id,b.dict_label projectName,cnt deptId FROM (
|
||||||
SELECT b.dict_value, b.dict_label,sum(c.money) cnt
|
SELECT b.dict_value, b.dict_label,sum(c.money) cnt
|
||||||
FROM sur_project a,sys_dict_data b ,sur_project_cost_output c WHERE b.dict_type='project_level' AND a.id=c.project_id AND c.cost_type=2 and c.year=#{isDel}
|
FROM sur_project a,sys_dict_data b ,sur_project_cost_output c WHERE b.dict_type='project_level' AND a.id=c.project_id AND c.cost_type=2 and c.year=#{isDel}
|
||||||
AND a.projiectLevel=b.dict_value and a.isDel=0
|
AND a.projiectLevel=b.dict_value and a.isDel=0 and a.progressVisible=0
|
||||||
<if test="deptId>0">AND deptid=#{deptId}</if>
|
<if test="deptId>0">AND deptid=#{deptId}</if>
|
||||||
<if test="proType != null and proType != ''"> and projectType = #{proType}</if>
|
<if test="proType != null and proType != ''"> and projectType = #{proType}</if>
|
||||||
GROUP BY dict_value,dict_label
|
GROUP BY dict_value,dict_label
|
||||||
|
@ -325,7 +325,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="id==1">SUM(c.totalInvestment)</if>
|
<if test="id==1">SUM(c.totalInvestment)</if>
|
||||||
|
|
||||||
cnt FROM sur_project a, sys_dict_data b ,vw_sur_project_cost_output c WHERE b.dict_type='project_level' AND a.id=c.project_id
|
cnt FROM sur_project a, sys_dict_data b ,vw_sur_project_cost_output c WHERE b.dict_type='project_level' AND a.id=c.project_id
|
||||||
AND a.projiectLevel=b.dict_value and a.isDel=0
|
AND a.projiectLevel=b.dict_value and a.isDel=0 and a.progressVisible=0
|
||||||
<if test="deptId>0">AND deptid=#{deptId}</if>
|
<if test="deptId>0">AND deptid=#{deptId}</if>
|
||||||
<if test="proType != null and proType != ''"> and projectType = #{proType}</if>
|
<if test="proType != null and proType != ''"> and projectType = #{proType}</if>
|
||||||
GROUP BY dict_value,dict_label
|
GROUP BY dict_value,dict_label
|
||||||
|
@ -369,8 +369,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="selectSurProjectListByBuser" parameterType="SurProject" resultMap="SurProjectResult">
|
<select id="selectSurProjectListByBuser" parameterType="SurProject" resultMap="SurProjectResult">
|
||||||
select sp.id, sp.deptId, sp.projectName, sp.projectCode, sp.paretProjectName, sp.paretProjectCode, sp.simpleName, sp.projectType, sp.projiectLevel, sp.projectRegional, a.areaName as projectRegionalName, sp.projectAddress, sp.projectNature, sp.licenceNumber, sp.projectApproval, sp.projectPerson, sp.projectPhone, sp.longitude, sp.latitude, sp.projectTimeLimit, sp.totalInvestment, sp.floorArea, sp.totalOutputValue, sp.plannedCompletionTime, sp.scheduledStartTime, sp.actualOperatingTime, sp.actualCompletionTime, sp.contractAmount, sp.paidAmount, sp.onAccountAmount, sp.projectSchedule, sp.projectSummarize, sp.isDel, sp.projectStatus, sp.servicePersonnel, sp.supervisorPersonnel, sp.generalContractor, sp.create_by, sp.create_time, sp.update_by, sp.update_time, sp.remark, sp.weightType, sp.projectSort, sp.progressVisible, d.dept_name
|
select sp.id, sp.deptId, sp.projectName, sp.projectCode, sp.paretProjectName, sp.paretProjectCode, sp.simpleName, sp.projectType, sp.projiectLevel, sp.projectRegional, a.areaName as projectRegionalName, sp.projectAddress, sp.projectNature, sp.licenceNumber, sp.projectApproval, sp.projectPerson, sp.projectPhone, sp.longitude, sp.latitude, sp.projectTimeLimit, sp.totalInvestment, sp.floorArea, sp.totalOutputValue, sp.plannedCompletionTime, sp.scheduledStartTime, sp.actualOperatingTime, sp.actualCompletionTime, sp.contractAmount, sp.paidAmount, sp.onAccountAmount, sp.projectSchedule, sp.projectSummarize, sp.isDel, sp.projectStatus, sp.servicePersonnel, sp.supervisorPersonnel, sp.generalContractor, sp.create_by, sp.create_time, sp.update_by, sp.update_time, sp.remark, sp.weightType, sp.projectSort, sp.progressVisible, d.dept_name
|
||||||
from (
|
from (
|
||||||
select * from sur_project sp where sp.isdel=0
|
select * from sur_project sp where sp.isdel=0 and sp.progressVisible=0
|
||||||
<if test="proType!='0'"></if>
|
<if test='proType != null and proType !=""'> and sp.projectType = #{proType}</if>
|
||||||
<if test="id!=null and id>0">
|
<if test="id!=null and id>0">
|
||||||
and sp.id in (select spu.project_id from sur_project_userinfo spu where spu.user_id = #{id} and spu.is_del=0)
|
and sp.id in (select spu.project_id from sur_project_userinfo spu where spu.user_id = #{id} and spu.is_del=0)
|
||||||
</if>
|
</if>
|
||||||
|
|
Loading…
Reference in New Issue