From 5a35a5466a28dfc0b586c811d1eafd390b09ff6e Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 25 四月 2024 11:03:52 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs | 20 +++++-
WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs | 18 +++--
WebAPI/Controllers/CGGL/Cg_PayableBillController.cs | 6 ++
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 2
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 37 ++++++++++++
DAL/采购管理/ClsCg_PayableBill.cs | 35 ++++++++++-
Model/采购管理/ClsCg_PayableBillMain.cs | 2
WebAPI/Controllers/仓存管理/验收入库/Kf_StepFoldinBillController.cs | 38 ++++++++++++
8 files changed, 141 insertions(+), 17 deletions(-)
diff --git "a/DAL/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBill.cs" "b/DAL/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBill.cs"
index d92218b..00285c8 100644
--- "a/DAL/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBill.cs"
+++ "b/DAL/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBill.cs"
@@ -32,10 +32,35 @@
#endregion
#endregion
+ //鍒犻櫎鍏宠仈
+ public override void DeleteRelation(ref string sReturn, Int64 lngBillKey)
+ {
+ //閲囪喘鍏ュ簱鍗� 閲囪喘璁㈠崟 鍏宠仈鏁伴噺
+ try
+ {
+ if (DetailColl[0].HSourceBillType == "1201") //閲囪喘鍏ュ簱鍗�
+ {
+ oCn.RunProc("exec h_p_Cg_UpDateRelation_POStockInToPayable_Del " + lngBillKey.ToString());
+ }
+ else if (DetailColl[0].HSourceBillType == "1102") //閲囪喘璁㈠崟
+ {
+ oCn.RunProc("exec h_p_Cg_UpDateRelation_POOrderToPayable_Del " + lngBillKey.ToString());
+ }
+ else
+ {
+
+ }
+ }
+ catch (Exception e)
+ {
+ throw (e);
+ }
+ }
+
//鏂板鍏宠仈
public override void AddNewRelation(ref string sReturn, Int64 lngBillKey)
{
- //鏀舵枡閫氱煡鍗� 閫�鏂欓�氱煡鍗� 鍏宠仈鏁伴噺
+ //閲囪喘鍏ュ簱鍗� 閲囪喘璁㈠崟 鍏宠仈鏁伴噺
try
{
if (DetailColl[0].HSourceBillType == "1201") //閲囪喘鍏ュ簱鍗�
@@ -94,7 +119,7 @@
",HCurID = " + omodel.HCurID + "" +
",HExRate = " + omodel.HExRate + "" +
",HEmpID = " + omodel.HEmpID + "" +
- ",HManagerID = " + omodel.HManagerID + "" +
+ ",HMangerID = " + omodel.HMangerID + "" +
",HDeptID = " + omodel.HDeptID + "" +
",HExplanation = '" + omodel.HExplanation + "'" +
",HInnerBillNo = '" + omodel.HInnerBillNo + "'" +
@@ -225,7 +250,7 @@
string mainSql = "insert into Cg_PayableBillMain" +
"(HInterID,HBillNo,HDate,HYear,HPeriod,HBillType,HBillSubType" +
",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" +
- ",HMaker,HMakeDate,HSSID,HPSStyleID,HReceiveDate,HSupID,HCurID,HExRate,HEmpID,HManagerID,HDeptID,HExplanation,HInnerBillNo,HRemark) " +
+ ",HMaker,HMakeDate,HSSID,HPSStyleID,HReceiveDate,HSupID,HCurID,HExRate,HEmpID,HMangerID,HDeptID,HExplanation,HInnerBillNo,HRemark) " +
"values(" +
"" + omodel.HInterID + "" +
",'" + omodel.HBillNo + "'" +
@@ -247,7 +272,7 @@
"," + omodel.HCurID + "" +
"," + omodel.HExRate + "" +
"," + omodel.HEmpID + "" +
- "," + omodel.HManagerID + "" +
+ "," + omodel.HMangerID + "" +
"," + omodel.HDeptID + "" +
",'" + omodel.HExplanation + "'" +
",'" + omodel.HInnerBillNo + "'" +
@@ -383,7 +408,7 @@
omodel.HCurID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCurID"]);
omodel.HExRate = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HExRate"]);
omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"]);
- omodel.HManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HManagerID"]);
+ omodel.HMangerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMangerID"]);
omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]);
diff --git "a/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBillMain.cs" "b/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBillMain.cs"
index 236bde1..a8403b1 100644
--- "a/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBillMain.cs"
+++ "b/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBillMain.cs"
@@ -12,7 +12,7 @@
public Int64 HCurID; //int --币别
public double HExRate; //money --汇率
public Int64 HDeptID; //int --部门
- public Int64 HManagerID; //int --主管
+ public Int64 HMangerID; //int --主管
public Int64 HEmpID; //int --业务员
public string HReceiveDate;
public string HExplanation;
diff --git a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
index 7a44c8f..cefcc62 100644
--- a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
@@ -199,13 +199,17 @@
oCN.BeginTran(); //寮�濮嬩簨鍔�
//鏌ヨ鏁版嵁
- ds = oCN.RunProcReturn("select * from Cg_POInStockBillMain a inner join Cg_POInStockBillSub b on a.HInterID=b.HInterID where a.HInterID= '" + HInterID + "'", "Kf_ICStockBillMain");
- //鎵ц瀛樺偍杩囩▼杩涜鍙嶅啓
- dss = oCN.RunProcReturn("exec h_p_Cg_POOrderBillMain_Delete " + HQty + ", '" + HSourceInterID + "', '" + HSourceEntryID + "','" + user + " '", "h_p_Cg_POInStockBillMain");
+ ds = oCN.RunProcReturn("select * from Cg_POInStockBillMain a inner join Cg_POInStockBillSub b on a.HInterID=b.HInterID where a.HInterID= '" + HInterID + "'", "Cg_POInStockBillMain");
+
+ //鏀舵枡閫氱煡鍗曞垹闄ゅ洖濉噰璐鍗曞叧鑱旀暟閲�
+ oCN.RunProc("exec h_p_Cg_UpDatePOOrderRelation_Del " + HInterID);
+
+ ////鎵ц瀛樺偍杩囩▼杩涜鍙嶅啓 璇ヨ涔熸槸 鏀舵枡閫氱煡鍗� 鍙嶅啓 閲囪喘璁㈠崟
+ // dss = oCN.RunProcReturn("exec h_p_Cg_POOrderBillMain_Delete " + HQty + ", '" + HSourceInterID + "', '" + HSourceEntryID + "','" + user + " '", "h_p_Cg_POInStockBillMain");
var sReturn = "";
- if (DBUtility.ClsPub.isLong(dss.Tables[0].Rows[0]["HBack"]) != 0)
+ if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBacker"]) != 0)
{
- sReturn = DBUtility.ClsPub.isStrNull(dss.Tables[0].Rows[0]["HBackRemark"]).ToString();
+ sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]).ToString();
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = sReturn;
@@ -679,9 +683,9 @@
NewHEntryID = ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString());
NewHEntryID += 1;
}
- //鍙嶅啓閲囪喘鍏ュ簱鍗�
+ //鍙嶅啓閲囪喘璁㈠崟鍗� 涓婇潰鏂规硶涓篃鏈夊弽鍐� 姝よ缁欐敞閿�
string sReturn = "";
- ds = oCN.RunProcReturn("exec h_p_Cg_POOrderBillMain " + oSub.HQty + ", '" + oSub.HSourceInterID + "', '" + oSub.HSourceEntryID + "','" + user + " '", "h_p_Cg_POOrderBillMain");
+ //ds = oCN.RunProcReturn("exec h_p_Cg_POOrderBillMain " + oSub.HQty + ", '" + oSub.HSourceInterID + "', '" + oSub.HSourceEntryID + "','" + user + " '", "h_p_Cg_POOrderBillMain");
if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) != 0)
{
sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]).ToString();
diff --git a/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs b/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs
index 8343c6f..f6dc975 100644
--- a/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs
@@ -337,6 +337,12 @@
oCN.BeginTran();
+ //搴斾粯鍗� 鍒犻櫎 鎾ら攢 閲囪喘鍏ュ簱鍗� 鍏宠仈鏁伴噺
+ oCN.RunProc("exec h_p_Cg_UpDateRelation_POStockInToPayable_Del " + HInterID);
+
+ //搴斾粯鍗� 鍒犻櫎 鎾ら攢 閲囪喘璁㈠崟 鍏宠仈鏁伴噺
+ oCN.RunProc("exec h_p_Cg_UpDateRelation_POOrderToPayable_Del " + HInterID);
+
oCN.RunProc("delete from Cg_PayableBillMain where HInterID = " + HInterID);
oCN.RunProc("delete from Cg_PayableSub where HInterID= " + HInterID);
diff --git a/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs b/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs
index d20ec39..ada9c0f 100644
--- a/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs
+++ b/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs
@@ -202,7 +202,7 @@
,HAddress,HSupID,HCurID,HWHID,HEmpID,HManagerID,HSecManagerID,HKeeperID,HDeptID,HExplanation,HRemark
,HInnerBillNo,HSTOCKORGID,HOWNERID,HMaker,HMakeDate,HProjectID,HInvoiceBillNo)
values(" + HInterID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + 1201 + "','" +
- HBillSubType + "','" + HDate + "','" + HBillNo + "','" + HBillStatus + "','" + HAddress +
+ 1201 + "','" + HDate + "','" + HBillNo + "','" + HBillStatus + "','" + HAddress +
"'," + HSupID + "," + HCurID + "," + HWHID + "," + HEmpID + "," + HManagerID + "," +
HSecManagerID + ","+ HKeeperID +"," + HDeptID + ",'" + HExplanation + "','" + HRemark
+ "','" + HInnerBillNo + "'," + HSTOCKORGID + "," + HOWNERID + ",'" + HMaker + "',getdate(),"+ HProjectID + ",'"+ HInvoiceBillNo + "')";
@@ -218,6 +218,13 @@
+ ",HAddress='" + HAddress + "',HInnerBillNo='" + HInnerBillNo + "',HProjectID="+ HProjectID + ",HInvoiceBillNo='"+ HInvoiceBillNo + "' where HInterID=" + HInterID;
oCN.RunProc(sql);
+
+ //閲囪喘鍏ュ簱鍗� 缂栬緫 鎾ら攢鍥炲~ 閲囪喘璁㈠崟 鍏宠仈鏁伴噺
+ oCN.RunProc("exec h_p_Cg_UpDateRelation_POOrderToPOStockIn_Del " + HInterID);
+
+ //閲囪喘鍏ュ簱鍗� 缂栬緫 鎾ら攢鍥炲~ 鏀舵枡閫氱煡鍗� 鍏宠仈鏁伴噺
+ oCN.RunProc("exec h_p_Cg_UpDateRelation_POInStockToPOStockIn_Del " + HInterID);
+
//鍒犻櫎瀛愯〃
oCN.RunProc("delete from Kf_ICStockBillSub where HInterID='" + HInterID + "'");
}
@@ -229,7 +236,7 @@
//閲囪喘鍏ュ簱鍗曟柊澧炲洖濉敹鏂欓�氱煡鍗曞叧鑱旀暟閲�
oCN.RunProc("exec h_p_Cg_UpDateRelation_POInStockToPOStockIn_Add " + HInterID);
-
+
if (objJsonResult.code == "0")
{
@@ -421,6 +428,13 @@
string sReturn = "";
oCN.BeginTran();
+
+ //閲囪喘鍏ュ簱鍗� 鍒犻櫎 鎾ら攢鍥炲~ 閲囪喘璁㈠崟 鍏宠仈鏁伴噺
+ oCN.RunProc("exec h_p_Cg_UpDateRelation_POOrderToPOStockIn_Del " + HInterID);
+
+ //閲囪喘鍏ュ簱鍗� 鍒犻櫎 鎾ら攢鍥炲~ 鏀舵枡閫氱煡鍗� 鍏宠仈鏁伴噺
+ oCN.RunProc("exec h_p_Cg_UpDateRelation_POInStockToPOStockIn_Del " + HInterID);
+
oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
oCN.Commit();
@@ -1175,7 +1189,7 @@
#endregion
- #region 閲囪喘鍏ュ簱鍗� 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栭噰璐叆搴撳崟鏁版嵁
+ #region 閲囪喘鍏ュ簱鍗� 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栭噰璐叆搴撳崟鏁版嵁
[Route("Kf_POStockInBill/loadKf_POStockInBill_Push")]
[HttpGet]
public object loadKf_POStockInBill_Push(long HInterID, long HSubID)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
index 9fde5b9..a989769 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -1037,7 +1037,7 @@
}
}
- string sql = "select * from h_v_QC_FirstPieceCheckBillMainList where 1=1 " + sWhere + " order by 鏃ユ湡 ";
+ string sql = "select * from h_v_QC_FirstPieceCheckBillMainList where 1=1 " + sWhere ;
ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBillMainList");
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index 495f0a8..a73f3e8 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -1682,6 +1682,43 @@
}
#endregion
+ #region 鐩存帴璋冩嫧鍗� 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栬皟鎷ㄧ敵璇峰崟鏁版嵁
+ [Route("Kf_MoveStockBill/loadKf_MoveStockBillMain_Push")]
+ [HttpGet]
+ public object loadKf_MoveStockBillMain_Push(long HInterID, long HSubID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("select * from h_v_IF_MoveStockRequestBillList_Litee where hmainid =" + HInterID + " and hsubid = " + HSubID, "h_v_IF_MoveStockRequestBillList_Litee");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈煡璇㈠埌婧愬崟淇℃伅锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#endregion
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs"
index 943d17e..46c29bf 100644
--- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs"
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs"
@@ -842,5 +842,43 @@
}
}
#endregion
+
+ #region 鍒嗘寮忚皟鍏ュ崟 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栧垎甯冨紡璋冨嚭鍗曟暟鎹�
+ [Route("Kf_StepFoldInBill/loadKf_ICStockBillMain_Push")]
+ [HttpGet]
+ public object loadKf_ICStockBillMain_Push(long HInterID, long HSubID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("select * from h_v_IF_StepFoldOutBillList where hmainid =" + HInterID + " and hsubid = " + HSubID, "h_v_IF_StepFoldOutBillList");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈煡璇㈠埌婧愬崟淇℃伅锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
}
}
\ No newline at end of file
--
Gitblit v1.9.1