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.
68 lines
1.8 KiB
68 lines
1.8 KiB
2 months ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Data;
|
||
|
using System.Linq;
|
||
|
using System.Reflection;
|
||
|
using System.Text;
|
||
|
using MESClassLibrary.BLL.Log;
|
||
|
using MESClassLibrary.DAL;
|
||
|
using MESClassLibrary.DAL.BasicInfo;
|
||
|
using MESClassLibrary.DAL.Injection;
|
||
|
using MESClassLibrary.Enum;
|
||
|
using MESClassLibrary.Model;
|
||
|
|
||
|
namespace MESClassLibrary.BLL.Injection
|
||
|
{
|
||
|
public class WmsBLL
|
||
|
{
|
||
|
private WmsDAL da=new WmsDAL();
|
||
|
private BarCodeDAl barCodeDal = new BarCodeDAl();
|
||
|
|
||
|
public string SaveInterface(string boxNo,string lastBoxNo1,string lastBoxNo2, WmsInterfaceEnum interfaceType)
|
||
|
{
|
||
|
//上一个是否传递成功,没成功重新传 左侧
|
||
|
if (!string.IsNullOrEmpty(lastBoxNo1))
|
||
|
{
|
||
|
bool exsit = da.IsSendPackageCode(lastBoxNo1);
|
||
|
if(exsit == false)
|
||
|
{
|
||
|
SendToInterface(lastBoxNo1);
|
||
|
}
|
||
|
}
|
||
|
//上一个是否传递成功,没成功重新传 右侧侧
|
||
|
if (!string.IsNullOrEmpty(lastBoxNo2))
|
||
|
{
|
||
|
bool exsit = da.IsSendPackageCode(lastBoxNo2);
|
||
|
if (exsit == false)
|
||
|
{
|
||
|
SendToInterface(lastBoxNo2);
|
||
|
}
|
||
|
}
|
||
|
string rst = SendToInterface(boxNo);
|
||
|
if (!string.IsNullOrEmpty(rst))
|
||
|
{
|
||
|
LogErrBLL.AddInfo(rst, MethodBase.GetCurrentMethod());
|
||
|
}
|
||
|
return rst;
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
private string SendToInterface(string boxNo)
|
||
|
{
|
||
|
DataTable barCodeTable = barCodeDal.SearchInfoByBox(boxNo);
|
||
|
|
||
|
|
||
|
string rst = da.SaveInterface(barCodeTable);
|
||
|
return rst;
|
||
|
}
|
||
|
|
||
|
public bool IsSendPackageCode(string pacakgCode)
|
||
|
{
|
||
|
return da.IsSendPackageCode(pacakgCode);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|