songnan.zhang
2 years ago
21 changed files with 1607 additions and 17 deletions
@ -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
|
||||
|
} |
||||
|
} |
@ -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
|
||||
|
|
||||
|
} |
||||
|
} |
Binary file not shown.
@ -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> |
@ -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
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -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; }
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
@ -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> |
||||
|
|
@ -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> |
||||
|
|
Loading…
Reference in new issue