Merge branch 'BaoMaKu' of http://8.130.121.29:3000/Develop/YunTongJackYunTask into BaoMaKu
This commit is contained in:
@@ -185,7 +185,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
}
|
||||
pushKingDeeOrders.ForEach(t =>
|
||||
{
|
||||
_workProcessService.Add<IOrderPushService>(this.MerchantId, "PushOrderToKingDee", "推送订单到云星空或者WMS", t.Id, 1);
|
||||
//_workProcessService.Add<IOrderPushService>(this.MerchantId, "PushOrderToKingDee", "推送订单到云星空或者WMS", t.Id, 1);
|
||||
Thread.Sleep(300);
|
||||
});
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
private const string EXCHANGE_TYPE = "HLTX01_SYS";
|
||||
private const string DEFAULT_ORG = "100";
|
||||
private const string DEFAULT_CURRENCY = "PRE001";
|
||||
private const string DEFAULT_UNIT = "Pcs";
|
||||
private const string DEFAULT_UNIT = "包";
|
||||
private const string ROW_TYPE_STANDARD = "Standard";
|
||||
private const string ROW_TYPE_SERVICE = "Service";
|
||||
private const string FORM_ID = "SAL_OUTSTOCK";
|
||||
@@ -65,7 +65,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
throw new BaseException($"未找到ID为 {id} 的销售出库单记录");
|
||||
}
|
||||
|
||||
if (orderHead.Status != 0)
|
||||
if (orderHead.Status == 2)
|
||||
{
|
||||
throw new BaseException($"销售出库单 {orderHead.Sheet} 已经推送过,状态为:{orderHead.Status},不允许重复推送");
|
||||
}
|
||||
@@ -129,10 +129,11 @@ namespace MyCode.Project.Services.Implementation
|
||||
|
||||
// 获取销售组织ID
|
||||
string orgId = param.FSALEORGID?.ToString() ?? DEFAULT_ORG;
|
||||
|
||||
// 获取仓库编码
|
||||
string warehouseCode = orderHead.WarehouseCode ?? param.FWAREHOUSECODE ?? "";
|
||||
|
||||
|
||||
// 获取仓库编码
|
||||
//string warehouseCode = orderHead.WarehouseCode ?? param.FWAREHOUSECODE ?? "";
|
||||
string warehouseCode = param.FWAREHOUSECODE ;
|
||||
// 数据校验
|
||||
if (string.IsNullOrEmpty(warehouseCode))
|
||||
{
|
||||
@@ -154,7 +155,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
BillSave billSave = new BillSave()
|
||||
{
|
||||
Model = model,
|
||||
IsAutoSubmitAndAudit = true,
|
||||
IsAutoSubmitAndAudit = false,
|
||||
};
|
||||
|
||||
// 调用金蝶服务保存单据
|
||||
@@ -184,15 +185,16 @@ namespace MyCode.Project.Services.Implementation
|
||||
|
||||
return new FSalesOutboundEntryItem()
|
||||
{
|
||||
Fcode= item.Barcode ?? "",
|
||||
FRowType = rowType,
|
||||
FMaterialID = new FMaterialID()
|
||||
{
|
||||
FNumber = item.Barcode ?? ""
|
||||
},
|
||||
FUnitID = new FUnitID()
|
||||
{
|
||||
FNumber = item.Unit ?? DEFAULT_UNIT
|
||||
},
|
||||
//FMaterialID = new FMaterialID()
|
||||
//{
|
||||
// FNumber = item.Barcode ?? ""
|
||||
//},
|
||||
//FUnitID = new FUnitID()
|
||||
//{
|
||||
// FNumber = item.Unit ?? DEFAULT_UNIT
|
||||
//},
|
||||
FInventoryQty = 0,
|
||||
FRealQty = realQty,
|
||||
FDisPriceQty = 0,
|
||||
@@ -202,7 +204,11 @@ namespace MyCode.Project.Services.Implementation
|
||||
FOwnerTypeID = OWNER_TYPE,
|
||||
FOwnerID = new FOwnerID()
|
||||
{
|
||||
FNumber = orgId
|
||||
FOrgId = orgId
|
||||
},
|
||||
FStockID=new FStockID()
|
||||
{
|
||||
FNumber = param.FWAREHOUSECODE
|
||||
},
|
||||
FEntryTaxRate = param.FTAXRATE,
|
||||
FAuxUnitQty = 0,
|
||||
@@ -264,16 +270,16 @@ namespace MyCode.Project.Services.Implementation
|
||||
FDate = dateStr,
|
||||
FSaleOrgId = new FSaleOrgId()
|
||||
{
|
||||
FNumber = orgId
|
||||
FOrgId = orgId
|
||||
},
|
||||
FCustomerID = new FCustomerID()
|
||||
{
|
||||
FNumber = customerId
|
||||
},
|
||||
FSaleDeptID = new FSaleDeptID()
|
||||
{
|
||||
FNumber = "02"
|
||||
FCustId = customerId
|
||||
},
|
||||
//FSaleDeptID = new FSaleDeptID()
|
||||
//{
|
||||
// FNumber = "02"
|
||||
//},
|
||||
FReceiverID = new FReceiverID()
|
||||
{
|
||||
FNumber = customerId
|
||||
@@ -284,7 +290,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
},
|
||||
FStockOrgId = new FStockOrgId()
|
||||
{
|
||||
FNumber = orgId
|
||||
FOrgId = orgId
|
||||
},
|
||||
FSettleID = new FSettleID()
|
||||
{
|
||||
@@ -295,13 +301,14 @@ namespace MyCode.Project.Services.Implementation
|
||||
FNumber = customerId
|
||||
},
|
||||
FOwnerTypeIdHead = OWNER_TYPE,
|
||||
|
||||
FOwnerIdHead = new FOwnerIdHead()
|
||||
{
|
||||
FNumber = orgId
|
||||
FOrgId = orgId
|
||||
},
|
||||
FCDateOffsetValue = 0,
|
||||
FIsTotalServiceOrCost = false,
|
||||
F_dmi_Combo = "标准出库",
|
||||
//F_dmi_Combo = "标准出库",
|
||||
SubHeadEntity = new FSubHeadEntity()
|
||||
{
|
||||
FSettleCurrID = new FSettleCurrID()
|
||||
@@ -310,7 +317,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
},
|
||||
FSettleOrgID = new FSettleOrgID()
|
||||
{
|
||||
FNumber = orgId
|
||||
FOrgId = orgId
|
||||
},
|
||||
FIsIncludedTax = false,
|
||||
FLocalCurrID = new FLocalCurrID()
|
||||
@@ -327,7 +334,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
},
|
||||
FEntity = entryList
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
BillSave billSave = new BillSave()
|
||||
{
|
||||
Model = model,
|
||||
IsAutoSubmitAndAudit = true,
|
||||
IsAutoSubmitAndAudit = false,
|
||||
};
|
||||
|
||||
var responseStatus = _kingDeeService.Save(FORM_ID, billSave);
|
||||
@@ -148,7 +148,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
decimal realQty = Math.Abs(item.SellCount);
|
||||
|
||||
decimal taxRate = param.FTAXRATE;
|
||||
decimal taxPrice = item.SellCount != 0 ? Math.Round(Math.Abs(item.DivideSellTotal) / item.SellCount, 10) : 0;
|
||||
decimal taxPrice = item.SellCount != 0 ? Math.Round(Math.Abs(item.DivideSellTotal/ item.SellCount), 10) : 0;
|
||||
|
||||
decimal price = taxRate > 0 && taxPrice > 0 ? Math.Round(taxPrice / (1 + taxRate / 100), 10) : taxPrice;
|
||||
|
||||
@@ -157,21 +157,22 @@ namespace MyCode.Project.Services.Implementation
|
||||
|
||||
return new FSalesReturnEntryItem()
|
||||
{
|
||||
FRowType = rowType,
|
||||
FMaterialId = new FMaterialId()
|
||||
{
|
||||
FNumber = item.Barcode ?? ""
|
||||
},
|
||||
FUnitID = new FUnitID()
|
||||
{
|
||||
FNumber = item.Unit ?? DEFAULT_UNIT
|
||||
},
|
||||
FInventoryQty = 0,
|
||||
Fcode = item.Barcode ?? "",
|
||||
//FRowType = rowType,
|
||||
//FMaterialId = new FMaterialId()
|
||||
//{
|
||||
// FNumber = item.Barcode ?? ""
|
||||
//},
|
||||
//FUnitID = new FUnitID()
|
||||
//{
|
||||
// FNumber = item.Unit ?? DEFAULT_UNIT
|
||||
//},
|
||||
//FInventoryQty = 0,
|
||||
FRealQty = realQty,
|
||||
FPrice = price,
|
||||
FTaxPrice = taxPrice,
|
||||
FIsFree = false,
|
||||
FEntryTaxRate = param.FTAXRATE,
|
||||
//FIsFree = false,
|
||||
//FEntryTaxRate = param.FTAXRATE,
|
||||
FReturnType = new FReturnType()
|
||||
{
|
||||
FNumber = RETURN_TYPE_CODE
|
||||
@@ -179,26 +180,34 @@ namespace MyCode.Project.Services.Implementation
|
||||
FOwnerTypeId = OWNER_TYPE,
|
||||
FOwnerId = new FOwnerId()
|
||||
{
|
||||
FNumber = orgId
|
||||
FOrgId = orgId
|
||||
|
||||
},
|
||||
FStockID = new FStockID()
|
||||
{
|
||||
FNumber = param.FWAREHOUSECODE
|
||||
},
|
||||
FStockstatusId=new FStockstatusId(){
|
||||
FNumber= "KCZT01_SYS"
|
||||
},
|
||||
FDeliveryDate = deliveryDate,
|
||||
FDiscountRate = 0,
|
||||
FPriceDiscount = 0,
|
||||
FAuxUnitQty = 0,
|
||||
FExtAuxUnitQty = 0,
|
||||
FSrcBillTypeID = "",
|
||||
FSrcBillNo = "",
|
||||
FISCONSUMESUM = "0",
|
||||
//FDiscountRate = 0,
|
||||
//FPriceDiscount = 0,
|
||||
//FAuxUnitQty = 0,
|
||||
//FExtAuxUnitQty = 0,
|
||||
//FSrcBillTypeID = "",
|
||||
//FSrcBillNo = "",
|
||||
//FISCONSUMESUM = "0",
|
||||
FSalUnitID = new FSalUnitID()
|
||||
{
|
||||
FNumber = item.Unit ?? DEFAULT_UNIT
|
||||
},
|
||||
FSalUnitQty = realQty,
|
||||
FSalBaseQty = realQty,
|
||||
FPriceBaseQty = realQty,
|
||||
FSalUnitQty = realQty, //
|
||||
FSalBaseQty = realQty,//
|
||||
FPriceBaseQty = realQty,//
|
||||
FIsOverLegalOrg = false,
|
||||
FSOEntryId = 0,
|
||||
FARNOTJOINQTY = realQty,
|
||||
//FSOEntryId = 0,
|
||||
FARNOTJOINQTY = realQty, //
|
||||
FIsReturnCheck = false,
|
||||
FSettleBySon = false,
|
||||
FBOMEntryId = 0,
|
||||
@@ -228,42 +237,42 @@ namespace MyCode.Project.Services.Implementation
|
||||
{
|
||||
FNUMBER = BILL_TYPE_CODE
|
||||
},
|
||||
FDate = dateStr,
|
||||
FDate = dateStr,
|
||||
FSaleOrgId = new FSaleOrgId()
|
||||
{
|
||||
FNumber = orgId
|
||||
FOrgId = orgId
|
||||
},
|
||||
FRetcustId = new FRetcustId()
|
||||
{
|
||||
FNumber = customerId
|
||||
},
|
||||
FSaledeptid = new FSaledeptid()
|
||||
{
|
||||
FNumber = "02"
|
||||
},
|
||||
FTransferBizType = new FTransferBizType()
|
||||
{
|
||||
FNumber = TRANSFER_BIZ_TYPE
|
||||
FCustId = customerId
|
||||
},
|
||||
//FSaledeptid = new FSaledeptid()
|
||||
//{
|
||||
// FNumber = "02"
|
||||
//},
|
||||
//FTransferBizType = new FTransferBizType()
|
||||
//{
|
||||
// FNumber = TRANSFER_BIZ_TYPE
|
||||
//},
|
||||
FSalesManId = new FSalesManId()
|
||||
{
|
||||
FNumber = salesManId
|
||||
},
|
||||
FStockOrgId = new FStockOrgId()
|
||||
{
|
||||
FNumber = orgId
|
||||
FOrgId = orgId
|
||||
},
|
||||
FReceiveCustId = new FReceiveCustId()
|
||||
{
|
||||
FNumber = customerId
|
||||
FCustId = customerId
|
||||
},
|
||||
FSettleCustId = new FSettleCustId()
|
||||
{
|
||||
FNumber = customerId
|
||||
FCustId = customerId
|
||||
},
|
||||
FPayCustId = new FPayCustId()
|
||||
{
|
||||
FNumber = customerId
|
||||
FCustId = customerId
|
||||
},
|
||||
FOwnerTypeIdHead = OWNER_TYPE,
|
||||
FCDateOffsetValue = 0,
|
||||
@@ -277,7 +286,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
},
|
||||
FSettleOrgId = new FSettleOrgId()
|
||||
{
|
||||
FNumber = orgId
|
||||
FOrgId = orgId
|
||||
},
|
||||
FLocalCurrId = new FLocalCurrId()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user