diff --git a/APPQ5/QMAPP.FJC.Entity/CheckTime/ProductTime.cs b/APPQ5/QMAPP.FJC.Entity/CheckTime/ProductTime.cs
index 24c9859..4d56ff5 100644
--- a/APPQ5/QMAPP.FJC.Entity/CheckTime/ProductTime.cs
+++ b/APPQ5/QMAPP.FJC.Entity/CheckTime/ProductTime.cs
@@ -5,89 +5,128 @@ using System.Data;
namespace QMAPP.FJC.Entity.CheckTime
{
- public class ProductTime
+ ///
+ /// 模块名称:工位时间验证
+ /// 作 者:张松男
+ /// 编写日期:2022年06月23日
+ ///
+ [DBTable(TableName = "T_MD_PRODUCT_TIMECHECK")]
+ public class ProductTime : BaseEntity
{
+ [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)]
public string PID { get; set; }
+
///
/// 当前工位编号
///
+ [DBColumn(ColumnName = "CWorkLoc_Code", DataType = DbType.String)]
public string CWorkLoc_Code { get; set; }
+
///
/// 产品码列名
///
+ [DBColumn(ColumnName = "Product_Column", DataType = DbType.String)]
public string Product_Column { get; set; }
-
-
///
/// 校验工位编号
///
+ [DBColumn(ColumnName = "PWorkLoc_Code", DataType = DbType.String)]
public string PWorkLoc_Code { get; set; }
+
///
/// 校验工位列名
///
+ [DBColumn(ColumnName = "PWorkLoc_Column", DataType = DbType.String)]
public string PWorkLoc_Column { get; set; }
-
+
///
/// 是否验证
///
+ [DBColumn(ColumnName = "Check", DataType = DbType.String)]
public string Check { get; set; }
+
///
/// 验证运算符
///
+ [DBColumn(ColumnName = "Operator", DataType = DbType.String)]
public string Operator { get; set; }
+
///
/// 验证类型
///
+ [DBColumn(ColumnName = "Check_Type", DataType = DbType.String)]
public string Check_Type { get; set; }
+
///
/// 验证值
///
+ [DBColumn(ColumnName = "Check_Value", DataType = DbType.String)]
public string Check_Value { get; set; }
+
///
/// 校验表
///
+ [DBColumn(ColumnName = "Check_Table", DataType = DbType.String)]
public string Check_Table { get; set; }
+
///
/// 校验字段
///
+ [DBColumn(ColumnName = "Check_Column", DataType = DbType.String)]
public string Check_Column { get; set; }
+
///
/// 描述
///
+ [DBColumn(ColumnName = "Remark", DataType = DbType.String)]
public string Remark { get; set; }
+
///
/// 创建时间
///
+ [DBColumn(ColumnName = "CREATEDATE", DataType = DbType.String)]
public DateTime? CREATEDATE { get; set; }
+
///
/// 创建用户
///
+ [DBColumn(ColumnName = "CREATEUSER", DataType = DbType.String)]
public string CREATEUSER { get; set; }
+
///
/// 更新用户
///
+ [DBColumn(ColumnName = "UPDATEUSER", DataType = DbType.String)]
public string UPDATEUSER { get; set; }
+
///
/// 更新时间
///
+ [DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.String)]
public DateTime? UPDATEDATE { get; set; }
+
///
/// 备用字段1
///
+ [DBColumn(ColumnName = "Column1", DataType = DbType.String)]
public string Column1 { get; set; }
///
/// 备用字段2
///
+ [DBColumn(ColumnName = "Column2", DataType = DbType.String)]
public string Column2 { get; set; }
+ [DBColumn(ColumnName = "PWhere", DataType = DbType.String)]
public string PWhere { get; set; }
///
/// 采集点
///
+ [DBColumn(ColumnName = "DAI_Code", DataType = DbType.String)]
public string DAI_Code { get; set; }
+ [DBColumn(ColumnName = "Check_ValueTo", DataType = DbType.String)]
public string Check_ValueTo { get; set; }
}
}
diff --git a/APPQ5/QMAPP.FJC.TRACING/DataValidators/TimeValidator.cs b/APPQ5/QMAPP.FJC.TRACING/DataValidators/TimeValidator.cs
index 4f4dccd..091b160 100644
--- a/APPQ5/QMAPP.FJC.TRACING/DataValidators/TimeValidator.cs
+++ b/APPQ5/QMAPP.FJC.TRACING/DataValidators/TimeValidator.cs
@@ -28,7 +28,15 @@ namespace QMAPP.FJC.TRACING.DataValidators
var ispass = TimeOutCompare(dataRow["CheckColumnValue"].ToString(), timeCheck.Operator, timeCheck.Check_Value, timeCheck.Check_ValueTo, timeCheck.Check_Type);
if (ispass) return new ValidateResult(true, "");
- else return new ValidateResult(false, "未达到时间验证标准!");
+ else
+ {
+ var preStatTime = DateTime.Now;
+ DateTime serviceTime = dal.GetServiceDateTime();
+ TimeSpan ts = serviceTime.Subtract(preStatTime);
+
+ return new ValidateResult(false, $"未达到{timeCheck.Operator}{(Convert.ToDecimal(timeCheck.Check_Value) / 3600).ToString("#0.0")}小时验证标准,当前时间{(Convert.ToDecimal(ts.TotalSeconds) / 3600).ToString("#0.0")}小时");
+
+ }
}
diff --git a/APPQ5/QMAPP.FJC.Web/Controllers/ProductTimeController.cs b/APPQ5/QMAPP.FJC.Web/Controllers/ProductTimeController.cs
index eb5f501..8057f0f 100644
--- a/APPQ5/QMAPP.FJC.Web/Controllers/ProductTimeController.cs
+++ b/APPQ5/QMAPP.FJC.Web/Controllers/ProductTimeController.cs
@@ -13,6 +13,7 @@ using QMAPP.Entity;
using QMAPP.MD.Entity;
using QMAPP.FJC.Web;
using QMAPP.FJC.Entity.CheckTime;
+using QMAPP.FJC.Web.Models.CheckTime;
namespace QMAPP.FJC.Web.Controllers
{
@@ -80,6 +81,10 @@ namespace QMAPP.FJC.Web.Controllers
DateGridResult result = new DateGridResult();
result.Total = pageResult.Result.RecordCount;
result.Rows = JsonConvertHelper.GetDeserialize>(pageResult.Result.Result.ToString());
+ foreach (var r in result.Rows)
+ {
+ r.Check_Value = (Convert.ToDecimal(r.Check_Value) / 3600).ToString("#0.0");
+ }
#endregion
string tempstr = "";
@@ -113,6 +118,7 @@ namespace QMAPP.FJC.Web.Controllers
//修改获取原数据
Entity.PID = ID;
result = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.B9BasicService.ProductTimeBLL_Get.ToString(), Entity);
+ result.Result.Check_Value = (Convert.ToDecimal(result.Result.Check_Value) / 3600).ToString("#0.0");
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
@@ -148,6 +154,7 @@ namespace QMAPP.FJC.Web.Controllers
try
{
Entity = CopyToModel(saveModel);
+ Entity.Check_Value = (Convert.ToDouble(Entity.Check_Value) * 3600).ToString();
if (string.IsNullOrEmpty(Entity.PID) == true)
{
//新增
diff --git a/APPQ5/QMAPP.FJC.Web/Models/CheckTime/ProductTimeModel.cs b/APPQ5/QMAPP.FJC.Web/Models/CheckTime/ProductTimeModel.cs
index 76629ca..00b4575 100644
--- a/APPQ5/QMAPP.FJC.Web/Models/CheckTime/ProductTimeModel.cs
+++ b/APPQ5/QMAPP.FJC.Web/Models/CheckTime/ProductTimeModel.cs
@@ -6,7 +6,7 @@ using System.Web.Mvc.Html;
using QMFrameWork.WebUI.Attribute;
using QMFrameWork.WebUI;
-namespace QMAPP.FJC.Web.Models
+namespace QMAPP.FJC.Web.Models.CheckTime
{
///
/// 模块名称:工位时间验证
@@ -90,7 +90,7 @@ namespace QMAPP.FJC.Web.Models
///
/// 验证值
///
- [Description("验证值")]
+ [Description("验证值(h)")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
diff --git a/APPQ5/QMAPP.FJC.Web/Views/ProductTime/ProductTimeEdit.aspx b/APPQ5/QMAPP.FJC.Web/Views/ProductTime/ProductTimeEdit.aspx
index 231e130..9397360 100644
--- a/APPQ5/QMAPP.FJC.Web/Views/ProductTime/ProductTimeEdit.aspx
+++ b/APPQ5/QMAPP.FJC.Web/Views/ProductTime/ProductTimeEdit.aspx
@@ -1,5 +1,5 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
- Inherits="System.Web.Mvc.ViewPage" %>
+ Inherits="System.Web.Mvc.ViewPage" %>
设备信息编辑
diff --git a/APPQ5/QMAPP.FJC.Web/Views/ProductTime/ProductTimeList.aspx b/APPQ5/QMAPP.FJC.Web/Views/ProductTime/ProductTimeList.aspx
index b63bc4b..ad29d48 100644
--- a/APPQ5/QMAPP.FJC.Web/Views/ProductTime/ProductTimeList.aspx
+++ b/APPQ5/QMAPP.FJC.Web/Views/ProductTime/ProductTimeList.aspx
@@ -1,5 +1,5 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
- Inherits="System.Web.Mvc.ViewPage" %>
+ Inherits="System.Web.Mvc.ViewPage" %>
工位时间校验列表
@@ -47,7 +47,7 @@
<%=Html.QPEnd()%>
<%=Html.QPList() %>
- <%=Html.QDateGrid(Model)%>
+ <%=Html.QDateGrid(Model)%>
<%=Html.QPEnd() %>
<%=Html.Hidden("PID")%>
<%=Html.Hidden("selectKey")%>
diff --git a/APPQ5/QMAPP.FJC.Web/Web.config b/APPQ5/QMAPP.FJC.Web/Web.config
index eba9334..fcb50a4 100644
--- a/APPQ5/QMAPP.FJC.Web/Web.config
+++ b/APPQ5/QMAPP.FJC.Web/Web.config
@@ -29,9 +29,9 @@
-
+
+ -->
diff --git a/APPQ5/QMAPP.WinForm/App.config b/APPQ5/QMAPP.WinForm/App.config
index 4f27906..4622341 100644
--- a/APPQ5/QMAPP.WinForm/App.config
+++ b/APPQ5/QMAPP.WinForm/App.config
@@ -4,13 +4,13 @@
-
-
+
-
+
diff --git a/APPQ5/QMAPP.WinForm/MainForm.cs b/APPQ5/QMAPP.WinForm/MainForm.cs
index 8d63963..8458ccf 100644
--- a/APPQ5/QMAPP.WinForm/MainForm.cs
+++ b/APPQ5/QMAPP.WinForm/MainForm.cs
@@ -737,7 +737,8 @@ namespace QMAPP.WinForm
loginInfo += ClientContext.produceShift.PRODUCESHIFTNAME + " ";
}
this.toolStripStatusLabel1.Text = loginInfo;
- tsslblIps.Text = "本机IP:" + string.Join(",", System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName()).Where(p => p.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork).Select(p => p.ToString()));
+ //var sss = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
+ tsslblIps.Text = "本机IP:" + string.Join(",", System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName()).Where(p => p.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork).Select(p => p.ToString()))+" 版本:"+ System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
if (ClientContext.OpcState > 0)
{
diff --git a/APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs b/APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs
index ea2f9c9..03e9c92 100644
--- a/APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs
+++ b/APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2022.06.23.01")]
-[assembly: AssemblyFileVersion("2022.06.23.01")]
+[assembly: AssemblyVersion("2022.06.23.02")]
+[assembly: AssemblyFileVersion("2022.06.23.02")]
diff --git a/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config b/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config
index 0b3e916..c2c32ff 100644
--- a/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config
+++ b/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config
@@ -68,6 +68,10 @@
+
+
+
+