This commit is contained in:
李超 2023-09-22 17:36:00 +08:00
parent dece3781ec
commit 9942cdcf6f
49 changed files with 2907 additions and 2375 deletions

View File

@ -0,0 +1,5 @@
alter TABLE [dbo].[Training_TrainingItem] add
[LearningTime] [int] NULL
Alter TABLE [dbo].[Training_CompanyTrainingItem] add
[LearningTime] [int] NULL

View File

@ -0,0 +1,10 @@
alter TABLE [dbo].[InApproveManager_GeneralEquipmentInItem] add
[SpecialEquipmentName] [nvarchar](50) NULL
delete from Sys_Menu
where MenuId='1B08048F-93ED-4E84-AE65-DB7917EA2DFB'
delete from Sys_Menu
where MenuId='DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF'

View File

@ -491,12 +491,12 @@ namespace BLL
var getDataLists = (from x in db.Base_WorkPost var getDataLists = (from x in db.Base_WorkPost
where strParam == null || x.WorkPostName.Contains(strParam) where strParam == null || x.WorkPostName.Contains(strParam)
orderby x.WorkPostName orderby x.WorkPostName
select new Model.BaseInfoItem { BaseInfoId = x.WorkPostId.ToUpper(), BaseInfoCode = x.WorkPostCode, BaseInfoName = x.WorkPostName }).ToList(); select new Model.BaseInfoItem { BaseInfoId = x.WorkPostId , BaseInfoCode = x.WorkPostCode, BaseInfoName = x.WorkPostName }).ToList();
if (!string.IsNullOrEmpty(projectId)) if (!string.IsNullOrEmpty(projectId))
{ {
var user = from u in db.SitePerson_Person var user = from u in db.SitePerson_Person
where u.ProjectId == projectId where u.ProjectId == projectId
select u.WorkPostId.ToUpper(); select u.WorkPostId ;
var postIds = user.Distinct(); var postIds = user.Distinct();
foreach (var item in getDataLists) foreach (var item in getDataLists)

View File

@ -78,6 +78,10 @@ namespace BLL
TaskItemId = x.TaskItemId, TaskItemId = x.TaskItemId,
TaskId = x.TaskId, TaskId = x.TaskId,
PlanId = x.PlanId, PlanId = x.PlanId,
StartTime = x.StartTime,
EndTime =x.EndTime,
LearnTime=x.LearnTime,
VideoProgress = x.VideoProgress,
PersonId = x.PersonId, PersonId = x.PersonId,
TrainingItemCode = x.TrainingItemCode, TrainingItemCode = x.TrainingItemCode,
TrainingItemName = x.TrainingItemName, TrainingItemName = x.TrainingItemName,
@ -257,7 +261,7 @@ namespace BLL
/// </summary> /// </summary>
/// <param name="trainingPlanId"></param> /// <param name="trainingPlanId"></param>
/// <returns>培训计划人员</returns> /// <returns>培训计划人员</returns>
public static Model.Training_TaskItem updateTaskItemLearnTime(string taskItemId,DateTime startTime,DateTime endTime) public static Model.Training_TaskItem updateTaskItemLearnTime(string taskItemId,DateTime startTime,DateTime endTime,string VideoProgress)
{ {
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
@ -270,13 +274,16 @@ namespace BLL
item.StartTime = startTime; item.StartTime = startTime;
} }
if (!item.LearnTime.HasValue) //if (!item.LearnTime.HasValue)
//{
// item.LearnTime = 0;
//}
if (!string.IsNullOrEmpty(VideoProgress))
{ {
item.LearnTime = 0; item.VideoProgress = int.Parse(VideoProgress);
} }
var span = endTime.Subtract(startTime); var span = endTime.Subtract(startTime);
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();
return item; return item;

View File

@ -1500,6 +1500,11 @@
{ {
str += "&nbsp;&nbsp;D." + item.DItem; str += "&nbsp;&nbsp;D." + item.DItem;
}
if (!string.IsNullOrEmpty(item.EItem))
{
str += "&nbsp;&nbsp;E." + item.EItem;
} }
sb.AppendFormat("<td align=\"left\" style=\"width:100%; \">{0}</td> ", str); sb.AppendFormat("<td align=\"left\" style=\"width:100%; \">{0}</td> ", str);
@ -1544,6 +1549,10 @@
{ {
str += "&nbsp;&nbsp;D." + item.DItem; str += "&nbsp;&nbsp;D." + item.DItem;
} }
if (!string.IsNullOrEmpty(item.EItem))
{
str += "&nbsp;&nbsp;E." + item.EItem;
}
sb.AppendFormat("<td align=\"left\" style=\"width: 100%; \">{0}</td> ", str); sb.AppendFormat("<td align=\"left\" style=\"width: 100%; \">{0}</td> ", str);
sb.Append("</tr>"); sb.Append("</tr>");

View File

@ -1,7 +1,12 @@
using System; using FineUIPro;
using Model;
using NPOI.Util;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Web.Caching;
using System.Web.UI.WebControls;
namespace BLL namespace BLL
{ {
@ -31,13 +36,26 @@ namespace BLL
Model.Training_Plan newPlan = new Model.Training_Plan Model.Training_Plan newPlan = new Model.Training_Plan
{ {
PlanId = plan.PlanId, PlanId = plan.PlanId,
ProjectId = plan.ProjectId,
PlanCode = plan.PlanCode, PlanCode = plan.PlanCode,
PlanName = plan.PlanName, PlanName = plan.PlanName,
DesignerId = plan.DesignerId, DesignerId = plan.DesignerId,
DesignerDate = plan.DesignerDate, DesignerDate = plan.DesignerDate,
WorkPostId = plan.WorkPostId, WorkPostId = plan.WorkPostId,
TrainContent = plan.TrainContent,
TeachMan = plan.TeachMan,
TeachHour = plan.TeachHour,
TrainStartDate = plan.TrainStartDate,
TrainEndDate = plan.TrainEndDate,
TeachAddress = plan.TeachAddress,
UnitIds = plan.UnitIds,
TrainLevelId = plan.TrainLevelId,
TrainTypeId = plan.TrainTypeId,
Cycle = plan.Cycle,
States = plan.States States = plan.States
}; };
db.Training_Plan.InsertOnSubmit(newPlan); db.Training_Plan.InsertOnSubmit(newPlan);
db.SubmitChanges(); db.SubmitChanges();
} }
@ -57,7 +75,18 @@ namespace BLL
newPlan.DesignerDate = plan.DesignerDate; newPlan.DesignerDate = plan.DesignerDate;
newPlan.WorkPostId = plan.WorkPostId; newPlan.WorkPostId = plan.WorkPostId;
newPlan.QRCodeUrl = plan.QRCodeUrl; newPlan.QRCodeUrl = plan.QRCodeUrl;
newPlan.TrainContent = plan.TrainContent;
newPlan.TeachMan = plan.TeachMan;
newPlan.TeachHour = plan.TeachHour;
newPlan.TrainStartDate = plan.TrainStartDate;
newPlan.TrainEndDate = plan.TrainEndDate;
newPlan.TeachAddress = plan.TeachAddress;
newPlan.UnitIds = plan.UnitIds;
newPlan.TrainLevelId = plan.TrainLevelId;
newPlan.TrainTypeId = plan.TrainTypeId;
newPlan.Cycle = plan.Cycle;
newPlan.States = plan.States; newPlan.States = plan.States;
Funs.DB.SubmitChanges(); Funs.DB.SubmitChanges();
} }
} }

View File

@ -42,6 +42,7 @@ namespace BLL
GeneralEquipmentInItemId = generalEquipmentInItem.GeneralEquipmentInItemId, GeneralEquipmentInItemId = generalEquipmentInItem.GeneralEquipmentInItemId,
GeneralEquipmentInId = generalEquipmentInItem.GeneralEquipmentInId, GeneralEquipmentInId = generalEquipmentInItem.GeneralEquipmentInId,
SpecialEquipmentId = generalEquipmentInItem.SpecialEquipmentId, SpecialEquipmentId = generalEquipmentInItem.SpecialEquipmentId,
SpecialEquipmentName = generalEquipmentInItem.SpecialEquipmentName,
SizeModel = generalEquipmentInItem.SizeModel, SizeModel = generalEquipmentInItem.SizeModel,
OwnerCheck = generalEquipmentInItem.OwnerCheck, OwnerCheck = generalEquipmentInItem.OwnerCheck,
CertificateNum = generalEquipmentInItem.CertificateNum, CertificateNum = generalEquipmentInItem.CertificateNum,
@ -64,6 +65,7 @@ namespace BLL
newGeneralEquipmentInItem.GeneralEquipmentInId = generalEquipmentInItem.GeneralEquipmentInId; newGeneralEquipmentInItem.GeneralEquipmentInId = generalEquipmentInItem.GeneralEquipmentInId;
newGeneralEquipmentInItem.SpecialEquipmentId = generalEquipmentInItem.SpecialEquipmentId; newGeneralEquipmentInItem.SpecialEquipmentId = generalEquipmentInItem.SpecialEquipmentId;
newGeneralEquipmentInItem.SizeModel = generalEquipmentInItem.SizeModel; newGeneralEquipmentInItem.SizeModel = generalEquipmentInItem.SizeModel;
newGeneralEquipmentInItem.SpecialEquipmentName = generalEquipmentInItem.SpecialEquipmentName;
newGeneralEquipmentInItem.OwnerCheck = generalEquipmentInItem.OwnerCheck; newGeneralEquipmentInItem.OwnerCheck = generalEquipmentInItem.OwnerCheck;
newGeneralEquipmentInItem.CertificateNum = generalEquipmentInItem.CertificateNum; newGeneralEquipmentInItem.CertificateNum = generalEquipmentInItem.CertificateNum;
newGeneralEquipmentInItem.IsUsed = generalEquipmentInItem.IsUsed; newGeneralEquipmentInItem.IsUsed = generalEquipmentInItem.IsUsed;

