| | |
| | | string stocktypecode = obj["stocktypecode"].ToString(); //存货类型编码 |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | string OperType = obj["OperType"].ToString(); //操作类型 |
| | | mes = ProductModelBLL.AddUpdateMaterialType(materialtypeid,materialtypecode, materialtypename, stocktypecode, username, OperType); |
| | | mes = ProductModelBLL.AddUpdateMaterialType(materialtypeid, materialtypecode, materialtypename, stocktypecode, username, OperType); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | public HttpResponseMessage UomAdd(List<Uom> json) |
| | | { |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductModelBLL.UomAdd(username,json); |
| | | mes = ProductModelBLL.UomAdd(username, json); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | /// <returns></returns> |
| | | [Route(template: "InventoryFileSelect")] |
| | | [HttpGet] |
| | | public HttpResponseMessage InventoryFileSelect(string partcode = null, string partname = null,string partspec=null,string stocktypecode = null,string materialtypecode=null,string storehousecode=null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | public HttpResponseMessage InventoryFileSelect(string partcode = null, string partname = null, string partspec = null, string stocktypecode = null, string materialtypecode = null, string storehousecode = null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | { |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | |
| | | string maxstockqty = obj["maxstockqty"].ToString(); //最大库存 |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | string OperType = obj["OperType"].ToString(); //操作类型 |
| | | mes = ProductModelBLL.AddUpdateInventoryFile(materialid, materialcode, materialname, materialspec, uomcode, warehousecode, stocktypecode, materialtypecode, minstockqty, maxstockqty,username, OperType); |
| | | mes = ProductModelBLL.AddUpdateInventoryFile(materialid, materialcode, materialname, materialspec, uomcode, warehousecode, stocktypecode, materialtypecode, minstockqty, maxstockqty, username, OperType); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | public HttpResponseMessage SaveInventoryFile(string partcode, List<ObjectData> json) |
| | | { |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductModelBLL.SaveInventoryFile(partcode, username,json); |
| | | mes = ProductModelBLL.SaveInventoryFile(partcode, username, json); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | /// <returns></returns> |
| | | [Route(template: "AddUpdateRoute")] |
| | | [HttpPost] |
| | | public HttpResponseMessage AddUpdateRoute(string id,string opertype, RoutEdit json) |
| | | public HttpResponseMessage AddUpdateRoute(string id, string opertype, RoutEdit json) |
| | | { |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductModelBLL.AddUpdateRoute(id, opertype, username, json); |
| | |
| | | /// <returns></returns> |
| | | [Route(template: "StepSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage StepSearch(string stepcode = null, string stepname = null, string enable = null,string steptypecode=null, string createuser = null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | public HttpResponseMessage StepSearch(string stepcode = null, string stepname = null, string enable = null, string steptypecode = null, string createuser = null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | { |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | | mes = ProductModelBLL.StepSearch(stepcode, stepname, enable, steptypecode,createuser, startNum, endNum, prop, order); |
| | | mes = ProductModelBLL.StepSearch(stepcode, stepname, enable, steptypecode, createuser, startNum, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[工序关联缺陷查询] |
| | | /// <summary> |
| | | /// 工序关联缺陷查询 |
| | | /// </summary> |
| | | /// <param name="stepcode">工序编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "StepAssociationDefect")] |
| | | [HttpGet] |
| | | public HttpResponseMessage StepAssociationDefect(string stepcode) |
| | | { |
| | | mes = ProductModelBLL.StepAssociationDefect(stepcode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[工序关联缺陷提交] |
| | | [Route(template: "SaveStepAssociationDefect")] |
| | | [HttpPost] |
| | | public HttpResponseMessage SaveStepAssociationDefect(string stepcode, List<ObjectData> json) |
| | | { |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductModelBLL.SaveStepAssociationDefect(stepcode, username, json); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[产品信息下拉框查询] |
| | | /// <summary> |
| | | /// 产品信息下拉框查询 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route(template: "PartSelect")] |
| | | [HttpGet] |
| | | public HttpResponseMessage PartSelect() |
| | | { |
| | | try |
| | | { |
| | | mes = ProductModelBLL.PartSelect(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.Message = e.Message; |
| | | } |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[产品编码查找工艺路线下拉框] |
| | | /// <summary> |
| | | /// 产品编码查找工艺路线下拉框 |
| | | /// </summary> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "PartSelectRpute")] |
| | | [HttpGet] |
| | | public HttpResponseMessage PartSelectRpute(string partcode) |
| | | { |
| | | try |
| | | { |
| | | mes = ProductModelBLL.PartSelectRpute(partcode); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.Message = e.Message; |
| | | } |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[根据工艺路线编码查找关联工序集合] |
| | | /// <summary> |
| | | /// 根据工艺路线编码查找关联工序集合 |
| | | /// </summary> |
| | | /// <param name="routecode">工艺路线编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "RouteSelectStep")] |
| | | [HttpGet] |
| | | public HttpResponseMessage RouteSelectStep(string routecode) |
| | | { |
| | | try |
| | | { |
| | | mes = ProductModelBLL.RouteSelectStep(routecode); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.Message = e.Message; |
| | | } |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[根据工序线编码查找关联设备集合] |
| | | /// <summary> |
| | | /// 根据工序线编码查找关联设备集合 |
| | | /// </summary> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="routecode">工艺路线编码</param> |
| | | /// <param name="stepcode">工序编码</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "StepSelectEqp")] |
| | | [HttpGet] |
| | | public HttpResponseMessage StepSelectEqp(string partcode, string routecode, string stepcode, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | { |
| | | |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | | mes = ProductModelBLL.StepSelectEqp(partcode, routecode, stepcode, startNum, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[节拍工价查询] |
| | | /// <summary> |
| | | /// 节拍工价查询 |
| | | /// </summary> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | | /// <param name="partspec">产品规格</param> |
| | | /// <param name="routecode">工艺路线编码</param> |
| | | /// <param name="stepcode">工序编码</param> |
| | | /// <param name="eqpcode">设备编码</param> |
| | | /// <param name="eqpname">设备名称</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "BeatRateSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage BeatRateSearch(string partcode = null, string partname = null, string partspec = null, string routecode = null, string stepcode = null, string eqpcode = null, string eqpname = null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | { |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | | mes = ProductModelBLL.BeatRateSearch(partcode, partname, partspec, routecode, stepcode, eqpcode, eqpname, startNum, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |