Browse Source

。。

master
wugang 8 years ago
parent
commit
85b856f624
16 changed files with 239 additions and 12 deletions
  1. +14
    -10
      B3ClientService/B3ClientService.csproj
  2. +13
    -0
      B3ClientService/BO/BaseInfo/WhiteBar.cs
  3. +12
    -2
      B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeight.cs
  4. +39
    -0
      B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeightByCode.cs
  5. +37
    -0
      B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeightInStore.cs
  6. +8
    -0
      B3ClientService/Rpcs/BaseInfoRpc.cs
  7. +116
    -0
      B3ClientService/Rpcs/BillRpc/CarcassStateWeightRpc.cs
  8. +0
    -0
      B3ClientService/Rpcs/RpcBO/Bill/GradeAndWeight/GradeAndWeight.cs
  9. +0
    -0
      B3ClientService/Rpcs/RpcBO/Bill/OrderDetail/NeedOrderEntity.cs
  10. +0
    -0
      B3ClientService/Rpcs/RpcBO/Bill/OrderDetail/RpcOrderBill.cs
  11. +0
    -0
      B3ClientService/Rpcs/RpcBO/Bill/OrderDetail/SOrderDetail.cs
  12. +0
    -0
      B3ClientService/Rpcs/RpcBO/Bill/WeightBill/RpcWeightBill.cs
  13. +0
    -0
      B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill.cs
  14. +0
    -0
      B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill_Detail.cs
  15. +0
    -0
      B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill_FarmerDetail.cs
  16. +0
    -0
      B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill_SanctionDetail.cs

+ 14
- 10
B3ClientService/B3ClientService.csproj View File

