From 5bee62e95d6cd1d5306e99c0e4b6349b663ca0ce Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期四, 09 一月 2025 09:15:49 +0800 Subject: [PATCH] 工艺路线孙表新增;排产锁定工单(添康反写排产完成日期到金蝶);批改小时产能;批改上班工时;不良原因添加班组过滤 --- WebAPI/Controllers/BaseSet/Gy_SupplierController.cs | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 55 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs b/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs index 11b96af..af67770 100644 --- a/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs @@ -9,6 +9,7 @@ using System.Web.Http; using WebAPI.Models; using System.Text.RegularExpressions; +using SyntacticSugar.constant; namespace WebAPI.Controllers { public class Gy_SupplierController : ApiController @@ -79,7 +80,61 @@ } } + #region 渚涘簲鍟嗗垎椤靛垪琛� + [Route("Gy_Supplier/page")] + [HttpGet] + public json Gy_SupplierPage(string sWhere, string user, int page, int size, string Organization) + { + DataSet ds; + json res = new json(); + try + { + List<object> columnNameList = new List<object>(); + //鍒ゆ柇鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Gy_Supplier", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + sWhere += ("and 缁勭粐鍚嶇О = '" + Organization + "'"); + sWhere = sWhere.Replace("'", "''"); + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("exec h_p_Gy_SupplierList " + page + "," + size + ",''", "h_p_Gy_SupplierList"); + } + else + { + ds = oCN.RunProcReturn("exec h_p_Gy_SupplierList " + page + "," + size + ",'" + sWhere + "'", "h_p_Gy_SupplierList"); + } + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } + + res.code = CodeConstant.SUCCEED; + res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); + res.Message = "Sucess锛�"; + res.list = columnNameList; + res.data = ds.Tables[0]; + return res; + } + catch (Exception e) + { + res.code = CodeConstant.FAIL; + res.count = CountConstant.FAIL; + res.Message = "Exception锛�" + e.ToString(); + res.data = null; + return res; + } + } + #endregion /// <summary> -- Gitblit v1.9.1