| | |
| | | oBill.omodel.HPeriod = DBUtility.ClsPub.isLong(oItemSub.HDate.Month); |
| | | oBill.omodel.HRemark = ""; |
| | | oBill.omodel.HBatchNo = oItemSub.HBatchNo; |
| | | oBill.omodel.HProjectNum = oItemSub.HProjectNum; |
| | | oBill.omodel.HMateOutBatchNo = oItemSub.HMateOutBatchNo; |
| | | oBill.omodel.HMouldNum = oItemSub.HMouldNum; |
| | | oBill.omodel.HMainMaterID = 0; |
| | | oBill.omodel.HKeyMaterID = 0; |
| | | oBill.omodel.HNo = 0; |
| | |
| | | oBill.omodel.HMaterID = oItemSub.HMaterID; |
| | | oBill.omodel.HMaterNumber = ds.Tables[0].Rows[0]["HMaterNumber"].ToString(); |
| | | oBill.omodel.HUnitID = Pub_Class.ClsPub.isLong(ds.Tables[0].Rows[0]["HUnitID"]); |
| | | oBill.omodel.HMateOutBatchNo = ""; |
| | | oBill.omodel.HUnitNumber = ds.Tables[0].Rows[0]["HUnitNumber"].ToString(); |
| | | oBill.omodel.HMaterID2 = oItemSub.HMaterID; |
| | | oBill.omodel.HProjectNum = ""; |
| | | oBill.omodel.HPlanQty = oItemSub.HQty; |
| | | oBill.omodel.HQty = oItemSub.HProQty; |
| | | oBill.omodel.HPlanBeginDate = Convert.ToDateTime(dt.ToShortDateString().ToString()); |
| | |
| | | oBill.omodel.HWidth_New = 0; |
| | | oBill.omodel.HRemark_New = ""; |
| | | oBill.omodel.HWeight_New = 0; |
| | | oBill.omodel.HPlanOrderProcNo = ds.Tables[0].Rows[0]["HPlanOrderProcNo"].ToString(); |
| | | oBill.omodel.HMouldNum = "0"; |
| | | oBill.omodel.HPlanOrderProcNo = ds.Tables[0].Rows[0]["HPlanOrderProcNo"].ToString(); |
| | | } |
| | | //子表赋值 |
| | | for(int i = 0; i < ds.Tables[0].Rows.Count; i++) |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 可打印备料单报表(添康) |
| | | |
| | | [Route("Sc_ProcessExchangeBill/AllowedPrint")] |
| | | [HttpGet] |
| | | public object AllowedPrint(string sWhere, string user, string Organization, int page, int size) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | sWhere = sWhere.Replace("'", "''"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBillList_AllowedPrint " + page + "," + size + ",'" + Organization + "'," + "''", "h_p_Sc_ProcessExchangeBillList_AllowedPrint"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBillList_AllowedPrint " + page + "," + size + ",'" + Organization + "','" + sWhere + "'", "h_p_Sc_ProcessExchangeBillList_AllowedPrint"); |
| | | } |
| | | |
| | | //添加列名 |
| | | 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 = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); |
| | | 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 |
| | | |
| | | } |
| | | } |