using DAL;
|
using DBUtility;
|
using Model;
|
using Newtonsoft.Json;
|
using Newtonsoft.Json.Converters;
|
using Newtonsoft.Json.Linq;
|
using SQLHelper;
|
using System;
|
using System.Collections.Generic;
|
using System.Data;
|
using System.Linq;
|
using System.Net;
|
using System.Net.Http;
|
using System.Web.Http;
|
using WebAPI;
|
using WebAPI.Models;
|
using WebAPI.Service;
|
|
namespace WebAPI.Controllers
|
{
|
public class WEBSController : ApiController
|
{
|
public string sWhere = "";
|
public WebServer webserver = new WebServer();
|
public DataSet ds = new DataSet();
|
private json objJsonResult = new json();
|
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
|
public ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
|
public WebS.WebService1 oWebs = new WebS.WebService1();
|
public WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
|
Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
|
|
|
WebS.ClsXt_SystemParameterMain oSystemParameterMain = new WebS.ClsXt_SystemParameterMain();
|
|
|
#region 公用方法
|
|
#region 获取最大单据ID、单据号
|
|
/// <summary>
|
/// 获取最大单据ID、单据号
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetMaxBillNoAndID_Json")]
|
[HttpGet]
|
public object GetMaxBillNoAndID_Json(string HBillType)
|
{
|
try
|
{
|
string sErrMsg = "";
|
Int64 HInterID = 0;
|
string HBillNo = "";
|
HInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref sErrMsg);
|
HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true);
|
|
//----------创建虚表------------------------
|
DataTable dt_Main = new DataTable("Json");
|
dt_Main.Columns.Add("HBillNo", typeof(string));
|
dt_Main.Columns.Add("HInterID", typeof(int));
|
//---------创建新行------------------------
|
DataRow dr_main = dt_Main.NewRow(); //创建新行
|
dt_Main.Rows.Add(dr_main); //将新行加入到表中
|
dr_main["HBillNo"] = DBUtility.ClsPub.isStrNull(HBillNo);
|
dr_main["HInterID"] = DBUtility.ClsPub.isLong(HInterID);
|
//返回数据
|
if (HBillNo == "" || HInterID == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "最大单据ID、单据号获取失败";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "获取成功";
|
objJsonResult.data = dt_Main;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取最大单据ID、单据号失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
|
#endregion
|
|
|
#region 基础资料
|
|
#region 仓库资料
|
|
//根据仓库ID、组织ID,返回仓库信息
|
public Model.ClsGy_Warehouse_Model GetWhInfoByIDandOrg(long sHWhID, long HUSEORGID, ref string sErr)
|
{
|
DAL.ClsIF_Warehouse_View dal = new DAL.ClsIF_Warehouse_View();
|
if (dal.GetInfoByIDandOrgID(sHWhID, HUSEORGID))
|
{
|
return dal.omodel;
|
}
|
else
|
{
|
return null;
|
}
|
}
|
|
/// <summary>
|
/// 扫码返回仓库信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetWarehouse_Json")]
|
[HttpGet]
|
public object GetWarehouse_Json(string HBarCode, Int64 HStockOrgID)
|
{
|
try
|
{
|
Int64 HWhID = 0;
|
HWhID = DBUtility.ClsPub.isLong(HBarCode.Replace("HWH", ""));
|
ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HSPFlag from Gy_Warehouse with(nolock) where HStopflag=0 and HItemID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Warehouse");
|
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 = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "返回仓库信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 仓位资料
|
|
/// <summary>
|
/// 扫码返回仓位信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetStockPlace_Json")]
|
[HttpGet]
|
public object GetStockPlace_Json(string HBarCode, Int64 HWhID, Int64 HStockOrgID)
|
{
|
try
|
{
|
Int64 sHSPID = 0;
|
Int64 sHWhID = 0;
|
if (HBarCode.Contains(";"))
|
{
|
string[] sArray = HBarCode.Replace("HSP", "").Split(';');
|
sHSPID = DBUtility.ClsPub.isLong(sArray[1]);
|
sHWhID = DBUtility.ClsPub.isLong(sArray[0]);
|
}
|
|
if(HWhID==0)
|
{
|
ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
|
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 = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
return objJsonResult;
|
}
|
}
|
else
|
{
|
ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
DataSet ds2 = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
|
if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "没有返回任何记录,请确认所扫仓位条码是否属于该组织,且为非禁用状态!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds2.Tables[0];
|
return objJsonResult;
|
}
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
return objJsonResult;
|
}
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "返回仓位信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
/// <summary>
|
/// 获取仓位列表信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetStockPlaceList_Json")]
|
[HttpGet]
|
public object GetStockPlaceList_Json(string StockPlace, Int64 HWhID, Int64 HStockOrgID)
|
{
|
try
|
{
|
//界面上未选择仓库 或 仓位选择列表界面输入过滤条件
|
if (HWhID == 0)
|
{
|
ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%')", "h_v_IF_StockPlace");
|
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 = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
return objJsonResult;
|
}
|
}
|
//界面上已选仓库
|
else
|
{
|
ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and HWHID=" + HWhID.ToString() + " and (HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%')", "h_v_IF_StockPlace");
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
DataSet ds2 = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HUSEORGID = " + HStockOrgID.ToString() + " and (HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%')", "h_v_IF_StockPlace");
|
if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "没有返回任何仓位记录!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds2.Tables[0];
|
return objJsonResult;
|
}
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
return objJsonResult;
|
}
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "返回仓位信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 职员资料
|
|
/// <summary>
|
/// 扫码返回职员信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetEmployee_Json")]
|
[HttpGet]
|
public object GetEmployee_Json(string HBarCode)
|
{
|
try
|
{
|
Int64 HEmpID = 0;
|
HEmpID = DBUtility.ClsPub.isLong(HBarCode);
|
ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Employee with(nolock) where HStopflag=0 and HItemID=" + HEmpID.ToString(), "Gy_Employee");
|
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 = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "返回职员信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 部门资料
|
|
/// <summary>
|
/// 扫码返回部门信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetDepartment_Json")]
|
[HttpGet]
|
public object GetDepartment_Json(string HBarCode)
|
{
|
try
|
{
|
Int64 HDepID = 0;
|
HDepID = DBUtility.ClsPub.isLong(HBarCode.Replace("HDE", ""));
|
ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Department with(nolock) where HStopflag=0 and HItemID=" + HDepID.ToString(), "Gy_Department");
|
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 = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "返回部门信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 供应商资料
|
|
/// <summary>
|
/// 扫码返回供应商信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetSupplier_Json")]
|
[HttpGet]
|
public object GetSupplier_Json(Int64 HSupID)
|
{
|
try
|
{
|
ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Supplier with(nolock) where HStopflag=0 and HItemID=" + HSupID.ToString(), "Gy_Supplier");
|
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 = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "返回供应商信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 客户资料
|
|
/// <summary>
|
/// 扫码返回客户信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetCustomer_Json")]
|
[HttpGet]
|
public object GetCustomer_Json(Int64 HCusID)
|
{
|
try
|
{
|
ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Customer with(nolock) where HStopflag=0 and HItemID=" + HCusID.ToString(), "Gy_Customer");
|
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 = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "返回客户信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
/// <summary>
|
/// 获取客户列表信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetCustomerList_Json")]
|
[HttpGet]
|
public object GetCustomerList_Json(string Customer, Int64 HStockOrgID)
|
{
|
try
|
{
|
ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Customer with(nolock) where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + Customer + "%' or HName like '%" + Customer + "%')", "Gy_Customer");
|
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 = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "返回客户信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
#region 扫码模块调用方法
|
|
#region 根据单据类型获取单据子类型
|
|
/// <summary>
|
/// 根据单据类型获取单据子类型
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetBillSubType_Json")]
|
[HttpGet]
|
public Object GetBillSubType_Json(string HBillType, Int64 HStockOrgID)
|
{
|
try
|
{
|
ds = oWebs.get_BillSubType(HBillType, HStockOrgID);
|
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 = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = ds.Tables[0];
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "根据单据类型获取单据子类型信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
|
#region 扫码模块 根据条码删除缓存列表中对应条码记录
|
|
/// <summary>
|
/// 根据条码删除条码出入库缓存表中记录
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json")]
|
[HttpGet]
|
public object set_DelPonderationBillMain_Temp_BarCode_Json(long HInterID, string HBillType, string HBarCode)
|
{
|
try
|
{
|
oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HBarCode<>'' and HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HBarCode='" + HBarCode + "'", ref DBUtility.ClsPub.sExeReturnInfo);
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "删除成功";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "删除条码出入库缓存列表条码记录失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
|
#region 扫码模块 删除功能按钮调用 删除条码出入库临时表记录
|
|
/// <summary>
|
/// 扫码模块,删除选中行条码出入库临时表记录
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json")]
|
[HttpGet]
|
public object set_DelPonderationBillMain_Temp_InterIDAndSource_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string HBillType)
|
{
|
try
|
{
|
if (oWebs.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, HBillType, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "删除所选行条码出入库临时表记录失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
|
#endregion
|
|
|
#region 扫描模块 退出功能按钮调用 删除先进先出临时表(更新 HlineStatus =1)
|
|
/// <summary>
|
/// 删除先进先出临时表(更新 HlineStatus =1)
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/set_DelPonderationBillMain_Temp_FIFO_Json")]
|
[HttpGet]
|
public object set_DelPonderationBillMain_Temp_FIFO_Json(long HInterID, string HBillType)
|
{
|
try
|
{
|
if (oWebs.set_DelPonderationBillMain_Temp_FIFO(HInterID, HBillType, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "更新先进先出临时表HlineStatus值失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
#region 缓存列表模块调用
|
|
#region 缓存列表 编辑功能调用
|
|
/// <summary>
|
/// 缓存列表选择编辑时,判断所选单据是否已存在上传记录,启用先进先出功能的,回填先进先出临时表状态(更新 HlineStatus =0)
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/TempList_Modify_Json")]
|
[HttpGet]
|
public object TempList_Modify_Json(long HInterID, string HBillNo, string HBillType)
|
{
|
try
|
{
|
if (oWebs.TempList_Modify(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "缓存列表编辑前判断失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
|
#region 已上传查询界面,根据单据号、源单号查询已上传单据信息
|
|
/// <summary>
|
/// 已上传查询界面,根据单据号、源单号查询已上传单据信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetKf_ICStockBillQueryList_Json")]
|
[HttpGet]
|
public object GetKf_ICStockBillQueryList_Json(string HBillType, string HBillNo, string HSourceBillNo)
|
{
|
try
|
{
|
ds = oWebs.GetKf_ICStockBillQueryList(HBillType, HBillNo, HSourceBillNo);
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "查询不到该单据记录!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "获取单据信息成功!";
|
objJsonResult.data = ds.Tables[0];
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取已上传单据信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
|
#region 已上传列表界面,撤销功能,删除WMS表和本地出入库单记录,并更新TEMP表中的上传字段 HRelationInterID=0
|
|
/// <summary>
|
/// 已上传列表界面,撤销功能,删除WMS表和本地出入库单记录,并更新TEMP表中的上传字段 HRelationInterID=0
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/DeleteICStockBillAndWMS_Json")]
|
[HttpGet]
|
public object DeleteICStockBillAndWMS_Json(Int64 HInterID, string HBillNo, string HBillType)
|
{
|
try
|
{
|
if (oWebs.DeleteICStockBillAndWMS(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "撤销单据已上传记录失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
|
#region 条码出入库缓存列表模块 删除缓存列表单据
|
|
/// <summary>
|
/// 删除缓存列表单据
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/set_DelPonderationBillMain_Temp_Json")]
|
[HttpGet]
|
public object set_DelPonderationBillMain_Temp_Json(long HInterID, string HBillType)
|
{
|
try
|
{
|
oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "删除成功";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "删除条码出入库缓存列表单据失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
/// <summary>
|
/// 根据单据ID,删除条码出入库临时表记录 (功能同上面根据ID删除缓存记录方法)
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/DeleteBillList_Json")]
|
[HttpGet]
|
public object DeleteBillList_Json(long HInterID)
|
{
|
try
|
{
|
if (oWebs.DeleteBillList(HInterID, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "删除所选单据条码出入库临时表记录失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
#region 提交生单处理方法
|
|
#region 生产入库 上传生单
|
|
|
#endregion
|
|
#region 采购入库 上传生单
|
|
|
#endregion
|
|
#region 其他入库 上传生单
|
|
#region 其他入库 新增模式
|
|
/// <summary>
|
/// 其他入库新增上传
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/set_SaveOtherInBill_Json")]
|
[HttpPost]
|
public object set_SaveOtherInBill_Json([FromBody] JObject oMain)
|
{
|
var _value = oMain["oMain"].ToString();
|
string msg1 = _value.ToString();
|
try
|
{
|
List<Model.ClsKf_OtherInBillMain> lsmain = new List<Model.ClsKf_OtherInBillMain>();
|
ListModels oListModels = new ListModels();
|
lsmain = oListModels.getOtherInBillMainByJson(msg1);
|
WebS.ClsKf_OtherInBillMain websLsmain = new WebS.ClsKf_OtherInBillMain();
|
string sSourceType = lsmain[0].HMainSourceBillType;
|
websLsmain.HInterID = lsmain[0].HInterID;
|
websLsmain.HBillNo = lsmain[0].HBillNo;
|
websLsmain.HBillType = lsmain[0].HBillType;
|
websLsmain.HDate = lsmain[0].HDate;
|
websLsmain.HDeptID = lsmain[0].HDeptID;
|
websLsmain.HWHID = lsmain[0].HWHID;
|
websLsmain.HSCWHID = lsmain[0].HSCWHID;
|
websLsmain.HSupID = lsmain[0].HSupID;
|
websLsmain.HKeeperID = lsmain[0].HKeeperID;
|
websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
|
websLsmain.HEmpID = lsmain[0].HEmpID;
|
websLsmain.HManagerID = lsmain[0].HManagerID;
|
websLsmain.HRemark = lsmain[0].HRemark;
|
websLsmain.HExplanation = lsmain[0].HExplanation;
|
websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
|
websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
|
websLsmain.HStockStyle = lsmain[0].HStockStyle;
|
websLsmain.HBillSubType = lsmain[0].HBillSubType;
|
if(lsmain[0].HMainSourceBillType== "1241")
|
{
|
websLsmain.HMainSourceBillType = "入库申请单";
|
}
|
else
|
{
|
websLsmain.HMainSourceBillType = "手工录入";
|
}
|
websLsmain.HMaker = lsmain[0].HMaker;
|
websLsmain.HBillerID = lsmain[0].HBillerID;
|
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
|
websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
|
|
if (oWebs.set_SaveOtherInBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "其他出库单上传失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
#region 销售出库 上传生单
|
|
#region 销售出库 校验模式
|
|
/// <summary>
|
/// 销售出库校验上传
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/set_SaveSellOutBill_BillCheck_Json")]
|
[HttpPost]
|
public object set_SaveSellOutBill_BillCheck_Json([FromBody] JObject oMain)
|
{
|
var _value = oMain["oMain"].ToString();
|
string msg1 = _value.ToString();
|
|
try
|
{
|
List<Model.ClsKf_SellOutBillMain> lsmain = new List<Model.ClsKf_SellOutBillMain>();
|
ListModels oListModels = new ListModels();
|
lsmain = oListModels.getSellOutBillMainByJson(msg1);
|
|
WebAPI.WebS.ClsKf_SellOutBillMain websLsmain = new WebS.ClsKf_SellOutBillMain();
|
|
websLsmain.HInterID = lsmain[0].HInterID;
|
websLsmain.HBillNo = lsmain[0].HBillNo;
|
websLsmain.HBillType = "1205";
|
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
|
|
if (oWebs.set_SaveSellOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "销售出库校验失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
#region 委外领料 上传生单
|
|
#region 委外领料 校验模式
|
|
/// <summary>
|
/// 委外领料校验上传
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/set_SaveEntrustOutBill_BillCheck_Json")]
|
[HttpPost]
|
public object set_SaveEntrustOutBill_BillCheck_Json([FromBody] JObject oMain)
|
{
|
var _value = oMain["oMain"].ToString();
|
string msg1 = _value.ToString();
|
|
try
|
{
|
List<Model.ClsKf_EntrustOutBillMain> lsmain = new List<Model.ClsKf_EntrustOutBillMain>();
|
ListModels oListModels = new ListModels();
|
lsmain = oListModels.getEntrustOutBillMainByJson(msg1);
|
|
WebAPI.WebS.ClsKf_EntrustOutBillMain websLsmain = new WebS.ClsKf_EntrustOutBillMain();
|
|
websLsmain.HInterID = lsmain[0].HInterID;
|
websLsmain.HBillNo = lsmain[0].HBillNo;
|
websLsmain.HBillType = "1211";
|
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
|
|
if (oWebs.set_SaveEntrustOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "委外领料校验失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
#region 生产补料 上传生单
|
|
#region 生产补料 校验模式
|
|
/// <summary>
|
/// 生产补料校验上传
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/set_SaveMateReplenishOutBill_BillCheck_Json")]
|
[HttpPost]
|
public object set_SaveMateReplenishOutBill_BillCheck_Json([FromBody] JObject oMain)
|
{
|
var _value = oMain["oMain"].ToString();
|
string msg1 = _value.ToString();
|
|
try
|
{
|
List<Model.ClsKf_MateReplenishOutBillMain> lsmain = new List<Model.ClsKf_MateReplenishOutBillMain>();
|
ListModels oListModels = new ListModels();
|
lsmain = oListModels.getMateReplenishOutBillMainByJson(msg1);
|
|
WebAPI.WebS.ClsKf_MateReplenishOutBillMain websLsmain = new WebS.ClsKf_MateReplenishOutBillMain();
|
|
websLsmain.HInterID = lsmain[0].HInterID;
|
websLsmain.HBillNo = lsmain[0].HBillNo;
|
websLsmain.HBillType = "1254";
|
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
|
|
if (oWebs.set_SaveMateReplenishOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "生产补料校验失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
#region 委外补料 上传生单
|
|
#region 委外补料 校验模式
|
|
/// <summary>
|
/// 委外补料校验上传
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/set_SaveEntrustReplenishOutBill_BillCheck_Json")]
|
[HttpPost]
|
public object set_SaveEntrustReplenishOutBill_BillCheck_Json([FromBody] JObject oMain)
|
{
|
var _value = oMain["oMain"].ToString();
|
string msg1 = _value.ToString();
|
|
try
|
{
|
List<Model.ClsKf_EntrustReplenishOutBillMain> lsmain = new List<Model.ClsKf_EntrustReplenishOutBillMain>();
|
ListModels oListModels = new ListModels();
|
lsmain = oListModels.getEntrustReplenishOutBillMainByJson(msg1);
|
|
WebAPI.WebS.ClsKf_EntrustReplenishOutBillMain websLsmain = new WebS.ClsKf_EntrustReplenishOutBillMain();
|
|
websLsmain.HInterID = lsmain[0].HInterID;
|
websLsmain.HBillNo = lsmain[0].HBillNo;
|
websLsmain.HBillType = "1255";
|
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
|
|
if (oWebs.set_SaveEntrustReplenishOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "委外补料校验失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
#region 直接调拨 上传生单
|
|
#region 换托调拨单
|
|
/// <summary>
|
/// 上传生成换托调拨单
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/set_SaveMoveStockBill_HuanTuo_Json")]
|
[HttpGet]
|
public object set_SaveMoveStockBill_HuanTuo_Json(Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
|
{
|
try
|
{
|
if (oWebs.set_SaveMoveStockBill_HuanTuo(HInterID, HBillType, HBillNo, HBarCode_Pack, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "生成换托调拨单失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
|
#region 生产组托单 上传生单
|
|
/// <summary>
|
/// 上传生成生产组托单
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/set_SavePackUnionBill_Json")]
|
[HttpGet]
|
public object set_SavePackUnionBill_Json(Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
|
{
|
try
|
{
|
if (oWebs.set_SavePackUnionBill_Add(HInterID, HBillType, HBillNo, HBarCode_Pack, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "生成生产组托单失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
#region 源单条码处理方法
|
|
#region 生产入库 扫描源单条码
|
|
/// <summary>
|
/// 生产入库 扫描源单条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/Get_SourceBarCode_ProductIn_Json")]
|
[HttpGet]
|
public object get_SourceBarCode_ProductIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
|
{
|
try
|
{
|
WebSoBar = oWebs.get_SourceBarCode_ProductIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描源单条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 采购入库 扫描源单条码
|
|
/// <summary>
|
/// 采购入库 扫描源单条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/Get_SourceBarCode_POStockIn_Json")]
|
[HttpGet]
|
public object get_SourceBarCode_POStockIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
|
{
|
try
|
{
|
WebSoBar = oWebs.get_SourceBarCode_POStockIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描源单条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 其他入库 扫描源单条码
|
|
/// <summary>
|
/// 其他入库 扫描源单条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/Get_SourceBarCode_OtherIn_Json")]
|
[HttpGet]
|
public object get_SourceBarCode_OtherIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
|
{
|
try
|
{
|
WebSoBar = oWebs.get_SourceBarCode_OtherIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描源单条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
|
|
|
#region 生产领料 扫描源单条码
|
|
/// <summary>
|
/// 领料出库 扫描源单条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/Get_SourceBarCode_MateOut_Json")]
|
[HttpGet]
|
public object get_SourceBarCode_MateOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Double HPTQty, Int64 HPlanMode, Int64 HFIFOWhID, Int64 HStockOrgID)
|
{
|
try
|
{
|
WebSoBar = oWebs.get_SourceBarCode_MateOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HPTQty, HPlanMode, HFIFOWhID, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描源单条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 销售出库 扫描源单条码
|
|
/// <summary>
|
/// 销售出库 扫描源单条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/Get_SourceBarCode_SellOut_Json")]
|
[HttpGet]
|
public object get_SourceBarCode_SellOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID)
|
{
|
try
|
{
|
WebSoBar = oWebs.get_SourceBarCode_SellOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描源单条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 委外出库 扫描源单条码
|
|
/// <summary>
|
/// 委外出库 扫描源单条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/Get_SourceBarCode_EntrustOut_Json")]
|
[HttpGet]
|
public object get_SourceBarCode_EntrustOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HStockOrgID)
|
{
|
try
|
{
|
WebSoBar = oWebs.get_SourceBarCode_EntrustOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描源单条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 其他出库 扫描源单条码
|
|
/// <summary>
|
/// 其他出库 扫描源单条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/get_SourceBarCode_OtherOut_Json")]
|
[HttpGet]
|
public object get_SourceBarCode_OtherOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID)
|
{
|
try
|
{
|
WebSoBar = oWebs.get_SourceBarCode_OtherOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描源单条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 直接调拨 扫描源单条码
|
|
/// <summary>
|
/// 直接调拨 扫描源单条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/get_SourceBarCode_MoveStock_Json")]
|
[HttpGet]
|
public object get_SourceBarCode_MoveStock_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID)
|
{
|
try
|
{
|
WebSoBar = oWebs.get_SourceBarCode_MoveStock(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描源单条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 分步式调出 扫描源单条码
|
|
/// <summary>
|
/// 分步式调出 扫描源单条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/Get_SourceBarCode_MoveStockStepOut_Json")]
|
[HttpGet]
|
public object get_SourceBarCode_MoveStockStepOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HStockInOrgID, Int64 HStockOutOrgID)
|
{
|
try
|
{
|
WebSoBar = oWebs.get_SourceBarCode_MoveStockStepOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockInOrgID, HStockOutOrgID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描源单条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 分步式调入 扫描源单条码
|
|
/// <summary>
|
/// 分步式调入 扫描源单条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/Get_SourceBarCode_MoveStockStepIn_Json")]
|
[HttpGet]
|
public object get_SourceBarCode_MoveStockStepIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockInOrgID, Int64 HStockOutOrgID)
|
{
|
try
|
{
|
WebSoBar = oWebs.get_SourceBarCode_MoveStockStepIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockInOrgID, HStockOutOrgID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描源单条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
#region 物料条码处理方法 出入库模块
|
|
/// <summary>
|
/// 物料条码文本框 扫码调用
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/Get_BarCode_Json")]
|
[HttpGet]
|
public Object get_BarCode_Json(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, bool HRedBlueFlag, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockOrgID, string HScanStyle, string HCustom1, string HCustom2)
|
{
|
//获取系统参数
|
string sErrMsg = "";
|
string sJXCode = "";
|
if (oSystemParameter.ShowBill(ref sErrMsg) == true)
|
{
|
if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数 客户定制化名称 空白为通用
|
{
|
sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOrgID, HBillNo, HMaker);
|
SourceFlag = true;
|
}
|
else
|
{
|
sJXCode = sBarCode;
|
}
|
try
|
{
|
WebSoBar = oWebs.get_BarCode(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HStockOrgID, HScanStyle, HCustom1, HCustom2, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 物料条码处理方法 调拨模块
|
|
/// <summary>
|
/// 物料条码文本框 扫码调用
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/get_BarCode_MoveStock_Json")]
|
[HttpGet]
|
public Object get_BarCode_MoveStock_Json(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockInOrgID, Int64 HStockOutOrgID, string HScanStyle)
|
{
|
string sErrMsg = "";
|
string sJXCode = "";
|
if (oSystemParameter.ShowBill(ref sErrMsg) == true)
|
{
|
if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数 客户定制化名称 空白为通用
|
{
|
sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker);
|
SourceFlag = true;
|
}
|
else
|
{
|
sJXCode = sBarCode;
|
}
|
try
|
{
|
string HCustom1 = "", HCustom2 = "";
|
WebSoBar = oWebs.get_BarCode_MoveStock(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo, HCustom1, HCustom2);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
|
|
|
//try
|
//{
|
// var sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker);
|
// WebSoBar = oWebs.get_BarCode_MoveStock(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo);
|
// if (WebSoBar == null)
|
// {
|
// objJsonResult.code = "0";
|
// objJsonResult.count = 0;
|
// objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
// objJsonResult.data = null;
|
// return objJsonResult;
|
// }
|
// else
|
// {
|
// objJsonResult.code = "0";
|
// objJsonResult.count = 1;
|
// objJsonResult.Message = "成功";
|
// objJsonResult.data = WebSoBar;
|
// return objJsonResult;
|
// }
|
//}
|
//catch (Exception e)
|
//{
|
// objJsonResult.code = "0";
|
// objJsonResult.count = 0;
|
// objJsonResult.Message = "扫描条码失败!" + e.ToString();
|
// objJsonResult.data = null;
|
// return objJsonResult;
|
//}
|
}
|
|
#endregion
|
|
|
|
#region 物料条码处理方法 调拨盘点模块
|
|
/// <summary>
|
/// 物料条码文本框 扫码调用
|
/// </summary>
|
/// <returns></returns>
|
//[Route("WEBSController/get_BarCode_MoveStock_PD")]
|
//[HttpGet]
|
//public Object get_BarCode_MoveStock_PD(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockInOrgID, Int64 HStockOutOrgID, string HScanStyle)
|
//{
|
// string sErrMsg = "";
|
// string sJXCode = "";
|
// if (oSystemParameter.ShowBill(ref sErrMsg) == true)
|
// {
|
// if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数 客户定制化名称 空白为通用
|
// {
|
// sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker);
|
// SourceFlag = true;
|
// }
|
// else
|
// {
|
// sJXCode = sBarCode;
|
// }
|
// try
|
// {
|
// WebSoBar = oWebs.get_BarCode_MoveStock_PD(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo);
|
// if (WebSoBar == null)
|
// {
|
// objJsonResult.code = "0";
|
// objJsonResult.count = 0;
|
// objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
// objJsonResult.data = null;
|
// return objJsonResult;
|
// }
|
// else
|
// {
|
// objJsonResult.code = "0";
|
// objJsonResult.count = 1;
|
// objJsonResult.Message = "成功";
|
// objJsonResult.data = WebSoBar;
|
// return objJsonResult;
|
// }
|
// }
|
// catch (Exception e)
|
// {
|
// objJsonResult.code = "0";
|
// objJsonResult.count = 0;
|
// objJsonResult.Message = "扫描条码失败!" + e.ToString();
|
// objJsonResult.data = null;
|
// return objJsonResult;
|
// }
|
// }
|
// else
|
// {
|
// objJsonResult.code = "0";
|
// objJsonResult.count = 0;
|
// objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
|
// objJsonResult.data = null;
|
// return objJsonResult;
|
// }
|
//}
|
|
#endregion
|
|
|
#region 扫码模块调用方法
|
|
#region 从缓存列表页面返回信息
|
|
/// <summary>
|
/// 从缓存列表页面返回信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetSourceBill_Temp_Json")]
|
[HttpGet]
|
public object GetSourceBill_Temp_Json(Int64 HInterID, string HBillType)
|
{
|
try
|
{
|
ds = oCn.RunProcReturn("exec h_p_WMS_SourceBill_Temp " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_SourceBill_Temp");
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "从缓存列表返回时,没有返回任何记录!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "返回缓存列表单据信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 单据新增模块 获取单据列表信息处理方法
|
|
/// <summary>
|
/// 获取单据列表信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetBillEntryTmpList_Json")]
|
[HttpGet]
|
public object GetBillEntryTmpList(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID)
|
{
|
try
|
{
|
string sMouldManagerCtl = "N"; //是否启用器具管理
|
string sFIFOCtl = "N"; //是否启用先进先出管理
|
ds = oWebs.GetBillEntryTmpList(HInterID, HBillNo, HBillType, HStockOrgID, ref sMouldManagerCtl, ref sFIFOCtl, ref DBUtility.ClsPub.sErrInfo);
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "没有返回任何记录!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "获取信息成功!";
|
objJsonResult.data = new
|
{
|
Materlist = ds.Tables[0], //返回物料明细列表信息(0)
|
Mouldlist = ds.Tables[1], //返回模治具列表信息(1)
|
FIFOlist = ds.Tables[2], //返回先进先出列表信息(2)
|
BarCodelist = ds.Tables[3], //返回条码明细列表信息(3)
|
ICMOReportlist = ds.Tables[4], //返回源单生产汇报单条码明细列表信息(4)
|
BarCodeDetailslist = ds.Tables[5] //返回当前所扫描条码明细信息(5)
|
};
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取列表信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
#region 校验模式 模块调用方法
|
|
#region 从缓存列表编辑功能跳转至单据扫码模块,获取单据信息
|
|
/// <summary>
|
/// 从缓存列表编辑功能跳转至单据扫码模块,获取单据信息 校验模式
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetSourceBillList_BillCheck_Json")]
|
[HttpGet]
|
public Object GetSourceBillList_BillCheck_Json(string HBillNo, string HBillType)
|
{
|
try
|
{
|
WebSoBar = oWebs.GetSourceBillList_BillCheck(HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "从缓存列表编辑功能跳转至单据扫码模块,获取单据信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 扫描单据条码 出入库模块
|
|
/// <summary>
|
/// 扫描单据条码 出入库模块 校验模式
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/get_BillBarCode_BillCheck_Json")]
|
[HttpGet]
|
public Object get_BillBarCode_BillCheck_Json(string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID)
|
{
|
try
|
{
|
WebSoBar = oWebs.get_BillBarCode_BillCheck(HBillNo, HBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描单据条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 扫描物料条码 出入库模块
|
|
/// <summary>
|
/// 物料条码文本框 校验扫码调用 校验模式
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/get_CheckTypeByBarCode_BillCheck_Json")]
|
[HttpGet]
|
public Object get_CheckTypeByBarCode_BillCheck_Json(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, Int64 HStockOrgID)
|
{
|
//获取系统参数
|
string sErrMsg = "";
|
string sJXCode = "";
|
if (oSystemParameter.ShowBill(ref sErrMsg) == true)
|
{
|
string sSourceBarCodeCtl = "N"; //校验-是否进行源单对应条码核对('Y'为核对)
|
if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
|
{
|
//销售出库单
|
sSourceBarCodeCtl = "Y";
|
}
|
|
if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数 客户定制化名称 空白为通用
|
{
|
sJXCode = POStockInBillController.JX_Json(sBarCode, HBillID, HBillType, HStockOrgID, HBillNo, HMaker);
|
}
|
else
|
{
|
sJXCode = sBarCode;
|
}
|
try
|
{
|
//原单据为扫码生成,校验时不生成条码记录,只对原扫描的条码进行核对
|
if (sSourceBarCodeCtl == "Y")
|
{
|
WebSoBar = oWebs.get_BillBarCode_Verify(HBillID, HBillNo, HBillType, sJXCode, HQty, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
//原单据非扫码生成,校验时生成条码记录
|
else
|
{
|
WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "校验模式,扫描条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 返回单据列表信息
|
|
/// <summary>
|
/// 返回单据列表信息 校验模式
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetKf_PonderationBillMain_Temp_BillCheck_Json")]
|
[HttpGet]
|
public object GetKf_PonderationBillMain_Temp_BillCheck_Json(long HInterID, string HBillType, string sWhere)
|
{
|
try
|
{
|
ds = oWebs.GetKf_PonderationBillMain_Temp_BillCheck(HInterID, HBillType, sWhere);
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "没有返回任何记录!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "获取信息成功!";
|
objJsonResult.data = ds.Tables[0];
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取列表信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 扫码模块,删除选中行条码出入库临时表记录
|
|
/// <summary>
|
/// 扫码模块,删除选中行条码出入库临时表记录
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/set_DeleteBarCodeByEntryID_BillCheck_Json")]
|
[HttpGet]
|
public object set_DeleteBarCodeByEntryID_BillCheck_Json(long HInterID, string HBillType, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, Int64 HStockOrgID)
|
{
|
//获取系统参数
|
string sErrMsg = "";
|
if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == true)
|
{
|
string sSourceBarCodeCtl = "N"; //校验-是否进行源单对应条码核对('Y'为核对)
|
if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
|
{
|
//销售出库单
|
sSourceBarCodeCtl = "Y";
|
}
|
|
//原单据为扫码生成,对原扫描的条码进行核对
|
if (sSourceBarCodeCtl == "Y")
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "校验条码,删除功能不可用! ";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
//原单据非扫码生成
|
else
|
{
|
try
|
{
|
oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HMaterID=" + HMaterID.ToString() + " and HAuxPropID=" + HAuxPropID.ToString() + " and HMTONo='" + HMTONo + "' and HSourceInterID=" + HSourceInterID.ToString() + " and HSourceEntryID=" + HSourceEntryID.ToString() + " and HQty<>0 ", ref DBUtility.ClsPub.sExeReturnInfo);
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "删除成功";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "删除所选行条码出入库临时表记录失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 缓存模块 返回缓存列表信息
|
|
/// <summary>
|
/// 返回缓存列表信息 校验模式
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetKf_PonderationBillMain_TempList_BillCheck_Json")]
|
[HttpGet]
|
public object GetKf_PonderationBillMain_TempList_BillCheck_Json(string HBillType, string HMaker, Int64 HStockOrgID)
|
{
|
try
|
{
|
ds = oWebs.GetKf_PonderationBillMain_TempList_BillCheck(HBillType, HMaker, HStockOrgID);
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "单据无缓存记录!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "获取缓存信息成功!";
|
objJsonResult.data = ds.Tables[0];
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取缓存列表信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 缓存模块 根据单据ID,删除临时表记录
|
|
/// <summary>
|
/// 根据单据ID,删除临时表记录
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/DeleteBillList_BillCheck_Json")]
|
[HttpGet]
|
public object DeleteBillList_BillCheck_Json(long HInterID, string HBillType, Int64 HStockOrgID)
|
{
|
//获取系统参数
|
string sErrMsg = "";
|
if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
|
{
|
string sSourceBarCodeCtl = "N"; //校验-是否进行源单对应条码核对('Y'为核对)
|
if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
|
{
|
//销售出库单
|
sSourceBarCodeCtl = "Y";
|
}
|
|
//原单据为扫码生成,对原扫描的条码进行核对,删除条码出入库校验缓存记录
|
if (sSourceBarCodeCtl == "Y")
|
{
|
try
|
{
|
oCn.RunProc("Delete from KF_PonderationBillMain_Temp_Verify where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "删除成功";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "删除所选单据条码出入库临时表记录失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
//原单据非扫码生成,删除条码出入库缓存列表记录
|
else
|
{
|
try
|
{
|
oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "删除成功";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "删除所选单据条码出入库临时表记录失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 缓存模块 已上传列表界面,撤销功能
|
|
/// <summary>
|
/// 已上传列表界面,撤销功能,删除WMS表和本地出入库单记录,并更新TEMP表中的上传字段 HRelationInterID=0
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/DeleteICStockBillAndWMS_BillCheck_Json")]
|
[HttpGet]
|
public object DeleteICStockBillAndWMS_BillCheck_Json(Int64 HInterID, string HBillNo, string HBillType, Int64 HStockOrgID)
|
{
|
//获取系统参数
|
string sErrMsg = "";
|
if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
|
{
|
string sSourceBarCodeCtl = "N"; //校验-是否进行源单对应条码核对('Y'为核对)
|
if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
|
{
|
//销售出库单
|
sSourceBarCodeCtl = "Y";
|
}
|
|
//原单据为扫码生成,对原扫描的条码进行核对
|
if (sSourceBarCodeCtl == "Y")
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "校验条码,撤销功能不可用! ";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
//原单据非扫码生成
|
else
|
{
|
try
|
{
|
if (oWebs.DeleteICStockBillAndWMS(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "撤销单据已上传记录失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
#region 生产组托单模块调用方法
|
|
#region 生产组托单模块 扫描托条码
|
|
/// <summary>
|
/// 生产组托单模块 扫描托条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/Get_PackBarCode_PackUnionBill_Json")]
|
[HttpGet]
|
public object get_PackBarCode_PackUnionBill_Json(Int64 HInterID, string HBillNo, string HBillType, string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
|
{
|
try
|
{
|
WebS.ClsGy_BarCodeBill_WMS_Model WebSoBarModel = new WebS.ClsGy_BarCodeBill_WMS_Model();
|
WebSoBarModel = oWebs.get_PackBarCode_PackUnionBill(HInterID, HBillNo, HBillType, HBarCode_Pack, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBarModel == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBarModel;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描托条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 生产组托单模块 扫描托条码对应单个条码
|
|
/// <summary>
|
/// 生产组托单模块 扫描托条码对应单个条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/Get_BarCode_PackUnionBill_Json")]
|
[HttpGet]
|
public object get_BarCode_PackUnionBill_Json(string HBarCode, Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
|
{
|
try
|
{
|
if (oWebs.get_BarCode_PackUnionBill(HBarCode, HInterID, HBillType, HBillNo, HBarCode_Pack, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 返回组托列表信息
|
|
/// <summary>
|
/// 返回组托列表信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetBillEntry_Tmp_Pack_Json")]
|
[HttpGet]
|
public object GetBillEntry_Tmp_Pack_Json(long HInterID, string HBillNo, string HBillType)
|
{
|
try
|
{
|
ds = oWebs.GetBillEntry_Tmp_Pack(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo);
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "没有返回任何记录!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "获取信息成功!";
|
objJsonResult.data = ds.Tables[0];
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取列表信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 删除明细表体选中行记录
|
|
/// <summary>
|
/// 删除明细表体选中行记录
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/set_DelPackUnionBill_Temp_Pack_Json")]
|
[HttpGet]
|
public object set_DelPackUnionBill_Temp_Pack_Json(Int64 HInterID, string HBarCode, string HBillType)
|
{
|
try
|
{
|
if (oWebs.set_DelPackUnionBill_Temp_Pack(HInterID, HBarCode, HBillType, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "删除组托记录失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
|
#region 组托缓存列表模块调用方法
|
|
#region 返回组托缓存列表信息
|
|
/// <summary>
|
/// 返回组托缓存列表信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetSc_PackUnionBill_TempList_Json")]
|
[HttpGet]
|
public object GetSc_PackUnionBill_TempList_Json(string HBillType, string HMaker, long HStockOrgID)
|
{
|
try
|
{
|
ds = oWebs.GetSc_PackUnionBill_TempList(HBillType, HMaker, HStockOrgID);
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "单据无缓存记录!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "获取缓存信息成功!";
|
objJsonResult.data = ds.Tables[0];
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取缓存列表信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 删除组托缓存列表单据
|
|
/// <summary>
|
/// 删除组托缓存列表单据
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/DeleteTemp_PackUnionBill_Json")]
|
[HttpGet]
|
public object DeleteTemp_PackUnionBill_Json(Int64 HInterID)
|
{
|
try
|
{
|
if (oWebs.DeleteTemp_PackUnionBill(HInterID, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "删除缓存信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
#endregion
|
|
|
#region 删托模块调用方法
|
|
#region 删托模块 扫描托条码
|
|
/// <summary>
|
/// 删托模块 扫描托条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/Get_PackBarCode_DeletePackUnionBill_Json")]
|
[HttpGet]
|
public object Get_PackBarCode_DeletePackUnionBill_Json(string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
|
{
|
try
|
{
|
ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_DeletePackUnionBill '" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddPackBarCode_DeletePackUnionBill");
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描托条码判断失败!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0)
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描托条码失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "删托模块,获取托条码信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 删托模块 上传 删除组托单信息
|
|
/// <summary>
|
/// 上传 删除组托单信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetDeletePackUnionBill_Json")]
|
[HttpGet]
|
public object GetDeletePackUnionBill_Json(long HInterID, string HBillType, string HMaker)
|
{
|
try
|
{
|
oCn.RunProc("exec h_p_WMS_PackUnionBill_Delete " + HInterID.ToString() + ",'" + HBillType + "','" + HMaker + "'", ref DBUtility.ClsPub.sExeReturnInfo);
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "删托成功";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "删托失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
#region 换托调拨单模块调用方法
|
|
#region 换托调拨单模块 扫描调入托条码
|
|
/// <summary>
|
/// 换托调拨单模块 扫描调入托条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/Get_BarCodePack_In_MoveStockBill_HuanTuo_Json")]
|
[HttpGet]
|
public object get_BarCodePack_In_MoveStockBill_HuanTuo_Json(Int64 HInterID, string HBillNo, string HBarCode_Pack, Int64 HStockOrgID)
|
{
|
try
|
{
|
WebSoBar = oWebs.get_BarCodePack_In_MoveStockBill_HuanTuo(HInterID, HBillNo, HBarCode_Pack, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
|
if (WebSoBar == null)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功";
|
objJsonResult.data = WebSoBar;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描调入托条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 换托调拨单模块 扫描调出条码
|
|
/// <summary>
|
/// 换托调拨单模块 扫描调出条码
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/Get_BarCode_MoveStockBill_HuanTuo_Json")]
|
[HttpGet]
|
public object get_BarCode_MoveStockBill_HuanTuo_Json(Int64 HInterID, string HBillNo, string HBillType, string HBarCode, string HBarCode_Pack, Int64 HPackUnionInterID_In, Int64 HWhID, Int64 HSPID, string HMaker, Int64 HStockOrgID)
|
{
|
try
|
{
|
if (oWebs.get_BarCode_MoveStockBill_HuanTuo(HInterID, HBillNo, HBillType, HBarCode, HBarCode_Pack, HPackUnionInterID_In, HWhID, HSPID, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "扫描调出条码失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 换托调拨单模块 返回列表信息
|
|
/// <summary>
|
/// 换托调拨单模块 返回列表信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetBillEntry_Temp_MoveStockBill_HuanTuo_Json")]
|
[HttpGet]
|
public object GetBillEntry_Temp_MoveStockBill_HuanTuo_Json(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID)
|
{
|
try
|
{
|
ds = oWebs.GetBillEntry_Temp_MoveStockBill_HuanTuo(HInterID, HBillNo, HBillType, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "没有返回任何记录!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "获取信息成功!";
|
objJsonResult.data = ds.Tables[0];
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取列表信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 换托调拨单模块 扫描删除明细表体行记录
|
|
/// <summary>
|
/// 换托调拨单模块 扫描删除明细表体行记录
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/set_DelPackUnionBill_Temp_MoveStockBill_HuanTuo_Json")]
|
[HttpGet]
|
public object set_DelPackUnionBill_Temp_MoveStockBill_HuanTuo_Json(Int64 HInterID, string HBarCode, string HBillType)
|
{
|
try
|
{
|
if (oWebs.set_DelPackUnionBill_Temp_MoveStockBill_HuanTuo(HInterID, HBarCode, HBillType, ref DBUtility.ClsPub.sErrInfo))
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败!
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "删除换托调出记录失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 换托调拨单模块 从缓存列表页面返回信息
|
|
/// <summary>
|
/// 从缓存列表页面返回信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetKF_MoveStockBill_TempList_HuanTuo_Json")]
|
[HttpGet]
|
public object GetKF_MoveStockBill_TempList_HuanTuo_Json(Int64 HInterID, string HBillType)
|
{
|
try
|
{
|
ds = oCn.RunProcReturn("exec h_p_KF_MoveStockBill_TempList_HuanTuo " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_KF_MoveStockBill_TempList_HuanTuo");
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "从缓存列表返回时,没有返回任何记录!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "返回缓存列表单据信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#region 换托调拨单缓存列表模块 返回缓存列表信息
|
|
/// <summary>
|
/// 返回换托调拨单缓存列表信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetPonderationBillMain_TempList_HuanTuo_Json")]
|
[HttpGet]
|
public object GetPonderationBillMain_TempList_HuanTuo_Json(string HBillType, string HMaker, long HStockOrgID)
|
{
|
try
|
{
|
ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_TempList_HuanTuo '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_KF_PonderationBillMain_TempList_HuanTuo");
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "单据无缓存记录!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "获取缓存信息成功!";
|
objJsonResult.data = ds.Tables[0];
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取缓存列表信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
|
#endregion
|
|
#endregion
|
|
|
#region 处理方法
|
|
|
#endregion
|
|
|
|
|
|
|
#region 报表数据获取方法
|
|
#region 条码出入库记录报表
|
|
#region 获取单据类型信息
|
/// <summary>
|
/// 获取单据类型信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetBarCodeReport_BillType_Json")]
|
[HttpGet]
|
public object GetBarCodeReport_BillType_Json()
|
{
|
try
|
{
|
ds = oCn.RunProcReturn("exec h_p_WMS_BarCodeReport_BillType ", "h_p_WMS_BarCodeReport_BillType");
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
return objJsonResult;
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "获取单据类型信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
#endregion
|
|
#region 获取条码出入库记录
|
/// <summary>
|
/// 获取条码出入库记录
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetKf_BarCodeOutInReport_Json")]
|
[HttpGet]
|
public object GetKf_BarCodeOutInReport_Json(string sWhere)
|
{
|
try
|
{
|
ds = oCn.RunProcReturn("exec h_p_Kf_BarCodeOutInReport_New " + sWhere, "h_p_Kf_BarCodeOutInReport_New");
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "当前所输入过滤条件,没有返回任何结果!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "查询条码出入库记录信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
#endregion
|
|
#endregion
|
|
#region 条码库存查询报表
|
|
#region 获取条码库存信息
|
/// <summary>
|
/// 获取条码库存信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetKf_BarCodeICInventoryReport_Json")]
|
[HttpGet]
|
public object GetKf_BarCodeICInventoryReport_Json(string sWhere)
|
{
|
try
|
{
|
ds = oCn.RunProcReturn("exec h_p_WMS_BarCodeICInventoryReport " + sWhere, "h_p_WMS_BarCodeICInventoryReport");
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "当前所输入过滤条件,没有返回任何结果!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "查询条码库存信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
#endregion
|
|
#endregion
|
|
#region WMS物料出入库记录报表
|
|
#region 获取WMS物料出入库记录
|
/// <summary>
|
/// 获取WMS物料出入库记录
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetKf_MaterOutInReport_Json")]
|
[HttpGet]
|
public object GetKf_MaterOutInReport_Json(string sWhere)
|
{
|
try
|
{
|
ds = oCn.RunProcReturn("exec h_p_WMS_MaterOutInReport " + sWhere, "h_p_WMS_MaterOutInReport");
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "当前所输入过滤条件,没有返回任何结果!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "查询WMS物料出入库记录信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
#endregion
|
|
#endregion
|
|
#region WMS物料库存查询报表
|
|
#region 获取WMS物料库存信息
|
/// <summary>
|
/// 获取WMS物料库存信息
|
/// </summary>
|
/// <returns></returns>
|
[Route("WEBSController/GetKf_MaterICInventoryReport_Json")]
|
[HttpGet]
|
public object GetKf_MaterICInventoryReport_Json(string sWhere)
|
{
|
try
|
{
|
ds = oCn.RunProcReturn("exec h_p_WMS_MaterICInventoryReport " + sWhere, "h_p_WMS_MaterICInventoryReport");
|
if (ds == null || ds.Tables[0].Rows.Count == 0)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "当前所输入过滤条件,没有返回任何结果!";
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
else
|
{
|
List<object> columnNameList = new List<object>();
|
//添加列名
|
foreach (DataColumn col in ds.Tables[0].Columns)
|
{
|
Type dataType = col.DataType;
|
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
|
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //获取到DataColumn列对象的列名
|
}
|
objJsonResult.code = "0";
|
objJsonResult.count = 1;
|
objJsonResult.Message = "成功!";
|
objJsonResult.data = ds.Tables[0];
|
objJsonResult.list = columnNameList;
|
return objJsonResult;
|
}
|
}
|
catch (Exception e)
|
{
|
objJsonResult.code = "0";
|
objJsonResult.count = 0;
|
objJsonResult.Message = "查询WMS物料库存信息失败!" + e.ToString();
|
objJsonResult.data = null;
|
return objJsonResult;
|
}
|
}
|
#endregion
|
|
#endregion
|
|
|
#endregion
|
|
|
}
|
}
|