|
|
@@ -16,7 +16,8 @@
|
|
|
sy_cost_allocation_id = #{id}
|
|
|
</select>
|
|
|
|
|
|
- <select id="queryByCostPay" resultType="org.jeecg.modules.cost.entity.SyCostAllocationCostpay">
|
|
|
+ <!--<select id="queryByCostPay" resultType="org.jeecg.modules.cost.entity.SyCostAllocationCostpay">
|
|
|
+
|
|
|
SELECT 101 as setNo,
|
|
|
sp.cSPVCode as disbursementSlipNo,
|
|
|
sp.cDefine10 as invoicenum,
|
|
|
@@ -30,12 +31,12 @@
|
|
|
case when sps.cExpCode!='00011' and sp.Cexch_Name ='美元' then sps.iMoney end as disbursedOriginalmoney
|
|
|
FROM UFDATA_101_2021.dbo.SalePayVouch sp
|
|
|
INNER JOIN UFDATA_101_2021.dbo.SalePayVouchs sps ON sp.id = sps.id
|
|
|
- -- 费用支出对应销售订单号改动 取值通过关联销售取值
|
|
|
+ -- 费用支出对应销售订单号改动 取值通过关联销售取值
|
|
|
INNER JOIN UFDATA_101_2021.dbo.SO_SOMain soso on soso.id=sp.iSourceId
|
|
|
INNER JOIN UFDATA_101_2021.dbo.ExpenseItem ex on sps.cExpCode=ex.cExpCode
|
|
|
LEFT JOIN UFDATA_101_2021.dbo.Vendor v ON sp.cvencode= v.cVenCode
|
|
|
where soso.cSOCode IN
|
|
|
- -- 销售订单号取值范围改动
|
|
|
+ -- 销售订单号取值范围改动
|
|
|
(select cSOCode from UFDATA_101_2021.dbo.so_somain where cSOCode like CONCAT('%',#{code},'%')
|
|
|
union all
|
|
|
select SOSOS.cSOCode
|
|
|
@@ -57,11 +58,11 @@
|
|
|
case when sps.cExpCode!='00011' and sp.Cexch_Name ='美元' then sps.iMoney end as disbursedOriginalmoney
|
|
|
FROM UFDATA_102_2021.dbo.SalePayVouch sp
|
|
|
INNER JOIN UFDATA_102_2021.dbo.SalePayVouchs sps ON sp.id = sps.id
|
|
|
- -- 费用支出对应销售订单号改动 取值通过关联销售取值
|
|
|
+ -- 费用支出对应销售订单号改动 取值通过关联销售取值
|
|
|
INNER JOIN UFDATA_102_2021.dbo.SO_SOMain soso on soso.id=sp.iSourceId
|
|
|
INNER JOIN UFDATA_102_2021.dbo.ExpenseItem ex on sps.cExpCode=ex.cExpCode
|
|
|
LEFT JOIN UFDATA_102_2021.dbo.Vendor v ON sp.cvencode= v.cVenCode
|
|
|
- -- 销售订单号取值范围改动
|
|
|
+ -- 销售订单号取值范围改动
|
|
|
where soso.cSOCode IN
|
|
|
(select cSOCode from UFDATA_102_2021.dbo.so_somain where cSOCode like CONCAT('%',#{code},'%')
|
|
|
union all
|
|
|
@@ -90,11 +91,11 @@
|
|
|
case when sps.cExpCode!='00011' and sp.Cexch_Name ='美元' then sps.iMoney end as disbursedOriginalmoney
|
|
|
FROM UFDATA_103_2021.dbo.SalePayVouch sp
|
|
|
INNER JOIN UFDATA_103_2021.dbo.SalePayVouchs sps ON sp.id = sps.id
|
|
|
- -- 费用支出对应销售订单号改动 取值通过关联销售取值
|
|
|
+ -- 费用支出对应销售订单号改动 取值通过关联销售取值
|
|
|
INNER JOIN UFDATA_103_2021.dbo.SO_SOMain soso on soso.id=sp.iSourceId
|
|
|
INNER JOIN UFDATA_103_2021.dbo.ExpenseItem ex on sps.cExpCode=ex.cExpCode
|
|
|
LEFT JOIN UFDATA_103_2021.dbo.Vendor v ON sp.cvencode= v.cVenCode
|
|
|
- -- 销售订单号取值范围改动
|
|
|
+ -- 销售订单号取值范围改动
|
|
|
where soso.cSOCode IN
|
|
|
(select cSOCode from UFDATA_103_2021.dbo.so_somain where cSOCode like CONCAT('%',#{code},'%')
|
|
|
union all
|
|
|
@@ -109,9 +110,9 @@
|
|
|
left join UFDATA_103_2021.dbo.PO_Podetails POPOS on POPOS.POID=POPO.POID
|
|
|
left join UFDATA_103_2021.dbo.SO_SODetails sosos on sosos.iSOsID=POPOS.iorderdid AND SOSOS.cInvCode=POPOS.cInvCode
|
|
|
WHERE POPO.cPOID LIKE CONCAT('%',#{code},'%'))
|
|
|
- </select>
|
|
|
+ </select>-->
|
|
|
|
|
|
- <!--<select id="queryByCostPay" resultType="org.jeecg.modules.cost.entity.SyCostAllocationCostpay">
|
|
|
+ <select id="queryByCostPay" resultType="org.jeecg.modules.cost.entity.SyCostAllocationCostpay">
|
|
|
SELECT 101 as setNo,
|
|
|
sp.cSPVCode as disbursementSlipNo,
|
|
|
sp.cDefine10 as invoicenum,
|
|
|
@@ -171,5 +172,5 @@
|
|
|
LEFT JOIN UFDATA_103_2021.dbo.Vendor v ON sp.cvencode= v.cVenCode
|
|
|
--销售订单号取值范围改动
|
|
|
where soso.cSOCode LIKE CONCAT('%',#{code},'%')
|
|
|
- </select>-->
|
|
|
+ </select>
|
|
|
</mapper>
|