131 lines
3.5 KiB
C#
131 lines
3.5 KiB
C#
using Kingdee.CDP.WebApi.SDK;
|
||
using MyCode.Project.Domain.Message.Request.KingDee;
|
||
using MyCode.Project.Domain.Message.Response.Common;
|
||
using MyCode.Project.Services;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Configuration;
|
||
using System.Web.Http;
|
||
|
||
namespace MyCode.Project.WebApi.Controllers
|
||
{
|
||
/// <summary>
|
||
/// 测试2接口
|
||
/// </summary>
|
||
public class Test2Controller : BaseAPIController
|
||
{
|
||
private IPurchaseOrderService _purchaseOrderService;
|
||
private IInvoiceOrderService _invoiceOrderService;
|
||
public Test2Controller(IPurchaseOrderService purchaseOrderService, IInvoiceOrderService invoiceOrderService )
|
||
{
|
||
_purchaseOrderService = purchaseOrderService;
|
||
_invoiceOrderService = invoiceOrderService;
|
||
}
|
||
|
||
|
||
[AllowAnonymous]
|
||
[HttpGet]
|
||
public K3CloudApi GetK3CloudClient()
|
||
{
|
||
return _purchaseOrderService.GetK3CloudClient();
|
||
}
|
||
|
||
|
||
/// <summary>
|
||
/// 获取供应商
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[AllowAnonymous]
|
||
[HttpGet]
|
||
public string GetBDSupplier()
|
||
{
|
||
var result = _purchaseOrderService.GetBDSupplier();
|
||
return result;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取采购订单列表
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[AllowAnonymous]
|
||
[HttpPost]
|
||
public string QueryList(DateTime begin, DateTime end, string FSupplierId)
|
||
{
|
||
|
||
var result = _purchaseOrderService.QueryList(begin, end, FSupplierId);
|
||
return result;
|
||
}
|
||
|
||
[AllowAnonymous]
|
||
[HttpGet]
|
||
public void AddOrderFromKingDee()
|
||
{
|
||
_purchaseOrderService.AddOrderFromKingDee();
|
||
}
|
||
|
||
|
||
/// <summary>
|
||
/// 写入金蝶的美塞斯批号
|
||
/// </summary>
|
||
/// <param name="sheet"></param>
|
||
|
||
[AllowAnonymous]
|
||
[HttpGet]
|
||
public void SetMSSSupplierLot(string sheet)
|
||
{
|
||
_invoiceOrderService.SetMSSSupplierLot(sheet);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取金蝶系统的采购组织
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[AllowAnonymous]
|
||
[HttpGet]
|
||
public List<ItemResult> GetFPurchaseOrgList()
|
||
{
|
||
var result = _purchaseOrderService.GetFPurchaseOrgList();
|
||
return result;
|
||
}
|
||
|
||
///// <summary>
|
||
///// 修改采购订单承诺交货时间
|
||
///// </summary>
|
||
///// <returns></returns>
|
||
//[AllowAnonymous]
|
||
//[HttpPost]
|
||
//public void SetChengNuoJiaoQi(asdas at)
|
||
//{
|
||
|
||
// _purchaseOrderService.SetChengNuoJiaoQi(at.EntityId, at.NeedUpDateFields, at.values,at.FNumber,at.Fid);
|
||
|
||
//}
|
||
|
||
//[AllowAnonymous]
|
||
//[HttpGet]
|
||
//public void asda()
|
||
//{
|
||
// List<string> tempList = new List<string> { "Supplier1", "Supplier2" };
|
||
|
||
// if (!tempList.Contains("Supplier"))
|
||
// {
|
||
// Console.WriteLine("不包含 Supplier(符合预期)");
|
||
// }
|
||
|
||
// if (tempList.Contains("Supplier1"))
|
||
// {
|
||
// Console.WriteLine("包含 Supplier1(符合预期)");
|
||
// }
|
||
|
||
// string lll = "Supplier2";
|
||
// if (lll.Contains("Supplier"))
|
||
// {
|
||
// Console.WriteLine("包含 Supplier1(符合预期)");
|
||
// }
|
||
|
||
//}
|
||
}
|
||
|
||
}
|
||
|