New file |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers.SCGL |
| | | { |
| | | public class JIT_CompleteController : ApiController |
| | | { |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | #region é½å¥åæä¿¡æ¯æç»å表 |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="sWhere">æ¥è¯¢æ¡ä»¶</param> |
| | | /// <param name="HMainICMOEntryID">ç产订åæç»è¡¨id</param> |
| | | /// <returns></returns> |
| | | [Route("JIT_Complete/JIT_CompleteDetailList")] |
| | | [HttpGet] |
| | | public object JIT_CompleteDetailList(string sWhere, string HMainICMOEntryID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_JIT_MOMaterReadysBill where 主ç产订ååå
ç = '" + HMainICMOEntryID + "' " + sWhere + " order by æ¥è®¡åæ¥æ,ç©æID desc ", "h_v_JIT_Gy_WorkWarehouseBillList"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | 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> |
| | | /// <param name="sWhere">æ¥è¯¢æ¡ä»¶</param> |
| | | /// <param name="HMaterID">ç©æID</param> |
| | | /// <returns></returns> |
| | | [Route("JIT_Complete/JIT_CompleteMaterialDetailList")] |
| | | [HttpGet] |
| | | public object JIT_CompleteMaterialDetailList(string sWhere, string HMaterID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_JIT_MOMaterReadysBill where ç©æID = '" + HMaterID + "' " + sWhere + " ORDER BY æ¥è®¡åæ¥æ ASC,å¯ç¨æ°é DESC,çäº§è½¦é´ ", "h_v_JIT_Gy_WorkWarehouseBillList"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | 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 |
| | | } |
| | | } |