| | |
| | | { |
| | | [RoutePrefix(prefix: "api/ProductionManagement")] |
| | | [ControllerGroup("生产管理", "在线接口")] |
| | | [ChannelActionFilter] |
| | | //[ChannelActionFilter] |
| | | public class ProductionManagementController : ApiController |
| | | { |
| | | //定义全局信息返回变量 |
| | |
| | | /// <param name="OperType">操作类型:自制(ZZ)/外协(WX)</param> |
| | | /// <param name="SelectType">操作类型:外协发料标识(OUT)/外协收料标识(IN)</param> |
| | | /// <param name="orderstepqrcode">扫描二维码信息</param> |
| | | /// <param name="stu_torgcode">所属组织编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "MesOrderStepStart")] |
| | | [HttpGet] |
| | | public HttpResponseMessage MesOrderStepStart(string OperType, string orderstepqrcode, string SelectType = null) |
| | | public HttpResponseMessage MesOrderStepStart(string OperType,string stu_torgcode, string orderstepqrcode, string SelectType = null) |
| | | { |
| | | mes = ProductionManagementBLL.MesOrderStepStart(OperType, SelectType, orderstepqrcode); |
| | | mes = ProductionManagementBLL.MesOrderStepStart(OperType, stu_torgcode, SelectType, orderstepqrcode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | [HttpGet] |
| | | public HttpResponseMessage MesOrderGroupSelectUser(string usergroupcode) |
| | | { |
| | | mes = ProductionManagementBLL.MesOrderGroupSelectUser(usergroupcode); |
| | | var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //所属组织 |
| | | mes = ProductionManagementBLL.MesOrderGroupSelectUser(stu_torgcode,usergroupcode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | /// <summary> |
| | | /// 工序检验扫码获取任务信息 |
| | | /// </summary> |
| | | /// <param name="stu_torgcode">所属组织编码</param> |
| | | /// <param name="orderstepqrcode">扫描工序二维码信息</param> |
| | | /// <param name="checktype">检验方式FirstCheck(首检) PatroCheck(巡检) EndCheck(完工检)</param> |
| | | /// <returns></returns> |
| | | [Route(template: "MesOrderStepCheckSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage MesOrderStepCheckSearch(string orderstepqrcode, string checktype) |
| | | public HttpResponseMessage MesOrderStepCheckSearch(string stu_torgcode, string orderstepqrcode, string checktype) |
| | | { |
| | | mes = ProductionManagementBLL.MesOrderStepCheckSearch(orderstepqrcode, checktype); |
| | | mes = ProductionManagementBLL.MesOrderStepCheckSearch(stu_torgcode,orderstepqrcode, checktype); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | [HttpPost] |
| | | public HttpResponseMessage SaveMesOrderStepCheckItem([FromBody] JObject obj) |
| | | { |
| | | string stu_torgcode = obj["stu_torgcode"].ToString(); //所属组织编号 |
| | | string wocode = obj["wocode"].ToString(); //工单编号 |
| | | string partcode = obj["partcode"].ToString(); //产品编码 |
| | | string stepcode = obj["stepcode"].ToString(); //工序编码 |
| | |
| | | string ngqty = obj["ngqty"].ToString();//不合格数量 |
| | | string checkitemcont = obj["checkitemcont"].ToString(); //检验项目数据 |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductionManagementBLL.SaveMesOrderStepCheckItem(wocode, partcode, stepcode, checkstandcode, check_type, sampmethod, qualitystatus, labqty, sampleqty, goodqty, ngqty, checkitemcont, username); |
| | | mes = ProductionManagementBLL.SaveMesOrderStepCheckItem(stu_torgcode,wocode, partcode, stepcode, checkstandcode, check_type, sampmethod, qualitystatus, labqty, sampleqty, goodqty, ngqty, checkitemcont, username); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |