| | |
| | | string OperationType = sArray[2].ToString().Trim(); |
| | | string user = sArray[3].ToString(); |
| | | string Value = sArray[4].ToString(); |
| | | string BadReason = sArray[5].ToString(); |
| | | if(String.IsNullOrWhiteSpace(BadReason) == true) |
| | | string BadReason = null; |
| | | if (sArray.Length > 4) |
| | | { |
| | | BadReason = sArray[5].ToString(); |
| | | } |
| | | if (String.IsNullOrWhiteSpace(BadReason) == true) |
| | | { |
| | | BadReason = "[]"; |
| | | } |
| | |
| | | |
| | | BillNew.DetailCol1_BadReason.Add(oSub); |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无明细行信息!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region [检验单获取 不良原因] |
| | | [Route("QC_POStockInCheckBill_BadReason/getBadReasonList")] |
| | | [HttpGet] |
| | | public object getBadReasonList(Int64 HInterID, string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("select * from QC_POStockInCheckBillSub_BadReason where HInterID=" + HInterID, "QC_POStockInCheckBillSub_BadReason"); |
| | | |
| | | //添加列名 |
| | | 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列对象的列名 |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | 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 [来料入库检验单] |
| | | /// <summary> |
| | | /// 返回列表 |