| | |
| | | { |
| | | [RoutePrefix(prefix: "api/QualityManagement")] |
| | | [ControllerGroup("质量管理", "在线接口")] |
| | | [ChannelActionFilter] |
| | | public class QualityManagementController : ApiController |
| | | { |
| | | //定义全局信息返回变量 |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region[工序检验标准删除] |
| | | /// <summary> |
| | | /// 工序检验标准删除 |
| | | /// </summary> |
| | | /// <param name="stanedcode">工序检验标准删除</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeleteStepCheckStaned")] |
| | | [HttpPost] |
| | | public HttpResponseMessage DeleteStepCheckStaned(string stanedcode) |
| | | { |
| | | mes = QualityManagementBLL.DeleteStepCheckStaned(stanedcode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[工序检验标准新增、编辑提交] |
| | | /// <summary> |
| | | /// 工序检验标准新增、编辑提交 |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[工序检验记录列表查询] |
| | | /// <summary> |
| | | /// 工序检验记录列表查询 |
| | | /// </summary> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | | /// <param name="partapec">产品名称</param> |
| | | /// <param name="stepname">产品名称</param> |
| | | /// <param name="standname">产品名称</param> |
| | | /// <param name="checktype">检验类型编码</param> |
| | | /// <param name="checkresult">检验结果</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "StepCheckTableSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage StepCheckTableSearch(string wocode = null, string partcode = null, string partname = null, string partapec = null, string stepname = null,string standname=null, string checktype = null, string checkresult = null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | { |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | | mes = QualityManagementBLL.StepCheckTableSearch(wocode, partcode, partname,partapec,stepname,standname,checktype,checkresult, startNum, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[工序检验记录列表明细查询] |
| | | /// <summary> |
| | | /// 工序检验记录列表查询 |
| | | /// </summary> |
| | | /// <param name="id">主表id</param> |
| | | /// <returns></returns> |
| | | [Route(template: "StepCheckTableSubSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage StepCheckTableSubSearch(string id) |
| | | { |
| | | mes = QualityManagementBLL.StepCheckTableSubSearch(id); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[工序检验记录导出] |
| | | /// <summary> |
| | | /// 工序检验记录导出 |
| | | /// </summary> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">产品编码</param> |
| | | /// <param name="partname">产品名称</param> |
| | | /// <param name="partapec">产品名称</param> |
| | | /// <param name="stepname">产品名称</param> |
| | | /// <param name="standname">产品名称</param> |
| | | /// <param name="checktype">检验类型编码</param> |
| | | /// <param name="checkresult">检验结果</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "StepCheckTableOutExcel")] |
| | | [HttpGet] |
| | | public HttpResponseMessage StepCheckTableOutExcel(string wocode = null, string partcode = null, string partname = null, string partapec = null, string stepname = null, string standname = null, string checktype = null, string checkresult = null,string prop = null, string order = null) |
| | | { |
| | | mes = QualityManagementBLL.StepCheckTableOutExcel(wocode, partcode, partname, partapec, stepname, standname, checktype, checkresult, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[质检方案列表查询] |
| | | /// <summary> |
| | | /// 质检方案列表查询 |
| | | /// </summary> |
| | | /// <param name="qualityinsptcode">质检方案编码</param> |
| | | /// <param name="qualityinsptname">质检方案名称</param> |
| | | /// <param name="status">有效状态</param> |
| | | /// <param name="checktype">质检类型</param> |
| | | /// <param name="sampltype">抽样方式</param> |
| | | /// <param name="suitobject">适用对象</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "QualityInspectionSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage QualityInspectionSearch(string qualityinsptcode = null, string qualityinsptname = null, string status=null, string checktype=null,string sampltype=null,string suitobject = null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | { |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | | mes = QualityManagementBLL.QualityInspectionSearch(qualityinsptcode, qualityinsptname, status, checktype, sampltype, suitobject, startNum, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[质检方案查看编辑] |
| | | /// <summary> |
| | | /// 质检方案查看编辑 |
| | | /// </summary> |
| | | /// <param name="qualityinsptcode">质检方案编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "QualityInspectionSeeEdit")] |
| | | [HttpGet] |
| | | public HttpResponseMessage QualityInspectionSeeEdit(string qualityinsptcode) |
| | | { |
| | | mes = QualityManagementBLL.QualityInspectionSeeEdit(qualityinsptcode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[质检方案新增/编辑提交] |
| | | /// <summary> |
| | | /// 质检方案新增/编辑提交 |
| | | /// </summary> |
| | | /// <param name="obj">提交数据</param> |
| | | /// <returns></returns> |
| | | [Route(template: "QualityInspectionAddEditSave")] |
| | | [HttpPost] |
| | | public HttpResponseMessage QualityInspectionAddEditSave([FromBody] JObject obj) |
| | | { |
| | | string qualityinsptcode = obj["qualityinsptcode"].ToString(); //质检方案编码 |
| | | string qualityinsptname = obj["qualityinsptname"].ToString(); //质检方案名称 |
| | | string status = obj["status"].ToString(); //有效状态 |
| | | string checktype = obj["checktype"].ToString(); //检验类型 |
| | | string sampmethod = obj["sampmethod"].ToString(); //抽检方式 |
| | | string sampscare = obj["sampscare"].ToString(); //固定抽检(样本数) 比例抽检(百分比) |
| | | string suitobject = obj["suitobject"].ToString(); //适用对象 |
| | | string suitpart = obj["suitpart"].ToString(); //适用物料(编码)或者物料类型(编码) |
| | | string descr = obj["descr"].ToString(); //检验方案描述 |
| | | string checkitem = obj["checkitem"].ToString(); //质检列表 |
| | | string type = obj["type"].ToString(); //操作类型 |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = QualityManagementBLL.QualityInspectionAddEditSave(qualityinsptcode, qualityinsptname, status,checktype,sampmethod,sampscare,suitobject,suitpart,descr,checkitem,type,username); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[质检方案删除] |
| | | /// <summary> |
| | | /// 质检方案删除 |
| | | /// </summary> |
| | | /// <param name="qualityinsptcode">质检方案编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "QualityInspectionDelete")] |
| | | [HttpPost] |
| | | public HttpResponseMessage QualityInspectionDelete(string qualityinsptcode) |
| | | { |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = QualityManagementBLL.QualityInspectionDelete(qualityinsptcode,username); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | } |
| | | } |