Browse Source

两步调入

master
lixh 3 years ago
parent
commit
a101152fdc
  1. 6
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs
  2. 4
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs
  3. 4
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseService.cs

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

@ -738,13 +738,13 @@ namespace ICSSoft.DataProject
INNER JOIN ICSOtherOut out ON out.TransferDetailID=tra.TransferDetailID AND out.WorkPoint=tra.WorkPoint INNER JOIN ICSOtherOut out ON out.TransferDetailID=tra.TransferDetailID AND out.WorkPoint=tra.WorkPoint
INNER JOIN ICSWareHouseLotInfoLog log ON out.OutCode=log.TransCode AND out.Sequence=log.TransSequence AND out.WorkPoint=log.WorkPoint INNER JOIN ICSWareHouseLotInfoLog log ON out.OutCode=log.TransCode AND out.Sequence=log.TransSequence AND out.WorkPoint=log.WorkPoint
INNER JOIN ICSWareHouseLotInfo a ON a.LotNo=log.LotNo AND a.WorkPoint=log.WorkPoint INNER JOIN ICSWareHouseLotInfo a ON a.LotNo=log.LotNo AND a.WorkPoint=log.WorkPoint
WHERE a.LotNo='{2}' AND a.WorkPoint='{3}')
WHERE a.LotNo='{2}' AND a.WorkPoint='{3}' AND Otin.InCode = '" + JsonData.TransCode + @"')
BEGIN BEGIN
RAISERROR('" + language.GetNameByCode("WMSAPIInfo036") + @"',16,1); RAISERROR('" + language.GetNameByCode("WMSAPIInfo036") + @"',16,1);
RETURN RETURN
END END
" + sql + "AND Otin.InCode = '" + JsonData.TransCode + "'"
+ @"GROUP BY a.ID,con.ContainerCode,con.ContainerName,a.LotNo,a.InvCode,inv.InvName,inv.InvStd,inv.InvUnit,a.WarehouseCode,
" + sql + "AND Otin.InCode = '" + JsonData.TransCode + @"'
GROUP BY a.ID,con.ContainerCode,con.ContainerName,a.LotNo,a.InvCode,inv.InvName,inv.InvStd,inv.InvUnit,a.WarehouseCode,
wh.WarehouseName,a.LocationCode,loc.LocationName,CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END,inv.AmountUnit, wh.WarehouseName,a.LocationCode,loc.LocationName,CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END,inv.AmountUnit,
ext.ID,ext.ProjectCode,ext.Version,ext.Brand,ext.cFree1,ext.cFree2,ext.cFree3,ext.cFree4,ext.cFree5,ext.cFree6,ext.cFree7,ext.cFree8,ext.cFree9,ext.cFree10,a.MUSER,a.MTIME"; ext.ID,ext.ProjectCode,ext.Version,ext.Brand,ext.cFree1,ext.cFree2,ext.cFree3,ext.cFree4,ext.cFree5,ext.cFree6,ext.cFree7,ext.cFree8,ext.cFree9,ext.cFree10,a.MUSER,a.MTIME";

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

@ -444,9 +444,9 @@ namespace ICSSoft.DataProject
throw new Exception("" + language.GetNameByCode("WMSAPIInfo166") + @""); throw new Exception("" + language.GetNameByCode("WMSAPIInfo166") + @"");
} }
///添加库存 ///添加库存
sql = @"IF EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND Quantity>0)
sql = @"IF NOT EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}')
BEGIN BEGIN
RAISERROR('" + language.GetNameByCode("WMSAPIInfo164") + @"',16,1);
RAISERROR('" + language.GetNameByCode("WMSAPIInfo171") + @"',16,1);
RETURN RETURN
END END

4
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseService.cs

@ -265,7 +265,7 @@ namespace ICSSoft.DataProject
RAISERROR('" + language.GetNameByCode("WMSAPIInfo137") + @"',16,1); RAISERROR('" + language.GetNameByCode("WMSAPIInfo137") + @"',16,1);
RETURN RETURN
END END
UPDATE Otin SET InQuantity=ISNULL(InQuantity,0)+'{2}'
UPDATE Otin SET InQuantity=ISNULL(InQuantity,0)+'{4}'
FROM ICSOtherIn Otin FROM ICSOtherIn Otin
INNER JOIN ICSTransfer tra ON Otin.TransferDetailID=tra.TransferDetailID AND Otin.WorkPoint=tra.WorkPoint INNER JOIN ICSTransfer tra ON Otin.TransferDetailID=tra.TransferDetailID AND Otin.WorkPoint=tra.WorkPoint
INNER JOIN ICSOtherOut out ON out.TransferDetailID=tra.TransferDetailID AND out.WorkPoint=tra.WorkPoint INNER JOIN ICSOtherOut out ON out.TransferDetailID=tra.TransferDetailID AND out.WorkPoint=tra.WorkPoint
@ -281,7 +281,7 @@ namespace ICSSoft.DataProject
BEGIN BEGIN
RAISERROR('" + language.GetNameByCode("WMSAPIInfo149") + @"',16,1); RAISERROR('" + language.GetNameByCode("WMSAPIInfo149") + @"',16,1);
END"; END";
sql = string.Format(sql, LotNo, WorkPoint, Quantity,TransCode,TransSequence);
sql = string.Format(sql, LotNo, WorkPoint,TransCode,TransSequence, Quantity);
if (!DBHelper.ExecuteNonQuery(sql, cmd)) if (!DBHelper.ExecuteNonQuery(sql, cmd))
{ {
throw new Exception(language.GetNameByCode("WMSAPIInfo150"));//"两步调入单更新失败!"); throw new Exception(language.GetNameByCode("WMSAPIInfo150"));//"两步调入单更新失败!");

Loading…
Cancel
Save