diff --git a/CowOutputClient/OperateWindow.xaml.cs b/CowOutputClient/OperateWindow.xaml.cs
index c104820..daa90bd 100644
--- a/CowOutputClient/OperateWindow.xaml.cs
+++ b/CowOutputClient/OperateWindow.xaml.cs
@@ -34,7 +34,8 @@ namespace CowOutputClient
DateTime mProduceDate;
DateTime mProduceStartDate;
string accountingUnit_ID = ConfigurationManager.AppSettings["AccountingUnit_ID"];
- string domain_ID = ConfigurationManager.AppSettings["Domain_ID"];
+ string domain_ID = ConfigurationManager.AppSettings["Domain_ID"];
+ string clientNode = ConfigurationManager.AppSettings["ClientNode"];
ButcherDetailData mButcherDetailData;
bool IsLoad = true;
decimal? tare = null;
@@ -333,7 +334,7 @@ namespace CowOutputClient
thread1.ReadParam += this.OnRead;
thread1.Start();
wpfUser = WpfUserBL.Load(UserBL.CurrentUser.ERP_User_ID);
- mTeam = ProductTeamBL.GetProductTeam(wpfUser.Employee_ID);
+ mTeam = ProductTeamBL.GetProductTeam(clientNode);
BindBaseData();
//IsLoad = false;
}
diff --git a/CowOutputClient/app.config b/CowOutputClient/app.config
index 93145fe..80d353d 100644
--- a/CowOutputClient/app.config
+++ b/CowOutputClient/app.config
@@ -7,6 +7,8 @@
+
+
diff --git a/WeighBusiness/BL/ProductTeamBL.cs b/WeighBusiness/BL/ProductTeamBL.cs
index 7e7af02..361b92c 100644
--- a/WeighBusiness/BL/ProductTeamBL.cs
+++ b/WeighBusiness/BL/ProductTeamBL.cs
@@ -40,8 +40,8 @@ namespace WeighBusiness.BL
if (teams.Count() > 0) {
foreach (var team in teams) {
string insertSql = InsertUtil.GetInsertSql(TableNames.生产班组,
- new string[] { "ProductTeam_ID", "Name", "ProduceType", "Employee_ID", "RowVersion" },
- new string[] { team.ProductTeam_ID.ToString(), team.Name, team.ProduceType, team.Employee_ID == null ? "null" : team.Employee_ID.Value.ToString(), team.RowVersion.ToString() });
+ new string[] { "ProductTeam_ID", "Name", "ProduceType", "Employee_ID", "RowVersion", "ClientNode" },
+ new string[] { team.ProductTeam_ID.ToString(), team.Name, team.ProduceType, team.Employee_ID == null ? "null" : team.Employee_ID.Value.ToString(), team.RowVersion.ToString(), team.ClientNode });
she.ExecuteNonQuery(insertSql, out success, out errorMessage);
if (!success && !string.IsNullOrEmpty(errorMessage)) {
she.Rollback();
@@ -94,9 +94,9 @@ namespace WeighBusiness.BL
public static void SyncProductTeam()
{
var domain_ID = ConfigurationManager.AppSettings["Domain_ID"];
- var method = "/MainSystem/B3_HaoYue/Rpcs/B3CowButcherManageRpc/GetProductTeamRowVersion";
+ var method = "/MainSystem/B3_HaoYue/Rpcs/B3CowButcherManageRpc/GetProductTeamRowVersion2";
if (domain_ID != null && !string.IsNullOrEmpty(domain_ID)) {
- var productTeamRowVersions = RpcFacade.Call>>(method, long.Parse(domain_ID));
+ var productTeamRowVersions = RpcFacade.Call>>(method, long.Parse(domain_ID));
var oldProductTeamRowVersions = GetProductTeamRowVersion();
var needInsertProductTeamID = new List();
@@ -150,6 +150,7 @@ namespace WeighBusiness.BL
team.Name = result.Item3;
team.ProduceType = result.Item4;
team.Employee_ID = result.Item5;
+ team.ClientNode = result.Item6;
list.Add(team);
}
@@ -187,9 +188,9 @@ namespace WeighBusiness.BL
return errorMessage;
}
- public static ProductTeam GetProductTeam(long? employeeId)
+ public static ProductTeam GetProductTeam(string clientNode)
{
- var table = SqlHelperEx.DoQuery("select ProductTeam_ID,Name,ProduceType from {0} where Employee_ID = {1}".FormatWith(TableNames.生产班组, employeeId == null ? "null" : employeeId.Value.ToString()));
+ var table = SqlHelperEx.DoQuery("select ProductTeam_ID,Name,ProduceType from {0} where ClientNode = {1}".FormatWith(TableNames.生产班组, clientNode == null ? "null" : string.Format("'{0}'", clientNode)));
if (table.Rows.Count > 0) {
foreach (DataRow row in table.Rows) {
var team = new ProductTeam();
diff --git a/WeighBusiness/BO/CreateTables/CreateProductTeam.cs b/WeighBusiness/BO/CreateTables/CreateProductTeam.cs
index 93100bf..8e95273 100644
--- a/WeighBusiness/BO/CreateTables/CreateProductTeam.cs
+++ b/WeighBusiness/BO/CreateTables/CreateProductTeam.cs
@@ -18,7 +18,8 @@ namespace WeighBusiness.BO.CreateTables
{
cth.AddField(new FieldInfo() { FieldName = "ProductTeam_ID", FieldType = FBType.Integer });
cth.AddField(new FieldInfo() { FieldName = "Name", FieldType = FBType.Varchar, FieldTypeParams = "(100)" });
- cth.AddField(new FieldInfo() { FieldName = "ProduceType", FieldType = FBType.Varchar, FieldTypeParams = "(100)" });
+ cth.AddField(new FieldInfo() { FieldName = "ProduceType", FieldType = FBType.Varchar, FieldTypeParams = "(100)" });
+ cth.AddField(new FieldInfo() { FieldName = "ClientNode", FieldType = FBType.Varchar, FieldTypeParams = "(50)" });
cth.AddField(new FieldInfo() { FieldName = "Employee_ID", FieldType = FBType.Integer });
cth.AddField(new FieldInfo() { FieldName = "RowVersion", FieldType = FBType.Integer });
base.AddFields(cth);
diff --git a/WeighBusiness/BO/ProductTeam.cs b/WeighBusiness/BO/ProductTeam.cs
index 7fc042e..a44b9b5 100644
--- a/WeighBusiness/BO/ProductTeam.cs
+++ b/WeighBusiness/BO/ProductTeam.cs
@@ -16,7 +16,8 @@ namespace WeighBusiness.BO
public long ProductTeam_ID { get; set; }
public string Name { get; set; }
- public string ProduceType { get; set; }
+ public string ProduceType { get; set; }
+ public string ClientNode { get; set; }
public long? Employee_ID { get; set; }
public int RowVersion { get; set; }