WebAPI/Controllers/BaseSet/Gy_CurrencyController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/BaseSet/Gy_StockPlaceController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/BaseSet/Gy_UnitController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/BaseSet/Gy_WorkCenterController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/SCGL/Sc_QualityReportBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/Sc_AssemblyBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Properties/PublishProfiles/API.pubxml.user | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/WebAPI.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
WebAPI/Controllers/BaseSet/Gy_CurrencyController.cs
New file @@ -0,0 +1,100 @@ 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 Gy_CurrencyController : 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("Gy_Currency/list1")] [HttpGet] public object list(string sWhere) { try { if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_Gy_CurrencyList " + sWhere, "h_v_Gy_CurrencyList"); } else { string sql1 = "select * from h_v_Gy_CurrencyList where 1 = 1 "; string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_Gy_CurrencyList"); } if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { 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("Gy_Currency/LoadTree")] [HttpGet] public object LoadTree_Json(string sWhere) { SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); ds = oCN.RunProcReturn("select * from h_v_CurrencyLoadTree", "h_v_CurrencyLoadTree"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } } // } } WebAPI/Controllers/BaseSet/Gy_StockPlaceController.cs
New file @@ -0,0 +1,539 @@ 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 Gy_DepartmentController : 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("Gy_Department/list")] [HttpGet] public object list(string sWhere) { try { if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_IF_DepartmentList " + sWhere, "h_v_IF_DepartmentList"); } else { string sql1 = "select * from h_v_IF_DepartmentList where 1 = 1 "; string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_IF_DepartmentList"); } if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { 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 查找记录 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_Department/cx")] [HttpGet] public object cx(long HInterID) { try { ds = oCN.RunProcReturn("select * from Gy_Department where hitemid = " + HInterID, "Gy_Department"); 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。 ///返回值:object。 /// </summary> [Route("Gy_Department/Delete_Json")] [HttpGet] public object Delete_Json(long HItemID,string User,string ModRightNameDelete) { DAL.ClsGy_Department_Ctl oDept = new DAL.ClsGy_Department_Ctl(); DAL.ClsGy_Department_View oDeptHlp = new DAL.ClsGy_Department_View(); try { if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, true,User)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有删除权限"; objJsonResult.data = null; return objJsonResult; } if (oDeptHlp.GetInfoByID(HItemID)) { if (oDept.HavChildCodes(HItemID)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "此项目存在子项目,不能删除!"; objJsonResult.data = null; return objJsonResult; } //删除前判断是否 已使用 20141020 if (oDeptHlp.omodel.HUseFlag != "未使用") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "此项目已使用或者未检测,不能删除!请重新检测再删除!"; objJsonResult.data = null; return objJsonResult; } // if (oDept.DeleteByID(HItemID)) { //写入日志 ClsPub.Add_Log("", "删除项目,代码:" + oDeptHlp.omodel.HNumber + ",名称:" + oDeptHlp.omodel.HName, ClsPub.CurUserName); //更新上级为 末级 objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "删除成功"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "删除失败"; objJsonResult.data = null; return objJsonResult; } } //ds = oCN.RunProcReturn("delete from Gy_Department where HItemID = " + HItemID, "Gy_Department"); 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; } } //[Route("Gy_Department/LoadTree")] //[HttpGet] //public object LoadTree_Json() //{ // DBUtility.Gy_BaseFun.LoadTree(tv, imageList1, this.Text, BillName); //} /// <summary> /// 部门列表禁用按钮 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_Department/JY_Json")] [HttpGet] public object JY_Json(long HItemID) { try { ds = oCN.RunProcReturn("update Gy_Department set HStopFlag = 1 where HItemID = " + HItemID, "Gy_Department"); 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; } } /// <summary> /// 部门列表反禁用按钮 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_Department/FJY_Json")] [HttpGet] public object FJY_Json(long HItemID) { try { ds = oCN.RunProcReturn("update Gy_Department set HStopFlag = 0 where HItemID = " + HItemID, "Gy_Department"); 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; } } /// <summary> /// 新增单据-保存按钮 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_Department/AddBill")] [HttpPost] public object AddBill([FromBody] JObject oMain) { try { var _value = oMain["oMain"].ToString(); string msg1 = _value.ToString(); //反序列化 msg1 = "[" + msg1.ToString() + "]"; DAL.ClsGy_Department_Ctl oDept = new DAL.ClsGy_Department_Ctl(); DAL.ClsGy_Department_View oDeptHlp = new DAL.ClsGy_Department_View(); List<Department> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Department>>(msg1); long HItemID = list[0].HItemID; string HNumber = list[0].HNumber; string HName = list[0].HName; string HShortNumber = list[0].HShortNumber; string HRemark = list[0].HRemark; string HUseFlag = list[0].HUseFlag; long HParentID = list[0].HParentID; string HBarCode = list[0].HBarCode; string HHelpCode = list[0].HHelpCode; long HSecManagerID = list[0].HSecManagerID; string HCreator = list[0].HCreator; long HCreateOrgID = list[0].HCreateOrgID; //DateTime HCreateDate = list[0].HCreateDate; long HUseOrgID = list[0].HUseOrgID; string HUpdater = list[0].HUpDater; //DateTime HUpdateDate = list[0].HUpDateDate; string HChecker = list[0].HChecker; //DateTime HCheckDate = list[0].HCheckDate; string HDeleteMan = list[0].HDeleteMan; //DateTime HDeleteDate = list[0].HDeleteDate; if (!DBUtility.ClsPub.AllowNumber(HNumber)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "代码中不能出现连续‘.’并且首位末位不能为‘.’!"; objJsonResult.data = null; return objJsonResult; } //若MAINDI重复则重新获取 oCN.BeginTran(); //主表 oCN.RunProc("Insert Into Gy_Department " + "(HNumber,HShortNumber,HName,HParentID" + ",HLevel,HEndFlag,HRemark,HStopFlag,HUseFlag" + ",HCREATEORGID,HUSEORGID,HBarCode,HCreator" + ",HUpdater,HChecker,HDeleteMan" + ",HSecManagerID,HCreateDate" + ") " + " values('" + HNumber + "','" + HShortNumber + "','" + HName + "',0" + ",'',0,'" + HRemark + "',0,''" + "," + HCreateOrgID + "," + HUseOrgID + ",'" + HBarCode + "','" + HCreator + "'" + ",'" + HUpdater + "','" + HChecker + "','" + HDeleteMan + "'" + "," + HSecManagerID + ", getdate()" + ") "); //修改上级为非末级代码 oCN.RunProc("Update Gy_Department set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); 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.Message; objJsonResult.data = null; return objJsonResult; } } /// <summary> /// 修改单据-保存按钮 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_Department/AddBill1")] [HttpPost] public object AddBill1([FromBody] JObject oMain) { try { DAL.ClsGy_Department_Ctl oDept = new DAL.ClsGy_Department_Ctl(); DAL.ClsGy_Department_View oDeptHlp = new DAL.ClsGy_Department_View(); var _value = oMain["oMain"].ToString(); string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); string msg4 = sArray[2].ToString(); string msg5 = sArray[3].ToString(); //反序列化 msg2 = "[" + msg2.ToString() + "]"; List<Department> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Department>>(msg2); long HItemID = int.Parse(msg3); string HNumber = list[0].HNumber; string HName = list[0].HName; string HShortNumber = list[0].HShortNumber; string HRemark = list[0].HRemark; string HUseFlag = list[0].HUseFlag; long HParentID = list[0].HParentID; string HBarCode = list[0].HBarCode; string HHelpCode = list[0].HHelpCode; long HSecManagerID = list[0].HSecManagerID; //string HCreator = list[0].HCreator; long HCreateOrgID = list[0].HCreateOrgID; //DateTime HCreateDate = list[0].HCreateDate; long HUseOrgID = list[0].HUseOrgID; string HUpdater = list[0].HUpDater; //DateTime HUpdateDate = list[0].HUpDateDate; string HChecker = list[0].HChecker; //DateTime HCheckDate = list[0].HCheckDate; string HDeleteMan = list[0].HDeleteMan; //DateTime HDeleteDate = list[0].HDeleteDate; //判断权限 if (!ClsPub.Security_Log(msg5, 1, true, msg4)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有找到该功能模块!"; objJsonResult.data = null; return objJsonResult; } if (!DBUtility.ClsPub.AllowNumber(HNumber)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "代码中不能出现连续‘.’并且首位末位不能为‘.’!"; objJsonResult.data = null; return objJsonResult; } if (oDept.HavSameNumber(HItemID, HNumber)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "代码重复!"; objJsonResult.data = null; return objJsonResult; } //若MAINDI重复则重新获取 oCN.BeginTran(); //主表 oCN.RunProc("Update Gy_Department set " + " HNumber='" + HNumber + "'" + ",HName='" + HName + "'" + ",HShortNumber='" + HShortNumber + "'" + ",HParentID=" + HParentID + ",HUpdater='" + HUpdater + "'" + ",HUpdateDate= getdate()" + ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); //修改子项目代码 //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Department,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); //将上级 为非末级 oCN.RunProc("Update Gy_Department set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); // 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.Message; objJsonResult.data = null; return objJsonResult; } } /// <summary> /// 获取最大基础资料ID ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_Department/GetMAXBillID")] [HttpGet] public object GetMAXBillID() { try { ds = oCN.RunProcReturn("select max(hitemid)+1 hitemid from Gy_Department", "Gy_Department"); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = ""; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } /// <summary> /// 部门列表修改按钮方法 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_Department/xg")] [HttpGet] public object xg(long HInterID) { try { ds = oCN.RunProcReturn("select * from Gy_Department where HItemID=" + HInterID, "Gy_Department"); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = ""; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } [Route("Gy_Department/LoadTree")] [HttpGet] public object LoadTree_Json(string sWhere) { SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); ds = oCN.RunProcReturn("select * from h_v_DepartmentLoadTree", "h_v_DepartmentLoadTree"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } } // } } WebAPI/Controllers/BaseSet/Gy_UnitController.cs
New file @@ -0,0 +1,100 @@ 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 Gy_UnitController : 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("Gy_Unit/list1")] [HttpGet] public object list(string sWhere) { try { if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_Gy_UnitList " + sWhere, "h_v_Gy_UnitList"); } else { string sql1 = "select * from h_v_Gy_UnitList where 1 = 1 "; string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_Gy_UnitList"); } if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { 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("Gy_Unit/LoadTree")] [HttpGet] public object LoadTree_Json(string sWhere) { SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); ds = oCN.RunProcReturn("select * from h_v_UnitLoadTree", "h_v_UnitLoadTree"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } } // } } WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs
@@ -116,6 +116,30 @@ } [Route("Gy_StockPlace/LoadTree")] [HttpGet] public object LoadTree_Json(string sWhere) { SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); ds = oCN.RunProcReturn("select * from h_v_StockPlaceLoadTree", "h_v_StockPlaceLoadTree"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } } // } WebAPI/Controllers/BaseSet/Gy_WorkCenterController.cs
New file @@ -0,0 +1,100 @@ 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 Gy_WorkCenterController : 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("Gy_WorkCenter/list1")] [HttpGet] public object list(string sWhere) { try { if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_Gy_WorkCenterList " + sWhere, "h_v_Gy_WorkCenterList"); } else { string sql1 = "select * from h_v_Gy_WorkCenterList where 1 = 1 "; string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_Gy_WorkCenterList"); } if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { 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("Gy_WorkCenter/LoadTree")] [HttpGet] public object LoadTree_Json(string sWhere) { SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); ds = oCN.RunProcReturn("select * from h_v_WorkCenterLoadTree", "h_v_WorkCenterLoadTree"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } } // } } WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
@@ -10,8 +10,8 @@ namespace WebAPI.Controllers { //生产汇报Controller public class Sc_ICMOReportBillController : ApiController //生产质量汇报Controller public class Sc_QualityReportBillController : ApiController { public DBUtility.ClsPub.Enum_BillStatus BillStatus; @@ -21,11 +21,11 @@ /// <summary> /// 返回生产汇报单列表 /// 返回生产质量汇报单列表 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Sc_ICMOReportBill/list")] [Route("Sc_QualityReportBill/list")] [HttpGet] public object list(string sWhere) { @@ -33,13 +33,13 @@ { if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_IF_ICMOReportBillList " + sWhere, "h_v_IF_ICMOReportBillList"); ds = oCN.RunProcReturn("select * from h_v_Sc_QualityReportBillList " + sWhere, "h_v_Sc_QualityReportBillList"); } else { string sql1 = "select * from h_v_IF_ICMOReportBillList where 1 = 1 "; string sql1 = "select * from h_v_Sc_QualityReportBillList where 1 = 1 "; string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOReportBillList"); ds = oCN.RunProcReturn(sql, "h_v_Sc_QualityReportBillList"); } if (ds == null || ds.Tables[0].Rows.Count == 0) { WebAPI/Controllers/SCGL/Sc_QualityReportBillController.cs
New file @@ -0,0 +1,121 @@ 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 { //生产汇报Controller public class Sc_ICMOReportBillController : 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("Sc_ICMOReportBill/list")] [HttpGet] public object list(string sWhere) { try { if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_IF_ICMOReportBillList " + sWhere, "h_v_IF_ICMOReportBillList"); } else { string sql1 = "select * from h_v_IF_ICMOReportBillList where 1 = 1 "; string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOReportBillList"); } if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { 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。 ///返回值:object。 /// </summary> [Route("Sc_AssemblyBill/list1")] [HttpGet] public object list1(string sWhere) { try { if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_Sc_AssemblyBillList " + sWhere, "h_v_Sc_AssemblyBillList"); } else { string sql1 = "select * from h_v_Sc_AssemblyBillList where 1 = 1 "; string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_Sc_AssemblyBillList"); } if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { 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/Sc_AssemblyBillController.cs
@@ -172,6 +172,16 @@ return objjson; } } [Route("Assembly/Delete_Json")] [HttpGet] public object Delete_Json(long sInterID,string sBarCode) WebAPI/Properties/PublishProfiles/API.pubxml.user
@@ -12,7 +12,7 @@ <ItemGroup> <File Include="apiapp.json"> <publishTime>04/12/2021 11:33:15</publishTime> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="bin/Antlr3.Runtime.dll"> <publishTime>02/22/2013 08:43:40</publishTime> @@ -27,25 +27,25 @@ <publishTime>05/07/2021 20:31:20</publishTime> </File> <File Include="bin/BLL.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="bin/DAL.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="bin/Dapper.dll"> <publishTime>07/22/2016 14:52:40</publishTime> </File> <File Include="bin/DBUtility.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="bin/Kingdee.BOS.WebApi.Client.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="bin/Kingdee.BOS.WebApi.FormService.dll"> <publishTime>04/26/2020 09:57:16</publishTime> <publishTime>09/20/2018 19:23:20</publishTime> </File> <File Include="bin/Kingdee.BOS.WebApi.ServicesStub.dll"> <publishTime>04/26/2020 09:57:16</publishTime> <publishTime>09/20/2018 19:28:34</publishTime> </File> <File Include="bin/Microsoft.Azure.AppService.ApiApps.Service.dll"> <publishTime>03/18/2015 17:02:50</publishTime> @@ -57,7 +57,7 @@ <publishTime>07/25/2012 11:48:56</publishTime> </File> <File Include="bin/Model.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="bin/Newtonsoft.Json.dll"> <publishTime>08/03/2014 20:33:56</publishTime> @@ -66,13 +66,13 @@ <publishTime>01/04/2011 13:48:18</publishTime> </File> <File Include="bin/Pub_Class.dll"> <publishTime>05/21/2020 10:51:50</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="bin/Pub_Control.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="bin/SQLHelper.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="bin/Swashbuckle.Core.dll"> <publishTime>02/15/2015 17:57:08</publishTime> @@ -138,7 +138,7 @@ <publishTime>11/28/2018 13:01:00</publishTime> </File> <File Include="bin/System.Web.Http.WebHost.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="bin/System.Web.Mvc.dll"> <publishTime>01/28/2015 04:02:18</publishTime> @@ -171,10 +171,10 @@ <publishTime>11/24/2014 11:18:48</publishTime> </File> <File Include="bin/WebAPI.dll"> <publishTime>05/08/2021 19:03:59</publishTime> <publishTime>05/14/2021 13:55:30</publishTime> </File> <File Include="bin/WebAPI.pdb"> <publishTime>05/08/2021 19:03:59</publishTime> <publishTime>05/14/2021 13:55:30</publishTime> </File> <File Include="bin/WebAPI.XmlSerializers.dll"> <publishTime>02/04/2021 21:35:21</publishTime> @@ -192,166 +192,166 @@ <publishTime>03/26/2019 14:23:20</publishTime> </File> <File Include="Content/bootstrap.css"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Content/bootstrap.min.css"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Content/Site.css"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="DLL/BLL.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="DLL/DAL.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="DLL/DBUtility.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="DLL/Kingdee.BOS.WebApi.Client.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="DLL/Model.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="DLL/Newtonsoft.Json.Net35.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="DLL/Pub_Class.dll"> <publishTime>05/21/2020 10:51:50</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="DLL/Pub_Control.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="DLL/SQLHelper.dll"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.eot"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.svg"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.ttf"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.woff"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Global.asax"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Index.html"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="packages.config"> <publishTime>01/21/2021 13:19:40</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="PrecompiledApp.config"> <publishTime>05/07/2021 20:31:19</publishTime> </File> <File Include="Views/Scripts/bootstrap.js"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Views/Scripts/bootstrap.min.js"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Views/Scripts/jquery-1.10.2.js"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Views/Scripts/jquery-1.10.2.min.js"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Views/Scripts/jquery-1.10.2.min.map"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Views/Scripts/jquery.validate.js"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Views/Scripts/jquery.validate.min.js"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Views/Scripts/jquery.validate.unobtrusive.js"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Views/Scripts/jquery.validate.unobtrusive.min.js"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Views/Scripts/modernizr-2.6.2.js"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Views/Shared/Error.cshtml"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Views/Shared/_Layout.cshtml"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Views/web.config"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Views/_ViewStart.cshtml"> <publishTime>01/13/2021 21:47:30</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Customer_Model.datasource"> <publishTime>02/22/2021 09:25:20</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Department_Model.datasource"> <publishTime>02/22/2021 09:25:20</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Employee_Model.datasource"> <publishTime>02/22/2021 09:25:20</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_StockPlace_Model.datasource"> <publishTime>02/22/2021 09:25:20</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Supplier_Model.datasource"> <publishTime>02/22/2021 09:25:20</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Warehouse_Model.datasource"> <publishTime>02/22/2021 09:25:20</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_BadReason_Model.datasource"> <publishTime>02/22/2021 09:25:20</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model_View.datasource"> <publishTime>02/22/2021 09:25:21</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Customer_Model.datasource"> <publishTime>02/22/2021 09:25:20</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Department_Model.datasource"> <publishTime>02/22/2021 09:25:20</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Employee_Model.datasource"> <publishTime>02/22/2021 09:25:21</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Group_Model.datasource"> <publishTime>02/22/2021 09:25:20</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Item30JiTai_Model.datasource"> <publishTime>02/22/2021 09:25:20</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Source_Model.datasource"> <publishTime>02/22/2021 09:25:21</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_StockPlace_Model.datasource"> <publishTime>02/22/2021 09:25:20</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Supplier_Model.datasource"> <publishTime>02/22/2021 09:25:21</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Warehouse_Model.datasource"> <publishTime>02/22/2021 09:25:20</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web References/WebS/ClsKf_ICStockBill_WMS.datasource"> <publishTime>02/22/2021 09:25:20</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> </File> <File Include="Web.config"> <publishTime>05/08/2021 19:04:06</publishTime> <publishTime>05/14/2021 13:55:35</publishTime> </File> </ItemGroup> </Project> WebAPI/WebAPI.csproj
@@ -315,6 +315,9 @@ <Compile Include="App_Start\RouteConfig.cs" /> <Compile Include="App_Start\SwaggerConfig.cs" /> <Compile Include="App_Start\WebApiConfig.cs" /> <Compile Include="Controllers\BaseSet\Gy_WorkCenterController.cs" /> <Compile Include="Controllers\BaseSet\Gy_CurrencyController.cs" /> <Compile Include="Controllers\BaseSet\Gy_UnitController.cs" /> <Compile Include="Controllers\BaseSet\Gy_BadReasonController.cs" /> <Compile Include="Controllers\BaseSet\Gy_CustomerController.cs" /> <Compile Include="Controllers\BaseSet\Gy_DepartmentController.cs" /> @@ -343,6 +346,7 @@ <Compile Include="Controllers\CJGL\Cj_StationInBillController.cs" /> <Compile Include="Controllers\CJGL\Cj_StationEntrustOutBillController.cs" /> <Compile Include="Controllers\JHGL\Gy_RoutingBillController.cs" /> <Compile Include="Controllers\SCGL\Sc_QualityReportBillController.cs" /> <Compile Include="Controllers\Sc_ProcessMangementController.cs" /> <Compile Include="Controllers\CJGL\Cj_StationEntrustInBillController.cs" /> <Compile Include="Controllers\LMESController.cs" />