修改质量人员接口

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

View File

@ -46,7 +46,7 @@
<HintPath>..\packages\Apache.NMS.ActiveMQ.1.7.2\lib\net40\Apache.NMS.ActiveMQ.dll</HintPath>
</Reference>
<Reference Include="Aspose.Words">
<HintPath>..\FineUIPro\Reference BLL\Aspose.Words.dll</HintPath>
<HintPath>bin\Debug\Aspose.Words.dll</HintPath>
</Reference>
<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>
@ -56,7 +56,7 @@
</Reference>
<Reference Include="FineUIPro, Version=6.3.0.0, Culture=neutral, PublicKeyToken=9cbe753c029f291a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\FineUIPro\FineUIPro.dll</HintPath>
<HintPath>bin\Debug\FineUIPro.dll</HintPath>
</Reference>
<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>
@ -115,9 +115,8 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="ThoughtWorks.QRCode, Version=1.0.2774.19990, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\FineUIPro\Reference BLL\ThoughtWorks.QRCode.dll</HintPath>
<Reference Include="ThoughtWorks.QRCode">
<HintPath>bin\Debug\ThoughtWorks.QRCode.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>

View File

@ -125,5 +125,66 @@ namespace BLL
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
}
}

View File

@ -1110,6 +1110,7 @@ namespace BLL
}
#endregion
#region
public static void UpdateWelderForApi(Model.SitePerson_Person Welder)
{
@ -1131,5 +1132,6 @@ namespace BLL
db.SubmitChanges();
}
}
#endregion
}
}

View File

@ -43,7 +43,7 @@ namespace BLL
/// <param name="personType">人员类型</param>
/// <param name="Grid1"></param>
/// <returns></returns>
public static IEnumerable getListData(string unitId, string departId, string projetcId, string name, string idCard, string isPost,string personType, Grid Grid1)
public static IEnumerable getListData(string unitId, string departId, string projetcId, string name, string idCard, string isPost, string personType, Grid Grid1)
{
IQueryable<Model.Person_Persons> getDataList = getDataLists.OrderBy(x => x.UnitId).ThenBy(x => x.DepartId);
if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null)
@ -96,9 +96,9 @@ namespace BLL
x.JobNum,
x.Account,
x.IdentityCard,
Sex = x.Sex ?? "1",
x.Birthday,
x.UnitId,
Sex = x.Sex ?? "1",
x.Birthday,
x.UnitId,
db.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName,
x.DepartId,
db.Base_Depart.First(u => u.DepartId == x.DepartId).DepartName,
@ -118,10 +118,10 @@ namespace BLL
x.Address,
x.Telephone,
x.EduLevel,
EduLevelName= BasicDataService.GetDictNameByDictCode(x.EduLevel),
EduLevelName = BasicDataService.GetDictNameByDictCode(x.EduLevel),
x.Major,
x.PersonType,
PersonTypeName=DropListService.getPersonTypeNameByValue(x.PersonType),
PersonTypeName = DropListService.getPersonTypeNameByValue(x.PersonType),
x.ValidityDate,
};
}
@ -1087,7 +1087,7 @@ namespace BLL
where y.ProjectId == projectId && z.ProjectId == projectId
where unitType == "" || unitTypes.Contains(z.UnitType)
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
select x).ToList();
}

View File

@ -78,5 +78,23 @@ namespace Mvc.Controllers
};
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;
}
}
}