| | |
| | | using static HH.WCS.Mobox3.pinggao.models.DAPING; |
| | | using HH.WCS.Mobox3.pinggao.util; |
| | | using SqlSugar; |
| | | using System.Diagnostics; |
| | | |
| | | namespace HH.WCS.Mobox3.pinggao.api |
| | | { |
| | | public class WmsSapController : System.Web.Http.ApiController |
| | | { |
| | | |
| | | #region 大屏数据接口 |
| | | /// <summary> |
| | | /// 大屏数据 |
| | | /// 出庫任務列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public DPList DpRecord(DpDto dpDto) |
| | | { |
| | | var response = new DPList |
| | | { |
| | | DpList = new List<DP> { } |
| | | }; |
| | | if (string.IsNullOrEmpty(dpDto.Code)) |
| | | { |
| | | LogHelper.Info("货位信息不能为空" ); |
| | | return response; |
| | | } |
| | | var db = new SqlHelper<object>().GetInstance(); |
| | | var list =db.Queryable<TN_DPRECORD>().Where(s=>s.S_LOCATION== dpDto.Code).OrderByDescending(s=>s.T_CREATE).ToList(); |
| | | var tasksList = list.Select(t => new DP |
| | | { |
| | | S_NO = t.S_NO, |
| | | S_WLBM = t.S_WLBM, |
| | | S_WLMC = t.S_WLMC, |
| | | N_COUNT = t.N_COUNT, |
| | | S_LOCATION = t.S_LOCATION |
| | | }).ToList(); |
| | | response.DpList = tasksList; |
| | | return response; |
| | | |
| | | } |
| | | #region 大屏数据接口 |
| | | /// <summary> |
| | | /// 大屏数据 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public BarChartResponse InOut(){ |
| | | |
| | | var response = new BarChartResponse |
| | |
| | | [HttpPost] |
| | | public LLDReturnRoot.Root LLDReceiveXmlData([FromBody] CKDdto.Root xmlData) |
| | | { |
| | | Stopwatch sw = new Stopwatch(); |
| | | sw.Start(); |
| | | #region xml数据接收转数组 |
| | | LogHelper.Info("生产订单领料单(生成领料单)接口:" + JsonConvert.SerializeObject(xmlData)); |
| | | |
| | |
| | | |
| | | #region 出库业务流程 |
| | | LLDReturnRoot.Root json = WmsSpaHelper.Out_Order_Ins(xmlData); |
| | | |
| | | |
| | | //接收返回参数 生成sap对接文档返回格式 |
| | | //var json = WmsSpaHelper.GetJsonResult(simpleResult.WLPZBH, simpleResult.resultCode.ToString(), simpleResult.resultMsg); |
| | | //接收返回参数 生成sap对接文档返回格式 |
| | | List<WcReturnRoot.ITEM> wcReturnRoots = new List<WcReturnRoot.ITEM>(); |
| | | |
| | | sw.Stop(); |
| | | long elapsedMilliseconds = sw.ElapsedMilliseconds; |
| | | return json; |
| | | #endregion |
| | | //#region 返回xml |