sunhao 4 months ago
parent 60f8ae47e0
commit 4ed99c415c

@ -2913,7 +2913,7 @@ namespace ibk.IPD.Controller.IPD_SS
TSAR.MANMMDE_YIELD_C1 = 95; TSAR.MANMMDE_YIELD_C1 = 95;
} }
//TSAR.SUB_DATE_C1 = TSR1.SUB_DATE; //TSAR.SUB_DATE_C1 = TSR1.SUB_DATE;
TSAR.SUB_DATE_C1 = TSR2.SUB_DATE; TSAR.SUB_DATE_C1 = TSR1.SUB_DATE;
TSAR.SUB_DATE_C2 = TSR1.SUB_DATE; TSAR.SUB_DATE_C2 = TSR1.SUB_DATE;
TSAR.SUB_DATE_C3 = TSR1.SUB_DATE; TSAR.SUB_DATE_C3 = TSR1.SUB_DATE;
@ -2921,6 +2921,9 @@ namespace ibk.IPD.Controller.IPD_SS
TSAR.SYS_PERCENT_C1 = TSR1.SYS_PERCENT; TSAR.SYS_PERCENT_C1 = TSR1.SYS_PERCENT;
TSAR.SYS_YIELD_C1 = TSR1.SYS_YIELD; TSAR.SYS_YIELD_C1 = TSR1.SYS_YIELD;
TSAR.SYS_WGT_C1 = TSR1.WGT_S;
if (TSAR.SYS_YIELD_C1 > 100) if (TSAR.SYS_YIELD_C1 > 100)
{ {
TSAR.SYS_YIELD_C1 = 95; TSAR.SYS_YIELD_C1 = 95;
@ -2950,12 +2953,15 @@ namespace ibk.IPD.Controller.IPD_SS
} }
TSAR.SUB_DATE_C1 = TSR2.SUB_DATE; TSAR.SUB_DATE_C1 = TSR2.SUB_DATE;
TSAR.SUB_DATE_C2 = TSR1.SUB_DATE; TSAR.SUB_DATE_C2 = TSR2.SUB_DATE;
TSAR.SUB_DATE_C3 = TSR1.SUB_DATE; TSAR.SUB_DATE_C3 = TSR2.SUB_DATE;
TSAR.SYS_COUNT_C2 = TSR2.SYS_COUNT; TSAR.SYS_COUNT_C2 = TSR2.SYS_COUNT;
TSAR.SYS_PERCENT_C2 = TSR2.SYS_PERCENT; TSAR.SYS_PERCENT_C2 = TSR2.SYS_PERCENT;
TSAR.SYS_YIELD_C2 = TSR2.SYS_YIELD; TSAR.SYS_YIELD_C2 = TSR2.SYS_YIELD;
TSAR.SYS_WGT_C2 = TSR2.WGT_S;
if (TSAR.SYS_YIELD_C2 > 100) if (TSAR.SYS_YIELD_C2 > 100)
{ {
TSAR.SYS_YIELD_C2 = 95; TSAR.SYS_YIELD_C2 = 95;
@ -2985,13 +2991,16 @@ namespace ibk.IPD.Controller.IPD_SS
TSAR.MANMMDE_YIELD_C3 = 95; TSAR.MANMMDE_YIELD_C3 = 95;
} }
TSAR.SUB_DATE_C1 = TSR2.SUB_DATE; TSAR.SUB_DATE_C1 = TSR3.SUB_DATE;
TSAR.SUB_DATE_C2 = TSR1.SUB_DATE; TSAR.SUB_DATE_C2 = TSR3.SUB_DATE;
TSAR.SUB_DATE_C3 = TSR1.SUB_DATE; TSAR.SUB_DATE_C3 = TSR3.SUB_DATE;
TSAR.SYS_COUNT_C3 = TSR3.SYS_COUNT; TSAR.SYS_COUNT_C3 = TSR3.SYS_COUNT;
TSAR.SYS_PERCENT_C3 = TSR3.SYS_PERCENT; TSAR.SYS_PERCENT_C3 = TSR3.SYS_PERCENT;
TSAR.SYS_YIELD_C3 = TSR3.SYS_YIELD; TSAR.SYS_YIELD_C3 = TSR3.SYS_YIELD;
TSAR.SYS_WGT_C3 = TSR3.WGT_S;
if (TSAR.SYS_YIELD_C3 > 100) if (TSAR.SYS_YIELD_C3 > 100)
{ {
TSAR.SYS_YIELD_C3 = 95; TSAR.SYS_YIELD_C3 = 95;
@ -3032,6 +3041,9 @@ namespace ibk.IPD.Controller.IPD_SS
//TSAR.MANMMDE_YIELD_ALL = Math.Round((ConverDataToDecimal(TSAR.MANMMDE_YIELD_C1) + ConverDataToDecimal(TSAR.MANMMDE_YIELD_C2) + ConverDataToDecimal(TSAR.MANMMDE_YIELD_C3)) / ltYileld1.Where(p => p != 0).Count(), 2); //TSAR.MANMMDE_YIELD_ALL = Math.Round((ConverDataToDecimal(TSAR.MANMMDE_YIELD_C1) + ConverDataToDecimal(TSAR.MANMMDE_YIELD_C2) + ConverDataToDecimal(TSAR.MANMMDE_YIELD_C3)) / ltYileld1.Where(p => p != 0).Count(), 2);
TSAR.SUB_DATE_ALL = currentDate.ToString("yyyy-MM-dd"); TSAR.SUB_DATE_ALL = currentDate.ToString("yyyy-MM-dd");
TSAR.SYS_COUNT_ALL = ConverDataToDecimal(TSAR.SYS_COUNT_C1) + ConverDataToDecimal(TSAR.SYS_COUNT_C2) + ConverDataToDecimal(TSAR.SYS_COUNT_C3); //TSR3.SYS_COUNT; TSAR.SYS_COUNT_ALL = ConverDataToDecimal(TSAR.SYS_COUNT_C1) + ConverDataToDecimal(TSAR.SYS_COUNT_C2) + ConverDataToDecimal(TSAR.SYS_COUNT_C3); //TSR3.SYS_COUNT;
TSAR.SYS_WGT_ALL = ConverDataToDecimal(TSAR.SYS_WGT_C1) + ConverDataToDecimal(TSAR.SYS_WGT_C2) + ConverDataToDecimal(TSAR.SYS_WGT_C3); //TSR3.SYS_COUNT;
TSAR.SYS_PERCENT_ALL = Math.Round((ConverDataToDecimal(TSAR.SYS_COUNT_ALL)) / (ConverDataToDecimal(TSAR.MANMMDE_COUNT_ALL) + ConverDataToDecimal(TSAR.SYS_COUNT_ALL)), 3) * 100;// TSR3.SYS_PERCENT; TSAR.SYS_PERCENT_ALL = Math.Round((ConverDataToDecimal(TSAR.SYS_COUNT_ALL)) / (ConverDataToDecimal(TSAR.MANMMDE_COUNT_ALL) + ConverDataToDecimal(TSAR.SYS_COUNT_ALL)), 3) * 100;// TSR3.SYS_PERCENT;
if (ltYileld2.Where(p => p != 0).Count() == 0) if (ltYileld2.Where(p => p != 0).Count() == 0)
{ {
@ -3067,6 +3079,13 @@ namespace ibk.IPD.Controller.IPD_SS
TSAR2.SYS_COUNT_C1 = dtCheck.Sum(p => p.SYS_COUNT_C1); TSAR2.SYS_COUNT_C1 = dtCheck.Sum(p => p.SYS_COUNT_C1);
TSAR2.SYS_COUNT_C2 = dtCheck.Sum(p => p.SYS_COUNT_C2); TSAR2.SYS_COUNT_C2 = dtCheck.Sum(p => p.SYS_COUNT_C2);
TSAR2.SYS_COUNT_C3 = dtCheck.Sum(p => p.SYS_COUNT_C3); TSAR2.SYS_COUNT_C3 = dtCheck.Sum(p => p.SYS_COUNT_C3);
TSAR2.SYS_WGT_C1 = dtCheck.Sum(p => p.SYS_WGT_C1);
TSAR2.SYS_WGT_C2 = dtCheck.Sum(p => p.SYS_WGT_C2);
TSAR2.SYS_WGT_C3 = dtCheck.Sum(p => p.SYS_WGT_C3);
TSAR2.SYS_WGT_ALL= dtCheck.Sum(p => p.SYS_WGT_ALL);
TSAR2.SYS_YIELD_ALL = dtCheck.Where(p => p.SYS_YIELD_ALL != 0).Count() == 0 ? 0 : dtCheck.Sum(p => p.SYS_YIELD_ALL) / dtCheck.Where(p => p.SYS_YIELD_ALL != 0).Count(); TSAR2.SYS_YIELD_ALL = dtCheck.Where(p => p.SYS_YIELD_ALL != 0).Count() == 0 ? 0 : dtCheck.Sum(p => p.SYS_YIELD_ALL) / dtCheck.Where(p => p.SYS_YIELD_ALL != 0).Count();
TSAR2.SYS_YIELD_C1 = dtCheck.Where(p => p.SYS_YIELD_C1 != 0).Count() == 0 ? 0 : dtCheck.Sum(p => p.SYS_YIELD_C1) / dtCheck.Where(p => p.SYS_YIELD_C1 != 0 && p.SYS_YIELD_C1 != null).Count(); TSAR2.SYS_YIELD_C1 = dtCheck.Where(p => p.SYS_YIELD_C1 != 0).Count() == 0 ? 0 : dtCheck.Sum(p => p.SYS_YIELD_C1) / dtCheck.Where(p => p.SYS_YIELD_C1 != 0 && p.SYS_YIELD_C1 != null).Count();
TSAR2.SYS_YIELD_C2 = dtCheck.Where(p => p.SYS_YIELD_C2 != 0).Count() == 0 ? 0 : dtCheck.Sum(p => p.SYS_YIELD_C2) / dtCheck.Where(p => p.SYS_YIELD_C2 != 0 && p.SYS_YIELD_C2 != null).Count(); TSAR2.SYS_YIELD_C2 = dtCheck.Where(p => p.SYS_YIELD_C2 != 0).Count() == 0 ? 0 : dtCheck.Sum(p => p.SYS_YIELD_C2) / dtCheck.Where(p => p.SYS_YIELD_C2 != 0 && p.SYS_YIELD_C2 != null).Count();

@ -432,6 +432,8 @@ namespace ibk.IPD.Controller.IPD_PS
//不能有完全替代的钢板,余材替代应该全部替代 //不能有完全替代的钢板,余材替代应该全部替代
strSql.AppendLine(" AND sur.SUB_FULL = '" + "P" + "'"); strSql.AppendLine(" AND sur.SUB_FULL = '" + "P" + "'");
//strSql.AppendLine(" AND sur.EEF_RATE <100");
if (!string.IsNullOrWhiteSpace(queryArgs.IS_FULL)) if (!string.IsNullOrWhiteSpace(queryArgs.IS_FULL))
{ {
if (queryArgs.IS_FULL == "完全替代") if (queryArgs.IS_FULL == "完全替代")

@ -1353,7 +1353,7 @@ namespace ibk.IPD.Controller.IPD_PS
DataTable dtCheck = new DataTable(); DataTable dtCheck = new DataTable();
DataTable dtPlate = new DataTable(); DataTable dtPlate = new DataTable();
strSql.AppendLine(" SELECT * FROM CONFIRMSMPNO "); strSql.AppendLine(" SELECT * FROM CONFIRMSMPNO_M ");
strSql.AppendLine(" where 1=1 "); strSql.AppendLine(" where 1=1 ");
//strSql.AppendLine(" AND IS_BING ='0' "); //strSql.AppendLine(" AND IS_BING ='0' ");
@ -1384,7 +1384,7 @@ namespace ibk.IPD.Controller.IPD_PS
strSql.AppendLine(" AND PLT = '" + QAGP.PLT + "'"); strSql.AppendLine(" AND PLT = '" + QAGP.PLT + "'");
} }
strSql.AppendLine(" ORDER BY INS_DATE DESC "); strSql.AppendLine(" ORDER BY SMP_NO_M ,SMP_FLG DESC ");
try try
@ -1501,7 +1501,7 @@ namespace ibk.IPD.Controller.IPD_PS
//strData.Append((pdi.PLATE_NO).PadRight(14));// 钢板号: VARCHAR2(14) //strData.Append((pdi.PLATE_NO).PadRight(14));// 钢板号: VARCHAR2(14)
//strData.Append((pdi.SMP_NO).PadRight(14));// 试样号: VARCHAR2(14) //strData.Append((pdi.SMP_NO).PadRight(14));// 试样号: VARCHAR2(14)
//strData.Append((pdi.SYNOPSIS.ToString()).PadRight(1));// 标记: VARCHAR2(14) //strData.Append((pdi.SYNOPSIS.ToString()).PadRight(1));// 标记: VARCHAR2(14)
Result1.DATA = model.DATA.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList().First(); Result1.DATA = model.DATA.Split(new char[] { '$' }, StringSplitOptions.RemoveEmptyEntries).ToList().First();
//TBDIPDO InsertPDO2 = GetPDO(model); //TBDIPDO InsertPDO2 = GetPDO(model);
@ -1520,7 +1520,7 @@ namespace ibk.IPD.Controller.IPD_PS
//strData.Append((pdi.PLATE_NO).PadRight(14));// 钢板号: VARCHAR2(14) //strData.Append((pdi.PLATE_NO).PadRight(14));// 钢板号: VARCHAR2(14)
//strData.Append((pdi.SMP_NO).PadRight(14));// 试样号: VARCHAR2(14) //strData.Append((pdi.SMP_NO).PadRight(14));// 试样号: VARCHAR2(14)
//strData.Append((pdi.SYNOPSIS.ToString()).PadRight(1));// 标记: VARCHAR2(14) //strData.Append((pdi.SYNOPSIS.ToString()).PadRight(1));// 标记: VARCHAR2(14)
Result2.DATA = model.DATA.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList().Last(); Result2.DATA = model.DATA.Split(new char[] { '$' }, StringSplitOptions.RemoveEmptyEntries).ToList().Last();
if (Result1 != null) if (Result1 != null)
{ {
@ -1532,13 +1532,13 @@ namespace ibk.IPD.Controller.IPD_PS
b = false; b = false;
} }
//strSql.AppendLine("DELETE FROM CONFIRMSMPNO WHERE 1=1 "); //strSql.AppendLine("DELETE FROM CONFIRMSMPNO WHERE 1=1 ");
strSql.AppendLine(" UPDATE CONFIRMSMPNO SET IS_BING = '1' "); strSql.AppendLine(" UPDATE CONFIRMSMPNO_M SET IS_BING = '1' ");
strSql.AppendLine(string.Format(" WHERE 1 = 1 ")); strSql.AppendLine(string.Format(" WHERE 1 = 1 "));
strSql.AppendLine(string.Format("AND PLATE_NO = '{0}' ", model.PLATE_NO)); strSql.AppendLine(string.Format("AND PLATE_NO = '{0}' ", model.PLATE_NO));
strSql.AppendLine(string.Format("AND ORD_NO = '{0}' ", model.ORD_NO)); strSql.AppendLine(string.Format("AND ORD_NO = '{0}' ", model.ORD_NO));
strSql.AppendLine(string.Format("AND ORD_ITEM = '{0}' ", model.ORD_ITEM)); strSql.AppendLine(string.Format("AND ORD_ITEM = '{0}' ", model.ORD_ITEM));
db.Execute(strSql.ToString()); // 执行删除数据操作 db.Execute(strSql.ToString()); // 执行删除数据操作
strSql2.AppendLine(" UPDATE PDI_SMP_NO SET IS_STATE = '1', "); strSql2.AppendLine(" UPDATE PDI_SMP_NO_M SET IS_STATE = '1', ");
strSql2.AppendLine(string.Format(" INS_DATE='{0}' ", DateTime.Now.ToString("yyyyMMddHHmmss"))); strSql2.AppendLine(string.Format(" INS_DATE='{0}' ", DateTime.Now.ToString("yyyyMMddHHmmss")));
strSql2.AppendLine(string.Format(" WHERE 1 = 1 ")); strSql2.AppendLine(string.Format(" WHERE 1 = 1 "));
strSql2.AppendLine(string.Format("AND PLATE_NO = '{0}' ", model.PLATE_NO)); strSql2.AppendLine(string.Format("AND PLATE_NO = '{0}' ", model.PLATE_NO));
@ -1843,21 +1843,22 @@ namespace ibk.IPD.Controller.IPD_PS
//strSql.AppendLine(" ) WHERE rn = 1 "); //strSql.AppendLine(" ) WHERE rn = 1 ");
strSql.AppendLine("SELECT * FROM( "); strSql.AppendLine("SELECT * FROM( ");
strSql.AppendLine(" SELECT STANDARD_NO, TD_STANDARD_NO, INS_DATE, UPD_DATE, TD_FL,THK_TOL_MIN,THK_TOL_MAX,REMARK ,STEEL_GRD_DETAIL,STDSPEC_STLGRD,STD_FLG,RATE,ORD_NO,ORD_ITEM,PLATE_NO,STLGRD"); strSql.AppendLine(" SELECT STANDARD_NO, TD_STANDARD_NO, INS_DATE, UPD_DATE, TD_FL,THK_TOL_MIN,THK_TOL_MAX,REMARK ,STEEL_GRD_DETAIL,STDSPEC_STLGRD,STD_FLG,RATE,ORD_NO,ORD_ITEM,PLATE_NO,STLGRD, YP_RST ,YP_MIN,YP_MAX, TS_RST,TS_MIN,TS_MAX");
strSql.AppendLine("FROM ( "); strSql.AppendLine("FROM ( ");
strSql.AppendLine(" SELECT "); strSql.AppendLine(" SELECT ");
strSql.AppendLine(" STANDARD_NO, "); strSql.AppendLine(" STANDARD_NO, ");
strSql.AppendLine(" TD_STANDARD_NO, "); strSql.AppendLine(" TD_STANDARD_NO, ");
strSql.AppendLine("INS_DATE, "); strSql.AppendLine("INS_DATE, ");
strSql.AppendLine("UPD_DATE, "); strSql.AppendLine("UPD_DATE, ");
strSql.AppendLine("TD_FL, THK_TOL_MIN,THK_TOL_MAX ,REMARK, STEEL_GRD_DETAIL,STDSPEC_STLGRD,STD_FLG,RATE,ORD_NO,ORD_ITEM,PLATE_NO,STLGRD"); strSql.AppendLine("TD_FL, THK_TOL_MIN,THK_TOL_MAX ,REMARK, STEEL_GRD_DETAIL,STDSPEC_STLGRD,STD_FLG,RATE,ORD_NO,ORD_ITEM,PLATE_NO,STLGRD,YP_RST-YP_MIN YP_RST ,YP_MIN,YP_MAX,TS_RST-TS_MIN TS_RST,TS_MIN,TS_MAX");
strSql.AppendLine(" ,ROW_NUMBER() OVER(PARTITION BY STANDARD_NO, TD_STANDARD_NO ORDER BY INS_DATE DESC) AS rn "); strSql.AppendLine(" ,ROW_NUMBER() OVER(PARTITION BY STANDARD_NO, TD_STANDARD_NO ORDER BY INS_DATE DESC) AS rn ");
strSql.AppendLine(" FROM YCTD_WH_NO WHERE RATE IS NOT NULL "); strSql.AppendLine(" FROM YCTD_WH_NO WHERE RATE IS NOT NULL ");
strSql.AppendLine(" ) WHERE rn = 1 "); strSql.AppendLine(" ) WHERE rn = 1 ");
strSql.AppendLine(" UNION ALL "); strSql.AppendLine(" UNION ALL ");
strSql.AppendLine(" SELECT * FROM YCTD_WH_NO_COPY WHERE RATE IS NOT NULL ) "); strSql.AppendLine(" SELECT * FROM YCTD_WH_NO_COPY WHERE RATE IS NOT NULL ) ");
strSql.AppendLine(" WHERE 1 = 1 "); strSql.AppendLine(" WHERE 1 = 1 ");
//只取当前日期的数据
strSql.AppendLine("AND TO_CHAR(TO_DATE(INS_DATE,'YYYYMMDDHH24MISS'), 'YYYYMMDD') = TO_CHAR(SYSDATE, 'YYYYMMDD') ");
//标准号 //标准号
if (!string.IsNullOrWhiteSpace(QAGP.STANDARD_NO)) if (!string.IsNullOrWhiteSpace(QAGP.STANDARD_NO))
@ -1884,17 +1885,47 @@ namespace ibk.IPD.Controller.IPD_PS
strSql.AppendLine(" AND THK_TOL_MAX >= '" + QAGP.THK_TOL_MAX + "'"); strSql.AppendLine(" AND THK_TOL_MAX >= '" + QAGP.THK_TOL_MAX + "'");
} }
//屈服
if (!string.IsNullOrWhiteSpace(QAGP.YP_RST))
{
strSql.AppendLine(" AND YP_RST >= '" + QAGP.YP_RST + "'");
}
//抗拉
if (!string.IsNullOrWhiteSpace(QAGP.TS_RST))
{
strSql.AppendLine(" AND TS_RST >= '" + QAGP.TS_RST + "'");
}
strSql.AppendLine(" ORDER BY INS_DATE DESC "); strSql.AppendLine(" ORDER BY INS_DATE DESC ");
try try
{ {
//DataTable ltYctdWh =new DataTable();
//开启数据库连接查询数据
using (IDbContext db2 = ObjectContainer.GetObject<IDbContext>("db_sur"))
{
//开启数据库连接查询数据 //开启数据库连接查询数据
using (IDbContext db = ObjectContainer.GetObject<IDbContext>("db")) using (IDbContext db = ObjectContainer.GetObject<IDbContext>("db"))
{ {
dtCheck = db.Query(strSql.ToString()); dtCheck = db.Query(strSql.ToString());
result.data = dtCheck; DataTable dtResult = dtCheck.Clone();
// 查找不在第二个DataTable中的行并添加到结果DataTable
foreach (DataRow row in dtCheck.Rows)
{
DataTable ltYctdWh = db2.Query("SELECT * FROM NISCO.YCTD_WH WHERE STANDARD_NO='" + row.Field<string>("STANDARD_NO") + "' AND TD_STANDARD_NO='" + row.Field<string>("TD_STANDARD_NO") + "'");
if (ltYctdWh.Rows.Count==0)
{
dtResult.ImportRow(row);
}
}
result.data = dtResult;
if (dtCheck.Rows.Count > 0) if (dtCheck.Rows.Count > 0)
{ {
result.msg = "操作成功!"; result.msg = "操作成功!";
@ -1907,6 +1938,9 @@ namespace ibk.IPD.Controller.IPD_PS
} }
} }
} }
}
catch (Exception ex) catch (Exception ex)
{ {
result.msg = "数据库错误!"; result.msg = "数据库错误!";
@ -1937,6 +1971,7 @@ namespace ibk.IPD.Controller.IPD_PS
strSql.AppendLine(" INSERT INTO YCTD_WH_NO_COPY (STANDARD_NO, TD_STANDARD_NO, INS_DATE, UPD_DATE, TD_FL,THK_TOL_MIN,THK_TOL_MAX,REMARK" + strSql.AppendLine(" INSERT INTO YCTD_WH_NO_COPY (STANDARD_NO, TD_STANDARD_NO, INS_DATE, UPD_DATE, TD_FL,THK_TOL_MIN,THK_TOL_MAX,REMARK" +
",STEEL_GRD_DETAIL,STDSPEC_STLGRD,STD_FLG" + ",STEEL_GRD_DETAIL,STDSPEC_STLGRD,STD_FLG" +
",RATE,ORD_NO,ORD_ITEM,PLATE_NO,STLGRD" + ",RATE,ORD_NO,ORD_ITEM,PLATE_NO,STLGRD" +
",YP_MIN,YP_MAX,YP_RST,TS_MIN,TS_MAX,TS_RST" +
") VALUES ( "); ") VALUES ( ");
strSql.AppendLine(string.Format(" '{0}', ", model.STANDARD_NO)); strSql.AppendLine(string.Format(" '{0}', ", model.STANDARD_NO));
strSql.AppendLine(string.Format(" '{0}', ", model.TD_STANDARD_NO)); strSql.AppendLine(string.Format(" '{0}', ", model.TD_STANDARD_NO));
@ -1954,6 +1989,14 @@ namespace ibk.IPD.Controller.IPD_PS
strSql.AppendLine(string.Format(" '{0}', ", model.ORD_ITEM)); strSql.AppendLine(string.Format(" '{0}', ", model.ORD_ITEM));
strSql.AppendLine(string.Format(" '{0}', ", model.PLATE_NO)); strSql.AppendLine(string.Format(" '{0}', ", model.PLATE_NO));
strSql.AppendLine(string.Format(" '{0}'", model.STLGRD)); strSql.AppendLine(string.Format(" '{0}'", model.STLGRD));
strSql.AppendLine(string.Format(" '{0}'", model.YP_MIN));
strSql.AppendLine(string.Format(" '{0}'", model.YP_MAX));
strSql.AppendLine(string.Format(" '{0}'", model.YP_RST));
strSql.AppendLine(string.Format(" '{0}'", model.TS_MIN));
strSql.AppendLine(string.Format(" '{0}'", model.TS_MAX));
strSql.AppendLine(string.Format(" '{0}'", model.TS_RST));
strSql.AppendLine(string.Format(" ) ")); strSql.AppendLine(string.Format(" ) "));
db.Execute(strSql.ToString()); db.Execute(strSql.ToString());

@ -65,8 +65,6 @@ namespace ibk.IPD.Entity.IPD_PS.QueryArgs
[Persistent("SMP_NO"), DisplayName("试样号")] [Persistent("SMP_NO"), DisplayName("试样号")]
public string SMP_NO { get; set; } public string SMP_NO { get; set; }
[Persistent("STANDARD_NO"), DisplayName("标准号")] [Persistent("STANDARD_NO"), DisplayName("标准号")]
public string STANDARD_NO { get; set; } public string STANDARD_NO { get; set; }
@ -87,5 +85,14 @@ namespace ibk.IPD.Entity.IPD_PS.QueryArgs
//厚度公差最大值 //厚度公差最大值
[Persistent("THK_TOL_MAX"), DisplayName("厚度公差最大值")] [Persistent("THK_TOL_MAX"), DisplayName("厚度公差最大值")]
public string THK_TOL_MAX { get; set; } public string THK_TOL_MAX { get; set; }
[Persistent("YP_RST"), DisplayName("屈服实绩")]
public string YP_RST { get; set; }
[Persistent("TS_RST"), DisplayName("拉伸强度实绩")]
public string TS_RST { get; set; }
} }
} }

