天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.1 KiB

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
{
/// <summary>
/// 校验料架零件号
/// </summary>
/// <param name="userAuth"></param>
/// <param name="input"></param>
/// <returns></returns>
public NSC.NetServiceStruct ServiceFunction(Common.Data.UserAuthority userAuth, NSC.NetServiceStruct input)
{
try
{
ProductBLL bll = new ProductBLL();
DataResult<Package> result = new DataResult<Package>();
//接收手持或车载前端传递的参数,
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<string, NSC.ParameterStruct>();
input.Returns.Add("ResultModel", new NSC.ParameterStruct(result));//基本信息
return input;
}
catch (Exception ex)
{
throw ex;
}
}
}
}