Browse Source

增加导出

master
songnan.zhang 2 years ago
parent
commit
d247a8069b
  1. 6
      APP/QMAPP.Web/App_Data/MainPower.xml
  2. 11
      APP/QMAPP.Web/App_Data/Menu.xml
  3. 20
      APPQ5/QMAPP.FJC.BLL/Bucket/TSWeighRecoreBLL.cs
  4. 227
      APPQ5/QMAPP.FJC.BLL/CheckTime/ProductTimeBLL.cs
  5. 1
      APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj
  6. 28
      APPQ5/QMAPP.FJC.DAL/Bucket/TSWeighRecoreDAL.cs
  7. 399
      APPQ5/QMAPP.FJC.DAL/CheckTime/ProductTimeDAL.cs
  8. 1
      APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj
  9. 17
      APPQ5/QMAPP.FJC.TRACING/DataValidators/TimeValidator.cs
  10. BIN
      APPQ5/QMAPP.FJC.Web/App_Data/Excel/TSWeighRecoreExp.xlsx
  11. 39
      APPQ5/QMAPP.FJC.Web/App_Data/Excel/TSWeighRecoreExp.xml
  12. 19
      APPQ5/QMAPP.FJC.Web/App_Data/Menu.xml
  13. 211
      APPQ5/QMAPP.FJC.Web/Controllers/ProductTimeController.cs
  14. 35
      APPQ5/QMAPP.FJC.Web/Controllers/TSWeighRecoreController.cs
  15. 4
      APPQ5/QMAPP.FJC.Web/Models/Bucket/TSWeighRecoreModel.cs
  16. 297
      APPQ5/QMAPP.FJC.Web/Models/CheckTime/ProductTimeModel.cs
  17. 11
      APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj
  18. 166
      APPQ5/QMAPP.FJC.Web/Views/ProductTime/ProductTimeEdit.aspx
  19. 115
      APPQ5/QMAPP.FJC.Web/Views/ProductTime/ProductTimeList.aspx
  20. 10
      AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs
  21. 7
      ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml

6
APP/QMAPP.Web/App_Data/MainPower.xml

@ -168,10 +168,14 @@
<PowerInfo PowerID="CD03880000" PowerDes="BZD记录" PowerType="" ActionList="" Visible="true" Seq="3" SuperID="CD03000000"/>
<PowerInfo PowerID="CD03880001" PowerDes="查询" PowerType="button" ActionList="" Visible="true" Seq="1" SuperID="CD03880000"/>
<PowerInfo PowerID="CD03890000" PowerDes="时间验证" PowerType="" ActionList="" Visible="true" Seq="3" SuperID="CD03000000"/>
<PowerInfo PowerID="CD03890000" PowerDes="外购件时间验证" PowerType="" ActionList="" Visible="true" Seq="3" SuperID="CD03000000"/>
<PowerInfo PowerID="CD03890001" PowerDes="查询" PowerType="button" ActionList="" Visible="true" Seq="1" SuperID="CD03890000"/>
<PowerInfo PowerID="CD03890003" PowerDes="修改" PowerType="button" ActionList="" Visible="true" Seq="2" SuperID="CD03890000"/>
<PowerInfo PowerID="CD03893000" PowerDes="前序时间验证" PowerType="" ActionList="" Visible="true" Seq="3" SuperID="CD03000000"/>
<PowerInfo PowerID="CD03893001" PowerDes="查询" PowerType="button" ActionList="" Visible="true" Seq="1" SuperID="CD03893000"/>
<PowerInfo PowerID="CD03893003" PowerDes="修改" PowerType="button" ActionList="" Visible="true" Seq="2" SuperID="CD03893000"/>
<PowerInfo PowerID="CD03891000" PowerDes="补打记录" PowerType="" ActionList="" Visible="true" Seq="3" SuperID="CD03000000"/>
<PowerInfo PowerID="CD03891001" PowerDes="查询" PowerType="button" ActionList="" Visible="true" Seq="1" SuperID="CD03891000"/>

11
APP/QMAPP.Web/App_Data/Menu.xml

@ -242,12 +242,18 @@
<Action ContorllerName="BZDRecorder" ActionName="List" PowerID="CD03880001">查询</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="03890000" MenuDes="时间验证" SystemID="FJC" Action="/CHECKTIME/List" Target="url" PowerID="CD03890000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="03000000" Seq="1">
<MenuItem MenuID="03890000" MenuDes="外购件时间验证" SystemID="FJC" Action="/CHECKTIME/List" Target="url" PowerID="CD03890000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="03000000" Seq="1">
<Actions>
<Action ContorllerName="CHECKTIME" ActionName="List" PowerID="CD03890001">查询</Action>
<Action ContorllerName="CHECKTIME" ActionName="Edit" PowerID="CD03890003">修改</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="03893000" MenuDes="前序时间验证" SystemID="FJC" Action="/ProductTime/List" Target="url" PowerID="CD03893000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="03000000" Seq="1">
<Actions>
<Action ContorllerName="ProductTime" ActionName="List" PowerID="CD03893001">查询</Action>
<Action ContorllerName="ProductTime" ActionName="Edit" PowerID="CD03893003">修改</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="03891000" MenuDes="补打记录" SystemID="FJC" Action="/BarCodeReplacement/List" Target="url" PowerID="CD03891000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="03000000" Seq="1">
<Actions>
<Action ContorllerName="BarCodeReplacement" ActionName="List" PowerID="CD03891001">查询</Action>
@ -427,7 +433,8 @@
</MenuItem>
<MenuItem MenuID="10050000" SystemID="FJC" MenuDes="表皮称重" Action="/TSWeighRecore/List" Target="url" PowerID="CD10050000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="10000000" Seq="1">
<Actions>
<Action ContorllerName="TSWeighRecore" ActionName="List" PowerID="CD10030001">查询</Action>
<Action ContorllerName="TSWeighRecore" ActionName="List" PowerID="CD10050001">查询</Action>
<Action ContorllerName="TSWeighRecore" ActionName="ExportExcel" PowerID="CD10050002">导出</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="10060000" SystemID="FJC" MenuDes="库存信息" Action="/Storage/List" Target="url" PowerID="CD10060000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="10000000" Seq="1">

20
APPQ5/QMAPP.FJC.BLL/Bucket/TSWeighRecoreBLL.cs

