| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn(@"select * from Sc_ICMOBillStatus_Tmp where HSourceInterID='"+ HInterID + "' and HSourceEntryID='"+ HEntryID + "'", "Sc_ICMOBillStatus_Tmp"); |
| | | if (ds.Tables[0].Rows.Count != 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "该工序已派单,不允许重复排单!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | |
| | | oCN.RunProc("update Sc_ProcessExchangeBillSub set HSourceID=" + HSourceID + " where HInterID=" + HInterID + " and HEntryID=" + HEntryID); |
| | |
| | | return GetObjectJson(ds); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 返回工序流转卡列表 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | #region 工序流转卡下推生产质量汇报单 |
| | | [Route("LEMS/MES_IF_ProcessBillList_Json")] |
| | | [HttpGet] |
| | | public object MES_IF_ProcessBillList_Json(string hinterid, string HEntryID, string user) |
| | |
| | | } |
| | | return GetObjectJson(ds); |
| | | } |
| | | #endregion |
| | | |
| | | #region 工序流转卡下推设备点检参数表 |
| | | [Route("LEMS/MES_IF_EquipICMOTechParamList_Json")] |
| | | [HttpGet] |
| | | public object MES_IF_EquipICMOTechParamList_Json(string hinterid, string HEntryID, string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery_TechParam where hmainid ='" + hinterid + "' and HEntryID='" + HEntryID + "'", "h_v_Sc_ProcessExchangeBillQuerySub"); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有返回任何记录!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | return GetObjectJson(ds); |
| | | } |
| | | #endregion |
| | | |
| | | #region 生产订单 下查 |
| | | /// <summary> |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 螺母检验CCD合格率 |
| | | [Route("LEMS/Sc_NutInspectionCCDPassRate")] |
| | | [HttpGet] |
| | | public object Sc_NutInspectionCCDPassRate(string HBatchNo, string user) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_NutInspectionCCDPassRate '" + HBatchNo + "'", "h_p_Sc_NutInspectionCCDPassRate"); |
| | | |
| | | //添加列名 |
| | | 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("LEMS/SeOutReportList")] |
| | | [HttpGet] |