张松男
3 months ago
29 changed files with 3792 additions and 1 deletions
@ -0,0 +1,178 @@ |
|||
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.FJC.Entity; |
|||
using QMAPP.FJC.DAL; |
|||
using QMAPP.FJC.Entity.CCParameters; |
|||
using QMAPP.FJC.DAL.CCParameters; |
|||
|
|||
namespace QMAPP.FJC.BLL.CCParameters |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年02月06日
|
|||
///</summary>
|
|||
public class PARAMETERSBLL : BaseBLL |
|||
{ |
|||
|
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>信息</returns>
|
|||
public DataResult<PARAMETERS> Get(PARAMETERS model) |
|||
{ |
|||
DataResult<PARAMETERS> result = new DataResult<PARAMETERS>(); |
|||
try |
|||
{ |
|||
result.Result = new PARAMETERSDAL().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(PARAMETERS condition, DataPage page) |
|||
{ |
|||
|
|||
DataResult<DataPage> result = new DataResult<DataPage>(); |
|||
try |
|||
{ |
|||
//获取物料信息列表
|
|||
DataPage dataPage = new PARAMETERSDAL().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<PARAMETERS> GetAllList() |
|||
{ |
|||
return new PARAMETERSDAL().GetAllList(); |
|||
} |
|||
#endregion
|
|||
|
|||
#region 信息是否重复
|
|||
/// <summary>
|
|||
/// 判断名称是否存在
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>true:已存在;fasel:不存在。</returns>
|
|||
public bool Exists(PARAMETERS info) |
|||
{ |
|||
try |
|||
{ |
|||
return new PARAMETERSDAL().Exists(info); |
|||
} |
|||
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 PARAMETERS { 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(PARAMETERS info) |
|||
{ |
|||
try |
|||
{ |
|||
return new PARAMETERSDAL().Delete(info); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 导出数据
|
|||
/// <summary>
|
|||
/// 获取导出的数据
|
|||
/// </summary>
|
|||
/// <param name="">查询条件</param>
|
|||
/// <returns>数据</returns>
|
|||
public DataResult<DataTable> GetExportData(PARAMETERS info) |
|||
{ |
|||
try |
|||
{ |
|||
DataResult<DataTable> result = new DataResult<DataTable>(); |
|||
result.Result = new PARAMETERSDAL().GetExportData(info); |
|||
result.IsSuccess = true; |
|||
return result; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,284 @@ |
|||
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.FJC.Entity; |
|||
using QMAPP.FJC.DAL; |
|||
using QMAPP.FJC.Entity.CCParameters; |
|||
using QMAPP.FJC.DAL.CCParameters; |
|||
|
|||
namespace QMAPP.FJC.BLL.CCParameters |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年02月06日
|
|||
///</summary>
|
|||
public class PARAMETERSCONFIGBLL : BaseBLL |
|||
{ |
|||
|
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>信息</returns>
|
|||
public DataResult<PARAMETERSCONFIG> Get(PARAMETERSCONFIG model) |
|||
{ |
|||
DataResult<PARAMETERSCONFIG> result = new DataResult<PARAMETERSCONFIG>(); |
|||
try |
|||
{ |
|||
result.Result = new PARAMETERSCONFIGDAL().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(PARAMETERSCONFIG condition, DataPage page) |
|||
{ |
|||
DataResult<DataPage> result = new DataResult<DataPage>(); |
|||
try |
|||
{ |
|||
//获取物料信息列表
|
|||
DataPage dataPage = new PARAMETERSCONFIGDAL().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<PARAMETERSCONFIG> GetAllList() |
|||
{ |
|||
return new PARAMETERSCONFIGDAL().GetAllList(); |
|||
} |
|||
#endregion
|
|||
|
|||
#region 信息是否重复
|
|||
/// <summary>
|
|||
/// 判断名称是否存在
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>true:已存在;fasel:不存在。</returns>
|
|||
public bool Exists(PARAMETERSCONFIG info) |
|||
{ |
|||
try |
|||
{ |
|||
return new PARAMETERSCONFIGDAL().Exists(info); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
#region 插入信息
|
|||
/// <summary>
|
|||
/// 插入信息(单表)
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>插入行数</returns>
|
|||
public DataResult<int> Insert(PARAMETERSCONFIG info) |
|||
{ |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
//基本信息
|
|||
info.pid = Guid.NewGuid().ToString(); |
|||
info.createdata = DateTime.Now; |
|||
info.creatauser = LoginUser.LoginUserID; |
|||
PARAMETERSCONFIGDAL cmdDAL = new PARAMETERSCONFIGDAL(); |
|||
result.Result = new PARAMETERSCONFIGDAL().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(PARAMETERSCONFIG info) |
|||
{ |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
result.Result = new PARAMETERSCONFIGDAL().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 PARAMETERSCONFIG { 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(PARAMETERSCONFIG info) |
|||
{ |
|||
try |
|||
{ |
|||
return new PARAMETERSCONFIGDAL().Delete(info); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 导出数据
|
|||
/// <summary>
|
|||
/// 获取导出的数据
|
|||
/// </summary>
|
|||
/// <param name="">查询条件</param>
|
|||
/// <returns>数据</returns>
|
|||
public DataTable GetExportData(PARAMETERSCONFIG info) |
|||
{ |
|||
try |
|||
{ |
|||
return new PARAMETERSCONFIGDAL().GetExportData(info); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 导入数据
|
|||
/// <summary>
|
|||
/// 导入数据
|
|||
/// </summary>
|
|||
/// <param name="list">数据</param>
|
|||
/// <returns>导入结果</returns>
|
|||
public DataResult<ImportMessage> ImportData(List<PARAMETERSCONFIG> list) |
|||
{ |
|||
DataResult<ImportMessage> result = new DataResult<ImportMessage>(); |
|||
PARAMETERSCONFIGDAL cmDal = new PARAMETERSCONFIGDAL(); |
|||
List<PARAMETERSCONFIG> List = new List<PARAMETERSCONFIG>(); |
|||
int index = 0; |
|||
try |
|||
{ |
|||
result.Result = new ImportMessage(); |
|||
result.Result.Errors = new List<RowError>(); |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//状态判断
|
|||
foreach (PARAMETERSCONFIG ma in list) |
|||
{ |
|||
index++; |
|||
if (!string.IsNullOrEmpty(ma.InfoError)) |
|||
{ |
|||
ma.pid = null; |
|||
result.Result.failureNum += 1; |
|||
continue; |
|||
} |
|||
//修改改时根据主键等信息获取详细内容信息
|
|||
PARAMETERSCONFIG oldInfo = cmDal.Get(ma); |
|||
if (oldInfo != null) |
|||
{ |
|||
//更新
|
|||
ma.pid = oldInfo.pid; |
|||
ma.IsNewInfo = false; |
|||
result.Result.updateNum += 1; |
|||
} |
|||
else |
|||
{ |
|||
//新增
|
|||
oldInfo = new PARAMETERSCONFIG(); |
|||
ma.pid = Guid.NewGuid().ToString(); |
|||
ma.IsNewInfo = true; |
|||
result.Result.insertNum += 1; |
|||
} |
|||
List.Add(ma); |
|||
} |
|||
} |
|||
//导入
|
|||
//cmDal.GetImportData(List);
|
|||
result.Msg = "导入成功"; |
|||
result.IsSuccess = true; |
|||
return result; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
return result; |
|||
} |
|||
} |
|||
#endregion
|
|||
} |
|||
} |
@ -0,0 +1,222 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Data; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMFrameWork.Common.Encrypt; |
|||
using QMFrameWork.Data; |
|||
using QMAPP.FJC.DAL.Operation; |
|||
using QMAPP.FJC.Entity.Operation; |
|||
using QMAPP.BLL; |
|||
using QMAPP.Entity; |
|||
using QMAPP.FJC.BLL.Dict; |
|||
using QMAPP.FJC.Entity.CCParameters; |
|||
using QMAPP.FJC.DAL.CCParameters; |
|||
|
|||
namespace QMAPP.FJC.BLL.CCParameters |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年01月16日
|
|||
///</summary>
|
|||
public class SYSCONFIGBLL : BaseBLL |
|||
{ |
|||
|
|||
|
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>信息</returns>
|
|||
public DataResult<SYSCONFIG> Get(SYSCONFIG model) |
|||
{ |
|||
DataResult<SYSCONFIG> result = new DataResult<SYSCONFIG>(); |
|||
try |
|||
{ |
|||
result.Result = new SYSCONFIGDAL().Get(model); |
|||
|
|||
result.IsSuccess = true; |
|||
return result; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public DataResult<DataPage> GetList(SYSCONFIG condition, DataPage page) |
|||
{ |
|||
DataResult<DataPage> result = new DataResult<DataPage>(); |
|||
try |
|||
{ |
|||
//获取物料信息列表
|
|||
DataPage dataPage = new SYSCONFIGDAL().GetList(condition, page); |
|||
|
|||
result.Result = dataPage; |
|||
result.IsSuccess = true; |
|||
return result; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
|
|||
#region 插入信息
|
|||
/// <summary>
|
|||
/// 插入信息(单表)
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>插入行数</returns>
|
|||
public DataResult<int> Insert(SYSCONFIG model) |
|||
{ |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
result.Result = new SYSCONFIGDAL().Insert(model); |
|||
result.IsSuccess = true; |
|||
return result; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
|
|||
#region 更新信息
|
|||
/// <summary>
|
|||
/// 更新信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>更新行数</returns>
|
|||
public DataResult<int> Update(SYSCONFIG model) |
|||
{ |
|||
try |
|||
{ |
|||
DataResult<int> result = new DataResult<int>(); |
|||
result.Result = new SYSCONFIGDAL().Update(model); |
|||
|
|||
result.IsSuccess = true; |
|||
return result; |
|||
|
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 信息是否重复
|
|||
/// <summary>
|
|||
/// 判断名称是否存在
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>true:已存在;fasel:不存在。</returns>
|
|||
public bool Exists(SYSCONFIG info) |
|||
{ |
|||
try |
|||
{ |
|||
return new SYSCONFIGDAL().Exists(info); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
#region 删除
|
|||
/// <summary>
|
|||
/// 删除信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>删除个数</returns>
|
|||
public DataResult<int> Delete(string strs) |
|||
{ |
|||
DataResult<int> result = new DataResult<int>(); |
|||
int count = 0; |
|||
string[] list = strs.Split(":".ToCharArray()); |
|||
try |
|||
{ |
|||
foreach (string str in list) |
|||
{ |
|||
count += this.DeleteMainProduct(new SYSCONFIG { CODE = str }); |
|||
} |
|||
result.Result = count; |
|||
result.IsSuccess = true; |
|||
return result; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 删除信息
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>删除个数</returns>
|
|||
public int DeleteMainProduct(SYSCONFIG model) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
count = new SYSCONFIGDAL().Delete(model); |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
|
|||
#region 导出数据
|
|||
/// <summary>
|
|||
/// 获取导出的数据
|
|||
/// </summary>
|
|||
/// <param name="user">查询条件</param>
|
|||
/// <returns>数据</returns>
|
|||
public DataTable GetExportData(SYSCONFIG model) |
|||
{ |
|||
try |
|||
{ |
|||
return new SYSCONFIGDAL().GetExportData(model); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
|
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,306 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMAPP.MD.Entity; |
|||
using QMFrameWork.Data; |
|||
using QMFrameWork.Log; |
|||
using System.Data; |
|||
using QMAPP.DAL; |
|||
using QMAPP.Entity; |
|||
using QMAPP.FJC.Entity.CCParameters; |
|||
|
|||
namespace QMAPP.FJC.DAL.CCParameters |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年02月06日
|
|||
///</summary>
|
|||
public class PARAMETERSCONFIGDAL : BaseDAL |
|||
{ |
|||
|
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>*信息</returns>
|
|||
public PARAMETERSCONFIG Get(PARAMETERSCONFIG info) |
|||
{ |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
//获取信息
|
|||
info = session.Get<PARAMETERSCONFIG>(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(PARAMETERSCONFIG 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 = "createdata DESC"; //创建时间倒叙排列
|
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
// 对应多种数据库
|
|||
//string sqlChange = this.ChangeSqlByDB(sql, session);
|
|||
page = session.GetDataPage<PARAMETERSCONFIG>(sql, parameters.ToArray(), page); |
|||
} |
|||
return page; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 获取全部规则
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
public List<PARAMETERSCONFIG> GetAllList() |
|||
{ |
|||
try |
|||
{ |
|||
string sql = "SELECT * FROM [T_DIM_PARAMETERSCONFIG]"; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
return session.GetList<PARAMETERSCONFIG>(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(PARAMETERSCONFIG condition, ref List<DataParameter> parameters) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
StringBuilder whereBuilder = new StringBuilder(); |
|||
try |
|||
{ |
|||
//构成查询语句
|
|||
sqlBuilder.Append("SELECT pid,supplier,supplierName,vehicleType,partNumber,partName,variance,station,parameter,lower_limit,upper_limit,createdata,creatauser "); |
|||
sqlBuilder.Append("FROM T_DIM_PARAMETERSCONFIG "); |
|||
//查询条件
|
|||
|
|||
|
|||
//查询条件
|
|||
if (string.IsNullOrEmpty(condition.vehicleType) == false) |
|||
{ |
|||
whereBuilder.Append(" AND vehicleType like @vehicleType "); |
|||
parameters.Add(new DataParameter { ParameterName = "vehicleType", DataType = DbType.String, Value = condition.vehicleType }); |
|||
} |
|||
if (string.IsNullOrEmpty(condition.parameter) == false) |
|||
{ |
|||
whereBuilder.Append(" AND parameter like @parameter "); |
|||
parameters.Add(new DataParameter { ParameterName = "parameter", DataType = DbType.String, Value = condition.parameter }); |
|||
} |
|||
if (string.IsNullOrEmpty(condition.station) == false) |
|||
{ |
|||
whereBuilder.Append(" AND station like @station "); |
|||
parameters.Add(new DataParameter { ParameterName = "station", DataType = DbType.String, Value = condition.station }); |
|||
} |
|||
|
|||
|
|||
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="user">查询条件</param>
|
|||
/// <returns>数据</returns>
|
|||
public DataTable GetExportData(PARAMETERSCONFIG info) |
|||
{ |
|||
DataTable dt = null; |
|||
string sql = null; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
//构成查询语句
|
|||
sql = this.GetQuerySql(info, ref parameters); |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
dt = session.GetTable(sql, parameters.ToArray()); |
|||
dt.TableName = "PARAMETERSCONFIG"; |
|||
} |
|||
return dt; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 信息是否重复
|
|||
/// <summary>
|
|||
/// 判断名称是否存在
|
|||
/// </summary>
|
|||
/// <param name="info"></param>
|
|||
/// <returns>true:已存在;fasel:不存在。</returns>
|
|||
public bool Exists(PARAMETERSCONFIG 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_DIM_PARAMETERSCONFIG"); |
|||
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.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
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(PARAMETERSCONFIG info) |
|||
{ |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
int count = 0; |
|||
try |
|||
{ |
|||
var sql = $"INSERT INTO [dbo].[T_DIM_PARAMETERSCONFIG] ([pid], [supplier], [supplierName], [vehicleType], [partNumber], [partName], [variance], [station], [parameter], [lower_limit ], [upper_limit], [createdata], [creatauser]) VALUES (" + |
|||
$"'{info.pid}', '{info.supplier}', '{info.supplierName}', '{info.vehicleType}', '{info.partNumber}', '{info.partName}', '{info.variance}', '{info.station}', '{info.parameter}', {info.lower_limit}, {info.upper_limit}, '{info.createdata}', '{info.creatauser}');"; |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
//插入基本信息
|
|||
count = session.ExecuteSql(sql, parameters.ToArray()); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 更新信息
|
|||
/// <summary>
|
|||
/// 更新信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>更新行数</returns>
|
|||
public int Update(PARAMETERSCONFIG info) |
|||
{ |
|||
int count = 0; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
var sql = $"update T_DIM_PARAMETERSCONFIG set supplier='{info.supplier}',supplierName='{info.supplierName}',vehicleType='{info.vehicleType}',partNumber='{info.partNumber}',partName='{info.partName}',variance='{info.variance}',station='{info.station}',parameter='{info.parameter}',lower_limit='{info.lower_limit}',upper_limit='{info.upper_limit}'where pid = '{info.pid}'"; |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
//更新基本信息
|
|||
count = session.ExecuteSql(sql, parameters.ToArray()); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 逻辑删除
|
|||
/// <summary>
|
|||
/// 逻辑删除信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>删除个数</returns>
|
|||
public int Delete(PARAMETERSCONFIG info) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
//删除基本信息
|
|||
sqlBuilder.Append("delete T_DIM_PARAMETERSCONFIG "); |
|||
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
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,391 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMAPP.MD.Entity; |
|||
using QMFrameWork.Data; |
|||
using QMFrameWork.Log; |
|||
using System.Data; |
|||
using QMAPP.DAL; |
|||
using QMAPP.Entity; |
|||
using QMAPP.FJC.Entity.CCParameters; |
|||
|
|||
namespace QMAPP.FJC.DAL.CCParameters |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年02月06日
|
|||
///</summary>
|
|||
public class PARAMETERSDAL : BaseDAL |
|||
{ |
|||
|
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>*信息</returns>
|
|||
public PARAMETERS Get(PARAMETERS info) |
|||
{ |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
//获取信息
|
|||
info = session.Get<PARAMETERS>(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(PARAMETERS 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 = "inTime DESC"; //创建时间倒叙排列
|
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
// 对应多种数据库
|
|||
//string sqlChange = this.ChangeSqlByDB(sql, session);
|
|||
page = session.GetDataPage<PARAMETERS>(sql, parameters.ToArray(), page); |
|||
|
|||
} |
|||
return page; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 获取全部规则
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
public List<PARAMETERS> GetAllList() |
|||
{ |
|||
try |
|||
{ |
|||
string sql = "SELECT * FROM [T_EQUIPMENT_PARAMETERS]"; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
return session.GetList<PARAMETERS>(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(PARAMETERS condition, ref List<DataParameter> parameters) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
StringBuilder whereBuilder = new StringBuilder(); |
|||
try |
|||
{ |
|||
//构成查询语句
|
|||
sqlBuilder.Append("SELECT pid,supplier,supplierName,vehicleType,partNumber,partName,variance,station,processTime,parameter,value,lower_limit,upper_limit,inTime,BTV "); |
|||
sqlBuilder.Append("FROM T_EQUIPMENT_PARAMETERS "); |
|||
|
|||
//查询条件
|
|||
|
|||
|
|||
|
|||
//查询条件
|
|||
if (string.IsNullOrEmpty(condition.vehicleType) == false) |
|||
{ |
|||
whereBuilder.Append(" AND vehicleType like @vehicleType "); |
|||
parameters.Add(new DataParameter { ParameterName = "vehicleType", DataType = DbType.String, Value = condition.vehicleType }); |
|||
} |
|||
if (string.IsNullOrEmpty(condition.parameter) == false) |
|||
{ |
|||
whereBuilder.Append(" AND parameter like @parameter "); |
|||
parameters.Add(new DataParameter { ParameterName = "parameter", DataType = DbType.String, Value = condition.parameter }); |
|||
} |
|||
if (string.IsNullOrEmpty(condition.station) == false) |
|||
{ |
|||
whereBuilder.Append(" AND station like @station "); |
|||
parameters.Add(new DataParameter { ParameterName = "station", DataType = DbType.String, Value = condition.station }); |
|||
} |
|||
if (condition.begintime != DateTime.MinValue) |
|||
{ |
|||
whereBuilder.Append(" AND inTime >= @begintime "); |
|||
parameters.Add(new DataParameter { ParameterName = "begintime", DataType = DbType.String, Value = condition.begintime }); |
|||
} |
|||
else |
|||
{ |
|||
whereBuilder.Append(" AND inTime >= @begintime "); |
|||
parameters.Add(new DataParameter { ParameterName = "begintime", DataType = DbType.String, Value = DateTime.Now.AddDays(-1) }); |
|||
} |
|||
if (condition.endtime != DateTime.MinValue) |
|||
{ |
|||
whereBuilder.Append(" AND inTime <= @endtime "); |
|||
parameters.Add(new DataParameter { ParameterName = "endtime", DataType = DbType.String, Value = condition.endtime }); |
|||
} |
|||
|
|||
|
|||
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="user">查询条件</param>
|
|||
/// <param name="parameters">参数</param>
|
|||
/// <returns>查询语句</returns>
|
|||
private string GetQuerySqlExp(PARAMETERS condition, ref List<DataParameter> parameters) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
StringBuilder whereBuilder = new StringBuilder(); |
|||
try |
|||
{ |
|||
//构成查询语句
|
|||
sqlBuilder.Append("SELECT pid,supplier,supplierName,vehicleType,partNumber,partName,variance,station,processTime,parameter,value,lower_limit,upper_limit,inTime,BTV "); |
|||
sqlBuilder.Append("FROM T_EQUIPMENT_PARAMETERS "); |
|||
|
|||
//查询条件
|
|||
|
|||
|
|||
|
|||
//查询条件
|
|||
if (string.IsNullOrEmpty(condition.vehicleType) == false) |
|||
{ |
|||
whereBuilder.Append(" AND vehicleType like @vehicleType "); |
|||
parameters.Add(new DataParameter { ParameterName = "vehicleType", DataType = DbType.String, Value = condition.vehicleType }); |
|||
} |
|||
if (string.IsNullOrEmpty(condition.parameter) == false) |
|||
{ |
|||
whereBuilder.Append(" AND parameter like @parameter "); |
|||
parameters.Add(new DataParameter { ParameterName = "parameter", DataType = DbType.String, Value = condition.parameter }); |
|||
} |
|||
if (string.IsNullOrEmpty(condition.station) == false) |
|||
{ |
|||
whereBuilder.Append(" AND station like @station "); |
|||
parameters.Add(new DataParameter { ParameterName = "station", DataType = DbType.String, Value = condition.station }); |
|||
} |
|||
if (condition.begintime != DateTime.MinValue) |
|||
{ |
|||
whereBuilder.Append(" AND inTime >= @begintime "); |
|||
parameters.Add(new DataParameter { ParameterName = "begintime", DataType = DbType.String, Value = condition.begintime }); |
|||
} |
|||
else |
|||
{ |
|||
whereBuilder.Append(" AND inTime >= @begintime "); |
|||
parameters.Add(new DataParameter { ParameterName = "begintime", DataType = DbType.String, Value = DateTime.Now.AddDays(-1) }); |
|||
} |
|||
if (condition.endtime != DateTime.MinValue) |
|||
{ |
|||
whereBuilder.Append(" AND inTime <= @endtime "); |
|||
parameters.Add(new DataParameter { ParameterName = "endtime", DataType = DbType.String, Value = condition.endtime }); |
|||
} |
|||
|
|||
|
|||
if (whereBuilder.Length > 0) |
|||
{ |
|||
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); |
|||
} |
|||
|
|||
sqlBuilder.Append("ORDER BY inTime DESC "); |
|||
return sqlBuilder.ToString(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取导出的数据
|
|||
/// <summary>
|
|||
/// 获取导出的数据
|
|||
/// </summary>
|
|||
/// <param name="user">查询条件</param>
|
|||
/// <returns>数据</returns>
|
|||
public DataTable GetExportData(PARAMETERS info) |
|||
{ |
|||
DataTable dt = null; |
|||
string sql = null; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
//构成查询语句
|
|||
sql = this.GetQuerySqlExp(info, ref parameters); |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
dt = session.GetTable(sql, parameters.ToArray()); |
|||
dt.TableName = "PARAMETERS"; |
|||
} |
|||
return dt; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 信息是否重复
|
|||
/// <summary>
|
|||
/// 判断名称是否存在
|
|||
/// </summary>
|
|||
/// <param name="info"></param>
|
|||
/// <returns>true:已存在;fasel:不存在。</returns>
|
|||
public bool Exists(PARAMETERS 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_EQUIPMENT_PARAMETERS"); |
|||
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.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
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(PARAMETERS info) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
//插入基本信息
|
|||
count = session.Insert<PARAMETERS>(info); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 更新信息
|
|||
/// <summary>
|
|||
/// 更新信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>更新行数</returns>
|
|||
public int Update(PARAMETERS info) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
//更新基本信息
|
|||
count = session.Update<PARAMETERS>(info); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 逻辑删除
|
|||
/// <summary>
|
|||
/// 逻辑删除信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>删除个数</returns>
|
|||
public int Delete(PARAMETERS info) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
//删除基本信息
|
|||
sqlBuilder.Append("delete T_EQUIPMENT_PARAMETERS "); |
|||
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
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,310 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMAPP.FJC.Entity.Operation; |
|||
using QMFrameWork.Data; |
|||
using System.Data; |
|||
using QMAPP.Entity; |
|||
using QMAPP.FJC.Entity.CCParameters; |
|||
|
|||
namespace QMAPP.FJC.DAL.CCParameters |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年01月16日
|
|||
///</summary>
|
|||
public class SYSCONFIGDAL |
|||
{ |
|||
|
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>*信息</returns>
|
|||
public SYSCONFIG Get(SYSCONFIG info) |
|||
{ |
|||
try |
|||
{ |
|||
var sql = $"select TOP 1 * from T_DIM_SYSCONFIG where ID = '{info.ID}'"; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
//获取信息
|
|||
info = session.GetList<SYSCONFIG>(sql, parameters.ToArray()).ToList()[0]; |
|||
} |
|||
return info; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
|
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public DataPage GetList(SYSCONFIG condition, DataPage page) |
|||
{ |
|||
string sql = null; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
sql = this.GetQuerySql(condition, ref parameters); |
|||
//分页关键字段及排序
|
|||
page.KeyName = "ID"; |
|||
if (string.IsNullOrEmpty(page.SortExpression)) |
|||
page.SortExpression = "ID DESC "; |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
page = session.GetDataPage<SYSCONFIG>(sql, parameters.ToArray(), page); |
|||
} |
|||
return page; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取查询语句
|
|||
/// <summary>
|
|||
/// 获取查询语句
|
|||
/// </summary>
|
|||
/// <param name="user">查询条件</param>
|
|||
/// <param name="parameters">参数</param>
|
|||
/// <returns>查询语句</returns>
|
|||
private string GetQuerySql(SYSCONFIG condition, ref List<DataParameter> parameters) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
StringBuilder whereBuilder = new StringBuilder(); |
|||
try |
|||
{ |
|||
//构成查询语句
|
|||
sqlBuilder.Append("SELECT ID,CODE,NAME,VALUE,REMARK,TYPE "); |
|||
//sqlBuilder.Append("SELECT CODE,NAME,VALUE,REMARK,TYPE ");
|
|||
sqlBuilder.Append("FROM T_DIM_SYSCONFIG "); |
|||
|
|||
//查询条件
|
|||
if (string.IsNullOrEmpty(condition.CODE) == false) |
|||
{ |
|||
whereBuilder.Append(" AND CODE like @CODE "); |
|||
parameters.Add(new DataParameter { ParameterName = "CODE", DataType = DbType.String, Value = "%"+ condition.CODE.Trim(',')+"%" }); |
|||
} |
|||
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="user">查询条件</param>
|
|||
/// <returns>数据</returns>
|
|||
public DataTable GetExportData(SYSCONFIG info) |
|||
{ |
|||
DataTable dt = null; |
|||
string sql = null; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
//构成查询语句
|
|||
sql = this.GetQuerySql(info, ref parameters); |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
dt = session.GetTable(sql, parameters.ToArray()); |
|||
dt.TableName = "T_AW_PRODUCT"; |
|||
} |
|||
return dt; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 插入信息
|
|||
/// <summary>
|
|||
/// 插入信息(单表)
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>插入行数</returns>
|
|||
public int Insert(SYSCONFIG info) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
var SQL = $"INSERT INTO [dbo].[T_DIM_SYSCONFIG] ( [CODE], [NAME], [VALUE], [REMARK], [TYPE]) VALUES ( '{info.CODE}', '{info.NAME}', '{info.VALUE}', '{info.REMARK}', '{info.TYPE}');"; |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
count = session.ExecuteSql(SQL, parameters.ToArray()); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 插入信息(事务)
|
|||
/// </summary>
|
|||
/// <param name="SYSCONFIG">产品信息</param>
|
|||
/// <param name="session">数据会话</param>
|
|||
/// <returns>插入行数</returns>
|
|||
public int Insert(SYSCONFIG SYSCONFIG, IDataSession session) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
//插入基本信息
|
|||
count = session.Insert<SYSCONFIG>(SYSCONFIG); |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 更新信息
|
|||
/// <summary>
|
|||
/// 更新信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>更新行数</returns>
|
|||
public int Update(SYSCONFIG info) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
var SQL = $"UPDATE T_DIM_SYSCONFIG SET CODE = '{info.CODE}', NAME = '{info.NAME}',VALUE = '{info.VALUE}',REMARK= '{info.REMARK}',TYPE= '{info.TYPE}' WHERE ID = '{info.ID}'"; |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
//更新基本信息
|
|||
count = session.ExecuteSql(SQL, parameters.ToArray()); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 更新信息(事务)
|
|||
/// </summary>
|
|||
/// <param name="info">产品信息</param>
|
|||
/// <param name="session">数据会话</param>
|
|||
/// <returns></returns>
|
|||
public int Update(SYSCONFIG info, IDataSession session) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
//更新基本信息
|
|||
count = session.Update<SYSCONFIG>(info); |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 逻辑删除
|
|||
/// <summary>
|
|||
/// 逻辑删除信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>删除个数</returns>
|
|||
public int Delete(SYSCONFIG info) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
//删除基本信息
|
|||
sqlBuilder.Append("delete T_DIM_SYSCONFIG "); |
|||
sqlBuilder.Append("WHERE ID = @CODE "); |
|||
parameters.Add(new DataParameter { ParameterName = "CODE", DataType = DbType.String, Value = info.CODE }); |
|||
count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 信息是否重复
|
|||
/// <summary>
|
|||
/// 判断名称是否存在
|
|||
/// </summary>
|
|||
/// <param name="info"></param>
|
|||
/// <returns>true:已存在;fasel:不存在。</returns>
|
|||
public bool Exists(SYSCONFIG 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_DIM_SYSCONFIG"); |
|||
if (!string.IsNullOrEmpty(info.ID)) |
|||
{ |
|||
whereBuilder.Append(" AND ID = @ID "); |
|||
parameters.Add(new DataParameter { ParameterName = "ID", DataType = DbType.String, Value = info.ID }); |
|||
} |
|||
|
|||
//添加进行无重复字段判断代码
|
|||
|
|||
if (whereBuilder.Length > 0) |
|||
{ |
|||
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); |
|||
} |
|||
using (IDataSession session = AppDataFactory.CreateSession("maindbEQUIPMENT")) |
|||
{ |
|||
count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); |
|||
} |
|||
return count > 0; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
} |
|||
} |
@ -0,0 +1,127 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMAPP.Entity; |
|||
using QMFrameWork.Data.Attributes; |
|||
using System.Data; |
|||
using System.ComponentModel; |
|||
|
|||
namespace QMAPP.FJC.Entity.CCParameters |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年02月06日
|
|||
///</summary>
|
|||
[DBTable(TableName = "T_EQUIPMENT_PARAMETERS", TimeStampColumn = "inTime")] |
|||
public class PARAMETERS : BaseEntity |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
[Description("主键")] |
|||
[DBColumn(ColumnName = "pid", DataType = DbType.String, IsKey = true)] |
|||
public string pid { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工厂编码
|
|||
/// </summary>
|
|||
[Description("工厂编码")] |
|||
[DBColumn(ColumnName = "supplier", DataType = DbType.String)] |
|||
public string supplier { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工厂名称
|
|||
/// </summary>
|
|||
[Description("工厂名称")] |
|||
[DBColumn(ColumnName = "supplierName", DataType = DbType.String)] |
|||
public string supplierName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 车型
|
|||
/// </summary>
|
|||
[Description("车型")] |
|||
[DBColumn(ColumnName = "vehicleType", DataType = DbType.String)] |
|||
public string vehicleType { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 零件号
|
|||
/// </summary>
|
|||
[Description("零件号")] |
|||
[DBColumn(ColumnName = "partNumber", DataType = DbType.String)] |
|||
public string partNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 零件名称
|
|||
/// </summary>
|
|||
[Description("零件名称")] |
|||
[DBColumn(ColumnName = "partName", DataType = DbType.String)] |
|||
public string partName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 配置
|
|||
/// </summary>
|
|||
[Description("配置")] |
|||
[DBColumn(ColumnName = "variance", DataType = DbType.String)] |
|||
public string variance { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工位
|
|||
/// </summary>
|
|||
[Description("工位")] |
|||
[DBColumn(ColumnName = "station", DataType = DbType.String)] |
|||
public string station { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 加工时间
|
|||
/// </summary>
|
|||
[Description("加工时间")] |
|||
[DBColumn(ColumnName = "processTime", DataType = DbType.DateTime)] |
|||
public DateTime processTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 参数名称
|
|||
/// </summary>
|
|||
[Description("参数名称")] |
|||
[DBColumn(ColumnName = "parameter", DataType = DbType.String)] |
|||
public string parameter { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 参数值
|
|||
/// </summary>
|
|||
[Description("参数值")] |
|||
[DBColumn(ColumnName = "value", DataType = DbType.String)] |
|||
public string value { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 下公差
|
|||
/// </summary>
|
|||
[Description("下公差")] |
|||
[DBColumn(ColumnName = "lower_limit", DataType = DbType.Double)] |
|||
public double lower_limit { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 上公差
|
|||
/// </summary>
|
|||
[Description("上公差")] |
|||
[DBColumn(ColumnName = "upper_limit", DataType = DbType.Double)] |
|||
public double upper_limit { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 插入时间
|
|||
/// </summary>
|
|||
[Description("插入时间")] |
|||
[DBColumn(ColumnName = "inTime", DataType = DbType.DateTime)] |
|||
public DateTime inTime { get; set; } |
|||
public DateTime begintime { get; set; } |
|||
public DateTime endtime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 责任人
|
|||
/// </summary>
|
|||
[Description("责任人")] |
|||
[DBColumn(ColumnName = "BTV", DataType = DbType.String)] |
|||
public string BTV { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,111 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMAPP.Entity; |
|||
using QMFrameWork.Data.Attributes; |
|||
using System.Data; |
|||
using System.ComponentModel; |
|||
|
|||
namespace QMAPP.FJC.Entity.CCParameters |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年02月06日
|
|||
///</summary>
|
|||
[DBTable(TableName = "T_DIM_PARAMETERSCONFIG", TimeStampColumn = "UPDATEDATE")] |
|||
public class PARAMETERSCONFIG : BaseEntity |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
[Description("主键")] |
|||
[DBColumn(ColumnName = "pid", DataType = DbType.String, IsKey = true)] |
|||
public string pid { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工厂编码
|
|||
/// </summary>
|
|||
[Description("工厂编码")] |
|||
[DBColumn(ColumnName = "supplier", DataType = DbType.String)] |
|||
public string supplier { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工厂名称
|
|||
/// </summary>
|
|||
[Description("工厂名称")] |
|||
[DBColumn(ColumnName = "supplierName", DataType = DbType.String)] |
|||
public string supplierName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 车型
|
|||
/// </summary>
|
|||
[Description("车型")] |
|||
[DBColumn(ColumnName = "vehicleType", DataType = DbType.String)] |
|||
public string vehicleType { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 零件号
|
|||
/// </summary>
|
|||
[Description("零件号")] |
|||
[DBColumn(ColumnName = "partNumber", DataType = DbType.String)] |
|||
public string partNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 零件名称
|
|||
/// </summary>
|
|||
[Description("零件名称")] |
|||
[DBColumn(ColumnName = "partName", DataType = DbType.String)] |
|||
public string partName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 配置
|
|||
/// </summary>
|
|||
[Description("配置")] |
|||
[DBColumn(ColumnName = "variance", DataType = DbType.String)] |
|||
public string variance { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工位
|
|||
/// </summary>
|
|||
[Description("工位")] |
|||
[DBColumn(ColumnName = "station", DataType = DbType.String)] |
|||
public string station { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 参数名称
|
|||
/// </summary>
|
|||
[Description("参数名称")] |
|||
[DBColumn(ColumnName = "parameter", DataType = DbType.String)] |
|||
public string parameter { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 下公差
|
|||
/// </summary>
|
|||
[Description("下公差")] |
|||
[DBColumn(ColumnName = "lower_limit", DataType = DbType.Double)] |
|||
public double lower_limit { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 上公差
|
|||
/// </summary>
|
|||
[Description("上公差")] |
|||
[DBColumn(ColumnName = "upper_limit", DataType = DbType.Double)] |
|||
public double upper_limit { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建时间
|
|||
/// </summary>
|
|||
[Description("创建时间")] |
|||
[DBColumn(ColumnName = "createdata", DataType = DbType.DateTime)] |
|||
public DateTime createdata { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建人员
|
|||
/// </summary>
|
|||
[Description("创建人员")] |
|||
[DBColumn(ColumnName = "creatauser", DataType = DbType.String)] |
|||
public string creatauser { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,57 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMAPP.Entity; |
|||
using QMFrameWork.Data.Attributes; |
|||
using System.Data; |
|||
|
|||
namespace QMAPP.FJC.Entity.CCParameters |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年01月16日
|
|||
///</summary>
|
|||
[DBTable(TableName = "T_DIM_SYSCONFIG", TimeStampColumn = "UPDATEDATE")] |
|||
public class SYSCONFIG : BaseEntity |
|||
{ |
|||
/////<summary>
|
|||
/////主键
|
|||
/////</summary>
|
|||
[DBColumn(ColumnName = "ID", DataType = DbType.String, IsKey = true)] |
|||
public string ID { get; set; } |
|||
|
|||
///<summary>
|
|||
///编码
|
|||
///</summary>
|
|||
[DBColumn(ColumnName = "CODE", DataType = DbType.String)] |
|||
public string CODE { get; set; } |
|||
|
|||
///<summary>
|
|||
///名称
|
|||
///</summary>
|
|||
[DBColumn(ColumnName = "NAME", DataType = DbType.String)] |
|||
public string NAME { get; set; } |
|||
|
|||
///<summary>
|
|||
///值
|
|||
///</summary>
|
|||
[DBColumn(ColumnName = "VALUE", DataType = DbType.String)] |
|||
public string VALUE { get; set; } |
|||
|
|||
///<summary>
|
|||
///备注
|
|||
///</summary>
|
|||
[DBColumn(ColumnName = "REMARK", DataType = DbType.String)] |
|||
public string REMARK { get; set; } |
|||
|
|||
///<summary>
|
|||
///类型
|
|||
///</summary>
|
|||
[DBColumn(ColumnName = "TYPE", DataType = DbType.String)] |
|||
public string TYPE { get; set; } |
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,212 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web.Mvc; |
|||
using QMAPP.Common.Web.Controllers; |
|||
using QMFrameWork.WebUI.Attribute; |
|||
using QMAPP.MD.Web.Models; |
|||
using QMFrameWork.Data; |
|||
using QMAPP.ServicesAgent; |
|||
using QMFrameWork.WebUI.DataSource; |
|||
using QMFrameWork.Common.Serialization; |
|||
using QMAPP.Entity; |
|||
using QMAPP.FJC.Entity; |
|||
using QMAPP.FJC.Entity.CCParameters; |
|||
using QMAPP.FJC.Web.Models.CCParameters; |
|||
|
|||
namespace QMAPP.FJC.Web.Controllers |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年02月06日
|
|||
///</summary>
|
|||
public class PARAMETERSCONFIGController : QController |
|||
{ |
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 加载列表
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HandleException] |
|||
public ActionResult List(bool? callBack) |
|||
{ |
|||
PARAMETERSCONFIGModel seachModel = new PARAMETERSCONFIGModel(); |
|||
if (callBack == true) |
|||
TryGetSelectBuffer<PARAMETERSCONFIGModel>(out seachModel); |
|||
seachModel.rownumbers = false; |
|||
seachModel.url = "/PARAMETERSCONFIG/GetList"; |
|||
return View("PARAMETERSCONFIGList", seachModel); |
|||
} |
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="callBack">是否回调</param>
|
|||
/// <returns>列表</returns>
|
|||
[HandleException] |
|||
public ActionResult GetList(bool? callBack) |
|||
{ |
|||
PARAMETERSCONFIGModel seachModel = null; |
|||
DataPage page = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
PARAMETERSCONFIG condition = null; |
|||
DataResult<DataPage> pageResult = new DataResult<DataPage>(); |
|||
|
|||
try |
|||
{ |
|||
//获取查询对象
|
|||
seachModel = GetModel<PARAMETERSCONFIGModel>(); |
|||
#region 获取缓存值
|
|||
if (callBack != null) |
|||
{ |
|||
TryGetSelectBuffer<PARAMETERSCONFIGModel>(out seachModel); |
|||
} |
|||
else |
|||
{ |
|||
//保存搜索条件
|
|||
SetSelectBuffer<PARAMETERSCONFIGModel>(seachModel); |
|||
} |
|||
#endregion
|
|||
//获取前台分页设置信息
|
|||
page = this.GetDataPage(seachModel); |
|||
condition = CopyToModel<PARAMETERSCONFIG, PARAMETERSCONFIGModel>(seachModel); |
|||
#region wcf服务统一接口
|
|||
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("PARAMETERSCONFIGBLL_GetList", condition, page); |
|||
if (pageResult.IsSuccess == false) |
|||
{ |
|||
SetMessage(pageResult.Msg); |
|||
return List(true); |
|||
} |
|||
DateGridResult<PARAMETERSCONFIG> result = new DateGridResult<PARAMETERSCONFIG>(); |
|||
result.Total = pageResult.Result.RecordCount; |
|||
result.Rows = JsonConvertHelper.GetDeserialize<List<PARAMETERSCONFIG>>(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() |
|||
{ |
|||
PARAMETERSCONFIGModel model = new PARAMETERSCONFIGModel(); |
|||
string ID = Request.Params["PID"]; |
|||
PARAMETERSCONFIG Entity = new PARAMETERSCONFIG(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<PARAMETERSCONFIG> result = new DataResult<PARAMETERSCONFIG>(); |
|||
try |
|||
{ |
|||
if (string.IsNullOrEmpty(ID) == false) |
|||
{ |
|||
//修改获取原数据
|
|||
Entity.pid = ID; |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<PARAMETERSCONFIG>>(QMAPP.ServicesAgent.B9BasicService.PARAMETERSCONFIGBLL_Get.ToString(), Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return View("PARAMETERSCONFIGEdit", model); |
|||
} |
|||
model = CopyToModel<PARAMETERSCONFIGModel, PARAMETERSCONFIG>(result.Result); |
|||
//根据工位信息获得工序信息
|
|||
|
|||
} |
|||
return View("PARAMETERSCONFIGEdit", model); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 保存
|
|||
/// <summary>
|
|||
/// 保存
|
|||
/// </summary>
|
|||
/// <param name="model"></param>
|
|||
/// <returns>处理结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
[ValidateInput(false)] |
|||
public ActionResult Save(PARAMETERSCONFIGModel saveModel) |
|||
{ |
|||
PARAMETERSCONFIG Entity = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
Entity = CopyToModel<PARAMETERSCONFIG, PARAMETERSCONFIGModel>(saveModel); |
|||
if (string.IsNullOrEmpty(Entity.pid) == true) |
|||
{ |
|||
//新增
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.B9BasicService.PARAMETERSCONFIGBLL_Insert.ToString(), Entity); |
|||
} |
|||
else |
|||
{ |
|||
//修改
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.B9BasicService.PARAMETERSCONFIGBLL_Update.ToString(), Entity); |
|||
} |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return View("PARAMETERSCONFIGEdit", 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(PARAMETERSCONFIGModel saveModel) |
|||
{ |
|||
string selectKey = Request.Form["selectKey"]; |
|||
PARAMETERSCONFIG Entity = null; |
|||
Entity = CopyToModel<PARAMETERSCONFIG, PARAMETERSCONFIGModel>(saveModel); |
|||
Entity.pid = selectKey; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("PARAMETERSCONFIGBLL_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,250 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web.Mvc; |
|||
using QMAPP.Common.Web.Controllers; |
|||
using QMFrameWork.WebUI.Attribute; |
|||
using QMAPP.MD.Web.Models; |
|||
using QMFrameWork.Data; |
|||
using QMAPP.ServicesAgent; |
|||
using QMFrameWork.WebUI.DataSource; |
|||
using QMFrameWork.Common.Serialization; |
|||
using QMAPP.Entity; |
|||
using QMAPP.FJC.Entity; |
|||
using QMAPP.FJC.Entity.CCParameters; |
|||
using QMAPP.FJC.Web.Models.CCParameters; |
|||
using System.Data; |
|||
|
|||
namespace QMAPP.FJC.Web.Controllers |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年02月06日
|
|||
///</summary>
|
|||
public class PARAMETERSController : QController |
|||
{ |
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 加载列表
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HandleException] |
|||
public ActionResult List(bool? callBack) |
|||
{ |
|||
PARAMETERSModel seachModel = new PARAMETERSModel(); |
|||
if (callBack == true) |
|||
TryGetSelectBuffer<PARAMETERSModel>(out seachModel); |
|||
seachModel.begintime = DateTime.Now.AddDays(-1); |
|||
seachModel.endtime = DateTime.Now; |
|||
seachModel.rownumbers = false; |
|||
seachModel.url = "/PARAMETERS/GetList"; |
|||
return View("PARAMETERSList", seachModel); |
|||
} |
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="callBack">是否回调</param>
|
|||
/// <returns>列表</returns>
|
|||
[HandleException] |
|||
public ActionResult GetList(bool? callBack) |
|||
{ |
|||
PARAMETERSModel seachModel = null; |
|||
DataPage page = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
PARAMETERS condition = null; |
|||
DataResult<DataPage> pageResult = new DataResult<DataPage>(); |
|||
|
|||
try |
|||
{ |
|||
//获取查询对象
|
|||
seachModel = GetModel<PARAMETERSModel>(); |
|||
#region 获取缓存值
|
|||
if (callBack != null) |
|||
{ |
|||
TryGetSelectBuffer<PARAMETERSModel>(out seachModel); |
|||
} |
|||
else |
|||
{ |
|||
//保存搜索条件
|
|||
SetSelectBuffer<PARAMETERSModel>(seachModel); |
|||
} |
|||
|
|||
#endregion
|
|||
//获取前台分页设置信息
|
|||
page = this.GetDataPage(seachModel); |
|||
condition = CopyToModel<PARAMETERS, PARAMETERSModel>(seachModel); |
|||
#region wcf服务统一接口
|
|||
|
|||
//pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("PARAMETERSBLL_GetList", condition, page);
|
|||
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>(QMAPP.ServicesAgent.B9BasicService.PARAMETERSBLL_GetList.ToString(), condition, page); |
|||
if (pageResult.IsSuccess == false) |
|||
{ |
|||
SetMessage(pageResult.Msg); |
|||
return List(true); |
|||
} |
|||
DateGridResult<PARAMETERS> result = new DateGridResult<PARAMETERS>(); |
|||
result.Total = pageResult.Result.RecordCount; |
|||
|
|||
result.Rows = JsonConvertHelper.GetDeserialize<List<PARAMETERS>>(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() |
|||
{ |
|||
PARAMETERSModel model = new PARAMETERSModel(); |
|||
string ID = Request.Params["PID"]; |
|||
PARAMETERS Entity = new PARAMETERS(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<PARAMETERS> result = new DataResult<PARAMETERS>(); |
|||
try |
|||
{ |
|||
if (string.IsNullOrEmpty(ID) == false) |
|||
{ |
|||
//修改获取原数据
|
|||
Entity.pid = ID; |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<PARAMETERS>>(QMAPP.ServicesAgent.B9BasicService.PARAMETERSBLL_Get.ToString(), Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return View("PARAMETERSEdit", model); |
|||
} |
|||
model = CopyToModel<PARAMETERSModel, PARAMETERS>(result.Result); |
|||
//根据工位信息获得工序信息
|
|||
|
|||
} |
|||
return View("PARAMETERSEdit", model); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 保存
|
|||
/// <summary>
|
|||
/// 保存
|
|||
/// </summary>
|
|||
/// <param name="model"></param>
|
|||
/// <returns>处理结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
[ValidateInput(false)] |
|||
public ActionResult Save(PARAMETERSModel saveModel) |
|||
{ |
|||
PARAMETERS Entity = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
Entity = CopyToModel<PARAMETERS, PARAMETERSModel>(saveModel); |
|||
if (string.IsNullOrEmpty(Entity.pid) == true) |
|||
{ |
|||
//新增
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.B9BasicService.PARAMETERSBLL_Insert.ToString(), Entity); |
|||
} |
|||
else |
|||
{ |
|||
//修改
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.B9BasicService.PARAMETERSBLL_Update.ToString(), Entity); |
|||
} |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return View("PARAMETERSEdit", 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(PARAMETERSModel saveModel) |
|||
{ |
|||
string selectKey = Request.Form["selectKey"]; |
|||
PARAMETERS Entity = null; |
|||
Entity = CopyToModel<PARAMETERS, PARAMETERSModel>(saveModel); |
|||
Entity.pid = selectKey; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("PARAMETERSBLL_Delete", selectKey); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return List(true); |
|||
} |
|||
SetMessage(AppResource.DeleteMessage); |
|||
return List(true); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 导出excel
|
|||
/// <summary>
|
|||
/// 导出excel
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HttpPost] |
|||
public ActionResult ExportExcel() |
|||
{ |
|||
PARAMETERSModel seachModel = null; |
|||
PARAMETERS condition = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<DataTable> result = new DataResult<DataTable>(); |
|||
string selectKey = Request.Form["selectKey"]; |
|||
try |
|||
{ |
|||
//获取查询对象
|
|||
seachModel = GetModel<PARAMETERSModel>(); |
|||
condition = CopyToModel<PARAMETERS, PARAMETERSModel>(seachModel); |
|||
//获取数据
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<DataTable>>(QMAPP.ServicesAgent.B9BasicService.PARAMETERSBLL_GetExportData.ToString(), condition); |
|||
|
|||
//导出
|
|||
QMFrameWork.WebUI.Util.IEFileTool efTool = new QMFrameWork.WebUI.Util.IEFileTool(); |
|||
return efTool.GetExcelFileResult("PARAMETERSExp", "加工信息.xlsx", result.Result); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,222 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web.Mvc; |
|||
using QMAPP.Common.Web.Controllers; |
|||
using QMFrameWork.WebUI.Attribute; |
|||
using QMAPP.MD.Web.Models; |
|||
using QMFrameWork.Data; |
|||
using QMAPP.ServicesAgent; |
|||
using QMFrameWork.WebUI.DataSource; |
|||
using QMFrameWork.Common.Serialization; |
|||
using QMAPP.Entity; |
|||
using QMAPP.FJC.Web.Models.CCParameters; |
|||
using QMAPP.FJC.Entity.CCParameters; |
|||
|
|||
namespace QMAPP.FJC.Web.Controllers |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年01月16日
|
|||
///</summary>
|
|||
public class SYSCONFIGController : QController |
|||
{ |
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 加载列表
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HandleException] |
|||
public ActionResult List(bool? callBack) |
|||
{ |
|||
SYSCONFIGModel seachModel = new SYSCONFIGModel(); |
|||
if (callBack == true) |
|||
TryGetSelectBuffer<SYSCONFIGModel>(out seachModel); |
|||
seachModel.rownumbers = false; |
|||
seachModel.url = "/SYSCONFIG/GetList"; |
|||
return View("SYSCONFIGList", seachModel); |
|||
} |
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="callBack">是否回调</param>
|
|||
/// <returns>列表</returns>
|
|||
[HandleException] |
|||
public ActionResult GetList(bool? callBack) |
|||
{ |
|||
SYSCONFIGModel seachModel = null; |
|||
DataPage page = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
SYSCONFIG condition = null; |
|||
DataResult<DataPage> pageResult = new DataResult<DataPage>(); |
|||
|
|||
try |
|||
{ |
|||
//获取查询对象
|
|||
seachModel = GetModel<SYSCONFIGModel>(); |
|||
#region 获取缓存值
|
|||
if (callBack != null) |
|||
{ |
|||
TryGetSelectBuffer<SYSCONFIGModel>(out seachModel); |
|||
} |
|||
else |
|||
{ |
|||
//保存搜索条件
|
|||
SetSelectBuffer<SYSCONFIGModel>(seachModel); |
|||
} |
|||
#endregion
|
|||
//获取前台分页设置信息
|
|||
page = this.GetDataPage(seachModel); |
|||
condition = CopyToModel<SYSCONFIG, SYSCONFIGModel>(seachModel); |
|||
#region wcf服务统一接口
|
|||
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("SYSCONFIGBLL_GetList", condition, page); |
|||
|
|||
if (pageResult.IsSuccess == false) |
|||
{ |
|||
SetMessage(pageResult.Msg); |
|||
return List(true); |
|||
} |
|||
DateGridResult<SYSCONFIG> result = new DateGridResult<SYSCONFIG>(); |
|||
result.Total = pageResult.Result.RecordCount; |
|||
result.Rows = JsonConvertHelper.GetDeserialize<List<SYSCONFIG>>(pageResult.Result.Result.ToString()); |
|||
|
|||
#endregion
|
|||
|
|||
string tempstr = ""; |
|||
tempstr = result.GetJsonSource(); |
|||
//using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"D:\ceshi\WriteLines.txt", true))
|
|||
//{
|
|||
// file.WriteLine(tempstr);
|
|||
// file.WriteLine("--------------------------------------------");
|
|||
// file.WriteLine(result.Rows);
|
|||
//}
|
|||
return Content(tempstr); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 编辑
|
|||
/// <summary>
|
|||
/// 编辑载入
|
|||
/// </summary>
|
|||
/// <returns>处理结果</returns>
|
|||
[HandleException] |
|||
public ActionResult Edit() |
|||
{ |
|||
SYSCONFIGModel model = new SYSCONFIGModel(); |
|||
string ID = Request.Params["ID"]; |
|||
SYSCONFIG Entity = new SYSCONFIG(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<SYSCONFIG> result = new DataResult<SYSCONFIG>(); |
|||
try |
|||
{ |
|||
if (string.IsNullOrEmpty(ID) == false) |
|||
{ |
|||
//修改获取原数据
|
|||
Entity.ID = ID; |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<SYSCONFIG>>(QMAPP.ServicesAgent.B9BasicService.SYSCONFIGBLL_Get.ToString(), Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return View("SYSCONFIGEdit", model); |
|||
} |
|||
model = CopyToModel<SYSCONFIGModel, SYSCONFIG>(result.Result); |
|||
//根据工位信息获得工序信息
|
|||
|
|||
} |
|||
return View("SYSCONFIGEdit", model); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 保存
|
|||
/// <summary>
|
|||
/// 保存
|
|||
/// </summary>
|
|||
/// <param name="model"></param>
|
|||
/// <returns>处理结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
[ValidateInput(false)] |
|||
public ActionResult Save(SYSCONFIGModel saveModel) |
|||
{ |
|||
SYSCONFIG Entity = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
Entity = CopyToModel<SYSCONFIG, SYSCONFIGModel>(saveModel); |
|||
if (string.IsNullOrEmpty(Entity.ID) == true) |
|||
{ |
|||
//新增
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.B9BasicService.SYSCONFIGBLL_Insert.ToString(), Entity); |
|||
} |
|||
else |
|||
{ |
|||
//修改
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.B9BasicService.SYSCONFIGBLL_Update.ToString(), Entity); |
|||
} |
|||
|
|||
//修改
|
|||
//result = wcfAgent.InvokeServiceFunction<DataResult<int>>(QMAPP.ServicesAgent.B9BasicService.SYSCONFIGBLL_Update.ToString(), Entity);
|
|||
|
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return View("SYSCONFIGEdit", 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(SYSCONFIGModel saveModel) |
|||
{ |
|||
string selectKey = Request.Form["selectKey"]; |
|||
SYSCONFIG Entity = null; |
|||
Entity = CopyToModel<SYSCONFIG, SYSCONFIGModel>(saveModel); |
|||
Entity.ID = selectKey; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("SYSCONFIGBLL_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,137 @@ |
|||
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.CCParameters |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年02月06日
|
|||
///</summary>
|
|||
public class PARAMETERSCONFIGModel : QDGModel |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
[Description("主键")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] |
|||
[InputType(inputType.hidden)] |
|||
[DGColumn(Hidden = true, PrimaryKey = true)] |
|||
public string pid { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工厂编码
|
|||
/// </summary>
|
|||
[Description("工厂编码")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] //输入框类型
|
|||
[DGColumn(frozenColumns = true, Sortable = false, Width = 100, DataAlign = DataAlign.center)] |
|||
public string supplier { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工厂名称
|
|||
/// </summary>
|
|||
[Description("工厂名称")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 250, DataAlign = DataAlign.center)] |
|||
public string supplierName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 车型
|
|||
/// </summary>
|
|||
[Description("车型")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 80, DataAlign = DataAlign.center)] |
|||
public string vehicleType { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 零件号
|
|||
/// </summary>
|
|||
[Description("零件号")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 140, DataAlign = DataAlign.center)] |
|||
public string partNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 零件名称
|
|||
/// </summary>
|
|||
[Description("零件名称")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 140, DataAlign = DataAlign.center)] |
|||
public string partName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 配置
|
|||
/// </summary>
|
|||
[Description("配置")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 140, DataAlign = DataAlign.center)] |
|||
public string variance { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工位
|
|||
/// </summary>
|
|||
[Description("工位")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 140, DataAlign = DataAlign.center)] |
|||
public string station { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 参数名称
|
|||
/// </summary>
|
|||
[Description("参数名称")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 140, DataAlign = DataAlign.center)] |
|||
public string parameter { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 下公差
|
|||
/// </summary>
|
|||
[Description("下公差")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)] |
|||
public double lower_limit { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 上公差
|
|||
/// </summary>
|
|||
[Description("上公差")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)] |
|||
public double upper_limit { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 创建时间
|
|||
/// </summary>
|
|||
[Description("创建时间")] |
|||
[HTMLInput(UpdateRead = true, MaxLength = 20)] |
|||
[InputType(inputType.hidden)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")] |
|||
public DateTime createdata { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建人员
|
|||
/// </summary>
|
|||
[Description("创建人员")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)] |
|||
public string creatauser { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,172 @@ |
|||
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.CCParameters |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年02月06日
|
|||
///</summary>
|
|||
public class PARAMETERSModel : QDGModel |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
[Description("主键")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] |
|||
[InputType(inputType.hidden)] |
|||
[DGColumn(Hidden = true, PrimaryKey = true)] |
|||
public string pid { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工厂编码
|
|||
/// </summary>
|
|||
[Description("工厂编码")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] //输入框类型
|
|||
[DGColumn(frozenColumns = true, Sortable = false, Width = 80, DataAlign = DataAlign.center)] |
|||
public string supplier { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工厂名称
|
|||
/// </summary>
|
|||
[Description("工厂名称")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 250, DataAlign = DataAlign.center)] |
|||
public string supplierName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 车型
|
|||
/// </summary>
|
|||
[Description("车型")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 80, DataAlign = DataAlign.center)] |
|||
public string vehicleType { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 零件号
|
|||
/// </summary>
|
|||
[Description("零件号")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 140, DataAlign = DataAlign.center)] |
|||
public string partNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 零件名称
|
|||
/// </summary>
|
|||
[Description("零件名称")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 140, DataAlign = DataAlign.center)] |
|||
public string partName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 配置
|
|||
/// </summary>
|
|||
[Description("配置")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)] |
|||
public string variance { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工位
|
|||
/// </summary>
|
|||
[Description("工位")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)] |
|||
public string station { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 加工时间
|
|||
/// </summary>
|
|||
[Description("加工时间")] |
|||
[HTMLInput(UpdateRead = true, MaxLength = 20)] |
|||
[InputType(inputType.hidden)] |
|||
[DGColumn(Sortable = false, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")] |
|||
public DateTime processTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 参数名称
|
|||
/// </summary>
|
|||
[Description("参数名称")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 140, DataAlign = DataAlign.center)] |
|||
public string parameter { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 参数值
|
|||
/// </summary>
|
|||
[Description("参数值")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)] |
|||
public string value { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 下公差
|
|||
/// </summary>
|
|||
[Description("下公差")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)] |
|||
public double lower_limit { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 上公差
|
|||
/// </summary>
|
|||
[Description("上公差")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)] |
|||
public double upper_limit { 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 inTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 开始时间
|
|||
/// </summary>
|
|||
[Description("开始时间")] |
|||
[HTMLInput(UpdateRead = true, MaxLength = 20)] |
|||
[InputType(inputType.dateTimeBox)] |
|||
[DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss", Hidden = true)] |
|||
public DateTime begintime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 结束时间
|
|||
/// </summary>
|
|||
[Description("结束时间")] |
|||
[HTMLInput(UpdateRead = true, MaxLength = 20)] |
|||
[InputType(inputType.dateTimeBox)] |
|||
[DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss",Hidden = true)] |
|||
public DateTime endtime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 责任人
|
|||
/// </summary>
|
|||
[Description("责任人")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)] |
|||
public string BTV { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,80 @@ |
|||
using System; |
|||
using System.Web.Mvc.Html; |
|||
using QMFrameWork.WebUI; |
|||
using QMFrameWork.WebUI.Attribute; |
|||
using System.Web.Mvc; |
|||
namespace QMAPP.FJC.Web.Models.CCParameters |
|||
{ |
|||
/// <summary>
|
|||
/// 作 用:加工参数采集
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2023年01月16日
|
|||
///</summary>
|
|||
public class SYSCONFIGModel : QDGModel |
|||
{ |
|||
/////<summary>
|
|||
///// ID
|
|||
/////</summary>
|
|||
[Description("ID")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 2)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center, PrimaryKey = true, Hidden = true)] |
|||
public string ID { get; set; } |
|||
|
|||
///<summary>
|
|||
/// 编码
|
|||
///</summary>
|
|||
[Description("编码")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 50)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 300, DataAlign = DataAlign.center)] |
|||
public string CODE { get; set; } |
|||
|
|||
|
|||
///<summary>
|
|||
/// 名称
|
|||
///</summary>
|
|||
[Description("名称")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 30)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] |
|||
public string NAME { get; set; } |
|||
|
|||
|
|||
///<summary>
|
|||
/// 值
|
|||
///</summary>
|
|||
[Description("值")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 50)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = true, Sortable = true, Width = 300, DataAlign = DataAlign.center)] |
|||
public string VALUE { get; set; } |
|||
|
|||
|
|||
///<summary>
|
|||
/// 类型
|
|||
///</summary>
|
|||
[Description("类型")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 50)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 200, DataAlign = DataAlign.center)] |
|||
public string TYPE { get; set; } |
|||
|
|||
|
|||
///<summary>
|
|||
/// 备注
|
|||
///</summary>
|
|||
[Description("备注")] |
|||
[HTMLInput(UpdateRead = false, required = true, MaxLength = 50)] |
|||
[InputType(inputType.text)] |
|||
[DGColumn(frozenColumns = false, Sortable = true, Width = 200, DataAlign = DataAlign.center)] |
|||
public string REMARK { get; set; } |
|||
|
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,130 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.CCParameters.PARAMETERSCONFIGModel>" %> |
|||
|
|||
<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"> |
|||
<%=Html.QV(p=>p.supplier) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.supplier)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p=>p.supplierName) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.supplierName)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.vehicleType)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.vehicleType)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.partNumber)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.partNumber)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.partName)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.partName)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.variance)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.variance)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.station)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.station)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.parameter)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.parameter)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.lower_limit)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.lower_limit)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.upper_limit)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.upper_limit)%> |
|||
</td> |
|||
</tr> |
|||
|
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<%=Html.HiddenFor(p => p.pid)%> |
|||
<%=Html.HiddenFor(p => p.createdata)%> |
|||
<%=Html.HiddenFor(p => p.creatauser)%> |
|||
<%=Html.QPEnd() %> |
|||
<script type="text/javascript"> |
|||
|
|||
function Save() { |
|||
if (isValidate() == false) { |
|||
return false; |
|||
} |
|||
submitByButton("Save"); |
|||
} |
|||
|
|||
$(function () { |
|||
|
|||
$('#FACTORY_CODE').combobox({ |
|||
panelWidth: '350' |
|||
|
|||
}); |
|||
|
|||
}); |
|||
</script> |
|||
</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> |
|||
</asp:Content> |
@ -0,0 +1,116 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.CCParameters.PARAMETERSModel>" %> |
|||
<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.vehicleType) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.vehicleType)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p=>p.station) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.station)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p=>p.parameter) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.parameter)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p=>p.begintime) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.begintime)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p=>p.endtime) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.endtime)%> |
|||
</td> |
|||
</tr> |
|||
|
|||
</table> |
|||
<div style="left: 1px; position: relative;"></div> |
|||
|
|||
<%=Html.QPEnd()%> |
|||
<%=Html.QPList() %> |
|||
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.CCParameters.PARAMETERSModel>(Model)%> |
|||
<%=Html.QPEnd() %> |
|||
<%=Html.Hidden("PID")%> |
|||
<%=Html.Hidden("selectKey")%> |
|||
<script language="javascript" type="text/javascript"> |
|||
//导出 |
|||
function Export() { |
|||
document.getElementById("selectKey").value = getSelectKey(); |
|||
submitByButton("ExportExcel"); |
|||
} |
|||
//添加 |
|||
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("PARAMETERS", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%-- <%=Html.QTButtonAdd("PARAMETERS", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButtonUpdate("PARAMETERS", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButtonDelete("PARAMETERS", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>--%> |
|||
<%=Html.QTButton("export", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "Export()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</asp:Content> |
|||
|
@ -0,0 +1,130 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.CCParameters.PARAMETERSCONFIGModel>" %> |
|||
|
|||
<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"> |
|||
<%=Html.QV(p=>p.supplier) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.supplier)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p=>p.supplierName) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.supplierName)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.vehicleType)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.vehicleType)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.partNumber)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.partNumber)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.partName)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.partName)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.variance)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.variance)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.station)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.station)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.parameter)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.parameter)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.lower_limit)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.lower_limit)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.upper_limit)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.upper_limit)%> |
|||
</td> |
|||
</tr> |
|||
|
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<%=Html.HiddenFor(p => p.pid)%> |
|||
<%=Html.HiddenFor(p => p.createdata)%> |
|||
<%=Html.HiddenFor(p => p.creatauser)%> |
|||
<%=Html.QPEnd() %> |
|||
<script type="text/javascript"> |
|||
|
|||
function Save() { |
|||
if (isValidate() == false) { |
|||
return false; |
|||
} |
|||
submitByButton("Save"); |
|||
} |
|||
|
|||
$(function () { |
|||
|
|||
$('#FACTORY_CODE').combobox({ |
|||
panelWidth: '350' |
|||
|
|||
}); |
|||
|
|||
}); |
|||
</script> |
|||
</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> |
|||
</asp:Content> |
@ -0,0 +1,98 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.CCParameters.PARAMETERSCONFIGModel>" %> |
|||
<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.vehicleType) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.vehicleType)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p=>p.station) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.station)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p=>p.parameter) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.parameter)%> |
|||
</td> |
|||
</tr> |
|||
|
|||
</table> |
|||
<div style="left: 1px; position: relative;"></div> |
|||
|
|||
<%=Html.QPEnd()%> |
|||
<%=Html.QPList() %> |
|||
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.CCParameters.PARAMETERSCONFIGModel>(Model)%> |
|||
<%=Html.QPEnd() %> |
|||
<%=Html.Hidden("PID")%> |
|||
<%=Html.Hidden("selectKey")%> |
|||
<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("PARAMETERSCONFIG", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButtonAdd("PARAMETERSCONFIG", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButtonUpdate("PARAMETERSCONFIG", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButtonDelete("PARAMETERSCONFIG", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</asp:Content> |
|||
|
@ -0,0 +1,88 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.CCParameters.SYSCONFIGModel>" %> |
|||
|
|||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> |
|||
货架信息编辑 |
|||
</asp:Content> |
|||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> |
|||
<%=Html.QPEdit("货架信息编辑", string.IsNullOrEmpty(Model.ID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%> |
|||
<table id="editTable" cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td> |
|||
<table> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p=>p.CODE) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.CODE)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p=>p.NAME) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.NAME)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.VALUE)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.VALUE)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.TYPE)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.TYPE)%> |
|||
</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.ID)%> |
|||
<%=Html.QPEnd() %> |
|||
<script type="text/javascript"> |
|||
|
|||
function Save() { |
|||
if (isValidate() == false) { |
|||
return false; |
|||
} |
|||
submitByButton("Save"); |
|||
} |
|||
|
|||
$(function () { |
|||
|
|||
$('#FACTORY_CODE').combobox({ |
|||
panelWidth: '350' |
|||
|
|||
}); |
|||
|
|||
}); |
|||
</script> |
|||
</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> |
|||
</asp:Content> |
@ -0,0 +1,87 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.CCParameters.SYSCONFIGModel>" %> |
|||
<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.CODE) %> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.CODE)%> |
|||
</td> |
|||
|
|||
</tr> |
|||
|
|||
</table> |
|||
<div style="left: 1px; position: relative;"></div> |
|||
|
|||
<%=Html.QPEnd()%> |
|||
<%=Html.QPList() %> |
|||
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.CCParameters.SYSCONFIGModel>(Model)%> |
|||
<%=Html.QPEnd() %> |
|||
<%=Html.Hidden("CODE")%> |
|||
<%=Html.Hidden("selectKey")%> |
|||
<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?ID=' + 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("SYSCONFIG", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButtonAdd("SYSCONFIG", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButtonUpdate("SYSCONFIG", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButtonDelete("SYSCONFIG", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</asp:Content> |
|||
|
Loading…
Reference in new issue