From bf3ccf84ff0ed2576052cb0b34659aea363626b5 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期五, 12 十一月 2021 18:03:51 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 63 +++++++++++++++++++++++++++++--
1 files changed, 58 insertions(+), 5 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index f7ab835..0dc8c6b 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -589,7 +589,8 @@
string HMaterNumber = mainList[0].HMaterNumber;
string HSupNumber = mainList[0].HSupNumber;
long HPrintQty = mainList[0].HPrintQty;
-
+ string HMouldOWNER = mainList[0].HMouldOWNER;
+ string HSaveLife = mainList[0].HSaveLife;
//涓昏〃
oCN.RunProc("Insert Into Gy_MouldFileMain " +
@@ -601,7 +602,7 @@
",HOutComDate,HOutComNo,HDeptID,HSupID,HSupNumber" +
",HPrintQty,HMouldStatus,HWhID,HRoutingID" +
",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife" +
- ",HUseLife,HLeaveLife,HProdQty,HProdWeight" +
+ ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife" +
") " +
" values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
"," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" +
@@ -611,7 +612,7 @@
",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" +
"," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID +
"," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "'" +
- ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "'" +
+ ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "'," + "','" + HSaveLife + "'," +
") ");
@@ -721,8 +722,8 @@
string HMaterNumber = mainList[0].HMaterNumber;
string HSupNumber = mainList[0].HSupNumber;
long HPrintQty = mainList[0].HPrintQty;
-
-
+ string HMouldOWNER = mainList[0].HMouldOWNER;
+ string HSaveLife = mainList[0].HSaveLife;
@@ -758,6 +759,7 @@
",HSupNumber='" + HSupNumber + "'" +
",HPrintQty=" + HPrintQty.ToString() +
",HMouldStatus='" + HMouldStatus + "'" +
+ ",HSaveLife='" + HSaveLife + "'" +
",HWhID=" + HWHID.ToString() +
",HRoutingID=" + HRoutingID.ToString() +
",HBomID=" + HBOMID.ToString() +
@@ -768,6 +770,7 @@
",HUseLife=" + HUseLife.ToString() +
",HLeaveLife=" + HLeaveLife.ToString() +
",HProdQty=" + HProdQty.ToString() +
+ ",HMouldOWNER='" + HMouldOWNER + "'" +
",HProdWeight=" + HProdWeight.ToString() +
" where HInterID=" + HInterID.ToString());
@@ -877,6 +880,56 @@
return objJsonResult;
}
+ /// <summary>
+ /// 妯″叿妗f鍒濆鍖栨寜閽�
+ /// </summary>
+ /// <param name="hmainid"></param>
+ /// <param name="user"></param>
+ /// <returns></returns>
+ [Route("Gy_Material/InitializeProdInBill")]
+ [HttpGet]
+ public object InitializeProdInBill(long hmainid, string user)
+ {
+ DAL.ClsGy_MouldFile oBill = new DAL.ClsGy_MouldFile();
+ try
+ {
+ string HBillNo = "";
+ Int64 HInterID = 0;//鏄剧ず鐨勫瓧娈�
+ ds = oCN.RunProcReturn("select * from Gy_MouldFileMain where HInterID='" + hmainid + "'", "Gy_MouldFileMain");
+ DataRow dr = ds.Tables[0].Rows[0];
+ HInterID = DBUtility.ClsPub.CreateBillID("3801", ref DBUtility.ClsPub.sExeReturnInfo);
+ HBillNo = DBUtility.ClsPub.CreateBillCode("3801", ref DBUtility.ClsPub.sExeReturnInfo, true);
+ string sql = "Insert Into Sc_MouldStockBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+ ",HMaker,HMakeDate" + /*"HYear, HPeriod,"*/
+ ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
+ ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" +
+ ") " +
+ " values('3801','3801'," + HInterID + ",'" + HBillNo + "',' getdate()'" +
+ ", '" + user + "',getdate()" +
+ ", " + dr["HSupID"].ToString() + ", 1," + dr["HWhID"].ToString() + ",0,0,0,0" +
+ ", 0," + dr["HDeptID"].ToString() + ",' ',0" +
+
+ ") ";
+ //涓昏〃
+ oCN.RunProc(sql);
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒濆鍖栨垚鍔燂紒";
+ //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒濆鍖栧け璐ワ紒";
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
#region [妯″叿妗f瀹℃牳銆佸弽瀹℃牳]
/// <summary>
--
Gitblit v1.9.1