1
This commit is contained in:
@@ -347,6 +347,7 @@
|
||||
<Compile Include="QPHY_AutoWrire\Bill5.cs" />
|
||||
<Compile Include="QPHY_AutoWrire\SearchWriteRecord.cs" />
|
||||
<Compile Include="ReceivablesDetails\ReceivablesPlugIn.cs" />
|
||||
<Compile Include="SAL_DELIVERYNOTICE\ConvertServicePlugIn\SaleOrder_DeliveryNoticeConvert.cs" />
|
||||
<Compile Include="Sal_Order\Bill.cs" />
|
||||
<Compile Include="Sal_Order\ConvertPlugIn\SalOrder2DeliveryConvert.cs" />
|
||||
<Compile Include="Sal_Order\PushSaleBillPlugIn.cs" />
|
||||
@@ -364,6 +365,7 @@
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="SAL_DELIVERYNOTICE\ConvertServicePlugIn\SaleOrder_DeliveryNoticeConvert.py" />
|
||||
<Content Include="Sal_Order\ConvertPlugIn\SalOrder2DeliveryConvert.py" />
|
||||
<Content Include="SAL_DELIVERYNOTICE\ServicePlugIn\Save.py" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,16 @@
|
||||
using Kingdee.BOS.Core.Metadata.ConvertElement.PlugIn;
|
||||
using Kingdee.BOS.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilot_KD_Parino.SAL_DELIVERYNOTICE.ConvertServicePlugIn
|
||||
{
|
||||
[Description("生产订单装换插件#"), HotUpdate]
|
||||
public class SaleOrder_DeliveryNoticeConvert: AbstractConvertPlugIn
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import clr
|
||||
clr.AddReference("System")
|
||||
clr.AddReference('System.Data')
|
||||
clr.AddReference("Kingdee.BOS")
|
||||
clr.AddReference("Kingdee.BOS.DataEntity")
|
||||
clr.AddReference("Kingdee.BOS.Core")
|
||||
clr.AddReference('Kingdee.BOS.App')
|
||||
clr.AddReference("Kingdee.BOS.ServiceHelper")
|
||||
|
||||
from Kingdee.BOS.Core import *
|
||||
from Kingdee.BOS.Util import *
|
||||
from Kingdee.BOS.Orm.DataEntity import *
|
||||
from Kingdee.BOS.Core.Metadata.ConvertElement.PlugIn import *
|
||||
from Kingdee.BOS.Core.Metadata.ConvertElement.PlugIn.Args import *
|
||||
from System import *
|
||||
from System.Data import *
|
||||
from System.Collections.Generic import *
|
||||
from Kingdee.BOS.ServiceHelper import *
|
||||
|
||||
|
||||
def FirstOrDefault(collection, func):
|
||||
"""仿Linq的FirstOrDefault
|
||||
|
||||
Args:
|
||||
collection (_type_): 数据集
|
||||
func (_type_): lambda公式
|
||||
|
||||
Returns:
|
||||
_type_: 获取数据集第一个或null
|
||||
"""
|
||||
result = filter(func, collection)
|
||||
|
||||
if len(result) == 0: return None
|
||||
|
||||
return result[0]
|
||||
|
||||
# 数据转换完毕后触发事件
|
||||
def AfterConvert(e):
|
||||
# 选单
|
||||
# if this.OperationNumber == "Draw":
|
||||
# # 下推
|
||||
# if this.OperationNumber == "Push":
|
||||
# raise Exception(JsonUtil.Serialize(e.TargetBusinessInfo))
|
||||
for billHeadEntity in e.Result.FindByEntityKey("FBillHead"):
|
||||
billHead = billHeadEntity.DataEntity;
|
||||
entrys = billHead["FEntity"]
|
||||
|
||||
sqlL = List[str]();
|
||||
for idx,entry in enumerate(entrys):
|
||||
materialId_Id = entry["MaterialID_Id"]
|
||||
if materialId_Id is None or materialId_Id == 0:
|
||||
continue;
|
||||
sqlL.Add("SELECT {0} 'Idx',{1} MaterialId".format(idx,materialId_Id))
|
||||
|
||||
if sqlL.Count == 0:
|
||||
continue;
|
||||
|
||||
sql = """/*dialect*/
|
||||
|
||||
|
||||
"""
|
||||
@@ -98,7 +98,7 @@ GROUP BY t0.FBILLNO,t0.FID
|
||||
# 本次发货价税合计
|
||||
currAmount = entity["SAL_DELIVERYNOTICEFIN"][0]["BillAllAmount"]
|
||||
# 累计核销金额
|
||||
sumAmount = 0
|
||||
sumAmount = float(0.00)
|
||||
|
||||
try:
|
||||
sumAmount = saleOrderService.GetSaleOrderReceiveAmount(str(saleOrgId),saleBillNo)
|
||||
|
||||
Reference in New Issue
Block a user