From 5498a294428687da0b7013fecd93d334801ea313 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期一, 01 十二月 2025 18:01:29 +0800
Subject: [PATCH] 问题清单
---
WebAPI/Controllers/QC_ManagementController.cs | 2
Model/生产管理/模具管理/ClsGy_QCVerificationBillSub.cs | 15
Model/Model.csproj | 3
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 521 ++++++++++++
DAL/生产管理/模具管理/ClsGy_QCVerificationBillMain.cs | 274 ++++++
Model/基础资料/其他基础资料/ClsGy_QCCheckProjectMain.cs | 1
Model/生产管理/模具管理/ClsGy_QCVerificationBillMain.cs | 14
WebAPI/ListModels.cs | 24
WebAPI/Controllers/BaseSet/Gy_DriverController.cs | 1407 ++++++++++++++++++++++++++++++++++
DAL/DAL.csproj | 2
DAL/基础资料/公用基础资料/ClsGy_Driver_Ctl.cs | 100 ++
WebAPI/Models/Driver.cs | 40
Model/基础资料/基础资料/ClsGy_Driver_Model.cs | 22
WebAPI/WebAPI.csproj | 3
DAL/基础资料/其他基础资料/ClsGy_QCCheckProjectMain.cs | 5
15 files changed, 2,430 insertions(+), 3 deletions(-)
diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index 37f9aba..a3a0c8c 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -83,6 +83,7 @@
<Compile Include="ClsGy_MaterialPackingRelation.cs" />
<Compile Include="MES\ClsSc_MESStopRestoreWorkBill.cs" />
<Compile Include="浠撳簱绠$悊\灏忚溅閿佸畾\ClsKf_TrolleyPositionBill.cs" />
+ <Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_Driver_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_PatrolCheckItemMethod_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_PatrolCheckItemClass_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_MaintainClass_Ctl.cs" />
@@ -109,6 +110,7 @@
<Compile Include="鐢熶骇绠$悊\瀹㈡埛鏍囩\ClsSc_CustomerTagInfo.cs" />
<Compile Include="鐢熶骇绠$悊\鎺掍骇瑙i攣鐢宠鍗昞ClsJIT_UnLockRequestBill.cs" />
<Compile Include="鐢熶骇绠$悊\鎺掍骇閿佸畾鐢宠鍗昞ClsJIT_LockRequestBill.cs" />
+ <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsGy_QCVerificationBillMain.cs" />
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMoveStockRequestBill.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipPatrolCheckPlanBill.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipPatrolCheckBill.cs" />
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_Driver_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_Driver_Ctl.cs"
new file mode 100644
index 0000000..22addbc
--- /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_Driver_Ctl.cs"
@@ -0,0 +1,100 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+ public class ClsGy_Driver_Ctl: DBUtility.ClsGy_Base_Ctl
+ {
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+ public string HOldNumber;
+ public Model.ClsGy_Driver_Model oModel = new Model.ClsGy_Driver_Model();
+ //鏂板
+ public override bool AddNew()
+ {
+
+ try
+ {
+ oCn.BeginTran();
+ oCn.RunProc("Insert into " + MvarItemKey + " " +
+ " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+ ",HLevel,HEndFlag,HStopflag,HRemark,HEmpID,) " +
+ " Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() +
+ "," + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "'," + oModel.HEmpID + "," + ")", ref DBUtility.ClsPub.sExeReturnInfo);
+ //淇敼涓婄骇涓洪潪鏈骇浠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 sItemID)
+ {
+ try
+ {
+ oCn.BeginTran();
+ oCn.RunProc("Update " + MvarItemKey + " set " +
+ " HNumber='" + oModel.HNumber + "'" +
+ ",HName='" + oModel.HName + "'" +
+ ",HShortNumber='" + oModel.HShortNumber + "'" +
+ ",HHelpCode='" + oModel.HHelpCode + "'" +
+ ",HLevel=" + oModel.HLevel +
+ ",HParentID=" + oModel.HParentID +
+ ",HEmpID=" + oModel.HEmpID +
+ ",HBarCodeForBase='" + oModel.HBarCode + "'" +
+ ",HEntityID=" + oModel.HEntityID +
+
+ ",HEndflag=" + Convert.ToString(oModel.HEndFlag ? 1 : 0) +
+ ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
+ ",HRemark= '" + oModel.HRemark + "' Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+ //淇敼瀛愰」鐩唬鐮�
+ oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+ //灏嗕笂绾� 涓洪潪鏈骇
+ 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);
+ }
+ }
+ //鏍规嵁浠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_Driver_Ctl()
+ {
+ MvarItemKey = "Gy_Driver";
+ MvarReportTitle = "椹鹃┒鍛樿缃�";
+ oModel = new Model.ClsGy_Driver_Model();
+ }
+ }
+}
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_QCCheckProjectMain.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_QCCheckProjectMain.cs"
index ae270c2..3d8045e 100644
--- "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_QCCheckProjectMain.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_QCCheckProjectMain.cs"
@@ -83,6 +83,7 @@
",HDeptID=" + omodel.HDeptID.ToString() +
",HSampleSchemeID=" + omodel.HSampleSchemeID.ToString() +
",HSourceID=" + omodel.HSourceID.ToString() +
+ ",HCheckBillType='" + omodel.HCheckBillType.ToString() +"'"+
" where HInterID=" + lngBillKey.ToString());
//鍒犻櫎鍏宠仈
DeleteRelation(ref sReturn, lngBillKey);
@@ -186,13 +187,13 @@
"(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
",HYear,HPeriod,HRemark" +
",HMaterID,HName,HMaterNumber,HMaterTypeID,HUnitID" +
- ",HUnitNumber,HStandard,HProcID,HDeptID,HSampleSchemeID,HSourceID,HOrgID" +
+ ",HUnitNumber,HStandard,HProcID,HDeptID,HSampleSchemeID,HSourceID,HOrgID,HCheckBillType" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
"," + omodel.HMaterID.ToString() + ",'" + omodel.HName + "','" + omodel.HMaterNumber + "'," + omodel.HMaterTypeID.ToString() + "," + omodel.HUnitID.ToString() +
",'" + omodel.HUnitNumber + "', " + Convert.ToString(omodel.HStandard ? 1 : 0) + "," + omodel.HProcID.ToString() + "," + omodel.HDeptID.ToString() +
- "," + omodel.HSampleSchemeID + ",'" + omodel.HSourceID + "','" + omodel.HOrgID + "') ");
+ "," + omodel.HSampleSchemeID + ",'" + omodel.HSourceID + "','" + omodel.HOrgID+"','"+ omodel.HCheckBillType + "') ");
//鎻掑叆瀛愯〃
foreach (Model.ClsGy_QCCheckProjectSub oSub in DetailColl)
{
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsGy_QCVerificationBillMain.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsGy_QCVerificationBillMain.cs"
new file mode 100644
index 0000000..13dec2b
--- /dev/null
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsGy_QCVerificationBillMain.cs"
@@ -0,0 +1,274 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+ public class ClsGy_QCVerificationBillMain : DBUtility.ClsXt_BaseBill
+ {
+ public Model.ClsGy_QCVerificationBillMain omodel = new Model.ClsGy_QCVerificationBillMain();
+ public List<Model.ClsGy_QCVerificationBillSub> DetailColl = new List<Model.ClsGy_QCVerificationBillSub>();
+
+
+ public ClsGy_QCVerificationBillMain()
+ {
+ base.MvarItemKeySub = "Gy_QCVerificationBillMain";
+ base.MvarItemKeySub2 = "";
+ base.MvarItemKeySub3 = "";
+ base.MvarItemKeySub4 = "";
+ base.MvarItemKey= "Gy_QCVerificationBillMain";
+ base.MvarReportTitle = "鍣ㄥ叿鏍″噯璁板綍鍗�";
+ base.BillType = "3321";
+ base.HBillSubType = "3321";
+
+ }
+
+ #region 鍥哄畾浠g爜
+
+ ~ClsGy_QCVerificationBillMain()
+ {
+ DetailColl = null;
+ }
+
+ #endregion 鑷畾涔夋柟娉�
+ //淇敼鍗曟嵁
+ public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //
+ oCn.BeginTran();
+ //鏇存柊涓昏〃
+ oCn.RunProc("UpDate Gy_QCVerificationBillMain set " +
+ " HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��===============
+ ",HDate='" + omodel.HDate + "'" +
+ ",HYear='" + omodel.HYear.ToString() + "'" +
+ ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+ ",HRemark='" + omodel.HRemark + "'" +
+ ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
+ ",HUpDateDate=getdate()" +
+ //========================================
+ ",HCheckEmp=" + omodel.HCheckEmp.ToString() +
+ ",HDeptID=" + omodel.HDeptID.ToString() +
+ ",HMainSourceBillType='"+ omodel.HMainSourceBillType+"'"+
+ ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" +
+ ",HMainSourceInterID=" + omodel.HMainSourceInterID.ToString()+
+ ",HMainSourceEntryID="+ omodel.HMainSourceEntryID.ToString()+
+ " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎鍏宠仈
+ DeleteRelation(ref sReturn, lngBillKey);
+ oCn.RunProc("delete from Gy_QCVerificationBillSub where HInterID=" + lngBillKey);
+ //鎻掑叆瀛愯〃
+ omodel.HInterID = lngBillKey;
+ foreach (Model.ClsGy_QCVerificationBillSub oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into Gy_QCVerificationBillSub " +
+ " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HInspectInstruMentID,HBeginDate,HEndDate,HHCalibrationStatus" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ "," + oSub.HInspectInstruMentID.ToString() + ",'" + oSub.HBeginDate + "','" + oSub.HEndDate.ToString() + "','" + oSub.HHCalibrationStatus.ToString() + "'" +
+ ") ");
+
+ }
+ sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+ //鏂板鍗曟嵁
+ public override bool AddBill(ref string sReturn)
+ {
+ try
+ {
+ //寰楀埌mainid
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Sc_MouldRepairWorkBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1,1 ", "h_p_Sc_MouldRepairWorkBill_BeforeSaveCtrl");
+ if (ds == null)
+ {
+ sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ return false;
+ }
+ //=========================================================
+
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCn.BeginTran();
+ oCn.RunProc("Insert Into Gy_QCVerificationBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+ ",HYear,HPeriod,HRemark,HMaker,HMakeDate," +
+ "HMainSourceBillType,HMainSourceBillNo,HMainSourceInterID,HMainSourceEntryID," +
+ "HCheckEmp,HDeptID) " +
+ "values('" + (this.BillType ?? "") + "','" + (this.HBillSubType ?? "") + "'," +
+ (omodel.HInterID.ToString() ?? "0") + ",'" + (omodel.HBillNo ?? "") + "','" + (omodel.HDate) + "'" +
+ "," + (omodel.HYear.ToString() ?? "0") + "," + (omodel.HPeriod.ToString() ?? "0") +
+ ",'" + (omodel.HRemark ?? "") + "','" + (omodel.HMaker ?? "") + "',getdate(),'" +
+ (omodel.HMainSourceBillType ?? "") + "','" + (omodel.HMainSourceBillNo ?? "") + "'," +
+ (omodel.HMainSourceInterID.ToString() ?? "0") + "," + (omodel.HMainSourceEntryID.ToString() ?? "0") +
+ "," + (omodel.HCheckEmp.ToString() ?? "0") + "," + (omodel.HDeptID.ToString() ?? "0") + ")");
+ //涓昏〃
+ //oCn.RunProc("Insert Into Gy_QCVerificationBillMain " +
+ //"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+ //",HYear,HPeriod,HRemark,HMaker,HMakeDate," +
+ //"HMainSourceBillType,HMainSourceBillNo,HMainSourceInterID,HMainSourceEntryID,"
+ //+ "HCheckEmp,HDeptID" +
+ //") " +
+ //" values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
+ //"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" + ",'" + omodel.HMainSourceBillType + "','" + omodel.HMainSourceBillNo + "'," + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + "," + omodel.HCheckEmp.ToString() + "," + omodel.HDeptID.ToString() + "') ");
+ //鎻掑叆瀛愯〃
+
+ foreach (Model.ClsGy_QCVerificationBillSub oSub in DetailColl)
+ {
+ if (oSub.HBeginDate.Trim()==""|| oSub.HBeginDate.Trim() == null)
+ {
+ oSub.HBeginDate = DateTime.Now.ToString();
+ oSub.HEndDate = DateTime.Now.AddYears(10).ToString();
+
+ }
+ if(oSub.HHCalibrationStatus==""|| oSub.HHCalibrationStatus==null)
+ {
+ oSub.HHCalibrationStatus = "鍚堟牸";
+ }
+ oCn.RunProc("Insert into Gy_QCVerificationBillSub " +
+ " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HInspectInstruMentID,HBeginDate,HEndDate,HHCalibrationStatus" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ "," + oSub.HInspectInstruMentID.ToString() + ",'" + oSub.HBeginDate + "','" + oSub.HEndDate.ToString() + "','" + oSub.HHCalibrationStatus.ToString() +"'"+
+ ") ");
+ }
+
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sc_MouldRepairWorkBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1,1 ", "h_p_Sc_MouldRepairWorkBill_AfterSaveCtrl");
+ if (ds2 == null)
+ {
+ sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+ oCn.RollBack();
+ return false;
+ }
+ //if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ //{
+ // sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+ // oCn.RollBack();
+ // return false;
+ //}
+ //============================
+
+ sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+ //鏄剧ず鍗曟嵁
+ public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //鏌ヨ涓昏〃
+ DataSet Ds ;
+ Ds = oCn.RunProcReturn("Select * from Gy_QCVerificationBillMain Where HInterID=" + lngBillKey.ToString(), "Gy_QCVerificationBillMain");
+ if(Ds.Tables[0].Rows.Count==0)
+ {
+ sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ return false;
+ }
+ //鍥哄畾璧嬪��===========================================
+ omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+ omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+ omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+ omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+ omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+ omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+ omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+ omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+ omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+ omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+ omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+ omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+ omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
+ omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ //========================================================
+ omodel.HCheckEmp = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckEmp"]);
+ omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
+
+
+ //
+
+ //寰幆
+ DataSet DsSub ;
+ DsSub = oCn.RunProcReturn("Select * from Gy_QCVerificationBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Sc_MouldRepairWorkBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Model.ClsGy_QCVerificationBillSub oSub = new Model.ClsGy_QCVerificationBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+ oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+ oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+ oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+ oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+ oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+ oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+ oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
+ oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+ oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+ oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+ oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+ //===================================================
+ oSub.HInspectInstruMentID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInspectInstruMentID"]);
+ oSub.HBeginDate = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBeginDate"]);
+ oSub.HEndDate = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HEndDate"]);
+
+ oSub.HHCalibrationStatus = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HHCalibrationStatus"]);
+
+ DetailColl.Add(oSub);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
+
+
+ }
+
+}
diff --git a/Model/Model.csproj b/Model/Model.csproj
index fd9ef8f..428f101 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -105,6 +105,7 @@
<Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_MatePrice_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_AssistantData.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_AssistantDataEntry.cs" />
+ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_Driver_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_DiscountList.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_OperatorGroup.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsSc_PackUnionBillBarCode_temp_Model.cs" />
@@ -179,6 +180,8 @@
<Compile Include="鐢熶骇绠$悊\鎺掍骇瑙i攣鐢宠鍗昞ClsJIT_UnLockRequestBillSub.cs" />
<Compile Include="鐢熶骇绠$悊\鎺掍骇閿佸畾鐢宠鍗昞ClsJIT_LockRequestBillMain.cs" />
<Compile Include="鐢熶骇绠$悊\鎺掍骇閿佸畾鐢宠鍗昞ClsJIT_LockRequestBillSub.cs" />
+ <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsGy_QCVerificationBillMain.cs" />
+ <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsGy_QCVerificationBillSub.cs" />
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMaintainPlanBillSub_Plan.cs" />
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMoveStockRequestBillMain.cs" />
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMoveStockRequestBillSub.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_QCCheckProjectMain.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_QCCheckProjectMain.cs"
index 75b36f7..f470056 100644
--- "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_QCCheckProjectMain.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_QCCheckProjectMain.cs"
@@ -19,5 +19,6 @@
public Int64 HSampleSchemeID;
public Int64 HSourceID;
public Int64 HOrgID;
+ public string HCheckBillType;
}
}
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_Driver_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_Driver_Model.cs"
new file mode 100644
index 0000000..716e1b5
--- /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_Driver_Model.cs"
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsGy_Driver_Model : DBUtility.ClsGy_Base_Model
+ {
+ //
+ public Int64 HEmpID;
+ public string HBarCode;
+ public Int64 HEntityID;
+ public string HIDCard;
+ public string HPhone;
+ public string HDriverCardPic;
+ public string HDriverCardType;
+ public string HIDCardPic;
+ public string HEmpType;
+ public int HCompID;
+
+ }
+}
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsGy_QCVerificationBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsGy_QCVerificationBillMain.cs"
new file mode 100644
index 0000000..a638e68
--- /dev/null
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsGy_QCVerificationBillMain.cs"
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsGy_QCVerificationBillMain : DBUtility.ClsXt_BaseBillMain
+ {
+ public Int64 HCheckEmp;//
+ public Int64 HDeptID;//
+ public Int64 HEmpID;//
+
+ }
+}
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsGy_QCVerificationBillSub.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsGy_QCVerificationBillSub.cs"
new file mode 100644
index 0000000..24349f2
--- /dev/null
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsGy_QCVerificationBillSub.cs"
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsGy_QCVerificationBillSub : DBUtility.ClsXt_BaseBillSub
+ {
+ public Int64 HInspectInstruMentID;//
+ public string HBeginDate;//
+ public string HEndDate;//
+ public string HHCalibrationStatus;
+
+ }
+}
diff --git a/WebAPI/Controllers/BaseSet/Gy_DriverController.cs b/WebAPI/Controllers/BaseSet/Gy_DriverController.cs
new file mode 100644
index 0000000..858a78f
--- /dev/null
+++ b/WebAPI/Controllers/BaseSet/Gy_DriverController.cs
@@ -0,0 +1,1407 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Pub_Class;
+using SyntacticSugar.constant;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.IO;
+using System.Web;
+using System.Web.Http;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+using WebAPI.Models;
+namespace WebAPI.Controllers
+{
+ public class Gy_DriverController : ApiController
+ {
+ //鑾峰彇绯荤粺鍙傛暟
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+
+ private json objJsonResult = new json();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ DataSet ds;
+
+
+ /// <summary>
+ /// 杩斿洖鍒楄〃
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_DriverController/list")]
+ [HttpGet]
+ public object list(string sWhere, string user, string Organization)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ ////鏌ョ湅鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log("Gy_Department", 1, false, user))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犳煡鐪嬫潈闄�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ //string sql1 = string.Format(@"select * from h_v_IF_DepartmentList where 缁勭粐鍚嶇О='" + Organization + "'");
+ string sql1 = string.Format(@"select * from h_v_Gy_driver where 1=1 ");
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn(sql1 + sWhere , "h_v_Gy_driver");
+ }
+ else
+ {
+ string sql = sql1 + sWhere ;
+ ds = oCN.RunProcReturn(sql, "h_v_Gy_driver");
+ }
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ //if (ds.Tables[0].Rows.Count > 0 && ds != null)
+ //{
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ //}
+ //else
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "娌℃湁鏌ヨ鍒伴儴闂ㄦ暟鎹紝璇疯仈绯荤郴缁熺鐞嗗憳杩涜鏍稿";
+ // 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;
+ }
+ }
+
+
+
+ #region 閮ㄩ棬 鏍戝舰鍥�
+ public class TreeModel
+ {
+ public string id { get; set; }
+ public string title { get; set; }
+ public List<TreeModel> children = new List<TreeModel>();
+ }
+ [Route("Gy_Department/Gy_DepartmentTreeList")]
+ [HttpGet]
+ public object Gy_DepartmentTreeList(string sWhere)
+ {
+ try
+ {
+ string sql1 = string.Format("select hitemid,hnumber,hname from Gy_Department where 1=1 " + sWhere + " order by hnumber");
+
+ ds = oCN.RunProcReturn(sql1, "Gy_Department");
+
+ List<TreeModel> treeModels = new List<TreeModel>();
+ TreeModel first = new TreeModel();
+ first.id = "0";
+ first.title = "閮ㄩ棬璁剧疆";
+ treeModels.Add(first);
+
+ foreach (DataRow row in ds.Tables[0].Rows)
+ {
+ var strLen = row["hitemid"].ToString().Split('.');
+ if (strLen.Length == 1)
+ {
+ TreeModel tree = new TreeModel();
+ tree.id = row["hitemid"].ToString();
+ tree.title = row["hname"].ToString();
+ treeModels[0].children.Add(tree);
+ }
+ }
+ digui(ds.Tables[0], treeModels[0].children, 2);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = Newtonsoft.Json.JsonConvert.SerializeObject(treeModels);
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 閫掑綊鍑芥暟
+ /// </summary>
+ public void digui(DataTable dt, List<TreeModel> tree, int num)
+ {
+ for (int m = 0; m < tree.Count; m++)
+ {
+ tree[m].children = new List<TreeModel>();
+ for (int i = 0; i < dt.Rows.Count; i++)//绗竴娆″惊鐜紝寰楀埌鎵�鏈夋牴鑺傜偣鐨勫瓙闆�
+ {
+ var strLen = dt.Rows[i]["hnumber"].ToString().Split('.');
+ if (strLen.Length == num && dt.Rows[i]["hnumber"].ToString().Contains(tree[m].id + "."))
+ {
+ TreeModel tbjson = new TreeModel();
+ tbjson.id = dt.Rows[i]["hitemid"].ToString();
+ tbjson.title = dt.Rows[i]["hname"].ToString();
+ tree[m].children.Add(tbjson);
+ }
+ }
+ var strLens = tree[m].id.Split('.');
+ for (int i = 0; i < tree[m].children.Count; i++)
+ {
+ digui(dt, tree[m].children, strLens.Length + 2);//鍐嶆鐢ㄥ瓙闆嗗幓寰幆锛屾嬁鍑哄瓙闆嗙殑瀛愰泦
+ }
+ }
+
+ }
+ #endregion
+
+ /// <summary>
+ /// 鏍规嵁鍩虹璧勬枡ID 鏌ユ壘璁板綍
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_Driver/cx")]
+ [HttpGet]
+ public object cx(long HInterID)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Gy_driver where HitemID = " + HInterID, "h_v_Gy_driver");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 鍒楄〃鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("DeltetGy_Driver")]
+ [HttpGet]
+ public object DeltetGy_Driver(string HItemID, string user)
+ {
+ DataSet ds;
+ DataSet ds1;
+ try
+ {
+ ////鍒犻櫎鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log("Gy_Department_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_driver where HItemID=" + HItemID, "gy_driver");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ ds1 = oCN.RunProcReturn("Select HItemID from gy_driver Where HParentID='" + HItemID + "'", "gy_driver");
+ if (ds1.Tables[0].Rows.Count != 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ら」鐩瓨鍦ㄥ瓙椤圭洰锛屼笉鑳藉垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ string HUseFlag = Convert.ToString(ds.Tables[0].Rows[0]["HUseFlag"]);
+ if (HUseFlag == "宸蹭娇鐢�")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ら」鐩凡浣跨敤锛屼笉鑳藉垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ oCN.RunProc("delete from gy_driver 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;
+ }
+ }
+
+ //[Route("Gy_Department/LoadTree")]
+ //[HttpGet]
+ //public object LoadTree_Json()
+ //{
+ // DBUtility.Gy_BaseFun.LoadTree(tv, imageList1, this.Text, BillName);
+ //}
+
+
+ /// <summary>
+ /// 閮ㄩ棬鍒楄〃绂佺敤鎸夐挳
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_Department/JY_Json")]
+ [HttpGet]
+ public object JY_Json(long HItemID)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("update Gy_Department set HStopFlag = 1 where HItemID = " + HItemID, "Gy_Department");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "绂佺敤鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 閮ㄩ棬鍒楄〃鍙嶇鐢ㄦ寜閽�
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_Department/FJY_Json")]
+ [HttpGet]
+ public object FJY_Json(long HItemID)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("update Gy_Department set HStopFlag = 0 where HItemID = " + HItemID, "Gy_Department");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶇鐢ㄦ垚鍔�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_Department/AddBill")]
+ [HttpPost]
+ public object AddBill([FromBody] JObject oMain)
+ {
+ try
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ //鍙嶅簭鍒楀寲
+ msg1 = "[" + msg1.ToString() + "]";
+
+ DAL.ClsGy_Department_Ctl oDept = new DAL.ClsGy_Department_Ctl();
+ DAL.ClsGy_Department_View oDeptHlp = new DAL.ClsGy_Department_View();
+
+
+
+ List<Department> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Department>>(msg1);
+
+ long HItemID = list[0].HItemID;
+ string HNumber = list[0].HNumber;
+ string HName = list[0].HName;
+ string HShortNumber = list[0].HShortNumber;
+ string HRemark = list[0].HRemark;
+ string HUseFlag = list[0].HUseFlag;
+ long HParentID = list[0].HParentID;
+ string HBarCode = list[0].HBarCode;
+ string HHelpCode = list[0].HHelpCode;
+ long HSecManagerID = list[0].HSecManagerID;
+ string HCreator = list[0].HCreator;
+ long HCreateOrgID = list[0].HCreateOrgID;
+ //DateTime HCreateDate = list[0].HCreateDate;
+ long HUseOrgID = list[0].HUseOrgID;
+ string HUpdater = list[0].HUpDater;
+ //DateTime HUpdateDate = list[0].HUpDateDate;
+ string HChecker = list[0].HChecker;
+ //DateTime HCheckDate = list[0].HCheckDate;
+ string HDeleteMan = list[0].HDeleteMan;
+ //DateTime HDeleteDate = list[0].HDeleteDate;
+
+
+ if (!DBUtility.ClsPub.AllowNumber(HNumber))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCN.BeginTran();
+ //涓昏〃
+ oCN.RunProc("Insert Into Gy_Department " +
+ "(HNumber,HShortNumber,HName,HParentID" +
+ ",HLevel,HEndFlag,HRemark,HStopFlag,HUseFlag" +
+ ",HCREATEORGID,HUSEORGID" +
+ ") " +
+ " values('" + HNumber + "','" + HShortNumber + "','" + HName + "',0" +
+ ",'',0,'" + HRemark + "',0,''" +
+ "," + HCreateOrgID + "," + HUseOrgID + "" +
+ ") ");
+ //淇敼涓婄骇涓洪潪鏈骇浠g爜
+ oCN.RunProc("Update Gy_Department set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏂板鍗曟嵁鎴愬姛锛�";
+ //objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+
+ /// <summary>
+ /// 淇濆瓨鎸夐挳
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_Driver/AddBill1")]
+ [HttpPost]
+ public object AddBill1([FromBody] JObject oMain)
+ {
+
+ try
+ {
+ DAL.ClsGy_Driver_Ctl oDept = new DAL.ClsGy_Driver_Ctl();
+ DAL.ClsGy_Department_View oDeptHlp = new DAL.ClsGy_Department_View();
+
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string msg3 = sArray[1].ToString();
+ string msg4 = sArray[2].ToString();
+ //string msg4 = sArray[2].ToString();
+ //string msg5 = sArray[3].ToString();
+
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_Department_Edit", 1, false, msg3))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅簭鍒楀寲
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", "");
+ msg2 = "[" + msg2.ToString() + "]";
+ List<Driver> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Driver>>(msg2);
+
+ long HItemID = list[0].HItemID;
+ string HNumber = list[0].HNumber;
+ string HName = list[0].HName;
+ string HRemark = list[0].HRemark;
+ string HUseFlag = list[0].HUseFlag;
+ string HHelpCode = list[0].HHelpCode;
+ string HModifyEmp = msg3;
+ string HMakeEmp = msg3;
+ bool HStopflag = list[0].HStopflag==null?false:true;
+ long HCREATEORGID = list[0].HCREATEORGID;
+ long HUSEORGID = list[0].HUSEORGID;
+ long HCompID = list[0].HCompID;
+
+ //zidingyi
+ string HIDCard = list[0].HIDCard;
+ string HPhone = list[0].HPhone;
+ string HDriverCardPic = list[0].HDriverCardPic;
+ string HDriverCardType = list[0].HDriverCardType;
+ string HIDCardPic = list[0].HIDCardPic;
+ string HEmpType = list[0].HEmpType;
+
+ //鏈骇鏍囧織
+ bool HEndFlag = true;
+ long HEntityID = 1;
+
+ //寰楀埌鐭唬鐮�
+ string HShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);
+ if (HShortNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //绛夌骇
+ int HLevel = DBUtility.ClsPub.GetLevel(HNumber);
+
+ //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+ long HParentID = 0;
+ string sParent = DBUtility.ClsPub.GetParentCode(HNumber);
+ if (sParent.Trim() == "")
+ {
+ HParentID = 0;
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("select * from Gy_Driver where HNumber='" + sParent + "' and HStopFlag=0 ", "Gy_Driver");
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ HParentID = long.Parse(ds.Tables[0].Rows[0]["HItemID"].ToString());
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+
+
+ //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+ ds = oCN.RunProcReturn("Select HItemID from gy_driver Where HItemID<>" + HItemID + " and HNumber='" + HNumber + "' and HUSEORGID=" + HUSEORGID, "Gy_Warehouse");
+
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ if (HItemID == 0)
+ {
+ //鏂板
+ oCN.BeginTran();
+ oCN.RunProc("Insert into Gy_Driver " +
+ " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+ ",HLevel,HEndFlag,HStopflag,HRemark,HUSEORGID,HCREATEORGID,HMakeEmp,HMakeTime,HIDCard,HPhone,HDriverCardPic,HDriverCardType,HIDCardPic,HEmpType,HCompID) " +
+ " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() +
+ "," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'" +
+ "," + HUSEORGID + "," + HCREATEORGID + ",'" + msg3 + "',getdate()," +"'"+ HIDCard +"',"+
+ "'"+ HPhone+"','"+ HDriverCardPic+"','"+ HDriverCardType + "','"+ HIDCardPic +"','"+ HEmpType+"',"+ HCompID+
+ ")", ref DBUtility.ClsPub.sExeReturnInfo);
+ //淇敼涓婄骇涓洪潪鏈骇浠g爜
+ oCN.RunProc("Update Gy_Driver set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+ oCN.Commit();
+ }
+ else
+ {
+ oCN.BeginTran();
+ //宸插鏍镐笉鍏佽淇敼
+ DataSet dss;
+ dss = oCN.RunProcReturn("select * from Gy_Driver where HItemID=" + HItemID, "Gy_Driver");
+ //鍒ゆ柇鏄惁鍙紪杈�
+ if (dss.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹姸鎬佸凡缁忓鏍革紝涓嶅厑璁镐慨鏀癸紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //涓昏〃
+ oCN.RunProc("Update Gy_Driver set " +
+ " HNumber='" + HNumber + "'" +
+ ",HName='" + HName + "'" +
+ ",HHelpCode='" + HHelpCode + "'" +
+ ",HLevel='" + HLevel + "'" +
+ ",HShortNumber='" + HShortNumber + "'" +
+ ",HParentID=" + HParentID +
+ ",HUSEORGID=" + HUSEORGID.ToString() +
+ ",HCREATEORGID=" + HCREATEORGID.ToString() +
+ ",HStopflag=" + Convert.ToString(HStopflag ? 1 : 0) +
+ ",HModifyEmp='" + HModifyEmp + "'" +
+ ",HModifyTime='" + DateTime.Now + "'" +
+ ",HIDCard='" + HIDCard + "'" +
+ ",HPhone='" + HPhone + "'" +
+ ",HDriverCardPic='" + HDriverCardPic + "'" +
+ ",HDriverCardType='" + HDriverCardType + "'" +
+ ",HIDCardPic='" + HIDCardPic + "'" +
+ ",HEmpType='" + HEmpType + "'" +
+ ",HCompID=" + HCompID + "" +
+
+
+ ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+ //淇敼瀛愰」鐩唬鐮�
+ //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Department,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+ //灏嗕笂绾� 涓洪潪鏈骇
+ oCN.RunProc("Update Gy_Driver set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+ oCN.Commit();
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ //oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇鏈�澶у熀纭�璧勬枡ID
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_Department/GetMAXBillID")]
+ [HttpGet]
+ public object GetMAXBillID()
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("select max(hitemid)+1 hitemid from Gy_Department", "Gy_Department");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+
+ /// <summary>
+ /// 閮ㄩ棬鍒楄〃淇敼鎸夐挳鏂规硶
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_Department/xg")]
+ [HttpGet]
+ public object xg(long HInterID)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("select * from Gy_Department where HItemID=" + HInterID, "Gy_Department");
+
+ 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;
+ }
+ }
+
+
+
+ [Route("Gy_Department/LoadTree")]
+ [HttpGet]
+ public object LoadTree_Json(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+ ds = oCN.RunProcReturn("select * from h_v_DepartmentLoadTree", "h_v_DepartmentLoadTree");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+
+ [Route("Gy_Department/SaveGy_DepartmentListApi")]
+ [HttpPost]
+ public object SaveGy_DepartmentListApi([FromBody] JObject oMain)
+ {
+ try
+ {
+ var model = oMain["model"].ToString();
+ //鍙嶅簭鍒楀寲
+ model = "[" + model + "]";
+ List<Department> lsmain = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Department>>(model);
+ string sql = string.Empty;
+ oCN.BeginTran();
+ sql = $"delete Gy_Department where HItemID = {lsmain[0].HItemID}";
+ oCN.RunProc(sql);
+ sql = "set identity_insert Gy_Department on";
+ oCN.RunProc(sql);
+ //涓昏〃
+ oCN.RunProc("Insert Into Gy_Department " +
+ "(HItemID,HNumber,HShortNumber,HName,HParentID" +
+ ",HLevel,HEndFlag,HRemark,HStopFlag,HUseFlag" +
+ ",HCREATEORGID,HUSEORGID,HERPItemID" +
+ ") " +
+ " values('" + lsmain[0].HItemID + "','" + lsmain[0].HNumber + "','" + lsmain[0].HShortNumber + "','" + lsmain[0].HName + "',0" +
+ ",'',0,'" + lsmain[0].HRemark + "',0,''" +
+ "," + lsmain[0].HCreateOrgID + "," + lsmain[0].HUseOrgID + "," + lsmain[0].HItemID +
+ ") ");
+ sql = "set identity_insert Gy_Department off";
+ oCN.RunProc(sql);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏂板鍗曟嵁鎴愬姛锛�";
+ //objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #region [鍚屾鍩虹璧勬枡]
+ [Route("Gy_Department/Gy_DepartmentViewApi")]
+ [HttpGet]
+ public json Gy_DepartmentViewApi(string Number, string Type, string HUseOrgID)
+ {
+ string sql = string.Empty;
+ string sReturn = "";
+ if (oSystemParameter.ShowBill(ref sReturn) == true)
+ {
+ //绯荤粺鍙傛暟鏄惁涓虹鏈変簯妯″紡,N涓哄叕鏈変簯妯″紡锛孻涓虹鏈変簯妯″紡
+ if (oSystemParameter.omodel.WMS_CloudMode == "Y")
+ {
+ #region [绉佹湁浜戞ā寮忥紝鐩存帴璋冪敤鏁版嵁搴撳瓨鍌ㄨ繃绋嬫洿鏂癩
+ try
+ {
+ oCN.BeginTran();
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ DataSet DS = oCn.RunProcReturn("exec h_p_WMS_ERPBasicInfoToLocal '" + Number + "','" + Type + "'", "h_p_WMS_ERPBasicInfoToLocal");
+ if (DS == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍩虹璧勬枡鍚屾澶辫触";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HBack"]) == "2")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "ERP涓笉瀛樺湪璇ヤ唬鐮�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍩虹璧勬枡鍚屾鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ #endregion
+ }
+ else
+ {
+ #region [鍏湁浜戞ā寮忥紝璋冪敤WEBAPI鐨勬柟寮忚繘琛屾洿鏂癩
+ var json = new
+ //{
+ // CreateOrgId = 0,
+ // Number = Number,
+ // Id = ""
+ //};
+ {
+ FormId = "BD_Department",
+ FieldKeys = "FMASTERID, FNUMBER, FNAME, FFORBIDSTATUS, FCREATEDATE, FCREATEORGID, FUSEORGID",
+ FilterString = $@"FNUMBER = '{Number}' AND FUSEORGID = {HUseOrgID}",
+ OrderString = "",
+ TopRowCount = 0,
+ StartRow = 0,
+ Limit = 0
+ };
+ #region [閲戣澏閮ㄥ垎]
+ //鐧诲綍閲戣澏
+ var loginRet = InvokeHelper.Login();
+ var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
+ //鍒ゆ柇鏄惁鐧诲綍鎴愬姛
+ if (isSuccess < 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = loginRet;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鏌ョ湅 鑾峰彇鏁版嵁
+ var _result = InvokeHelper.Query("BD_Department", JsonConvert.SerializeObject(json));
+ var _saveObj = JArray.Parse(_result);
+ //鍒ゆ柇鏁版嵁鏄惁鑾峰彇鎴愬姛
+ // if (_saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "閲戣澏閮ㄩ棬鍚屾澶辫触jsonRoot锛�" + _result;
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+ if (_saveObj.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "閲戣澏瀹㈡埛鍚屾澶辫触锛屼娇鐢ㄧ粍缁囧搴旂殑閮ㄩ棬浠g爜鏃犲搴旂殑閮ㄩ棬";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ #endregion
+ //鑾峰彇鏁版嵁
+ DataSet Ds;
+ Ds = oCN.RunProcReturn("select * from Gy_Department where HNumber = '" + Number + "'", "Gy_Department");
+ if (Ds.Tables[0].Rows.Count != 0 && ClsPub.isLong(Ds.Tables[0].Rows[0]["HItemID"].ToString()) != 0)
+ {
+
+ }
+
+ #region [琛ㄦ暟鎹祴鍊糫
+ var jsonData = new
+ // {
+ // HItemID = _saveObj["Result"]["Result"]["Id"],
+ // HERPItemID = _saveObj["Result"]["Result"]["Id"],
+ // HNumber = _saveObj["Result"]["Result"]["Number"],
+ // HName = _saveObj["Result"]["Result"]["Name"][0]["Value"],
+ // HShortNumber = _saveObj["Result"]["Result"]["Number"],
+ // HParentID = 0,
+ // HLevel = 1,
+ // HEndFlag = 1,
+ // HStopflag = _saveObj["Result"]["Result"]["ForbidStatus"].ToString() == "A" ? 0 : 1,
+ // HRemark = "CLD-ERP瀵煎叆",
+ // HUseFlag = "宸蹭娇鐢�",
+ // HMakeTime = _saveObj["Result"]["Result"]["CreateDate"],
+ // HCREATEORGID = _saveObj["Result"]["Result"]["CreateOrgId_Id"],
+ // HUSEORGID = _saveObj["Result"]["Result"]["UseOrgId_Id"],
+ // };
+ {
+ HItemID = _saveObj[0][0],
+ HERPItemID = _saveObj[0][0],
+ HNumber = _saveObj[0][1],
+ HName = _saveObj[0][2],
+ HShortNumber = _saveObj[0][1],
+ HParentID = 0,
+ HLevel = 1,
+ HEndFlag = 1,
+ HStopflag = _saveObj[0][3].ToString() == "A" ? 0 : 1,
+ HRemark = "CLD-ERP瀵煎叆",
+ HUseFlag = "宸蹭娇鐢�",
+ HMakeTime = _saveObj[0][4],
+ HCREATEORGID = _saveObj[0][5],
+ HUSEORGID = _saveObj[0][6],
+ };
+ #endregion
+ // 鍒犻櫎涓昏〃瀵瑰簲鏁版嵁
+ sql = $"delete from Gy_Department where HItemID = " + jsonData.HItemID + " and HNumber = '" + Number + "'";
+ oCN.RunProc(sql);
+
+ sql = "set identity_insert Gy_Department on";
+ oCN.RunProc(sql);
+
+ //鎻掑叆琛�
+ sql = $@"
+ insert into Gy_Department
+ (HItemID,HERPItemID,HNumber,HName,HShortNumber,HParentID
+ ,HLevel,HEndFlag,HStopflag,HRemark,HUseFlag,HMakeTime,HCREATEORGID,HUSEORGID
+ )
+ values
+ ({jsonData.HItemID},{jsonData.HItemID},'{jsonData.HNumber}','{jsonData.HName}',
+ '{jsonData.HShortNumber}',{jsonData.HParentID},{jsonData.HLevel},{jsonData.HEndFlag},{jsonData.HStopflag},'{jsonData.HRemark}','{jsonData.HUseFlag}','{jsonData.HMakeTime}',{jsonData.HCREATEORGID},{jsonData.HUSEORGID})";
+
+ oCN.RunProc(sql);
+
+ sql = "set identity_insert Gy_Department off";
+ oCN.RunProc(sql);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "閮ㄩ棬鍚屾鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ #endregion
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍩虹璧勬枡璇诲彇澶辫触锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 瀹℃牳銆佸弽瀹℃牳
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Gy_Driver/AuditGy_Driver")]
+ [HttpGet]
+ public object AuditGy_Driver(int HInterID, int IsAudit, string CurUserName)
+ {
+ try
+ {
+ ////瀹℃牳鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log_second("Gy_Department_Check", 1, false, CurUserName))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ var ds = oCN.RunProcReturn("select * from Gy_Driver where HItemID=" + HInterID, "Gy_Driver");
+ 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) //瀹℃牳鍒ゆ柇
+ {
+ oCN.RunProc("update Gy_Driver set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛";
+ objJsonResult.data = null;
+ }
+ if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ {
+ oCN.RunProc("update Gy_Driver set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
+
+ 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 绂佺敤銆佸弽绂佺敤
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsStop">绂佺敤(0),鍙嶇鐢�(1)</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Gy_Driver/StopGy_Driver")]
+ [HttpGet]
+ public object StopGy_Driver(int HInterID, int IsStop, string CurUserName)
+ {
+ try
+ {
+ //瀹℃牳鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log_second("Gy_Department_Stop", 1, false, CurUserName))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "绂佺敤澶辫触锛佹棤鏉冮檺锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ var ds = oCN.RunProcReturn("select * from Gy_Driver where HItemID=" + HInterID, "Gy_Driver");
+ 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) //绂佺敤鍒ゆ柇
+ {
+ oCN.RunProc("update Gy_Driver set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "绂佺敤鎴愬姛";
+ objJsonResult.data = null;
+ }
+ if (IsStop == 1) //鍙嶇鐢ㄥ垽鏂�
+ {
+ oCN.RunProc("update Gy_Driver set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
+
+ 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_Department/Gy_Process_Excel")]
+ //[HttpPost]
+ //public json Gy_Department_Excel()
+ //{
+ // json res = new json();
+ // try
+ // {
+ // //鑾峰彇鏂囦欢鍚嶇О
+ // var file = HttpContext.Current.Request.Files[0];
+ // //鑾峰彇鏂囦欢鐗╃悊璺緞
+ // string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+ // //淇濆瓨鏂囦欢
+ // file.SaveAs(ExcelPath);
+
+ // NpoiHelper np = new NpoiHelper();
+ // DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+ // //鍒犻櫎鏂囦欢
+ // File.Delete(ExcelPath);
+
+ // //鍒涘缓涓存椂琛�
+ // DataTable provisional = new DataTable("dt2");
+
+ // //娣诲姞鍒楀悕
+ // for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+ // {
+ // provisional.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+ // }
+
+ // //娣诲姞鏁版嵁
+ // for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+ // {
+ // DataRow row = provisional.NewRow();
+ // for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+ // {
+ // row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+ // }
+ // provisional.Rows.Add(row);
+ // }
+
+ // //鍒ゆ柇鍒�
+ // string error = JudgmentColumns(provisional);
+ // if (error.Length > 0)
+ // {
+ // res.code = "0";
+ // res.count = 0;
+ // res.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+ // res.data = null;
+ // return res;
+ // }
+
+ // for (int i = 0; i <= provisional.Rows.Count - 1; i++)
+ // {
+ // string HNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["閮ㄩ棬浠g爜"].ToString());
+ // string HName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["閮ㄩ棬鍚嶇О"].ToString());
+ // string HEmpNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["璐熻矗浜轰唬鐮�"].ToString());
+ // string HEmpName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["璐熻矗浜哄悕绉�"].ToString());
+ // string HBarCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鏉″舰鐮�"].ToString());
+ // string HHelpCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鍔╄鐮�"]);
+ // string HRemark = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["澶囨敞"].ToString());
+
+ // //鍒ゆ柇璐熻矗浜烘槸鍚﹀瓨鍦�
+ // if (JudgeEmp(HEmpNumber, HEmpName))
+ // {
+ // res.code = CodeConstant.FAIL;
+ // res.count = CountConstant.FAIL;
+ // res.Message = "褰撳墠鑱屽憳涓嶅瓨鍦�";
+ // res.data = null;
+ // return res;
+ // }
+ // //鑾峰彇鐪熷疄琛屾暟
+ // int line = i + 1;
+ // }
+
+ // res.code = "1";
+ // res.count = 1;
+ // res.Message = error;
+ // res.data = provisional;
+ // return res;
+ // }
+ // catch (Exception e)
+ // {
+ // res.code = "0";
+ // res.count = 0;
+ // res.Message = "Exception锛�" + e.ToString();
+ // res.data = null;
+ // return res;
+ // }
+ //}
+
+ /// <summary>
+ /// 鍒ゆ柇褰撳墠鑱屽憳鏄惁瀛樺湪
+ /// </summary>
+ /// <param name="HEmpNumber"></param>
+ /// <param name="HEmpName"></param>
+ /// <returns></returns>
+ //private bool JudgeEmp(string HEmpNumber, string HEmpName)
+ //{
+ // if (!String.IsNullOrEmpty(HEmpNumber) && !String.IsNullOrEmpty(HEmpName))
+ // {
+ // DataSet emp = oCN.RunProcReturn("select * from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee");
+ // return emp.Tables[0].Rows.Count <= EmptyConstant.EMPTY ? true : false;
+ // }
+ // return false;
+ //}
+
+ /// <summary>
+ /// 鍒ゆ柇鍒�
+ /// </summary>
+ /// <param name="provisional"></param>
+ /// <returns></returns>
+ private static string JudgmentColumns(DataTable provisional)
+ {
+ var error = "";
+
+ //鏌ヨ娌℃湁鐨勫垪
+ if (!provisional.Columns.Contains("閮ㄩ棬浠g爜"))
+ error += "娌℃湁鎵惧埌銆愰儴闂ㄤ唬鐮併�戠殑鏍囬,";
+
+ if (!provisional.Columns.Contains("閮ㄩ棬鍚嶇О"))
+ error += "娌℃湁鎵惧埌銆愰儴闂ㄥ悕绉般�戠殑鏍囬,";
+ return error;
+ }
+ #endregion
+
+ #region 閮ㄩ棬鍒楄〃 瀵煎叆(淇濆瓨)
+ [Route("Gy_Department/Gy_Process_btnSave")]
+ [HttpPost]
+ public object Gy_InspectBasis_btnSave([FromBody] JObject sMainSub)
+ {
+ var _value = sMainSub["sMainSub"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string user = sArray[1].ToString();
+ string organ = sArray[2].ToString();
+ json res = new json();
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Gy_Group_Edit", 1, false, user))
+ {
+ res.code = "0";
+ res.count = 0;
+ res.Message = "鏃犱繚瀛樻潈闄愶紒";
+ res.data = null;
+ return res;
+ }
+
+ List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+ List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+ foreach (JObject item in Excel)
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ foreach (var itm in item.Properties())
+ {
+ dic.Add(itm.Name, itm.Value.ToString());
+ }
+ list.Add(dic);
+ }
+
+ oCN.BeginTran();
+ int i = 1;
+ foreach (Dictionary<string, string> item in list)
+ {
+ string HNumber = item["閮ㄩ棬浠g爜"].ToString();
+ string HName = item["閮ㄩ棬鍚嶇О"].ToString();
+ string HEmpNumber = item["璐熻矗浜轰唬鐮�"].ToString();
+ string HEmpName = item["璐熻矗浜哄悕绉�"].ToString();
+ string HBarCode = item["鏉″舰鐮�"].ToString();
+ string HHelpCode = item["鍔╄鐮�"].ToString();
+ string HRemark = item["澶囨敞"].ToString();
+ int HEmpID = 0;
+ if (!String.IsNullOrEmpty(HEmpName) && !String.IsNullOrEmpty(HEmpNumber))
+ {
+ DataSet emp = oCN.RunProcReturn("select HItemID from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee");
+ HEmpID = (int)emp.Tables[0].Rows[0]["HItemID"];
+ }
+ string sShortNumber;
+ sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//鐭唬鐮�
+ if (sShortNumber.Trim() == "")
+ {
+ res.code = "0";
+ res.count = 0;
+ res.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+ res.data = 1;
+ return res;
+ }
+ int HEndFlag = 1;//鏈骇鏍囧織
+ int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //绛夌骇
+
+
+ if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
+ {
+ res.code = "0";
+ res.count = 0;
+ res.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ res.data = 1;
+ return res;
+ }
+
+ ds = oCN.RunProcReturn("select * from Gy_Department where HNumber='" + HNumber + "'", "Gy_InspectInstruMent");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+
+ string sql = "insert into Gy_Department (HName,HNumber,HShortNumber,HLevel,HHelpCode,HParentID,HStopflag,HEndFlag,HRemark,HUseFlag, HUSEORGID, HCREATEORGID, HEmpID, HBarCodeForBase)" +
+ $"values('{HName}', '{HNumber}', '{sShortNumber}',{HLevel},'',0,'0','0','{HRemark}', '鏈娇鐢�', '{organ}', '{organ}', '{HEmpID}', '{HBarCode}')";
+ oCN.RunProc(sql);
+ }
+ else
+ {
+ oCN.RunProc("update Gy_Department set HName ='" + HName + "' , HHelpCode = '" + HHelpCode + " ', HBarCodeForBase = '" + HBarCode + "', HEmpID = '" + HEmpID + "', HModifyEmp = '" + user + "', HModifyTime = '" + System.DateTime.Now.ToString("G") + "' where HNumber= '" + HNumber + "'");
+ }
+
+ i++;
+ }
+
+ oCN.Commit();
+
+ res.code = "1";
+ res.count = 1;
+ res.Message = "瀵煎叆鎴愬姛!";
+ res.data = null;
+ return res;
+ }
+ catch (Exception e)
+ {
+ LogService.Write(e);
+ res.code = "0";
+ res.count = 0;
+ res.Message = "Exception锛�" + e.ToString();
+ res.data = null;
+ return res;
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Controllers/QC_ManagementController.cs b/WebAPI/Controllers/QC_ManagementController.cs
index 03097aa..82ca164 100644
--- a/WebAPI/Controllers/QC_ManagementController.cs
+++ b/WebAPI/Controllers/QC_ManagementController.cs
@@ -1083,6 +1083,7 @@
msg2 = msg2.Replace("\\", "");
msg2 = msg2.Replace("\n", ""); //\n
lsmain = oListModels.getObjectByJson_Gy_QCCheckProjectMain(msg2);
+ string ts;
foreach (Model.ClsGy_QCCheckProjectMain oItem in lsmain)
{
//oItem.HMaker = "";
@@ -1107,6 +1108,7 @@
return objJsonResult;
}
oBill.omodel = oItem;
+ ts = oItem.HCheckBillType;
}
//琛ㄤ綋鏁版嵁
//鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index 6078231..6d0b023 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -14989,5 +14989,526 @@
#endregion
+ #region 鍣ㄥ叿鏍″噯璁板綍鍗�
+ #region 妯″叿鏍″噯璁板綍鍗曡〃鍒嗛〉鍒楄〃
+ [Route("Gy_QCVerificationBillMain/GetListPage")]
+ [HttpGet]
+ public object GetListPage(string sWhere, string user, int page, int size)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("exec h_p_Gy_QCVerificationBillMainList " + page + "," + size + ",'" + sWhere + "'", "h_p_Gy_QCVerificationBillMainList");
+ }
+ else
+ {
+ sWhere = sWhere.Replace("'", "''");
+ ds = oCN.RunProcReturn("exec h_p_Gy_QCVerificationBillMainList " + page + "," + size + ",'" + sWhere + "'", "h_p_Gy_QCVerificationBillMainList");
+ }
+
+
+ //娣诲姞鍒楀悕
+ 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 = CodeConstant.SUCCEED;
+ objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region [鍣ㄥ叿鏍″噯鍗曞垹闄ゅ姛鑳絔
+ /// <summary>
+ /// 妯″叿缁翠慨鍗曞垹闄ゅ姛鑳�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Gy_QCVerificationBillMain/DeltetGy_QCVerificationBillMain")]
+ [HttpGet]
+ public object DeltetGy_QCVerificationBillMain(string HInterID, string user)
+ {
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ if (lngBillKey == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ DAL.ClsGy_QCVerificationBillMain oBill = new DAL.ClsGy_QCVerificationBillMain();
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (oBill.omodel.HBillStatus > 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵��,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HChecker != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸茬粡瀹℃牳,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鍒犻櫎鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Sb_MouldRepairWorkBill_BeforeDelCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Sb_MouldRepairWorkBill_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;
+ 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;
+ return objJsonResult;
+ }
+ //==================================================================================
+
+ bool IsDete = oBill.DeleteBill(lngBillKey, oBill.omodel.HBillNo, "h_p_Sb_MouldRepairWorkBill_AfterDelCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo);
+
+ if (IsDete)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region [妯″叿缁翠慨鍗曞鏍搞�佸弽瀹℃牳]
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Gy_QCVerificationBillMain/AuditQCVerificationBillMain")]
+ [HttpGet]
+ public object AuditQCVerificationBillMain(int HInterID, int IsAudit, string CurUserName)
+ {
+ string ModRightNameCheck = "Sb_MouldRepairWorkBill_Check";
+ DBUtility.ClsPub.CurUserName = CurUserName;
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (HInterID <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID灏忎簬0锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ DAL.ClsGy_QCVerificationBillMain oBill = new DAL.ClsGy_QCVerificationBillMain();
+ //鏌ョ湅鏄惁宸插鏍�,鍏抽棴,浣滃簾
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (oBill.omodel.HCloseMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HDeleteMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ {
+ if (oBill.omodel.HChecker.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ {
+ if (oBill.omodel.HChecker.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (IsAudit == 0) //瀹℃牳鎻愪氦
+ {
+ //瀹℃牳鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Sb_MouldRepairWorkBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Sb_MouldRepairWorkBill_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;
+ }
+ //==================================================================================
+
+ if (!oBill.CheckBill(HInterID, oBill.omodel.HBillNo, "h_p_Sb_MouldRepairWorkBill_AfterCheckCtrl", CurUserName, ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ if (IsAudit == 1) //鍙嶅鏍告彁浜�
+ {
+ //鍙嶅鏍稿墠鎺у埗=========================================
+ string sql1 = "exec h_p_Sb_MouldRepairWorkBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Sb_MouldRepairWorkBill_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;
+ 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;
+ return objJsonResult;
+ }
+ //===========================================================
+
+ if (!oBill.AbandonCheck(HInterID, oBill.omodel.HBillNo, "h_p_Sb_MouldRepairWorkBill_AfterUnCheckCtrl", CurUserName, ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+
+ #region[缂栬緫鏃惰幏鍙栬〃澶存暟鎹甝
+ [Route("Gy_QCVerificationBillMain/Gy_QCVerificationBillMainCheckDetai")]
+ [HttpGet]
+ public ApiResult<DataSet> Gy_QCVerificationBillMainCheckDetai(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_QCVerificationBillMain where hmainid= " + HID + " ", "h_v_Gy_QCVerificationBillMain");
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄥ崟鍙�" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+ #endregion
+
+ #region[缂栬緫鏃惰幏鍙栬〃浣撴暟鎹甝
+ [Route("Gy_QCVerificationBillMain/SGy_QCVerificationBillMainListProjectDetai")]
+ [HttpGet]
+ public object SGy_QCVerificationBillMainListProjectDetai(string sqlWhere)
+ {
+ DataSet ds, ds1;
+ List<object> list = new List<object>();
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ string sql = "select HInspectInstruMentID,妫�楠屼华鍣ㄤ唬鐮� HInspectInstruMentNumber,妫�楠屼华鍣ㄥ悕绉� HInspectInstruMentName,鐢熸晥鏃ユ湡 HBeginDate,澶辨晥鏃ユ湡 HEndDate,鏍″噯鐘舵�� HHCalibrationStatus from h_v_Gy_QCVerificationBillMain where 1 = 1 " + sqlWhere;
+ ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldRepairWorkBillList_Edit");
+
+
+
+ list.Add(ds.Tables[0]);
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.data = null;
+ objJsonResult.list = list;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
+
+
+ #region 妯″叿缁翠慨璁板綍鍗曚繚瀛�/缂栬緫
+ /// <summary>
+ /// 淇濆瓨妯″叿缁翠慨鍗�
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("Gy_QCVerificationBillMain/SaveGetMQCVerificationBillList")]
+ [HttpPost]
+ public object SaveGetMQCVerificationBillList([FromBody] JObject msg)
+ {
+ var _value = msg["msg"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string msg3 = sArray[1].ToString();
+ string msg4 = sArray[2].ToString();
+ //string msg5 = sArray[3].ToString();
+
+
+ string UserName = "";
+ ListModels oListModels = new ListModels();
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Edit", 1, false, msg4))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ DAL.ClsGy_QCVerificationBillMain oBill = new DAL.ClsGy_QCVerificationBillMain();
+ List<Model.ClsGy_QCVerificationBillMain> lsmain = new List<Model.ClsGy_QCVerificationBillMain>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_Gy_QCVerificationBillMain(msg2);
+ foreach (Model.ClsGy_QCVerificationBillMain oItem in lsmain)
+ {
+ oItem.HMaker = msg4;
+ UserName = msg4; //鍒跺崟浜�
+ oItem.HBillType = "3321";
+ oItem.HBillSubType = "3321";
+ //oItem.HBillNo = ""; //鍗曟嵁鍙�
+ //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡
+ oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+ oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
+ //oItem.HEquipID = 0; //璁惧ID(Gy_EquipMent)
+ //oItem.HPeriod = 0;
+ oItem.HCheckEmp = oItem.HEmpID; //缁翠慨浜�(Gy_Employee)
+ //oItem.HDeptID = 0; //缁翠慨閮ㄩ棬(Gy_Department)
+ //oItem.HMainSourceInterID = oItem.HInterID;
+
+ //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
+ if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oBill.omodel = oItem;
+ }
+ //琛ㄤ綋鏁版嵁
+ //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+ msg3 = msg3.Substring(1, msg3.Length - 2);
+ msg3 = msg3.Replace("\\", "");
+ msg3 = msg3.Replace("\n", ""); //\n
+ //msg2 = msg2.Replace("'", "鈥�");
+ List<Model.ClsGy_QCVerificationBillSub> ls = new List<Model.ClsGy_QCVerificationBillSub>();
+ ls = oListModels.getObjectByJson_Gy_QCVerificationBillSub(msg3);
+ int i = 0;
+ foreach (Model.ClsGy_QCVerificationBillSub oItem in ls)
+ {
+
+ i++;
+ oItem.HEntryID = i;
+ //oItemSub.HCloseMan = ""; //琛屽叧闂�
+ oItem.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ oItem.HCloseType = false; //鍏抽棴绫诲瀷
+ //oItem.HInspectInstruMentID =1; //澶囨敞
+ //oItem.HRelationQty = 0; //鍏宠仈鏁伴噺
+ //oItem.HBeginDate = DateTime.Now.ToString(); //鍏宠仈鏁伴噺
+ //oItem.HEndDate = DateTime.Now.AddYears(1).ToString(); //鍏宠仈鏁伴噺
+ //oItem.HHCalibrationStatus = "鍚堟牸"; //鍏宠仈鏁伴噺
+ //oItemSub.HRelationMoney = 0; //鍏宠仈閲戦
+ //oItemSub.HRepairID = 0; //缁翠慨椤圭洰
+ //oItemSub.HRepairExplanation =""; //缁翠慨瑕佹眰
+ //oItemSub.HManagerID = 0; //璐熻矗浜篒D
+ //oItemSub.HMoney = 0; //缁翠慨璐圭敤
+ oBill.DetailColl.Add(oItem);
+
+ }
+
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (oBill.omodel.HInterID == 0)
+ {
+ // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else
+ {
+ bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ if (bResult)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ 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
+ #endregion
+
+
}
}
\ No newline at end of file
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index a5ccc91..f174c97 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -699,7 +699,17 @@
return list;
}
-
+ /// <summary>
+ /// 澶勭悊妫�楠屼华鍣ㄨ褰曞崟鐨刯son
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsGy_QCVerificationBillMain> getObjectByJson_Gy_QCVerificationBillMain(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsGy_QCVerificationBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_QCVerificationBillMain>>(jsonString);
+ return list;
+ }
/// <summary>
/// 澶勭悊鏂板妯″叿缁翠慨瀛愯〃淇濆吇淇℃伅鐨刯son
/// </summary>
@@ -723,6 +733,18 @@
List<Model.ClsSb_MouldRepairWorkBillSub_Item> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_MouldRepairWorkBillSub_Item>>(jsonString);
return list;
}
+ /// <summary>
+ /// 澶勭悊鏂板妯″叿缁翠慨瀛愯〃閰嶄欢淇℃伅鐨刯son
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsGy_QCVerificationBillSub> getObjectByJson_Gy_QCVerificationBillSub(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsGy_QCVerificationBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_QCVerificationBillSub>>(jsonString);
+ return list;
+ }
+
/// <summary>
/// 澶勭悊鏂板妯″叿缁翠慨楠屾敹鍗曚富琛ㄧ殑json
diff --git a/WebAPI/Models/Driver.cs b/WebAPI/Models/Driver.cs
new file mode 100644
index 0000000..25e5607
--- /dev/null
+++ b/WebAPI/Models/Driver.cs
@@ -0,0 +1,40 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models
+{
+ public class Driver
+ {
+ public long HItemID { get; set; }
+ public string HNumber { get; set; }
+ public string HName { get; set; }
+ public string HShortNumber { get; set; }
+ public string HRemark { get; set; }
+ public string HUseFlag { get; set; }
+ public long HParentID { get; set; }
+
+ public long HCREATEORGID { get; set; }
+ public long HUSEORGID { get; set; }
+ public string HHelpCode { get; set; }
+ public int? HStopflag { get; set; }
+ public string HModifyEmp { get; set; }
+ public string HStopEmp { get; set; }
+ public string HStopTime { get; set; }
+ public string HModifyTime { get; set; }
+ public string HCheckTime { get; set; }
+ public string HMakeTime { get; set; }
+ public string HMakeEmp { get; set; }
+
+ //zidingyi
+ public string HIDCard { get; set; }
+ public string HPhone { get; set; }
+ public string HDriverCardPic { get; set; }
+ public string HDriverCardType { get; set; }
+ public string HIDCardPic { get; set; }
+ public string HEmpType { get; set; }
+ public int HCompID { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index ecc0b48..c99a887 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -374,6 +374,7 @@
<Compile Include="Controllers\BaseSet\Gy_BarCodeBillController.cs" />
<Compile Include="Controllers\BaseSet\Gy_ConkTypeController.cs" />
<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_WorkDayController.cs" />
<Compile Include="Controllers\BaseSet\Gy_PackTypeController.cs" />
@@ -659,6 +660,7 @@
<Compile Include="Models\ClsWW_EntrustOrderBillMainSub.cs" />
<Compile Include="Models\ClsWW_PPBomBill.cs" />
<Compile Include="Models\ClsWW_EntrustOrderBillMain_1.cs" />
+ <Compile Include="Models\Driver.cs" />
<Compile Include="Models\GroupOrderBill.cs" />
<Compile Include="Models\ClsGy_PNLInfoSub.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_ProcMulController.cs" />
@@ -1234,6 +1236,7 @@
<Folder Include="Views\Gy_COMMONCONTACTBill\" />
<Folder Include="Views\Gy_ConkType\" />
<Folder Include="Views\Gy_CustLocation\" />
+ <Folder Include="Views\Gy_Driver\" />
<Folder Include="Views\Gy_DutyBill\" />
<Folder Include="Views\Gy_EquipStatus\" />
<Folder Include="Views\Gy_EquipType\" />
--
Gitblit v1.9.1