From da84e4e72c9d9cc7e2bd40dc4bb7b3222ca3519a Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 28 四月 2026 17:07:52 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
DAL/基础资料/公用基础资料/ClsGy_SampleScheme_Ctl.cs | 154 ++++++++
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt | 2
BLL/bin/Release/DAL.dll | 0
BLL/bin/Release/SQLHelper.pdb | 0
DAL/bin/Release/DBUtility.dll | 0
Model/基础资料/基础资料/ClsGy_SampleScheme_Model.cs | 27 +
DAL/bin/Release/Pub_Control.dll | 0
DBUtility/bin/Release/Pub_Control.pdb | 0
SyntacticSugar/bin/Release/SyntacticSugar.dll | 0
WebAPI/WebAPI.csproj.user | 5
BLL/bin/Release/SQLHelper.dll | 0
DAL/bin/Release/DBUtility.pdb | 0
DAL/bin/Release/Model.dll | 0
DBUtility/bin/Release/Pub_Class.dll | 0
SyntacticSugar/bin/Release/SyntacticSugar.pdb | 0
WebAPI/App_Start/WebApiConfig.cs | 14
DBUtility/bin/Release/Pub_Control.dll | 0
Model/bin/Release/SQLHelper.pdb | 0
DAL/bin/Release/Pub_Control.pdb | 0
DAL/bin/Release/DAL.pdb | 0
sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.AssemblyReference.cache | 0
SQLHelper/obj/Release/SQLHelper.dll | 0
Model/bin/Release/Pub_Control.pdb | 0
BLL/bin/Release/Model.dll | 0
sdk_dingding/TopSdk/obj/Release/TopSdk.pdb | 0
BLL/bin/Release/DAL.pdb | 0
Model/bin/Release/Pub_Class.pdb | 0
BLL/bin/Release/Model.pdb | 0
DAL/bin/Release/DAL.dll | 0
DAL/bin/Release/Model.pdb | 0
sdk_dingding/TopSdk/bin/Debug/TopSdk.dll | 0
sdk_dingding/TopSdk/obj/Release/TopSdk.dll | 0
Pub_Class/bin/Release/SyntacticSugar.pdb | 0
SQLHelper/obj/Release/SQLHelper.pdb | 0
sdk_dingding/TopSdk/bin/Release/TopSdk.dll | 0
Model/obj/Release/Model.pdb | 0
BLL/bin/Release/BLL.pdb | 0
DBUtility/bin/Release/DBUtility.pdb | 0
DBUtility/bin/Release/DBUtility.dll | 0
SyntacticSugar/obj/Release/SyntacticSugar.csproj.FileListAbsolute.txt | 10
sdk_dingding/TopSdk/obj/Debug/TopSdk.dll | 0
Pub_Class/bin/Release/SyntacticSugar.dll | 0
Model/bin/Release/Pub_Control.dll | 0
sdk_dingding/TopSdk/obj/Release/TopSdk.csproj.AssemblyReference.cache | 0
Pub_Control/bin/Release/Pub_Class.pdb | 0
sdk_dingding/TopSdk/bin/Release/TopSdk.pdb | 0
sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt | 14
Pub_Control/bin/Release/Pub_Class.dll | 0
sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb | 0
DAL/DAL.csproj | 1
WebAPI/WebAPI.csproj | 2
BLL/bin/Release/Pub_Control.pdb | 0
Pub_Class/bin/Release/Pub_Class.pdb | 0
Pub_Control/bin/Release/Pub_Control.dll | 0
BLL/bin/Release/DBUtility.pdb | 0
DAL/bin/Release/SQLHelper.dll | 0
Model/bin/Release/DBUtility.pdb | 0
SQLHelper/bin/Release/SQLHelper.dll | 0
SyntacticSugar/obj/Release/SyntacticSugar.dll | 0
SQLHelper/bin/Release/Pub_Class.pdb | 0
Model/Model.csproj | 2
BLL/bin/Release/Pub_Control.dll | 0
Pub_Class/bin/Release/Pub_Class.dll | 0
SyntacticSugar/obj/Release/SyntacticSugar.pdb | 0
DAL/bin/Release/SQLHelper.pdb | 0
SQLHelper/bin/Release/Pub_Class.dll | 0
SQLHelper/bin/Release/SQLHelper.pdb | 0
DBUtility/obj/Release/DBUtility.pdb | 0
Model/bin/Release/DBUtility.dll | 0
DAL/bin/Release/Pub_Class.pdb | 0
BLL/bin/Release/DBUtility.dll | 0
BLL/bin/Release/BLL.dll | 0
Pub_Control/bin/Release/Pub_Control.pdb | 0
DBUtility/obj/Release/DBUtility.dll | 0
sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb | 0
Model/obj/Release/Model.dll | 0
BLL/bin/Release/Pub_Class.dll | 0
Model/基础资料/基础资料/ClsGy_SampleSchemeSub_Model.cs | 31 +
DBUtility/bin/Release/SQLHelper.dll | 0
sdk_dingding/TopSdk/obj/Release/TopSdk.csproj.FileListAbsolute.txt | 11
Model/bin/Release/Model.pdb | 0
DBUtility/bin/Release/SQLHelper.pdb | 0
DAL/bin/Release/Pub_Class.dll | 0
Model/bin/Release/Pub_Class.dll | 0
Model/bin/Release/Model.dll | 0
DBUtility/bin/Release/Pub_Class.pdb | 0
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache | 0
BLL/bin/Release/Pub_Class.pdb | 0
Model/bin/Release/SQLHelper.dll | 0
WebAPI/Controllers/BaseSet/Gy_SampleSchemeController.cs | 785 +++++++++++++++++++++++++++++++++++++++++++
WebAPI/Service/SignatureVerifyAttribute.cs | 2
91 files changed, 1,041 insertions(+), 19 deletions(-)
diff --git a/BLL/bin/Release/BLL.dll b/BLL/bin/Release/BLL.dll
index dee4588..a28b13f 100644
--- a/BLL/bin/Release/BLL.dll
+++ b/BLL/bin/Release/BLL.dll
Binary files differ
diff --git a/BLL/bin/Release/BLL.pdb b/BLL/bin/Release/BLL.pdb
index 0e18d6a..6158ace 100644
--- a/BLL/bin/Release/BLL.pdb
+++ b/BLL/bin/Release/BLL.pdb
Binary files differ
diff --git a/BLL/bin/Release/DAL.dll b/BLL/bin/Release/DAL.dll
index c6a62d1..7324c6c 100644
--- a/BLL/bin/Release/DAL.dll
+++ b/BLL/bin/Release/DAL.dll
Binary files differ
diff --git a/BLL/bin/Release/DAL.pdb b/BLL/bin/Release/DAL.pdb
index fc52177..2eed005 100644
--- a/BLL/bin/Release/DAL.pdb
+++ b/BLL/bin/Release/DAL.pdb
Binary files differ
diff --git a/BLL/bin/Release/DBUtility.dll b/BLL/bin/Release/DBUtility.dll
index dcd5847..c8e1c81 100644
--- a/BLL/bin/Release/DBUtility.dll
+++ b/BLL/bin/Release/DBUtility.dll
Binary files differ
diff --git a/BLL/bin/Release/DBUtility.pdb b/BLL/bin/Release/DBUtility.pdb
index 3f6e20f..3a46061 100644
--- a/BLL/bin/Release/DBUtility.pdb
+++ b/BLL/bin/Release/DBUtility.pdb
Binary files differ
diff --git a/BLL/bin/Release/Model.dll b/BLL/bin/Release/Model.dll
index 9868710..0413f5f 100644
--- a/BLL/bin/Release/Model.dll
+++ b/BLL/bin/Release/Model.dll
Binary files differ
diff --git a/BLL/bin/Release/Model.pdb b/BLL/bin/Release/Model.pdb
index 12606dc..eee6d8b 100644
--- a/BLL/bin/Release/Model.pdb
+++ b/BLL/bin/Release/Model.pdb
Binary files differ
diff --git a/BLL/bin/Release/Pub_Class.dll b/BLL/bin/Release/Pub_Class.dll
index 48565f9..742c133 100644
--- a/BLL/bin/Release/Pub_Class.dll
+++ b/BLL/bin/Release/Pub_Class.dll
Binary files differ
diff --git a/BLL/bin/Release/Pub_Class.pdb b/BLL/bin/Release/Pub_Class.pdb
index 0f48c78..6563d10 100644
--- a/BLL/bin/Release/Pub_Class.pdb
+++ b/BLL/bin/Release/Pub_Class.pdb
Binary files differ
diff --git a/BLL/bin/Release/Pub_Control.dll b/BLL/bin/Release/Pub_Control.dll
index fa08c81..17e63cf 100644
--- a/BLL/bin/Release/Pub_Control.dll
+++ b/BLL/bin/Release/Pub_Control.dll
Binary files differ
diff --git a/BLL/bin/Release/Pub_Control.pdb b/BLL/bin/Release/Pub_Control.pdb
index 922a574..bd45d97 100644
--- a/BLL/bin/Release/Pub_Control.pdb
+++ b/BLL/bin/Release/Pub_Control.pdb
Binary files differ
diff --git a/BLL/bin/Release/SQLHelper.dll b/BLL/bin/Release/SQLHelper.dll
index 7cd568b..adfff60 100644
--- a/BLL/bin/Release/SQLHelper.dll
+++ b/BLL/bin/Release/SQLHelper.dll
Binary files differ
diff --git a/BLL/bin/Release/SQLHelper.pdb b/BLL/bin/Release/SQLHelper.pdb
index f350917..ad3c0e1 100644
--- a/BLL/bin/Release/SQLHelper.pdb
+++ b/BLL/bin/Release/SQLHelper.pdb
Binary files differ
diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index 2b24fa2..77fe731 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -99,6 +99,7 @@
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_RepairClass_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_RepairCheckClass_Ctl.cs" />
<Compile Include="浠撳簱绠$悊\ClsKf_ProductReceiveMaterialBill.cs" />
+ <Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_SampleScheme_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_MatePrice_Ctl.cs" />
<Compile Include="宸ヨ祫绠$悊\ClsGy_SteppedPriceCoefficientBill .cs" />
<Compile Include="鎴愭湰绠$悊\ClsCB_ItemMoneyBillMain .cs" />
diff --git a/DAL/bin/Release/DAL.dll b/DAL/bin/Release/DAL.dll
index c6a62d1..7324c6c 100644
--- a/DAL/bin/Release/DAL.dll
+++ b/DAL/bin/Release/DAL.dll
Binary files differ
diff --git a/DAL/bin/Release/DAL.pdb b/DAL/bin/Release/DAL.pdb
index fc52177..2eed005 100644
--- a/DAL/bin/Release/DAL.pdb
+++ b/DAL/bin/Release/DAL.pdb
Binary files differ
diff --git a/DAL/bin/Release/DBUtility.dll b/DAL/bin/Release/DBUtility.dll
index dcd5847..c8e1c81 100644
--- a/DAL/bin/Release/DBUtility.dll
+++ b/DAL/bin/Release/DBUtility.dll
Binary files differ
diff --git a/DAL/bin/Release/DBUtility.pdb b/DAL/bin/Release/DBUtility.pdb
index 3f6e20f..3a46061 100644
--- a/DAL/bin/Release/DBUtility.pdb
+++ b/DAL/bin/Release/DBUtility.pdb
Binary files differ
diff --git a/DAL/bin/Release/Model.dll b/DAL/bin/Release/Model.dll
index 9868710..0413f5f 100644
--- a/DAL/bin/Release/Model.dll
+++ b/DAL/bin/Release/Model.dll
Binary files differ
diff --git a/DAL/bin/Release/Model.pdb b/DAL/bin/Release/Model.pdb
index 12606dc..eee6d8b 100644
--- a/DAL/bin/Release/Model.pdb
+++ b/DAL/bin/Release/Model.pdb
Binary files differ
diff --git a/DAL/bin/Release/Pub_Class.dll b/DAL/bin/Release/Pub_Class.dll
index 48565f9..742c133 100644
--- a/DAL/bin/Release/Pub_Class.dll
+++ b/DAL/bin/Release/Pub_Class.dll
Binary files differ
diff --git a/DAL/bin/Release/Pub_Class.pdb b/DAL/bin/Release/Pub_Class.pdb
index 0f48c78..6563d10 100644
--- a/DAL/bin/Release/Pub_Class.pdb
+++ b/DAL/bin/Release/Pub_Class.pdb
Binary files differ
diff --git a/DAL/bin/Release/Pub_Control.dll b/DAL/bin/Release/Pub_Control.dll
index fa08c81..17e63cf 100644
--- a/DAL/bin/Release/Pub_Control.dll
+++ b/DAL/bin/Release/Pub_Control.dll
Binary files differ
diff --git a/DAL/bin/Release/Pub_Control.pdb b/DAL/bin/Release/Pub_Control.pdb
index 922a574..bd45d97 100644
--- a/DAL/bin/Release/Pub_Control.pdb
+++ b/DAL/bin/Release/Pub_Control.pdb
Binary files differ
diff --git a/DAL/bin/Release/SQLHelper.dll b/DAL/bin/Release/SQLHelper.dll
index 7cd568b..adfff60 100644
--- a/DAL/bin/Release/SQLHelper.dll
+++ b/DAL/bin/Release/SQLHelper.dll
Binary files differ
diff --git a/DAL/bin/Release/SQLHelper.pdb b/DAL/bin/Release/SQLHelper.pdb
index f350917..ad3c0e1 100644
--- a/DAL/bin/Release/SQLHelper.pdb
+++ b/DAL/bin/Release/SQLHelper.pdb
Binary files differ
diff --git "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_SampleScheme_Ctl.cs" "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_SampleScheme_Ctl.cs"
new file mode 100644
index 0000000..cd61afc
--- /dev/null
+++ "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_SampleScheme_Ctl.cs"
@@ -0,0 +1,154 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+ public class ClsGy_SampleScheme_Ctl : DBUtility.ClsGy_Base_Ctl
+ {
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+ public string HOldNumber;
+ public Model.ClsGy_SampleScheme_Model oModel = new Model.ClsGy_SampleScheme_Model();
+ //public Model.ClsGy_SampleSchemeSub_Model osub = new Model.ClsGy_SampleSchemeSub_Model();
+ public List<Model.ClsGy_SampleSchemeSub_Model> DetailColl = new List<Model.ClsGy_SampleSchemeSub_Model>();
+
+ //鏂板
+ public override bool AddNew()
+ {
+
+ try
+ {
+ oCn.BeginTran();
+ string sql = $@"INSERT INTO [Gy_SampleScheme] ([HName], [HShortNumber], [HParentID], [HLevel], [HEndFlag], [HStopflag], [HRemark], [HHelpCode], [HUseFlag], [HMakeTime], [HMakeEmp], [HCheckEmp], [HCheckTime], [HModifyEmp], [HModifyTime], [HStopEmp], [HStopTime], [HUSEORGID], [HCREATEORGID], [HInterID], [HSampleTimes], [HSampleType], [HSampleLevel], [HStrictLevel], [HAQL], [HEffectDate], [HExpireDate], [HIsSystemSet], [HERPItemID], [HNumber])
+ VALUES (
+ '{oModel.HName}', '{oModel.HShortNumber}', '{oModel.HParentID}', '{oModel.HLevel}', '{oModel.HEndFlag}', '{oModel.HStopflag}', '{oModel.HRemark}', '{oModel.HHelpCode}', '{oModel.HUseFlag}', '{oModel.HMakeTime}', '{oModel.HMakeEmp}', '{oModel.HCheckEmp}','{oModel.HCheckTime}','{oModel.HModifyEmp}', '{oModel.HModifyTime}', '{oModel.HStopEmp}','{oModel.HStopTime}','{oModel.HUSEORGID}','{oModel.HCREATEORGID}','{oModel.HInterID}','{oModel.HSampleTimes}','{oModel.HSampleType}','{oModel.HSampleLevel}','{oModel.HStrictLevel}','{oModel.HAQL}','{oModel.HEffectDate}','{oModel.HExpireDate}','{oModel.HIsSystemSet}','{0}','{oModel.HNumber}'
+ ); ";
+ oCn.RunProc(sql);
+
+
+ // 鎻掑叆瀛愯〃
+ if (DetailColl != null && DetailColl.Count > 0)
+ {
+ foreach (Model.ClsGy_SampleSchemeSub_Model osub in DetailColl)
+ {
+ if (osub == null)
+ continue;
+ string sql1 = $@"INSERT INTO [Gy_SampleSchemeSub] ([HInterID], [HEntryID], [HBatch], [HSampleCode], [HSampleRate], [HExpression], [HRejectQty], [HAcceptQty], [HSampleQty], [HSampleLow], [HSampleUp]) VALUES(
+ '{oModel.HInterID}', '{osub.HEntryID}', '{osub.HBatch}', '{osub.HSampleCode}', '{osub.HSampleRate}', '{osub.HExpression}', '{osub.HRejectQty}', '{osub.HAcceptQty}', '{osub.HSampleQty}', '{osub.HSampleLow}', '{osub.HSampleUp}''
+ ); ";
+ oCn.RunProc(sql1);
+ }
+ }
+
+
+
+ ////淇敼涓婄骇涓洪潪鏈骇浠g爜
+ //oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
+ //淇敼
+ public override bool ModifyByID(Int64 lngBillKey)
+ {
+ try
+ {
+ oCn.BeginTran();
+ oCn.RunProc("Update " + MvarItemKey + " set " +
+ " HName='" + oModel.HName + "'" +
+ ",HShortNumber='" + oModel.HShortNumber + "'" +
+ ",HParentID=" + oModel.HParentID +
+ ",HLevel=" + oModel.HLevel +
+ ",HEndFlag=" + Convert.ToString(oModel.HEndFlag ? 1 : 0) +
+ ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
+ ",HRemark='" + oModel.HRemark + "'" +
+ ",HHelpCode='" + oModel.HHelpCode + "'" +
+ ",HUseFlag=" +oModel.HUseFlag +
+ ",HMakeTime='" + oModel.HMakeTime + "'" +
+ ",HMakeEmp='" + oModel.HMakeEmp + "'" +
+ ",HCheckEmp='" + oModel.HCheckEmp + "'" +
+ ",HCheckTime='" + oModel.HCheckTime + "'" +
+ ",HModifyEmp='" + oModel.HModifyEmp + "'" +
+ ",HModifyTime='" + oModel.HModifyTime + "'" +
+ ",HStopEmp='" + oModel.HStopEmp + "'" +
+ ",HStopTime='" + oModel.HStopTime + "'" +
+ ",HUSEORGID=" + oModel.HUSEORGID +
+ ",HCREATEORGID=" + oModel.HCREATEORGID +
+ ",HInterID=" + oModel.HInterID +
+ ",HSampleTimes=" + oModel.HSampleTimes +
+ ",HSampleType=" + oModel.HSampleType +
+ ",HSampleLevel=" + oModel.HSampleLevel +
+ ",HStrictLevel=" + oModel.HStrictLevel +
+ ",HAQL=" + oModel.HAQL +
+ ",HEffectDate='" + oModel.HEffectDate + "'" +
+ ",HExpireDate='" + oModel.HExpireDate + "'" +
+ ",HIsSystemSet=" + Convert.ToString(oModel.HIsSystemSet ? 1 : 0) +
+ ",HERPItemID=" + 0 +
+ ",HNumber='" + oModel.HNumber + "'" +
+ " Where HItemID=" + lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo);
+
+ oCn.RunProc("delete Gy_SampleSchemeSub where HInterID='" + oModel.HInterID + "'");
+
+
+ // 鎻掑叆瀛愯〃
+ if (DetailColl != null && DetailColl.Count > 0)
+ {
+ foreach (Model.ClsGy_SampleSchemeSub_Model osub in DetailColl)
+ {
+ if (osub == null)
+ continue;
+ string sql1 = $@"INSERT INTO [Gy_SampleSchemeSub] ([HInterID], [HEntryID], [HBatch], [HSampleCode], [HSampleRate], [HExpression], [HRejectQty], [HAcceptQty], [HSampleQty], [HSampleLow], [HSampleUp]) VALUES(
+ '{oModel.HInterID}', '{osub.HEntryID}', '{osub.HBatch}', '{osub.HSampleCode}', '{osub.HSampleRate}', '{osub.HExpression}', '{osub.HRejectQty}', '{osub.HAcceptQty}', '{osub.HSampleQty}', '{osub.HSampleLow}', '{osub.HSampleUp}''
+ ); ";
+ oCn.RunProc(sql1);
+ }
+ }
+
+
+ //
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+ //鏍规嵁浠g爜鍒ゆ柇淇℃伅
+ public override bool HavParentCode(string sCode, Int64 sItemID)
+ {
+ DataSet DS;
+ try
+ {
+ DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HStopflag=0 and HNumber='" + sCode + "' and HItemID<>" + sItemID, MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo);
+ if (DS.Tables[0].Rows.Count == 0)
+ return false;
+ else
+ {
+ oModel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]);
+ return true;
+ }
+ }
+ catch (Exception e)
+ {
+ throw (e);
+ }
+ }
+ //鏋勯�犲嚱鏁�
+ public ClsGy_SampleScheme_Ctl()
+ {
+ MvarItemKey = "Gy_SampleScheme";
+ MvarReportTitle = "鎶芥牱鏂规璁剧疆";
+ oModel = new Model.ClsGy_SampleScheme_Model();
+ }
+ }
+}
diff --git a/DBUtility/bin/Release/DBUtility.dll b/DBUtility/bin/Release/DBUtility.dll
index dcd5847..c8e1c81 100644
--- a/DBUtility/bin/Release/DBUtility.dll
+++ b/DBUtility/bin/Release/DBUtility.dll
Binary files differ
diff --git a/DBUtility/bin/Release/DBUtility.pdb b/DBUtility/bin/Release/DBUtility.pdb
index 3f6e20f..3a46061 100644
--- a/DBUtility/bin/Release/DBUtility.pdb
+++ b/DBUtility/bin/Release/DBUtility.pdb
Binary files differ
diff --git a/DBUtility/bin/Release/Pub_Class.dll b/DBUtility/bin/Release/Pub_Class.dll
index 48565f9..742c133 100644
--- a/DBUtility/bin/Release/Pub_Class.dll
+++ b/DBUtility/bin/Release/Pub_Class.dll
Binary files differ
diff --git a/DBUtility/bin/Release/Pub_Class.pdb b/DBUtility/bin/Release/Pub_Class.pdb
index 0f48c78..6563d10 100644
--- a/DBUtility/bin/Release/Pub_Class.pdb
+++ b/DBUtility/bin/Release/Pub_Class.pdb
Binary files differ
diff --git a/DBUtility/bin/Release/Pub_Control.dll b/DBUtility/bin/Release/Pub_Control.dll
index fa08c81..17e63cf 100644
--- a/DBUtility/bin/Release/Pub_Control.dll
+++ b/DBUtility/bin/Release/Pub_Control.dll
Binary files differ
diff --git a/DBUtility/bin/Release/Pub_Control.pdb b/DBUtility/bin/Release/Pub_Control.pdb
index 922a574..bd45d97 100644
--- a/DBUtility/bin/Release/Pub_Control.pdb
+++ b/DBUtility/bin/Release/Pub_Control.pdb
Binary files differ
diff --git a/DBUtility/bin/Release/SQLHelper.dll b/DBUtility/bin/Release/SQLHelper.dll
index 7cd568b..adfff60 100644
--- a/DBUtility/bin/Release/SQLHelper.dll
+++ b/DBUtility/bin/Release/SQLHelper.dll
Binary files differ
diff --git a/DBUtility/bin/Release/SQLHelper.pdb b/DBUtility/bin/Release/SQLHelper.pdb
index f350917..ad3c0e1 100644
--- a/DBUtility/bin/Release/SQLHelper.pdb
+++ b/DBUtility/bin/Release/SQLHelper.pdb
Binary files differ
diff --git a/DBUtility/obj/Release/DBUtility.dll b/DBUtility/obj/Release/DBUtility.dll
index dcd5847..c8e1c81 100644
--- a/DBUtility/obj/Release/DBUtility.dll
+++ b/DBUtility/obj/Release/DBUtility.dll
Binary files differ
diff --git a/DBUtility/obj/Release/DBUtility.pdb b/DBUtility/obj/Release/DBUtility.pdb
index 3f6e20f..3a46061 100644
--- a/DBUtility/obj/Release/DBUtility.pdb
+++ b/DBUtility/obj/Release/DBUtility.pdb
Binary files differ
diff --git a/Model/Model.csproj b/Model/Model.csproj
index 215bb0c..5d26898 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -119,6 +119,8 @@
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_DiscountList.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsCg_ContractTransportBillMain.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_OperatorGroup.cs" />
+ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_SampleSchemeSub_Model.cs" />
+ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_SampleScheme_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsSc_PackUnionBillBarCode_temp_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_PatrolCheckItemClass_Model.cs" />
<Compile Include="浠撳簱绠$悊\ClsKf_WorkShopICStockBillMain.cs" />
diff --git a/Model/bin/Release/DBUtility.dll b/Model/bin/Release/DBUtility.dll
index dcd5847..c8e1c81 100644
--- a/Model/bin/Release/DBUtility.dll
+++ b/Model/bin/Release/DBUtility.dll
Binary files differ
diff --git a/Model/bin/Release/DBUtility.pdb b/Model/bin/Release/DBUtility.pdb
index 3f6e20f..3a46061 100644
--- a/Model/bin/Release/DBUtility.pdb
+++ b/Model/bin/Release/DBUtility.pdb
Binary files differ
diff --git a/Model/bin/Release/Model.dll b/Model/bin/Release/Model.dll
index 9868710..0413f5f 100644
--- a/Model/bin/Release/Model.dll
+++ b/Model/bin/Release/Model.dll
Binary files differ
diff --git a/Model/bin/Release/Model.pdb b/Model/bin/Release/Model.pdb
index 12606dc..eee6d8b 100644
--- a/Model/bin/Release/Model.pdb
+++ b/Model/bin/Release/Model.pdb
Binary files differ
diff --git a/Model/bin/Release/Pub_Class.dll b/Model/bin/Release/Pub_Class.dll
index 48565f9..742c133 100644
--- a/Model/bin/Release/Pub_Class.dll
+++ b/Model/bin/Release/Pub_Class.dll
Binary files differ
diff --git a/Model/bin/Release/Pub_Class.pdb b/Model/bin/Release/Pub_Class.pdb
index 0f48c78..6563d10 100644
--- a/Model/bin/Release/Pub_Class.pdb
+++ b/Model/bin/Release/Pub_Class.pdb
Binary files differ
diff --git a/Model/bin/Release/Pub_Control.dll b/Model/bin/Release/Pub_Control.dll
index fa08c81..c5ba627 100644
--- a/Model/bin/Release/Pub_Control.dll
+++ b/Model/bin/Release/Pub_Control.dll
Binary files differ
diff --git a/Model/bin/Release/Pub_Control.pdb b/Model/bin/Release/Pub_Control.pdb
index 922a574..3412b16 100644
--- a/Model/bin/Release/Pub_Control.pdb
+++ b/Model/bin/Release/Pub_Control.pdb
Binary files differ
diff --git a/Model/bin/Release/SQLHelper.dll b/Model/bin/Release/SQLHelper.dll
index 7cd568b..adfff60 100644
--- a/Model/bin/Release/SQLHelper.dll
+++ b/Model/bin/Release/SQLHelper.dll
Binary files differ
diff --git a/Model/bin/Release/SQLHelper.pdb b/Model/bin/Release/SQLHelper.pdb
index f350917..ad3c0e1 100644
--- a/Model/bin/Release/SQLHelper.pdb
+++ b/Model/bin/Release/SQLHelper.pdb
Binary files differ
diff --git a/Model/obj/Release/Model.dll b/Model/obj/Release/Model.dll
index 9868710..0413f5f 100644
--- a/Model/obj/Release/Model.dll
+++ b/Model/obj/Release/Model.dll
Binary files differ
diff --git a/Model/obj/Release/Model.pdb b/Model/obj/Release/Model.pdb
index 12606dc..eee6d8b 100644
--- a/Model/obj/Release/Model.pdb
+++ b/Model/obj/Release/Model.pdb
Binary files differ
diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_SampleSchemeSub_Model.cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_SampleSchemeSub_Model.cs"
new file mode 100644
index 0000000..f6cf7ec
--- /dev/null
+++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_SampleSchemeSub_Model.cs"
@@ -0,0 +1,31 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Model
+{
+ public class ClsGy_SampleSchemeSub_Model : DBUtility.ClsGy_Base_Model
+ {
+
+ public int HInterID;
+ public int HEntryID;
+ public int HBatch;
+ public string HSampleCode;
+ public string HSampleRate;
+ public string HExpression;
+ public int HRejectQty;
+ public int HAcceptQty;
+ public int HSampleQty;
+ public int HBaHSampleUptch;
+ public int HSampleLow;
+ public int HSampleUp;
+
+
+
+
+
+
+ }
+}
diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_SampleScheme_Model.cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_SampleScheme_Model.cs"
new file mode 100644
index 0000000..0d7a8b4
--- /dev/null
+++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_SampleScheme_Model.cs"
@@ -0,0 +1,27 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Model
+{
+ public class ClsGy_SampleScheme_Model : DBUtility.ClsGy_Base_Model
+ {
+ public int HInterID;
+ public int HSampleTimes;
+ public string HSampleType;
+ public string HSampleLevel;
+ public string HStrictLevel;
+ public string HAQL;
+ public string HEffectDate;
+ public bool HIsSystemSet;
+ public string HExpireDate;
+
+
+
+
+
+
+ }
+}
diff --git a/Pub_Class/bin/Release/Pub_Class.dll b/Pub_Class/bin/Release/Pub_Class.dll
index 48565f9..742c133 100644
--- a/Pub_Class/bin/Release/Pub_Class.dll
+++ b/Pub_Class/bin/Release/Pub_Class.dll
Binary files differ
diff --git a/Pub_Class/bin/Release/Pub_Class.pdb b/Pub_Class/bin/Release/Pub_Class.pdb
index 0f48c78..6563d10 100644
--- a/Pub_Class/bin/Release/Pub_Class.pdb
+++ b/Pub_Class/bin/Release/Pub_Class.pdb
Binary files differ
diff --git a/Pub_Class/bin/Release/SyntacticSugar.dll b/Pub_Class/bin/Release/SyntacticSugar.dll
index c0635b3..9a5be6e 100644
--- a/Pub_Class/bin/Release/SyntacticSugar.dll
+++ b/Pub_Class/bin/Release/SyntacticSugar.dll
Binary files differ
diff --git a/Pub_Class/bin/Release/SyntacticSugar.pdb b/Pub_Class/bin/Release/SyntacticSugar.pdb
index ca3eca3..310ad83 100644
--- a/Pub_Class/bin/Release/SyntacticSugar.pdb
+++ b/Pub_Class/bin/Release/SyntacticSugar.pdb
Binary files differ
diff --git a/Pub_Control/bin/Release/Pub_Class.dll b/Pub_Control/bin/Release/Pub_Class.dll
index 48565f9..742c133 100644
--- a/Pub_Control/bin/Release/Pub_Class.dll
+++ b/Pub_Control/bin/Release/Pub_Class.dll
Binary files differ
diff --git a/Pub_Control/bin/Release/Pub_Class.pdb b/Pub_Control/bin/Release/Pub_Class.pdb
index 0f48c78..6563d10 100644
--- a/Pub_Control/bin/Release/Pub_Class.pdb
+++ b/Pub_Control/bin/Release/Pub_Class.pdb
Binary files differ
diff --git a/Pub_Control/bin/Release/Pub_Control.dll b/Pub_Control/bin/Release/Pub_Control.dll
index fa08c81..17e63cf 100644
--- a/Pub_Control/bin/Release/Pub_Control.dll
+++ b/Pub_Control/bin/Release/Pub_Control.dll
Binary files differ
diff --git a/Pub_Control/bin/Release/Pub_Control.pdb b/Pub_Control/bin/Release/Pub_Control.pdb
index 922a574..bd45d97 100644
--- a/Pub_Control/bin/Release/Pub_Control.pdb
+++ b/Pub_Control/bin/Release/Pub_Control.pdb
Binary files differ
diff --git a/SQLHelper/bin/Release/Pub_Class.dll b/SQLHelper/bin/Release/Pub_Class.dll
index 48565f9..742c133 100644
--- a/SQLHelper/bin/Release/Pub_Class.dll
+++ b/SQLHelper/bin/Release/Pub_Class.dll
Binary files differ
diff --git a/SQLHelper/bin/Release/Pub_Class.pdb b/SQLHelper/bin/Release/Pub_Class.pdb
index 0f48c78..6563d10 100644
--- a/SQLHelper/bin/Release/Pub_Class.pdb
+++ b/SQLHelper/bin/Release/Pub_Class.pdb
Binary files differ
diff --git a/SQLHelper/bin/Release/SQLHelper.dll b/SQLHelper/bin/Release/SQLHelper.dll
index 7cd568b..adfff60 100644
--- a/SQLHelper/bin/Release/SQLHelper.dll
+++ b/SQLHelper/bin/Release/SQLHelper.dll
Binary files differ
diff --git a/SQLHelper/bin/Release/SQLHelper.pdb b/SQLHelper/bin/Release/SQLHelper.pdb
index f350917..ad3c0e1 100644
--- a/SQLHelper/bin/Release/SQLHelper.pdb
+++ b/SQLHelper/bin/Release/SQLHelper.pdb
Binary files differ
diff --git a/SQLHelper/obj/Release/SQLHelper.dll b/SQLHelper/obj/Release/SQLHelper.dll
index 7cd568b..adfff60 100644
--- a/SQLHelper/obj/Release/SQLHelper.dll
+++ b/SQLHelper/obj/Release/SQLHelper.dll
Binary files differ
diff --git a/SQLHelper/obj/Release/SQLHelper.pdb b/SQLHelper/obj/Release/SQLHelper.pdb
index f350917..ad3c0e1 100644
--- a/SQLHelper/obj/Release/SQLHelper.pdb
+++ b/SQLHelper/obj/Release/SQLHelper.pdb
Binary files differ
diff --git a/SyntacticSugar/bin/Release/SyntacticSugar.dll b/SyntacticSugar/bin/Release/SyntacticSugar.dll
index c0635b3..9a5be6e 100644
--- a/SyntacticSugar/bin/Release/SyntacticSugar.dll
+++ b/SyntacticSugar/bin/Release/SyntacticSugar.dll
Binary files differ
diff --git a/SyntacticSugar/bin/Release/SyntacticSugar.pdb b/SyntacticSugar/bin/Release/SyntacticSugar.pdb
index ca3eca3..310ad83 100644
--- a/SyntacticSugar/bin/Release/SyntacticSugar.pdb
+++ b/SyntacticSugar/bin/Release/SyntacticSugar.pdb
Binary files differ
diff --git a/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache b/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache
new file mode 100644
index 0000000..fea44e6
--- /dev/null
+++ b/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache
Binary files differ
diff --git a/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt b/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
index e92e311..f6d234d 100644
--- a/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
+++ b/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
@@ -4,6 +4,8 @@
D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache
D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll
D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb
+<<<<<<< HEAD
+=======
C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.dll
C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.pdb
C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache
diff --git a/SyntacticSugar/obj/Release/SyntacticSugar.csproj.FileListAbsolute.txt b/SyntacticSugar/obj/Release/SyntacticSugar.csproj.FileListAbsolute.txt
index dd1ef6e..e00c9c5 100644
--- a/SyntacticSugar/obj/Release/SyntacticSugar.csproj.FileListAbsolute.txt
+++ b/SyntacticSugar/obj/Release/SyntacticSugar.csproj.FileListAbsolute.txt
@@ -1,5 +1,5 @@
-D:\WorkBench\MES-WEB-API\SyntacticSugar\bin\Release\SyntacticSugar.dll
-D:\WorkBench\MES-WEB-API\SyntacticSugar\bin\Release\SyntacticSugar.pdb
-D:\WorkBench\MES-WEB-API\SyntacticSugar\obj\Release\SyntacticSugar.csproj.CoreCompileInputs.cache
-D:\WorkBench\MES-WEB-API\SyntacticSugar\obj\Release\SyntacticSugar.dll
-D:\WorkBench\MES-WEB-API\SyntacticSugar\obj\Release\SyntacticSugar.pdb
+D:\GitHub\MES-WEB-API\SyntacticSugar\bin\Release\SyntacticSugar.dll
+D:\GitHub\MES-WEB-API\SyntacticSugar\bin\Release\SyntacticSugar.pdb
+D:\GitHub\MES-WEB-API\SyntacticSugar\obj\Release\SyntacticSugar.csproj.CoreCompileInputs.cache
+D:\GitHub\MES-WEB-API\SyntacticSugar\obj\Release\SyntacticSugar.dll
+D:\GitHub\MES-WEB-API\SyntacticSugar\obj\Release\SyntacticSugar.pdb
diff --git a/SyntacticSugar/obj/Release/SyntacticSugar.dll b/SyntacticSugar/obj/Release/SyntacticSugar.dll
index c0635b3..874230f 100644
--- a/SyntacticSugar/obj/Release/SyntacticSugar.dll
+++ b/SyntacticSugar/obj/Release/SyntacticSugar.dll
Binary files differ
diff --git a/SyntacticSugar/obj/Release/SyntacticSugar.pdb b/SyntacticSugar/obj/Release/SyntacticSugar.pdb
index ca3eca3..32b7fb9 100644
--- a/SyntacticSugar/obj/Release/SyntacticSugar.pdb
+++ b/SyntacticSugar/obj/Release/SyntacticSugar.pdb
Binary files differ
diff --git a/WebAPI/App_Start/WebApiConfig.cs b/WebAPI/App_Start/WebApiConfig.cs
index 19d0777..79bdce1 100644
--- a/WebAPI/App_Start/WebApiConfig.cs
+++ b/WebAPI/App_Start/WebApiConfig.cs
@@ -30,13 +30,13 @@
routeTemplate: "actionapi/{controller}/{action}/{id}",
defaults: new { id = RouteParameter.Optional }
);
- // // 娉ㄥ唽绛惧悕
- // config.Filters.Add(new SignatureVerifyAttribute());
- // // 鍏ㄥ眬鍚敤 JWT 璁よ瘉
- // config.Filters.Add(new JwtAuthorizeAttribute());
- //
- // // 鍚敤JWT鍝嶅簲鎷︽埅鍣紝鑷姩鍒锋柊JWT
- // config.MessageHandlers.Add(new TokenAppendHandler());
+ // 娉ㄥ唽绛惧悕
+ config.Filters.Add(new SignatureVerifyAttribute());
+ //// 鍏ㄥ眬鍚敤 JWT 璁よ瘉
+ //config.Filters.Add(new JwtAuthorizeAttribute());
+
+ //// 鍚敤JWT鍝嶅簲鎷︽埅鍣紝鑷姩鍒锋柊JWT
+ //config.MessageHandlers.Add(new TokenAppendHandler());
}
}
}
diff --git a/WebAPI/Controllers/BaseSet/Gy_SampleSchemeController.cs b/WebAPI/Controllers/BaseSet/Gy_SampleSchemeController.cs
new file mode 100644
index 0000000..b90fbec
--- /dev/null
+++ b/WebAPI/Controllers/BaseSet/Gy_SampleSchemeController.cs
@@ -0,0 +1,785 @@
+锘縰sing Model;
+using 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 Newtonsoft.Json;
+using System.Web;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+using System.IO;
+
+namespace WebAPI.Controllers.BaseSet
+{
+ public class Gy_SampleSchemeController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+
+ private json objJsonResult = new json();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ DataSet ds;
+ /// <summary>
+ /// 鏌ヨ鏂规硶
+ /// </summary>
+ [Route("Gy_SampleScheme/list")]
+ [HttpGet]
+ public object list(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_SampleScheme_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from h_v_Gy_GetSampleSchemeListView where 1 = 1 " + sWhere , "h_v_Gy_GetSampleSchemeListView");
+
+ //娣诲姞鍒楀悕
+ 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;
+ }
+ }
+
+ /// <summary>
+ /// 淇濆瓨鎸夐挳
+ /// </summary>
+ [Route("Gy_SampleScheme/ModifyByID")]
+ [HttpPost]
+ public object ModifyByID([FromBody] JObject oMain)
+ {
+ try
+ {
+
+ 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();
+ string msg4 = sArray[2].ToString();
+
+ //鍒ゆ柇鏉冮檺
+ if (!ClsPub.Security_Log("Gy_SampleScheme_Edit", 1, false, msg4))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+
+ //鍙嶅簭鍒楀寲
+ msg2 = "[" + msg2.ToString() + "]";
+ List<ClsGy_SampleScheme_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsGy_SampleScheme_Model>>(msg2);
+ List<ClsGy_SampleSchemeSub_Model> list1 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsGy_SampleSchemeSub_Model>>(msg3);
+ 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;
+ bool HEndFlag = list[0].HEndFlag;
+ bool HStopflag = list[0].HStopflag;
+ string HRemark = list[0].HRemark;
+ string HHelpCode = list[0].HHelpCode;
+ string HUseFlag = list[0].HUseFlag;
+ string HMakeTime = list[0].HMakeTime;
+ string HMakeEmp = msg4;
+ long HUSEORGID = list[0].HUSEORGID;
+ long HCREATEORGID = list[0].HCREATEORGID;
+ long HUnitID = list[0].HUnitID;
+
+
+ if (!DBUtility.ClsPub.AllowNumber(HNumber))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ if (HItemID == 0)
+ {
+ oCN.BeginTran();
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Gy_SampleScheme_BeforeSaveCtrl " + HMakeEmp + ",'" + 1 + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Gy_SampleScheme_BeforeSaveCtrl");
+ 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;
+ }
+
+ string _sql = "select HItemID from Gy_SampleScheme where HNumber = N'" + HNumber + "'";
+ DataSet _ds = oCN.RunProcReturn(_sql, "Gy_SampleScheme");
+ if (_ds.Tables[0].Rows.Count > 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触: 浠g爜閲嶅!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //==================================================================================
+
+
+ string sql = $@"INSERT INTO [Gy_SampleScheme] ([HName], [HShortNumber], [HParentID], [HLevel], [HEndFlag], [HStopflag], [HRemark], [HHelpCode], [HUseFlag], [HMakeTime], [HMakeEmp], [HCheckEmp], [HCheckTime], [HModifyEmp], [HModifyTime], [HStopEmp], [HStopTime], [HUSEORGID], [HCREATEORGID], [HInterID], [HSampleTimes], [HSampleType], [HSampleLevel], [HStrictLevel], [HAQL], [HEffectDate], [HExpireDate], [HIsSystemSet], [HERPItemID], [HNumber])
+ VALUES (
+ '{list[0].HName}', '{list[0].HShortNumber}', '{list[0].HParentID}', '{list[0].HLevel}', '{list[0].HEndFlag}', '{list[0].HStopflag}', '{list[0].HRemark}', '{list[0].HHelpCode}', '{list[0].HUseFlag}', '{list[0].HMakeTime}', '{HMakeEmp}', '{list[0].HCheckEmp}','{list[0].HCheckTime}','{list[0].HModifyEmp}', '{list[0].HModifyTime}', '{list[0].HStopEmp}','{list[0].HStopTime}','{list[0].HUSEORGID}','{list[0].HCREATEORGID}','{list[0].HInterID}','{list[0].HSampleTimes}','{list[0].HSampleType}','{list[0].HSampleLevel}','{list[0].HStrictLevel}','{list[0].HAQL}','{list[0].HEffectDate}','{list[0].HExpireDate}','{list[0].HIsSystemSet}','{0}','{list[0].HNumber}'
+ ); ";
+ oCN.RunProc(sql);
+ //淇敼涓婄骇涓洪潪鏈骇浠g爜
+ oCN.RunProc("Update Gy_SampleScheme set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+
+ // 鎵ц鏌ヨ鑾峰彇HItemID
+ DataSet temp_ds = oCN.RunProcReturn("select top 1 HItemID from Gy_SampleScheme where HNumber = N'" + HNumber + "'", "Gy_SampleScheme");
+
+ if (temp_ds.Tables[0].Rows.Count < 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜锛氭彃鍏ヤ富琛ㄦ暟鎹け璐�";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ int itemID = int.Parse(temp_ds.Tables[0].Rows[0]["HItemID"].ToString());
+ string sql3 = "";
+
+ // 鏀逛负for寰幆锛孒EntryID浠�1寮�濮嬮�掑
+ for (int i = 0; i < list1.Count; i++)
+ {
+ // 鑾峰彇褰撳墠寰幆鐨勫疄浣撳璞�
+ ClsGy_SampleSchemeSub_Model listOne = list1[i];
+ int entryID = i + 1;
+
+ sql3 = $@"INSERT INTO [Gy_SampleSchemeSub] ([HInterID], [HEntryID], [HBatch], [HSampleCode], [HSampleRate], [HExpression], [HRejectQty], [HAcceptQty], [HSampleQty], [HSampleLow], [HSampleUp]) VALUES(
+ '{itemID}', '{entryID}', '{listOne.HBatch}', '{listOne.HSampleCode}', '{listOne.HSampleRate}', '{listOne.HExpression}', '{listOne.HRejectQty}', '{listOne.HAcceptQty}', '{listOne.HSampleQty}', '{listOne.HSampleLow}', '{listOne.HSampleUp}'
+ ); ";
+ oCN.RunProc(sql3);
+ }
+
+
+
+ //淇濆瓨鍚庢帶鍒�=========================================
+ string sql2 = "exec h_p_Gy_SampleScheme_AfterSaveCtrl " + HMakeEmp + ",'" + 1 + "'";
+ ds = oCN.RunProcReturn(sql2, "h_p_Gy_SampleScheme_AfterSaveCtrl");
+ 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.Commit();
+ }
+ else
+ {
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCN.BeginTran();
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Gy_SampleScheme_BeforeSaveCtrl " + HMakeEmp + ",'" + 2 + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Gy_SampleScheme_BeforeSaveCtrl");
+ 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_SampleScheme" + " set " +
+ " HName='" + list[0].HName + "'" +
+ ",HShortNumber='" + list[0].HShortNumber + "'" +
+ ",HParentID=" + list[0].HParentID +
+ ",HLevel=" + list[0].HLevel +
+ ",HEndFlag=" + Convert.ToString(list[0].HEndFlag ? 1 : 0) +
+ ",HStopflag=" + Convert.ToString(list[0].HStopflag ? 1 : 0) +
+ ",HRemark='" + list[0].HRemark + "'" +
+ ",HHelpCode='" + list[0].HHelpCode + "'" +
+ ",HUseFlag='" + list[0].HUseFlag + "'" +
+ ",HMakeTime='" + list[0].HMakeTime + "'" +
+ ",HMakeEmp='" + HMakeEmp + "'" +
+ ",HCheckEmp='" + list[0].HCheckEmp + "'" +
+ ",HCheckTime='" + list[0].HCheckTime + "'" +
+ ",HModifyEmp='" + list[0].HModifyEmp + "'" +
+ ",HModifyTime='" + list[0].HModifyTime + "'" +
+ ",HStopEmp='" + list[0].HStopEmp + "'" +
+ ",HStopTime='" + list[0].HStopTime + "'" +
+ ",HUSEORGID=" + list[0].HUSEORGID +
+ ",HCREATEORGID=" + list[0].HCREATEORGID +
+ ",HInterID=" + list[0].HInterID +
+ ",HSampleTimes='" + list[0].HSampleTimes + "'" +
+ ",HSampleType='" + list[0].HSampleType + "'" +
+ ",HSampleLevel='" + list[0].HSampleLevel + "'" +
+ ",HStrictLevel='" + list[0].HStrictLevel +"'"+
+ ",HAQL=" + list[0].HAQL +
+ ",HEffectDate='" + list[0].HEffectDate + "'" +
+ ",HExpireDate='" + list[0].HExpireDate + "'" +
+ ",HIsSystemSet=" + Convert.ToString(list[0].HIsSystemSet ? 1 : 0) +
+ ",HERPItemID=" + 0 +
+ ",HNumber='" + list[0].HNumber + "'" +
+ " 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_SampleScheme set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+
+ oCN.RunProcReturn("delete from Gy_SampleSchemeSub where HInterID = " + HItemID, "Gy_SampleSchemeSub");
+
+ string sql3 = "";
+
+ // 鏀逛负for寰幆锛孒EntryID浠�1寮�濮嬮�掑
+ for (int i = 0; i < list1.Count; i++)
+ {
+ // 鑾峰彇褰撳墠寰幆鐨勫疄浣撳璞�
+ ClsGy_SampleSchemeSub_Model listOne = list1[i];
+ int entryID = i + 1;
+
+ sql3 = $@"INSERT INTO [Gy_SampleSchemeSub] ([HInterID], [HEntryID], [HBatch], [HSampleCode], [HSampleRate], [HExpression], [HRejectQty], [HAcceptQty], [HSampleQty], [HSampleLow], [HSampleUp]) VALUES(
+ '{HItemID}', '{entryID}', '{listOne.HBatch}', '{listOne.HSampleCode}', '{listOne.HSampleRate}', '{listOne.HExpression}', '{listOne.HRejectQty}', '{listOne.HAcceptQty}', '{listOne.HSampleQty}', '{listOne.HSampleLow}', '{listOne.HSampleUp}'
+ ); ";
+ oCN.RunProc(sql3);
+ }
+
+
+ //淇濆瓨鍚庢帶鍒�=========================================
+ string sql2 = "exec h_p_Gy_SampleScheme_AfterSaveCtrl " + HMakeEmp + ",'" + 2 + "'";
+ ds = oCN.RunProcReturn(sql2, "h_p_Gy_SampleScheme_AfterSaveCtrl");
+ 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.Commit();
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ 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>
+ [Route("Gy_SampleScheme/xg")]
+ [HttpGet]
+ public object xg(long HInterID)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("select * from Gy_SampleScheme where HItemID=" + HInterID, "Gy_SampleScheme");
+
+ 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>
+ /// 鏌ヨ瀛愯〃鏂规硶
+ /// </summary>
+ [Route("Gy_SampleScheme/listSub")]
+ [HttpGet]
+ public object listSub(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_SampleScheme_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from Gy_SampleSchemeSub where 1 = 1 " + sWhere , "Gy_SampleSchemeSub");
+
+ //娣诲姞鍒楀悕
+ 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;
+ }
+
+
+ }
+
+
+ /// <summary>
+ /// 鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("Gy_SampleScheme/deletesam")]
+ [HttpGet]
+ public object deletesam(string HItemID, string user)
+ {
+ DataSet ds;
+ DataSet ds1;
+ try
+ {
+ //鍒犻櫎鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_SampleScheme_Delete", 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_SampleScheme where HItemID=" + HItemID, "Gy_SampleScheme");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ else if (ds.Tables[0].Rows[0]["HCheckEmp"] != null && ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "宸茬粡瀹℃牳涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ ds1 = oCN.RunProcReturn("Select HItemID from Gy_SampleScheme Where HParentID='" + HItemID + "'", " Gy_SampleScheme");
+ 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;
+ }
+ //鍒犻櫎鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Gy_SampleScheme_BeforeDelCtrl " + HItemID + ",'" + user + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Gy_SampleScheme_BeforeDelCtrl");
+ 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("delete from Gy_SampleScheme where HItemID=" + HItemID);
+ oCN.RunProc("delete from Gy_SampleSchemeSub where HInterID=" + HItemID);
+
+
+ //鍒犻櫎鍚庢帶鍒�=========================================
+ string sql2 = "exec h_p_Gy_SampleScheme_AfterDelCtrl " + HItemID + ",'" + user + "'";
+ ds = oCN.RunProcReturn(sql2, "h_p_Gy_SampleScheme_AfterDelCtrl");
+ 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.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;
+ }
+ }
+
+
+ #region 瀹℃牳銆佸弽瀹℃牳
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Gy_SampleScheme/AuditGy_SampleScheme")]
+ [HttpGet]
+ public object AuditGy_SampleScheme(int HInterID, int IsAudit, string CurUserName)
+ {
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_SampleScheme_Check", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ var ds = oCN.RunProcReturn("select * from Gy_SampleScheme where HItemID=" + HInterID, "Gy_SampleScheme");
+ 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_SampleScheme_BeforeCheckCtrl " + HInterID + ",'" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Gy_SampleScheme_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_SampleScheme set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
+
+
+ //瀹℃牳鍚庢帶鍒�=========================================
+ string sql2 = "exec h_p_Gy_SampleScheme_AfterCheckCtrl " + HInterID + ",'" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql2, "h_p_Gy_SampleScheme_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_SampleScheme_BeforeUnCheckCtrl " + HInterID + ",'" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Gy_SampleScheme_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_SampleScheme set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
+
+
+ //鍙嶅鏍稿悗鎺у埗=========================================
+ string sql2 = "exec h_p_Gy_SampleScheme_AfterUnCheckCtrl " + HInterID + ",'" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql2, "h_p_Gy_SampleScheme_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
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Service/SignatureVerifyAttribute.cs b/WebAPI/Service/SignatureVerifyAttribute.cs
index a4625ce..8f24798 100644
--- a/WebAPI/Service/SignatureVerifyAttribute.cs
+++ b/WebAPI/Service/SignatureVerifyAttribute.cs
@@ -69,6 +69,7 @@
if (!string.IsNullOrEmpty(query) && query.StartsWith("?"))
{
rawData = query.Substring(1);
+
}
}
else
@@ -84,6 +85,7 @@
actionContext.Request.Content.Headers.ContentType.MediaType);
}
}
+ rawData = rawData.Replace("'", "%27");
var signStr = rawData + "×tamp=" + timestamp + "&nonce=" + nonce + "&key=" + SecretKey;
var serverSign = ComputeHmacSha256(signStr, SecretKey);
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 041c9b6..3375134 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -429,6 +429,7 @@
<Compile Include="Controllers\BaseSet\Gy_ColorClassController.cs" />
<Compile Include="Controllers\BaseSet\Gy_DriverController.cs" />
<Compile Include="Controllers\BaseSet\Gy_ICBomBillController.cs" />
+ <Compile Include="Controllers\BaseSet\Gy_SampleSchemeController.cs" />
<Compile Include="Controllers\BaseSet\Gy_WorkDayController.cs" />
<Compile Include="Controllers\BaseSet\Gy_PackTypeController.cs" />
<Compile Include="Controllers\BaseSet\Gy_RoutingGroupController.cs" />
@@ -1360,6 +1361,7 @@
<Folder Include="Views\Gy_RecConditionBill\" />
<Folder Include="Views\Gy_RepairCheckClass\" />
<Folder Include="Views\Gy_RoutingGroup\" />
+ <Folder Include="Views\Gy_SampleScheme\" />
<Folder Include="Views\Gy_SettleStyle\" />
<Folder Include="Views\Gy_SOPBill\" />
<Folder Include="Views\Gy_SourceWorkStationSet\" />
diff --git a/WebAPI/WebAPI.csproj.user b/WebAPI/WebAPI.csproj.user
index 507bfd4..2fec871 100644
--- a/WebAPI/WebAPI.csproj.user
+++ b/WebAPI/WebAPI.csproj.user
@@ -2,7 +2,8 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|x86</LastActiveSolutionConfig>
- <LastActiveSolutionConfig>Debug|x86</LastActiveSolutionConfig>
+ <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
+ <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />
@@ -16,7 +17,7 @@
<ProjectView>ShowAllFiles</ProjectView>
<NameOfLastUsedPublishProfile>D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile2.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile4.pubxml</NameOfLastUsedPublishProfile>
- <NameOfLastUsedPublishProfile>D:\WorkBench\MES-WEB-API\WebAPI\Properties\PublishProfiles\CHZFolderProfile.pubxml</NameOfLastUsedPublishProfile>
+ <NameOfLastUsedPublishProfile>D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile2.pubxml</NameOfLastUsedPublishProfile>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
diff --git a/sdk_dingding/TopSdk/bin/Debug/TopSdk.dll b/sdk_dingding/TopSdk/bin/Debug/TopSdk.dll
index 341d3d9..4581391 100644
--- a/sdk_dingding/TopSdk/bin/Debug/TopSdk.dll
+++ b/sdk_dingding/TopSdk/bin/Debug/TopSdk.dll
Binary files differ
diff --git a/sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb b/sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb
index 409a0b6..81d58e3 100644
--- a/sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb
+++ b/sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb
Binary files differ
diff --git a/sdk_dingding/TopSdk/bin/Release/TopSdk.dll b/sdk_dingding/TopSdk/bin/Release/TopSdk.dll
index 82c4d76..db2218d 100644
--- a/sdk_dingding/TopSdk/bin/Release/TopSdk.dll
+++ b/sdk_dingding/TopSdk/bin/Release/TopSdk.dll
Binary files differ
diff --git a/sdk_dingding/TopSdk/bin/Release/TopSdk.pdb b/sdk_dingding/TopSdk/bin/Release/TopSdk.pdb
index 06ae45c..7834e41 100644
--- a/sdk_dingding/TopSdk/bin/Release/TopSdk.pdb
+++ b/sdk_dingding/TopSdk/bin/Release/TopSdk.pdb
Binary files differ
diff --git a/sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.AssemblyReference.cache b/sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.AssemblyReference.cache
new file mode 100644
index 0000000..35e5324
--- /dev/null
+++ b/sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.AssemblyReference.cache
Binary files differ
diff --git a/sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt b/sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt
index fb8b018..6735d11 100644
--- a/sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt
+++ b/sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt
@@ -4,6 +4,8 @@
D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache
D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll
D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb
+<<<<<<< HEAD
+=======
C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.dll
C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.pdb
C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache
@@ -20,6 +22,18 @@
D:\WMES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache
D:\WMES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll
D:\WMES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb
+>>>>>>> 4d047b40eff94b3fc251ca164770e524a2c02779
+D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.dll
+D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.pdb
+D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache
+D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll
+D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb
+<<<<<<< HEAD
+=======
+<<<<<<< HEAD
+D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache
+C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.dll
+C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.pdb
C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache
D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.dll
D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.pdb
diff --git a/sdk_dingding/TopSdk/obj/Debug/TopSdk.dll b/sdk_dingding/TopSdk/obj/Debug/TopSdk.dll
index 341d3d9..4581391 100644
--- a/sdk_dingding/TopSdk/obj/Debug/TopSdk.dll
+++ b/sdk_dingding/TopSdk/obj/Debug/TopSdk.dll
Binary files differ
diff --git a/sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb b/sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb
index 409a0b6..81d58e3 100644
--- a/sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb
+++ b/sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb
Binary files differ
diff --git a/sdk_dingding/TopSdk/obj/Release/TopSdk.csproj.AssemblyReference.cache b/sdk_dingding/TopSdk/obj/Release/TopSdk.csproj.AssemblyReference.cache
new file mode 100644
index 0000000..afa8882
--- /dev/null
+++ b/sdk_dingding/TopSdk/obj/Release/TopSdk.csproj.AssemblyReference.cache
Binary files differ
diff --git a/sdk_dingding/TopSdk/obj/Release/TopSdk.csproj.FileListAbsolute.txt b/sdk_dingding/TopSdk/obj/Release/TopSdk.csproj.FileListAbsolute.txt
index e11a207..7fd1cdb 100644
--- a/sdk_dingding/TopSdk/obj/Release/TopSdk.csproj.FileListAbsolute.txt
+++ b/sdk_dingding/TopSdk/obj/Release/TopSdk.csproj.FileListAbsolute.txt
@@ -1,5 +1,6 @@
-D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\bin\Release\TopSdk.dll
-D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\bin\Release\TopSdk.pdb
-D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\obj\Release\TopSdk.csproj.CoreCompileInputs.cache
-D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\obj\Release\TopSdk.dll
-D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\obj\Release\TopSdk.pdb
+D:\GitHub\MES-WEB-API\sdk_dingding\TopSdk\bin\Release\TopSdk.dll
+D:\GitHub\MES-WEB-API\sdk_dingding\TopSdk\bin\Release\TopSdk.pdb
+D:\GitHub\MES-WEB-API\sdk_dingding\TopSdk\obj\Release\TopSdk.csproj.AssemblyReference.cache
+D:\GitHub\MES-WEB-API\sdk_dingding\TopSdk\obj\Release\TopSdk.csproj.CoreCompileInputs.cache
+D:\GitHub\MES-WEB-API\sdk_dingding\TopSdk\obj\Release\TopSdk.dll
+D:\GitHub\MES-WEB-API\sdk_dingding\TopSdk\obj\Release\TopSdk.pdb
diff --git a/sdk_dingding/TopSdk/obj/Release/TopSdk.dll b/sdk_dingding/TopSdk/obj/Release/TopSdk.dll
index 82c4d76..308bb51 100644
--- a/sdk_dingding/TopSdk/obj/Release/TopSdk.dll
+++ b/sdk_dingding/TopSdk/obj/Release/TopSdk.dll
Binary files differ
diff --git a/sdk_dingding/TopSdk/obj/Release/TopSdk.pdb b/sdk_dingding/TopSdk/obj/Release/TopSdk.pdb
index 06ae45c..acc4dc6 100644
--- a/sdk_dingding/TopSdk/obj/Release/TopSdk.pdb
+++ b/sdk_dingding/TopSdk/obj/Release/TopSdk.pdb
Binary files differ
--
Gitblit v1.9.1