Files
8357WMS/HHWMS.Web/Areas/XWMS/Controllers/XWMSSOHController.cs
T
2023-12-21 15:32:09 +08:00

64 lines
2.1 KiB
C#

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<string>("SALFCY_0"),
ORDDAT_0 = x.Field<DateTime>("ORDDAT_0").ToShortDateString(),
BPCORD_0 = x.Field<string>("BPCORD_0"),
BPCNAM_0 = x.Field<string>("BPCNAM_0"),
SOHNUM_0 = x.Field<string>("SOHNUM_0"),
SOPLIN_0 = x.Field<Int64>("SOPLIN_0"),
ITMREF_0 = x.Field<string>("ITMREF_0"),
ITMDES1_0 = x.Field<string>("ITMDES1_0"),
ITMDES2_0 = x.Field<string>("ITMDES2_0"),
ITMDES3_0 = x.Field<string>("ITMDES3_0"),
YITMDES4_0 = x.Field<string>("YITMDES4_0"),
QTY_0 = x.Field<decimal>("QTY_0"),
NODLQTY_0 = x.Field<decimal>("NODLQTY_0"),
STU_0 = x.Field<string>("STU_0"),
BPAADD_0 = x.Field<string>("BPAADD_0")
}
).ToList();
return JsonMore(list);
}
#endregion Search
}