@ -19,6 +19,26 @@ namespace ibk.IPD.Entity.IpdPs
[Persistent("TD_STANDARD_NO"), DisplayName("替代标准")] [Persistent("TD_STANDARD_NO"), DisplayName("替代标准")]
public string TD_STANDARD_NO { get; set; } public string TD_STANDARD_NO { get; set; }
[Persistent("YP_MIN"), DisplayName("屈服最小值")]
public decimal YP_MIN { get; set; }
[Persistent("YP_MAX"), DisplayName("屈服最大值")]
public decimal YP_MAX { get; set; }
[Persistent("YP_RST"), DisplayName("屈服实绩")]
public decimal YP_RST { get; set; }
[Persistent("TS_MIN"), DisplayName("拉伸强度最小值")]
public decimal TS_MIN { get; set; }
[Persistent("TS_MAX"), DisplayName("拉伸强度最大值")]
public decimal TS_MAX { get; set; }
[Persistent("TS_RST"), DisplayName("拉伸强度实绩")]
public decimal TS_RST { get; set; }
[Persistent("TD_FL"), DisplayName("替代分类")] [Persistent("TD_FL"), DisplayName("替代分类")]
public string TD_FL { get; set; } public string TD_FL { get; set; }
//厚度公差最小值 //厚度公差最小值

