| | |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Net; |
| | |
| | | string unitid = obj["id"].ToString(); //往来单位id(主键) |
| | | string unitcode = obj["unitcode"].ToString(); //往来单位编码编码 |
| | | string unitname = obj["unitname"].ToString(); //往来单位名称 |
| | | string mtypecode = obj["mtypecode"].ToString(); //外购供方编码 |
| | | string btypecode = obj["btypecode"].ToString(); //外协供方编码 |
| | | string htypecode = obj["htypecode"].ToString(); //客户编码 |
| | | string typecode = obj["typecode"].ToString(); //单位属性编码 |
| | | string person = obj["person"].ToString(); //联系人 |
| | | string contact = obj["contact"].ToString(); //联系方式 |
| | | string description = obj["description"].ToString(); //补充描述 |
| | | var usercode = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); |
| | | string OperType = obj["OperType"].ToString(); //操作类型 |
| | | mes = BasicSettingBLL.AddUpdateCurrentUnit(unitid, unitcode, unitname, mtypecode, btypecode,htypecode, person, contact, description, usercode, OperType); |
| | | mes = BasicSettingBLL.AddUpdateCurrentUnit(unitid, unitcode, unitname, typecode, person, contact, description, usercode, OperType); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[安灯系统/自定义安灯呼叫类型查询] |
| | | /// <summary> |
| | | /// 安灯系统/自定义安灯呼叫类型查询 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route(template: "AnDengTypeSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage AnDengTypeSearch() |
| | | { |
| | | mes = BasicSettingBLL.AnDengTypeSearch(); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[安灯系统/自定义安灯呼叫类型新增] |
| | | /// <summary> |
| | | /// 安灯系统/自定义安灯呼叫类型新增 |
| | | /// </summary> |
| | | /// <param name="json">提交数据对象</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AddUpdateAnDengType")] |
| | | [HttpPost] |
| | | public HttpResponseMessage AddUpdateAnDengType(List<ObjectData> json) |
| | | { |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); |
| | | mes = BasicSettingBLL.AddUpdateAnDengType(json, username); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[安灯系统/自定义安灯呼叫类型删除] |
| | | /// <summary> |
| | | /// 安灯系统/自定义安灯呼叫类型删除 |
| | | /// </summary> |
| | | /// <param name="andengtypecode">安灯呼叫类型编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeleteAnDengType")] |
| | | [HttpPost] |
| | | public HttpResponseMessage DeleteAnDengType(string andengtypecode) |
| | | { |
| | | mes = BasicSettingBLL.DeleteAnDengType(andengtypecode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[安灯系统/查询绑定的响应人员] |
| | | /// <summary> |
| | | /// 安灯系统/查询绑定的响应人员 |
| | | /// </summary> |
| | | /// <param name="wkshopcode">选中的车间编码</param> |
| | | /// <param name="calltypecode">选中的呼叫类型编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AnDengResponUserSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage AnDengResponUserSearch(string wkshopcode,string calltypecode) |
| | | { |
| | | mes = BasicSettingBLL.AnDengResponUserSearch(wkshopcode, calltypecode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[安灯系统/新增响应人员查询已绑定的响应人员] |
| | | /// <summary> |
| | | /// 安灯系统/新增响应人员查询已绑定的响应人员 |
| | | /// </summary> |
| | | /// <param name="wkshopcode">选中的车间编码</param> |
| | | /// <param name="calltypecode">选中的呼叫类型编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AnDengDigoResponUserSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage AnDengDialogResponUserSearch(string wkshopcode, string calltypecode) |
| | | { |
| | | mes = BasicSettingBLL.AnDengDialogResponUserSearch(wkshopcode, calltypecode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[安灯系统/新增响应人员提交] |
| | | /// <summary> |
| | | /// 安灯系统/新增响应人员提交 |
| | | /// </summary> |
| | | /// <param name="wkshopcode">选中的车间编码</param> |
| | | /// <param name="calltypecode">选中的呼叫类型编码</param> |
| | | /// <param name="enable">允许关闭</param> |
| | | /// <param name="json">响应人员数据</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AnDengDigoResponUserSeave")] |
| | | [HttpPost] |
| | | public HttpResponseMessage AnDengDigoResponUserSeave(string wkshopcode, string calltypecode,string enable,DataTable json) |
| | | { |
| | | var usercode = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); |
| | | mes = BasicSettingBLL.AnDengDigoResponUserSeave(wkshopcode, calltypecode, enable, usercode,json); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[安灯系统/响应人员允许关闭] |
| | | /// <summary> |
| | | /// 安灯系统/响应人员允许关闭 |
| | | /// </summary> |
| | | /// <param name="wkshopcode">选中的车间编码</param> |
| | | /// <param name="calltypecode">选中的呼叫类型编码</param> |
| | | /// <param name="enable">允许关闭</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AnDengResponUserCloseSeave")] |
| | | [HttpPost] |
| | | public HttpResponseMessage AnDengResponUserCloseSeave(string wkshopcode, string calltypecode, string enable) |
| | | { |
| | | var usercode = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); |
| | | mes = BasicSettingBLL.AnDengResponUserCloseSeave(wkshopcode, calltypecode, enable, usercode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[安灯系统/响应人员删除] |
| | | /// <summary> |
| | | /// 安灯系统/响应人员删除 |
| | | /// </summary> |
| | | /// <param name="id">子id</param> |
| | | /// <param name="ando_cogfigid">主id</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AnDengResponUserDeleteSeave")] |
| | | [HttpPost] |
| | | public HttpResponseMessage AnDengResponUserDeleteSeave(string id, string ando_cogfigid) |
| | | { |
| | | mes = BasicSettingBLL.AnDengResponUserDeleteSeave(id, ando_cogfigid); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[通过车间编码查找设备信息] |
| | | /// <summary> |
| | | /// 通过车间编码查找设备信息 |
| | | /// </summary> |
| | | /// <param name="wkshpcode">车间编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "WhkspIsEqpSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage WhkspIsEqpSearch(string wkshpcode) |
| | | { |
| | | mes = BasicSettingBLL.WhkspIsEqpSearch(wkshpcode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | } |
| | | } |