From d6e7138fd2bdf267c581024c86603c3acaceab7f Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期六, 11 五月 2024 13:37:00 +0800
Subject: [PATCH] 1
---
DAL/质检管理/ClsQC_FirstPieceCheckBill.cs | 6
WebAPI/DLL/ClsGy_MaintainLev_Ctl.cs | 102 +
WebAPI/DLL/ClsSb_EquipDotCheckBill.cs | 6
WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs | 744 ++++++++
WebAPI/Models/ClsSb_EquipDotCheckBillMain.cs | 6
WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs | 6
Model/生产管理/设备管理/ClsSb_EquipStopBillSub.cs | 12
DAL/生产管理/模具管理/ClsSc_MouldDotCheckRuleBill.cs | 22
Model/生产管理/模具管理/ClsSc_MouldDotCheckBillSub.cs | 3
Model/基础资料/基础资料/ClsGy_MaintainLev_Model.cs | 11
WebAPI/DLL/ClsQC_PatrolProcCheckBill.cs | 6
WebAPI/Models/ClsGy_DotCheck.cs | 1
DAL/生产管理/模具管理/ClsSc_MouldDotCheckBill.cs | 37
WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs | 483 +++++
WebAPI/Controllers/基础资料/基础资料/Gy_DotCheckItemClassController.cs | 379 ++++
DAL/生产管理/模具管理/ClsSc_MouldDotCheckPlanBill.cs | 28
DAL/生产管理/模具管理/ClsSc_MouldProdOutBill.cs | 201 +
WebAPI/Controllers/基础资料/基础资料/Gy_DotCheckItemMethodController.cs | 379 ++++
Model/基础资料/基础资料/ClsGy_DotCheckItemClass_Model.cs | 11
Model/生产管理/设备管理/ClsSb_EquipDotCheckBillSub.cs | 5
Model/生产管理/设备管理/ClsSb_EquipDotCheckPlanBillSub.cs | 4
DAL/生产管理/设备管理/ClsSb_EquipDotCheckBill.cs | 36
Model/生产管理/模具管理/ClsSc_MouldDotCheckPlanBillSub.cs | 3
Model/生产管理/设备管理/ClsSb_EquipStopBillMain.cs | 17
WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs | 6
Model/生产管理/设备管理/ClsSb_EquipBeginBillMain.cs | 17
Model/生产管理/设备管理/ClsSb_EquipBeginBillSub.cs | 12
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 54
WebAPI/Controllers/WebAPIController.cs | 657 +++++++
WebAPI/Controllers/条码管理/MouldController.cs | 337 +++
WebAPI/Controllers/项目管理/工作任务/PM_WorkTaskBillController.cs | 7
DAL/基础资料/公用基础资料/ClsGy_DotCheckItemMethod_Ctl.cs | 98 +
WebAPI/ListModels.cs | 73
DAL/DAL.csproj | 4
WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs | 3
WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs | 8
WebAPI/WebAPI.csproj | 7
WebAPI/Models/ClsSb_EquipDotCheckBillSub.cs | 3
Model/生产管理/模具管理/ClsSc_MouldDotCheckRuleBillSub.cs | 3
DAL/仓库管理/ClsKf_SellOutBillForLayUI.cs | 2
EAM/模具管理/模具仓库管理/Sc_MouldProdOutBill.cs | 2
Model/Model.csproj | 8
Model/生产管理/模具管理/ClsSc_MouldDotCheckBillMain.cs | 6
WebAPI/Service/LuBaoSevice.cs | 39
Model/基础资料/基础资料/ClsGy_DotCheckItemMethod_Model.cs | 11
Model/质检管理/ClsQC_PatrolProcCheckBillMain.cs | 2
DBUtility/业务单据/ClsXt_BaseBillSub.cs | 4
DAL/生产管理/设备管理/ClsSb_EquipBeginBillMain.cs | 208 ++
WebAPI/Controllers/基础资料/基础资料/Gy_DotCheckBillController.cs | 10
DAL/质检管理/ClsQC_ProcessCheckBill.cs | 6
WebAPI/Web.config | 2
WebAPI/Models/ClsSb_EquipDotCheckRuleBillSub.cs | 3
WebAPI/Controllers/项目管理/工程项目/PM_ProjectBillController.cs | 22
WebAPI/Controllers/品质管理/首件检验单/QC_FirstPieceCheckBillController.cs | 2
Model/生产管理/模具管理/ClsSc_MouldProdOutBillSub.cs | 61
Model/质检管理/ClsQC_ProcessCheckBillMain.cs | 3
Model/质检管理/ClsQC_FirstPieceCheckBillMain.cs | 2
Model/生产管理/模具管理/ClsSc_MouldProdOutBillMain.cs | 26
DAL/生产管理/设备管理/ClsSb_EquipDotCheckPlanBill.cs | 14
DAL/生产管理/设备管理/ClsSb_EquipStopBillMain.cs | 210 ++
WebAPI/DLL/ClsGy_PreventErrMould_Ctl.cs | 102 +
DAL/基础资料/公用基础资料/ClsGy_DotCheckItemClass_Ctl.cs | 97 +
Model/基础资料/基础资料/ClsGy_PreventErrMould_Model.cs | 14
WebAPI/DLL/ClsSc_MouldProdOutBill.cs | 2
Model/生产管理/设备管理/ClsSb_EquipDotCheckBillMain.cs | 6
Model/生产管理/模具管理/ClsSc_MouldStockBillSub.cs | 2
WebAPI/Controllers/SBGL/Sb_EquipBeginBillController.cs | 744 ++++++++
WebAPI/Controllers/品质管理/工序检验单/QC_ProcessCheckBillController.cs | 2
68 files changed, 5,185 insertions(+), 224 deletions(-)
diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index 3f645de..e736896 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -108,8 +108,10 @@
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_CardStatus_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_CardAddress_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_CustLocation_Ctl.cs" />
+ <Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_DotCheckItemMethod_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_EquipStatus_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_CardType_Ctl.cs" />
+ <Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_DotCheckItemClass_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_MouldStatus_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_Operator_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_RateType_Ctl.cs" />
@@ -637,6 +639,8 @@
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsGy_EquipTypeBill.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsGy_FixCardChangeBill.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsGy_FixCardBill.cs" />
+ <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipBeginBillMain.cs" />
+ <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipStopBillMain.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipWorkBeforeCheckBill.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipStockInCheckBill.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipSparepartsBill.cs" />
diff --git "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillForLayUI.cs" "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillForLayUI.cs"
index 425538d..88dae58 100644
--- "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillForLayUI.cs"
+++ "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillForLayUI.cs"
@@ -53,7 +53,7 @@
}
else if (DetailColl[0].HSourceBillType == "1402") //鍙戣揣閫氱煡鍗�
{
- oCn.RunProc("exec h_p_Xs_UpDateRelation_SeOutStockToPOStockIn_Add " + lngBillKey.ToString());
+ oCn.RunProc("exec h_p_Xs_UpDateRelation_SeOutStockToPOStockIn_Delete " + lngBillKey.ToString());
}
else
{
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_DotCheckItemClass_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_DotCheckItemClass_Ctl.cs"
new file mode 100644
index 0000000..0b3d5f8
--- /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_DotCheckItemClass_Ctl.cs"
@@ -0,0 +1,97 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+ public class ClsGy_DotCheckItemClass_Ctl:DBUtility.ClsGy_Base_Ctl
+ {
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+ public string HOldNumber;
+ public Model.ClsGy_DotCheckItemClass_Model oModel = new Model.ClsGy_DotCheckItemClass_Model();
+ //鏂板
+ public override bool AddNew()
+ {
+ try
+ {
+ oCn.BeginTran();
+ oCn.RunProc("Insert into Gy_DotCheckItemClass (" +
+ "HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+ ",HLevel,HEndFlag,HStopflag,HRemark" +
+ ",HMakeTime,HMakeEmp,HCREATEORGID,HUSEORGID) " +
+ " 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 + "',getdate()" + ",'" + oModel.HMakeEmp + "'," + oModel.HCREATEORGID + "," + oModel.HUSEORGID + ")", 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 + "'" +
+ ",HParentID=" + oModel.HParentID.ToString() +
+ ",HLevel=" + oModel.HLevel.ToString() +
+ ",HEndflag=" + Convert.ToString(oModel.HEndFlag ? 1 : 0) +
+ ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
+ ",HRemark= '" + oModel.HRemark + "'" +
+ ",HHelpCode='" + oModel.HHelpCode + "'" +
+ " 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_DotCheckItemClass_Ctl()
+ {
+ MvarItemKey = "Gy_DotCheckItemClass";
+ MvarReportTitle = "鐐规椤圭洰鍒嗙被";
+ oModel = new Model.ClsGy_DotCheckItemClass_Model();
+ }
+ }
+}
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_DotCheckItemMethod_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_DotCheckItemMethod_Ctl.cs"
new file mode 100644
index 0000000..edca622
--- /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_DotCheckItemMethod_Ctl.cs"
@@ -0,0 +1,98 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+ public class ClsGy_DotCheckItemMethod_Ctl:DBUtility.ClsGy_Base_Ctl
+ {
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+ public string HOldNumber;
+ public Model.ClsGy_DotCheckItemMethod_Model oModel = new Model.ClsGy_DotCheckItemMethod_Model();
+ //鏂板
+ public override bool AddNew()
+ {
+
+ try
+ {
+ oCn.BeginTran();
+ oCn.RunProc("Insert into Gy_DotCheckItemMethod (" +
+ "HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+ ",HLevel,HEndFlag,HStopflag,HRemark" +
+ ",HMakeTime,HMakeEmp,HCREATEORGID,HUSEORGID) " +
+ " 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.HMakeTime + "','" + oModel.HMakeEmp + "'," + oModel.HCREATEORGID + "," + oModel.HUSEORGID + ")", 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 + "'" +
+ ",HParentID=" + oModel.HParentID.ToString() +
+ ",HLevel=" + oModel.HLevel.ToString() +
+ ",HEndflag=" + Convert.ToString(oModel.HEndFlag ? 1 : 0) +
+ ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
+ ",HRemark= '" + oModel.HRemark + "'" +
+ ",HHelpCode='" + oModel.HHelpCode + "'" +
+ " 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_DotCheckItemMethod_Ctl()
+ {
+ MvarItemKey = "Gy_DotCheckItemMethod";
+ MvarReportTitle = "鐐规鏂规硶";
+ oModel = new Model.ClsGy_DotCheckItemMethod_Model();
+ }
+ }
+}
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/ClsSc_MouldDotCheckBill.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/ClsSc_MouldDotCheckBill.cs"
index c6f2d8d..5634a35 100644
--- "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/ClsSc_MouldDotCheckBill.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/ClsSc_MouldDotCheckBill.cs"
@@ -60,7 +60,11 @@
",HExplanation='" + omodel.HExplanation + "'" +
",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
-
+ ",HLastResult='" + omodel.HLastResult + "'" +
+ ",HErrNote='" + omodel.HErrNote + "'" +
+ ",HBigSafeNote='" + omodel.HBigSafeNote + "'" +
+ ",HShiftsID=" + omodel.HShiftsID +
+ ",HDotCheckNote='" + omodel.HDotCheckNote + "'" +
" where HInterID=" + lngBillKey.ToString());
//鍒犻櫎鍏宠仈
DeleteRelation(ref sReturn, lngBillKey);
@@ -73,18 +77,19 @@
foreach (Model.ClsSc_MouldDotCheckBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Sc_MouldDotCheckBillSub " +
- " (HInterID,HEntryID" +
- ",HManagerID" +
- ",HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim" +
- ",HCloseMan,HCloseType,HRemark" +
- ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
- ") values("
- + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
- "," + oSub.HManagerID.ToString() + "," + oSub.HDotCheckItemID.ToString() +
- ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'" +
- ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
- "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
- ") ");
+ " (HInterID,HEntryID" +
+ ",HManagerID" +
+ ",HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim" +
+ ",HCloseMan,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HDotCheckItemClassID,HDotCheckItemMethodID,HDotCheckResult" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
+ "," + oSub.HManagerID.ToString() + "," + oSub.HDotCheckItemID.ToString() +
+ ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'" +
+ ",'" + oSub.HCloseMan + "'," + 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.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID + ",'" + oSub.HDotCheckResult + "'" +
+ ") ");
}
////閰嶄欢椤圭洰
@@ -141,12 +146,13 @@
",HMouldID,HBeginDate"+
",HEndDate,HPlanNo,HPlanInterID" +
",HInnerBillNo,HExplanation,HMouldDotCheckRuleID" +
+ ",HLastResult,HErrNote,HBigSafeNote,HShiftsID,HDotCheckNote" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
"," + omodel.HMouldID.ToString() + ",'" + omodel.HBeginDate + "'" +
",'" + omodel.HEndDate + "','" + omodel.HPlanNo + "'," + omodel.HPlanInterID.ToString() +
- ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'," + omodel.HMouldDotCheckRuleID +
+ ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'," + omodel.HMouldDotCheckRuleID + ",'" + omodel.HLastResult + "','" + omodel.HErrNote + "','" + omodel.HBigSafeNote + "'," + omodel.HShiftsID + ",'" + omodel.HDotCheckNote + "'" +
") ");
//鎻掑叆瀛愯〃
foreach (Model.ClsSc_MouldDotCheckBillSub oSub in DetailColl)
@@ -157,12 +163,13 @@
",HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim" +
",HCloseMan,HCloseType,HRemark" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HDotCheckItemClassID,HDotCheckItemMethodID,HDotCheckResult" +
") values("
+ omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
"," + oSub.HManagerID.ToString() +","+ oSub.HDotCheckItemID.ToString()+
",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'" +
",'" + oSub.HCloseMan + "'," + 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.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID + ",'" + oSub.HDotCheckResult + "'" +
") ");
}
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/ClsSc_MouldDotCheckPlanBill.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/ClsSc_MouldDotCheckPlanBill.cs"
index ccd31ec..8e34344 100644
--- "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/ClsSc_MouldDotCheckPlanBill.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/ClsSc_MouldDotCheckPlanBill.cs"
@@ -73,18 +73,19 @@
foreach (Model.ClsSc_MouldDotCheckPlanBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Sc_MouldDotCheckPlanBillSub " +
- " (HInterID,HEntryID" +
- ",HManagerID"+
- ",HDotCheckItem,HDotCheckItemID,HDotCheckPart,HClaim" +
- ",HCloseMan,HCloseType,HRemark" +
- ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
- ") values("
- + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
- "," + oSub.HManagerID.ToString() +
- ",'" + oSub.HDotCheckItem +"'," + oSub.HDotCheckItemID + ",'" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'" +
- ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'"+
- "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
- ") ");
+ " (HInterID,HEntryID" +
+ ",HManagerID" +
+ ",HDotCheckItem,HDotCheckPart,HClaim" +
+ ",HCloseMan,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HDotCheckItemClassID,HDotCheckItemMethodID" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
+ "," + oSub.HManagerID.ToString() +
+ ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'" +
+ ",'" + oSub.HCloseMan + "'," + 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.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID +
+ ") ");
}
////閰嶄欢椤圭洰
@@ -157,12 +158,13 @@
",HDotCheckItem,HDotCheckPart,HClaim" +
",HCloseMan,HCloseType,HRemark" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HDotCheckItemClassID,HDotCheckItemMethodID" +
") values("
+ omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
"," + oSub.HManagerID.ToString() +
",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'" +
",'" + oSub.HCloseMan + "'," + 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.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID +
") ");
}
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/ClsSc_MouldDotCheckRuleBill.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/ClsSc_MouldDotCheckRuleBill.cs"
index cd137ea..f6d6520 100644
--- "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/ClsSc_MouldDotCheckRuleBill.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/ClsSc_MouldDotCheckRuleBill.cs"
@@ -64,16 +64,15 @@
foreach (Model.ClsSc_MouldDotCheckRuleBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Sc_MouldDotCheckRuleBillSub " +
- " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
- ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney"+
+ " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim,HManagerID,HDotCheckItemClassID,HDotCheckItemMethodID" +
+ ") 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() +
- ",HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim,HManagerID" +
- ") 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.HDotCheckItemID.ToString() + ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'," + oSub.HManagerID.ToString() +
- ") ");
+ "," + oSub.HDotCheckItemID.ToString() + ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'," + oSub.HManagerID.ToString() + "," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID +
+ ") ");
}
//foreach (Model.ClsSc_MouldDotCheckRuleBillSub_Item oSub in DetailColl)
//{
@@ -127,13 +126,12 @@
oCn.RunProc("Insert into Sc_MouldDotCheckRuleBillSub " +
" (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
-
- ",HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim,HManagerID" +
+ ",HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim,HManagerID,HDotCheckItemClassID,HDotCheckItemMethodID" +
") 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.HDotCheckItemID.ToString() + ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'," + oSub.HManagerID.ToString() +
+ "," + oSub.HDotCheckItemID.ToString() + ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'," + oSub.HManagerID.ToString() + "," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID +
") ");
}
//foreach (Model.ClsSc_MouldDotCheckRuleBillSub_Item 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/ClsSc_MouldProdOutBill.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/ClsSc_MouldProdOutBill.cs"
index 990a8a7..d199719 100644
--- "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/ClsSc_MouldProdOutBill.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/ClsSc_MouldProdOutBill.cs"
@@ -17,9 +17,9 @@
base.MvarItemKeySub3 = "";
base.MvarItemKeySub4 = "";
base.MvarItemKey="Sc_MouldStockBillMain";
- base.MvarReportTitle = "妯″叿棰嗙敤鍗�";
- base.BillType="3796";
- base.HBillSubType = "3796";
+ base.MvarReportTitle = "妯″叿棰嗙敤鍑哄簱鍗�";
+ base.BillType= "3802";
+ base.HBillSubType = "3802";
}
@@ -29,8 +29,63 @@
{
DetailColl = null;
}
-
+
#endregion 鑷畾涔夋柟娉�
+
+ //淇濆瓨鍓嶆帶鍒�
+ public bool BeforeSave(Int64 HInterID, string HBillNo, Int64 HSecManagerID, Int64 HKeeperID, Int64 HSupID, Int64 OperationType, ref string sReturn)
+ {
+ try
+ {
+ DataSet Ds = oCn.RunProcReturn("Exec h_p_Sc_MouldProdOutBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + HSecManagerID.ToString() + "," + HKeeperID.ToString() + "," + HSupID.ToString() + "," + OperationType.ToString(), "h_p_Sc_MouldProdOutBill_BeforeSaveCtrl");
+ if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ return false;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
+ return false;
+ }
+ }
+ return true;
+ }
+ catch (Exception e)
+ {
+ throw (e);
+ }
+ }
+
+ //淇濆瓨鍚庢帶鍒�
+ public bool AfterSave(Int64 HInterID, string HBillNo, Int64 OperationType, ref string sReturn)
+ {
+ try
+ {
+ DataSet Ds = oCn.RunProcReturn("Exec h_p_Sc_MouldProdOutBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Sc_MouldProdOutBill_AfterSaveCtrl");
+ if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "淇濆瓨鍚庡垽鏂け璐ワ紒";
+ return false;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
+ return false;
+ }
+ }
+ return true;
+ }
+ catch (Exception e)
+ {
+ throw (e);
+ }
+ }
+
//淇敼鍗曟嵁
public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
{
@@ -38,6 +93,12 @@
{
//
oCn.BeginTran();
+ //淇濆瓨鍓嶆帶鍒�
+ if (!BeforeSave(lngBillKey, omodel.HBillNo, omodel.HSecManagerID, omodel.HKeeperID, omodel.HSupID, 2, ref sReturn))
+ {
+ oCn.RollBack();
+ return false;
+ }
//鏇存柊涓昏〃
oCn.RunProc("UpDate Sc_MouldStockBillMain set " +
" HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��===============
@@ -49,16 +110,18 @@
",HUpDateDate=getdate()" +
//========================================
",HSupID=" + omodel.HSupID.ToString() +
- ",HWHID=" + omodel.HWHID.ToString() +
- ",HSCWHID=" + omodel.HSCWHID.ToString() +
+ ",HSupTypeID=" + omodel.HSupTypeID.ToString() +
",HEmpID=" + omodel.HEmpID.ToString() +
",HManagerID=" + omodel.HManagerID.ToString() +
",HSecManagerID=" + omodel.HSecManagerID.ToString() +
",HKeeperID=" + omodel.HKeeperID.ToString() +
",HDeptID=" + omodel.HDeptID.ToString() +
+ ",HWHID=" + omodel.HWHID.ToString() +
+ ",HSCWHID=" + omodel.HSCWHID.ToString() +
",HExplanation='" + omodel.HExplanation + "'" +
",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
",HRedBlueFlag=" + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
+ ",HStockOrgID=" + omodel.HSTOCKORGID.ToString() +
" where HInterID=" + lngBillKey.ToString());
//鍒犻櫎鍏宠仈
DeleteRelation(ref sReturn, lngBillKey);
@@ -69,36 +132,32 @@
foreach (Model.ClsSc_MouldStockBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Sc_MouldStockBillSub " +
- " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
- ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
- ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
- ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" +
- ",HDesignLife,HLeaveLife,HUseLife" +
- ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" +
- ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
+ " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+ ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HBatchNo" +
+ ",HQtyMust,HQtyRel,HQty,HPrice,HMoney,HDesignLife" +
+ ",HLeaveLife,HUseLife,HUseLifeQty,HNewLifeQty,HWHID,HSCWHID" +
+ ",HSPID,HSCSPID,HSPGroupID,HBarCode,HCorrespondentTypeID,HCorrespondentID" +
+ ",HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
+ ",HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID" +
") 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.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() +
- "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
- "," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() +
- "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" +
- "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" +
+ "," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + ",'" + oSub.HBatchNo + "'" +
+ "," + oSub.HQtyMust.ToString() + "," + oSub.HQtyRel.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HDesignLife.ToString() +
+ "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() + "," + oSub.HUseLifeQty.ToString() + "," + oSub.HNewLifeQty.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() +
+ "," + oSub.HSPID.ToString() + "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBarCode + "'," + oSub.HCorrespondentTypeID.ToString() + "," + oSub.HCorrespondentID.ToString() +
+ "," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
+ "," + oSub.HStockOrgID.ToString() + "," + oSub.HOWNERID.ToString() + "," + oSub.HOtherOrgID.ToString() + ",'" + oSub.HOWNERTYPEID + "'" +
") ");
}
- //
- //foreach (Model.ClsSc_MouldProdOutBillSub oSub in DetailColl)
- //{
- // Ds = oCn.RunProcReturn("exec h_p_Sc_MouldProdOutBill_Qty " + oSub.HICMOInterID, "");
- // if (Ds.Tables[0].Rows.Count == 0)
- // return;
- // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
- // {
- // sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
- // return false;
- // }
- //}
- sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+ //淇濆瓨鍚庢帶鍒�
+ if (!AfterSave(lngBillKey, omodel.HBillNo, 2, ref sReturn))
+ {
+ oCn.RollBack();
+ return false;
+ }
+ sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 淇敼鎴愬姛锛�";
oCn.Commit();
return true;
}
@@ -115,58 +174,62 @@
try
{
//寰楀埌mainid
- omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ if(omodel.HInterID==0)
+ {
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
//鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
oCn.BeginTran();
+ //淇濆瓨鍓嶆帶鍒�
+ if (!BeforeSave(omodel.HInterID, omodel.HBillNo, omodel.HSecManagerID, omodel.HKeeperID, omodel.HSupID, 1, ref sReturn))
+ {
+ oCn.RollBack();
+ return false;
+ }
//涓昏〃
oCn.RunProc("Insert Into Sc_MouldStockBillMain " +
"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
- ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
- ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
- ",HProcID"+
+ ",HSupID,HSupTypeID,HEmpID,HManagerID,HSecManagerID" +
+ ",HKeeperID,HDeptID,HWHID,HSCWHID,HRedBlueFlag" +
+ ",HExplanation,HInnerBillNo,HStockOrgID" +
") " +
- " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
+ " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate.ToShortDateString() + "'" +
", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
- ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() +
- ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
- "," + '0' +
+ ", " + omodel.HSupID.ToString() + "," + omodel.HSupTypeID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString()+
+ ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
+ ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HSTOCKORGID.ToString() +
") ");
//鎻掑叆瀛愯〃
foreach (Model.ClsSc_MouldStockBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Sc_MouldStockBillSub " +
- " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
- ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
- ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
- ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" +
- ",HDesignLife,HLeaveLife,HUseLife" +
- ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" +
- ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
+ " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+ ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HBatchNo" +
+ ",HQtyMust,HQtyRel,HQty,HPrice,HMoney,HDesignLife" +
+ ",HLeaveLife,HUseLife,HUseLifeQty,HNewLifeQty,HWHID,HSCWHID" +
+ ",HSPID,HSCSPID,HSPGroupID,HBarCode,HCorrespondentTypeID,HCorrespondentID" +
+ ",HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
+ ",HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID" +
") 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.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() +
- "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
- "," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() +
- "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" +
- "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" +
+ "," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + ",'" + oSub.HBatchNo + "'" +
+ "," + oSub.HQtyMust.ToString() + "," + oSub.HQtyRel.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HDesignLife.ToString() +
+ "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() + "," + oSub.HUseLifeQty.ToString() + "," + oSub.HNewLifeQty.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() +
+ "," + oSub.HSPID.ToString() + "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBarCode + "'," + oSub.HCorrespondentTypeID.ToString() + "," + oSub.HCorrespondentID.ToString() +
+ "," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
+ "," + oSub.HStockOrgID.ToString() + "," + oSub.HOWNERID.ToString() + "," + oSub.HOtherOrgID.ToString() + ",'" + oSub.HOWNERTYPEID + "'" +
") ");
}
- //
- //foreach (Model.ClsSc_MouldProdOutBillSub oSub in DetailColl)
- //{
- // Ds = oCn.RunProcReturn("exec h_p_Sc_MouldProdOutBill_Qty " + oSub.HICMOInterID, "");
- // if (Ds.Tables[0].Rows.Count == 0)
- // return;
- // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
- // {
- // sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
- // return false;
- // }
- //}
- //
- sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+ //淇濆瓨鍚庢帶鍒�
+ if (!AfterSave(omodel.HInterID, omodel.HBillNo, 1, ref sReturn))
+ {
+ oCn.RollBack();
+ return false;
+ }
+ sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 鏂板鎴愬姛锛�";
oCn.Commit();
return true;
}
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_EquipBeginBillMain.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_EquipBeginBillMain.cs"
new file mode 100644
index 0000000..432108b
--- /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_EquipBeginBillMain.cs"
@@ -0,0 +1,208 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+ public class ClsSb_EquipBeginBillMain : DBUtility.ClsXt_BaseBill
+ {
+ public Model.ClsSb_EquipBeginBillMain omodel = new Model.ClsSb_EquipBeginBillMain();
+ public List<Model.ClsSb_EquipBeginBillSub> DetailColl = new List<Model.ClsSb_EquipBeginBillSub>();
+
+ public ClsSb_EquipBeginBillMain()
+ {
+ base.MvarItemKeySub = "Sb_EquipBeginBillSub";
+ base.MvarItemKeySub2 = "";
+ base.MvarItemKeySub3 = "";
+ base.MvarItemKeySub4 = "";
+ base.MvarItemKey= "Sb_EquipBeginBillMain";
+ base.MvarReportTitle="璁惧寮�鏈哄崟";
+ base.BillType = "3917";
+ base.HBillSubType = "3917";
+
+ }
+
+ #region 鍥哄畾浠g爜
+
+ ~ClsSb_EquipBeginBillMain()
+ {
+ DetailColl = null;
+ }
+
+ #endregion 鑷畾涔夋柟娉�
+ //淇敼鍗曟嵁
+ public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+
+ oCn.BeginTran();
+ //鏇存柊涓昏〃
+ oCn.RunProc("UpDate Sb_EquipBeginBillMain set " +
+ " HBillNo='" + omodel.HBillNo + "'" +
+ ",HYear='" + omodel.HYear.ToString() + "'" +
+ ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+ ",HRemark='" + omodel.HRemark + "'" +
+ ",HUpDater='" + omodel.HMaker + "'" +
+ ",HUpDateDate=getdate()" +
+ //========================================
+ ",HEquipID=" + omodel.HEquipID.ToString() +
+ ",HEquipRelationID='" + omodel.HEquipRelationID.ToString() + "'" +
+ ",HBeginEmpID='" + omodel.HBeginEmpID .ToString()+ "'" +
+ ",HBeginTime='" + omodel.HBeginTime + "'" +
+ " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎鍏宠仈
+ DeleteRelation(ref sReturn, lngBillKey);
+ //鍒犻櫎瀛愯〃
+ //DeleteBillSub(lngBillKey);
+
+ sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+ //鏂板鍗曟嵁
+ public override bool AddBill(ref string sReturn)
+ {
+ try
+ {
+
+ DataSet ds;
+
+ oCn.BeginTran();
+
+ //妫�鏌ヤ富琛ㄥ唴鐮佹槸鍚﹂噸澶嶏紝鑻ラ噸澶嶅垯閲嶆柊鐢熸垚骞剁户缁鏌ワ紝鐩村埌涓嶅啀閲嶅
+ while (true)
+ {
+ ds = oCn.RunProcReturn("select * from Sb_EquipBeginBillMain where HInterID = " + omodel.HInterID, "Sb_EquipBeginBillMain");
+ if (ds != null && ds.Tables[0].Rows.Count > 0)
+ {
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ //涓昏〃
+ string mainSql = "insert into Sb_EquipBeginBillMain" +
+ "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HRemark,HMaker,HMakeDate" +
+ ",HEquipID,HEquipRelationID ,HBeginEmpID,HBeginTime) " +
+ "values(" +
+ "" + (omodel.HYear.ToString() != "0" ? omodel.HYear.ToString() : DateTime.Now.Year.ToString()) +
+ "," + omodel.HPeriod.ToString() +
+ ",'" + this.BillType +
+ "','" + this.HBillSubType +
+ "'," + omodel.HInterID +
+ ",'" + omodel.HDate +
+ "','" + omodel.HBillNo +
+ "','" + omodel.HRemark +
+ "','" + omodel.HMaker +
+ "','" + omodel.HMakeDate +
+ "','" + omodel.HEquipID +
+ "','" + omodel.HEquipRelationID +
+ "','" + omodel.HBeginEmpID +
+ "','" + omodel.HBeginTime +
+ "')";
+
+ oCn.RunProc(mainSql);
+
+ 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 Sb_EquipBeginBillMain Where HInterID=" + lngBillKey.ToString(), "Sb_EquipBeginBillMain");
+ if(Ds.Tables[0].Rows.Count==0)
+ {
+ sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ return false;
+ }
+ //鍥哄畾璧嬪��===========================================
+ omodel.HInterID =DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ omodel.HDate =DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ 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.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ 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.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.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ //========================================================
+
+ //
+
+ //寰幆
+ DataSet DsSub ;
+ DsSub = oCn.RunProcReturn("Select * from Sb_EquipBeginBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Sb_EquipBeginBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Model.ClsSb_EquipBeginBillSub oSub = new Model.ClsSb_EquipBeginBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ 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();
+ //===================================================
+
+ DetailColl.Add(oSub);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ 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_EquipDotCheckBill.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_EquipDotCheckBill.cs"
index 0668574..08979c9 100644
--- "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_EquipDotCheckBill.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_EquipDotCheckBill.cs"
@@ -70,6 +70,11 @@
",HExplanation='" + omodel.HExplanation+"'" +
",HInnerBillNo='" + omodel.HInnerBillNo+"'" +
",HEquipDotCheckRuleInterID="+omodel.HEquipDotCheckRuleInterID+
+ ",HLastResult='" + omodel.HLastResult + "'" +
+ ",HErrNote='" + omodel.HErrNote + "'" +
+ ",HBigSafeNote='" + omodel.HBigSafeNote + "'" +
+ ",HShiftsID=" + omodel.HShiftsID +
+ ",HDotCheckNote='" + omodel.HDotCheckNote + "'" +
" where HInterID=" + lngBillKey.ToString());
//鍒犻櫎鍏宠仈
DeleteRelation(ref sReturn, lngBillKey);
@@ -80,18 +85,18 @@
foreach (Model.ClsSb_EquipDotCheckBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Sb_EquipDotCheckBillSub " +
- " (HInterID,HEntryID," +
- "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
- "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
- "HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim," +
- "HManagerID,HManagerNumber" +
- ") 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.HDotCheckItemID + "','" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim +
- "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "'" +
- ") ");
+ " (HInterID,HEntryID," +
+ "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
+ "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
+ "HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim," +
+ "HManagerID,HManagerNumber,HDotCheckItemClassID,HDotCheckItemMethodID,HDotCheckResult" +
+ ") 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.HDotCheckItemID + "','" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim +
+ "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "'," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID + ",'" + oSub.HDotCheckResult + "'" +
+ ") ");
}
//
//foreach (Model.ClsSb_EquipDotCheckBillSub oSub in DetailColl)
@@ -165,10 +170,11 @@
"(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
",HYear,HPeriod,HRemark,HEquipID" +
",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo,HEquipDotCheckRuleInterID" +
+ ",HLastResult,HErrNote,HBigSafeNote,HShiftsID,HDotCheckNote" +
") "+
" 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.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," +omodel.HEquipDotCheckRuleInterID.ToString()+
+ ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," +omodel.HEquipDotCheckRuleInterID.ToString() + ",'" + omodel.HLastResult + "','" + omodel.HErrNote + "','" + omodel.HBigSafeNote + "'," + omodel.HShiftsID + ",'" + omodel.HDotCheckNote + "'" +
") ");
//鎻掑叆瀛愯〃
foreach (Model.ClsSb_EquipDotCheckBillSub oSub in DetailColl)
@@ -178,13 +184,13 @@
"HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
"HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
"HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim," +
- "HManagerID,HManagerNumber" +
+ "HManagerID,HManagerNumber,HDotCheckItemClassID,HDotCheckItemMethodID,HDotCheckResult" +
") 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.HDotCheckItemID+"','"+oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim +
- "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "'" +
+ "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "'," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID + ",'" + oSub.HDotCheckResult + "'" +
") ");
}
//鐐规瀹屾垚锛屽弽鍐欒澶囩偣妫�璁″垝鍗曞瓙琛ㄦ槸鍚︾偣妫�鏍囪
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_EquipDotCheckPlanBill.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_EquipDotCheckPlanBill.cs"
index 9fc7812..4a90c79 100644
--- "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_EquipDotCheckPlanBill.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_EquipDotCheckPlanBill.cs"
@@ -69,13 +69,13 @@
"HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
"HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
"HDotCheckItem,HDotCheckPart,HClaim," +
- "HManagerID,HManagerNumber" +
+ "HManagerID,HManagerNumber,HDotCheckItemClassID,HDotCheckItemMethodID" +
") values("
- + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
- ",'" + oSub.HCloseMan + "','"+oSub.HEntryCloseDate+"'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+ + 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.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim +
- "'," + oSub.HManagerID.ToString()+",'" +oSub.HManagerNumber+"'"+
+ ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim +
+ "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "'," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID +
") ");
}
//
@@ -128,13 +128,13 @@
"HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
"HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
"HDotCheckItem,HDotCheckPart,HClaim," +
- "HManagerID,HManagerNumber" +
+ "HManagerID,HManagerNumber,HDotCheckItemClassID,HDotCheckItemMethodID" +
") 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.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim +
- "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "'" +
+ "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "'," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID +
") ");
}
//
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_EquipStopBillMain.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_EquipStopBillMain.cs"
new file mode 100644
index 0000000..09170bf
--- /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_EquipStopBillMain.cs"
@@ -0,0 +1,210 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+ public class ClsSb_EquipStopBillMain : DBUtility.ClsXt_BaseBill
+ {
+ public Model.ClsSb_EquipStopBillMain omodel = new Model.ClsSb_EquipStopBillMain();
+ public List<Model.ClsSb_EquipStopBillSub> DetailColl = new List<Model.ClsSb_EquipStopBillSub>();
+
+ public ClsSb_EquipStopBillMain()
+ {
+ base.MvarItemKeySub = "Sb_EquipStopBillSub";
+ base.MvarItemKeySub2 = "";
+ base.MvarItemKeySub3 = "";
+ base.MvarItemKeySub4 = "";
+ base.MvarItemKey= "Sb_EquipStopBillMain";
+ base.MvarReportTitle="璁惧鍋滄満鍗�";
+ base.BillType = "3918";
+ base.HBillSubType = "3918";
+
+ }
+
+ #region 鍥哄畾浠g爜
+
+ ~ClsSb_EquipStopBillMain()
+ {
+ DetailColl = null;
+ }
+
+ #endregion 鑷畾涔夋柟娉�
+ //淇敼鍗曟嵁
+ public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+
+ oCn.BeginTran();
+ //鏇存柊涓昏〃
+ oCn.RunProc("UpDate Sb_EquipStopBillMain set " +
+ " HBillNo='" + omodel.HBillNo + "'" +
+ ",HYear='" + omodel.HYear.ToString() + "'" +
+ ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+ ",HRemark='" + omodel.HRemark + "'" +
+ ",HUpDater='" + omodel.HMaker + "'" +
+ ",HUpDateDate=getdate()" +
+ //========================================
+ ",HEquipID=" + omodel.HEquipID.ToString() +
+ ",HEquipRelationID='" + omodel.HEquipRelationID.ToString() + "'" +
+ ",HStopEmpID='" + omodel.HStopEmpID .ToString()+ "'" +
+ ",HStopTime='" + omodel.HStopTime + "'" +
+ ",HStopReason='" + omodel.HStopReason + "'" +
+ " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎鍏宠仈
+ DeleteRelation(ref sReturn, lngBillKey);
+ //鍒犻櫎瀛愯〃
+ //DeleteBillSub(lngBillKey);
+
+ sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+ //鏂板鍗曟嵁
+ public override bool AddBill(ref string sReturn)
+ {
+ try
+ {
+
+ DataSet ds;
+
+ oCn.BeginTran();
+
+ //妫�鏌ヤ富琛ㄥ唴鐮佹槸鍚﹂噸澶嶏紝鑻ラ噸澶嶅垯閲嶆柊鐢熸垚骞剁户缁鏌ワ紝鐩村埌涓嶅啀閲嶅
+ while (true)
+ {
+ ds = oCn.RunProcReturn("select * from Sb_EquipStopBillMain where HInterID = " + omodel.HInterID, "Sb_EquipStopBillMain");
+ if (ds != null && ds.Tables[0].Rows.Count > 0)
+ {
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ //涓昏〃
+ string mainSql = "insert into Sb_EquipStopBillMain" +
+ "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HRemark,HMaker,HMakeDate" +
+ ",HEquipID,HEquipRelationID ,HStopEmpID,HStopTime,HStopReason) " +
+ "values(" +
+ "" + (omodel.HYear.ToString() != "0" ? omodel.HYear.ToString() : DateTime.Now.Year.ToString()) +
+ "," + omodel.HPeriod.ToString() +
+ ",'" + this.BillType +
+ "','" + this.HBillSubType +
+ "'," + omodel.HInterID +
+ ",'" + omodel.HDate +
+ "','" + omodel.HBillNo +
+ "','" + omodel.HRemark +
+ "','" + omodel.HMaker +
+ "','" + omodel.HMakeDate +
+ "','" + omodel.HEquipID +
+ "','" + omodel.HEquipRelationID +
+ "','" + omodel.HStopEmpID +
+ "','" + omodel.HStopTime +
+ "','" + omodel.HStopReason +
+ "')";
+
+ oCn.RunProc(mainSql);
+
+ 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 Sb_EquipStopBillMain Where HInterID=" + lngBillKey.ToString(), "Sb_EquipStopBillMain");
+ if(Ds.Tables[0].Rows.Count==0)
+ {
+ sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ return false;
+ }
+ //鍥哄畾璧嬪��===========================================
+ omodel.HInterID =DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ omodel.HDate =DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ 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.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ 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.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.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ //========================================================
+
+ //
+
+ //寰幆
+ DataSet DsSub ;
+ DsSub = oCn.RunProcReturn("Select * from Sb_EquipStopBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Sb_EquipStopBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Model.ClsSb_EquipStopBillSub oSub = new Model.ClsSb_EquipStopBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ 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();
+ //===================================================
+
+ DetailColl.Add(oSub);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
+
+
+ }
+
+}
diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs"
index 3494e2f..57ad084 100644
--- "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs"
+++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs"
@@ -92,6 +92,8 @@
",HMaterID=" + omodel.HMaterID.ToString() +
",HFirstCheckEmp=" + omodel.HFirstCheckEmp.ToString() +
",HLastResult=" + DBUtility.ClsPub.BoolToString(omodel.HLastResult) +
+ ",HShiftsID=" + omodel.HShiftsID.ToString() +
+ ",HErrTreatment='" + omodel.HErrTreatment + "'" +
" where HInterID=" + lngBillKey.ToString());
//鍒犻櫎鍏宠仈
DeleteRelation(ref sReturn, lngBillKey);
@@ -204,13 +206,13 @@
",HYear,HPeriod,HRemark" +
",HSourceID,HICMOInterID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" +
",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HLastResult" +
- ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID" +
+ ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID,HShiftsID,HErrTreatment" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
"," + omodel.HSourceID.ToString() + "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HICMOQty.ToString() + "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() +
",'" + omodel.HProcExchBillNo + "'," + omodel.HProcExchQty.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HFirstCheckEmp.ToString() + ", " + DBUtility.ClsPub.BoolToString(omodel.HLastResult) +
- "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID +
+ "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID + "," + omodel.HShiftsID + ",'" + omodel.HErrTreatment + "'" +
") ");
//鎻掑叆瀛愯〃
foreach (Model.ClsQC_FirstPieceCheckBillSub oSub in DetailColl)
diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs"
index 56431ed..115aa38 100644
--- "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs"
+++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs"
@@ -106,6 +106,8 @@
",HRoutingInterID=" + omodel.HRoutingInterID.ToString() +
",HDrawingDireID='" + omodel.HDrawingDireID + "'" +
",HPackTypeID=" + omodel.HPackTypeID.ToString() +
+ ",HShiftsID=" + omodel.HShiftsID.ToString() +
+ ",HErrTreatment='" + omodel.HErrTreatment + "'" +
" where HInterID=" + lngBillKey.ToString());
//鍒犻櫎鍏宠仈
DeleteRelation(ref sReturn, lngBillKey);
@@ -206,7 +208,7 @@
",HBarCode,HLBatchNo,HCusID,HSortBillNo,HContrctBatchNo" +
",HProdAreaID,HProdTypeID,HProdStoveNo,HRecipeID,HDiameter1" +
",HDiameter2,HRoutingInterID,HDrawingDireID,HPackTypeID" +
- ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID,HICMOQty,HProcExchQty" +
+ ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID,HICMOQty,HProcExchQty,HShiftsID,HErrTreatment" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
@@ -216,7 +218,7 @@
",'" + omodel.HBarCode + "','" + omodel.HLBatchNo + "'," + omodel.HCusID.ToString() + ",'" + omodel.HSortBillNo + "','" + omodel.HContrctBatchNo + "'" +
"," + omodel.HProdAreaID.ToString() + "," + omodel.HProdTypeID.ToString() + ",'" + omodel.HProdStoveNo + "'," + omodel.HRecipeID.ToString() + "," + omodel.HDiameter1.ToString() +
"," + omodel.HDiameter2.ToString() + "," + omodel.HRoutingInterID.ToString() + ",'" + omodel.HDrawingDireID + "'," + omodel.HPackTypeID.ToString() +
- "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID + "," + omodel.HICMOQty + "," + omodel.HProcExchQty +
+ "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID + "," + omodel.HICMOQty + "," + omodel.HProcExchQty + "," + omodel.HShiftsID + ",'" + omodel.HErrTreatment + "'" +
") ");
//鎻掑叆瀛愯〃
foreach (Model.ClsQC_ProcessCheckBillSub oSub in DetailColl)
diff --git "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBillSub.cs" "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBillSub.cs"
index 8ae2cdc..6d063f8 100644
--- "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBillSub.cs"
+++ "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBillSub.cs"
@@ -24,5 +24,9 @@
public double HRelationMoney;
public string HRemark;
public DateTime HEntryCloseDate;
+ public Int64 HStockOrgID; // int //库存组织
+ public Int64 HOWNERID; // int //货主
+ public Int64 HOtherOrgID; // int //其他关联组织
+ public string HOWNERTYPEID; // varchar(100) //货主类型
}
}
diff --git "a/EAM/\346\250\241\345\205\267\347\256\241\347\220\206/\346\250\241\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdOutBill.cs" "b/EAM/\346\250\241\345\205\267\347\256\241\347\220\206/\346\250\241\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdOutBill.cs"
index 67ac55f..f5aa1d1 100644
--- "a/EAM/\346\250\241\345\205\267\347\256\241\347\220\206/\346\250\241\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdOutBill.cs"
+++ "b/EAM/\346\250\241\345\205\267\347\256\241\347\220\206/\346\250\241\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdOutBill.cs"
@@ -77,7 +77,7 @@
public const Int16 HUnitIDCol = 57;
//
- public const string ModName = "3796"; //鍗曟嵁绫诲瀷
+ public const string ModName = "3802"; //鍗曟嵁绫诲瀷
public const string ModCaption = "妯″叿棰嗙敤鍗�"; //鍗曟嵁鍚嶇О
public const string ModRightName = "Sc_MouldProdOutBill";
public const string ModRightNameEdit = ModRightName + "_Edit";
diff --git a/Model/Model.csproj b/Model/Model.csproj
index f0533f1..8ce40e2 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -361,7 +361,11 @@
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_CardStatus_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_CardAddress_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_CardType_Model.cs" />
+ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_DotCheckItemMethod_Model.cs" />
+ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_DotCheckItemClass_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_ErrMsgBackType_Model.cs" />
+ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_MaintainLev_Model.cs" />
+ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_PreventErrMould_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_TaskClass_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_ProjectClass_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_StockCheckItem_Model.cs" />
@@ -641,6 +645,10 @@
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipConkBookBillSub.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsGy_FixCardBillMain.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsGy_FixCardBillSub_Emp.cs" />
+ <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipBeginBillMain.cs" />
+ <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipStopBillMain.cs" />
+ <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipBeginBillSub.cs" />
+ <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipStopBillSub.cs" />
<Compile Include="绯荤粺鍏敤\ClsXt_SystemParameter_Model.cs" />
<Compile Include="璁″垝绠$悊\ClsGy_MaterialTechParamBillSub.cs" />
<Compile Include="璁″垝绠$悊\ClsGy_MaterialTechParamBillMain.cs" />
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_DotCheckItemClass_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_DotCheckItemClass_Model.cs"
new file mode 100644
index 0000000..d644a4f
--- /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_DotCheckItemClass_Model.cs"
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsGy_DotCheckItemClass_Model : DBUtility.ClsGy_Base_Model
+ {
+ //
+ }
+}
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_DotCheckItemMethod_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_DotCheckItemMethod_Model.cs"
new file mode 100644
index 0000000..58501fd
--- /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_DotCheckItemMethod_Model.cs"
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsGy_DotCheckItemMethod_Model : DBUtility.ClsGy_Base_Model
+ {
+ //
+ }
+}
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_MaintainLev_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_MaintainLev_Model.cs"
new file mode 100644
index 0000000..5f35366
--- /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_MaintainLev_Model.cs"
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsGy_MaintainLev_Model : DBUtility.ClsGy_Base_Model
+ {
+
+ }
+}
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_PreventErrMould_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_PreventErrMould_Model.cs"
new file mode 100644
index 0000000..3487bf9
--- /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_PreventErrMould_Model.cs"
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsGy_PreventErrMould_Model : DBUtility.ClsGy_Base_Model
+ {
+ public DateTime HMakeTime;
+ public int HUSEORGID;
+ public string HMakeEmp;
+ public DateTime HModifyTime;
+ }
+}
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/ClsSc_MouldDotCheckBillMain.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/ClsSc_MouldDotCheckBillMain.cs"
index 36bbb4f..64d5123 100644
--- "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/ClsSc_MouldDotCheckBillMain.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/ClsSc_MouldDotCheckBillMain.cs"
@@ -14,5 +14,11 @@
public string HExplanation;// varchar(500) --摘要
public string HInnerBillNo;// varchar(50) --内部单据号
public string HMouldDotCheckRuleID;// 器具点检规程ID
+
+ public string HLastResult;// 最终结论(OK,NG)
+ public string HErrNote;// 异常情况记录
+ public string HBigSafeNote;// 重大安全隐患记录
+ public Int64 HShiftsID;// 生产班次(Gy_Shifts)
+ public string HDotCheckNote;// 点检数据
}
}
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/ClsSc_MouldDotCheckBillSub.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/ClsSc_MouldDotCheckBillSub.cs"
index c8989f3..19f28fa 100644
--- "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/ClsSc_MouldDotCheckBillSub.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/ClsSc_MouldDotCheckBillSub.cs"
@@ -13,5 +13,8 @@
public string HClaim;// varchar(100) --具体要求
public long HManagerID;// int --负责人id(h_v_IF_Employee)
+ public Int64 HDotCheckItemClassID;// 点检项目分类(gy_DotCheckItemClass)
+ public Int64 HDotCheckItemMethodID;// 点检方法(gy_DotCheckItemMethod)
+ public string HDotCheckResult;// 点检结果(?,X)
}
}
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/ClsSc_MouldDotCheckPlanBillSub.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/ClsSc_MouldDotCheckPlanBillSub.cs"
index 27ac977..6fb7d28 100644
--- "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/ClsSc_MouldDotCheckPlanBillSub.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/ClsSc_MouldDotCheckPlanBillSub.cs"
@@ -15,6 +15,7 @@
public string HClaim;// varchar(100) --具体要求
public long HManagerID;// int --负责人id(职员表)
-
+ public Int64 HDotCheckItemClassID;//点检项目分类id
+ public Int64 HDotCheckItemMethodID;//点检方法id
}
}
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/ClsSc_MouldDotCheckRuleBillSub.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/ClsSc_MouldDotCheckRuleBillSub.cs"
index 45cdc0f..44054ea 100644
--- "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/ClsSc_MouldDotCheckRuleBillSub.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/ClsSc_MouldDotCheckRuleBillSub.cs"
@@ -15,6 +15,7 @@
public string HClaim;// varchar(100) --具体要求
public Int64 HManagerID;// int --负责人id(职员表)
-
+ public Int64 HDotCheckItemClassID;//点检项目分类id
+ public Int64 HDotCheckItemMethodID;//点检方法id
}
}
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/ClsSc_MouldProdOutBillMain.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/ClsSc_MouldProdOutBillMain.cs"
index 05579cb..d49fff5 100644
--- "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/ClsSc_MouldProdOutBillMain.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/ClsSc_MouldProdOutBillMain.cs"
@@ -6,19 +6,17 @@
{
public class ClsSc_MouldProdOutBillMain : DBUtility.ClsXt_BaseBillMain
{
- public Int64 HSupID;// int --供应商
- public Int64 HSupTypeID;// int --往来单位
- public Int64 HWHID;// int --仓库
- public Int64 HSCWHID;// int --调出仓库
- public Int64 HEmpID;// int --业务员
- public Int64 HManagerID;// int --负责人
- public Int64 HSecManagerID;// int --验收
- public Int64 HKeeperID;// int --保管员
- public Int64 HDeptID;// int --部门
- public string HExplanation;// varchar(200) --摘要
- public string HInnerBillNo;// varchar(50) --内部单据号
- public string HRemark; //加工要求
- public bool HRedBlueFlag;// bit --红蓝单
- public string HSourceBillType; // --源单类型
+ public Int64 HSupID; // int --往来单位
+ public Int64 HSupTypeID; // int --往来类型(1 供应商、2 客户、 3 车间部门)
+ public Int64 HEmpID; // int --业务员
+ public Int64 HManagerID; // int --负责人
+ public Int64 HSecManagerID; // int --验收
+ public Int64 HKeeperID; // int --保管员
+ public Int64 HDeptID; // int --部门
+ public Int64 HWHID; // int --仓库
+ public Int64 HSCWHID; // int --调出仓库
+ public string HExplanation; // varchar(200) --摘要
+ public string HInnerBillNo; // varchar(50) --内部单据号
+ public bool HRedBlueFlag; // bit --红蓝单
}
}
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/ClsSc_MouldProdOutBillSub.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/ClsSc_MouldProdOutBillSub.cs"
index d8a4a2c..7396e9d 100644
--- "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/ClsSc_MouldProdOutBillSub.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/ClsSc_MouldProdOutBillSub.cs"
@@ -6,35 +6,38 @@
{
public class ClsSc_MouldProdOutBillSub : DBUtility.ClsXt_BaseBillSub
{
- public DateTime HEntryCloseDate;// datetime --行关闭 (默认为'') new
- public string HRemark;// varchar(200) --备注
- public Int64 HMaterID;// int --物料ID
- public Int64 HPropertyID;// int --辅助属性
- public Int64 HSecUnitID;// int --辅助计量单位
- public Single HSecUnitRate;// money --换算率
- public Int64 HUnitID;// int --计量单位
- public double HDesignLife;// dec(18,8) --设计寿命
- public double HLeaveLife;// dec(18,8) --剩余寿命
- public double HUseLife;// dec(18,8) --使用寿命
- public double HQtyMust;// dec(18,8) --应收数量
- public double HQty;// dec(18,8) --实收数量
- public double HPrice;// dec(18,8) --单价
- public double HMoney;// dec(18,8) --金额
- public Int64 HWHID;// int --收料仓库
- public Int64 HSCWHID;// int --调出仓库ID
- public Int64 HSPID;// int --仓位ID
- public Int64 HSCSPID;// int --调出仓位ID
- public Int64 HSPGroupID;// int --仓位组ID(仓库选择完自动带出)
- public string HBatchNo;// varchar(50) --批次
- public string HEngineNum;// varchar(50) --发动机号
- public string HUnderPanNum;// varchar(50) --地盘号
- public string HLeaveFactCard;// varchar(50) --出厂证
- public Int64 HPOOrderInterID;// int --采购订单主内码
- public Int64 HPOOrderEntryID;// int --采购订单子内码
- public string HPOOrderBillNo;// varchar(50) --采购订单号
- public Int64 HSeOrderInterID;// int --销售订单主内码
- public Int64 HSeOrderEntryID;// int --销售订单子内码
- public string HSeOrderBillNo;// varchar(50) --销售订单号
+ public Int64 HMaterID; // int --模具ID
+ public Int64 HPropertyID; // int --辅助属性
+ public Int64 HSecUnitID; // int --辅助计量单位
+ public Single HSecUnitRate; // money --换算率
+ public Int64 HUnitID; // int --计量单位
+ public string HBatchNo; // varchar(50) --批次
+ public double HQtyMust; // dec(18,8) --应收数量
+ public double HQtyRel; // dec(18,8)
+ public double HQty; // dec(18,8) --实收数量
+ public double HPrice; // dec(18,8) --单价
+ public double HMoney; // dec(18,8) --金额
+ public double HDesignLife; // dec(18,8) --设计寿命
+ public double HLeaveLife; // dec(18,8) --剩余寿命
+ public double HUseLife; // dec(18,8) --使用寿命
+ public double HUseLifeQty; // dec(18,8)
+ public double HNewLifeQty; // dec(18,8)
+ public Int64 HWHID; // int --收料仓库
+ public Int64 HSCWHID; // int --调出仓库ID
+ public Int64 HSPID; // int --仓位ID
+ public Int64 HSCSPID; // int --调出仓位ID
+ public Int64 HSPGroupID; // int --仓位组ID(仓库选择完自动带出)
+ public string HEngineNum; // varchar(50) --发动机号
+ public string HUnderPanNum; // varchar(50) --地盘号
+ public string HLeaveFactCard; // varchar(50) --出厂证
+ public Int64 HPOOrderInterID; // int --采购订单主内码
+ public Int64 HPOOrderEntryID; // int --采购订单子内码
+ public string HPOOrderBillNo; // varchar(50) --采购订单号
+ public Int64 HSeOrderInterID; // int --销售订单主内码
+ public Int64 HSeOrderEntryID; // int --销售订单子内码
+ public string HSeOrderBillNo; // varchar(50) --销售订单号
public string HBarCode;
+ public Int64 HCorrespondentTypeID; // int --往来单位类型(1 供应商、2 客户、 3 车间部门)
+ public Int64 HCorrespondentID; // int --往来单位内码
}
}
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/ClsSc_MouldStockBillSub.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/ClsSc_MouldStockBillSub.cs"
index 3954dc5..49dc7b1 100644
--- "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/ClsSc_MouldStockBillSub.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/ClsSc_MouldStockBillSub.cs"
@@ -51,5 +51,7 @@
public Int64 HSeOrderInterID;// int --销售订单主内码
public Int64 HSeOrderEntryID;// int --销售订单子内码
public string HSeOrderBillNo;// varchar(50) --销售订单号
+ public Int64 HCorrespondentTypeID; // int --往来单位类型(1 供应商、2 客户、 3 车间部门)
+ public Int64 HCorrespondentID; // int --往来单位内码
}
}
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_EquipBeginBillMain.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_EquipBeginBillMain.cs"
new file mode 100644
index 0000000..8e36ea6
--- /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_EquipBeginBillMain.cs"
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsSb_EquipBeginBillMain : DBUtility.ClsXt_BaseBillMain
+ {
+ public Int64 HEquipID; //int --设备(Gy_EquipFileBillMain)
+ public Int64 HEquipRelationID; // int --关联主设备(Gy_EquipFileBillMain)(根据设备带出关联主设备)
+ public Int64 HBeginEmpID; // int --开机操作人(Gy_Employee)
+ public DateTime HBeginTime; // datetime --开机时间(默认为当前时间,年月日时分秒)(不可编辑)
+
+
+
+ }
+}
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_EquipBeginBillSub.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_EquipBeginBillSub.cs"
new file mode 100644
index 0000000..1460b88
--- /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_EquipBeginBillSub.cs"
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsSb_EquipBeginBillSub : DBUtility.ClsXt_BaseBillSub
+ {
+
+
+ }
+}
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_EquipDotCheckBillMain.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_EquipDotCheckBillMain.cs"
index af51b09..6025add 100644
--- "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_EquipDotCheckBillMain.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_EquipDotCheckBillMain.cs"
@@ -19,5 +19,11 @@
public int HEquipDotCheckPlanInterID; //设备点检计划单(Sb_EquipDotCheckPlanBillSub_Plan)主内码
public int HEquipDotCheckPlanEntryID; //设备点检计划单(Sb_EquipDotCheckPlanBillSub_Plan)子内码
+ public string HLastResult;// 最终结论(OK,NG)
+ public string HErrNote;// 异常情况记录
+ public string HBigSafeNote;// 重大安全隐患记录
+ public Int64 HShiftsID;// 生产班次(Gy_Shifts)
+ public string HDotCheckNote;// 点检数据
+
}
}
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_EquipDotCheckBillSub.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_EquipDotCheckBillSub.cs"
index c7e8bc9..16650dc 100644
--- "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_EquipDotCheckBillSub.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_EquipDotCheckBillSub.cs"
@@ -25,7 +25,10 @@
public string HUnitName;
public Int64 HManagerID;
public string HManagerNumber;
- public string HManagerName;
+ public string HManagerName;
+ public Int64 HDotCheckItemClassID;// 点检项目分类(gy_DotCheckItemClass)
+ public Int64 HDotCheckItemMethodID;// 点检方法(gy_DotCheckItemMethod)
+ public string HDotCheckResult;// 点检结果(?,X)
}
}
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_EquipDotCheckPlanBillSub.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_EquipDotCheckPlanBillSub.cs"
index 35eab31..4295b33 100644
--- "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_EquipDotCheckPlanBillSub.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_EquipDotCheckPlanBillSub.cs"
@@ -24,7 +24,9 @@
public string HUnitName;
public Int64 HManagerID;
public string HManagerNumber;
- public string HManagerName;
+ public string HManagerName;
+ public Int64 HDotCheckItemClassID;//点检项目分类id
+ public Int64 HDotCheckItemMethodID;//点检方法id
}
}
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_EquipStopBillMain.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_EquipStopBillMain.cs"
new file mode 100644
index 0000000..88afac9
--- /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_EquipStopBillMain.cs"
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsSb_EquipStopBillMain : DBUtility.ClsXt_BaseBillMain
+ {
+ public Int64 HEquipID; //int --设备(Gy_EquipFileBillMain)
+ public Int64 HEquipRelationID; // int --关联主设备(Gy_EquipFileBillMain)(根据设备带出关联主设备)
+ public Int64 HStopEmpID; // int --停机操作人(Gy_Employee)
+ public DateTime HStopTime; // datetime --停机时间(默认为当前时间,年月日时分秒)(不可编辑)
+ public string HStopReason; //varchar(500) --停机原因
+
+
+ }
+}
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_EquipStopBillSub.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_EquipStopBillSub.cs"
new file mode 100644
index 0000000..d8fabde
--- /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_EquipStopBillSub.cs"
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsSb_EquipStopBillSub : DBUtility.ClsXt_BaseBillSub
+ {
+
+
+ }
+}
diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillMain.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillMain.cs"
index 633a7d6..54afc0b 100644
--- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillMain.cs"
+++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillMain.cs"
@@ -24,5 +24,7 @@
public Int64 HUnitID;
public Int64 HProcID;
+ public Int64 HShiftsID;
+ public string HErrTreatment;
}
}
diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_PatrolProcCheckBillMain.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_PatrolProcCheckBillMain.cs"
index 1b73614..658e8c0 100644
--- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_PatrolProcCheckBillMain.cs"
+++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_PatrolProcCheckBillMain.cs"
@@ -21,5 +21,7 @@
public Int64 HMainProcID;
public Int64 HLastResult;
+ public Int64 HShiftsID;
+ public string HErrTreatment;
}
}
diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs"
index c42294f..ecf88d1 100644
--- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs"
+++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs"
@@ -43,5 +43,8 @@
public Int64 HICMOQty;
public Int64 HProcExchQty;
+
+ public Int64 HShiftsID;
+ public string HErrTreatment;
}
}
diff --git a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
index 9556978..0474128 100644
--- a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
@@ -6083,5 +6083,488 @@
}
#endregion
+ #region 闃查敊瑁呯疆 鏌ヨ,瀹℃牳锛屽弽瀹℃牳锛岀鐢紝鍙嶇鐢�
+ /// <summary>
+ /// 闃查敊瑁呯疆 鏌ヨ
+ /// </summary>
+ /// <param name="sWhere"></param>
+ /// <param name="user"></param>
+ /// <returns></returns>
+ [Route("Gy_BadReason/Gy_PreventErrMouldList")]
+ [HttpGet]
+ public object Gy_PreventErrMouldList(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_PreventErrMould_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string sql1 = "select * from h_v_Gy_PreventErrMould where 1 = 1";
+ string sql = sql1 + sWhere + " order by 闃查敊瑁呯疆浠g爜 ";
+ ds = oCN.RunProcReturn(sql, "h_v_Gy_PreventErrMould");
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 闃查敊瑁呯疆 瀹℃牳銆佸弽瀹℃牳
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Gy_BadReason/AuditGy_PreventErrMould")]
+ [HttpGet]
+ public object AuditGy_PreventErrMould(int HInterID, int IsAudit, string CurUserName)
+ {
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_PreventErrMould_Check", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ var ds = oCN.RunProcReturn("select * from Gy_PreventErrMould where HItemID=" + HInterID, "Gy_PreventErrMould");
+ 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_PreventErrMould 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_PreventErrMould 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;
+ }
+ }
+
+
+
+ /// <summary>
+ /// 闃查敊瑁呯疆 绂佺敤銆佸弽绂佺敤
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsStop">绂佺敤(0),鍙嶇鐢�(1)</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Gy_BadReason/StopGy_PreventErrMould")]
+ [HttpGet]
+ public object StopGy_PreventErrMould(int HInterID, int IsStop, string CurUserName)
+ {
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_PreventErrMould_Close", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绂佺敤澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ var ds = oCN.RunProcReturn("select * from Gy_PreventErrMould where HItemID=" + HInterID, "Gy_SupType");
+ 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_PreventErrMould 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_PreventErrMould 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 淇濆吇绾у埆 鏌ヨ,瀹℃牳锛屽弽瀹℃牳锛岀鐢紝鍙嶇鐢�
+ /// <summary>
+ /// 淇濆吇绾у埆 鏌ヨ
+ /// </summary>
+ /// <param name="sWhere"></param>
+ /// <param name="user"></param>
+ /// <returns></returns>
+ [Route("Gy_BadReason/Gy_MaintainLevList")]
+ [HttpGet]
+ public object Gy_MaintainLevList(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_MaintainLev_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string sql1 = "select * from h_v_Gy_MaintainLev where 1 = 1";
+ string sql = sql1 + sWhere + " order by 淇濆吇绾у埆浠g爜 ";
+ ds = oCN.RunProcReturn(sql, "h_v_Gy_MaintainLev");
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 淇濆吇绾у埆 瀹℃牳銆佸弽瀹℃牳
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Gy_BadReason/AuditGy_MaintainLev")]
+ [HttpGet]
+ public object AuditGy_MaintainLev(int HInterID, int IsAudit, string CurUserName)
+ {
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_MaintainLev_Check", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ var ds = oCN.RunProcReturn("select * from Gy_MaintainLev where HItemID=" + HInterID, "Gy_MaintainLev");
+ 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_MaintainLev 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_MaintainLev 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;
+ }
+ }
+
+
+
+ /// <summary>
+ /// 淇濆吇绾у埆 绂佺敤銆佸弽绂佺敤
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsStop">绂佺敤(0),鍙嶇鐢�(1)</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Gy_BadReason/StopGy_MaintainLev")]
+ [HttpGet]
+ public object StopGy_MaintainLev(int HInterID, int IsStop, string CurUserName)
+ {
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_MaintainLev_Close", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绂佺敤澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ var ds = oCN.RunProcReturn("select * from Gy_MaintainLev where HItemID=" + HInterID, "Gy_SupType");
+ 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_MaintainLev 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_MaintainLev 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
}
}
\ No newline at end of file
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs
index d83a49a..6b503b2 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs
@@ -254,7 +254,7 @@
}
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
//鑾峰彇鐐规椤圭洰缂栬緫鏁版嵁
- string sql = "select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 HDotCheckItemNumber,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜哄悕绉� HManagerName,瀛愬娉�2 HRemark from h_v_Sc_MouldDotCheckRuleBillSub where 1 = 1 " + Swhere + "";
+ string sql = "select * from h_v_Sc_MouldDotCheckRuleBillSub where 1 = 1 " + Swhere + "";
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldDotCheckRuleBillSub");
////鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
//string sql1 = "select 閰嶄欢ID HMaterID,閰嶄欢浠g爜 HMaterNumber,閰嶄欢鍚嶇О HMaterName,鍗曚綅ID HUnitID,璁¢噺鍗曚綅浠g爜 HUnitNumber,璁¢噺鍗曚綅鍚嶇О HUnitName,鐢ㄩ噺 HQty,瀛愬娉�1 HRemark,鏍囧噯鐢ㄩ噺 HQtyMust from h_v_Sc_MouldDotCheckRuleBillSub_Item where 1 = 1 " + Swhere + "";
@@ -266,6 +266,7 @@
objJsonResult.count = 1;
objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
objJsonResult.list = list;
+ objJsonResult.data = ds.Tables[0];
}
catch (Exception e)
{
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipBeginBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipBeginBillController.cs
new file mode 100644
index 0000000..8c58423
--- /dev/null
+++ b/WebAPI/Controllers/SBGL/Sb_EquipBeginBillController.cs
@@ -0,0 +1,744 @@
+锘縰sing DBUtility;
+using Model;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Web;
+using System.Web.Http;
+using System.Windows.Forms;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.SBGL
+{
+ public class Sb_EquipBeginBillController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛�
+ private json objJsonResult = new json();
+ public DataSet ds = new DataSet();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ public DAL.ClsSb_EquipBeginBillMain OBill = new DAL.ClsSb_EquipBeginBillMain();
+ public DAL.ClsSb_EquipBeginBillMain BillOld = new DAL.ClsSb_EquipBeginBillMain();
+
+
+ #region 璁惧寮�鏈哄崟鍒楄〃 鏌ヨ
+ [Route("Sb_EquipBeginBill/get锘縎b_EquipBeginBillMainList")]
+ [HttpGet]
+ public object get锘縎b_EquipBeginBillMainList(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Sb_EquipBeginBillMain_Check", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Sb_EquipBeginBillMainList order by 鍗曟嵁鍙� desc", "锘縣_v_Sb_EquipBeginBillMainList");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_Sb_EquipBeginBillMainList where 1 = 1 ";
+ string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
+ ds = oCN.RunProcReturn(sql, "锘縣_v_Sb_EquipBeginBillMainList");
+ }
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 璁惧寮�鏈哄崟鍒楄〃 鑾峰彇缂栬緫鍒楄〃鏁版嵁
+ [Route("Sb_EquipBeginBill/锘縎b_EquipBeginBillMainEditList")]
+ [HttpGet]
+ public object Sb_EquipBeginBillMainEditList(string HInterID, string User)
+ {
+ try
+ {
+ List<DataTable> tableList = new List<DataTable>();
+
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipBeginBillMain_Edit", 1, false, User))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ澶辫触!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (HInterID == null || HInterID.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from h_v_Sb_EquipBeginBillMainList where HInterID = " + HInterID, " h_v_Sb_EquipBeginBillMainList");
+
+ 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;
+ }
+ }
+ #endregion
+
+ #region 璁惧寮�鏈哄崟 淇濆瓨/缂栬緫
+ [Route("Sb_EquipBeginBill/Save锘縎b_EquipBeginBillMain")]
+ [HttpPost]
+ public object Save锘縎b_EquipBeginBillMain([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 refSav = sArray[1].ToString();//鎿嶄綔鏂瑰紡鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2 澶嶅埗
+ string user = sArray[2].ToString();//鐢ㄦ埛鍚�
+
+ string UserName = "";
+ string s = "";
+ ListModels oListModels = new ListModels();
+ try
+ {
+ //淇濆瓨鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Sb_EquipBeginBillMain_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ DAL.Cls锘縎b_EquipBeginBillMain oBill = new DAL.Cls锘縎b_EquipBeginBillMain();
+ List<Model.Cls锘縎b_EquipBeginBillMain> lsmain = new List<Model.Cls锘縎b_EquipBeginBillMain>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_锘縎b_EquipBeginBillMain(msg2);
+ foreach (Model.Cls锘縎b_EquipBeginBillMain oItem in lsmain)
+ {
+ if (refSav == "Add")
+ {
+ //鍗曟嵁鍙锋槸鍚﹂噸澶�
+ if (OBill.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, OBill.omodel.HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ if (refSav == "Update")
+ {
+ if (OBill.ShowBill(oItem.HInterID, ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鍒ゆ柇鏄惁鍙紪杈�
+ if (OBill.omodel.HChecker != "" && OBill.omodel.HChecker != null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (OBill.omodel.HBillStatus > 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹浜庝笉鍙紪杈戠姸鎬侊紝涓嶅厑璁镐慨鏀癸紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
+ }
+ UserName = oItem.HMaker; //鍒跺崟浜�
+ oItem.HBillType = "3917";
+ oItem.HBillSubType = "3917";
+
+
+
+ oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+ oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+ oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
+
+ if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oBill.omodel = oItem;
+ }
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (refSav == "Add")
+ {
+
+ bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else if (refSav == "Update")
+ {
+ bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else
+ {
+ bResult = false;
+ }
+ 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 璁惧寮�鏈哄崟 鍒犻櫎
+ [Route("Sb_EquipBeginBill/Delete锘縎b_EquipBeginBill")]
+ [HttpGet]
+ public object Delete锘縎b_EquipBeginBill(string HInterID, string user)
+ {
+ try
+ {
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipBeginBillMain_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if(HInterID == null || HInterID.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.BeginTran();
+
+ oCN.RunProc("delete from Sb_EquipBeginBillMain where HInterID = " + HInterID);
+
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ 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
+
+ #region 璁惧寮�鏈哄崟 瀹℃牳/鍙嶅鏍�
+ [Route("Sb_EquipBeginBill/AuditSb_EquipBeginBill")]
+ [HttpGet]
+ public object AuditSb_EquipBeginBill(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊鏍告潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipBeginBillMain_Check", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愬鏍�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "Sb_EquipBeginBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 瀹℃牳 2 鍙嶅鏍�
+ if (Type == 1)
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡瀹℃牳
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //瀹℃牳鍗曟嵁
+ if (!BillOld.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅鏍�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘杩涜鍙嶅鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜鍙嶅鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅鏍稿崟鎹�
+ if (!BillOld.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 璁惧寮�鏈哄崟 鍏抽棴/鍙嶅叧闂姛鑳�
+ [Route("Sb_EquipBeginBill/CloseSb_EquipBeginBill")]
+ [HttpGet]
+ public object CloseSb_EquipBeginBill(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipBeginBillMain_Close", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愬叧闂�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "Sb_EquipBeginBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 鍏抽棴 2 鍙嶅叧闂�
+ if (Type == 1)
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍏抽棴
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶈兘杩涜鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍏抽棴鍗曟嵁
+ if (!BillOld.CloseBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅叧闂�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶈兘杩涜鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HCloseMan"] == null || ds.Tables[0].Rows[0]["HCloseMan"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈叧闂�!涓嶉渶瑕佸啀鍙嶅叧闂�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅叧闂崟鎹�
+ if (!BillOld.CancelClose(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 璁惧寮�鏈哄崟 浣滃簾/鍙嶄綔搴熷姛鑳�
+ [Route("Sb_EquipBeginBill/DropSb_EquipBeginBill")]
+ [HttpGet]
+ public object DropSb_EquipBeginBill(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈変綔搴熸潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipBeginBillMain_Drop", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愪綔搴�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "Sb_EquipBeginBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 浣滃簾 2 鍙嶄綔搴�
+ if (Type == 1)
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡浣滃簾
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶉渶瑕佸啀浣滃簾!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //浣滃簾鍗曟嵁
+ if (!BillOld.Cancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶄綔搴�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] == null || ds.Tables[0].Rows[0]["HDeleteMan"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈綔搴�!涓嶉渶瑕佸啀鍙嶄綔搴�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶄綔搴熷崟鎹�
+ if (!BillOld.AbandonCancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
index 1910c73..b5fb9f7 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
@@ -382,7 +382,7 @@
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
if (sqlWhere == null || sqlWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 as HDotCheckCode ,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart ,鍏蜂綋瑕佹眰 HClaim,琛ㄤ綋澶囨敞 HRemark,璐熻矗浜篒D HManagerID,璐熻矗浜虹紪鐮� HManagerCode,璐熻矗浜� HManagerName from h_v_Sb_EquipDotCheckBillList", "h_v_Sb_EquipDotCheckBillList");
+ ds = oCN.RunProcReturn("select * from h_v_Sb_EquipDotCheckBill_Edit", "h_v_Sb_EquipDotCheckBill_Edit");
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
@@ -390,9 +390,9 @@
}
else
{
- string sql1 = "select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 as HDotCheckCode ,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart,鍏蜂綋瑕佹眰 HClaim,琛ㄤ綋澶囨敞 HRemark,璐熻矗浜篒D HManagerID,璐熻矗浜虹紪鐮� HManagerCode,璐熻矗浜� HManagerName from h_v_Sb_EquipDotCheckBillList where 1 = 1 ";
+ string sql1 = "select * from h_v_Sb_EquipDotCheckBill_Edit where 1 = 1 ";
string sql = sql1 + sqlWhere;
- ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBillList");
+ ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBill_Edit");
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs
index 7adee46..6cd3ed2 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs
@@ -380,7 +380,7 @@
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
if (sqlWhere == null || sqlWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 HDotCheckCode ,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart ,鍏蜂綋瑕佹眰 HClaim,琛ㄤ綋澶囨敞 HRemark,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerCode,璐熻矗浜� HManagerName from h_v_Sb_EquipDotCheckPlanBillList", "h_v_Sb_EquipDotCheckPlanBillList");
+ ds = oCN.RunProcReturn("select * from h_v_Sb_EquipDotCheckPlanBill_Edit", "h_v_Sb_EquipDotCheckPlanBill_Edit");
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
@@ -388,9 +388,9 @@
}
else
{
- string sql1 = "select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 HDotCheckCode ,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart ,鍏蜂綋瑕佹眰 HClaim,琛ㄤ綋澶囨敞 HRemark,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerCode,璐熻矗浜� HManagerName from h_v_Sb_EquipDotCheckPlanBillList where 1 = 1 ";
+ string sql1 = "select * from h_v_Sb_EquipDotCheckPlanBill_Edit where 1 = 1 ";
string sql = sql1 + sqlWhere;
- ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckPlanBillList");
+ ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckPlanBill_Edit");
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs
new file mode 100644
index 0000000..40890cf
--- /dev/null
+++ b/WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs
@@ -0,0 +1,744 @@
+锘縰sing DBUtility;
+using Model;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Web;
+using System.Web.Http;
+using System.Windows.Forms;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.SBGL
+{
+ public class Sb_EquipStopBillController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛�
+ private json objJsonResult = new json();
+ public DataSet ds = new DataSet();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ public DAL.ClsSb_EquipStopBillMain OBill = new DAL.ClsSb_EquipStopBillMain();
+ public DAL.ClsSb_EquipStopBillMain BillOld = new DAL.ClsSb_EquipStopBillMain();
+
+
+ #region 璁惧鍋滄満鍗曞垪琛� 鏌ヨ
+ [Route("Sb_EquipStopBill/get锘縎b_EquipStopBillMainList")]
+ [HttpGet]
+ public object get锘縎b_EquipStopBillMainList(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Sb_EquipStopBillMain_Check", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Sb_EquipStopBillMainList order by 鍗曟嵁鍙� desc", "锘縣_v_Sb_EquipStopBillMainList");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_Sb_EquipStopBillMainList where 1 = 1 ";
+ string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
+ ds = oCN.RunProcReturn(sql, "锘縣_v_Sb_EquipStopBillMainList");
+ }
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 璁惧鍋滄満鍗曞垪琛� 鑾峰彇缂栬緫鍒楄〃鏁版嵁
+ [Route("Sb_EquipStopBill/锘縎b_EquipStopBillMainEditList")]
+ [HttpGet]
+ public object Sb_EquipStopBillMainEditList(string HInterID, string User)
+ {
+ try
+ {
+ List<DataTable> tableList = new List<DataTable>();
+
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipStopBillMain_Edit", 1, false, User))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ澶辫触!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (HInterID == null || HInterID.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from h_v_Sb_EquipStopBillMainList where HInterID = " + HInterID, " h_v_Sb_EquipStopBillMainList");
+
+ 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;
+ }
+ }
+ #endregion
+
+ #region 璁惧鍋滄満鍗� 淇濆瓨/缂栬緫
+ [Route("Sb_EquipStopBill/Save锘縎b_EquipStopBillMain")]
+ [HttpPost]
+ public object Save锘縎b_EquipStopBillMain([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 refSav = sArray[1].ToString();//鎿嶄綔鏂瑰紡鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2 澶嶅埗
+ string user = sArray[2].ToString();//鐢ㄦ埛鍚�
+
+ string UserName = "";
+ string s = "";
+ ListModels oListModels = new ListModels();
+ try
+ {
+ //淇濆瓨鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Sb_EquipStopBillMain_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ DAL.Cls锘縎b_EquipStopBillMain oBill = new DAL.Cls锘縎b_EquipStopBillMain();
+ List<Model.Cls锘縎b_EquipStopBillMain> lsmain = new List<Model.Cls锘縎b_EquipStopBillMain>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_锘縎b_EquipStopBillMain(msg2);
+ foreach (Model.Cls锘縎b_EquipStopBillMain oItem in lsmain)
+ {
+ if (refSav == "Add")
+ {
+ //鍗曟嵁鍙锋槸鍚﹂噸澶�
+ if (OBill.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, OBill.omodel.HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ if (refSav == "Update")
+ {
+ if (OBill.ShowBill(oItem.HInterID, ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鍒ゆ柇鏄惁鍙紪杈�
+ if (OBill.omodel.HChecker != "" && OBill.omodel.HChecker != null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (OBill.omodel.HBillStatus > 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹浜庝笉鍙紪杈戠姸鎬侊紝涓嶅厑璁镐慨鏀癸紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
+ }
+ UserName = oItem.HMaker; //鍒跺崟浜�
+ oItem.HBillType = "3918";
+ oItem.HBillSubType = "3918";
+
+
+
+ oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+ oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+ oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
+
+ if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oBill.omodel = oItem;
+ }
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (refSav == "Add")
+ {
+
+ bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else if (refSav == "Update")
+ {
+ bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else
+ {
+ bResult = false;
+ }
+ 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 璁惧鍋滄満鍗� 鍒犻櫎
+ [Route("Sb_EquipStopBill/Delete锘縎b_EquipStopBill")]
+ [HttpGet]
+ public object Delete锘縎b_EquipStopBill(string HInterID, string user)
+ {
+ try
+ {
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipStopBillMain_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if(HInterID == null || HInterID.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.BeginTran();
+
+ oCN.RunProc("delete from Sb_EquipStopBillMain where HInterID = " + HInterID);
+
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ 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
+
+ #region 璁惧鍋滄満鍗� 瀹℃牳/鍙嶅鏍�
+ [Route("Sb_EquipStopBill/AuditSb_EquipStopBill")]
+ [HttpGet]
+ public object AuditSb_EquipStopBill(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊鏍告潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipStopBillMain_Check", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愬鏍�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "Sb_EquipStopBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 瀹℃牳 2 鍙嶅鏍�
+ if (Type == 1)
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡瀹℃牳
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //瀹℃牳鍗曟嵁
+ if (!BillOld.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅鏍�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘杩涜鍙嶅鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜鍙嶅鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅鏍稿崟鎹�
+ if (!BillOld.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 璁惧鍋滄満鍗� 鍏抽棴/鍙嶅叧闂姛鑳�
+ [Route("Sb_EquipStopBill/CloseSb_EquipStopBill")]
+ [HttpGet]
+ public object CloseSb_EquipStopBill(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipStopBillMain_Close", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愬叧闂�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "Sb_EquipStopBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 鍏抽棴 2 鍙嶅叧闂�
+ if (Type == 1)
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍏抽棴
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶈兘杩涜鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍏抽棴鍗曟嵁
+ if (!BillOld.CloseBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅叧闂�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶈兘杩涜鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HCloseMan"] == null || ds.Tables[0].Rows[0]["HCloseMan"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈叧闂�!涓嶉渶瑕佸啀鍙嶅叧闂�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅叧闂崟鎹�
+ if (!BillOld.CancelClose(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 璁惧鍋滄満鍗� 浣滃簾/鍙嶄綔搴熷姛鑳�
+ [Route("Sb_EquipStopBill/DropSb_EquipStopBill")]
+ [HttpGet]
+ public object DropSb_EquipStopBill(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈変綔搴熸潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipStopBillMain_Drop", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愪綔搴�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "Sb_EquipStopBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 浣滃簾 2 鍙嶄綔搴�
+ if (Type == 1)
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡浣滃簾
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶉渶瑕佸啀浣滃簾!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //浣滃簾鍗曟嵁
+ if (!BillOld.Cancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶄綔搴�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] == null || ds.Tables[0].Rows[0]["HDeleteMan"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈綔搴�!涓嶉渶瑕佸啀鍙嶄綔搴�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶄綔搴熷崟鎹�
+ if (!BillOld.AbandonCancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index 79e44b1..ac64f22 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -1839,7 +1839,7 @@
oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellOut_Delete " + HInterID);
//閿�鍞嚭搴撳垹闄ゅ洖濉敹璐ч�氱煡鍗曞叧鑱旀暟閲�
- oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOutStockToPOStockIn_Del " + HInterID);
+ oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOutStockToPOStockIn_Delete " + HInterID);
//oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
@@ -5798,7 +5798,7 @@
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
//鑾峰彇鐐规椤圭洰缂栬緫鏁版嵁
- ds = oCN.RunProcReturn("select HDotCheckItem, HDotCheckPart , HClaim, a.HRemark,a.HManagerID,e.HNumber HManagerCode,e.HName HManagerName from Sc_MouldDotCheckBillSub a left join Gy_Employee e on a.HManagerID=e.HItemID where 1=1 " + sqlWhere, "Sc_MouldDotCheckBillSub");
+ ds = oCN.RunProcReturn("select * from h_v_Sc_MouldDotCheckBill_Edit where 1=1 " + sqlWhere, "h_v_Sc_MouldDotCheckBill_Edit");
//鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
ds1 = oCN.RunProcReturn(@"select b.HMaterID, mt.Hnumber HMaterNumber ,mt.HName HMaterName, b.HUnitID
,u2.hnumber HUnitNumber,u2.HName HUnitName,b.HQty,b.HQtyMust,b.HRemark
@@ -5811,7 +5811,7 @@
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = null;
+ objJsonResult.data = ds.Tables[0];
objJsonResult.list = list;
}
@@ -6133,8 +6133,7 @@
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
//鑾峰彇鐐规椤圭洰缂栬緫鏁版嵁
- ds = oCN.RunProcReturn(@"select a.HDotCheckItemID,HDotCheckItem, HDotCheckPart , HClaim, a.HRemark,a.HManagerID,e.HNumber HManagerCode,e.HName HManagerName from Sc_MouldDotCheckPlanBillSub a
- left join Gy_Employee e on a.HManagerID=e.HItemID
+ ds = oCN.RunProcReturn(@"select * from h_v_Sc_MouldDotCheckPlanBill_Edit
where 1=1 " + sqlWhere, "Sc_MouldDotCheckPlanBillSub");
////鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
//ds1 = oCN.RunProcReturn(@"select b.HMaterID, mt.Hnumber HMaterNumber ,mt.HName HMaterName, b.HUnitID
@@ -6147,7 +6146,7 @@
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = null;
+ objJsonResult.data = ds.Tables[0];
objJsonResult.list = list;
}
catch (Exception e)
@@ -6245,7 +6244,48 @@
#endregion
-
+ #region 鏍规嵁鍣ㄥ叿鏉$爜鏌ユ壘鍣ㄥ叿妗f淇℃伅PDA
+ [Route("QJ_PDA_MouldDotCheckBill/txtHBarCode_KeyDown")]
+ [HttpGet]
+ public object txtHBarCode_KeyDown(string HBarCode)
+ {
+ try
+ {
+ if (HBarCode == null || HBarCode.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏉″舰鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //寰楀埌淇℃伅
+ ds = oCN.RunProcReturn("select top 1 * from Gy_MouldFileMain where HNumber= '" + HBarCode + "'", "Gy_MouldFileMain");
+ //鍐欏叆淇℃伅
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈煡璇㈠埌鍣ㄥ叿淇℃伅锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
#region 妯″叿鎶ュ簾鍏ュ簱鍗�
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 681f05e..1e099fa 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -9565,6 +9565,550 @@
}
#endregion
+ #region 闃查敊瑁呯疆 璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
+ /// <summary>
+ /// 闃查敊瑁呯疆 淇濆瓨
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("SaveGy_PreventErrMouldList")]
+ [HttpPost]
+ public object SaveGy_PreventErrMouldList([FromBody] JObject msg)
+ {
+ DataSet ds;
+ var _value = msg["msg"].ToString();
+ string msg3 = _value.ToString();
+ string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg1 = sArray[0].ToString();
+ string msg2 = sArray[1].ToString();
+
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_PreventErrMould_Edit", 1, false, msg2))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ Int64 HItemID = 0;
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //鑾峰彇鏈�澶D鍊艰祴鍊�
+ DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from Gy_PreventErrMould ", "Gy_PreventErrMould");
+ if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
+ {
+ //HItemID= Maxds.Tables[0].Rows[0]["HItemID"]
+ var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]);
+ maxid += 1;
+ HItemID = maxid;
+ }
+ ListModels oListModels = new ListModels();
+ try
+ {
+
+ WebAPI.DLL.ClsGy_PreventErrMould_Ctl oBill = new WebAPI.DLL.ClsGy_PreventErrMould_Ctl();
+ List<Model.ClsGy_PreventErrMould_Model> lsmain = new List<Model.ClsGy_PreventErrMould_Model>();
+ msg1 = msg1.Replace("\\", "");
+ msg1 = msg1.Replace("\n", "");
+ lsmain = oListModels.getObjectByJson_Gy_PreventErrMould(msg1);
+ foreach (Model.ClsGy_PreventErrMould_Model oItem in lsmain)
+ {
+ if (oItem.HNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (oItem.HName.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佸悕绉颁笉鑳戒负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim()))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+
+ ds = oCN.RunProcReturn("select * from Gy_PreventErrMould where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_PreventErrMould");
+ if (oItem.HNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鏂板鏃跺垽鏂�
+ if (oItem.HItemID == 0)
+ {
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+ string sParent;
+ sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+ if (sParent.Trim() == "")
+ {
+ oBill.oModel.HParentID = 0;
+ }
+ else
+ {
+ if (oBill.HavParentCode(sParent.Trim(), HItemID))
+ {
+ oBill.oModel.HParentID = oBill.oModel.HItemID;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ }
+ else//缂栬緫鏃跺垽鏂�
+ {
+ //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+ string sParent;
+ sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+ if (sParent.Trim() == "")
+ {
+ oBill.oModel.HParentID = 0;
+ }
+ else
+ {
+ if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
+ {
+ oBill.oModel.HParentID = oBill.oModel.HItemID;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ }
+ //寰楀埌鐭唬鐮�
+ string sShortNumber;
+ sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
+ if (sShortNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+ oItem.HEndFlag = true;//鏈骇鏍囧織
+ oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //绛夌骇
+ oItem.HMakeEmp = msg2; //鍒涘缓浜�
+
+ oBill.oModel = oItem;
+ }
+
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (oBill.oModel.HItemID == 0)
+ {
+ // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ bResult = oBill.AddNew();
+ }
+ else
+ {
+ bResult = oBill.ModifyByID(oBill.oModel.HItemID);
+ }
+ 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;
+ }
+ }
+
+ /// <summary>
+ /// 闃查敊瑁呯疆 鑾峰彇淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("GetGy_PreventErrMouldDetail")]
+ [HttpGet]
+ public ApiResult<DataSet> GetGy_PreventErrMouldDetail(string HID)
+ {
+ var model = LuBaoSevice.GetGy_PreventErrMouldDetail(HID);
+ return model;
+ }
+
+ /// <summary>
+ /// 闃查敊瑁呯疆 鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("DeltetGy_PreventErrMould")]
+ [HttpGet]
+ public object DeltetGy_PreventErrMould(string HItemID, string user)
+ {
+ DataSet ds;
+ //string ModRightNameCheck = "Sc_ProcessReport_check";
+ try
+ {
+ //鍒犻櫎鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_PreventErrMould_Drop", 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();//寮�濮嬩簨鍔�
+
+
+ oCN.RunProc("delete Gy_PreventErrMould where HItemID=" + HItemID);
+ oCN.Commit();//鎻愪氦浜嬪姟
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏁版嵁鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 淇濆吇绾у埆 璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
+ /// <summary>
+ /// 淇濆吇绾у埆 淇濆瓨
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("SaveGy_MaintainLevList")]
+ [HttpPost]
+ public object SaveGy_MaintainLevList([FromBody] JObject msg)
+ {
+ DataSet ds;
+ var _value = msg["msg"].ToString();
+ string msg3 = _value.ToString();
+ string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg1 = sArray[0].ToString();
+ string msg2 = sArray[1].ToString();
+
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_MaintainLev_Edit", 1, false, msg2))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ Int64 HItemID = 0;
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //鑾峰彇鏈�澶D鍊艰祴鍊�
+ DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from Gy_MaintainLev ", "Gy_MaintainLev");
+ if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
+ {
+ //HItemID= Maxds.Tables[0].Rows[0]["HItemID"]
+ var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]);
+ maxid += 1;
+ HItemID = maxid;
+ }
+ ListModels oListModels = new ListModels();
+ try
+ {
+
+ WebAPI.DLL.ClsGy_MaintainLev_Ctl oBill = new WebAPI.DLL.ClsGy_MaintainLev_Ctl();
+ List<Model.ClsGy_MaintainLev_Model> lsmain = new List<Model.ClsGy_MaintainLev_Model>();
+ msg1 = msg1.Replace("\\", "");
+ msg1 = msg1.Replace("\n", "");
+ lsmain = oListModels.getObjectByJson_Gy_MaintainLev(msg1);
+ foreach (Model.ClsGy_MaintainLev_Model oItem in lsmain)
+ {
+ if (oItem.HNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (oItem.HName.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佸悕绉颁笉鑳戒负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim()))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+
+ ds = oCN.RunProcReturn("select * from Gy_MaintainLev where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_MaintainLev");
+ if (oItem.HNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鏂板鏃跺垽鏂�
+ if (oItem.HItemID == 0)
+ {
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+ string sParent;
+ sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+ if (sParent.Trim() == "")
+ {
+ oBill.oModel.HParentID = 0;
+ }
+ else
+ {
+ if (oBill.HavParentCode(sParent.Trim(), HItemID))
+ {
+ oBill.oModel.HParentID = oBill.oModel.HItemID;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ }
+ else//缂栬緫鏃跺垽鏂�
+ {
+ //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+ string sParent;
+ sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+ if (sParent.Trim() == "")
+ {
+ oBill.oModel.HParentID = 0;
+ }
+ else
+ {
+ if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
+ {
+ oBill.oModel.HParentID = oBill.oModel.HItemID;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ }
+ //寰楀埌鐭唬鐮�
+ string sShortNumber;
+ sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
+ if (sShortNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+ oItem.HEndFlag = true;//鏈骇鏍囧織
+ oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //绛夌骇
+ oItem.HMakeEmp = msg2; //鍒涘缓浜�
+
+ oBill.oModel = oItem;
+ }
+
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (oBill.oModel.HItemID == 0)
+ {
+ // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ bResult = oBill.AddNew();
+ }
+ else
+ {
+ bResult = oBill.ModifyByID(oBill.oModel.HItemID);
+ }
+ 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;
+ }
+ }
+
+ /// <summary>
+ ///淇濆吇绾у埆 鑾峰彇淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("GetGy_MaintainLevDetail")]
+ [HttpGet]
+ public ApiResult<DataSet> GetGy_MaintainLevDetail(string HID)
+ {
+ var model = LuBaoSevice.GetGy_MaintainLevDetail(HID);
+ return model;
+ }
+
+ /// <summary>
+ ///淇濆吇绾у埆 鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("DeltetGy_MaintainLev")]
+ [HttpGet]
+ public object DeltetGy_MaintainLev(string HItemID, string user)
+ {
+ DataSet ds;
+ //string ModRightNameCheck = "Sc_ProcessReport_check";
+ try
+ {
+ //鍒犻櫎鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_MaintainLev_Drop", 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();//寮�濮嬩簨鍔�
+
+
+ oCN.RunProc("delete Gy_MaintainLev where HItemID=" + HItemID);
+ oCN.Commit();//鎻愪氦浜嬪姟
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏁版嵁鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
/// <summary>
/// 鐢ㄥ叧鑱斿伐搴忚幏鍙栦俊鎭�
/// </summary>
@@ -11469,6 +12013,117 @@
}
/// <summary>
+ /// 鏍规嵁鍣ㄥ叿甯﹀嚭椤圭洰
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/GetItemByMouldFile")]
+ [HttpGet]
+ public object GetItemByMouldFile(int MouldProjectID, string Type, string HDate)
+ {
+ if (MouldProjectID <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "浜у搧鍣ㄥ叿鏈�夋嫨";
+ objjson.data = null;
+ return objjson;
+ }
+ try
+ {
+ string HView = "";
+ switch (Type)
+ {
+ case "DJ":
+ HView = "h_v_QJ_GetDotCheckItemList";
+ break;
+ default:
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "璁惧妯″潡绫诲瀷閿欒锛�";
+ objjson.data = null;
+ return objjson;
+ }
+
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //string sql = string.Format(@"select * from " + HView + " where HInterID = " + EquipProjectID);
+ string sql = string.Format(@"Exec h_p_Sb_GetCheckItem_PDA '" + MouldProjectID + "','" + Type + "','" + HDate + "'");
+ ds = oCN.RunProcReturn(sql, HView);
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触,鏌ユ棤鏁版嵁" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ objjson.code = "1";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛!";
+ objjson.data = ds.Tables[0];
+ return objjson;
+ }
+ }
+ catch (Exception ex)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+ objjson.data = null;
+ return objjson;
+ }
+ }
+
+ /// <summary>
+ /// 鏍规嵁鍣ㄥ叿鐐规璁″垝甯﹀嚭椤圭洰
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/GetItemByMouldDotCheckPlan")]
+ [HttpGet]
+ public object GetItemByMouldDotCheckPlan(int HInterID)
+ {
+ if (HInterID <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "浜у搧鍣ㄥ叿鐐规璁″垝鏈�夋嫨";
+ objjson.data = null;
+ return objjson;
+ }
+ try
+ {
+
+ string sql = string.Format(@"select * from h_v_QJ_GetDotCheckItemList where 鐐规璁″垝ID = " + HInterID );
+ ds = oCN.RunProcReturn(sql, "h_v_QJ_GetDotCheckItemList");
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触,鏌ユ棤鏁版嵁" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ objjson.code = "1";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛!";
+ objjson.data = ds.Tables[0];
+ return objjson;
+ }
+ }
+ catch (Exception ex)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+ objjson.data = null;
+ return objjson;
+ }
+ }
+
+ /// <summary>
/// 鏌ヨ鍚勭被璁惧鍗曟嵁鍒楄〃锛堣澶囩偣妫�锛岃澶囩淮淇紝璁惧淇濆吇......锛�
/// </summary>
/// <returns></returns>
@@ -11575,7 +12230,7 @@
string sql = string.Format(@"select b.HDotCheckItemID HDotCheckItemID,c.HNumber HDotCheckCode,b.HDotCheckItem,b.HDotCheckPart,b.HClaim,
b.HManagerID,e.HNumber HManagerCode,e.HName HManagerName,b.HRemark from Sb_EquipDotCheckRuleBillMain a
left join Sb_EquipDotCheckRuleBillSub b on a.HInterID=b.HInterID
- left join Gy_QCCheckItem c on c.HItemID=b.HDotCheckItemID
+ left join Gy_DotCheck c on c.HItemID=b.HDotCheckItemID
left join Gy_Employee e on e.HItemID=b.HManagerID
where a.HInterID=" + HDotCheckRuleInterID);
ds = oCN.RunProcReturn(sql, "Sb_EquipDotCheckRuleBillMain");
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
index b960379..09e616b 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
@@ -778,6 +778,8 @@
BillNew.omodel.HQCSchemeID = ClsPub.isLong(mainList[0].HQCSchemeID);
BillNew.omodel.HBillStatus = 1;
BillNew.omodel.HProcID = ClsPub.isLong(mainList[0].HProcID);
+ BillNew.omodel.HShiftsID = ClsPub.isLong(mainList[0].HShiftsID);
+ BillNew.omodel.HErrTreatment = ClsPub.isStrNull(mainList[0].HErrTreatment);
List<Model.ClsQC_ProcessCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_ProcessCheckBillSub>>(msg3);
BillNew.DetailColl = new List<Model.ClsQC_ProcessCheckBillSub>();
for (int i = 0; i < subList.ToArray().Length; i++)
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs"
index e39b759..217a3a1 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs"
@@ -200,6 +200,8 @@
BillNew.omodel.HMainSourceBillType = ClsPub.isStrNull(mainList[0].HMainSourceBillType);
BillNew.omodel.HQCSchemeID = ClsPub.isLong(mainList[0].HQCSchemeID);
BillNew.omodel.HBillStatus = 1;
+ BillNew.omodel.HShiftsID = ClsPub.isLong(mainList[0].HShiftsID);
+ BillNew.omodel.HErrTreatment = ClsPub.isStrNull(mainList[0].HErrTreatment);
List<Model.ClsQC_FirstPieceCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub>>(msg3);
BillNew.DetailColl = new List<Model.ClsQC_FirstPieceCheckBillSub>();
for (int i = 0; i < subList.ToArray().Length; i++)
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs"
index 59ba13f..2a4ac0d 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs"
@@ -132,7 +132,7 @@
{
try
{
- ds = oCN.RunProcReturn("select * from Gy_DotCheck where HItemID=" + HInterID, "Gy_DotCheck");
+ ds = oCN.RunProcReturn("select * from h_v_Gy_DotCheck_Edit where HItemID=" + HInterID, "h_v_Gy_DotCheck_Edit");
objJsonResult.code = "1";
objJsonResult.count = 1;
@@ -178,6 +178,7 @@
string HRemark = list[0].HRemark;
bool HStopflag = list[0].HStopflag;
string HUseFlag = list[0].HUseFlag;
+ Int64 HDotCheckItemClassID = list[0].HDotCheckItemClassID;
//鍒ゆ柇鏉冮檺
if (!ClsPub.Security_Log("Gy_DotCheck_Edit", 1, false, msg3))
@@ -218,6 +219,7 @@
",HShortNumber='" + HShortNumber + "'" +
",HHelpCode='" + HHelpCode + "'" +
",HStopflag='" + HStopflag + "'" +
+ ",HDotCheckItemClassID=" + HDotCheckItemClassID +
",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
//淇敼瀛愰」鐩唬鐮�
//oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_RepairCheck,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
@@ -268,7 +270,7 @@
bool HStopflag = list[0].HStopflag;
string HUseFlag = list[0].HUseFlag;
bool HEndFlag = list[0].HEndFlag;
-
+ Int64 HDotCheckItemClassID = list[0].HDotCheckItemClassID;
//鍒ゆ柇鏉冮檺
if (!ClsPub.Security_Log("Gy_DotCheck_Edit", 1, false, msg3))
{
@@ -295,9 +297,9 @@
//涓昏〃
oCN.RunProc("Insert into Gy_DotCheck " +
" (HNumber,HName,HHelpCode,HShortNumber" +
- ",HLevel,HEndFlag,HStopflag,HRemark,HParentID) " +
+ ",HLevel,HEndFlag,HStopflag,HRemark,HParentID,HDotCheckItemClassID ) " +
" Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," +
- +HLevel + ",1," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',0)", ref DBUtility.ClsPub.sExeReturnInfo);
+ +HLevel + ",1," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',0," + HDotCheckItemClassID + ")", ref DBUtility.ClsPub.sExeReturnInfo);
//淇敼涓婄骇涓洪潪鏈骇浠g爜
//oCN.RunProc("Update Gy_MouldType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
oCN.Commit();
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckItemClassController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckItemClassController.cs"
new file mode 100644
index 0000000..2764735
--- /dev/null
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckItemClassController.cs"
@@ -0,0 +1,379 @@
+锘縰sing DBUtility;
+using 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.鍩虹璧勬枡.鍩虹璧勬枡
+{
+ public class Gy_DotCheckItemClassController : ApiController
+ {
+ private json objJsonResult = new json();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ DataSet ds;
+ public DAL.ClsGy_DotCheckItemClass_Ctl BillOld = new DAL.ClsGy_DotCheckItemClass_Ctl();
+
+ #region 鐐规椤圭洰鍒嗙被鍒楄〃鏁版嵁
+ [Route("Gy_DotCheckItemClass/GetDotCheckItemClassList")]
+ [HttpGet]
+ public object GetDotCheckItemClassList(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ if (!DBUtility.ClsPub.Security_Log("Gy_DotCheckItemClass_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ ds = oCN.RunProcReturn("select * from h_v_Gy_DotCheckItemClassList where 1=1 " + sWhere + " order by HItemID", "h_v_Gy_DotCheckItemClassList");
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 淇敼鐐规椤圭洰鍒嗙被鑾峰彇缁戝畾鏁版嵁
+ [Route("Gy_DotCheckItemClass/EditDotCheckItemClass")]
+ [HttpGet]
+ public object EditDotCheck(long HInterID)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Gy_DotCheckItemClass_Edit where HItemID=" + HInterID, "h_v_Gy_DotCheckItemClass_Edit");
+
+ 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;
+ }
+ }
+ #endregion
+
+ #region 鐐规椤圭洰鍒嗙被淇濆瓨鏂规硶
+ [Route("Gy_DotCheckItemClass/SaveGy_DotCheckItemClassList")]
+ [HttpPost]
+ public object SaveGy_DotCheckItemClassList([FromBody] JObject msg)
+ {
+ DataSet ds;
+ var _value = msg["msg"].ToString();
+ string msg3 = _value.ToString();
+ string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg1 = sArray[0].ToString();
+ string msg_HUserName = sArray[1].ToString();
+ string msg_HCreateORGID = sArray[2].ToString();
+ string msg_OperationType = sArray[3].ToString();
+
+ Int64 HItemID = 0;
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_DotCheckItemClass_Edit", 1, false, msg_HUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鑾峰彇鏈�澶D鍊艰祴鍊�
+ DataSet Maxds = oCN.RunProcReturn("select MAX(HItemID) HItemID from Gy_DotCheckItemClass ", "Gy_DotCheckItemClass");
+ if ((Maxds != null || Maxds.Tables[0].Rows.Count > 0) && ( Maxds.Tables[0].Rows[0]["HItemID"] != null && Maxds.Tables[0].Rows[0]["HItemID"].ToString() != "" && Maxds.Tables[0].Rows[0]["HItemID"].ToString() != "undefined") )
+ {
+ var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]);
+ maxid += 1;
+ HItemID = maxid;
+ }
+ else
+ {
+ HItemID = 1;
+ }
+ ListModels oListModels = new ListModels();
+
+ try
+ {
+ DAL.ClsGy_DotCheckItemClass_Ctl oBill = new DAL.ClsGy_DotCheckItemClass_Ctl();
+ List<Model.ClsGy_DotCheckItemClass_Model> lsmain = new List<Model.ClsGy_DotCheckItemClass_Model>();
+ msg1 = msg1.Replace("\\", "");
+ msg1 = msg1.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_Gy_DotCheckItemClass(msg1);
+ foreach (Model.ClsGy_DotCheckItemClass_Model oItem in lsmain)
+ {
+ if (oItem.HNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (oItem.HName.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佸悕绉颁笉鑳戒负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
+ //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+ ds = oCN.RunProcReturn("select * from Gy_DotCheckItemClass where HStopflag = 0 and HNumber = '" + oItem.HNumber.Trim() + "'", "Gy_DotCheckItemClass");
+
+ //寰楀埌鐭唬鐮�
+ string sShortNumber;
+ sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
+ if (sShortNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oItem.HUSEORGID = Convert.ToInt32(msg_HCreateORGID); //缁勭粐id
+ oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+ oItem.HEndFlag = true;//鏈骇鏍囧織
+ oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //绛夌骇
+ oItem.HMakeEmp = msg_HUserName; //鍒跺崟浜�
+ oItem.HCREATEORGID = Convert.ToInt32(msg_HCreateORGID); //鍒涘缓缁勭粐
+ oBill.oModel = oItem;
+ }
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (msg_OperationType == 1.ToString() || msg_OperationType == 2.ToString())
+ {
+ bResult = oBill.AddNew();
+ }
+ else
+ {
+ bResult = oBill.ModifyByID(oBill.oModel.HItemID);
+ }
+ if (bResult)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = "";
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = "";
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = "";
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鐐规椤圭洰鍒嗙被鍒犻櫎
+ [Route("Gy_DotCheckItemClass/DeleteDotCheckItemClass")]
+ [HttpGet]
+ public object DeleteDotCheckItemClass(long HItemID, string User)
+ {
+
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Gy_DotCheckItemClass_Delete", 1, false, User))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鍒犻櫎鏉冮檺";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("Select * from Gy_DotCheckItemClass Where HItemID='" + HItemID + "'", "Gy_DotCheckItemClass", ref DBUtility.ClsPub.sExeReturnInfo);
+ if (ds.Tables[0].Rows.Count != 0)
+ {
+ ds = oCN.RunProcReturn("Delete from Gy_DotCheckItemClass Where HItemID='" + HItemID + "'", "Gy_DotCheckItemClass", ref DBUtility.ClsPub.sExeReturnInfo);
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ 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
+
+ #region 鐐规椤圭洰鍒嗙被瀹℃牳銆佸弽瀹℃牳
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Gy_DotCheckItemClass/AuditGy_DotCheckItemClass")]
+ [HttpGet]
+ public object AuditGy_DotCheckItemClass(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_DotCheckItemClass_Check", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 瀹℃牳 2 鍙嶅鏍�
+ if (Type == 1)
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡瀹℃牳
+ DataSet ds;
+ string sql = "select * from Gy_DotCheckItemClass where HItemID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0].Rows[0]["HCheckEmp"] != null && ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //瀹℃牳鍗曟嵁
+ if (!BillOld.AuditByID2(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅鏍�
+ DataSet ds;
+ string sql = "select * from Gy_DotCheckItemClass where HItemID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HCheckEmp"] == null || ds.Tables[0].Rows[0]["HCheckEmp"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅鏍稿崟鎹�
+ if (!BillOld.DeAuditByID2(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ }
+}
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckItemMethodController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckItemMethodController.cs"
new file mode 100644
index 0000000..c4c949e
--- /dev/null
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckItemMethodController.cs"
@@ -0,0 +1,379 @@
+锘縰sing DBUtility;
+using 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.鍩虹璧勬枡.鍩虹璧勬枡
+{
+ public class Gy_DotCheckItemMethodController : ApiController
+ {
+ private json objJsonResult = new json();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ DataSet ds;
+ public DAL.ClsGy_DotCheckItemMethod_Ctl BillOld = new DAL.ClsGy_DotCheckItemMethod_Ctl();
+
+ #region 鐐规鏂规硶鍒楄〃鏁版嵁
+ [Route("Gy_DotCheckItemMethod/GetDotCheckItemMethodList")]
+ [HttpGet]
+ public object GetDotCheckItemMethodList(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ if (!DBUtility.ClsPub.Security_Log("Gy_DotCheckItemMethod_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ ds = oCN.RunProcReturn("select * from h_v_Gy_DotCheckItemMethodList where 1=1 " + sWhere + " order by HItemID", "h_v_Gy_DotCheckItemMethodList");
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 淇敼鐐规鏂规硶鑾峰彇缁戝畾鏁版嵁
+ [Route("Gy_DotCheckItemMethod/EditDotCheckItemMethod")]
+ [HttpGet]
+ public object EditDotCheckItemMethod(long HInterID)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Gy_DotCheckItemMethod_Edit where HItemID=" + HInterID, "h_v_Gy_DotCheckItemMethod_Edit");
+
+ 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;
+ }
+ }
+ #endregion
+
+ #region 鐐规鏂规硶淇濆瓨鏂规硶
+ [Route("Gy_DotCheckItemMethod/SaveGy_DotCheckItemMethodList")]
+ [HttpPost]
+ public object SaveGy_DotCheckItemMethodList([FromBody] JObject msg)
+ {
+ DataSet ds;
+ var _value = msg["msg"].ToString();
+ string msg3 = _value.ToString();
+ string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg1 = sArray[0].ToString();
+ string msg_HUserName = sArray[1].ToString();
+ string msg_HCreateORGID = sArray[2].ToString();
+ string msg_OperationType = sArray[3].ToString();
+
+ Int64 HItemID = 0;
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_DotCheckItemMethod_Edit", 1, false, msg_HUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鑾峰彇鏈�澶D鍊艰祴鍊�
+ DataSet Maxds = oCN.RunProcReturn("select MAX(HItemID) HItemID from Gy_DotCheckItemMethod ", "Gy_DotCheckItemMethod");
+ if ((Maxds != null || Maxds.Tables[0].Rows.Count > 0) && (Maxds.Tables[0].Rows[0]["HItemID"] != null && Maxds.Tables[0].Rows[0]["HItemID"].ToString() != "" && Maxds.Tables[0].Rows[0]["HItemID"].ToString() != "undefined"))
+ {
+ var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]);
+ maxid += 1;
+ HItemID = maxid;
+ }
+ else
+ {
+ HItemID = 1;
+ }
+ ListModels oListModels = new ListModels();
+
+ try
+ {
+ DAL.ClsGy_DotCheckItemMethod_Ctl oBill = new DAL.ClsGy_DotCheckItemMethod_Ctl();
+ List<Model.ClsGy_DotCheckItemMethod_Model> lsmain = new List<Model.ClsGy_DotCheckItemMethod_Model>();
+ msg1 = msg1.Replace("\\", "");
+ msg1 = msg1.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_Gy_DotCheckItemMethod(msg1);
+ foreach (Model.ClsGy_DotCheckItemMethod_Model oItem in lsmain)
+ {
+ if (oItem.HNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (oItem.HName.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佸悕绉颁笉鑳戒负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
+ //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+ ds = oCN.RunProcReturn("select * from Gy_DotCheckItemMethod where HStopflag =0 and HNumber = '" + oItem.HNumber.Trim() + "'", "Gy_DotCheckItemMethod");
+
+ //寰楀埌鐭唬鐮�
+ string sShortNumber;
+ sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
+ if (sShortNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oItem.HUSEORGID = Convert.ToInt32(msg_HCreateORGID); //缁勭粐id
+ oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+ oItem.HEndFlag = true;//鏈骇鏍囧織
+ oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //绛夌骇
+ oItem.HMakeEmp = msg_HUserName; //鍒跺崟浜�
+ oItem.HCREATEORGID = Convert.ToInt32(msg_HCreateORGID); //鍒涘缓缁勭粐
+ oBill.oModel = oItem;
+ }
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (msg_OperationType == 1.ToString() || msg_OperationType == 2.ToString())
+ {
+ bResult = oBill.AddNew();
+ }
+ else
+ {
+ bResult = oBill.ModifyByID(oBill.oModel.HItemID);
+ }
+ if (bResult)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = "";
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = "";
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = "";
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鐐规鏂规硶鍒犻櫎
+ [Route("Gy_DotCheckItemMethod/DeleteDotCheckItemMethod")]
+ [HttpGet]
+ public object DeleteDotCheckItemMethod(long HItemID, string User)
+ {
+
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Gy_DotCheckItemMethod_Delete", 1, false, User))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鍒犻櫎鏉冮檺";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("Select * from Gy_DotCheckItemMethod Where HItemID='" + HItemID + "'", "Gy_DotCheckItemMethod", ref DBUtility.ClsPub.sExeReturnInfo);
+ if (ds.Tables[0].Rows.Count != 0)
+ {
+ ds = oCN.RunProcReturn("Delete from Gy_DotCheckItemMethod Where HItemID='" + HItemID + "'", "Gy_DotCheckItemMethod", ref DBUtility.ClsPub.sExeReturnInfo);
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ 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
+
+ #region 鐐规鏂规硶瀹℃牳銆佸弽瀹℃牳
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Gy_DotCheckItemMethod/AuditGy_DotCheckItemMethod")]
+ [HttpGet]
+ public object AuditGy_DotCheckItemMethod(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_DotCheckItemMethod_Check", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 瀹℃牳 2 鍙嶅鏍�
+ if (Type == 1)
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡瀹℃牳
+ DataSet ds;
+ string sql = "select * from Gy_DotCheckItemMethod where HItemID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0].Rows[0]["HCheckEmp"] != null && ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //瀹℃牳鍗曟嵁
+ if (!BillOld.AuditByID2(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅鏍�
+ DataSet ds;
+ string sql = "select * from Gy_DotCheckItemMethod where HItemID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HCheckEmp"] == null || ds.Tables[0].Rows[0]["HCheckEmp"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅鏍稿崟鎹�
+ if (!BillOld.DeAuditByID2(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ }
+}
diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs"
new file mode 100644
index 0000000..4ca28fa
--- /dev/null
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs"
@@ -0,0 +1,337 @@
+锘縰sing DAL;
+using DBUtility;
+using Model;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using Newtonsoft.Json.Linq;
+using SQLHelper;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using System.Windows.Forms;
+using WebAPI;
+using WebAPI.Models;
+using WebAPI.Service;
+
+namespace WebAPI.Controllers
+{
+ public class MouldController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+ public DataSet ds = new DataSet();
+ private json objJsonResult = new json();
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+
+
+ #region 鍣ㄥ叿鎵爜妯″潡璋冪敤鏂规硶
+
+ #region 鍣ㄥ叿鎵爜妯″潡 鎵弿鍣ㄥ叿鏉$爜璋冪敤鏂规硶
+ /// <summary>
+ /// 鎵弿鍣ㄥ叿鏉$爜
+ /// </summary>
+ /// <returns></returns>
+ [Route("MouldController/Get_CheckTypeByMouldBarCode_Json")]
+ [HttpGet]
+ public object Get_CheckTypeByMouldBarCode_Json(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWhID, Int64 HSCSPID, bool HRedBlueFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockOrgID)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddMouldBarCode_New '" + sBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HSCWhID.ToString() + "," + HSCSPID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HRedBlueFlag + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddMouldBarCode_New");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "灏嗗櫒鍏蜂俊鎭啓鍏ュ櫒鍏峰嚭鍏ュ簱涓存椂琛ㄥけ璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿鍣ㄥ叿鏉$爜澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 鍣ㄥ叿鎵爜妯″潡 鑾峰彇鍣ㄥ叿鍒楄〃淇℃伅澶勭悊鏂规硶
+ /// <summary>
+ /// 鑾峰彇鍣ㄥ叿鍒楄〃淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("MouldController/GetMouldBillEntryTmpList_Json")]
+ [HttpGet]
+ public object GetMouldBillEntryTmpList_Json(Int64 HInterID, string HBillNo, string HBillType)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_MouldBillEntryTmpList " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_MouldBillEntryTmpList");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ List<object> columnNameList = new List<object>();
+ //娣诲姞鍒楀悕
+ 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 = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇鍒楄〃淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 鍣ㄥ叿鎵爜妯″潡 鍒犻櫎鍔熻兘鎸夐挳璋冪敤 鍒犻櫎鍣ㄥ叿鍒楄〃閫変腑琛屼复鏃惰〃璁板綍
+
+ /// <summary>
+ /// 鍒犻櫎鍣ㄥ叿鍒楄〃閫変腑琛屼复鏃惰〃璁板綍
+ /// </summary>
+ /// <returns></returns>
+ [Route("MouldController/set_DelMouldStockBillMain_Temp_Json")]
+ [HttpGet]
+ public object set_DelPonderationBillMain_Temp_BarCode_Json(Int64 HInterID, string HBillType, string HBarCode)
+ {
+ try
+ {
+ oCn.RunProc("Delete from Sc_MouldStockBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HBarCode='" + HBarCode + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎鍣ㄥ叿鍒楄〃璁板綍澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #endregion
+
+
+ #region 妯″叿棰嗙敤鍑哄簱鍗�
+
+ /// <summary>
+ /// 妯″叿棰嗙敤鍑哄簱鍗曟柊澧炰笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("MouldController/set_SaveMouldProdOutBill_Json")]
+ [HttpPost]
+ public object set_SaveMouldProdOutBill_Json([FromBody] JObject oMain)
+ {
+ BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
+ DAL.ClsSc_MouldProdOutBill BillNew = new DAL.ClsSc_MouldProdOutBill();
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ try
+ {
+ string sMainStr = "[" + msg1.ToString() + "]";
+ List<Model.ClsSc_MouldProdOutBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_MouldProdOutBillMain>>(sMainStr);
+
+ //鍗曟嵁鍙锋槸鍚﹂噸澶�
+ if (BillNew.IsExistBillNo(ref ClsPub.sExeReturnInfo, mainList[0].HBillNo, BillStatus, mainList[0].HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(mainList[0].HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍥哄畾璧嬪��=================================
+ BillNew.omodel.HYear = sYear;
+ BillNew.omodel.HPeriod = sPeriod;
+ BillNew.omodel.HBillType = "3802";
+ BillNew.omodel.HInterID = mainList[0].HInterID;
+ BillNew.omodel.HBillNo = mainList[0].HBillNo;
+ BillNew.omodel.HDate = mainList[0].HDate;
+ BillNew.omodel.HRemark = mainList[0].HRemark;
+ BillNew.omodel.HMaker = mainList[0].HMaker;
+ BillNew.omodel.HSTOCKORGID = mainList[0].HSTOCKORGID;
+ DBUtility.ClsPub.CurUserName = mainList[0].HMaker;
+ //====================================================
+ BillNew.omodel.HSupID = mainList[0].HSupID;
+ BillNew.omodel.HSupTypeID = mainList[0].HSupTypeID;
+ BillNew.omodel.HEmpID = mainList[0].HEmpID;
+ BillNew.omodel.HManagerID = mainList[0].HManagerID;
+ BillNew.omodel.HSecManagerID = mainList[0].HSecManagerID;
+ BillNew.omodel.HKeeperID = mainList[0].HKeeperID;
+ BillNew.omodel.HDeptID = mainList[0].HDeptID;
+ BillNew.omodel.HWHID = mainList[0].HWHID;
+ BillNew.omodel.HSCWHID = mainList[0].HSCWHID;
+ BillNew.omodel.HExplanation = mainList[0].HExplanation;
+ BillNew.omodel.HInnerBillNo = mainList[0].HInnerBillNo;
+ BillNew.omodel.HRedBlueFlag = mainList[0].HRedBlueFlag;
+ //瀛愯〃璧嬪��
+ ds = oCn.RunProcReturn("exec h_p_Sc_GetMouldStockBill_Temp " + BillNew.omodel.HInterID.ToString() + ",'" + BillNew.omodel.HBillType + "'", "h_p_Sc_GetMouldStockBill_Temp");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忔潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
+ {
+ Model.ClsSc_MouldStockBillSub oSub = new Model.ClsSc_MouldStockBillSub();
+ //鍥哄畾璧嬪��========================================
+ oSub.HEntryID = i + 1;
+ oSub.HRemark = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HRemark"]);
+ oSub.HSourceInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSourceInterID"]);
+ oSub.HSourceEntryID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSourceEntryID"]);
+ oSub.HSourceBillType = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HSourceBillType"]);
+ oSub.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HSourceBillNo"]);
+ oSub.HRelationQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HRelationQty"]);
+ oSub.HRelationMoney = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HRelationMoney"]);
+ //=============================
+ oSub.HMaterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HMaterID"]);
+ oSub.HPropertyID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HAuxPropID"]);
+ oSub.HSecUnitID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSecUnitID"]);
+ oSub.HSecUnitRate = DBUtility.ClsPub.isSingle(ds.Tables[0].Rows[i]["HSecUnitRate"]);
+ oSub.HUnitID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HUnitID"]);
+ oSub.HBatchNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HBatchNo"]);
+ oSub.HQtyMust = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HQtyMust"]);
+ oSub.HQtyRel = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HQtyRel"]);
+ oSub.HQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HQty"]);
+ oSub.HPrice = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HPrice"]);
+ oSub.HMoney = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HMoney"]);
+ oSub.HDesignLife = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HDesignLife"]);
+ oSub.HLeaveLife = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HLeaveLife"]);
+ oSub.HUseLife = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HUseLife"]);
+ oSub.HUseLifeQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HUseLifeQty"]);
+ oSub.HNewLifeQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HNewLifeQty"]);
+ oSub.HWHID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HWHID"]);
+ oSub.HSCWHID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSCWHID"]);
+ oSub.HSPID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSPID"]);
+ oSub.HSCSPID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSCSPID"]);
+ oSub.HSPGroupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSPGroupID"]);
+ oSub.HBarCode = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HBarCode"]);
+ oSub.HCorrespondentTypeID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HCorrespondentTypeID"]);
+ oSub.HCorrespondentID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HCorrespondentID"]);
+ oSub.HPOOrderInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HPOOrderInterID"]);
+ oSub.HPOOrderEntryID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HPOOrderEntryID"]);
+ oSub.HPOOrderBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HPOOrderBillNo"]);
+ oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSeOrderInterID"]);
+ oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSeOrderEntryID"]);
+ oSub.HSeOrderBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HSeOrderBillNo"]);
+ oSub.HStockOrgID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HStockOrgID"]);
+ oSub.HOWNERID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HOWNERID"]);
+ oSub.HOtherOrgID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HOtherOrgID"]);
+ oSub.HOWNERTYPEID = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HOWNERTYPEID"]);
+ BillNew.DetailColl.Add(oSub);
+ }
+ }
+ //淇濆瓨
+ bool bResult;
+ bResult = BillNew.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+
+ if (bResult)
+ {
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "妯″叿棰嗙敤鍑哄簱鍗曚笂浼犲け璐ワ紒" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+}
diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs"
index 844703b..e6009d5 100644
--- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs"
+++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs"
@@ -66,6 +66,7 @@
public string HMainSourceBillNo;
public string HMainSourceBillType;
public int HOrderLevID;
+ public int HTaskClassID;
}
#endregion
@@ -184,7 +185,7 @@
string HMainSourceBillNo = mainList[0].HMainSourceBillNo;
string HMainSourceBillType = mainList[0].HMainSourceBillType;
int HOrderLevID = mainList[0].HOrderLevID;
-
+ int HTaskClassID = mainList[0].HTaskClassID;
if (OperationType == 2)
@@ -206,7 +207,7 @@
{
string sql = "insert into PM_WorkTaskBillMain" +
"(HYear,HPeriod,HBillType,HBillSubType,HInterID,HBillNo,HProjectID,HProNumber,HProjectStageID,HName,HDate,HTaskNote,HPlanTimes" +
- ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID)" +
+ ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID,HTaskClassID)" +
"values(" +
"" + HYear +
"," + HPeriod +
@@ -236,6 +237,7 @@
",'" + HMainSourceBillNo +
"','" + HMainSourceBillType +
"','" + HOrderLevID +
+ "','"+ HTaskClassID+
"')";
//涓昏〃
@@ -273,6 +275,7 @@
",HMainSourceBillNo = '" + HMainSourceBillNo +
"',HMainSourceBillType = '" + HMainSourceBillType +
"',HOrderLevID = '" + HOrderLevID +
+ "',HTaskClassID = '" + HTaskClassID +
"' where HInterID = " + HInterID;
oCN.RunProc(sql);
diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
index 82f7912..1205101 100644
--- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
+++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
@@ -34,6 +34,12 @@
public DAL.ClsPM_ProjectMoneyBillMain BillNew4 = new DAL.ClsPM_ProjectMoneyBillMain(); //椤圭洰璐圭敤鍗曞搴斿崟鎹被
public DAL.ClsPM_ProjectMoneyBillMain BillOld4 = new DAL.ClsPM_ProjectMoneyBillMain();
+ public DAL.ClsPM_ProjectBeginBillMain BillNew5 = new DAL.ClsPM_ProjectBeginBillMain(); //椤圭洰鍚姩鍗曞搴斿崟鎹被
+ public DAL.ClsPM_ProjectBeginBillMain BillOld5 = new DAL.ClsPM_ProjectBeginBillMain();
+
+ public DAL.ClsPM_ProjectEndBillMain BillNew6 = new DAL.ClsPM_ProjectEndBillMain(); //椤圭洰楠屾敹鍗曞搴斿崟鎹被
+ public DAL.ClsPM_ProjectEndBillMain BillOld6 = new DAL.ClsPM_ProjectEndBillMain();
+
#region 宸ョ▼椤圭洰 鏂板/缂栬緫
#region 宸ョ▼椤圭洰 琛ㄥご鏁版嵁
public class PM_ProjectBill_Main
@@ -3255,7 +3261,7 @@
if (refSav == "Add")
{
//鍗曟嵁鍙锋槸鍚﹂噸澶�
- if (BillNew1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
+ if (BillNew5.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -3266,7 +3272,7 @@
}
if (refSav == "Update")
{
- if (BillOld1.ShowBill(oItem.HInterID, ref s) == false)
+ if (BillOld5.ShowBill(oItem.HInterID, ref s) == false)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -3275,7 +3281,7 @@
return objJsonResult;
}
//鍒ゆ柇鏄惁鍙紪杈�
- if (BillOld1.omodel.HChecker != "" && BillOld1.omodel.HChecker != null)
+ if (BillOld5.omodel.HChecker != "" && BillOld5.omodel.HChecker != null)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -3283,7 +3289,7 @@
objJsonResult.data = 1;
return objJsonResult;
}
- if (BillOld1.omodel.HBillStatus > 1)
+ if (BillOld5.omodel.HBillStatus > 1)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -3893,7 +3899,7 @@
if (refSav == "Add")
{
//鍗曟嵁鍙锋槸鍚﹂噸澶�
- if (BillNew1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
+ if (BillNew6.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -3904,7 +3910,7 @@
}
if (refSav == "Update")
{
- if (BillOld1.ShowBill(oItem.HInterID, ref s) == false)
+ if (BillOld6.ShowBill(oItem.HInterID, ref s) == false)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -3913,7 +3919,7 @@
return objJsonResult;
}
//鍒ゆ柇鏄惁鍙紪杈�
- if (BillOld1.omodel.HChecker != "" && BillOld1.omodel.HChecker != null)
+ if (BillOld6.omodel.HChecker != "" && BillOld6.omodel.HChecker != null)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -3921,7 +3927,7 @@
objJsonResult.data = 1;
return objJsonResult;
}
- if (BillOld1.omodel.HBillStatus > 1)
+ if (BillOld6.omodel.HBillStatus > 1)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
diff --git a/WebAPI/DLL/ClsGy_MaintainLev_Ctl.cs b/WebAPI/DLL/ClsGy_MaintainLev_Ctl.cs
new file mode 100644
index 0000000..21389ea
--- /dev/null
+++ b/WebAPI/DLL/ClsGy_MaintainLev_Ctl.cs
@@ -0,0 +1,102 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace WebAPI.DLL
+{
+ public class ClsGy_MaintainLev_Ctl : DBUtility.ClsGy_Base_Ctl
+ {
+
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+ public string HOldNumber;
+ public Model.ClsGy_MaintainLev_Model oModel = new Model.ClsGy_MaintainLev_Model();
+ //鏂板
+ public override bool AddNew()
+ {
+ //
+ try
+ {
+ oCn.BeginTran();
+ oCn.RunProc("Insert into " + MvarItemKey + " " +
+ " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+ ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID) " +
+ " 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 + "','" +DateTime.Now+ "','" + oModel.HUSEORGID + "','" + oModel.HUseFlag + "','" + oModel.HMakeEmp+ "','" + oModel.HUSEORGID + "')", 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 + "'" +
+ ",HModifyTime='" + DateTime.Now + "'" +
+ ",HUSEORGID='" + oModel.HUSEORGID + "'" +
+ ",HModifyEmp ='" + oModel.HMakeEmp + "'" +
+ ",HUseFlag='" + oModel.HUseFlag + "'" +
+ ",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_MaintainLev_Ctl()
+ {
+ MvarItemKey = "Gy_MaintainLev";
+ MvarReportTitle = "闃查敊瑁呯疆璁剧疆";
+ oModel = new Model.ClsGy_MaintainLev_Model();
+ }
+
+
+
+ }
+}
diff --git a/WebAPI/DLL/ClsGy_PreventErrMould_Ctl.cs b/WebAPI/DLL/ClsGy_PreventErrMould_Ctl.cs
new file mode 100644
index 0000000..3ec2b2a
--- /dev/null
+++ b/WebAPI/DLL/ClsGy_PreventErrMould_Ctl.cs
@@ -0,0 +1,102 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace WebAPI.DLL
+{
+ public class ClsGy_PreventErrMould_Ctl : DBUtility.ClsGy_Base_Ctl
+ {
+
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+ public string HOldNumber;
+ public Model.ClsGy_PreventErrMould_Model oModel = new Model.ClsGy_PreventErrMould_Model();
+ //鏂板
+ public override bool AddNew()
+ {
+ //
+ try
+ {
+ oCn.BeginTran();
+ oCn.RunProc("Insert into " + MvarItemKey + " " +
+ " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+ ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID) " +
+ " 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 + "','" +DateTime.Now+ "','" + oModel.HUSEORGID + "','" + oModel.HUseFlag + "','" + oModel.HMakeEmp+ "','" + oModel.HUSEORGID + "')", 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 + "'" +
+ ",HModifyTime='" + DateTime.Now + "'" +
+ ",HUSEORGID='" + oModel.HUSEORGID + "'" +
+ ",HModifyEmp ='" + oModel.HMakeEmp + "'" +
+ ",HUseFlag='" + oModel.HUseFlag + "'" +
+ ",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_PreventErrMould_Ctl()
+ {
+ MvarItemKey = "Gy_PreventErrMould";
+ MvarReportTitle = "闃查敊瑁呯疆璁剧疆";
+ oModel = new Model.ClsGy_PreventErrMould_Model();
+ }
+
+
+
+ }
+}
diff --git a/WebAPI/DLL/ClsQC_PatrolProcCheckBill.cs b/WebAPI/DLL/ClsQC_PatrolProcCheckBill.cs
index 8372902..e8511ee 100644
--- a/WebAPI/DLL/ClsQC_PatrolProcCheckBill.cs
+++ b/WebAPI/DLL/ClsQC_PatrolProcCheckBill.cs
@@ -94,6 +94,8 @@
//",HMaterID=" + omodel.HMaterID.ToString() +
",HFirstCheckEmp=" + omodel.HFirstCheckEmp.ToString() +
",HMainProcID=" + omodel.HMainProcID.ToString() +
+ ",HShiftsID=" + omodel.HShiftsID.ToString() +
+ ",HErrTreatment='" + omodel.HErrTreatment + "'" +
" where HInterID=" + lngBillKey.ToString();
//鏇存柊涓昏〃
oCn.RunProc(sqlerro);
@@ -223,12 +225,12 @@
"(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
",HYear,HPeriod,HRemark" +
",HSourceID,HICMOInterID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" +
- ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HMainProcID,HLastResult" +
+ ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HMainProcID,HLastResult,HShiftsID,HErrTreatment" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
"," + omodel.HSourceID.ToString() + "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HICMOQty.ToString() + "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() +
- ",'" + omodel.HProcExchBillNo + "'," + omodel.HProcExchQty.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HFirstCheckEmp.ToString() + "," + omodel.HMainProcID +" ,"+ omodel.HLastResult +
+ ",'" + omodel.HProcExchBillNo + "'," + omodel.HProcExchQty.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HFirstCheckEmp.ToString() + "," + omodel.HMainProcID +" ,"+ omodel.HLastResult + "," + omodel.HShiftsID + ",'" + omodel.HErrTreatment + "'" +
") ");
//鎻掑叆瀛愯〃
foreach (Model.ClsQC_PatrolProcCheckBillSub oSub in DetailColl)
diff --git a/WebAPI/DLL/ClsSb_EquipDotCheckBill.cs b/WebAPI/DLL/ClsSb_EquipDotCheckBill.cs
index a6b7346..87f7edc 100644
--- a/WebAPI/DLL/ClsSb_EquipDotCheckBill.cs
+++ b/WebAPI/DLL/ClsSb_EquipDotCheckBill.cs
@@ -115,11 +115,12 @@
",HYear,HPeriod,HRemark,HEquipID" +
",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo" +
",HDeptID,HQty,HEquipDotCheckRuleInterID" +
+ ",HLastResult,HErrNote,HBigSafeNote,HShiftsID,HDotCheckNote" +
") " +
" 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.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" +
- ",'" + omodel.HDeptID + "'," + omodel.HQty + "," + omodel.HEquipDotCheckRuleInterID +
+ ",'" + omodel.HDeptID + "'," + omodel.HQty + "," + omodel.HEquipDotCheckRuleInterID + ",'" + omodel.HLastResult + "','" + omodel.HErrNote + "','" + omodel.HBigSafeNote + "'," + omodel.HShiftsID + ",'" + omodel.HDotCheckNote + "'" +
") ");
//鎻掑叆瀛愯〃
foreach (Models.ClsSb_EquipDotCheckBillSub oSub in DetailColl)
@@ -130,12 +131,13 @@
"HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
"HDotCheckItem,HDotCheckPart,HClaim," +
"HManagerID,HManagerNumber,HDotCheckResult,HDotCheckItemID " +
+ ",HDotCheckItemClassID,HDotCheckItemMethodID" +
") 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.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim +
- "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "','" + oSub.HDotCheckResult + "'," + oSub.HDotCheckItemID +
+ "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "','" + oSub.HDotCheckResult + "'," + oSub.HDotCheckItemID + "," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID +
") ");
}
//鏇存柊鐐规璁″垝瀛愯〃鍏宠仈鏍囪
diff --git a/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs b/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs
index b02339f..7d74108 100644
--- a/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs
+++ b/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs
@@ -57,13 +57,13 @@
"HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
"HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
"HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim," +
- "HManagerID" +
+ "HManagerID,HDotCheckItemClassID,HDotCheckItemMethodID" +
") 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.HDotCheckItemID + "','" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim +
- "'," + oSub.HManagerID.ToString() +
+ "'," + oSub.HManagerID.ToString() + "," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID +
") ");
}
sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
@@ -104,13 +104,13 @@
"HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
"HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
"HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim," +
- "HManagerID" +
+ "HManagerID,HDotCheckItemClassID,HDotCheckItemMethodID" +
") 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.HDotCheckItemID + "','" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim +
- "'," + oSub.HManagerID.ToString() +
+ "'," + oSub.HManagerID.ToString() + "," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID +
") ");
}
sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
diff --git a/WebAPI/DLL/ClsSc_MouldProdOutBill.cs b/WebAPI/DLL/ClsSc_MouldProdOutBill.cs
index 8d0a2a3..1fad3c4 100644
--- a/WebAPI/DLL/ClsSc_MouldProdOutBill.cs
+++ b/WebAPI/DLL/ClsSc_MouldProdOutBill.cs
@@ -146,7 +146,7 @@
",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo,HStockOrgID" +
") 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 + "','" + omodel.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
"," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() +
"," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
"," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() +
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index 1d17cd2..b264415 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -1122,7 +1122,31 @@
List<Model.ClsGy_ProjectMoney_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_ProjectMoney_Model>>(jsonString);
return list;
}
-
+
+ /// <summary>
+ /// 澶勭悊鏂板闃查敊瑁呯疆琛ㄧ殑json
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsGy_PreventErrMould_Model> getObjectByJson_Gy_PreventErrMould(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsGy_PreventErrMould_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_PreventErrMould_Model>>(jsonString);
+ return list;
+ }
+
+ /// <summary>
+ /// 澶勭悊鏂板淇濆吇绾у埆琛ㄧ殑json
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsGy_MaintainLev_Model> getObjectByJson_Gy_MaintainLev(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsGy_MaintainLev_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_MaintainLev_Model>>(jsonString);
+ return list;
+ }
+
/// <summary>
/// 澶勭悊鏂板椤圭洰绫诲埆琛ㄧ殑json
/// </summary>
@@ -1405,6 +1429,29 @@
return list;
}
+ /// <summary>
+ /// 澶勭悊鏂板璁惧鍋滄満鍗曚富琛ㄧ殑json
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsSb_EquipStopBillMain> getObjectByJson_锘縎b_EquipStopBillMain(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsSb_EquipStopBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_EquipStopBillMain>>(jsonString);
+ return list;
+ }
+
+ /// <summary>
+ /// 澶勭悊鏂板璁惧寮�鏈哄崟涓昏〃鐨刯son
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsSb_EquipBeginBillMain> getObjectByJson_锘縎b_EquipBeginBillMain(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsSb_EquipBeginBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_EquipBeginBillMain>>(jsonString);
+ return list;
+ }
/// <summary>
/// 澶勭悊鏂板椤圭洰鍚姩琛ㄧ殑json
@@ -1796,6 +1843,30 @@
}
/// <summary>
+ /// 澶勭悊鏂板鐐规椤圭洰鍒嗙被琛ㄧ殑json
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsGy_DotCheckItemClass_Model> getObjectByJson_Gy_DotCheckItemClass(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsGy_DotCheckItemClass_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_DotCheckItemClass_Model>>(jsonString);
+ return list;
+ }
+
+ /// <summary>
+ /// 澶勭悊鏂板鐐规鏂规硶琛ㄧ殑json
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsGy_DotCheckItemMethod_Model> getObjectByJson_Gy_DotCheckItemMethod(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsGy_DotCheckItemMethod_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_DotCheckItemMethod_Model>>(jsonString);
+ return list;
+ }
+
+ /// <summary>
/// 澶勭悊鏂板鏉$爜鎷嗙爜鐨刯son
/// </summary>
/// <param name="jsonString"></param>
diff --git a/WebAPI/Models/ClsGy_DotCheck.cs b/WebAPI/Models/ClsGy_DotCheck.cs
index 9f84d7c..280788c 100644
--- a/WebAPI/Models/ClsGy_DotCheck.cs
+++ b/WebAPI/Models/ClsGy_DotCheck.cs
@@ -19,5 +19,6 @@
public string HRemark; //澶囨敞
public string HUseFlag = "鏈娇鐢�";
+ public Int64 HDotCheckItemClassID; //鐐规椤圭洰鍒嗙被
}
}
\ No newline at end of file
diff --git a/WebAPI/Models/ClsSb_EquipDotCheckBillMain.cs b/WebAPI/Models/ClsSb_EquipDotCheckBillMain.cs
index b9ca54a..d02bcc2 100644
--- a/WebAPI/Models/ClsSb_EquipDotCheckBillMain.cs
+++ b/WebAPI/Models/ClsSb_EquipDotCheckBillMain.cs
@@ -17,5 +17,11 @@
public long HDeptID;// int --部门ID
public decimal HQty; //数量
public Int64 HEquipDotCheckRuleInterID; //点检规程
+
+ public string HLastResult;// 最终结论(OK,NG)
+ public string HErrNote;// 异常情况记录
+ public string HBigSafeNote;// 重大安全隐患记录
+ public Int64 HShiftsID;// 生产班次(Gy_Shifts)
+ public string HDotCheckNote;// 点检数据
}
}
diff --git a/WebAPI/Models/ClsSb_EquipDotCheckBillSub.cs b/WebAPI/Models/ClsSb_EquipDotCheckBillSub.cs
index 59fba3c..9d0a780 100644
--- a/WebAPI/Models/ClsSb_EquipDotCheckBillSub.cs
+++ b/WebAPI/Models/ClsSb_EquipDotCheckBillSub.cs
@@ -27,5 +27,8 @@
public string HManagerNumber;
public string HManagerName;
public string HDotCheckResult;
+
+ public Int64 HDotCheckItemClassID;// 点检项目分类(gy_DotCheckItemClass)
+ public Int64 HDotCheckItemMethodID;// 点检方法(gy_DotCheckItemMethod)
}
}
diff --git a/WebAPI/Models/ClsSb_EquipDotCheckRuleBillSub.cs b/WebAPI/Models/ClsSb_EquipDotCheckRuleBillSub.cs
index 005d6f0..d940b04 100644
--- a/WebAPI/Models/ClsSb_EquipDotCheckRuleBillSub.cs
+++ b/WebAPI/Models/ClsSb_EquipDotCheckRuleBillSub.cs
@@ -12,5 +12,8 @@
public string HDotCheckPart;// varchar(100) --鐐规閮ㄤ綅
public string HClaim;// varchar(100) --鍏蜂綋瑕佹眰
public int HManagerID;// int --璐熻矗浜篿d(鑱屽憳琛�)
+
+ public Int64 HDotCheckItemClassID;//鐐规椤圭洰鍒嗙被id
+ public Int64 HDotCheckItemMethodID;//鐐规鏂规硶id
}
}
\ No newline at end of file
diff --git a/WebAPI/Service/LuBaoSevice.cs b/WebAPI/Service/LuBaoSevice.cs
index 4fcbda0..b566298 100644
--- a/WebAPI/Service/LuBaoSevice.cs
+++ b/WebAPI/Service/LuBaoSevice.cs
@@ -643,6 +643,45 @@
}
/// <summary>
+ /// 闃查敊瑁呯疆鏍规嵁id鑾峰彇淇℃伅
+ /// </summary>
+ public static ApiResult<DataSet> GetGy_PreventErrMouldDetail(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ var dataSet = GetGy_PreventErrMouldDb(HID);
+ 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 };
+ }
+ public static DataSet GetGy_PreventErrMouldDb(string HID)
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_PreventErrMould where HItemID= " + HID + " ", "h_v_Gy_PreventErrMould");
+ return dataSet;
+ }
+
+ /// <summary>
+ /// 淇濆吇绾у埆鏍规嵁id鑾峰彇淇℃伅
+ /// </summary>
+ public static ApiResult<DataSet> GetGy_MaintainLevDetail(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ var dataSet = GetGy_MaintainLevDb(HID);
+ 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 };
+ }
+ public static DataSet GetGy_MaintainLevDb(string HID)
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_MaintainLev where HItemID= " + HID + " ", "h_v_Gy_MaintainLev");
+ return dataSet;
+ }
+
+
+ /// <summary>
/// 椤圭洰绫诲埆鏍规嵁id鑾峰彇淇℃伅
/// </summary>
public static ApiResult<DataSet> GetGy_ProjectClassDetail(string HID)
diff --git a/WebAPI/Web.config b/WebAPI/Web.config
index 49df9b9..2807e64 100644
--- a/WebAPI/Web.config
+++ b/WebAPI/Web.config
@@ -35,7 +35,7 @@
<!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> --> <!--娴嬭瘯鏈嶅姟鍣�-->
<!--<add key="surl" value="http://localhost:8082/webs/webservice1.asmx"/> 鏈湴-->
<!--<add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/>--> <!--闄堥洴闈欐湰鍦伴厤缃�-->
- <add key="surl" value="http://localhost/webs-web/webservice1.asmx"/> <!--缈佹稕娑涙湰鍦伴厤缃�-->
+ <!--<add key="surl" value="http://localhost/webs-web/webservice1.asmx"/>--> <!--缈佹稕娑涙湰鍦伴厤缃�-->
<!--<add key="sUrl" value="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx"/>涔濊彵-->
<add key="webpages:Version" value="3.0.0.0" />
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 1492e0a..edf3d0b 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -421,6 +421,8 @@
<Compile Include="Controllers\PlateBindingController.cs" />
<Compile Include="Controllers\SBGL\Gy_FixCardChangeBillController.cs" />
<Compile Include="Controllers\SBGL\Gy_FixCardBillController.cs" />
+ <Compile Include="Controllers\SBGL\Sb_EquipBeginBillController.cs" />
+ <Compile Include="Controllers\SBGL\Sb_EquipStopBillController.cs" />
<Compile Include="Controllers\SBGL\Sb_EquipConkBookBillController.cs" />
<Compile Include="Controllers\SBGL\Sb_EquipSparepartsBillController.cs" />
<Compile Include="Controllers\SBGL\Sb_EquipSparepartsChangeBillController.cs" />
@@ -524,6 +526,8 @@
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_CardTypeController.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_COMMONCONTACTBillController.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_CustLocationController.cs" />
+ <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DotCheckItemMethodController.cs" />
+ <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DotCheckItemClassController.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DutyBillController.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_EquipStatusController.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_MatePriceSupController.cs" />
@@ -629,6 +633,7 @@
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_RepairCheckBillController.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\宸ヨ祫鍩虹璧勬枡\Gy_ProcPriceController.cs" />
<Compile Include="Controllers\搴旀敹绠$悊\YS_ReceiveReportController.cs" />
+ <Compile Include="Controllers\鏉$爜绠$悊\MouldController.cs" />
<Compile Include="Controllers\鏉$爜绠$悊\WEBSController.cs" />
<Compile Include="Controllers\鐢熶骇绠$悊\鎶ュ伐鍙板伐搴廫Sc_MaterToSourceStepBillController.cs" />
<Compile Include="Controllers\鐢熶骇绠$悊\鎶ュ伐鍙板伐搴廫Sc_MESBeginStepWorkBillController.cs" />
@@ -656,6 +661,8 @@
<Compile Include="DLL\ClsGy_AreaSet_Ctl.cs" />
<Compile Include="DLL\ClsGy_CusType_Ctl.cs" />
<Compile Include="DLL\ClsGy_ErrMsgBackType_Ctl.cs" />
+ <Compile Include="DLL\ClsGy_MaintainLev_Ctl.cs" />
+ <Compile Include="DLL\ClsGy_PreventErrMould_Ctl.cs" />
<Compile Include="DLL\ClsGy_TaskClass_Ctl.cs" />
<Compile Include="DLL\ClsGy_ProjectClass_Ctl.cs" />
<Compile Include="DLL\ClsGy_StockCheckItem_Ctl.cs" />
--
Gitblit v1.9.1