2023-03-16
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
alter table Train_TrainPlan add AttachUrl nvarchar(1000) null
|
||||||
|
GO
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
insert into Sys_Role values('FB3EF667-7C38-48EC-9D64-A2A19A0D9E57','Ê©¹¤ÀÍÎñ','50','',1,1)
|
|
||||||
|
|
||||||
|
|
||||||
@@ -739,5 +739,119 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 获取质量培训对象
|
||||||
|
/// <summary>
|
||||||
|
/// 获取质量培训对象
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<Model.BaseInfoItem> getPlanTrainPersons()
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var getDataLists = (from x in db.Base_CQMSTrainObject
|
||||||
|
orderby x.TrainObjectCode
|
||||||
|
select new Model.BaseInfoItem { BaseInfoId = x.TrainObjectId, BaseInfoName = x.TrainObjectName }).ToList();
|
||||||
|
return getDataLists;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取质量培训类别
|
||||||
|
/// <summary>
|
||||||
|
/// 获取质量培训类别
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<Model.BaseInfoItem> getCQMSTrainType()
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var getDataLists = (from x in Funs.DB.Base_CQMSTrainType
|
||||||
|
orderby x.TrainTypeCode
|
||||||
|
select new Model.BaseInfoItem { BaseInfoId = x.TrainTypeId, BaseInfoCode = x.TrainTypeCode, BaseInfoName = x.TrainTypeName }).ToList();
|
||||||
|
return getDataLists;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取质量培训主持人
|
||||||
|
/// <summary>
|
||||||
|
/// 获取质量培训主持人
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<Model.BaseInfoItem> getCQMSTrainHostMan(string projectId)
|
||||||
|
{
|
||||||
|
var list = BLL.SitePerson_PersonService.GetSitePerson_PersonListByProjectIdUnitTypeRoleIds(projectId, Const.ProjectUnitType_1, Const.QAManager + "," + Const.CQEngineer);
|
||||||
|
List<Model.BaseInfoItem> items = new List<Model.BaseInfoItem>();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
Model.BaseInfoItem b = new Model.BaseInfoItem();
|
||||||
|
b.BaseInfoId = item.PersonId;
|
||||||
|
b.BaseInfoName = item.PersonName;
|
||||||
|
items.Add(b);
|
||||||
|
}
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取质量培训参与培训教育人员信息
|
||||||
|
/// <summary>
|
||||||
|
/// 获取质量培训参与培训教育人员信息
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<Model.BaseInfoItem> getRealTrainPersons(string projectId)
|
||||||
|
{
|
||||||
|
var list = BLL.SitePerson_PersonService.GetSitePerson_PersonListByProjectIdUnitTypeRoleIds(projectId, Const.ProjectUnitType_1 + "," + Const.ProjectUnitType_2, null);
|
||||||
|
List<Model.BaseInfoItem> items = new List<Model.BaseInfoItem>();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
Model.BaseInfoItem b = new Model.BaseInfoItem();
|
||||||
|
b.BaseInfoId = item.PersonId;
|
||||||
|
b.BaseInfoName = item.PersonName;
|
||||||
|
items.Add(b);
|
||||||
|
}
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取质量会议主持人
|
||||||
|
/// <summary>
|
||||||
|
/// 获取质量会议主持人
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<Model.BaseInfoItem> getCQMSMeetingHostMan(string projectId,string unitId)
|
||||||
|
{
|
||||||
|
var list = BLL.SitePerson_PersonService.GetSitePerson_PersonListByUnitIdsRoleIds(projectId, unitId, null);
|
||||||
|
List<Model.BaseInfoItem> items = new List<Model.BaseInfoItem>();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
Model.BaseInfoItem b = new Model.BaseInfoItem();
|
||||||
|
b.BaseInfoId = item.PersonId;
|
||||||
|
b.BaseInfoName = item.PersonName;
|
||||||
|
items.Add(b);
|
||||||
|
}
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取质量会议参加人员
|
||||||
|
/// <summary>
|
||||||
|
/// 获取质量会议参加人员
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<Model.BaseInfoItem> getAttentPerson(string projectId)
|
||||||
|
{
|
||||||
|
var list = BLL.SitePerson_PersonService.GetSitePerson_PersonListByProjectIdUnitTypeRoleIds(projectId, Const.ProjectUnitType_1 + "," + Const.ProjectUnitType_2, null);
|
||||||
|
List<Model.BaseInfoItem> items = new List<Model.BaseInfoItem>();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
Model.BaseInfoItem b = new Model.BaseInfoItem();
|
||||||
|
b.BaseInfoId = item.PersonId;
|
||||||
|
b.BaseInfoName = item.PersonName;
|
||||||
|
items.Add(b);
|
||||||
|
}
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
using Microsoft.SqlServer.Dts.Runtime;
|
using Microsoft.SqlServer.Dts.Runtime;
|
||||||
|
using Model;
|
||||||
|
using NPOI.SS.Formula.PTG;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
@@ -572,7 +574,16 @@ namespace BLL
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(newProjectPerson.SitePersonId))
|
if (!string.IsNullOrEmpty(newProjectPerson.SitePersonId))
|
||||||
{
|
{
|
||||||
SitePerson_PersonService.UpdateSitePerson(newProjectPerson);
|
Model.Sys_Log newlog = new Sys_Log
|
||||||
|
{
|
||||||
|
UserId = newPerson.PersonId,
|
||||||
|
MenuId = Const.PersonListMenuId,
|
||||||
|
OperationName = "APP修改人员",
|
||||||
|
OperationLog = "修改人员"+newPerson.PersonName,
|
||||||
|
DataId = newPerson.PersonId,
|
||||||
|
ProjectId = person.ProjectId,
|
||||||
|
};
|
||||||
|
SitePerson_PersonService.UpdateSitePerson(newProjectPerson, newlog);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,6 +36,25 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取项目所有单位信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<Model.BaseInfoItem> getProjectUnitLists(string projectId)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var units = (from x in db.Base_Unit
|
||||||
|
join y in db.Project_ProjectUnit
|
||||||
|
on x.UnitId equals y.UnitId
|
||||||
|
where y.ProjectId == projectId
|
||||||
|
orderby x.UnitName
|
||||||
|
select new Model.BaseInfoItem { BaseInfoId = x.UnitId, BaseInfoCode = x.UnitCode, BaseInfoName = x.UnitName }).ToList();
|
||||||
|
return units;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据projectId、unitType获取单位信息(总包1;施工分包2;监理3;业主4;其他5)
|
/// 根据projectId、unitType获取单位信息(总包1;施工分包2;监理3;业主4;其他5)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -150,144 +150,6 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void AddProjectUser(string ProjectCode, string UserID)
|
|
||||||
{
|
|
||||||
Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString);
|
|
||||||
Base_Project base_Project = new Base_Project();
|
|
||||||
SitePerson_Person sitePerson = new SitePerson_Person();
|
|
||||||
base_Project = BLL.ProjectService.GetProjectByProjectCode(ProjectCode);
|
|
||||||
if (base_Project == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var ProUser = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(base_Project.ProjectId, UserID);
|
|
||||||
if (ProUser == null)
|
|
||||||
{
|
|
||||||
sitePerson.SitePersonId = SQLHelper.GetNewID();
|
|
||||||
sitePerson.ProjectId = base_Project.ProjectId;
|
|
||||||
sitePerson.PersonId = UserID;
|
|
||||||
sitePerson.UnitId = Const.UnitId_SEDIN;
|
|
||||||
sitePerson.States = Const.State_1;
|
|
||||||
SitePerson_PersonService.AddSitePerson(ProUser);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ProUser.ProjectId = base_Project.ProjectId;
|
|
||||||
ProUser.PersonId = UserID;
|
|
||||||
ProUser.UnitId = Const.UnitId_SEDIN;
|
|
||||||
ProUser.States = Const.State_1;
|
|
||||||
SitePerson_PersonService.UpdateSitePerson(ProUser);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static Pro_Person SavePro_Person(Pro_Person PersonjsonData)
|
|
||||||
{
|
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
|
||||||
{
|
|
||||||
Pro_Person rb = PersonjsonData;
|
|
||||||
|
|
||||||
Pro_Person _Person = new Pro_Person
|
|
||||||
{
|
|
||||||
data = new List<Pro_PersonDataItem>()
|
|
||||||
};
|
|
||||||
foreach (Pro_PersonDataItem item in rb.data)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (CheckDataIsNull(item)) //判断参数是否有空值
|
|
||||||
{
|
|
||||||
Pro_PersonDataItem pro_personDataItem = new Pro_PersonDataItem
|
|
||||||
{
|
|
||||||
ProjectCode = item.ProjectCode,
|
|
||||||
UserCode = item.UserCode,
|
|
||||||
UserName = item.UserName,
|
|
||||||
IdentityCard = item.IdentityCard
|
|
||||||
};
|
|
||||||
|
|
||||||
_Person.data.Add(pro_personDataItem);
|
|
||||||
_Person.Message += item.UserCode + "--参数有误存在null值|";
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (item.UserCode == null || item.UserCode == "")
|
|
||||||
{
|
|
||||||
Pro_PersonDataItem pro_personDataItem = new Pro_PersonDataItem
|
|
||||||
{
|
|
||||||
ProjectCode = item.ProjectCode,
|
|
||||||
UserCode = item.UserCode,
|
|
||||||
UserName = item.UserName,
|
|
||||||
IdentityCard = item.IdentityCard
|
|
||||||
};
|
|
||||||
|
|
||||||
_Person.data.Add(pro_personDataItem);
|
|
||||||
_Person.Message += item.UserCode + "--身份证信息有误|";
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.ProjectCode == null || item.ProjectCode == "")
|
|
||||||
{
|
|
||||||
Pro_PersonDataItem pro_personDataItem = new Pro_PersonDataItem
|
|
||||||
{
|
|
||||||
ProjectCode = item.ProjectCode,
|
|
||||||
UserCode = item.UserCode,
|
|
||||||
UserName = item.UserName,
|
|
||||||
IdentityCard = item.IdentityCard
|
|
||||||
};
|
|
||||||
|
|
||||||
_Person.data.Add(pro_personDataItem);
|
|
||||||
_Person.Message += item.UserCode + "--项目代号不能为空|";
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var getPerson = Person_PersonsService.GetPerson_PersonsByJobNum(item.UserCode);
|
|
||||||
if (getPerson != null)
|
|
||||||
{
|
|
||||||
getPerson.JobNum = item.UserCode;
|
|
||||||
getPerson.PersonName = item.UserName;
|
|
||||||
getPerson.DataFrom = "API";
|
|
||||||
db.SubmitChanges();
|
|
||||||
APIHTGLPersonService.AddProjectUser(item.ProjectCode, getPerson.PersonId);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string newKeyID = SQLHelper.GetNewID();
|
|
||||||
Model.Person_Persons newUser = new Model.Person_Persons
|
|
||||||
{
|
|
||||||
PersonId = newKeyID,
|
|
||||||
Account = item.UserCode,
|
|
||||||
JobNum = item.UserCode,
|
|
||||||
PersonName = item.UserName,
|
|
||||||
IdentityCard = item.IdentityCard,
|
|
||||||
UnitId = Const.UnitId_SEDIN,
|
|
||||||
Password = Funs.EncryptionPassword(Const.Password),
|
|
||||||
DataFrom = "API",
|
|
||||||
};
|
|
||||||
db.Person_Persons.InsertOnSubmit(newUser);
|
|
||||||
db.SubmitChanges();
|
|
||||||
AddProjectUser(item.ProjectCode, newKeyID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Pro_PersonDataItem pro_personDataItem = new Pro_PersonDataItem
|
|
||||||
{
|
|
||||||
ProjectCode = item.ProjectCode,
|
|
||||||
UserCode = item.UserCode,
|
|
||||||
UserName = item.UserName,
|
|
||||||
IdentityCard = item.IdentityCard
|
|
||||||
};
|
|
||||||
|
|
||||||
_Person.data.Add(pro_personDataItem);
|
|
||||||
_Person.Message += ex.Message;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _Person;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool CheckDataIsNull(object t)
|
private static bool CheckDataIsNull(object t)
|
||||||
{
|
{
|
||||||
bool Isok = false;
|
bool Isok = false;
|
||||||
|
|||||||
@@ -91,6 +91,18 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string GetHandleManName(string MeetingId)
|
||||||
|
{
|
||||||
|
string name = string.Empty;
|
||||||
|
var a = Funs.DB.Meeting_CQMSMeetingApprove.FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveDate == null);
|
||||||
|
if (a != null)
|
||||||
|
{
|
||||||
|
name = BLL.Person_PersonsService.GetPersonsNameById(a.ApproveMan);
|
||||||
|
}
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据质量会议编号获取一个质量会议审批信息
|
/// 根据质量会议编号获取一个质量会议审批信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -155,5 +167,92 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
return db.Meeting_CQMSMeetingApprove.FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveType == BLL.Const.CQMSMeeting_Compile);
|
return db.Meeting_CQMSMeetingApprove.FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveType == BLL.Const.CQMSMeeting_Compile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<Model.Meeting_CQMSMeetingApprove> GetListDataByIdForApi(string id)
|
||||||
|
{
|
||||||
|
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var q = from x in db.Meeting_CQMSMeetingApprove
|
||||||
|
where x.MeetingId == id && x.ApproveDate != null && x.ApproveType != "S"
|
||||||
|
orderby x.ApproveDate
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
x.MeetingApproveId,
|
||||||
|
x.MeetingId,
|
||||||
|
ApproveMan = (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
|
||||||
|
x.ApproveDate,
|
||||||
|
x.IsAgree,
|
||||||
|
x.ApproveIdea,
|
||||||
|
x.ApproveType,
|
||||||
|
};
|
||||||
|
List<Model.Meeting_CQMSMeetingApprove> res = new List<Model.Meeting_CQMSMeetingApprove>();
|
||||||
|
var list = q.ToList();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
Model.Meeting_CQMSMeetingApprove approve = new Model.Meeting_CQMSMeetingApprove();
|
||||||
|
approve.MeetingApproveId = item.MeetingApproveId;
|
||||||
|
approve.MeetingId = item.MeetingId;
|
||||||
|
approve.ApproveMan = item.ApproveMan;
|
||||||
|
approve.ApproveDate = item.ApproveDate;
|
||||||
|
approve.IsAgree = item.IsAgree;
|
||||||
|
approve.ApproveIdea = item.ApproveIdea;
|
||||||
|
approve.ApproveType = item.ApproveType;
|
||||||
|
res.Add(approve);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Model.Meeting_CQMSMeetingApprove getCurrApproveForApi(string id)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
Model.Meeting_CQMSMeetingApprove newApprove = db.Meeting_CQMSMeetingApprove.FirstOrDefault(e => e.MeetingId == id && e.ApproveType != "S" && e.ApproveDate == null);
|
||||||
|
return newApprove;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string AddMeetingApproveForApi(Model.Meeting_CQMSMeetingApprove approve)
|
||||||
|
{
|
||||||
|
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
string newKeyID = SQLHelper.GetNewID(typeof(Model.Meeting_CQMSMeetingApprove));
|
||||||
|
Model.Meeting_CQMSMeetingApprove newApprove = new Model.Meeting_CQMSMeetingApprove();
|
||||||
|
newApprove.MeetingApproveId = newKeyID;
|
||||||
|
newApprove.MeetingId = approve.MeetingId;
|
||||||
|
newApprove.ApproveMan = approve.ApproveMan;
|
||||||
|
newApprove.ApproveDate = approve.ApproveDate;
|
||||||
|
newApprove.ApproveIdea = approve.ApproveIdea;
|
||||||
|
newApprove.IsAgree = approve.IsAgree;
|
||||||
|
newApprove.ApproveType = approve.ApproveType;
|
||||||
|
|
||||||
|
db.Meeting_CQMSMeetingApprove.InsertOnSubmit(newApprove);
|
||||||
|
db.SubmitChanges();
|
||||||
|
return newKeyID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void UpdateMeetingApproveForApi(Model.Meeting_CQMSMeetingApprove approve)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
Model.Meeting_CQMSMeetingApprove newApprove = db.Meeting_CQMSMeetingApprove.FirstOrDefault(e => e.MeetingApproveId == approve.MeetingApproveId && e.ApproveDate == null);
|
||||||
|
if (newApprove != null)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(approve.ApproveMan))
|
||||||
|
newApprove.ApproveMan = approve.ApproveMan;
|
||||||
|
if (approve.ApproveDate.HasValue)
|
||||||
|
newApprove.ApproveDate = approve.ApproveDate;
|
||||||
|
if (!string.IsNullOrEmpty(approve.ApproveIdea))
|
||||||
|
newApprove.ApproveIdea = approve.ApproveIdea;
|
||||||
|
if (approve.IsAgree.HasValue)
|
||||||
|
newApprove.IsAgree = approve.IsAgree;
|
||||||
|
if (!string.IsNullOrEmpty(approve.ApproveType))
|
||||||
|
newApprove.ApproveType = approve.ApproveType;
|
||||||
|
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,5 +156,266 @@ namespace BLL
|
|||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据状态选择下一步办理类型
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="state"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<Model.BaseInfoItem> GetDHandleTypeByStateForApi(string state)
|
||||||
|
{
|
||||||
|
List<Model.BaseInfoItem> list = new List<Model.BaseInfoItem>();
|
||||||
|
if (state == Const.CQMSMeeting_Compile || state == Const.CQMSMeeting_ReCompile)
|
||||||
|
{
|
||||||
|
Model.BaseInfoItem item = new Model.BaseInfoItem();
|
||||||
|
item.BaseInfoId = Const.CQMSMeeting_Audit;
|
||||||
|
item.BaseInfoName = "总包质量经理审批";
|
||||||
|
list.Add(item);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
else if (state == Const.CQMSMeeting_Audit)
|
||||||
|
{
|
||||||
|
Model.BaseInfoItem item = new Model.BaseInfoItem();
|
||||||
|
item.BaseInfoId = Const.CQMSMeeting_Complete;
|
||||||
|
item.BaseInfoName = "审批完成";
|
||||||
|
list.Add(item);
|
||||||
|
Model.BaseInfoItem item2 = new Model.BaseInfoItem();
|
||||||
|
item2.BaseInfoId = Const.CQMSMeeting_ReCompile;
|
||||||
|
item2.BaseInfoName = "重新编制";
|
||||||
|
list.Add(item2);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据状态选择下一步办理类型
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="state"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<Model.BaseInfoItem> GetHandleManListForApi(string state, string id, string projectId)
|
||||||
|
{
|
||||||
|
List<Model.BaseInfoItem> list = new List<Model.BaseInfoItem>();
|
||||||
|
if (state == Const.CQMSMeeting_Compile)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
else if (state == Const.CQMSMeeting_ReCompile)
|
||||||
|
{
|
||||||
|
var user = BLL.Person_PersonsService.GetPerson_PersonsById(BLL.CQMS_MeetingApproveService.GetAuditMan(id, BLL.Const.CQMSMeeting_Compile).ApproveMan);
|
||||||
|
Model.BaseInfoItem item = new Model.BaseInfoItem();
|
||||||
|
item.BaseInfoId = user.PersonId;
|
||||||
|
item.BaseInfoName = user.PersonName;
|
||||||
|
list.Add(item);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
else if (state == Const.CQMSMeeting_Audit)
|
||||||
|
{
|
||||||
|
var users = BLL.SitePerson_PersonService.GetSitePerson_PersonListByProjectIdUnitTypeRoleIds(projectId, Const.ProjectUnitType_1, null);
|
||||||
|
foreach (var user in users)
|
||||||
|
{
|
||||||
|
Model.BaseInfoItem item = new Model.BaseInfoItem();
|
||||||
|
item.BaseInfoId = user.PersonId;
|
||||||
|
item.BaseInfoName = user.PersonName;
|
||||||
|
list.Add(item);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 把状态转换代号为文字形式
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="state"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string ConvertState(object state)
|
||||||
|
{
|
||||||
|
if (state != null)
|
||||||
|
{
|
||||||
|
if (state.ToString() == BLL.Const.CQMSMeeting_ReCompile)
|
||||||
|
{
|
||||||
|
return "重新编制";
|
||||||
|
}
|
||||||
|
else if (state.ToString() == BLL.Const.CQMSMeeting_Compile)
|
||||||
|
{
|
||||||
|
return "编制";
|
||||||
|
}
|
||||||
|
else if (state.ToString() == BLL.Const.CQMSMeeting_Audit)
|
||||||
|
{
|
||||||
|
return "总包质量经理审批";
|
||||||
|
}
|
||||||
|
else if (state.ToString() == BLL.Const.CQMSMeeting_Complete)
|
||||||
|
{
|
||||||
|
return "审批完成";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<Model.Meeting_CQMSMeeting> getListDataForApi(string projectId, int startRowIndex, int maximumRows, string meetingType)
|
||||||
|
{
|
||||||
|
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
IQueryable<Model.Meeting_CQMSMeeting> q = db.Meeting_CQMSMeeting;
|
||||||
|
if (!string.IsNullOrEmpty(projectId))
|
||||||
|
{
|
||||||
|
q = q.Where(e => e.ProjectId == projectId);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(meetingType))
|
||||||
|
{
|
||||||
|
q = q.Where(e => e.MeetingType == meetingType);
|
||||||
|
}
|
||||||
|
var qres = from x in q
|
||||||
|
orderby x.CompileDate descending
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
x.MeetingId,
|
||||||
|
x.ProjectId,
|
||||||
|
x.UnitId,
|
||||||
|
UnitName = (from y in db.Base_Unit where y.UnitId == x.UnitId select y.UnitName).First(),
|
||||||
|
x.MeetingType,
|
||||||
|
MeetingTypeStr = x.MeetingType == "M" ? "质量月例会" : "质量专题会",
|
||||||
|
x.MeetingCode,
|
||||||
|
x.MeetingDate,
|
||||||
|
x.Place,
|
||||||
|
x.HostMan,
|
||||||
|
HostManName = BLL.Person_PersonsService.getPersonsNamesPersonIds(x.HostMan),
|
||||||
|
x.AttentPerson,
|
||||||
|
AttentPersonName = BLL.Person_PersonsService.getPersonsNamesPersonIds(x.AttentPerson),
|
||||||
|
x.AttentPersonNum,
|
||||||
|
x.MeetingTheme,
|
||||||
|
x.MeetingContents,
|
||||||
|
x.CompileDate,
|
||||||
|
x.CompileMan,
|
||||||
|
x.State,
|
||||||
|
StateStr = ConvertState(x.State),
|
||||||
|
CompileManName = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
|
||||||
|
HandleManName = BLL.CQMS_MeetingApproveService.GetHandleManName(x.MeetingId),
|
||||||
|
x.AttachUrl,
|
||||||
|
};
|
||||||
|
List<Model.Meeting_CQMSMeeting> res = new List<Model.Meeting_CQMSMeeting>();
|
||||||
|
var list = qres.Skip(startRowIndex).Take(maximumRows).ToList();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
Model.Meeting_CQMSMeeting cd = new Model.Meeting_CQMSMeeting();
|
||||||
|
cd.MeetingId = item.MeetingId;
|
||||||
|
cd.ProjectId = item.ProjectId;
|
||||||
|
cd.UnitId = item.UnitId + "$" + item.UnitName;
|
||||||
|
cd.MeetingType = item.MeetingType + "$" + item.MeetingTypeStr;
|
||||||
|
cd.MeetingCode = item.MeetingCode;
|
||||||
|
cd.MeetingDate = item.MeetingDate;
|
||||||
|
cd.Place = item.Place;
|
||||||
|
cd.HostMan = item.HostMan + "$" + item.HostManName;
|
||||||
|
cd.AttentPerson = item.AttentPerson + "$" + item.AttentPersonName;
|
||||||
|
cd.AttentPersonNum = item.AttentPersonNum;
|
||||||
|
cd.MeetingTheme = item.MeetingTheme;
|
||||||
|
cd.MeetingContents = item.MeetingContents;
|
||||||
|
cd.CompileDate = item.CompileDate;
|
||||||
|
cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
|
||||||
|
cd.State = item.State + "$" + item.StateStr + "$" + item.HandleManName;
|
||||||
|
cd.AttachUrl = AttachFileService.getFileUrl(item.MeetingId);
|
||||||
|
res.Add(cd);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取质量会议信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="UnitWorkId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.Meeting_CQMSMeeting GetMeetingByMeetingIdForApi(string MeetingId)
|
||||||
|
{
|
||||||
|
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var q = db.Meeting_CQMSMeeting.FirstOrDefault(e => e.MeetingId == MeetingId);
|
||||||
|
if (q != null)
|
||||||
|
{
|
||||||
|
q.UnitId = q.UnitId + "$" + BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
|
||||||
|
q.MeetingType = q.MeetingType + "$" + (q.MeetingType == "M" ? "质量月例会" : "质量专题会");
|
||||||
|
q.HostMan = q.HostMan + "$" + BLL.Person_PersonsService.getPersonsNamesPersonIds(q.HostMan);
|
||||||
|
q.AttentPerson = q.AttentPerson + "$" + BLL.Person_PersonsService.getPersonsNamesPersonIds(q.AttentPerson);
|
||||||
|
q.CompileMan = q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan);
|
||||||
|
q.State = q.State + "$" + ConvertState(q.State) + "$" + BLL.CQMS_MeetingApproveService.GetHandleManName(q.MeetingId);
|
||||||
|
q.AttachUrl = AttachFileService.getFileUrl(q.MeetingId);
|
||||||
|
}
|
||||||
|
return q;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void AddMeetingForApi(Model.Meeting_CQMSMeeting Meeting)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
Model.Meeting_CQMSMeeting newCQMSMeeting = new Model.Meeting_CQMSMeeting
|
||||||
|
{
|
||||||
|
MeetingId = Meeting.MeetingId,
|
||||||
|
ProjectId = Meeting.ProjectId,
|
||||||
|
UnitId = Meeting.UnitId,
|
||||||
|
MeetingType = Meeting.MeetingType,
|
||||||
|
MeetingCode = Meeting.MeetingCode,
|
||||||
|
MeetingDate = Meeting.MeetingDate,
|
||||||
|
Place = Meeting.Place,
|
||||||
|
HostMan = Meeting.HostMan,
|
||||||
|
AttentPerson = Meeting.AttentPerson,
|
||||||
|
AttentPersonNum = Meeting.AttentPersonNum,
|
||||||
|
MeetingTheme = Meeting.MeetingTheme,
|
||||||
|
MeetingContents = Meeting.MeetingContents,
|
||||||
|
State = Meeting.State,
|
||||||
|
CompileMan = Meeting.CompileMan,
|
||||||
|
CompileDate = Meeting.CompileDate,
|
||||||
|
};
|
||||||
|
|
||||||
|
db.Meeting_CQMSMeeting.InsertOnSubmit(Meeting);
|
||||||
|
db.SubmitChanges();
|
||||||
|
|
||||||
|
Model.Meeting_CQMSMeetingApprove approve = new Model.Meeting_CQMSMeetingApprove();
|
||||||
|
approve.MeetingApproveId = BLL.SQLHelper.GetNewID();
|
||||||
|
approve.MeetingId = Meeting.MeetingId;
|
||||||
|
approve.ApproveType = BLL.Const.CQMSMeeting_Compile;
|
||||||
|
approve.ApproveMan = Meeting.CompileMan;
|
||||||
|
approve.ApproveDate = Meeting.CompileDate;
|
||||||
|
db.Meeting_CQMSMeetingApprove.InsertOnSubmit(approve);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void UpdateMeetingForApi(Model.Meeting_CQMSMeeting Meeting)
|
||||||
|
{
|
||||||
|
|
||||||
|
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
Model.Meeting_CQMSMeeting newMeeting = db.Meeting_CQMSMeeting.First(e => e.MeetingId == Meeting.MeetingId);
|
||||||
|
if (!string.IsNullOrEmpty(Meeting.UnitId))
|
||||||
|
newMeeting.UnitId = Meeting.UnitId;
|
||||||
|
if (!string.IsNullOrEmpty(Meeting.MeetingCode))
|
||||||
|
newMeeting.MeetingCode = Meeting.MeetingCode;
|
||||||
|
if (Meeting.MeetingDate.HasValue)
|
||||||
|
newMeeting.MeetingDate = Meeting.MeetingDate;
|
||||||
|
if (!string.IsNullOrEmpty(Meeting.Place))
|
||||||
|
newMeeting.Place = Meeting.Place;
|
||||||
|
if (!string.IsNullOrEmpty(Meeting.HostMan))
|
||||||
|
newMeeting.HostMan = Meeting.HostMan;
|
||||||
|
if (!string.IsNullOrEmpty(Meeting.AttentPerson))
|
||||||
|
newMeeting.AttentPerson = Meeting.AttentPerson;
|
||||||
|
if (Meeting.AttentPersonNum.HasValue)
|
||||||
|
newMeeting.AttentPersonNum = Meeting.AttentPersonNum;
|
||||||
|
if (!string.IsNullOrEmpty(Meeting.MeetingTheme))
|
||||||
|
newMeeting.MeetingTheme = Meeting.MeetingTheme;
|
||||||
|
if (!string.IsNullOrEmpty(Meeting.MeetingContents))
|
||||||
|
newMeeting.MeetingContents = Meeting.MeetingContents;
|
||||||
|
if (!string.IsNullOrEmpty(Meeting.State))
|
||||||
|
newMeeting.State = Meeting.State;
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,6 +115,16 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
return db.Plan_MainPlanApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType == state);
|
return db.Plan_MainPlanApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType == state);
|
||||||
}
|
}
|
||||||
|
public static string GetHandleManName(string MainPlanId)
|
||||||
|
{
|
||||||
|
string name = string.Empty;
|
||||||
|
var a = Funs.DB.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveDate == null);
|
||||||
|
if (a != null)
|
||||||
|
{
|
||||||
|
name = BLL.Person_PersonsService.GetPersonsNameById(a.ApproveMan);
|
||||||
|
}
|
||||||
|
return name;
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改总包施工计划审批信息
|
/// 修改总包施工计划审批信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -207,5 +217,40 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
return db.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType == BLL.Const.MainPlan_Compile);
|
return db.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType == BLL.Const.MainPlan_Compile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<Model.Plan_MainPlanApprove> getApproveListDataByIdForApi(string MainPlanId)
|
||||||
|
{
|
||||||
|
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var q = from x in db.Plan_MainPlanApprove
|
||||||
|
where x.MainPlanId == MainPlanId && x.ApproveDate != null && x.ApproveType != "S"
|
||||||
|
orderby x.ApproveDate
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
x.MainPlanApproveId,
|
||||||
|
x.MainPlanId,
|
||||||
|
ApproveMan = (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
|
||||||
|
x.ApproveDate,
|
||||||
|
x.IsAgree,
|
||||||
|
x.ApproveIdea,
|
||||||
|
x.ApproveType,
|
||||||
|
};
|
||||||
|
List<Model.Plan_MainPlanApprove> res = new List<Model.Plan_MainPlanApprove>();
|
||||||
|
var list = q.ToList();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
Model.Plan_MainPlanApprove cd = new Model.Plan_MainPlanApprove();
|
||||||
|
cd.MainPlanApproveId = item.MainPlanApproveId;
|
||||||
|
cd.MainPlanId = item.MainPlanId;
|
||||||
|
cd.ApproveMan = item.ApproveMan;
|
||||||
|
cd.ApproveDate = item.ApproveDate;
|
||||||
|
cd.IsAgree = item.IsAgree;
|
||||||
|
cd.ApproveIdea = item.ApproveIdea;
|
||||||
|
cd.ApproveType = item.ApproveType + "$" + CQMS_MainPlanService.ConvertState(item.ApproveType);
|
||||||
|
res.Add(cd);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,5 +123,114 @@ namespace BLL
|
|||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 把状态转换代号为文字形式
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="state"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string ConvertState(object state)
|
||||||
|
{
|
||||||
|
if (state != null)
|
||||||
|
{
|
||||||
|
if (state.ToString() == BLL.Const.MainPlan_ReCompile)
|
||||||
|
{
|
||||||
|
return "重新编制";
|
||||||
|
}
|
||||||
|
else if (state.ToString() == BLL.Const.MainPlan_Compile)
|
||||||
|
{
|
||||||
|
return "编制";
|
||||||
|
}
|
||||||
|
else if (state.ToString() == BLL.Const.MainPlan_Audit1)
|
||||||
|
{
|
||||||
|
return "施工经理审核";
|
||||||
|
}
|
||||||
|
else if (state.ToString() == BLL.Const.MainPlan_Audit2)
|
||||||
|
{
|
||||||
|
return "部门评审小组审核";
|
||||||
|
}
|
||||||
|
else if (state.ToString() == BLL.Const.MainPlan_Audit3)
|
||||||
|
{
|
||||||
|
return "审核";
|
||||||
|
}
|
||||||
|
else if (state.ToString() == BLL.Const.MainPlan_Audit4)
|
||||||
|
{
|
||||||
|
return "项目经理批准";
|
||||||
|
}
|
||||||
|
else if (state.ToString() == BLL.Const.MainPlan_Audit5)
|
||||||
|
{
|
||||||
|
return "评审小组组长确认";
|
||||||
|
}
|
||||||
|
else if (state.ToString() == BLL.Const.MainPlan_Complete)
|
||||||
|
{
|
||||||
|
return "审批完成";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<Model.Plan_MainPlan> getListDataForApi(string projectId, int startRowIndex, int maximumRows)
|
||||||
|
{
|
||||||
|
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
IQueryable<Model.Plan_MainPlan> q = db.Plan_MainPlan;
|
||||||
|
if (!string.IsNullOrEmpty(projectId))
|
||||||
|
{
|
||||||
|
q = q.Where(e => e.ProjectId == projectId);
|
||||||
|
}
|
||||||
|
var qres = from x in q
|
||||||
|
orderby x.CompileDate descending
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
x.MainPlanId,
|
||||||
|
x.PlanCode,
|
||||||
|
x.ProjectId,
|
||||||
|
x.FileName,
|
||||||
|
x.CompileDate,
|
||||||
|
x.CompileMan,
|
||||||
|
x.State,
|
||||||
|
StateStr = ConvertState(x.State),
|
||||||
|
CompileManName = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
|
||||||
|
HandleManName = BLL.CQMS_MainPlanApproveService.GetHandleManName(x.MainPlanId),
|
||||||
|
FilePath = x.FilePath,
|
||||||
|
};
|
||||||
|
List<Model.Plan_MainPlan> res = new List<Model.Plan_MainPlan>();
|
||||||
|
var list = qres.Skip(startRowIndex).Take(maximumRows).ToList();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
Model.Plan_MainPlan cd = new Model.Plan_MainPlan();
|
||||||
|
cd.MainPlanId = item.MainPlanId;
|
||||||
|
cd.ProjectId = item.ProjectId;
|
||||||
|
cd.PlanCode = item.PlanCode;
|
||||||
|
cd.FileName = item.FileName;
|
||||||
|
cd.CompileDate = item.CompileDate;
|
||||||
|
cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
|
||||||
|
cd.State = item.State + "$" + item.StateStr + "$" + item.HandleManName;
|
||||||
|
cd.FilePath = item.FilePath;
|
||||||
|
res.Add(cd);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取总包施工计划信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="UnitWorkId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.Plan_MainPlan GetMainPlanByMainPlanIdForApi(string MainPlanId)
|
||||||
|
{
|
||||||
|
var q = Funs.DB.Plan_MainPlan.FirstOrDefault(e => e.MainPlanId == MainPlanId);
|
||||||
|
if (q != null)
|
||||||
|
{
|
||||||
|
q.State = q.State + "$" + ConvertState(q.State) + "$" + BLL.CQMS_MainPlanApproveService.GetHandleManName(q.MainPlanId);
|
||||||
|
q.CompileMan = q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan);
|
||||||
|
}
|
||||||
|
return q;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,5 +259,51 @@ namespace BLL
|
|||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<Model.Plan_SubPlanApprove> getApproveListDataByIdForApi(string SubPlanId)
|
||||||
|
{
|
||||||
|
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var q = from x in db.Plan_SubPlanApprove
|
||||||
|
where x.SubPlanId == SubPlanId && x.ApproveDate != null && x.ApproveType != "S"
|
||||||
|
orderby x.ApproveDate
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
x.SubPlanApproveId,
|
||||||
|
x.SubPlanId,
|
||||||
|
ApproveMan = (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
|
||||||
|
x.ApproveDate,
|
||||||
|
x.IsAgree,
|
||||||
|
x.ApproveIdea,
|
||||||
|
x.ApproveType,
|
||||||
|
};
|
||||||
|
List<Model.Plan_SubPlanApprove> res = new List<Model.Plan_SubPlanApprove>();
|
||||||
|
var list = q.ToList();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
Model.Plan_SubPlanApprove cd = new Model.Plan_SubPlanApprove();
|
||||||
|
cd.SubPlanApproveId = item.SubPlanApproveId;
|
||||||
|
cd.SubPlanId = item.SubPlanId;
|
||||||
|
cd.ApproveMan = item.ApproveMan;
|
||||||
|
cd.ApproveDate = item.ApproveDate;
|
||||||
|
cd.IsAgree = item.IsAgree;
|
||||||
|
cd.ApproveIdea = item.ApproveIdea;
|
||||||
|
cd.ApproveType = item.ApproveType + "$" + CQMS_SubPlanService.ConvertState(item.ApproveType);
|
||||||
|
res.Add(cd);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetHandleManName(string SubPlanId)
|
||||||
|
{
|
||||||
|
string name = string.Empty;
|
||||||
|
var a = Funs.DB.Plan_SubPlanApprove.FirstOrDefault(x => x.SubPlanId == SubPlanId && x.ApproveDate == null);
|
||||||
|
if (a != null)
|
||||||
|
{
|
||||||
|
name = BLL.Person_PersonsService.GetPersonsNameById(a.ApproveMan);
|
||||||
|
}
|
||||||
|
return name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,5 +198,79 @@ namespace BLL
|
|||||||
rootNode.Nodes.Add(roleNode);
|
rootNode.Nodes.Add(roleNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<Model.Plan_SubPlan> getListDataForApi(string projectId, int startRowIndex, int maximumRows)
|
||||||
|
{
|
||||||
|
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
IQueryable<Model.Plan_SubPlan> q = db.Plan_SubPlan;
|
||||||
|
if (!string.IsNullOrEmpty(projectId))
|
||||||
|
{
|
||||||
|
q = q.Where(e => e.ProjectId == projectId);
|
||||||
|
}
|
||||||
|
var qres = from x in q
|
||||||
|
orderby x.CompileDate descending
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
x.SubPlanId,
|
||||||
|
x.ProjectId,
|
||||||
|
x.Code,
|
||||||
|
x.UnitId,
|
||||||
|
x.PlanName,
|
||||||
|
x.UnitWorkIds,
|
||||||
|
x.CNProfessionalCodes,
|
||||||
|
x.CompileDate,
|
||||||
|
x.CompileMan,
|
||||||
|
x.State,
|
||||||
|
x.Edition,
|
||||||
|
StateStr = ConvertState(x.State),
|
||||||
|
CompileManName = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
|
||||||
|
UnitName = BLL.UnitService.GetUnitNameByUnitId(x.UnitId),
|
||||||
|
UnitWorkNames=BLL.UnitWorkService.GetUnitWorkName(x.UnitWorkIds),
|
||||||
|
CNProfessionalNames=BLL.CNProfessionalService.GetCNProfessionalNameByCode(x.CNProfessionalCodes),
|
||||||
|
HandleManName = BLL.CQMS_SubPlanApproveService.GetHandleManName(x.SubPlanId),
|
||||||
|
FilePath = x.FilePath,
|
||||||
|
};
|
||||||
|
List<Model.Plan_SubPlan> res = new List<Model.Plan_SubPlan>();
|
||||||
|
var list = qres.Skip(startRowIndex).Take(maximumRows).ToList();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
Model.Plan_SubPlan cd = new Model.Plan_SubPlan();
|
||||||
|
cd.SubPlanId = item.SubPlanId;
|
||||||
|
cd.ProjectId = item.ProjectId;
|
||||||
|
cd.Code = item.Code;
|
||||||
|
cd.UnitId=item.UnitId + "$" + item.UnitName;
|
||||||
|
cd.PlanName = item.PlanName;
|
||||||
|
cd.UnitWorkIds=item.UnitWorkIds + "$" + item.UnitWorkNames;
|
||||||
|
cd.CNProfessionalCodes = item.CNProfessionalCodes + "$" + item.CNProfessionalNames;
|
||||||
|
cd.CompileDate = item.CompileDate;
|
||||||
|
cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
|
||||||
|
cd.State = item.State + "$" + item.StateStr + "$" + item.HandleManName;
|
||||||
|
cd.Edition = item.Edition;
|
||||||
|
cd.FilePath = item.FilePath;
|
||||||
|
res.Add(cd);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据分包施工质量计划Id获取一个分包施工质量计划信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="SubPlanCode">分包施工质量计划Id</param>
|
||||||
|
/// <returns>一个分包施工质量计划实体</returns>
|
||||||
|
public static Model.Plan_SubPlan GetSubPlanBySubPlanIdForApi(string SubPlanId)
|
||||||
|
{
|
||||||
|
var q= Funs.DB.Plan_SubPlan.FirstOrDefault(x => x.SubPlanId == SubPlanId);
|
||||||
|
if (q != null)
|
||||||
|
{
|
||||||
|
q.UnitId = q.UnitId + "$" + BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
|
||||||
|
q.UnitWorkIds = q.UnitWorkIds + "$" + BLL.UnitWorkService.GetUnitWorkName(q.UnitWorkIds);
|
||||||
|
q.CNProfessionalCodes = q.CNProfessionalCodes + "$" + BLL.CNProfessionalService.GetCNProfessionalNameByCode(q.CNProfessionalCodes);
|
||||||
|
q.CompileMan=q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan);
|
||||||
|
q.State = q.State + "$" + ConvertState(q.State) + "$" + BLL.CQMS_SubPlanApproveService.GetHandleManName(q.SubPlanId);
|
||||||
|
}
|
||||||
|
return q;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,5 +115,73 @@ namespace BLL
|
|||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//public static List<Model.Meeting_CQMSMeeting> getListDataForApi(string projectId, int startRowIndex, int maximumRows, string type)
|
||||||
|
//{
|
||||||
|
// using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
// {
|
||||||
|
// IQueryable<Model.RewardAndPunish_RewardAndPunish> q = db.RewardAndPunish_RewardAndPunish;
|
||||||
|
// if (!string.IsNullOrEmpty(projectId))
|
||||||
|
// {
|
||||||
|
// q = q.Where(e => e.ProjectId == projectId);
|
||||||
|
// }
|
||||||
|
// if (type!="0")
|
||||||
|
// {
|
||||||
|
// q = q.Where(e => e.Type == type);
|
||||||
|
// }
|
||||||
|
// var qres = from x in q
|
||||||
|
// orderby x.CompileDate descending
|
||||||
|
// select new
|
||||||
|
// {
|
||||||
|
// x.MeetingId,
|
||||||
|
// x.ProjectId,
|
||||||
|
// x.UnitId,
|
||||||
|
// UnitName = (from y in db.Base_Unit where y.UnitId == x.UnitId select y.UnitName).First(),
|
||||||
|
// x.MeetingType,
|
||||||
|
// MeetingTypeStr = x.MeetingType == "M" ? "质量月例会" : "质量专题会",
|
||||||
|
// x.MeetingCode,
|
||||||
|
// x.MeetingDate,
|
||||||
|
// x.Place,
|
||||||
|
// x.HostMan,
|
||||||
|
// HostManName = BLL.Person_PersonsService.getPersonsNamesPersonIds(x.HostMan),
|
||||||
|
// x.AttentPerson,
|
||||||
|
// AttentPersonName = BLL.Person_PersonsService.getPersonsNamesPersonIds(x.AttentPerson),
|
||||||
|
// x.AttentPersonNum,
|
||||||
|
// x.MeetingTheme,
|
||||||
|
// x.MeetingContents,
|
||||||
|
// x.CompileDate,
|
||||||
|
// x.CompileMan,
|
||||||
|
// x.State,
|
||||||
|
// StateStr = ConvertState(x.State),
|
||||||
|
// CompileManName = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
|
||||||
|
// HandleManName = BLL.CQMS_MeetingApproveService.GetHandleManName(x.MeetingId),
|
||||||
|
// x.AttachUrl,
|
||||||
|
// };
|
||||||
|
// List<Model.Meeting_CQMSMeeting> res = new List<Model.Meeting_CQMSMeeting>();
|
||||||
|
// var list = qres.Skip(startRowIndex).Take(maximumRows).ToList();
|
||||||
|
// foreach (var item in list)
|
||||||
|
// {
|
||||||
|
// Model.Meeting_CQMSMeeting cd = new Model.Meeting_CQMSMeeting();
|
||||||
|
// cd.MeetingId = item.MeetingId;
|
||||||
|
// cd.ProjectId = item.ProjectId;
|
||||||
|
// cd.UnitId = item.UnitId + "$" + item.UnitName;
|
||||||
|
// cd.MeetingType = item.MeetingType + "$" + item.MeetingTypeStr;
|
||||||
|
// cd.MeetingCode = item.MeetingCode;
|
||||||
|
// cd.MeetingDate = item.MeetingDate;
|
||||||
|
// cd.Place = item.Place;
|
||||||
|
// cd.HostMan = item.HostMan + "$" + item.HostManName;
|
||||||
|
// cd.AttentPerson = item.AttentPerson + "$" + item.AttentPersonName;
|
||||||
|
// cd.AttentPersonNum = item.AttentPersonNum;
|
||||||
|
// cd.MeetingTheme = item.MeetingTheme;
|
||||||
|
// cd.MeetingContents = item.MeetingContents;
|
||||||
|
// cd.CompileDate = item.CompileDate;
|
||||||
|
// cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
|
||||||
|
// cd.State = item.State + "$" + item.StateStr + "$" + item.HandleManName;
|
||||||
|
// cd.AttachUrl = AttachFileService.getFileUrl(item.MeetingId);
|
||||||
|
// res.Add(cd);
|
||||||
|
// }
|
||||||
|
// return res;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,5 +78,165 @@ namespace BLL
|
|||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//<summary>
|
||||||
|
//获取培训对象
|
||||||
|
//</summary>
|
||||||
|
//<param name="state"></param>
|
||||||
|
//<returns></returns>
|
||||||
|
public static string ConvertPlanTrainPersons(object PlanTrainPersons)
|
||||||
|
{
|
||||||
|
string names = string.Empty;
|
||||||
|
if (PlanTrainPersons != null)
|
||||||
|
{
|
||||||
|
string[] strs = PlanTrainPersons.ToString().Split(',');
|
||||||
|
foreach (var item in strs)
|
||||||
|
{
|
||||||
|
names += BLL.CQMSTrainObjectService.GetTrainObjectNameById(item) + ",";
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(names))
|
||||||
|
{
|
||||||
|
names = names.Substring(0, names.Length - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return names;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<Model.Train_TrainPlan> getListDataForApi(string projectId, int startRowIndex, int maximumRows)
|
||||||
|
{
|
||||||
|
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
IQueryable<Model.Train_TrainPlan> q = db.Train_TrainPlan;
|
||||||
|
if (!string.IsNullOrEmpty(projectId))
|
||||||
|
{
|
||||||
|
q = q.Where(e => e.ProjectId == projectId);
|
||||||
|
}
|
||||||
|
var qres = from x in q
|
||||||
|
orderby x.CompileDate descending
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
x.TrainPlanId,
|
||||||
|
x.ProjectId,
|
||||||
|
x.PlanTrainPersons,
|
||||||
|
PlanTrainPersonsStr = ConvertPlanTrainPersons(x.PlanTrainPersons),
|
||||||
|
x.TrainTypeId,
|
||||||
|
TrainTypeName = (from y in db.Base_CQMSTrainType where y.TrainTypeId == x.TrainTypeId select y.TrainTypeName).First(),
|
||||||
|
x.TrainContent,
|
||||||
|
x.PlanTrainDate,
|
||||||
|
x.HostMan,
|
||||||
|
x.RealTrainDate,
|
||||||
|
x.Place,
|
||||||
|
x.TeachHour,
|
||||||
|
x.TrainPersonNum,
|
||||||
|
x.RealTrainPersons,
|
||||||
|
x.CompileDate,
|
||||||
|
x.CompileMan,
|
||||||
|
x.AttachUrl,
|
||||||
|
CompileManName = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
|
||||||
|
};
|
||||||
|
List<Model.Train_TrainPlan> res = new List<Model.Train_TrainPlan>();
|
||||||
|
var list = qres.Skip(startRowIndex).Take(maximumRows).ToList();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
Model.Train_TrainPlan cd = new Model.Train_TrainPlan();
|
||||||
|
cd.TrainPlanId = item.TrainPlanId;
|
||||||
|
cd.ProjectId = item.ProjectId;
|
||||||
|
cd.PlanTrainPersons = item.PlanTrainPersons + "$" + item.PlanTrainPersonsStr;
|
||||||
|
cd.TrainTypeId = item.TrainTypeId + "$" + item.TrainTypeName;
|
||||||
|
cd.TrainContent = item.TrainContent;
|
||||||
|
cd.PlanTrainDate = item.PlanTrainDate;
|
||||||
|
cd.HostMan = item.HostMan;
|
||||||
|
cd.RealTrainDate = item.RealTrainDate;
|
||||||
|
cd.Place = item.Place;
|
||||||
|
cd.TeachHour = item.TeachHour;
|
||||||
|
cd.TrainPersonNum = item.TrainPersonNum;
|
||||||
|
cd.RealTrainPersons = item.RealTrainPersons;
|
||||||
|
cd.CompileDate = item.CompileDate;
|
||||||
|
cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
|
||||||
|
cd.AttachUrl = AttachFileService.getFileUrl(item.TrainPlanId);
|
||||||
|
res.Add(cd);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取质量培训信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="UnitWorkId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.Train_TrainPlan GetTraiPlanByTrainPlanIdForApi(string TrainPlanId)
|
||||||
|
{
|
||||||
|
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var q = db.Train_TrainPlan.FirstOrDefault(e => e.TrainPlanId == TrainPlanId);
|
||||||
|
if (q != null)
|
||||||
|
{
|
||||||
|
q.PlanTrainPersons = q.PlanTrainPersons + "$" + ConvertPlanTrainPersons(q.PlanTrainPersons);
|
||||||
|
q.TrainTypeId = q.TrainTypeId + "$" + (from y in db.Base_CQMSTrainType where y.TrainTypeId == q.TrainTypeId select y.TrainTypeName).First();
|
||||||
|
q.RealTrainPersons = q.RealTrainPersons + "$" + Person_PersonsService.getPersonsNamesPersonIds(q.RealTrainPersons);
|
||||||
|
q.HostMan = q.HostMan + "$" + BLL.Person_PersonsService.getPersonsNamesPersonIds(q.HostMan);
|
||||||
|
q.CompileMan = q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan);
|
||||||
|
q.AttachUrl = AttachFileService.getFileUrl(q.TrainPlanId);
|
||||||
|
}
|
||||||
|
return q;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void AddTrainPlanForApi(Model.Train_TrainPlan TrainPlan)
|
||||||
|
{
|
||||||
|
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
Model.Train_TrainPlan newTrainPlan = new Model.Train_TrainPlan();
|
||||||
|
newTrainPlan.TrainPlanId = TrainPlan.TrainPlanId;
|
||||||
|
newTrainPlan.ProjectId = TrainPlan.ProjectId;
|
||||||
|
newTrainPlan.PlanTrainPersons = TrainPlan.PlanTrainPersons;
|
||||||
|
newTrainPlan.TrainTypeId = TrainPlan.TrainTypeId;
|
||||||
|
newTrainPlan.TrainContent = TrainPlan.TrainContent;
|
||||||
|
newTrainPlan.PlanTrainDate = TrainPlan.PlanTrainDate;
|
||||||
|
newTrainPlan.HostMan = TrainPlan.HostMan;
|
||||||
|
newTrainPlan.RealTrainDate = TrainPlan.RealTrainDate;
|
||||||
|
newTrainPlan.Place = TrainPlan.Place;
|
||||||
|
newTrainPlan.TeachHour = TrainPlan.TeachHour;
|
||||||
|
newTrainPlan.TrainPersonNum = TrainPlan.TrainPersonNum;
|
||||||
|
newTrainPlan.RealTrainPersons = TrainPlan.RealTrainPersons;
|
||||||
|
newTrainPlan.CompileMan = TrainPlan.CompileMan;
|
||||||
|
newTrainPlan.CompileDate = TrainPlan.CompileDate;
|
||||||
|
db.Train_TrainPlan.InsertOnSubmit(newTrainPlan);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void UpdateTrainPlanForApi(Model.Train_TrainPlan TrainPlan)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
Model.Train_TrainPlan newTrainPlan = db.Train_TrainPlan.FirstOrDefault(e => e.TrainPlanId == TrainPlan.TrainPlanId);
|
||||||
|
if (newTrainPlan != null)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(TrainPlan.PlanTrainPersons))
|
||||||
|
newTrainPlan.PlanTrainPersons = TrainPlan.PlanTrainPersons;
|
||||||
|
if (!string.IsNullOrEmpty(TrainPlan.TrainTypeId))
|
||||||
|
newTrainPlan.TrainTypeId = TrainPlan.TrainTypeId;
|
||||||
|
if (!string.IsNullOrEmpty(TrainPlan.TrainContent))
|
||||||
|
newTrainPlan.TrainContent = TrainPlan.TrainContent;
|
||||||
|
if (TrainPlan.PlanTrainDate.HasValue)
|
||||||
|
newTrainPlan.PlanTrainDate = TrainPlan.PlanTrainDate;
|
||||||
|
if (!string.IsNullOrEmpty(TrainPlan.HostMan))
|
||||||
|
newTrainPlan.HostMan = TrainPlan.HostMan;
|
||||||
|
if (TrainPlan.RealTrainDate.HasValue)
|
||||||
|
newTrainPlan.RealTrainDate = TrainPlan.RealTrainDate;
|
||||||
|
if (!string.IsNullOrEmpty(TrainPlan.Place))
|
||||||
|
newTrainPlan.Place = TrainPlan.Place;
|
||||||
|
if (TrainPlan.TeachHour.HasValue)
|
||||||
|
newTrainPlan.TeachHour = TrainPlan.TeachHour;
|
||||||
|
if (TrainPlan.TrainPersonNum.HasValue)
|
||||||
|
newTrainPlan.TrainPersonNum = TrainPlan.TrainPersonNum;
|
||||||
|
if (!string.IsNullOrEmpty(TrainPlan.RealTrainPersons))
|
||||||
|
newTrainPlan.RealTrainPersons = TrainPlan.RealTrainPersons;
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using FineUIPro;
|
using FineUIPro;
|
||||||
using Microsoft.Office.Interop.Excel;
|
using Microsoft.Office.Interop.Excel;
|
||||||
using Microsoft.SqlServer.Dts.Runtime;
|
using Microsoft.SqlServer.Dts.Runtime;
|
||||||
|
using Model;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -115,7 +116,7 @@ namespace BLL
|
|||||||
/// 设置人员进出场
|
/// 设置人员进出场
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="newitem"></param>
|
/// <param name="newitem"></param>
|
||||||
public static void SetPersonItemInOut(Model.SitePerson_Person sitePerson)
|
public static void SetPersonItemInOut(Model.SitePerson_Person sitePerson, Model.Sys_Log log)
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
@@ -144,7 +145,7 @@ namespace BLL
|
|||||||
InTime = sitePerson.InTime,
|
InTime = sitePerson.InTime,
|
||||||
};
|
};
|
||||||
|
|
||||||
AddPersonItem(newPersonItem);
|
AddPersonItem(newPersonItem, log);
|
||||||
if (!getPersons.MultiProject.HasValue || getPersons.MultiProject == false)
|
if (!getPersons.MultiProject.HasValue || getPersons.MultiProject == false)
|
||||||
{
|
{
|
||||||
var getOtherPersons = db.SitePerson_Person.Where(x => x.IdentityCard == sitePerson.IdentityCard && x.ProjectId != sitePerson.ProjectId && x.States == Const.ProjectPersonStates_1);
|
var getOtherPersons = db.SitePerson_Person.Where(x => x.IdentityCard == sitePerson.IdentityCard && x.ProjectId != sitePerson.ProjectId && x.States == Const.ProjectPersonStates_1);
|
||||||
@@ -182,7 +183,7 @@ namespace BLL
|
|||||||
/// 增加 人员进场
|
/// 增加 人员进场
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="newitem">实体</param>
|
/// <param name="newitem">实体</param>
|
||||||
public static void AddPersonItem(Model.SitePerson_PersonItem newitem)
|
public static void AddPersonItem(Model.SitePerson_PersonItem newitem, Model.Sys_Log log)
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
@@ -271,6 +272,11 @@ namespace BLL
|
|||||||
db.SitePerson_PersonItem.InsertOnSubmit(newPersonItem);
|
db.SitePerson_PersonItem.InsertOnSubmit(newPersonItem);
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
///更新人员出入记录日志
|
||||||
|
if (log != null)
|
||||||
|
{
|
||||||
|
LogService.AddSys_Log(log);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using FineUIPro;
|
using FineUIPro;
|
||||||
|
using Microsoft.SqlServer.Dts.Runtime;
|
||||||
using Model;
|
using Model;
|
||||||
|
using NPOI.SS.Formula.PTG;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -697,9 +699,9 @@ namespace BLL
|
|||||||
Isprint = "0",
|
Isprint = "0",
|
||||||
States = person.States,
|
States = person.States,
|
||||||
};
|
};
|
||||||
////现场人员项目出入场记录
|
|
||||||
SitePerson_PersonItemService.SetPersonItemInOut(newPerson);
|
|
||||||
|
|
||||||
|
////现场人员项目出入场记录
|
||||||
|
SitePerson_PersonItemService.SetPersonItemInOut(newPerson, null);
|
||||||
db.SitePerson_Person.InsertOnSubmit(newPerson);
|
db.SitePerson_Person.InsertOnSubmit(newPerson);
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
@@ -709,7 +711,7 @@ namespace BLL
|
|||||||
/// 修改人员信息
|
/// 修改人员信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="person">人员实体</param>
|
/// <param name="person">人员实体</param>
|
||||||
public static void UpdateSitePerson(Model.SitePerson_Person person)
|
public static void UpdateSitePerson(Model.SitePerson_Person person, Model.Sys_Log newlog)
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
@@ -792,7 +794,7 @@ namespace BLL
|
|||||||
if (setPersonItemInOut)
|
if (setPersonItemInOut)
|
||||||
{
|
{
|
||||||
////现场人员项目出入场记录
|
////现场人员项目出入场记录
|
||||||
SitePerson_PersonItemService.SetPersonItemInOut(newPerson);
|
SitePerson_PersonItemService.SetPersonItemInOut(newPerson,newlog);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -850,7 +852,7 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
////现场人员项目出入场记录
|
////现场人员项目出入场记录
|
||||||
person.States = Const.ProjectPersonStates_2;
|
person.States = Const.ProjectPersonStates_2;
|
||||||
SitePerson_PersonItemService.SetPersonItemInOut(person);
|
SitePerson_PersonItemService.SetPersonItemInOut(person, null);
|
||||||
|
|
||||||
Funs.DB.SitePerson_Person.DeleteOnSubmit(person);
|
Funs.DB.SitePerson_Person.DeleteOnSubmit(person);
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
@@ -980,8 +982,18 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
|
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
|
Model.Sys_Log newlog = new Sys_Log
|
||||||
|
{
|
||||||
|
UserId = getSitePerson.AuditorId,
|
||||||
|
MenuId = Const.PersonListMenuId,
|
||||||
|
OperationName = "现场人员审核",
|
||||||
|
OperationLog = "现场人员审核" + getSitePerson.PersonName,
|
||||||
|
DataId = getSitePerson.PersonId,
|
||||||
|
ProjectId = getSitePerson.ProjectId,
|
||||||
|
};
|
||||||
|
|
||||||
////现场人员项目出入场记录
|
////现场人员项目出入场记录
|
||||||
SitePerson_PersonItemService.SetPersonItemInOut(getSitePerson);
|
SitePerson_PersonItemService.SetPersonItemInOut(getSitePerson, newlog);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -776,7 +776,10 @@ namespace BLL
|
|||||||
newPerson.IdcardEndDate = person.IdcardEndDate;
|
newPerson.IdcardEndDate = person.IdcardEndDate;
|
||||||
newPerson.IdcardForever = person.IdcardForever;
|
newPerson.IdcardForever = person.IdcardForever;
|
||||||
newPerson.IdcardAddress = person.IdcardAddress;
|
newPerson.IdcardAddress = person.IdcardAddress;
|
||||||
newPerson.Telephone = person.Telephone;
|
if (!string.IsNullOrEmpty(person.Telephone) && newPerson.Telephone != person.Telephone)
|
||||||
|
{
|
||||||
|
newPerson.Telephone = person.Telephone;
|
||||||
|
}
|
||||||
newPerson.Birthday = person.Birthday;
|
newPerson.Birthday = person.Birthday;
|
||||||
newPerson.Sex = person.Sex;
|
newPerson.Sex = person.Sex;
|
||||||
newPerson.Address = person.Address;
|
newPerson.Address = person.Address;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
namespace BLL
|
namespace BLL
|
||||||
{
|
{
|
||||||
|
using NPOI.SS.Formula.PTG;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
@@ -73,6 +74,70 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加操作日志
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="CurrUser">操作人</param>
|
||||||
|
/// <param name="code">编号</param>
|
||||||
|
/// <param name="dataId">主键ID</param>
|
||||||
|
/// <param name="strMenuId">菜单ID</param>
|
||||||
|
/// <param name="strOperationName">操作名称</param>
|
||||||
|
public static void AddSys_Log(Model.Sys_Log newsyslog)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
if (newsyslog != null)
|
||||||
|
{
|
||||||
|
Model.Sys_Log syslog = new Model.Sys_Log
|
||||||
|
{
|
||||||
|
LogId = SQLHelper.GetNewID(),
|
||||||
|
HostName = Dns.GetHostName(),
|
||||||
|
OperationTime = DateTime.Now,
|
||||||
|
UserId = newsyslog.UserId,
|
||||||
|
MenuId = newsyslog.MenuId,
|
||||||
|
OperationName = newsyslog.OperationName,
|
||||||
|
DataId = newsyslog.DataId,
|
||||||
|
LogSource = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
IPAddress[] ips = Dns.GetHostAddresses(syslog.HostName);
|
||||||
|
if (ips.Length > 0)
|
||||||
|
{
|
||||||
|
foreach (IPAddress ip in ips)
|
||||||
|
{
|
||||||
|
if (ip.ToString().IndexOf('.') != -1)
|
||||||
|
{
|
||||||
|
syslog.Ip = ip.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
string opLog = string.Empty;
|
||||||
|
var menu = db.Sys_Menu.FirstOrDefault(x => x.MenuId == newsyslog.MenuId);
|
||||||
|
if (menu != null)
|
||||||
|
{
|
||||||
|
opLog = menu.MenuName + ":";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(newsyslog.OperationName))
|
||||||
|
{
|
||||||
|
opLog += newsyslog.OperationName;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(newsyslog.OperationLog))
|
||||||
|
{
|
||||||
|
syslog.OperationLog = opLog + ";" + newsyslog.OperationLog + "。";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(newsyslog.ProjectId) && newsyslog.ProjectId != "null")
|
||||||
|
{
|
||||||
|
syslog.ProjectId = newsyslog.ProjectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
db.Sys_Log.InsertOnSubmit(syslog);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据项目Id删除所有相关日志信息
|
/// 根据项目Id删除所有相关日志信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -39,6 +39,9 @@
|
|||||||
<f:TextBox ID="txtEquipmentName" runat="server" Label="设备名称" LabelWidth="80px"
|
<f:TextBox ID="txtEquipmentName" runat="server" Label="设备名称" LabelWidth="80px"
|
||||||
LabelAlign="Right">
|
LabelAlign="Right">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
|
<f:TextBox ID="txtSpecificationAndModel" runat="server" Label="规格型号" LabelWidth="80px"
|
||||||
|
LabelAlign="Right">
|
||||||
|
</f:TextBox>
|
||||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||||
<f:Button ID="btnSearch" Icon="SystemSearch"
|
<f:Button ID="btnSearch" Icon="SystemSearch"
|
||||||
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
|
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
|
||||||
@@ -79,6 +82,9 @@
|
|||||||
<f:RenderField Width="100px" ColumnID="EquipmentCode" DataField="EquipmentCode"
|
<f:RenderField Width="100px" ColumnID="EquipmentCode" DataField="EquipmentCode"
|
||||||
FieldType="String" HeaderText="设备位号" TextAlign="Center" HeaderTextAlign="Center">
|
FieldType="String" HeaderText="设备位号" TextAlign="Center" HeaderTextAlign="Center">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="Factory" DataField="Factory"
|
||||||
|
FieldType="String" HeaderText="生产厂家" TextAlign="Center" HeaderTextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
<f:RenderField Width="100px" ColumnID="PressClass" DataField="PressClass"
|
<f:RenderField Width="100px" ColumnID="PressClass" DataField="PressClass"
|
||||||
FieldType="String" HeaderText="压力等级" TextAlign="Center" HeaderTextAlign="Center">
|
FieldType="String" HeaderText="压力等级" TextAlign="Center" HeaderTextAlign="Center">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
|||||||
@@ -86,6 +86,11 @@ namespace FineUIPro.Web.CQMS.Material
|
|||||||
strSql += " AND EquipmentName like @EquipmentName";
|
strSql += " AND EquipmentName like @EquipmentName";
|
||||||
listStr.Add(new SqlParameter("@EquipmentName", "%" + this.txtEquipmentName.Text.Trim() + "%"));
|
listStr.Add(new SqlParameter("@EquipmentName", "%" + this.txtEquipmentName.Text.Trim() + "%"));
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrEmpty(this.txtSpecificationAndModel.Text.Trim()))
|
||||||
|
{
|
||||||
|
strSql += " AND SpecificationAndModel like @SpecificationAndModel";
|
||||||
|
listStr.Add(new SqlParameter("@SpecificationAndModel", "%" + this.txtSpecificationAndModel.Text.Trim() + "%"));
|
||||||
|
}
|
||||||
SqlParameter[] parameter = listStr.ToArray();
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
return tb;
|
return tb;
|
||||||
|
|||||||
@@ -93,6 +93,15 @@ namespace FineUIPro.Web.CQMS.Material {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtEquipmentName;
|
protected global::FineUIPro.TextBox txtEquipmentName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtSpecificationAndModel 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtSpecificationAndModel;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnSearch 控件。
|
/// btnSearch 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
<f:FormRow ID="next">
|
<f:FormRow ID="next" Hidden="true">
|
||||||
<Items>
|
<Items>
|
||||||
<f:ContentPanel ID="ContentPanel4" Title="报验管理审批流程设置 " runat="server" ShowHeader="true" EnableCollapse="true"
|
<f:ContentPanel ID="ContentPanel4" Title="报验管理审批流程设置 " runat="server" ShowHeader="true" EnableCollapse="true"
|
||||||
BodyPadding="0px">
|
BodyPadding="0px">
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
</f:ContentPanel>
|
</f:ContentPanel>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
<f:FormRow ID="plApprove2">
|
<f:FormRow ID="plApprove2" Hidden="true">
|
||||||
<Items>
|
<Items>
|
||||||
<f:ContentPanel Title="报验管理审批列表" ShowBorder="true"
|
<f:ContentPanel Title="报验管理审批列表" ShowBorder="true"
|
||||||
BodyPadding="10px" EnableCollapse="true" ShowHeader="true" AutoScroll="true"
|
BodyPadding="10px" EnableCollapse="true" ShowHeader="true" AutoScroll="true"
|
||||||
|
|||||||
@@ -351,7 +351,8 @@ namespace FineUIPro.Web.CQMS.Material
|
|||||||
test.CompileDate = DateTime.Now;
|
test.CompileDate = DateTime.Now;
|
||||||
BLL.CQMS_MaterialTestService.AddMaterialTest(test);
|
BLL.CQMS_MaterialTestService.AddMaterialTest(test);
|
||||||
}
|
}
|
||||||
inspection.State = BLL.Const.Inspection_SpotCheck;
|
//inspection.State = BLL.Const.Inspection_SpotCheck;
|
||||||
|
inspection.State = BLL.Const.Inspection_Complete;
|
||||||
}
|
}
|
||||||
else if (inspection.IsSpotCheck == false && inspection.IsNoticeAndSupervision == true && (inspection.State == BLL.Const.Inspection_Compile || inspection.State == BLL.Const.Inspection_ReCompile)) //生成告知和监检记录
|
else if (inspection.IsSpotCheck == false && inspection.IsNoticeAndSupervision == true && (inspection.State == BLL.Const.Inspection_Compile || inspection.State == BLL.Const.Inspection_ReCompile)) //生成告知和监检记录
|
||||||
{
|
{
|
||||||
@@ -366,11 +367,13 @@ namespace FineUIPro.Web.CQMS.Material
|
|||||||
noticeAndSupervision.CompileDate = DateTime.Now;
|
noticeAndSupervision.CompileDate = DateTime.Now;
|
||||||
BLL.CQMS_NoticeAndSupervisionService.AddNoticeAndSupervision(noticeAndSupervision);
|
BLL.CQMS_NoticeAndSupervisionService.AddNoticeAndSupervision(noticeAndSupervision);
|
||||||
}
|
}
|
||||||
inspection.State = this.drpHandleType.SelectedValue;
|
//inspection.State = this.drpHandleType.SelectedValue;
|
||||||
|
inspection.State = BLL.Const.Inspection_Complete;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
inspection.State = this.drpHandleType.SelectedValue;
|
//inspection.State = this.drpHandleType.SelectedValue;
|
||||||
|
inspection.State = BLL.Const.Inspection_Complete;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -403,14 +406,14 @@ namespace FineUIPro.Web.CQMS.Material
|
|||||||
approve1.ApproveIdea = this.txtOpinions.Text.Trim();
|
approve1.ApproveIdea = this.txtOpinions.Text.Trim();
|
||||||
approve1.IsAgree = Convert.ToBoolean(this.RadioButtonList1.SelectedValue);
|
approve1.IsAgree = Convert.ToBoolean(this.RadioButtonList1.SelectedValue);
|
||||||
BLL.CQMS_InspectionApproveService.UpdateInspectionApprove(approve1);
|
BLL.CQMS_InspectionApproveService.UpdateInspectionApprove(approve1);
|
||||||
Model.Material_InspectionApprove approve = new Model.Material_InspectionApprove();
|
//Model.Material_InspectionApprove approve = new Model.Material_InspectionApprove();
|
||||||
approve.InspectionId = inspection.InspectionId;
|
//approve.InspectionId = inspection.InspectionId;
|
||||||
if (this.drpHandleMan.SelectedValue != BLL.Const._Null)
|
//if (this.drpHandleMan.SelectedValue != BLL.Const._Null)
|
||||||
{
|
//{
|
||||||
approve.ApproveMan = this.drpHandleMan.SelectedValue;
|
// approve.ApproveMan = this.drpHandleMan.SelectedValue;
|
||||||
}
|
//}
|
||||||
approve.ApproveType = this.drpHandleType.SelectedValue;
|
//approve.ApproveType = this.drpHandleType.SelectedValue;
|
||||||
BLL.CQMS_InspectionApproveService.AddInspectionApprove(approve);
|
//BLL.CQMS_InspectionApproveService.AddInspectionApprove(approve);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LogService.AddSys_Log(CurrUser, inspection.InspectionCode, inspection.InspectionId, Const.InspectionMenuId, "修改报验管理");
|
LogService.AddSys_Log(CurrUser, inspection.InspectionCode, inspection.InspectionId, Const.InspectionMenuId, "修改报验管理");
|
||||||
@@ -428,11 +431,11 @@ namespace FineUIPro.Web.CQMS.Material
|
|||||||
{
|
{
|
||||||
err += "请选择单位!";
|
err += "请选择单位!";
|
||||||
}
|
}
|
||||||
var att = BLL.AttachFileService.GetAttachFileByToKeyId(this.InspectionId);
|
//var att = BLL.AttachFileService.GetAttachFileByToKeyId(this.InspectionId);
|
||||||
if (att == null)
|
//if (att == null)
|
||||||
{
|
//{
|
||||||
err += "请上传质量证明文件!";
|
// err += "请上传质量证明文件!";
|
||||||
}
|
//}
|
||||||
if (!string.IsNullOrWhiteSpace(err))
|
if (!string.IsNullOrWhiteSpace(err))
|
||||||
{
|
{
|
||||||
Alert.ShowInTop(err, MessageBoxIcon.Warning);
|
Alert.ShowInTop(err, MessageBoxIcon.Warning);
|
||||||
|
|||||||
@@ -39,6 +39,9 @@
|
|||||||
<f:TextBox ID="txtMaterialName" runat="server" Label="材料名称" LabelWidth="80px"
|
<f:TextBox ID="txtMaterialName" runat="server" Label="材料名称" LabelWidth="80px"
|
||||||
LabelAlign="Right">
|
LabelAlign="Right">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
|
<f:TextBox ID="txtSpecificationAndModel" runat="server" Label="规格型号" LabelWidth="80px"
|
||||||
|
LabelAlign="Right">
|
||||||
|
</f:TextBox>
|
||||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||||
<f:Button ID="btnSearch" Icon="SystemSearch"
|
<f:Button ID="btnSearch" Icon="SystemSearch"
|
||||||
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
|
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
|
||||||
@@ -82,6 +85,9 @@
|
|||||||
<f:RenderField Width="100px" ColumnID="Material" DataField="Material"
|
<f:RenderField Width="100px" ColumnID="Material" DataField="Material"
|
||||||
FieldType="String" HeaderText="材质" TextAlign="Center" HeaderTextAlign="Center">
|
FieldType="String" HeaderText="材质" TextAlign="Center" HeaderTextAlign="Center">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="Factory" DataField="Factory"
|
||||||
|
FieldType="String" HeaderText="生产厂家" TextAlign="Center" HeaderTextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
<f:RenderField Width="100px" ColumnID="PressClass" DataField="PressClass"
|
<f:RenderField Width="100px" ColumnID="PressClass" DataField="PressClass"
|
||||||
FieldType="String" HeaderText="压力等级" TextAlign="Center" HeaderTextAlign="Center">
|
FieldType="String" HeaderText="压力等级" TextAlign="Center" HeaderTextAlign="Center">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
|||||||
@@ -86,6 +86,11 @@ namespace FineUIPro.Web.CQMS.Material
|
|||||||
strSql += " AND MaterialName like @MaterialName";
|
strSql += " AND MaterialName like @MaterialName";
|
||||||
listStr.Add(new SqlParameter("@MaterialName", "%" + this.txtMaterialName.Text.Trim() + "%"));
|
listStr.Add(new SqlParameter("@MaterialName", "%" + this.txtMaterialName.Text.Trim() + "%"));
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrEmpty(this.txtSpecificationAndModel.Text.Trim()))
|
||||||
|
{
|
||||||
|
strSql += " AND SpecificationAndModel like @SpecificationAndModel";
|
||||||
|
listStr.Add(new SqlParameter("@SpecificationAndModel", "%" + this.txtSpecificationAndModel.Text.Trim() + "%"));
|
||||||
|
}
|
||||||
SqlParameter[] parameter = listStr.ToArray();
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
return tb;
|
return tb;
|
||||||
|
|||||||
@@ -93,6 +93,15 @@ namespace FineUIPro.Web.CQMS.Material {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtMaterialName;
|
protected global::FineUIPro.TextBox txtMaterialName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtSpecificationAndModel 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtSpecificationAndModel;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnSearch 控件。
|
/// btnSearch 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using AspNet = System.Web.UI.WebControls;
|
using AspNet = System.Web.UI.WebControls;
|
||||||
|
using Model;
|
||||||
|
|
||||||
namespace FineUIPro.Web.CQMS.PersonManage
|
namespace FineUIPro.Web.CQMS.PersonManage
|
||||||
{
|
{
|
||||||
@@ -165,7 +166,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
|||||||
if (welder != null)
|
if (welder != null)
|
||||||
{
|
{
|
||||||
welder.States = Const.ProjectPersonStates_2;
|
welder.States = Const.ProjectPersonStates_2;
|
||||||
BLL.SitePerson_PersonService.UpdateSitePerson(welder);
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
<f:TemplateField ColumnID="State" Width="60px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center"
|
<f:TemplateField ColumnID="State" Width="60px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center"
|
||||||
EnableLock="true" Locked="False">
|
EnableLock="true" Locked="False">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="Label1" runat="server" Text='<%# BLL.CQMSConstructSolutionService.ConvertState(Eval("State")) %>'></asp:Label>
|
<asp:Label ID="Label1" runat="server" Text='<%# BLL.CQMS_SubPlanService.ConvertState(Eval("State")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</f:TemplateField>
|
</f:TemplateField>
|
||||||
<f:TemplateField ColumnID="AuditMan" Width="80px" HeaderText="办理人" HeaderTextAlign="Center" TextAlign="Center"
|
<f:TemplateField ColumnID="AuditMan" Width="80px" HeaderText="办理人" HeaderTextAlign="Center" TextAlign="Center"
|
||||||
|
|||||||
@@ -208,7 +208,7 @@
|
|||||||
<f:TemplateField ColumnID="ApproveType" Width="150px" HeaderText="办理类型" HeaderTextAlign="Center" TextAlign="Center"
|
<f:TemplateField ColumnID="ApproveType" Width="150px" HeaderText="办理类型" HeaderTextAlign="Center" TextAlign="Center"
|
||||||
EnableLock="true" Locked="False">
|
EnableLock="true" Locked="False">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="Label1" runat="server" Text='<%# BLL.CQMSConstructSolutionService.ConvertState(Eval("ApproveType")) %>'></asp:Label>
|
<asp:Label ID="Label1" runat="server" Text='<%# BLL.CQMS_SubPlanService.ConvertState(Eval("ApproveType")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</f:TemplateField>
|
</f:TemplateField>
|
||||||
<f:TemplateField ColumnID="ApproveMan" Width="150px" HeaderText="办理人员" HeaderTextAlign="Center" TextAlign="Center"
|
<f:TemplateField ColumnID="ApproveMan" Width="150px" HeaderText="办理人员" HeaderTextAlign="Center" TextAlign="Center"
|
||||||
|
|||||||
@@ -157,7 +157,7 @@
|
|||||||
<f:TemplateField ColumnID="ApproveType" Width="150px" HeaderText="办理类型" HeaderTextAlign="Center" TextAlign="Center"
|
<f:TemplateField ColumnID="ApproveType" Width="150px" HeaderText="办理类型" HeaderTextAlign="Center" TextAlign="Center"
|
||||||
EnableLock="true" Locked="False">
|
EnableLock="true" Locked="False">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="Label1" runat="server" Text='<%# BLL.CQMSConstructSolutionService.ConvertState(Eval("ApproveType")) %>'></asp:Label>
|
<asp:Label ID="Label1" runat="server" Text='<%# BLL.CQMS_SubPlanService.ConvertState(Eval("ApproveType")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</f:TemplateField>
|
</f:TemplateField>
|
||||||
<f:TemplateField ColumnID="ApproveMan" Width="150px" HeaderText="办理人员" HeaderTextAlign="Center" TextAlign="Center"
|
<f:TemplateField ColumnID="ApproveMan" Width="150px" HeaderText="办理人员" HeaderTextAlign="Center" TextAlign="Center"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
|
using Model;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -85,7 +86,17 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||||||
{
|
{
|
||||||
person.OutTime = Funs.GetNewDateTime(this.txtChangeTime.Text);
|
person.OutTime = Funs.GetNewDateTime(this.txtChangeTime.Text);
|
||||||
person.States = Const.State_2;
|
person.States = Const.State_2;
|
||||||
BLL.SitePerson_PersonService.UpdateSitePerson(person);
|
Model.Sys_Log newlog = new Sys_Log
|
||||||
|
{
|
||||||
|
UserId = this.CurrUser.PersonId,
|
||||||
|
MenuId = Const.PersonListMenuId,
|
||||||
|
OperationName = "现场人员出场",
|
||||||
|
OperationLog = "现场人员出场" + person.PersonName,
|
||||||
|
DataId = person.PersonId,
|
||||||
|
ProjectId = person.ProjectId,
|
||||||
|
};
|
||||||
|
|
||||||
|
BLL.SitePerson_PersonService.UpdateSitePerson(person, newlog);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -117,13 +117,13 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||||||
{
|
{
|
||||||
person.TeamGroupId = null;
|
person.TeamGroupId = null;
|
||||||
}
|
}
|
||||||
BLL.SitePerson_PersonService.UpdateSitePerson(person);
|
Funs.DB.SubmitChanges();
|
||||||
|
|
||||||
var getPerson = Person_PersonsService.GetPerson_PersonsById(person.PersonId);
|
var getPerson = Person_PersonsService.GetPerson_PersonsById(person.PersonId);
|
||||||
if (getPerson != null)
|
if (getPerson != null)
|
||||||
{
|
{
|
||||||
getPerson.UnitId = person.UnitId;
|
getPerson.UnitId = person.UnitId;
|
||||||
Person_PersonsService.UpdatePerson(getPerson);
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
using FastReport.DevComponents.Editors;
|
using FastReport.DevComponents.Editors;
|
||||||
|
using Model;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -380,7 +381,16 @@ namespace FineUIPro.Web.Person
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(newProjectPerson.SitePersonId))
|
if (!string.IsNullOrEmpty(newProjectPerson.SitePersonId))
|
||||||
{
|
{
|
||||||
SitePerson_PersonService.UpdateSitePerson(newProjectPerson);
|
Model.Sys_Log newlog = new Sys_Log
|
||||||
|
{
|
||||||
|
UserId = this.CurrUser.PersonId,
|
||||||
|
MenuId = Const.PersonListMenuId,
|
||||||
|
OperationName = "部门人员",
|
||||||
|
OperationLog = "部门人员修改" + newProjectPerson.PersonName,
|
||||||
|
DataId = newProjectPerson.PersonId,
|
||||||
|
ProjectId = newProjectPerson.ProjectId,
|
||||||
|
};
|
||||||
|
SitePerson_PersonService.UpdateSitePerson(newProjectPerson,newlog);
|
||||||
LogService.AddSys_Log(this.CurrUser, newProjectPerson.IdentityCard, newProjectPerson.SitePersonId, BLL.Const.ProjectPersonMenuId, BLL.Const.BtnModify);
|
LogService.AddSys_Log(this.CurrUser, newProjectPerson.IdentityCard, newProjectPerson.SitePersonId, BLL.Const.ProjectPersonMenuId, BLL.Const.BtnModify);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ namespace FineUIPro.Web.Person
|
|||||||
{
|
{
|
||||||
this.PersonItemId = SQLHelper.GetNewID();
|
this.PersonItemId = SQLHelper.GetNewID();
|
||||||
newData.PersonItemId = this.PersonItemId;
|
newData.PersonItemId = this.PersonItemId;
|
||||||
BLL.SitePerson_PersonItemService.AddPersonItem(newData);
|
BLL.SitePerson_PersonItemService.AddPersonItem(newData,null);
|
||||||
BLL.LogService.AddSys_Log(this.CurrUser, newData.PersonName, newData.PersonItemId, BLL.Const.ProjectPersonMenuId, BLL.Const.BtnAdd);
|
BLL.LogService.AddSys_Log(this.CurrUser, newData.PersonName, newData.PersonItemId, BLL.Const.ProjectPersonMenuId, BLL.Const.BtnAdd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -708,7 +708,17 @@ namespace FineUIPro.Web.Person
|
|||||||
if (!string.IsNullOrEmpty(newProjectPerson.SitePersonId))
|
if (!string.IsNullOrEmpty(newProjectPerson.SitePersonId))
|
||||||
{
|
{
|
||||||
newProjectPerson.PersonId = this.PersonId;
|
newProjectPerson.PersonId = this.PersonId;
|
||||||
SitePerson_PersonService.UpdateSitePerson(newProjectPerson);
|
|
||||||
|
Model.Sys_Log newlog = new Sys_Log
|
||||||
|
{
|
||||||
|
UserId = this.CurrUser.PersonId,
|
||||||
|
MenuId = Const.PersonListMenuId,
|
||||||
|
OperationName = "劳务人员",
|
||||||
|
OperationLog = "劳务人员修改" + newProjectPerson.PersonName,
|
||||||
|
DataId = newProjectPerson.PersonId,
|
||||||
|
ProjectId = newProjectPerson.ProjectId,
|
||||||
|
};
|
||||||
|
SitePerson_PersonService.UpdateSitePerson(newProjectPerson, newlog);
|
||||||
LogService.AddSys_Log(this.CurrUser, newPerson.IdentityCard, newProjectPerson.SitePersonId, BLL.Const.ProjectPersonMenuId, BLL.Const.BtnModify);
|
LogService.AddSys_Log(this.CurrUser, newPerson.IdentityCard, newProjectPerson.SitePersonId, BLL.Const.ProjectPersonMenuId, BLL.Const.BtnModify);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace FineUIPro.Web.ProjectData
|
namespace FineUIPro.Web.ProjectData
|
||||||
{
|
{
|
||||||
using BLL;
|
using BLL;
|
||||||
|
using Model;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -122,7 +123,17 @@
|
|||||||
{
|
{
|
||||||
BLL.RoleItemService.DeleteRoleItem(roleItem.RoleItemId);
|
BLL.RoleItemService.DeleteRoleItem(roleItem.RoleItemId);
|
||||||
}
|
}
|
||||||
SitePerson_PersonService.UpdateSitePerson(projectUser);
|
|
||||||
|
Model.Sys_Log newlog = new Sys_Log
|
||||||
|
{
|
||||||
|
UserId = this.CurrUser.PersonId,
|
||||||
|
MenuId = Const.PersonListMenuId,
|
||||||
|
OperationName = "项目用户",
|
||||||
|
OperationLog = "项目用户删除" + projectUser.PersonName,
|
||||||
|
DataId = projectUser.PersonId,
|
||||||
|
ProjectId = projectUser.ProjectId,
|
||||||
|
};
|
||||||
|
SitePerson_PersonService.UpdateSitePerson(projectUser, newlog);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
|
using Model;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
@@ -114,7 +115,17 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
{
|
{
|
||||||
newProjectUser.WorkAreaId = string.Join(",", txtUnitWork.Values);
|
newProjectUser.WorkAreaId = string.Join(",", txtUnitWork.Values);
|
||||||
}
|
}
|
||||||
BLL.SitePerson_PersonService.UpdateSitePerson(newProjectUser);
|
|
||||||
|
Model.Sys_Log newlog = new Sys_Log
|
||||||
|
{
|
||||||
|
UserId = this.CurrUser.PersonId,
|
||||||
|
MenuId = Const.PersonListMenuId,
|
||||||
|
OperationName = "项目用户",
|
||||||
|
OperationLog = "项目用户修改" + newProjectUser.PersonName,
|
||||||
|
DataId = newProjectUser.PersonId,
|
||||||
|
ProjectId = newProjectUser.ProjectId,
|
||||||
|
};
|
||||||
|
BLL.SitePerson_PersonService.UpdateSitePerson(newProjectUser, newlog);
|
||||||
|
|
||||||
///离岗 -todo
|
///离岗 -todo
|
||||||
Model.Sys_RoleItem roleItem = BLL.RoleItemService.GeRoleItemByUserIdAndProjectId(newProjectUser.PersonId, newProjectUser.ProjectId);
|
Model.Sys_RoleItem roleItem = BLL.RoleItemService.GeRoleItemByUserIdAndProjectId(newProjectUser.PersonId, newProjectUser.ProjectId);
|
||||||
|
|||||||
+82
-10
@@ -74047,7 +74047,7 @@ namespace Model
|
|||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(15) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
|
||||||
public string MaterialCode
|
public string MaterialCode
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -74151,7 +74151,7 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(3000)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||||
public string MaterialDef
|
public string MaterialDef
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -78741,7 +78741,7 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(15)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")]
|
||||||
public string MaterialCode
|
public string MaterialCode
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -83089,7 +83089,7 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(200)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")]
|
||||||
public string CanWelderCode
|
public string CanWelderCode
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -122458,7 +122458,7 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialName", DbType="NVarChar(50)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialName", DbType="NVarChar(100)")]
|
||||||
public string MaterialName
|
public string MaterialName
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -122478,7 +122478,7 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationAndModel", DbType="NVarChar(50)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationAndModel", DbType="NVarChar(200)")]
|
||||||
public string SpecificationAndModel
|
public string SpecificationAndModel
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -122498,7 +122498,7 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(100)")]
|
||||||
public string MaterialCode
|
public string MaterialCode
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -122518,7 +122518,7 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Material", DbType="NVarChar(50)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Material", DbType="NVarChar(100)")]
|
||||||
public string Material
|
public string Material
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -124992,6 +124992,8 @@ namespace Model
|
|||||||
|
|
||||||
private System.Nullable<System.DateTime> _CompileDate;
|
private System.Nullable<System.DateTime> _CompileDate;
|
||||||
|
|
||||||
|
private string _AttachUrl;
|
||||||
|
|
||||||
private EntityRef<Base_Project> _Base_Project;
|
private EntityRef<Base_Project> _Base_Project;
|
||||||
|
|
||||||
private EntitySet<Meeting_CQMSMeetingApprove> _Meeting_CQMSMeetingApprove;
|
private EntitySet<Meeting_CQMSMeetingApprove> _Meeting_CQMSMeetingApprove;
|
||||||
@@ -125030,6 +125032,8 @@ namespace Model
|
|||||||
partial void OnCompileManChanged();
|
partial void OnCompileManChanged();
|
||||||
partial void OnCompileDateChanging(System.Nullable<System.DateTime> value);
|
partial void OnCompileDateChanging(System.Nullable<System.DateTime> value);
|
||||||
partial void OnCompileDateChanged();
|
partial void OnCompileDateChanged();
|
||||||
|
partial void OnAttachUrlChanging(string value);
|
||||||
|
partial void OnAttachUrlChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Meeting_CQMSMeeting()
|
public Meeting_CQMSMeeting()
|
||||||
@@ -125343,6 +125347,26 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(1000)")]
|
||||||
|
public string AttachUrl
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._AttachUrl;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._AttachUrl != value))
|
||||||
|
{
|
||||||
|
this.OnAttachUrlChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._AttachUrl = value;
|
||||||
|
this.SendPropertyChanged("AttachUrl");
|
||||||
|
this.OnAttachUrlChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Meeting_CQMSMeeting_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Meeting_CQMSMeeting_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
|
||||||
public Base_Project Base_Project
|
public Base_Project Base_Project
|
||||||
{
|
{
|
||||||
@@ -181344,6 +181368,8 @@ namespace Model
|
|||||||
|
|
||||||
private string _RewardAndPunishDecision;
|
private string _RewardAndPunishDecision;
|
||||||
|
|
||||||
|
private string _AttachUrl;
|
||||||
|
|
||||||
private EntityRef<Base_Project> _Base_Project;
|
private EntityRef<Base_Project> _Base_Project;
|
||||||
|
|
||||||
private EntitySet<RewardAndPunish_RewardAndPunishApprove> _RewardAndPunish_RewardAndPunishApprove;
|
private EntitySet<RewardAndPunish_RewardAndPunishApprove> _RewardAndPunish_RewardAndPunishApprove;
|
||||||
@@ -181374,6 +181400,8 @@ namespace Model
|
|||||||
partial void OnCompileDateChanged();
|
partial void OnCompileDateChanged();
|
||||||
partial void OnRewardAndPunishDecisionChanging(string value);
|
partial void OnRewardAndPunishDecisionChanging(string value);
|
||||||
partial void OnRewardAndPunishDecisionChanged();
|
partial void OnRewardAndPunishDecisionChanged();
|
||||||
|
partial void OnAttachUrlChanging(string value);
|
||||||
|
partial void OnAttachUrlChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public RewardAndPunish_RewardAndPunish()
|
public RewardAndPunish_RewardAndPunish()
|
||||||
@@ -181587,7 +181615,7 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RewardAndPunishDecision", DbType="NVarChar(200)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RewardAndPunishDecision", DbType="NVarChar(100)")]
|
||||||
public string RewardAndPunishDecision
|
public string RewardAndPunishDecision
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -181607,6 +181635,26 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(1000)")]
|
||||||
|
public string AttachUrl
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._AttachUrl;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._AttachUrl != value))
|
||||||
|
{
|
||||||
|
this.OnAttachUrlChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._AttachUrl = value;
|
||||||
|
this.SendPropertyChanged("AttachUrl");
|
||||||
|
this.OnAttachUrlChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_RewardAndPunish_RewardAndPunish_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_RewardAndPunish_RewardAndPunish_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
|
||||||
public Base_Project Base_Project
|
public Base_Project Base_Project
|
||||||
{
|
{
|
||||||
@@ -212208,6 +212256,8 @@ namespace Model
|
|||||||
|
|
||||||
private System.Nullable<System.DateTime> _CompileDate;
|
private System.Nullable<System.DateTime> _CompileDate;
|
||||||
|
|
||||||
|
private string _AttachUrl;
|
||||||
|
|
||||||
private EntityRef<Base_CQMSTrainType> _Base_CQMSTrainType;
|
private EntityRef<Base_CQMSTrainType> _Base_CQMSTrainType;
|
||||||
|
|
||||||
private EntityRef<Base_Project> _Base_Project;
|
private EntityRef<Base_Project> _Base_Project;
|
||||||
@@ -212244,6 +212294,8 @@ namespace Model
|
|||||||
partial void OnCompileManChanged();
|
partial void OnCompileManChanged();
|
||||||
partial void OnCompileDateChanging(System.Nullable<System.DateTime> value);
|
partial void OnCompileDateChanging(System.Nullable<System.DateTime> value);
|
||||||
partial void OnCompileDateChanged();
|
partial void OnCompileDateChanged();
|
||||||
|
partial void OnAttachUrlChanging(string value);
|
||||||
|
partial void OnAttachUrlChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Train_TrainPlan()
|
public Train_TrainPlan()
|
||||||
@@ -212541,6 +212593,26 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(1000)")]
|
||||||
|
public string AttachUrl
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._AttachUrl;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._AttachUrl != value))
|
||||||
|
{
|
||||||
|
this.OnAttachUrlChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._AttachUrl = value;
|
||||||
|
this.SendPropertyChanged("AttachUrl");
|
||||||
|
this.OnAttachUrlChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Train_TrainPlan_Base_CQMSTrainType", Storage="_Base_CQMSTrainType", ThisKey="TrainTypeId", OtherKey="TrainTypeId", IsForeignKey=true)]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Train_TrainPlan_Base_CQMSTrainType", Storage="_Base_CQMSTrainType", ThisKey="TrainTypeId", OtherKey="TrainTypeId", IsForeignKey=true)]
|
||||||
public Base_CQMSTrainType Base_CQMSTrainType
|
public Base_CQMSTrainType Base_CQMSTrainType
|
||||||
{
|
{
|
||||||
@@ -236044,7 +236116,7 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(200)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")]
|
||||||
public string CanWelderCode
|
public string CanWelderCode
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -0,0 +1,262 @@
|
|||||||
|
using BLL;
|
||||||
|
using Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web.Http;
|
||||||
|
|
||||||
|
namespace WebAPI.Controllers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 质量会议
|
||||||
|
/// </summary>
|
||||||
|
public class CQMSMeetingController : ApiController
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 根据项目id获取质量会议列表集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId"></param>
|
||||||
|
/// <param name="index"></param>
|
||||||
|
/// <param name="page"></param>
|
||||||
|
/// <param name="meetingType"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ResponseData<List<Meeting_CQMSMeeting>> getMeetingList(string projectId, int index, int page, string meetingType)
|
||||||
|
{
|
||||||
|
ResponseData<List<Meeting_CQMSMeeting>> res = new ResponseData<List<Meeting_CQMSMeeting>>();
|
||||||
|
res.successful = true;
|
||||||
|
res.resultValue = BLL.CQMS_MeetingService.getListDataForApi(projectId, index, page, meetingType);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据id获取质量会议详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ResponseData<Meeting_CQMSMeeting> GetMeetingByMeetingId(string id)
|
||||||
|
{
|
||||||
|
ResponseData<Meeting_CQMSMeeting> res = new ResponseData<Meeting_CQMSMeeting>();
|
||||||
|
Meeting_CQMSMeeting cd = BLL.CQMS_MeetingService.GetMeetingByMeetingIdForApi(id);
|
||||||
|
|
||||||
|
res.successful = true;
|
||||||
|
res.resultValue = BeanUtil.CopyOjbect<Meeting_CQMSMeeting>(cd, true);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据id获取审核记录集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ResponseData<List<Meeting_CQMSMeetingApprove>> GetApproveById(string id)
|
||||||
|
{
|
||||||
|
ResponseData<List<Meeting_CQMSMeetingApprove>> res = new ResponseData<List<Meeting_CQMSMeetingApprove>>();
|
||||||
|
|
||||||
|
res.successful = true;
|
||||||
|
res.resultValue = BLL.CQMS_MeetingApproveService.GetListDataByIdForApi(id);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据id获取当前办理人审批信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ResponseData<Meeting_CQMSMeetingApprove> GetCurrApproveById(string id)
|
||||||
|
{
|
||||||
|
ResponseData<Meeting_CQMSMeetingApprove> res = new ResponseData<Meeting_CQMSMeetingApprove>();
|
||||||
|
|
||||||
|
res.successful = true;
|
||||||
|
res.resultValue = BeanUtil.CopyOjbect<Meeting_CQMSMeetingApprove>(BLL.CQMS_MeetingApproveService.getCurrApproveForApi(id), true);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存会议主表信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="meeting"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public ResponseData<string> AddCQMSMeeting([FromBody] Model.Meeting_CQMSMeeting meeting)
|
||||||
|
{
|
||||||
|
ResponseData<string> res = new ResponseData<string>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(meeting.MeetingId))
|
||||||
|
{
|
||||||
|
meeting.MeetingId = Guid.NewGuid().ToString();
|
||||||
|
BLL.CQMS_MeetingService.AddMeetingForApi(meeting);
|
||||||
|
if (meeting.MeetingType == "M")
|
||||||
|
{
|
||||||
|
SaveAttachFile(meeting.MeetingId, BLL.Const.CQMSMonthMeetingMenuId, meeting.AttachUrl);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SaveAttachFile(meeting.MeetingId, BLL.Const.CQMSSpecialMeetingMenuId, meeting.AttachUrl);
|
||||||
|
}
|
||||||
|
res.resultValue = meeting.MeetingId;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BLL.CQMS_MeetingService.UpdateMeetingForApi(meeting);
|
||||||
|
if (meeting.MeetingType == "M")
|
||||||
|
{
|
||||||
|
SaveAttachFile(meeting.MeetingId, BLL.Const.CQMSMonthMeetingMenuId, meeting.AttachUrl);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SaveAttachFile(meeting.MeetingId, BLL.Const.CQMSSpecialMeetingMenuId, meeting.AttachUrl);
|
||||||
|
}
|
||||||
|
res.resultValue = meeting.MeetingId;
|
||||||
|
}
|
||||||
|
|
||||||
|
res.successful = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
res.resultHint = e.StackTrace;
|
||||||
|
res.successful = false;
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SaveAttachFile(string dataId, string menuId, string url)
|
||||||
|
{
|
||||||
|
Model.ToDoItem toDoItem = new Model.ToDoItem
|
||||||
|
{
|
||||||
|
MenuId = menuId,
|
||||||
|
DataId = dataId,
|
||||||
|
UrlStr = url,
|
||||||
|
};
|
||||||
|
APIUpLoadFileService.SaveAttachUrl(toDoItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新增办理信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="approve"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public ResponseData<string> AddApprove([FromBody] Model.Meeting_CQMSMeetingApprove approve)
|
||||||
|
{
|
||||||
|
ResponseData<string> res = new ResponseData<string>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Model.Meeting_CQMSMeeting Meeting = new Model.Meeting_CQMSMeeting();
|
||||||
|
Meeting.MeetingId = approve.MeetingId;
|
||||||
|
Meeting.State = approve.ApproveType;
|
||||||
|
BLL.CQMS_MeetingService.UpdateMeetingForApi(Meeting);
|
||||||
|
res.resultValue = BLL.CQMS_MeetingApproveService.AddMeetingApproveForApi(approve);
|
||||||
|
res.successful = true;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
res.resultHint = e.StackTrace;
|
||||||
|
res.successful = false;
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新办理信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="approve"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public ResponseData<string> UpdateApprove([FromBody] Model.Meeting_CQMSMeetingApprove approve)
|
||||||
|
{
|
||||||
|
ResponseData<string> res = new ResponseData<string>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
approve.ApproveDate = DateTime.Now;
|
||||||
|
BLL.CQMS_MeetingApproveService.UpdateMeetingApproveForApi(approve);
|
||||||
|
res.successful = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
res.resultHint = e.StackTrace;
|
||||||
|
res.successful = false;
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取主持人信息
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Model.ResponeData getHostMan(string projectId, string unitId)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
responeData.data = APIBaseInfoService.getCQMSMeetingHostMan(projectId, unitId);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取质量会议参加人员
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Model.ResponeData getAttentPerson(string projectId)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
responeData.data = APIBaseInfoService.getAttentPerson(projectId);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据状态获取办理步骤 0-重新编制,1-编制,2-总包质量经理审批,C-审批完成
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Model.ResponeData getHandleListByState(string state)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
responeData.data = CQMS_MeetingService.GetDHandleTypeByStateForApi(state);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据办理步骤获取办理人
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Model.ResponeData getHandleManListByState(string state, string id, string projectId)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
responeData.data = CQMS_MeetingService.GetHandleManListForApi(state, id, projectId);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
using BLL;
|
||||||
|
using Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web.Http;
|
||||||
|
|
||||||
|
namespace WebAPI.Controllers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 质量计划
|
||||||
|
/// </summary>
|
||||||
|
public class CQMSPlanController : ApiController
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 根据项目id获取总包质量计划列表集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId"></param>
|
||||||
|
/// <param name="index"></param>
|
||||||
|
/// <param name="page"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ResponseData<List<Plan_MainPlan>> getMainPlanList(string projectId, int index, int page)
|
||||||
|
{
|
||||||
|
ResponseData<List<Plan_MainPlan>> res = new ResponseData<List<Plan_MainPlan>>();
|
||||||
|
res.successful = true;
|
||||||
|
res.resultValue = BLL.CQMS_MainPlanService.getListDataForApi(projectId, index, page);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据项目id获取分包质量计划列表集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId"></param>
|
||||||
|
/// <param name="index"></param>
|
||||||
|
/// <param name="page"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ResponseData<List<Plan_SubPlan>> getSubPlanList(string projectId, int index, int page)
|
||||||
|
{
|
||||||
|
ResponseData<List<Plan_SubPlan>> res = new ResponseData<List<Plan_SubPlan>>();
|
||||||
|
res.successful = true;
|
||||||
|
res.resultValue = BLL.CQMS_SubPlanService.getListDataForApi(projectId, index, page);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 根据id获取总包质量计划详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ResponseData<Plan_MainPlan> GetMainPlanByMainPlanId(string id)
|
||||||
|
{
|
||||||
|
ResponseData<Plan_MainPlan> res = new ResponseData<Plan_MainPlan>();
|
||||||
|
Plan_MainPlan cd = BLL.CQMS_MainPlanService.GetMainPlanByMainPlanIdForApi(id);
|
||||||
|
|
||||||
|
res.successful = true;
|
||||||
|
res.resultValue = BeanUtil.CopyOjbect<Plan_MainPlan>(cd, true);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 根据id获取分包质量计划详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ResponseData<Plan_SubPlan> GetSubPlanBySubPlanId(string id)
|
||||||
|
{
|
||||||
|
ResponseData<Plan_SubPlan> res = new ResponseData<Plan_SubPlan>();
|
||||||
|
Plan_SubPlan cd = BLL.CQMS_SubPlanService.GetSubPlanBySubPlanIdForApi(id);
|
||||||
|
|
||||||
|
res.successful = true;
|
||||||
|
res.resultValue = BeanUtil.CopyOjbect<Plan_SubPlan>(cd, true);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 根据id获取总包质量计划审批明细
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ResponseData<List<Plan_MainPlanApprove>> GetMainPlanApproveById(string id)
|
||||||
|
{
|
||||||
|
ResponseData<List<Plan_MainPlanApprove>> res = new ResponseData<List<Plan_MainPlanApprove>>();
|
||||||
|
res.successful = true;
|
||||||
|
res.resultValue = BLL.CQMS_MainPlanApproveService.getApproveListDataByIdForApi(id);
|
||||||
|
return res;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 根据id获取分包质量计划审批明细
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ResponseData<List<Plan_SubPlanApprove>> GetSubPlanApproveById(string id)
|
||||||
|
{
|
||||||
|
ResponseData<List<Plan_SubPlanApprove>> res = new ResponseData<List<Plan_SubPlanApprove>>();
|
||||||
|
res.successful = true;
|
||||||
|
res.resultValue = BLL.CQMS_SubPlanApproveService.getApproveListDataByIdForApi(id);
|
||||||
|
return res;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
using BLL;
|
||||||
|
using Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web.Http;
|
||||||
|
|
||||||
|
namespace WebAPI.Controllers
|
||||||
|
{
|
||||||
|
public class CQMSRewardAndPunishController : ApiController
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 根据项目id获取质量会议列表集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId"></param>
|
||||||
|
/// <param name="index"></param>
|
||||||
|
/// <param name="page"></param>
|
||||||
|
/// <param name="type">0-全部,1-奖励,2-处罚</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ResponseData<List<RewardAndPunish_RewardAndPunish>> getMeetingList(string projectId, int index, int page, string type)
|
||||||
|
{
|
||||||
|
ResponseData<List<RewardAndPunish_RewardAndPunish>> res = new ResponseData<List<RewardAndPunish_RewardAndPunish>>();
|
||||||
|
res.successful = true;
|
||||||
|
//res.resultValue = BLL.RewardAndPunishService.getListDataForApi(projectId, index, page, type);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
using BLL;
|
||||||
|
using Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web.Http;
|
||||||
|
|
||||||
|
namespace WebAPI.Controllers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 质量培训计划
|
||||||
|
/// </summary>
|
||||||
|
public class CQMSTrainController : ApiController
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 根据项目id获取质量培训列表集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId"></param>
|
||||||
|
/// <param name="index"></param>
|
||||||
|
/// <param name="page"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ResponseData<List<Train_TrainPlan>> getTrainPlanList(string projectId, int index, int page)
|
||||||
|
{
|
||||||
|
ResponseData<List<Train_TrainPlan>> res = new ResponseData<List<Train_TrainPlan>>();
|
||||||
|
res.successful = true;
|
||||||
|
res.resultValue = BLL.CQMS_TrainPlanService.getListDataForApi(projectId, index, page);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据id获取质量培训详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ResponseData<Train_TrainPlan> GetTrainPlanByTrainPlanId(string id)
|
||||||
|
{
|
||||||
|
ResponseData<Train_TrainPlan> res = new ResponseData<Train_TrainPlan>();
|
||||||
|
Train_TrainPlan cd = BLL.CQMS_TrainPlanService.GetTraiPlanByTrainPlanIdForApi(id);
|
||||||
|
|
||||||
|
res.successful = true;
|
||||||
|
res.resultValue = BeanUtil.CopyOjbect<Train_TrainPlan>(cd, true);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 保存质量培训
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="trainPlan"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public ResponseData<string> AddTrainPlan([FromBody] Model.Train_TrainPlan trainPlan)
|
||||||
|
{
|
||||||
|
ResponseData<string> res = new ResponseData<string>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(trainPlan.TrainPlanId))
|
||||||
|
{
|
||||||
|
trainPlan.TrainPlanId = Guid.NewGuid().ToString();
|
||||||
|
BLL.CQMS_TrainPlanService.AddTrainPlanForApi(trainPlan);
|
||||||
|
SaveAttachFile(trainPlan.TrainPlanId, BLL.Const.CQMSTrainPlanMenuId, trainPlan.AttachUrl);
|
||||||
|
res.resultValue = trainPlan.TrainPlanId;
|
||||||
|
res.successful = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BLL.CQMS_TrainPlanService.UpdateTrainPlanForApi(trainPlan);
|
||||||
|
SaveAttachFile(trainPlan.TrainPlanId, BLL.Const.CQMSTrainPlanMenuId, trainPlan.AttachUrl);
|
||||||
|
res.resultValue = trainPlan.TrainPlanId;
|
||||||
|
res.successful = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
res.successful = false;
|
||||||
|
res.resultHint = e.StackTrace;
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public static void SaveAttachFile(string dataId, string menuId, string url)
|
||||||
|
{
|
||||||
|
Model.ToDoItem toDoItem = new Model.ToDoItem
|
||||||
|
{
|
||||||
|
MenuId = menuId,
|
||||||
|
DataId = dataId,
|
||||||
|
UrlStr = url,
|
||||||
|
};
|
||||||
|
APIUpLoadFileService.SaveAttachUrl(toDoItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取培训对象列表信息
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Model.ResponeData getPlanTrainPersons()
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
responeData.data = APIBaseInfoService.getPlanTrainPersons();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取培训类别列表信息
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Model.ResponeData getTrainType()
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
responeData.data = APIBaseInfoService.getCQMSTrainType();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取培训主持人信息
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Model.ResponeData getHostMan(string projectId)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
responeData.data = APIBaseInfoService.getCQMSTrainHostMan(projectId);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取参与培训教育人员信息
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Model.ResponeData getRealTrainPersons(string projectId)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
responeData.data = APIBaseInfoService.getRealTrainPersons(projectId);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -53,7 +53,6 @@ namespace WebAPI.Controllers
|
|||||||
public Model.ResponeData AddHTGLPerson_Pro([FromBody] Model.Pro_Person PersonjsonData)
|
public Model.ResponeData AddHTGLPerson_Pro([FromBody] Model.Pro_Person PersonjsonData)
|
||||||
{
|
{
|
||||||
var responeData = new Model.ResponeData();
|
var responeData = new Model.ResponeData();
|
||||||
APICommonService.SaveSysHttpLog("API", JsonConvert.SerializeObject(PersonjsonData), "");
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -55,6 +55,28 @@ namespace WebAPI.Controllers
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 获取项目所有单位
|
||||||
|
/// <summary>
|
||||||
|
/// 获取项目所有单位
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Model.ResponeData getProjectUnitLists(string projectId)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
responeData.data = APIUnitService.getProjectUnitLists(projectId);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 根据projectId、unitType获取单位信息(总包1;施工分包2;监理3;业主4;其他5)
|
#region 根据projectId、unitType获取单位信息(总包1;施工分包2;监理3;业主4;其他5)
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据projectId、unitType获取单位信息(总包1;施工分包2;监理3;业主4;其他5)
|
/// 根据projectId、unitType获取单位信息(总包1;施工分包2;监理3;业主4;其他5)
|
||||||
|
|||||||
@@ -167,7 +167,11 @@
|
|||||||
<Compile Include="Areas\HelpPage\XmlDocumentationProvider.cs" />
|
<Compile Include="Areas\HelpPage\XmlDocumentationProvider.cs" />
|
||||||
<Compile Include="Controllers\BaseInfoController.cs" />
|
<Compile Include="Controllers\BaseInfoController.cs" />
|
||||||
<Compile Include="Controllers\CommonController.cs" />
|
<Compile Include="Controllers\CommonController.cs" />
|
||||||
|
<Compile Include="Controllers\CQMS\CQMSMeetingController.cs" />
|
||||||
<Compile Include="Controllers\CQMS\CQMSPersonManageController.cs" />
|
<Compile Include="Controllers\CQMS\CQMSPersonManageController.cs" />
|
||||||
|
<Compile Include="Controllers\CQMS\CQMSPlanController.cs" />
|
||||||
|
<Compile Include="Controllers\CQMS\CQMSRewardAndPunishController.cs" />
|
||||||
|
<Compile Include="Controllers\CQMS\CQMSTrainController.cs" />
|
||||||
<Compile Include="Controllers\CQMS\WBSController.cs" />
|
<Compile Include="Controllers\CQMS\WBSController.cs" />
|
||||||
<Compile Include="Controllers\HJGL\HJGLIndexController.cs" />
|
<Compile Include="Controllers\HJGL\HJGLIndexController.cs" />
|
||||||
<Compile Include="Controllers\HJGL\PackagingManageController.cs" />
|
<Compile Include="Controllers\HJGL\PackagingManageController.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user