View File

@ -128,6 +128,8 @@ namespace BLL
{ {
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
Model.SitePerson_PersonInOut newPersonInOut = new Model.SitePerson_PersonInOut Model.SitePerson_PersonInOut newPersonInOut = new Model.SitePerson_PersonInOut
{ {
PersonInOutId = SQLHelper.GetNewID(), PersonInOutId = SQLHelper.GetNewID(),
@ -152,8 +154,15 @@ namespace BLL
} }
if (getPerson != null && !string.IsNullOrEmpty(getPerson.PersonId)) if (getPerson != null && !string.IsNullOrEmpty(getPerson.PersonId))
{ {
newPersonInOut.ProjectId = getPerson.ProjectId;
newPersonInOut.PersonId = getPerson.PersonId; newPersonInOut.PersonId = getPerson.PersonId;
newPersonInOut.ProjectId = getPerson.ProjectId;
var old = db.SitePerson_PersonInOut.Where(x => x.PersonId == newPersonInOut.PersonId && x.IsIn == newPersonInOut.IsIn && x.ProjectId == newPersonInOut.ProjectId && x.ChangeTime > newPersonInOut.ChangeTime.Value.AddMinutes(-2)).FirstOrDefault();
if(old != null)
{
return;
}
newPersonInOut.PersonName = getPerson.PersonName; newPersonInOut.PersonName = getPerson.PersonName;
newPersonInOut.IdentityCard = getPerson.IdentityCard; newPersonInOut.IdentityCard = getPerson.IdentityCard;
newPersonInOut.UnitId = getPerson.UnitId; newPersonInOut.UnitId = getPerson.UnitId;

View File

@ -39,6 +39,7 @@ namespace BLL
PersonId = item.UserId, PersonId = item.UserId,
TrainingItemCode = dataItem.TrainingItemCode, TrainingItemCode = dataItem.TrainingItemCode,
TrainingItemName = dataItem.TrainingItemName, TrainingItemName = dataItem.TrainingItemName,
LearnTime = dataItem.LearnTime,
AttachUrl = dataItem.AttachUrl, AttachUrl = dataItem.AttachUrl,
}; };

View File

@ -1643,6 +1643,7 @@
<Content Include="res\assets\js\video-7.15.0.min.js" /> <Content Include="res\assets\js\video-7.15.0.min.js" />
<Content Include="res\assets\js\world.js" /> <Content Include="res\assets\js\world.js" />
<Content Include="res\DataInTable.js" /> <Content Include="res\DataInTable.js" />
<Content Include="res\images\Monitoring.png" />
<Content Include="res\indexv1\assets\css\sub_index.css" /> <Content Include="res\indexv1\assets\css\sub_index.css" />
<Content Include="res\indexv1\assets\image\sub_index\security\01_1.png" /> <Content Include="res\indexv1\assets\image\sub_index\security\01_1.png" />
<Content Include="res\indexv1\assets\image\sub_index\security\01_2.png" /> <Content Include="res\indexv1\assets\image\sub_index\security\01_2.png" />

View File

@ -69,8 +69,9 @@
</f:ToolbarFill> </f:ToolbarFill>
<f:HiddenField runat="server" ID="hdRemark"> <f:HiddenField runat="server" ID="hdRemark">
</f:HiddenField> </f:HiddenField>
<f:Button ID="btnNew" Icon="Add" runat="server" OnClick="btnNew_Click" ToolTip="编制" Hidden="true">0 <f:Button ID="btnSpec" Icon="Add" runat="server" OnClick="btnSpec_Click" Hidden="true">
</f:Button> </f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" <f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false"> EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button> </f:Button>

View File

@ -338,6 +338,18 @@ namespace FineUIPro.Web.HSSE.Check
} }
#endregion #endregion
protected void btnSpec_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnAdd))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("./CheckSpecialEdit.aspx", "登记 - ")));
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#region #region
/// <summary> /// <summary>
/// 编制 /// 编制
@ -688,7 +700,7 @@ namespace FineUIPro.Web.HSSE.Check
{ {
if (buttonList.Contains(Const.BtnAdd)) if (buttonList.Contains(Const.BtnAdd))
{ {
this.btnNew.Hidden = false; this.btnSpec.Hidden = false;
this.btnRectify.Hidden = false; this.btnRectify.Hidden = false;
this.btnConfirm.Hidden = false; this.btnConfirm.Hidden = false;
} }

View File

@ -186,13 +186,13 @@ namespace FineUIPro.Web.HSSE.Check
protected global::FineUIPro.HiddenField hdRemark; protected global::FineUIPro.HiddenField hdRemark;
/// <summary> /// <summary>
/// btnNew 控件。 /// btnSpec 控件。
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 自动生成的字段。 /// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnNew; protected global::FineUIPro.Button btnSpec;
/// <summary> /// <summary>
/// btnOut 控件。 /// btnOut 控件。

View File

@ -33,24 +33,33 @@
<Rows> <Rows>
<f:FormRow> <f:FormRow>
<Items> <Items>
<f:TextBox ID="txtPlanCode" runat="server" Label="编号" Required="true" ShowRedStar="true">
</f:TextBox>
<f:TextBox ID="txtPlanName" runat="server" Label="标题" Required="true" ShowRedStar="true"> <f:TextBox ID="txtPlanName" runat="server" Label="标题" Required="true" ShowRedStar="true">
</f:TextBox> </f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpTrainType" runat="server" Label="培训类型" Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="drpTrainType_SelectedIndexChanged" <f:DropDownList ID="drpTrainType" runat="server" Label="培训类型" Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="drpTrainType_SelectedIndexChanged"
EnableEdit="true"> EnableEdit="true">
</f:DropDownList>
<f:DropDownList ID="drpTrainLevel" runat="server" Label="培训级别" Required="true" ShowRedStar="true"
EnableEdit="true">
</f:DropDownList> </f:DropDownList>
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow>
<Items> <Items>
<f:DropDownList ID="drpTrainLevel" runat="server" Label="培训级别" Required="true" ShowRedStar="true"
EnableEdit="true">
</f:DropDownList>
<f:TextBox ID="txtTrainContent" runat="server" Label="培训内容" Required="true" ShowRedStar="true"> <f:TextBox ID="txtTrainContent" runat="server" Label="培训内容" Required="true" ShowRedStar="true">
</f:TextBox> </f:TextBox>
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow>
<Items> <Items>
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd HH:mm" Label="培训日期" ShowTime="true" Required="true" ShowRedStar="true" ID="dpTrainStartDate" EnableEdit="false"> <f:DatePicker runat="server" DateFormatString="yyyy-MM-dd HH:mm" Label="培训日期" ShowTime="true" Required="true" ShowRedStar="true" ID="dpTrainStartDate" EnableEdit="false">
</f:DatePicker> </f:DatePicker>
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd HH:mm" Label="培训日期" ShowTime="true" Required="true" ShowRedStar="true" ID="dpTrainEndDate" EnableEdit="false"> <f:DatePicker runat="server" DateFormatString="yyyy-MM-dd HH:mm" Label="培训日期" ShowTime="true" Required="true" ShowRedStar="true" ID="dpTrainEndDate" EnableEdit="false">

View File

@ -64,6 +64,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
if (trainingPlan != null) if (trainingPlan != null)
{ {
this.txtPlanCode.Text = trainingPlan.PlanCode;
this.txtPlanName.Text = trainingPlan.PlanName; this.txtPlanName.Text = trainingPlan.PlanName;
this.txtTrainContent.Text = trainingPlan.TrainContent; this.txtTrainContent.Text = trainingPlan.TrainContent;
this.txtTeachMan.Text = trainingPlan.TeachMan; this.txtTeachMan.Text = trainingPlan.TeachMan;
@ -103,6 +104,11 @@ namespace FineUIPro.Web.HSSE.EduTrain
} }
} }
} }
else
{
string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-";
txtPlanCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", this.CurrUser.LoginProjectId, code);
}
} }
} }
#endregion #endregion
@ -260,6 +266,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
Model.Training_Plan trainingPlan = new Model.Training_Plan(); Model.Training_Plan trainingPlan = new Model.Training_Plan();
trainingPlan.ProjectId = this.CurrUser.LoginProjectId; trainingPlan.ProjectId = this.CurrUser.LoginProjectId;
trainingPlan.PlanName = this.txtPlanName.Text; trainingPlan.PlanName = this.txtPlanName.Text;
trainingPlan.PlanCode = this.txtPlanCode.Text;
trainingPlan.TrainContent = this.txtTrainContent.Text; trainingPlan.TrainContent = this.txtTrainContent.Text;
trainingPlan.TeachMan = this.txtTeachMan.Text; trainingPlan.TeachMan = this.txtTeachMan.Text;
trainingPlan.TeachHour =decimal.Parse( this.txtTeachHour.Text); trainingPlan.TeachHour =decimal.Parse( this.txtTeachHour.Text);
@ -280,7 +287,10 @@ namespace FineUIPro.Web.HSSE.EduTrain
} }
if (string.IsNullOrEmpty(PlanId)) if (string.IsNullOrEmpty(PlanId))
{ {
trainingPlan.PlanCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectTrainingPlanMenuId, CurrUser.LoginProjectId, CurrUser.UnitId); //string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-";
//trainingPlan.PlanCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", this.CurrUser.LoginProjectId, code);
//trainingPlan.PlanCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectTrainingPlanMenuId, CurrUser.LoginProjectId, CurrUser.UnitId);
trainingPlan.PlanId = SQLHelper.GetNewID(); trainingPlan.PlanId = SQLHelper.GetNewID();
TrainingPlanService.AddPlan(trainingPlan); TrainingPlanService.AddPlan(trainingPlan);
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTrainingPlanMenuId, trainingPlan.ProjectId, null, trainingPlan.PlanId, trainingPlan.DesignerDate); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTrainingPlanMenuId, trainingPlan.ProjectId, null, trainingPlan.PlanId, trainingPlan.DesignerDate);

View File

@ -41,6 +41,15 @@ namespace FineUIPro.Web.HSSE.EduTrain
/// </remarks> /// </remarks>
protected global::FineUIPro.Form SimpleForm1; protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtPlanCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPlanCode;
/// <summary> /// <summary>
/// txtPlanName 控件。 /// txtPlanName 控件。
/// </summary> /// </summary>

View File

@ -29,7 +29,7 @@
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="考试记录" EnableCollapse="true" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="考试记录" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="TestRecordId" EnableColumnLines="true" DataIDField="TestRecordId" AllowSorting="true" runat="server" BoxFlex="1" DataKeyNames="TestRecordId" EnableColumnLines="true" DataIDField="TestRecordId" AllowSorting="true"
SortField="TestStartTime" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" ForceFit="true" SortField="TestStartTime" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" ForceFit="true"
IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange" IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"> EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars> <Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server"> <f:Toolbar ID="Toolbar1" Position="Top" runat="server">

View File

@ -55,15 +55,25 @@
<f:Tab ID="Tab2" Title="按类别" BodyPadding="5px" Layout="Fit" IconFont="Bookmark" runat="server" <f:Tab ID="Tab2" Title="按类别" BodyPadding="5px" Layout="Fit" IconFont="Bookmark" runat="server"
TitleToolTip="按类别统计"> TitleToolTip="按类别统计">
<Items> <Items>
<f:ContentPanel ShowHeader="false" runat="server" ID="cpAccidentTime" Margin="0 0 0 0" > <f:Panel ID="Panel2" IsFluid="true" runat="server" Height="350px" ShowBorder="true" EnableCollapse="false"
Layout="HBox" ShowHeader="false" >
<Items>
<f:ContentPanel ShowHeader="false" runat="server" ID="cpAccidentTime" Margin="0 0 0 0" BoxFlex="2" >
<div id="divAccidentTime" style=" height: 700px; "> <div id="divAccidentTime" style=" height: 700px; ">
</div> </div>
</f:ContentPanel>
<f:ContentPanel ShowHeader="false" runat="server" ID="ContentPanel1" Margin="0 0 0 0 " BoxFlex="1" >
<div id="divPie" style="height: 700px;">
</div>
</f:ContentPanel> </f:ContentPanel>
</Items> </Items>
</f:Panel>
</Items>
</f:Tab> </f:Tab>
</Tabs> </Tabs>
</f:TabStrip> </f:TabStrip>
@ -104,7 +114,7 @@
], ],
series: series series: series
}; };
debugger;
if (xAxis.length > 5) { if (xAxis.length > 5) {
option.dataZoom = [{ option.dataZoom = [{
type: 'slider', type: 'slider',
@ -126,8 +136,78 @@
myChart.setOption(option); myChart.setOption(option);
} }
rendChart(<%=legend%>,<%=xAxis%>,<%=series%>)
function pie( title, xArr, data) {
debugger
// 基于准备好的dom初始化echarts实例
var myChartpie = echarts.init(document.getElementById("divPie"))
// 指定图表的配置项和数据
var option = {
title: [{
text: title,
bottom: '0',
left: 'center',
textStyle: {
color: '#fff',
fontSize: 12,
fontWeight: 300
}
}],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d})'
},
legend: {
show: true,
left: 'top',
top: 'top',
align: 'left',
data: xArr,
},
color: ['#1D9A78', '#8BC145', '#36AFCE', '#1D6FA9'],
series: [
{
name: title,
type: 'pie',
center: ['50%', '50%'],
radius: ['40%', '70%'],
avoidLabelOverlap: false,
label: {
show: true,
textStyle: {
color: '#333'
},
position: 'inside',
formatter: function (data) { return data.percent.toFixed(0) + ""; }
},
labelLine: {
show: false
},
data: data,
itemStyle: {
normal: {
//opacity: 0.7,
borderWidth: 3,
borderColor: 'rgba(218,235,234, 1)'
}
}
}
]
}
// 使用刚指定的配置项和数据显示图表。
myChartpie.setOption(option)
}
$(document).ready(function () {
setTimeout(function () {
pie('', <%=xPieAxis%>, <%=seriesPie%>);
rendChart(<%=legend%>,<%=xAxis%>,<%=series%>);
}, 1000);
});
</script> </script>
</html> </html>

View File

@ -40,13 +40,17 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
protected void BtnAnalyse_Click(object sender, EventArgs e) protected void BtnAnalyse_Click(object sender, EventArgs e)
{ {
this.AnalyseData(); this.AnalyseData();
PageContext.RegisterStartupScript(@" setTimeout(function () { rendChart(" + legend+","+xAxis+","+series+ ");},1000); "); PageContext.RegisterStartupScript(@" setTimeout(function () { rendChart(" + legend+","+xAxis+","+series+ "); pie( '',"+ xPieAxis+", "+seriesPie+") ; },1000); ");
} }
public string legend = "[]"; public string legend = "[]";
public string xAxis="[]"; public string xAxis="[]";
public string series="[]"; public string series="[]";
public string xPieAxis = "[]";
public string seriesPie = "[]";
/// <summary> /// <summary>
/// 统计方法 /// 统计方法
/// </summary> /// </summary>
@ -153,6 +157,53 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
data: " + series3 + @" data: " + series3 + @"
}]"; }]";
string strSql1 = @" select r.RegisterTypesId,t.RegisterTypesName,
count(*) as allnum,
Sum(case when States= 1 or States is null then 1 else 0 end) as todo,
Sum(case when States= 3 or States =2 then 1 else 0 end) as finish
from HSSE_Hazard_HazardRegister r left join HSSE_Hazard_HazardRegisterTypes t on r.RegisterTypesId=t.RegisterTypesId
where ProjectId=@ProjectId and States != '4' and ProblemTypes = '1'
";
if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()))
{
strSql1 += " and CheckTime >='" + this.txtStartRectificationTime.Text.Trim() + "' ";
}
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
{
strSql1 += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
}
if (drpUnit.SelectedValue != BLL.Const._Null)
{
strSql1 += " and r.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
}
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
{
strSql1 += " and r.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
}
strSql1 += " group by r.RegisterTypesId,t.RegisterTypesName ";
List<SqlParameter> listStr1 = new List<SqlParameter>();
listStr1.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
SqlParameter[] parameter1 = listStr1.ToArray();
DataTable tb1 = SQLHelper.GetDataTableRunText(strSql1, parameter1);
if (tb1 != null)
{
xPieAxis = "[";
seriesPie = "[";
foreach (DataRow dr in tb1.Rows)
{
xPieAxis += " '" + dr["RegisterTypesName"].ToString() + "' ,";
seriesPie += " { name:'" + dr["RegisterTypesName"].ToString() + "', value:" + dr["allnum"].ToString() + "} ,";
}
xPieAxis=xPieAxis.TrimEnd(',');
seriesPie=seriesPie.TrimEnd(',');
xPieAxis += "]";
seriesPie += "]";
}
} }
else else
{ {
@ -356,6 +407,55 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
string strSql1 = @" select r.RegisterTypesId,t.RegisterTypesName,
count(*) as allnum,
Sum(case when States= 1 or States is null then 1 else 0 end) as todo,
Sum(case when States= 3 or States =2 then 1 else 0 end) as finish
from HSSE_Hazard_HazardRegister r left join HSSE_Hazard_HazardRegisterTypes t on r.RegisterTypesId=t.RegisterTypesId
where ProjectId=@ProjectId and States != '4' and ProblemTypes = '1'
";
if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()))
{
strSql1 += " and CheckTime >='" + this.txtStartRectificationTime.Text.Trim() + "' ";
}
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
{
strSql1 += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
}
if (drpUnit.SelectedValue != BLL.Const._Null)
{
strSql1 += " and r.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
}
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
{
strSql1 += " and r.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
}
strSql1 += " group by r.RegisterTypesId,t.RegisterTypesName ";
List<SqlParameter> listStr1 = new List<SqlParameter>();
listStr1.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
SqlParameter[] parameter1 = listStr1.ToArray();
DataTable tb1 = SQLHelper.GetDataTableRunText(strSql1, parameter1);
if (tb1 != null)
{
xPieAxis = "[";
seriesPie = "[";
foreach (DataRow dr in tb1.Rows)
{
xPieAxis += " '" + dr["RegisterTypesName"].ToString() + "' ,";
seriesPie += " { name:'" + dr["RegisterTypesName"].ToString() + "', value:" + dr["allnum"].ToString() + "} ,";
}
xPieAxis = xPieAxis.TrimEnd(',');
seriesPie = seriesPie.TrimEnd(',');
xPieAxis += "]";
seriesPie += "]";
}
} }
// this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "单位巡检分析", this.drpChartType.SelectedValue, 1130, 450, this.ckbShow.Checked)); // this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "单位巡检分析", this.drpChartType.SelectedValue, 1130, 450, this.ckbShow.Checked));
@ -401,7 +501,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
protected void drpChartType_SelectedIndexChanged(object sender, EventArgs e) protected void drpChartType_SelectedIndexChanged(object sender, EventArgs e)
{ {
this.AnalyseData(); this.AnalyseData();
PageContext.RegisterStartupScript(@"setTimeout(function () { rendChart(" + legend + "," + xAxis + "," + series + ");}, 1000); "); PageContext.RegisterStartupScript(@" setTimeout(function () { rendChart(" + legend + "," + xAxis + "," + series + "); pie( ''," + xPieAxis + ", " + seriesPie + ") ; },1000); ");
} }
@ -410,7 +510,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
{ {
this.AnalyseData(); this.AnalyseData();
PageContext.RegisterStartupScript(@"setTimeout(function () { rendChart(" + legend + "," + xAxis + "," + series + ");}, 1000);"); PageContext.RegisterStartupScript(@" setTimeout(function () { rendChart(" + legend + "," + xAxis + "," + series + "); pie( ''," + xPieAxis + ", " + seriesPie + ") ; },1000); ");
} }
#endregion #endregion

