| | |
| | | long HBUYERWITHHOLDING = DetailColl2[i].HBUYERWITHHOLDING;//买方代扣代缴 |
| | | string HMATERIALDESC = DetailColl2[i].HMATERIALDESC == null ? "''" : DetailColl2[i].HMATERIALDESC; //物料说明 |
| | | i++; |
| | | if (oSub.HQty <= 0 || oSub.HQty == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + i + "行,数量不能为0或者小于0"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //if (oSub.HQty <= 0 || oSub.HQty == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "第" + i + "行,数量不能为0或者小于0"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | if (oSub.HMaterID == 0) |
| | | { |
| | |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_POOrderBillList where hmainid =" + HInterID, "h_v_IF_POOrderBillList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_POOrderBillEdit where hmainid =" + HInterID, "h_v_IF_POOrderBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | } |
| | | string sql = "select * from h_v_Cg_POOrderBillQuerySub where hmainid = "+ hmainid; |
| | | |
| | | ds = oCN.RunProcReturn(sql + " order by hsubid desc", "h_v_Cg_POOrderBillQuerySub"); |
| | | ds = oCN.RunProcReturn(sql + " order by hsubid ASC", "h_v_Cg_POOrderBillQuerySub"); |
| | | |
| | | |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 出库汇总 查询 |
| | | [Route("Xs_SeOrderOutStockSumReport/Xs_SeOrderOutStockSumReportList")] |
| | | [HttpGet] |
| | | public object Xs_SeOrderOutStockSumReportList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | //反序列化传递的值 |
| | | |
| | | ds = oCN.RunProcReturn($"exec h_p_Xs_SeOrderOutStockSumReport " + sWhere + "", "h_p_Xs_SeOrderOutStockSumReport"); |
| | | |
| | | 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 = "1"; |
| | | 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 入库汇总 查询 |
| | | [Route("Cg_PoOrderInStockSumReport/Cg_PoOrderInStockSumReportList")] |
| | | [HttpGet] |
| | | public object Cg_PoOrderInStockSumReportList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | //反序列化传递的值 |
| | | |
| | | ds = oCN.RunProcReturn($"exec h_p_Cg_PoOrderInStockSumReport " + sWhere + "", "h_p_Cg_PoOrderInStockSumReport"); |
| | | |
| | | 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 = "1"; |
| | | 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 |
| | | |
| | | } |
| | | |
| | | } |