using System; using System.Collections.Generic; using System.Data; using System.Linq; using HHWMS.Web.Models; using MESTOWMSService; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Newtonsoft.Json; using ServiceReference1; using WalkingTec.Mvvm.Core; using WalkingTec.Mvvm.Mvc; namespace HHWMS.Web.Controllers; [Area("xwms")] [ActionDescription("地点间收货")] public class XWMSSHIPController : BaseController { private readonly IUnitWork _unitWork; public XWMSSHIPController(IUnitWork unitWork) { _unitWork = unitWork; } #region Search [ActionDescription("Sys.Search")] public ActionResult Index() { return PartialView("Index"); } [ActionDescription("Sys.Search")] public ActionResult Search() { var data = OracleHelper.GetDataSet("select * from QREQ3.XWMSSHIP where rownum <=30").Tables[0]; var list = data.AsEnumerable().Select (x => new { SDHNUM_0 = x.Field("SDHNUM_0"), FCY_0 = x.Field("FCY_0"), STOFCY_0 = x.Field("STOFCY_0"), BPRNAM_0 = x.Field("BPRNAM_0"), SHIDAT_0 = x.Field("SHIDAT_0").ToShortDateString(), SDDLIN_0 = x.Field("SDDLIN_0"), ITMREF_0 = x.Field("ITMREF_0"), ITMDES1_0 = x.Field("ITMDES1_0"), ITMDES2_0 = x.Field("ITMDES2_0"), ITMDES3_0 = x.Field("ITMDES3_0"), YITMDES4_0 = x.Field("YITMDES4_0"), QTY_0 = x.Field("QTY_0"), SAU_0 = x.Field("SAU_0"), POHNUM_0 = x.Field("POHNUM_0"), POPLIN_0 = x.Field("POPLIN_0"), LOT_0 = x.Field("LOT_0"), QTYSTU_0 = x.Field("QTYSTU_0") } ).ToList(); return JsonMore(list); } #endregion Search }