From 7d40b174741ff3ee372d46a03b111cddf4546739 Mon Sep 17 00:00:00 2001 From: 王 垚 <1402714037@qq.com> Date: 星期一, 12 十二月 2022 16:52:11 +0800 Subject: [PATCH] 1 --- Model/基础资料/其他基础资料/ClsGy_MatePriceSup_Model.cs | 2 Model/基础资料/基础资料/ClsGy_TaxMIXMain_Model.cs | 21 WebAPI/Controllers/基础资料/基础资料/Gy_MatePriceSupController.cs | 332 +++++++++++++ WebAPI/Controllers/BLL/Xt_BillTypeController.cs | 44 + WebAPI/Controllers/基础资料/基础资料/Gy_StockCheckItemBillController.cs | 8 Model/Model.csproj | 3 Model/基础资料/基础资料/ClsGy_TaxMIXSub_Model.cs | 16 Model/系统公用/ClsXt_BillType_Model.cs | 18 WebAPI/Controllers/基础资料/基础资料/Gy_CustLocationController.cs | 50 -- DAL/基础资料/其他基础资料/ClsGy_MatePriceSup_Ctl.cs | 62 + WebAPI/Controllers/基础资料/基础资料/Gy_SettleStyleController.cs | 393 ++++++++++++++++ WebAPI/ListModels.cs | 48 ++ WebAPI/Controllers/基础资料/基础资料/Gy_TaxMIXController.cs | 404 ++++++++++++++++ WebAPI/WebAPI.csproj | 6 14 files changed, 1,329 insertions(+), 78 deletions(-) diff --git "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePriceSup_Ctl.cs" "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePriceSup_Ctl.cs" index 8ac0595..32c854b 100644 --- "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePriceSup_Ctl.cs" +++ "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePriceSup_Ctl.cs" @@ -11,6 +11,7 @@ //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩� public string HOldNumber; public List<Model.ClsGy_MatePriceSup_Model> DetailColl = new List<Model.ClsGy_MatePriceSup_Model>(); + public Model.ClsGy_MatePriceSup_Model oModel = new Model.ClsGy_MatePriceSup_Model(); @@ -58,17 +59,26 @@ try { oCn.BeginTran(); - //鎻掑叆瀛愯〃 - foreach (Model.ClsGy_MatePriceSup_Model oSub in DetailColl) - { - oCn.RunProc("Insert into Gy_MatePriceSup " + - " (HInterID,HEntryID,HMaterID,HRelationID" + + //鎻掑叆琛� + //foreach (Model.ClsGy_MatePriceSup_Model oSub in DetailColl) + //{ + // oCn.RunProc("Insert into Gy_MatePriceSup " + + // " (HInterID,HEntryID,HMaterID,HRelationID" + + // ",HUnitID,HBeginQty,HEndQty,HCurID,HType" + + // ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate)" + + // " values(" + oSub.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HRelationID.ToString() + + // "," + oSub.HUnitID.ToString() + "," + oSub.HBeginQty.ToString() + "," + oSub.HEndQty.ToString() + "," + oSub.HCurID.ToString() + ",'" + oSub.HType + "'" + + // "," + oSub.HPrice.ToString() + ",'" + "GETDATE()" + "','" + "GETDATE()" + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') "); + //} + oCn.RunProc("Insert into " + MvarItemKey + " " + + " (HInterID,HEntryID,HMaterID,HRelationID" + ",HUnitID,HBeginQty,HEndQty,HCurID,HType" + - ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate)" + - " values(" + oSub.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HRelationID.ToString() + - "," + oSub.HUnitID.ToString() + "," + oSub.HBeginQty.ToString() + "," + oSub.HEndQty.ToString() + "," + oSub.HCurID.ToString() + ",'" + oSub.HType + "'" + - "," + oSub.HPrice.ToString() + ",'" + oSub.HBeginDate + "','" + oSub.HEndDate + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') "); - } + ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate) " + + " values(" + oModel.HInterID.ToString() + "," + oModel.HEntryID.ToString() + "," + oModel.HMaterID.ToString() + "," + oModel.HRelationID.ToString() + + "," + oModel.HUnitID.ToString() + "," + oModel.HBeginQty.ToString() + "," + oModel.HEndQty.ToString() + "," + oModel.HCurID.ToString() + ",'" + oModel.HType + "'" + + "," + oModel.HPrice.ToString() + ",'" + oModel.HBeginDate + "','" + oModel.HEndDate + "'," + oModel.HUsed + ",'" + oModel.HRemark + "','" + oModel.HMaker + "','" + oModel.HMakeDate + "') "); + //淇敼涓婄骇涓洪潪鏈骇浠g爜 + //oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); oCn.Commit(); return true; } @@ -85,18 +95,25 @@ try { oCn.BeginTran(); - DeleteByID(sItemID); //鍒犻櫎璁板綍 - //鎻掑叆琛� - foreach (Model.ClsGy_MatePriceSup_Model oSub in DetailColl) - { - oCn.RunProc("Insert into Gy_MatePriceSup " + - " (HInterID,HEntryID,HMaterID,HRelationID" + - ",HUnitID,HBeginQty,HEndQty,HCurID,HType" + - ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate)" + - " values(" + oSub.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HRelationID.ToString() + - "," + oSub.HUnitID.ToString() + "," + oSub.HBeginQty.ToString() + "," + oSub.HEndQty.ToString() + "," + oSub.HCurID.ToString() + ",'" + oSub.HType + "'" + - "," + oSub.HPrice.ToString() + ",'" + oSub.HBeginDate + "','" + oSub.HEndDate + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') "); - } + oCn.RunProc("Update " + MvarItemKey + " set " + + " HPrice='" + oModel.HPrice + "'" + + ",HRemark='" + oModel.HRemark + "'" + + ",HMaterID=" + oModel.HMaterID.ToString() + + ",HUnitID=" + oModel.HUnitID.ToString() + + ",HCurID=" + oModel.HCurID.ToString() + + " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo); + //DeleteByID(sItemID); //鍒犻櫎璁板綍 + ////鎻掑叆琛� + //foreach (Model.ClsGy_MatePriceSup_Model oSub in DetailColl) + //{ + // oCn.RunProc("Insert into Gy_MatePriceSup " + + // " (HInterID,HEntryID,HMaterID,HRelationID" + + // ",HUnitID,HBeginQty,HEndQty,HCurID,HType" + + // ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate)" + + // " values(" + oSub.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HRelationID.ToString() + + // "," + oSub.HUnitID.ToString() + "," + oSub.HBeginQty.ToString() + "," + oSub.HEndQty.ToString() + "," + oSub.HCurID.ToString() + ",'" + oSub.HType + "'" + + // "," + oSub.HPrice.ToString() + ",'" + oSub.HBeginDate + "','" + oSub.HEndDate + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') "); + //} oCn.Commit(); return true; } @@ -190,6 +207,7 @@ { MvarItemKey = "Gy_MatePriceSup"; MvarReportTitle = "閲囪喘浠锋牸璧勬枡璁剧疆"; + oModel = new Model.ClsGy_MatePriceSup_Model(); } } } diff --git a/Model/Model.csproj b/Model/Model.csproj index 55b9794..ca214a3 100644 --- a/Model/Model.csproj +++ b/Model/Model.csproj @@ -326,6 +326,8 @@ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_CheckToolsType_Model.cs" /> <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_CustLocation_Model.cs" /> <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_RateType_Model.cs" /> + <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_TaxMIXMain_Model.cs" /> + <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_TaxMIXSub_Model.cs" /> <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_TaxRate_Model.cs" /> <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_PaymentCondition_Model.cs" /> <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_Company_Model.cs" /> @@ -584,6 +586,7 @@ <Compile Include="绯荤粺鍏敤\ClsOA_EmpMessageBillModSub.cs" /> <Compile Include="绯荤粺鍏敤\ClsOA_FieldToChangeMain.cs" /> <Compile Include="绯荤粺鍏敤\ClsOA_FieldToChangeSub.cs" /> + <Compile Include="绯荤粺鍏敤\ClsXt_BillType_Model.cs" /> <Compile Include="绯荤粺鍏敤\ClsXt_ModuleParameterMain.cs" /> <Compile Include="绯荤粺鍏敤\ClsXt_ModuleParameterSub.cs" /> <Compile Include="琛屾斂绠$悊\ClsOF_DormCheckBookBillMain.cs" /> diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePriceSup_Model.cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePriceSup_Model.cs" index 2f59f77..2f53708 100644 --- "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePriceSup_Model.cs" +++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePriceSup_Model.cs" @@ -16,7 +16,7 @@ public DateTime HMakeDate;// datetime public string HChecker;// varchar(50) --审核人(列表可批量审核) public DateTime HCheckDate;// datetime - public bool HUsed;// bit //使用标记 + public long HUsed;// bit //使用标记 //-------------------------------------------- public long HMaterID;// int --物料内码 public long HRelationID;// int --关联内码(供应商,客户,供应商大类,客户大类,等等) 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_TaxMIXMain_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_TaxMIXMain_Model.cs" new file mode 100644 index 0000000..8cc2a7a --- /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_TaxMIXMain_Model.cs" @@ -0,0 +1,21 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Model +{ + public class ClsGy_TaxMIXMain_Model : DBUtility.ClsGy_Base_Model + { + public DateTime HMakeTime { get; set; } + public DateTime HCheckTime { get; set; } + public DateTime HModifyTime { get; set; } + public DateTime HStopTime { get; set; } + public string HMakeEmp { get; set; } + public string HCheckEmp { get; set; } + public string HModifyEmp { get; set; } + public string HStopEmp { get; set; } + public int HUSEORGID { get; set; } + public int HCREATEORGID { get; set; } + } +} 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_TaxMIXSub_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_TaxMIXSub_Model.cs" new file mode 100644 index 0000000..f6454ab --- /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_TaxMIXSub_Model.cs" @@ -0,0 +1,16 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Model +{ + public class ClsGy_TaxMIXSub_Model : DBUtility.ClsGy_Base_Model + { + public Int64 HItemID; //涓婚敭 int + public string HTAXBENCHMARK; + public Int64 FTAXRATEID; + public double FTAXBENCHMARKCORRVALUE; + public Int64 HTAXMIXID; + } +} diff --git "a/Model/\347\263\273\347\273\237\345\205\254\347\224\250/ClsXt_BillType_Model.cs" "b/Model/\347\263\273\347\273\237\345\205\254\347\224\250/ClsXt_BillType_Model.cs" new file mode 100644 index 0000000..c5e7656 --- /dev/null +++ "b/Model/\347\263\273\347\273\237\345\205\254\347\224\250/ClsXt_BillType_Model.cs" @@ -0,0 +1,18 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Model +{ + public class ClsXt_BillType_Model : DBUtility.ClsGy_Base_Model + { + public string HTemplate; //妯″潡鍚� + public string HHeadTable; //鏁版嵁搴撲富琛� + public string HEntryTable; //鏁版嵁搴撳瓙琛� + public string HViewName; + public string HRightName; + + public string HBilltypeID; + } +} diff --git a/WebAPI/Controllers/BLL/Xt_BillTypeController.cs b/WebAPI/Controllers/BLL/Xt_BillTypeController.cs index 00d594e..c8947ff 100644 --- a/WebAPI/Controllers/BLL/Xt_BillTypeController.cs +++ b/WebAPI/Controllers/BLL/Xt_BillTypeController.cs @@ -268,7 +268,49 @@ } } + #region 鍗曟嵁绫诲瀷 閲戣澏鍚屾 + [Route("Xt_BillType/SaveXt_BillTypeListApi")] + [HttpPost] + public object SaveXt_BillTypeListApi([FromBody] JObject msg) + { + try + { + var _value = msg["model"].ToString(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + ListModels oListModels = new ListModels(); + List<Model.ClsXt_BillType_Model> lsmain = new List<Model.ClsXt_BillType_Model>(); + lsmain = oListModels.getObjectByJson_Xt_BillType(_value); + string sql = string.Empty; + //淇濆瓨 + oCN.BeginTran(); + sql = $"delete Xt_BillType where HItemID = {lsmain[0].HItemID}"; + oCN.RunProc(sql); + //sql = "set identity_insert Xt_BillType on"; + //oCN.RunProc(sql); - // + oCN.RunProc($@"insert into Xt_BillType(HBilltypeID,HNumber,HName,HTemplate,HHeadTable,HEntryTable,HViewName,HRightName) + values('{lsmain[0].HBilltypeID}','{lsmain[0].HNumber}','{lsmain[0].HName}','{lsmain[0].HTemplate}','{lsmain[0].HHeadTable}','{lsmain[0].HEntryTable}','{lsmain[0].HViewName}','{lsmain[0].HRightName}' )", ref DBUtility.ClsPub.sExeReturnInfo); + //淇敼涓婄骇涓洪潪鏈骇浠g爜 + sql = "set identity_insert Xt_BillType off"; + oCN.RunProc(sql); + oCN.Commit(); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString(); + objJsonResult.data = 1; + return objJsonResult; + } + } + #endregion + } } \ No newline at end of file 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_CustLocationController.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_CustLocationController.cs" index 60b9271..12c083a 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_CustLocationController.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_CustLocationController.cs" @@ -342,55 +342,5 @@ } } #endregion - - #region 浜よ揣鍦扮偣 閲戣澏鍚屾 - [Route("Gy_CustLocation/SaveGy_CustLocationListApi")] - [HttpPost] - public object SaveGy_CustLocationListApi([FromBody] JObject msg) - { - try - { - var _value = msg["model"].ToString(); - SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - ListModels oListModels = new ListModels(); - List<Model.ClsGy_CustLocation_Model> lsmain = new List<Model.ClsGy_CustLocation_Model>(); - lsmain = oListModels.getObjectByJson_Gy_CustLocation(_value); - string sql = string.Empty; - //淇濆瓨 - oCN.BeginTran(); - sql = $"delete Gy_CustLocation where HItemID = {lsmain[0].HItemID}"; - oCN.RunProc(sql); - sql = "set identity_insert Gy_CustLocation on"; - oCN.RunProc(sql); - - oCN.RunProc($@"insert into Gy_CustLocation(HItemID,HNumber,HName ,HShortNumber,HParentID ,HLevel - ,HEndFla,HStopflag,HRemark ,HHelpCode ,HUseFlag - ,HMakeTime ,HMakeEmp ,HCheckEmp ,HCheckTime ,HModifyEmp - ,HModifyTime ,HStopEmp ,HStopTime ,HUSEORGID,HCREATEORGID) - values({lsmain[0].HItemID},'{lsmain[0].HNumber}','{lsmain[0].HName}','{lsmain[0].HShortNumber}',{lsmain[0].HParentID},{lsmain[0].HLevel} - ,{Convert.ToString(lsmain[0].HEndFlag ? 1 : 0)},{Convert.ToString(lsmain[0].HStopflag ? 1 : 0) },'{lsmain[0].HRemark}','{lsmain[0].HHelpCode}','{lsmain[0].HUseFlag}' - ,'{lsmain[0].HMakeTime}','{lsmain[0].HMakeEmp}','{lsmain[0].HCheckEmp}','{lsmain[0].HCheckTime}','{lsmain[0].HModifyEmp}' - ,'{lsmain[0].HModifyTime}','{lsmain[0].HStopEmp}',null,{lsmain[0].HUSEORGID},{lsmain[0].HCREATEORGID})", ref DBUtility.ClsPub.sExeReturnInfo); - //淇敼涓婄骇涓洪潪鏈骇浠g爜 - sql = "set identity_insert Gy_CustLocation off"; - oCN.RunProc(sql); - oCN.Commit(); - - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; - objJsonResult.data = 1; - return objJsonResult; - } - catch (Exception e) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString(); - objJsonResult.data = 1; - return objJsonResult; - } - } - #endregion } } \ No newline at end of file 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_MatePriceSupController.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_MatePriceSupController.cs" new file mode 100644 index 0000000..c2dd857 --- /dev/null +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePriceSupController.cs" @@ -0,0 +1,332 @@ +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using WebAPI.Models; + + +namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡 +{ + public class Gy_MatePriceSupController : ApiController + { + private json objJsonResult = new json(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + DataSet ds; + + #region 閲囪喘浠锋牸 鍒楄〃 + [Route("Gy_MatePriceSup/MatePriceSupList")] + [HttpGet] + public object MatePriceSupList(string sWhere, string user, string Organization) + { + try + { + List<object> columnNameList = new List<object>(); + //缂栬緫鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log_second("Gy_TaxRate_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + string sql1 = string.Format(@"select * from h_v_Gy_MatePriceSupList where 1 = 1 "); + + string sql = sql1 + sWhere; + ds = oCN.RunProcReturn(sql, "h_v_Gy_MatePriceSupList"); + + //娣诲姞鍒楀悕 + 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.list = columnNameList; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 閲囪喘浠锋牸 缂栬緫 + [Route("Gy_MatePriceSup/MatePriceSupEdit")] + [HttpPost] + public object MatePriceSupEdit([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(); + //string msg_HUSEORGID = sArray[2].ToString(); + Int64 HItemID = 0; + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + + //缂栬緫鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log_second("Gy_TaxRate_Edit", 1, false, msg2)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + //鑾峰彇鏈�澶D鍊艰祴鍊� + //DataSet Maxds = oCN.RunProcReturn("select MAX(HItemID) HItemID from Gy_TaxRate ", "Gy_TaxRate"); + //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"].ToString()==""?0: Maxds.Tables[0].Rows[0]["HItemID"])); + // maxid += 1; + // HItemID = maxid; + //} + ListModels oListModels = new ListModels(); + + try + { + DAL.ClsGy_MatePriceSup_Ctl oBill = new DAL.ClsGy_MatePriceSup_Ctl(); + List<Model.ClsGy_MatePriceSup_Model> lsmain = new List<Model.ClsGy_MatePriceSup_Model>(); + msg1 = msg1.Replace("\\", ""); + msg1 = msg1.Replace("\n", ""); //\n + lsmain = oListModels.getObjectByJson_Gy_MatePriceSup(msg1); + foreach (Model.ClsGy_MatePriceSup_Model oItem in lsmain) + { + //鏂板鏃跺垽鏂� + #region 鐖剁骇鏍¢獙鏂规硶锛坅pi璋冪敤鍏堟敞閲婃帀锛岋級 + /* + if (oItem.HItemID == 0) + { + if (ds == null || ds.Tables[0].Rows.Count > 0) + { + 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; + } + } + } + */ + #endregion + //oItem.HUSEORGID = Convert.ToInt32(msg_HUSEORGID); //缁勭粐id + oBill.oModel = oItem; + } + //淇濆瓨 + //淇濆瓨瀹屾瘯鍚庡鐞� + bool bResult; + if (oBill.oModel.HItemID == 0) + { + bResult = oBill.AddNew(); + } + else + { + bResult = oBill.ModifyByID(oBill.oModel.HItemID); + } + if (bResult) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; + //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�"); + objJsonResult.data = 1; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = 1; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString(); + objJsonResult.data = 1; + return objJsonResult; + } + } + #endregion + + #region 閲囪喘浠锋牸 鍒犻櫎 + [Route("Gy_MatePriceSup/Delete")] + [HttpGet] + public object Delete(string HItemID, string user) + { + DataSet ds; + try + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + //鍒犻櫎鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_TaxRate_Drop", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犲垹闄ゆ潈闄�"; + // objJsonResult.data = null; + // return objJsonResult; + //} + 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_MatePriceSup where HItemID=" + HItemID, "Gy_MatePriceSup"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒"; + objJsonResult.data = null; + return objJsonResult; ; + } + //var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]); + //if (HStopflag) + //{ + // oCN.RollBack();//鍥炴粴浜嬪姟 + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏁版嵁宸茬鐢ㄦ棤娉曞垹闄わ紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + oCN.RunProc("delete from Gy_MatePriceSup 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 閲囪喘浠锋牸 閲戣澏鍚屾 + [Route("Gy_MatePriceSup/SaveGy_MatePriceSupListApi")] + [HttpPost] + public object SaveGy_MatePriceSupListApi([FromBody] JObject msg) + { + try + { + var _value = msg["model"].ToString(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + ListModels oListModels = new ListModels(); + List<Model.ClsGy_MatePriceSup_Model> lsmain = new List<Model.ClsGy_MatePriceSup_Model>(); + lsmain = oListModels.getObjectByJson_Gy_MatePriceSup(_value); + string sql = string.Empty; + //淇濆瓨 + oCN.BeginTran(); + sql = $"delete Gy_MatePriceSup where HItemID = {lsmain[0].HItemID}"; + oCN.RunProc(sql); + sql = "set identity_insert Gy_MatePriceSup on"; + oCN.RunProc(sql); + + oCN.RunProc($@"insert into Gy_MatePriceSup(HItemID,HInterID,HEntryID,HMaterID,HRelationID,HUnitID,HBeginQty,HEndQty,HCurID,HType + ,HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate) + values({lsmain[0].HItemID},{lsmain[0].HInterID},{lsmain[0].HEntryID},{lsmain[0].HMaterID},{lsmain[0].HRelationID},{lsmain[0].HUnitID},{lsmain[0].HBeginQty},{lsmain[0].HEndQty},{lsmain[0].HCurID},'{lsmain[0].HType}',{lsmain[0].HPrice},'{lsmain[0].HBeginDate}','{lsmain[0].HEndDate}','{lsmain[0].HUsed}','{lsmain[0].HRemark}','{lsmain[0].HMaker}','{lsmain[0].HMakeDate}')", ref DBUtility.ClsPub.sExeReturnInfo); + //淇敼涓婄骇涓洪潪鏈骇浠g爜 + sql = "set identity_insert Gy_MatePriceSup off"; + oCN.RunProc(sql); + oCN.Commit(); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString(); + objJsonResult.data = 1; + return objJsonResult; + } + } + #endregion + } +} \ No newline at end of file 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_SettleStyleController.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_SettleStyleController.cs" new file mode 100644 index 0000000..8d79356 --- /dev/null +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SettleStyleController.cs" @@ -0,0 +1,393 @@ +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using WebAPI.Models; + + +namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡 +{ + public class Gy_SettleStyleController : ApiController + { + private json objJsonResult = new json(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + DataSet ds; + + #region 缁撶畻鏂瑰紡 鍒楄〃 + [Route("Gy_SettleStyle/SettleStyleList")] + [HttpGet] + public object SettleStyleList(string sWhere, string user, string Organization) + { + try + { + List<object> columnNameList = new List<object>(); + //缂栬緫鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log_second("Gy_TaxRate_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + string sql1 = string.Format(@"select * from h_v_Gy_SettleStyleList where 1 = 1 "); + + string sql = sql1 + sWhere; + ds = oCN.RunProcReturn(sql, "h_v_Gy_SettleStyleList"); + + //娣诲姞鍒楀悕 + 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.list = columnNameList; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 缁撶畻鏂瑰紡 缂栬緫 + [Route("Gy_SettleStyle/SettleStyleEdit")] + [HttpPost] + public object SettleStyleEdit([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(); + //string msg_HUSEORGID = sArray[2].ToString(); + Int64 HItemID = 0; + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + + //缂栬緫鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log_second("Gy_TaxRate_Edit", 1, false, msg2)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + //鑾峰彇鏈�澶D鍊艰祴鍊� + //DataSet Maxds = oCN.RunProcReturn("select MAX(HItemID) HItemID from Gy_TaxRate ", "Gy_TaxRate"); + //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"].ToString()==""?0: Maxds.Tables[0].Rows[0]["HItemID"])); + // maxid += 1; + // HItemID = maxid; + //} + ListModels oListModels = new ListModels(); + + try + { + DAL.ClsGy_SettleStyle_Ctl oBill = new DAL.ClsGy_SettleStyle_Ctl(); + List<Model.ClsGy_SettleStyle_Model> lsmain = new List<Model.ClsGy_SettleStyle_Model>(); + msg1 = msg1.Replace("\\", ""); + msg1 = msg1.Replace("\n", ""); //\n + lsmain = oListModels.getObjectByJson_Gy_SettleStyle(msg1); + foreach (Model.ClsGy_SettleStyle_Model oItem in lsmain) + { + if (oItem.HNumber.Trim() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷笉鑳戒负绌猴紒"; + objJsonResult.data = 1; + return objJsonResult; + } + if (oItem.HName.Trim() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佸悕绉颁笉鑳戒负绌猴紒"; + objJsonResult.data = 1; + return objJsonResult; + } + + //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮� + ds = oCN.RunProcReturn("select * from Gy_SettleStyle where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_SettleStyle"); + if (oItem.HItemID == 0) + { + if (ds.Tables[0].Rows.Count > 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒"; + objJsonResult.data = null; + return objJsonResult; + } + } + else + { + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["HItemID"].ToString() != oItem.HItemID.ToString()) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒"; + objJsonResult.data = null; + return objJsonResult; + } + } + } + + + //鏂板鏃跺垽鏂� + #region 鐖剁骇鏍¢獙鏂规硶锛坅pi璋冪敤鍏堟敞閲婃帀锛岋級 + /* + if (oItem.HItemID == 0) + { + if (ds == null || ds.Tables[0].Rows.Count > 0) + { + 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; + } + } + } + */ + #endregion + //寰楀埌鐭唬鐮� + string sShortNumber; + sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim()); + if (sShortNumber.Trim() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + //oItem.HUSEORGID = Convert.ToInt32(msg_HUSEORGID); //缁勭粐id + oItem.HShortNumber = sShortNumber;//鐭唬鐮� + oItem.HEndFlag = true;//鏈骇鏍囧織 + oItem.HLevel = 1; //绛夌骇 DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()) + oBill.oModel = oItem; + } + //淇濆瓨 + //淇濆瓨瀹屾瘯鍚庡鐞� + bool bResult; + if (oBill.oModel.HItemID == 0) + { + bResult = oBill.AddNew(); + } + else + { + bResult = oBill.ModifyByID(oBill.oModel.HItemID); + } + if (bResult) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; + //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�"); + objJsonResult.data = 1; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = 1; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString(); + objJsonResult.data = 1; + return objJsonResult; + } + } + #endregion + + #region 缁撶畻鏂瑰紡 鍒犻櫎 + [Route("Gy_SettleStyle/Delete")] + [HttpGet] + public object Delete(string HItemID, string user) + { + DataSet ds; + try + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + //鍒犻櫎鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_TaxRate_Drop", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犲垹闄ゆ潈闄�"; + // objJsonResult.data = null; + // return objJsonResult; + //} + 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_SettleStyle where HItemID=" + HItemID, "Gy_SettleStyle"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒"; + objJsonResult.data = null; + return objJsonResult; ; + } + var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]); + if (HStopflag) + { + oCN.RollBack();//鍥炴粴浜嬪姟 + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏁版嵁宸茬鐢ㄦ棤娉曞垹闄わ紒"; + objJsonResult.data = null; + return objJsonResult; + } + + oCN.RunProc("delete from Gy_SettleStyle 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 缁撶畻鏂瑰紡 閲戣澏鍚屾 + [Route("Gy_SettleStyle/SaveGy_SettleStyleListApi")] + [HttpPost] + public object SaveGy_SettleStyleListApi([FromBody] JObject msg) + { + try + { + var _value = msg["model"].ToString(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + ListModels oListModels = new ListModels(); + List<Model.ClsGy_SettleStyle_Model> lsmain = new List<Model.ClsGy_SettleStyle_Model>(); + lsmain = oListModels.getObjectByJson_Gy_SettleStyle(_value); + string sql = string.Empty; + //淇濆瓨 + oCN.BeginTran(); + sql = $"delete Gy_SettleStyle where HItemID = {lsmain[0].HItemID}"; + oCN.RunProc(sql); + sql = "set identity_insert Gy_SettleStyle on"; + oCN.RunProc(sql); + + oCN.RunProc($@"insert into Gy_SettleStyle(HItemID,HNumber,HName,HHelpCode,HShortNumber,HParentID + ,HLevel,HEndFlag,HStopflag,HRemark) + values({lsmain[0].HItemID},'{lsmain[0].HNumber}','{lsmain[0].HName}','{lsmain[0].HHelpCode}','{lsmain[0].HShortNumber}',{lsmain[0].HParentID},{lsmain[0].HLevel} + ,{Convert.ToString(lsmain[0].HEndFlag ? 1 : 0)},{Convert.ToString(lsmain[0].HStopflag ? 1 : 0) },'{lsmain[0].HRemark}')", ref DBUtility.ClsPub.sExeReturnInfo); + //淇敼涓婄骇涓洪潪鏈骇浠g爜 + sql = "set identity_insert Gy_SettleStyle off"; + oCN.RunProc(sql); + oCN.Commit(); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString(); + objJsonResult.data = 1; + return objJsonResult; + } + } + #endregion + } +} \ No newline at end of file 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_StockCheckItemBillController.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_StockCheckItemBillController.cs" index 9366d7c..84248b3 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_StockCheckItemBillController.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_StockCheckItemBillController.cs" @@ -472,7 +472,7 @@ string userID = sArray[2].ToString();//userID string sName = sArray[3].ToString();//鐩樼偣鏂规 //鏌ヨ鐩樼偣鏂规鍒涘缓鏃ユ湡 - DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName=" + sName, "Gy_StockCheckItem"); + DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName='" + sName+"'", "Gy_StockCheckItem"); string HDate = dd.Tables[0].Rows[0]["HMakeTime"].ToString(); //杞寲鏍煎紡 @@ -561,7 +561,7 @@ string userID = sArray[2].ToString();//userID string sName = sArray[3].ToString();//鐩樼偣鏂规 //鏌ヨ鐩樼偣鏂规鍒涘缓鏃ユ湡 - DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName=" + sName, "Gy_StockCheckItem"); + DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName='" + sName + "'", "Gy_StockCheckItem"); string HDate = dd.Tables[0].Rows[0]["HMakeTime"].ToString(); //杞寲鏍煎紡 @@ -764,7 +764,7 @@ string userID = sArray[2].ToString();//userID string sName = sArray[3].ToString();//鐩樼偣鏂规 //鏌ヨ鐩樼偣鏂规鍒涘缓鏃ユ湡 - DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName=" + sName, "Gy_StockCheckItem"); + DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName='" + sName + "'", "Gy_StockCheckItem"); string HDate = dd.Tables[0].Rows[0]["HMakeTime"].ToString(); //杞寲鏍煎紡 @@ -852,7 +852,7 @@ string userID = sArray[2].ToString();//userID string sName = sArray[3].ToString();//鐩樼偣鏂规 //鏌ヨ鐩樼偣鏂规鍒涘缓鏃ユ湡 - DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName=" + sName, "Gy_StockCheckItem"); + DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName='" + sName + "'", "Gy_StockCheckItem"); string HDate = dd.Tables[0].Rows[0]["HMakeTime"].ToString(); //杞寲鏍煎紡 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_TaxMIXController.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_TaxMIXController.cs" new file mode 100644 index 0000000..2279de3 --- /dev/null +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_TaxMIXController.cs" @@ -0,0 +1,404 @@ +锘縰sing Model; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using WebAPI.Models; + +namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡 +{ + public class Gy_TaxMIXController : ApiController + { + private json objJsonResult = new json(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + DataSet ds; + + //#region 绋庣巼缁勫悎 鍒楄〃 + //[Route("Gy_TaxMIX/TaxMIXList")] + //[HttpGet] + //public object TaxMIXList(string sWhere, string user, string Organization) + //{ + // try + // { + // List<object> columnNameList = new List<object>(); + // //缂栬緫鏉冮檺 + // //if (!DBUtility.ClsPub.Security_Log_second("Gy_TaxRate_Query", 1, false, user)) + // //{ + // // objJsonResult.code = "0"; + // // objJsonResult.count = 0; + // // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // // objJsonResult.data = null; + // // return objJsonResult; + // //} + // string sql1 = string.Format(@"select * from h_v_Gy_TaxMIXList where 浣跨敤缁勭粐='" + Organization + "'"); + + // string sql = sql1 + sWhere; + // ds = oCN.RunProcReturn(sql, "h_v_Gy_TaxMIXList"); + + // //娣诲姞鍒楀悕 + // 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.list = columnNameList; + // objJsonResult.data = ds.Tables[0]; + // return objJsonResult; + // } + // catch (Exception e) + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "Exception锛�" + e.ToString(); + // objJsonResult.data = null; + // return objJsonResult; + // } + //} + //#endregion + + //#region 绋庣巼缁勫悎 缂栬緫 + //[Route("Gy_TaxMIX/TaxMIXEdit")] + //[HttpPost] + //public object TaxMIXEdit([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(); + // //string msg_HUSEORGID = sArray[2].ToString(); + // Int64 HItemID = 0; + // SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + + // //缂栬緫鏉冮檺 + // //if (!DBUtility.ClsPub.Security_Log_second("Gy_TaxRate_Edit", 1, false, msg2)) + // //{ + // // objJsonResult.code = "0"; + // // objJsonResult.count = 0; + // // objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒"; + // // objJsonResult.data = null; + // // return objJsonResult; + // //} + + // //鑾峰彇鏈�澶D鍊艰祴鍊� + // //DataSet Maxds = oCN.RunProcReturn("select MAX(HItemID) HItemID from Gy_TaxRate ", "Gy_TaxRate"); + // //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"].ToString()==""?0: Maxds.Tables[0].Rows[0]["HItemID"])); + // // maxid += 1; + // // HItemID = maxid; + // //} + // ListModels oListModels = new ListModels(); + + // try + // { + // DAL.ClsGy_TaxMIX_Ctl oBill = new DAL.ClsGy_TaxMIX_Ctl(); + // List<Model.ClsGy_TaxMIX_Model> lsmain = new List<Model.ClsGy_TaxMIX_Model>(); + // msg1 = msg1.Replace("\\", ""); + // msg1 = msg1.Replace("\n", ""); //\n + // lsmain = oListModels.getObjectByJson_Gy_TaxMIX(msg1); + // foreach (Model.ClsGy_TaxMIX_Model oItem in lsmain) + // { + // if (oItem.HNumber.Trim() == "") + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷笉鑳戒负绌猴紒"; + // objJsonResult.data = 1; + // return objJsonResult; + // } + // if (oItem.HName.Trim() == "") + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "淇濆瓨澶辫触锛佸悕绉颁笉鑳戒负绌猴紒"; + // objJsonResult.data = 1; + // return objJsonResult; + // } + + // //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮� + // ds = oCN.RunProcReturn("select * from Gy_TaxMIX where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_TaxMIX"); + // if (oItem.HItemID == 0) + // { + // if (ds.Tables[0].Rows.Count > 0) + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒"; + // objJsonResult.data = null; + // return objJsonResult; + // } + // } + // else + // { + // if (ds.Tables[0].Rows.Count > 0) + // { + // if (ds.Tables[0].Rows[0]["HItemID"].ToString() != oItem.HItemID.ToString()) + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒"; + // objJsonResult.data = null; + // return objJsonResult; + // } + // } + // } + + + // //鏂板鏃跺垽鏂� + // #region 鐖剁骇鏍¢獙鏂规硶锛坅pi璋冪敤鍏堟敞閲婃帀锛岋級 + // /* + // if (oItem.HItemID == 0) + // { + // if (ds == null || ds.Tables[0].Rows.Count > 0) + // { + // 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; + // } + // } + // } + // */ + // #endregion + // //寰楀埌鐭唬鐮� + // string sShortNumber; + // sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim()); + // if (sShortNumber.Trim() == "") + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�"; + // objJsonResult.data = 1; + // return objJsonResult; + // } + // //oItem.HUSEORGID = Convert.ToInt32(msg_HUSEORGID); //缁勭粐id + // oItem.HShortNumber = sShortNumber;//鐭唬鐮� + // oItem.HEndFlag = true;//鏈骇鏍囧織 + // oItem.HLevel = 1; //绛夌骇 DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()) + // oBill.oModel = oItem; + // } + // //淇濆瓨 + // //淇濆瓨瀹屾瘯鍚庡鐞� + // bool bResult; + // if (oBill.oModel.HItemID == 0) + // { + // bResult = oBill.AddNew(); + // } + // else + // { + // bResult = oBill.ModifyByID(oBill.oModel.HItemID); + // } + // if (bResult) + // { + // objJsonResult.code = "1"; + // objJsonResult.count = 1; + // objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; + // //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�"); + // objJsonResult.data = 1; + // return objJsonResult; + // } + // else + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo; + // objJsonResult.data = 1; + // return objJsonResult; + // } + // } + // catch (Exception e) + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString(); + // objJsonResult.data = 1; + // return objJsonResult; + // } + //} + //#endregion + + //#region 绋庣巼缁勫悎 鍒犻櫎 + //[Route("Gy_TaxMIX/Delete")] + //[HttpGet] + //public object Delete(string HItemID, string user) + //{ + // DataSet ds; + // try + // { + // SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + // //鍒犻櫎鏉冮檺 + // //if (!DBUtility.ClsPub.Security_Log("Gy_TaxRate_Drop", 1, false, user)) + // //{ + // // objJsonResult.code = "0"; + // // objJsonResult.count = 0; + // // objJsonResult.Message = "鏃犲垹闄ゆ潈闄�"; + // // objJsonResult.data = null; + // // return objJsonResult; + // //} + // 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_TaxMIX where HItemID=" + HItemID, "Gy_TaxMIX"); + // if (ds == null || ds.Tables[0].Rows.Count == 0) + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒"; + // objJsonResult.data = null; + // return objJsonResult; ; + // } + // var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]); + // if (HStopflag) + // { + // oCN.RollBack();//鍥炴粴浜嬪姟 + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏁版嵁宸茬鐢ㄦ棤娉曞垹闄わ紒"; + // objJsonResult.data = null; + // return objJsonResult; + // } + + // oCN.RunProc("delete from Gy_TaxMIX 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 绋庣巼缁勫悎 閲戣澏鍚屾 + [Route("Gy_TaxMIXMain/SaveGy_TaxMIXMainListApi")] + [HttpPost] + public object SaveGy_TaxMIXListApi([FromBody] JObject sMainSub) + { + try + { + var model = sMainSub["model"].ToString(); + var entry = sMainSub["model"]["HENTRY"].ToString(); + + model = "[" + model.ToString() + "]"; + List<ClsGy_TaxMIXMain_Model> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsGy_TaxMIXMain_Model>>(model); + List<ClsGy_TaxMIXSub_Model> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsGy_TaxMIXSub_Model>>(entry); + string sql = string.Empty; + oCN.BeginTran(); + sql = $"delete Gy_TaxMIXMain where HItemID = {mainList[0].HItemID}"; + oCN.RunProc(sql); + sql = $"delete Gy_TaxMIXSub where HItemID = {mainList[0].HItemID}"; + oCN.RunProc(sql); + //涓昏〃 + oCN.RunProc($@"insert into Gy_TaxMIXMain(HItemID,HNumber,HName ,HShortNumber,HParentID ,HLevel + ,HEndFlag,HStopflag,HRemark ,HHelpCode ,HUseFlag + ,HMakeTime ,HMakeEmp ,HCheckEmp ,HCheckTime ,HModifyEmp + ,HModifyTime ,HStopEmp ,HStopTime ,HUSEORGID,HCREATEORGID) + values({mainList[0].HItemID},'{mainList[0].HNumber}','{mainList[0].HName}','{mainList[0].HShortNumber}',{mainList[0].HParentID},{mainList[0].HLevel} + ,{Convert.ToString(mainList[0].HEndFlag ? 1 : 0)},{Convert.ToString(mainList[0].HStopflag ? 1 : 0) },'{mainList[0].HRemark}','{mainList[0].HHelpCode}','{mainList[0].HUseFlag}' + ,'{mainList[0].HMakeTime}','{mainList[0].HMakeEmp}','{mainList[0].HCheckEmp}','{mainList[0].HCheckTime}','{mainList[0].HModifyEmp}' + ,'{mainList[0].HModifyTime}','{mainList[0].HStopEmp}',null,{mainList[0].HUSEORGID},{mainList[0].HCREATEORGID})", ref DBUtility.ClsPub.sExeReturnInfo); + //淇濆瓨涓昏〃 + foreach (var oSub in subList) + { + oCN.RunProc($@"Insert into Gy_TaxMIXSub + (HItemID,FTAXMIXID,HTAXBENCHMARK,FTAXRATEID + ,FTAXBENCHMARKCORRVALUE) + values({oSub.HItemID},{oSub.HTAXMIXID},{oSub.HTAXBENCHMARK} + ,{oSub.FTAXRATEID},{oSub.FTAXBENCHMARKCORRVALUE})"); + } + 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 = "淇濆瓨澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + } +} \ No newline at end of file diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs index ad55bde..c0fd237 100644 --- a/WebAPI/ListModels.cs +++ b/WebAPI/ListModels.cs @@ -909,6 +909,54 @@ } /// <summary> + /// 澶勭悊缁撶畻鏂瑰紡琛ㄧ殑json + /// </summary> + /// <param name="jsonString"></param> + /// <returns></returns> + public List<Model.ClsGy_SettleStyle_Model> getObjectByJson_Gy_SettleStyle(string jsonString) + { + jsonString = "[" + jsonString.ToString() + "]"; + List<Model.ClsGy_SettleStyle_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_SettleStyle_Model>>(jsonString); + return list; + } + + /// <summary> + /// 澶勭悊绋庣巼缁勫悎琛ㄧ殑json + /// </summary> + /// <param name="jsonString"></param> + /// <returns></returns> + public List<Model.ClsGy_TaxMIXMain_Model> getObjectByJson_Gy_TaxMIXMain(string jsonString) + { + jsonString = "[" + jsonString.ToString() + "]"; + List<Model.ClsGy_TaxMIXMain_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_TaxMIXMain_Model>>(jsonString); + return list; + } + + /// <summary> + /// 澶勭悊閲囪喘浠锋牸琛ㄧ殑json + /// </summary> + /// <param name="jsonString"></param> + /// <returns></returns> + public List<Model.ClsGy_MatePriceSup_Model> getObjectByJson_Gy_MatePriceSup(string jsonString) + { + jsonString = "[" + jsonString.ToString() + "]"; + List<Model.ClsGy_MatePriceSup_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_MatePriceSup_Model>>(jsonString); + return list; + } + + /// <summary> + /// 澶勭悊鍗曟嵁绫诲瀷琛ㄧ殑json + /// </summary> + /// <param name="jsonString"></param> + /// <returns></returns> + public List<Model.ClsXt_BillType_Model> getObjectByJson_Xt_BillType(string jsonString) + { + jsonString = "[" + jsonString.ToString() + "]"; + List<Model.ClsXt_BillType_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsXt_BillType_Model>>(jsonString); + return list; + } + + /// <summary> /// 澶勭悊鏀舵鏉′欢琛ㄧ殑json /// </summary> /// <param name="jsonString"></param> diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index 6804fd4..5244cb1 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -448,15 +448,18 @@ <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_COMMONCONTACTBillController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_CustLocationController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DutyBillController.cs" /> + <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_MatePriceSupController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_PaymentConditionListBillController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_RateTypeController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_RecConditionBillController.cs" /> + <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_SettleStyleController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_SOPBillController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_SOPBillEditController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_SOPBillListController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_StockCheckItemBillController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_StockStatusBillController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_SupplierContactBillController.cs" /> + <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_TaxMIXController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_TaxRateBillController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_WorkStationBillController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Xt_CheckFlowBillController.cs" /> @@ -894,14 +897,17 @@ <Folder Include="Views\Gy_EquipType\" /> <Folder Include="Views\Gy_ICBomBill\" /> <Folder Include="Views\Gy_MateMould\" /> + <Folder Include="Views\Gy_MatePriceSup\" /> <Folder Include="Views\Gy_PackType\" /> <Folder Include="Views\Gy_PaymentConditionListBill\" /> <Folder Include="Views\Gy_RateType\" /> <Folder Include="Views\Gy_RecConditionBill\" /> <Folder Include="Views\Gy_RoutingGroup\" /> + <Folder Include="Views\Gy_SettleStyle\" /> <Folder Include="Views\Gy_SOPBill\" /> <Folder Include="Views\Gy_StockStatusBill\" /> <Folder Include="Views\Gy_SupplierContactBill\" /> + <Folder Include="Views\Gy_TaxMIXMain\" /> <Folder Include="Views\Gy_TaxRateBill\" /> <Folder Include="Views\Gy_WorkStation\" /> <Folder Include="Views\JIT_DayPlanPlatFormBill\" /> -- Gitblit v1.9.1