|
@@ -651,7 +651,7 @@
|
|
|
<select id="querySalerIauantity" resultType="org.jeecg.modules.cost.entity.SyCostAllocation">
|
|
<select id="querySalerIauantity" resultType="org.jeecg.modules.cost.entity.SyCostAllocation">
|
|
|
|
|
|
|
|
select sum(t.salerIquantity) salerIquantity from (
|
|
select sum(t.salerIquantity) salerIquantity from (
|
|
|
-select sum(iquantity) as salerIquantity from UFDATA_101_2021.dbo.SO_SODetails where csocode in
|
|
|
|
|
|
|
+select sum(iquantity) as salerIquantity from UFDATA_101_2021.dbo.SO_SODetails where (cSCloser is null or cSCloser='asuser') and csocode in
|
|
|
<foreach collection="csocode" item="value" index="index" open="(" separator="," close=")">
|
|
<foreach collection="csocode" item="value" index="index" open="(" separator="," close=")">
|
|
|
#{value}
|
|
#{value}
|
|
|
</foreach>
|
|
</foreach>
|
|
@@ -659,7 +659,7 @@ union all
|
|
|
select sum(iquantity) as salerIquantity from UFDATA_102_2021.dbo.SO_SODetails a
|
|
select sum(iquantity) as salerIquantity from UFDATA_102_2021.dbo.SO_SODetails a
|
|
|
inner join UFDATA_102_2021.dbo.SO_SOMain b on a.ID = b.ID
|
|
inner join UFDATA_102_2021.dbo.SO_SOMain b on a.ID = b.ID
|
|
|
inner JOIN UFDATA_102_2021.dbo.Customer cu ON b.cCusCode = cu.cCusCode
|
|
inner JOIN UFDATA_102_2021.dbo.Customer cu ON b.cCusCode = cu.cCusCode
|
|
|
-WHERE b.cCusCode not in ('0001','T020001') and a.csocode in
|
|
|
|
|
|
|
+WHERE (a.cSCloser is null or a.cSCloser='asuser') and b.cCusCode not in ('0001','T020001') and a.csocode in
|
|
|
<foreach collection="csocode" item="value" index="index" open="(" separator="," close=")">
|
|
<foreach collection="csocode" item="value" index="index" open="(" separator="," close=")">
|
|
|
#{value}
|
|
#{value}
|
|
|
</foreach>
|
|
</foreach>
|
|
@@ -667,7 +667,7 @@ union all
|
|
|
select sum(iquantity) as salerIquantity from UFDATA_103_2021.dbo.SO_SODetails a
|
|
select sum(iquantity) as salerIquantity from UFDATA_103_2021.dbo.SO_SODetails a
|
|
|
inner join UFDATA_103_2021.dbo.SO_SOMain b on a.ID = b.ID
|
|
inner join UFDATA_103_2021.dbo.SO_SOMain b on a.ID = b.ID
|
|
|
inner JOIN UFDATA_103_2021.dbo.Customer cu ON b.cCusCode = cu.cCusCode
|
|
inner JOIN UFDATA_103_2021.dbo.Customer cu ON b.cCusCode = cu.cCusCode
|
|
|
-WHERE b.cCusCode not in ('0001','T020001')
|
|
|
|
|
|
|
+WHERE (a.cSCloser is null or a.cSCloser='asuser') and b.cCusCode not in ('0001','T020001')
|
|
|
and a.csocode in
|
|
and a.csocode in
|
|
|
<foreach collection="csocode" item="value" index="index" open="(" separator="," close=")">
|
|
<foreach collection="csocode" item="value" index="index" open="(" separator="," close=")">
|
|
|
#{value}
|
|
#{value}
|