using HH.AutoBom.Core;
|
using HH.WMS.Common;
|
using HH.WMS.Entitys;
|
using HH.WMS.Entitys.Common;
|
using HH.WMS.WebUI.Controllers;
|
using Newtonsoft.Json;
|
using Newtonsoft.Json.Converters;
|
using System;
|
using System.Collections.Generic;
|
using System.Configuration;
|
using System.Data;
|
using System.IO;
|
using System.Linq;
|
using System.Web;
|
using System.Web.Mvc;
|
|
namespace HH.WMS.WebUI.Areas.AllQuery.Controllers
|
{
|
public class InventoryController : BaseController
|
{
|
public ActionResult Index()
|
{
|
return View();
|
}
|
public ActionResult OrderBussQuery()
|
{
|
return View();
|
}
|
public ActionResult LocationView()
|
{
|
return View();
|
}
|
|
public ActionResult LocationViewZjhk()
|
{
|
return View();
|
}
|
public ActionResult LocationViewWxys()
|
{
|
return View();
|
}
|
|
public ActionResult LocationHistory()
|
{
|
return View();
|
}
|
public ActionResult LocationHistoryQzhk()
|
{
|
return View();
|
}
|
public ActionResult Check()
|
{
|
return View();
|
}
|
public ActionResult Location()
|
{
|
return View();
|
}
|
public ActionResult LocationQzhk()
|
{
|
return View();
|
}
|
public ActionResult ShowLocationContext(string locationCode)
|
{
|
var loginer = FormsAuth.GetUserData<LoginerBase>();
|
var userCode = ConfigurationManager.AppSettings["DisplayLocationBtnUserCode"].ToString();
|
if (loginer.UserCode.Equals(userCode))
|
{
|
ViewBag.DISPLAY_BTN = true;
|
}
|
else
|
{
|
ViewBag.DISPLAY_BTN = false;
|
}
|
ViewBag.PROJECT_CODE = Constants.SysConfig.PROJECT_CODE;
|
ViewData["locationCode"] = locationCode;
|
return View();
|
}
|
public ActionResult ShowLocationContextZjhk(string locationCode)
|
{
|
var loginer = FormsAuth.GetUserData<LoginerBase>();
|
var userCode = ConfigurationManager.AppSettings["DisplayLocationBtnUserCode"].ToString();
|
if (loginer.UserCode.Equals(userCode))
|
{
|
ViewBag.DISPLAY_BTN = true;
|
}
|
else
|
{
|
ViewBag.DISPLAY_BTN = false;
|
}
|
ViewBag.PROJECT_CODE = Constants.SysConfig.PROJECT_CODE;
|
ViewData["locationCode"] = locationCode;
|
return View();
|
}
|
|
public string GetTrayItem(string locationCode)
|
{
|
return HttpWMS_Get("api/TrayItemRel/GetTrayItem?locationCode=" + locationCode);
|
|
}
|
|
#region 获取库区巷道
|
/// <summary>
|
/// 获取库区巷道
|
/// </summary>
|
/// <param name="stockCode"></param>
|
/// <param name="areaCode"></param>
|
/// <returns></returns>
|
/// <history>[HanHe(DBS)] CREATED 2018/11/30</history>
|
public string GetTunnel(string stockCode, string areaCode)
|
{
|
var loginer = FormsAuth.GetUserData<LoginerBase>();
|
string ReturnValue = HttpWMS_Get("Api/Location/GetTunnels?stockCode="
|
+ stockCode + "&areaCode=" + areaCode);
|
return ReturnValue;
|
}
|
#endregion
|
|
#region 根据仓库ID 巷道 获取货位列表
|
/// <summary>
|
/// 根据仓库ID 巷道 获取货位列表
|
/// </summary>
|
/// <param name="StockId">仓库编码</param>
|
/// <param name="TunnelCode">巷道编码</param>
|
/// <returns></returns>
|
/// <history>[HanHe(DBS)] CREATED 2018/11/30</history>
|
public string GetRowsList(string stockCode, string areaCode, string tunnelCode)
|
{
|
string ReturnValue = HttpWMS_Get("Api/Location/GetStructList?stockCode="
|
+ stockCode + "&areaCode=" + areaCode + "&roadway=" + tunnelCode);
|
return ReturnValue;
|
|
}
|
#endregion
|
|
#region 获取巷道货位
|
/// <summary>
|
/// 获取巷道货位
|
/// </summary>
|
/// <param name="stockCode">仓库号</param>
|
/// <param name="areaCode">库区号</param>
|
/// <param name="tunnel">巷道号</param>
|
/// <returns></returns>
|
/// <history>[HanHe(DBS)] CREATED 2018/11/30</history>
|
public string GetTunnelLocations(string stockCode, string areaCode, string tunnel)
|
{
|
string ReturnValue = HttpWMS_Get("Api/Location/GetTunnelLocations?stockCode="
|
+ stockCode + "&areaCode=" + areaCode + "&roadway=" + tunnel);
|
return ReturnValue;
|
}
|
#endregion
|
|
#region 货位可视化
|
/// <summary>
|
/// 货位可视化
|
/// </summary>
|
/// <returns></returns>
|
/// <history>[HanHe(DBS)] CREATED 2018/11/30</history>
|
public ActionResult GetLocations(string areaCode)
|
{
|
string result = HttpWMS_Get("Api/DisplayBoard/GetLocations?areas=" + string.Join(",", areaCode));
|
return Content(result);
|
}
|
#endregion
|
|
#region 获取仓库中货位状态
|
/// <summary>
|
/// 获取仓库中货位状态
|
/// </summary>
|
/// <param name="stockCode"></param>
|
/// <returns></returns>
|
public string GetStateQty(string stockCode)
|
{
|
return HttpWMS_Get("api/Location/GetStateQty?stockCode=" + stockCode);
|
}
|
#endregion
|
|
#region 出入库业务查询
|
/// <summary>
|
/// 出入库业务查询
|
/// </summary>
|
/// <param name="pageIndex"></param>
|
/// <param name="pageSize"></param>
|
/// <returns></returns>
|
/// <history>[HanHe(DBS)] CREATED 2018/11/30</history>
|
public string GetOrderBussList(int pageIndex, int pageSize,
|
string stockCode, string opType, string opNo, string itemCode, string itemName, string model, string valueDate)
|
{
|
var loginer = FormsAuth.GetUserData<LoginerBase>();
|
|
string[] date = new string[2];
|
if (!string.IsNullOrEmpty(valueDate))
|
date = JsonConvert.DeserializeObject<string[]>(valueDate);
|
SearchModel searchModel = new SearchModel()
|
{
|
TokenId = loginer.Extend1,
|
PageIndex = pageIndex,
|
PageSize = pageSize,
|
SearchCondition = new
|
{
|
CN_S_STOCK_CODE = stockCode,
|
CN_S_OP_TYPE = opType,
|
CN_S_OP_NO = opNo,
|
CN_S_ITEM_CODE = itemCode,
|
CN_S_ITEM_NAME = itemName,
|
CN_S_MODEL = model,
|
CN_T_START = !string.IsNullOrEmpty(valueDate) ? date[0] : "",
|
CN_T_END = !string.IsNullOrEmpty(valueDate) ? date[1] : ""
|
}
|
};
|
return HttpWMS_Post("api/Inventory/GetOrderBussList", JsonConvert.SerializeObject(searchModel));
|
}
|
#endregion
|
|
#region 库存查询
|
/// <summary>
|
/// 库存查询
|
/// </summary>
|
/// <param name="pageIndex">当前页</param>
|
/// <param name="pageSize">分页大小</param>
|
/// <param name="stockCode">仓库号</param>
|
/// <param name="itemCode">物料编码</param>
|
/// <param name="itemName">物料名称</param>
|
/// <param name="model">规格型号</param>
|
/// <param name="state">物料状态</param>
|
/// <returns></returns>
|
/// <History>[Hanhe(DBS)] created 2018/11/30</History>
|
public string GetInventoryList(int pageIndex, int pageSize,
|
string stockCode, string stockArea, string itemCode, string opNo, string itemName, string model, string state, string productionBatch, string owner, bool showArea, string lotNo)
|
{
|
var loginer = FormsAuth.GetUserData<LoginerBase>();
|
var searchModel = new
|
{
|
TokenId = loginer.Extend1,
|
PageIndex = pageIndex,
|
PageSize = pageSize,
|
SearchCondition = new
|
{
|
CN_S_STOCK_CODE = stockCode,
|
CN_S_STOCK_AREA = stockArea,
|
CN_S_ITEM_CODE = itemCode,
|
CN_S_ITEM_NAME = itemName,
|
CN_S_MODEL = model,
|
CN_S_PRODUCTION_BATCH = productionBatch,
|
CN_S_OP_NO = opNo,
|
CN_S_STATE = state,
|
CN_S_OWNER = owner,
|
CN_S_LOT_NO = lotNo,
|
showArea = showArea
|
}
|
};
|
return HttpWMS_Post("api/Inventory/GetInventoryList", JsonConvert.SerializeObject(searchModel));
|
}
|
#endregion
|
|
#region 货位库存
|
/// <summary>
|
/// 货位库存
|
/// </summary>
|
/// <param name="pageIndex"></param>
|
/// <param name="pageSize"></param>
|
/// <param name="stockCode"></param>
|
/// <param name="stockArea"></param>
|
/// <param name="locationCode"></param>
|
/// <param name="itemCode"></param>
|
/// <param name="itemName"></param>
|
/// <param name="model"></param>
|
/// <param name="state"></param>
|
/// <param name="productionBatch"></param>
|
/// <param name="owner"></param>
|
/// <returns></returns>
|
public string GetLocationInventoryList(int pageIndex, int pageSize,
|
string stockCode, string stockArea, string locationCode, string itemCode, string itemName, string model, string state, string productionBatch, string owner, string lotNo, string uniqueCode = "")
|
{
|
var loginer = FormsAuth.GetUserData<LoginerBase>();
|
var searchModel = new
|
{
|
TokenId = loginer.Extend1,
|
PageIndex = pageIndex,
|
PageSize = pageSize,
|
SearchCondition = new
|
{
|
CN_S_STOCK_CODE = stockCode,
|
CN_S_STOCK_AREA = stockArea,
|
CN_S_LOCATION_CODE = locationCode,
|
CN_S_ITEM_CODE = itemCode,
|
CN_S_ITEM_NAME = itemName,
|
CN_S_MODEL = model,
|
CN_S_PRODUCTION_BATCH = productionBatch,
|
CN_S_STATE = state,
|
CN_S_OWNER = owner,
|
CN_S_UNIQUE_CODE = uniqueCode,
|
CN_S_LOT_NO = lotNo
|
}
|
};
|
return HttpWMS_Post("api/Inventory/GetLocationInventoryList", JsonConvert.SerializeObject(searchModel));
|
}
|
#endregion
|
|
#region 仓库货位上下架记录
|
/// <summary>
|
/// 仓库货位上下架记录
|
/// </summary>
|
/// <param name="pageIndex"></param>
|
/// <param name="pageSize"></param>
|
/// <param name="stockCode"></param>
|
/// <param name="stockArea"></param>
|
/// <param name="locationCode"></param>
|
/// <param name="itemCode"></param>
|
/// <param name="opType"></param>
|
/// <param name="opNo"></param>
|
/// <param name="location"></param>
|
/// <param name="itemName"></param>
|
/// <param name="model"></param>
|
/// <param name="productionBatch"></param>
|
/// <param name="owner"></param>
|
/// <param name="valueDate"></param>
|
/// <returns></returns>
|
public string GetLocationHistory(int pageIndex, int pageSize,
|
string stockCode, string stockArea, string locationCode, string itemCode, string opType, string opNo, string location, string itemName, string model,
|
string productionBatch, string owner, string valueDate, string lotNo, string trayCode = "")
|
{
|
string[] date = new string[2];
|
if (!string.IsNullOrEmpty(valueDate))
|
date = JsonConvert.DeserializeObject<string[]>(valueDate);
|
|
var loginer = FormsAuth.GetUserData<LoginerBase>();
|
var searchModel = new
|
{
|
TokenId = loginer.Extend1,
|
PageIndex = pageIndex,
|
PageSize = pageSize,
|
SearchCondition = new
|
{
|
CN_S_STOCK_CODE = stockCode,
|
CN_S_STOCK_AREA = stockArea,
|
CN_S_LOCATION_CODE = location,
|
CN_S_ITEM_CODE = itemCode,
|
CN_S_ITEM_NAME = itemName,
|
CN_S_MODEL = model,
|
CN_S_PRODUCTION_BATCH = productionBatch,
|
CN_S_OP_NO = opNo,
|
CN_S_OWNER = owner,
|
CN_T_START = !string.IsNullOrEmpty(valueDate) ? date[0] : "",
|
CN_T_END = !string.IsNullOrEmpty(valueDate) ? date[1] : "",
|
CN_S_TRAY_CODE = trayCode,
|
CN_S_LOT_NO = lotNo
|
}
|
};
|
return HttpWMS_Post("api/Inventory/GetLocationHistory", JsonConvert.SerializeObject(searchModel));
|
}
|
#endregion
|
|
|
public string GetCheckDtl(int pageIndex, int pageSize,
|
string stockCode, string locationCode, string opNo, string valueDate)
|
{
|
string[] date = new string[2];
|
if (!string.IsNullOrEmpty(valueDate))
|
date = JsonConvert.DeserializeObject<string[]>(valueDate);
|
|
var loginer = FormsAuth.GetUserData<LoginerBase>();
|
var searchModel = new
|
{
|
TokenId = loginer.Extend1,
|
PageIndex = pageIndex,
|
PageSize = pageSize,
|
SearchCondition = new
|
{
|
CN_S_STOCK_CODE = stockCode,
|
//CN_S_STOCK_AREA = stockArea,
|
CN_S_LOCATION_CODE = locationCode,
|
//CN_S_ITEM_CODE = itemCode,
|
//CN_S_ITEM_NAME = itemName,
|
//CN_S_MODEL = model,
|
//CN_S_PRODUCTION_BATCH = productionBatch,
|
CN_S_OP_NO = opNo,
|
//CN_S_OWNER = owner,
|
CN_T_START = !string.IsNullOrEmpty(valueDate) ? date[0] : "",
|
CN_T_END = !string.IsNullOrEmpty(valueDate) ? date[1] : ""
|
}
|
};
|
return HttpWMS_Post("api/Inventory/GetCheckDtl", JsonConvert.SerializeObject(searchModel));
|
}
|
|
public string GetCheckDtlTotal(string stockCode, string opNo, string locationCode, string itemCode, string itemName, string valueDate)
|
{
|
string[] date = new string[2];
|
if (!string.IsNullOrEmpty(valueDate))
|
date = JsonConvert.DeserializeObject<string[]>(valueDate);
|
var loginer = FormsAuth.GetUserData<LoginerBase>();
|
var searchModel = new
|
{
|
TokenId = loginer.Extend1,
|
SearchCondition = new
|
{
|
CN_S_STOCK_CODE = stockCode,
|
//CN_S_STOCK_AREA = stockArea,
|
CN_S_LOCATION_CODE = locationCode,
|
CN_S_ITEM_CODE = itemCode,
|
CN_S_ITEM_NAME = itemName,
|
//CN_S_MODEL = model,
|
//CN_S_PRODUCTION_BATCH = productionBatch,
|
CN_S_OP_NO = opNo,
|
//CN_S_OWNER = owner,
|
CN_T_START = !string.IsNullOrEmpty(valueDate) ? date[0] : "",
|
CN_T_END = !string.IsNullOrEmpty(valueDate) ? date[1] : ""
|
}
|
};
|
return HttpWMS_Post("api/Inventory/GetCheckDtlTotal", JsonConvert.SerializeObject(searchModel));
|
}
|
|
public string GetItemCheckDtl(int pageIndex, int pageSize, string stockCode, string itemCode, string itemName,
|
string itemModel, string valueDate)
|
{
|
string[] date = new string[2];
|
if (!string.IsNullOrEmpty(valueDate))
|
date = JsonConvert.DeserializeObject<string[]>(valueDate);
|
|
var loginer = FormsAuth.GetUserData<LoginerBase>();
|
var searchModel = new
|
{
|
TokenId = loginer.Extend1,
|
PageIndex = pageIndex,
|
PageSize = pageSize,
|
SearchCondition = new
|
{
|
CN_S_STOCK_CODE = stockCode,
|
//CN_S_STOCK_AREA = stockArea,
|
//CN_S_LOCATION_CODE = location,
|
//CN_S_ITEM_CODE = itemCode,
|
//CN_S_ITEM_NAME = itemName,
|
//CN_S_MODEL = model,
|
//CN_S_PRODUCTION_BATCH = productionBatch,
|
CN_S_ITEM_CODE = itemCode,
|
CN_S_ITEM_NAME = itemName,
|
CN_S_MODEL = itemModel,
|
//CN_S_OWNER = owner,
|
CN_T_START = !string.IsNullOrEmpty(valueDate) ? date[0] : "",
|
CN_T_END = !string.IsNullOrEmpty(valueDate) ? date[1] : ""
|
}
|
};
|
return HttpWMS_Post("api/Inventory/GetItemCheckDtl", JsonConvert.SerializeObject(searchModel));
|
}
|
|
/// <summary>
|
/// 导出货位库存
|
/// </summary>
|
/// <returns></returns>
|
public string ExportLocationInventory()
|
{
|
//XML文件流
|
var sr = new System.IO.StreamReader(Request.InputStream);
|
var stream = sr.ReadToEnd();
|
var loginer = FormsAuth.GetUserData<LoginerBase>();
|
var TokenId = loginer.Extend1;
|
var DynamicObject = JsonConvert.DeserializeObject<dynamic>(stream);
|
dynamic formData = DynamicObject["formData"];
|
var searchModel = new
|
{
|
TokenId = loginer.Extend1,
|
SearchCondition = new
|
{
|
CN_S_STOCK_CODE = Util.ToString(formData.stockCode),
|
CN_S_STOCK_AREA = Util.ToString(formData.stockArea),
|
CN_S_LOCATION_CODE = Util.ToStringInput(formData.locationCode),
|
CN_S_ITEM_CODE = Util.ToStringInput(formData.itemCode),
|
CN_S_ITEM_NAME = Util.ToStringInput(formData.itemName),
|
CN_S_MODEL = Util.ToStringInput(formData.model),
|
CN_S_PRODUCTION_BATCH = Util.ToStringInput(formData.productionBatch),
|
CN_S_STATE = Util.ToString(formData.state),
|
CN_S_OWNER = Util.ToString(formData.owner)
|
}
|
};
|
string result = HttpWMS_Post("api/Inventory/GetLocationInventoryExport", JsonConvert.SerializeObject(searchModel));
|
OperateResult or = JsonConvert.DeserializeObject<OperateResult>(result);
|
|
string s = ((dynamic)or.Data).rows.ToString();
|
|
DataTable dt = HH.WMS.Utils.ZConvert.ToDataTableTwo(s);
|
dt.Columns.Add("STOCKQTY");
|
dt.Columns.Add("CN_F_STOCK_QTY");
|
foreach (DataRow dr in dt.Rows)
|
{
|
dr["STOCKQTY"] = Convert.ToDecimal(dr["CN_F_QUANTITY"]) - Convert.ToDecimal(dr["CN_F_ALLOC_QTY"]);
|
dr["CN_F_STOCK_QTY"] = Convert.ToDecimal(dr["CN_F_PLANNED_QTY"]) == 0 ? 0 : Convert.ToDecimal(dr["CN_F_QUANTITY"]) / Convert.ToDecimal(dr["CN_F_PLANNED_QTY"]);
|
}
|
|
dynamic columns = DynamicObject["columns"];
|
string title = "货位库存清单";
|
|
var cookie = Request.Cookies.Get("lanGroup");
|
if (cookie != null)
|
{
|
if (cookie.Value == Constants.LanguageType_en_US)
|
{
|
title = "LocationInventoryList";
|
}
|
}
|
|
string fileName = title + "_" + DateTime.Now.ToString("yyyyMMddHHmmssffff") + ".xls";
|
or = ExcelHelper.SaveTemp(columns, title, dt, fileName);
|
if (or.Status == ResultStatus.Success)
|
return JsonConvert.SerializeObject(OperateResult.Succeed("", new { fileName = fileName }));
|
else
|
return JsonConvert.SerializeObject(or);
|
}
|
|
#region 获取需要导出的库存数据
|
/// <summary>
|
/// 获取需要导出的库存数据
|
/// </summary>
|
/// <returns></returns>
|
public string ExportInventory()
|
{
|
//XML文件流
|
var sr = new System.IO.StreamReader(Request.InputStream);
|
var stream = sr.ReadToEnd();
|
var loginer = FormsAuth.GetUserData<LoginerBase>();
|
var TokenId = loginer.Extend1;//TokenId
|
var DynamicObject = JsonConvert.DeserializeObject<dynamic>(stream);
|
dynamic formData = DynamicObject["formData"];
|
var searchModel = new
|
{
|
TokenId = loginer.Extend1,
|
SearchCondition = new
|
{
|
CN_S_STOCK_CODE = Util.ToStringInput(formData.stockCode),
|
CN_S_STOCK_AREA = Util.ToStringInput(formData.stockArea),
|
CN_S_ITEM_CODE = Util.ToStringInput(formData.itemCode),
|
CN_S_ITEM_NAME = Util.ToStringInput(formData.itemName),
|
CN_S_MODEL = Util.ToStringInput(formData.model),
|
CN_S_PRODUCTION_BATCH = Util.ToStringInput(formData.productionBatch),
|
CN_S_OP_NO = Util.ToStringInput(formData.opNo),
|
CN_S_STATE = Util.ToStringInput(formData.state),
|
CN_S_OWNER = Util.ToStringInput(formData.owner),
|
showArea = Util.ToStringInput(formData.showArea)
|
}
|
};
|
string result = HttpWMS_Post("api/Inventory/GetInventoryListExport", JsonConvert.SerializeObject(searchModel));
|
OperateResult or = JsonConvert.DeserializeObject<OperateResult>(result);
|
|
string s = ((dynamic)or.Data).rows.ToString();
|
|
DataTable dt = HH.WMS.Utils.ZConvert.ToDataTableTwo(s);
|
dt.Columns.Add("STOCKQTY");
|
dt.Columns.Add("CN_F_STOCK_QTY");
|
foreach (DataRow dr in dt.Rows)
|
{
|
dr["STOCKQTY"] = Convert.ToDecimal(dr["CN_F_QUANTITY"]) + Convert.ToDecimal(dr["CN_F_PLANNED_QTY"]) - Convert.ToDecimal(dr["CN_F_ALLOC_QTY"]);
|
dr["CN_F_STOCK_QTY"] = Convert.ToDecimal(dr["CN_F_PLANNED_QTY"]) == 0 ? 0 : Convert.ToDecimal(dr["CN_F_QUANTITY"]) / Convert.ToDecimal(dr["CN_F_PLANNED_QTY"]);
|
}
|
dynamic columns = DynamicObject["columns"];
|
string title = "库存统计";
|
|
string fileName = title + "_" + DateTime.Now.ToString("yyyyMMddHHmmssffff") + ".xls";
|
or = ExcelHelper.SaveTemp(columns, title, dt, fileName);
|
if (or.Status == ResultStatus.Success)
|
return JsonConvert.SerializeObject(OperateResult.Succeed("", new { fileName = fileName }));
|
else
|
return JsonConvert.SerializeObject(or);
|
}
|
#endregion
|
|
public ActionResult OutItemBoard()
|
{
|
return View();
|
}
|
|
public string OutItemBoardData()
|
{
|
return HttpWMS_Get("api/Inventory/OutItemBoardData");
|
}
|
|
#region 恢复到正常
|
|
public string LocationToNormal(string locationCode, string state)
|
{
|
return HttpWMS_Get("api/Inventory/LocationToNormal?locationCode=" + locationCode + "&state=" + state);
|
}
|
|
#endregion
|
|
#region 解绑货位
|
|
public string LocationToUnBind(string locationCode, string state)
|
{
|
return HttpWMS_Get("api/Inventory/LocationToUnBind?locationCode=" + locationCode + "&state=" + state);
|
}
|
|
#endregion
|
|
#region 绑定货位
|
|
public string LocationToBind(string locationCode, string state)
|
{
|
return HttpWMS_Get("api/Inventory/LocationToBind?locationCode=" + locationCode + "&state=" + state);
|
}
|
|
#endregion
|
|
#region 杭叉板焊 空托盘、满托盘
|
|
public string UpdateUseState(string locationCode, string state)
|
{
|
return HttpWMS_Get("api/HcbhApi/UpdateUseState?locationCode=" + locationCode + "&state=" + state);
|
}
|
|
#endregion
|
|
#region 服务执行状态页面
|
/// <summary>
|
/// 服务执行状态页面
|
/// </summary>
|
/// <returns></returns>
|
public ActionResult ServiceExecStatus()
|
{
|
return View();
|
}
|
#endregion
|
|
#region 服务执行记录日志分页
|
/// <summary>
|
/// 服务执行记录日志分页
|
/// </summary>
|
/// <param name="pageIndex"></param>
|
/// <param name="pageSize"></param>
|
/// <param name="taskType"></param>
|
/// <param name="taskNo"></param>
|
/// <param name="isComplete"></param>
|
/// <param name="isSendMes"></param>
|
/// <returns></returns>
|
public string GetServiceExecList(int pageIndex, int pageSize, string taskType, string taskNo, string isComplete, string isSendMes)
|
{
|
var sm = new SearchModel()
|
{
|
PageIndex = pageIndex,
|
PageSize = pageSize,
|
SearchCondition = new
|
{
|
taskType = taskType,
|
taskNo = taskNo,
|
isComplete = isComplete,
|
isSendMes = isSendMes
|
}
|
};
|
var req = JsonConvert.SerializeObject(sm);
|
var res = HttpWMS_Post("api/Inventory/GetServiceExecList", req);
|
var or = JsonConvert.DeserializeObject<OperateResult>(res);
|
|
IsoDateTimeConverter timeFormat = new IsoDateTimeConverter();
|
timeFormat.DateTimeFormat = "yyyy-MM-dd HH:mm:ss";
|
return JsonConvert.SerializeObject(or, timeFormat);
|
}
|
#endregion
|
|
#region 重新下达移送任务
|
/// <summary>
|
/// 重新下达移送任务
|
/// </summary>
|
/// <param name="taskNo"></param>
|
/// <returns></returns>
|
public string RestartTask(string taskNo)
|
{
|
return HttpWMS_Get("api/Inventory/RestartTask?taskNo=" + taskNo);
|
}
|
#endregion
|
}
|
}
|