Explorar el Código

成本分配表费用支出比例调整

fenghaifu hace 3 horas
padre
commit
9965f02078

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationMapper.xml

@@ -651,7 +651,7 @@
     <select id="querySalerIauantity" resultType="org.jeecg.modules.cost.entity.SyCostAllocation">
 
 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=")">
 #{value}
 </foreach>
@@ -659,7 +659,7 @@ union all
 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.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=")">
 #{value}
 </foreach>
@@ -667,7 +667,7 @@ union all
 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.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
 <foreach collection="csocode" item="value" index="index" open="(" separator="," close=")">
     #{value}