Browse Source

需求单No.6009 一体称+ 副产品

qdwf_2864
Robin_PC\robin 3 days ago
parent
commit
55b68b1f8e
4 changed files with 41 additions and 20 deletions
  1. +6
    -0
      ButcherFactory.BO/LocalBL/SegmentProductionBL.cs
  2. +1
    -0
      ButcherFactory.BO/Utils/AppContext.cs
  3. +13
    -0
      ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs
  4. +21
    -20
      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 ProductTaskRpc = @"/MainSystem/B3Sale/Rpcs/SaleOutStoreRpc/GetSaleOutStoreNumber";
const string BatchProductTaskRpc = @"/MainSystem/B3Sale/Rpcs/SaleOutStoreRpc/BatchGetSaleOutStoreNumber";
const string GetMinWeightMethod = @"/MainSystem/B3Sale/Rpcs/SaleOutStoreRpc/GetMinWeight";
public static BindingList<SegmentProduction> GetListByState(bool submited)
{
@ -691,6 +692,11 @@ namespace ButcherFactory.BO.LocalBL
session.Commit();
}
}
public static decimal GetMinWeight()
{
return ButcherFactoryUtil.SecondUrlCall<decimal>(GetMinWeightMethod);
}
}
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 string Version = "202611182000";
public static bool RpcFacadeInited { get; set; }
static ServerUrlConfig _connectInfo = ServerUrlConfig.Init();
public static ServerUrlConfig ConnectInfo { get { return _connectInfo; } }


+ 13
- 0
ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs View File

@ -43,6 +43,7 @@ namespace ButcherFactory.SegmentProductionAuto_
long? batchID;
DateTime? batchDate;
DateTime butcherDate = DateTime.Today;
decimal minWeight = 0;
NotAuto.SegmentProductionFormConfig config;
List<GoodsIdentify> identityList;
List<string> specialGoodsCodes;
@ -125,6 +126,7 @@ namespace ButcherFactory.SegmentProductionAuto_
_freshTotalCode = SegmentProductionBL.InitFreshTotalCode();
_stayTotalCode = SegmentProductionBL.InitStayTotalCode();
identityList = SegmentProductionBL.GetGoodsIdentify();
minWeight = SegmentProductionBL.GetMinWeight();
}
void LoadBind()
@ -249,6 +251,12 @@ namespace ButcherFactory.SegmentProductionAuto_
MessageBox.Show("重量必须大于0");
return;
}
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))
@ -349,6 +357,11 @@ namespace ButcherFactory.SegmentProductionAuto_
//#endif
if (weight <= 0)
throw new Exception("重量必须大于0");
if (minWeight > 0 && weight < minWeight)
{
MessageBox.Show(string.Format("重量:{0}小于最小重量:{1}", weight, minWeight));
return;
}
if (detail.StandardWeight.HasValue)
{


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

@ -110,28 +110,29 @@ namespace ButcherFactory.Login
const string puKey = "c756e02cedb42a33f78091a466411bde8447d854";
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");
// versionLbl.Text = versionInfo.Version;
//}
//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)


Loading…
Cancel
Save