Browse Source

销售发货

master
CatMaoo 1 year ago
parent
commit
68640d10ba
  1. 10
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSalesService.cs
  2. 22
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs
  3. 20
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs
  4. 2
      ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Web.config

10
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSalesService.cs

@ -34,6 +34,16 @@ namespace ICSSoft.DataProject
{
try
{
string chekksql = @"select c.EATTRIBUTE1 FROM ICSSDN a
INNER JOIN ICSInventory c on a.InvCode=c.InvCode and a.WorkPoint=c.WorkPoint
WHERE a.Sequence='{2}' AND a.SDNCode='{0}' AND a.WorkPoint='{1}' and c.AmountEnable='1'";
chekksql = string.Format(chekksql, TransCode, WorkPoint, TransSequence);
DataTable dta = DBHelper.SQlReturnData(chekksql, cmd);
if (dta.Rows.Count > 0)
{
Quantity = (decimal.Parse(Quantity) * decimal.Parse(dta.Rows[0]["EATTRIBUTE1"].ToString())).ToString();
}
string sql = @"DECLARE @Status VARCHAR(10)
SELECT @Status=a.Status FROM ICSSDN a
WHERE a.SDNCode='{0}' AND a.Sequence='{3}' AND a.WorkPoint='{1}' AND a.Type='1'

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

@ -4893,6 +4893,16 @@ a.ExtensionID
foreach (var itemInfo in item.detail)
{
//出库
string chekksql = @"select c.EATTRIBUTE1 FROM ICSMOPick a
INNER JOIN ICSMO b ON a.MODetailID=b.MODetailID AND a.WorkPoint=b.WorkPoint
INNER JOIN ICSInventory c on a.InvCode=c.InvCode and a.WorkPoint=c.WorkPoint
WHERE b.MOCode='{0}' AND b.Sequence+'~'+a.Sequence='{3}' AND a.WorkPoint='{1}' and c.AmountEnable='1'";
chekksql = string.Format(chekksql, item.TransCode, item.WorkPoint, itemInfo.CurrentQuantity, item.TransSequence);
DataTable dta = DBHelper.SQlReturnData(chekksql, cmd);
if (dta.Rows.Count > 0)
{
itemInfo.CurrentQuantity = (decimal.Parse(itemInfo.CurrentQuantity) * decimal.Parse(dta.Rows[0]["EATTRIBUTE1"].ToString())).ToString();
}
printTable = ICSWareHouseLotInfoService.AMWareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity,
item.User, item.WorkPoint, "3", TransTypeEnum.MOIssueDoc.GetDescription<DBValue>(), cmd, language, itemInfo.LogID, MergeID);
}
@ -4908,7 +4918,17 @@ a.ExtensionID
foreach (var itemInfo in item.detail)
{
//出库
printTable = ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity,
//出库
string chekksql = @"select c.EATTRIBUTE1 FROM ICSSDN a
INNER JOIN ICSInventory c on a.InvCode=c.InvCode and a.WorkPoint=c.WorkPoint
WHERE a.SDNCode='{0}' AND a.Sequence='{2}' AND a.WorkPoint='{1}' and c.AmountEnable='1'";
chekksql = string.Format(chekksql, item.TransCode, item.WorkPoint, item.TransSequence);
DataTable dta = DBHelper.SQlReturnData(chekksql, cmd);
if (dta.Rows.Count > 0)
{
itemInfo.CurrentQuantity = (decimal.Parse(itemInfo.CurrentQuantity) * decimal.Parse(dta.Rows[0]["EATTRIBUTE1"].ToString())).ToString();
}
printTable = ICSWareHouseLotInfoService.AMWareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity,
item.User, item.WorkPoint, "3", TransTypeEnum.SalesShipmentDoc.GetDescription<DBValue>(), cmd, language, itemInfo.LogID, MergeID);
}
}

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

@ -1871,16 +1871,16 @@ namespace ICSSoft.DataProject
//DataTable dtaa = DBHelper.SQlReturnData(sqql, cmd);
//amount = dtaa.Rows[0]["Amount"].ToString();
string chekksql = @"select c.EATTRIBUTE1 FROM ICSMOPick a
INNER JOIN ICSMO b ON a.MODetailID=b.MODetailID AND a.WorkPoint=b.WorkPoint
INNER JOIN ICSInventory c on a.InvCode=c.InvCode and a.WorkPoint=c.WorkPoint
WHERE b.MOCode='{0}' AND b.Sequence+'~'+a.Sequence='{3}' AND a.WorkPoint='{1}' and c.AmountEnable='1'";
chekksql = string.Format(chekksql, TransCode, WorkPoint, Quantity, TransSequence);
DataTable dta = DBHelper.SQlReturnData(chekksql, cmd);
if (dta.Rows.Count > 0)
{
Quantity = (decimal.Parse(Quantity) * decimal.Parse(dta.Rows[0]["EATTRIBUTE1"].ToString())).ToString();
}
//string chekksql = @"select c.EATTRIBUTE1 FROM ICSMOPick a
// INNER JOIN ICSMO b ON a.MODetailID=b.MODetailID AND a.WorkPoint=b.WorkPoint
// INNER JOIN ICSInventory c on a.InvCode=c.InvCode and a.WorkPoint=c.WorkPoint
// WHERE b.MOCode='{0}' AND b.Sequence+'~'+a.Sequence='{3}' AND a.WorkPoint='{1}' and c.AmountEnable='1'";
//chekksql = string.Format(chekksql, TransCode, WorkPoint, Quantity, TransSequence);
//DataTable dta = DBHelper.SQlReturnData(chekksql, cmd);
//if (dta.Rows.Count > 0)
//{
// Quantity = (decimal.Parse(Quantity) * decimal.Parse(dta.Rows[0]["EATTRIBUTE1"].ToString())).ToString();
//}

2
ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Web.config

@ -7,7 +7,7 @@
<appSettings>
<add key="ERPDB" value="UFDATA_999_2019"/>
<!--88-->
<add key="ConnStr" value="Data Source=192.168.1.88;Database=ICSWMS_Base;Uid=sa;Password=aA123456;"/>
<add key="ConnStr" value="Data Source=172.16.200.100;Database=ICSWMS_ADC;Uid=sa;Password=aomei.u8;"/>
<!--双金-->
<!--<add key="ConnStr" value="Data Source=117.80.147.228;Database=ICSWMS_Base_SJ;Uid=sa;Password=p@ssw0rd;"/>-->
<!--<add key="ERPUrl" value="http://180.101.177.196:82/api/"/>-->

Loading…
Cancel
Save