修改下推接口
修改条码记录添加接口
This commit is contained in:
@@ -378,7 +378,7 @@ namespace Gatedge.K3Cloud.Utils
|
||||
/// <returns></returns>
|
||||
public K3CloudResponseStatus CancelAssign(string formId, CancelAssign billSubmit)
|
||||
{
|
||||
var resultString = _cloudApi.CancelAssign(formId, billSubmit.ToString());
|
||||
var resultString = _cloudApi.UnAudit(formId, billSubmit.ToString());
|
||||
var result = JsonSerializer.Deserialize<KingdeeResult>(resultString);
|
||||
var data = result?.Result?.ResponseStatus;
|
||||
return data;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.12.35506.116 d17.12
|
||||
# Visual Studio Version 18
|
||||
VisualStudioVersion = 18.1.11304.174 d18.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gatedge.NewOrientLandMark.BOS", "Gatedge.NewOrientLandMark.BOS\Gatedge.NewOrientLandMark.BOS.csproj", "{20CFFA50-E5D4-48F5-99CD-7DDFD992F8C3}"
|
||||
EndProject
|
||||
|
||||
@@ -82,4 +82,7 @@
|
||||
<Folder Include="Services\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>copy $(TargetPath) "D:\Program Files (x86)\Kingdee\K3Cloud\WebSite\Bin\$(TargetFileName)"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -57,6 +57,12 @@ namespace Gatedge.NewOrientLandMark.BOS.PlugIn.PUR_PurchaseOrder.ConvertPlugIn
|
||||
{
|
||||
return;
|
||||
}
|
||||
var billList = e.Result.FindByEntityKey("FBillHead");
|
||||
foreach (var bill in billList)
|
||||
{
|
||||
var billObj = bill.DataEntity;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -86,8 +86,12 @@ namespace Gatedge.ScanCode.Controllers
|
||||
var loginInfo = User.GetLoginInfoByClaimsPrincipal();
|
||||
_utils.InitCloudApi(loginInfo);
|
||||
IPurchaseOrderService service = new PurchaseOrderService(_utils);
|
||||
service.PushPurInStock(barRecord.BarRecordId);
|
||||
return AjaxResult.Success();
|
||||
var result = service.PushPurInStock(barRecord.BarRecordId);
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
return AjaxResult.Error("收料错误", result);
|
||||
}
|
||||
return AjaxResult.Success(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/// <summary>
|
||||
/// 行号
|
||||
/// </summary>
|
||||
public int FBarSeq { get; set; }
|
||||
public int? FBarSeq { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码编码
|
||||
@@ -27,43 +27,43 @@
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public int FBarMaterialId { get; set; }
|
||||
public int? FBarMaterialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 扫描数量
|
||||
/// </summary>
|
||||
public decimal FBarQty { get; set; }
|
||||
public decimal? FBarQty { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 仓库
|
||||
/// </summary>
|
||||
public int FBarStockId { get; set; }
|
||||
public int? FBarStockId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public int FBarAuxpropId { get; set; }
|
||||
public int? FBarAuxpropId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 分录ID
|
||||
/// </summary>
|
||||
public string FSrcBillId { get; set; }
|
||||
public string? FSrcBillId { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 分录ID
|
||||
/// </summary>
|
||||
public string FSrcEntryId { get; set; }
|
||||
public string? FSrcEntryId { get; set; }
|
||||
/// <summary>
|
||||
/// 批号Id
|
||||
/// </summary>
|
||||
public int FLot_Id { get; set; }
|
||||
public int? FLot_Id { get; set; }
|
||||
/// <summary>
|
||||
/// 批号文本
|
||||
/// </summary>
|
||||
public string FLot_Text { get; set; }
|
||||
public string? FLot_Text { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,70 +106,63 @@ namespace Gatedge.ScanCode.Models.Vo
|
||||
/// <summary>
|
||||
/// 条码编码
|
||||
/// </summary>
|
||||
public string FBarCode { get; set; }
|
||||
public string? FBarCode { get; set; }
|
||||
/// <summary>
|
||||
/// 物料Id
|
||||
/// </summary>
|
||||
public int FBarMaterialId_Id { get; set; }
|
||||
public int? FBarMaterialId_Id { get; set; }
|
||||
/// <summary>
|
||||
/// 物料名称
|
||||
/// </summary>
|
||||
public MaterialVo FBarMaterialId { get; set; }
|
||||
public MaterialVo? FBarMaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 数量
|
||||
/// </summary>
|
||||
public decimal FBarQty { get; set; }
|
||||
public decimal? FBarQty { get; set; }
|
||||
/// <summary>
|
||||
/// 仓库Id
|
||||
/// </summary>
|
||||
public int FBarStockId_Id { get; set; }
|
||||
public int? FBarStockId_Id { get; set; }
|
||||
/// <summary>
|
||||
/// 仓库
|
||||
/// </summary>
|
||||
public StockVo FBarStockId { get; set; }
|
||||
/// <summary>
|
||||
/// 生产订单分录Id
|
||||
/// </summary>
|
||||
public int FBarMoEntryId_Id { get; set; }
|
||||
/// <summary>
|
||||
/// 生产订单分录
|
||||
/// </summary>
|
||||
public MoEntryVo FBarMoEntryId { get; set; }
|
||||
public StockVo? FBarStockId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 辅助属性Id
|
||||
/// </summary>
|
||||
public int FBarAuxPropId_Id { get; set; }
|
||||
public int? FBarAuxPropId_Id { get; set; }
|
||||
/// <summary>
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public Dictionary<string, object> FBarAuxPropId { get; set; }
|
||||
public Dictionary<string, object>? FBarAuxPropId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库时间
|
||||
/// </summary>
|
||||
public DateTime FStockDate { get; set; }
|
||||
public DateTime? FStockDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 有效期至
|
||||
/// </summary>
|
||||
public DateTime FExpirationDate { get; set; }
|
||||
public DateTime? FExpirationDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单Id
|
||||
/// </summary>
|
||||
public string FSrcBillId { get; set; }
|
||||
public string? FSrcBillId { get; set; }
|
||||
/// <summary>
|
||||
/// 源单分录Id
|
||||
/// </summary>
|
||||
public string FSrcEntryId { get; set; }
|
||||
public string? FSrcEntryId { get; set; }
|
||||
/// <summary>
|
||||
/// 批号Id
|
||||
/// </summary>
|
||||
public int FLot_Id { get; set; }
|
||||
public int? FLot_Id { get; set; }
|
||||
/// <summary>
|
||||
/// 批号文本
|
||||
/// </summary>
|
||||
public string FLot_Text { get; set; }
|
||||
public string? FLot_Text { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Gatedge.ScanCode.Services
|
||||
private readonly string _FormName = "采购订单";
|
||||
private readonly string _FormId = "PUR_PurchaseOrder";
|
||||
private readonly string _TargetFormId = "STK_InStock";
|
||||
private readonly string _ConvertRuleId = "797d4af7-420e-4045-8e62-b3c1fe519ddc";
|
||||
private readonly string _ConvertRuleId = "c423ca95-0184-4e10-9176-86f9a544b931";
|
||||
|
||||
/// <summary>
|
||||
/// 金蝶云星空工具类
|
||||
@@ -76,12 +76,12 @@ namespace Gatedge.ScanCode.Services
|
||||
billPush.EntryIds = item.FSrcEntryId;
|
||||
billPush.CustomParams = new Dictionary<string, object>();
|
||||
billPush.CustomParams.Add("IsConvertByScanCode", true); // 是否由条码下推
|
||||
billPush.CustomParams.Add("InStockQty", item.FBarQty); // 下推数量
|
||||
billPush.CustomParams.Add("InStockId", item.FBarStockId_Id); // 入库仓库
|
||||
billPush.CustomParams.Add("FStockDate", item.FStockDate); // 入库日期
|
||||
billPush.CustomParams.Add("FExpirationDate", item.FExpirationDate); // 有效期至
|
||||
billPush.CustomParams.Add("FLot_Id", item.FLot_Id); // 有效期至
|
||||
billPush.CustomParams.Add("FLot_Text", item.FLot_Text); // 有效期至
|
||||
billPush.CustomParams.Add("InStockQty", item.FBarQty.ToString()); // 下推数量
|
||||
billPush.CustomParams.Add("InStockId", item.FBarStockId_Id.ToString()); // 入库仓库
|
||||
billPush.CustomParams.Add("FStockDate", item.FStockDate.ToString()); // 入库日期
|
||||
billPush.CustomParams.Add("FExpirationDate", item.FExpirationDate.ToString()); // 有效期至
|
||||
billPush.CustomParams.Add("FLot_Id", item.FLot_Id.ToString()); // 有效期至
|
||||
billPush.CustomParams.Add("FLot_Text", item.FLot_Text.ToString()); // 有效期至
|
||||
billPush.RuleId = _ConvertRuleId; // 注塑/装配车间排产计划专用转换规则
|
||||
billPush.TargetFormId = _TargetFormId; // 目标单据类型:采购入库单
|
||||
billPush.IsEnableDefaultRule = false; // 不启用默认规则
|
||||
@@ -112,7 +112,7 @@ namespace Gatedge.ScanCode.Services
|
||||
CancelAssignBarRecord(barRecordId);
|
||||
return pushResp;
|
||||
|
||||
}
|
||||
}
|
||||
successList.Add(pushResp);
|
||||
}
|
||||
//如果都成功,将入库单提交
|
||||
@@ -123,6 +123,15 @@ namespace Gatedge.ScanCode.Services
|
||||
Ids = string.Join(',', prdInStockIds)
|
||||
};
|
||||
var submitResult = stkInStockService.Submit(stkInStockSubmitParam);
|
||||
var result = barRecordService.SubmitSuccess(barRecordId, successList.Select(n => new BarRecordSave.ResultEntry
|
||||
{
|
||||
FResultBillNo = n.SuccessEntitys.First().Number,
|
||||
FResultId = n.SuccessEntitys.First().Id.ToString(),
|
||||
FResultBillId = new Models.K3Request.BaseData.FormType()
|
||||
{
|
||||
FID = _TargetFormId
|
||||
}
|
||||
}));
|
||||
return submitResult;
|
||||
// 如果提交不成功
|
||||
if (!submitResult.IsSuccess)
|
||||
@@ -136,17 +145,9 @@ namespace Gatedge.ScanCode.Services
|
||||
barRecordService.SaveErrorInfo(barRecordId, errorInfo);
|
||||
return submitResult;
|
||||
}
|
||||
var result = barRecordService.SubmitSuccess(barRecordId, successList.Select(n => new BarRecordSave.ResultEntry
|
||||
{
|
||||
FResultBillNo = n.SuccessEntitys.First().Number,
|
||||
FResultId = n.SuccessEntitys.First().Id.ToString(),
|
||||
FResultBillId = new Models.K3Request.BaseData.FormType()
|
||||
{
|
||||
FID = _TargetFormId
|
||||
}
|
||||
}));
|
||||
|
||||
|
||||
return result;
|
||||
//return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user