Browse Source

修改。

master
yibo 8 years ago
parent
commit
859efbcb6d
4 changed files with 9 additions and 3 deletions
  1. +1
    -0
      B3ClientService/B3ClientService.csproj
  2. +0
    -1
      B3ClientService/RpcBO/Bill/WeightBill/RpcWeightBill.cs
  3. +5
    -1
      B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs
  4. +3
    -1
      B3ClientService/Tasks/UpdateLoad/UpLoadWeightBill.cs

+ 1
- 0
B3ClientService/B3ClientService.csproj View File

@ -48,6 +48,7 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />


+ 0
- 1
B3ClientService/RpcBO/Bill/WeightBill/RpcWeightBill.cs View File

@ -7,7 +7,6 @@ using System.Threading.Tasks;
namespace BWP.B3ClientService.RpcBO
{
[RpcObject]
public class RpcWeightBill
{
public SWeightBill Bill { get; set; }


+ 5
- 1
B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs View File

@ -99,10 +99,14 @@ namespace BWP.B3ClientService.Rpcs.BillRpc
}
[Rpc]
public static List<WeightBill> GetWeightBillList(DateTime date)
public static List<WeightBill> GetWeightBillList(DateTime date, long? carID, long? supplierID)
{
var query = new DmoQuery(typeof(WeightBill));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("DeleteState", false), DQCondition.Between("WeighTime", date.Date, date.Date + new TimeSpan(23, 59, 29))));
if (carID.HasValue)
query.Where.Conditions.Add(DQCondition.EQ("Car_ID", carID));
if (supplierID.HasValue)
query.Where.Conditions.Add(DQCondition.EQ("Supplier_ID", supplierID));
return query.EExecuteList().Cast<WeightBill>().ToList();
}


+ 3
- 1
B3ClientService/Tasks/UpdateLoad/UpLoadWeightBill.cs View File

@ -10,6 +10,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
using TSingSoft.WebPluginFramework;
using TSingSoft.WebPluginFramework.BWPClients;
@ -19,6 +20,7 @@ namespace BWP.B3ClientService.Tasks.UpdateLoad
{
public static void Execute(string uri)
{
var serializer = new JavaScriptSerializer();
//获取所有未上传的数据
var allBill = GetAllNeedSyncBill();
@ -38,7 +40,7 @@ namespace BWP.B3ClientService.Tasks.UpdateLoad
}
#endregion
var sync = CreateRpcWeightBill(item);
var sync = serializer.Serialize(CreateRpcWeightBill(item));
var back = bwpClient.Call<BackRpcObj>("/MainSystem/B3ButcherManage/Rpcs/WeighBillRpc/UpdateOrInsert", sync);
#region 同步完了要清理掉删除的明细(当前实体和数据库)


Loading…
Cancel
Save