Browse Source

加经检费 猪场扣款。

master
yibo 8 years ago
parent
commit
66dd7bcf3e
5 changed files with 56 additions and 1 deletions
  1. +1
    -0
      B3ClientService/B3ClientService.csproj
  2. +4
    -0
      B3ClientService/BO/Bill/WeightBill/WeightBill.cs
  3. +24
    -0
      B3ClientService/BO/Bill/WeightBill/WeightDetail.cs
  4. +4
    -0
      B3ClientService/RpcBO/Bill/WeightBill/SWeightBill.cs
  5. +23
    -1
      B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs

+ 1
- 0
B3ClientService/B3ClientService.csproj View File

@ -86,6 +86,7 @@
<Compile Include="BO\Bill\WeightBill\WeightBill_FarmerDetail.cs" />
<Compile Include="BO\Bill\WeightBill\WeightBill_HouseDetail.cs" />
<Compile Include="BO\Bill\WeightBill\WeightBill_SanctionDetail.cs" />
<Compile Include="BO\Bill\WeightBill\WeightDetail.cs" />
<Compile Include="BO\SyncBase.cs" />
<Compile Include="BO\SyncBill.cs" />
<Compile Include="BO\SyncBO\MinEmployee.cs" />


+ 4
- 0
B3ClientService/BO/Bill/WeightBill/WeightBill.cs View File

@ -61,6 +61,10 @@ namespace BWP.B3ClientService.BO
}
}
public decimal? JingJianFee { get; set; }
public decimal? DiscontMoney { get; set; }
public string AnimalTestNumber { get; set; }
public DateTime? AnimalTestDate { get; set; }


+ 24
- 0
B3ClientService/BO/Bill/WeightBill/WeightDetail.cs View File

@ -0,0 +1,24 @@
using BWP.B3Frameworks.BO;
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BWP.B3ClientService.BO
{
[Serializable]
public class WeightDetail : Base
{
public long WeightBill_Detail_ID { get; set; }
public string Type { get; set; }
public decimal Weight { get; set; }
public DateTime? Time { get; set; }
[NonDmoProperty]
public bool Delete { get; set; }
}
}

+ 4
- 0
B3ClientService/RpcBO/Bill/WeightBill/SWeightBill.cs View File

@ -36,6 +36,10 @@ namespace BWP.B3ClientService.RpcBO
public decimal? ShackPrice { get; set; }
public decimal? JingJianFee { get; set; }
public decimal? DiscontMoney { get; set; }
public string AnimalTestNumber { get; set; }
public DateTime? AnimalTestDate { get; set; }


+ 23
- 1
B3ClientService/Rpcs/BillRpc/WeightBillRpc.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;
namespace BWP.B3ClientService.Rpcs.BillRpc
@ -17,9 +18,14 @@ namespace BWP.B3ClientService.Rpcs.BillRpc
[Rpc]
public static class WeightBillRpc
{
static JavaScriptSerializer serializer = new JavaScriptSerializer();
[Rpc]
public static BackRpcObj UploadBill(WeightBill dmo)
public static BackRpcObj UploadBill(WeightBill dmo, string recordDetail)
{
recordDetail = recordDetail.ESerializeDateTime();
var records = serializer.Deserialize<List<WeightDetail>>(recordDetail);
using (var session = Dmo.NewSession())
{
if (dmo.ID == 0)
@ -40,6 +46,13 @@ namespace BWP.B3ClientService.Rpcs.BillRpc
session.Insert(item);
else
session.Update(item);
foreach (var r in records)
{
if (r.Delete)
session.Delete(r);
else
session.Insert(r);
}
}
dmo.FarmerDetails = new WeightBill_FarmerDetailCollection();
dmo.Details = new WeightBill_DetailCollection();
@ -389,6 +402,15 @@ namespace BWP.B3ClientService.Rpcs.BillRpc
}
return result;
}
[Rpc]
public static string GetWeightRecord(long id)
{
var query = new DmoQuery(typeof(WeightDetail));
query.Where.Conditions.Add(DQCondition.EQ("WeightBill_Detail_ID", id));
var result = query.EExecuteList();
return serializer.Serialize(result);
}
}
[RpcObject]


Loading…
Cancel
Save