using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using SyntacticSugar.constant;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Web.Http;
using System.Windows.Forms;
using WebAPI.Models;
namespace WebAPI.Controllers
{
public class LMESController : ApiController
{
public DBUtility.ClsPub.Enum_BillStatus BillStatus;
private json objJsonResult = new json();
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
public DAL.ClsSc_ICMOBill BillOld = new DAL.ClsSc_ICMOBill();
//自定义34进制数组
private static char[] lNCode = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
///
/// 返回进站扫描列表|工序进站接收单列表
///参数:string sql。
///返回值:object。
///
[Route("LEMS/MES_StationInBillList_Json")]
[HttpGet]
public object MES_StationInBillList_Json(string sWhere)
{
DataSet ds;
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
if (sWhere == null || sWhere.Equals(""))
{
ds = oCN.RunProcReturn("select * from h_v_MES_StationInBillList", "h_v_MES_StationInBillList");
}
else
{
string sql1 = "select * from h_v_MES_StationInBillList where 1 = 1 ";
string sql = sql1 + sWhere;
ds = oCN.RunProcReturn(sql, "h_v_MES_StationInBillList");
}
}
catch (Exception e)
{
ds = null;
}
return GetObjectJson(ds);
}
///
/// 返回工序流转卡维护列表主表
///参数:string sql。
///返回值:object。
///
[Route("LEMS/MES_Sc_ProcessExchangeBillQuery_Json")]
[HttpGet]
public object MES_Sc_ProcessExchangeBillList_Json(string sWhere, string user,string HBillSubType)
{
DataSet ds;
try
{
List