using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMAPP.FJC.BLL.Operation;
using QMAPP.FJC.Entity.Operation;
using QMAPP.Entity;
namespace HTIS.BLL
{
public class CheckCaseCodeBll : NSC.IService
{
///
/// 校验料架零件号
///
///
///
///
public NSC.NetServiceStruct ServiceFunction(Common.Data.UserAuthority userAuth, NSC.NetServiceStruct input)
{
try
{
ProductBLL bll = new ProductBLL();
DataResult result = new DataResult();
//接收手持或车载前端传递的参数,
string userID = input.Params["userID"].GetString();
//零件号计划表名T_AW_PRODUCT
string packageCode = input.Params["packageCode"].GetString();
Package recorders = new Package();
if (!string.IsNullOrEmpty(packageCode))
{
recorders.PACKAGECODE = packageCode;
}
//将用户注册到BaseBLL类中,该动作是必须动作
bll.RegistLoginUser(userID);
result = bll.GetPackageModle(recorders);
if (result.Result != null)
{
DateTime dtone = result.Result.CREATEDATE;
DateTime dttwo = DateTime.Now;
TimeSpan ts = dttwo - dtone;
int minute = Convert.ToInt32(ts.TotalMinutes);
if (minute < 30)
{
result.Msg = "重复扫描箱号的间隔不能小于30分钟!";
}
}
input.Returns = new Dictionary();
input.Returns.Add("ResultModel", new NSC.ParameterStruct(result));//基本信息
return input;
}
catch (Exception ex)
{
throw ex;
}
}
}
}