|
@@ -143,7 +143,7 @@
|
|
|
|
|
|
<select id="signAmount" resultType="com.zjugis.business.bean.response.ContractMessageCountResp">
|
|
|
|
|
|
- SELECT NVL(SUM(c.CONTRACT_AMOUNT), 0) as signAmount
|
|
|
+ SELECT NVL(SUM(c.VIRTUAL_AMOUNT), 0) as signAmount
|
|
|
FROM CONTRACT c
|
|
|
RIGHT JOIN PROJECT pr ON pr.ID = c.PROJECT_ID
|
|
|
<where>
|
|
@@ -169,7 +169,7 @@
|
|
|
|
|
|
<select id="newAmount" resultType="com.zjugis.business.bean.response.ContractMessageCountResp">
|
|
|
|
|
|
- SELECT NVL(SUM(C.CONTRACT_AMOUNT), 0) AS newAmount
|
|
|
+ SELECT NVL(SUM(C.VIRTUAL_AMOUNT), 0) AS newAmount
|
|
|
FROM CONTRACT c
|
|
|
RIGHT JOIN PROJECT pr ON pr.ID = c.PROJECT_ID
|
|
|
<where>
|
|
@@ -315,7 +315,7 @@
|
|
|
<select id="messageCountReturn" resultType="java.math.BigDecimal">
|
|
|
select COALESCE(SUM(COALESCE(t2.RETURN_AMOUNT,0)),0) as returnAmount
|
|
|
FROM CONTRACT_RETURN_MONEY t2
|
|
|
- RIGHT JOIN CONTRACT t1 on t2.CONTRACT_ID = t1.ID and t1.ISVALID = 1 and AND ( t1.FLOW_STATUS = 90 OR t1.FLOW_STATUS = 99 )
|
|
|
+ RIGHT JOIN CONTRACT t1 on t2.CONTRACT_ID = t1.ID and t1.ISVALID = 1 and ( t1.FLOW_STATUS = 90 OR t1.FLOW_STATUS = 99 )
|
|
|
LEFT JOIN PROJECT pr ON pr.ID = t1.PROJECT_ID
|
|
|
<where>
|
|
|
t2.ISVALID = 1 and NVL(t2.BZ,'-1') != '冲红'
|
|
@@ -668,7 +668,7 @@
|
|
|
select t1.AREA_MANAGER_ID as userId, MAX(US.NICKNAME) as nickname,
|
|
|
COALESCE(SUM(COALESCE(t2.RETURN_AMOUNT,0)),0) as returnAmount
|
|
|
FROM CONTRACT_RETURN_MONEY t2
|
|
|
- RIGHT JOIN CONTRACT t1 on t2.CONTRACT_ID = t1.ID and t1.ISVALID = 1 and t1.FLOW_STATUS = 90
|
|
|
+ RIGHT JOIN CONTRACT t1 on t2.CONTRACT_ID = t1.ID and t1.ISVALID = 1 and ( t1.FLOW_STATUS = 90 OR t1.FLOW_STATUS = 99 )
|
|
|
LEFT JOIN ZJUGIS_OA.SYSTEM_USERS US ON US.ID = t1.AREA_MANAGER_ID
|
|
|
<where>
|
|
|
t2.ISVALID = 1 and NVL(t2.BZ,'-1') != '冲红' and t1.AREA_MANAGER_ID is not null
|