From 3b7ffe6750724acb77274a4ee98d971ae0681f63 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 04 一月 2023 15:27:13 +0800
Subject: [PATCH] 设备入库检验验收单 设备投产检验验收单
---
DAL/生产管理/设备管理/ClsSb_EquipStockInCheckBill.cs | 132 ++++++
WebAPI/ListModels.cs | 39 +
DAL/DAL.csproj | 2
DAL/生产管理/设备管理/ClsSb_EquipWorkBeforeCheckBill.cs | 132 ++++++
Model/Model.csproj | 4
Model/生产管理/设备管理/ClsSb_EquipStockInCheckBillSub.cs | 19
Model/生产管理/设备管理/ClsSb_EquipWorkBeforeCheckBillMain.cs | 15
WebAPI/Controllers/SBGL/Sb_EquipStockInCheckBillController.cs | 421 ++++++++++++++++++++
WebAPI/WebAPI.csproj | 3
Model/生产管理/设备管理/ClsSb_EquipWorkBeforeCheckBillSub.cs | 19
WebAPI/Controllers/SBGL/Sb_EquipWorkBeforeCheckBillController.cs | 421 ++++++++++++++++++++
Model/生产管理/设备管理/ClsSb_EquipStockInCheckBillMain.cs | 15
12 files changed, 1,222 insertions(+), 0 deletions(-)
diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index f463d4e..7fd6278 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -603,6 +603,8 @@
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldRepairInBill.cs" />
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldRepairOutBill.cs" />
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldStatusChangeBill.cs" />
+ <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipWorkBeforeCheckBill.cs" />
+ <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipStockInCheckBill.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipSparepartsBill.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipSparepartsChangeBill.cs" />
<Compile Include="璐ㄦ绠$悊\ClsQC_FirstPieceCheckBill.cs" />
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipStockInCheckBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipStockInCheckBill.cs"
new file mode 100644
index 0000000..61b0eaf
--- /dev/null
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipStockInCheckBill.cs"
@@ -0,0 +1,132 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+ public class ClsSb_EquipStockInCheckBill : DBUtility.ClsXt_BaseBill
+ {
+ public Model.ClsSb_EquipStockInCheckBillMain omodel = new Model.ClsSb_EquipStockInCheckBillMain();
+ public List<Model.ClsSb_EquipStockInCheckBillSub> DetailColl = new List<Model.ClsSb_EquipStockInCheckBillSub>();
+
+ public ClsSb_EquipStockInCheckBill()
+ {
+ base.MvarItemKeySub = "Sb_EquipStockInCheckBillSub";
+ base.MvarItemKeySub2 = "";
+ base.MvarItemKeySub3 = "";
+ base.MvarItemKeySub4 = "";
+ base.MvarItemKey= "Sb_EquipStockInCheckBillMain";
+ base.MvarReportTitle= "璁惧鍏ュ簱妫�楠岄獙鏀跺崟";
+ base.BillType = "3914";
+ base.HBillSubType = "3914";
+
+ }
+
+ #region 鍥哄畾浠g爜
+
+ ~ClsSb_EquipStockInCheckBill()
+ {
+ DetailColl = null;
+ }
+
+ #endregion 鑷畾涔夋柟娉�
+ //淇敼鍗曟嵁
+ public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //
+ oCn.BeginTran();
+ //鏇存柊涓昏〃
+ oCn.RunProc("UpDate Sb_EquipStockInCheckBillMain set " +
+ " HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��===============
+ //",HDate='" + omodel.HDate + "'" +
+ ",HYear='" + omodel.HYear.ToString() + "'" +
+ ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+ ",HRemark='" + omodel.HRemark + "'" +
+ ",HCheckerResult='" + omodel.HCheckerResult + "'" +
+ ",HUpDater='" + omodel.HMaker + "'" +
+ ",HUpDateDate=getdate()" +
+ //========================================
+ ",HEquipID=" + omodel.HEquipID.ToString() +
+ ",HSupID=" + omodel.HSupID.ToString() +
+ ",HFirstCheckEmp=" + omodel.HFirstCheckEmp.ToString() +
+ " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎鍏宠仈
+ DeleteRelation(ref sReturn, lngBillKey);
+ //鍒犻櫎瀛愯〃
+ DeleteBillSub(lngBillKey);
+ //鎻掑叆瀛愯〃
+ omodel.HInterID = lngBillKey;
+ foreach (Model.ClsSb_EquipStockInCheckBillSub oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into Sb_EquipStockInCheckBillSub " +
+ " (HInterID,HEntryID,HCloseMan, HEntryCloseDate, HCloseType" +
+ ", HRemark, HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType" +
+ ", HRelationQty, HRelationMoney,HQCCheckClassID, HQCCheckItemID, HQCStd" +
+ ", HQCRelValue, HResult, HProcCheckEmp, HProcCheckTime, HBillNo_bak) values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + 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.HQCCheckClassID + "','" + oSub.HQCCheckItemID + "','" + oSub.HQCStd +
+ "','" + oSub.HQCRelValue + "','" + oSub.HResult.ToString() + "','" + oSub.HProcCheckEmp + "','" + oSub.HProcCheckTime + "','') ");
+ }
+
+ 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);
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCn.BeginTran();
+ //涓昏〃
+ oCn.RunProc("Insert Into Sb_EquipStockInCheckBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo , HDate, HMaker, HMakeDate" +
+ ", HYear, HPeriod , HRemark, HEquipID, HSupID, HFirstCheckEmp, HCheckerResult" +
+ ", HBackRemark, HMainSourceBillType, HMainSourceInterID, HMainSourceEntryID, HMainSourceBillNo) " +
+ " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
+ "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() +
+ ",'" + omodel.HSupID + "','" + omodel.HFirstCheckEmp + "','" + omodel.HCheckerResult + "'" +
+ ",'','',0,0,'') ");
+ //鎻掑叆瀛愯〃
+ foreach (Model.ClsSb_EquipStockInCheckBillSub oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into Sb_EquipStockInCheckBillSub " +
+ " (HInterID,HEntryID,HCloseMan, HEntryCloseDate, HCloseType" +
+ ", HRemark, HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType" +
+ ", HRelationQty, HRelationMoney,HQCCheckClassID, HQCCheckItemID, HQCStd" +
+ ", HQCRelValue, HResult, HProcCheckEmp, HProcCheckTime, HBillNo_bak) values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + 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.HQCCheckClassID + "','" + oSub.HQCCheckItemID + "','" + oSub.HQCStd +
+ "','" + oSub.HQCRelValue + "','" + oSub.HResult.ToString() + "','" + oSub.HProcCheckEmp + "','" + oSub.HProcCheckTime + "','') ");
+ }
+
+ sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
+ }
+
+}
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipWorkBeforeCheckBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipWorkBeforeCheckBill.cs"
new file mode 100644
index 0000000..b863c32
--- /dev/null
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipWorkBeforeCheckBill.cs"
@@ -0,0 +1,132 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+ public class ClsSb_EquipWorkBeforeCheckBill : DBUtility.ClsXt_BaseBill
+ {
+ public Model.ClsSb_EquipWorkBeforeCheckBillMain omodel = new Model.ClsSb_EquipWorkBeforeCheckBillMain();
+ public List<Model.ClsSb_EquipWorkBeforeCheckBillSub> DetailColl = new List<Model.ClsSb_EquipWorkBeforeCheckBillSub>();
+
+ public ClsSb_EquipWorkBeforeCheckBill()
+ {
+ base.MvarItemKeySub = "Sb_EquipWorkBeforeCheckBillSub";
+ base.MvarItemKeySub2 = "";
+ base.MvarItemKeySub3 = "";
+ base.MvarItemKeySub4 = "";
+ base.MvarItemKey= "Sb_EquipWorkBeforeCheckBillMain";
+ base.MvarReportTitle= "璁惧鎶曚骇妫�楠岄獙鏀跺崟";
+ base.BillType = "3915";
+ base.HBillSubType = "3915";
+
+ }
+
+ #region 鍥哄畾浠g爜
+
+ ~ClsSb_EquipWorkBeforeCheckBill()
+ {
+ DetailColl = null;
+ }
+
+ #endregion 鑷畾涔夋柟娉�
+ //淇敼鍗曟嵁
+ public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //
+ oCn.BeginTran();
+ //鏇存柊涓昏〃
+ oCn.RunProc("UpDate Sb_EquipWorkBeforeCheckBillMain set " +
+ " HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��===============
+ //",HDate='" + omodel.HDate + "'" +
+ ",HYear='" + omodel.HYear.ToString() + "'" +
+ ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+ ",HRemark='" + omodel.HRemark + "'" +
+ ",HCheckerResult='" + omodel.HCheckerResult + "'" +
+ ",HUpDater='" + omodel.HMaker + "'" +
+ ",HUpDateDate=getdate()" +
+ //========================================
+ ",HEquipID=" + omodel.HEquipID.ToString() +
+ ",HSupID=" + omodel.HSupID.ToString() +
+ ",HFirstCheckEmp=" + omodel.HFirstCheckEmp.ToString() +
+ " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎鍏宠仈
+ DeleteRelation(ref sReturn, lngBillKey);
+ //鍒犻櫎瀛愯〃
+ DeleteBillSub(lngBillKey);
+ //鎻掑叆瀛愯〃
+ omodel.HInterID = lngBillKey;
+ foreach (Model.ClsSb_EquipWorkBeforeCheckBillSub oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into Sb_EquipWorkBeforeCheckBillSub " +
+ " (HInterID,HEntryID,HCloseMan, HEntryCloseDate, HCloseType" +
+ ", HRemark, HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType" +
+ ", HRelationQty, HRelationMoney,HQCCheckClassID, HQCCheckItemID, HQCStd" +
+ ", HQCRelValue, HResult, HProcCheckEmp, HProcCheckTime, HBillNo_bak) values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + 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.HQCCheckClassID + "','" + oSub.HQCCheckItemID + "','" + oSub.HQCStd +
+ "','" + oSub.HQCRelValue + "','" + oSub.HResult.ToString() + "','" + oSub.HProcCheckEmp + "','" + oSub.HProcCheckTime + "','') ");
+ }
+
+ 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);
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCn.BeginTran();
+ //涓昏〃
+ oCn.RunProc("Insert Into Sb_EquipWorkBeforeCheckBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo , HDate, HMaker, HMakeDate" +
+ ", HYear, HPeriod , HRemark, HEquipID, HSupID, HFirstCheckEmp, HCheckerResult" +
+ ", HBackRemark, HMainSourceBillType, HMainSourceInterID, HMainSourceEntryID, HMainSourceBillNo) " +
+ " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
+ "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() +
+ ",'" + omodel.HSupID + "','" + omodel.HFirstCheckEmp + "','" + omodel.HCheckerResult + "'" +
+ ",'','',0,0,'') ");
+ //鎻掑叆瀛愯〃
+ foreach (Model.ClsSb_EquipWorkBeforeCheckBillSub oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into Sb_EquipWorkBeforeCheckBillSub " +
+ " (HInterID,HEntryID,HCloseMan, HEntryCloseDate, HCloseType" +
+ ", HRemark, HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType" +
+ ", HRelationQty, HRelationMoney,HQCCheckClassID, HQCCheckItemID, HQCStd" +
+ ", HQCRelValue, HResult, HProcCheckEmp, HProcCheckTime, HBillNo_bak) values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + 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.HQCCheckClassID + "','" + oSub.HQCCheckItemID + "','" + oSub.HQCStd +
+ "','" + oSub.HQCRelValue + "','" + oSub.HResult.ToString() + "','" + oSub.HProcCheckEmp + "','" + oSub.HProcCheckTime + "','') ");
+ }
+
+ sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
+ }
+
+}
diff --git a/Model/Model.csproj b/Model/Model.csproj
index b073d2c..b95575b 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -579,6 +579,10 @@
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldStockBillSub.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipConkBookBillMain.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipConkBookBillSub.cs" />
+ <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipWorkBeforeCheckBillMain.cs" />
+ <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipWorkBeforeCheckBillSub.cs" />
+ <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipStockInCheckBillSub.cs" />
+ <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipStockInCheckBillMain.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipDotCheckBillMain.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipDotCheckBillSub.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipDotCheckPlanBillMain.cs" />
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipStockInCheckBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipStockInCheckBillMain.cs"
new file mode 100644
index 0000000..4ef71a2
--- /dev/null
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipStockInCheckBillMain.cs"
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsSb_EquipStockInCheckBillMain : DBUtility.ClsXt_BaseBillMain
+ {
+ public Int64 HSupID;
+ public Int64 HEquipID;
+ public Int64 HFirstCheckEmp;
+ public string HCheckerResult;
+
+ }
+}
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipStockInCheckBillSub.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipStockInCheckBillSub.cs"
new file mode 100644
index 0000000..82be9c7
--- /dev/null
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipStockInCheckBillSub.cs"
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsSb_EquipStockInCheckBillSub : DBUtility.ClsXt_BaseBillSub
+ {
+
+ public Int64 HQCCheckClassID;
+ public Int64 HQCCheckItemID;
+ public Int64 HProcCheckEmp;
+ public string HQCStd;
+ public string HQCRelValue;
+ public string HResult;
+ public DateTime HProcCheckTime;
+
+ }
+}
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipWorkBeforeCheckBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipWorkBeforeCheckBillMain.cs"
new file mode 100644
index 0000000..5a8f1e7
--- /dev/null
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipWorkBeforeCheckBillMain.cs"
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsSb_EquipWorkBeforeCheckBillMain : DBUtility.ClsXt_BaseBillMain
+ {
+ public Int64 HSupID;
+ public Int64 HEquipID;
+ public Int64 HFirstCheckEmp;
+ public string HCheckerResult;
+
+ }
+}
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipWorkBeforeCheckBillSub.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipWorkBeforeCheckBillSub.cs"
new file mode 100644
index 0000000..0f50c21
--- /dev/null
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipWorkBeforeCheckBillSub.cs"
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsSb_EquipWorkBeforeCheckBillSub : DBUtility.ClsXt_BaseBillSub
+ {
+
+ public Int64 HQCCheckClassID;
+ public Int64 HQCCheckItemID;
+ public Int64 HProcCheckEmp;
+ public string HQCStd;
+ public string HQCRelValue;
+ public string HResult;
+ public DateTime HProcCheckTime;
+
+ }
+}
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipStockInCheckBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipStockInCheckBillController.cs
new file mode 100644
index 0000000..bf551ca
--- /dev/null
+++ b/WebAPI/Controllers/SBGL/Sb_EquipStockInCheckBillController.cs
@@ -0,0 +1,421 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.SBGL
+{
+ public class Sb_EquipStockInCheckBillController : ApiController
+ {
+ private json objJsonResult = new json();
+ public DataSet ds = new DataSet();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ #region 璁惧鍏ュ簱妫�楠岄獙鏀跺崟 鍒楄〃
+ /// <summary>
+ /// 璁惧鍏ュ簱妫�楠岄獙鏀跺崟鍒楄〃
+ /// </summary>
+ /// <returns></returns>
+ [Route("Sb_EquipStockInCheckBill/Sb_EquipStockInCheckBillList")]
+ [HttpGet]
+ public object Sb_EquipStockInCheckBillList(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipStockInCheckBill_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from h_v_Sb_EquipStockInCheckBillList where 1=1 "+ sWhere, "h_v_Sb_EquipStockInCheckBillList");
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 璁惧鍏ュ簱妫�楠岄獙鏀跺崟 淇濆瓨/缂栬緫
+ /// <summary>
+ /// 璁惧鍏ュ簱妫�楠岄獙鏀跺崟 淇濆瓨
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("Sb_EquipStockInCheckBill/SaveEquipStockInCheckBill")]
+ [HttpPost]
+ public object SaveEquipStockInCheckBill([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 UserName = "";
+ ListModels oListModels = new ListModels();
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipStockInCheckBill_Edit", 1, false, msg4))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ DAL.ClsSb_EquipStockInCheckBill oBill = new DAL.ClsSb_EquipStockInCheckBill();
+ List<Model.ClsSb_EquipStockInCheckBillMain> lsmain = new List<Model.ClsSb_EquipStockInCheckBillMain>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_ClsSb_EquipStockInCheckBillMain(msg2);
+ foreach (Model.ClsSb_EquipStockInCheckBillMain oItem in lsmain)
+ {
+ //oItem.HMaker = "";
+ UserName = oItem.HMaker; //鍒跺崟浜�
+ oItem.HBillType = "3914";
+ oItem.HBillSubType = "3914";
+ oItem.HBillStatus = 1;
+ DBUtility.ClsPub.CurUserName = UserName;
+ oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+
+ 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.ClsSb_EquipStockInCheckBillSub> ls = new List<Model.ClsSb_EquipStockInCheckBillSub>();
+ ls = oListModels.getObjectByJson_ClsSb_EquipStockInCheckBillSub(msg3);
+ int i = 0;
+ foreach (Model.ClsSb_EquipStockInCheckBillSub oItemSub in ls)
+ {
+
+ i++;
+ oItemSub.HEntryID = i;
+ //oItemSub.HCloseMan = ""; //琛屽叧闂�
+ oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
+ //oItemSub.HRemark = ""; //澶囨敞
+ oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
+ oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
+ //oItemSub.HSourceBillNo = ""; //婧愬崟鍗曞彿
+ //oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
+ oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺
+ //oItemSub.HRelationMoney = 0; //鍏宠仈閲戦
+ //HMaterID = "";//閰嶄欢浠g爜
+ //HUnitID = "";//鍗曚綅浠g爜
+ //HQty = "";//瀹為檯鐢ㄩ噺
+ //HQtyMust = "";//鍗曚綅鐢ㄩ噺
+ //HRemark = "";//澶囨敞
+
+ oBill.DetailColl.Add(oItemSub);
+
+ }
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ 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 = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 璁惧鍏ュ簱妫�楠岄獙鏀跺崟 鍒犻櫎
+ /// <summary>
+ /// 璁惧鍏ュ簱妫�楠岄獙鏀跺崟鍒犻櫎
+ /// </summary>
+ /// <returns></returns>
+ [Route("Sb_EquipStockInCheckBill/DelEquipStockInCheckBill")]
+ [HttpGet]
+ public object DelEquipStockInCheckBill(string HInterID, string user)
+ {
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipStockInCheckBill_Drop", 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.ClsSb_EquipStockInCheckBill oBill = new DAL.ClsSb_EquipStockInCheckBill();
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ ds = oCN.RunProcReturn("select * from Sb_EquipStockInCheckBillMain where HInterID="+ lngBillKey, "Sb_EquipStockInCheckBillMain");
+ if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) >1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵��,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸茬粡瀹℃牳,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ bool IsDete = oBill.DeleteBill(lngBillKey, 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("Sb_EquipStockInCheckBill/AuditEquipStockInCheckBill")]
+ [HttpGet]
+ public object AuditEquipStockInCheckBill(int HInterID, int IsAudit, string CurUserName)
+ {
+ string ModRightNameCheck = "Sb_EquipStockInCheckBill_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.ClsSb_EquipStockInCheckBill oBill = new DAL.ClsSb_EquipStockInCheckBill();
+ ds = oCN.RunProcReturn("select * from Sb_EquipStockInCheckBillMain where HInterID=" + lngBillKey, "Sb_EquipStockInCheckBillMain");
+ //鏌ョ湅鏄惁宸插鏍�,鍏抽棴,浣滃簾
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"].ToString().Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"].ToString().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) //瀹℃牳鎻愪氦
+ {
+ //瀹℃牳鎻愪氦
+ if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ if (IsAudit == 1) //鍙嶅鏍告彁浜�
+ {
+ //鍙嶅鏍告彁浜bandonCheck
+ if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ 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/Controllers/SBGL/Sb_EquipWorkBeforeCheckBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipWorkBeforeCheckBillController.cs
new file mode 100644
index 0000000..7a213ad
--- /dev/null
+++ b/WebAPI/Controllers/SBGL/Sb_EquipWorkBeforeCheckBillController.cs
@@ -0,0 +1,421 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.SBGL
+{
+ public class Sb_EquipWorkBeforeCheckBillController : ApiController
+ {
+ private json objJsonResult = new json();
+ public DataSet ds = new DataSet();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ #region 璁惧鎶曚骇妫�楠岄獙鏀跺崟 鍒楄〃
+ /// <summary>
+ /// 璁惧鎶曚骇妫�楠岄獙鏀跺崟鍒楄〃
+ /// </summary>
+ /// <returns></returns>
+ [Route("Sb_EquipWorkBeforeCheckBill/Sb_EquipWorkBeforeCheckBillList")]
+ [HttpGet]
+ public object Sb_EquipWorkBeforeCheckBillList(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipWorkBeforeCheckBill_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from h_v_Sb_EquipWorkBeforeCheckBillList where 1=1 "+ sWhere, "h_v_Sb_EquipWorkBeforeCheckBillList");
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 璁惧鎶曚骇妫�楠岄獙鏀跺崟 淇濆瓨/缂栬緫
+ /// <summary>
+ /// 璁惧鎶曚骇妫�楠岄獙鏀跺崟 淇濆瓨
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("Sb_EquipWorkBeforeCheckBill/SaveEquipWorkBeforeCheckBill")]
+ [HttpPost]
+ public object SaveEquipWorkBeforeCheckBill([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 UserName = "";
+ ListModels oListModels = new ListModels();
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipWorkBeforeCheckBill_Edit", 1, false, msg4))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ DAL.ClsSb_EquipWorkBeforeCheckBill oBill = new DAL.ClsSb_EquipWorkBeforeCheckBill();
+ List<Model.ClsSb_EquipWorkBeforeCheckBillMain> lsmain = new List<Model.ClsSb_EquipWorkBeforeCheckBillMain>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_ClsSb_EquipWorkBeforeCheckBillMain(msg2);
+ foreach (Model.ClsSb_EquipWorkBeforeCheckBillMain oItem in lsmain)
+ {
+ //oItem.HMaker = "";
+ UserName = oItem.HMaker; //鍒跺崟浜�
+ oItem.HBillType = "3915";
+ oItem.HBillSubType = "3915";
+ oItem.HBillStatus = 1;
+ DBUtility.ClsPub.CurUserName = UserName;
+ oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+
+ 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.ClsSb_EquipWorkBeforeCheckBillSub> ls = new List<Model.ClsSb_EquipWorkBeforeCheckBillSub>();
+ ls = oListModels.getObjectByJson_ClsSb_EquipWorkBeforeCheckBillSub(msg3);
+ int i = 0;
+ foreach (Model.ClsSb_EquipWorkBeforeCheckBillSub oItemSub in ls)
+ {
+
+ i++;
+ oItemSub.HEntryID = i;
+ //oItemSub.HCloseMan = ""; //琛屽叧闂�
+ oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
+ //oItemSub.HRemark = ""; //澶囨敞
+ oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
+ oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
+ //oItemSub.HSourceBillNo = ""; //婧愬崟鍗曞彿
+ //oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
+ oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺
+ //oItemSub.HRelationMoney = 0; //鍏宠仈閲戦
+ //HMaterID = "";//閰嶄欢浠g爜
+ //HUnitID = "";//鍗曚綅浠g爜
+ //HQty = "";//瀹為檯鐢ㄩ噺
+ //HQtyMust = "";//鍗曚綅鐢ㄩ噺
+ //HRemark = "";//澶囨敞
+
+ oBill.DetailColl.Add(oItemSub);
+
+ }
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ 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 = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 璁惧鎶曚骇妫�楠岄獙鏀跺崟 鍒犻櫎
+ /// <summary>
+ /// 璁惧鎶曚骇妫�楠岄獙鏀跺崟鍒犻櫎
+ /// </summary>
+ /// <returns></returns>
+ [Route("Sb_EquipWorkBeforeCheckBill/DelEquipWorkBeforeCheckBill")]
+ [HttpGet]
+ public object DelEquipWorkBeforeCheckBill(string HInterID, string user)
+ {
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipWorkBeforeCheckBill_Drop", 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.ClsSb_EquipWorkBeforeCheckBill oBill = new DAL.ClsSb_EquipWorkBeforeCheckBill();
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ ds = oCN.RunProcReturn("select * from Sb_EquipWorkBeforeCheckBillMain where HInterID="+ lngBillKey, "Sb_EquipWorkBeforeCheckBillMain");
+ if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) >1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵��,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸茬粡瀹℃牳,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ bool IsDete = oBill.DeleteBill(lngBillKey, 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("Sb_EquipWorkBeforeCheckBill/AuditEquipWorkBeforeCheckBill")]
+ [HttpGet]
+ public object AuditEquipWorkBeforeCheckBill(int HInterID, int IsAudit, string CurUserName)
+ {
+ string ModRightNameCheck = "Sb_EquipWorkBeforeCheckBill_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.ClsSb_EquipWorkBeforeCheckBill oBill = new DAL.ClsSb_EquipWorkBeforeCheckBill();
+ ds = oCN.RunProcReturn("select * from Sb_EquipWorkBeforeCheckBillMain where HInterID=" + lngBillKey, "Sb_EquipWorkBeforeCheckBillMain");
+ //鏌ョ湅鏄惁宸插鏍�,鍏抽棴,浣滃簾
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"].ToString().Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"].ToString().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) //瀹℃牳鎻愪氦
+ {
+ //瀹℃牳鎻愪氦
+ if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ if (IsAudit == 1) //鍙嶅鏍告彁浜�
+ {
+ //鍙嶅鏍告彁浜bandonCheck
+ if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index 6b5a1da..3c9a568 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -1471,6 +1471,45 @@
return list;
}
+ ///璁惧鍏ュ簱妫�楠岄獙鏀跺崟 瀛愯〃
+ ///ClsSb_EquipStockInCheckBillSub
+ public List<Model.ClsSb_EquipStockInCheckBillSub> getObjectByJson_ClsSb_EquipStockInCheckBillSub(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsSb_EquipStockInCheckBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_EquipStockInCheckBillSub>>(jsonString);
+ return list;
+ }
+
+
+ ///璁惧鍏ュ簱妫�楠岄獙鏀跺崟 涓昏〃
+ ///ClsSb_EquipStockInCheckBillMain
+ public List<Model.ClsSb_EquipStockInCheckBillMain> getObjectByJson_ClsSb_EquipStockInCheckBillMain(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsSb_EquipStockInCheckBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_EquipStockInCheckBillMain>>(jsonString);
+ return list;
+ }
+
+ ///璁惧鎶曚骇妫�楠岄獙鏀跺崟 瀛愯〃
+ ///ClsSb_EquipWorkBeforeCheckBillSub
+ public List<Model.ClsSb_EquipWorkBeforeCheckBillSub> getObjectByJson_ClsSb_EquipWorkBeforeCheckBillSub(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsSb_EquipWorkBeforeCheckBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_EquipWorkBeforeCheckBillSub>>(jsonString);
+ return list;
+ }
+
+
+ ///璁惧鎶曚骇妫�楠岄獙鏀跺崟 涓昏〃
+ ///ClsSb_EquipWorkBeforeCheckBillMain
+ public List<Model.ClsSb_EquipWorkBeforeCheckBillMain> getObjectByJson_ClsSb_EquipWorkBeforeCheckBillMain(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsSb_EquipWorkBeforeCheckBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_EquipWorkBeforeCheckBillMain>>(jsonString);
+ return list;
+ }
+
+
/// <summary>
/// 璁惧淇濆吇璁″垝 涓昏〃
/// </summary>
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index b91e507..ac86d0c 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -400,6 +400,8 @@
<Compile Include="Controllers\SBGL\Sb_EquipSparepartsBillController.cs" />
<Compile Include="Controllers\SBGL\Sb_EquipSparepartsChangeBillController.cs" />
<Compile Include="Controllers\SBGL\Sb_EquipStatusChangeBillController.cs" />
+ <Compile Include="Controllers\SBGL\Sb_EquipWorkBeforeCheckBillController.cs" />
+ <Compile Include="Controllers\SBGL\Sb_EquipStockInCheckBillController.cs" />
<Compile Include="Controllers\SCGL\Sc_ComplementGoodBill_ZXBZController.cs" />
<Compile Include="Controllers\SCGL\鏃ヨ鍒掔鐞哱DataHelper.cs" />
<Compile Include="Controllers\SCGL\鏃ヨ鍒掔鐞哱JIT_Cg_PODemandPlanBillController.cs" />
@@ -952,6 +954,7 @@
<Folder Include="Views\Sb_EquipSparepartsBill\" />
<Folder Include="Views\Sb_EquipSparepartsChangeBill\" />
<Folder Include="Views\Sb_EquipStatusChangeBill\" />
+ <Folder Include="Views\Sb_EquipStockInCheckBill\" />
<Folder Include="Views\Sc_CallGoodsBackRequestBill\" />
<Folder Include="Views\Sc_ComplementGoodBill\" />
<Folder Include="Views\Sc_ComplementGoodBill_ZXBZ\" />
--
Gitblit v1.9.1