0
This commit is contained in:
@@ -3,6 +3,9 @@ using Gatedge.K3Cloud.Utils.Model.K3Request;
|
||||
using Gatedge.ScanCode.Common;
|
||||
using Gatedge.ScanCode.Extension;
|
||||
using Gatedge.ScanCode.Models.Dto;
|
||||
using Gatedge.ScanCode.Models.Dto.BarRecord;
|
||||
using Gatedge.ScanCode.Services;
|
||||
using Gatedge.ScanCode.Services.IServices;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -46,7 +49,7 @@ namespace Gatedge.ScanCode.Controllers
|
||||
{
|
||||
FormId = this._FormId,
|
||||
// 单据ID、单据编号
|
||||
FieldKeys = "FID,FBillNo,FDate",
|
||||
FieldKeys = "FID,FBillNo,FDate,FSupplierId.FName",
|
||||
Limit = Param.PageSize,
|
||||
StartRow = Param.PageSize * (Param.PageIndex - 1),
|
||||
};
|
||||
@@ -71,5 +74,20 @@ namespace Gatedge.ScanCode.Controllers
|
||||
var result = _utils.Query(_FormId, Param);
|
||||
return AjaxResult.Success(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量下推采购入库单
|
||||
/// </summary>
|
||||
/// <param name="barRecord"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("BatchPushPurInStock")]
|
||||
public AjaxResult BatchPushPurInStock([FromBody] BarRecord barRecord)
|
||||
{
|
||||
var loginInfo = User.GetLoginInfoByClaimsPrincipal();
|
||||
_utils.InitCloudApi(loginInfo);
|
||||
IPurchaseOrderService service = new PurchaseOrderService(_utils);
|
||||
service.PushPurInStock(barRecord.BarRecordId);
|
||||
return AjaxResult.Success();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Gatedge.ScanCode.Controllers
|
||||
[Route("api/[controller]")]
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
public class InStockController : ControllerBase
|
||||
public class StkInStockController : ControllerBase
|
||||
{
|
||||
private readonly string _FormName = "采购入库单";
|
||||
private readonly string _FormId = "STK_InStock";
|
||||
@@ -23,7 +23,7 @@ namespace Gatedge.ScanCode.Controllers
|
||||
/// <summary>
|
||||
/// 构造方法
|
||||
/// </summary>
|
||||
public InStockController(K3CloudApiUtils utils)
|
||||
public StkInStockController(K3CloudApiUtils utils)
|
||||
{
|
||||
_utils = utils;
|
||||
}
|
||||
@@ -4,5 +4,9 @@
|
||||
<NameOfLastUsedPublishProfile>E:\项目代码\澳门新东方\Gatedge.NewOrientLandMark.BOS\Gatedge.ScanCode\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
|
||||
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||
<Controller_SelectedScaffolderCategoryPath>root/Common/Api</Controller_SelectedScaffolderCategoryPath>
|
||||
<ActiveDebugProfile>Gatedge.ScanCode</ActiveDebugProfile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -40,16 +40,30 @@
|
||||
/// </summary>
|
||||
public int FBarStockId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public int FBarAuxpropId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 分录ID
|
||||
/// </summary>
|
||||
public int FMoEntryId { get; set; }
|
||||
public string FSrcBillId { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 辅助属性
|
||||
/// 分录ID
|
||||
/// </summary>
|
||||
public int FBarAuxpropId { get; set; }
|
||||
public string FSrcEntryId { get; set; }
|
||||
/// <summary>
|
||||
/// 批号Id
|
||||
/// </summary>
|
||||
public int FLot_Id { get; set; }
|
||||
/// <summary>
|
||||
/// 批号文本
|
||||
/// </summary>
|
||||
public string FLot_Text { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,9 +103,13 @@ namespace Gatedge.ScanCode.Models.K3Request.SaveModel
|
||||
/// </summary>
|
||||
public Stock? FBarStockId { get; set; }
|
||||
/// <summary>
|
||||
/// 生产订单分录
|
||||
/// 源单Id
|
||||
/// </summary>
|
||||
public MoEntry? FBarMoEntryId { get; set; }
|
||||
public string FSrcBillId { get; set; }
|
||||
/// <summary>
|
||||
/// 源单分录Id
|
||||
/// </summary>
|
||||
public string FSrcEntryId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -143,6 +143,35 @@ namespace Gatedge.ScanCode.Models.Vo
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public Dictionary<string, object> FBarAuxPropId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库时间
|
||||
/// </summary>
|
||||
public DateTime FStockDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 有效期至
|
||||
/// </summary>
|
||||
public DateTime FExpirationDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单Id
|
||||
/// </summary>
|
||||
public string FSrcBillId { get; set; }
|
||||
/// <summary>
|
||||
/// 源单分录Id
|
||||
/// </summary>
|
||||
public string FSrcEntryId { get; set; }
|
||||
/// <summary>
|
||||
/// 批号Id
|
||||
/// </summary>
|
||||
public int FLot_Id { get; set; }
|
||||
/// <summary>
|
||||
/// 批号文本
|
||||
/// </summary>
|
||||
public string FLot_Text { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -141,10 +141,8 @@ namespace Gatedge.ScanCode.Services
|
||||
FStockId = n.FBarStockId,
|
||||
},
|
||||
FBarQty = n.FBarQty,
|
||||
FBarMoEntryId = n.FMoEntryId == 0 ? null : new MoEntry()
|
||||
{
|
||||
FEntryId = n.FMoEntryId
|
||||
},
|
||||
FSrcBillId = n.FSrcBillId,
|
||||
FSrcEntryId = n.FSrcEntryId,
|
||||
FBarAuxPropId = n.FBarAuxpropId == 0 ? null : n.FBarAuxpropId
|
||||
|
||||
}),
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Request;
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Result;
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Result.Model;
|
||||
using Gatedge.ScanCode.Models.Dto.PrdInStock;
|
||||
|
||||
namespace Gatedge.ScanCode.Services.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 生产入库单接口
|
||||
/// </summary>
|
||||
public interface IPrdInStockService
|
||||
{
|
||||
/// <summary>
|
||||
/// 单据查看
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public object View(View param);
|
||||
|
||||
/// <summary>
|
||||
/// 列表接口
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public ListResult List(Query queryParam);
|
||||
|
||||
/// <summary>
|
||||
/// 提交接口
|
||||
/// </summary>
|
||||
/// <param name="billCancelAssign"></param>
|
||||
/// <returns></returns>
|
||||
public K3CloudResponseStatus CancelAssign(CancelAssign billCancelAssign);
|
||||
|
||||
/// <summary>
|
||||
/// 提交接口
|
||||
/// </summary>
|
||||
/// <param name="billSubmit"></param>
|
||||
/// <returns></returns>
|
||||
public K3CloudResponseStatus Submit(Submit billSubmit);
|
||||
|
||||
/// <summary>
|
||||
/// 审核接口
|
||||
/// </summary>
|
||||
/// <param name="billAudit"></param>
|
||||
/// <returns></returns>
|
||||
public K3CloudResponseStatus Audit(Audit billAudit);
|
||||
|
||||
/// <summary>
|
||||
/// 提交并审核
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public K3CloudResponseStatus SubmitAndAudit(PrdInStockInspect param);
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="deleteParam"></param>
|
||||
/// <returns></returns>
|
||||
public K3CloudResponseStatus Delete(Delete deleteParam);
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Request;
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Result;
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Result.Model;
|
||||
namespace Gatedge.ScanCode.Services.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 生产订单接口
|
||||
/// </summary>
|
||||
public interface IProductionOrderService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查看接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public object View(View param);
|
||||
|
||||
/// <summary>
|
||||
/// 列表接口
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public ListResult List(Query queryParam);
|
||||
|
||||
/// <summary>
|
||||
/// 下推生产入库单
|
||||
/// </summary>
|
||||
public K3CloudResponseStatus PushPrdInStock(int barRecordId);
|
||||
}
|
||||
}
|
||||
17
Gatedge.ScanCode/Services/IServices/IPurchaseOrderService.cs
Normal file
17
Gatedge.ScanCode/Services/IServices/IPurchaseOrderService.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Result.Model;
|
||||
|
||||
namespace Gatedge.ScanCode.Services.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 采购订单服务接口
|
||||
/// </summary>
|
||||
public interface IPurchaseOrderService
|
||||
{
|
||||
/// <summary>
|
||||
/// 下推采购入库单
|
||||
/// </summary>
|
||||
/// <param name="barRecordId"></param>
|
||||
/// <returns></returns>
|
||||
public K3CloudResponseStatus PushPurInStock(int barRecordId);
|
||||
}
|
||||
}
|
||||
25
Gatedge.ScanCode/Services/IServices/IStkInStockService.cs
Normal file
25
Gatedge.ScanCode/Services/IServices/IStkInStockService.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Request;
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Result.Model;
|
||||
|
||||
namespace Gatedge.ScanCode.Services.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 采购入库单服务接口
|
||||
/// </summary>
|
||||
public interface IStkInStockService
|
||||
{
|
||||
/// <summary>
|
||||
/// 撤销
|
||||
/// </summary>
|
||||
/// <param name="cancelAssign"></param>
|
||||
void CancelAssign(CancelAssign cancelAssign);
|
||||
void Delete(Delete stkInStockDeleteParam);
|
||||
|
||||
/// <summary>
|
||||
/// 提交
|
||||
/// </summary>
|
||||
/// <param name="stkInStockSubmitParam"></param>
|
||||
/// <returns></returns>
|
||||
K3CloudResponseStatus Submit(Submit stkInStockSubmitParam);
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Request;
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Result;
|
||||
|
||||
namespace Gatedge.ScanCode.Services.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 装配车间排产计划接口
|
||||
/// </summary>
|
||||
public interface IZP_ProductionSchedulingPlanService
|
||||
{
|
||||
/// <summary>
|
||||
/// 单据查询接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public dynamic View(View param);
|
||||
|
||||
/// <summary>
|
||||
/// 获取列表信息
|
||||
/// </summary>
|
||||
/// <param name="billQuery"></param>
|
||||
/// <returns></returns>
|
||||
public ListResult List(Query billQuery);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Request;
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Result;
|
||||
|
||||
namespace Gatedge.ScanCode.Services.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 注塑排产计划服务接口
|
||||
/// </summary>
|
||||
public interface IZS_ProductionSchedulingPlanService
|
||||
{
|
||||
/// <summary>
|
||||
/// 单据查询接口
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public dynamic View(View param);
|
||||
|
||||
/// <summary>
|
||||
/// 获取列表信息
|
||||
/// </summary>
|
||||
/// <param name="billQuery"></param>
|
||||
/// <returns></returns>
|
||||
public ListResult List(Query billQuery);
|
||||
}
|
||||
}
|
||||
187
Gatedge.ScanCode/Services/PurchaseOrderService.cs
Normal file
187
Gatedge.ScanCode/Services/PurchaseOrderService.cs
Normal file
@@ -0,0 +1,187 @@
|
||||
using Gatedge.K3Cloud.Utils;
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Request;
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Result.Model;
|
||||
using Gatedge.ScanCode.Models.K3Request.SaveModel;
|
||||
using Gatedge.ScanCode.Services.IServices;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
|
||||
namespace Gatedge.ScanCode.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// 采购订单服务
|
||||
/// </summary>
|
||||
public class PurchaseOrderService : IPurchaseOrderService
|
||||
{
|
||||
|
||||
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";
|
||||
|
||||
/// <summary>
|
||||
/// 金蝶云星空工具类
|
||||
/// </summary>
|
||||
private readonly K3CloudApiUtils _utils;
|
||||
|
||||
/// <summary>
|
||||
/// 构造方法
|
||||
/// </summary>
|
||||
public PurchaseOrderService(K3CloudApiUtils utils)
|
||||
{
|
||||
_utils = utils;
|
||||
}
|
||||
/// <summary>
|
||||
/// 下推采购入库单
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public K3CloudResponseStatus PushPurInStock(int barRecordId)
|
||||
{
|
||||
IBarRecordService barRecordService = new BarRecordService(_utils);
|
||||
IStkInStockService stkInStockService = new StkInStockService(_utils);
|
||||
|
||||
var barRecordViewParam = new View()
|
||||
{
|
||||
Id = barRecordId.ToString(),
|
||||
};
|
||||
var barRecord = barRecordService.View(barRecordViewParam);
|
||||
// 单据状态检查
|
||||
if (barRecord.DocumentStatus == "B")
|
||||
{
|
||||
throw new Exception("该扫描结果已经被提交,不允许重复提交");
|
||||
}
|
||||
if (barRecord.DocumentStatus == "C")
|
||||
{
|
||||
throw new Exception("该扫描结果已经被提交,不允许重复提交");
|
||||
}
|
||||
// 提交单据,不允许重复提交,相当于上锁
|
||||
var submitBarRecor = new Submit()
|
||||
{
|
||||
Ids = barRecordId.ToString(),
|
||||
};
|
||||
var submitBarRecorResult = barRecordService.Submit(submitBarRecor);
|
||||
// 如果提交不成功
|
||||
if (!submitBarRecorResult.IsSuccess)
|
||||
{
|
||||
throw new Exception("该扫描结果已经被提交,不允许重复提交");
|
||||
}
|
||||
// 如果提交成功,开始下推生产入库单
|
||||
|
||||
|
||||
var barEntityList = barRecord.FBarEntity;
|
||||
// 构造下推参数
|
||||
List<Push> billPusheList = new List<Push>();
|
||||
foreach (var item in barEntityList)
|
||||
{
|
||||
Push billPush = new Push();
|
||||
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.RuleId = _ConvertRuleId; // 注塑/装配车间排产计划专用转换规则
|
||||
billPush.TargetFormId = _TargetFormId; // 目标单据类型:采购入库单
|
||||
billPush.IsEnableDefaultRule = false; // 不启用默认规则
|
||||
billPush.IsDraftWhenSaveFail = false; // 保存失败,不自动暂存
|
||||
billPusheList.Add(billPush);
|
||||
}
|
||||
// 成功列表
|
||||
var successList = new List<K3CloudResponseStatus>();
|
||||
// TODO 遍历下推
|
||||
foreach (var item in billPusheList)
|
||||
{
|
||||
var pushResp = _utils.Push(_FormId, item);
|
||||
// 如果失败,将所有生成的单据删除,并保存错误信息到扫描记录
|
||||
if (pushResp?.IsSuccess != true)
|
||||
{
|
||||
// 从下推成功的记录里获取Id,并且删除
|
||||
var deletePrdInStockIdList = new List<string>();
|
||||
successList.ForEach(n => n.SuccessEntitys?.ForEach(m => deletePrdInStockIdList.Add(m.Id.ToString())));
|
||||
var errorInfo = string.Join("\r\n", pushResp.Errors.Select(n => n.Message));
|
||||
// 如果有成功的下推单,则删除生成的入库单,回写错误信息。
|
||||
if (deletePrdInStockIdList.Count > 0)
|
||||
{
|
||||
// 撤销并删除生产入库单
|
||||
CancelAssignDeletePrdInStock(deletePrdInStockIdList);
|
||||
}
|
||||
barRecordService.SaveErrorInfo(barRecordId, errorInfo);
|
||||
// 撤销提交的栈板单据
|
||||
CancelAssignBarRecord(barRecordId);
|
||||
return pushResp;
|
||||
|
||||
}
|
||||
successList.Add(pushResp);
|
||||
}
|
||||
//如果都成功,将入库单提交
|
||||
var prdInStockIds = new List<string>();
|
||||
successList.ForEach(n => n.SuccessEntitys?.ForEach(m => prdInStockIds.Add(m.Id.ToString())));
|
||||
Submit stkInStockSubmitParam = new Submit()
|
||||
{
|
||||
Ids = string.Join(',', prdInStockIds)
|
||||
};
|
||||
var submitResult = stkInStockService.Submit(stkInStockSubmitParam);
|
||||
return submitResult;
|
||||
// 如果提交不成功
|
||||
if (!submitResult.IsSuccess)
|
||||
{
|
||||
var errorInfo = string.Join("\r\n", submitResult.Errors.Select(n => n.Message));
|
||||
// 撤销并删除入库单
|
||||
CancelAssignDeletePrdInStock(prdInStockIds);
|
||||
// 撤销提交的栈板单据
|
||||
CancelAssignBarRecord(barRecordId);
|
||||
// 回写错误信息
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 撤销并删除所有下推数据
|
||||
/// </summary>
|
||||
/// <param name="deleteIds"></param>
|
||||
private void CancelAssignDeletePrdInStock(List<string> deleteIds)
|
||||
{
|
||||
IStkInStockService stkInStockService = new StkInStockService(_utils);
|
||||
CancelAssign cancelAssign = new CancelAssign()
|
||||
{
|
||||
Ids = string.Join(',', deleteIds.Select(n => n.ToString()))
|
||||
};
|
||||
stkInStockService.CancelAssign(cancelAssign);
|
||||
Delete stkInStockDeleteParam = new Delete()
|
||||
{
|
||||
Ids = string.Join(',', deleteIds.Select(n => n.ToString()))
|
||||
};
|
||||
stkInStockService.Delete(stkInStockDeleteParam);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 撤销栈板单据提交
|
||||
/// </summary>
|
||||
/// <param name="barRecordId"></param>
|
||||
private void CancelAssignBarRecord(int barRecordId)
|
||||
{
|
||||
IBarRecordService barRecordService = new BarRecordService(_utils);
|
||||
CancelAssign cancelAssignBarRecord = new CancelAssign()
|
||||
{
|
||||
Ids = barRecordId.ToString()
|
||||
};
|
||||
// 撤销
|
||||
var cancelAssignBarRecordResult = barRecordService.CancelAssign(cancelAssignBarRecord);
|
||||
}
|
||||
}
|
||||
}
|
||||
59
Gatedge.ScanCode/Services/StkInStockService.cs
Normal file
59
Gatedge.ScanCode/Services/StkInStockService.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using Gatedge.K3Cloud.Utils;
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Request;
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Result.Model;
|
||||
using Gatedge.ScanCode.Services.IServices;
|
||||
|
||||
namespace Gatedge.ScanCode.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// 采购入库单服务
|
||||
/// </summary>
|
||||
public class StkInStockService : IStkInStockService
|
||||
{
|
||||
private readonly string _FormName = "采购入库单";
|
||||
private readonly string _FormId = "STK_InStock";
|
||||
|
||||
/// <summary>
|
||||
/// 金蝶云星空工具类
|
||||
/// </summary>
|
||||
private readonly K3CloudApiUtils _utils;
|
||||
|
||||
/// <summary>
|
||||
/// 构造方法
|
||||
/// </summary>
|
||||
public StkInStockService(K3CloudApiUtils utils)
|
||||
{
|
||||
_utils = utils;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 撤销
|
||||
/// </summary>
|
||||
/// <param name="cancelAssign"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public void CancelAssign(CancelAssign cancelAssign)
|
||||
{
|
||||
_utils.CancelAssign(_FormId, cancelAssign);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除接口
|
||||
/// </summary>
|
||||
/// <param name="stkInStockDeleteParam"></param>
|
||||
public void Delete(Delete stkInStockDeleteParam)
|
||||
{
|
||||
_utils.Delete(_FormId, stkInStockDeleteParam);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交采购入库单
|
||||
/// </summary>
|
||||
/// <param name="stkInStockSubmitParam"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public K3CloudResponseStatus Submit(Submit stkInStockSubmitParam)
|
||||
{
|
||||
return _utils.Submit(_FormId, stkInStockSubmitParam);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user