| | |
| | | ,0,0,'','',0,0 |
| | | ,0,'{HResult}',{oSub.HProcExchInterID},{oSub.HProcExchEntryID},'{oSub.HProcExchBillNo}')"); |
| | | |
| | | //修改条码表的状态 |
| | | oCN.RunProc("update Gy_BarCodeBill set HStatus='"+ HResult + "' where HBarCode='"+ oSub.HBarCode + "'"); |
| | | |
| | | //修改出站单的 不良 报废数量 |
| | | if (HResult == "不良") { |
| | | oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID); |
| | | } |
| | | else if (HResult == "报废") |
| | | { |
| | | oCN.RunProc("update Sc_StationOutBillMain set HWasterQty+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = null; |
| | |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region 工序单品过站 流转卡查询关键件清单 |
| | | [Route("Cj_SingleStation/HBardCodeBomList")] |
| | | [HttpGet] |
| | | public object HBardCodeBomList(string HBarCode, string user) |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn(@"select * from h_v_Gy_BarCodeBillHICOMProcessExchange where 条码='" + HBarCode + "'", "h_v_Gy_BarCodeBillHICOMProcessExchange"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "条码查无数据!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = ""; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | } |
| | | |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有返回任何记录!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 工序单品返修台 获取表格数据 |
| | | [Route("Cj_SingleStation/ProcessItemRepair")] |
| | | [HttpGet] |
| | | public object ProcessItemRepair( string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | string sql = @"select * from h_v_Cj_BarCodeProcessItemRepair where 1=1 " + sWhere + " order by 日期 desc, HInterID desc, HEntryID desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Cj_BarCodeProcessItemRepair"); |
| | | |
| | | //添加列名 |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 工序单品返修台--配件更换 查询更换记录 |
| | | [Route("Cj_SingleStation/Sc_SourceLineRepairBillSub_MaterList")] |
| | | [HttpGet] |
| | | public object Sc_SourceLineRepairBillSub_MaterList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | string sql = @"select * from Sc_SourceLineRepairBillSub_Mater where 1=1 " + sWhere + " order by HInterID asc, HEntryID asc"; |
| | | ds = oCN.RunProcReturn(sql, "Sc_SourceLineRepairBillSub_Mater"); |
| | | |
| | | //添加列名 |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |