/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TPC_PLAN_ROLL GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,N_STATUS,C_ORDER_ID,C_ORDER_NO,N_WGT,C_MAT_CODE,C_MAT_NAME,C_SPEC,C_STL_GRD,C_STD_CODE,N_USER_LEV,N_STL_GRD_LEV,C_ORDER_LEV,C_QUALIRY_LEV,D_NEED_DT,D_DELIVERY_DT,D_DT,C_LINE_DESC,C_LINE_CODE,D_P_START_TIME,D_P_END_TIME,N_PROD_TIME,N_SORT,N_ROLL_PROD_WGT,C_ROLL_PROD_EMP_ID,C_STL_ROL_DT,C_CUST_NO,C_CUST_NAME,C_PACK,C_DESIGN_NO,C_LINT_ID,D_START_TIME,D_END_TIME,C_EMP_ID,D_MOD_DT,N_MACH_WGT,C_FREE_TERM,C_FREE_TERM2,C_AREA,C_PCLX,C_RH,C_LF,C_KP,N_HL_TIME,C_HL,N_DFP_HL_TIME,C_DFP_HL,C_XM,C_ROUTE,N_DIAMETER,C_XM_YQ,N_JRL_WD,N_JRL_SJ from TPC_PLAN_ROLL "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TPC_PLAN_ROLL model = new Mod_TPC_PLAN_ROLL(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TMB_AREAMAX GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_CODE,C_NAME,C_REMARK,N_STATUS,C_EMP_ID,C_EMP_NAME,D_MOD_DT from TMB_AREAMAX "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TMB_AREAMAX model = new Mod_TMB_AREAMAX(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TRC_ROLL_STORAGE_LOG GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_TRC_ROLL_MAIN_ID,C_STOVE,C_BATCH_NO,C_TICK_NO,C_STL_GRD,N_WGT,C_STD_CODE,C_MOVE_TYPE,C_SPEC,C_SHIFT,C_GROUP,C_MAT_CODE,C_MAT_DESC,C_LINEWH_CODE_BEFORE,C_LINEWH_AREA_CODE_BEFORE,C_LINEWH_LOC_CODE_BEFORE,C_FLOOR_BEFORE,D_STORAGE_DT,C_LINEWH_CODE_AFTER,C_LINEWH_AREA_CODE_AFTER,C_LINEWH_LOC_CODE_AFTER,C_FLOOR_AFTER,C_SALE_AREA,C_TRANSPORTATION,C_EMP_ID,D_MOD_DT,N_STATUS from TRC_ROLL_STORAGE_LOG "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TRC_ROLL_STORAGE_LOG model = new Mod_TRC_ROLL_STORAGE_LOG(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TQB_PHYSICS_QUALITATIVE GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_PHYSICS_GROUP_ID,C_CHARACTER_ID,C_NAME,N_STATUS,C_REMARK,C_EMP_ID,D_MOD_DT,C_RESULT from TQB_PHYSICS_QUALITATIVE "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TQB_PHYSICS_QUALITATIVE model = new Mod_TQB_PHYSICS_QUALITATIVE(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TRC_WARM_FURNACE_LOG GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_BATCH_NO,N_QUA_JOIN,N_WGT_JOIN,C_TRC_ROLL_MAIN_ID,N_ROLL_STATE,D_MOD_DT,C_EMP_ID,C_STA_ID,N_TYPE,C_SHIFT,C_GROUP,N_QUA_EXIT,N_WGT_EXIT,C_SLAB_MAIN_ID,C_STOVE,N_LEN,C_MAT_CODE,C_MAT_NAME from TRC_WARM_FURNACE_LOG "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TRC_WARM_FURNACE_LOG model = new Mod_TRC_WARM_FURNACE_LOG(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TRC_ROLL_PDD_ITEM GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_YSDH,C_MATCODE,C_PCH,C_SX,C_ZCSL,C_FZCZL,C_FREE0,C_FREE1,C_FREE2,C_FREE3,C_FREE4,C_ID,D_INSERT,C_REMARK,N_STATUS,C_CK,C_MATDESC,C_SPEC,C_STL_GRD,C_NC_SL,C_NC_ZL,C_CAP_SL,C_CAP_ZL,C_RF_SL,C_RF_ZL,C_RF_SJ_SL,C_RF_SJ_ZL,C_NC_CAP_SL,C_NC_CAP_ZL,C_RF_CAP_SL,C_RF_CAP_ZL,C_CAP_SJ_SL,C_CAP_SJ_ZL from TRC_ROLL_PDD_ITEM "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TRC_ROLL_PDD_ITEM model = new Mod_TRC_ROLL_PDD_ITEM(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TRC_ENERGY_RECORD GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,N_CONSUMPTION,C_SHIFT,C_GROUP,C_ENERGY_KIND,D_RECODE_DT,C_STA_CODE,N_STATUS,C_EMP_ID,D_MOD_DT,C_SH_EMP_ID,D_SH_MOD_DT,C_UNIT,C_REMARK,C_PRO_CODE from TRC_ENERGY_RECORD "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TRC_ENERGY_RECORD model = new Mod_TRC_ENERGY_RECORD(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TB_PLAN_OPERATION_LOG GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_OPERATION,C_FUNCTION,D_MOD_DT,C_EMP_ID,C_CP_IP,C_CP_NAME,C_ORDER_NO,C_PLAN_ID from TB_PLAN_OPERATION_LOG "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TB_PLAN_OPERATION_LOG model = new Mod_TB_PLAN_OPERATION_LOG(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TPP_INITIALIZE_STA GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_STA_ID,C_EMP_ID,D_MOD_DT,C_REMARK,N_PRODUCIBILITY_TIME,N_IMPACT_TIME,N_CAPACITY,C_PRO_CODE,C_INITIALIZE_ITEM_ID,N_WGT,C_STA_DESC,C_PRO_ID,D_START_TIME,D_END_TIME from TPP_INITIALIZE_STA "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TPP_INITIALIZE_STA model = new Mod_TPP_INITIALIZE_STA(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TB_STA GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("SELECT * from TB_STA "); strSql.Append(" WHERE C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TB_STA model = new Mod_TB_STA(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TB_STA GetModelByCODE(string C_STA_CODE) { StringBuilder strSql = new StringBuilder(); strSql.Append("SELECT C_ID,C_PRO_ID,C_STA_CODE,C_STA_DESC,C_EMP_ID,D_MOD_DT,C_REMARK,D_START_DATE,D_END_DATE,N_STATUS,C_STA_ERPCODE,C_ERP_PK,C_SSBMID,C_STA_MESCODE,N_SORT from TB_STA "); strSql.Append(" WHERE N_STATUS=1 and C_STA_CODE=:C_STA_CODE "); OracleParameter[] parameters = { new OracleParameter(":C_STA_CODE", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_STA_CODE; Mod_TB_STA model = new Mod_TB_STA(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TRP_PLAN_REASON GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_PLAN_ROLL_ID,C_ORDER_NO,C_STL_GRD,C_STD_CODE,C_SPEC,C_REASON,N_STATUS,C_EMP_ID,D_MOD_DT from TRP_PLAN_REASON "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TRP_PLAN_REASON model = new Mod_TRP_PLAN_REASON(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 获取钢种信息 /// </summary> public DataTable GetSlabMainInfoKp(string id) { string query1 = @"SELECT T.C_SLAB_MAIN_ID C_SLAB_MAIN_ID from TRC_COGDOWN_MAIN_ITEM t WHERE T.C_COGDOWN_MAIN_ID='" + id + "'"; DataTable dt = DbHelperOra.Query(query1).Tables[0]; DataTable dt2 = new DataTable(); if (dt != null && dt.Rows.Count > 0) { string query2 = @"SELECT T.C_MAT_CODE ,SUM(T.N_WGT)N_WGT ,COUNT(T.C_ID)N_QUA ,C_STOVE ,T.C_STL_GRD ,T.C_STD_CODE ,T.C_BATCH_NO ,MAX(T.C_SLABWH_CODE) C_SLABWH_CODE ,MAX(T.C_ZYX1) C_ZYX1 ,MAX(T.C_ZYX2)C_ZYX2 FROM TSC_SLAB_MAIN T where 1=1 AND ( "; for (int i = 0; i < dt.Rows.Count; i++) { if (i == dt.Rows.Count - 1) { query2 += " T.C_ID='" + dt.Rows[i]["C_SLAB_MAIN_ID"].ToString() + "'"; } else { query2 += " T.C_ID= '" + dt.Rows[i]["C_SLAB_MAIN_ID"].ToString() + "' OR "; } } query2 += " ) GROUP BY T.C_MAT_CODE,T.C_STOVE,T.C_STL_GRD,T.C_STD_CODE,T.C_BATCH_NO "; dt2 = DbHelperOra.Query(query2).Tables[0]; } return(dt2); }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TQC_RATING_PROCESS_ITEM GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_BATCH_NO,C_STL_GRD,C_STD_CODE,C_NAME,C_TYPE,C_LEVEL,C_REMARK,N_STATUS,C_EMP_ID,D_MOD_DT from TQC_RATING_PROCESS_ITEM "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TQC_RATING_PROCESS_ITEM model = new Mod_TQC_RATING_PROCESS_ITEM(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TRC_PLAN_REGROUND_HANDLER GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_REGROUND_ID,C_REGROUND_ITEM_ID,C_EMP_NAME,D_DT,C_STA_ID,C_XMBZ,N_TOTAL_QUA,N_QUA,C_BATCH_NO,C_REMARK,C_QUALITY,C_HW,C_HG,C_CAUSE,N_NOT_QUA,C_SHIFT,C_GROUP,N_STATUS,N_STEP,C_STEPNAME,C_GRINDING_WHEEL from TRC_PLAN_REGROUND_HANDLER "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TRC_PLAN_REGROUND_HANDLER model = new Mod_TRC_PLAN_REGROUND_HANDLER(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TQC_SPECIFIC_CONTENT_LOG GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_BATCH_NO,C_CONTENT,C_TICK_NO,N_STATUS,C_REMARK,C_EMP_ID,D_MOD_DT from TQC_SPECIFIC_CONTENT_LOG "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TQC_SPECIFIC_CONTENT_LOG model = new Mod_TQC_SPECIFIC_CONTENT_LOG(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TRC_ROLL_TIME GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_STA_ID,C_RQ,N_NUM_GRD,N_NUM_SPEC,C_TIME_SPEC from TRC_ROLL_TIME "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TRC_ROLL_TIME model = new Mod_TRC_ROLL_TIME(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TQB_DESIGN_ITEM_LOG GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_DESIGN_ID,C_CHARACTER_ID,C_TARGET_MIN,C_TARGET_INTERVAL,C_TARGET_MAX,C_PREWARNING_VALUE,C_TYPE,C_IS_DECIDE,C_IS_PRINT,N_PRINT_ORDER,N_SPEC_MIN,C_SPEC_INTERVAL,N_SPEC_MAX,C_FORMULA,C_UNIT,N_DIGIT,C_QUANTITATIVE,C_TEST_TEM,C_TEST_CONDITION,N_STATUS,C_REMARK,C_EMP_ID,D_MOD_DT from TQB_DESIGN_ITEM_LOG "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TQB_DESIGN_ITEM_LOG model = new Mod_TQB_DESIGN_ITEM_LOG(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TQC_ZZS_INFO GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_FYDH,C_BATCH_NO,C_STOVE,C_SPEC,C_STL_GRD,C_STD_CODE,D_CKSJ,N_JZ,N_NUM,C_CH,C_PDF_NAME,C_PDF_PATCH,N_PRINT_NUM,C_ZSH,C_QZR,D_QZRQ,C_BY1,C_BY2,C_BY3,N_STATUS,C_REMARK from TQC_ZZS_INFO "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TQC_ZZS_INFO model = new Mod_TQC_ZZS_INFO(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TQC_RECHECK GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_PHYSICS_CODE,C_PHYSICS_NAME,C_CHARACTER_ID,C_STOVE,C_BATCH_NO,C_STL_GRD,C_SPEC,C_STD_CODE,C_ITEM_NAME,C_SHIFT,C_GROUP,C_STA_ID,C_DISPOSAL,N_STATUS,C_REMARK,C_EMP_ID,D_MOD_DT,N_NUMBER,N_IS_QR,C_QR_USER_ID,D_QR_MOD,C_TICK_NO,N_RECHECK,C_ZZ_USER_ID,D_ZZ_MOD,C_ZZJG from TQC_RECHECK "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TQC_RECHECK model = new Mod_TQC_RECHECK(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TPA_ROLL_PLAN GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_LINE,C_STL_GRD,C_STD_CODE,C_SPEC,N_WGT,D_PLAN_DATE,D_NEED_DATE,C_REMARK from TPA_ROLL_PLAN "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 50) }; parameters[0].Value = C_ID; Mod_TPA_ROLL_PLAN model = new Mod_TPA_ROLL_PLAN(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TRC_ROLL_LOG GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_TRC_ROLL_MAIN_ID,C_TRC_PLAN_ROLL_ID,N_QUA_TOTAL,N_WGT_TOTAL,C_SHIFT,C_GROUP,N_ROLL_STATE,C_REMARK,D_MOD_DT,N_QUA_REMOVE,N_WGT_REMOVE,N_QUA_RETRUN,N_WGT_RETRUN,N_QUA_JOIN,N_WGT_JOIN,N_QUA_EXIT,N_WGT_EXIT,N_QUA_CPHALF,N_WGT_HALF,N_QUA_CPWHOLE,N_QUA_ELIM,N_WGT_ELIM,C_EMP_ID,N_STATUS,N_ORDER,N_QUA_SL,N_QUA_HG,N_WGT_SL,N_WGT_HG,C_LOG_ID,C_BATCH_NO from TRC_ROLL_LOG "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TRC_ROLL_LOG model = new Mod_TRC_ROLL_LOG(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TQB_STD_MAIN GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_STD_TYPE,C_STD_CODE,C_STD_DESC,C_STL_GRD,C_PROD_NAME,C_PROD_KIND,C_USES,n_EDIT_NUM,C_EDITION,C_IS_LF,C_IS_RH,C_IS_HL,C_IS_XM,C_IRON_REQUIRE,C_STOCK_REQUIRE,C_DELIVERY_STATE,C_PHYSICS_TIME,N_IS_CHECK,N_STATUS,C_REMARK,C_EMP_ID,D_MOD_DT,C_IS_BXG from TQB_STD_MAIN "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TQB_STD_MAIN model = new Mod_TQB_STD_MAIN(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 获得数据列表 /// </summary> public DataSet GetList(string planid, string zpid, string order, string N_STATUS) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_TRC_ROLL_MAIN_ID,C_TRC_PLAN_ROLL_ID,N_QUA_TOTAL,N_WGT_TOTAL,C_SHIFT,C_GROUP,N_ROLL_STATE,C_REMARK,D_MOD_DT,N_QUA_REMOVE,N_WGT_REMOVE,N_QUA_RETRUN,N_WGT_RETRUN,N_QUA_JOIN,N_WGT_JOIN,N_QUA_EXIT,N_WGT_EXIT,N_QUA_CPHALF,N_WGT_HALF,N_QUA_CPWHOLE,N_QUA_ELIM,N_WGT_ELIM,C_EMP_ID,N_STATUS,N_ORDER,C_BATCH_NO "); strSql.Append(" FROM TRC_ROLL_LOG WHERE 1=1 "); if (N_STATUS.Trim() != "") { strSql.Append(" AND N_STATUS='" + N_STATUS + "'"); } if (planid.Trim() != "") { strSql.Append(" AND C_TRC_PLAN_ROLL_ID='" + planid + "'"); } if (zpid.Trim() != "") { strSql.Append(" AND C_TRC_ROLL_MAIN_ID='" + zpid + "'"); } if (order.Trim() != "") { strSql.Append(" AND N_ORDER='" + order + "'"); } return(DbHelperOra.Query(strSql.ToString())); }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TS_USER GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_NAME,C_ACCOUNT,C_PASSWORD,C_EMAIL,C_MOBILE,N_TYPE,N_STATUS,C_DESC,D_LASTLOGINTIME,C_EMP_ID,C_EMP_NAME,D_MOD_DT,C_MOBILE2,C_PHONE,C_SHORTNAME,C_CUST_ID,C_TOKEN_ID,C_CJNAME,C_CJINTRO,C_STL_GRD,C_LEGALREPRES,C_CGJCR,C_JOB,C_JCTEL,C_ADDRESS,C_AREA,C_MANAGER from TS_USER "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TS_USER model = new Mod_TS_USER(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TQC_RESULT_MAIN_ZJB GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,C_BATCH_NO,C_TICK_NO,C_STL_GRD,C_SPEC,C_EMP_ID,D_MOD_DT,C_EMP_ID_ZY,D_MOD_DT_ZY,C_EMP_ID_JS,D_MOD_DT_JS,C_PHYSICS_GROUP_ID,C_CHECK_STATE,N_RECHECK,N_STATUS,C_REMARK,C_DISPOSAL ,C_QRZT,C_ITEM_NAME from TQC_RESULT_MAIN_ZJB "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2, 100) }; parameters[0].Value = C_ID; Mod_TQC_RESULT_MAIN_ZJB model = new Mod_TQC_RESULT_MAIN_ZJB(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Mod_TB_CONFIG_LIMIT GetModel(string C_ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select C_ID,N_SECTION_MIN,N_SECTION_MAX,N_NUM,C_EMP_ID from TB_CONFIG_LIMIT "); strSql.Append(" where C_ID=:C_ID "); OracleParameter[] parameters = { new OracleParameter(":C_ID", OracleDbType.Varchar2) }; parameters[0].Value = C_ID; Mod_TB_CONFIG_LIMIT model = new Mod_TB_CONFIG_LIMIT(); DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
public List <LWSTripsInfo> GetForecastTrips(DateTime dt) //后推两小时 { List <LWSTripsInfo> newList = null; try { dt = DateTime.Parse(dt.ToString("yyyy-MM-dd HH:") + ((dt.Minute / 6) * 6)); DateTime dtStar = dt.AddMinutes(-105); DateTime dtEnd = dt.AddMinutes(138); String dtStart = dtStar.ToString("yyyy/M/dd HH:mm:ss"); String dtend = dtEnd.ToString("yyyy/M/dd HH:mm:ss"); string SQL = "select DDATETIME,CITY,W_TYPE,W_LEVEL from t_hk_warning t where DDATETIME between to_date('" + dtStart + "','yyyy-mm-dd hh24:mi:ss') and to_date('" + dtend + "','yyyy-mm-dd hh24:mi:ss')"; DataTable dbResult = DbHelperOra.Query(SQL, CommonClass.GetconnectionStringsValue("ConnectionEJETDB247Idcty")).Tables[0]; LWSTripsInfo info; if (dbResult != null && dbResult.Rows.Count > 0) { newList = new List <LWSTripsInfo>(); DateTime dt2 = DateTime.Parse("2000-1-1"); //int d0 = 0; for (int i = 0; i < dbResult.Rows.Count; i++) { info = new LWSTripsInfo(); dt2 = DateTime.Parse("2000-1-1"); if (!DateTime.TryParse(dbResult.Rows[i]["DDATETIME"].ToString(), out dt2)) { continue; } info.DDATETIME = dt2; //d0 = 0; info.W_TYPE = dbResult.Rows[i]["W_TYPE"].ToString(); info.CITY = dbResult.Rows[i]["CITY"].ToString(); info.W_LEVEL = dbResult.Rows[i]["W_LEVEL"].ToString(); //int.TryParse(dbResult.Rows[i]["flagindex"].ToString(), out d0); //info.FlagIndex = d0; //dt2 = DateTime.Parse("2000-1-1"); //if (!DateTime.TryParse(dbResult.Rows[i]["FORECASTTIME"].ToString(), out dt2)) continue; //info.DDateTime = dt2; //info.DDateTimestr = dt2.ToString("yyyy-MM-dd HH:mm:ss"); ////if (info.DDateTime > Convert.ToDateTime("2015-06-10 00:00:00")) ////{ //// if (info.FlagIndex == 6 || info.FlagIndex == 7 || info.FlagIndex == 8) //// { //// int.TryParse(dbResult.Rows[i]["PRODUCTTYPE"].ToString(), out d0); //// if (d0 == 0) continue; //// } ////} //d0 = 0; //info.Region = dbResult.Rows[i]["region"].ToString(); //info.TripContent = dbResult.Rows[i]["tripcontent"].ToString(); //d0 = 0; //int.TryParse(dbResult.Rows[i]["triptype"].ToString(), out d0); //info.TripType = d0; //d0 = 0; //int.TryParse(dbResult.Rows[i]["usetype"].ToString(), out d0); //info.UseType = d0; //int.TryParse(dbResult.Rows[i]["RECID"].ToString(), out d0); //info.RECID = d0; newList.Add(info); } } string dd = dt.ToString("yyyy/M/dd HH:mm:ss"); SQL = "select DDATETIME,CITY,W_TYPE,W_LEVEL from t_hk_warning t where DDATETIME = to_date('" + dd + "','yyyy-mm-dd hh24:mi:ss')"; dbResult = DbHelperOra.Query(SQL, CommonClass.GetconnectionStringsValue("ConnectionEJETDB247Idcty")).Tables[0]; if (dbResult != null && dbResult.Rows.Count > 0) { newList = new List <LWSTripsInfo>(); DateTime dt2 = DateTime.Parse("2000-1-1"); //int d0 = 0; for (int i = 0; i < dbResult.Rows.Count; i++) { info = new LWSTripsInfo(); dt2 = DateTime.Parse("2000-1-1"); //if (!DateTime.TryParse(dbResult.Rows[i]["DDATETIME"].ToString(), out dt2)) continue; //d0 = 0; //int.TryParse(dbResult.Rows[i]["LEADTIME"].ToString(), out d0); //info.DDateTime = dt2.AddMinutes(d0); //info.DDateTimestr = dt2.ToString("yyyy-MM-dd HH:mm:ss"); //d0 = 0; //int.TryParse(dbResult.Rows[i]["flagindex"].ToString(), out d0); //info.FlagIndex = d0; //info.Region = dbResult.Rows[i]["region"].ToString(); //info.TripContent = dbResult.Rows[i]["tripcontent"].ToString(); //d0 = 0; //int.TryParse(dbResult.Rows[i]["usetype"].ToString(), out d0); //info.UseType = d0; //int.TryParse(dbResult.Rows[i]["RECID"].ToString(), out d0); //info.RECID = d0; newList.Add(info); } } } catch (Exception ex) { CommonClass.ErrWriter(ex.ToString()); newList = null; } return(newList); }
/// <summary> /// 按类统计已初始化订单信息 /// </summary> /// <param name="strIniID">方案主键</param> /// <param name="strGZ">钢种</param> /// <param name="strBZ">标准</param> /// <param name="strRollID">轧线</param> /// <param name="strCCMID">连铸</param> /// <param name="rolltype">轧钢是否排产</param> /// <param name="ccmtype">炼钢是否排产</param> /// <param name="strTJ">统计类别:1轧钢2连铸,3钢种,4产线规格</param> /// <returns></returns> public DataTable GetOrderIniTJ(string strIniID, string strGZ, string strBZ, string strRollID, string strCCMID, int?rolltype, int?ccmtype, string strTJ) { string sql = ""; string sql2 = " "; if (strTJ == "1") { sql = sql + " SELECT SUM(X.N_WGT) N_WGT ,X.C_ROLL_DESC FROM "; sql2 = sql2 + " GROUP BY X.C_ROLL_DESC ORDER BY X.C_ROLL_DESC "; } if (strTJ == "2") { sql = sql + " SELECT SUM(X.N_WGT) N_WGT ,X.C_CCM_DESC FROM "; sql2 = sql2 + " GROUP BY X.C_CCM_DESC ORDER BY X.C_CCM_DESC "; } if (strTJ == "3") { sql = sql + " SELECT SUM(X.N_WGT) N_WGT ,X.C_STL_GRD,X.C_STD_CODE FROM "; sql2 = sql2 + " GROUP BY X.C_STL_GRD,X.C_STD_CODE ORDER BY X.C_STL_GRD "; } if (strTJ == "4") { sql = sql + " SELECT SUM(X.N_WGT) N_WGT, X.C_ROLL_DESC,X.C_SPEC FROM "; sql2 = sql2 + " GROUP BY X.C_ROLL_DESC,X.C_SPEC ORDER BY X.C_ROLL_DESC,X.C_SPEC "; } sql = sql + "(SELECT a.c_id,A.C_INITIALIZE_ID, A.C_ORDER_ID, A.N_WGT, A.C_ROLL_STA_ID, ( SELECT M.C_STA_DESC FROM TB_STA M WHERE M.C_ID= A.C_ROLL_STA_ID) C_ROLL_DESC, A.N_MACH_WGT, A.C_CCM_STA_ID, ( SELECT M.C_STA_DESC FROM TB_STA M WHERE M.C_ID= A.C_CCM_STA_ID) C_CCM_DESC, A.N_MACH_WGT_CCM, A.C_ID, T.C_ORDER_NO, T.C_CON_NO, T.C_CON_NAME, T.C_AREA, T.C_MAT_CODE, T.C_MAT_NAME, T.C_TECH_PROT, T.C_SPEC, T.C_STL_GRD, T.C_STD_CODE, T.C_FREE_TERM, T.C_FREE_TERM2, T.C_PRO_USE, T.D_NEED_DT, T.D_DELIVERY_DT, T.C_PACK, T.C_LEV FROM TPP_INITIALIZE_ORDER A, TMO_ORDER T WHERE A.C_ORDER_ID = T.C_ID AND A.C_INITIALIZE_ID='" + strIniID + "'"; if (rolltype != null) { sql = sql + " AND A.N_EXEC_STATUS=" + rolltype + " "; } if (ccmtype != null) { sql = sql + " AND A.N_LGPC_STATUS=" + ccmtype + " "; } if (strGZ.Trim().Length > 0) { sql = sql + " AND UPPER( T.C_STL_GRD) LIKE UPPER( '" + strGZ + "') "; } if (strBZ.Trim().Length > 0) { sql = sql + " AND UPPER( T.C_STD_CODE) LIKE UPPER( '" + strBZ + "') "; } if (strRollID.Trim().Length > 0) { sql = sql + " AND A.C_ROLL_STA_ID = '" + strRollID + "' "; } if (strCCMID.Trim().Length > 0) { sql = sql + " AND A.C_CCM_STA_ID = '" + strCCMID + "' "; } sql = sql + " ) X "; sql = sql + sql2; return(DbHelperOra.Query(sql).Tables[0]); }
public List <List <WarningInfo> > GetGDWarningInfo() { List <List <WarningInfo> > newList = new List <List <WarningInfo> >(); try { string strSQL = "select * from T_GDALARM " + " where sysdate-ddatetime<530 and signcolor<>'0' and keyid not in (" + " select a.keyid from (select ddatetime,citycode,signname,signcolor,keyid from T_GDALARM " + " where sysdate-ddatetime<530 and signcolor<>'0')a,(select ddatetime,citycode,signname,signcolor,keyid from T_GDALARM " + " where sysdate-ddatetime<530 and signcolor='0') b" + " where a.ddatetime<b.ddatetime and a.citycode =b.citycode and a.signname=b.signname" + " ) " + " order by citycode,ddatetime "; var ds = DbHelperOra.Query(strSQL, CommonClass.GetconnectionStringsValue("SZQX13ConnectionString")); if (ds == null) { return(null); } DataTable dbWarning = ds.Tables[0]; strSQL = " select * from T_AREACODE "; DataTable dbArea = DbHelperOra.Query(strSQL, CommonClass.GetconnectionStringsValue("OraConString")).Tables[0]; for (int i = 0; i < dbWarning.Rows.Count; i++) { bool isExist = false; WarningInfo newInfo = new WarningInfo(); newInfo.IssueContent = dbWarning.Rows[i]["citycode"].ToString(); // newInfo.IssueState = dbWarning.Rows[i]["areaname"].ToString(); newInfo.IssueTime = DateTime.Parse(dbWarning.Rows[i]["ddatetime"].ToString()); newInfo.SignalType = dbWarning.Rows[i]["signname"].ToString(); newInfo.SignalLevel = dbWarning.Rows[i]["signcolor"].ToString(); foreach (List <WarningInfo> listW in newList) { if (listW.Count > 0) { if (listW[0].IssueContent.Equals(newInfo.IssueContent)) { listW.Add(newInfo); isExist = true; } } if (isExist) { break; } } if (!isExist) { List <WarningInfo> infoW = new List <WarningInfo>(); infoW.Add(newInfo); newList.Add(infoW); } } foreach (List <WarningInfo> listW in newList) { if (listW.Count > 0) { bool isExist = false; for (int i = 0; i < dbArea.Rows.Count; i++) { if (listW[0].IssueContent.Equals(dbArea.Rows[i]["citycode"].ToString())) { foreach (WarningInfo info in listW) { info.IssueState = dbArea.Rows[i]["areaname"].ToString(); info.Diff = dbArea.Rows[i]["LONGITUDE"].ToString(); info.District = dbArea.Rows[i]["LATITUDE"].ToString(); } isExist = true; break; } } if (!isExist) { string Error = listW[0].IssueContent; } } } } catch (Exception e) { string LastErrorMsg = e.Message; } return(newList); }