From 33ffe895b1862cda181a7fbb5028f81620226087 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 16 八月 2024 13:53:37 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 78 +++++++++++++++++++++++++++++++++++++-
1 files changed, 75 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 596820f..65b9343 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -192,6 +192,75 @@
}
#endregion
+ #region 鑾峰彇鐗╂枡绮惧害閫氳繃id
+ [Route("Gy_Material/getDecByID")]
+ [HttpGet]
+ public object getDecByID(int HMaterID)
+ {
+ try
+ {
+ if(HMaterID == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁閫夋嫨鐗╂枡";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ ds = oCN.RunProcReturn(@"select HQtyDec,HPriceDec,HMoneyDec from Gy_Material where HitemID=" + HMaterID , "Gy_Material");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "娌℃湁鎵惧埌璇ョ墿鏂欑紪鐮�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Success";
+ 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
+
+ #region 鑾峰彇椤圭洰鍙�
+ [Route("Gy_Material/Get_HProject")]
+ [HttpGet]
+ public object Get_HProject(string HOrgID)
+ {
+ try
+ {
+ DataSet oDs = new DataSet();
+ //==========
+ oDs = oCN.RunProcReturn("select top(20) HInterID as HItemID,HProName HName from PM_ProjectBillMain", "PM_ProjectBillMain");
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇鎴愬姛锛�";
+ objJsonResult.data = oDs.Tables[0];
+ return objJsonResult; ;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
/// <summary>
/// 鐗╂枡璁剧疆鑾峰彇淇℃伅
@@ -1351,6 +1420,7 @@
long HSPID = mainList[0].HSPID;
Double HDesignLife = mainList[0].HDesignLife;
Double HUseLife = mainList[0].HUseLife;
+ Double HInitLife = mainList[0].HInitLife;//涓婄嚎鍒濆鍖栧鍛�
Double HLeaveLife = mainList[0].HLeaveLife;
Double HProdQty = mainList[0].HProdQty;
Double HProdWeight = mainList[0].HProdWeight;
@@ -1382,7 +1452,7 @@
",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" +
",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" +
",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID,HBarCode,HMadeSupID" +
- ",HMouldClass,HNowWHID,HNowSPID) " +
+ ",HMouldClass,HNowWHID,HNowSPID,HInitLife) " +
" values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
"," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" +
",'" + HMouldNo + "','" + HName + "','" + HModel + "','" + HModel2 + "','" + HDiameter + "'" +
@@ -1392,7 +1462,7 @@
"," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HCaveQty +
"," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID + "','" + HNowSupTypeID + "'" +
",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID +
- ",'"+ HMouldClass + "'," + HNowWHID + "," + HNowSPID + ") ");
+ ",'"+ HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "') ");
//瀛愯〃
oCN.RunProc("Insert into Gy_MouldFileSub " +
@@ -1499,6 +1569,7 @@
long HSPID = mainList[0].HSPID;
Double HDesignLife = mainList[0].HDesignLife;
Double HUseLife = mainList[0].HUseLife;
+ Double HInitLife = mainList[0].HInitLife;
Double HLeaveLife = mainList[0].HLeaveLife;
Double HProdQty = mainList[0].HProdQty;
Double HProdWeight = mainList[0].HProdWeight;
@@ -1574,7 +1645,8 @@
",HMadeSupID=" + HMadeSupID +
",HNowWHID=" + HNowWHID +
",HNowSPID=" + HNowSPID +
- " where HInterID=" + HInterID.ToString());
+ ",HInitLife='" + HInitLife +
+ "' where HInterID=" + HInterID.ToString());
//淇敼瀛愰」鐩唬鐮�
//oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Department,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
--
Gitblit v1.9.1