From 6cfa7809b785e2d58e240e66a9eee3c68404554d Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期一, 22 四月 2024 12:17:32 +0800 Subject: [PATCH] 1 --- Model/信息平台/ClsOA_AndengFlowRuleBillMain.cs | 16 DAL/仓库管理/ClsKf_MoveStockBill.cs | 6 DAL/仓库管理/ClsKf_SellOutBillForLayUI.cs | 8 Model/基础资料/基础资料/ClsGy_ProjectClass_Model.cs | 14 WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 184 +++ DAL/应付管理/ClsYF_PayMentBill.cs | 10 Model/Model.csproj | 4 WebAPI/DLL/ClsGy_TaskClass_Ctl.cs | 102 + WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs | 62 + WebAPI/Service/LuBaoSevice.cs | 40 Model/销售管理/ClsXs_SeOutStockBackBillMain.cs | 1 WebAPI/Controllers/BaseSet/Gy_SupplierController.cs | 19 WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs | 880 ++++++++++++++++ WebAPI/Controllers/基础资料/基础资料/Gy_DutyBillController.cs | 5 WebAPI/DLL/ClsGy_ProjectClass_Ctl.cs | 102 + DAL/销售管理/ClsXs_SeOutStockBackBillForLayUI.cs | 5 Model/销售管理/ClsXs_SeOutStockBillMain.cs | 1 WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs | 484 ++++++++ Model/销售管理/ClsXs_SeOrderBillSub.cs | 1 WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 8 WebAPI/Models/Supplier.cs | 1 DAL/销售管理/ClsXs_SeOrderBill.cs | 17 WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs | 58 + Model/仓库管理/ClsKf_SellOutBillMain.cs | 4 WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 8 WebAPI/Controllers/WebAPIController.cs | 602 ++++++++++ DAL/信息平台/ClsOA_AndengFlowRuleBill.cs | 312 +++++ Model/信息平台/ClsOA_AndengFlowRuleBillSub.cs | 14 Model/基础资料/基础资料/ClsGy_Supplier_Model.cs | 1 Model/基础资料/基础资料/ClsGy_TaskClass_Model.cs | 14 WebAPI/ListModels.cs | 48 Model/仓库管理/ClsKf_MoveStockBillMain.cs | 3 DAL/DAL.csproj | 1 DAL/基础资料/公用基础资料/ClsGy_Supplier_Ctl.cs | 7 WebAPI/Models/基础资料/Gy_Duty.cs | 1 Model/销售管理/ClsXs_SeOrderBillMain.cs | 6 WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs | 8 WebAPI/WebAPI.csproj | 2 WebAPI/Controllers/ReportPlatFormController.cs | 4 WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs | 196 +++ Model/应付管理/ClsYF_PayMentBillMain.cs | 3 41 files changed, 3,213 insertions(+), 49 deletions(-) diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj index ed1f279..b641838 100644 --- a/DAL/DAL.csproj +++ b/DAL/DAL.csproj @@ -98,6 +98,7 @@ <Compile Include="浠撳簱绠$悊\鏉$爜绠$悊\ClsKF_BarCodeStatusChangeBill.cs" /> <Compile Include="淇℃伅骞冲彴\ClsOA_ErrMsgBackCheckBill.cs" /> <Compile Include="淇℃伅骞冲彴\ClsOA_ErrMsgBackHandleBill.cs" /> + <Compile Include="淇℃伅骞冲彴\ClsOA_AndengFlowRuleBill.cs" /> <Compile Include="淇℃伅骞冲彴\ClsOA_ErrMsgBackSignBill.cs" /> <Compile Include="淇℃伅骞冲彴\ClsOA_ErrMsgBackReceiveBill.cs" /> <Compile Include="鍩虹璧勬枡\InterFace鍩虹璧勬枡\ClsIF_ORGANIZATIONS_View.cs" /> diff --git "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBill.cs" "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBill.cs" index 99e8b1a..7f03b2f 100644 --- "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBill.cs" +++ "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBill.cs" @@ -81,6 +81,8 @@ ",HLinkPhone='" + omodel.HLinkPhone + "'" + ",HExplanation='" + omodel.HExplanation + "'" + ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + + ",HInvoiceBillNo='" + omodel.HInvoiceBillNo + "'" + + ",HProjectID='" + omodel.HProjectID + "'" + ",HRedBlueFlag=" + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + " where HInterID=" + lngBillKey.ToString()); //鍒犻櫎鍏宠仈 @@ -192,14 +194,14 @@ ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + ",HAddress,HLinkMan,HLinkPhone" + - ",HConveyCompID,HConveyTypeID,HConveyMoney" + + ",HConveyCompID,HConveyTypeID,HConveyMoney,HInvoiceBillNo,HProjectID" + ") " + " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + ", " + 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) + ",'" + omodel.HAddress + "','" + omodel.HLinkMan + "','" + omodel.HLinkPhone + "'" + - "," + omodel.HConveyCompID.ToString() + "," + omodel.HConveyTypeID.ToString() + "," + omodel.HConveyMoney.ToString() + + "," + omodel.HConveyCompID.ToString() + "," + omodel.HConveyTypeID.ToString() + "," + omodel.HConveyMoney.ToString() + ",'" + omodel.HInvoiceBillNo + "'," + omodel.HProjectID.ToString() + ") "); //鎻掑叆瀛愯〃 foreach (Model.ClsKf_MoveStockBillSub oSub in DetailColl) 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 1c94b1c..942808f 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" @@ -187,6 +187,9 @@ ",HInnerBillNo = '" + omodel.HInnerBillNo + "'" + ",HCarriage = " + omodel.HCarriage + "" + ",HCheckStatusMan = '" + omodel.HCheckStatusMan + "'" + + ",HProjectID = '" + omodel.HProjectID.ToString() + "'" + + ",HGroupID = '" + omodel.HGroupID.ToString() + "'" + + ",HPriceType = '" + omodel.HPriceType + "'" + " where HInterID = " + lngBillKey; //鏇存柊涓昏〃 oCn.RunProc(mainSql); @@ -364,7 +367,7 @@ ",HDeptID,HManagerID,HEmpID,HSupID,HSecManagerID,HKeeperID,HWHID,HSCWHID,HCurID,HExRate,HSellSID,HLinkMan,HLinkPhone" + ",HSeOrderBillNo" + ",HConveyCompID,HConveyTypeID,HConveyMoney" + - ",HExplanation,HInnerBillNo,HRedBlueFlag,HCarriage,HCheckStatusMan" + + ",HExplanation,HInnerBillNo,HRedBlueFlag,HCarriage,HCheckStatusMan,HProjectID,HGroupID,HPriceType" + ") " + "values(" + "" + omodel.HInterID.ToString() + "" + @@ -414,6 +417,9 @@ "," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + "" + "," + omodel.HCarriage + "" + ",'" + omodel.HCheckStatusMan + "'" + + ",'" + omodel.HProjectID.ToString() + "'" + + ",'" + omodel.HGroupID.ToString() + "'" + + ",'" + omodel.HPriceType + "'" + ") "; oCn.RunProc(mainSql); diff --git "a/DAL/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_AndengFlowRuleBill.cs" "b/DAL/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_AndengFlowRuleBill.cs" new file mode 100644 index 0000000..184973a --- /dev/null +++ "b/DAL/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_AndengFlowRuleBill.cs" @@ -0,0 +1,312 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using System.Data; + +namespace DAL +{ + public class ClsOA_AndengFlowRuleBill:DBUtility.ClsXt_BaseBill + { + public Model.ClsOA_AndengFlowRuleBillMain omodel = new Model.ClsOA_AndengFlowRuleBillMain(); + public List<Model.ClsOA_AndengFlowRuleBillSub> DetailColl = new List<Model.ClsOA_AndengFlowRuleBillSub>(); + + + public ClsOA_AndengFlowRuleBill() + { + base.MvarItemKeySub = "OA_AndengFlowRuleBillSub"; + base.MvarItemKeySub2 = ""; + base.MvarItemKeySub3 = ""; + base.MvarItemKeySub4 = ""; + base.MvarItemKey= "OA_AndengFlowRuleBillMain"; + base.MvarReportTitle = "瀹夌伅閫愮骇鍛煎惛瑙勫垯"; + base.BillType = "4530"; + base.HBillSubType = "4530"; + + } + + #region 鍥哄畾浠g爜 + + ~ClsOA_AndengFlowRuleBill() + { + DetailColl = null; + } + + #endregion 鑷畾涔夋柟娉� + //淇敼鍗曟嵁 + public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) + { + try + { + //淇濆瓨鍓嶆帶鍒�========================================= + string HBillNote = ""; + DataSet ds = oCn.RunProcReturn("Exec h_p_OA_AndengFlowRuleBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_OA_AndengFlowRuleBill_BeforeSaveCtrl"); + if (ds == null) + { + sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒"; + return false; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + return false; + } + //========================================================= + + + oCn.BeginTran(); + //鏇存柊涓昏〃 + oCn.RunProc("UpDate OA_AndengFlowRuleBillMain set " + + " HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��=============== + ",HDate='" + omodel.HDate + "'" + + ",HYear='" + omodel.HYear.ToString() + "'" + + ",HPeriod='" + omodel.HPeriod.ToString() + "'" + + ",HRemark='" + omodel.HRemark + "'" + + ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + + ",HUpDateDate=getdate()" + + //======================================== + ",HDeptID='" + omodel.HDeptID.ToString() + "'" + + ",HReceiveDeptID='" + omodel.HReceiveDeptID.ToString() + "'" + + ",HErrMsgBackTypeID='" + omodel.HErrMsgBackTypeID.ToString() + + "',HOrgID='" + omodel.HOrgID.ToString() + + "' where HInterID=" + lngBillKey.ToString()); + //鍒犻櫎鍏宠仈 + DeleteRelation(ref sReturn, lngBillKey); + //鍒犻櫎瀛愯〃 + DeleteBillSub(lngBillKey); + //鎻掑叆瀛愯〃 + omodel.HInterID = lngBillKey; + foreach (Model.ClsOA_AndengFlowRuleBillSub oSub in DetailColl) + { + oCn.RunProc("Insert into OA_AndengFlowRuleBillSub " + + " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + + ",HSNO,HDutyID,HTimes,HReceiveType" + + + ") 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.HSNO.ToString() + "','" + oSub.HDutyID.ToString() + "','" + oSub.HTimes.ToString() + "','" + oSub.HReceiveType.ToString() + + "') "); + } + + //=========================淇濆瓨鍚庢帶鍒� + DataSet ds2 = oCn.RunProcReturn("Exec h_p_OA_AndengFlowRuleBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_OA_AndengFlowRuleBill_AfterSaveCtrl"); + if (ds2 == null) + { + sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒"; + oCn.RollBack(); + return false; + } + if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); + oCn.RollBack(); + return false; + } + //============================ + + sReturn = "淇敼鍗曟嵁鎴愬姛锛�"; + oCn.Commit(); + return true; + } + catch (Exception e) + { + sReturn = e.Message; + oCn.RollBack(); + throw (e); + } + } + //鏂板鍗曟嵁 + public override bool AddBill(ref string sReturn) + { + try + { + + //淇濆瓨鍓嶆帶鍒�========================================= + string HBillNote = ""; + DataSet ds = oCn.RunProcReturn("Exec h_p_OA_AndengFlowRuleBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_OA_AndengFlowRuleBill_BeforeSaveCtrl"); + if (ds == null) + { + sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒"; + return false; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + return false; + } + //========================================================= + + oCn.BeginTran(); + + string sql = ""; + + sql = "Insert Into OA_AndengFlowRuleBillMain" + + "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HYear,HPeriod,HRemark,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType," + + "HDeptID,HReceiveDeptID,HErrMsgBackTypeID,HOrgID) " + + " values(" + + "'" + this.BillType + + "','" + this.HBillSubType + + "'," + omodel.HInterID.ToString() + + ",'" + omodel.HBillNo + + "','" + omodel.HDate + + "'," + omodel.HYear + + "," + omodel.HPeriod + + ",'" + omodel.HRemark + + "','" + omodel.HMaker + + "',getdate()" + + ",'" + omodel.HMainSourceInterID + + "','" + omodel.HMainSourceEntryID + + "','" + omodel.HMainSourceBillNo + + "','" + omodel.HMainSourceBillType + + + "','" + omodel.HDeptID.ToString() + + "','" + omodel.HReceiveDeptID.ToString() + + "','" + omodel.HErrMsgBackTypeID.ToString() + + "','" + omodel.HOrgID.ToString() + + "') "; + //涓昏〃 + oCn.RunProc(sql); + + //鎻掑叆瀛愯〃 + foreach (Model.ClsOA_AndengFlowRuleBillSub oSub in DetailColl) + { + oCn.RunProc("Insert into OA_AndengFlowRuleBillSub " + + " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + + ",HSNO,HDutyID,HTimes,HReceiveType" + + + ") 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.HSNO.ToString() + "','" + oSub.HDutyID.ToString() + "','" + oSub.HTimes.ToString() + "','" + oSub.HReceiveType.ToString() + + "') "); + } + + //=========================淇濆瓨鍚庢帶鍒� + DataSet ds2 = oCn.RunProcReturn("Exec h_p_OA_AndengFlowRuleBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_OA_AndengFlowRuleBill_AfterSaveCtrl"); + if (ds2 == null) + { + sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒"; + oCn.RollBack(); + return false; + } + if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); + oCn.RollBack(); + return false; + } + //============================ + + sReturn = "鏂板鍗曟嵁鎴愬姛锛�"; + oCn.Commit(); + return true; + } + catch (Exception e) + { + sReturn = e.Message; + oCn.RollBack(); + throw (e); + } + } + //鏄剧ず鍗曟嵁 + public override bool ShowBill(Int64 lngBillKey, ref string sReturn) + { + try + { + //鏌ヨ涓昏〃 + DataSet Ds ; + Ds = oCn.RunProcReturn("Select * from OA_AndengFlowRuleBillMain Where HInterID=" + lngBillKey.ToString(), "OA_AndengFlowRuleBillMain"); + if(Ds.Tables[0].Rows.Count==0) + { + sReturn = "鍗曟嵁鏈壘鍒帮紒"; + return false; + } + //鍥哄畾璧嬪��=========================================== + omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]); + omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]); + omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]); + omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]); + omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]); + omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]); + omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim(); + omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]); + omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]); + omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]); + omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]); + omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim(); + omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim(); + omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim(); + omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim(); + omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim(); + omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim(); + omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim(); + omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim(); + omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim(); + omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim(); + omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim(); + omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]); + omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim(); + omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim(); + //======================================================== + //omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]); + //omodel.HContext = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HContext"]); + //omodel.HDescription = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HDescription"]); + //omodel.HSendMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSendMan"]); + //omodel.HReceiveMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HReceiveMan"]); + //omodel.HCopyMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCopyMan"]); + //omodel.HLevel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HLevel"]); + //omodel.HReTransmitMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HReTransmitMan"]); + //omodel.HBillTypeName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillTypeName"]); + //omodel.HPlanBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HPlanBillNo"]); + //omodel.HMaterName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaterName"]); + //omodel.HMaterModel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaterModel"]); + //omodel.HSendType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSendType"]); + //omodel.HHasten = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HHasten"]); + //omodel.HQty = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HQty"]); + // + + //寰幆 + DataSet DsSub ; + DsSub = oCn.RunProcReturn("Select * from OA_AndengFlowRuleBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "OA_AndengFlowRuleBillSub"); + DetailColl.Clear();//娓呯┖ + for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) + { + Model.ClsOA_AndengFlowRuleBillSub oSub = new Model.ClsOA_AndengFlowRuleBillSub(); + // 鍥哄畾璧嬪��=============================================== + oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]); + oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]); + oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]); + oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]); + oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim(); + oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim(); + oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]); + oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]); + oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]); + oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]); + oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]); + oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim(); + //=================================================== + //oSub.HDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HDate"]); + //oSub.HSendStatus = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSendStatus"]); + //oSub.HSendMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSendMan"]); + //oSub.HDescription = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HDescription"]); + + DetailColl.Add(oSub); + } + + sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�"; + return true; + } + catch (Exception e) + { + sReturn = e.Message; + throw (e); + } + } + + + } + +} 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_Supplier_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_Supplier_Ctl.cs" index c8d83c2..566752e 100644 --- "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_Supplier_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_Supplier_Ctl.cs" @@ -24,13 +24,13 @@ ",HShortName,HAddress,HLinkMan,HLinkPhone,HMobilePhone" + ",HFax,HPostalCode,HEmail,HBank,HBankAccount" + ",HTaxNum,HTaxRate,HCountry,HCorMan,HEnglishName" + - ",HEnglishAddress,HCurID,HSSID,HAreaID) " + + ",HEnglishAddress,HCurID,HSSID,HAreaID,HMaterClass) " + " 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.HShortName + "','" + oModel.HAddress + "','" + oModel.HLinkMan + "','" + oModel.HLinkPhone + "','" + oModel.HMobilePhone + "'" + ",'" + oModel.HFax + "','" + oModel.HPostalCode + "','" + oModel.HEmail + "','" + oModel.HBank + "','" + oModel.HBankAccount + "'" + ",'" + oModel.HTaxNum + "'," + oModel.HTaxRate.ToString() + ",'" + oModel.HCountry + "','" + oModel.HCorMan + "','" + oModel.HEnglishName + "'" + - ",'" + oModel.HEnglishAddress + "'," + oModel.HCurID.ToString() + "," + oModel.HSSID.ToString() + "," + oModel.HAreaID.ToString() + ")", ref DBUtility.ClsPub.sExeReturnInfo); + ",'" + oModel.HEnglishAddress + "'," + oModel.HCurID.ToString() + "," + oModel.HSSID.ToString() + "," + oModel.HAreaID.ToString() + ",'" + oModel.HMaterClass+ "')", ref DBUtility.ClsPub.sExeReturnInfo); //淇敼涓婄骇涓洪潪鏈骇浠g爜 oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); oCn.Commit(); @@ -77,7 +77,8 @@ ",HEnglishAddress='" + oModel.HEnglishAddress + "'" + ",HCurID=" + oModel.HCurID.ToString() + ",HSSID=" + oModel.HSSID.ToString() + - ",HAreaID=" + oModel.HAreaID.ToString() + "Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo); + ",HMaterClass='"+oModel.HMaterClass+ + "',HAreaID=" + oModel.HAreaID.ToString() + "Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo); //淇敼瀛愰」鐩唬鐮� oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); //灏嗕笂绾� 涓洪潪鏈骇 diff --git "a/DAL/\345\272\224\344\273\230\347\256\241\347\220\206/ClsYF_PayMentBill.cs" "b/DAL/\345\272\224\344\273\230\347\256\241\347\220\206/ClsYF_PayMentBill.cs" index 4712b94..da7ebac 100644 --- "a/DAL/\345\272\224\344\273\230\347\256\241\347\220\206/ClsYF_PayMentBill.cs" +++ "b/DAL/\345\272\224\344\273\230\347\256\241\347\220\206/ClsYF_PayMentBill.cs" @@ -68,7 +68,9 @@ ",HCheckMoneyFor=" + omodel.HCheckMoneyFor.ToString() + ",HRemainMoney=" + omodel.HRemainMoney.ToString() + ",HCheckStatus=" + omodel.HCheckStatus.ToString() + - + ",HInvoiceBillNo='" + omodel.HInvoiceBillNo + "'" + + ",HBigMoney='" + omodel.HBigMoney + "'" + + ",HReason='" + omodel.HReason + "'" + ",HSSNum='" + omodel.HSSNum + "'" + ",HRelSumMoney=" + omodel.HRelSumMoney.ToString() + @@ -142,15 +144,15 @@ ",HAccDate,HSupID,HAccSupID,HSSID,HCurID,HExRate" + ",HDeptID,HEmpID,HOrgID,HSumMoney,HBankID,HBankNo,HExplanation" + ",HSSNum,HDiscountRate,HRelSumMoney,HSumMoneyBB,HRelSumMoneyBB" + - ",HInnerBillNo,HCheckMoney,HCheckMoneyFor,HRemainMoney,HCheckStatus" + + ",HInnerBillNo,HCheckMoney,HCheckMoneyFor,HRemainMoney,HCheckStatus,HInvoiceBillNo,HBigMoney,HReason" + ") " + " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + ",'" + omodel.HAccDate + "'," + omodel.HSupID.ToString() + "," + omodel.HAccSupID.ToString() + "," + omodel.HSSID.ToString() + "," + omodel.HCurID.ToString() + "," + omodel.HExRate.ToString() + ", " + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HOrgID + "," + omodel.HSumMoney.ToString() + "," + omodel.HBankID.ToString() + ",'" + omodel.HBankNo + "','" + omodel.HExplanation +"'"+ ",'" + omodel.HSSNum + "'," + omodel.HDiscountRate.ToString() + "," + omodel.HRelSumMoney.ToString() + "," + omodel.HSumMoneyBB.ToString() + "," + omodel.HRelSumMoneyBB.ToString() + - ",'" + omodel.HInnerBillNo + "'," + omodel.HCheckMoney.ToString() + "," + omodel.HCheckMoneyFor.ToString() + "," + omodel.HRemainMoney.ToString() + "," + omodel.HCheckStatus.ToString() + - ") "); + ",'" + omodel.HInnerBillNo + "'," + omodel.HCheckMoney.ToString() + "," + omodel.HCheckMoneyFor.ToString() + "," + omodel.HRemainMoney.ToString() + "," + omodel.HCheckStatus.ToString() + ",'" + omodel.HInvoiceBillNo + "','" + omodel.HBigMoney + "','" + omodel.HReason + + "') "); //鎻掑叆瀛愯〃 foreach (Model.ClsYF_PayMentBillSub oSub in DetailColl) { diff --git "a/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBill.cs" "b/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBill.cs" index 58b5d82..185066c 100644 --- "a/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBill.cs" +++ "b/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBill.cs" @@ -103,6 +103,8 @@ ",HPayCusID=" + omodel.HPayCusID + ",HExplanation='" + omodel.HExplanation + "'" + ",HLinkMan='" + omodel.HLinkMan + "'" + + ",HWHID='" + omodel.HWHID + "'" + + ",HProjectID='" + omodel.HProjectID + "'" + ",HLinkPhone='" + omodel.HLinkPhone + "'" + " where HInterID=" + lngBillKey.ToString(); @@ -132,7 +134,7 @@ string subSql = "Insert into Xs_SeOrderBillSub" + "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationQty_SellOutCheck,HRelationMoney_SellOutCheck,HRelationQty_ICMO,HRelationQty_SellBack,HRelationQty_SellBackCheck,HRelationMoney,HMaterID,HUnitID,HQty,HPrice,HTaxPrice,HMoney" + ",HDiscountRate,HRelTaxPrice,HTaxRate,HTaxMoney,HlineTotal,HlineTotalBB,HDate,HOutStockQty,HInvoiceQty,HRemark,HOrderLevID" + - ",HCusMaterNumber,HCusModel,HCusMaterName,HisStockGoods) " + + ",HCusMaterNumber,HCusModel,HCusMaterName,HisStockGoods,HWHID) " + "values(" + "" + omodel.HInterID + "," + oSub.HEntryID + @@ -168,7 +170,8 @@ "','" + oSub.HCusModel + "','" + oSub.HCusMaterName + "'," + (oSub.HisStockGoods?1:0) + - ")"; + ",'" + oSub.HWhID + + "')"; oCn.RunProc(subSql); } @@ -278,7 +281,7 @@ string mainSql = "Insert Into Xs_SeOrderBillMain" + "(HYear,HPeriod,HBillType,HBillSubType,HBillStatus,HExplanation" + ",HInterID,HBillNo,HDate,HInnerBillNo,HAddress,HDeptID,HCusID,HEmpID,HCurID,HExRate,HEarnestRate,HManagerID,HSellSID,HSSID,HSSDate,HPayCusID,HRemark,HOrgID,HMaker,HMakeDate,HLinkMan,HLinkPhone" + - ",HERPInterID,HERPBillType,HSALEORGID,HSALEGROUPID,HRECEIVEID,HSETTLEID,HCHARGEID,HHEADLOCID,HRECCONTACTID,HCORRESPONDORGID,HBUSINESSTYPE) " + + ",HERPInterID,HERPBillType,HSALEORGID,HSALEGROUPID,HRECEIVEID,HSETTLEID,HCHARGEID,HHEADLOCID,HRECCONTACTID,HCORRESPONDORGID,HBUSINESSTYPE,HProjectID,HWHID) " + "values(" + "" + omodel.HYear + "," + omodel.HPeriod + @@ -322,6 +325,9 @@ "," + omodel.HRECCONTACTID + "," + omodel.HCORRESPONDORGID + ",'" + omodel.HBUSINESSTYPE + + + "','" + omodel.HProjectID + + "','" + omodel.HWHID + "')"; oCn.RunProc(mainSql); @@ -344,7 +350,7 @@ string subSql = "Insert into Xs_SeOrderBillSub" + "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationQty_SellOutCheck,HRelationMoney_SellOutCheck,HRelationQty_ICMO,HRelationQty_SellBack,HRelationQty_SellBackCheck,HRelationMoney,HMaterID,HUnitID,HQty,HPrice,HTaxPrice,HMoney" + ",HDiscountRate,HRelTaxPrice,HTaxRate,HTaxMoney,HlineTotal,HlineTotalBB,HDate,HOutStockQty,HInvoiceQty,HRemark,HOrderLevID" + - ",HCusMaterNumber,HCusModel,HCusMaterName,HisStockGoods) " + + ",HCusMaterNumber,HCusModel,HCusMaterName,HisStockGoods,HWHID) " + "values(" + "" + omodel.HInterID + "," + oSub.HEntryID + @@ -380,7 +386,8 @@ "','" + oSub.HCusModel + "','" + oSub.HCusMaterName + "'," + (oSub.HisStockGoods?1:0) + - ")"; + ",'" + oSub.HWhID + + "')"; oCn.RunProc(subSql); } diff --git "a/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBackBillForLayUI.cs" "b/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBackBillForLayUI.cs" index 938e7cd..69e5a8a 100644 --- "a/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBackBillForLayUI.cs" +++ "b/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBackBillForLayUI.cs" @@ -89,6 +89,7 @@ ",HAddress='" + omodel.HAddress + "'" + ",HExplanation='" + omodel.HExplanation + "'" + ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + + ",HProjectID='" + omodel.HProjectID + "'" + " where HInterID=" + lngBillKey.ToString()); //鍒犻櫎鍏宠仈 //DeleteRelation(ref sReturn, lngBillKey); @@ -164,12 +165,12 @@ "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + ",HAddress,HSSID,HCusID,HWHID,HCurID,HExRate" + - ",HEmpID,HManagerID,HDeptID,HExplanation,HInnerBillNo" + + ",HEmpID,HManagerID,HDeptID,HExplanation,HInnerBillNo,HProjectID" + ") " + " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" + ",'" + omodel.HAddress + "'," + omodel.HSSID.ToString() + "," + omodel.HCusID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HCurID.ToString() + "," + omodel.HExRate.ToString() + - ", " + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'"+ + ", " + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "','"+omodel.HProjectID.ToString()+"'"+ ") "); //鎻掑叆瀛愯〃 foreach (Model.ClsXs_SeOutStockBackBillSub oSub in DetailColl) diff --git a/Model/Model.csproj b/Model/Model.csproj index 0617fae..feb8ba4 100644 --- a/Model/Model.csproj +++ b/Model/Model.csproj @@ -291,10 +291,12 @@ <Compile Include="淇℃伅骞冲彴\ClsOA_ErrMsgBackCheckBillMain.cs" /> <Compile Include="淇℃伅骞冲彴\ClsOA_ErrMsgBackHandleBillMain.cs" /> <Compile Include="淇℃伅骞冲彴\ClsOA_ErrMsgBackCheckBillSub.cs" /> + <Compile Include="淇℃伅骞冲彴\ClsOA_AndengFlowRuleBillMain.cs" /> <Compile Include="淇℃伅骞冲彴\ClsOA_ErrMsgBackSignBill.cs" /> <Compile Include="淇℃伅骞冲彴\ClsOA_ErrMsgBackReceiveBillMain.cs" /> <Compile Include="淇℃伅骞冲彴\ClsOA_ErrMsgBackBillMain.cs" /> <Compile Include="淇℃伅骞冲彴\ClsOA_ErrMsgBackHandleBillSub.cs" /> + <Compile Include="淇℃伅骞冲彴\ClsOA_AndengFlowRuleBillSub.cs" /> <Compile Include="淇℃伅骞冲彴\ClsOA_ErrMsgBackSignBillSub.cs" /> <Compile Include="淇℃伅骞冲彴\ClsOA_ErrMsgBackReceiveBillSub.cs" /> <Compile Include="淇℃伅骞冲彴\ClsOA_ErrMsgBackBillSub.cs" /> @@ -360,6 +362,8 @@ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_CardAddress_Model.cs" /> <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_CardType_Model.cs" /> <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_ErrMsgBackType_Model.cs" /> + <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_TaskClass_Model.cs" /> + <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_ProjectClass_Model.cs" /> <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_StockCheckItem_Model.cs" /> <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_InspectInstruMent_Model.cs" /> <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_InspectBasis_Model.cs" /> diff --git "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBillMain.cs" "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBillMain.cs" index 91159fd..0f35268 100644 --- "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBillMain.cs" +++ "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBillMain.cs" @@ -30,5 +30,8 @@ public Int64 HGroupID; public int HStockInOrgID; // int //调入组织ID public int HStockOutOrgID; // int //调出组织ID + + public string HInvoiceBillNo; // 发票编号 + public Int64 HProjectID; //-项目 } } diff --git "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillMain.cs" "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillMain.cs" index b6a1213..aa1a698 100644 --- "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillMain.cs" +++ "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_SellOutBillMain.cs" @@ -32,6 +32,10 @@ public string HCheckStatusMan; //核销人 public double HExRate; //汇率 + public Int64 HProjectID; //工程项目 + public Int64 HGroupID; //班组 + public string HPriceType; //varchar(20) --单价类型(成本价,结算价) + public Int64 HOrgID; //组织 } } diff --git "a/Model/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_AndengFlowRuleBillMain.cs" "b/Model/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_AndengFlowRuleBillMain.cs" new file mode 100644 index 0000000..25bf58e --- /dev/null +++ "b/Model/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_AndengFlowRuleBillMain.cs" @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Model +{ + public class ClsOA_AndengFlowRuleBillMain : DBUtility.ClsXt_BaseBillMain + { + public int HDeptID ; // 发送部门(Gy_Department) + public int HReceiveDeptID; // 接收部门(Gy_Department) + public int HErrMsgBackTypeID; // 异常类型(Gy_ErrMsgBackType) + public int HOrgID; + + + } +} diff --git "a/Model/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_AndengFlowRuleBillSub.cs" "b/Model/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_AndengFlowRuleBillSub.cs" new file mode 100644 index 0000000..f5c8498 --- /dev/null +++ "b/Model/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_AndengFlowRuleBillSub.cs" @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Model +{ + public class ClsOA_AndengFlowRuleBillSub : DBUtility.ClsXt_BaseBillSub + { + public int HSNO; //-流程次序 + public int HDutyID; //职务(Gy_Duty) + public int HTimes; //触发时间点(分钟) + public string HReceiveType; //接收模式(短信,消息,同时接收) + } +} 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_ProjectClass_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_ProjectClass_Model.cs" new file mode 100644 index 0000000..7f154f9 --- /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_ProjectClass_Model.cs" @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Model +{ + public class ClsGy_ProjectClass_Model : DBUtility.ClsGy_Base_Model + { + public DateTime HMakeTime; + public int HUSEORGID; + public string HMakeEmp; + public DateTime HModifyTime; + } +} 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_Supplier_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_Supplier_Model.cs" index 5b39938..646ed6b 100644 --- "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_Supplier_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_Supplier_Model.cs" @@ -27,5 +27,6 @@ public Int64 HSSID;// int '结算方式(Gy_SettleStyle) public Int64 HAreaID;// int '地区(Gy_AreaSet) public string HBarCode; + public string HMaterClass; //varchar(20) 供货材料类别 } } 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_TaskClass_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_TaskClass_Model.cs" new file mode 100644 index 0000000..3d53c58 --- /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_TaskClass_Model.cs" @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Model +{ + public class ClsGy_TaskClass_Model : DBUtility.ClsGy_Base_Model + { + public DateTime HMakeTime; + public int HUSEORGID; + public string HMakeEmp; + public DateTime HModifyTime; + } +} diff --git "a/Model/\345\272\224\344\273\230\347\256\241\347\220\206/ClsYF_PayMentBillMain.cs" "b/Model/\345\272\224\344\273\230\347\256\241\347\220\206/ClsYF_PayMentBillMain.cs" index 6e3bb45..a55a41b 100644 --- "a/Model/\345\272\224\344\273\230\347\256\241\347\220\206/ClsYF_PayMentBillMain.cs" +++ "b/Model/\345\272\224\344\273\230\347\256\241\347\220\206/ClsYF_PayMentBillMain.cs" @@ -30,5 +30,8 @@ public Single HRelSumMoney;// dec(18,8) //折扣后金额(可编辑) --addnew public Single HSumMoneyBB;// dec(18,8) //表头金额本位币(可编辑) --addnew public Single HRelSumMoneyBB;// dec(18,8) //折扣后金额本位币(可编辑) -- + public string HInvoiceBillNo;// varchar(100) --发票编号 + public string HBigMoney;// varchar(100) --大写金额 + public string HReason;// varchar(400) --付款事由 } } diff --git "a/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBillMain.cs" "b/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBillMain.cs" index 441374c..660bd3d 100644 --- "a/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBillMain.cs" +++ "b/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBillMain.cs" @@ -61,7 +61,9 @@ public Int64 HCORRESPONDORGID; public string HBUSINESSTYPE; - - + public int HProjectID; //int --工程项目 + public int HWHID; //int --仓库 + + } } diff --git "a/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBillSub.cs" "b/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBillSub.cs" index a475050..85ecdbc 100644 --- "a/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBillSub.cs" +++ "b/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBillSub.cs" @@ -27,6 +27,7 @@ public string HCusModel; //客户规格型号 public string HCusMaterName; //客户物料名称 + public Int64 HInterID; public Int64 HEntryID; diff --git "a/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBackBillMain.cs" "b/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBackBillMain.cs" index 4a49240..0ab09eb 100644 --- "a/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBackBillMain.cs" +++ "b/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBackBillMain.cs" @@ -17,5 +17,6 @@ public Int64 HWHID;// public string HExplanation;// varchar(200) --摘要 public string HInnerBillNo;// varchar(50) --内部单据号 + public Int64 HProjectID; //工程项目 } } diff --git "a/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBillMain.cs" "b/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBillMain.cs" index e9e7461..2a5870e 100644 --- "a/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBillMain.cs" +++ "b/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBillMain.cs" @@ -15,6 +15,7 @@ public Int64 HCurID;// int --币别 (Gy_Currency) public Single HExRate;// money --汇率 (选择完币别带出) public Int64 HWHID;// 仓库 + public Int64 HProjectID; // g工程项目 public string HExplanation;// varchar(200) --摘要 public string HInnerBillNo;// varchar(50) --内部单据号 public Int64 HConveyTypeID;// 运输方式 diff --git a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs index 5ab6de0..9556978 100644 --- a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs @@ -5599,5 +5599,489 @@ } #endregion + #region 椤圭洰绫诲埆 鏌ヨ,瀹℃牳锛屽弽瀹℃牳锛岀鐢紝鍙嶇鐢� + /// <summary> + /// 椤圭洰绫诲埆 鏌ヨ + /// </summary> + /// <param name="sWhere"></param> + /// <param name="user"></param> + /// <returns></returns> + [Route("Gy_BadReason/Gy_ProjectClassList")] + [HttpGet] + public object Gy_ProjectClassList(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Gy_ProjectClass_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + string sql1 = "select * from h_v_Gy_ProjectClass where 1 = 1"; + string sql = sql1 + sWhere + " order by 椤圭洰绫诲埆浠g爜 "; + ds = oCN.RunProcReturn(sql, "h_v_Gy_ProjectClass"); + + //娣诲姞鍒楀悕 + 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_ProjectClass")] + [HttpGet] + public object AuditGy_ProjectClass(int HInterID, int IsAudit, string CurUserName) + { + try + { + //瀹℃牳鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Gy_ProjectClass_Check", 1, false, CurUserName)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + var ds = oCN.RunProcReturn("select * from Gy_ProjectClass where HItemID=" + HInterID, "Gy_ProjectClass"); + 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_ProjectClass 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_ProjectClass 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_ProjectClass")] + [HttpGet] + public object StopGy_ProjectClass(int HInterID, int IsStop, string CurUserName) + { + try + { + //瀹℃牳鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Gy_ProjectClass_Close", 1, false, CurUserName)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "绂佺敤澶辫触锛佹棤鏉冮檺锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + var ds = oCN.RunProcReturn("select * from Gy_ProjectClass 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_ProjectClass 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_ProjectClass 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_TaskClassList")] + [HttpGet] + public object Gy_TaskClassList(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Gy_TaskClass_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + string sql1 = "select * from h_v_Gy_TaskClass where 1 = 1"; + string sql = sql1 + sWhere + " order by 浠诲姟绫诲埆浠g爜 "; + ds = oCN.RunProcReturn(sql, "h_v_Gy_TaskClass"); + + //娣诲姞鍒楀悕 + 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_TaskClass")] + [HttpGet] + public object AuditGy_TaskClass(int HInterID, int IsAudit, string CurUserName) + { + try + { + //瀹℃牳鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Gy_TaskClass_Check", 1, false, CurUserName)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + var ds = oCN.RunProcReturn("select * from Gy_TaskClass where HItemID=" + HInterID, "Gy_TaskClass"); + 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_TaskClass 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_TaskClass 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_TaskClass")] + [HttpGet] + public object StopGy_TaskClass(int HInterID, int IsStop, string CurUserName) + { + try + { + //瀹℃牳鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Gy_TaskClass_Close", 1, false, CurUserName)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "绂佺敤澶辫触锛佹棤鏉冮檺锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + var ds = oCN.RunProcReturn("select * from Gy_TaskClass 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_TaskClass 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_TaskClass 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/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs index aa06451..0e08d65 100644 --- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs @@ -7,6 +7,8 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; +using System.IO; +using System.Web; using System.Web.Http; using System.Windows.Forms; using WebAPI.Models; @@ -23,7 +25,7 @@ private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; - + string fileip = System.Configuration.ConfigurationManager.AppSettings["FileIP"]; ////妫�娴� 褰撳墠閫変腑琛岀殑 椤圭洰鐘舵�� @@ -1942,5 +1944,185 @@ public string msg { get; set; } //鏈骇鏍囧織 } + #region 鐗╂枡鏂囦欢涓婁紶澶勭悊 + [Route("Gy_Mater/UploadFile")] + [HttpPost] + public object UploadFile() + { + + string HNumber = HttpContext.Current.Request.Params["HNumber"]; //鐗╂枡浠g爜 + string HRemark = HttpContext.Current.Request.Params["HRemark"]; //澶囨敞 + string HUserName = HttpContext.Current.Request.Params["HUserName"]; //鍒涘缓浜� + HttpPostedFile files = HttpContext.Current.Request.Files["file"]; + string path = HttpContext.Current.Server.MapPath("~/../Files/Material/" + HNumber); + //string path = @"D:\\Files\Material\\"+ HBillNo; + dynamic dyResult = UpLoadFile(files, path, HNumber, HRemark, HUserName); + if (dyResult != null && dyResult.result == 1) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "涓婁紶鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = dyResult.returnval; + objJsonResult.data = null; + return objJsonResult; + } + + } + + public dynamic UpLoadFile(HttpPostedFile files, string path, string HNumber, string HRemark, string HUserName) + { + dynamic Result_Ob = new { result = 1, returnval = "涓婁紶鎴愬姛锛�" }; + string filePath = Path.GetFullPath(files.FileName);//鏂囦欢涓婁紶璺緞 + string fileExtension = Path.GetExtension(files.FileName);// 鏂囦欢鎵╁睍鍚� + string filename = files.FileName;//鏂囦欢鍚� + string fileSavePath = path;// 涓婁紶淇濆瓨璺緞 + int filesize = files.ContentLength;//鑾峰彇涓婁紶鏂囦欢鐨勫ぇ灏忓崟浣嶄负瀛楄妭byte + int Maxsize = 40000 * 1024;//瀹氫箟涓婁紶鏂囦欢鐨勬渶澶х┖闂村ぇ灏忎负40M + try + { + if (files == null || files.ContentLength <= 0) + { + Result_Ob = new { result = 0, returnval = "鏂囦欢涓嶈兘涓虹┖!" }; + return Result_Ob; + } + if (filesize >= Maxsize) + { + Result_Ob = new { result = 0, returnval = "涓婁紶鏂囦欢瓒呰繃40M锛屼笉鑳戒笂浼狅紒" }; + return Result_Ob; + } + + string fileurl = Path.Combine(fileSavePath, filename); + if (Directory.Exists(fileurl) == true) //濡傛灉瀛樺湪閲嶅悕鏂囦欢灏辨彁绀� + { + Result_Ob = new { result = 0, returnval = "瀛樺湪鍚屽悕鏂囦欢锛�" }; + return Result_Ob; + } + //鍒犻櫎鏁版嵁琛ㄦ暟鎹� + ds = oCN.RunProcReturn("delete from MES_AccessoriesList where HSourceBillNo ='" + HNumber + "' and HFileName='" + filename + "'", "MES_AccessoriesList"); + if (Directory.Exists(path)) + { + File.Delete(fileurl); //鍒犻櫎鎸囧畾鏂囦欢 + files.SaveAs(fileurl); + string StrPath = "/files/Material/" + HNumber + "/" + filename; + if (File.Exists(fileurl)) + { + //杩欓噷鍙互鎵ц涓�浜涘叾瀹冪殑鎿嶄綔锛屾瘮濡傛洿鏂版暟鎹簱 + //鍐欏叆鏁版嵁琛� + oCN.RunProc("Insert into MES_AccessoriesList (HFileName,HFilePath,HFilePath_Cus,HFileType" + + ",HLoadMan,HLoadDate,HRemark,HVerNum,HFileSize" + + ",HFileClsID,HSourceBillNo" + + ") values('" + + filename.ToString() + "','" + StrPath.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" + + ",'" + HUserName + "',getdate(),'" + HRemark + "','V1','" + filesize + + "','" + 0 + "','" + HNumber + + "') "); + } + else + { + Result_Ob = new { result = 0, returnval = "涓婁紶澶辫触锛佹鏂囦欢涓烘伓鎰忔枃浠�" }; + } + } + else + { + Directory.CreateDirectory(fileSavePath); //娣诲姞鏂囦欢澶� + files.SaveAs(fileurl); + string StrPath = "/files/Material/" + HNumber + "/" + filename; + if (File.Exists(fileurl)) + { + //杩欓噷鍙互鎵ц涓�浜涘叾瀹冪殑鎿嶄綔锛屾瘮濡傛洿鏂版暟鎹簱 + //鍐欏叆鏁版嵁琛� + oCN.RunProc("Insert into MES_AccessoriesList (HFileName,HFilePath,HFilePath_Cus,HFileType" + + ",HLoadMan,HLoadDate,HRemark,HVerNum,HFileSize" + + ",HFileClsID,HSourceBillNo" + + ") values('" + + filename.ToString() + "','" + StrPath.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" + + ",'" + HUserName + "',getdate(),'" + HRemark + "','V1','" + filesize + + "','" + 0 + "','" + HNumber + + "') "); + } + else + { + Result_Ob = new { result = 0, returnval = "涓婁紶澶辫触锛佹鏂囦欢涓烘伓鎰忔枃浠�" }; + } + } + + } + catch (Exception e) + { + Result_Ob = new { result = 0, returnval = e.Message }; + } + return Result_Ob; + } + + /// <summary> + /// 鏍规嵁鍗曟嵁鍙锋煡鎵句笂浼犳枃浠跺垪琛� + /// </summary> + /// <param name="sWhere"></param> + /// <returns></returns> + [Route("Gy_Mater/Filelist")] + [HttpGet] + public object Filelist(string HNumber) + { + var url = fileip + "/files/Material/" + HNumber + "/"; + //@"C:\\files\\" + try + { + ds = oCN.RunProcReturn("select *,'" + url + "'+CAST(HFileName as varchar(200))as url from MES_AccessoriesList where HSourceBillNo='" + HNumber + "'", "MES_AccessoriesList"); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + /// <summary> + /// 鏍规嵁ID,鍗曟嵁鍙�,鏂囦欢鍚� 鍒犻櫎鏂囦欢 + /// </summary> + /// <param name="sWhere"></param> + /// <returns></returns> + [Route("Gy_Mater/DeleteFilelist")] + [HttpGet] + public object DeleteFilelist(string HItemID, string HSourceBillNo, string HFileName) + { + try + { + + oCN.RunProc("delete from MES_AccessoriesList where HItemID =" + HItemID); + string fileurl = Path.Combine(HttpContext.Current.Server.MapPath("~/../Files/Material/" + HSourceBillNo), HFileName); + File.Delete(fileurl); //鍒犻櫎鎸囧畾鏂囦欢 + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + } } \ No newline at end of file diff --git a/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs b/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs index 638225a..54effae 100644 --- a/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs @@ -125,7 +125,7 @@ ,s.HMobilePhone 鎵嬫満,s.HFax 浼犵湡,s.HPostalCode 閭紪,s.HEmail 鐢靛瓙閭欢,s.HCorMan 娉曚汉浠h〃,s.HBank 寮�鎴烽摱琛�,s.HBankAccount 閾惰璐﹀彿, s.HTaxNum 绋庡姟鐧昏鍙�,s.HEnglishName 鑻辨枃鍚嶇О,s.HEngLishAddress 鑻辨枃鍦板潃,s.HCountry 鍥藉,s.HStopflag 绂佺敤鏍囧織 ,s.HRemark 澶囨敞,s.HAreaID 鍦板尯ID,a.HName 鍦板尯鍚嶇О,s.HTaxRate 澧炲�肩◣鐜�,s.HCurID 榛樿璐у竵ID,r.HName 榛樿璐у竵, - s.HSSID 缁撶畻鏂瑰紡ID,e.HName 缁撶畻鏂瑰紡 from Gy_Supplier s + s.HSSID 缁撶畻鏂瑰紡ID,e.HName 缁撶畻鏂瑰紡,s.HMaterClass 渚涜揣鏉愭枡绫诲埆 from Gy_Supplier s left join Gy_AreaSet a on s.HAreaID=a.HItemID left join Gy_Currency r on s.HCurID=r.HItemID left join Gy_SettleStyle e on s.HSSID=e.HItemID @@ -206,7 +206,7 @@ long HCreateOrgID = list[0].HCreateOrgID; long HUseOrgID = list[0].HUseOrgID; string HRemark = list[0].HRemark; - + string HMaterClass = list[0].HMaterClass; if (!DBUtility.ClsPub.AllowNumber(HNumber)) { @@ -228,14 +228,14 @@ ",HShortName,HAddress,HLinkMan,HLinkPhone,HMobilePhone" + ",HFax,HPostalCode,HEmail,HBank,HBankAccount" + ",HTaxNum,HTaxRate,HCountry,HCorMan,HEnglishName" + - ",HEnglishAddress,HCurID,HSSID,HAreaID) " + + ",HEnglishAddress,HCurID,HSSID,HAreaID,HMaterClass) " + " values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "','" + HParentID + "'" + "," + HLevel + ",1,'" + HStopflag + "','" + HRemark + "'" + ",'" + HShortName + "','" + HAddress + "','" + HLinkMan + "','" + HLinkPhone + "','" + HMobilePhone + "'" + ",'" + HFax + "','" + HPostalCode + "','" + HEmail + "','" + HBank + "','" + HBankAccount + "'" + ",'" + HTaxNum + "','" + HTaxRate + "','" + HCountry + "','" + HCorMan + "','" + HEnglishName + "'" + - ",'" + HEnglishAddress + "'," + HCurID + "," + HSSID + "," + HAreaID + - ") "); + ",'" + HEnglishAddress + "'," + HCurID + "," + HSSID + "," + HAreaID +" ,'" + HMaterClass + + "') "); //淇敼涓婄骇涓洪潪鏈骇浠g爜 oCN.RunProc("Update Gy_Supplier set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); oCN.Commit(); @@ -280,13 +280,13 @@ ",HShortName,HAddress,HLinkMan,HLinkPhone,HMobilePhone" + ",HFax,HPostalCode,HEmail,HBank,HBankAccount" + ",HTaxNum,HTaxRate,HCountry,HCorMan,HEnglishName" + - ",HEnglishAddress,HCurID,HSSID,HAreaID) " + + ",HEnglishAddress,HCurID,HSSID,HAreaID,HMaterClass) " + " values('" + lsmain[0].HItemID + "','" + lsmain[0].HNumber + "','" + lsmain[0].HName + "','" + lsmain[0].HHelpCode + "','" + lsmain[0].HShortNumber + "','" + lsmain[0].HParentID + "'" + "," + lsmain[0].HLevel + ",0,'" + lsmain[0].HStopflag + "','" + lsmain[0].HRemark + "'" + ",'" + lsmain[0].HShortName + "','" + lsmain[0].HAddress + "','" + lsmain[0].HLinkMan + "','" + lsmain[0].HLinkPhone + "','" + lsmain[0].HMobilePhone + "'" + ",'" + lsmain[0].HFax + "','" + lsmain[0].HPostalCode + "','" + lsmain[0].HEmail + "','" + lsmain[0].HBank + "','" + lsmain[0].HBankAccount + "'" + ",'" + lsmain[0].HTaxNum + "','" + lsmain[0].HTaxRate + "','" + lsmain[0].HCountry + "','" + lsmain[0].HCorMan + "','" + lsmain[0].HEnglishName + "'" + - ",'" + lsmain[0].HEnglishAddress + "'," + lsmain[0].HCurID + "," + lsmain[0].HSSID + "," + lsmain[0].HAreaID + + ",'" + lsmain[0].HEnglishAddress + "'," + lsmain[0].HCurID + "," + lsmain[0].HSSID + "," + lsmain[0].HAreaID +","+lsmain[0].HMaterClass+ ") "); //淇敼涓婄骇涓洪潪鏈骇浠g爜 sql = "set identity_insert Gy_Supplier off"; @@ -369,7 +369,7 @@ long HCreateOrgID = list[0].HCreateOrgID; long HUseOrgID = list[0].HUseOrgID; string HRemark = list[0].HRemark; - + string HMaterClass = list[0].HMaterClass; //鍒ゆ柇鏉冮檺 if (!ClsPub.Security_Log(msg5, 1, false, msg4)) @@ -421,7 +421,8 @@ ",HEnglishAddress='" + HEnglishAddress + "'" + ",HCurID=" + HCurID.ToString() + ",HSSID=" + HSSID.ToString() + - ",HAreaID=" + HAreaID.ToString() + "Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); + ",HMaterClass='" + HMaterClass + + "',HAreaID=" + HAreaID.ToString() + "Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); //淇敼瀛愰」鐩唬鐮� diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs index 2a8402b..15577f4 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs @@ -367,7 +367,13 @@ { if (oSystemParameter.omodel.WMS_CampanyName == "涔斾竴") { //绯荤粺鍙傛暟鏄惁涓哄彧鏄剧ず褰撳墠鐧诲綍鐢ㄦ埛鍏宠仈鐨勫伐搴忎俊鎭�,N涓哄惁锛孻涓烘槸 - ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList"); + if (HBillType == "7505") + { + ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBill__ProcList '" + BillNo_PGD + "' ", "h_p_Sc_ProcessExchangeBill__ProcList"); + } + else { + ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList"); + } } else { diff --git a/WebAPI/Controllers/ReportPlatFormController.cs b/WebAPI/Controllers/ReportPlatFormController.cs index 2a1c600..5a410a8 100644 --- a/WebAPI/Controllers/ReportPlatFormController.cs +++ b/WebAPI/Controllers/ReportPlatFormController.cs @@ -161,13 +161,13 @@ #region 鎶ュ伐骞冲彴鍒犻櫎璧勬簮鍒楄〃 [Route("ReportPlatForm/DeleteGetLineBindBillList")] [HttpGet] - public object DeleteGetLineBindBillList(string HSourceID) + public object DeleteGetLineBindBillList(string HSourceID,string user) { try { oCN.BeginTran(); //鏇存柊鍒囨崲鐘舵�佸�� - string sql = string.Format(@"delete Gy_SourceRelationSet where HSourceID='" + HSourceID + "'"); + string sql = string.Format(@"delete Gy_SourceRelationSet where HSourceID='" + HSourceID + "' and HUserName = '" + user + "'"); oCN.RunProc(sql); oCN.Commit(); objJsonResult.code = "1"; diff --git a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs index e765a51..6346119 100644 --- a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs +++ b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs @@ -1,4 +1,5 @@ 锘縰sing DBUtility; +using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; @@ -731,5 +732,200 @@ } #endregion + + #region 璁惧杩愯鐘舵�佹姤琛� + + [Route("SB_EquipRunningStatus/Report")] + [HttpGet] + public object Report(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //if (!DBUtility.ClsPub.Security_Log("Gy_EquipFileList", 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_EquipRunningStatusReport " + sWhere + " order by 鎵�灞炴棩鏈� desc", "h_v_Sb_EquipRunningStatusReport"); + } + else + { + string sql1 = "select * from h_v_Sb_EquipRunningStatusReport where 1 = 1 "; + string sql = sql1 + sWhere + " order by 鎵�灞炴棩鏈� desc"; + ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipRunningStatusReport"); + } + + //娣诲姞鍒楀悕 + 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; + + //if (ds.Tables[0].Rows.Count != 0 && ds != null) + //{ + + //} + //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 璁惧杩愯鐘舵�佹姤琛� 鏍戠姸鍥� 閮ㄩ棬鍒嗙被鏌ヨ + public class TreeModel_Report + { + public string id { get; set; } + public string title { get; set; } + public string type { get; set; } + public List<TreeModel_Report> children = new List<TreeModel_Report>(); + } + [Route("SB_EquipRunningStatus/ReportTreeGetList")] + [HttpGet] + public object ReportTreeGetList(string sWhere, string user) + { + try + { + + ds = oCN.RunProcReturn("select HItemID,HNumber,HName from Gy_Department", "Gy_Department"); + + List<TreeModel_Report> treeModels = new List<TreeModel_Report>(); + TreeModel_Report first = new TreeModel_Report(); + + DataSet Ds; + string HCampanyName = ""; + Ds = oCN.RunProcReturn("select HValue from Xt_SystemParameter where HCaption = '瀹㈡埛鍚嶇О'", "Xt_SystemParameter"); + if (Ds.Tables[0].Rows.Count != 0 && Ds != null) + { + HCampanyName = Ds.Tables[0].Rows[0]["HValue"].ToString(); + } + + first.id = "0"; + first.title = HCampanyName; + treeModels.Add(first); + + foreach (DataRow row in ds.Tables[0].Rows) + { + var strLen = row["hitemid"].ToString().Split('.'); + if (strLen.Length == 1) + { + TreeModel_Report tree = new TreeModel_Report(); + tree.id = row["HItemID"].ToString(); + tree.title = row["HName"].ToString(); + tree.type = "Department"; + treeModels[0].children.Add(tree); + } + } + getWorkCenter_Level2(ds.Tables[0], treeModels[0].children); + + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = Newtonsoft.Json.JsonConvert.SerializeObject(treeModels); + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + /// <summary> + /// 绗簩绾у伐浣滀腑蹇� + /// </summary> + public void getWorkCenter_Level2(DataTable dt, List<TreeModel_Report> tree) + { + for (int i = 0;i < dt.Rows.Count;i++) + { + var HDeptID = dt.Rows[i]["HItemID"].ToString(); + ds = oCN.RunProcReturn("select distinct HItemID,HNumber,HName from Gy_WorkCenter where HDeptID = " + HDeptID, "Gy_WorkCenter"); + if (ds.Tables[0].Rows.Count != 0 && ds != null) + { + for (int j = 0; j < ds.Tables[0].Rows.Count; j++) + { + TreeModel_Report tbjson = new TreeModel_Report(); + tbjson.id = ds.Tables[0].Rows[j]["HItemID"].ToString(); + tbjson.title = ds.Tables[0].Rows[j]["HName"].ToString(); + tbjson.type = "WorkCenter"; + tree[i].children.Add(tbjson); + } + } + //digui_Report(ds.Tables[0], tree[i].children, 2); + } + + } + + /// <summary> + /// 閫掑綊鍑芥暟 + /// </summary> + public void digui_Report(DataTable dt, List<TreeModel_Report> tree, int num) + { + for (int m = 0; m < tree.Count; m++) + { + tree[m].children = new List<TreeModel_Report>(); + for (int i = 0; i < dt.Rows.Count; i++)//绗竴娆″惊鐜紝寰楀埌鎵�鏈夋牴鑺傜偣鐨勫瓙闆� + { + var HWorkCenterNumber = dt.Rows[i]["HNumber"].ToString(); + DataSet Ds; + Ds = oCN.RunProcReturn("select distinct HItemID,HNumber,HName from Gy_WorkCenter where HNumber like '" + HWorkCenterNumber + "%'", "Gy_WorkCenter"); + + if (Ds.Tables[0].Rows.Count != 0 && Ds != null) + { + for (int j = 0;j < Ds.Tables[0].Rows.Count;j++) + { + var strLen = Ds.Tables[0].Rows[j]["HNumber"].ToString().Split('.'); + if (strLen.Length == num && Ds.Tables[0].Rows[j]["HNumber"].ToString().Contains(tree[m].id + ".")) + { + TreeModel_Report tbjson = new TreeModel_Report(); + tbjson.id = Ds.Tables[0].Rows[j]["HItemID"].ToString(); + tbjson.title = Ds.Tables[0].Rows[j]["HName"].ToString(); + tbjson.type = "WorkCenter"; + tree[m].children.Add(tbjson); + } + } + } + } + var strLens = tree[m].id.Split('.'); + for (int i = 0; i < tree[m].children.Count; i++) + { + digui_Report(dt, tree[m].children, strLens.Length + 2);//鍐嶆鐢ㄥ瓙闆嗗幓寰幆锛屾嬁鍑哄瓙闆嗙殑瀛愰泦 + } + } + + } + #endregion + } } diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs index 3160d31..1910c73 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs @@ -411,13 +411,8 @@ #endregion - - - #endregion - - #region 璁惧鐐规璁板綍鍗昉DA #region 鏍规嵁璁惧鏉$爜鏌ユ壘璁惧妗f淇℃伅PDA [Route("Sb_PDA_EquipDotCheckBill/txtHBarCode_KeyDown")] @@ -752,7 +747,62 @@ } #endregion - #endregion + #region 璁惧鐐规閫炬湡棰勮鎶ヨ〃 + [Route("Sb_EquipDotCheckWarning/Report")] + [HttpGet] + public object Report(string HYear,string HMonth,string HEquipTypeID, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //if (!DBUtility.ClsPub.Security_Log("Gy_EquipFileList", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺"; + // objJsonResult.data = null; + // return objJsonResult; + //} + if (HYear == null || HYear.Equals("") || HMonth == null || HMonth.Equals("")) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤锛屾湀浠�"; + objJsonResult.data = ""; + objJsonResult.list = columnNameList; + return objJsonResult; + } + else + { + string sql = "exec h_p_Sb_EquipDotCheckWarningReport " + HYear + "," + HMonth + "," + HEquipTypeID; + ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipDotCheckWarningReport"); + } + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion } } \ No newline at end of file diff --git a/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs index 49598c4..de5046d 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs @@ -941,5 +941,63 @@ #endregion #endregion + + #region 璁惧淇濆吇閫炬湡棰勮鎶ヨ〃 + + [Route("Sb_EquipMaintainWarning/Report")] + [HttpGet] + public object Report(string HYear, string HEquipTypeID, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //if (!DBUtility.ClsPub.Security_Log("Gy_EquipFileList", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺"; + // objJsonResult.data = null; + // return objJsonResult; + //} + if (HYear == null || HYear.Equals("")) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤"; + objJsonResult.data = ""; + objJsonResult.list = columnNameList; + return objJsonResult; + } + else + { + string sql = "exec h_p_Sb_EquipMaintainWarningReport " + HYear + "," + HEquipTypeID; + ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipMaintainWarningReport"); + } + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion } } \ No newline at end of file diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs index 351bd0e..b4524fb 100644 --- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs @@ -28,6 +28,9 @@ public DLL.ClsOA_ErrMsgBackBill BillNew = new DLL.ClsOA_ErrMsgBackBill(); //瀵瑰簲鍗曟嵁绫� public DLL.ClsOA_ErrMsgBackBill BillOld = new DLL.ClsOA_ErrMsgBackBill(); //瀵瑰簲鍗曟嵁绫� + public DAL.ClsOA_AndengFlowRuleBill BillOld1 = new DAL.ClsOA_AndengFlowRuleBill(); //瀵瑰簲鍗曟嵁绫� 瀹夌伅閫愮骇鍛煎彨瑙勫垯 + public DAL.ClsOA_AndengFlowRuleBill BillNew1 = new DAL.ClsOA_AndengFlowRuleBill(); //瀵瑰簲鍗曟嵁绫� 瀹夌伅閫愮骇鍛煎彨瑙勫垯 + #region 鎶ュ伐骞冲彴寮傚父鍙嶉鍗曚繚瀛�/缂栬緫 /// <summary> @@ -4548,5 +4551,882 @@ #endregion #endregion + + #region 瀹夌伅閫愮骇鍛煎彨瑙勫垯 + + #region 瀹夌伅閫愮骇鍛煎彨瑙勫垯 鏂板/缂栬緫 + [Route("Sc_MESTransFerWorkBill/SaveOA_AndengFlowRuleBill")] + [HttpPost] + public object SaveOA_AndengFlowRuleBill([FromBody] JObject msg) + { + var _value = msg["msg"].ToString(); + string msg1 = _value.ToString(); + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg2 = sArray[0].ToString(); + string msg3 = sArray[1].ToString(); //瀛愯〃 + string refSav = sArray[2].ToString();//鎿嶄綔鏂瑰紡鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2 澶嶅埗 + string msg4 = sArray[3].ToString();//鐢ㄦ埛鍚� + + DBUtility.ClsPub.CurUserName = msg4; + + string UserName = ""; + string s = ""; + ListModels oListModels = new ListModels(); + try + { + //缂栬緫鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("OA_AndengFlowRuleBillMain_Edit", 1, false, msg4)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + // OA_AndengFlowRuleBill + DAL.ClsOA_AndengFlowRuleBill oBill = new DAL.ClsOA_AndengFlowRuleBill(); + List<Model.ClsOA_AndengFlowRuleBillMain> lsmain = new List<Model.ClsOA_AndengFlowRuleBillMain>(); + msg2 = msg2.Replace("\\", ""); + msg2 = msg2.Replace("\n", ""); //\n + lsmain = oListModels.getObjectByJson_OA_AndengFlowRuleBill(msg2); + foreach (Model.ClsOA_AndengFlowRuleBillMain oItem in lsmain) + { + if (refSav == "Add") + { + //鍗曟嵁鍙锋槸鍚﹂噸澶� + if (BillNew1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld1.omodel.HInterID)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒"; + objJsonResult.data = 1; + return objJsonResult; + } + } + if (refSav == "Update") + { + if (BillOld1.ShowBill(oItem.HInterID, ref s) == false) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "姝ゅ崟鎹湁璇紒"; + objJsonResult.data = 1; + return objJsonResult; + } + //鍒ゆ柇鏄惁鍙紪杈� + if (BillOld1.omodel.HChecker != "" && oBill.omodel.HChecker != null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + if (BillOld1.omodel.HBillStatus > 1) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "姝ゅ崟鎹浜庝笉鍙紪杈戠姸鎬侊紝涓嶅厑璁镐慨鏀癸紒"; + objJsonResult.data = 1; + return objJsonResult; + } + if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(oBill, ref s)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = s + "锛屼笉鍏佽淇敼"; + objJsonResult.data = 1; + return objJsonResult; + } + } + UserName = oItem.HMaker; //鍒跺崟浜� + oItem.HBillType = "4533"; + oItem.HBillSubType = "4533"; + + 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; + } + // 琛ㄤ綋鏁版嵁 + //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆� + msg3 = msg3.Substring(1, msg3.Length - 2); + msg3 = msg3.Replace("\\", ""); + msg3 = msg3.Replace("\n", ""); //\n + List<Model.ClsOA_AndengFlowRuleBillSub> ls = new List<Model.ClsOA_AndengFlowRuleBillSub>(); + ls = oListModels.getObjectByJson_OA_AndengFlowRuleBillSub(msg3); + int i = 0; + foreach (Model.ClsOA_AndengFlowRuleBillSub oItemSub in ls) + { + i++; + oItemSub.HEntryID = i; + + + oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); + oItemSub.HCloseType = false; //鍏抽棴绫诲瀷 + + oBill.DetailColl.Add(oItemSub); + + } + //淇濆瓨 + //淇濆瓨瀹屾瘯鍚庡鐞� + 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("Sc_MESTransFerWorkBill/Edit_OA_AndengFlowRuleBill")] + [HttpGet] + public object Edit_OA_AndengFlowRuleBill(string HID) + { + try + { + List<object> columnNameList = new List<object>(); + + string sql = "select * from h_v_OA_AndengFlowRuleBillMainList where hmainid='" + HID + "'"; + ds = oCN.RunProcReturn(sql, "h_v_OA_AndengFlowRuleBillMainList"); + + //娣诲姞鍒楀悕 + 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 ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 瀹夌伅閫愮骇鍛煎彨瑙勫垯鍒楄〃 + + [Route("Sc_MESTransFerWorkBill/Get_OA_AndengFlowRuleBillList")] + [HttpGet] + public object Get_OA_AndengFlowRuleBillList(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("OA_AndengFlowRuleBillMain_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + if (sWhere == null || sWhere.Equals("")) + { + string sql = "select * from h_v_OA_AndengFlowRuleBillMainList order by 鍗曟嵁鍙� desc"; + ds = oCN.RunProcReturn(sql, "h_v_OA_AndengFlowRuleBillMainList"); + } + else + { + string sql1 = "select * from h_v_OA_AndengFlowRuleBillMainList where 1 = 1 "; + string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc"; + ds = oCN.RunProcReturn(sql, "h_v_OA_AndengFlowRuleBillMainList"); + } + + //娣诲姞鍒楀悕 + 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 ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 瀹夌伅閫愮骇鍛煎彨瑙勫垯 鍒犻櫎 + /// <summary> + ///鍙傛暟锛歴tring HInterID銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Sc_MESTransFerWorkBill/DeleteOA_AndengFlowRuleBill")] + [HttpGet] + public object DeleteOA_AndengFlowRuleBill(string HInterID, string user) + { + try + { + string s = ""; + DAL.ClsOA_AndengFlowRuleBill BillOld = new DAL.ClsOA_AndengFlowRuleBill(); + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("OA_AndengFlowRuleBillMain_Drop", 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; + } + + if (BillOld.ShowBill(long.Parse(HInterID), ref s) == false) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "姝ゅ崟鎹湁璇紒"; + objJsonResult.data = 1; + return objJsonResult; + } + //鍒ゆ柇鏄惁鍙垹闄� + if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽鍒犻櫎锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + //鍒犻櫎鍓嶆帶鍒�========================================= + string sql1 = "exec h_p_OA_AndengFlowRuleBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'"; + ds = oCN.RunProcReturn(sql1, "h_p_OA_AndengFlowRuleBill_BeforeDelCtrl"); + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:鍒犻櫎鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴"; + objJsonResult.data = null; + return objJsonResult; + } + + if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; + objJsonResult.data = null; + return objJsonResult; + } + //================================================================================== + + + + oCN.BeginTran(); + + oCN.RunProc("delete from OA_AndengFlowRuleBillMain where HInterID = " + HInterID); + oCN.RunProc("delete from OA_AndengFlowRuleBillSub where HInterID= " + HInterID); + + //鍒犻櫎鍚庢帶鍒�================================================================================== + string sql2 = "exec h_p_OA_AndengFlowRuleBill_AfterDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'"; + ds = oCN.RunProcReturn(sql2, "h_p_OA_AndengFlowRuleBill_AfterDelCtrl"); + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) + { + s = "鍒犻櫎鍚庡垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴"; + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + s; + objJsonResult.data = null; + oCN.RollBack(); + return objJsonResult; + } + if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") + { + s = ds.Tables[0].Rows[0]["HRemark"].ToString(); + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + s; + objJsonResult.data = null; + oCN.RollBack(); + return objJsonResult; + } + //============================================================================================== + + oCN.Commit(); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎鎴愬姛"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.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("Sc_MESTransFerWorkBill/AuditOA_AndengFlowRuleBill")] + [HttpGet] + public object AuditOA_AndengFlowRuleBill(int HInterID, int IsAudit, string CurUserName) + { + string ModRightNameCheck = "OA_AndengFlowRuleBillMain_Check"; + DBUtility.ClsPub.CurUserName = CurUserName; + try + { + //瀹℃牳鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�"; + objJsonResult.data = null; + return objJsonResult; + } + //HInterID鏁版嵁鍒ゆ柇 + if (HInterID <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "HInterID灏忎簬0锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + + Int64 lngBillKey = 0; + lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹� + DAL.ClsOA_AndengFlowRuleBill oBill = new DAL.ClsOA_AndengFlowRuleBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣� + + //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔 + if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁 + { + if (oBill.omodel.HCloseMan.Trim() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (oBill.omodel.HDeleteMan.Trim() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (IsAudit == 0) //瀹℃牳鍒ゆ柇 + { + if (oBill.omodel.HChecker.Trim() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�"; + objJsonResult.data = null; + return objJsonResult; + } + } + if (IsAudit == 1) //鍙嶅鏍稿垽鏂� + { + if (oBill.omodel.HChecker.Trim() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!"; + objJsonResult.data = null; + return objJsonResult; + } + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + + + //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣� + if (IsAudit == 0) //瀹℃牳鎻愪氦 + { + oCN.BeginTran(); + + //璁板綍杩斿洖淇℃伅 + string msg = ""; + + + //瀹℃牳鍓嶆帶鍒�========================================= + string sql1 = "exec h_p_OA_AndengFlowRuleBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'"; + ds = oCN.RunProcReturn(sql1, "h_p_OA_AndengFlowRuleBill_BeforeCheckCtrl"); + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴"; + objJsonResult.data = null; + oCN.RollBack(); + return objJsonResult; + } + + if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; + objJsonResult.data = null; + oCN.RollBack(); + return objJsonResult; + } + //================================================================================== + + //瀹℃牳鎻愪氦 + if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_OA_AndengFlowRuleBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) + { + oCN.Commit(); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "瀹℃牳鎴愬姛锛�" + msg; + objJsonResult.data = null; + return objJsonResult; + } + else + { + oCN.RollBack(); + + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + if (IsAudit == 1) //鍙嶅鏍告彁浜� + { + + //鍙嶅鏍稿墠鎺у埗========================================= + string sql1 = "exec h_p_OA_AndengFlowRuleBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'"; + ds = oCN.RunProcReturn(sql1, "h_p_OA_AndengFlowRuleBill_BeforeUnCheckCtrl"); + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�"; + objJsonResult.data = null; + return objJsonResult; + + } + if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; + objJsonResult.data = null; + return objJsonResult; + } + //=========================================================== + + //鍙嶅鏍告彁浜bandonCheck + if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_OA_AndengFlowRuleBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶅鏍告垚鍔�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + return objJsonResult; + } + catch (Exception e) + { + oCN.RollBack(); + + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 瀹夌伅閫愮骇鍛煎彨瑙勫垯 鍏抽棴/鍙嶅叧闂� + /// <summary> + /// </summary> + /// <param name="HInterID">鍗曟嵁ID</param> + /// <param name="IsAudit">鍏抽棴(0),鍙嶅叧闂�(1)</param> + /// <param name="CurUserName">鍏抽棴浜�</param> + /// <returns></returns> + [Route("Sc_MESTransFerWorkBill/CloseOA_AndengFlowRuleBill")] + [HttpGet] + public object CloseOA_AndengFlowRuleBill(int HInterID, int IsAudit, string CurUserName) + { + string ModRightNameCheck = "OA_AndengFlowRuleBillMain_Close"; + DBUtility.ClsPub.CurUserName = CurUserName; + try + { + //妫�鏌ユ潈闄� + if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍏抽棴澶辫触锛佹棤鏉冮檺锛�"; + objJsonResult.data = null; + return objJsonResult; + } + //HInterID鏁版嵁鍒ゆ柇 + if (HInterID <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "HInterID灏忎簬0锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + + Int64 lngBillKey = 0; + lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹� + DAL.ClsOA_AndengFlowRuleBill oBill = new DAL.ClsOA_AndengFlowRuleBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣� + + //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔 + if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁 + { + if (oBill.omodel.HDeleteMan.Trim() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜鍏抽棴锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (oBill.omodel.HChecker.Trim() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶈兘杩涜鍏抽棴锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (IsAudit == 0) //鍏抽棴鍒ゆ柇 + { + if (oBill.omodel.HCloseMan.Trim() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆鍏抽棴锛�"; + objJsonResult.data = null; + return objJsonResult; + } + } + if (IsAudit == 1) //鍙嶅叧闂垽鏂� + { + if (oBill.omodel.HCloseMan.Trim() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鏈叧闂�!涓嶉渶瑕佸弽鍏抽棴锛�"; + objJsonResult.data = null; + return objJsonResult; + } + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + + + //杩涜闇�瑕佽繘琛岀殑鍏抽棴/鍙嶅叧闂搷浣� + if (IsAudit == 0) //鍏抽棴鎻愪氦 + { + //鍏抽棴鎻愪氦 + if (oBill.CloseBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍏抽棴鎴愬姛"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + if (IsAudit == 1) //鍙嶅叧闂彁浜� + { + //鍙嶅叧闂彁浜� + if (oBill.CancelClose(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶅叧闂垚鍔�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍏抽棴澶辫触鎴栬�呭弽鍏抽棴澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 瀹夌伅閫愮骇鍛煎彨瑙勫垯 浣滃簾/鍙嶄綔搴� + /// <summary> + /// </summary> + /// <param name="HInterID">鍗曟嵁ID</param> + /// <param name="IsAudit">浣滃簾(0),鍙嶄綔搴�(1)</param> + /// <param name="CurUserName">浣滃簾浜�</param> + /// <returns></returns> + [Route("Sc_MESTransFerWorkBill/DeleteOA_AndengFlowRuleBill")] + [HttpGet] + public object DeleteOA_AndengFlowRuleBill(int HInterID, int IsAudit, string CurUserName) + { + string ModRightNameCheck = "OA_AndengFlowRuleBillMain_Drop"; + DBUtility.ClsPub.CurUserName = CurUserName; + try + { + //妫�鏌ユ潈闄� + if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "浣滃簾澶辫触锛佹棤鏉冮檺锛�"; + objJsonResult.data = null; + return objJsonResult; + } + //HInterID鏁版嵁鍒ゆ柇 + if (HInterID <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "HInterID灏忎簬0锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + + Int64 lngBillKey = 0; + lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹� + DAL.ClsOA_AndengFlowRuleBill oBill = new DAL.ClsOA_AndengFlowRuleBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣� + + //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔 + if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁 + { + if (oBill.omodel.HChecker.Trim() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (IsAudit == 0) //浣滃簾鍒ゆ柇 + { + if (oBill.omodel.HDeleteMan.Trim() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶄綔搴燂紒"; + objJsonResult.data = null; + return objJsonResult; + } + } + if (IsAudit == 1) //鍙嶄綔搴熷垽鏂� + { + if (oBill.omodel.HDeleteMan.Trim() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鏈綔搴�!涓嶉渶瑕佸弽浣滃簾锛�"; + objJsonResult.data = null; + return objJsonResult; + } + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + + + //杩涜闇�瑕佽繘琛岀殑浣滃簾/鍙嶄綔搴熸搷浣� + if (IsAudit == 0) //浣滃簾鎻愪氦 + { + //浣滃簾鎻愪氦 + if (oBill.Cancelltion(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "浣滃簾鎴愬姛"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + if (IsAudit == 1) //鍙嶅叧闂彁浜� + { + //鍙嶅叧闂彁浜� + if (oBill.AbandonCancelltion(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶄綔搴熸垚鍔�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "浣滃簾澶辫触鎴栬�呭弽浣滃簾澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #endregion } } \ No newline at end of file diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs index f1872c1..ef3378b 100644 --- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs +++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs @@ -1065,7 +1065,7 @@ } #endregion - #region 鍏朵粬鍏ュ簱鍗� 缂栬緫椤甸潰鍒濆鍖� + #region 鐩存帴璋冩嫧鍗� 缂栬緫椤甸潰鍒濆鍖� [Route("Kf_MoveStockBill/Kf_MoveStockBillEdit")] [HttpGet] public object Kf_MoveStockBillEdit(long HInterID) @@ -1105,7 +1105,7 @@ } #endregion - #region 鍏跺畠鍏ュ簱鍗曞鏍�/鍙嶅鏍稿姛鑳� + #region 鐩存帴璋冩嫧鍗� 瀹℃牳/鍙嶅鏍稿姛鑳� [Route("Kf_MoveStockBill/CheckKf_MoveStockBill")] [HttpGet] public object CheckKf_MoveStockBill(string HInterID, int Type, string user) @@ -1303,7 +1303,7 @@ } #endregion - #region 鍏跺畠鍏ュ簱鍗曞叧闂�/鍙嶅叧闂姛鑳� + #region 鐩存帴璋冩嫧鍗� 鍏抽棴/鍙嶅叧闂姛鑳� [Route("Kf_MoveStockBill/CloseKf_MoveStockBill")] [HttpGet] public object CloseKf_MoveStockBill(string HInterID, int Type, string user) @@ -1409,7 +1409,7 @@ } #endregion - #region 鍏朵粬鍏ュ簱鍗� 浣滃簾/鍙嶄綔搴熷姛鑳� + #region 鐩存帴璋冩嫧鍗� 浣滃簾/鍙嶄綔搴熷姛鑳� [Route("Kf_MoveStockBill/DropKf_MoveStockBill")] [HttpGet] public object DropKf_MoveStockBill(string HInterID, int Type, string user) diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index 47dc70b..fdb9109 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -8861,6 +8861,608 @@ } #endregion + #region 椤圭洰绫诲埆 璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶 + /// <summary> + /// 椤圭洰绫诲埆 淇濆瓨 + /// </summary> + /// <param name="msg"></param> + /// <returns></returns> + [Route("SaveGy_ProjectClassList")] + [HttpPost] + public object SaveGy_ProjectClassList([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_ProjectClass_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_ProjectClass ", "Gy_ProjectClass"); + 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_ProjectClass_Ctl oBill = new WebAPI.DLL.ClsGy_ProjectClass_Ctl(); + List<Model.ClsGy_ProjectClass_Model> lsmain = new List<Model.ClsGy_ProjectClass_Model>(); + msg1 = msg1.Replace("\\", ""); + msg1 = msg1.Replace("\n", ""); + lsmain = oListModels.getObjectByJson_Gy_ProjectClass(msg1); + foreach (Model.ClsGy_ProjectClass_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_ProjectClass where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_ProjectClass"); + 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_ProjectClassDetail")] + [HttpGet] + public ApiResult<DataSet> GetGy_ProjectClassDetail(string HID) + { + var model = LuBaoSevice.GetGy_ProjectClassDetail(HID); + return model; + } + + /// <summary> + /// 椤圭洰绫诲埆 鍒犻櫎鍔熻兘 + /// </summary> + /// <returns></returns> + [Route("DeltetGy_ProjectClass")] + [HttpGet] + public object DeltetGy_ProjectClass(string HItemID, string user) + { + DataSet ds; + //string ModRightNameCheck = "Sc_ProcessReport_check"; + try + { + //鍒犻櫎鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Gy_ProjectClass_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();//寮�濮嬩簨鍔� + + ds = oCN.RunProcReturn("select * from Gy_ProjectClass where HItemID=" + HItemID, "Gy_ProjectClass"); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜鍒犻櫎锛�"; + objJsonResult.data = null; + return objJsonResult; + } + 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.RunProc("delete Gy_ProjectClass 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_TaskClassList")] + [HttpPost] + public object SaveGy_TaskClassList([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_TaskClass_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_TaskClass ", "Gy_TaskClass"); + 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_TaskClass_Ctl oBill = new WebAPI.DLL.ClsGy_TaskClass_Ctl(); + List<Model.ClsGy_TaskClass_Model> lsmain = new List<Model.ClsGy_TaskClass_Model>(); + msg1 = msg1.Replace("\\", ""); + msg1 = msg1.Replace("\n", ""); + lsmain = oListModels.getObjectByJson_Gy_TaskClass(msg1); + foreach (Model.ClsGy_TaskClass_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_TaskClass where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_TaskClass"); + 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_TaskClassDetail")] + [HttpGet] + public ApiResult<DataSet> GetGy_TaskClassDetail(string HID) + { + var model = LuBaoSevice.GetGy_TaskClassDetail(HID); + return model; + } + + /// <summary> + /// 浠诲姟绫诲埆 鍒犻櫎鍔熻兘 + /// </summary> + /// <returns></returns> + [Route("DeltetGy_TaskClass")] + [HttpGet] + public object DeltetGy_TaskClass(string HItemID, string user) + { + DataSet ds; + //string ModRightNameCheck = "Sc_ProcessReport_check"; + try + { + //鍒犻櫎鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Gy_TaskClass_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();//寮�濮嬩簨鍔� + + ds = oCN.RunProcReturn("select * from Gy_TaskClass where HItemID=" + HItemID, "Gy_TaskClass"); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜鍒犻櫎锛�"; + objJsonResult.data = null; + return objJsonResult; + } + 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.RunProc("delete Gy_TaskClass 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> diff --git a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs index 92ff4de..b9f0333 100644 --- a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs @@ -287,7 +287,7 @@ long HConveyCompID = mainList[0].HConveyCompID;//杩愯緭鍏徃 long HConveyMoney = (long)mainList[0].HConveyMoney;//杩愯垂 long HDFflag = Convert.ToInt32(mainList[0].HDFflag); //鏄惁鍨粯 - + long HProjectID = mainList[0].HProjectID;//宸ョ▼椤圭洰 string HBillType = mainList[0].HBillType; string HBillSubType = mainList[0].HBillSubType; @@ -348,14 +348,14 @@ ,HAddress,HSSID,HCurID,HWHID,HExRate,HEmpID,HExplanation,HInnerBillNo,HSeOrderBillNo_M ,HConveyTypeID,HConveyCompID,HConveyMoney,HLinkMan,HLinkPhone ,HSALEORGID,HDELIVERYORGID,HOWNERID,HOWNERTYPEID - ,HChecker,HCheckDate,HCloseMan,HCloseDate,HERPInterID,HERPBillType,HDFflag) + ,HChecker,HCheckDate,HCloseMan,HCloseDate,HERPInterID,HERPBillType,HDFflag,HProjectID) values(" + HInterID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + 1402 + "','" + 1402 + "','" + HDate + "','" + HBillNo + "'," + HBillStatus + "," + HCusID + "," + HManagerID + "," + HDeptID + ",'" + HRemark + "','" + HMaker + "','" + HMakeDate + "','" + HAddress + "'," + HSSID + "," + HCurID + "," + HWHID + "," + HExRate + "," + HEmpID + ",'" + HExplanation + "','" + HInnerBillNo + "','" + HSeOrderBillNo_M + "','" + HConveyTypeID + "','" + HConveyCompID + "','" + HConveyMoney + "','" + HLinkMan + "','" + HLinkPhone + "'," + HSALEORGID + "," + HDELIVERYORGID + "," + HOWNERID + ",'" + HOWNERTYPEID + "','" + HChecker + "','" + HCheckDate + "','" + HCloseMan + "','" + HCloseDate + "'," + HERPInterID + - ",'" + HERPBillType + "'," + HDFflag + ")"; + ",'" + HERPBillType + "'," + HDFflag + ",'"+ HProjectID + "')"; oCN.RunProc(sql); @@ -366,7 +366,7 @@ "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + ",HCusID='" + HCusID + "', HCurID='" + HCurID + "', HWHID = '" + HWHID + "',HExRate='" + HExRate + "',HEmpID='" + HEmpID + "',HSeOrderBillNo_M='" + HSeOrderBillNo_M + "',HManagerID='" + HManagerID + "',HDeptID='" + HDeptID + "',HOWNERID='" + HOWNERID - + "',HAddress='" + HAddress + "' where HInterID=" + HInterID; + + "',HAddress='" + HAddress + "',HProjectID='"+ HProjectID + "' where HInterID=" + HInterID; oCN.RunProc(sql); //鍒犻櫎瀛愯〃 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_DutyBillController.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_DutyBillController.cs" index 1fe868f..b86ec39 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_DutyBillController.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_DutyBillController.cs" @@ -226,9 +226,9 @@ //淇濆瓨瀹屾瘯鍚庡鐞� oCN.RunProc("Insert into Gy_Duty " + " (HNumber,HName,HHelpCode,HShortNumber,HParentID,HUserGroupID" + - ",HLevel,HEndFlag,HStopflag,HRemark) " + + ",HLevel,HEndFlag,HStopflag,HRemark,HUserCode) " + " Values('" + Duty.HNumber + "','" + Duty.HName + "','" + Duty.HHelpCode + "','" + Duty.HShortNumber + "'," + Duty.HParentID.ToString() + "," + Duty.HUserGroupID.ToString() + - "," + Duty.HLevel.ToString() + "," + Duty.HEndFlag + "," + Convert.ToString(Duty.HStopflag ? 1 : 0) + ",'" + Duty.HRemark + "')", ref DBUtility.ClsPub.sExeReturnInfo); + "," + Duty.HLevel.ToString() + "," + Duty.HEndFlag + "," + Convert.ToString(Duty.HStopflag ? 1 : 0) + ",'" + Duty.HRemark + "','" + Duty.HUserCode + "')", ref DBUtility.ClsPub.sExeReturnInfo); } else { @@ -242,6 +242,7 @@ ",HUserGroupID=" + Duty.HUserGroupID.ToString() + ",HEndflag=" + Duty.HEndFlag + ",HStopflag=" + Convert.ToString(Duty.HStopflag ? 1 : 0) + + ",HUserCode="+Duty.HUserCode+ ",HRemark= '" + Duty.HRemark + "' Where HItemID=" + Duty.HItemID, ref DBUtility.ClsPub.sExeReturnInfo); } diff --git a/WebAPI/DLL/ClsGy_ProjectClass_Ctl.cs b/WebAPI/DLL/ClsGy_ProjectClass_Ctl.cs new file mode 100644 index 0000000..da7a2bf --- /dev/null +++ b/WebAPI/DLL/ClsGy_ProjectClass_Ctl.cs @@ -0,0 +1,102 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using System.Data; + +namespace WebAPI.DLL +{ + public class ClsGy_ProjectClass_Ctl : DBUtility.ClsGy_Base_Ctl + { + + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩� + public string HOldNumber; + public Model.ClsGy_ProjectClass_Model oModel = new Model.ClsGy_ProjectClass_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_ProjectClass_Ctl() + { + MvarItemKey = "Gy_ProjectClass"; + MvarReportTitle = "椤圭洰绫诲埆璁剧疆"; + oModel = new Model.ClsGy_ProjectClass_Model(); + } + + + + } +} diff --git a/WebAPI/DLL/ClsGy_TaskClass_Ctl.cs b/WebAPI/DLL/ClsGy_TaskClass_Ctl.cs new file mode 100644 index 0000000..0b4f5b7 --- /dev/null +++ b/WebAPI/DLL/ClsGy_TaskClass_Ctl.cs @@ -0,0 +1,102 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using System.Data; + +namespace WebAPI.DLL +{ + public class ClsGy_TaskClass_Ctl : DBUtility.ClsGy_Base_Ctl + { + + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩� + public string HOldNumber; + public Model.ClsGy_TaskClass_Model oModel = new Model.ClsGy_TaskClass_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_TaskClass_Ctl() + { + MvarItemKey = "Gy_TaskClass"; + MvarReportTitle = "浠诲姟绫诲埆璁剧疆"; + oModel = new Model.ClsGy_TaskClass_Model(); + } + + + + } +} diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs index fbcfa0c..6e44e80 100644 --- a/WebAPI/ListModels.cs +++ b/WebAPI/ListModels.cs @@ -1122,6 +1122,30 @@ 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_ProjectClass_Model> getObjectByJson_Gy_ProjectClass(string jsonString) + { + jsonString = "[" + jsonString.ToString() + "]"; + List<Model.ClsGy_ProjectClass_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_ProjectClass_Model>>(jsonString); + return list; + } + + /// <summary> + /// 澶勭悊鏂板椤圭洰绫诲埆琛ㄧ殑json + /// </summary> + /// <param name="jsonString"></param> + /// <returns></returns> + public List<Model.ClsGy_TaskClass_Model> getObjectByJson_Gy_TaskClass(string jsonString) + { + jsonString = "[" + jsonString.ToString() + "]"; + List<Model.ClsGy_TaskClass_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_TaskClass_Model>>(jsonString); + return list; + } /// <summary> /// 澶勭悊鏂板寮傚父鍙嶉鎺ユ敹鍗曡〃鐨刯son @@ -1242,6 +1266,30 @@ } /// <summary> + /// 澶勭悊瀹夌伅閫愮骇鍛煎惛瑙勫垯涓昏〃鐨刯son + /// </summary> + /// <param name="jsonString"></param> + /// <returns></returns> + public List<Model.ClsOA_AndengFlowRuleBillMain> getObjectByJson_OA_AndengFlowRuleBill(string jsonString) + { + jsonString = "[" + jsonString.ToString() + "]"; + List<Model.ClsOA_AndengFlowRuleBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsOA_AndengFlowRuleBillMain>>(jsonString); + return list; + } + + /// <summary> + /// 澶勭悊瀹夌伅閫愮骇鍛煎惛瑙勫垯瀛愯〃鐨刯son + /// </summary> + /// <param name="jsonString"></param> + /// <returns></returns> + public List<Model.ClsOA_AndengFlowRuleBillSub> getObjectByJson_OA_AndengFlowRuleBillSub(string jsonString) + { + jsonString = "[" + jsonString.ToString() + "]"; + List<Model.ClsOA_AndengFlowRuleBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsOA_AndengFlowRuleBillSub>>(jsonString); + return list; + } + + /// <summary> /// 澶勭悊鏂板憳宸ユ妧鑳芥竻鍗曚富琛ㄧ殑json /// </summary> /// <param name="jsonString"></param> diff --git a/WebAPI/Models/Supplier.cs b/WebAPI/Models/Supplier.cs index 5508933..766438b 100644 --- a/WebAPI/Models/Supplier.cs +++ b/WebAPI/Models/Supplier.cs @@ -73,6 +73,7 @@ public long HUseOrgID { get; set; } + public string HMaterClass { get; set; } } } \ No newline at end of file diff --git "a/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Duty.cs" "b/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Duty.cs" index 9988568..074e8e2 100644 --- "a/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Duty.cs" +++ "b/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Duty.cs" @@ -18,5 +18,6 @@ public string HHelpCode { get; set; } public bool HStopflag; public int HEndFlag; + public string HUserCode; } } \ No newline at end of file diff --git a/WebAPI/Service/LuBaoSevice.cs b/WebAPI/Service/LuBaoSevice.cs index 3ef5df0..4fcbda0 100644 --- a/WebAPI/Service/LuBaoSevice.cs +++ b/WebAPI/Service/LuBaoSevice.cs @@ -643,6 +643,44 @@ } /// <summary> + /// 椤圭洰绫诲埆鏍规嵁id鑾峰彇淇℃伅 + /// </summary> + public static ApiResult<DataSet> GetGy_ProjectClassDetail(string HID) + { + if (string.IsNullOrEmpty(HID)) + return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" }; + var dataSet = GetGy_ProjectClassDb(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_ProjectClassDb(string HID) + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_ProjectClass where HItemID= " + HID + " ", "h_v_Gy_ProjectClass"); + return dataSet; + } + + /// <summary> + /// 浠诲姟绫诲埆鏍规嵁id鑾峰彇淇℃伅 + /// </summary> + public static ApiResult<DataSet> GetGy_TaskClassDetail(string HID) + { + if (string.IsNullOrEmpty(HID)) + return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" }; + var dataSet = GetGy_TaskClassDb(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_TaskClassDb(string HID) + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_TaskClass where HItemID= " + HID + " ", "h_v_Gy_TaskClass"); + return dataSet; + } + + /// <summary> /// 寮傚父鍙嶉绫诲瀷鏍规嵁id鑾峰彇淇℃伅 /// </summary> public static ApiResult<DataSet> GetGy_ErrMsgBackTypeDetail(string HID) @@ -651,7 +689,7 @@ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" }; var dataSet = GetGy_ErrMsgBackTypeDb(HID); if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) - return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄩ」鐩垂鐢ㄦ暟鎹�" }; + return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄥ紓甯稿弽棣堢被鍨嬫暟鎹�" }; return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet }; } public static DataSet GetGy_ErrMsgBackTypeDb(string HID) diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index 70ecba5..fca7dca 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -653,6 +653,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_TaskClass_Ctl.cs" /> + <Compile Include="DLL\ClsGy_ProjectClass_Ctl.cs" /> <Compile Include="DLL\ClsGy_StockCheckItem_Ctl.cs" /> <Compile Include="DLL\ClsGy_ProjectMoney_Ctl.cs" /> <Compile Include="DLL\ClsGy_SupType_Ctl.cs" /> -- Gitblit v1.9.1