修改质量验收接口

This commit is contained in:
高飞 2023-07-24 20:25:27 +08:00
parent f7ad4de2de
commit 9db016519d
1 changed files with 11 additions and 6 deletions

View File

@ -87,7 +87,7 @@ namespace BLL
if (!string.IsNullOrEmpty(controlPointType)) if (!string.IsNullOrEmpty(controlPointType))
{ {
string[] types = controlPointType.Split(','); string[] types = controlPointType.Split(',');
q = q.Where(e=> types.Contains(e.ControlPointType)); q = q.Where(e => types.Contains(e.ControlPointType));
} }
if (UnitWorkId != "0") if (UnitWorkId != "0")
{ {
@ -196,13 +196,13 @@ namespace BLL
dataTable.Columns.Add(row.ToString()); dataTable.Columns.Add(row.ToString());
} }
data.Tables.Add(dataTable); data.Tables.Add(dataTable);
for (int i = startRowIndex; i <= (startRowIndex + maximumRows)&&i<dataSet.Tables[0].Rows.Count; i++) for (int i = startRowIndex; i <= (startRowIndex + maximumRows) && i < dataSet.Tables[0].Rows.Count; i++)
{ {
var row = dataTable.NewRow(); var row = dataTable.NewRow();
row["AcceptanceCheckMan"] = dataSet.Tables[0].Rows[i]["AcceptanceCheckMan"]; row["AcceptanceCheckMan"] = dataSet.Tables[0].Rows[i]["AcceptanceCheckMan"];
row["SunNumber"] = dataSet.Tables[0].Rows[i]["SunNumber"]; row["SunNumber"] = dataSet.Tables[0].Rows[i]["SunNumber"];
row["OneStatisticsSunNumber"] = dataSet.Tables[0].Rows[i]["OneStatisticsSunNumber"]; row["OneStatisticsSunNumber"] = dataSet.Tables[0].Rows[i]["OneStatisticsSunNumber"];
row["OneStatistics"] = dataSet.Tables[0].Rows[i]["OneStatistics"].ToString() +"%"; row["OneStatistics"] = dataSet.Tables[0].Rows[i]["OneStatistics"].ToString() + "%";
dataTable.Rows.Add(row); dataTable.Rows.Add(row);
} }
return data; return data;
@ -377,7 +377,8 @@ namespace BLL
/// <summary> /// <summary>
/// 根据id修改验收日期和是否一次合格 /// 根据id修改验收日期和是否一次合格
/// </summary> /// </summary>
public static void UpdateByInspectionManagementId(Model.ProcessControl_InspectionManagement inspectionManagement) { public static void UpdateByInspectionManagementId(Model.ProcessControl_InspectionManagement inspectionManagement)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
Model.ProcessControl_InspectionManagement newInspectionManagement = db.ProcessControl_InspectionManagement.FirstOrDefault(e => e.InspectionId == inspectionManagement.InspectionId); Model.ProcessControl_InspectionManagement newInspectionManagement = db.ProcessControl_InspectionManagement.FirstOrDefault(e => e.InspectionId == inspectionManagement.InspectionId);
@ -385,6 +386,10 @@ namespace BLL
{ {
newInspectionManagement.InspectionDate = inspectionManagement.InspectionDate; newInspectionManagement.InspectionDate = inspectionManagement.InspectionDate;
newInspectionManagement.IsOnceQualified = inspectionManagement.IsOnceQualified; newInspectionManagement.IsOnceQualified = inspectionManagement.IsOnceQualified;
if (newInspectionManagement.IsOnceQualified == false)
{
newInspectionManagement.UnqualifiedReason = inspectionManagement.UnqualifiedReason;
}
newInspectionManagement.InspectionCode = inspectionManagement.InspectionCode; newInspectionManagement.InspectionCode = inspectionManagement.InspectionCode;
db.SubmitChanges(); db.SubmitChanges();
} }