Browse Source

采购到货未存在部门

master
DESKTOP-DIHMM3I\22375 2 years ago
parent
commit
75f2976759
  1. 8
      ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreatePOArrive.cs
  2. 8
      ICSSoft.ERP.WebAPI/ICSSoft.DataProject/MOIssueDocNegatives.cs
  3. 5
      ICSSoft.ERP.WebAPI/ICSSoft.DataProject/OutsourcingIssueDoNegative.cs

8
ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreatePOArrive.cs

@ -434,8 +434,8 @@ WHERE A.Autoid = '{0}'", iChildId);
A.cpocode as POCode,A.cMaker as CreateUser,A.cMakeTime as CreateDateTime, A.cpocode as POCode,A.cMaker as CreateUser,A.cMakeTime as CreateDateTime,
A.cverifier as Checker,A.caudittime as CheckDateTime A.cverifier as Checker,A.caudittime as CheckDateTime
FROM PU_ArrivalVouch A FROM PU_ArrivalVouch A
INNER JOIN DEPARTMENT C ON A.CDEPCODE=C.CDEPCODE
INNER JOIN VENDOR D ON A.CVENCODE=D.CVENCODE WHERE 1=1 and A.iBillType=0 and A.ID in({0})
left JOIN DEPARTMENT C ON A.CDEPCODE=C.CDEPCODE
left JOIN VENDOR D ON A.CVENCODE=D.CVENCODE WHERE 1=1 and A.iBillType=0 and A.ID in({0})
SELECT DISTINCT A.ID as IDs,B.Autoid as DetailID,B.ivouchrowno as Sequence,B.cInvCode as InvCode, SELECT DISTINCT A.ID as IDs,B.Autoid as DetailID,B.ivouchrowno as Sequence,B.cInvCode as InvCode,
B.INUM as Amount,B.iQuantity as Quantity,B.fValidInQuan as RCVQuantity,B.iPOsID as PODetailID B.INUM as Amount,B.iQuantity as Quantity,B.fValidInQuan as RCVQuantity,B.iPOsID as PODetailID
@ -454,8 +454,8 @@ isnull(b.cFree9,'') as cFree9,
isnull(b.cFree10,'') as cFree10 isnull(b.cFree10,'') as cFree10
FROM PU_ArrivalVouch A FROM PU_ArrivalVouch A
INNER JOIN PU_ArrivalVouchs B ON A.ID=B.ID INNER JOIN PU_ArrivalVouchs B ON A.ID=B.ID
INNER JOIN DEPARTMENT C ON A.CDEPCODE=C.CDEPCODE
INNER JOIN VENDOR D ON A.CVENCODE=D.CVENCODE WHERE 1=1 and A.iBillType=0 and A.ID in({0})";
left JOIN DEPARTMENT C ON A.CDEPCODE=C.CDEPCODE
left JOIN VENDOR D ON A.CVENCODE=D.CVENCODE WHERE 1=1 and A.iBillType=0 and A.ID in({0})";
sql = string.Format(sql, iFatherIdTwo.TrimEnd(',')); sql = string.Format(sql, iFatherIdTwo.TrimEnd(','));
if (ds != null) if (ds != null)
ds.Merge(DBHelper.SQlReturnDataSet(sql, cmd)); ds.Merge(DBHelper.SQlReturnDataSet(sql, cmd));

8
ICSSoft.ERP.WebAPI/ICSSoft.DataProject/MOIssueDocNegatives.cs