@ -53,6 +53,18 @@ namespace ibk.IPD.Service.IPD_SS
[Persistent("SYS_COUNT_C1"), DisplayName("系统替代数量_C1")] [Persistent("SYS_COUNT_C1"), DisplayName("系统替代数量_C1")]
public decimal? SYS_COUNT_C1 { get; set; } public decimal? SYS_COUNT_C1 { get; set; }
//系统替代吨数
[Persistent("SYS_WGT_C1"), DisplayName("系统替代吨数_C1")]
public decimal? SYS_WGT_C1 { get; set; }
//系统替代吨数
[Persistent("SYS_WGT_C2"), DisplayName("系统替代吨数_C2")]
public decimal? SYS_WGT_C2 { get; set; }
//系统替代吨数
[Persistent("SYS_WGT_C3"), DisplayName("系统替代吨数_C3")]
public decimal? SYS_WGT_C3 { get; set; }
//人工替代成材率 //人工替代成材率
[Persistent("MANMMDE_YIELD_C1"), DisplayName("人工替代成材率_C1")] [Persistent("MANMMDE_YIELD_C1"), DisplayName("人工替代成材率_C1")]
public decimal? MANMMDE_YIELD_C1 { get; set; } public decimal? MANMMDE_YIELD_C1 { get; set; }
@ -127,6 +139,10 @@ namespace ibk.IPD.Service.IPD_SS
[Persistent("SYS_COUNT_ALL"), DisplayName("系统替代数量_ALL")] [Persistent("SYS_COUNT_ALL"), DisplayName("系统替代数量_ALL")]
public decimal? SYS_COUNT_ALL { get; set; } public decimal? SYS_COUNT_ALL { get; set; }
//系统替代吨数
[Persistent("SYS_WGT_ALL"), DisplayName("系统替代吨数_ALL")]
public decimal? SYS_WGT_ALL { get; set; }
//人工替代成材率 //人工替代成材率
[Persistent("MANMMDE_YIELD_ALL"), DisplayName("人工替代成材率_ALL")] [Persistent("MANMMDE_YIELD_ALL"), DisplayName("人工替代成材率_ALL")]
public decimal? MANMMDE_YIELD_ALL { get; set; } public decimal? MANMMDE_YIELD_ALL { get; set; }

