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 XWMSSOHController : BaseController { private readonly IUnitWork _unitWork; public XWMSSOHController(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.XWMSSOH where rownum <=30").Tables[0]; var list = data.AsEnumerable().Select (x => new { SALFCY_0 = x.Field("SALFCY_0"), ORDDAT_0 = x.Field("ORDDAT_0").ToShortDateString(), BPCORD_0 = x.Field("BPCORD_0"), BPCNAM_0 = x.Field("BPCNAM_0"), SOHNUM_0 = x.Field("SOHNUM_0"), SOPLIN_0 = x.Field("SOPLIN_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"), NODLQTY_0 = x.Field("NODLQTY_0"), STU_0 = x.Field("STU_0"), BPAADD_0 = x.Field("BPAADD_0") } ).ToList(); return JsonMore(list); } #endregion Search }