| | |
| | | /// <summary> |
| | | /// 工序检验标准新增、编辑获取检验项目下拉列表 |
| | | /// </summary> |
| | | /// <param name="WorkShop">车间编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "StepCheckItemSelect")] |
| | | [HttpGet] |
| | | public HttpResponseMessage StepCheckItemSelect() |
| | | public HttpResponseMessage StepCheckItemSelect(string WorkShop) |
| | | { |
| | | mes = QualityManagementBLL.StepCheckItemSelect(); |
| | | mes = QualityManagementBLL.StepCheckItemSelect(WorkShop); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | [HttpGet] |
| | | public HttpResponseMessage StepCheckItemSearch(string itemcode = null, string itemname = null, string itemdescr = 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 = QualityManagementBLL.StepCheckItemSearch(itemcode, itemname, itemdescr, startNum, endNum, prop, order); |
| | | mes = QualityManagementBLL.StepCheckItemSearch(stu_torgcode, stu_torgtypecode,itemcode, itemname, itemdescr, startNum, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | [HttpPost] |
| | | public HttpResponseMessage AddUpdateStepCheckItem([FromBody] JObject obj) |
| | | { |
| | | string wkshopcode = obj["wkshopcode"].ToString(); //车间编码 |
| | | string checkitemcode = obj["checkitemcode"].ToString(); //工序检验项目代码 |
| | | string checkitemname = obj["checkitemname"].ToString(); //工序检验项目名称 |
| | | string checkitemdescr = obj["checkitemdescr"].ToString(); //工序检验项目描述 |
| | | string opertype = obj["OperType"].ToString(); //操作类型 |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = QualityManagementBLL.AddUpdateStepCheckItem(checkitemcode, checkitemname, checkitemdescr, opertype, username); |
| | | mes = QualityManagementBLL.AddUpdateStepCheckItem(wkshopcode,checkitemcode, checkitemname, checkitemdescr, opertype, username); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | [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) |
| | | { |
| | | 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 = QualityManagementBLL.StepCheckTableSearch(wocode, partcode, partname,partapec,stepname,standname,checktype,checkresult, startNum, endNum, prop, order); |
| | | mes = QualityManagementBLL.StepCheckTableSearch(stu_torgcode, stu_torgtypecode,wocode, partcode, partname,partapec,stepname,standname,checktype,checkresult, startNum, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | [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); |
| | | var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //所属组织 |
| | | var stu_torgtypecode = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //所属组织类型 |
| | | mes = QualityManagementBLL.StepCheckTableOutExcel(stu_torgcode, stu_torgtypecode, wocode, partcode, partname, partapec, stepname, standname, checktype, checkresult, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | [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) |
| | | { |
| | | 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 = QualityManagementBLL.QualityInspectionSearch(qualityinsptcode, qualityinsptname, status, checktype, sampltype, suitobject, startNum, endNum, prop, order); |
| | | mes = QualityManagementBLL.QualityInspectionSearch(stu_torgcode, stu_torgtypecode,qualityinsptcode, qualityinsptname, status, checktype, sampltype, suitobject, startNum, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | |
| | | 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 wkshopcode= obj["wkshopcode"].ToString(); //车间编码 |
| | | 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 stepcode = obj["stepcode"].ToString(); //工序编码(首检、巡检、完工检验) |
| | | string checkitem = obj["checkitem"].ToString(); //质检列表 |
| | | string type = obj["type"].ToString(); //操作类型 |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = QualityManagementBLL.QualityInspectionAddEditSave(wkshopcode,qualityinsptcode, qualityinsptname, status,checktype,sampmethod,sampscare,suitobject,suitpart,descr, stepcode, 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 |
| | | } |
| | | } |