@ -56,5 +56,13 @@ namespace ibk.IPD.Service.IPD_SS
[Persistent("SUB_DATE"), DisplayName("替代日期")] [Persistent("SUB_DATE"), DisplayName("替代日期")]
public string SUB_DATE { get; set; } public string SUB_DATE { get; set; }
//人工吨数
[Persistent("WGT_M"), DisplayName("人工吨数")]
public decimal? WGT_M { get; set; }
//系统吨数
[Persistent("WGT_S"), DisplayName("系统吨数")]
public decimal? WGT_S { get; set; }
} }
} }

@ -2520,8 +2520,6 @@ namespace ibk.IPD.Service.IPD_PS
return ltResult; return ltResult;
} }
public IList<TB_SUB_RESULT> GetHisC1RATE_ALL(GpPlateQueryArgs QAGP) public IList<TB_SUB_RESULT> GetHisC1RATE_ALL(GpPlateQueryArgs QAGP)
{ {
StringBuilder strSql = new StringBuilder(); //声明拼接Sql语句变量 StringBuilder strSql = new StringBuilder(); //声明拼接Sql语句变量
@ -2670,7 +2668,7 @@ namespace ibk.IPD.Service.IPD_PS
using (IDbContext db = ObjectContainer.GetObject<IDbContext>("db")) using (IDbContext db = ObjectContainer.GetObject<IDbContext>("db"))
{ {
strSql.AppendLine("select ManmMde_COUNT, SYS_COUNT, nvl(TO_CHAR(ManmMde_Yield , 'FM9999999990.00'), 0) ManmMde_Yield, nvl(TO_CHAR(SYS_Yield , 'FM9999999990.00'), 0) SYS_Yield, nvl(TO_CHAR(SYS_PERCENT , 'FM9999999990.00'), 0) SYS_PERCENT , SUB_DATE"); strSql.AppendLine("select ManmMde_COUNT, SYS_COUNT,WGT_M,WGT_S, nvl(TO_CHAR(ManmMde_Yield , 'FM9999999990.00'), 0) ManmMde_Yield, nvl(TO_CHAR(SYS_Yield , 'FM9999999990.00'), 0) SYS_Yield, nvl(TO_CHAR(SYS_PERCENT , 'FM9999999990.00'), 0) SYS_PERCENT , SUB_DATE");
strSql.AppendLine("from TB_SUB_RESULT where 1=1 and plt='C3'"); strSql.AppendLine("from TB_SUB_RESULT where 1=1 and plt='C3'");
if (QAGP.START_TIME != DateTime.MinValue) if (QAGP.START_TIME != DateTime.MinValue)
{ {
@ -2699,7 +2697,7 @@ namespace ibk.IPD.Service.IPD_PS
using (IDbContext db = ObjectContainer.GetObject<IDbContext>("db")) using (IDbContext db = ObjectContainer.GetObject<IDbContext>("db"))
{ {
strSql.AppendLine("select ManmMde_COUNT, SYS_COUNT, nvl(TO_CHAR(ManmMde_Yield , 'FM9999999990.00'), 0) ManmMde_Yield, nvl(TO_CHAR(SYS_Yield , 'FM9999999990.00'), 0) SYS_Yield, nvl(TO_CHAR(SYS_PERCENT , 'FM9999999990.00'), 0) SYS_PERCENT , SUB_DATE"); strSql.AppendLine("select ManmMde_COUNT, SYS_COUNT,WGT_M,WGT_S, nvl(TO_CHAR(ManmMde_Yield , 'FM9999999990.00'), 0) ManmMde_Yield, nvl(TO_CHAR(SYS_Yield , 'FM9999999990.00'), 0) SYS_Yield, nvl(TO_CHAR(SYS_PERCENT , 'FM9999999990.00'), 0) SYS_PERCENT , SUB_DATE");
strSql.AppendLine("from TB_SUB_RESULT where 1=1 and plt='C2'"); strSql.AppendLine("from TB_SUB_RESULT where 1=1 and plt='C2'");
if (QAGP.START_TIME != DateTime.MinValue) if (QAGP.START_TIME != DateTime.MinValue)
{ {
@ -2728,7 +2726,7 @@ namespace ibk.IPD.Service.IPD_PS
using (IDbContext db = ObjectContainer.GetObject<IDbContext>("db")) using (IDbContext db = ObjectContainer.GetObject<IDbContext>("db"))
{ {
strSql.AppendLine("select ManmMde_COUNT, SYS_COUNT, nvl(TO_CHAR(ManmMde_Yield , 'FM9999999990.00'), 0) ManmMde_Yield, nvl(TO_CHAR(SYS_Yield , 'FM9999999990.00'), 0) SYS_Yield, nvl(TO_CHAR(SYS_PERCENT, 'FM9999999990.00'), 0) SYS_PERCENT , SUB_DATE"); strSql.AppendLine("select ManmMde_COUNT, SYS_COUNT,WGT_M,WGT_S, nvl(TO_CHAR(ManmMde_Yield , 'FM9999999990.00'), 0) ManmMde_Yield, nvl(TO_CHAR(SYS_Yield , 'FM9999999990.00'), 0) SYS_Yield, nvl(TO_CHAR(SYS_PERCENT, 'FM9999999990.00'), 0) SYS_PERCENT , SUB_DATE");
strSql.AppendLine("from TB_SUB_RESULT where 1=1 and plt='C1'"); strSql.AppendLine("from TB_SUB_RESULT where 1=1 and plt='C1'");
if (QAGP.START_TIME != DateTime.MinValue) if (QAGP.START_TIME != DateTime.MinValue)
{ {

Loading…
Cancel
Save