@ -79,8 +79,11 @@
<Compile Include="BO\BaseInfo\PurchaseType.cs" /> <Compile Include="BO\BaseInfo\PurchaseType.cs" />
<Compile Include="BO\BaseInfo\Sanction.cs" /> <Compile Include="BO\BaseInfo\Sanction.cs" />
<Compile Include="BO\BaseInfo\Supplier.cs" /> <Compile Include="BO\BaseInfo\Supplier.cs" />
<Compile Include="BO\BaseInfo\WhiteBar.cs" />
<Compile Include="BO\BaseInfo\Zone.cs" /> <Compile Include="BO\BaseInfo\Zone.cs" />
<Compile Include="BO\Bill\CarcassStateWeight\CarcassStateWeight.cs" /> <Compile Include="BO\Bill\CarcassStateWeight\CarcassStateWeight.cs" />
<Compile Include="BO\Bill\CarcassStateWeight\CarcassStateWeightByCode.cs" />
<Compile Include="BO\Bill\CarcassStateWeight\CarcassStateWeightInStore.cs" />
<Compile Include="BO\Bill\GradeAndWeight\GradeAndWeight_Detail.cs" /> <Compile Include="BO\Bill\GradeAndWeight\GradeAndWeight_Detail.cs" />
<Compile Include="BO\Bill\GradeAndWeight\OrderGradeFinishRelate.cs" /> <Compile Include="BO\Bill\GradeAndWeight\OrderGradeFinishRelate.cs" />
<Compile Include="BO\Bill\OrderDetail\HurryRecord.cs" /> <Compile Include="BO\Bill\OrderDetail\HurryRecord.cs" />
@ -106,19 +109,20 @@
<Compile Include="ConvertUtil.cs" /> <Compile Include="ConvertUtil.cs" />
<Compile Include="CTuple.cs" /> <Compile Include="CTuple.cs" />
<Compile Include="NamedValueTemplate.cs" /> <Compile Include="NamedValueTemplate.cs" />
<Compile Include="RpcBO\Bill\GradeAndWeight\GradeAndWeight.cs" />
<Compile Include="RpcBO\Bill\OrderDetail\NeedOrderEntity.cs" />
<Compile Include="RpcBO\Bill\OrderDetail\RpcOrderBill.cs" />
<Compile Include="RpcBO\Bill\OrderDetail\SOrderDetail.cs" />
<Compile Include="Rpcs\RpcBO\Bill\GradeAndWeight\GradeAndWeight.cs" />
<Compile Include="Rpcs\RpcBO\Bill\OrderDetail\NeedOrderEntity.cs" />
<Compile Include="Rpcs\RpcBO\Bill\OrderDetail\RpcOrderBill.cs" />
<Compile Include="Rpcs\RpcBO\Bill\OrderDetail\SOrderDetail.cs" />
<Compile Include="ClientSerializerBo\WeightBill\PrintWeightBill.cs" /> <Compile Include="ClientSerializerBo\WeightBill\PrintWeightBill.cs" />
<Compile Include="RpcBO\Bill\WeightBill\RpcWeightBill.cs" />
<Compile Include="Rpcs\RpcBO\Bill\WeightBill\RpcWeightBill.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RpcBO\Bill\WeightBill\SWeightBill_Detail.cs" />
<Compile Include="RpcBO\Bill\WeightBill\SWeightBill.cs" />
<Compile Include="RpcBO\Bill\WeightBill\SWeightBill_FarmerDetail.cs" />
<Compile Include="RpcBO\Bill\WeightBill\SWeightBill_SanctionDetail.cs" />
<Compile Include="Rpcs\RpcBO\Bill\WeightBill\SWeightBill_Detail.cs" />
<Compile Include="Rpcs\RpcBO\Bill\WeightBill\SWeightBill.cs" />
<Compile Include="Rpcs\RpcBO\Bill\WeightBill\SWeightBill_FarmerDetail.cs" />
<Compile Include="Rpcs\RpcBO\Bill\WeightBill\SWeightBill_SanctionDetail.cs" />
<Compile Include="Rpcs\BackRpcObj.cs" /> <Compile Include="Rpcs\BackRpcObj.cs" />
<Compile Include="Rpcs\BaseInfoRpc.cs" /> <Compile Include="Rpcs\BaseInfoRpc.cs" />
<Compile Include="Rpcs\BillRpc\CarcassStateWeightRpc.cs" />
<Compile Include="Rpcs\BillRpc\HouseAndSanctionRpc.cs" /> <Compile Include="Rpcs\BillRpc\HouseAndSanctionRpc.cs" />
<Compile Include="Rpcs\BillRpc\OrderConfirmRpc.cs" /> <Compile Include="Rpcs\BillRpc\OrderConfirmRpc.cs" />
<Compile Include="Rpcs\BillRpc\OrderDetailRpc.cs" /> <Compile Include="Rpcs\BillRpc\OrderDetailRpc.cs" />
@ -135,7 +139,7 @@
<Compile Include="WordPair.cs" /> <Compile Include="WordPair.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="RpcBO\BaseInfo\" />
<Folder Include="Rpcs\RpcBO\BaseInfo\" />
<Folder Include="Tasks\DownLoad\" /> <Folder Include="Tasks\DownLoad\" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />


+ 13
- 0
B3ClientService/BO/BaseInfo/WhiteBar.cs View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BWP.B3ClientService.BO
{
[Serializable]
public class WhiteBar : BaseInfo
{
}
}

+ 12
- 2
B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeight.cs View File

@ -16,7 +16,13 @@ namespace BWP.B3ClientService.BO
{ {
public long GradeAndWeight_ID { get; set; } public long GradeAndWeight_ID { get; set; }
public string Code { get; set; }
public long? Code { get; set; }
public long? Product_ID { get; set; }
public string Product_Name { get; set; }
public decimal? Nubmber { get; set; }
public decimal? State1Weight { get; set; } public decimal? State1Weight { get; set; }
@ -28,8 +34,12 @@ namespace BWP.B3ClientService.BO
public decimal? State5Weight { get; set; } public decimal? State5Weight { get; set; }
public NamedValue<> CurrentState { get; set; }
public NamedValue<>? CurrentState { get; set; }
public decimal? CurrentWeight { get; set; } public decimal? CurrentWeight { get; set; }
public DateTime? Time { get; set; }
} }
} }

+ 39
- 0
B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeightByCode.cs View File

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Forks.EnterpriseServices.DomainObjects2;
using TSingSoft.WebPluginFramework;
namespace BWP.B3ClientService.BO.Bill.CarcassStateWeight
{
[Serializable]
[BOClass]
[KeyField("GradeAndWeight_ID", KeyGenType.assigned)]
public class CarcassStateWeightByCode
{
public long GradeAndWeight_ID { get; set; }
public string BarCode { get; set; }
[ReferenceTo(typeof(GradeAndWeight_Detail), "Livestock_ID")]
[Join("GradeAndWeight_ID", "ID")]
public long? Livestock_ID { get; set; }
[ReferenceTo(typeof(GradeAndWeight_Detail), "Livestock_Name")]
[Join("GradeAndWeight_ID", "ID")]
public string Livestock_Name { get; set; }
public string Product_Name { get; set; }
public decimal? Nubmber{ get; set; }
public decimal? State1Weight { get; set; }
public DateTime Time { get; set; }
}
}

+ 37
- 0
B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeightInStore.cs View File

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Forks.EnterpriseServices.DomainObjects2;
using TSingSoft.WebPluginFramework;
namespace BWP.B3ClientService.BO.Bill.CarcassStateWeight
{
[Serializable]
[BOClass]
[KeyField("GradeAndWeight_ID", KeyGenType.assigned)]
public class CarcassStateWeightInStore
{
public long GradeAndWeight_ID { get; set; }
public string BarCode { get; set; }
[ReferenceTo(typeof(GradeAndWeight_Detail), "Livestock_ID")]
[Join("GradeAndWeight_ID", "ID")]
public long? Livestock_ID { get; set; }
[ReferenceTo(typeof(GradeAndWeight_Detail), "Livestock_Name")]
[Join("GradeAndWeight_ID", "ID")]
public string Livestock_Name { get; set; }
public string Product_Name { get; set; }
public decimal? Nubmber { get; set; }
public decimal? State2Weight { get; set; }
public DateTime Time { get; set; }
}
}

+ 8
- 0
B3ClientService/Rpcs/BaseInfoRpc.cs View File

@ -124,6 +124,14 @@ namespace BWP.B3ClientService.Rpcs
return GetBaseInfoList<LiveColonyHouse>(input, args, top); return GetBaseInfoList<LiveColonyHouse>(input, args, top);
} }
[Rpc]
public static List<WordPair> GetWhiteBarList(string input, string args, int top)
{
return GetBaseInfoList<WhiteBar>(input, args, top);
}
[Rpc] [Rpc]
public static List<Sanction> GetSanctionList() public static List<Sanction> GetSanctionList()
{ {


+ 116
- 0
B3ClientService/Rpcs/BillRpc/CarcassStateWeightRpc.cs View File

@ -0,0 +1,116 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Forks.EnterpriseServices.JsonRpc;
using BWP.B3ClientService.BO;
using BWP.B3ClientService.RpcBO;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using System.Web.Script.Serialization;
using TSingSoft.WebPluginFramework;
namespace BWP.B3ClientService.Rpcs.BillRpc
{
[Rpc]
public static class CarcassStateWeightRpc
{
static JavaScriptSerializer serializer = new JavaScriptSerializer();
[Rpc]
public static string GetCarcassStateWeightList(DateTime date, long? maxID)
{
var main = new JoinAlias(typeof(CarcassStateWeight));
var query = new DQueryDom(main);
query.Columns.Add(DQSelectColumn.Field("GradeAndWeight_ID"));
query.Columns.Add(DQSelectColumn.Field("Code"));
query.Columns.Add(DQSelectColumn.Field("CurrentWeight"));
query.Columns.Add(DQSelectColumn.Field("Nubmber"));
query.Columns.Add(DQSelectColumn.Field("Product_ID"));
query.Columns.Add(DQSelectColumn.Field("Product_Name"));
query.Columns.Add(DQSelectColumn.Field("State1Weight"));
query.Columns.Add(DQSelectColumn.Field("State2Weight"));
query.Columns.Add(DQSelectColumn.Field("State3Weight"));
query.Columns.Add(DQSelectColumn.Field("State4Weight"));
query.Columns.Add(DQSelectColumn.Field("State5Weight"));
query.Columns.Add(DQSelectColumn.Field("Time"));
query.Where.Conditions.Add(DQCondition.Between(DQExpression.Field(main, "Time"), date,
date + new TimeSpan(23, 59, 29)));
var list = new List<CarcassStateWeight>();
using (var session = Dmo.NewSession())
{
using (var reader = session.ExecuteReader(query))
{
while (reader.Read())
{
var csw = new CarcassStateWeight();
csw.GradeAndWeight_ID = (long)reader[0];
csw.Code = (long?)reader[1];
csw.CurrentWeight = (decimal?)reader[2];
csw.Nubmber = (decimal?)reader[3];
csw.Product_ID = (long?)reader[4];
csw.Product_Name = (string)reader[5];
csw.State1Weight = (decimal?)reader[6];
csw.State2Weight = (decimal?)reader[7];
csw.State3Weight = (decimal?)reader[8];
csw.State4Weight = (decimal?)reader[9];
csw.State5Weight = (decimal?)reader[10];
csw.Time = (DateTime?)reader[11];
list.Add(csw);
// csw.CurrentState = (long)reader[0];
}
}
}
return serializer.Serialize(list);
}
[Rpc]
public static string GetGradeAndWeight_DetailByCode(long code)
{
var query = new DmoQuery(typeof(GradeAndWeight_Detail));
query.Where.Conditions.Add(DQCondition.EQ("ID", code));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("Index", true));
return serializer.Serialize(query.EExecuteList());
}
[Rpc]
public static long UpdateOrInsertDetail(string json, bool fillTechnics)
{
json = json.ESerializeDateTime();
var entity = serializer.Deserialize<CarcassStateWeight>(json);
using (var session = Dmo.NewSession())
{
//if (entity.GradeAndWeight_ID == 0)
// session.Insert(entity);
//else
session.Insert(entity);
session.Commit();
return entity.GradeAndWeight_ID;
}
}
[Rpc]
public static int UpdateProduct(long id, long ProductID, string ProductName)
{
using (var session = Dmo.NewSession())
{
var update = new DQUpdateDom(typeof(CarcassStateWeight));
update.Where.Conditions.Add(DQCondition.EQ("GradeAndWeight_ID", id));
update.Columns.Add(new DQUpdateColumn("Product_ID", ProductID));
update.Columns.Add(new DQUpdateColumn("Product_Name", ProductName));
session.ExecuteNonQuery(update);
session.Commit();
}
return 1;
}
}
}

B3ClientService/RpcBO/Bill/GradeAndWeight/GradeAndWeight.cs → B3ClientService/Rpcs/RpcBO/Bill/GradeAndWeight/GradeAndWeight.cs View File


B3ClientService/RpcBO/Bill/OrderDetail/NeedOrderEntity.cs → B3ClientService/Rpcs/RpcBO/Bill/OrderDetail/NeedOrderEntity.cs View File


B3ClientService/RpcBO/Bill/OrderDetail/RpcOrderBill.cs → B3ClientService/Rpcs/RpcBO/Bill/OrderDetail/RpcOrderBill.cs View File


B3ClientService/RpcBO/Bill/OrderDetail/SOrderDetail.cs → B3ClientService/Rpcs/RpcBO/Bill/OrderDetail/SOrderDetail.cs View File


B3ClientService/RpcBO/Bill/WeightBill/RpcWeightBill.cs → B3ClientService/Rpcs/RpcBO/Bill/WeightBill/RpcWeightBill.cs View File


B3ClientService/RpcBO/Bill/WeightBill/SWeightBill.cs → B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill.cs View File


B3ClientService/RpcBO/Bill/WeightBill/SWeightBill_Detail.cs → B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill_Detail.cs View File


B3ClientService/RpcBO/Bill/WeightBill/SWeightBill_FarmerDetail.cs → B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill_FarmerDetail.cs View File


B3ClientService/RpcBO/Bill/WeightBill/SWeightBill_SanctionDetail.cs → B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill_SanctionDetail.cs View File


Loading…
Cancel
Save