Commit 04e9f9e2 by guanzhenshan

增加获取调拨单详情接口

parent 437ead6d
using System;
using System.Collections.Generic;
using System.Text;
namespace Bailun.DC.Models.Allot
{
/// <summary>
/// 调拨单详情
/// </summary>
public class dc_base_transfer_info
{
public int id { get; set; }
public int dataid { get; set; }
public string code { get; set; }
public string schedulecode { get; set; }
public string shipmentid { get; set; }
public int stateid { get; set; }
public int allocatecargostate { get; set; }
public string shipmentstatus { get; set; }
public string sourcewarename { get; set; }
public string sourcewareno { get; set; }
public string targetwareno { get; set; }
public string targetwarename { get; set; }
public string sendrequire { get; set; }
public string createusername { get; set; }
public DateTime creationtime { get; set; }
public string producttype { get; set; }
public int? scheduletype { get; set; }
public int? transfertype { get; set; }
public string purchasecode { get; set; }
public string targetwareaddress { get; set; }
public string specialproblem { get; set; }
public DateTime? expectarrivaltime { get; set; }
public string transporttype { get; set; }
public int islockedposition { get; set; }
public string receiptno { get; set; }
public string targetwareaddressinfo { get; set; }
public string logisticscode { get; set; }
public string logisticsname { get; set; }
public string packrequirements { get; set; }
public DateTime timestamp { get; set; }
public int isexception { get; set; }
public int isdeleted { get; set; }
public decimal? skuweight { get; set; }
public string skuweightStr { get; set; }
public decimal? sinnleticketmaxweight { get; set; }
public decimal? singleboxmaxweight { get; set; }
public decimal? singleboxminweight { get; set; }
public decimal? estimatedcost { get; set; }
public string trackingno { get; set; }
public string channelname { get; set; }
public DateTime dc_createtime { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Bailun.DC.Models.Allot
{
/// <summary>
/// 调拨单详情 sku信息
/// </summary>
public class dc_base_transfer_info_skus
{
public int id { get; set; }
public int dataid { get; set; }
public string transferno { get; set; }
public string productname { get; set; }
public string sku { get; set; }
public int deliverycount { get; set; }
public int storagecount { get; set; }
public DateTime createtime { get; set; }
}
}
...@@ -125,5 +125,32 @@ namespace Bailun.DC.Services ...@@ -125,5 +125,32 @@ namespace Bailun.DC.Services
} }
} }
/// <summary>
/// 获取调拨单详情接口
/// </summary>
/// <param name="page">页码</param>
/// <param name="pagesize">每页记录数</param>
/// <param name="start">开始时间</param>
/// <param name="end">结束时间</param>
/// <param name="total">符合条件的记录数</param>
/// <returns></returns>
public List<Models.Allot.dc_base_transfer_info> ListAllot(int page, int pagesize, DateTime start, DateTime end, ref int total)
{
var sql = $"select * from dc_base_transfer_info where dc_createtime>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and dc_createtime<='{end.ToString("yyyy-MM-dd HH:mm:ss")}'";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
cn.Open();
}
var obj = cn.Page<Models.Allot.dc_base_transfer_info>(page,pagesize,sql,ref total);
return obj.AsList();
}
}
} }
} }
...@@ -834,5 +834,38 @@ namespace Bailun.DC.Web.Controllers ...@@ -834,5 +834,38 @@ namespace Bailun.DC.Web.Controllers
} }
/// <summary>
/// 获取调拨单详情信息
/// </summary>
/// <param name="start">开始时间</param>
/// <param name="end">结束时间</param>
/// <returns></returns>
[HttpPost]
public JsonResult ListAllotInfo(DateTime start, DateTime end,int page,int pagesize=1000)
{
try
{
var total = 0;
var result = new Services.AllotServices().ListAllot(page, pagesize, start, end, ref total);
return Json(new
{
success = true,
data = result,
msg = "",
total = total
});
}
catch (Exception ex)
{
return Json(new
{
success = false,
msg = ex.Message,
total = 0
});
}
}
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment