屠宰场管理服务
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.

35 lines
1.2 KiB

using BWP.B3ClientService.BO;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebPluginFramework.BWPClients;
using TSingSoft.WebPluginFramework;
namespace BWP.B3ClientService.Tasks.UpdateLoad
{
public static class DoCheckBills
{
public static void Execute(string uri)
{
var weightBills = GetWeightBillCheck();
foreach (var item in weightBills)
{
var bwpClient = new BWPClient(uri, item.Item2);
bwpClient.Call<int>("/MainSystem/B3ButcherManage/Rpcs/WeighBillRpc/DoCheck", item.Item1);
WeightBillCheck.SetSynced(item.Item1);
}
}
static List<Tuple<long, string>> GetWeightBillCheck()
{
var query = new DQueryDom(new JoinAlias(typeof(WeightBillCheck)));
query.Columns.Add(DQSelectColumn.Field("B3ID"));
query.Columns.Add(DQSelectColumn.Field("Creator"));
query.Where.Conditions.Add(DQCondition.And(DQCondition.IsNotNull(DQExpression.Field("B3ID")), DQCondition.EQ("Sync", false)));
return query.EExecuteList<long, string>();
}
}
}