移交尾项,修改列
This commit is contained in:
@@ -393,7 +393,7 @@ namespace FineUIPro.Web.Transfer
|
||||
}
|
||||
string result = string.Empty;
|
||||
ir = pds.Rows.Count;
|
||||
long? maxNumNO = -1;
|
||||
var maxNumNO = 0;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
List<Model.Transfer_PunchlistFrom> list = new List<Model.Transfer_PunchlistFrom>();
|
||||
@@ -402,10 +402,12 @@ namespace FineUIPro.Web.Transfer
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][1].ToString().Trim()))
|
||||
{
|
||||
//查询第一列,没查到的情况下作导入处理
|
||||
if (maxNumNO == -1) {
|
||||
maxNumNO = Funs.DB.Transfer_PunchlistFrom.Where(x => x.ProjectId == CurrUser.LoginProjectId).Max(p => p.Num_NO);
|
||||
if (maxNumNO == null)
|
||||
maxNumNO = 1001;
|
||||
if (maxNumNO == 0) {
|
||||
var modelTp = Funs.DB.Transfer_PunchlistFrom.OrderByDescending(x=>x.Num_NO).FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||
if (modelTp == null)
|
||||
maxNumNO = 1;
|
||||
else
|
||||
maxNumNO = Convert.ToInt32(modelTp.Num_NO) + 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -414,7 +416,7 @@ namespace FineUIPro.Web.Transfer
|
||||
model.Id = Guid.NewGuid().ToString();
|
||||
model.ProjectId = CurrUser.LoginProjectId;
|
||||
|
||||
model.Num_NO = maxNumNO;
|
||||
model.Num_NO = maxNumNO.ToString("0000");
|
||||
model.System_No = pds.Rows[i][0].ToString().Trim();
|
||||
model.Sub_Sys_No = pds.Rows[i][1].ToString().Trim();
|
||||
model.DESCRIPTION = pds.Rows[i][2].ToString().Trim();
|
||||
@@ -431,10 +433,8 @@ namespace FineUIPro.Web.Transfer
|
||||
else
|
||||
model.IsEng = false;
|
||||
|
||||
if (pds.Rows[i][8].ToString().Trim().Contains("Y"))
|
||||
model.IsMatI = true;
|
||||
else
|
||||
model.IsMatI = false;
|
||||
model.IsMatI = pds.Rows[i][8].ToString().Trim();
|
||||
|
||||
model.Punch_Type = pds.Rows[i][9].ToString().Trim();
|
||||
DateTime t10;
|
||||
if (DateTime.TryParse(pds.Rows[i][10].ToString(), out t10) && !string.IsNullOrEmpty(pds.Rows[i][10].ToString()))
|
||||
|
||||
Reference in New Issue
Block a user