View File

@ -140,6 +140,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
/// </remarks> /// </remarks>
protected global::FineUIPro.Tab Tab2; protected global::FineUIPro.Tab Tab2;
/// <summary>
/// Panel2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel2;
/// <summary> /// <summary>
/// cpAccidentTime 控件。 /// cpAccidentTime 控件。
/// </summary> /// </summary>
@ -148,5 +157,14 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.ContentPanel cpAccidentTime; protected global::FineUIPro.ContentPanel cpAccidentTime;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
} }
} }

View File

@ -43,6 +43,9 @@
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label> <asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
<f:RenderField Width="200px" ColumnID="SpecialEquipmentName" DataField="SpecialEquipmentName" SortField="SpecialEquipmentName"
FieldType="String" HeaderText="设备名称" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:TemplateField ColumnID="tfSpecialEquipmentId" HeaderText="设备" Width="150px" HeaderTextAlign="Center"> <f:TemplateField ColumnID="tfSpecialEquipmentId" HeaderText="设备" Width="150px" HeaderTextAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblSpecialEquipmentId" runat="server" Text='<%# ConvertEqiupment(Eval("SpecialEquipmentId")) %>'></asp:Label> <asp:Label ID="lblSpecialEquipmentId" runat="server" Text='<%# ConvertEqiupment(Eval("SpecialEquipmentId")) %>'></asp:Label>

View File

@ -63,7 +63,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager
{ {
string strSql = "SELECT GeneralEquipmentIn.GeneralEquipmentInId," string strSql = "SELECT GeneralEquipmentIn.GeneralEquipmentInId,"
+ @"GeneralEquipmentIn.ProjectId," + @"GeneralEquipmentIn.ProjectId,"
+ @"GeneralEquipmentInItem.GeneralEquipmentInItemId,GeneralEquipmentInItem.SpecialEquipmentId,GeneralEquipmentInItem.SizeModel,GeneralEquipmentInItem.OwnerCheck,GeneralEquipmentInItem.CertificateNum,GeneralEquipmentInItem.IsUsed," + @"GeneralEquipmentInItem.GeneralEquipmentInItemId,GeneralEquipmentInItem.SpecialEquipmentId,GeneralEquipmentInItem.SpecialEquipmentName,GeneralEquipmentInItem.SizeModel,GeneralEquipmentInItem.OwnerCheck,GeneralEquipmentInItem.CertificateNum,GeneralEquipmentInItem.IsUsed,"
+ @"CodeRecords.Code AS GeneralEquipmentInCode," + @"CodeRecords.Code AS GeneralEquipmentInCode,"
+ @"GeneralEquipmentIn.UnitId," + @"GeneralEquipmentIn.UnitId,"
+ @"GeneralEquipmentIn.CarNumber," + @"GeneralEquipmentIn.CarNumber,"

View File

@ -28,6 +28,12 @@
<f:DropDownList ID="drpUnitId" runat="server" Label="单位名称" Required="true" ShowRedStar="true" LabelWidth="90px" <f:DropDownList ID="drpUnitId" runat="server" Label="单位名称" Required="true" ShowRedStar="true" LabelWidth="90px"
LabelAlign="Right"> LabelAlign="Right">
</f:DropDownList> </f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtCarNumber" runat="server" Label="车牌号" LabelAlign="Right" MaxLength="50" LabelWidth="80px"> <f:TextBox ID="txtCarNumber" runat="server" Label="车牌号" LabelAlign="Right" MaxLength="50" LabelWidth="80px">
</f:TextBox> </f:TextBox>
<f:TextBox ID="txtSubProjectName" runat="server" Label="分包工程" LabelAlign="Right" LabelWidth="80px" <f:TextBox ID="txtSubProjectName" runat="server" Label="分包工程" LabelAlign="Right" LabelWidth="80px"
@ -75,6 +81,9 @@
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label> <asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
<f:RenderField Width="200px" ColumnID="SpecialEquipmentName" DataField="SpecialEquipmentName" SortField="SpecialEquipmentName"
FieldType="String" HeaderText="名称" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:TemplateField ColumnID="tfSpecialEquipmentId" HeaderText="设备" Width="150px" HeaderTextAlign="Center"> <f:TemplateField ColumnID="tfSpecialEquipmentId" HeaderText="设备" Width="150px" HeaderTextAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblSpecialEquipmentId" runat="server" Text='<%# ConvertEqiupment(Eval("SpecialEquipmentId")) %>'></asp:Label> <asp:Label ID="lblSpecialEquipmentId" runat="server" Text='<%# ConvertEqiupment(Eval("SpecialEquipmentId")) %>'></asp:Label>
@ -83,6 +92,7 @@
<f:RenderField Width="200px" ColumnID="SizeModel" DataField="SizeModel" SortField="SizeModel" <f:RenderField Width="200px" ColumnID="SizeModel" DataField="SizeModel" SortField="SizeModel"
FieldType="String" HeaderText="规格型号" HeaderTextAlign="Center" TextAlign="Left"> FieldType="String" HeaderText="规格型号" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField> </f:RenderField>
<f:RenderField Width="300px" ColumnID="OwnerCheck" DataField="OwnerCheck" SortField="OwnerCheck" <f:RenderField Width="300px" ColumnID="OwnerCheck" DataField="OwnerCheck" SortField="OwnerCheck"
FieldType="String" HeaderText="进场前自查自检情况" HeaderTextAlign="Center" TextAlign="Left"> FieldType="String" HeaderText="进场前自查自检情况" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField> </f:RenderField>

View File

@ -20,6 +20,12 @@
ShowRedStar="true" LabelAlign="Right" LabelWidth="150px"> ShowRedStar="true" LabelAlign="Right" LabelWidth="150px">
</f:DropDownList> </f:DropDownList>
</Items> </Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtSpecialEquipmentName" runat="server" Label="名称" LabelAlign="Right" MaxLength="50" LabelWidth="150px">
</f:TextBox>
</Items>
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow>
<Items> <Items>

View File

@ -92,6 +92,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager
{ {
generalEquipmentInItem.SpecialEquipmentId = this.drpSpecialEquipmentId.SelectedValue; generalEquipmentInItem.SpecialEquipmentId = this.drpSpecialEquipmentId.SelectedValue;
} }
generalEquipmentInItem.SpecialEquipmentName = this.txtSpecialEquipmentName.Text.Trim();
generalEquipmentInItem.SizeModel = this.txtSizeModel.Text.Trim(); generalEquipmentInItem.SizeModel = this.txtSizeModel.Text.Trim();
generalEquipmentInItem.OwnerCheck = this.txtOwnerCheck.Text.Trim(); generalEquipmentInItem.OwnerCheck = this.txtOwnerCheck.Text.Trim();
generalEquipmentInItem.CertificateNum = this.txtCertificateNum.Text.Trim(); generalEquipmentInItem.CertificateNum = this.txtCertificateNum.Text.Trim();

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.InApproveManager { namespace FineUIPro.Web.HSSE.InApproveManager
{
public partial class GeneralEquipmentInItemEdit { public partial class GeneralEquipmentInItemEdit
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -48,6 +50,15 @@ namespace FineUIPro.Web.HSSE.InApproveManager {
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpSpecialEquipmentId; protected global::FineUIPro.DropDownList drpSpecialEquipmentId;
/// <summary>
/// txtSpecialEquipmentName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSpecialEquipmentName;
/// <summary> /// <summary>
/// txtSizeModel 控件。 /// txtSizeModel 控件。
/// </summary> /// </summary>

View File

@ -4,6 +4,17 @@
<head runat="server"> <head runat="server">
<title>特种作业人员资质</title> <title>特种作业人员资质</title>
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" /> <link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.f-grid-row.Red {
background-color: red;
}
.LabelColor
{
color: Red;
font-size:small;
}
</style>
</head> </head>
<body> <body>
<form id="form1" runat="server"> <form id="form1" runat="server">
@ -33,6 +44,12 @@
<f:TextBox runat="server" Label="岗位" ID="txtWorkPostName" EmptyText="输入查询条件" AutoPostBack="true" <f:TextBox runat="server" Label="岗位" ID="txtWorkPostName" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="TextBox_TextChanged" Width="200px" LabelWidth="70px" LabelAlign="right"> OnTextChanged="TextBox_TextChanged" Width="200px" LabelWidth="70px" LabelAlign="right">
</f:TextBox> </f:TextBox>
<f:DropDownList ID="drpIsUsedName" runat="server" Label="状态" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged ="TextBox_TextChanged"
Width="200px" LabelWidth="70px" LabelAlign="right" ForceSelection="false">
<f:ListItem Value="待审核" Text="待审核" />
<f:ListItem Value="在岗" Text="在岗" Selected="true"/>
<f:ListItem Value="离岗" Text="离岗" />
</f:DropDownList>
<f:ToolbarFill ID="ToolbarFill1" runat="server"> <f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill> </f:ToolbarFill>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" <f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"

View File

@ -99,6 +99,21 @@ namespace FineUIPro.Web.HSSE.QualityAudit
{ {
strSql += " AND WorkPost.WorkPostName LIKE @WorkPostName"; strSql += " AND WorkPost.WorkPostName LIKE @WorkPostName";
listStr.Add(new SqlParameter("@WorkPostName", "%" + this.txtWorkPostName.Text.Trim() + "%")); listStr.Add(new SqlParameter("@WorkPostName", "%" + this.txtWorkPostName.Text.Trim() + "%"));
}
if (drpIsUsedName.SelectedValue == "待审核")
{
strSql += " AND Person.IsUsed = @IsUsed";
listStr.Add(new SqlParameter("@IsUsed", "2"));
}
else if (drpIsUsedName.SelectedValue == "在岗")
{
strSql += " AND Person.IsUsed = @IsUsed";
listStr.Add(new SqlParameter("@IsUsed", "1"));
}
else
{
strSql += " AND Person.IsUsed = @IsUsed";
listStr.Add(new SqlParameter("@IsUsed", "0"));
} }
SqlParameter[] parameter = listStr.ToArray(); SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@ -107,6 +122,30 @@ namespace FineUIPro.Web.HSSE.QualityAudit
var table = this.GetPagedDataTable(Grid1, tb); var table = this.GetPagedDataTable(Grid1, tb);
this.Grid1.DataSource = table; this.Grid1.DataSource = table;
this.Grid1.DataBind(); this.Grid1.DataBind();
for (int i = 0; i < Grid1.Rows.Count; i++)
{
string limitstr = Grid1.Rows[i].Values[8].ToString();
if (!string.IsNullOrEmpty(limitstr))
{
DateTime limitDate = DateTime.Parse(limitstr);
if (limitDate.AddMonths(-3) <= DateTime.Now)
{
Grid1.Rows[i].RowCssClass = "Red";
}
else
{
Grid1.Rows[i].RowCssClass = "";
}
}
else
{
Grid1.Rows[i].RowCssClass = "Red";
}
}
JObject summary = new JObject JObject summary = new JObject
{ {
{ "UnitName", "合计人数:" }, { "UnitName", "合计人数:" },
@ -114,6 +153,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit
}; };
Grid1.SummaryData = summary; Grid1.SummaryData = summary;
} }
/// <summary> /// <summary>

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.QualityAudit { namespace FineUIPro.Web.HSSE.QualityAudit
{
public partial class PersonQuality { public partial class PersonQuality
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -93,6 +95,15 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtWorkPostName; protected global::FineUIPro.TextBox txtWorkPostName;
/// <summary>
/// drpIsUsedName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpIsUsedName;
/// <summary> /// <summary>
/// ToolbarFill1 控件。 /// ToolbarFill1 控件。
/// </summary> /// </summary>

View File

@ -6,6 +6,17 @@
<head runat="server"> <head runat="server">
<title>安管人员资质</title> <title>安管人员资质</title>
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" /> <link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.f-grid-row.Red {
background-color: red;
}
.LabelColor
{
color: Red;
font-size:small;
}
</style>
</head> </head>
<body> <body>
<form id="form1" runat="server"> <form id="form1" runat="server">

View File

@ -106,6 +106,28 @@ namespace FineUIPro.Web.HSSE.QualityAudit
var table = this.GetPagedDataTable(Grid1, tb); var table = this.GetPagedDataTable(Grid1, tb);
this.Grid1.DataSource = table; this.Grid1.DataSource = table;
this.Grid1.DataBind(); this.Grid1.DataBind();
for (int i = 0; i < Grid1.Rows.Count; i++)
{
string limitstr = Grid1.Rows[i].Values[8].ToString();
if(!string.IsNullOrEmpty(limitstr))
{
DateTime limitDate = DateTime.Parse(limitstr);
if (limitDate.AddMonths(-3)<=DateTime.Now)
{
Grid1.Rows[i].RowCssClass = "Red";
}
else
{
Grid1.Rows[i].RowCssClass = "";
}
}
else
{
Grid1.Rows[i].RowCssClass = "Red";
}
}
} }
/// <summary> /// <summary>
@ -272,5 +294,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit
return sb.ToString(); return sb.ToString();
} }
#endregion #endregion
} }
} }

View File

@ -97,6 +97,12 @@
<asp:Label ID="lblInOutWayName" runat="server" Text='<%# ConvertInOutWayName(Eval("InOutWay")) %>'></asp:Label> <asp:Label ID="lblInOutWayName" runat="server" Text='<%# ConvertInOutWayName(Eval("InOutWay")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
<f:TemplateField Width="90px" HeaderText="入场考试成绩" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# ConvertInTestRecord(Eval("PersonId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="150px" ColumnID="Address" DataField="Address" <f:RenderField Width="150px" ColumnID="Address" DataField="Address"
HeaderText="地点" HeaderTextAlign="Center" TextAlign="Left"> HeaderText="地点" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField> </f:RenderField>

View File

@ -1,4 +1,5 @@
using BLL; using BLL;
using Microsoft.Office.Interop.Excel;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
@ -34,8 +35,8 @@ namespace FineUIPro.Web.HSSE.SitePerson
this.drpUnit.SelectedValue = this.CurrUser.UnitId; this.drpUnit.SelectedValue = this.CurrUser.UnitId;
this.drpUnit.Enabled = false; this.drpUnit.Enabled = false;
} }
this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd HH:mm}", DateTime.Now.AddDays(-1)); this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd 00:00}", DateTime.Now);
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd HH:mm}", DateTime.Now.AddMinutes(1)); this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd 23:59}", DateTime.Now);
// 绑定表格 // 绑定表格
BindGrid(); BindGrid();
@ -49,10 +50,42 @@ namespace FineUIPro.Web.HSSE.SitePerson
/// </summary> /// </summary>
private void BindGrid() private void BindGrid()
{ {
var getData = PersonInOutService.getListData(this.CurrUser.LoginProjectId, this.drpUnit.SelectedValue, this.txtPersonName.Text.Trim(), this.rbInOutWay.SelectedValue
, Funs.GetNewDateTime(this.txtStartDate.Text), Funs.GetNewDateTime(this.txtEndDate.Text), Grid1); string sql = @"select NEWID() PersonInOutId, PersonId,UnitName,PersonName,IdentityCard,case when IsIn =1 then '进门' else '出门' end IsInName,InOutWay,case when IsIn =1 then MinTime else MaxTime end ChangeTime from (
Grid1.RecordCount = PersonInOutService.count; select PersonId,UnitName,PersonName,IdentityCard,IsIn,InOutWay,MAX(ChangeTime)MaxTime,MIN(ChangeTime) MinTime from SitePerson_PersonInOut where ProjectId='" + this.CurrUser.LoginProjectId + "'";
Grid1.DataSource = getData; if (!string.IsNullOrEmpty(this.drpUnit.SelectedValue) && this.drpUnit.SelectedValue != Const._Null)
{
sql += " and UnitId ='"+ this.drpUnit.SelectedValue + "' ";
}
if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim()))
{
sql += " and PersonName like '%" + this.txtPersonName.Text.Trim() + "%' ";
}
if(this.rbInOutWay.SelectedValue != "0")
{
sql += " and InOutWay = '" + this.rbInOutWay.SelectedValue + "' ";
}
if (!string.IsNullOrEmpty(this.txtStartDate.Text))
{
sql += " and ChangeTime >= '" + this.txtStartDate.Text + "' ";
}
if (!string.IsNullOrEmpty(this.txtEndDate.Text))
{
sql += " and ChangeTime <= '" + this.txtEndDate.Text + "' ";
}
sql += "group by PersonId,UnitName,PersonName,IdentityCard,year(ChangeTime),month(ChangeTime),day(ChangeTime),IsIn,InOutWay ) a order by ChangeTime desc";
System.Data.DataTable tb = SQLHelper.GetDataTableRunText(sql, null);
Grid1.RecordCount = tb.Rows.Count;
tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind(); Grid1.DataBind();
} }
#endregion #endregion
@ -172,7 +205,62 @@ namespace FineUIPro.Web.HSSE.SitePerson
#endregion #endregion
#region #region
protected string ConvertInTestRecord(object TestManId)
{
string inTestRecord = "<span style='color:red'>0</span>";
if (TestManId != null && !string.IsNullOrEmpty(TestManId.ToString()))
{
string strSql = @"select max(TestScores) from dbo.Training_TestRecord AS TestRecord
LEFT JOIN dbo.Training_TestPlan AS TestPlan ON TestPlan.TestPlanId=TestRecord.TestPlanId
LEFT JOIN dbo.Training_TestTraining AS Training ON Training.TrainingId = TestRecord.TestType
where (TestPlan.PlanName LIKE '%%' OR Training.TrainingName LIKE '%%' ) and TestRecord.ProjectId='" + CurrUser.LoginProjectId + "' and TestManId = '" + TestManId + "' ";
System.Data.DataTable tb = SQLHelper.GetDataTableRunText(strSql, null);
if (tb != null && tb.Rows.Count > 0&&!string.IsNullOrEmpty(tb.Rows[0][0].ToString()))
{
var sysTestRule = Funs.DB.Sys_TestRule.FirstOrDefault();
if (sysTestRule != null)
{
if (sysTestRule.PassingScore > 0)
{
if (decimal.Parse(tb.Rows[0][0].ToString()) < sysTestRule.PassingScore)
{
inTestRecord = "<span style='color:red'>"+tb.Rows[0][0].ToString()+ "</span>";
}
else
{
inTestRecord = tb.Rows[0][0].ToString() ;
}
}
else
{
if (decimal.Parse(tb.Rows[0][0].ToString()) < 80)
{
inTestRecord = "<span style='color:red'>" + tb.Rows[0][0].ToString() + "</span>";
}
else
{
inTestRecord = tb.Rows[0][0].ToString();
}
}
}
else
{
if (decimal.Parse(tb.Rows[0][0].ToString()) < 80)
{
inTestRecord = "<span style='color:red'>" + tb.Rows[0][0].ToString() + "</span>";
}
else
{
inTestRecord = tb.Rows[0][0].ToString();
}
}
}
}
return inTestRecord;
}
protected string ConvertInOutWayName(object InOutWay) protected string ConvertInOutWayName(object InOutWay)
{ {
string name = string.Empty; string name = string.Empty;

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.SitePerson { namespace FineUIPro.Web.HSSE.SitePerson
{
public partial class PersonInfo { public partial class PersonInfo
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -201,6 +203,15 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblInOutWayName; protected global::System.Web.UI.WebControls.Label lblInOutWayName;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary> /// <summary>
/// ToolbarSeparator1 控件。 /// ToolbarSeparator1 控件。
/// </summary> /// </summary>

View File

@ -739,7 +739,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
} }
var unit = Funs.DB.Base_Unit.FirstOrDefault(x=>x.UnitId==unitId); var unit = Funs.DB.Base_Unit.FirstOrDefault(x=>x.UnitId==unitId);
var pu = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.UnitId == unitId && x.ProjectId == projectId); var pu = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.UnitId == unitId && x.ProjectId == projectId);
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/Controls/ShowQRImage.aspx?strValue={0}&urlName={1}&title={2}", System.Web.HttpUtility.UrlEncode("https://sgglapi.chengda.com/Home/P#/?id" + pu.ProjectUnitId), pu.ProjectUnitId, System.Web.HttpUtility.UrlEncode(unit.UnitName), "查看 - "), "二维码查看", 360, 420)); PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/Controls/ShowQRImage.aspx?strValue={0}&urlName={1}&title={2}", System.Web.HttpUtility.UrlEncode("https://sgglapi.chengda.com/Home/P#/?id=" + pu.ProjectUnitId), pu.ProjectUnitId, System.Web.HttpUtility.UrlEncode(unit.UnitName), "查看 - "), "二维码查看", 360, 420));
} }
else else

View File

@ -77,37 +77,28 @@
<f:TextBox ID="txtIdentityCard" runat="server" Label="证件号码" MaxLength="50" LabelAlign="Right" LabelWidth="110px" <f:TextBox ID="txtIdentityCard" runat="server" Label="证件号码" MaxLength="50" LabelAlign="Right" LabelWidth="110px"
Required="true" ShowRedStar="true" OnBlur="txtIdentityCard_TextChanged" EnableBlurEvent="true"> Required="true" ShowRedStar="true" OnBlur="txtIdentityCard_TextChanged" EnableBlurEvent="true">
</f:TextBox> </f:TextBox>
<f:DatePicker ID="txtIdcardStartDate" runat="server" Label="证件开始日期" LabelAlign="Right" LabelWidth="110px">
</f:DatePicker>
<f:DatePicker ID="txtIdcardEndDate" runat="server" Label="证件有效日期" LabelAlign="Right" LabelWidth="110px">
</f:DatePicker>
<f:TextBox ID="txtUnitName" runat="server" Label="所属单位" LabelAlign="Right" <f:TextBox ID="txtUnitName" runat="server" Label="所属单位" LabelAlign="Right"
Readonly="true" LabelWidth="110px"></f:TextBox> Readonly="true" LabelWidth="110px"></f:TextBox>
<f:DropDownBox runat="server" Label="单位工程" ShowRedStar="true" LabelAlign="Right" LabelWidth="110px"
Required="true" ID="txtWorkArea" EmptyText="--请选择--" EnableMultiSelect="true" MatchFieldWidth="true">
<PopPanel>
<f:Grid ID="gvWorkArea" DataIDField="UnitWorkId"
EnableMultiSelect="true" KeepCurrentSelection="true" Height="300px" Hidden="true" SortField="UnitWorkId" DataTextField="UnitWorkName"
ShowBorder="true" ShowHeader="false" ForceFit="true"
runat="server" EnableCheckBoxSelect="true">
<Columns>
<f:BoundField DataField="UnitWorkId" SortField="UnitWorkId" DataFormatString="{0}" Hidden="true" />
<f:BoundField DataField="UnitWorkName" SortField="UnitWorkName" DataFormatString="{0}" HeaderText="单位工程名称" />
</Columns>
</f:Grid>
</PopPanel>
</f:DropDownBox>
<f:DropDownList ID="drpMainCNProfessional" runat="server" Label="主专业" EnableEdit="true" LabelAlign="Right" LabelWidth="110px">
</f:DropDownList>
<f:DropDownList ID="drpAuditor" runat="server" Label="审核人" LabelAlign="Right" EnableEdit="true" LabelWidth="110px"> <f:DropDownList ID="drpAuditor" runat="server" Label="审核人" LabelAlign="Right" EnableEdit="true" LabelWidth="110px">
</f:DropDownList> </f:DropDownList>
<f:CheckBox runat="server" ID="ckIsForeign" Label="外籍" LabelAlign="Right" LabelWidth="110px"></f:CheckBox> <f:CheckBox runat="server" ID="ckIsForeign" Label="外籍" LabelAlign="Right" LabelWidth="110px"></f:CheckBox>
<f:DatePicker ID="txtBirthday" runat="server" Label="出生日期" LabelAlign="Right" LabelWidth="110px">
</f:DatePicker>
<f:DatePicker ID="txtInTime" runat="server" Label="入场时间" LabelAlign="Right" LabelWidth="110px" ShowRedStar="true" Required="true"> <f:DatePicker ID="txtInTime" runat="server" Label="入场时间" LabelAlign="Right" LabelWidth="110px" ShowRedStar="true" Required="true">
</f:DatePicker> </f:DatePicker>
<f:CheckBox runat="server" ID="ckIsSafetyMonitoring" Label="安全监护" LabelAlign="Right"></f:CheckBox> <f:CheckBox runat="server" ID="ckIsSafetyMonitoring" Label="安全监护" LabelAlign="Right"></f:CheckBox>
<f:TextBox ID="txtTelephone" runat="server" Label="电话" LabelAlign="Right" MaxLength="50">
</f:TextBox>
<f:RadioButtonList ID="rblIsUsed" runat="server" Label="人员在场" LabelAlign="Right" Required="True" ShowRedStar="True">
<f:RadioItem Value="1" Text="是" />
<f:RadioItem Value="0" Text="否" />
</f:RadioButtonList>
<f:DatePicker ID="txtIdcardEndDate" runat="server" Label="安全/特种作业证书有效日期" LabelAlign="Right" LabelWidth="110px">
</f:DatePicker>
</Items> </Items>
</f:Panel> </f:Panel>
<f:Panel ID="Panel4" runat="server" BoxFlex="3" ShowBorder="false" ShowHeader="false" <f:Panel ID="Panel4" runat="server" BoxFlex="3" ShowBorder="false" ShowHeader="false"
@ -134,18 +125,11 @@
<f:DropDownList ID="drpTeamGroup" runat="server" Label="所属班组" LabelAlign="Right" ShowRedStar="true" Required="true"> <f:DropDownList ID="drpTeamGroup" runat="server" Label="所属班组" LabelAlign="Right" ShowRedStar="true" Required="true">
</f:DropDownList> </f:DropDownList>
<f:DropDownList ID="drpViceCNProfessional" runat="server" Label="副专业" EnableEdit="true" LabelAlign="Right"
EnableMultiSelect="true" MaxLength="500" EnableCheckBoxSelect="true">
</f:DropDownList>
<f:DatePicker ID="txtAuditorDate" runat="server" Label="审核时间" LabelAlign="Right" > <f:DatePicker ID="txtAuditorDate" runat="server" Label="审核时间" LabelAlign="Right" >
</f:DatePicker> </f:DatePicker>
<f:CheckBox runat="server" ID="ckIsOutside" Label="外聘" LabelAlign="Right"></f:CheckBox> <f:CheckBox runat="server" ID="ckIsOutside" Label="外聘" LabelAlign="Right"></f:CheckBox>
<f:TextBox ID="txtTelephone" runat="server" Label="电话" LabelAlign="Right" MaxLength="50">
</f:TextBox>
<f:RadioButtonList ID="rblIsUsed" runat="server" Label="人员在场" LabelAlign="Right" Required="True" ShowRedStar="True">
<f:RadioItem Value="1" Text="是" />
<f:RadioItem Value="0" Text="否" />
</f:RadioButtonList>
</Items> </Items>
</f:Panel> </f:Panel>

View File

@ -109,10 +109,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
this.UnitId = person.UnitId; this.UnitId = person.UnitId;
} }
} }
if (!string.IsNullOrEmpty(person.WorkAreaId))
{
txtWorkArea.Values = person.WorkAreaId.Split(',');
}
if (!string.IsNullOrEmpty(person.WorkPostId)) if (!string.IsNullOrEmpty(person.WorkPostId))
{ {
this.drpPost.SelectedValue = person.WorkPostId; this.drpPost.SelectedValue = person.WorkPostId;
@ -133,14 +130,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
{ {
this.drpAuditor.SelectedValue = person.AuditorId; this.drpAuditor.SelectedValue = person.AuditorId;
} }
if (!string.IsNullOrEmpty(person.MainCNProfessionalId))
{
this.drpMainCNProfessional.SelectedValue = person.MainCNProfessionalId;
}
if (!string.IsNullOrEmpty(person.ViceCNProfessionalId))
{
this.drpViceCNProfessional.SelectedValueArray = person.ViceCNProfessionalId.Split(',');
}
if (person.IsSafetyMonitoring == true) if (person.IsSafetyMonitoring == true)
{ {
this.ckIsSafetyMonitoring.Checked = true; this.ckIsSafetyMonitoring.Checked = true;
@ -184,10 +174,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
this.drpAuditor.Readonly = true; this.drpAuditor.Readonly = true;
this.txtAuditorDate.Readonly = true; this.txtAuditorDate.Readonly = true;
} }
if (person.Birthday.HasValue)
{
this.txtBirthday.Text = string.Format("{0:yyyy-MM-dd}", person.Birthday);
}
if (!string.IsNullOrEmpty(person.PhotoUrl)) if (!string.IsNullOrEmpty(person.PhotoUrl))
{ {
imgPhoto.ImageUrl = ("~/" + person.PhotoUrl); imgPhoto.ImageUrl = ("~/" + person.PhotoUrl);
@ -213,10 +200,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
{ {
this.drpProvinceCode.SelectedValue = person.ProvinceCode; this.drpProvinceCode.SelectedValue = person.ProvinceCode;
} }
if (person.IdcardStartDate != null)
{
this.txtIdcardStartDate.Text = string.Format("{0:yyyy-MM-dd}", person.IdcardStartDate);
}
if (!string.IsNullOrEmpty(person.IdcardForever)) if (!string.IsNullOrEmpty(person.IdcardForever))
{ {
this.rblIdcardForever.SelectedValue = person.IdcardForever; this.rblIdcardForever.SelectedValue = person.IdcardForever;
@ -262,16 +246,13 @@ namespace FineUIPro.Web.HSSE.SitePerson
/// </summary> /// </summary>
private void InitDropDownList() private void InitDropDownList()
{ {
gvWorkArea.DataSource = BLL.UnitWorkService.GetUnitWorkLists(this.ProjectId);
gvWorkArea.DataBind();//单位工程
WorkPostService.InitWorkPostDropDownList(this.drpPost, true); WorkPostService.InitWorkPostDropDownList(this.drpPost, true);
PositionService.InitPositionDropDownList(this.drpPosition, true); PositionService.InitPositionDropDownList(this.drpPosition, true);
PostTitleService.InitPostTitleDropDownList(this.drpTitle, true); PostTitleService.InitPostTitleDropDownList(this.drpTitle, true);
TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpTeamGroup, this.ProjectId, this.UnitId, true); TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpTeamGroup, this.ProjectId, this.UnitId, true);
CertificateService.InitCertificateDropDownList(this.drpCertificate, true); CertificateService.InitCertificateDropDownList(this.drpCertificate, true);
UserService.InitFlowOperateControlUserDropDownList(this.drpAuditor, this.ProjectId, Const.UnitId_CD, true); UserService.InitFlowOperateControlUserDropDownList(this.drpAuditor, this.ProjectId, Const.UnitId_CD, true);
CNProfessionalService.InitCNProfessionalDownList(this.drpMainCNProfessional, true);
CNProfessionalService.InitCNProfessionalDownList(this.drpViceCNProfessional, true);
BasicDataService.InitBasicDataProjectUnitDropDownList(this.drpEduLevel, "EDU_LEVEL", true); BasicDataService.InitBasicDataProjectUnitDropDownList(this.drpEduLevel, "EDU_LEVEL", true);
BasicDataService.InitBasicDataProjectUnitDropDownList(this.drpMaritalStatus, "MARITAL_STATUS", true); BasicDataService.InitBasicDataProjectUnitDropDownList(this.drpMaritalStatus, "MARITAL_STATUS", true);
BasicDataService.InitBasicDataProjectUnitDropDownList(this.drpIdcardType, "ZHENGJIAN_TYPE", true); BasicDataService.InitBasicDataProjectUnitDropDownList(this.drpIdcardType, "ZHENGJIAN_TYPE", true);
@ -427,10 +408,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
{ {
person.TeamGroupId = this.drpTeamGroup.SelectedValue; person.TeamGroupId = this.drpTeamGroup.SelectedValue;
} }
if (!string.IsNullOrWhiteSpace(String.Join(",", this.txtWorkArea.Values)))
{
person.WorkAreaId = string.Join(",", txtWorkArea.Values);
}
if (this.drpPost.SelectedValue != BLL.Const._Null) if (this.drpPost.SelectedValue != BLL.Const._Null)
{ {
person.WorkPostId = this.drpPost.SelectedValue; person.WorkPostId = this.drpPost.SelectedValue;
@ -460,10 +438,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
{ {
person.IdentityCard = this.txtIdentityCard.Text.Trim(); person.IdentityCard = this.txtIdentityCard.Text.Trim();
} }
if (!string.IsNullOrEmpty(this.txtIdcardStartDate.Text.Trim()))
{
person.IdcardStartDate = Convert.ToDateTime(this.txtIdcardStartDate.Text.Trim());
}
person.IdcardForever = this.rblIdcardForever.SelectedValue; person.IdcardForever = this.rblIdcardForever.SelectedValue;
if (!string.IsNullOrEmpty(this.txtIdcardEndDate.Text.Trim())) if (!string.IsNullOrEmpty(this.txtIdcardEndDate.Text.Trim()))
{ {
@ -493,25 +468,8 @@ namespace FineUIPro.Web.HSSE.SitePerson
{ {
person.MaritalStatus = this.drpMaritalStatus.SelectedValue; person.MaritalStatus = this.drpMaritalStatus.SelectedValue;
} }
if (this.drpMainCNProfessional.SelectedValue != Const._Null)
{
person.MainCNProfessionalId = this.drpMainCNProfessional.SelectedValue;
}
foreach (var item in this.drpViceCNProfessional.SelectedValueArray)
{
var cn = BLL.CNProfessionalService.GetCNProfessional(item);
if (cn != null)
{
if (string.IsNullOrEmpty(person.ViceCNProfessionalId))
{
person.ViceCNProfessionalId = cn.CNProfessionalId;
}
else
{
person.ViceCNProfessionalId += "," + cn.CNProfessionalId;
}
}
}
person.Address = this.txtAddress.Text.Trim(); person.Address = this.txtAddress.Text.Trim();
person.Telephone = this.txtTelephone.Text.Trim(); person.Telephone = this.txtTelephone.Text.Trim();
person.OutResult = this.txtOutResult.Text.Trim(); person.OutResult = this.txtOutResult.Text.Trim();
@ -523,10 +481,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
{ {
person.OutTime = Convert.ToDateTime(this.txtOutTime.Text.Trim()); person.OutTime = Convert.ToDateTime(this.txtOutTime.Text.Trim());
} }
if (!string.IsNullOrEmpty(this.txtBirthday.Text.Trim()))
{
person.Birthday = Convert.ToDateTime(this.txtBirthday.Text.Trim());
}
if (!string.IsNullOrEmpty(imgPhoto.ImageUrl) && imgPhoto.ImageUrl != "~/res/images/blank_150.png") if (!string.IsNullOrEmpty(imgPhoto.ImageUrl) && imgPhoto.ImageUrl != "~/res/images/blank_150.png")
{ {
person.PhotoUrl = imgPhoto.ImageUrl.Replace("~/", ""); person.PhotoUrl = imgPhoto.ImageUrl.Replace("~/", "");

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.SitePerson { namespace FineUIPro.Web.HSSE.SitePerson
{
public partial class PersonListEdit { public partial class PersonListEdit
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -192,24 +194,6 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtIdentityCard; protected global::FineUIPro.TextBox txtIdentityCard;
/// <summary>
/// txtIdcardStartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtIdcardStartDate;
/// <summary>
/// txtIdcardEndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtIdcardEndDate;
/// <summary> /// <summary>
/// txtUnitName 控件。 /// txtUnitName 控件。
/// </summary> /// </summary>
@ -219,33 +203,6 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtUnitName; protected global::FineUIPro.TextBox txtUnitName;
/// <summary>
/// txtWorkArea 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownBox txtWorkArea;
/// <summary>
/// gvWorkArea 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid gvWorkArea;
/// <summary>
/// drpMainCNProfessional 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpMainCNProfessional;
/// <summary> /// <summary>
/// drpAuditor 控件。 /// drpAuditor 控件。
/// </summary> /// </summary>
@ -264,15 +221,6 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks> /// </remarks>
protected global::FineUIPro.CheckBox ckIsForeign; protected global::FineUIPro.CheckBox ckIsForeign;
/// <summary>
/// txtBirthday 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtBirthday;
/// <summary> /// <summary>
/// txtInTime 控件。 /// txtInTime 控件。
/// </summary> /// </summary>
@ -291,6 +239,33 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks> /// </remarks>
protected global::FineUIPro.CheckBox ckIsSafetyMonitoring; protected global::FineUIPro.CheckBox ckIsSafetyMonitoring;
/// <summary>
/// txtTelephone 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTelephone;
/// <summary>
/// rblIsUsed 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsUsed;
/// <summary>
/// txtIdcardEndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtIdcardEndDate;
/// <summary> /// <summary>
/// Panel4 控件。 /// Panel4 控件。
/// </summary> /// </summary>
@ -363,15 +338,6 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpTeamGroup; protected global::FineUIPro.DropDownList drpTeamGroup;
/// <summary>
/// drpViceCNProfessional 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpViceCNProfessional;
/// <summary> /// <summary>
/// txtAuditorDate 控件。 /// txtAuditorDate 控件。
/// </summary> /// </summary>
@ -390,24 +356,6 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks> /// </remarks>
protected global::FineUIPro.CheckBox ckIsOutside; protected global::FineUIPro.CheckBox ckIsOutside;
/// <summary>
/// txtTelephone 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTelephone;
/// <summary>
/// rblIsUsed 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsUsed;
/// <summary> /// <summary>
/// Panel5 控件。 /// Panel5 控件。
/// </summary> /// </summary>

View File

@ -483,7 +483,7 @@ namespace FineUIPro.Web
protected DataTable GetPagedDataTable(FineUIPro.Grid Grid1, DataTable tb) protected DataTable GetPagedDataTable(FineUIPro.Grid Grid1, DataTable tb)
{ {
int pageIndex = Grid1.PageIndex; int pageIndex = Grid1.PageIndex;
int pageSize = Funs.PageSize;// Grid1.PageSize; int pageSize = Grid1.PageSize;
string sortField = Grid1.SortField; string sortField = Grid1.SortField;
string sortDirection = Grid1.SortDirection; string sortDirection = Grid1.SortDirection;

View File

@ -428,7 +428,7 @@
formatter: '{a} <br/>{b}: {c} ({d}%)' formatter: '{a} <br/>{b}: {c} ({d}%)'
}, },
legend: { legend: {
show: false, show: true,
orient: 'vertical', orient: 'vertical',
left: 'right', left: 'right',
top: 'center', top: 'center',

View File

@ -174,6 +174,14 @@
<div class="sd-header-top-right"> <div class="sd-header-top-right">
<ul> <ul>
<li><a href="javascript:void(0);" onclick="onToolSignChangeHomePageClick()">切换首页</a></li> <li><a href="javascript:void(0);" onclick="onToolSignChangeHomePageClick()">切换首页</a></li>
<li class="js-showTab-item top-li-item"><a href="javascript:void(0);">
<div style="background-image:url('./res/images/Monitoring.png');width: 19px;height: 19px;float: left;background-repeat: no-repeat;background-position: center;"> </div>
<span >视频</span></a>
<f:Button runat="server" CssClass="bgbtn2"
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="Button1" OnClientClick="openVideo()" >
</f:Button>
</li>
<li class="js-showTab-item"><a href="#"><span class="sd-message-dot"><i class="iconfont icon-message"></i></span>消息</a></li> <li class="js-showTab-item"><a href="#"><span class="sd-message-dot"><i class="iconfont icon-message"></i></span>消息</a></li>
<li class="js-showTab-item top-li-item"><a href="javascript:void(0);"><span><i class="iconfont icon-user"></i></span><span id="userName" runat="server"></span></a> <li class="js-showTab-item top-li-item"><a href="javascript:void(0);"><span><i class="iconfont icon-user"></i></span><span id="userName" runat="server"></span></a>
<f:Button runat="server" CssClass="bgbtn2" OnClick="btnPersonal_Click" <f:Button runat="server" CssClass="bgbtn2" OnClick="btnPersonal_Click"
@ -515,6 +523,19 @@
} }
} }
var videoURL ='<%=VideoURL %>'
function openVideo() {
if (videoURL) {
window.open(videoURL , '_blank');
}
else {
alert("您没有权限!");
}
}
// 添加示例标签页 // 添加示例标签页
// id 选项卡ID // id 选项卡ID
// iframeUrl: 选项卡IFrame地址 // iframeUrl: 选项卡IFrame地址

View File

@ -505,5 +505,15 @@ namespace FineUIPro.Web
this.Tab1.IFrameUrl = "~/common/main.aspx"; this.Tab1.IFrameUrl = "~/common/main.aspx";
} }
} }
protected string VideoURL
{
get
{
var pw = ConfigurationManager.AppSettings["Video_PW"];
return ConfigurationManager.AppSettings["Video_URL"] + "login.html?username=admin&password=" + Funs.EncryptionPassword(pw);
}
}
} }
} }

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web { namespace FineUIPro.Web
{
public partial class index { public partial class index
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -75,6 +77,15 @@ namespace FineUIPro.Web {
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl spDate; protected global::System.Web.UI.HtmlControls.HtmlGenericControl spDate;
/// <summary>
/// Button1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button Button1;
/// <summary> /// <summary>
/// userName 控件。 /// userName 控件。
/// </summary> /// </summary>

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

View File

@ -93,7 +93,7 @@ namespace Model
get; get;
set; set;
} }
public int LearnTime public int? LearnTime
{ {
get; get;
set; set;
@ -103,7 +103,11 @@ namespace Model
get; get;
set; set;
} }
public int? VideoProgress
{
get;
set;
}
} }
} }

View File

@ -183342,6 +183342,8 @@ namespace Model
private System.Nullable<bool> _IsUsed; private System.Nullable<bool> _IsUsed;
private string _SpecialEquipmentName;
private EntityRef<Base_SpecialEquipment> _Base_SpecialEquipment; private EntityRef<Base_SpecialEquipment> _Base_SpecialEquipment;
private EntityRef<InApproveManager_GeneralEquipmentIn> _InApproveManager_GeneralEquipmentIn; private EntityRef<InApproveManager_GeneralEquipmentIn> _InApproveManager_GeneralEquipmentIn;
@ -183364,6 +183366,8 @@ namespace Model
partial void OnCertificateNumChanged(); partial void OnCertificateNumChanged();
partial void OnIsUsedChanging(System.Nullable<bool> value); partial void OnIsUsedChanging(System.Nullable<bool> value);
partial void OnIsUsedChanged(); partial void OnIsUsedChanged();
partial void OnSpecialEquipmentNameChanging(string value);
partial void OnSpecialEquipmentNameChanged();
#endregion #endregion
public InApproveManager_GeneralEquipmentInItem() public InApproveManager_GeneralEquipmentInItem()
@ -183521,6 +183525,26 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecialEquipmentName", DbType="NVarChar(50)")]
public string SpecialEquipmentName
{
get
{
return this._SpecialEquipmentName;
}
set
{
if ((this._SpecialEquipmentName != value))
{
this.OnSpecialEquipmentNameChanging(value);
this.SendPropertyChanging();
this._SpecialEquipmentName = value;
this.SendPropertyChanged("SpecialEquipmentName");
this.OnSpecialEquipmentNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_InApproveManager_GeneralEquipmentInItem_Base_SpecialEquipment", Storage="_Base_SpecialEquipment", ThisKey="SpecialEquipmentId", OtherKey="SpecialEquipmentId", IsForeignKey=true)] [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_InApproveManager_GeneralEquipmentInItem_Base_SpecialEquipment", Storage="_Base_SpecialEquipment", ThisKey="SpecialEquipmentId", OtherKey="SpecialEquipmentId", IsForeignKey=true)]
public Base_SpecialEquipment Base_SpecialEquipment public Base_SpecialEquipment Base_SpecialEquipment
{ {
@ -365614,6 +365638,8 @@ namespace Model
private System.Nullable<int> _LearnTime; private System.Nullable<int> _LearnTime;
private System.Nullable<int> _VideoProgress;
private EntityRef<Training_Plan> _Training_Plan; private EntityRef<Training_Plan> _Training_Plan;
private EntityRef<Training_Task> _Training_Task; private EntityRef<Training_Task> _Training_Task;
@ -365642,6 +365668,8 @@ namespace Model
partial void OnEndTimeChanged(); partial void OnEndTimeChanged();
partial void OnLearnTimeChanging(System.Nullable<int> value); partial void OnLearnTimeChanging(System.Nullable<int> value);
partial void OnLearnTimeChanged(); partial void OnLearnTimeChanged();
partial void OnVideoProgressChanging(System.Nullable<int> value);
partial void OnVideoProgressChanged();
#endregion #endregion
public Training_TaskItem() public Training_TaskItem()
@ -365859,6 +365887,26 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VideoProgress", DbType="Int")]
public System.Nullable<int> VideoProgress
{
get
{
return this._VideoProgress;
}
set
{
if ((this._VideoProgress != value))
{
this.OnVideoProgressChanging(value);
this.SendPropertyChanging();
this._VideoProgress = value;
this.SendPropertyChanged("VideoProgress");
this.OnVideoProgressChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Training_TaskItem_Training_Plan", Storage="_Training_Plan", ThisKey="PlanId", OtherKey="PlanId", IsForeignKey=true)] [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Training_TaskItem_Training_Plan", Storage="_Training_Plan", ThisKey="PlanId", OtherKey="PlanId", IsForeignKey=true)]
public Training_Plan Training_Plan public Training_Plan Training_Plan
{ {

View File

@ -130,12 +130,12 @@ namespace WebAPI.Controllers
[HttpGet] [HttpGet]
public Model.ResponeData updateTaskItemLearnTime(string taskItemId, DateTime startTime, DateTime endTime) public Model.ResponeData updateTaskItemLearnTime(string taskItemId, DateTime startTime, DateTime endTime,string VideoProgress)
{ {
var responeData = new Model.ResponeData(); var responeData = new Model.ResponeData();
try try
{ {
responeData.data = APITrainingTaskService.updateTaskItemLearnTime(taskItemId, startTime, endTime); APITrainingTaskService.updateTaskItemLearnTime(taskItemId, startTime, endTime, VideoProgress);
} }
catch (Exception ex) catch (Exception ex)
{ {