| using System; | 
| using System.Collections.Generic; | 
| using System.Data; | 
| using System.Linq; | 
| using System.Web.Http; | 
| using WebAPI.Models; | 
| using WebAPI.Service; | 
| using WebAPI.WebS; | 
|   | 
| namespace WebAPI.Controllers | 
| { | 
|     public class NewApiController : ApiController | 
|     { | 
|         /// <summary> | 
|         /// 获取单据号 | 
|         /// </summary> | 
|         /// <returns></returns> | 
|         [Route("api/newBill/getNewInterBillNo")] | 
|         [HttpGet] | 
|         public ApiResult<DocumentsView> GetNewInterBillNo(string billType) | 
|         { | 
|             var model = YqnQbService.GetInterBillNo(billType); | 
|             return model; | 
|         } | 
|         /// <summary> | 
|         /// 流转卡获取信息 | 
|         /// </summary> | 
|         /// <returns></returns> | 
|         [Route("api/newBill/getHbarCodeDetail")] | 
|         [HttpGet] | 
|         public ApiResult<DataSet> GetHbarCodeDetail(string sBillBarCode) | 
|         { | 
|             var model = YqnQbService.GetHbarCodeDetail(sBillBarCode); | 
|             return model; | 
|         } | 
|         /// <summary> | 
|         /// 流水号获得信息 | 
|         /// </summary> | 
|         /// <returns></returns> | 
|         [Route("api/newBill/getProcDetail")] | 
|         [HttpGet] | 
|         public ApiResult<DataSet> GetProcDetail(string sBillNo, string sProcNo) | 
|         { | 
|             var model = YqnQbService.GetProcDetail(sBillNo, sProcNo); | 
|             return model; | 
|         } | 
|         /// <summary> | 
|         /// 获取生产资源列表 | 
|         /// </summary> | 
|         /// <param name="sWhere"></param> | 
|         /// <returns></returns> | 
|         [Route("api/newBill/getSourceList")] | 
|         [HttpGet] | 
|         public ApiResult<DataSet> GetSourceList(string sWhere) | 
|         { | 
|             return YqnQbService.GetSourceList(sWhere); | 
|         } | 
|         /// <summary> | 
|         /// 获取工作中心 | 
|         /// </summary> | 
|         /// <param name="sWhere"></param> | 
|         /// <returns></returns> | 
|         [Route("api/newBill/getWorkCenterList")] | 
|         [HttpGet] | 
|         public ApiResult<DataSet> GetWorkCenterList(string sWhere) | 
|         { | 
|             return YqnQbService.GetWorkCenterList(sWhere); | 
|         } | 
|         /// <summary> | 
|         /// 进站接收单 | 
|         /// </summary> | 
|         /// <param name="oMain"></param> | 
|         /// <returns></returns> | 
|         [Route("api/newBill/setStationInBill")] | 
|         [HttpPost] | 
|         public ApiResult SetStationInBill(ClsSc_StationInBillMain oMain) | 
|         { | 
|             return YqnQbService.SetStationInBill(oMain); | 
|         } | 
|         /// <summary> | 
|         /// 获取进站单列表 | 
|         /// </summary> | 
|         /// <param name="sWhere"></param> | 
|         /// <returns></returns> | 
|         [Route("api/newBill/getStationInBillList")] | 
|         [HttpGet] | 
|         public ApiResult<DataSet> GetStationInBillList(string sWhere) | 
|         { | 
|             return YqnQbService.GetStationInBillList(sWhere); | 
|         } | 
|         /// <summary> | 
|         /// 获取出站单列表 | 
|         /// </summary> | 
|         /// <param name="sWhere"></param> | 
|         /// <returns></returns> | 
|         [Route("api/newBill/getStationOutBillList")] | 
|         [HttpGet] | 
|         public ApiResult<DataSet> GetStationOutBillList(string sWhere) | 
|         { | 
|             return YqnQbService.GetStationOutBillList(sWhere); | 
|         } | 
|         /// <summary> | 
|         /// 出站站接收单 | 
|         /// </summary> | 
|         /// <param name="oMain"></param> | 
|         /// <returns></returns> | 
|         [Route("api/newBill/setStationOutBill")] | 
|         [HttpPost] | 
|         public ApiResult SetStationOutBill(StationOutBillView oMain) | 
|         { | 
|             return YqnQbService.SetStationOutBill(oMain); | 
|         } | 
|         /// <summary> | 
|         /// 获取流转卡列表 | 
|         /// </summary> | 
|         /// <param name="sWhere"></param> | 
|         /// <returns></returns> | 
|         [Route("api/newBill/getStationMainList")] | 
|         [HttpGet] | 
|         public static ApiResult<DataSet> GetPorcessMainList(string sWhere) | 
|         { | 
|             return YqnQbService.GetPorcessMainList(sWhere); | 
|         } | 
|         /// <summary> | 
|         /// 获取流转卡子表列表 | 
|         /// </summary> | 
|         /// <param name="sWhere"></param> | 
|         /// <returns></returns> | 
|         [Route("api/newBill/getPorcessSubList")] | 
|         [HttpGet] | 
|         public static ApiResult<DataSet> GetPorcessSubList(int hInterId) | 
|         { | 
|             return YqnQbService.GetPorcessSubList(hInterId); | 
|         } | 
|         /// <summary> | 
|         /// 获取工序列表 | 
|         /// </summary> | 
|         /// <param name="hName"></param> | 
|         /// <param name="hLevel"></param> | 
|         /// <param name="hNumber"></param> | 
|         /// <param name="hBillSubType"></param> | 
|         /// <returns></returns> | 
|         [Route("api/newBill/getProcessList")] | 
|         [HttpGet] | 
|         public ApiResult<List<Models.M_Process>> GetProcessList(string hName,string hNumber, string hBillSubType,int page,int limit,int hLevel=0) | 
|         { | 
|             return YqnQbService.GetProcessList(hName, hLevel, hNumber, hBillSubType , page,  limit); | 
|         } | 
|         /// <summary> | 
|         /// 获取单个工序详情 | 
|         /// </summary> | 
|         /// <param name="hItemId"></param> | 
|         /// <returns></returns> | 
|         [Route("api/newBill/getProcessDetail")] | 
|         [HttpGet] | 
|         public ApiResult<Models.M_Process> GetProcessDetail(int hItemId) | 
|         { | 
|             return YqnQbService.GetProcessDetail(hItemId); | 
|         } | 
|         /// <summary> | 
|         /// 删除某个工序 | 
|         /// </summary> | 
|         /// <param name="hItemId"></param> | 
|         /// <returns></returns> | 
|         [Route("api/newBill/deleteProcess")] | 
|         [HttpGet] | 
|         public ApiResult DeleteProcess(int hItemId) | 
|         { | 
|             return YqnQbService.DeleteProcess(hItemId); | 
|         } | 
|     } | 
| } |