WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/工资管理/Pay_MonthlySalaryReportController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/工资管理/Pay_PieceRateWageReportController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Models/动态列/OptionListModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/WebAPI.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
@@ -78,6 +78,106 @@ } } [Route("Cg_POOrderBill/list3")] [HttpGet] public object list3(string sWhere, string user) { try { List<string> optionList = new List<string>(); string sql = "select top 1 * from h_v_IF_POOrderBillList where 1 = 1 "; ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); if (ds != null) { foreach (DataColumn item in ds.Tables[0].Columns) { optionList.Add(@"{ field: 'hmainid', title: '"+ item.ToString() + "', sort: true, hide: false }"); } string option = string.Join(",",optionList); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.data = optionList.ToArray(); return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åå§åè¡¨æ ¼å¤±è´¥ï¼"; objJsonResult.data = null; return objJsonResult; } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exceptionï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } [Route("Cg_POOrderBill/list2")] [HttpGet] public object list2(string sWhere, string user) { try { List<OptionListModel> optionList = new List<OptionListModel>(); string sql = "select top 1 * from h_v_IF_POOrderBillList where 1 = 1 "; ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); if (ds != null) { foreach (DataColumn item in ds.Tables[0].Columns) { optionList.Add(new OptionListModel { field = item.ToString(), title = item.ToString(), sort = true, hide = false, }); } string option = string.Join(",", optionList); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.data = optionList; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åå§åè¡¨æ ¼å¤±è´¥ï¼"; objJsonResult.data = null; return objJsonResult; } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exceptionï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } /// <summary> /// éè´è®¢å åé ///åæ°ï¼string sqlã @@ -201,13 +301,13 @@ /// </summary> [Route("Cg_POOrderBill/Resynchronize")] [HttpGet] public object Resynchronize(string HBillNo,string HBillType) public object Resynchronize(string HBillNo, string HBillType) { try { oCN.BeginTran(); SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); DataSet DS = oCn.RunProcReturn("exec h_p_WMS_ERPSourceBillToLocal '" + HBillNo + "','"+ HBillType + "'", "h_p_WMS_ERPSourceBillToLocal"); DataSet DS = oCn.RunProcReturn("exec h_p_WMS_ERPSourceBillToLocal '" + HBillNo + "','" + HBillType + "'", "h_p_WMS_ERPSourceBillToLocal"); if (DS == null) { objJsonResult.code = "0"; @@ -325,7 +425,7 @@ else fidList.Add(dr["FID"].ToString() + dr["HINTERID"].ToString()); DataRow[] drs = dt.Select("FID = " + dr["FID"].ToString() + " and HINTERID = "+dr["HINTERID"].ToString()); DataRow[] drs = dt.Select("FID = " + dr["FID"].ToString() + " and HINTERID = " + dr["HINTERID"].ToString()); JObject model = new JObject(); model.Add("FBILLTYPEID", new JObject() { ["Fnumber"] = "SLD01_SYS" }); //åæ®ç±»å @@ -561,4 +661,5 @@ // } } WebAPI/Controllers/¹¤×ʹÜÀí/Pay_MonthlySalaryReportController.cs
New file @@ -0,0 +1,103 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Pub_Class; using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Web.Http; using WebAPI.Models; namespace WebAPI.Controllers { public class Pay_MonthlySalaryReportController : ApiController { public DBUtility.ClsPub.Enum_BillStatus BillStatus; private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; /// <summary> /// è¿åéè´è®¢åå表 ///åæ°ï¼string sqlã ///è¿åå¼ï¼objectã /// </summary> [Route("Pay_MonthlySalaryReport/list")] [HttpGet] public object list(string sWhere) { try { string sql = $"exec [h_p_MonthlySalaryReport] '{sWhere}'"; ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); 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; } } [Route("Pay_MonthlySalaryReport/list2")] [HttpGet] public object list2(string sWhere) { try { List<OptionListModel> optionList = new List<OptionListModel>(); string sql = $"exec [h_p_MonthlySalaryReport] '{sWhere}'"; ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); if (ds != null) { foreach (DataColumn item in ds.Tables[0].Columns) { optionList.Add(new OptionListModel { field = item.ToString(), title = item.ToString(), sort = true, hide = false, }); } string option = string.Join(",", optionList); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.data = optionList; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åå§åè¡¨æ ¼å¤±è´¥ï¼"; objJsonResult.data = null; return objJsonResult; } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exceptionï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } } } WebAPI/Controllers/¹¤×ʹÜÀí/Pay_PieceRateWageReportController.cs
New file @@ -0,0 +1,104 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Pub_Class; using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Web.Http; using WebAPI.Models; namespace WebAPI.Controllers { public class Pay_PieceRateWageReportController : ApiController { public DBUtility.ClsPub.Enum_BillStatus BillStatus; private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; /// <summary> /// è¿åéè´è®¢åå表 ///åæ°ï¼string sqlã ///è¿åå¼ï¼objectã /// </summary> [Route("Pay_PieceRateWageReport/list")] [HttpGet] public object list(string sWhere) { try { string sql = $"exec [h_p_PieceRateWageReport] '{sWhere}'"; ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); 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; } } [Route("Pay_PieceRateWageReport/list2")] [HttpGet] public object list2(string sWhere) { try { List<OptionListModel> optionList = new List<OptionListModel>(); string sql = $"exec [h_p_PieceRateWageReport] '{sWhere}'"; ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); if (ds != null) { foreach (DataColumn item in ds.Tables[0].Columns) { optionList.Add(new OptionListModel { field = item.ToString(), title = item.ToString(), sort = true, hide = false, }); } string option = string.Join(",", optionList); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.data = optionList; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åå§åè¡¨æ ¼å¤±è´¥ï¼"; objJsonResult.data = null; return objJsonResult; } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exceptionï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } } } WebAPI/Models/¶¯Ì¬ÁÐ/OptionListModel.cs
New file @@ -0,0 +1,16 @@ using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace WebAPI.Models { public class OptionListModel { public string field { get; set; } public string title { get; set; } public bool sort { get; set; } public bool hide { get; set; } } } WebAPI/WebAPI.csproj
@@ -428,6 +428,8 @@ <Compile Include="Controllers\ä»å管ç\éªæ¶å ¥åº\Kf_StepFoldinBillController.cs" /> <Compile Include="Controllers\忥èªå¨æ«ç 线\ScanlineAPIController.cs" /> <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_StockCheckItemBillController.cs" /> <Compile Include="Controllers\å·¥èµç®¡ç\Pay_MonthlySalaryReportController.cs" /> <Compile Include="Controllers\å·¥èµç®¡ç\Pay_PieceRateWageReportController.cs" /> <Compile Include="Controllers\å·¥èµç®¡ç\Gy_ClassTimePrjBillController.cs" /> <Compile Include="Controllers\å·¥èµç®¡ç\Gy_ClassTimePrjSubController.cs" /> <Compile Include="Controllers\å·¥èµç®¡ç\Pay_OtherBalBillController.cs" /> @@ -572,6 +574,7 @@ <Compile Include="Models\Sc_WorkBillSortBillSub.cs" /> <Compile Include="Models\Sc_WorkDemandPlanBillMain.cs" /> <Compile Include="Models\Sc_WorkDemandPlanBillSub.cs" /> <Compile Include="Models\卿å\OptionListModel.cs" /> <Compile Include="Models\å·¥èµç®¡ç\ClsGy_ClassTimePrj_Model.cs" /> <Compile Include="Models\å·¥èµç®¡ç\ClsPay_GroupBalBillEmp.cs" /> <Compile Include="Models\å·¥èµç®¡ç\ClsPay_GroupBalBillMain.cs" />