Browse Source

调整获取条码的接口

master
lilili 2 years ago
parent
commit
2e0d2643b8
  1. 14
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs

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

@ -1316,6 +1316,8 @@ namespace ICSSoft.DataProject
string Losql = ""; string Losql = "";
string sqlNew = ""; string sqlNew = "";
string LotType = ""; string LotType = "";
string LotDetail = "";
string con = "";
#region SLQ #region SLQ
if (TransType == TransTypeEnum.LocationSeatch.GetDescription()) if (TransType == TransTypeEnum.LocationSeatch.GetDescription())
{ {
@ -1440,7 +1442,7 @@ namespace ICSSoft.DataProject
inv.LotEnable, inv.LotEnable,
{0} {0}
inv.AmountUnit, inv.AmountUnit,
inv.EATTRIBUTE1 AS Area,
{5}
ext.ID AS ExtensionID, ext.ID AS ExtensionID,
ext.ProjectCode, ext.ProjectCode,
ext.Version, ext.Version,
@ -1461,6 +1463,7 @@ namespace ICSSoft.DataProject
LEFT JOIN ICSContainerLot conlot ON a.LotNo=conlot.LotNo AND a.WorkPoint=conlot.WorkPoint LEFT JOIN ICSContainerLot conlot ON a.LotNo=conlot.LotNo AND a.WorkPoint=conlot.WorkPoint
LEFT JOIN ICSContainer con ON conlot.ContainerID=con.ID AND conlot.WorkPoint=con.WorkPoint LEFT JOIN ICSContainer con ON conlot.ContainerID=con.ID AND conlot.WorkPoint=con.WorkPoint
INNER JOIN ICSInventory inv ON a.InvCode=inv.InvCode AND a.WorkPoint=inv.WorkPoint INNER JOIN ICSInventory inv ON a.InvCode=inv.InvCode AND a.WorkPoint=inv.WorkPoint
{4}
WHERE a.LotNo='{2}' AND a.WorkPoint='{3}' "; WHERE a.LotNo='{2}' AND a.WorkPoint='{3}' ";
} }
else else
@ -2048,6 +2051,8 @@ namespace ICSSoft.DataProject
INNER JOIN ICSWarehouse wh ON a.WarehouseCode=wh.WarehouseCode AND a.WorkPoint=wh.WorkPoint INNER JOIN ICSWarehouse wh ON a.WarehouseCode=wh.WarehouseCode AND a.WorkPoint=wh.WorkPoint
INNER JOIN ICSLocation loc ON a.LocationCode=loc.LocationCode AND a.WorkPoint=loc.WorkPoint INNER JOIN ICSLocation loc ON a.LocationCode=loc.LocationCode AND a.WorkPoint=loc.WorkPoint
LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.WarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint"; LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.WarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint";
LotDetail = $@"LEFT JOIN ICSInventoryDetail detail ON inv.InvCode= detail.INVCode AND a.WarehouseCode = detail.WHCode AND a.WorkPoint = detail.WorkPoint ";
con = "detail.LocationCode AS Area,";
} }
else else
{ {
@ -2287,6 +2292,9 @@ namespace ICSSoft.DataProject
INNER JOIN ICSExtension ext ON a.ExtensionID=ext.ID AND a.WorkPoint=ext.WorkPoint INNER JOIN ICSExtension ext ON a.ExtensionID=ext.ID AND a.WorkPoint=ext.WorkPoint
LEFT JOIN ICSInventoryLotDetail lotdd ON lotdd.LotNo=a.LotNo AND a.WorkPoint=lotdd.WorkPoint LEFT JOIN ICSInventoryLotDetail lotdd ON lotdd.LotNo=a.LotNo AND a.WorkPoint=lotdd.WorkPoint
LEFT JOIN ICSInspection ins ON a.LotNo=ins.LotNo AND a.WorkPoint=ins.WorkPoint"; LEFT JOIN ICSInspection ins ON a.LotNo=ins.LotNo AND a.WorkPoint=ins.WorkPoint";
LotDetail = $@" LEFT JOIN ICSInventoryDetail detail ON inv.InvCode= detail.INVCode AND detail.WHCode ={columnsWHCODE.Replace("AS WHCode"," ")}
AND a.WorkPoint= detail.WorkPoint ";
con = " detail.LocationCode AS Area, ";
columns = string.Format(columns, columnsWHCODE, columnsWHNAME); columns = string.Format(columns, columnsWHCODE, columnsWHNAME);
@ -2350,13 +2358,13 @@ namespace ICSSoft.DataProject
if (TransType == TransTypeEnum.LocationSeatch.GetDescription()) if (TransType == TransTypeEnum.LocationSeatch.GetDescription())
{ {
Losql = string.Format(Losql, columns, tableName, JsonData.Code, JsonData.WorkPoint);
Losql = string.Format(Losql, columns, tableName, JsonData.Code, JsonData.WorkPoint,LotDetail,con);
table = DBHelper.SQlReturnData(Losql, cmd); table = DBHelper.SQlReturnData(Losql, cmd);
} }
else else
{ {
sql = string.Format(sql, columns, tableName, JsonData.Code, JsonData.WorkPoint);
sql = string.Format(sql, columns, tableName, JsonData.Code, JsonData.WorkPoint,LotDetail,con);
log.Info("条码sql:" + sql); log.Info("条码sql:" + sql);
table = DBHelper.SQlReturnData(sql, cmd); table = DBHelper.SQlReturnData(sql, cmd);
} }

Loading…
Cancel
Save