| | |
| | | { |
| | | [RoutePrefix(prefix: "api/ProductionManagement")] |
| | | [ControllerGroup("生产管理", "在线接口")] |
| | | //[ChannelActionFilter] |
| | | [ChannelActionFilter] |
| | | public class ProductionManagementController : ApiController |
| | | { |
| | | //定义全局信息返回变量 |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region[MES报废补单工单查询] |
| | | /// <summary> |
| | | /// MES报废补单工单查询 |
| | | /// </summary> |
| | | /// <param name="mesordercode">工单编号</param> |
| | | /// <param name="sourceorder">源单单号</param> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | | /// <param name="partspec">产品规格</param> |
| | | /// <param name="creatuser">创建人员</param> |
| | | /// <param name="createdate">创建时间</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "MesBadOrderSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage MesBadOrderSearch(int page, int rows, string prop, string order, string mesordercode = null, string sourceorder = null, string partcode = null, string partname = null, string partspec = null, string creatuser = null, string createdate = null) |
| | | { |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | | mes = ProductionManagementBLL.MesBadOrderSearch(mesordercode, sourceorder, partcode, partname, partspec, startNum, creatuser, createdate, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[产品编码查找工艺路线下拉接口] |
| | | /// <summary> |
| | | /// 产品编码查找工艺路线下拉接口 |
| | |
| | | public HttpResponseMessage SelectRouteStep(string routecode) |
| | | { |
| | | mes = ProductionManagementBLL.SelectRouteStep(routecode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[工单派发选择工艺路线或选择生产车间时判断绑定条件] |
| | | /// <summary> |
| | | /// 工单派发选择工艺路线或选择生产车间时判断绑定条件 |
| | | /// </summary> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="routecode">工艺路线编码</param> |
| | | /// <param name="wkshopcode">车间编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "SelectRouteOrWkshop")] |
| | | [HttpGet] |
| | | public HttpResponseMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode) |
| | | { |
| | | mes = ProductionManagementBLL.SelectRouteOrWkshop(partcode, routecode, wkshopcode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[MES工单新增、获取工单号] |
| | | /// <summary> |
| | | /// MES工单新增、获取工单号 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route(template: "AddMesOrderCodeSearch")] |
| | | [HttpPost] |
| | | public HttpResponseMessage AddMesOrderCodeSearch() |
| | | { |
| | | mes = ProductionManagementBLL.AddMesOrderCodeSearch(); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | public HttpResponseMessage SearchWorkStep(string wo_code) |
| | | { |
| | | mes = ProductionManagementBLL.SearchWorkStep(wo_code); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[MES工单工序任务查看SOP,获取SOP文件下拉列表] |
| | | /// <summary> |
| | | /// MES工单工序任务查看SOP,获取SOP文件下拉列表 |
| | | /// </summary> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="routecode">工艺路线编码</param> |
| | | /// <param name="stepcode">工序编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "SearchWorkStepSopList")] |
| | | [HttpGet] |
| | | public HttpResponseMessage SearchWorkStepSopList(string partcode,string routecode,string stepcode) |
| | | { |
| | | mes = ProductionManagementBLL.SearchWorkStepSopList(partcode, routecode, stepcode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | /// <summary> |
| | | /// 生产管理,修改报工数据查询接口 |
| | | /// </summary> |
| | | /// <param name="reporttype">报工类型</param> |
| | | /// <param name="verify">审核状态</param> |
| | | /// <param name="wo_code">工单编号</param> |
| | | /// <param name="partnumber">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | |
| | | /// <returns></returns> |
| | | [Route(template: "MesOrderStepVerifySearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage MesOrderStepVerifySearch(string reporttype,string wo_code=null,string partnumber=null,string partname=null,string partspec=null,string reportuser=null,string reportdate=null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | public HttpResponseMessage MesOrderStepVerifySearch(string verify=null, string wo_code=null,string partnumber=null,string partname=null,string partspec=null,string reportuser=null,string reportdate=null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | { |
| | | string reportdateopendate = ""; //收料开始时间 |
| | | string reportdateclosedate = ""; //收料结束时间 |
| | |
| | | } |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | | mes = ProductionManagementBLL.MesOrderStepVerifySearch(reporttype,wo_code,partnumber,partname,partspec,reportuser,reportdateopendate,reportdateclosedate, startNum, endNum, prop, order); |
| | | mes = ProductionManagementBLL.MesOrderStepVerifySearch(verify, wo_code,partnumber,partname,partspec,reportuser,reportdateopendate,reportdateclosedate, startNum, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | /// <summary> |
| | | /// 生产管理,修改报工数据提交 |
| | | /// </summary> |
| | | /// <param name="json"></param> |
| | | /// <param name="json">提交数据</param> |
| | | /// <returns></returns> |
| | | [Route(template: "MesOrderStepUpdateSeave")] |
| | | [HttpPost] |
| | |
| | | /// <summary> |
| | | /// 生产管理,修改报工审核提交 |
| | | /// </summary> |
| | | /// <param name="json"></param> |
| | | /// <param name="json">提交数据</param> |
| | | /// <returns></returns> |
| | | [Route(template: "MesOrderStepVerifySeave")] |
| | | [HttpPost] |
| | |
| | | /// <summary> |
| | | /// 生产管理,修改报工反审核提交 |
| | | /// </summary> |
| | | /// <param name="json"></param> |
| | | /// <param name="json">提交数据</param> |
| | | /// <returns></returns> |
| | | [Route(template: "MesOrderStepNoVerifySeave")] |
| | | [HttpPost] |
| | |
| | | #endregion |
| | | |
| | | #region[生产管理,删除报工记录] |
| | | /// <summary> |
| | | /// 生产管理,删除报工记录 |
| | | /// </summary> |
| | | /// <param name="json">提交数据</param> |
| | | /// <returns></returns> |
| | | [Route(template: "MesOrderStepDeleteSeave")] |
| | | [HttpPost] |
| | | public HttpResponseMessage MesOrderStepDeleteSeave(List<UpdateProductReport> json) |