|
|
@ -1667,19 +1667,19 @@ 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 ");
|
|
|
|
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("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 ");
|
|
|
|
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(" ,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 ");
|
|
|
|
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 ) ");
|
|
|
|
strSql.AppendLine(" SELECT * FROM YCTD_WH_NO_COPY WHERE RATE IS NOT NULL ) ");
|
|
|
|
strSql.AppendLine(" WHERE 1 = 1 ");
|
|
|
|
strSql.AppendLine(" WHERE 1 = 1 ");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1758,18 +1758,26 @@ namespace ibk.IPD.Controller.IPD_PS
|
|
|
|
//bool b = true;
|
|
|
|
//bool b = true;
|
|
|
|
foreach (var model in delModel)
|
|
|
|
foreach (var model in delModel)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
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) VALUES ( ");
|
|
|
|
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" +
|
|
|
|
|
|
|
|
",RATE,ORD_NO,ORD_ITEM,PLATE_NO,STLGRD" +
|
|
|
|
|
|
|
|
") 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));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", DateTime.Now.ToString("yyyyMMddHHmmss")));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", DateTime.Now.ToString("yyyyMMddHHmmss")));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", DateTime.Now.ToString("yyyyMMddHHmmss")));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", DateTime.Now.ToString("yyyyMMddHHmmss")));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", "不维护"));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", "不维护"));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", model.THK_TOL_MIN));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", model.THK_TOL_MIN));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}' ", model.THK_TOL_MAX));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", model.THK_TOL_MAX));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}' ", model.REMARK));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", model.REMARK));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}' ", model.STEEL_GRD_DETAIL));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", model.STEEL_GRD_DETAIL));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}' ", model.STDSPEC_STLGRD));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", model.STDSPEC_STLGRD));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}' ", model.STD_FLG));
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", model.STD_FLG));
|
|
|
|
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", model.RATE));
|
|
|
|
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", model.ORD_NO));
|
|
|
|
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", model.ORD_ITEM));
|
|
|
|
|
|
|
|
strSql.AppendLine(string.Format(" '{0}', ", model.PLATE_NO));
|
|
|
|
|
|
|
|
strSql.AppendLine(string.Format(" '{0}'", model.STLGRD));
|
|
|
|
strSql.AppendLine(string.Format(" ) "));
|
|
|
|
strSql.AppendLine(string.Format(" ) "));
|
|
|
|
db.Execute(strSql.ToString());
|
|
|
|
db.Execute(strSql.ToString());
|
|
|
|
|
|
|
|
|
|
|
|