| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ«ç è¿åä»åºä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetWarehouse_Json")] |
| | | [HttpGet] |
| | | public object GetWarehouse_Json(string HBarCode, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | Int64 HWhID = 0; |
| | | HWhID = DBUtility.ClsPub.isLong(HBarCode.Replace("HWH", "")); |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HSPFlag from Gy_Warehouse with(nolock) where HStopflag=0 and HItemID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Warehouse"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼è¯·ç¡®è®¤ææ«ä»åºæ¡ç æ¯å¦å±äºè¯¥ç»ç»ï¼ä¸ä¸ºéç¦ç¨ç¶æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | 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> |
| | | /// æ«ç è¿åä»ä½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetStockPlace_Json")] |
| | | [HttpGet] |
| | | public object GetStockPlace_Json(string HBarCode, Int64 HWhID, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | Int64 sHSPID = 0; |
| | | Int64 sHWhID = 0; |
| | | if (HBarCode.Contains(";")) |
| | | { |
| | | string[] sArray = HBarCode.Replace("HSP", "").Split(';'); |
| | | sHSPID = DBUtility.ClsPub.isLong(sArray[1]); |
| | | sHWhID = DBUtility.ClsPub.isLong(sArray[0]); |
| | | } |
| | | |
| | | if(HWhID==0) |
| | | { |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼è¯·ç¡®è®¤ææ«ä»ä½æ¡ç æ¯å¦å±äºè¯¥ç»ç»ï¼ä¸ä¸ºéç¦ç¨ç¶æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | DataSet ds2 = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace"); |
| | | if (ds2 == null || ds2.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼è¯·ç¡®è®¤ææ«ä»ä½æ¡ç æ¯å¦å±äºè¯¥ç»ç»ï¼ä¸ä¸ºéç¦ç¨ç¶æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds2.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åä»ä½åè¡¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetStockPlaceList_Json")] |
| | | [HttpGet] |
| | | public object GetStockPlaceList_Json(string StockPlace, Int64 HWhID, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | //çé¢ä¸æªéæ©ä»åº æ ä»ä½éæ©å表çé¢è¾å
¥è¿æ»¤æ¡ä»¶ |
| | | if (HWhID == 0) |
| | | { |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%')", "h_v_IF_StockPlace"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½ä»ä½è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //çé¢ä¸å·²éä»åº |
| | | else |
| | | { |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and HWHID=" + HWhID.ToString() + " and (HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%')", "h_v_IF_StockPlace"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | DataSet ds2 = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HUSEORGID = " + HStockOrgID.ToString() + " and (HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%')", "h_v_IF_StockPlace"); |
| | | if (ds2 == null || ds2.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½ä»ä½è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds2.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | 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> |
| | | /// æ«ç è¿åèåä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetEmployee_Json")] |
| | | [HttpGet] |
| | | public object GetEmployee_Json(string HBarCode) |
| | | { |
| | | try |
| | | { |
| | | Int64 HEmpID = 0; |
| | | HEmpID = DBUtility.ClsPub.isLong(HBarCode); |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Employee with(nolock) where HStopflag=0 and HItemID=" + HEmpID.ToString(), "Gy_Employee"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼è¯·ç¡®è®¤ææ«èåæ¡ç æ¯å¦æ£ç¡®ï¼ä¸ä¸ºéç¦ç¨ç¶æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | 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> |
| | | /// æ«ç è¿åé¨é¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetDepartment_Json")] |
| | | [HttpGet] |
| | | public object GetDepartment_Json(string HBarCode) |
| | | { |
| | | try |
| | | { |
| | | Int64 HDepID = 0; |
| | | HDepID = DBUtility.ClsPub.isLong(HBarCode.Replace("HDE", "")); |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Department with(nolock) where HStopflag=0 and HItemID=" + HDepID.ToString(), "Gy_Department"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼è¯·ç¡®è®¤ææ«é¨é¨æ¡ç æ¯å¦æ£å¸¸ï¼ä¸ä¸ºéç¦ç¨ç¶æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | 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> |
| | | /// æ«ç è¿åä¾åºåä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetSupplier_Json")] |
| | | [HttpGet] |
| | | public object GetSupplier_Json(Int64 HSupID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Supplier with(nolock) where HStopflag=0 and HItemID=" + HSupID.ToString(), "Gy_Supplier"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼è¯·ç¡®è®¤ææ«ä¾åºåæ¡ç æ¯å¦æ£ç¡®ï¼ä¸ä¸ºéç¦ç¨ç¶æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | 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> |
| | | /// æ«ç è¿å客æ·ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetCustomer_Json")] |
| | | [HttpGet] |
| | | public object GetCustomer_Json(Int64 HCusID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Customer with(nolock) where HStopflag=0 and HItemID=" + HCusID.ToString(), "Gy_Customer"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼è¯·ç¡®è®¤ææ«å®¢æ·æ¡ç æ¯å¦æ£ç¡®ï¼ä¸ä¸ºéç¦ç¨ç¶æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å客æ·åè¡¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetCustomerList_Json")] |
| | | [HttpGet] |
| | | public object GetCustomerList_Json(string Customer, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Customer with(nolock) where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + Customer + "%' or HName like '%" + Customer + "%')", "Gy_Customer"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½å®¢æ·è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | 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 |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region ç颿§ä»¶åè½è°ç¨æ¹æ³ |
| | | #region æ«ç 模åè°ç¨æ¹æ³ |
| | | |
| | | #region æ ¹æ®åæ®ç±»åè·ååæ®åç±»å |
| | | |
| | |
| | | try |
| | | { |
| | | ds = oWebs.get_BillSubType(HBillType, HStockOrgID); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region æ«ç æ¨¡å æ ¹æ®æ¡ç å é¤ç¼åå表ä¸å¯¹åºæ¡ç è®°å½ |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®æ¡ç å 餿¡ç åºå
¥åºç¼å表ä¸è®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json")] |
| | | [HttpGet] |
| | | public object set_DelPonderationBillMain_Temp_BarCode_Json(long HInterID, string HBillType, string HBarCode) |
| | | { |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HBarCode<>'' and HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HBarCode='" + HBarCode + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿å"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å 餿¡ç åºå
¥åºç¼åå表æ¡ç è®°å½å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region æ«ç 模å å é¤åè½æé®è°ç¨ å 餿¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | |
| | | /// <summary> |
| | | /// æ«ç 模åï¼å é¤éä¸è¡æ¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json")] |
| | | [HttpGet] |
| | | public object set_DelPonderationBillMain_Temp_InterIDAndSource_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, HBillType, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å 餿éè¡æ¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region æ«ææ¨¡å éåºåè½æé®è°ç¨ å é¤å
è¿å
åºä¸´æ¶è¡¨ï¼æ´æ° HlineStatus =1ï¼ |
| | | |
| | | /// <summary> |
| | | /// å é¤å
è¿å
åºä¸´æ¶è¡¨ï¼æ´æ° HlineStatus =1ï¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_DelPonderationBillMain_Temp_FIFO_Json")] |
| | | [HttpGet] |
| | | public object set_DelPonderationBillMain_Temp_FIFO_Json(long HInterID, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.set_DelPonderationBillMain_Temp_FIFO(HInterID, HBillType, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ´æ°å
è¿å
åºä¸´æ¶è¡¨HlineStatuså¼å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region ç¼åå表模åè°ç¨ |
| | | |
| | | #region ç¼åå表 ç¼è¾åè½è°ç¨ |
| | | |
| | |
| | | try |
| | | { |
| | | ds = oWebs.GetKf_ICStockBillQueryList(HBillType, HBillNo, HSourceBillNo); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region å 餿¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | |
| | | /// <summary> |
| | | /// æ«ç 模åï¼å é¤éä¸è¡æ¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json")] |
| | | [HttpGet] |
| | | public object set_DelPonderationBillMain_Temp_InterIDAndSource_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, HBillType, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å 餿éè¡æ¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ®ID,å 餿¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | /// æ ¹æ®åæ®ID,å 餿¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ ï¼åè½åä¸é¢æ ¹æ®IDå é¤ç¼åè®°å½æ¹æ³ï¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/DeleteBillList_Json")] |
| | |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region å é¤å
è¿å
åºä¸´æ¶è¡¨ï¼æ´æ° HlineStatus =1ï¼ |
| | | |
| | | #region æäº¤çåå¤çæ¹æ³ |
| | | |
| | | #region ç产å
¥åº ä¸ä¼ çå |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region éè´å
¥åº ä¸ä¼ çå |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region å
¶ä»å
¥åº ä¸ä¼ çå |
| | | |
| | | #region å
¶ä»å
¥åº æ°å¢æ¨¡å¼ |
| | | |
| | | /// <summary> |
| | | /// å é¤å
è¿å
åºä¸´æ¶è¡¨ï¼æ´æ° HlineStatus =1ï¼ |
| | | /// å
¶ä»å
¥åºæ°å¢ä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_DelPonderationBillMain_Temp_FIFO_Json")] |
| | | [HttpGet] |
| | | public object set_DelPonderationBillMain_Temp_FIFO_Json(long HInterID, string HBillType) |
| | | [Route("WEBSController/set_SaveOtherInBill_Json")] |
| | | [HttpPost] |
| | | public object set_SaveOtherInBill_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | if (oWebs.set_DelPonderationBillMain_Temp_FIFO(HInterID, HBillType, ref DBUtility.ClsPub.sErrInfo)) |
| | | List<Model.ClsKf_OtherInBillMain> lsmain = new List<Model.ClsKf_OtherInBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getOtherInBillMainByJson(msg1); |
| | | WebS.ClsKf_OtherInBillMain websLsmain = new WebS.ClsKf_OtherInBillMain(); |
| | | string sSourceType = lsmain[0].HMainSourceBillType; |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HBillType = lsmain[0].HBillType; |
| | | websLsmain.HDate = lsmain[0].HDate; |
| | | websLsmain.HDeptID = lsmain[0].HDeptID; |
| | | websLsmain.HWHID = lsmain[0].HWHID; |
| | | websLsmain.HSCWHID = lsmain[0].HSCWHID; |
| | | websLsmain.HSupID = lsmain[0].HSupID; |
| | | websLsmain.HKeeperID = lsmain[0].HKeeperID; |
| | | websLsmain.HSecManagerID = lsmain[0].HSecManagerID; |
| | | websLsmain.HEmpID = lsmain[0].HEmpID; |
| | | websLsmain.HManagerID = lsmain[0].HManagerID; |
| | | websLsmain.HRemark = lsmain[0].HRemark; |
| | | websLsmain.HExplanation = lsmain[0].HExplanation; |
| | | websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo; |
| | | websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag; |
| | | websLsmain.HStockStyle = lsmain[0].HStockStyle; |
| | | websLsmain.HBillSubType = lsmain[0].HBillSubType; |
| | | if(lsmain[0].HMainSourceBillType== "1241") |
| | | { |
| | | websLsmain.HMainSourceBillType = "å
¥åºç³è¯·å"; |
| | | } |
| | | else |
| | | { |
| | | websLsmain.HMainSourceBillType = "æå·¥å½å
¥"; |
| | | } |
| | | websLsmain.HMaker = lsmain[0].HMaker; |
| | | websLsmain.HBillerID = lsmain[0].HBillerID; |
| | | websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; |
| | | websLsmain.HOWNERID = lsmain[0].HSTOCKORGID; |
| | | |
| | | if (oWebs.set_SaveOtherInBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ´æ°å
è¿å
åºä¸´æ¶è¡¨HlineStatuså¼å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.Message = "å
¶ä»åºåºåä¸ä¼ 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region æäº¤çåå¤çæ¹æ³ |
| | | #endregion |
| | | |
| | | |
| | | #region éå®åºåº ä¸ä¼ çå |
| | |
| | | #endregion |
| | | |
| | | |
| | | #region ç©ææ¡ç å¤çæ¹æ³ å
¶ä»åºåºåºæ¨¡å |
| | | #region ç©ææ¡ç å¤çæ¹æ³ åºå
¥åºæ¨¡å |
| | | |
| | | /// <summary> |
| | | /// ç©ææ¡ç ææ¬æ¡ æ«ç è°ç¨ |
| | |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_SourceBill_Temp " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_SourceBill_Temp"); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | string sMouldManagerCtl = "N"; //æ¯å¦å¯ç¨å¨å
·ç®¡ç |
| | | string sFIFOCtl = "N"; //æ¯å¦å¯ç¨å
è¿å
åºç®¡ç |
| | | ds = oWebs.GetBillEntryTmpList(HInterID, HBillNo, HBillType, HStockOrgID, ref sMouldManagerCtl, ref sFIFOCtl, ref DBUtility.ClsPub.sErrInfo); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | else |
| | | { |
| | | //æ·»å ç©ææç»å表åå |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | //æ·»å æ¨¡æ²»å
·å表åå |
| | | List<object> MouldcolumnNameList = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[1].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | MouldcolumnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | //æ·»å å
è¿å
åºå表åå |
| | | List<object> FIFOcolumnNameList = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[2].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | FIFOcolumnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | //æ·»å æ¡ç æç»å表åå |
| | | List<object> BarCodecolumnNameList = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[3].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | BarCodecolumnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | //æ·»å æºåçäº§æ±æ¥åæ¡ç æç»å表åå |
| | | List<object> ICMOReportcolumnNameList = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[4].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | ICMOReportcolumnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | |
| | | BarCodeDetailslist = ds.Tables[5] //è¿åå½åææ«ææ¡ç æç»ä¿¡æ¯ï¼5ï¼ |
| | | }; |
| | | objJsonResult.list = columnNameList; |
| | | objJsonResult.list = MouldcolumnNameList; |
| | | objJsonResult.list = FIFOcolumnNameList; |
| | | objJsonResult.list = BarCodecolumnNameList; |
| | | objJsonResult.list = ICMOReportcolumnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | |
| | | try |
| | | { |
| | | ds = oWebs.GetKf_PonderationBillMain_Temp_BillCheck(HInterID, HBillType, sWhere); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | try |
| | | { |
| | | ds = oWebs.GetKf_PonderationBillMain_TempList_BillCheck(HBillType, HMaker, HStockOrgID); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | try |
| | | { |
| | | ds = oWebs.GetBillEntry_Tmp_Pack(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | try |
| | | { |
| | | ds = oWebs.GetSc_PackUnionBill_TempList(HBillType, HMaker, HStockOrgID); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_DeletePackUnionBill '" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddPackBarCode_DeletePackUnionBill"); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | try |
| | | { |
| | | ds = oWebs.GetBillEntry_Temp_MoveStockBill_HuanTuo(HInterID, HBillNo, HBillType, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_KF_MoveStockBill_TempList_HuanTuo " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_KF_MoveStockBill_TempList_HuanTuo"); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_TempList_HuanTuo '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_KF_PonderationBillMain_TempList_HuanTuo"); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_Kf_BarCodeOutInReport_New " + sWhere, "h_p_Kf_BarCodeOutInReport_New"); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region æ¡ç åºåæ¥è¯¢æ¥è¡¨ |
| | | |
| | | #region è·åæ¡ç åºåä¿¡æ¯ |
| | | /// <summary> |
| | | /// è·åæ¡ç åºåä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetKf_BarCodeICInventoryReport_Json")] |
| | | [HttpGet] |
| | | public object GetKf_BarCodeICInventoryReport_Json(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_BarCodeICInventoryReport " + sWhere, "h_p_WMS_BarCodeICInventoryReport"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½åæè¾å
¥è¿æ»¤æ¡ä»¶ï¼æ²¡æè¿åä»»ä½ç»æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | 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 = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ¡ç åºåä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region WMSç©æåºå
¥åºè®°å½æ¥è¡¨ |
| | | |
| | | #region è·åWMSç©æåºå
¥åºè®°å½ |
| | | /// <summary> |
| | | /// è·åWMSç©æåºå
¥åºè®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetKf_MaterOutInReport_Json")] |
| | | [HttpGet] |
| | | public object GetKf_MaterOutInReport_Json(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_MaterOutInReport " + sWhere, "h_p_WMS_MaterOutInReport"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½åæè¾å
¥è¿æ»¤æ¡ä»¶ï¼æ²¡æè¿åä»»ä½ç»æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | 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 = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢WMSç©æåºå
¥åºè®°å½ä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region WMSç©æåºåæ¥è¯¢æ¥è¡¨ |
| | | |
| | | #region è·åWMSç©æåºåä¿¡æ¯ |
| | | /// <summary> |
| | | /// è·åWMSç©æåºåä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetKf_MaterICInventoryReport_Json")] |
| | | [HttpGet] |
| | | public object GetKf_MaterICInventoryReport_Json(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_MaterICInventoryReport " + sWhere, "h_p_WMS_MaterICInventoryReport"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½åæè¾å
¥è¿æ»¤æ¡ä»¶ï¼æ²¡æè¿åä»»ä½ç»æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | 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 = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢WMSç©æåºåä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #endregion |
| | | |