Browse Source

调整接口

master
lilili 2 years ago
parent
commit
f6967e80f5
  1. 21
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs
  2. 51
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs

21
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs

@ -5996,6 +5996,7 @@ namespace ICSSoft.DataProject
public static DataTable LOTSplitCreate(List<LOTCreateIModel> JsonData)
{
var language = LanguageHelper.GetName("WMSAPIInfo");
DataTable printTable = new DataTable();
if (JsonData.Count <= 0)
{
throw new Exception(language.GetNameByCode("WMSAPIInfo007"));//"传送数据为空!"
@ -6033,13 +6034,25 @@ namespace ICSSoft.DataProject
}
//拆分后日志
ICSWareHouseLotInfoService.WareHouseLotInfoLog(Identification, item.LotNo, item.User, item.WorkPoint, "4",
printTable = ICSWareHouseLotInfoService.WareHouseLotInfoLog(Identification, item.LotNo, item.User, item.WorkPoint, "4",
TransTypeEnum.LOTSplitAfter.GetDescription<DBValue>(), cmd, language);
}
DataTable table = GetData(Identification, 1, cmd);
cmd.Transaction.Commit();
return table;
//DataTable table = GetData(Identification, 1, cmd);
//cmd.Transaction.Commit();
//return table;
if (!printTable.Equals("{}"))
{
cmd.Transaction.Commit();
return printTable;
}
else
{
DataTable table = GetData(Identification, 1, cmd);
cmd.Transaction.Commit();
return table;
}
}
catch (Exception ex)
{

51
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs

@ -1573,15 +1573,16 @@ namespace ICSSoft.DataProject
}
if (PrintEnable.Equals("True"))
{
sql = @"select A.LotNO AS OLDLotNo , C.Quantity AS OLDLotQty, A.eattribute1 as LotNO, B.Quantity AS LotQty ,b.InvCode,d.INVSTD,d.INVNAME,b.MTIME,A.TransCode
sql = @"select A.LotNO , C.Quantity AS OLDLotQty, B.Quantity AS LotQty ,b.InvCode,d.INVSTD,d.INVNAME,b.MTIME,A.TransCode
from ICSWareHouseLotInfolog A
left join ICSInventoryLot B on A.LotNO=B.LotNO and a.WorkPoint=b.WorkPoint
left join ICSWareHouseLotInfo C ON A.LotNO=C.LotNO and a.WorkPoint=c.WorkPoint
left join ICSInventory D on b.INVCODE=d.INVCODE and b.WorkPoint=d.WorkPoint
where a.BusinessCode ='105'
and A.lotno like'{0}%' and a.workpoint='{1}'
where (a.BusinessCode ='{2}' or a.BusinessCode='32')
and A.lotno like '{0}%' and a.workpoint='{1}'
and a.TransCode='{3}' and a.TransSequence='{4}'
";
sql = string.Format(sql, LotNo, tranferWorkpoint);
sql = string.Format(sql, LotNo, WorkPoint, BusinessCode, TransCode, TransSequence);
dtLotno = DBHelper.SQlReturnData(sql, cmd);
lstDt = dtLotno;
}
@ -1786,12 +1787,34 @@ namespace ICSSoft.DataProject
/// <param name="TransType"></param>
/// <param name="BusinessCode"></param>
/// <param name="cmd"></param>
public static void WareHouseLotInfoLog(string Identification, string LotNo, string User, string WorkPoint, string TransType, string BusinessCode, SqlCommand cmd, Dictionary<string, string> language)
public static DataTable WareHouseLotInfoLog(string Identification, string LotNo, string User, string WorkPoint, string TransType, string BusinessCode, SqlCommand cmd, Dictionary<string, string> language)
{
String LotEnable = "";
String PrintEnable = "";
DataTable dtLotno = new DataTable();
DataTable lstDt = new DataTable();
try
{
//检验是否分批
string sql = @"SELECT b.LotEnable,b.PrintEnable FROM ICSInventoryLot a
LEFT JOIN ICSInventory b ON a.InvCode=b.InvCode AND a.WorkPoint=b.WorkPoint
where a.LotNo='{0}' and a.WorkPoint='{1}'
";
sql = string.Format(sql, LotNo, WorkPoint);
DataTable dt = DBHelper.SQlReturnData(sql, cmd);
if (dt.Rows.Count == 0)
{
throw new Exception(language.GetNameByCode("WMSAPIInfo369"));
}
else
{
LotEnable = dt.Rows[0]["LotEnable"].ToString();
PrintEnable = dt.Rows[0]["PrintEnable"].ToString();
}
///添加日志
string sql = @"IF NOT EXISTS(SELECT F_Account FROM Sys_SRM_User WHERE F_Account='{2}' AND F_Location='{1}')
sql = @"IF NOT EXISTS(SELECT F_Account FROM Sys_SRM_User WHERE F_Account='{2}' AND F_Location='{1}')
BEGIN
RAISERROR('" + string.Format(language.GetNameByCode("WMSAPIInfo060"), "{2}") + @"',16,1);
RETURN
@ -1819,11 +1842,27 @@ namespace ICSSoft.DataProject
{
throw new Exception(language.GetNameByCode("WMSAPIInfo166"));
}
if (PrintEnable.Equals("True"))
{
sql = @"select A.LotNO , C.Quantity AS OLDLotQty, B.Quantity AS LotQty ,b.InvCode,d.INVSTD,d.INVNAME,b.MTIME,A.TransCode
from ICSWareHouseLotInfolog A
left join ICSInventoryLot B on A.LotNO=B.LotNO and a.WorkPoint=b.WorkPoint
left join ICSWareHouseLotInfo C ON A.LotNO=C.LotNO and a.WorkPoint=c.WorkPoint
left join ICSInventory D on b.INVCODE=d.INVCODE and b.WorkPoint=d.WorkPoint
where a.BusinessCode='32'
and A.lotno like '{0}%' and a.workpoint='{1}'
";
sql = string.Format(sql, LotNo, WorkPoint, BusinessCode);
dtLotno = DBHelper.SQlReturnData(sql, cmd);
lstDt = dtLotno;
}
}
catch (Exception)
{
throw;
}
return lstDt;
}
/// <summary>

Loading…
Cancel
Save