修改去重逻辑
This commit is contained in:
parent
4509150f2b
commit
e8bddbd110
|
@ -89,17 +89,10 @@
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<delete id="removeCfsj" parameterType="org.jeecg.modules.kc.ktgl.entity.KcKechengbiao">
|
<delete id="removeCfsj" parameterType="org.jeecg.modules.kc.ktgl.entity.KcKechengbiao">
|
||||||
DELETE FROM kc_kechengbiao
|
select * from kc_kechengbiao where xqxn = #{xqxn} and id not in (
|
||||||
WHERE xqxn = #{xqxn}
|
select maxid from (
|
||||||
AND id NOT IN (
|
select kcbh,kcmc,skjs,rwbh,kkdw,kcxz,skdd,sksj,kkdwid,xq,jgh,jzglb,sfcj,xqxn,max(id) as maxid from
|
||||||
SELECT maxid FROM
|
kc_kechengbiao t where t.xqxn = #{xqxn}
|
||||||
( SELECT
|
GROUP BY kcbh,kcmc,skjs,rwbh,kkdw,kcxz,skdd,sksj,kkdwid,xq,jgh,jzglb,sfcj,xqxn)a)
|
||||||
kcbh,kcmc,skjs,zc,xkrs,pkrs,rwbh,kkdw,kcxz,skdd,sksj,jkzc,hh,WEEK,hhks,hhjs,zbfs,kkdwid,jkzc1,xf,xq,jgh,jzglb,sfcj,szkc,xqxn,max( id ) AS maxid
|
|
||||||
FROM kc_kechengbiao t
|
|
||||||
WHERE xqxn = #{xqxn}
|
|
||||||
|
|
||||||
GROUP BY
|
|
||||||
kcbh,kcmc,skjs,zc,xkrs,pkrs,rwbh,kkdw,kcxz,skdd,sksj,jkzc,hh,WEEK,hhks,hhjs,zbfs,kkdwid,jkzc1,xf,xq,jgh,jzglb,sfcj,szkc,xqxn
|
|
||||||
) a)
|
|
||||||
</delete>
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue