安全会议,教育培训接口
This commit is contained in:
parent
75ce4655b4
commit
89bd4cc350
|
|
@ -76,7 +76,7 @@ namespace BLL
|
||||||
GetDataService.CreateTrainingTaskItemByTaskId(taskId);
|
GetDataService.CreateTrainingTaskItemByTaskId(taskId);
|
||||||
|
|
||||||
var getDataLists = (from x in db.Training_TaskItem
|
var getDataLists = (from x in db.Training_TaskItem
|
||||||
join y in db.Training_CompanyTrainingItem on x.TrainingItemCode equals y.CompanyTrainingItemCode into temp
|
join y in db.Training_CompanyTrainingItem on x.CompanyTrainingItemId equals y.CompanyTrainingItemId into temp
|
||||||
from y in temp.DefaultIfEmpty()
|
from y in temp.DefaultIfEmpty()
|
||||||
where x.TaskId == taskId
|
where x.TaskId == taskId
|
||||||
orderby x.TrainingItemCode
|
orderby x.TrainingItemCode
|
||||||
|
|
@ -93,7 +93,8 @@ namespace BLL
|
||||||
PersonId = x.PersonId,
|
PersonId = x.PersonId,
|
||||||
TrainingItemCode = x.TrainingItemCode,
|
TrainingItemCode = x.TrainingItemCode,
|
||||||
TrainingItemName = x.TrainingItemName,
|
TrainingItemName = x.TrainingItemName,
|
||||||
AttachUrl = x.AttachUrl.Replace('\\', '/'),
|
AttachUrl = db.AttachFile.FirstOrDefault(y => y.ToKeyId == x.CompanyTrainingItemId).AttachUrl.Replace("\\", "/"),
|
||||||
|
//AttachUrl = x.AttachUrl.Replace('\\', '/'),
|
||||||
}).ToList();
|
}).ToList();
|
||||||
return getDataLists;
|
return getDataLists;
|
||||||
}
|
}
|
||||||
|
|
@ -325,6 +326,17 @@ namespace BLL
|
||||||
item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes;
|
item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes;
|
||||||
item.EndTime = endTime;
|
item.EndTime = endTime;
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
|
var companyTrainingItem = db.Training_CompanyTrainingItem.FirstOrDefault(x => x.CompanyTrainingItemCode == item.TrainingItemCode);
|
||||||
|
int companyTrainingItemLearnTime = companyTrainingItem?.LearningTime ?? 0; //培训教材时长(秒)
|
||||||
|
|
||||||
|
//如果学习时长大于培训教材时长,则关闭状态
|
||||||
|
if (item.LearnTime > companyTrainingItemLearnTime)
|
||||||
|
{
|
||||||
|
var taskModel = db.Training_Task.FirstOrDefault(x => x.TaskId == item.TaskId);
|
||||||
|
taskModel.States = "2";
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,13 @@ namespace BLL
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Model.Training_Plan> GetThisYearPlanByCompanyTrainingItemId(string projectId, string itemId, int year)
|
public static List<Model.Training_Plan> GetThisYearPlanByCompanyTrainingItemId(string projectId, string itemId, int year)
|
||||||
{
|
{
|
||||||
return db.Training_Plan.Where(e => e.ProjectId == projectId && e.CompanyTrainingItemId == itemId && e.IsRetakeCourse != 1 && ((DateTime)e.DesignerDate).Year == year).ToList();
|
var list = db.Training_Plan.Where(e => e.CompanyTrainingItemId == itemId && e.IsRetakeCourse != 1 && ((DateTime)e.DesignerDate).Year == year).ToList();
|
||||||
|
if (!string.IsNullOrWhiteSpace(projectId))
|
||||||
|
{
|
||||||
|
list = list.Where(x => x.ProjectId == projectId).ToList();
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -297,16 +301,30 @@ namespace BLL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//生成培训计划
|
#region 生成培训计划
|
||||||
|
|
||||||
|
List<string> projectIds = new List<string>();
|
||||||
|
if (!string.IsNullOrWhiteSpace(info.CurrProjectId))
|
||||||
|
{
|
||||||
|
projectIds.Add(info.CurrProjectId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var getProjects = ProjectService.GetProjectWorkList();
|
||||||
|
projectIds = getProjects.Select(x => x.ProjectId).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var pid in projectIds)
|
||||||
|
{
|
||||||
string planId = SQLHelper.GetNewID();
|
string planId = SQLHelper.GetNewID();
|
||||||
string code = ProjectService.GetProjectByProjectId(info.CurrProjectId).ProjectCode + "-";
|
string code = ProjectService.GetProjectByProjectId(pid).ProjectCode + "-";
|
||||||
string planCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", info.CurrProjectId, code);
|
string planCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", pid, code);
|
||||||
|
|
||||||
Model.Training_Plan planModel = new Model.Training_Plan
|
Model.Training_Plan planModel = new Model.Training_Plan
|
||||||
{
|
{
|
||||||
PlanId = planId,
|
PlanId = planId,
|
||||||
PlanCode = planCode,
|
PlanCode = planCode,
|
||||||
ProjectId = info.CurrProjectId,
|
ProjectId = pid,
|
||||||
DesignerId = info.CurrUserId,
|
DesignerId = info.CurrUserId,
|
||||||
DesignerDate = DateTime.Now,
|
DesignerDate = DateTime.Now,
|
||||||
PlanName = companyTrainingItem.CompanyTrainingItemName,
|
PlanName = companyTrainingItem.CompanyTrainingItemName,
|
||||||
|
|
@ -349,7 +367,7 @@ namespace BLL
|
||||||
Model.Training_Task newTask = new Model.Training_Task
|
Model.Training_Task newTask = new Model.Training_Task
|
||||||
{
|
{
|
||||||
TaskId = taskId,
|
TaskId = taskId,
|
||||||
ProjectId = info.CurrProjectId,
|
ProjectId = pid,
|
||||||
PlanId = planId,
|
PlanId = planId,
|
||||||
UserId = person.PersonId,
|
UserId = person.PersonId,
|
||||||
TaskDate = DateTime.Now,
|
TaskDate = DateTime.Now,
|
||||||
|
|
@ -379,6 +397,9 @@ namespace BLL
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 选择人员生成培训计划
|
/// 选择人员生成培训计划
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -336,7 +336,7 @@ namespace BLL
|
||||||
{
|
{
|
||||||
foreach (var work in workPostIds)
|
foreach (var work in workPostIds)
|
||||||
{
|
{
|
||||||
var plist = (from x in Funs.DB.SitePerson_Person where x.IsUsed == true && x.ProjectId == projectId && x.WorkPostId == work select x).ToList();
|
var plist = (from x in Funs.DB.SitePerson_Person where x.IsUsed == true && x.WorkPostId == work select x).ToList();
|
||||||
if (plist.Any())
|
if (plist.Any())
|
||||||
{
|
{
|
||||||
list.AddRange(plist);
|
list.AddRange(plist);
|
||||||
|
|
@ -345,7 +345,12 @@ namespace BLL
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
list = (from x in Funs.DB.SitePerson_Person where x.IsUsed == true && x.ProjectId == projectId select x).ToList();
|
list = (from x in Funs.DB.SitePerson_Person where x.IsUsed == true select x).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(projectId))
|
||||||
|
{
|
||||||
|
list = list.Where(x => x.ProjectId == projectId).ToList();
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||||
strSql += " AND PersonName LIKE @PersonName";
|
strSql += " AND PersonName LIKE @PersonName";
|
||||||
listStr.Add(new SqlParameter("@PersonName", "%" + this.txtPersonName.Text.Trim() + "%"));
|
listStr.Add(new SqlParameter("@PersonName", "%" + this.txtPersonName.Text.Trim() + "%"));
|
||||||
}
|
}
|
||||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||||
{
|
{
|
||||||
strSql += " AND UnitId = @UnitId";
|
strSql += " AND UnitId = @UnitId";
|
||||||
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
|
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||||
strSql += " AND TrainRecord.UnitIds LIKE @UnitId1";
|
strSql += " AND TrainRecord.UnitIds LIKE @UnitId1";
|
||||||
listStr.Add(new SqlParameter("@UnitId1", "%" + this.CurrUser.UnitId + "%"));
|
listStr.Add(new SqlParameter("@UnitId1", "%" + this.CurrUser.UnitId + "%"));
|
||||||
}
|
}
|
||||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||||
{
|
{
|
||||||
strSql += " AND TrainRecord.UnitIds LIKE @UnitIds";
|
strSql += " AND TrainRecord.UnitIds LIKE @UnitIds";
|
||||||
listStr.Add(new SqlParameter("@UnitIds", "%" + this.drpUnitId.SelectedValue.Trim() + "%"));
|
listStr.Add(new SqlParameter("@UnitIds", "%" + this.drpUnitId.SelectedValue.Trim() + "%"));
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ClassMeeting.aspx.cs" Inherits="FineUIPro.Web.HSSE.Meeting.ClassMeeting" %>
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ClassMeeting.aspx.cs" Inherits="FineUIPro.Web.HSSE.Meeting.ClassMeeting" %>
|
||||||
|
|
||||||
|
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head runat="server">
|
<head runat="server">
|
||||||
|
|
@ -9,7 +10,22 @@
|
||||||
<body>
|
<body>
|
||||||
<form id="form1" runat="server">
|
<form id="form1" runat="server">
|
||||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||||
|
<Items>
|
||||||
|
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||||
|
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||||
|
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||||
|
<Items>
|
||||||
|
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||||
|
BodyPadding="0px">
|
||||||
|
<uc1:unitprojecttcontrol id="ucTree" runat="server" onchange="changeTree" />
|
||||||
|
</f:ContentPanel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||||
|
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||||
|
<Items>
|
||||||
|
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="班前会" EnableCollapse="true"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="班前会" EnableCollapse="true"
|
||||||
|
|
@ -90,6 +106,10 @@
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
<f:Window ID="Window1" Title="班前会" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
<f:Window ID="Window1" Title="班前会" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||||
Width="1024px" Height="630px">
|
Width="1024px" Height="630px">
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
this.ProjectId = Request.Params["projectId"];
|
this.ProjectId = Request.Params["projectId"];
|
||||||
}
|
}
|
||||||
////权限按钮方法
|
////权限按钮方法
|
||||||
this.GetButtonPower();
|
//this.GetButtonPower();
|
||||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
||||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||||
{
|
{
|
||||||
|
|
@ -58,12 +58,27 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
// 绑定表格
|
// 绑定表格
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
|
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
{
|
||||||
|
this.panelLeftRegion.Hidden = true;
|
||||||
|
// this.Grid1.Columns[0].Hidden = true;
|
||||||
|
////权限按钮方法
|
||||||
|
this.GetButtonPower();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
protected void changeTree(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.ProjectId = this.ucTree.ProjectId;
|
||||||
|
this.BindGrid();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 绑定数据
|
/// 绑定数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||||
{
|
{
|
||||||
string strSql = "SELECT ClassMeeting.ClassMeetingId,ClassMeeting.ProjectId,CodeRecords.Code AS ClassMeetingCode,Unit.UnitId,Unit.UnitName,ClassMeeting.ClassMeetingName,ClassMeeting.ClassMeetingDate,ClassMeeting.CompileMan,ClassMeeting.ClassMeetingContents,ClassMeeting.CompileDate,ClassMeeting.States "
|
string strSql = "SELECT ClassMeeting.ClassMeetingId,ClassMeeting.ProjectId,CodeRecords.Code AS ClassMeetingCode,Unit.UnitId,Unit.UnitName,ClassMeeting.ClassMeetingName,ClassMeeting.ClassMeetingDate,ClassMeeting.CompileMan,ClassMeeting.ClassMeetingContents,ClassMeeting.CompileDate,ClassMeeting.States "
|
||||||
+ @" ,(CASE WHEN ClassMeeting.States = " + BLL.Const.State_0 + " OR ClassMeeting.States IS NULL THEN '待['+ISNULL(OperateUser.UserName,Users.UserName)+']提交' WHEN ClassMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
+ @" ,(CASE WHEN ClassMeeting.States = " + BLL.Const.State_0 + " OR ClassMeeting.States IS NULL THEN '待['+ISNULL(OperateUser.UserName,Users.UserName)+']提交' WHEN ClassMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
||||||
|
|
@ -74,11 +89,13 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
+ @" LEFT JOIN Sys_User AS Users ON ClassMeeting.CompileMan = Users.UserId"
|
+ @" LEFT JOIN Sys_User AS Users ON ClassMeeting.CompileMan = Users.UserId"
|
||||||
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId WHERE 1=1 ";
|
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId WHERE 1=1 ";
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
|
||||||
{
|
|
||||||
strSql += " AND ClassMeeting.ProjectId = @ProjectId";
|
strSql += " AND ClassMeeting.ProjectId = @ProjectId";
|
||||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||||
}
|
//if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
//{
|
||||||
|
// strSql += " AND ClassMeeting.ProjectId = @ProjectId";
|
||||||
|
// listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||||
|
//}
|
||||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||||
{
|
{
|
||||||
strSql += " AND Unit.UnitId = @UnitId";
|
strSql += " AND Unit.UnitId = @UnitId";
|
||||||
|
|
@ -102,6 +119,7 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
Grid1.DataSource = table;
|
Grid1.DataSource = table;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 改变索引事件
|
/// 改变索引事件
|
||||||
|
|
@ -266,7 +284,7 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectClassMeetingMenuId);
|
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectClassMeetingMenuId);
|
||||||
if (buttonList.Count() > 0)
|
if (buttonList.Count() > 0)
|
||||||
{
|
{
|
||||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,12 @@
|
||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.HSSE.Meeting {
|
namespace FineUIPro.Web.HSSE.Meeting
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
public partial class ClassMeeting {
|
public partial class ClassMeeting
|
||||||
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
|
|
@ -39,6 +41,51 @@ namespace FineUIPro.Web.HSSE.Meeting {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Panel Panel1;
|
protected global::FineUIPro.Panel Panel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelLeftRegion 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelLeftRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ContentPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ucTree 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelCenterRegion 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelCenterRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Panel2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel Panel2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grid1 控件。
|
/// Grid1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MonthMeeting.aspx.cs" Inherits="FineUIPro.Web.HSSE.Meeting.MonthMeeting" %>
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MonthMeeting.aspx.cs" Inherits="FineUIPro.Web.HSSE.Meeting.MonthMeeting" %>
|
||||||
|
|
||||||
|
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head runat="server">
|
<head runat="server">
|
||||||
|
|
@ -9,7 +10,22 @@
|
||||||
<body>
|
<body>
|
||||||
<form id="form1" runat="server">
|
<form id="form1" runat="server">
|
||||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||||
|
<Items>
|
||||||
|
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||||
|
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||||
|
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||||
|
<Items>
|
||||||
|
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||||
|
BodyPadding="0px">
|
||||||
|
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||||
|
</f:ContentPanel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||||
|
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||||
|
<Items>
|
||||||
|
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全月例会" EnableCollapse="true"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全月例会" EnableCollapse="true"
|
||||||
|
|
@ -83,7 +99,7 @@
|
||||||
SortField="AttentPersonNum" FieldType="Int" HeaderText="参会人数" HeaderTextAlign="Center"
|
SortField="AttentPersonNum" FieldType="Int" HeaderText="参会人数" HeaderTextAlign="Center"
|
||||||
TextAlign="Left">
|
TextAlign="Left">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<%-- <f:RenderField Width="90px" ColumnID="AttentPerson" DataField="AttentPerson"
|
<%-- <f:RenderField Width="90px" ColumnID="AttentPerson" DataField="AttentPerson"
|
||||||
SortField="AttentPerson" FieldType="String" HeaderText="参会人员" HeaderTextAlign="Center"
|
SortField="AttentPerson" FieldType="String" HeaderText="参会人员" HeaderTextAlign="Center"
|
||||||
TextAlign="Left">
|
TextAlign="Left">
|
||||||
</f:RenderField>--%>
|
</f:RenderField>--%>
|
||||||
|
|
@ -112,6 +128,10 @@
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
<f:Window ID="Window1" Title="安全月例会" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
<f:Window ID="Window1" Title="安全月例会" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||||
Width="1024px" Height="630px">
|
Width="1024px" Height="630px">
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
this.ProjectId = Request.Params["projectId"];
|
this.ProjectId = Request.Params["projectId"];
|
||||||
}
|
}
|
||||||
////权限按钮方法
|
////权限按钮方法
|
||||||
this.GetButtonPower();
|
//this.GetButtonPower();
|
||||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
||||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||||
{
|
{
|
||||||
|
|
@ -60,13 +60,27 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
// 绑定表格
|
// 绑定表格
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
|
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
{
|
||||||
|
this.panelLeftRegion.Hidden = true;
|
||||||
|
// this.Grid1.Columns[0].Hidden = true;
|
||||||
|
////权限按钮方法
|
||||||
|
this.GetButtonPower();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void changeTree(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.ProjectId = this.ucTree.ProjectId;
|
||||||
|
this.BindGrid();
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 绑定数据
|
/// 绑定数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||||
{
|
{
|
||||||
string strSql = @"SELECT MonthMeeting.MonthMeetingId,MonthMeeting.ProjectId,CodeRecords.Code AS MonthMeetingCode,Unit.UnitId,Unit.UnitName,MonthMeeting.MonthMeetingName,MonthMeeting.MonthMeetingDate,MonthMeeting.CompileMan,MonthMeeting.MonthMeetingContents,MonthMeeting.CompileDate,MonthMeeting.States,MonthMeeting.MeetingHours,MonthMeeting.MeetingHostMan,MonthMeeting.AttentPersonNum,MonthMeeting.AttentPerson "
|
string strSql = @"SELECT MonthMeeting.MonthMeetingId,MonthMeeting.ProjectId,CodeRecords.Code AS MonthMeetingCode,Unit.UnitId,Unit.UnitName,MonthMeeting.MonthMeetingName,MonthMeeting.MonthMeetingDate,MonthMeeting.CompileMan,MonthMeeting.MonthMeetingContents,MonthMeeting.CompileDate,MonthMeeting.States,MonthMeeting.MeetingHours,MonthMeeting.MeetingHostMan,MonthMeeting.AttentPersonNum,MonthMeeting.AttentPerson "
|
||||||
+ @" ,(CASE WHEN MonthMeeting.States = " + BLL.Const.State_0 + " OR MonthMeeting.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN MonthMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
+ @" ,(CASE WHEN MonthMeeting.States = " + BLL.Const.State_0 + " OR MonthMeeting.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN MonthMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
||||||
|
|
@ -78,16 +92,17 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId WHERE 1=1 ";
|
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId WHERE 1=1 ";
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
strSql += " AND MonthMeeting.ProjectId = @ProjectId";
|
strSql += " AND MonthMeeting.ProjectId = @ProjectId";
|
||||||
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||||
{
|
//if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
||||||
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
//{
|
||||||
strSql += " AND MonthMeeting.States = @States"; ///状态为已完成
|
// listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||||
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
|
// strSql += " AND MonthMeeting.States = @States"; ///状态为已完成
|
||||||
}
|
// listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
|
||||||
else
|
//}
|
||||||
{
|
//else
|
||||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
//{
|
||||||
}
|
// listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||||
|
//}
|
||||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||||
{
|
{
|
||||||
strSql += " AND Unit.UnitId = @UnitId";
|
strSql += " AND Unit.UnitId = @UnitId";
|
||||||
|
|
@ -111,6 +126,7 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
Grid1.DataSource = table;
|
Grid1.DataSource = table;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 改变索引事件
|
/// 改变索引事件
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,51 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Panel Panel1;
|
protected global::FineUIPro.Panel Panel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelLeftRegion 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelLeftRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ContentPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ucTree 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelCenterRegion 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelCenterRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Panel2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel Panel2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grid1 控件。
|
/// Grid1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SpecialMeeting.aspx.cs" Inherits="FineUIPro.Web.HSSE.Meeting.SpecialMeeting" %>
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SpecialMeeting.aspx.cs" Inherits="FineUIPro.Web.HSSE.Meeting.SpecialMeeting" %>
|
||||||
|
|
||||||
|
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
@ -10,7 +11,22 @@
|
||||||
<body>
|
<body>
|
||||||
<form id="form1" runat="server">
|
<form id="form1" runat="server">
|
||||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||||
|
<Items>
|
||||||
|
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||||
|
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||||
|
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||||
|
<Items>
|
||||||
|
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||||
|
BodyPadding="0px">
|
||||||
|
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||||
|
</f:ContentPanel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||||
|
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||||
|
<Items>
|
||||||
|
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全专题会议" EnableCollapse="true"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全专题会议" EnableCollapse="true"
|
||||||
|
|
@ -110,6 +126,10 @@
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
<f:Window ID="Window1" Title="安全专题会议" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
<f:Window ID="Window1" Title="安全专题会议" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||||
Width="1024px" Height="630px">
|
Width="1024px" Height="630px">
|
||||||
|
|
|
||||||
|
|
@ -60,13 +60,27 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
// 绑定表格
|
// 绑定表格
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
|
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
{
|
||||||
|
this.panelLeftRegion.Hidden = true;
|
||||||
|
// this.Grid1.Columns[0].Hidden = true;
|
||||||
|
////权限按钮方法
|
||||||
|
this.GetButtonPower();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void changeTree(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.ProjectId = this.ucTree.ProjectId;
|
||||||
|
this.BindGrid();
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 绑定数据
|
/// 绑定数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||||
{
|
{
|
||||||
string strSql = "SELECT SpecialMeeting.SpecialMeetingId,SpecialMeeting.ProjectId,CodeRecords.Code AS SpecialMeetingCode,Unit.UnitId,Unit.UnitName,SpecialMeeting.SpecialMeetingName,SpecialMeeting.SpecialMeetingDate,SpecialMeeting.CompileMan,SpecialMeeting.SpecialMeetingContents,SpecialMeeting.CompileDate,SpecialMeeting.States,SpecialMeeting.MeetingHours,SpecialMeeting.MeetingHostMan,SpecialMeeting.AttentPersonNum,SpecialMeeting.AttentPerson"
|
string strSql = "SELECT SpecialMeeting.SpecialMeetingId,SpecialMeeting.ProjectId,CodeRecords.Code AS SpecialMeetingCode,Unit.UnitId,Unit.UnitName,SpecialMeeting.SpecialMeetingName,SpecialMeeting.SpecialMeetingDate,SpecialMeeting.CompileMan,SpecialMeeting.SpecialMeetingContents,SpecialMeeting.CompileDate,SpecialMeeting.States,SpecialMeeting.MeetingHours,SpecialMeeting.MeetingHostMan,SpecialMeeting.AttentPersonNum,SpecialMeeting.AttentPerson"
|
||||||
+ @" ,(CASE WHEN SpecialMeeting.States = " + BLL.Const.State_0 + " OR SpecialMeeting.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN SpecialMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
+ @" ,(CASE WHEN SpecialMeeting.States = " + BLL.Const.State_0 + " OR SpecialMeeting.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN SpecialMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
||||||
|
|
@ -78,16 +92,17 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId WHERE 1=1 ";
|
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId WHERE 1=1 ";
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
strSql += " AND SpecialMeeting.ProjectId = @ProjectId";
|
strSql += " AND SpecialMeeting.ProjectId = @ProjectId";
|
||||||
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||||
{
|
//if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
||||||
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
//{
|
||||||
strSql += " AND SpecialMeeting.States = @States"; ///状态为已完成
|
// listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||||
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
|
// strSql += " AND SpecialMeeting.States = @States"; ///状态为已完成
|
||||||
}
|
// listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
|
||||||
else
|
//}
|
||||||
{
|
//else
|
||||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
//{
|
||||||
}
|
// listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||||
|
//}
|
||||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||||
{
|
{
|
||||||
strSql += " AND Unit.UnitId = @UnitId";
|
strSql += " AND Unit.UnitId = @UnitId";
|
||||||
|
|
@ -111,6 +126,7 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
Grid1.DataSource = table;
|
Grid1.DataSource = table;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 改变索引事件
|
/// 改变索引事件
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,51 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Panel Panel1;
|
protected global::FineUIPro.Panel Panel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelLeftRegion 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelLeftRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ContentPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ucTree 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelCenterRegion 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelCenterRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Panel2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel Panel2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grid1 控件。
|
/// Grid1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeekMeeting.aspx.cs" Inherits="FineUIPro.Web.HSSE.Meeting.WeekMeeting" %>
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeekMeeting.aspx.cs" Inherits="FineUIPro.Web.HSSE.Meeting.WeekMeeting" %>
|
||||||
|
|
||||||
|
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head runat="server">
|
<head runat="server">
|
||||||
|
|
@ -9,7 +10,22 @@
|
||||||
<body>
|
<body>
|
||||||
<form id="form1" runat="server">
|
<form id="form1" runat="server">
|
||||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||||
|
<Items>
|
||||||
|
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||||
|
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||||
|
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||||
|
<Items>
|
||||||
|
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||||
|
BodyPadding="0px">
|
||||||
|
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||||
|
</f:ContentPanel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||||
|
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||||
|
<Items>
|
||||||
|
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全周例会" EnableCollapse="true"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全周例会" EnableCollapse="true"
|
||||||
|
|
@ -105,6 +121,10 @@
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
<f:Window ID="Window1" Title="安全周例会" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
<f:Window ID="Window1" Title="安全周例会" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1024px"
|
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1024px"
|
||||||
Height="630px">
|
Height="630px">
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
{
|
{
|
||||||
this.ProjectId = Request.Params["projectId"];
|
this.ProjectId = Request.Params["projectId"];
|
||||||
}
|
}
|
||||||
////权限按钮方法
|
//////权限按钮方法
|
||||||
this.GetButtonPower();
|
//this.GetButtonPower();
|
||||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
||||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||||
{
|
{
|
||||||
|
|
@ -60,12 +60,28 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
// 绑定表格
|
// 绑定表格
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
|
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
{
|
||||||
|
this.panelLeftRegion.Hidden = true;
|
||||||
|
// this.Grid1.Columns[0].Hidden = true;
|
||||||
|
////权限按钮方法
|
||||||
|
this.GetButtonPower();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void changeTree(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.ProjectId = this.ucTree.ProjectId;
|
||||||
|
this.BindGrid();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 绑定数据
|
/// 绑定数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||||
{
|
{
|
||||||
string strSql = @"SELECT WeekMeeting.WeekMeetingId,WeekMeeting.ProjectId,CodeRecords.Code AS WeekMeetingCode,Unit.UnitId,Unit.UnitName,WeekMeeting.WeekMeetingName,WeekMeeting.WeekMeetingDate,WeekMeeting.CompileMan,Users.UserName AS CompileManName, WeekMeeting.WeekMeetingContents,WeekMeeting.CompileDate,WeekMeeting.States,WeekMeeting.MeetingHours,WeekMeeting.MeetingHostMan, UsersH.UserName as MeetingHostManName ,WeekMeeting.AttentPersonNum,WeekMeeting.AttentPerson "
|
string strSql = @"SELECT WeekMeeting.WeekMeetingId,WeekMeeting.ProjectId,CodeRecords.Code AS WeekMeetingCode,Unit.UnitId,Unit.UnitName,WeekMeeting.WeekMeetingName,WeekMeeting.WeekMeetingDate,WeekMeeting.CompileMan,Users.UserName AS CompileManName, WeekMeeting.WeekMeetingContents,WeekMeeting.CompileDate,WeekMeeting.States,WeekMeeting.MeetingHours,WeekMeeting.MeetingHostMan, UsersH.UserName as MeetingHostManName ,WeekMeeting.AttentPersonNum,WeekMeeting.AttentPerson "
|
||||||
+ @" ,(CASE WHEN WeekMeeting.States = " + BLL.Const.State_0 + " OR WeekMeeting.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN WeekMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
+ @" ,(CASE WHEN WeekMeeting.States = " + BLL.Const.State_0 + " OR WeekMeeting.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN WeekMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
||||||
|
|
@ -78,16 +94,17 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId WHERE 1=1 ";
|
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId WHERE 1=1 ";
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
strSql += " AND WeekMeeting.ProjectId = @ProjectId";
|
strSql += " AND WeekMeeting.ProjectId = @ProjectId";
|
||||||
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||||
{
|
//if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
||||||
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
//{
|
||||||
strSql += " AND WeekMeeting.States = @States"; ///状态为已完成
|
// listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||||
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
|
// strSql += " AND WeekMeeting.States = @States"; ///状态为已完成
|
||||||
}
|
// listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
|
||||||
else
|
//}
|
||||||
{
|
//else
|
||||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
//{
|
||||||
}
|
// listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||||
|
//}
|
||||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||||
{
|
{
|
||||||
strSql += " AND Unit.UnitId = @UnitId";
|
strSql += " AND Unit.UnitId = @UnitId";
|
||||||
|
|
@ -111,6 +128,7 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||||
Grid1.DataSource = table;
|
Grid1.DataSource = table;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region 分页 排序
|
#region 分页 排序
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,12 @@
|
||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.HSSE.Meeting {
|
namespace FineUIPro.Web.HSSE.Meeting
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
public partial class WeekMeeting {
|
public partial class WeekMeeting
|
||||||
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
|
|
@ -39,6 +41,51 @@ namespace FineUIPro.Web.HSSE.Meeting {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Panel Panel1;
|
protected global::FineUIPro.Panel Panel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelLeftRegion 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelLeftRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ContentPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ucTree 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelCenterRegion 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelCenterRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Panel2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel Panel2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grid1 控件。
|
/// Grid1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonList.aspx.cs" Inherits="FineUIPro.Web.HSSE.SitePerson.PersonList" %>
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonList.aspx.cs" Inherits="FineUIPro.Web.HSSE.SitePerson.PersonList" %>
|
||||||
|
|
||||||
|
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head runat="server">
|
<head runat="server">
|
||||||
|
|
@ -9,6 +11,7 @@
|
||||||
.f-grid-row.Red {
|
.f-grid-row.Red {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.LabelColor {
|
.LabelColor {
|
||||||
color: Red;
|
color: Red;
|
||||||
font-size: small;
|
font-size: small;
|
||||||
|
|
@ -21,6 +24,16 @@
|
||||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||||
|
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||||
|
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||||
|
<Items>
|
||||||
|
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||||
|
BodyPadding="0px">
|
||||||
|
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||||
|
</f:ContentPanel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
<f:Panel runat="server" ID="panelLeftRegion1" RegionPosition="Left" RegionSplit="true"
|
||||||
EnableCollapse="true" Width="250" Title="人员信息" TitleToolTip="人员信息" ShowBorder="true"
|
EnableCollapse="true" Width="250" Title="人员信息" TitleToolTip="人员信息" ShowBorder="true"
|
||||||
ShowHeader="false" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
ShowHeader="false" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||||
<Items>
|
<Items>
|
||||||
|
|
@ -75,7 +88,7 @@
|
||||||
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
|
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
|
||||||
<Items>
|
<Items>
|
||||||
<f:DropDownList ID="drpIsUsedName" runat="server" Label="是否在岗" EnableEdit="true" AutoPostBack="True"
|
<f:DropDownList ID="drpIsUsedName" runat="server" Label="是否在岗" EnableEdit="true" AutoPostBack="True"
|
||||||
Width="200px" LabelWidth="100px" LabelAlign="right" ForceSelection="false" OnSelectedIndexChanged="drpIsUsedName_OnSelectedIndexChanged" >
|
Width="200px" LabelWidth="100px" LabelAlign="right" ForceSelection="false" OnSelectedIndexChanged="drpIsUsedName_OnSelectedIndexChanged">
|
||||||
<f:ListItem Value="是" Text="是" />
|
<f:ListItem Value="是" Text="是" />
|
||||||
<f:ListItem Value="否" Text="否" />
|
<f:ListItem Value="否" Text="否" />
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,16 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
{
|
{
|
||||||
this.ProjectId = Request.Params["projectId"];
|
this.ProjectId = Request.Params["projectId"];
|
||||||
}
|
}
|
||||||
////权限按钮方法
|
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||||
|
this.ucTree.ProjectId = this.ProjectId;
|
||||||
|
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
{
|
||||||
|
this.panelLeftRegion.Hidden = true;
|
||||||
|
//权限按钮方法
|
||||||
this.GetButtonPower();
|
this.GetButtonPower();
|
||||||
|
}
|
||||||
|
////权限按钮方法
|
||||||
|
//this.GetButtonPower();
|
||||||
this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
|
this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
|
||||||
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的 <b><script>{0}</script></b> 行数据吗?", Grid1.GetSelectedCountReference());
|
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的 <b><script>{0}</script></b> 行数据吗?", Grid1.GetSelectedCountReference());
|
||||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||||
|
|
@ -69,6 +77,27 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
this.InitTreeMenu();//加载树
|
this.InitTreeMenu();//加载树
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 公司级树加载
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void changeTree(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.ProjectId = this.ucTree.ProjectId;
|
||||||
|
this.InitTreeMenu();
|
||||||
|
this.BindGrid();
|
||||||
|
this.GetButtonPower();
|
||||||
|
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
{
|
||||||
|
btnNew.Hidden = true;
|
||||||
|
btnImport.Hidden = true;
|
||||||
|
btnPersonOut.Hidden = true;
|
||||||
|
btnMenuEdit.Hidden = true;
|
||||||
|
btnMenuDelete.Hidden = true;
|
||||||
|
//btnMenuBlackList.Hidden = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载树
|
/// 加载树
|
||||||
|
|
@ -79,46 +108,18 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
var project = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
|
var project = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||||
if (project != null)
|
if (project != null)
|
||||||
{
|
{
|
||||||
//var personLists = BLL.PersonService.GetPersonList(project.ProjectId);
|
var personLists = BLL.PersonService.GetPersonList(project.ProjectId);
|
||||||
|
|
||||||
String strSql1 = @"select UnitId,count( * ) num from SitePerson_Person
|
|
||||||
where ProjectId='" + this.CurrUser.LoginProjectId + @"'
|
|
||||||
group by UnitId";
|
|
||||||
|
|
||||||
String strSql2 = @" select UnitId,count( * ) num from SitePerson_Person
|
|
||||||
where ProjectId='" + this.CurrUser.LoginProjectId + @"' and IsUsed =1 and InTime<='" + DateTime.Now.ToString("yyyy-MM-dd") + "' and (OutTime is null or OutTime>'" + DateTime.Now.ToString("yyyy-MM-dd") + @"' )
|
|
||||||
group by UnitId";
|
|
||||||
|
|
||||||
|
|
||||||
DataTable dt1 = SQLHelper.GetDataTableRunText(strSql1, null);
|
|
||||||
DataTable dt2 = SQLHelper.GetDataTableRunText(strSql2, null);
|
|
||||||
int proTotal = 0;
|
|
||||||
int proIn = 0;
|
|
||||||
if (dt1 != null && dt1.Rows.Count > 0)
|
|
||||||
{
|
|
||||||
foreach (DataRow row in dt1.Rows)
|
|
||||||
{
|
|
||||||
proTotal += int.Parse(row["num"].ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (dt2 != null && dt2.Rows.Count > 0)
|
|
||||||
{
|
|
||||||
foreach (DataRow row in dt2.Rows)
|
|
||||||
{
|
|
||||||
proIn += int.Parse(row["num"].ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
TreeNode rootNode = new TreeNode();
|
TreeNode rootNode = new TreeNode();
|
||||||
rootNode = new TreeNode
|
rootNode = new TreeNode
|
||||||
{
|
{
|
||||||
Text = project.ProjectName,
|
Text = project.ProjectName,
|
||||||
NodeID = project.ProjectId
|
NodeID = project.ProjectId
|
||||||
};
|
};
|
||||||
if (proTotal > 0)
|
if (personLists.Count() > 0)
|
||||||
{
|
{
|
||||||
//var personIn = personLists.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.IsUsed == true
|
var personIn = personLists.Where(x => x.ProjectId == this.ProjectId && x.IsUsed == true
|
||||||
// && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime > DateTime.Now)).ToList();
|
&& x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime > DateTime.Now)).ToList();
|
||||||
rootNode.ToolTip = "当前项目人员总数:" + proTotal + ";在场人员数:" + proIn + ";离场人员数:" + (proTotal - proIn);
|
rootNode.ToolTip = "当前项目人员总数:" + personLists.Count() + ";在场人员数:" + personIn.Count() + ";离场人员数:" + (personLists.Count() - personIn.Count());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -126,7 +127,117 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
}
|
}
|
||||||
rootNode.Expanded = true;
|
rootNode.Expanded = true;
|
||||||
this.tvProjectAndUnit.Nodes.Add(rootNode);
|
this.tvProjectAndUnit.Nodes.Add(rootNode);
|
||||||
GetUnitLists(rootNode.Nodes, this.ProjectId, dt1, dt2);
|
GetUnitLists(rootNode.Nodes, this.ProjectId, personLists);
|
||||||
|
|
||||||
|
////var personLists = BLL.PersonService.GetPersonList(project.ProjectId);
|
||||||
|
|
||||||
|
//String strSql1 = @"select UnitId,count( * ) num from SitePerson_Person
|
||||||
|
// where ProjectId='" + this.CurrUser.LoginProjectId + @"'
|
||||||
|
// group by UnitId";
|
||||||
|
|
||||||
|
//String strSql2 = @" select UnitId,count( * ) num from SitePerson_Person
|
||||||
|
// where ProjectId='" + this.CurrUser.LoginProjectId + @"' and IsUsed =1 and InTime<='" + DateTime.Now.ToString("yyyy-MM-dd") + "' and (OutTime is null or OutTime>'" + DateTime.Now.ToString("yyyy-MM-dd") + @"' )
|
||||||
|
// group by UnitId";
|
||||||
|
|
||||||
|
|
||||||
|
//DataTable dt1 = SQLHelper.GetDataTableRunText(strSql1, null);
|
||||||
|
//DataTable dt2 = SQLHelper.GetDataTableRunText(strSql2, null);
|
||||||
|
//int proTotal = 0;
|
||||||
|
//int proIn = 0;
|
||||||
|
//if (dt1 != null && dt1.Rows.Count > 0)
|
||||||
|
//{
|
||||||
|
// foreach (DataRow row in dt1.Rows)
|
||||||
|
// {
|
||||||
|
// proTotal += int.Parse(row["num"].ToString());
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//if (dt2 != null && dt2.Rows.Count > 0)
|
||||||
|
//{
|
||||||
|
// foreach (DataRow row in dt2.Rows)
|
||||||
|
// {
|
||||||
|
// proIn += int.Parse(row["num"].ToString());
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//TreeNode rootNode = new TreeNode();
|
||||||
|
//rootNode = new TreeNode
|
||||||
|
//{
|
||||||
|
// Text = project.ProjectName,
|
||||||
|
// NodeID = project.ProjectId
|
||||||
|
//};
|
||||||
|
//if (proTotal > 0)
|
||||||
|
//{
|
||||||
|
// //var personIn = personLists.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.IsUsed == true
|
||||||
|
// // && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime > DateTime.Now)).ToList();
|
||||||
|
// rootNode.ToolTip = "当前项目人员总数:" + proTotal + ";在场人员数:" + proIn + ";离场人员数:" + (proTotal - proIn);
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// rootNode.ToolTip = "当前项目人员总数:0";
|
||||||
|
//}
|
||||||
|
//rootNode.Expanded = true;
|
||||||
|
//this.tvProjectAndUnit.Nodes.Add(rootNode);
|
||||||
|
//GetUnitLists(rootNode.Nodes, this.ProjectId, dt1, dt2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 加载单位
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="nodes"></param>
|
||||||
|
/// <param name="parentId"></param>
|
||||||
|
private void GetUnitLists(TreeNodeCollection nodes, string parentId, List<Model.SitePerson_Person> personLists)
|
||||||
|
{
|
||||||
|
List<Model.Base_Unit> unitLists = BLL.UnitService.GetUnitByProjectIdList(parentId);
|
||||||
|
if (unitLists.Count() > 0)
|
||||||
|
{
|
||||||
|
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(parentId, this.CurrUser.UnitId))
|
||||||
|
{
|
||||||
|
unitLists = unitLists.Where(x => x.UnitId == this.CurrUser.UnitId).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加其他单位/无单位人员
|
||||||
|
Model.Base_Unit otherUnit = new Model.Base_Unit
|
||||||
|
{
|
||||||
|
UnitId = "0",
|
||||||
|
UnitName = "其他"
|
||||||
|
};
|
||||||
|
unitLists.Add(otherUnit);
|
||||||
|
|
||||||
|
TreeNode newNode = null;
|
||||||
|
foreach (var q in unitLists)
|
||||||
|
{
|
||||||
|
newNode = new TreeNode
|
||||||
|
{
|
||||||
|
Text = q.UnitName,
|
||||||
|
NodeID = q.UnitId + "|" + parentId,
|
||||||
|
ToolTip = q.UnitName
|
||||||
|
};
|
||||||
|
if (personLists.Count() > 0)
|
||||||
|
{
|
||||||
|
var personUnitLists = personLists.Where(x => x.UnitId == q.UnitId);
|
||||||
|
if (q.UnitId == "0")
|
||||||
|
{
|
||||||
|
personUnitLists = personLists.Where(x => x.UnitId == null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (personUnitLists.Count() > 0)
|
||||||
|
{
|
||||||
|
var personIn = personUnitLists.Where(x => x.InTime <= System.DateTime.Now && x.IsUsed == true
|
||||||
|
&& (!x.OutTime.HasValue || x.OutTime >= System.DateTime.Now));
|
||||||
|
newNode.ToolTip = q.UnitName + "人员总数:" + personUnitLists.Count() + ";在场人员数:" + personIn.Count() + ";离场人员数:" + (personUnitLists.Count() - personIn.Count());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newNode.ToolTip = q.UnitName + "人员总数:0";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newNode.ToolTip = q.UnitName + "人员总数:0";
|
||||||
|
}
|
||||||
|
newNode.EnableClickEvent = true;
|
||||||
|
nodes.Add(newNode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,33 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Panel panelLeftRegion;
|
protected global::FineUIPro.Panel panelLeftRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ContentPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ucTree 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelLeftRegion1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelLeftRegion1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// tvProjectAndUnit 控件。
|
/// tvProjectAndUnit 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -86,10 +86,10 @@ namespace FineUIPro.Web.common
|
||||||
workSafetyDay10 = ((workSafetyDays % 100) / 10),
|
workSafetyDay10 = ((workSafetyDays % 100) / 10),
|
||||||
workSafetyDay100 = ((workSafetyDays % 1000) / 100),
|
workSafetyDay100 = ((workSafetyDays % 1000) / 100),
|
||||||
workSafetyDay1000 = ((workSafetyDays % 10000) / 1000),
|
workSafetyDay1000 = ((workSafetyDays % 10000) / 1000),
|
||||||
projectsUnderConstruction = hsseData.BeUnderConstructionNum ?? 0,
|
projectsUnderConstruction = hsseData != null ? hsseData.BeUnderConstructionNum ?? 0 : 0,
|
||||||
shutdownProject = hsseData.ShutdownNum ?? 0,
|
shutdownProject = hsseData != null ? hsseData.ShutdownNum ?? 0 : 0,
|
||||||
participateInNum = hsseData.JoinConstructionPersonNum ?? 0,
|
participateInNum = hsseData != null ? hsseData.JoinConstructionPersonNum ?? 0 : 0,
|
||||||
dangerousProject = hsseData.MajorProjectsUnderConstructionNum ?? 0
|
dangerousProject = hsseData != null ? hsseData.MajorProjectsUnderConstructionNum ?? 0 : 0,
|
||||||
},
|
},
|
||||||
//项目地图数据
|
//项目地图数据
|
||||||
chinaData = projects.Select(p => new
|
chinaData = projects.Select(p => new
|
||||||
|
|
|
||||||
|
|
@ -249,6 +249,20 @@ namespace Model
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 签名
|
||||||
|
/// </summary>
|
||||||
|
public string Signature
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Fingerprint
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
BIN
SGGL/WebAPI.zip
BIN
SGGL/WebAPI.zip
Binary file not shown.
|
|
@ -1,10 +1,14 @@
|
||||||
using System;
|
using BLL;
|
||||||
|
using Model;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Configuration;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using BLL;
|
|
||||||
namespace WebAPI.Controllers
|
namespace WebAPI.Controllers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -366,5 +370,132 @@ namespace WebAPI.Controllers
|
||||||
return responeData;
|
return responeData;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 交卷
|
||||||
|
/// <summary>
|
||||||
|
/// 交卷
|
||||||
|
/// </summary>
|
||||||
|
public Model.ResponeData SaveSubmitTestRecordByTestRecordId(Model.TestRecordItem testRecordItem)
|
||||||
|
{
|
||||||
|
string testRecordId = testRecordItem.TestRecordId;
|
||||||
|
string Signature = testRecordItem.Signature;
|
||||||
|
string Fingerprint = testRecordItem.Fingerprint;
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
#region 将答题记录保存到数据库
|
||||||
|
RedisHelper redis = new RedisHelper();
|
||||||
|
var trainingTestRecordItems = redis.GetObjString<List<Training_TestRecordItem>>(testRecordId);
|
||||||
|
|
||||||
|
if (trainingTestRecordItems != null)
|
||||||
|
{
|
||||||
|
var modeltestRecordItem = from x in db.Training_TestRecordItem
|
||||||
|
where x.TestRecordId == testRecordId
|
||||||
|
select x;
|
||||||
|
if (modeltestRecordItem.Any())
|
||||||
|
{
|
||||||
|
db.Training_TestRecordItem.DeleteAllOnSubmit(modeltestRecordItem);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
db.Training_TestRecordItem.InsertAllOnSubmit(trainingTestRecordItems);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
var getTestRecord = db.Training_TestRecord.FirstOrDefault(e => e.TestRecordId == testRecordId);
|
||||||
|
if (getTestRecord != null)
|
||||||
|
{
|
||||||
|
string rootUrl = ConfigurationManager.AppSettings["localRoot"];
|
||||||
|
string SignatureUrl = @"FileUpload\TestRecord\" + getTestRecord.TestRecordId + "~签名" + ".png";
|
||||||
|
string FingerprintUrl = @"FileUpload\TestRecord\" + getTestRecord.TestRecordId + "~指纹" + ".png";
|
||||||
|
string Signaturefilename = rootUrl + SignatureUrl;
|
||||||
|
string Fingerprintfilename = rootUrl + FingerprintUrl;
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(Signature))
|
||||||
|
{
|
||||||
|
Signature = Signature.Replace("data:image/svg+xml;base64,", "").Replace("data:image/png;base64,", "").Replace("data:image/jgp;base64,", "").Replace("data:image/jpg;base64,", "").Replace("data:image/jpeg;base64,", "");//将base64头部信息替换
|
||||||
|
byte[] bytes = Convert.FromBase64String(Signature);
|
||||||
|
|
||||||
|
MemoryStream memStream = new MemoryStream(bytes);
|
||||||
|
Image mImage = Image.FromStream(memStream);
|
||||||
|
Bitmap bp = new Bitmap(mImage);
|
||||||
|
MemoryStream ms = new MemoryStream();
|
||||||
|
bp.Save(Signaturefilename, System.Drawing.Imaging.ImageFormat.Png);
|
||||||
|
// System.IO.File.WriteAllBytes(Signaturefilename, Convert.FromBase64String(Signature));
|
||||||
|
|
||||||
|
getTestRecord.Signature = Signaturefilename.Replace(rootUrl, "");
|
||||||
|
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(Fingerprint))
|
||||||
|
{
|
||||||
|
Fingerprint = Fingerprint.Replace("data:image/svg+xml;base64,", "").Replace("data:image/png;base64,", "").Replace("data:image/jgp;base64,", "").Replace("data:image/jpg;base64,", "").Replace("data:image/jpeg;base64,", "");//将base64头部信息替换
|
||||||
|
|
||||||
|
byte[] bytes = Convert.FromBase64String(Fingerprint);
|
||||||
|
|
||||||
|
MemoryStream memStream = new MemoryStream(bytes);
|
||||||
|
Image mImage = Image.FromStream(memStream);
|
||||||
|
Bitmap bp = new Bitmap(mImage);
|
||||||
|
MemoryStream ms = new MemoryStream();
|
||||||
|
bp.Save(Fingerprintfilename, System.Drawing.Imaging.ImageFormat.Png);
|
||||||
|
|
||||||
|
getTestRecord.Fingerprint = Fingerprintfilename.Replace(rootUrl, "");
|
||||||
|
|
||||||
|
}
|
||||||
|
db.SubmitChanges();
|
||||||
|
// APITestRecordService.updateTestRecord(getTestRecord);
|
||||||
|
string returnTestRecordId = string.Empty;
|
||||||
|
////考试分数
|
||||||
|
decimal getTestScores = APITestRecordService.getSubmitTestRecord(getTestRecord);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(getTestRecord.TestPlanId))
|
||||||
|
{ ////及格分数
|
||||||
|
int getPassScores = 80;
|
||||||
|
var testRule = db.Sys_TestRule.FirstOrDefault();
|
||||||
|
if (testRule != null)
|
||||||
|
{
|
||||||
|
getPassScores = testRule.PassingScore;
|
||||||
|
}
|
||||||
|
if (getTestScores <= getPassScores)
|
||||||
|
{
|
||||||
|
int testCount = db.Training_TestRecord.Where(x => x.TestPlanId == getTestRecord.TestPlanId && x.TestManId == getTestRecord.TestManId).Count();
|
||||||
|
if (testCount < 2)
|
||||||
|
{
|
||||||
|
////重新生成一条考试记录 以及考试试卷
|
||||||
|
returnTestRecordId = APITestRecordService.getResitTestRecord(getTestRecord);
|
||||||
|
responeData.message = "考试不合格!您的成绩为:【" + getTestScores.ToString() + "】,您将进入补考。";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
APITestRecordService.updateAll(getTestRecord.TestPlanId);
|
||||||
|
responeData.message = "考试不合格!您的成绩为:【" + getTestScores.ToString() + "】,请再次参加培训后补考。";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
APITestRecordService.updateAll(getTestRecord.TestPlanId);
|
||||||
|
responeData.message = "恭喜考试通过!您的成绩为:【" + getTestScores.ToString() + "】。";
|
||||||
|
}
|
||||||
|
responeData.data = new { getTestScores, getPassScores, returnTestRecordId };
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
responeData.data = new { getTestScores };
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue