| | |
| | | { |
| | | [RoutePrefix(prefix: "api/ProductionManagement")] |
| | | [ControllerGroup("生产管理", "在线接口")] |
| | | //[ChannelActionFilter] |
| | | public class ProductionManagementController : ApiController |
| | | { |
| | | //定义全局信息返回变量 |
| | |
| | | [HttpPost] |
| | | public HttpResponseMessage MarkSaveErpOrder([FromBody] JObject obj) |
| | | { |
| | | string erporderid = obj["erporderid"].ToString(); //订单id |
| | | string erpordercode = obj["erpordercode"].ToString(); //订单编号 |
| | | string partcode = obj["partcode"].ToString(); //产品编码 |
| | | string wkshopcode = obj["wkshopcode"].ToString(); //车间编码 |
| | |
| | | string ordernum = obj["ordernum"].ToString(); //下单单数 |
| | | string relse_qty = obj["relse_qty"].ToString(); //已下单数量 |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductionManagementBLL.MarkSaveErpOrder(erpordercode, partcode, wkshopcode, warehousecode, erpqty, markqty, ordernum, relse_qty, username); |
| | | mes = ProductionManagementBLL.MarkSaveErpOrder(erporderid,erpordercode, partcode, wkshopcode, warehousecode, erpqty, markqty, ordernum, relse_qty, username); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | /// <summary> |
| | | /// ERP订单关闭 |
| | | /// </summary> |
| | | /// <param name="erporderid">订单id</param> |
| | | /// <param name="erpordercode">订单号</param> |
| | | /// <returns></returns> |
| | | [Route(template: "ClosedErpOrder")] |
| | | [HttpPost] |
| | | public HttpResponseMessage ClosedErpOrder(string erpordercode) |
| | | public HttpResponseMessage ClosedErpOrder(string erporderid, string erpordercode) |
| | | { |
| | | //var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | var username = "Admin"; |
| | | mes = ProductionManagementBLL.ClosedErpOrder(erpordercode, username); |
| | | mes = ProductionManagementBLL.ClosedErpOrder(erporderid,erpordercode, username); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | string partcode = obj["partcode"].ToString(); //产品编码 |
| | | string stepcode = obj["stepcode"].ToString(); //工序编码 |
| | | string checkstanedcode = obj["checkstanedcode"].ToString(); //检验标准编码 |
| | | string checkuser = obj["checkuser"].ToString(); //检验人员 |
| | | string checkusercode = obj["checkusercode"].ToString(); //检验人员编码 |
| | | string checktypecode = obj["checktypecode"].ToString(); //检验类型编码 |
| | | string checkresult = obj["checkresult"].ToString(); //检验结果 |
| | | string checkdescr = obj["checkdescr"].ToString(); //检验描述 |
| | | string data = obj["data"].ToString(); |
| | | List<StepCheck> json = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StepCheck>>(data); |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductionManagementBLL.SaveMesOrderStepCheckItem(mesordercode, partcode, stepcode, checkstanedcode, checkuser, checktypecode, checkresult, checkdescr, username,json); |
| | | mes = ProductionManagementBLL.SaveMesOrderStepCheckItem(mesordercode, partcode, stepcode, checkstanedcode, checkusercode, checktypecode, checkresult, checkdescr, username,json); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |