using Newtonsoft.Json.Linq;
|
using System;
|
using System.Collections.Generic;
|
using System.Data;
|
using System.Web.Http;
|
using WebAPI.Models;
|
namespace WebAPI.Controllers
|
{
|
/**
|
* 找货单单
|
*/
|
public class Sc_CheckToolsRepairWorkBillController : ApiController
|
{
|
private json objJsonResult = new json();
|
public DataSet ds = new DataSet();
|
public WebServer webserver = new WebServer();
|
|
/// <summary>
|
/// 根据包装单 返回此包装单内的相关信息
|
/// </summary>
|
/// <returns></returns>
|
|
/// <summary>
|
/// 上下架单列表
|
/// </summary>
|
/// <returns></returns>
|
[Route("Sc_CheckToolsRepair/GetCheckToolsRepairWorkBillList")]
|
[HttpGet]
|
public object GetCheckToolsRepairWorkBillList(string sWhere)
|
{
|
try
|
{
|
|
ds = Sc_CheckToolsRepairWorkBillList_s(sWhere);
|
if (ds == null || ds.Tables[0].Rows.Count <= 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "没有返回任何记录!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "1";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "返回记录成功!";
|
objJsonResult.data = ds.Tables[0];
|
return objJsonResult;
|
}
|
}
|
catch (Exception ex)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "没有返回任何记录!" + ex.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#region sql语句
|
|
|
//上架归还单列表
|
public static DataSet Sc_CheckToolsRepairWorkBillList_s(string sWhere)
|
{
|
return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_CheckToolsRepairWorkBillList ", "h_v_Sc_CheckToolsRepairWorkBillList");
|
}
|
|
//测试专用接口
|
[Route("LookingFor/Test")]
|
[HttpGet]
|
public object Test(string HbillNo)//h_p_Xs_SellOutFindSP
|
{
|
DataSet ds;
|
ds = new SQLHelper.ClsCN().RunProcReturn("EXEC h_p_Xs_SellOutFindSP '" + HbillNo + "'", "h_p_Xs_SellOutFindSP");
|
|
if (Pub_Class.ClsPub.isLong(ds.Tables[0].Rows.Count) >= 0 )
|
{
|
objJsonResult.code = "1";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "true!";
|
objJsonResult.data = ds.Tables[0];//ds.Tables[0].Rows[1][0]
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "false!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
|
|
#endregion
|
|
}
|
}
|