|
|
using BO.BO.Bill;
|
|
|
using Forks.JsonRpc.Client;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
using System.Web.Script.Serialization;
|
|
|
|
|
|
namespace BO.Utils.BillRpc
|
|
|
{
|
|
|
public static class GradeAndWeightRpc
|
|
|
{
|
|
|
static JavaScriptSerializer serializer = new JavaScriptSerializer();
|
|
|
|
|
|
public static List<GradeAndWeight> GetGradeAndWeightList(DateTime date, long? maxID = null)
|
|
|
{
|
|
|
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/GetGradeAndWeightList";
|
|
|
var result = RpcFacade.Call<string>(method, date, maxID);
|
|
|
return serializer.Deserialize<List<GradeAndWeight>>(result);
|
|
|
}
|
|
|
|
|
|
public static List<GradeAndWeight_Detail> GetDetails(DateTime startDate, DateTime endDate, int? order, int type)
|
|
|
{
|
|
|
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/GetDetailsList";
|
|
|
var result = RpcFacade.Call<string>(method, startDate, endDate, order, type);
|
|
|
result = result.ESerializeDateTime();
|
|
|
return serializer.Deserialize<List<GradeAndWeight_Detail>>(result);
|
|
|
}
|
|
|
|
|
|
public static void InsertOrInsertDetail(GradeAndWeight_Detail detail)
|
|
|
{
|
|
|
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/InsertOrInsertDetail";
|
|
|
detail.ID = RpcFacade.Call<long>(method, serializer.Serialize(detail));
|
|
|
}
|
|
|
|
|
|
public static void UpdateLivestock(long id, long liveStockID, string liveStockName)
|
|
|
{
|
|
|
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/UpdateLivestock";
|
|
|
RpcFacade.Call<int>(method, id, liveStockID, liveStockName);
|
|
|
}
|
|
|
|
|
|
public static void SetGradeFinish(long orderDetailID, short technics)
|
|
|
{
|
|
|
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/SetGradeFinish";
|
|
|
RpcFacade.Call<int>(method, orderDetailID, technics);
|
|
|
}
|
|
|
}
|
|
|
}
|