269 lines
12 KiB
C#
269 lines
12 KiB
C#
/***********************
|
|
* 说明:生产管理相关接口
|
|
* 创建人:龚宇超
|
|
* 创建日期:2018-02-27
|
|
* 修改人:
|
|
* 修改日期:
|
|
* 修改备注:
|
|
* 版本:1.0.0.0
|
|
***********************/
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Data.SqlClient;
|
|
using System.Data;
|
|
using Lskj.Core;
|
|
using Lskj.Model;
|
|
|
|
namespace Lskj.Business.Impl
|
|
{
|
|
public class ProduceImpl : BaseImpl
|
|
{
|
|
/// <summary>
|
|
/// <para>说明:生产过程工序操作</para>
|
|
/// <para>创建人:龚宇超</para>
|
|
/// <para>创建日期:2017-08-12 </para>
|
|
/// <para>修改人:</para>
|
|
/// <para>修改日期:</para>
|
|
/// <para>修改备注:</para>
|
|
/// <para>版本:1.0</para>
|
|
/// </summary>
|
|
/// <param name="menuCode">模块编号.</param>
|
|
/// <param name="parmaryValue">主键值.</param>
|
|
/// <param name="operType">操作类型.</param>
|
|
/// <param name="operatorId">用户Id.</param>
|
|
/// <param name="operatorName">用户名</param>
|
|
/// <param name="flag">确认标记.</param>
|
|
/// <param name="msgs">返回消息</param>
|
|
/// <param name="pageRefrshs">选项卡刷新索引</param>
|
|
/// <returns>System.Int32.</returns>
|
|
public static int OperationCheckCard(string menuCode, string parmaryValue, int operType, string operatorId, string operatorName, int flag, out string msgs, out string refreshPages)
|
|
{
|
|
SqlParameter msg = new SqlParameter("@msg", SqlDbType.VarChar, 2000);
|
|
msg.Direction = ParameterDirection.Output;
|
|
SqlParameter pageindex = new SqlParameter("@pageindex", SqlDbType.VarChar, 50);
|
|
pageindex.Direction = ParameterDirection.Output;
|
|
SqlParameter returnValue = new SqlParameter("@return_value", SqlDbType.Int, 4);
|
|
returnValue.Direction = ParameterDirection.ReturnValue;
|
|
SqlParameter[] param =
|
|
{
|
|
new SqlParameter("@modid",SqlDbType.VarChar,10),
|
|
new SqlParameter("@keyvalue",SqlDbType.VarChar,40),
|
|
new SqlParameter("@operType",SqlDbType.Int,4),
|
|
new SqlParameter("@operatorId",SqlDbType.Int,4),
|
|
new SqlParameter("@operatorName",SqlDbType.VarChar,20),
|
|
new SqlParameter("@comfirmFlag",SqlDbType.VarChar,500),
|
|
pageindex,
|
|
msg,
|
|
returnValue
|
|
};
|
|
param[0].Value = menuCode;
|
|
param[1].Value = parmaryValue;
|
|
param[2].Value = operType;
|
|
param[3].Value = operatorId;
|
|
param[4].Value = operatorName;
|
|
param[5].Value = flag;
|
|
SqlHelper.ExecuteDataSet(CommandType.StoredProcedure, "p_mrp_ProcessOperation", "temp", param);
|
|
msgs = msg.Value + "";
|
|
refreshPages = pageindex.Value + "";
|
|
return Convert.ToInt32(returnValue.Value);
|
|
}
|
|
/// <summary>
|
|
/// <para>说明:生产过程随工单扫码验证</para>
|
|
/// <para>创建人:龚宇超</para>
|
|
/// <para>创建日期:2017-08-12 </para>
|
|
/// <para>修改人:</para>
|
|
/// <para>修改日期:</para>
|
|
/// <para>修改备注:</para>
|
|
/// <para>版本:1.0</para>
|
|
/// </summary>
|
|
/// <param name="menuCode">模块编号.</param>
|
|
/// <param name="scanCode">扫码信息.</param>
|
|
/// <param name="parmaryValue">主键值.</param>
|
|
/// <param name="operatorId">用户Id.</param>
|
|
/// <param name="operatorName">用户名</param>
|
|
/// <param name="flag">确认标记.</param>
|
|
/// <param name="msgs">返回消息</param>
|
|
/// <param name="pageRefrsh">刷新页签</param>
|
|
/// <returns>System.Int32.</returns>
|
|
public static int ScanningCheckCard(string menuCode, string scanCode, string parmaryValue, string operatorId, string operatorName, int flag, out string msgs, out string refreshPages)
|
|
{
|
|
SqlParameter msg = new SqlParameter("@msg", SqlDbType.VarChar, 2000);
|
|
msg.Direction = ParameterDirection.Output;
|
|
SqlParameter pageindex = new SqlParameter("@pageindex", SqlDbType.VarChar, 50);
|
|
pageindex.Direction = ParameterDirection.Output;
|
|
SqlParameter returnValue = new SqlParameter("@return_value", SqlDbType.Int, 4);
|
|
returnValue.Direction = ParameterDirection.ReturnValue;
|
|
SqlParameter[] param =
|
|
{
|
|
new SqlParameter("@modid",SqlDbType.VarChar,10),
|
|
new SqlParameter("@scanCode",SqlDbType.VarChar,50),
|
|
new SqlParameter("@keyvalue",SqlDbType.VarChar,40),
|
|
new SqlParameter("@operatorId",SqlDbType.Int,4),
|
|
new SqlParameter("@operatorName",SqlDbType.VarChar,20),
|
|
new SqlParameter("@comfirmFlag",SqlDbType.VarChar,500),
|
|
pageindex,
|
|
msg,
|
|
returnValue
|
|
};
|
|
param[0].Value = menuCode;
|
|
param[1].Value = scanCode;
|
|
param[2].Value = parmaryValue;
|
|
param[3].Value = operatorId;
|
|
param[4].Value = operatorName;
|
|
param[5].Value = flag;
|
|
SqlHelper.ExecuteDataSet(CommandType.StoredProcedure, "p_mrp_ProcessScanning", "temp", param);
|
|
msgs = msg.Value + "";
|
|
refreshPages = pageindex.Value + "";
|
|
return Convert.ToInt32(returnValue.Value);
|
|
}
|
|
/// <summary>
|
|
/// <para>说明:获取tabpage明细排序Sql</para>
|
|
/// <para>创建人:龚宇超</para>
|
|
/// <para>创建日期:2018-07-26 </para>
|
|
/// <para>修改人:</para>
|
|
/// <para>修改日期:</para>
|
|
/// <para>修改备注:</para>
|
|
/// <para>版本:1.0</para>
|
|
/// </summary>
|
|
/// <param name="menuCode">The menu code.</param>
|
|
public static DataRow GetTabPageOrderCond(string menuCode)
|
|
{
|
|
string sqlCond = string.Format("select MobileOrderStr from p_systemdlltab where DllCoid='{0}'", menuCode);
|
|
DataTable dt = SqlHelper.ExecuteDataTable(sqlCond);
|
|
return dt.Rows.Count > 0 ? dt.Rows[0] : null;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>说明:拖拽列刷新明细</para>
|
|
/// <para>创建人:王一帆</para>
|
|
/// <para>创建日期:2019-12-19 </para>
|
|
/// <para>修改人:</para>
|
|
/// <para>修改日期:</para>
|
|
/// <para>修改备注:</para>
|
|
/// <para>版本:1.0</para>
|
|
/// </summary>
|
|
/// <returns>System.Int32.</returns>
|
|
/// <param name="menuCode">The menu code.</param>
|
|
public static int DragRefresh(string mainModId, string srcColKey, string srcRowKey, string dstModId, string dstColKey, string dstRowKey, out int refreshTypes, out string msgs, string srcRowKeystr, string comfirmFlag)
|
|
{
|
|
SqlParameter msg = new SqlParameter("@msg", SqlDbType.VarChar, 2000);
|
|
msg.Direction = ParameterDirection.Output;
|
|
SqlParameter refreshType = new SqlParameter("@refreshType", SqlDbType.Int, 4);
|
|
refreshType.Direction = ParameterDirection.Output;
|
|
SqlParameter returnValue = new SqlParameter("@return", SqlDbType.Int, 4);
|
|
returnValue.Direction = ParameterDirection.ReturnValue;
|
|
|
|
|
|
|
|
SqlParameter[] param1 =
|
|
{
|
|
new SqlParameter("@mainModId",SqlDbType.VarChar,20),
|
|
new SqlParameter("@srcRowKey",SqlDbType.VarChar,50),
|
|
new SqlParameter("@srcColKey",SqlDbType.VarChar,40),
|
|
new SqlParameter("@dstModId",SqlDbType.VarChar,50),
|
|
new SqlParameter("@dstRowKey",SqlDbType.VarChar,100),
|
|
new SqlParameter("@dstColKey",SqlDbType.VarChar,500),
|
|
new SqlParameter("@operatorid",SqlDbType.Int),
|
|
new SqlParameter("@operatorname",SqlDbType.VarChar,50),
|
|
|
|
refreshType,
|
|
msg,
|
|
returnValue
|
|
};
|
|
|
|
|
|
SqlParameter[] param2 =
|
|
{
|
|
new SqlParameter("@mainModId",SqlDbType.VarChar,20),
|
|
new SqlParameter("@srcRowKey",SqlDbType.VarChar,50),
|
|
new SqlParameter("@srcColKey",SqlDbType.VarChar,40),
|
|
new SqlParameter("@dstModId",SqlDbType.VarChar,50),
|
|
new SqlParameter("@dstRowKey",SqlDbType.VarChar,100),
|
|
new SqlParameter("@dstColKey",SqlDbType.VarChar,500),
|
|
new SqlParameter("@operatorid",SqlDbType.Int),
|
|
new SqlParameter("@operatorname",SqlDbType.VarChar,50),
|
|
|
|
new SqlParameter("@srcRowKeystr",SqlDbType.VarChar,500),
|
|
new SqlParameter("@comfirmFlag",SqlDbType.Int),
|
|
|
|
refreshType,
|
|
msg,
|
|
returnValue
|
|
};
|
|
|
|
SqlParameter[] param = null;
|
|
if (SystemInfo.Instance.ProductionSchedulingVerification)
|
|
param = param2;
|
|
else
|
|
param = param1;
|
|
|
|
param[0].Value = mainModId;
|
|
param[1].Value = srcRowKey;
|
|
param[2].Value = srcColKey;
|
|
param[3].Value = dstModId;
|
|
param[4].Value = dstRowKey;
|
|
param[5].Value = dstColKey;
|
|
param[6].Value = ERPInfo.Instance.UserId;
|
|
param[7].Value = ERPInfo.Instance.UserName;
|
|
if (param.Count() > 11)
|
|
{
|
|
param[8].Value = srcRowKeystr;
|
|
param[9].Value = comfirmFlag;
|
|
}
|
|
|
|
|
|
SqlHelper.ExecuteDataSet(CommandType.StoredProcedure, "p_systemDragMoudle", "temp", param);
|
|
msgs = msg.Value + "";
|
|
refreshTypes = string.IsNullOrWhiteSpace(refreshType.Value + "") ? 0 : Convert.ToInt32(refreshType.Value + "");
|
|
return Convert.ToInt32(returnValue.Value);
|
|
|
|
}
|
|
/// <summary>
|
|
/// <para>说明:添加生产条码</para>
|
|
/// <para>创建人:王一帆</para>
|
|
/// <para>创建日期:2020-01-12 </para>
|
|
/// <para>修改人:</para>
|
|
/// <para>修改日期:</para>
|
|
/// <para>修改备注:</para>
|
|
/// <para>版本:1.0</para>
|
|
/// </summary>
|
|
/// <returns>System.Int32.</returns>
|
|
/// <param name="menuCode">The menu code.</param>
|
|
public static int AddBarCode(string primaryKey, int modid, int storehouseid, string uniqueCode, int mxid, string billtype, string productid, out string msgs)
|
|
{
|
|
SqlParameter msg = new SqlParameter("@msg", SqlDbType.VarChar, 2000);
|
|
msg.Direction = ParameterDirection.Output;
|
|
SqlParameter returnValue = new SqlParameter("@return", SqlDbType.Int, 4);
|
|
returnValue.Direction = ParameterDirection.ReturnValue;
|
|
SqlParameter[] param =
|
|
{
|
|
new SqlParameter("@primaryKey",SqlDbType.VarChar,20),
|
|
new SqlParameter("@modid",SqlDbType.Int),
|
|
new SqlParameter("@storehouseid",SqlDbType.Int),
|
|
new SqlParameter("@uniqueCode",SqlDbType.VarChar,40),
|
|
new SqlParameter("@mxid",SqlDbType.Int),
|
|
new SqlParameter("@billtype",SqlDbType.VarChar,20),
|
|
new SqlParameter("@productid",SqlDbType.VarChar,20),
|
|
new SqlParameter("@operatorid",SqlDbType.Int),
|
|
new SqlParameter("@operatorname",SqlDbType.VarChar,50),
|
|
msg,
|
|
returnValue
|
|
};
|
|
param[0].Value = primaryKey;
|
|
param[1].Value = modid;
|
|
param[2].Value = storehouseid;
|
|
param[3].Value = uniqueCode;
|
|
param[4].Value = mxid;
|
|
param[5].Value = billtype;
|
|
param[6].Value = productid;
|
|
param[7].Value = ERPInfo.Instance.UserId;
|
|
param[8].Value = ERPInfo.Instance.UserName;
|
|
SqlHelper.ExecuteDataSet(CommandType.StoredProcedure, "BillTM_ADDPR", "temp", param);
|
|
msgs = msg.Value + "";
|
|
return Convert.ToInt32(returnValue.Value);
|
|
}
|
|
}
|
|
}
|