From a51499eacba7bd26d3240d5c388efd4201ec9777 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期三, 21 九月 2022 12:30:43 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
.gitignore | 1
WebAPI/Models/TechParamByProc.cs | 23
WebAPI/Controllers/BaseSet/Gy_TechnologyController.cs | 441 +++++++++++++
WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs | 13
WebAPI/Controllers/工资管理/Pay_PurchaseWallclothBillController.cs | 257 +++++++
WebAPI/Models/工资管理/ClsPay_PurchaseWallclothBillMain.cs | 21
WebAPI/Controllers/LMESController.cs | 82 ++
WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs | 13
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 55 +
WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs | 23
WebAPI/Controllers/工资管理/Gy_GroupEmpBillController.cs | 13
WebAPI/Controllers/POStockInBillController.cs | 32
WebAPI/Controllers/BaseSet/Gy_TechnologyParUnitController.cs | 417 ++++++++++++
WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs | 23
WebAPI/Controllers/BaseSet/Gy_TechParamByProcController.cs | 415 ++++++++++++
WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs | 12
WebAPI/Models/工资管理/ClsPay_PurchaseWallclothBillSub.cs | 11
WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs | 12
WebAPI/Controllers/CJGL/ProductionPlanReportController.cs | 5
WebAPI/Controllers/Sc_ProcessMangementController.cs | 2
WebAPI/Models/TechnologyParameter.cs | 23
WebAPI/WebAPI.csproj | 3
WebAPI/Models/TechnologyParameterUnit.cs | 24
23 files changed, 1,883 insertions(+), 38 deletions(-)
diff --git a/.gitignore b/.gitignore
index 0fa0042..365c632 100644
--- a/.gitignore
+++ b/.gitignore
@@ -140,3 +140,4 @@
/PayM/obj/Debug
/NETERPNoWin/obj
/WebAPI/Sc_MouldProdOutBill/Log
+/PayM/bin/Debug
diff --git a/WebAPI/Controllers/BaseSet/Gy_TechParamByProcController.cs b/WebAPI/Controllers/BaseSet/Gy_TechParamByProcController.cs
new file mode 100644
index 0000000..c463718
--- /dev/null
+++ b/WebAPI/Controllers/BaseSet/Gy_TechParamByProcController.cs
@@ -0,0 +1,415 @@
+锘縰sing Newtonsoft.Json.Linq;
+using Pub_Class;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Web.Http;
+using WebAPI.Models;
+using WebAPI.Service;
+
+namespace WebAPI.Controllers
+{
+ public class Gy_TechParamByProcController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+
+ private json objJsonResult = new json();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ DataSet ds;
+
+ /// <summary>
+ /// 杩斿洖宸ヨ壓鍙傛暟瀵瑰簲琛ㄥ垪琛�
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_TechParamByProc/list")]
+ [HttpGet]
+ public object list(string sWhere, string user, string Organization)
+ {
+ try
+ {
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_TechParamByProc", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ string sql1 = string.Format(@"select * from h_v_Gy_TechParamByProc where 1 = 1");//where 缁勭粐鍚嶇О='" + Organization + "'
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn(sql1 + sWhere + " order by HEntryID ", "h_v_Gy_TechParamByProc");
+ }
+ else
+ {
+ string sql = sql1 + sWhere + " order by HEntryID";
+ ds = oCN.RunProcReturn(sql, "h_v_Gy_TechParamByProc");
+ }
+
+ 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;
+ }
+ }
+
+ /// <summary>
+ /// 鏍规嵁鍩虹璧勬枡ID 鏌ユ壘璁板綍
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_TechParamByProc/cx")]
+ [HttpGet]
+ public object cx(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("select * from h_v_Gy_TechParamByProcList where hmainid=" + HInterID, "h_v_Gy_TechParamByProcList");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ 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;
+ }
+ }
+
+ /// <summary>
+ /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_TechParamByProc/AddBill")]
+ [HttpPost]
+ public object AddBill([FromBody] JObject oMain)
+ {
+ try
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg3 = _value.ToString();
+ string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg1 = sArray[0].ToString();
+ string msg2 = sArray[1].ToString();
+ //鍙嶅簭鍒楀寲
+ msg1 = "[" + msg1.ToString() + "]";
+
+ DAL.ClsGy_Customer_Ctl oDept = new DAL.ClsGy_Customer_Ctl();
+ DAL.ClsGy_Customer_View oDeptHlp = new DAL.ClsGy_Customer_View();
+
+ //缂栬緫鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log_second("Gy_TechnologyParameter_Add_Edit_", 1, false, msg2))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ List<TechParamByProc> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<TechParamByProc>>(msg1);
+
+ long HInterID = list[0].HInterID;
+ string HMaker = list[0].HMaker;
+ string HChecker = list[0].HChecker;
+ string HRemark = list[0].HRemark;
+ //long HStopflag = list[0].HStopflag;
+ long HMaterID = list[0].HMaterID;
+ long HProcID = list[0].HProcID;
+ long HTechParamID = list[0].HTechParamID;
+ long HTechParamUnitID = list[0].HTechParamUnitID;
+ string HStd = list[0].HStd;
+ long HDeptID = list[0].HDeptID;
+ DateTime HMakeDate = list[0].HMakeDate;
+
+ //DateTime HDeleteDate = list[0].HDeleteDate;
+
+
+ if (!DBUtility.ClsPub.AllowNumber(HStd))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ //褰撳墠鏃堕棿
+ var currentTime = DateTime.Now.ToString();
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCN.BeginTran();
+ //涓昏〃
+ oCN.RunProc("Insert into Gy_TechParamByProc " +
+ " (HInterID,HMaker,HChecker,HRemark,HMaterID" +
+ ",HProcID,HTechParamID,HTechParamUnitID,HStd,HMakeDate" +
+ ",HDeptID) " +
+ " Values('" + HInterID + "','" + HChecker + "','" + HChecker + "','" + HRemark + "','" + HMaterID + "','" + HProcID + "','" + HTechParamID + "','" + HTechParamUnitID + "','" + HStd + "','" + currentTime + "','" + HDeptID + "')");
+ //淇敼涓婄骇涓洪潪鏈骇浠g爜
+ //oCN.RunProc("Update Gy_TechParamByProc set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏂板鍗曟嵁鎴愬姛锛�";
+ //objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ //oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 淇濆瓨鎸夐挳
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_TechParamByProc/ModifyByID")]
+ [HttpPost]
+ public object ModifyByID([FromBody] JObject oMain)
+ {
+ try
+ {
+ DAL.ClsGy_Warehouse_Ctl oDept = new DAL.ClsGy_Warehouse_Ctl();
+ DAL.ClsGy_Warehouse_View oDeptHlp = new DAL.ClsGy_Warehouse_View();
+
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string msg3 = sArray[1].ToString();
+
+ //鍙嶅簭鍒楀寲
+ msg2 = "[" + msg2.ToString() + "]";
+ List<TechParamByProc> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<TechParamByProc>>(msg2);
+
+ long HInterID = list[0].HInterID;
+ string HMaker = list[0].HMaker;
+ string HChecker = list[0].HChecker;
+ string HRemark = list[0].HRemark;
+ //string HStopflag = list[0].HStopflag;
+ long HMaterID = list[0].HMaterID;
+ long HProcID = list[0].HProcID;
+ long HTechParamID = list[0].HTechParamID;
+ long HTechParamUnitID = list[0].HTechParamUnitID;
+ string HStd = list[0].HStd;
+ long HDeptID = list[0].HDeptID;
+ DateTime HMakeDate = list[0].HMakeDate;
+
+ ////鍒ゆ柇鏉冮檺
+ //if (!ClsPub.Security_Log("Gy_TechnologyParameter_Add_Edit_", 1, false, msg3))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ if (!DBUtility.ClsPub.AllowNumber(HStd))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //if (oDept.HavSameNumber(HItemID, HNumber))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "浠g爜閲嶅锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ if (HInterID == 0)
+ {
+ //褰撳墠鏃堕棿
+ var currentTime = DateTime.Now.ToString();
+ oCN.BeginTran();
+ //涓昏〃
+ oCN.RunProc("Insert into Gy_TechParamByProc " +
+ " (HInterID,HMaker,HChecker,HRemark,HMaterID" +
+ ",HProcID,HTechParamID,HTechParamUnitID,HStd,HMakeDate" +
+ ",HDeptID) " +
+ " Values('" + HInterID + "','" + HChecker + "','" + HChecker + "','" + HRemark + "','" + HMaterID + "','" + HProcID + "','" + HTechParamID + "','" + HTechParamUnitID + "','" + HStd + "','" + currentTime + "','" + HDeptID + "')");
+
+ // Convert.ToString(HEndFlag ? 1 : 0); Convert.ToString(HStopflag ? 1 : 0);HUseFlag
+ //淇敼涓婄骇涓洪潪鏈骇浠g爜
+ oCN.RunProc("Update Gy_TechnologyParameter set HEndflag=0 where HEntryID=" + HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ oCN.Commit();
+ }
+ else
+ {
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCN.BeginTran();
+ //涓昏〃
+ oCN.RunProc("Update Gy_TechParamByProc set " +
+ " HStd='" + HStd + "'" +
+ //",HName='" + HName + "'" +
+ //",HShortNumber='" + HShortNumber + "'" +
+ //",HHelpCode='" + HHelpCode + "'" +
+ //",HLevel='" + HLevel.ToString() + "'" +
+ //",HParentID='" + HParentID.ToString() + "'" +
+ //",HEndflag=" + Convert.ToString(HEndFlag ? 1 : 0) +
+ //",HStopflag=" + Convert.ToString(HStopflag ? 1 : 0) +
+ //",HUseFlag=" + Convert.ToString(HUseFlag ? 1 : 0) +
+ //",HMakeTime= getdate()" +
+ //",HMakeEmp='" + HMakeEmp + "'" +
+ /*",HRemark='" + HRemark + */"Where HEntryID='" + HInterID + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+ //淇敼瀛愰」鐩唬鐮�
+ //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Warehouse,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+ //灏嗕笂绾� 涓洪潪鏈骇
+ //oCN.RunProc("Update Gy_TechParamByProc set HEndflag=0 where HEntryID=" + HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ //
+ oCN.Commit();
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ //oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 宸ヨ壓鍙傛暟瀵瑰簲琛ㄥ垪琛ㄥ垹闄ゅ姛鑳�
+ /// </summary>
+ /// <returns></returns>
+ [Route("DeltetGy_TechParamByProc")]
+ [HttpGet]
+ public object DeltetGy_TechParamByProc(string HItemID, string user)
+ {
+ DataSet ds;
+ DataSet ds1;
+ try
+ {
+ //鍒犻櫎鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log("DeltetGy_TechnologyParameter", 1, false, user))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犲垹闄ゆ潈闄�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (string.IsNullOrWhiteSpace(HItemID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HItemID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+ ds = oCN.RunProcReturn("select * from Gy_TechParamByProc where HInterID=" + HItemID, "Gy_TechParamByProc");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ //var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]);
+ //if (HStopflag)
+ //{
+ // oCN.RollBack();//鍥炴粴浜嬪姟
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏁版嵁宸插垹闄ゆ棤娉曞啀娆″垹闄わ紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ //ds1 = oCN.RunProcReturn("Select HItemID from Gy_TechParamByProc Where HParentID='" + HItemID + "'", "Gy_TechParamByProc");
+ //if (ds1.Tables[0].Rows.Count != 0)
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "姝ら」鐩瓨鍦ㄥ瓙椤圭洰锛屼笉鑳藉垹闄わ紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ //string HUseFlag = Convert.ToString(ds.Tables[0].Rows[0]["HUseFlag"]);
+ //if (HUseFlag == "宸蹭娇鐢�")
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "姝ら」鐩凡浣跨敤锛屼笉鑳藉垹闄わ紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ oCN.RunProc("delete from Gy_TechParamByProc where HInterID=" + HItemID);
+ oCN.Commit();//鎻愪氦浜嬪姟
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "* 鏁版嵁鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Controllers/BaseSet/Gy_TechnologyController.cs b/WebAPI/Controllers/BaseSet/Gy_TechnologyController.cs
new file mode 100644
index 0000000..2c3cf50
--- /dev/null
+++ b/WebAPI/Controllers/BaseSet/Gy_TechnologyController.cs
@@ -0,0 +1,441 @@
+锘縰sing Newtonsoft.Json.Linq;
+using Pub_Class;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Web.Http;
+using WebAPI.Models;
+using WebAPI.Service;
+
+namespace WebAPI.Controllers
+{
+ public class Gy_TechnologyController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+
+ private json objJsonResult = new json();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ DataSet ds;
+
+ /// <summary>
+ /// 杩斿洖宸ヨ壓鍒楄〃
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_TechnologyParameter/list")]
+ [HttpGet]
+ public object list(string sWhere, string user, string Organization)
+ {
+ try
+ {
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_TechnologyParameter", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ string sql1 = string.Format(@"select * from h_v_Gy_TechnologyParameter where 1 =1 ");//where 缁勭粐鍚嶇О='" + Organization + "'
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn(sql1 + sWhere + " order by HItemID ", "h_v_Gy_TechnologyParameter");
+ }
+ else
+ {
+ string sql = sql1 + sWhere + " order by HItemID";
+ ds = oCN.RunProcReturn(sql, "h_v_Gy_TechnologyParameter");
+ }
+
+ 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;
+ }
+ }
+
+ /// <summary>
+ /// 鏍规嵁鍩虹璧勬枡ID 鏌ユ壘璁板綍
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_TechnologyParameter/cx")]
+ [HttpGet]
+ public object cx(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("select * from h_v_Gy_TechnologyParameterList where HitemID=" + HInterID, "h_v_Gy_TechnologyParameterList");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ 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;
+ }
+ }
+
+ /// <summary>
+ /// 宸ヨ壓鍒楄〃淇敼鎸夐挳鏂规硶
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_TechnologyParameter/xg")]
+ [HttpGet]
+ public object xg(long HInterID)
+ {
+ try
+ {
+ string sql = string.Format(@"select HItemID,HNumber 宸ヨ壓鍙傛暟浠g爜,HName 宸ヨ壓鍙傛暟鍚嶇О,HRemark 澶囨敞,HUseFlag 浣跨敤鏍囪 from Gy_TechnologyParameter" + HInterID + "'");
+ ds = oCN.RunProcReturn(sql, "Gy_TechnologyParameter");
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "";
+ 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;
+ }
+ }
+
+ /// <summary>
+ /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_TechnologyParameter/AddBill")]
+ [HttpPost]
+ public object AddBill([FromBody] JObject oMain)
+ {
+ try
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg3 = _value.ToString();
+ string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg1 = sArray[0].ToString();
+ string msg2 = sArray[1].ToString();
+ //鍙嶅簭鍒楀寲
+ msg1 = "[" + msg1.ToString() + "]";
+
+ DAL.ClsGy_Customer_Ctl oDept = new DAL.ClsGy_Customer_Ctl();
+ DAL.ClsGy_Customer_View oDeptHlp = new DAL.ClsGy_Customer_View();
+
+ //缂栬緫鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log_second("Gy_TechnologyParameter_Add_Edit_", 1, false, msg2))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ List<TechnologyParameter> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<TechnologyParameter>>(msg1);
+
+ long HItemID = list[0].HItemID;
+ string HNumber = list[0].HNumber;
+ string HName = list[0].HName;
+ string HShortNumber = list[0].HShortNumber;
+ long HParentID = list[0].HParentID;
+ long HLevel = list[0].HLevel;
+ string HEndFlag = list[0].HEndFlag;
+ string HStopflag = list[0].HStopflag;
+ string HRemark = list[0].HRemark;
+ string HHelpCode = list[0].HHelpCode;
+ string HUseFlag = list[0].HUseFlag;
+ DateTime HMakeTime = list[0].HMakeTime;
+ string HMakeEmp = list[0].HMakeEmp;
+
+ if (!DBUtility.ClsPub.AllowNumber(HNumber))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //褰撳墠鏃堕棿
+ var currentTime = DateTime.Now.ToString();
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCN.BeginTran();
+ //涓昏〃
+ oCN.RunProc("Insert into Gy_TechnologyParameter " +
+ " (HNumber,HName,HShortNumber,HParentID,HLevel" +
+ ",HEndFlag,HStopflag,HRemark,HHelpCode" +
+ ",HUseFlag,HMakeTime,HMakeEmp) " +
+ " Values('" + HNumber + "','" + HName + "','" + HShortNumber + "','" + HParentID + "','" + HLevel +
+ "','" + HEndFlag + "','" + HStopflag + "','" + HRemark +
+ "','" + HHelpCode + "','" + HUseFlag + "','" + currentTime + "','" + HMakeEmp + "')");
+ //淇敼涓婄骇涓洪潪鏈骇浠g爜
+ oCN.RunProc("Update Gy_TechnologyParameter set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏂板鍗曟嵁鎴愬姛锛�";
+ //objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 淇濆瓨鎸夐挳
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_TechnologyParameter/ModifyByID")]
+ [HttpPost]
+ public object ModifyByID([FromBody] JObject oMain)
+ {
+ try
+ {
+ DAL.ClsGy_Warehouse_Ctl oDept = new DAL.ClsGy_Warehouse_Ctl();
+ DAL.ClsGy_Warehouse_View oDeptHlp = new DAL.ClsGy_Warehouse_View();
+
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string msg3 = sArray[1].ToString();
+
+ //鍙嶅簭鍒楀寲
+ msg2 = "[" + msg2.ToString() + "]";
+ List<TechnologyParameter> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<TechnologyParameter>>(msg2);
+
+ long HItemID = list[0].HItemID;
+ string HNumber = list[0].HNumber;
+ string HName = list[0].HName;
+ string HShortNumber = list[0].HShortNumber;
+ long HParentID = list[0].HParentID;
+ long HLevel = list[0].HLevel;
+ string HEndFlag = list[0].HEndFlag;
+ string HStopflag = list[0].HStopflag;
+ string HRemark = list[0].HRemark;
+ string HHelpCode = list[0].HHelpCode;
+ string HUseFlag = list[0].HUseFlag;
+ DateTime HMakeTime = list[0].HMakeTime;
+ string HMakeEmp = list[0].HMakeEmp;
+
+ ////鍒ゆ柇鏉冮檺
+ //if (!ClsPub.Security_Log("Gy_TechnologyParameter_Add_Edit_", 1, false, msg3))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ if (!DBUtility.ClsPub.AllowNumber(HNumber))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //if (oDept.HavSameNumber(HItemID, HNumber))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "浠g爜閲嶅锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ if (HItemID == 0)
+ {
+ //褰撳墠鏃堕棿
+ var currentTime = DateTime.Now.ToString();
+ oCN.BeginTran();
+ oCN.RunProc("Insert into Gy_TechnologyParameter " +
+ " (HNumber,HName,HHelpCode,HShortNumber,HParentID,HLevel" +
+ ",HEndFlag,HStopflag,HRemark,HUseFlag,HMakeTime,HMakeEmp) " +
+ " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "','" + HParentID.ToString() +
+ "','" + HLevel.ToString() + "','" + HEndFlag + "','" + HStopflag + "','" + HRemark + "','" + HUseFlag + "','" + currentTime + "','" + HMakeEmp + "')", ref DBUtility.ClsPub.sExeReturnInfo);
+ // Convert.ToString(HEndFlag ? 1 : 0); Convert.ToString(HStopflag ? 1 : 0);HUseFlag
+ //淇敼涓婄骇涓洪潪鏈骇浠g爜
+ oCN.RunProc("Update Gy_TechnologyParameter set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+ oCN.Commit();
+ }
+ else
+ {
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCN.BeginTran();
+ //涓昏〃
+ oCN.RunProc("Update Gy_TechnologyParameter set " +
+ " HNumber='" + HNumber + "'" +
+ ",HName='" + HName + "'" +
+ ",HShortNumber='" + HShortNumber + "'" +
+ ",HHelpCode='" + HHelpCode + "'" +
+ ",HLevel='" + HLevel.ToString() + "'" +
+ ",HParentID='" + HParentID.ToString() + "'" +
+ ",HEndflag='" + HEndFlag + "'" +
+ ",HStopflag='" + HStopflag + "'" +
+ ",HUseFlag='" + HUseFlag + "'" +
+ //",HMakeTime= getdate()" +
+ ",HMakeEmp='" + HMakeEmp + "'" +
+ ",HRemark='" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+ //淇敼瀛愰」鐩唬鐮�
+ //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Warehouse,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+ //灏嗕笂绾� 涓洪潪鏈骇
+ oCN.RunProc("Update Gy_TechnologyParameter set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+ //
+ oCN.Commit();
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ //oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 宸ヨ壓鍙傛暟鍒楄〃鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("DeltetGy_TechnologyParameter")]
+ [HttpGet]
+ public object DeltetGy_TechnologyParameter(string HItemID, string user)
+ {
+ DataSet ds;
+ DataSet ds1;
+ try
+ {
+ //鍒犻櫎鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log("DeltetGy_TechnologyParameter", 1, false, user))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犲垹闄ゆ潈闄�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (string.IsNullOrWhiteSpace(HItemID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HItemID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+ ds = oCN.RunProcReturn("select * from Gy_TechnologyParameter where HItemID=" + HItemID, "Gy_TechnologyParameter");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ //var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]);
+ //if (HStopflag)
+ //{
+ // oCN.RollBack();//鍥炴粴浜嬪姟
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏁版嵁宸插垹闄ゆ棤娉曞啀娆″垹闄わ紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ ds1 = oCN.RunProcReturn("Select HItemID from Gy_TechnologyParameter Where HParentID='" + HItemID + "'", "Gy_TechnologyParameter");
+ if (ds1.Tables[0].Rows.Count != 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ら」鐩瓨鍦ㄥ瓙椤圭洰锛屼笉鑳藉垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ string HUseFlag = Convert.ToString(ds.Tables[0].Rows[0]["HUseFlag"]);
+ if (HUseFlag == "宸蹭娇鐢�")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ら」鐩凡浣跨敤锛屼笉鑳藉垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.RunProc("delete from Gy_TechnologyParameter where HItemID=" + HItemID);
+ oCN.Commit();//鎻愪氦浜嬪姟
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "* 鏁版嵁鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Controllers/BaseSet/Gy_TechnologyParUnitController.cs b/WebAPI/Controllers/BaseSet/Gy_TechnologyParUnitController.cs
new file mode 100644
index 0000000..84ed7ea
--- /dev/null
+++ b/WebAPI/Controllers/BaseSet/Gy_TechnologyParUnitController.cs
@@ -0,0 +1,417 @@
+锘縰sing Newtonsoft.Json.Linq;
+using Pub_Class;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Web.Http;
+using WebAPI.Models;
+using WebAPI.Service;
+
+namespace WebAPI.Controllers
+{
+ public class Gy_TechnologyParUnitController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+
+ private json objJsonResult = new json();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ DataSet ds;
+
+ /// <summary>
+ /// 杩斿洖宸ヨ壓鍙傛暟鍗曚綅鍒楄〃
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_TechnologyParameterUnit/list")]
+ [HttpGet]
+ public object list(string sWhere, string user, string Organization)
+ {
+ try
+ {
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_TechnologyParameterUnit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ string sql1 = string.Format(@"select * from h_v_Gy_TechnologyParameterUnit where 1 = 1");//where 缁勭粐鍚嶇О='" + Organization + "'
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn(sql1 + sWhere + " order by HItemID ", "h_v_Gy_TechnologyParameterUnit");
+ }
+ else
+ {
+ string sql = sql1 + sWhere + " order by HItemID";
+ ds = oCN.RunProcReturn(sql, "h_v_Gy_TechnologyParameterUnit");
+ }
+
+ 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;
+ }
+ }
+
+ /// <summary>
+ /// 鏍规嵁鍩虹璧勬枡ID 鏌ユ壘璁板綍
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_TechnologyParameterUnit/cx")]
+ [HttpGet]
+ public object cx(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("select * from h_v_Gy_TechnologyParameterUnitList where HitemID=" + HInterID, "h_v_Gy_TechnologyParameterUnitList");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ 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;
+ }
+ }
+
+ /// <summary>
+ /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_TechnologyParameterUnit/AddBill")]
+ [HttpPost]
+ public object AddBill([FromBody] JObject oMain)
+ {
+ try
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg3 = _value.ToString();
+ string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg1 = sArray[0].ToString();
+ string msg2 = sArray[1].ToString();
+ //鍙嶅簭鍒楀寲
+ msg1 = "[" + msg1.ToString() + "]";
+
+ DAL.ClsGy_Customer_Ctl oDept = new DAL.ClsGy_Customer_Ctl();
+ DAL.ClsGy_Customer_View oDeptHlp = new DAL.ClsGy_Customer_View();
+
+ //缂栬緫鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log_second("Gy_TechnologyParameter_Add_Edit_", 1, false, msg2))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ List<TechnologyParameterUnit> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<TechnologyParameterUnit>>(msg1);
+
+ long HItemID = list[0].HItemID;
+ string HNumber = list[0].HNumber;
+ string HName = list[0].HName;
+ string HShortNumber = list[0].HShortNumber;
+ long HParentID = list[0].HParentID;
+ long HLevel = list[0].HLevel;
+ string HEndFlag = list[0].HEndFlag;
+ string HStopflag = list[0].HStopflag;
+ string HRemark = list[0].HRemark;
+ string HHelpCode = list[0].HHelpCode;
+ string HUseFlag = list[0].HUseFlag;
+ DateTime HMakeTime = list[0].HMakeTime;
+ string HMakeEmp = list[0].HMakeEmp;
+
+ //DateTime HDeleteDate = list[0].HDeleteDate;
+
+
+ if (!DBUtility.ClsPub.AllowNumber(HNumber))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ //褰撳墠鏃堕棿
+ var currentTime = DateTime.Now.ToString();
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCN.BeginTran();
+ //涓昏〃
+ oCN.RunProc("Insert into Gy_TechnologyParameterUnit " +
+ " (HNumber,HName,HShortNumber,HParentID,HLevel" +
+ ",HEndFlag,HStopflag,HRemark,HHelpCode" +
+ ",HUseFlag,HMakeTime,HMakeEmp) " +
+ " Values('" + HNumber + "','" + HName + "','" + HShortNumber + "','" + HParentID + "','" + HLevel +
+ "','" + HEndFlag + "','" + HStopflag + "','" + HRemark +
+ "','" + HHelpCode + "','" + HUseFlag + "','" + currentTime + "','" + HMakeEmp + "')");
+ //淇敼涓婄骇涓洪潪鏈骇浠g爜
+ oCN.RunProc("Update Gy_TechnologyParameterUnit set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏂板鍗曟嵁鎴愬姛锛�";
+ //objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 淇濆瓨鎸夐挳
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_TechnologyParameterUnit/ModifyByID")]
+ [HttpPost]
+ public object ModifyByID([FromBody] JObject oMain)
+ {
+ try
+ {
+ DAL.ClsGy_Warehouse_Ctl oDept = new DAL.ClsGy_Warehouse_Ctl();
+ DAL.ClsGy_Warehouse_View oDeptHlp = new DAL.ClsGy_Warehouse_View();
+
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string msg3 = sArray[1].ToString();
+
+ //鍙嶅簭鍒楀寲
+ msg2 = "[" + msg2.ToString() + "]";
+ List<TechnologyParameterUnit> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<TechnologyParameterUnit>>(msg2);
+
+ long HItemID = list[0].HItemID;
+ string HNumber = list[0].HNumber;
+ string HName = list[0].HName;
+ string HShortNumber = list[0].HShortNumber;
+ long HParentID = list[0].HParentID;
+ long HLevel = list[0].HLevel;
+ string HEndFlag = list[0].HEndFlag;
+ string HStopflag = list[0].HStopflag;
+ string HRemark = list[0].HRemark;
+ string HHelpCode = list[0].HHelpCode;
+ string HUseFlag = list[0].HUseFlag;
+ DateTime HMakeTime = list[0].HMakeTime;
+ string HMakeEmp = list[0].HMakeEmp;
+
+ ////鍒ゆ柇鏉冮檺
+ //if (!ClsPub.Security_Log("Gy_TechnologyParameter_Add_Edit_", 1, false, msg3))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ //if (!DBUtility.ClsPub.AllowNumber(HNumber))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ //if (oDept.HavSameNumber(HItemID, HNumber))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "浠g爜閲嶅锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ if (HItemID == 0)
+ {
+ //褰撳墠鏃堕棿
+ var currentTime = DateTime.Now.ToString();
+ oCN.BeginTran();
+ oCN.RunProc("Insert into Gy_TechnologyParameterUnit " +
+ " (HNumber,HName,HHelpCode,HShortNumber,HParentID,HLevel" +
+ ",HEndFlag,HStopflag,HRemark,HUseFlag,HMakeTime,HMakeEmp) " +
+ " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "','" + HParentID.ToString() +
+ "','" + HLevel.ToString() + "','" + HEndFlag + "','" + HStopflag + "','" + HRemark + "','" + HUseFlag + "','" + currentTime + "','" + HMakeEmp + "')", ref DBUtility.ClsPub.sExeReturnInfo);
+ // Convert.ToString(HEndFlag ? 1 : 0); Convert.ToString(HStopflag ? 1 : 0);HUseFlag
+ //淇敼涓婄骇涓洪潪鏈骇浠g爜
+ oCN.RunProc("Update Gy_TechnologyParameterUnit set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+ oCN.Commit();
+ }
+ else
+ {
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCN.BeginTran();
+ //涓昏〃
+ oCN.RunProc("Update Gy_TechnologyParameterUnit set " +
+ " HNumber='" + HNumber + "'" +
+ ",HName='" + HName + "'" +
+ ",HShortNumber='" + HShortNumber + "'" +
+ ",HHelpCode='" + HHelpCode + "'" +
+ ",HLevel='" + HLevel.ToString() + "'" +
+ ",HParentID='" + HParentID.ToString() + "'" +
+ ",HEndflag='" + HEndFlag + "'" +
+ ",HStopflag='" + HStopflag + "'" +
+ ",HUseFlag='" + HUseFlag + "'" +
+ //",HMakeTime= getdate()" +
+ ",HMakeEmp='" + HMakeEmp + "'" +
+ ",HRemark='" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+ //淇敼瀛愰」鐩唬鐮�
+ //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Warehouse,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+ //灏嗕笂绾� 涓洪潪鏈骇
+ oCN.RunProc("Update Gy_TechnologyParameterUnit set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+ //
+ oCN.Commit();
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 宸ヨ壓鍙傛暟鍗曚綅鍒楄〃鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("DeltetGy_TechnologyParameterUnit")]
+ [HttpGet]
+ public object DeltetGy_TechnologyParameterUnit(string HItemID, string user)
+ {
+ DataSet ds;
+ DataSet ds1;
+ try
+ {
+ //鍒犻櫎鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log("DeltetGy_TechnologyParameter", 1, false, user))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犲垹闄ゆ潈闄�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (string.IsNullOrWhiteSpace(HItemID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HItemID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+ ds = oCN.RunProcReturn("select * from Gy_TechnologyParameterUnit where HItemID=" + HItemID, "Gy_TechnologyParameterUnit");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ //var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]);
+ //if (HStopflag)
+ //{
+ // oCN.RollBack();//鍥炴粴浜嬪姟
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏁版嵁宸插垹闄ゆ棤娉曞啀娆″垹闄わ紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ ds1 = oCN.RunProcReturn("Select HItemID from Gy_TechnologyParameterUnit Where HParentID='" + HItemID + "'", "Gy_TechnologyParameterUnit");
+ if (ds1.Tables[0].Rows.Count != 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ら」鐩瓨鍦ㄥ瓙椤圭洰锛屼笉鑳藉垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ string HUseFlag = Convert.ToString(ds.Tables[0].Rows[0]["HUseFlag"]);
+ if (HUseFlag == "宸蹭娇鐢�")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ら」鐩凡浣跨敤锛屼笉鑳藉垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.RunProc("delete from Gy_TechnologyParameterUnit where HItemID=" + HItemID);
+ oCN.Commit();//鎻愪氦浜嬪姟
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "* 鏁版嵁鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Controllers/CJGL/ProductionPlanReportController.cs b/WebAPI/Controllers/CJGL/ProductionPlanReportController.cs
index 81dd391..4703549 100644
--- a/WebAPI/Controllers/CJGL/ProductionPlanReportController.cs
+++ b/WebAPI/Controllers/CJGL/ProductionPlanReportController.cs
@@ -27,7 +27,8 @@
public DateTime HEndDate;
public string HICMOBillNo;
public string HWorkShopID;
- public string HSeOrderBillNo;
+ public string F_BSV_WYID;
+ public string HBillNo;
public string HMaterNumber;
}
[Route("ProductionPlanReport/ProductionPlanReportList")]
@@ -40,7 +41,7 @@
ProductionPlanReport com = JsonConvert.DeserializeObject<ProductionPlanReport>(sWhere.ToString());
ds = oCN.RunProcReturn($"exec h_p_Cj_ProductionPlanReportList {com.HOrgID},'{com.HBeginDate}','{com.HEndDate}'" +
- $",'{com.HICMOBillNo}',{com.HWorkShopID},'{com.HSeOrderBillNo}','{com.HMaterNumber}'", "h_p_Cj_ProductionPlanReportList");
+ $",'{com.HICMOBillNo}',{com.HWorkShopID},'{com.F_BSV_WYID}','{com.HMaterNumber}','{com.HBillNo}'", "h_p_Cj_ProductionPlanReportList");
objJsonResult.code = "1";
objJsonResult.count = 1;
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index 22b9f58..feb8c57 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -32,13 +32,13 @@
{
ds = oCN.RunProcReturn("select * from h_v_MES_StationInBillList", "h_v_MES_StationInBillList");
}
- else
+ else
{
string sql1 = "select * from h_v_MES_StationInBillList where 1 = 1 ";
string sql = sql1 + sWhere;
ds = oCN.RunProcReturn(sql, "h_v_MES_StationInBillList");
}
-
+
}
catch (Exception e)
{
@@ -54,7 +54,7 @@
/// </summary>
[Route("LEMS/MES_Sc_ProcessExchangeBillQuery_Json")]
[HttpGet]
- public object MES_Sc_ProcessExchangeBillList_Json(string sWhere,string user)
+ public object MES_Sc_ProcessExchangeBillList_Json(string sWhere, string user)
{
DataSet ds;
try
@@ -70,7 +70,7 @@
//}
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere+ " order by hmainid desc ", "h_v_Sc_ProcessExchangeBillQuery");
+ ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeBillQuery");
//if (ds.Tables[0].Rows.Count != 0 || ds != null)
//{
@@ -114,7 +114,7 @@
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
string sql = "select * from h_v_Sc_ProcessExchangeBillQuerySub where hmainid = ";
string sql1 = sql + sWhere;
- ds = oCN.RunProcReturn(sql1+ " order by cast(宸ュ簭鍙� as int)", "h_v_Sc_ProcessExchangeBillQuerySub");
+ ds = oCN.RunProcReturn(sql1 + " order by cast(宸ュ簭鍙� as int)", "h_v_Sc_ProcessExchangeBillQuerySub");
}
catch (Exception e)
{
@@ -126,6 +126,8 @@
}
return GetObjectJson(ds);
}
+
+ #region 宸ュ簭娴佽浆鍗★紙涓嬭揪锛�
/// <summary>
/// 杩斿洖宸ュ簭娴佽浆鍗★紙涓嬭揪锛夊垪琛�
@@ -167,12 +169,13 @@
}
}
/// <summary>
- /// 涓嬭揪
+ /// 宸ュ簭娴佽浆鍗′笅杈�
/// </summary>
/// <returns></returns>
[Route("LEMS/MES_Sc_ProcessExchangeIssue")]
[HttpGet]
- public object MES_Sc_ProcessExchangeIssue(string HGroupID, string HSourceID, string HEntryId) {
+ public object MES_Sc_ProcessExchangeIssue(string HGroupID, string HSourceID, string HEntryId)
+ {
DataSet ds;
try
{
@@ -193,6 +196,57 @@
return objJsonResult;
}
}
+
+ /// <summary>
+ /// 宸ュ簭娴佽浆鍗″弽涓嬭揪
+ /// </summary>
+ /// <returns></returns>
+ [Route("LEMS/MES_Sc_ProcessExchangeCancelIssue")]
+ [HttpGet]
+ public object MES_Sc_ProcessExchangeCancelIssue(string HEntryId)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ string sql = string.Empty;
+ //鍒犻櫎鐢熶骇鐘舵�佽〃涓存椂琛ㄦ暟鎹�
+ sql = string.Format(@"
+delete from Sc_ICMOBillStatus_Tmp
+where
+cast(HSOURCEINTERID as varchar(20)) +'-'+ cast(HSOURCEENTRYID as varchar(20)) in
+(
+select * from fn_Split('{0}',',')
+)", HEntryId);
+ oCN.RunProc(sql);
+ //鏇存敼璁㈠崟鐘舵��
+ sql = string.Format(@"
+update Sc_ProcessExchangeBillSub set
+HGroupID=0, --鐝粍
+HSourceID=0, --鐢熶骇璧勬簮
+HIssue = 0 --涓嬭揪鐘舵��
+where cast(HInterID as varchar(20)) +'-'+ cast(HEntryID as varchar(20)) in
+(
+select * from fn_Split('{0}',',')
+)", HEntryId);
+ oCN.RunProc(sql);
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎿嶄綔鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "寮傚父锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
/// <summary>
/// 杩斿洖宸ュ簭鍑虹珯姹囨姤鍗曞垪琛�
@@ -268,7 +322,7 @@
/// </summary>
[Route("LEMS/MES_Gy_RoutingBillList_Json")]
[HttpGet]
- public object MES_Gy_RoutingBillList_Json(string sWhere,string user)
+ public object MES_Gy_RoutingBillList_Json(string sWhere, string user)
{
DataSet ds;
try
@@ -291,7 +345,7 @@
else
{
string sql1 = "select top 1000 * from h_v_Gy_RoutingBillList where 1 = 1 ";
- string sql = sql1 + sWhere+ " order by hmainid desc,cast(宸ュ簭鍙� as int)";
+ string sql = sql1 + sWhere + " order by hmainid desc,cast(宸ュ簭鍙� as int)";
ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillList");
}
}
@@ -315,7 +369,7 @@
/// <returns></returns>
[Route("LEMS/DeltetGy_RoutingBillSub")]
[HttpGet]
- public object DeltetGy_RoutingBillSub(Int64 lngBillKey,string user)
+ public object DeltetGy_RoutingBillSub(Int64 lngBillKey, string user)
{
DataSet ds;
string ModRightNameCheck = "Gy_RoutingBill_Drop";
@@ -441,7 +495,7 @@
/// </summary>
[Route("LEMS/MES_IF_ICMOBillList_Json")]
[HttpGet]
- public object MES_IF_ICMOBillList_Json(string sWhere,string user)
+ public object MES_IF_ICMOBillList_Json(string sWhere, string user)
{
DataSet ds;
try
@@ -808,7 +862,7 @@
/// </summary>
[Route("LEMS/Update_Gy_BarCodeBill_HQty")]
[HttpGet]
- public object Update_Gy_BarCodeBill_HQty(string HBarCode,string HQty)
+ public object Update_Gy_BarCodeBill_HQty(string HBarCode, string HQty)
{
DataSet ds;
try
@@ -886,7 +940,7 @@
{
ds = oCN.RunProcReturn("exec h_p_Save_KF_PonderationBillMain_TempToSc_PackUnionBillMain '" + HBillNo + "',''", "h_p_Save_KF_PonderationBillMain_TempToSc_PackUnionBillMain");
}
- else
+ else
{
ds = oCN.RunProcReturn("exec h_p_Save_KF_PonderationBillMain_TempToSc_PackUnionBillMain '" + HBillNo + "','" + HRemark + "'", "h_p_Save_KF_PonderationBillMain_TempToSc_PackUnionBillMain");
}
@@ -1330,6 +1384,6 @@
}
-
+
}
}
\ No newline at end of file
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
index aa4c080..3e51d5e 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
@@ -20,6 +21,14 @@
public DAL.ClsSc_MouldMaintainRuleBill BillNew = new DAL.ClsSc_MouldMaintainRuleBill(); //瀵瑰簲鍗曟嵁绫�
public DAL.ClsSc_MouldMaintainRuleBill BillOld = new DAL.ClsSc_MouldMaintainRuleBill(); //瀵瑰簲鍗曟嵁绫�
+
+ //public class HlpBill
+ //{
+ // public int HSouceInterID = 0;
+ // public int HSourceEntryID = 0;
+ // public int Type = 0;
+ // public string user { get; set; }
+ //}
#region 鍣ㄥ叿淇濆吇瑙勭▼鍗曞垪琛�
[Route("Sc_MouldMaintainRuleBill/GetMouldMaintainRuleList")]
[HttpGet]
@@ -27,6 +36,9 @@
{
try
{
+ List<object> columnNameList = new List<object>();
+ //鍙嶅簭鍒楀寲浼犻�掔殑鍊�
+ //HlpBill com = JsonConvert.DeserializeObject<HlpBill>(sWhere.ToString());
//缂栬緫鏉冮檺
if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainRuleBillList", 1, false, user))
{
@@ -48,12 +60,21 @@
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleBillList");
}
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
//if (ds.Tables[0].Rows.Count != 0 || ds != null)
//{
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
//}
//else
diff --git a/WebAPI/Controllers/POStockInBillController.cs b/WebAPI/Controllers/POStockInBillController.cs
index aa1353d..1e8517e 100644
--- a/WebAPI/Controllers/POStockInBillController.cs
+++ b/WebAPI/Controllers/POStockInBillController.cs
@@ -1474,8 +1474,12 @@
DAL.ClsCg_POInStockBill oBill = new DAL.ClsCg_POInStockBill();
var hinterID = list[0].HInterID;
var FID = list[0].FID;
+
+ #region 閲戣澏瀹℃牳鍚庝細閲嶆柊鍚屾鍗曟嵁鍒癿es 鏁呬笉闇�瑕佹洿鏂癿es鐨勬敹鏂欓�氱煡鍗�
+ /*
oCn.BeginTran();
string sql = string.Empty;
+
foreach (var item in list)
{
if (item.HSQty == 0)
@@ -1484,6 +1488,15 @@
oCn.RunProc(sql);
}
oCn.RunProc("exec h_p_Cg_UpDatePOOrderRelation_Del " + hinterID);//鍒犻櫎鍏宠仈鍏崇郴
+ sql = string.Format(@"update Cg_POInStockBillMain set
+HBillStatus = 2 ,
+HCheckDate = getdate()
+where HInterID in ({0})", HInterID);
+ oCn.RunProc(sql);//鏇存柊mes鐘舵��
+ //鏇存柊鎴愬姛鍚� 鍚屾鏇存柊閲戣澏
+ oCn.Commit();
+ **/
+ #endregion
JObject jsonRoot = new JObject();
jsonRoot.Add("Creator", "");
@@ -1502,10 +1515,10 @@
continue;
JObject jsonFPOOrderEntry = new JObject();
jsonFPOOrderEntry.Add("FEntryID", item.FEntryID);
- jsonFPOOrderEntry.Add("FHQty ", item.HSQty); ;
+ jsonFPOOrderEntry.Add("FActReceiveQty ", item.HSQty); ;
Entry.Add(jsonFPOOrderEntry);
}
- jsonModel.Add("FEntity", Entry);
+ jsonModel.Add("FDetailEntity", Entry);
jsonRoot.Add("Model", jsonModel);
var loginRet = InvokeHelper.Login();
var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
@@ -1519,7 +1532,7 @@
}
var result = InvokeHelper.Save("PUR_ReceiveBill", jsonRoot.ToString());
//LogService.Write(result);
- if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE")
+ if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
{
LogService.Write("鏀舵枡閫氱煡鍗曚慨鏀瑰け璐sonRoot:" + jsonRoot.ToString());
objJsonResult.code = "0";
@@ -1559,13 +1572,7 @@
}
- sql = string.Format(@"update Cg_POInStockBillMain set
-HBillStatus = 2 ,
-HCheckDate = getdate()
-where HInterID in ({0})", HInterID);
- oCn.RunProc(sql);//鏇存柊mes鐘舵��
- //鏇存柊鎴愬姛鍚� 鍚屾鏇存柊閲戣澏
- oCn.Commit();
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "鎿嶄綔鎴愬姛锛�";
@@ -1574,7 +1581,7 @@
}
catch (Exception e)
{
- oCn.RollBack();
+ //oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "寮傚父锛�" + e.ToString();
@@ -1596,8 +1603,9 @@
{
try
{
+ //var code = HBarcode.Split('#')[0];
//鏍¢獙鏉$爜鏄惁瀛樺湪
- string sql = $"select* from Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode}'";
+ string sql = $"select* from Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode.Split('#')[0]}' and HQty = {HBarcode.Split('#')[1]}";
DataSet ds = oCn.RunProcReturn(sql, "H_v_SRM_POOrderBillList");
if (ds.Tables[0].Rows.Count == 0)
{
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
index f9afe77..b3468e2 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections.Generic;
@@ -28,6 +29,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
if (!DBUtility.ClsPub.Security_Log("Sb_EquipDotCheckBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -46,13 +48,20 @@
string sql = sql1 + sWhere + " order by hmainid desc";
ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBillList");
}
-
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
//if (ds.Tables[0].Rows.Count != 0 || ds != null)
//{
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
//}
//else
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs
index e63541b..1b8df03 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
@@ -27,6 +28,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
if (!DBUtility.ClsPub.Security_Log("Sb_EquipDotCheckRuleBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -47,12 +49,20 @@
ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckRuleList");
}
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
//if (ds.Tables[0].Rows.Count != 0 || ds != null)
//{
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
//}
//else
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs
index e394350..e6b4811 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections.Generic;
@@ -29,6 +30,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
if (!DBUtility.ClsPub.Security_Log("Sb_EquipMaintainBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -48,12 +50,21 @@
ds = oCN.RunProcReturn(sql, "h_v_Sc_EquipMaintain");
}
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
//if (ds.Tables[0].Rows.Count != 0 || ds != null)
//{
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
//}
//else
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs
index 5da67af..0467e3a 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
@@ -26,6 +27,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
if (!DBUtility.ClsPub.Security_Log("Sb_EquipMaintainRuleBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -46,12 +48,20 @@
ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMaintainRuleList");
}
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
//if (ds.Tables[0].Rows.Count != 0 || ds != null)
//{
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
//}
//else
diff --git a/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs b/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs
index bed3260..20e9a95 100644
--- a/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs
+++ b/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections.Generic;
@@ -35,6 +36,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairWorkBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -46,10 +48,19 @@
ds = Sb_EquipRepairWorkBill_s(sWhere);
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
}
catch (Exception ex)
@@ -151,6 +162,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
if (!DBUtility.ClsPub.Security_Log("Sb_EquipConkBookBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -162,10 +174,19 @@
ds = Sb_EqpConkBookBillList_s(sWhere);
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
}
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index 8b371b4..a3149ea 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections.Generic;
@@ -188,6 +189,8 @@
{
try
{
+ List<object> columnNameList = new List<object>();
+
if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -199,12 +202,20 @@
ds = Sc_MouldMaintainBillList_s(sWhere);
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
//if (ds.Tables[0].Rows.Count != 0 || ds != null)
//{
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
//}
//else
@@ -315,6 +326,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -325,12 +337,22 @@
}
ds = Sc_MouldDotCheckBillList_s(sWhere);
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
//if (ds.Tables[0].Rows.Count != 0 || ds != null)
//{
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+
return objJsonResult;
//}
//else
@@ -479,6 +501,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -490,10 +513,19 @@
ds = Sc_MouldConkBookBillList_s(sWhere);
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
}
catch (Exception ex)
@@ -654,6 +686,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -665,12 +698,21 @@
ds = Sc_MouldRepairWorkBillList_s(sWhere);
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
//if (ds.Tables[0].Rows.Count != 0 || ds != null)
//{
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
//}
//else
@@ -5544,6 +5586,8 @@
{
try
{
+ List<object> columnNameList = new List<object>();
+
if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -5555,10 +5599,19 @@
ds = Sc_GetMouldLifeChangeBill(sWhere);
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
}
catch (Exception ex)
diff --git a/WebAPI/Controllers/Sc_ProcessMangementController.cs b/WebAPI/Controllers/Sc_ProcessMangementController.cs
index 5e361fe..aaf700a 100644
--- a/WebAPI/Controllers/Sc_ProcessMangementController.cs
+++ b/WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -257,7 +257,7 @@
FentityModel.Add("FCostRate", dr1["FCostRate"].ToString());// 鎴愭湰鏉冮噸
FentityModel.Add("FISBACKFLUSH", dr1["FISBACKFLUSH"].ToString() == "1" ? true : false);// 鍊掑啿棰嗘枡
FentityModel.Add("F_bsv_Base1", new JObject() { ["Fnumber"] = dr1["FPREBDONENUMBER"].ToString() }); //鍖呰鏍囪瘑
- FentityModel.Add("FLot", new JObject() { ["FNumber"] = dr1["FBATCHNO"].ToString() }); //鍖呰鏍囪瘑
+ FentityModel.Add("FLot", new JObject() { ["FNumber"] = dr1["FBATCHNO"].ToString() }); //鎵瑰彿
//鎵瑰彿
//FFLOWID FFLOWLINEID FRULEID FSTABLENAME
//f6e6eec3 - 5267 - 4f02 - 8593 - b633da508a72 3 PRD_MO2MORPT T_PRD_MOENTRY
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_GroupEmpBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_GroupEmpBillController.cs"
index a4e787c..3f587ac 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_GroupEmpBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_GroupEmpBillController.cs"
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
@@ -32,6 +33,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
if (!DBUtility.ClsPub.Security_Log("Gy_Group", 1, false, user))
{
objJsonResult.code = "0";
@@ -43,10 +45,19 @@
ds = Sc_GetGroupEmpBill(sWhere);
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
}
catch (Exception ex)
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_PurchaseWallclothBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_PurchaseWallclothBillController.cs"
new file mode 100644
index 0000000..ef6426d
--- /dev/null
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_PurchaseWallclothBillController.cs"
@@ -0,0 +1,257 @@
+锘縰sing Newtonsoft.Json.Linq;
+using Pub_Class;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers
+{
+
+ public class Pay_PurchaseWallclothBillController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+
+ private json objJsonResult = new json();
+ public DataSet ds = new DataSet();
+ public WebServer webserver = new WebServer();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ /// <summary>
+ /// 杩斿洖宸ヨ祫缁撶畻涓汉鍒楄〃(涓汉)
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Pay_PurchaseWallclothBill/GetSingleBalBill")]
+ [HttpGet]
+ public object GetSingleBalBill(string sWhere, string user)
+ {
+ try
+ {
+
+ ds = Sc_GetSingleBalBill(sWhere);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ public static DataSet Sc_GetSingleBalBill(string sWhere)
+ {
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Pay_PurchaseWallclothBillMain order by hinterid desc", "h_v_Pay_PurchaseWallclothBillList");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_Pay_PurchaseWallclothBillMain where 1 = 1 ";
+ string sql = sql1 + sWhere + " order by hinterid desc";
+ return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Pay_PurchaseWallclothBillList");
+ }
+
+ }
+
+ #region[宸ヨ祫缁撶畻涓汉鍗曠紪杈戞椂鑾峰彇琛ㄥご鏁版嵁]
+ [Route("Pay_PurchaseWallclothBill/Pay_PurchaseWallclothBillListCheckDetail")]
+ [HttpGet]
+ public ApiResult<DataSet> Pay_PurchaseWallclothBillListCheckDetail(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Pay_PurchaseWallclothBillMain where HInterID= " + HID + " ", "Pay_PurchaseWallclothBillMain");
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄧ粨绠楀崟鍙�" };
+
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+ #endregion
+
+ #region[宸ヨ祫缁撶畻涓汉鍗曠紪杈戞椂鑾峰彇琛ㄤ綋鏁版嵁]
+ [Route("Pay_PurchaseWallclothBill/Pay_PurchaseWallclothBillListProjectDetai")]
+ [HttpGet]
+ public object Pay_PurchaseWallclothBillListProjectDetai(string sqlWhere)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ string sql1 = "SELECT * FROM Pay_PurchaseWallclothBillSub where 1 = 1 ";
+ string sql = sql1 + sqlWhere;
+ ds = oCN.RunProcReturn(sql, "h_v_Pay_PurchaseWallclothBillList");
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
+
+ [Route("Pay_PurchaseWallclothBill/SaveGetSingleBalBillList")]
+ [HttpPost]
+ /// <summary>
+ /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ public object SaveGetSingleBalBillList([FromBody] JObject msg)
+ {
+ var _value = msg["msg"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();//涓昏〃
+ string msg3 = sArray[1].ToString();//瀛愯〃
+ string refSav = sArray[2].ToString();//add update
+ string msg4 = sArray[3].ToString();//鎿嶄綔鐢ㄦ埛
+
+ string sql = string.Empty;
+ ListModels oListModels = new ListModels();
+ try
+ {
+ var lsmain = Newtonsoft.Json.JsonConvert.DeserializeObject<ClsPay_PurchaseWallclothBillMain>(msg2);
+ var DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsPay_PurchaseWallclothBillSub>>(msg3);
+ oCN.BeginTran();
+ if (refSav == "Add")
+ {
+ sql = string.Format(@"
+INSERT INTO [dbo].[Pay_PurchaseWallclothBillMain]([HInterID],[HBillType]
+,[HBillSubType],[HDate],[HBillNo],[HBillStatus],[HGroupID1],[HGroupID2],[HGroupID3]
+,[HEmpID1],[HEmpID2],[HEmpID3],[HEmpID4],[HEmpID5],[HEmpID6],[HRemark],[HMaker],[HMakeDate]
+,[HUpDater],[HUpDateDate]) select '{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}','{15}','{16}','{17}','{18}','{19}'"
+, lsmain.HInterID, "7789", lsmain.HBillSubType, lsmain.HDate, lsmain.HBillNo, lsmain.HBillStatus, lsmain.HGroupID1
+, lsmain.HGroupID2, lsmain.HGroupID3, lsmain.HEmpID1, lsmain.HEmpID2, lsmain.HEmpID3, lsmain.HEmpID4, lsmain.HEmpID5, lsmain.HEmpID6, lsmain.HRemark
+, lsmain.HMaker, lsmain.HMakeDate, lsmain.HUpDater, lsmain.HUpDateDate);
+ oCN.RunProc(sql);
+ int HEntryID = 1;
+ foreach (var item in DetailColl)
+ {
+ sql = string.Format(@"insert into[Pay_PurchaseWallclothBillSub]([HInterID],[HEntryID],[HSelOrderNo],[HRemark]) select {0},{1},'{2}','{3}'"
+, lsmain.HInterID, HEntryID, item.HSelOrderNo,item.HRemark);
+ oCN.RunProc(sql);
+ HEntryID++;
+ }
+ }
+ else if (refSav == "Update")
+ {
+ sql = string.Format(@"
+update [Pay_PurchaseWallclothBillMain] set
+[HGroupID1] = {0},
+[HGroupID2] = {1},
+[HGroupID3] = {2},
+[HEmpID1] = {3},
+[HEmpID2] = {4},
+[HEmpID3] = {5},
+[HEmpID4] = {6},
+[HEmpID5] = {7},
+[HEmpID6] = {8},
+[HRemark] = '{9}',
+[HUpDater] = {10},
+[HUpDateDate] = '{11}',
+where HInterID = {12}",
+lsmain.HGroupID1,
+lsmain.HGroupID2,
+lsmain.HGroupID3,
+lsmain.HEmpID1,
+lsmain.HEmpID2,
+lsmain.HEmpID3,
+lsmain.HEmpID4,
+lsmain.HEmpID5,
+lsmain.HEmpID6,
+lsmain.HRemark,
+lsmain.HUpDater,
+lsmain.HUpDateDate,
+lsmain.HInterID);
+ oCN.RunProc(sql);
+ sql = $"delete Pay_PurchaseWallclothBillSub where HinterID = {lsmain.HInterID}";
+ oCN.RunProc(sql);
+ int HEntryID = 1;
+ foreach (var item in DetailColl)
+ {
+ sql = string.Format(@"insert into[Pay_PurchaseWallclothBillSub]([HInterID],[HEntryID],[HSelOrderNo],[HRemark]) select {0},{1},'{2}','{3}'"
+, lsmain.HInterID, HEntryID, item.HSelOrderNo, item.HRemark);
+ oCN.RunProc(sql);
+ HEntryID++;
+ }
+ }
+ oCN.Commit();
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ objJsonResult.data = 1;
+ return objJsonResult;
+
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ ///宸ヨ祫缁撶畻涓汉鍗曞垹闄ゅ姛鑳�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Pay_PurchaseWallclothBill/DeltetSingleBalBill")]
+ [HttpGet]
+ public object Pay_PurchaseWallclothBill(string HInterID, string user)
+ {
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Pay_PurchaseWallclothBill_Drop", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ oCN.BeginTran();
+ oCN.RunProc("Delete From Pay_PurchaseWallclothBillMain where HInterID = " + HInterID);
+ oCN.RunProc("Delete From Pay_PurchaseWallclothBillSub where HInterID = " + HInterID);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Models/TechParamByProc.cs b/WebAPI/Models/TechParamByProc.cs
new file mode 100644
index 0000000..9c067ea
--- /dev/null
+++ b/WebAPI/Models/TechParamByProc.cs
@@ -0,0 +1,23 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models
+{
+ public class TechParamByProc
+ {
+ public long HInterID { get; set; }
+ public string HMaker { get; set; }
+ public string HChecker { get; set; }
+ public string HRemark { get; set; }
+ public string HStopflag { get; set; }
+ public long HMaterID { get; set; }
+ public int HProcID { get; set; }
+ public Int64 HTechParamID { get; set; }
+ public Int64 HTechParamUnitID { get; set; }
+ public string HStd { get; set; }
+ public Int64 HDeptID { get; set; }
+ public DateTime HMakeDate { get; set; }
+ }
+}
diff --git a/WebAPI/Models/TechnologyParameter.cs b/WebAPI/Models/TechnologyParameter.cs
new file mode 100644
index 0000000..3afba5b
--- /dev/null
+++ b/WebAPI/Models/TechnologyParameter.cs
@@ -0,0 +1,23 @@
+锘縰sing System;
+using System.Web;
+
+namespace WebAPI.Models
+{
+ public class TechnologyParameter
+ {
+ public long HItemID { get; set; }
+ public string HNumber { get; set; }
+ public string HName { get; set; }
+ public string HShortNumber { get; set; }
+ public long HParentID { get; set; }
+ public long HLevel { get; set; }
+ public string HEndFlag { get; set; }
+ public string HStopflag { get; set; }
+ public string HRemark { get; set; }
+ public string HHelpCode { get; set; }
+ public string HUseFlag { get; set; }
+ public DateTime HMakeTime { get; set; }
+ public string HMakeEmp { get; set; }
+
+ }
+}
diff --git a/WebAPI/Models/TechnologyParameterUnit.cs b/WebAPI/Models/TechnologyParameterUnit.cs
new file mode 100644
index 0000000..1ea2225
--- /dev/null
+++ b/WebAPI/Models/TechnologyParameterUnit.cs
@@ -0,0 +1,24 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models
+{
+ public class TechnologyParameterUnit
+ {
+ public long HItemID { get; set; }
+ public string HNumber { get; set; }
+ public string HName { get; set; }
+ public string HShortNumber { get; set; }
+ public long HParentID { get; set; }
+ public long HLevel { get; set; }
+ public string HEndFlag { get; set; }
+ public string HStopflag { get; set; }
+ public string HRemark { get; set; }
+ public string HHelpCode { get; set; }
+ public string HUseFlag { get; set; }
+ public DateTime HMakeTime { get; set; }
+ public string HMakeEmp { get; set; }
+ }
+}
\ No newline at end of file
diff --git "a/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_PurchaseWallclothBillMain.cs" "b/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_PurchaseWallclothBillMain.cs"
new file mode 100644
index 0000000..1b89031
--- /dev/null
+++ "b/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_PurchaseWallclothBillMain.cs"
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+ public class ClsPay_PurchaseWallclothBillMain : DBUtility.ClsXt_BaseBillMain
+ {
+ public Int64 HGroupID1;
+ public Int64 HGroupID2;
+ public Int64 HGroupID3;
+
+ public Int64 HEmpID1;
+ public Int64 HEmpID2;
+ public Int64 HEmpID3;
+ public Int64 HEmpID4;
+ public Int64 HEmpID5;
+ public Int64 HEmpID6;
+
+ }
+}
diff --git "a/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_PurchaseWallclothBillSub.cs" "b/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_PurchaseWallclothBillSub.cs"
new file mode 100644
index 0000000..61415cd
--- /dev/null
+++ "b/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_PurchaseWallclothBillSub.cs"
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+ public class ClsPay_PurchaseWallclothBillSub : DBUtility.ClsXt_BaseBillSub
+ {
+ public string HSelOrderNo;
+ }
+}
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 7a9497b..dd0a2ec 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -440,6 +440,7 @@
<Compile Include="Controllers\PurchaseOrderController.cs" />
<Compile Include="Controllers\QC_POStockInCheckBillController.cs" />
<Compile Include="Controllers\宸ヨ祫绠$悊\Gy_GroupEmpBillController.cs" />
+ <Compile Include="Controllers\宸ヨ祫绠$悊\Pay_PurchaseWallclothBillController.cs" />
<Compile Include="Controllers\宸ヨ祫绠$悊\Pay_WorkTimesBillController.cs" />
<Compile Include="Controllers\宸ヨ祫绠$悊\Pay_SingleBalBillController.cs" />
<Compile Include="Controllers\ProductionOrderController.cs" />
@@ -748,7 +749,9 @@
<Compile Include="Models\鍩虹璧勬枡\Gy_Employee.cs" />
<Compile Include="Models\鍩虹璧勬枡\Gy_Process.cs" />
<Compile Include="Models\鍩虹璧勬枡\Warehouse.cs" />
+ <Compile Include="Models\宸ヨ祫绠$悊\ClsPay_PurchaseWallclothBillMain.cs" />
<Compile Include="Models\宸ヨ祫绠$悊\ClsPay_WorkTimesBillMain.cs" />
+ <Compile Include="Models\宸ヨ祫绠$悊\ClsPay_PurchaseWallclothBillSub.cs" />
<Compile Include="Models\宸ヨ祫绠$悊\ClsPay_WorkTimesBillSub.cs" />
<Compile Include="obj\Debug\.NETFramework,Version=v4.5.AssemblyAttributes.cs" />
<Compile Include="Properties\Resources.Designer.cs">
--
Gitblit v1.9.1