@ -10,6 +10,7 @@ using QMFrameWork.Log;
using QMAPP.FJC.Entity;
using QMAPP.MD.Entity.Bucket;
using QMAPP.FJC.DAL.Bucket;
using System.Data;
namespace QMAPP.FJC.BLL.Bucket
{
@ -161,5 +162,24 @@ namespace QMAPP.FJC.BLL.Bucket
}
}
#endregion
#region 导出数据
/// <summary>
/// 获取导出的数据
/// </summary>
/// <param name="user">查询条件</param>
/// <returns>数据</returns>
public DataTable GetExportData(TSWeighRecore model)
{
try
{
return new TSWeighRecoreDAL().GetExportData(model);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}

227
APPQ5/QMAPP.FJC.BLL/CheckTime/ProductTimeBLL.cs

@ -0,0 +1,227 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMAPP.BLL;
using QMFrameWork.Data;
using QMAPP.Entity;
using QMFrameWork.Log;
using System.Data;
using QMAPP.MD.Entity;
using QMAPP.MD.DAL;
using QMAPP.FJC.Entity.CheckTime;
using QMAPP.FJC.DAL.CheckTime;
using QMAPP.FJC.BLL.BZD;
namespace QMAPP.FJC.BLL.CheckTime
{
/// </summary>
/// 模块名称:本地库无记录的 时间验证
/// 作 者:张松男
/// 编写日期:2020年03月00日
/// </summary>
public class ProductTimeBLL : BaseBLL
{
#region 获取信息
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>信息</returns>
public DataResult<ProductTime> Get(ProductTime model)
{
DataResult<ProductTime> result = new DataResult<ProductTime>();
try
{
result.Result = new ProductTimeDAL().Get(model);
}
catch (Exception ex)
{
result.IsSuccess = false;
result.Msg = Resource.SystemException;
throw ex;
}
result.IsSuccess = true;
return result;
}
#endregion
#region 获取列表(分页)
/// <summary>
/// 获取列表
/// </summary>
/// <param name="condition">条件</param>
/// <param name="page">数据页</param>
/// <returns>数据页</returns>
public DataResult<DataPage> GetList(ProductTime condition, DataPage page)
{
DataResult<DataPage> result = new DataResult<DataPage>();
try
{
//获取物料信息列表
DataPage dataPage = new ProductTimeDAL().GetList(condition, page);
result.Result = dataPage;
}
catch (Exception ex)
{
result.IsSuccess = false;
result.Msg = Resource.SystemException;
throw ex;
}
result.IsSuccess = true;
return result;
}
/// <summary>
/// 获取全部条码格式规则
/// </summary>
/// <returns></returns>
public List<ProductTime> GetAllList(string str)
{
return new ProductTimeDAL().GetAllList();
}
#endregion
#region 信息是否重复
/// <summary>
/// 判断名称是否存在
/// </summary>
/// <param name="">信息</param>
/// <returns>true:已存在;fasel:不存在。</returns>
public bool Exists(ProductTime info)
{
try
{
return new ProductTimeDAL().Exists(info);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 插入信息
/// <summary>
/// 插入信息(单表)
/// </summary>
/// <param name="">信息</param>
/// <returns>插入行数</returns>
public DataResult<int> Insert(ProductTime info)
{
DataResult<int> result = new DataResult<int>();
try
{
//基本信息
info.PID = Guid.NewGuid().ToString();
info.CREATEUSER = this.LoginUser.UserID;
info.CREATEDATE = DateTime.Now;
info.UPDATEUSER = info.CREATEUSER;
info.UPDATEDATE = info.CREATEDATE;
ProductTimeDAL cmdDAL = new ProductTimeDAL();
result.Result = new ProductTimeDAL().Insert(info);
result.IsSuccess = true;
return result;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 更新信息
/// <summary>
/// 更新信息
/// </summary>
/// <param name="">信息</param>
/// <returns>更新行数</returns>
public DataResult<int> Update(ProductTime info)
{
DataResult<int> result = new DataResult<int>();
try
{
info.UPDATEUSER = this.LoginUser.UserID;
info.UPDATEDATE = DateTime.Now;
result.Result = new ProductTimeDAL().Update(info);
result.IsSuccess = true;
return result;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 删除
/// <summary>
/// 删除信息
/// </summary>
/// <param name="">主键串</param>
/// <returns>删除个数</returns>
public DataResult<int> Delete(string strs)
{
int count = 0;
DataResult<int> result = new DataResult<int>();
string[] list = strs.Split(":".ToCharArray());
try
{
foreach (string str in list)
{
count += this.DeleteBarcodeRules(new ProductTime { PID = str });
}
result.Result = count;
result.IsSuccess = true;
return result;
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 删除信息
/// </summary>
/// <param name="">信息</param>
/// <returns>删除个数</returns>
public int DeleteBarcodeRules(ProductTime info)
{
try
{
return new ProductTimeDAL().Delete(info);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 导出数据
/// <summary>
/// 获取导出的数据
/// </summary>
/// <param name="user">查询条件</param>
/// <returns>数据</returns>
public DataTable GetExportData(ProductTime model)
{
try
{
return new ProductTimeDAL().GetExportData(model);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}

1
APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj

@ -116,6 +116,7 @@
<Compile Include="BZD\Resource.Designer.cs" />
<Compile Include="CellCycle\CellCycleTimeBLL.cs" />
<Compile Include="CellCycle\CellCycleTimeSetBLL.cs" />
<Compile Include="CheckTime\ProductTimeBLL.cs" />
<Compile Include="CheckTime\CHECKTIMEBLL.cs" />
<Compile Include="Common\BinaryConvert.cs" />
<Compile Include="Common\CommonFunction.cs" />

28
APPQ5/QMAPP.FJC.DAL/Bucket/TSWeighRecoreDAL.cs

@ -340,5 +340,33 @@ namespace QMAPP.FJC.DAL.Bucket
}
#endregion
#region 获取导出的数据
/// <summary>
/// 获取导出的数据
/// </summary>
/// <param name="user">查询条件</param>
/// <returns>数据</returns>
public DataTable GetExportData(TSWeighRecore model)
{
DataTable dt = null;
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
//构成查询语句
sql = this.GetQuerySql(model, ref parameters);
using (IDataSession session = AppDataFactory.CreateMainSession())
{
dt = session.GetTable(sql, parameters.ToArray());
dt.TableName = "T_AW_TSWeighRecore";
}
return dt;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}

399
APPQ5/QMAPP.FJC.DAL/CheckTime/ProductTimeDAL.cs

@ -0,0 +1,399 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMAPP.FJC.Entity.CheckTime;
using QMFrameWork.Data;
using System.Data;
using QMAPP.Entity;
namespace QMAPP.FJC.DAL.CheckTime
{
/// </summary>
/// 模块名称:本地库无记录的 时间验证
/// 作 者:张松男
/// 编写日期:2020年03月00日
/// </summary>
public class ProductTimeDAL
{
#region 获取信息
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>*信息</returns>
public ProductTime Get(ProductTime info)
{
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//获取信息
info = session.Get<ProductTime>(info);
}
return info;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 获取列表
/// <summary>
/// 获取列表
/// </summary>
/// <param name="condition">条件</param>
/// <param name="page">数据页</param>
/// <returns>数据页</returns>
public DataPage GetList(ProductTime condition, DataPage page)
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
sql = this.GetQuerySql(condition, ref parameters);
//分页关键字段及排序
page.KeyName = "PID";
//if (string.IsNullOrEmpty(page.SortExpression))
// page.SortExpression = "CREATEDATE DESC";
using (IDataSession session = AppDataFactory.CreateMainSession())
{
// 对应多种数据库
//string sqlChange = this.ChangeSqlByDB(sql, session);
page = session.GetDataPage<ProductTime>(sql, parameters.ToArray(), page);
}
return page;
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 获取全部规则
/// </summary>
/// <returns></returns>
public List<ProductTime> GetAllList()
{
try
{
string sql = "SELECT * FROM [T_MD_PRODUCT_TIMECHECK]";
List<DataParameter> parameters = new List<DataParameter>();
using (IDataSession session = AppDataFactory.CreateMainSession())
{
return session.GetList<ProductTime>(sql, parameters.ToArray()).ToList();
}
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 获取查询语句
/// <summary>
/// 获取查询语句
/// </summary>
/// <param name="user">查询条件</param>
/// <param name="parameters">参数</param>
/// <returns>查询语句</returns>
private string GetQuerySql(ProductTime condition, ref List<DataParameter> parameters)
{
StringBuilder sqlBuilder = new StringBuilder();
StringBuilder whereBuilder = new StringBuilder();
try
{
sqlBuilder.Append("SELECT [PID],[CWorkLoc_Code],[PWorkLoc_Code],[PWorkLoc_Column],[Product_Column],[Check],[Operator],[Check_Type],[Check_Value],[Check_Table],[Check_Column],[Pwhere],[Remark],[CREATEDATE],[CREATEUSER],[UPDATEDATE],[UPDATEUSER]");
sqlBuilder.Append("FROM [T_MD_PRODUCT_TIMECHECK] ");
//whereBuilder.Append(" AND FLGDEL<> '1' ");
//查询条件
////查询条件
//if (string.IsNullOrEmpty(condition.FACTORY_CODE) == false)
//{
// whereBuilder.Append(" AND FACTORY_CODE = @FACTORY_CODE ");
// parameters.Add(new DataParameter { ParameterName = "FACTORY_CODE", DataType = DbType.String, Value = condition.FACTORY_CODE });
//}
//if (string.IsNullOrEmpty(condition.REGEX) == false)
//{
// whereBuilder.Append(" AND REGEX LIKE @REGEX ");
// parameters.Add(new DataParameter { ParameterName = "REGEX", DataType = DbType.String, Value = "%" + condition.REGEX + "%" });
//}
if (whereBuilder.Length > 0)
{
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4));
}
return sqlBuilder.ToString();
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 信息是否重复
/// <summary>
/// 判断名称是否存在
/// </summary>
/// <param name="info"></param>
/// <returns>true:已存在;fasel:不存在。</returns>
public bool Exists(ProductTime info)
{
StringBuilder sqlBuilder = new StringBuilder();
StringBuilder whereBuilder = new StringBuilder();
List<DataParameter> parameters = new List<DataParameter>();
int count = 0;
try
{
sqlBuilder.Append("SELECT COUNT(0) FROM T_MD_PRODUCT_TIMECHECK");
if (info.PID == null)
{
info.PID = "";
}
whereBuilder.Append(" AND PID <> @PID ");
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID });
//添加进行无重复字段判断代码
if (whereBuilder.Length > 0)
{
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4));
}
using (IDataSession session = AppDataFactory.CreateMainSession())
{
count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray()));
}
return count > 0;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 插入信息
/// <summary>
/// 插入信息(单表)
/// </summary>
/// <param name="">信息</param>
/// <returns>插入行数</returns>
public int Insert(ProductTime info)
{
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//插入基本信息
count = session.Insert<ProductTime>(info);
}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 更新信息
/// <summary>
/// 更新信息
/// </summary>
/// <param name=""></param>
/// <returns>更新行数</returns>
public int Update(ProductTime info)
{
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//更新基本信息
count = session.Update<ProductTime>(info);
}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 逻辑删除
/// <summary>
/// 逻辑删除信息
/// </summary>
/// <param name=""></param>
/// <returns>删除个数</returns>
public int Delete(ProductTime info)
{
StringBuilder sqlBuilder = new StringBuilder();
List<DataParameter> parameters = new List<DataParameter>();
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//删除基本信息
sqlBuilder.Append("delete T_MD_PRODUCT_TIMECHECK ");
sqlBuilder.Append("WHERE PID = @PID ");
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID });
count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray());
}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
public DateTime GetServiceDateTime()
{
StringBuilder sql = new StringBuilder();
try
{
List<DataParameter> parameters = new List<DataParameter>();
string sqlScript = @"select GetDATE() as time ";
DataTable datatable = new DataTable();
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//插入基本信息
datatable = session.GetTable(sqlScript, parameters.ToArray());
}
if (datatable.Rows.Count > 0)
{
string datetimestr = datatable.Rows[0]["time"].ToString();
return DateTime.Parse(datetimestr);
}
return DateTime.Now;
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 根据工位查询出配置
/// </summary>
/// <param name="locCode"></param>
/// <returns></returns>
public ProductTime GetTimeCheckCfg(string locCode, string DAI_Code)
{
List<DataParameter> parameters = new List<DataParameter>();
DateTime dateTime = DateTime.MinValue;
DataTable dataTable = new DataTable();
ProductTime timeCheck = new ProductTime();
string sqlScript = $" select * from T_MD_PRODUCT_TIMECHECK where CWorkLoc_Code ='{locCode}' and DAI_Code = '{DAI_Code}' and [Check]='1' order by UPDATEDATE desc,CREATEDATE desc ";
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//更新基本信息
dataTable = session.GetTable(sqlScript, parameters.ToArray());
}
if (dataTable.Rows.Count == 0)
{
return null; ;
}
else
{
DataRow row = dataTable.Rows[0];
timeCheck.PID = row["PID"].ToString();
timeCheck.CWorkLoc_Code = row["CWorkLoc_Code"].ToString();
timeCheck.PWorkLoc_Code = row["PWorkLoc_Code"].ToString();
timeCheck.PWorkLoc_Column = row["PWorkLoc_Column"].ToString();
timeCheck.Product_Column = row["Product_Column"].ToString();
timeCheck.Check = row["Check"].ToString();
timeCheck.Operator = row["Operator"].ToString();
timeCheck.Check_Type = row["Check_Type"].ToString();
timeCheck.Check_Value = row["Check_Value"].ToString();
timeCheck.Check_Table = row["Check_Table"].ToString();
timeCheck.Check_Column = row["Check_Column"].ToString();
timeCheck.Remark = row["Remark"].ToString();
if (DateTime.TryParse(row["CREATEDATE"].ToString(), out dateTime))
{
timeCheck.CREATEDATE = dateTime;
}
timeCheck.CREATEUSER = row["CREATEUSER"].ToString();
timeCheck.UPDATEUSER = row["UPDATEUSER"].ToString();
if (DateTime.TryParse(row["CREATEDATE"].ToString(), out dateTime))
{
timeCheck.UPDATEDATE = dateTime;
}
timeCheck.Column1 = row["Column1"].ToString();
timeCheck.Column2 = row["Column2"].ToString();
timeCheck.PWhere = row["PWhere"].ToString();
timeCheck.DAI_Code = row["DAI_Code"].ToString();
timeCheck.Check_ValueTo = row["Check_ValueTo"].ToString();
}
return timeCheck;
}
public DataTable GetConfigValue(ProductTime timeCheckModel, string productCode)
{
DataTable dataTable = new DataTable();
List<DataParameter> parameters = new List<DataParameter>();
string sqlScript = $" select {timeCheckModel.Check_Column} as CheckColumnValue from {timeCheckModel.Check_Table} where {timeCheckModel.PWorkLoc_Column} ='{timeCheckModel.PWorkLoc_Code}' and {timeCheckModel.Product_Column}='{productCode}' ";
if (!string.IsNullOrEmpty(timeCheckModel.PWhere))
{
sqlScript = sqlScript + " and " + timeCheckModel.PWhere;
}
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//更新基本信息
dataTable = session.GetTable(sqlScript, parameters.ToArray());
}
//DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlScript);
return dataTable;
}
#region 获取导出的数据
/// <summary>
/// 获取导出的数据
/// </summary>
/// <param name="user">查询条件</param>
/// <returns>数据</returns>
public DataTable GetExportData(ProductTime model)
{
DataTable dt = null;
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
//构成查询语句
sql = this.GetQuerySql(model, ref parameters);
using (IDataSession session = AppDataFactory.CreateMainSession())
{
dt = session.GetTable(sql, parameters.ToArray());
dt.TableName = "T_MD_PRODUCT_TIMECHECK";
}
return dt;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}

1
APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj

@ -108,6 +108,7 @@
<Compile Include="BZD\BZDRecorderDAL.cs" />
<Compile Include="BZD\DecimalToCharX.cs" />
<Compile Include="CellCycle\CellCycleTimeSetDAL.cs" />
<Compile Include="CheckTime\ProductTimeDAL.cs" />
<Compile Include="CheckTime\CHECKTIMEDAL.cs" />
<Compile Include="CompleteStatistics\CompleteStatisticsDAL.cs" />
<Compile Include="EM\EmMeterReadingsDAL.cs" />

17
APPQ5/QMAPP.FJC.TRACING/DataValidators/TimeValidator.cs

@ -2,6 +2,7 @@
using QMAPP.FJC.TRACING.DAInterface;
using QMAPP.FJC.Entity.QT;
using System.Data;
using QMAPP.FJC.Entity.CheckTime;
using QMAPP.FJC.DAL.CheckTime;
namespace QMAPP.FJC.TRACING.DataValidators
@ -11,12 +12,11 @@ namespace QMAPP.FJC.TRACING.DataValidators
/// </summary>
public class TimeValidator : IDataValidator
{
public ValidateResult Validate(DAObject data,DAIValidation validOption)
public ValidateResult Validate(DAObject data, DAIValidation validOption)
{
CHECKTIMEDAL dal = new CHECKTIMEDAL();
var timeCheck = dal.GetTimeCheckCfg(data.WorkLocState.WORKLOC_CODE, data.DAI.DA_CODE);
//T_MD_PRODUCT_TIMECHECK timeCheck = LocSwitchDataAccess.GetTimeCheckCfg(data.WorkLocState.WORKCELL_CODE, data.DAI.DA_CODE);
if(timeCheck == null) return new ValidateResult(true, "");
ProductTimeDAL dal = new ProductTimeDAL();
ProductTime timeCheck = dal.GetTimeCheckCfg(data.WorkLocState.WORKCELL_CODE, data.DAI.DA_CODE);
if (timeCheck == null) return new ValidateResult(true, "");
DataTable checkTable = dal.GetConfigValue(timeCheck, data.DAValue.ToString());
if (checkTable == null || checkTable.Rows.Count == 0)
{
@ -27,9 +27,9 @@ 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, "");
if (ispass) return new ValidateResult(true, "");
else return new ValidateResult(false, "未达到时间验证标准!");
}
/// <summary>
@ -53,7 +53,6 @@ namespace QMAPP.FJC.TRACING.DataValidators
/// <returns></returns>
public static bool TimeOutCompare(string pCheckColumnValue, string pOperator, string pCheck_Value, string pCheck_ValueTo, string pCheck_Type)
{
CHECKTIMEDAL dal = new CHECKTIMEDAL();
var preStatTime = DateTime.Now;
if (!DateTime.TryParse(pCheckColumnValue, out preStatTime))
{
@ -73,7 +72,7 @@ namespace QMAPP.FJC.TRACING.DataValidators
throw new Exception("验证值pCheck_ValueTo必须是int类型");
}
}
ProductTimeDAL dal = new ProductTimeDAL();
DateTime serviceTime = dal.GetServiceDateTime();
TimeSpan ts = serviceTime.Subtract(preStatTime);
if (pCheck_Type == "1")

BIN
APPQ5/QMAPP.FJC.Web/App_Data/Excel/TSWeighRecoreExp.xlsx

Binary file not shown.

39
APPQ5/QMAPP.FJC.Web/App_Data/Excel/TSWeighRecoreExp.xml

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8" ?>
<DataInfoMains>
<DataInfoMain InfoName="TSWeighRecoreExp" InfoTitle="表皮称重信息" TemplateFile="TSWeighRecoreExp.xlsx" RecordCount="n">
<DataInfoItems>
<DataInfoItem ColumnName="ProductCode" ColumnTitle="条码" XPosition="A" YPosition="3" >
<Observers>
<Observer name="Required" ></Observer>
</Observers>
</DataInfoItem>
<DataInfoItem ColumnName="PColour" ColumnTitle="颜色" XPosition="B" YPosition="3" >
<Observers>
<Observer name="Required" ></Observer>
</Observers>
</DataInfoItem>
<DataInfoItem ColumnName="MATERIAL_CODE" ColumnTitle="物料号" XPosition="C" YPosition="3" >
<Observers>
<Observer name="Required" ></Observer>
</Observers>
</DataInfoItem>
<DataInfoItem ColumnName="Weigh" ColumnTitle="重量" XPosition="D" YPosition="3" >
<Observers>
<Observer name="Required" ></Observer>
</Observers>
</DataInfoItem>
<DataInfoItem ColumnName="CREATEDATE" ColumnTitle="时间" XPosition="E" YPosition="3" >
<Observers>
<Observer name="Required" ></Observer>
</Observers>
</DataInfoItem>
</DataInfoItems>
</DataInfoMain>
</DataInfoMains>

19
APPQ5/QMAPP.FJC.Web/App_Data/Menu.xml

@ -242,12 +242,18 @@
<Action ContorllerName="BZDRecorder" ActionName="List" PowerID="CD03880001">查询</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="03890000" MenuDes="时间验证" SystemID="FJC" Action="/CHECKTIME/List" Target="url" PowerID="CD03890000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="03000000" Seq="1">
<MenuItem MenuID="03890000" MenuDes="外购件时间验证" SystemID="FJC" Action="/CHECKTIME/List" Target="url" PowerID="CD03890000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="03000000" Seq="1">
<Actions>
<Action ContorllerName="CHECKTIME" ActionName="List" PowerID="CD03890001">查询</Action>
<Action ContorllerName="CHECKTIME" ActionName="Edit" PowerID="CD03890003">修改</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="03893000" MenuDes="前序时间验证" SystemID="FJC" Action="/ProductTime/List" Target="url" PowerID="CD03893000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="03000000" Seq="1">
<Actions>
<Action ContorllerName="ProductTime" ActionName="List" PowerID="CD03893001">查询</Action>
<Action ContorllerName="ProductTime" ActionName="Edit" PowerID="CD03893003">修改</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="03891000" MenuDes="补打记录" SystemID="FJC" Action="/BarCodeReplacement/List" Target="url" PowerID="CD03891000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="03000000" Seq="1">
<Actions>
<Action ContorllerName="BarCodeReplacement" ActionName="List" PowerID="CD03891001">查询</Action>
@ -427,7 +433,8 @@
</MenuItem>
<MenuItem MenuID="10050000" SystemID="FJC" MenuDes="表皮称重" Action="/TSWeighRecore/List" Target="url" PowerID="CD10050000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="10000000" Seq="1">
<Actions>
<Action ContorllerName="TSWeighRecore" ActionName="List" PowerID="CD10030001">查询</Action>
<Action ContorllerName="TSWeighRecore" ActionName="List" PowerID="CD10050001">查询</Action>
<Action ContorllerName="TSWeighRecore" ActionName="ExportExcel" PowerID="CD10050002">导出</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="10060000" SystemID="FJC" MenuDes="库存信息" Action="/Storage/List" Target="url" PowerID="CD10060000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="10000000" Seq="1">
@ -442,6 +449,12 @@
<Action ContorllerName="StorageLog" ActionName="ExportExcel" PowerID="CD10070002">导出</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="10080000" SystemID="FJC" MenuDes="登记信息" Action="/SignInfo/List" Target="url" PowerID="CD10080000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="10000000" Seq="1">
<Actions>
<Action ContorllerName="SignInfo" ActionName="List" PowerID="CD10080001">查询</Action>
<Action ContorllerName="SignInfo" ActionName="ExportExcel" PowerID="CD10080002">导出</Action>
</Actions>
</MenuItem>
<!--<MenuItem MenuID="10040000" SystemID="FJC" MenuDes="生产进度查询" Action="" Target="url" PowerID="CD10040000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="10000000" Seq="1">
<Actions>
</Actions>
@ -682,7 +695,7 @@
<Actions>
<Action ContorllerName="DefectDict" ActionName="List" PowerID="CD06070001">查询</Action>
<Action ContorllerName="DefectDict" ActionName="Add" PowerID="CD06070002">添加</Action>
<Action ContorllerName="DefectDict" ActionName="Edit" PowerID="CD06070003">修改</Action>
<Action ContorllerName="DefectDict" ActionName="Edit" PowerID="CD060730003">修改</Action>
<Action ContorllerName="DefectDict" ActionName="Delete" PowerID="CD06070004">删除</Action>
</Actions>
</MenuItem>

211
APPQ5/QMAPP.FJC.Web/Controllers/ProductTimeController.cs

@ -0,0 +1,211 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using QMAPP.Common.Web.Controllers;
using QMFrameWork.WebUI.Attribute;
using QMAPP.FJC.Web.Models;
using QMFrameWork.Data;
using QMAPP.ServicesAgent;
using QMFrameWork.WebUI.DataSource;
using QMFrameWork.Common.Serialization;
using QMAPP.Entity;
using QMAPP.MD.Entity;
using QMAPP.FJC.Web;
using QMAPP.FJC.Entity.CheckTime;
namespace QMAPP.FJC.Web.Controllers
{
/// <summary>
/// 模块名称:工位时间验证
/// 作 者:张松男
/// 编写日期:2020年05月27日
/// </summary>
public class ProductTimeController : QController
{
#region 获取列表
/// <summary>
/// 加载列表
/// </summary>
/// <returns>结果</returns>
[HandleException]
public ActionResult List(bool? callBack)
{
ProductTimeModel seachModel = new ProductTimeModel();
if (callBack == true)
TryGetSelectBuffer<ProductTimeModel>(out seachModel);
seachModel.rownumbers = false;
seachModel.url = "/ProductTime/GetList";
return View("ProductTimeList", seachModel);
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="callBack">是否回调</param>
/// <returns>列表</returns>
[HandleException]
public ActionResult GetList(bool? callBack)
{
ProductTimeModel seachModel = null;
DataPage page = null;
ServiceAgent wcfAgent = this.GetServiceAgent();
ProductTime condition = null;
DataResult<DataPage> pageResult = new DataResult<DataPage>();
try
{
//获取查询对象
seachModel = GetModel<ProductTimeModel>();
#region 获取缓存值
if (callBack != null)
{
TryGetSelectBuffer<ProductTimeModel>(out seachModel);
}
else
{
//保存搜索条件
SetSelectBuffer<ProductTimeModel>(seachModel);
}
#endregion
//获取前台分页设置信息
page = this.GetDataPage(seachModel);
condition = CopyToModel<ProductTime, ProductTimeModel>(seachModel);
#region wcf服务统一接口
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("ProductTimeBLL_GetList", condition, page);
if (pageResult.IsSuccess == false)
{
SetMessage(pageResult.Msg);
return List(true);
}
DateGridResult<ProductTime> result = new DateGridResult<ProductTime>();
result.Total = pageResult.Result.RecordCount;
result.Rows = JsonConvertHelper.GetDeserialize<List<ProductTime>>(pageResult.Result.Result.ToString());
#endregion
string tempstr = "";
tempstr = result.GetJsonSource();
return Content(tempstr);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 编辑
/// <summary>
/// 编辑载入
/// </summary>
/// <returns>处理结果</returns>
[HandleException]
public ActionResult Edit()
{
ProductTimeModel model = new ProductTimeModel();
string ID = Request.Params["PID"];
ProductTime Entity = new ProductTime();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<ProductTime> result = new DataResult<ProductTime>();
try
{
if (string.IsNullOrEmpty(ID) == false)
{
//修改获取原数据
Entity.PID = ID;
result = wcfAgent.InvokeServiceFunction<DataResult<ProductTime>>(QMAPP.ServicesAgent.B9BasicService.ProductTimeBLL_Get.ToString(), Entity);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return View("ProductTimeEdit", model);
}
model = CopyToModel<ProductTimeModel, ProductTime>(result.Result);
//根据工位信息获得工序信息
}
return View("ProductTimeEdit", model);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 保存
/// <summary>
/// 保存
/// </summary>
/// <param name="model"></param>
/// <returns>处理结果</returns>
[HttpPost]
[HandleException]
[ValidateInput(false)]
public ActionResult Save(ProductTimeModel saveModel)
{
ProductTime Entity = null;
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
try
{
Entity = CopyToModel<ProductTime, ProductTimeModel>(saveModel);
if (string.IsNullOrEmpty(Entity.PID) == true)
{
//新增
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.B9BasicService.ProductTimeBLL_Insert.ToString(), Entity);
}
else
{
//修改
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.B9BasicService.ProductTimeBLL_Update.ToString(), Entity);
}
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return View("ProductTimeEdit", saveModel);
}
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge));
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 删除
/// <summary>
/// 删除
/// </summary>
/// <returns>结果</returns>
[HttpPost]
[HandleException]
public ActionResult Delete(ProductTimeModel saveModel)
{
string selectKey = Request.Form["selectKey"];
ProductTime Entity = null;
Entity = CopyToModel<ProductTime, ProductTimeModel>(saveModel);
Entity.PID = selectKey;
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
try
{
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("ProductTimeBLL_Delete", selectKey);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return List(true);
}
SetMessage(AppResource.DeleteMessage);
return List(true);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}

35
APPQ5/QMAPP.FJC.Web/Controllers/TSWeighRecoreController.cs

@ -16,6 +16,8 @@ using QMFrameWork.WebUI.DataSource;
using QMFrameWork.Common.Serialization;
using QMAPP.FJC.Web.Models.Bucket;
using QMAPP.MD.Entity.Bucket;
using QMAPP.FJC.BLL.Bucket;
using System.Data;
namespace QMAPP.FJC.Web.Controllers
{
@ -135,5 +137,38 @@ namespace QMAPP.FJC.Web.Controllers
}
}
#endregion
#region 导出excel
/// <summary>
/// 导出excel
/// </summary>
/// <returns>结果</returns>
[HttpPost]
public ActionResult ExportExcel()
{
TSWeighRecoreModel seachModel = null;
TSWeighRecore condition = null;
DataTable exportDt = new DataTable();
ServiceAgent wcfAgent = this.GetServiceAgent();
try
{
//获取查询对象
seachModel = GetModel<TSWeighRecoreModel>();
condition = CopyToModel<TSWeighRecore, TSWeighRecoreModel>(seachModel);
//获取数据
TSWeighRecoreBLL dp = new TSWeighRecoreBLL();
exportDt = dp.GetExportData(condition);
//exportDt = wcfAgent.InvokeServiceFunction<DataTable>("DoorPlankPlanBLL_GetExportData", condition);
//导出
QMFrameWork.WebUI.Util.IEFileTool efTool = new QMFrameWork.WebUI.Util.IEFileTool();
return efTool.GetExcelFileResult("TSWeighRecoreExp", "表皮称重信息.xlsx", exportDt);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}

4
APPQ5/QMAPP.FJC.Web/Models/Bucket/TSWeighRecoreModel.cs

@ -24,9 +24,9 @@ namespace QMAPP.FJC.Web.Models.Bucket
public string PID { get; set; }
/// <summary>
/// 注塑条码
/// 条码
/// </summary>
[Description("注塑条码")]
[Description("条码")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 150, DataAlign = DataAlign.center)]

297
APPQ5/QMAPP.FJC.Web/Models/CheckTime/ProductTimeModel.cs

@ -0,0 +1,297 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc.Html;
using QMFrameWork.WebUI.Attribute;
using QMFrameWork.WebUI;
namespace QMAPP.FJC.Web.Models
{
/// <summary>
/// 模块名称:工位时间验证
/// 作 者:张松男
/// 编写日期:2020年05月27日
/// </summary>
public class ProductTimeModel : QDGModel
{
/// <summary>
/// 条码格式规则主键
/// </summary>
[Description("主键")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 36)]
[DGColumn(Hidden = true, PrimaryKey = true)]
public string PID { get; set; }
/// <summary>
/// 当前工位编号
/// </summary>
[Description("当前工位编号")]
[HTMLInput(UpdateRead = true, required = false, MaxLength = 200, JsonUtl = "/Dict/GetWorkLocComboxSource")] //
[InputType(inputType.combobox)]
//[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string CWorkLoc_Code { get; set; }
/// <summary>
/// 校验工位编号
/// </summary>
[Description("校验工位编号")]
[HTMLInput(UpdateRead = true, required = false, MaxLength = 200, JsonUtl = "/Dict/GetWorkLocComboxSource")]
[InputType(inputType.combobox)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string PWorkLoc_Code { get; set; }
/// <summary>
/// 校验工位列名
/// </summary>
[Description("校验工位列名")]
[HTMLInput(UpdateRead = true, required = false, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string PWorkLoc_Column { get; set; }
/// <summary>
/// 产品码列名
/// </summary>
[Description("产品码列名")]
[HTMLInput(UpdateRead = true, required = false, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string Product_Column { get; set; }
/// <summary>
/// 是否验证
/// </summary>
[Description("是否验证")]
[HTMLInput(UpdateRead = true, required = false, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string Check { get; set; }
/// <summary>
/// 验证运算符
/// </summary>
[Description("验证运算符")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string Operator { get; set; }
/// <summary>
/// 验证类型
/// </summary>
[Description("验证类型")]
[HTMLInput(UpdateRead = true, required = false, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string Check_Type { get; set; }
/// <summary>
/// 验证值
/// </summary>
[Description("验证值")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string Check_Value { get; set; }
/// <summary>
/// 校验表
/// </summary>
[Description("校验表")]
[HTMLInput(UpdateRead = true, required = false, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string Check_Table { get; set; }
/// <summary>
/// 校验字段
/// </summary>
[Description("校验字段")]
[HTMLInput(UpdateRead = true, required = false, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string Check_Column { get; set; }
/// <summary>
/// 校验where条件
/// </summary>
[Description("校验where条件")]
[HTMLInput(UpdateRead = true, required = false, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string Pwhere { get; set; }
/// <summary>
/// 描述
/// </summary>
[Description("描述")]
[HTMLInput(UpdateRead = true, required = false, MaxLength = 200)]
[InputType(inputType.textArea)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string Remark { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Description("创建用户")]
public string CREATEUSER { get; set; }
/// <summary>
/// 创建日期
/// </summary>
[Description("创建时间")]
[HTMLInput(UpdateRead = true, MaxLength = 20)]
[InputType(inputType.hidden)]
[DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")]
public DateTime CREATEDATE { get; set; }
/// <summary>
/// 更新人
/// </summary>
[Description("更新用户")]
public string UPDATEUSER { get; set; }
/// <summary>
/// 更新日期
/// </summary>
[Description("更新时间")]
[HTMLInput(UpdateRead = true, MaxLength = 20)]
[InputType(inputType.hidden)]
[DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")]
public DateTime UPDATEDATE { get; set; }
///// <summary>
///// 正则表达式
///// </summary>
//[Description("物料PID")]
//[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
//[InputType(inputType.text)]
//[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
//public string MPID { get; set; }
///// <summary>
///// 物料类型
///// </summary>
//[Description("总成物料号")]
////[HTMLInput(UpdateRead = false, required = false, JsonUtl = "/Dict/GetMaterialClassComboxSource", MaxLength = 20)]
//[HTMLInput(UpdateRead = false, required = true, MaxLength = 300)]
//[InputType(inputType.text)]
//[DGColumn(frozenColumns = false, Sortable = true, Width = 200, DataAlign = DataAlign.center)]
//public string MATERIALCODDE { get; set; }
///// <summary>
///// 数据类型
///// </summary>
//[Description("二维码头052")]
//[HTMLInput(UpdateRead = false, required = true, MaxLength = 50)]
//[InputType(inputType.text)]
//[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
//public string barcodeFist { get; set; } = "052";
///// <summary>
///// 描述
///// </summary>
//[Description("公司编码(3位)")]
//[HTMLInput(UpdateRead = false, required = true, MaxLength = 100)]
//[InputType(inputType.textArea)]
//[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
//public string Company_code { get; set; }
///// <summary>
///// 描述
///// </summary>
//[Description("公司名称")]
//[HTMLInput(UpdateRead = false, required = false, MaxLength = 100)]
//[InputType(inputType.textArea)]
//[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
//public string Company_name { get; set; }
///// <summary>
///// 描述
///// </summary>
//[Description("产线代码")]
//[HTMLInput(UpdateRead = false, required = false, MaxLength = 100)]
//[InputType(inputType.textArea)]
//[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
//public string Line_code { get; set; }
///// <summary>
///// 描述
///// </summary>
//[Description("产线名称")]
//[HTMLInput(UpdateRead = false, required = false, MaxLength = 100)]
//[InputType(inputType.textArea)]
//[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
//public string Line_name { get; set; }
///// <summary>
///// 工厂编码
///// </summary>
//[Description("车型(1位)")]
////[HTMLInput(UpdateRead = false, required = false, JsonUtl = "/Dict/GetFactoryComboxSource", MaxLength = 100)]
//[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
//[InputType(inputType.text)]
//[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
//public string Vehicle_type { get; set; }
///// <summary>
///// 工厂编码
///// </summary>
//[Description("车型说明")]
////[HTMLInput(UpdateRead = false, required = false, JsonUtl = "/Dict/GetFactoryComboxSource", MaxLength = 100)]
//[HTMLInput(UpdateRead = false, required = false, MaxLength = 200)]
//[InputType(inputType.text)]
//[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
//public string VTDetail { get; set; }
///// <summary>
///// 物料号
///// </summary>
//[Description("配置、颜色(1位)")]
////[HTMLInput(UpdateRead = false, required = false, JsonUtl = "/Dict/GetMaterialComboxSource", MaxLength = 200)]
//[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
//[InputType(inputType.text)]
//[DGColumn(frozenColumns = false, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
//public string configColor { get; set; }
///// <summary>
///// 物料号
///// </summary>
//[Description("配置说明")]
////[HTMLInput(UpdateRead = false, required = false, JsonUtl = "/Dict/GetMaterialComboxSource", MaxLength = 200)]
//[HTMLInput(UpdateRead = false, required = false, MaxLength = 200)]
//[InputType(inputType.text)]
//[DGColumn(frozenColumns = false, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
//public string configDetail { get; set; }
///// <summary>
///// 物料号
///// </summary>
//[Description("颜色说明")]
////[HTMLInput(UpdateRead = false, required = false, JsonUtl = "/Dict/GetMaterialComboxSource", MaxLength = 200)]
//[HTMLInput(UpdateRead = false, required = false, MaxLength = 200)]
//[InputType(inputType.text)]
//[DGColumn(frozenColumns = false, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
//public string ColorDetail { get; set; }
}
}

11
APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj

@ -160,6 +160,7 @@
</Compile>
<Compile Include="Common\ExcelOperationHelper.cs" />
<Compile Include="Controllers\AndonCallReasonController.cs" />
<Compile Include="Controllers\ProductTimeController.cs" />
<Compile Include="Controllers\BomHdrController.cs" />
<Compile Include="Controllers\BarCodeReplacementController.cs" />
<Compile Include="Controllers\APPConfigController.cs" />
@ -312,6 +313,7 @@
<Compile Include="Models\BZDConfigModel.cs" />
<Compile Include="Models\BZDRecorderModel.cs" />
<Compile Include="Models\BZD\BarCodeReplacementModel.cs" />
<Compile Include="Models\CheckTime\ProductTimeModel.cs" />
<Compile Include="Models\CheckTime\CHECKTIMEModel.cs" />
<Compile Include="Models\EM\EmMeterCountModel.cs" />
<Compile Include="Models\EM\EmMeterReadingsModel.cs" />
@ -408,6 +410,10 @@
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="App_Data\Excel\TSWeighRecoreExp.xml">
<SubType>Designer</SubType>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="App_Data\Excel\StorageLogExp.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
@ -916,6 +922,8 @@
<Content Include="Views\BarCodeReplacement\BarCodeReplacementList.aspx" />
<Content Include="Views\AppConfig\AppConfigEdit.aspx" />
<Content Include="Views\AppConfig\AppConfigList.aspx" />
<Content Include="Views\ProductTime\ProductTimeEdit.aspx" />
<Content Include="Views\ProductTime\ProductTimeList.aspx" />
<Content Include="Views\SignInfo\SignInfoEdit.aspx" />
<Content Include="Views\SignInfo\SignInfoList.aspx" />
<Content Include="Views\BucketMaterialClass\BucketMaterialClassEdit.aspx" />
@ -1303,6 +1311,9 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Content Include="App_Data\Excel\TSWeighRecoreExp.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="App_Data\Excel\AndonCallLogExp.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>

166
APPQ5/QMAPP.FJC.Web/Views/ProductTime/ProductTimeEdit.aspx

@ -0,0 +1,166 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.MD.Web.Models.AWProductModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
设备信息编辑
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPEdit("工位时间校验编辑", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>
<table id="editTable" cellpadding="0" cellspacing="0">
<tr>
<td>
<table>
<tr>
<th align="right">
当前工位
</th>
<td>
<%=Html.QC(p => p.CWorkLoc_Code)%>
</td>
</tr>
<tr>
<th align="right">
校验工位
</th>
<td>
<%=Html.QC(p => p.PWorkLoc_Code)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p=>p.PWorkLoc_Column) %>
</th>
<td>
<%=Html.QC(p => p.PWorkLoc_Column)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p=>p.Product_Column) %>
</th>
<td>
<%=Html.QC(p => p.Product_Column)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p=>p.Check) %>
</th>
<td>
<%=Html.QC(p => p.Check)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p=>p.Operator) %>
</th>
<td>
<%=Html.QC(p => p.Operator)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p=>p.Check_Type) %>
</th>
<td>
<%=Html.QC(p => p.Check_Type)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p=>p.Check_Value) %>
</th>
<td>
<%=Html.QC(p => p.Check_Value)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p=>p.Check_Table) %>
</th>
<td>
<%=Html.QC(p => p.Check_Table)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p=>p.Check_Column) %>
</th>
<td>
<%=Html.QC(p => p.Check_Column)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p=>p.Pwhere) %>
</th>
<td>
<%=Html.QC(p => p.Pwhere)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p=>p.Remark) %>
</th>
<td>
<%=Html.QC(p => p.Remark)%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%=Html.HiddenFor(p => p.PID)%>
<%=Html.HiddenFor(p => p.CREATEDATE)%>
<%=Html.HiddenFor(p => p.CREATEUSER)%>
<%=Html.QPEnd() %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<%=Html.QTButtonSave("User", "Save", "return Save();")%>
<%=Html.QTButtonBack("close", "List", "parent.closeAppWindow1();return false;")%>
</td>
</tr>
</table>
<script type="text/javascript">
// $(function () {
// //工厂
// $('#CWorkLoc_Code').combobox({
// onSelect: function () {
// var selectCode = $('#CWorkLoc_Code').combobox('getValue');
// if (selectCode != "") {
// //获取下拉数据源
// $('#CWorkLoc_Code').combobox({
// url: "/Dict/GetWorkLocFromWorkCelEditlComboxSource",
// editable: 'false',
// valueField: 'PROJECT_CODE',
// textField: 'PROJECT_NAME'
// });
// $('#CWorkLoc_Code').combobox("setValue", "");
// }
// else {
// //清空工序下拉框
// var emptyData = [{ 'PROJECT_CODE': "", 'PROJECT_NAME': ""}];
// $('#CWorkLoc_Code').combobox("loadData", emptyData);
// $('#CWorkLoc_Code').combobox("select", "");
// }
// }
// });
//});
function Save() {
if (isValidate() == false) {
return false;
}
submitByButton("Save");
}
</script>
</asp:Content>

115
APPQ5/QMAPP.FJC.Web/Views/ProductTime/ProductTimeList.aspx

@ -0,0 +1,115 @@
 <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.ProductTimeModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
工位时间校验列表
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPSeach(100,true) %>
<table id="condiTable">
<%--<tr>
<th align="right">
<%=Html.QV(p=>p.MATERIALCODDE) %>
</th>
<td>
<%=Html.QC(p => p.MATERIALCODDE)%>
</td>
<th align="right">
<%=Html.QV(p => p.barcodeFist)%>
</th>
<td>
<%=Html.QC(p => p.barcodeFist)%>
</td>
<th align="right">
<%=Html.QV(p => p.Company_code)%>
</th>
<td>
<%=Html.QC(p => p.Company_code)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.Vehicle_type)%>
</th>
<td>
<%=Html.QC(p => p.Vehicle_type)%>
</td>
<th>
<%=Html.QV(p => p.configColor)%>
</th>
<td>
<%=Html.QC(p => p.configColor)%>
</td>
</tr>--%>
</table>
<div style="left: 1px; position: relative;"></div>
<%=Html.QPEnd()%>
<%=Html.QPList() %>
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.ProductTimeModel>(Model)%>
<%=Html.QPEnd() %>
<%=Html.Hidden("PID")%>
<%=Html.Hidden("selectKey")%>
<%=Html.Hidden("MPID")%>
<%-- <%=Html.Hidden("Line_code")%>
<%=Html.Hidden("Line_name")%>--%>
<script language="javascript" type="text/javascript">
//添加
function Add() {
openAppWindow1('工位时间校验添加', 'Edit', '400', '400');
}
//修改
function Update() {
var ids = getSelectKey();
if (ids == "") {
MSI("提示", "请选择修改记录。");
return;
}
if (ids.indexOf(":") > 0) {
MSI("提示", "每次只能修改一条记录。");
return;
}
document.getElementById("selectKey").value = ids;
openAppWindow1('工位时间校验修改', 'Edit?PID=' + ids, '400', '400');
}
//删除
function Delete() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
}
else {
document.getElementById("selectKey").value = ids;
MSQ("提示",
"确定要删除选中的记录吗?",
function() {
submitByButton("Delete");
});
}
}
$(function () {
$('#FACTORY_CODE').combobox({
panelWidth: '350'
});
});
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<%=Html.QTButtonSearch("ProductTime", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonAdd("ProductTime", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonUpdate("ProductTime", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonDelete("ProductTime", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>
</td>
</tr>
</table>
</asp:Content>

10
AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs

@ -2887,6 +2887,16 @@ namespace QMAPP.ServicesAgent
[Description("基础信息方法枚举")]
public enum B9BasicService
{
#region 时间验证
ProductTimeBLL_Insert,
ProductTimeBLL_Update,
ProductTimeBLL_Get,
#endregion
#region 查找注塑投料记录
/// <summary>
/// 查询注塑投料记录

7
ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml

@ -988,4 +988,11 @@
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
<ServiceDefinition>
<ServiceName>ProductTimeBLL</ServiceName>
<ServiceDes>标记信息</ServiceDes>
<FullLogicClassName>QMAPP.FJC.BLL.CheckTime.ProductTimeBLL</FullLogicClassName>
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
</BusinessDllList>
Loading…
Cancel
Save