姜鹏 2 weeks ago
parent
commit
64460ec471
  1. 8
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs
  2. 8
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs
  3. 4
      ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Web.config

8
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs

@ -2086,7 +2086,7 @@ IF EXISTS(SELECT b.id FROM ICSPurchaseReceive b where rcvcode in
{
#region ERP
string sql = "";
sql = @"SELECT a.VenCode+a.DepCode+a.MUSER AS Costre,a.VenCode,a.DepCode,y.POCode,a.MUSER,a.MTIME,
sql = @"SELECT a.VenCode+a.DepCode+a.MUSER AS Costre,a.VenCode,a.DepCode,y.POID AS POCode,a.MUSER,a.MTIME,
a.Sequence,a.InvCode,a.Quantity,CASE invBat.AmountEnable WHEN '1' THEN a.Amount ELSE '0' END AS Amount,ISNULL(a.UnitPrice,0) AS UnitPrice,a.Currency,a.PODetailID
,a.WorkPoint,ISNULL(ext.ProjectCode, '') AS ProjectCode,CASE WHEN ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END AS BatchCode,ISNULL(ext.Version, '') AS Version,ISNULL(ext.Brand, '') AS Brand,
ISNULL(ext.cFree1, '') AS cFree1,ISNULL(ext.cFree2, '') AS cFree2,ISNULL(ext.cFree3, '') AS cFree3,ISNULL(ext.cFree4, '') AS cFree4,ISNULL(ext.cFree5, '') AS cFree5,ISNULL(ext.cFree6, '') AS cFree6,ISNULL(ext.cFree7, '') AS cFree7,ISNULL(ext.cFree8, '') AS cFree8,ISNULL(ext.cFree9, '') AS cFree9,ISNULL(ext.cFree10, '') AS cFree10
@ -2126,14 +2126,14 @@ IF EXISTS(SELECT b.id FROM ICSPurchaseReceive b where rcvcode in
foreach (var item in res)
{
JObject jo = (JObject)item;
JArray resdetail = (JArray)JsonConvert.DeserializeObject(jo["details"].ToString());
JArray resdetail = (JArray)JsonConvert.DeserializeObject(jo["ArrivalVouchSRet"].ToString());
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
string ERPupdate = @"update ICSDeliveryNotice set DNCode='{0}',Sequence='{1}',DNID='{2}',DNDetailID='{3}'
where PODetailID='{4}' AND DNType='1' AND DNCode='{5}' and Sequence='{1}'";
ERPupdate = string.Format(ERPupdate, jo["DNCode"], det["Sequence"], jo["ID"], det["DetailID"], det["PODetailID"], DNCode);
where PODetailID='{4}' AND DNType='1' AND DNCode='{5}' and Sequence='{6}'";
ERPupdate = string.Format(ERPupdate, jo["DNCode"], det["Sequence"], jo["ID"], det["DetailID"], det["PODetailID"], DNCode, det["Sequence"].ToString().Substring(0, det["Sequence"].ToString().Length - 1));
if (!DBHelper.ExecuteNonQuery(ERPupdate, cmd))
{

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

@ -33034,11 +33034,11 @@ END as NEWLotNo
throw new Exception(language.GetNameByCode("WMSAPIInfo010")); //"送货单子表信息更新失败!");
}
sql = @"UPDATE ICSInventoryLot SET Quantity='{2}'
sql = @"UPDATE ICSInventoryLot SET Quantity='{2}',EATTRIBUTE15='{3}'
WHERE LotNo='{0}' AND WorkPoint='{1}'";
if (itemInfo.IsUrgency == "1")
sql = @"UPDATE ICSInventoryLot SET Quantity='{2}' ,eattribute6 = '1' WHERE LotNo='{0}' AND WorkPoint='{1}'";
sql = string.Format(sql, itemInfo.LotNo, item.WorkPoint, itemInfo.Quantity);
sql = string.Format(sql, itemInfo.LotNo, item.WorkPoint, itemInfo.Quantity, itemInfo.locationCode);
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
@ -33091,7 +33091,7 @@ END as NEWLotNo
LEFT JOIN ICSInventory inv ON b.InvCode=inv.InvCode AND b.WorkPoint=inv.WorkPoint
LEFT JOIN ICSInventoryBatchEnable invBat ON b.InvCode=invBat.InvCode AND '{5}'=invBat.WHCode AND b.WorkPoint=invBat.WorkPoint
INNER JOIN ICSExtension extt ON ISNULL(ext.ProjectCode, '')+'~'+CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END+'~'+ISNULL(ext.Version, '')+'~'+ISNULL(ext.Brand, '')+'~'+
ISNULL(ext.cFree1, '')+'~'+ISNULL(ext.cFree2, '')+'~'+ISNULL(ext.cFree3, '')+'~'+ISNULL(ext.cFree4, '')+'~'+ISNULL(ext.cFree5, '')+'~'+ISNULL(ext.cFree6, '')+'~'+ISNULL(ext.cFree7, '')+'~'+ISNULL(ext.cFree8, '')+'~'+ISNULL(ext.cFree9, '')+'~'+ISNULL(ext.cFree10, '')=extt.Colspan
ISNULL(ext.cFree1, '')+'~'+ISNULL(ext.cFree2, '')+'~'+ISNULL(ext.cFree3, '')+'~'+ISNULL(ext.cFree4, '')+'~'+ISNULL(ext.cFree5, '')+'~'+ISNULL(ext.cFree6, '')+'~'+ISNULL(ext.cFree7, '')+'~'+ISNULL(ext.cFree8, '')+'~'+ISNULL(ext.cFree9, '')+'~'+ISNULL(ext.cFree10, '')=extt.Colspan AND extt.WorkPoint=ext.WorkPoint
WHERE a.ASNCode='{3}' AND a.WorkPoint='{2}' and a.DNQuantity>0 AND ext.id is NULL
INSERT INTO ICSDeliveryNotice(ID,DNCode,Sequence,VenCode,DepCode,
@ -33111,7 +33111,7 @@ END as NEWLotNo
LEFT JOIN ICSInventory inv ON b.InvCode=inv.InvCode AND b.WorkPoint=inv.WorkPoint
LEFT JOIN ICSInventoryBatchEnable invBat ON b.InvCode=invBat.InvCode AND '{5}'=invBat.WHCode AND b.WorkPoint=invBat.WorkPoint
INNER JOIN ICSExtension extt ON ISNULL(ext.ProjectCode, '')+'~'+CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END+'~'+ISNULL(ext.Version, '')+'~'+ISNULL(ext.Brand, '')+'~'+
ISNULL(ext.cFree1, '')+'~'+ISNULL(ext.cFree2, '')+'~'+ISNULL(ext.cFree3, '')+'~'+ISNULL(ext.cFree4, '')+'~'+ISNULL(ext.cFree5, '')+'~'+ISNULL(ext.cFree6, '')+'~'+ISNULL(ext.cFree7, '')+'~'+ISNULL(ext.cFree8, '')+'~'+ISNULL(ext.cFree9, '')+'~'+ISNULL(ext.cFree10, '')=extt.Colspan
ISNULL(ext.cFree1, '')+'~'+ISNULL(ext.cFree2, '')+'~'+ISNULL(ext.cFree3, '')+'~'+ISNULL(ext.cFree4, '')+'~'+ISNULL(ext.cFree5, '')+'~'+ISNULL(ext.cFree6, '')+'~'+ISNULL(ext.cFree7, '')+'~'+ISNULL(ext.cFree8, '')+'~'+ISNULL(ext.cFree9, '')+'~'+ISNULL(ext.cFree10, '')=extt.Colspan AND extt.WorkPoint=ext.WorkPoint
INNER JOIN ICSPurchaseOrder d ON c.TransCode=d.POCode AND c.TransSequence=d.Sequence AND c.WorkPoint=d.WorkPoint
INNER JOIN Sys_SRM_User e ON e.F_Account='{1}' AND e.F_Location='{2}'

4
ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Web.config

@ -12,8 +12,8 @@
<!--德易仕-->
<add key="ConnStr" value="Data Source=192.168.10.41;Database=ICSWMS_DYSCS;Uid=sa;Password=aA123456;" />
<add key="FilePath" value="D:\\mesPics\\" />
<add key="ERPUrl" value="http://192.168.1.88:3004/api/" />
<!--<add key="ERPUrl" value="http://192.168.1.155/U9WMS/api/" />-->
<!--<add key="ERPUrl" value="http://192.168.1.88:3004/api/" />-->
<add key="ERPUrl" value="http://192.168.10.41:8085/api/" />
<add key="PrintUrl" value="打印模板.txt"/>
<add key="PrintDataUrl" value="蓝牙打印数据源.txt"/>
<add key="UploadERP" value="true"/>

Loading…
Cancel
Save