屠宰场管理服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.3 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BWP.B3ClientService.BO;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.JsonRpc;
using Newtonsoft.Json;
using TSingSoft.WebPluginFramework;
namespace BWP.B3ClientService.Rpcs.BillRpc
{
[Rpc]
public static class SaleOutStoreRpc
{
[Rpc]
public static string SyncList(DateTime date, string customerName, string sendLineName, string billstate)
{
var dmoquery = new DmoQuery(typeof(SaleOutStore));
dmoquery.Where.Conditions.Add(DQCondition.GreaterThanOrEqual("LoadTime", date));
dmoquery.Where.Conditions.Add(DQCondition.LessThan("LoadTime", date.AddDays(1)));
if (!string.IsNullOrWhiteSpace(customerName))
{
dmoquery.Where.Conditions.Add(DQCondition.EQ("Customer_Name",customerName));
}
if (!string.IsNullOrWhiteSpace(sendLineName))
{
dmoquery.Where.Conditions.Add(DQCondition.EQ("DeliverGoodsLine_Name", sendLineName));
}
if (!string.IsNullOrWhiteSpace(billstate))
{
dmoquery.Where.Conditions.Add(DQCondition.EQ("BillState", billstate));
}
var list = dmoquery.EExecuteList().Cast<SaleOutStore>().ToList();
return JsonConvert.SerializeObject(list);
}
}
}