修改质量人员接口

This commit is contained in:
2022-09-08 09:05:35 +08:00
parent f5ab6ad44f
commit 5ba3955b4a
5 changed files with 92 additions and 12 deletions
+4 -5
View File
@@ -46,7 +46,7 @@
<HintPath>..\packages\Apache.NMS.ActiveMQ.1.7.2\lib\net40\Apache.NMS.ActiveMQ.dll</HintPath> <HintPath>..\packages\Apache.NMS.ActiveMQ.1.7.2\lib\net40\Apache.NMS.ActiveMQ.dll</HintPath>
</Reference> </Reference>
<Reference Include="Aspose.Words"> <Reference Include="Aspose.Words">
<HintPath>..\FineUIPro\Reference BLL\Aspose.Words.dll</HintPath> <HintPath>bin\Debug\Aspose.Words.dll</HintPath>
</Reference> </Reference>
<Reference Include="BouncyCastle.Crypto, Version=1.8.9.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL"> <Reference Include="BouncyCastle.Crypto, Version=1.8.9.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
<HintPath>..\packages\Portable.BouncyCastle.1.8.9\lib\net40\BouncyCastle.Crypto.dll</HintPath> <HintPath>..\packages\Portable.BouncyCastle.1.8.9\lib\net40\BouncyCastle.Crypto.dll</HintPath>
@@ -56,7 +56,7 @@
</Reference> </Reference>
<Reference Include="FineUIPro, Version=6.3.0.0, Culture=neutral, PublicKeyToken=9cbe753c029f291a, processorArchitecture=MSIL"> <Reference Include="FineUIPro, Version=6.3.0.0, Culture=neutral, PublicKeyToken=9cbe753c029f291a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\FineUIPro\FineUIPro.dll</HintPath> <HintPath>bin\Debug\FineUIPro.dll</HintPath>
</Reference> </Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.3.11, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"> <Reference Include="ICSharpCode.SharpZipLib, Version=1.3.3.11, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath> <HintPath>..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
@@ -115,9 +115,8 @@
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="ThoughtWorks.QRCode, Version=1.0.2774.19990, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ThoughtWorks.QRCode">
<SpecificVersion>False</SpecificVersion> <HintPath>bin\Debug\ThoughtWorks.QRCode.dll</HintPath>
<HintPath>..\FineUIPro\Reference BLL\ThoughtWorks.QRCode.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -125,5 +125,66 @@ namespace BLL
Funs.DB.SubmitChanges(); Funs.DB.SubmitChanges();
} }
} }
#region
public static List<Model.View_Welder_WelderQualify> GetWelderQualifyListDataForApi(string personId, int index, int page)
{
using (var db = new Model.SGGLDB(Funs.ConnString))
{
IQueryable<Model.View_Welder_WelderQualify> q = db.View_Welder_WelderQualify;
List<string> ids = new List<string>();
if (!string.IsNullOrEmpty(personId))
{
q = q.Where(e => e.WelderId == personId);
}
var qq1 = from x in q
orderby x.PersonName
select new
{
x.WelderQualifyId,
x.IsAudit,
x.QualificationItem,
x.CheckDate,
x.LimitDate,
x.WeldingMethod,
x.MaterialType,
x.WeldingLocation,
x.Thickness,
x.Sizes,
x.Thickness2,
x.Sizes2,
x.WeldType,
x.IsCanWeldG,
x.Remark,
x.PersonName,
};
var list = qq1.Skip(index * page).Take(page).ToList();
List<Model.View_Welder_WelderQualify> listRes = new List<Model.View_Welder_WelderQualify>();
for (int i = 0; i < list.Count; i++)
{
Model.View_Welder_WelderQualify x = new Model.View_Welder_WelderQualify();
x.WelderQualifyId = list[i].WelderQualifyId;
x.IsAudit = list[i].IsAudit;
x.QualificationItem = list[i].QualificationItem;
x.CheckDate = list[i].CheckDate;
x.LimitDate = list[i].LimitDate;
x.WeldingMethod = list[i].WeldingMethod;
x.MaterialType = list[i].MaterialType;
x.WeldingLocation = list[i].WeldingLocation;
x.Thickness = list[i].Thickness;
x.Sizes = list[i].Sizes;
x.Thickness2 = list[i].Thickness2;
x.Sizes2 = list[i].Sizes2;
x.WeldType = list[i].WeldType;
x.IsCanWeldG = list[i].IsCanWeldG;
x.Remark = list[i].Remark;
x.PersonName = list[i].PersonName;
listRes.Add(x);
}
return listRes;
}
}
#endregion
} }
} }
@@ -1110,6 +1110,7 @@ namespace BLL
} }
#endregion #endregion
#region
public static void UpdateWelderForApi(Model.SitePerson_Person Welder) public static void UpdateWelderForApi(Model.SitePerson_Person Welder)
{ {
@@ -1131,5 +1132,6 @@ namespace BLL
db.SubmitChanges(); db.SubmitChanges();
} }
} }
#endregion
} }
} }
+1 -1
View File
@@ -1087,7 +1087,7 @@ namespace BLL
where y.ProjectId == projectId && z.ProjectId == projectId where y.ProjectId == projectId && z.ProjectId == projectId
where unitType == "" || unitTypes.Contains(z.UnitType) where unitType == "" || unitTypes.Contains(z.UnitType)
where unitId == "" || unitIds.Contains(z.UnitId) where unitId == "" || unitIds.Contains(z.UnitId)
where y.States == Const.State_1 where y.States == Const.State_1 && y.RoleIds != null
orderby z.UnitType descending, x.PersonName orderby z.UnitType descending, x.PersonName
select x).ToList(); select x).ToList();
} }
@@ -78,5 +78,23 @@ namespace Mvc.Controllers
}; };
APIUpLoadFileService.SaveAttachUrl(toDoItem); APIUpLoadFileService.SaveAttachUrl(toDoItem);
} }
/// <summary>
/// 焊工合格项目列表
/// </summary>
/// <param name="projectId"></param>
/// <param name="index"></param>
/// <param name="page"></param>
/// <param name="unitId"></param>
/// <returns></returns>
[HttpGet]
public ResponseData<List<View_Welder_WelderQualify>> WelderQualifyIndex(string personId, int index, int page)
{
ResponseData<List<View_Welder_WelderQualify>> res = new ResponseData<List<View_Welder_WelderQualify>>();
res.successful = true;
res.resultValue = BLL.WelderQualifyService.GetWelderQualifyListDataForApi(personId, index, page);
return res;
}
} }
} }