|
|
@ -124,12 +124,14 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'"; |
|
|
|
case when sum(a.Quantity) =sum(IssueQuantity) and a.MUSERName != 'JOB' then '已过账' |
|
|
|
else (case when sum(a.Quantity) =sum(IssueQuantity) and a.MUSERName = 'JOB' then '已配料' else '未配料' end) end as Status, |
|
|
|
f.ProjectCode ,f.BatchCode ,f.Version ,f.Brand ,f.cFree1 ,f.cFree2 ,f.cFree3 , |
|
|
|
f.cFree4 ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.ID |
|
|
|
f.cFree4 ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.ID, |
|
|
|
case when a.MUSER!= 'JOB' then a.MUSER else '' end AS PickName |
|
|
|
from ICSMOApply a |
|
|
|
left JOIN ICSInventory b ON b.InvCode=a.InvCode |
|
|
|
LEFT JOIN ICSInventoryDetail detail ON b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint |
|
|
|
left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint |
|
|
|
left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint |
|
|
|
|
|
|
|
where a.WorkPoint='{WorkPoint}' and a.EATTRIBUTE!='17'");
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(queryJson)) |
|
|
@ -189,13 +191,13 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'"; |
|
|
|
sqlString.Append(@" group by a.ApplyCode, a.WorkPoint,a.IssueQuantity,a.CreateDateTime,a.createperson,
|
|
|
|
f.Colspan,f.ProjectCode,f.BatchCode,f.Version,f.Brand,f.cFree1,f.cFree2, |
|
|
|
f.cFree3,f.cFree4,f.cFree5,f.cFree6,f.cFree7,f.cFree8,f.cFree9,f.cFree10,a.WHCode,detail.LocationCode,a.ID,a.EATTRIBUTE,a.Sets,a.OrderInvCode,a.OrderInvDescribe,a.BillType,a.Remarks,a.Desks,a.DispatchNumber,a.DispatcherName, |
|
|
|
a.ReceiverNumber,a.ReceiverName,a.Urgency,a.NeedDate,a.NeedTime,a.RemarksTerm,a.TextNumber,a.InvDescribe,a.Unit,a.StockIndicator,a.MUSERName) as t where t.row=1");
|
|
|
|
a.ReceiverNumber,a.ReceiverName,a.Urgency,a.NeedDate,a.NeedTime,a.RemarksTerm,a.TextNumber,a.InvDescribe,a.Unit,a.StockIndicator,a.MUSERName,a.MUSER ) as t where t.row=1");
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(queryParam["Status"].ToString())) |
|
|
|
{ |
|
|
|
if (queryParam["Status"].ToString() == "3") |
|
|
|
{ |
|
|
|
sqlString.Append($@" AND t.Status='已过帐' "); |
|
|
|
sqlString.Append($@" AND t.Status='已过账' "); |
|
|
|
} |
|
|
|
else if (queryParam["Status"].ToString() == "2") |
|
|
|
{ |
|
|
@ -1887,17 +1889,22 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'"; |
|
|
|
picksql = string.Format(picksql, MUSER, WorkPoint); |
|
|
|
SqlHelper.ExecuteNonQuery(picksql); |
|
|
|
picksql = ""; |
|
|
|
if (table.Rows.Count>0) |
|
|
|
{ |
|
|
|
foreach (DataRow pickdr in table.Rows) |
|
|
|
{ |
|
|
|
picksql += @" INSERT INTO ICSPickPrintTemp
|
|
|
|
(ID,DocNO,INVCode,iQuantity,WHCode,BinCode,LotNO,QTYTotal,SendQTY,MUSER,MUSERNAME,WorkPoint) |
|
|
|
VALUES |
|
|
|
(NEWID(),'{0}','{1}',{2},'{3}','{4}','{5}',{6},{7},'{8}','{9}','{10}')";
|
|
|
|
(NEWID(),'{0}','{1}',{2},'{3}','{4}','{5}',{6},{7},'{8}','{9}','{10}') ; |
|
|
|
UPDATE ICSMOApply SET MUSER='{8}' WHERE ApplyCode='{0}' ;";
|
|
|
|
picksql = string.Format(picksql, pickdr["Code"].ToString(), pickdr["InvCode"].ToString(), Convert.ToDecimal(pickdr["iQuantity"]) |
|
|
|
, pickdr["WarehouseCode"].ToString(), pickdr["LocationCode"].ToString(), pickdr["LotNO"].ToString() |
|
|
|
, Convert.ToDecimal(pickdr["QTYTotal"]), Convert.ToDecimal(pickdr["SendQTY"]), MUSER, MUSERNAME, WorkPoint); |
|
|
|
} |
|
|
|
SqlHelper.ExecuteNonQuery(picksql); |
|
|
|
} |
|
|
|
|
|
|
|
#endregion
|
|
|
|
var result = ConvertCellToString(table); |
|
|
|
if (Invmes.Rows.Count > 0) |
|
|
|