From 15ed2f3df5a7899f6123ff254b8887dd03958513 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期五, 14 一月 2022 09:15:15 +0800
Subject: [PATCH] 合并
---
WebAPI/Controllers/基础资料/基础资料/Gy_StockCheckItemBillController.cs | 76 ++++++++++++++++++++++++++------------
1 files changed, 52 insertions(+), 24 deletions(-)
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
index e2fcefc..4399506 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
@@ -403,19 +403,23 @@
") " +
" values('3814','3814'," + HInterID + ",'" + HBillNo + "','2022-01-02'" +
", '" + user + "',getdate()" +
- ", " + dr["HSupID"].ToString() + ", 1," + dr["HWhID"].ToString() + ",0,0,0,0" +
+ ", " + dr["HSupID"].ToString() + ", 1," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
", 0," + dr["HDeptID"].ToString() + ",' ',0" +
") ";
string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,
HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID,
HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID,
HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'',0,0,'',''," +
- "0,0," + dr["HMaterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr["HProdQty"].ToString() + ",0," +
+ "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," +
"0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0"
- + ",0,0,0," + userID + ",0,0,'')");
+ + ",0,0,0," + userID + ",0,100005,'')");
//涓昏〃
+
+ oCn.BeginTran();
oCn.RunProc(sql);
oCn.RunProc(sql1);
+ oCn.RunProc("update KF_PonderationBillMain_Temp set HCheckStatus=1 where HitemID=" + HItemID);
+ oCn.Commit();
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -426,9 +430,10 @@
}
catch (Exception e)
{
+ oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍒濆鍖栧け璐ワ紒";
+ objJsonResult.Message = e.Message;
objJsonResult.data = null;
}
return objJsonResult;
@@ -460,19 +465,22 @@
") " +
" values('3827','3827'," + HInterID + ",'" + HBillNo + "','2022-01-02'" +
", '" + user + "',getdate()" +
- ", " + dr["HSupID"].ToString() + ", 1," + dr["HWhID"].ToString() + ",0,0,0,0" +
+ ", " + dr["HSupID"].ToString() + ", 1," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
", 0," + dr["HDeptID"].ToString() + ",' ',0" +
") ";
string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,
HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID,
HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID,
HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'',0,0,'',''," +
- "0,0," + dr["HMaterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr["HProdQty"].ToString() + ",0," +
- "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + ",0,0,0"
- + ",0,0,0," + userID + ",0,0,'')");
+ "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," +
+ "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0"
+ + ",0,0,0," + userID + ",0,100005,'')");
//涓昏〃
+ oCn.BeginTran();
oCn.RunProc(sql);
oCn.RunProc(sql1);
+ oCn.RunProc("update KF_PonderationBillMain_Temp set HCheckStatus=1 where HitemID=" + HItemID);
+ oCn.Commit();
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -483,9 +491,10 @@
}
catch (Exception e)
{
+ oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍒濆鍖栧け璐ワ紒";
+ objJsonResult.Message = e.Message;
objJsonResult.data = null;
}
return objJsonResult;
@@ -509,6 +518,7 @@
DataRow dr1 = ds1.Tables[0].Rows[0];
HInterID = DBUtility.ClsPub.CreateBillID("3832", ref DBUtility.ClsPub.sExeReturnInfo);
HBillNo = DBUtility.ClsPub.CreateBillCode("3832", ref DBUtility.ClsPub.sExeReturnInfo, true);
+
string sql = "Insert Into Sc_MouldStockBillMain " +
"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
",HMaker,HMakeDate" +
@@ -517,19 +527,23 @@
") " +
" values('3832','3832'," + HInterID + ",'" + HBillNo + "','2022-01-02'" +
", '" + user + "',getdate()" +
- ", " + dr["HSupID"].ToString() + ", 1," + dr["HWhID"].ToString() + ",0,0,0,0" +
+ ", " + dr["HSupID"].ToString() + ", 1," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
", 0," + dr["HDeptID"].ToString() + ",' ',0" +
") ";
string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,
HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID,
HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID,
HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'',0,0,'',''," +
- "0,0," + dr["HMaterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr["HProdQty"].ToString() + ",0," +
- "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + ",0,0,0"
- + ",0,0,0," + userID + ",0,0,'')");
+ "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," +
+ "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0"
+ + ",0,0,0," + userID + ",0,100005,'')");
+
//涓昏〃
+ oCn.BeginTran();
oCn.RunProc(sql);
oCn.RunProc(sql1);
+ oCn.RunProc("update KF_PonderationBillMain_Temp set HCheckStatus=1 where HitemID=" + HItemID);
+ oCn.Commit();
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -540,9 +554,10 @@
}
catch (Exception e)
{
+ oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍒濆鍖栧け璐ワ紒";
+ objJsonResult.Message = e.Message;
objJsonResult.data = null;
}
return objJsonResult;
@@ -566,6 +581,7 @@
DataRow dr1 = ds1.Tables[0].Rows[0];
HInterID = DBUtility.ClsPub.CreateBillID("3802", ref DBUtility.ClsPub.sExeReturnInfo);
HBillNo = DBUtility.ClsPub.CreateBillCode("3802", ref DBUtility.ClsPub.sExeReturnInfo, true);
+
string sql = "Insert Into Sc_MouldStockBillMain " +
"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
",HMaker,HMakeDate" +
@@ -574,19 +590,22 @@
") " +
" values('3802','3802'," + HInterID + ",'" + HBillNo + "','2022-01-02'" +
", '" + user + "',getdate()" +
- ", " + dr["HSupID"].ToString() + ", 1," + dr["HWhID"].ToString() + ",0,0,0,0" +
+ ", " + dr["HSupID"].ToString() + ", 1," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
", 0," + dr["HDeptID"].ToString() + ",' ',0" +
") ";
string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,
HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID,
HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID,
HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'',0,0,'',''," +
- "0,0," + dr["HMaterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr["HProdQty"].ToString() + ",0," +
- "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + ",0,0,0"
- + ",0,0,0," + userID + ",0,0,'')");
+ "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," +
+ "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0"
+ + ",0,0,0," + userID + ",0,100005,'')");
//涓昏〃
+ oCn.BeginTran();
oCn.RunProc(sql);
oCn.RunProc(sql1);
+ oCn.RunProc("update KF_PonderationBillMain_Temp set HCheckStatus=1 where HitemID=" + HItemID);
+ oCn.Commit();
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -597,9 +616,10 @@
}
catch (Exception e)
{
+ oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍒濆鍖栧け璐ワ紒";
+ objJsonResult.Message = e.Message;
objJsonResult.data = null;
}
return objJsonResult;
@@ -623,6 +643,7 @@
DataRow dr1 = ds1.Tables[0].Rows[0];
HInterID = DBUtility.ClsPub.CreateBillID("3803", ref DBUtility.ClsPub.sExeReturnInfo);
HBillNo = DBUtility.ClsPub.CreateBillCode("3803", ref DBUtility.ClsPub.sExeReturnInfo, true);
+
string sql = "Insert Into Sc_MouldStockBillMain " +
"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
",HMaker,HMakeDate" +
@@ -631,19 +652,23 @@
") " +
" values('3803','3803'," + HInterID + ",'" + HBillNo + "','2022-01-02'" +
", '" + user + "',getdate()" +
- ", " + dr["HSupID"].ToString() + ", 1," + dr["HWhID"].ToString() + ",0,0,0,0" +
+ ", " + dr["HSupID"].ToString() + ", 1," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
", 0," + dr["HDeptID"].ToString() + ",' ',0" +
") ";
string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,
HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID,
HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID,
HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'',0,0,'',''," +
- "0,0," + dr["HMaterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr["HProdQty"].ToString() + ",0," +
- "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + ",0,0,0"
- + ",0,0,0," + userID + ",0,0,'')");
+ "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," +
+ "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0"
+ + ",0,0,0," + userID + ",0,100005,'')");
+
//涓昏〃
+ oCn.BeginTran();
oCn.RunProc(sql);
oCn.RunProc(sql1);
+ oCn.RunProc("update KF_PonderationBillMain_Temp set HCheckStatus=1 where HitemID=" + HItemID);
+ oCn.Commit();
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -654,9 +679,10 @@
}
catch (Exception e)
{
+ oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍒濆鍖栧け璐ワ紒";
+ objJsonResult.Message = e.Message;
objJsonResult.data = null;
}
return objJsonResult;
@@ -679,6 +705,8 @@
return objJsonResult;
}
#endregion
+
+
#endregion
}
}
--
Gitblit v1.9.1