|
@@ -503,9 +503,10 @@
|
503
|
503
|
left join prj_Member m on m.XM = p.ID and m.XMJS = 1
|
504
|
504
|
left join prj_Budget b on b.XM = p.ID and b.FJ = ''
|
505
|
505
|
left join prj_FeeScheme f on f.ZB = p.ID
|
506
|
|
- where p.XMMB != 1
|
|
506
|
+ where
|
|
507
|
+ p.XMMB != 1
|
507
|
508
|
and p.SPZT = '审批结束'
|
508
|
|
- and CONCAT(p.ID, f.NF) not in (select CONCAT(RWS, NF) from prj_AnnualBudget where XMLX !='s8')
|
|
509
|
+-- and CONCAT(p.ID, f.NF) not in (select CONCAT(RWS, NF) from prj_AnnualBudget where XMLX !='s8')
|
509
|
510
|
<if test="zwmc != null and zwmc != ''">
|
510
|
511
|
and p.ZWMC like '%'+#{zwmc}+'%'
|
511
|
512
|
</if>
|
|
@@ -709,6 +710,7 @@
|
709
|
710
|
</select>
|
710
|
711
|
<!-- 获取费用管理列表 -->
|
711
|
712
|
<select id="getFyglList" resultMap="FeeManagementMap" parameterType="map">
|
|
713
|
+ select * from(
|
712
|
714
|
select p.ID,p.ZWMC,p.ERPBH,p.XMLX,t.XMLXMC,b.XMFZRXM,d.dept_name as SSBMMC,b.NF, case when aa.NF=b.NF then
|
713
|
715
|
aa.YSJE else 0 end as YSJE, case when aa.NF=b.NF then aa.XMZ else 0 end as XMZ, (SUM(case when b.BZJE is null
|
714
|
716
|
and b.SFBYJ =0 then b.SQJE else 0 end)/10000+SUM(case when b.BZJE is not null and b.SFBYJ =0 then b.BZJE else 0
|
|
@@ -725,7 +727,8 @@
|
725
|
727
|
1 end)) as RZBFB from prj_Project p left join (select s.*,r.XM as XMFZRXM from sta_BudgetApproval s left join
|
726
|
728
|
base_Person r on r.ID=s.XMFZR where s.SPZT != '作废') b on b.XMID=p.ID left join base_ProjectType t on
|
727
|
729
|
t.XMLX=p.XMLX left join sys_dept_info d on d.dept_id=p.SSBM left join (select a.*,bd.YSJE,bd.XMZ,bd.BYJ from
|
728
|
|
- prj_AnnualBudget a left join prj_AnnualBudgetDetail bd on bd.NYS = a.ID and bd.FJ = '' where a.SPZT != '作废') aa
|
|
730
|
+ prj_AnnualBudget a left join prj_AnnualBudgetDetail bd on bd.NYS = a.ID and bd.FJ = '' where a.SPZT != '作废')
|
|
731
|
+ aa
|
729
|
732
|
on aa.RWS=p.ID where 1 = 1
|
730
|
733
|
<if test="xmmc != null and xmmc != ''">and p.ZWMC like '%'+#{xmmc}+'%'</if>
|
731
|
734
|
<if test="erpbh != null and erpbh != ''">and p.ERPBH like '%'+#{erpbh}+'%'</if>
|
|
@@ -735,10 +738,11 @@
|
735
|
738
|
<if test="nf != null and nf != ''">and b.NF = #{nf}</if>
|
736
|
739
|
group by p.ID,p.ZWMC,p.ERPBH,p.XMLX,t.XMLXMC,b.XMFZRXM,d.dept_name,b.NF,aa.NF,aa.YSJE,aa.XMZ,aa.BYJ
|
737
|
740
|
<choose>
|
738
|
|
- <when test="sortName != null and sortName != '' and sortOrder != null and sortOrder != ''">order by
|
739
|
|
- ${sortName} ${sortOrder}
|
740
|
|
- </when>
|
|
741
|
+ <when test="sortName != null and sortName != '' and sortOrder != null and sortOrder != ''">order by</when>
|
741
|
742
|
</choose>
|
|
743
|
+ ${sortName} ${sortOrder}
|
|
744
|
+ ) as sx
|
|
745
|
+ WHERE YSJE <> 0
|
742
|
746
|
</select>
|
743
|
747
|
|
744
|
748
|
<!-- 根据erp 编号查询数据 -->
|