@ -586,6 +586,10 @@ isnull(b.cFree10,'') as cFree10
dnmodifytime =CONVERT(VARCHAR(50),GETDATE(),112),dModifyDate =GETDATE() WHERE ID='{0}'"; dnmodifytime =CONVERT(VARCHAR(50),GETDATE(),112),dModifyDate =GETDATE() WHERE ID='{0}'";
sql = string.Format(sql, info.ID); sql = string.Format(sql, info.ID);
DBHelper.CmdExecuteNonQuery(sql, cmd, "审核生产退料单失败!"); DBHelper.CmdExecuteNonQuery(sql, cmd, "审核生产退料单失败!");
sql = @"select * from dbo.rdrecords11 a
left join dbo.rdrecord11 on a.ID=b.ID WHERE b.ID='{0}'";
sql = string.Format(sql, info.ID);
DataTable dtChecks = DBHelper.SQlReturnData(sql, cmd); DataTable dtChecks = DBHelper.SQlReturnData(sql, cmd);
if (info.UpdateStock) if (info.UpdateStock)
{ {
@ -616,8 +620,8 @@ isnull(b.cFree10,'') as cFree10
key.TableName = "IA_ST_UnAccountVouch11"; key.TableName = "IA_ST_UnAccountVouch11";
//DBHelper.UpdateCurrentStock(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(),"", -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), key); //DBHelper.UpdateCurrentStock(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(),"", -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), key);
//DBHelper.UpdateCurrentStockNEW(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(), dtChecks.Rows[i]["cBatch"].ToString(), -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), dtChecks.Rows[i]["cFree1"].ToString(), dtChecks.Rows[i]["cFree2"].ToString(), dtChecks.Rows[i]["cFree3"].ToString(), dtChecks.Rows[i]["cFree4"].ToString(), dtChecks.Rows[i]["cFree5"].ToString(), dtChecks.Rows[i]["cFree6"].ToString(), dtChecks.Rows[i]["cFree7"].ToString(), dtChecks.Rows[i]["cFree8"].ToString(), dtChecks.Rows[i]["cFree9"].ToString(), dtChecks.Rows[i]["cFree10"].ToString(), key); //DBHelper.UpdateCurrentStockNEW(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(), dtChecks.Rows[i]["cBatch"].ToString(), -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), dtChecks.Rows[i]["cFree1"].ToString(), dtChecks.Rows[i]["cFree2"].ToString(), dtChecks.Rows[i]["cFree3"].ToString(), dtChecks.Rows[i]["cFree4"].ToString(), dtChecks.Rows[i]["cFree5"].ToString(), dtChecks.Rows[i]["cFree6"].ToString(), dtChecks.Rows[i]["cFree7"].ToString(), dtChecks.Rows[i]["cFree8"].ToString(), dtChecks.Rows[i]["cFree9"].ToString(), dtChecks.Rows[i]["cFree10"].ToString(), key);
DBHelper.UpdateCurrentStockCCGC(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(), dtChecks.Rows[i]["cBatch"].ToString(), -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), dtChecks.Rows[i]["iQuantity"].ToString() == "" ? 0 : -Convert.ToDecimal(inum), dtChecks.Rows[i]["cFree1"].ToString(),
DBHelper.UpdateCurrentStockCCGC(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(), dtChecks.Rows[i]["cBatch"].ToString(), -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), dtChecks.Rows[i]["iNum"].ToString() == "" ? 0 : -Convert.ToDecimal(dtChecks.Rows[i]["iNum"].ToString()), dtChecks.Rows[i]["cFree1"].ToString(),
dtChecks.Rows[i]["cFree2"].ToString(), dtChecks.Rows[i]["cFree3"].ToString(), dtChecks.Rows[i]["cFree4"].ToString(), dtChecks.Rows[i]["cFree5"].ToString(), dtChecks.Rows[i]["cFree6"].ToString(), dtChecks.Rows[i]["cFree7"].ToString(), dtChecks.Rows[i]["cFree8"].ToString(), dtChecks.Rows[i]["cFree9"].ToString(), dtChecks.Rows[i]["cFree10"].ToString(), dtChecks.Rows[i]["cFree2"].ToString(), dtChecks.Rows[i]["cFree3"].ToString(), dtChecks.Rows[i]["cFree4"].ToString(), dtChecks.Rows[i]["cFree5"].ToString(), dtChecks.Rows[i]["cFree6"].ToString(), dtChecks.Rows[i]["cFree7"].ToString(), dtChecks.Rows[i]["cFree8"].ToString(), dtChecks.Rows[i]["cFree9"].ToString(), dtChecks.Rows[i]["cFree10"].ToString(),
"", key, "", "", "", "", 0, 0, 0, 0, 0, 0, 0, 0, Convert.ToInt32(dtChecks.Rows[i]["ID"].ToString()), Convert.ToInt32(dtChecks.Rows[i]["AutoID"].ToString())); "", key, "", "", "", "", 0, 0, 0, 0, 0, 0, 0, 0, Convert.ToInt32(dtChecks.Rows[i]["ID"].ToString()), Convert.ToInt32(dtChecks.Rows[i]["AutoID"].ToString()));

5
ICSSoft.ERP.WebAPI/ICSSoft.DataProject/OutsourcingIssueDoNegative.cs

