From 4b2a2f346b1467bc0de90e2e87a33b8ede2a8a72 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期二, 29 七月 2025 12:54:22 +0800
Subject: [PATCH] 1.页面过滤条件:开始时间和结束时间(根据检验信息中的创建时间进行过滤)、站台(检验信息中的检验工序)、料号(PNL布局信息名称)、批次(lot号) 2.柱状图 3.饼状图 4.根据仓库、物料,维护物料的价格 2.根据表结构增加维护页面、列表页面
---
DAL/基础资料/其他基础资料/ClsGy_MatePrice_Ctl.cs | 201 +++++++++++
WebAPI/Controllers/基础资料/基础资料/Gy_MatePriceController.cs | 710 +++++++++++++++++++++++++++++++++++++++
WebAPI/ListModels.cs | 12
WebAPI/Controllers/华远datamapping/Gy_BarCodeReportController.cs | 127 +++++++
Model/基础资料/其他基础资料/ClsGy_MatePrice_Model.cs | 16
DAL/DAL.csproj | 1
Model/Model.csproj | 1
7 files changed, 1,068 insertions(+), 0 deletions(-)
diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index 78d4213..a5282b6 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -87,6 +87,7 @@
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_RepairClass_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_RepairCheckClass_Ctl.cs" />
<Compile Include="浠撳簱绠$悊\ClsKf_ProductReceiveMaterialBill.cs" />
+ <Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_MatePrice_Ctl.cs" />
<Compile Include="婧愬崟\InterFace婧愬崟\Cls_S_IF_ICMOBillList_CusBarCodeBill_KaiBei.cs" />
<Compile Include="婧愬崟\InterFace婧愬崟\Cls_S_IF_MoveStockRequestBillList.cs" />
<Compile Include="鐢熶骇绠$悊\ClsSc_ShiftsBeginInfoBill.cs" />
diff --git "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePrice_Ctl.cs" "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePrice_Ctl.cs"
new file mode 100644
index 0000000..931adda
--- /dev/null
+++ "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePrice_Ctl.cs"
@@ -0,0 +1,201 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+ public class ClsGy_MatePrice_Ctl : DBUtility.ClsGy_Base_Ctl
+ {
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+ public string HOldNumber;
+ public List<Model.ClsGy_MatePrice_Model> DetailColl = new List<Model.ClsGy_MatePrice_Model>();
+ public Model.ClsGy_MatePrice_Model oModel = new Model.ClsGy_MatePrice_Model();
+
+
+
+ //鍙嶅鏍�
+ public bool AbandonCheck(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ oCn.RunProc(" Update Gy_MatePriceSup set HChecker='',HCheckDate=null Where HItemID=" + lngBillKey.ToString());
+ sReturn = "";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ return false;
+ }
+ }
+
+ //瀹℃牳
+ public bool CheckBill(Int64 lngBillKey, ref string sReturn)
+ {
+
+ try
+ {
+ oCn.RunProc(" Update Gy_MaterPrice set HUsed=0,HChecker='" + DBUtility.ClsPub.CurUserName + "',HCheckDate='" + DBUtility.ClsPub.GetServerDate(-1) + "' Where HItemID=" + lngBillKey.ToString());
+ //灏嗗叾浠� 宸ヤ环璁剧疆涓� 鍋滅敤
+ //oCn.RunProc(" exec h_p_Gy_MatePriceSupStopflag " + lngBillKey.ToString());
+ //
+ sReturn = "";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ return false;
+ }
+ }
+
+
+ //鏂板
+ public override bool AddNew()
+ {
+
+ try
+ {
+ oCn.BeginTran();
+ oCn.RunProc("Insert into " + MvarItemKey +
+ " (HSupID,HCusID,HMaterID,HWHID,HPrice" +
+ ",HStopflag,HRemark,HUseFlag,HMakeEmp,HMakeTime" +
+ ",HCheckEmp,HCheckTime,HModifyEmp,HModifyTime,HStopEmp,HStopTime,HUSEORGID,HCREATEORGID) " +
+ " values('" + oModel.HSupID + "', '" + oModel.HCusID + "', " + oModel.HMaterID.ToString() + ", " + oModel.HWHID.ToString() + ", " + oModel.HPrice.ToString() +
+ ", " + Convert.ToString(oModel.HStopflag ? 1 : 0) + ", '" + oModel.HRemark + "', " + oModel.HUseFlag.ToString() + ", '" + oModel.HMakeEmp.ToString() + "', '" + oModel.HMakeTime.ToString() + "'" +
+ ", '" + oModel.HCheckEmp.ToString() + "', '" + oModel.HCheckTime.ToString() + "', '" + oModel.HModifyEmp.ToString() + "', '" + oModel.HModifyTime.ToString() + "', '" + oModel.HStopEmp.ToString() + "', '" + oModel.HStopTime.ToString() + "', '" + oModel.HUSEORGID + "', '" + oModel.HCREATEORGID + "')");
+ // 淇敼缁撴潫
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
+ ////淇敼
+ public override bool ModifyByID(Int64 sItemID)
+ {
+ try
+ {
+ oCn.BeginTran();
+
+ oCn.RunProc("Update " + MvarItemKey + " set " +
+ "HSupID=" + oModel.HSupID.ToString() +
+ ",HCusID=" + oModel.HCusID.ToString() +
+ ",HMaterID=" + oModel.HMaterID.ToString() +
+ ",HWHID=" + oModel.HWHID.ToString() +
+ ",HPrice=" + oModel.HPrice.ToString() +
+ ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
+ ",HRemark='" + oModel.HRemark + "'" +
+ ",HUseFlag='" + oModel.HUseFlag.ToString() + "'" +
+ ",HCheckEmp='" + oModel.HCheckEmp.ToString() + "'" +
+ ",HCheckTime='" + oModel.HCheckTime + "'" +
+ ",HModifyEmp='" + oModel.HModifyEmp + "'" +
+ ",HModifyTime=GETDATE()" +
+ ",HStopEmp='" + oModel.HStopEmp + "'" +
+ ",HStopTime='" + oModel.HStopTime + "'" +
+ ",HUSEORGID=" + oModel.HUSEORGID.ToString() +
+ ",HCREATEORGID=" + oModel.HCREATEORGID.ToString() +
+ " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
+ //鏄剧ず鍗曟嵁
+ //public bool ShowBill(Int64 lngBillKey, ref string sReturn)
+ //{
+ // try
+ // {
+ // //鏌ヨ涓昏〃
+ // DataSet DsSub = new DataSet();
+ // DsSub = oCn.RunProcReturn("Select * from Gy_MatePriceSup Where HitemID=" + lngBillKey.ToString(), "Gy_MatePriceSup");
+ // DetailColl.Clear();//娓呯┖
+ // for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ // {
+ // Model.ClsGy_MatePriceSup_Model oSub = new Model.ClsGy_MatePriceSup_Model();
+ // oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"].ToString());
+ // oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"].ToString());
+ // oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"].ToString());
+ // oSub.HRelationID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HRelationID"].ToString());
+ // oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+ // oSub.HBeginQty = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HBeginQty"].ToString());
+ // oSub.HEndQty = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HEndQty"].ToString());
+ // oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"].ToString());
+ // oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"].ToString());
+ // oSub.HCurID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HCurID"].ToString());
+ // oSub.HType = DsSub.Tables[0].Rows[i]["HType"].ToString();
+ // oSub.HMaker = DsSub.Tables[0].Rows[i]["HMaker"].ToString();
+ // oSub.HMakeDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HMakeDate"]);
+ // oSub.HBeginDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HBeginDate"]);
+ // oSub.HEndDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEndDate"]);
+ // oSub.HChecker = DsSub.Tables[0].Rows[i]["HChecker"].ToString().Trim();
+ // oSub.HCheckDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HCheckDate"]);
+ // DetailColl.Add(oSub);
+ // }
+ // sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ // return true;
+ // }
+ // catch (Exception e)
+ // {
+ // sReturn = e.Message;
+ // return false;
+ // }
+ //}
+
+ //鎵规敼鍗曟嵁
+ public bool BatchModifyBill(Int64 lngBillKey, double sPrice, ref string sReturn)
+ {
+ try
+ {
+ oCn.BeginTran();
+ oCn.RunProc(" Update Gy_MatePriceSup set HPrice=" + sPrice.ToString() + " Where HItemID=" + lngBillKey.ToString());
+ sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ return false;
+ }
+ }
+
+ //寰楀埌閲囪喘浠锋牸璧勬枡
+ public double GetMatePriceBySup(long HMaterID, long HSupID)
+ {
+ try
+ {
+ DataSet oDs = new DataSet();
+ //
+ oDs = oCn.RunProcReturn("exec h_p_Gy_GetMatePrice_Sup " + HMaterID.ToString() + "," + HSupID.ToString(), "gy_czygl");
+ double HPrice = DBUtility.ClsPub.isDoule(oDs.Tables[0].Rows[0]["鍗曚环"]);
+ //
+ return HPrice;
+ }
+ catch (Exception e)
+ {
+ return 0;
+ }
+ }
+
+ //鏋勯�犲嚱鏁�
+ public ClsGy_MatePrice_Ctl()
+ {
+ MvarItemKey = "dbo.Gy_MaterPrice";
+ MvarReportTitle = "鏍峰搧璧勬枡璁剧疆";
+ oModel = new Model.ClsGy_MatePrice_Model();
+ }
+ }
+}
diff --git a/Model/Model.csproj b/Model/Model.csproj
index 187588c..dc71b0a 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -99,6 +99,7 @@
<Compile Include="ClsGy_PatrolCheckItemMethod_Model.cs" />
<Compile Include="浠撳簱绠$悊\ClsKf_TrolleyPositionBillMain.cs" />
<Compile Include="浠撳簱绠$悊\ClsKf_TrolleyPositionBillSub.cs" />
+ <Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_MatePrice_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_PatrolCheckItemClass_Model.cs" />
<Compile Include="浠撳簱绠$悊\ClsKf_WorkShopICStockBillMain.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_MaintainClass_Model.cs" />
diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePrice_Model.cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePrice_Model.cs"
new file mode 100644
index 0000000..29fbd22
--- /dev/null
+++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePrice_Model.cs"
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsGy_MatePrice_Model : DBUtility.ClsGy_Base_Model
+ {
+
+ public long HSupID; // 渚涘簲鍟咺D (default 0)
+ public long HCusID; // 瀹㈡埛ID (default 0)
+ public long HMaterID; // 鐗╂枡ID (default 0)
+ public long HWHID; // 浠撳簱ID (default 0)
+ public decimal HPrice; // 鍗曚环 (money default 0)
+ }
+}
diff --git "a/WebAPI/Controllers/\345\215\216\350\277\234datamapping/Gy_BarCodeReportController.cs" "b/WebAPI/Controllers/\345\215\216\350\277\234datamapping/Gy_BarCodeReportController.cs"
new file mode 100644
index 0000000..f8056e5
--- /dev/null
+++ "b/WebAPI/Controllers/\345\215\216\350\277\234datamapping/Gy_BarCodeReportController.cs"
@@ -0,0 +1,127 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+using System.Web;
+using System.IO;
+using SyntacticSugar.constant;
+using Newtonsoft.Json;
+
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+ public class Gy_BarCodeReportController : ApiController
+ {
+ //鑾峰彇绯荤粺鍙傛暟
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+ public string sWhere = "";
+ private json objJsonResult = new json();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ DataSet ds;
+ string fileip = System.Configuration.ConfigurationManager.AppSettings["FileIP"];
+ // GET: Gy_BarCodeReport
+ [Route("Gy_BarCodeReportController/Get_Stations")]
+ [HttpGet]
+ public object Get_Stations()
+ {
+ try
+ {
+ DataSet oDs = new DataSet();
+ //==========
+ oDs = oCN.RunProcReturn("select DISTINCT 妫�楠屽伐搴� from h_v_QC_CheckNote_PNL_Temp_List", "h_v_QC_CheckNote_PNL_Temp_List");
+ 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;
+ }
+ }
+ [Route("Gy_BarCodeReportController/GetMaterialNos")]
+ [HttpGet]
+ public object GetMaterialNos()
+ {
+ try
+ {
+ DataSet oDs = new DataSet();
+ //==========
+ oDs = oCN.RunProcReturn("select DISTINCT HLayOutName from Gy_PNLInfo", "Gy_PNLInfo");
+ 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;
+ }
+ }
+
+ #region 鍒楄〃鏌ヨ
+ [Route("Gy_BarCodeReportController/list")]
+ [HttpGet]
+ public object list(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldUpperBill_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //string sql1 = "s"+"select * from h_v_Gy_BarCodeReport";
+ //string sql = sql1 + sWhere + " ";
+ //ds = oCN.RunProcReturn(sql, "h_v_Gy_BarCodeReport");
+ ds =oCN.RunProcReturn("select a.HCheckProc 妫�楠屽伐搴�,b.HLayOutName 鏂欏彿,a.HBarCode PNL鏉$爜缂栧彿,HPCSNo PCS鍙�,a.HPageIndex 姝e弽闈�,a.HBadReason 涓嶈壇鍘熷洜 from QC_CheckNote_PNL_Temp a INNER JOIN Gy_PNLInfo b on a.HMakeDate=b.HMakeDate where 1=1 " + sWhere , "h_v_Gy_BarCodeReport");
+
+ //娣诲姞鍒楀悕
+ 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 e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+
+ }
+}
\ No newline at end of file
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePriceController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePriceController.cs"
new file mode 100644
index 0000000..aa76936
--- /dev/null
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePriceController.cs"
@@ -0,0 +1,710 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+ public class Gy_MatePriceController : ApiController
+ {
+ private json objJsonResult = new json();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ DataSet ds;
+ // GET: Gy_MatePrice
+ #region 鏍峰搧 鍒楄〃
+ [Route("Gy_MatePriceController/MatePriceList")]
+ [HttpGet]
+ public object MatePriceList(string sWhere, string user, string Organization)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldUpperBill_Query", 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_MaterPrice where 1 = 1 ");
+
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "h_v_Gy_MaterPrice");
+
+ //娣诲姞鍒楀悕
+ 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.list = columnNameList;
+ 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_MatePrice/cx")]
+ [HttpGet]
+ public object cx(string HItemID, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_MatePriceSupList_Query", 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_MatePriceEdit where HItemID = " + HItemID);
+
+ ds = oCN.RunProcReturn(sql1, "h_v_Gy_MatePriceEdit");
+
+
+ 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
+
+ #region 缂栬緫
+ [Route("Gy_MatePriceController/MatePriceEdit")]
+ [HttpPost]
+ public object MatePriceEdit([FromBody] JObject msg)
+ {
+ var _value = msg["msg"].ToString();
+ string msg3 = _value.ToString();
+ string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg1 = sArray[0].ToString();
+ string msg2 = sArray[1].ToString();
+
+ ////缂栬緫鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log_second("Gy_MatePriceSupList_Edit", 1, false, msg2))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ ListModels oListModels = new ListModels();
+
+ try
+ {
+ DAL.ClsGy_MatePrice_Ctl oBill = new DAL.ClsGy_MatePrice_Ctl();
+ List<Model.ClsGy_MatePrice_Model> lsmain = new List<Model.ClsGy_MatePrice_Model>();
+ msg1 = msg1.Replace("\\", "");
+ msg1 = msg1.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_Gy_MatePrice(msg1);
+ foreach (Model.ClsGy_MatePrice_Model oItem in lsmain)
+ {
+ //鏂板鏃跺垽鏂�
+ #region 鐖剁骇鏍¢獙鏂规硶锛坅pi璋冪敤鍏堟敞閲婃帀锛岋級
+ /*
+ if (oItem.HItemID == 0)
+ {
+ if (ds == null || ds.Tables[0].Rows.Count > 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+ string sParent;
+ sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+ if (sParent.Trim() == "")
+ {
+ oBill.oModel.HParentID = 0;
+ }
+ else
+ {
+ if (oBill.HavParentCode(sParent.Trim(), HItemID))
+ {
+ oBill.oModel.HParentID = oBill.oModel.HItemID;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ }
+ else//缂栬緫鏃跺垽鏂�
+ {
+ //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+ string sParent;
+ sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+ if (sParent.Trim() == "")
+ {
+ oBill.oModel.HParentID = 0;
+ }
+ else
+ {
+ if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
+ {
+ oBill.oModel.HParentID = oBill.oModel.HItemID;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ }
+ */
+ #endregion
+ //oItem.HUSEORGID = Convert.ToInt32(msg_HUSEORGID); //缁勭粐id
+ oBill.oModel = oItem;
+ }
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (oBill.oModel.HItemID == 0)
+ {
+ bResult = oBill.AddNew();
+ }
+ else
+ {
+ //鏄惁宸茬粡瀹℃牳鍒ゆ柇
+ DataSet Maxds = oCN.RunProcReturn("select * from h_v_Gy_MatePriceEdit where HItemID = " + oBill.oModel.HItemID, "h_v_Gy_MatePriceEdit");
+ //if (Maxds != null && Maxds.Tables[0].Rows[0]["瀹℃牳浜�"].ToString() != "")
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鍗曟嵁宸插鏍告棤娉曠紪杈戯紒";
+ // objJsonResult.data = 1;
+ // return objJsonResult;
+ //}
+ bResult = oBill.ModifyByID(oBill.oModel.HItemID);
+ }
+ if (bResult)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鍒犻櫎
+ [Route("Gy_MatePriceController/Delete")]
+ [HttpGet]
+ public object Delete(string HItemID, string user)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //鍒犻櫎鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_MatePriceSupList_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ 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_MaterPrice where HItemID=" + HItemID, "Gy_MaterPrice");
+ 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 (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏁版嵁宸插鏍告棤娉曞垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.RunProc("delete from Gy_MaterPrice 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;
+ }
+ }
+ #endregion
+
+
+ #region 瀹℃牳銆佸弽瀹℃牳
+
+ [Route("Gy_MatePriceController/MatePriceCheck")]
+ [HttpGet]
+ public object MatePriceCheck(int HInterID, int IsAudit, string CurUserName)
+ {
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_TechnologyParameterUnit_Check", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ var ds = oCN.RunProcReturn("select * from Gy_MaterPrice where HItemID=" + HInterID, "Gy_MaterPrice");
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ {
+ if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ {
+ if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.BeginTran();
+
+ if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ {
+
+ //瀹℃牳鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Gy_MaterPrice_BeforeCheckCtrl " + HInterID + ",'" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Gy_MaterPrice_BeforeCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
+
+ oCN.RunProc("update Gy_MaterPrice set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
+
+
+ //瀹℃牳鍚庢帶鍒�=========================================
+ string sql2 = "exec h_p_Gy_MaterPrice_AfterCheckCtrl " + HInterID + ",'" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql2, "h_p_Gy_MaterPrice_AfterCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍚庡垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛";
+ objJsonResult.data = null;
+ }
+ if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ {
+
+ //鍙嶅鏍稿墠鎺у埗=========================================
+ string sql1 = "exec h_p_Gy_MaterPrice_BeforeUnCheckCtrl " + HInterID + ",'" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Gy_MaterPrice_BeforeUnCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
+
+
+ oCN.RunProc("update Gy_MaterPrice set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
+
+
+ //鍙嶅鏍稿悗鎺у埗=========================================
+ string sql2 = "exec h_p_Gy_MaterPrice_AfterUnCheckCtrl " + HInterID + ",'" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql2, "h_p_Gy_MaterPrice_AfterUnCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿悗鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
+
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+ objJsonResult.data = null;
+ }
+ oCN.Commit();
+
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 绂佺敤銆佸弽绂佺敤
+
+ [Route("Gy_MatePriceController/StopGy_MaterPrice")]
+ [HttpGet]
+ public object StopGy_MaterPrice(int HInterID, int IsStop, string CurUserName)
+ {
+ try
+ {
+ //绂佺敤鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_TechnologyParameterUnit_Stop", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绂佺敤澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ var ds = oCN.RunProcReturn("select * from Gy_MaterPrice where HItemID=" + HInterID, "Gy_MaterPrice");
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ if (IsStop == 0) //绂佺敤鍒ゆ柇
+ {
+ if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸茬鐢�!涓嶈兘鍐嶆绂佺敤锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ if (IsStop == 1) //鍙嶇鐢ㄥ垽鏂�
+ {
+ if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鐢�!涓嶉渶瑕佸弽绂佺敤!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.BeginTran();
+
+ if (IsStop == 0) //绂佺敤鍒ゆ柇
+ {
+
+ //绂佺敤鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Gy_MaterPrice_BeforeStopCtrl " + HInterID + ",'" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Gy_MaterPrice_BeforeStopCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "绂佺敤澶辫触!鍘熷洜:绂佺敤鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "绂佺敤澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
+
+ oCN.RunProc("update Gy_MaterPrice set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
+
+
+ //绂佺敤鍚庢帶鍒�=========================================
+ string sql2 = "exec h_p_Gy_MaterPrice_AfterStopCtrl " + HInterID + ",'" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql2, "h_p_Gy_MaterPrice_AfterStopCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "绂佺敤澶辫触!鍘熷洜:绂佺敤鍚庡垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "绂佺敤澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "绂佺敤鎴愬姛";
+ objJsonResult.data = null;
+ }
+ if (IsStop == 1) //鍙嶇鐢ㄥ垽鏂�
+ {
+ //鍙嶇鐢ㄥ墠鎺у埗=========================================
+ string sql1 = "exec h_p_Gy_Gy_MaterPrice_BeforeUnStopCtrl " + HInterID + ",'" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Gy_Gy_MaterPrice_BeforeUnStopCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶇鐢ㄥけ璐�!鍘熷洜:鍙嶇鐢ㄥ墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶇鐢ㄥけ璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
+
+ oCN.RunProc("update Gy_MaterPrice set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
+
+
+ //鍙嶇鐢ㄥ悗鎺у埗=========================================
+ string sql2 = "exec h_p_Gy_MaterPrice_AfterUnStopCtrl " + HInterID + ",'" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql2, "h_p_Gy_MaterPrice_AfterUnStopCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶇鐢ㄥけ璐�!鍘熷洜:鍙嶇鐢ㄥ悗鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶇鐢ㄥけ璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶇鐢ㄦ垚鍔�";
+ objJsonResult.data = null;
+ }
+ oCN.Commit();
+
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绂佺敤澶辫触鎴栬�呭弽绂佺敤澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index 6ca5832..3b4e1f6 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -2378,6 +2378,18 @@
List<Model.ClsGy_MatePriceSup_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_MatePriceSup_Model>>(jsonString);
return list;
}
+ /// <summary>
+ /// 澶勭悊閲囪喘浠锋牸琛ㄧ殑json
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsGy_MatePrice_Model> getObjectByJson_Gy_MatePrice(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsGy_MatePrice_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_MatePrice_Model>>(jsonString);
+ return list;
+ }
+
/// <summary>
/// 澶勭悊鍣ㄥ叿鐘舵�佽〃鐨刯son
--
Gitblit v1.9.1