Browse Source

需求单No.6009 老版本

master
Robin_PC\robin 3 days ago
parent
commit
dafb45cd50
4 changed files with 36 additions and 22 deletions
  1. +6
    -0
      ButcherFactory.BO/LocalBL/SegmentProductionBL.cs
  2. +1
    -0
      ButcherFactory.BO/Utils/AppContext.cs
  3. +9
    -3
      ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs
  4. +20
    -19
      ButcherFactory.Login/Login.xaml.cs

+ 6
- 0
ButcherFactory.BO/LocalBL/SegmentProductionBL.cs View File

@ -18,6 +18,7 @@ namespace ButcherFactory.BO.LocalBL
const string RpcPath = @"/MainSystem/B3ClientService/Rpcs/SegmentProductionRpc/"; const string RpcPath = @"/MainSystem/B3ClientService/Rpcs/SegmentProductionRpc/";
const string ProductTaskRpc = @"/MainSystem/B3Sale/Rpcs/SaleOutStoreRpc/GetSaleOutStoreNumber"; const string ProductTaskRpc = @"/MainSystem/B3Sale/Rpcs/SaleOutStoreRpc/GetSaleOutStoreNumber";
const string BatchProductTaskRpc = @"/MainSystem/B3Sale/Rpcs/SaleOutStoreRpc/BatchGetSaleOutStoreNumber"; const string BatchProductTaskRpc = @"/MainSystem/B3Sale/Rpcs/SaleOutStoreRpc/BatchGetSaleOutStoreNumber";
const string GetMinWeightMethod = @"/MainSystem/B3Sale/Rpcs/SaleOutStoreRpc/GetMinWeight";
public static BindingList<SegmentProduction> GetListByState(bool submited) public static BindingList<SegmentProduction> GetListByState(bool submited)
{ {
@ -691,6 +692,11 @@ namespace ButcherFactory.BO.LocalBL
session.Commit(); session.Commit();
} }
} }
public static decimal GetMinWeight ( )
{
return ButcherFactoryUtil.SecondUrlCall<decimal>(GetMinWeightMethod);
}
} }
class SegmentProductionMin class SegmentProductionMin


+ 1
- 0
ButcherFactory.BO/Utils/AppContext.cs View File

@ -9,6 +9,7 @@ namespace ButcherFactory.BO.Utils
{ {
public static class AppContext public static class AppContext
{ {
public static string Version = "202611181900";
public static bool RpcFacadeInited { get; set; } public static bool RpcFacadeInited { get; set; }
static ServerUrlConfig _connectInfo = ServerUrlConfig.Init(); static ServerUrlConfig _connectInfo = ServerUrlConfig.Init();
public static ServerUrlConfig ConnectInfo { get { return _connectInfo; } } public static ServerUrlConfig ConnectInfo { get { return _connectInfo; } }


+ 9
- 3
ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs View File

@ -44,6 +44,7 @@ namespace ButcherFactory.SegmentProductionAuto_
long? batchID; long? batchID;
DateTime? batchDate; DateTime? batchDate;
DateTime butcherDate = DateTime.Today; DateTime butcherDate = DateTime.Today;
decimal minWeight = 0;
NotAuto.SegmentProductionFormConfig config; NotAuto.SegmentProductionFormConfig config;
List<GoodsIdentify> identityList; List<GoodsIdentify> identityList;
List<string> specialGoodsCodes; List<string> specialGoodsCodes;
@ -128,7 +129,7 @@ namespace ButcherFactory.SegmentProductionAuto_
_freshTotalCode = SegmentProductionBL.InitFreshTotalCode(); _freshTotalCode = SegmentProductionBL.InitFreshTotalCode();
_stayTotalCode = SegmentProductionBL.InitStayTotalCode(); _stayTotalCode = SegmentProductionBL.InitStayTotalCode();
identityList = SegmentProductionBL.GetGoodsIdentify(); identityList = SegmentProductionBL.GetGoodsIdentify();
minWeight = SegmentProductionBL.GetMinWeight();
} }
void LoadBind() void LoadBind()
@ -260,8 +261,13 @@ namespace ButcherFactory.SegmentProductionAuto_
//weight = 10; //weight = 10;
MessageBox.Show("重量必须大于0"); MessageBox.Show("重量必须大于0");
return; return;
}
if (g.StandardWeight.HasValue)
}
if (minWeight > 0 && weight < minWeight)
{
MessageBox.Show(string.Format("重量:{0}小于最小重量:{1}", weight, minWeight));
return;
}
if (g.StandardWeight.HasValue)
{ {
if (weight < (g.StandardWeightLow ?? 0) || weight > (g.StandardWeightUp ?? 0)) if (weight < (g.StandardWeightLow ?? 0) || weight > (g.StandardWeightUp ?? 0))
{ {


+ 20
- 19
ButcherFactory.Login/Login.xaml.cs View File

@ -111,27 +111,28 @@ namespace ButcherFactory.Login
void Login_Loaded(object sender, RoutedEventArgs e) void Login_Loaded(object sender, RoutedEventArgs e)
{ {
if (!File.Exists("ButcherFactory.AutoUpdate.exe"))
return;
var versionInfo = new ClientVersion();
if (File.Exists("ClientVersion.xml"))
{
versionInfo = XmlUtil.DeserializeFromFile<ClientVersion>("ClientVersion.xml");
versionLbl.Text = versionInfo.Version;
}
if (string.IsNullOrEmpty(versionInfo.ServerUrl))
versionInfo.ServerUrl = serUri;
versionLbl.Text = BO.Utils.AppContext.Version;
//if (!File.Exists("ButcherFactory.AutoUpdate.exe"))
// return;
//var versionInfo = new ClientVersion();
//if (File.Exists("ClientVersion.xml"))
//{
// versionInfo = XmlUtil.DeserializeFromFile<ClientVersion>("ClientVersion.xml");
//
//}
//if (string.IsNullOrEmpty(versionInfo.ServerUrl))
// versionInfo.ServerUrl = serUri;
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(versionInfo.ServerUrl);
req.Timeout = 5000;
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
if (resp.StatusCode != HttpStatusCode.OK)
return;
//HttpWebRequest req = (HttpWebRequest)WebRequest.Create(versionInfo.ServerUrl);
//req.Timeout = 5000;
//HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
//if (resp.StatusCode != HttpStatusCode.OK)
// return;
var down = new System.Net.WebClient();
var serverVersion = XmlUtil.XmlDeserializeObject<ClientVersion>(down.DownloadString(versionInfo.ServerUrl));
if (versionInfo.Version != serverVersion.Version)
updateImg.Visibility = Visibility.Visible;
//var down = new System.Net.WebClient();
//var serverVersion = XmlUtil.XmlDeserializeObject<ClientVersion>(down.DownloadString(versionInfo.ServerUrl));
//if (versionInfo.Version != serverVersion.Version)
// updateImg.Visibility = Visibility.Visible;
} }
private void UpdateBtn_Click(object sender, MouseButtonEventArgs e) private void UpdateBtn_Click(object sender, MouseButtonEventArgs e)


Loading…
Cancel
Save