From c47a5885c867bfd17122d3b05fef937463ec9928 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期一, 15 十一月 2021 14:55:39 +0800
Subject: [PATCH] 委外订单
---
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 53 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index e2877bc..0dc8c6b 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -612,7 +612,7 @@
",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" +
"," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID +
"," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "'" +
- ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER +"',"+ "','" + HSaveLife + "'," +
+ ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "'," + "','" + HSaveLife + "'," +
") ");
@@ -759,7 +759,7 @@
",HSupNumber='" + HSupNumber + "'" +
",HPrintQty=" + HPrintQty.ToString() +
",HMouldStatus='" + HMouldStatus + "'" +
- ",HSaveLife='"+ HSaveLife+"'"+
+ ",HSaveLife='" + HSaveLife + "'" +
",HWhID=" + HWHID.ToString() +
",HRoutingID=" + HRoutingID.ToString() +
",HBomID=" + HBOMID.ToString() +
@@ -770,7 +770,7 @@
",HUseLife=" + HUseLife.ToString() +
",HLeaveLife=" + HLeaveLife.ToString() +
",HProdQty=" + HProdQty.ToString() +
- ",HMouldOWNER='"+ HMouldOWNER+"'"+
+ ",HMouldOWNER='" + HMouldOWNER + "'" +
",HProdWeight=" + HProdWeight.ToString() +
" where HInterID=" + HInterID.ToString());
@@ -880,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