<?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.changhong.epc.form.mapper.tenant.contract.FormContractMassageMapper">
|
<select id="selectOneContract" resultType="java.util.Map">
|
select
|
DATAROWNUM
|
from
|
formdata_{tenantId}_${fromId}
|
where
|
DATAROWNUM = #{dataRowNum}
|
and
|
DELETEFLG = 0
|
</select>
|
|
<select id="selectContractMoney" resultType="java.util.Map">
|
SELECT
|
SUM(${paymentAmount}) AS paymentAmount,
|
${paymentStage} AS paymentStage
|
FROM
|
formdata_{tenantId}_${fromId}_subform
|
WHERE
|
PARENTDATAROWNUM IN (
|
SELECT
|
DATAROWNUM
|
FROM
|
formdata_{tenantId}_${fromId}
|
WHERE
|
selectContracts = #{dataRowNum}
|
AND processState = 30
|
AND DELETEFLG = 0
|
)
|
AND DELETEFLG = 0
|
GROUP BY
|
payment_stage
|
</select>
|
|
|
<select id="selectAllContractMoney" resultType="java.util.Map">
|
SELECT
|
SUM(${paymentAmount}) AS paymentAmount,
|
${paymentStage} AS paymentStage
|
FROM
|
formdata_{tenantId}_${fromId}_subform
|
WHERE
|
PARENTDATAROWNUM IN (
|
SELECT
|
DATAROWNUM
|
FROM
|
formdata_{tenantId}_${fromId}
|
WHERE
|
DATAROWNUM = #{dataRowNum}
|
AND processState = 30
|
AND DELETEFLG = 0
|
)
|
AND DELETEFLG = 0
|
GROUP BY
|
payment_stage
|
</select>
|
</mapper>
|