@ -899,6 +899,9 @@ isnull(b.cFree10,'') as cFree10
dnmodifytime =CONVERT(VARCHAR(50),GETDATE(),112),dModifyDate =GETDATE() WHERE ID='{0}'"; dnmodifytime =CONVERT(VARCHAR(50),GETDATE(),112),dModifyDate =GETDATE() WHERE ID='{0}'";
sql = string.Format(sql, info.ID); sql = string.Format(sql, info.ID);
DBHelper.CmdExecuteNonQuery(sql, cmd, "未查询到对应数据!"); DBHelper.CmdExecuteNonQuery(sql, cmd, "未查询到对应数据!");
sql = @"select * from dbo.rdrecords11 a
left join dbo.rdrecord11 on a.ID=b.ID WHERE b.ID='{0}'";
sql = string.Format(sql, info.ID);
DataTable dtChecks = DBHelper.SQlReturnData(sql, cmd); DataTable dtChecks = DBHelper.SQlReturnData(sql, cmd);
if (info.UpdateStock) if (info.UpdateStock)
{ {
@ -930,7 +933,7 @@ isnull(b.cFree10,'') as cFree10
//DBHelper.UpdateCurrentStock(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(),"", -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), key); //DBHelper.UpdateCurrentStock(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(),"", -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), key);
//DBHelper.UpdateCurrentStockNEW(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(), dtChecks.Rows[i]["cBatch"].ToString(), -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), dtChecks.Rows[i]["cFree1"].ToString(), dtChecks.Rows[i]["cFree2"].ToString(), dtChecks.Rows[i]["cFree3"].ToString(), dtChecks.Rows[i]["cFree4"].ToString(), dtChecks.Rows[i]["cFree5"].ToString(), dtChecks.Rows[i]["cFree6"].ToString(), dtChecks.Rows[i]["cFree7"].ToString(), dtChecks.Rows[i]["cFree8"].ToString(), dtChecks.Rows[i]["cFree9"].ToString(), dtChecks.Rows[i]["cFree10"].ToString(), key); //DBHelper.UpdateCurrentStockNEW(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(), dtChecks.Rows[i]["cBatch"].ToString(), -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), dtChecks.Rows[i]["cFree1"].ToString(), dtChecks.Rows[i]["cFree2"].ToString(), dtChecks.Rows[i]["cFree3"].ToString(), dtChecks.Rows[i]["cFree4"].ToString(), dtChecks.Rows[i]["cFree5"].ToString(), dtChecks.Rows[i]["cFree6"].ToString(), dtChecks.Rows[i]["cFree7"].ToString(), dtChecks.Rows[i]["cFree8"].ToString(), dtChecks.Rows[i]["cFree9"].ToString(), dtChecks.Rows[i]["cFree10"].ToString(), key);
DBHelper.UpdateCurrentStockCCGC(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(), dtChecks.Rows[i]["cBatch"].ToString(), -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), dtChecks.Rows[i]["iQuantity"].ToString() == "" ? 0 : -Convert.ToDecimal(inum), dtChecks.Rows[i]["cFree1"].ToString(),
DBHelper.UpdateCurrentStockCCGC(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(), dtChecks.Rows[i]["cBatch"].ToString(), -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), dtChecks.Rows[i]["iNum"].ToString() == "" ? 0 : -Convert.ToDecimal(dtChecks.Rows[i]["iNum"].ToString()), dtChecks.Rows[i]["cFree1"].ToString(),
dtChecks.Rows[i]["cFree2"].ToString(), dtChecks.Rows[i]["cFree3"].ToString(), dtChecks.Rows[i]["cFree4"].ToString(), dtChecks.Rows[i]["cFree5"].ToString(), dtChecks.Rows[i]["cFree6"].ToString(), dtChecks.Rows[i]["cFree7"].ToString(), dtChecks.Rows[i]["cFree8"].ToString(), dtChecks.Rows[i]["cFree9"].ToString(), dtChecks.Rows[i]["cFree10"].ToString(), dtChecks.Rows[i]["cFree2"].ToString(), dtChecks.Rows[i]["cFree3"].ToString(), dtChecks.Rows[i]["cFree4"].ToString(), dtChecks.Rows[i]["cFree5"].ToString(), dtChecks.Rows[i]["cFree6"].ToString(), dtChecks.Rows[i]["cFree7"].ToString(), dtChecks.Rows[i]["cFree8"].ToString(), dtChecks.Rows[i]["cFree9"].ToString(), dtChecks.Rows[i]["cFree10"].ToString(),
"", key, "", "", "", "", 0, 0, 0, 0, 0, 0, 0, 0, Convert.ToInt32(dtChecks.Rows[i]["ID"].ToString()), Convert.ToInt32(dtChecks.Rows[i]["AutoID"].ToString())); "", key, "", "", "", "", 0, 0, 0, 0, 0, 0, 0, 0, Convert.ToInt32(dtChecks.Rows[i]["ID"].ToString()), Convert.ToInt32(dtChecks.Rows[i]["AutoID"].ToString()));

Loading…
Cancel
Save