
14 changed files with 262 additions and 251 deletions
@ -1,46 +1,60 @@ |
|||
<?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.yxt.anrui.scm.biz.scmcollectionrebatewithapply.ScmCollectionRebateWithApplyMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmcollectionrebatewithapply.ScmCollectionRebateWithApplyVo"> |
|||
SELECT |
|||
scrwa.*, |
|||
SUM(scr.`estimateRebate`) withRebateTotal |
|||
FROM |
|||
scm_collection_rebate_with_apply scrwa |
|||
LEFT JOIN scm_collection_rebate_with scrw |
|||
ON scrwa.`sid` = scrw.`mainSid` |
|||
LEFT JOIN scm_collection_rebate scr |
|||
ON scr.`sid` = scrw.`collectionRebateSid` |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
|
|||
<select id="selectListAllVo" resultType="com.yxt.anrui.scm.api.scmcollectionrebatewithapply.ScmCollectionRebateWithApplyVo"> |
|||
SELECT * FROM scm_collection_rebate_with_apply <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" |
|||
resultType="com.yxt.anrui.scm.api.scmcollectionrebatewithapply.ScmCollectionRebateWithApplyVo"> |
|||
SELECT |
|||
scrwa.*, |
|||
SUM(scr.`estimateRebate`) withRebateTotal |
|||
FROM |
|||
scm_collection_rebate_with_apply scrwa |
|||
LEFT JOIN scm_collection_rebate_with scrw |
|||
ON scrwa.`sid` = scrw.`mainSid` |
|||
LEFT JOIN scm_collection_rebate scr |
|||
ON scr.`sid` = scrw.`collectionRebateSid` |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectBySid" resultType="int"> |
|||
SELECT COUNT(*) |
|||
FROM scm_collection_rebate_with_apply |
|||
WHERE nodeState != '待提交' |
|||
<select id="selectListAllVo" |
|||
resultType="com.yxt.anrui.scm.api.scmcollectionrebatewithapply.ScmCollectionRebateWithApplyVo"> |
|||
SELECT * FROM scm_collection_rebate_with_apply |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectBySid" resultType="int"> |
|||
SELECT COUNT(*) |
|||
FROM scm_collection_rebate_with_apply |
|||
WHERE nodeState != '待提交' |
|||
and find_in_set(sid, #{list}) |
|||
</select> |
|||
</select> |
|||
|
|||
<update id="updateFlowFiled"> |
|||
UPDATE scm_collection_rebate_with_apply |
|||
SET nodeState=#{nodeState}, nodeSid=#{taskDefKey} |
|||
<if test="procDefId != null and procDefId != ''"> |
|||
, procDefId=#{procDefId} |
|||
</if> |
|||
<if test="procInsId != null and procInsId != ''"> |
|||
, procInstId=#{procInsId} |
|||
</if> |
|||
<if test="taskId != null and taskId != ''"> |
|||
, taskId=#{taskId} |
|||
</if> |
|||
WHERE sid=#{sid} |
|||
<update id="updateFlowFiled"> |
|||
UPDATE scm_collection_rebate_with_apply |
|||
SET nodeState=#{nodeState}, nodeSid=#{taskDefKey} |
|||
<if test="procDefId != null and procDefId != ''"> |
|||
, procDefId=#{procDefId} |
|||
</if> |
|||
<if test="procInsId != null and procInsId != ''"> |
|||
, procInstId=#{procInsId} |
|||
</if> |
|||
<if test="taskId != null and taskId != ''"> |
|||
, taskId=#{taskId} |
|||
</if> |
|||
WHERE sid=#{sid} |
|||
</update> |
|||
|
|||
<select id="selectListVo" |
|||
resultType="com.yxt.anrui.scm.api.scmcollectionrebatewithapply.ScmCollectionRebateWithApplyVo"> |
|||
select * |
|||
from scm_collection_rebate_with_apply |
|||
</select> |
|||
</mapper> |
Loading…
Reference in new issue