修改材料报验流程
This commit is contained in:
@@ -171,11 +171,11 @@ namespace FineUIPro.Web.CQMS.Material
|
||||
&& x.EquipmentName == pds.Rows[i][3].ToString() && x.EquipmentCode == pds.Rows[i][5].ToString() && x.ArrivalDate == Funs.GetNewDateTime(pds.Rows[i][9].ToString()));
|
||||
if (oldViewInfo == null)
|
||||
{
|
||||
string row0 = pds.Rows[i][0].ToString();
|
||||
if (string.IsNullOrEmpty(row0))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "合同编号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
//string row0 = pds.Rows[i][0].ToString();
|
||||
//if (string.IsNullOrEmpty(row0))
|
||||
//{
|
||||
// result += (i + 2).ToString() + "," + "合同编号" + "," + "此项为必填项!" + "|";
|
||||
//}
|
||||
|
||||
string row1 = pds.Rows[i][1].ToString();
|
||||
if (string.IsNullOrEmpty(row1))
|
||||
@@ -192,12 +192,14 @@ namespace FineUIPro.Web.CQMS.Material
|
||||
}
|
||||
|
||||
string row2 = pds.Rows[i][2].ToString();
|
||||
if (string.IsNullOrEmpty(row2))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "主项名称" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
//if (string.IsNullOrEmpty(row2))
|
||||
//{
|
||||
// result += (i + 2).ToString() + "," + "主项名称" + "," + "此项为必填项!" + "|";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
if (!string.IsNullOrEmpty(row2))
|
||||
{
|
||||
var mainItem = mainItems.FirstOrDefault(x => x.MainItemName == row2);
|
||||
if (mainItem == null)
|
||||
{
|
||||
@@ -240,22 +242,22 @@ namespace FineUIPro.Web.CQMS.Material
|
||||
result += (i + 2).ToString() + "," + "数量" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
string row9 = pds.Rows[i][9].ToString();
|
||||
if (!string.IsNullOrEmpty(row9))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime d = Convert.ToDateTime(row9.Trim());
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "到货日期" + "," + "[" + row9 + "]格式错误!" + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "到货日期" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
//string row9 = pds.Rows[i][9].ToString();
|
||||
//if (!string.IsNullOrEmpty(row9))
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// DateTime d = Convert.ToDateTime(row9.Trim());
|
||||
// }
|
||||
// catch (Exception)
|
||||
// {
|
||||
// result += (i + 2).ToString() + "," + "到货日期" + "," + "[" + row9 + "]格式错误!" + "|";
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// result += (i + 2).ToString() + "," + "到货日期" + "," + "此项为必填项!" + "|";
|
||||
//}
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
@@ -416,7 +418,7 @@ namespace FineUIPro.Web.CQMS.Material
|
||||
equipment.PressClass = pds.Rows[i][6].ToString().Trim();
|
||||
equipment.Unit = pds.Rows[i][7].ToString().Trim();
|
||||
equipment.Num = Funs.GetNewDecimalOrZero(pds.Rows[i][8].ToString().Trim());
|
||||
equipment.ArrivalDate = Funs.GetNewDateTimeOrNow(pds.Rows[i][9].ToString().Trim());
|
||||
equipment.ArrivalDate = Funs.GetNewDateTime(pds.Rows[i][9].ToString().Trim());
|
||||
equipment.CompileMan = this.CurrUser.PersonId;
|
||||
equipment.CompileDate = DateTime.Now;
|
||||
BLL.CQMS_EquipmentService.AddEquipment(equipment);
|
||||
|
||||
Reference in New Issue
Block a user