| | |
| | | } |
| | | #endregion |
| | | |
| | | #region[MES工单新增、获取工单号] |
| | | /// <summary> |
| | | /// MES工单新增、获取工单号 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route(template: "AddMesOrderCodeSearch")] |
| | | [HttpPost] |
| | | public HttpResponseMessage AddMesOrderCodeSearch() |
| | | { |
| | | mes = ProductionManagementBLL.AddMesOrderCodeSearch(); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[MES工单新增、编辑提交] |
| | | /// <summary> |
| | | /// MES工单新增、编辑提交 |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region[生产开报工,工序检验扫码获取任务信息] |
| | | |
| | | #region[工序检验扫码获取任务信息] |
| | | /// <summary> |
| | | /// 生产开报工,工序检验扫码获取任务信息 |
| | | /// 工序检验扫码获取任务信息 |
| | | /// </summary> |
| | | /// <param name="orderstepqrcode">扫描二维码信息</param> |
| | | /// <param name="orderstepqrcode">扫描工序二维码信息</param> |
| | | /// <param name="checktype">检验方式FirstCheck(首检) PatroCheck(巡检) EndCheck(完工检)</param> |
| | | /// <returns></returns> |
| | | [Route(template: "MesOrderStepCheckSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage MesOrderStepCheckSearch(string orderstepqrcode) |
| | | public HttpResponseMessage MesOrderStepCheckSearch(string orderstepqrcode, string checktype) |
| | | { |
| | | mes = ProductionManagementBLL.MesOrderStepCheckSearch(orderstepqrcode); |
| | | mes = ProductionManagementBLL.MesOrderStepCheckSearch(orderstepqrcode, checktype); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[生产开报工,工序检验获取检验标准下拉框数据] |
| | | #region[工序检验根据选择的检验方案查找检验项目] |
| | | /// <summary> |
| | | /// 生产开报工,工序检验获取检验标准下拉框数据 |
| | | /// 入厂检验,工序检验根据选择的检验方案查找检验项目 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route(template: "MesOrderStepCheckSelect")] |
| | | [HttpGet] |
| | | public HttpResponseMessage MesOrderStepCheckSelect() |
| | | { |
| | | mes = ProductionManagementBLL.MesOrderStepCheckSelect(); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[生产开报工,工序检验根据检验标准获取检验项目列表] |
| | | /// <summary> |
| | | /// 生产开报工,工序检验根据检验标准获取检验项目列表 |
| | | /// </summary> |
| | | /// <param name="checkstandcode">检验标准编码</param> |
| | | /// <param name="checkstandcode">检验方案编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "MesOrderStepCheckItemList")] |
| | | [HttpGet] |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region[生产开报工,工序检验提交保存] |
| | | #region[工序检验,提交] |
| | | /// <summary> |
| | | /// 生产开报工,工序检验提交保存 |
| | | /// 工序检验,提交 |
| | | /// </summary> |
| | | /// <param name="obj">提交信息</param> |
| | | /// <returns></returns> |
| | | [Route(template: "SaveMesOrderStepCheckItem")] |
| | | [HttpPost] |
| | | public HttpResponseMessage SaveMesOrderStepCheckItem([FromBody] JObject obj) |
| | | { |
| | | string mesordercode = obj["mesordercode"].ToString(); //工单编号 |
| | | string wocode = obj["wocode"].ToString(); //工单编号 |
| | | string partcode = obj["partcode"].ToString(); //产品编码 |
| | | string stepcode = obj["stepcode"].ToString(); //工序编码 |
| | | string checkstanedcode = obj["checkstanedcode"].ToString(); //检验标准编码 |
| | | string checkusercode = obj["checkusercode"].ToString(); //检验人员编码 |
| | | string checktypecode = obj["checktypecode"].ToString(); //检验类型编码 |
| | | string checkresult = obj["checkresult"].ToString(); //检验结果 |
| | | string checkdescr = obj["checkdescr"].ToString(); //检验描述 |
| | | string checkqty = obj["checkqty"].ToString(); //检验数量 |
| | | string data = obj["data"].ToString(); |
| | | List<StepCheck> json = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StepCheck>>(data); |
| | | string checkstandcode = obj["checkstandcode"].ToString(); //质检方案编码 |
| | | string check_type = obj["check_type"].ToString(); //检验方式FirstCheck(首检) PatroCheck(巡检) EndCheck(完工检) |
| | | string sampmethod = obj["sampmethod"].ToString(); //抽检方式:固定抽检(FIXED) 比例抽检(SCARE) |
| | | string qualitystatus = obj["qualitystatus"].ToString(); //质量状态(合格、不合格) |
| | | string labqty = obj["good_qty"].ToString(); //工序任务合格数量 |
| | | string sampleqty = obj["sampleqty"].ToString(); //样本数量 |
| | | string goodqty = obj["goodqty"].ToString(); //合格数量 |
| | | string ngqty = obj["ngqty"].ToString();//不合格数量 |
| | | string checkitemcont = obj["checkitemcont"].ToString(); //检验项目数据 |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductionManagementBLL.SaveMesOrderStepCheckItem(mesordercode, partcode, stepcode, checkstanedcode, checkusercode, checktypecode, checkresult, checkdescr, checkqty, username,json); |
| | | mes = ProductionManagementBLL.SaveMesOrderStepCheckItem(wocode, partcode, stepcode, checkstandcode, check_type, sampmethod, qualitystatus, labqty, sampleqty, goodqty, ngqty, checkitemcont, username); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |