diff --git a/B3ClientService/B3ClientService.csproj b/B3ClientService/B3ClientService.csproj
index 40bffa7..20fdbbf 100644
--- a/B3ClientService/B3ClientService.csproj
+++ b/B3ClientService/B3ClientService.csproj
@@ -79,8 +79,11 @@
+
+
+
@@ -106,19 +109,20 @@
-
-
-
-
+
+
+
+
-
+
-
-
-
-
+
+
+
+
+
@@ -135,7 +139,7 @@
-
+
diff --git a/B3ClientService/BO/BaseInfo/WhiteBar.cs b/B3ClientService/BO/BaseInfo/WhiteBar.cs
new file mode 100644
index 0000000..8b7f11c
--- /dev/null
+++ b/B3ClientService/BO/BaseInfo/WhiteBar.cs
@@ -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
+ {
+
+ }
+}
diff --git a/B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeight.cs b/B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeight.cs
index 6c360de..deaddcc 100644
--- a/B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeight.cs
+++ b/B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeight.cs
@@ -16,7 +16,13 @@ namespace BWP.B3ClientService.BO
{
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; }
@@ -28,8 +34,12 @@ namespace BWP.B3ClientService.BO
public decimal? State5Weight { get; set; }
- public NamedValue<胴体状态> CurrentState { get; set; }
+ public NamedValue<胴体状态>? CurrentState { get; set; }
public decimal? CurrentWeight { get; set; }
+
+ public DateTime? Time { get; set; }
}
+
+
}
diff --git a/B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeightByCode.cs b/B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeightByCode.cs
new file mode 100644
index 0000000..abbc675
--- /dev/null
+++ b/B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeightByCode.cs
@@ -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; }
+
+
+ }
+
+}
diff --git a/B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeightInStore.cs b/B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeightInStore.cs
new file mode 100644
index 0000000..87ddb03
--- /dev/null
+++ b/B3ClientService/BO/Bill/CarcassStateWeight/CarcassStateWeightInStore.cs
@@ -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; }
+
+ }
+}
diff --git a/B3ClientService/Rpcs/BaseInfoRpc.cs b/B3ClientService/Rpcs/BaseInfoRpc.cs
index e081f6e..a8c1b22 100644
--- a/B3ClientService/Rpcs/BaseInfoRpc.cs
+++ b/B3ClientService/Rpcs/BaseInfoRpc.cs
@@ -124,6 +124,14 @@ namespace BWP.B3ClientService.Rpcs
return GetBaseInfoList(input, args, top);
}
+ [Rpc]
+ public static List GetWhiteBarList(string input, string args, int top)
+ {
+ return GetBaseInfoList(input, args, top);
+ }
+
+
+
[Rpc]
public static List GetSanctionList()
{
diff --git a/B3ClientService/Rpcs/BillRpc/CarcassStateWeightRpc.cs b/B3ClientService/Rpcs/BillRpc/CarcassStateWeightRpc.cs
new file mode 100644
index 0000000..93fd0d0
--- /dev/null
+++ b/B3ClientService/Rpcs/BillRpc/CarcassStateWeightRpc.cs
@@ -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();
+ 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(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;
+ }
+
+
+
+ }
+}
diff --git a/B3ClientService/RpcBO/Bill/GradeAndWeight/GradeAndWeight.cs b/B3ClientService/Rpcs/RpcBO/Bill/GradeAndWeight/GradeAndWeight.cs
similarity index 100%
rename from B3ClientService/RpcBO/Bill/GradeAndWeight/GradeAndWeight.cs
rename to B3ClientService/Rpcs/RpcBO/Bill/GradeAndWeight/GradeAndWeight.cs
diff --git a/B3ClientService/RpcBO/Bill/OrderDetail/NeedOrderEntity.cs b/B3ClientService/Rpcs/RpcBO/Bill/OrderDetail/NeedOrderEntity.cs
similarity index 100%
rename from B3ClientService/RpcBO/Bill/OrderDetail/NeedOrderEntity.cs
rename to B3ClientService/Rpcs/RpcBO/Bill/OrderDetail/NeedOrderEntity.cs
diff --git a/B3ClientService/RpcBO/Bill/OrderDetail/RpcOrderBill.cs b/B3ClientService/Rpcs/RpcBO/Bill/OrderDetail/RpcOrderBill.cs
similarity index 100%
rename from B3ClientService/RpcBO/Bill/OrderDetail/RpcOrderBill.cs
rename to B3ClientService/Rpcs/RpcBO/Bill/OrderDetail/RpcOrderBill.cs
diff --git a/B3ClientService/RpcBO/Bill/OrderDetail/SOrderDetail.cs b/B3ClientService/Rpcs/RpcBO/Bill/OrderDetail/SOrderDetail.cs
similarity index 100%
rename from B3ClientService/RpcBO/Bill/OrderDetail/SOrderDetail.cs
rename to B3ClientService/Rpcs/RpcBO/Bill/OrderDetail/SOrderDetail.cs
diff --git a/B3ClientService/RpcBO/Bill/WeightBill/RpcWeightBill.cs b/B3ClientService/Rpcs/RpcBO/Bill/WeightBill/RpcWeightBill.cs
similarity index 100%
rename from B3ClientService/RpcBO/Bill/WeightBill/RpcWeightBill.cs
rename to B3ClientService/Rpcs/RpcBO/Bill/WeightBill/RpcWeightBill.cs
diff --git a/B3ClientService/RpcBO/Bill/WeightBill/SWeightBill.cs b/B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill.cs
similarity index 100%
rename from B3ClientService/RpcBO/Bill/WeightBill/SWeightBill.cs
rename to B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill.cs
diff --git a/B3ClientService/RpcBO/Bill/WeightBill/SWeightBill_Detail.cs b/B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill_Detail.cs
similarity index 100%
rename from B3ClientService/RpcBO/Bill/WeightBill/SWeightBill_Detail.cs
rename to B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill_Detail.cs
diff --git a/B3ClientService/RpcBO/Bill/WeightBill/SWeightBill_FarmerDetail.cs b/B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill_FarmerDetail.cs
similarity index 100%
rename from B3ClientService/RpcBO/Bill/WeightBill/SWeightBill_FarmerDetail.cs
rename to B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill_FarmerDetail.cs
diff --git a/B3ClientService/RpcBO/Bill/WeightBill/SWeightBill_SanctionDetail.cs b/B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill_SanctionDetail.cs
similarity index 100%
rename from B3ClientService/RpcBO/Bill/WeightBill/SWeightBill_SanctionDetail.cs
rename to B3ClientService/Rpcs/RpcBO/Bill/WeightBill/SWeightBill_SanctionDetail.cs