| | |
| | | { |
| | | [RoutePrefix(prefix: "api/ProductionManagement")] |
| | | [ControllerGroup("生产管理", "在线接口")] |
| | | //[ChannelActionFilter] |
| | | [ChannelActionFilter] |
| | | public class ProductionManagementController : ApiController |
| | | { |
| | | //定义全局信息返回变量 |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region[ERP订单批量下达] |
| | | /// <summary> |
| | | /// ERP订单批量下达 |
| | | /// </summary> |
| | | /// <param name="obj">提交数据</param> |
| | | /// <returns></returns> |
| | | [Route(template: "MarkBatchSaveErpOrder")] |
| | | [HttpPost] |
| | | public HttpResponseMessage MarkBatchSaveErpOrder(List<ErpOrderBatch> obj) |
| | | { |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductionManagementBLL.MarkBatchSaveErpOrder(obj, username); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[ERP订单关闭] |
| | | /// <summary> |
| | | /// ERP订单关闭 |
| | |
| | | { |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductionManagementBLL.ClosedErpOrder(erporderid, erpordercode, username); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[ERP订单删除] |
| | | /// <summary> |
| | | /// ERP订单删除 |
| | | /// </summary> |
| | | /// <param name="erporderid">订单id</param> |
| | | /// <param name="erpordercode">订单号</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeleteErpOrder")] |
| | | [HttpPost] |
| | | public HttpResponseMessage DeleteErpOrder(string erporderid, string erpordercode) |
| | | { |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductionManagementBLL.DeleteErpOrder(erporderid, erpordercode, username); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="routecode">工艺路线编码</param> |
| | | /// <param name="wkshopcode">车间编码</param> |
| | | /// <param name="is_steprice">是否工价管控</param> |
| | | /// <returns></returns> |
| | | [Route(template: "SelectRouteOrWkshop")] |
| | | [HttpGet] |
| | | public HttpResponseMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode) |
| | | public HttpResponseMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode,string is_steprice) |
| | | { |
| | | mes = ProductionManagementBLL.SelectRouteOrWkshop(partcode, routecode, wkshopcode); |
| | | mes = ProductionManagementBLL.SelectRouteOrWkshop(partcode, routecode, wkshopcode, is_steprice); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | string taskqty = obj["taskqty"].ToString(); //任务数量 |
| | | string startqty = obj["startqty"].ToString(); //开工数量 |
| | | string reportqty = obj["reportqty"].ToString(); //报工工数量 |
| | | string ngqty = obj["ngqty"].ToString(); //不良数量 |
| | | string badcode = obj["badcode"].ToString(); //不良原因编码 |
| | | string defectlist= obj["defectlist"].ToString();//不良汇总 |
| | | string remarks = obj["remarks"].ToString(); //备注 |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductionManagementBLL.SavaMesOrderStepReport(mesordercode, partcode, stepseq, stepcode, eqpcode, inbarcode, reckway, usergroupcode, reportuser, taskqty, startqty, reportqty, ngqty, badcode, remarks, username); |
| | | List<ReportDefectList> defectobjs = JsonConvert.DeserializeObject<List<ReportDefectList>>(defectlist); |
| | | mes = ProductionManagementBLL.SavaMesOrderStepReport(mesordercode, partcode, stepseq, stepcode, eqpcode, inbarcode, reckway, usergroupcode, reportuser, taskqty, startqty, reportqty, defectobjs, remarks, username); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | string inuser = obj["inuser"].ToString(); //收料人员 |
| | | string taskqty = obj["taskqty"].ToString(); //任务数量 |
| | | string sqty = obj["sqty"].ToString(); //收料数量 |
| | | string ngqty = obj["ngqty"].ToString(); //不良数量 |
| | | string badcode = obj["badcode"].ToString(); //不良原因编码 |
| | | string defectlist = obj["defectlist"].ToString();//不良汇总 |
| | | string remarks = obj["remarks"].ToString(); //备注 |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductionManagementBLL.SavaMesOrderStepIn(mesordercode, partcode, stepseq, stepcode, wxcode, inbarcode, inuser, taskqty, sqty, ngqty, badcode, remarks, username); |
| | | List<ReportDefectList> defectobjs = JsonConvert.DeserializeObject<List<ReportDefectList>>(defectlist); |
| | | mes = ProductionManagementBLL.SavaMesOrderStepIn(mesordercode, partcode, stepseq, stepcode, wxcode, inbarcode, inuser, taskqty, sqty, defectobjs, remarks, username); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | /// <param name="mesorderstus">工单状态码</param> |
| | | /// <param name="mesordercode">工单编号</param> |
| | | /// <param name="sourceorder">源单单号</param> |
| | | /// <param name="saleordercode">销售订单号</param> |
| | | /// <param name="ordertype">单据类型</param> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | |
| | | /// <returns></returns> |
| | | [Route(template: "MesOrderBitchClosedSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage MesOrderBitchClosedSearch(string mesorderstus = null, string mesordercode = null, string sourceorder = null, string ordertype = null, string partcode = null, string partname = null, string partspec = null, string creatuser = null, string createdate = null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | public HttpResponseMessage MesOrderBitchClosedSearch(string mesorderstus = null, string mesordercode = null, string sourceorder = null,string saleordercode=null, string ordertype = null, string partcode = null, string partname = null, string partspec = null, string creatuser = null, string createdate = null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | { |
| | | var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //所属组织 |
| | | var stu_torgtypecode = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //所属组织类型 |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | | mes = ProductionManagementBLL.MesOrderBitchClosedSearch(stu_torgcode, stu_torgtypecode,mesorderstus, mesordercode, sourceorder, ordertype, partcode, partname, partspec, startNum, creatuser, createdate, endNum, prop, order); |
| | | mes = ProductionManagementBLL.MesOrderBitchClosedSearch(stu_torgcode, stu_torgtypecode,mesorderstus, mesordercode, sourceorder, saleordercode, ordertype, partcode, partname, partspec, startNum, creatuser, createdate, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |