| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | //} |
| | | #endregion |
| | | |
| | | |
| | | #region 工序流转卡列表显示器具清单信息 |
| | | [Route("Sc_ProcessExchangeBillList/QJQD")] |
| | | [HttpGet] |
| | | public object QJQD(Int64 HProcExchHinteID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | //得到信息 |
| | | ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillQuerySub_Mould where hmainid= " + HProcExchHinteID , "h_v_Sc_ProcessExchangeBillQuerySub_Mould"); |
| | | //写入信息 |
| | | //if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "未查询到出站单明细信息!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | List<object> listCol = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string str = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | listCol.Add(JsonConvert.DeserializeObject(str)); |
| | | } |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = listCol; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region[返回生产任务单明细行] |
| | | /// <summary> |
| | | /// 返回生产任务单明细行 |
| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = string.Format(@"select 流水号 HProcNo,HProcID,工序代码 HProcNumber,工序名称 HProcName,加工说明 HWorkRemark,HCenterID,工作中心代码 HCenterNumber, |
| | | 工作中心 HCenterName,HSupID,供应商代码 HSupNumber,供应商 HSupName,isEntrust,计划数量 HQty,加工单价 HOutPrice, 表体备注 HRemark, |
| | | 进站数量 HRelationQty_In,出站数量 HRelationQty_Out,委外工单数量 HRelationQty_WWOrder,不合格数量 HRelationQty_Bad,超额比例 HOverRate, |
| | | 进站关联数量 HRelationQty_In,出站关联数量 HRelationQty_Out,委外工单数量 HRelationQty_WWOrder,不合格数量 HRelationQty_Bad,超额比例 HOverRate, |
| | | 良率 HPassRate,累计良率 HSumPassRate,图纸编号 HPicNum,本工序确认记录 HProcCheckNote,工艺参数 HTechnologyParameter,HDeptID, |
| | | 加工车间代码 HDeptNumber,加工车间 HDeptName |
| | | from h_v_Sc_ProcessExchangeBillQuerySub"); |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | //删除前判断关联数量 |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | ds = oCn.RunProcReturn("select ct from ( " + |
| | | " select 1 ct from Sc_StationInBillMain Where HProcExchInterID=" + lngBillKey + " " + |
| | | " union all " + |
| | | " select 1 from Sc_StationOutBillMain Where HProcExchInterID=" + lngBillKey + " ) as a ", "Sc_ProcExchReportSub"); |
| | | if (ds.Tables[0].Rows.Count != 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流转卡已经有下游进出站单后,不允许删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | DAL.ClsSc_ProcessExchangeBill oBill = new DAL.ClsSc_ProcessExchangeBill(); |
| | | DBUtility.ClsPub.HOrgID = HPRDORGID; |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |