This commit is contained in:
李鹏飞 2023-10-31 18:04:03 +08:00
commit 5ccdda6e13
38 changed files with 2336 additions and 188 deletions

View File

@ -0,0 +1,116 @@
--
alter table CQMS_Performance add OutDay int null;
GO
--
alter table CQMS_Performance add Workloads decimal(18, 2) null;
GO
--
alter table CQMS_Performance add WorkRange nvarchar(200) null;
GO
--
alter table CQMS_Performance add ScorMan nvarchar(50) null;
GO
--
insert into sys_menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
values('F2133BD6-C786-407A-AD6F-3EEF613229A8','施工管理绩效数据','ZHGL/Performance/PerformanceAllData.aspx',150,
'0','Menu_ZHGL','1','1','1')
GO
ALTER PROCEDURE [dbo].[Proc_CallWebApi]
-- Add the parameters for the stored procedure here
@userId NVARCHAR(2000),--userid
@thing2 nvarchar(2000),--
@name1 nvarchar(50),--
@date3 datetime,--
@projectName nvarchar(200),
@ResponseText NVARCHAR(4000) OUTPUT
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
DECLARE @data varchar(8000);
DECLARE @ApiUrl VARCHAR(200);
DECLARE @RequestType VARCHAR(5);--:POST,GET
DECLARE @date2 varchar(100);
set @date2 = CONVERT(varchar(100), @date3, 23)
--API地址
set @ApiUrl='http://localhost:7040/api/Common/postSubscribeMessage';
--set @ApiUrl='https://zhgd.cwcec.com/sgglapi_wx/api/Common/postSubscribeMessage';
set @RequestType='POST';
--
set @data='{
"touser":"'+@userId+'",
"template_id":"1gT0FfTc2LwnnqUCU8h_nXDyv8VGtne1Iolo47gPA0c",
"page":"pages/index/index",
"data":{
"thing3":{"value":"您今日的施工绩效尚未填写"},
"thing13":{"value":"系统管理员"},
"time5":{"value":"'+@date2+'"}
}
}'; --入参
Declare @Object as Int
Exec sp_OACreate 'Msxml2.ServerXMLHTTP.3.0', @Object OUT
Exec sp_OAMethod @Object, 'open', NULL, @RequestType,@ApiUrl,'false'
IF @RequestType='POST'
BEGIN
Exec sp_OAMethod @Object, 'setRequestHeader', NULL, 'Content-Type','application/json'
END
Exec sp_OAMethod @Object, 'setRequestHeader', NULL, 'token','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0'
Exec sp_OAMethod @Object, 'send', NULL, @data --
Exec sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT
--EXEC sp_OAGetErrorInfo @Object --
--Select @ResponseText as ResponseText
--Select * from [dbo].[ParseJSON](@ResponseText)
Exec sp_OADestroy @Object
END
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--4
ALTER PROCEDURE [dbo].[Sp_APP_PerformanceByTime]
AS
BEGIN
declare @ResponseText NVARCHAR(4000);
DECLARE @PostUserid nvarchar(2000);
declare @UserOpenid nvarchar(50);
declare @Projectname nvarchar(200);
--
DECLARE @Userid nvarchar(50);--id
DECLARE @ProjectId nvarchar(50);--
DECLARE My_Cursor CURSOR --
FOR ( select Top 1 Child3.CreateMan,Perfor.ProjectId from CQMS_Performance_Child3 Child3
LEFT JOIN CQMS_Performance as Perfor ON Perfor.PerformanceGid=Child3.PerformanceGid
where Child3.WorkPlan=''
and CONVERT(varchar(100), Child3.CurrentDate, 23)=CONVERT(varchar(100), GETDATE(), 23) )
OPEN My_Cursor;--
FETCH NEXT FROM My_Cursor INTO @Userid,@ProjectId;--
WHILE @@FETCH_STATUS=0
--0
BEGIN
declare @dateNow datetime;
set @dateNow=getdate();
select @UserOpenid=openid from sys_user where userid=@Userid;
select @Projectname=ShortName from Base_Project where projectid=@ProjectId;
--api存储过程
exec Proc_CallWebApi @UserOpenid,'您今日的施工绩效尚未填写','系统管理员',@dateNow,@Projectname,@ResponseText output;
FETCH NEXT
FROM
My_Cursor INTO @Userid,@ProjectId;
END CLOSE My_Cursor;--
DEALLOCATE My_Cursor;--
END
GO

View File

@ -74,6 +74,36 @@ namespace BLL
}
}
/// <summary>
/// 用户下拉框
/// </summary>
/// <param name="dropName">下拉框名字</param>
/// <param name="projectId">项目id</param>
/// <param name="isShowPlease">是否显示请选择</param>
public static void InitUserDropDownListByUser(FineUIPro.DropDownList dropName, string projectId,string userId, bool isShowPlease)
{
dropName.DataValueField = "CreateMan";
dropName.DataTextField = "CreateManName";
dropName.DataSource = GetProjectUserListByProjectId(projectId, userId);
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
public static void InitAllUserDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.DataValueField = "CreateMan";
dropName.DataTextField = "CreateManName";
dropName.DataSource = GetProjectAllUserListByProjectId();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
public class PerformanceUser {
public string CreateMan { get; set; }
@ -94,5 +124,39 @@ namespace BLL
}
}
public static List<PerformanceUser> GetProjectUserListByProjectId(string projectId,string userId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var list = (from x in db.CQMS_Performance
join y in db.Sys_User on x.CreateMan equals y.UserId
where x.ProjectId == projectId && x.States == "1" && x.ScorMan== userId
select new PerformanceUser
{
CreateMan = x.CreateMan,
CreateManName = BLL.UserService.GetUserByUserId(x.CreateMan).UserName
}).ToList();
return list;
}
}
public static List<PerformanceUser> GetProjectAllUserListByProjectId()
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var list = (from x in db.CQMS_Performance
join y in db.Sys_User on x.CreateMan equals y.UserId
where x.States == "1"
select new PerformanceUser
{
CreateMan = x.CreateMan,
CreateManName = BLL.UserService.GetUserByUserId(x.CreateMan).UserName
}).Distinct().ToList();
return list;
}
}
}
}

View File

@ -1016,7 +1016,7 @@
<Version>2.1.1</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version>
<Version>13.0.3</Version>
</PackageReference>
<PackageReference Include="NPOI">
<Version>2.5.5</Version>

View File

@ -421,5 +421,10 @@ namespace BLL
return false;
}
}
public static Model.WBS_BreakdownProject GetBreakdownProjectByName(string divisionProjectId, string breakdownName)
{
return Funs.DB.WBS_BreakdownProject.FirstOrDefault(x => x.DivisionProjectId == divisionProjectId && x.BreakdownName == breakdownName);
}
}
}

View File

@ -189,5 +189,26 @@ namespace BLL
return false;
}
}
/// <summary>
/// 根据分部id获取下级项
/// </summary>
/// <param name="divisionProjectId"></param>
/// <returns></returns>
public static List<Model.WBS_DivisionProject> GetDivisionProjectBySupId(string divisionProjectId)
{
return (from x in Funs.DB.WBS_DivisionProject where x.SuperDivisionId == divisionProjectId select x).ToList();
}
/// <summary>
/// 根据分部名称获取信息
/// </summary>
/// <param name="divisionName"></param>
/// <returns></returns>
public static Model.WBS_DivisionProject GetDivisionProjectByName(string CNProfessionalId, string unitWorkId,string superDivisionId, string divisionName)
{
var q = Funs.DB.WBS_DivisionProject.FirstOrDefault(x => x.CNProfessionalId == CNProfessionalId && x.UnitWorkId == unitWorkId && x.SuperDivisionId==superDivisionId && x.DivisionName == divisionName);
return q;
}
}
}

View File

@ -384,9 +384,9 @@ namespace BLL
/// </summary>
/// <param name="unitId">单位Id</param>
/// <returns>人员的数量</returns>
public static int GetPersonCountByUnitId(string unitId, string projectId, bool isOutside)
public static int GetPersonCountByUnitId(string unitId, string projectId, DateTime inTime, bool isOutside)
{
var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && x.IsUsed == true && x.IsOutside == isOutside select x).ToList();
var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && x.InTime <= inTime && x.IsUsed == true && x.IsOutside == isOutside select x).ToList();
return q.Count();
}
@ -395,11 +395,12 @@ namespace BLL
/// </summary>
/// <param name="unitId">单位Id</param>
/// <returns>HSE人员的数量</returns>
public static int GetHSEPersonCountByUnitId(string unitId, string projectId)
public static int GetHSEPersonCountByUnitId(string unitId, string projectId, DateTime inTime)
{
var q = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
where x.UnitId == unitId && x.ProjectId == projectId && y.IsHsse==true && x.IsUsed == true select x).ToList();
where x.UnitId == unitId && x.ProjectId == projectId && x.InTime <= inTime && y.IsHsse == true && x.IsUsed == true
select x).ToList();
//var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && (x.WorkPostId == BLL.Const.WorkPost_HSSEEngineer || x.WorkPostId == BLL.Const.WorkPost_SafetyManager) && x.IsUsed == true select x).ToList();
return q.Count();
}

View File

@ -0,0 +1,48 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OutDayEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Performance.OutDayEdit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>修改出差天数</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" />
<f:Window ID="Window1" runat="server" IsModal="false" EnableClose="false" EnableResize="true" ShowHeader="false"
AutoScroll="true" Width="1200px" Height="800px">
<Items>
<f:Form ID="SimpleForm2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" Title="出差天数">
<Rows>
<f:FormRow>
<Items>
<f:NumberBox ID="txtOutDay" runat="server" Label="出差天数" MaxLength="50" Required="true" ShowRedStar="true" LabelWidth="100px">
</f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtWorkRange" runat="server" Label="工作范围" MaxLength="50" LabelWidth="100px" Required="true" ShowRedStar="true">
</f:TextBox>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
<Toolbars>
<f:Toolbar ID="Toolbar4" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="Button2" Icon="SystemSave" Text="确认修改" ToolTip="确认修改" runat="server" ValidateForms="SimpleForm2"
OnClick="btnEdit_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Window>
</form>
</body>
</html>

View File

@ -0,0 +1,48 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.CQMS.Performance
{
public partial class OutDayEdit : PageBase
{
//主键
public string PerformanceGid
{
get
{
return (string)ViewState["PerformanceGid"];
}
set
{
ViewState["PerformanceGid"] = value;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//主键
PerformanceGid = Request.Params["PerformanceGid"];
//根据主键加载主表
var pModel = Funs.DB.CQMS_Performance.FirstOrDefault(x => x.PerformanceGid == PerformanceGid);
txtOutDay.Text = pModel.OutDay.ToString();
txtWorkRange.Text = pModel.WorkRange;
}
}
protected void btnEdit_Click(object sender, EventArgs e)
{
var pModel = Funs.DB.CQMS_Performance.FirstOrDefault(x => x.PerformanceGid == PerformanceGid);
pModel.OutDay = Convert.ToInt32(txtOutDay.Text);
pModel.WorkRange = txtWorkRange.Text.Trim();
Funs.DB.SubmitChanges();
ShowNotify("修改成功。", MessageBoxIcon.Success);
}
}
}

View File

@ -0,0 +1,89 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.Performance
{
public partial class OutDayEdit
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// SimpleForm2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm2;
/// <summary>
/// txtOutDay 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtOutDay;
/// <summary>
/// txtWorkRange 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtWorkRange;
/// <summary>
/// Toolbar4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar4;
/// <summary>
/// Button2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button Button2;
}
}

View File

@ -34,6 +34,10 @@
<f:Button ID="btnSearch" runat="server" Icon="SystemSearch" ToolTip="查询" OnClick="btnBindGrid">
</f:Button>
<f:Button ID="Button2" ToolTip="修改出差天数" Hidden="false" Text="出差天数" Icon="Pencil" runat="server"
OnClick="btnDays_Click">
</f:Button>
<f:Button ID="btnUpdateMonth" ToolTip="修改月节点目标" Hidden="false" Text="月节点目标" Icon="Pencil" runat="server"
OnClick="btnMonthTarget">
</f:Button>
@ -46,7 +50,7 @@
OnClick="btnWorkPlan">
</f:Button>
<f:Button ID="Button1" ToolTip="提交" Hidden="false" Text="提交报表" Icon="Pencil" runat="server" ConfirmText="请注意:提交后不可修改。是否确认提交数据?"
<f:Button ID="Button1" ToolTip="提交" Hidden="false" Text="提交报表" Icon="Pencil" runat="server"
OnClick="btnSubmit">
</f:Button>
@ -100,6 +104,13 @@
Title="编辑" EnableIFrame="true" Height="650px"
Width="1200px">
</f:Window>
<f:Window ID="Window2" runat="server" Hidden="true" ShowHeader="true"
IsModal="true" Target="Parent" EnableMaximize="true" EnableResize="true" AutoScroll="true"
Title="修改出差天数" EnableIFrame="true" Height="650px"
Width="440px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<%-- <f:MenuButton ID="btnMenuEdit" OnClick="btnEdit_Click" EnablePostBack="true"
Hidden="true" runat="server" Text="编辑" Icon="TableEdit" >

View File

@ -122,14 +122,18 @@ namespace FineUIPro.Web.CQMS.Performance
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var NowDate = Convert.ToDateTime(drpCompileDateMonth.Text.Trim());
var Year = NowDate.Year;
var Month = 1;
if (NowDate.Month != 12)
{
Month = NowDate.Month + 1;
}
else {
Year += 1;
}
//获取配置
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == NowDate.Year.ToString() && x.SortIndex == Month);
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == Year.ToString() && x.SortIndex == Month);
if (modelConfig != null)
{
int child3Index = 1;
@ -234,7 +238,7 @@ namespace FineUIPro.Web.CQMS.Performance
}
else {
ShowNotify("当前日期未设置规则,请前往施工绩效设置页面进行操作。", MessageBoxIcon.Warning);
PageContext.RegisterStartupScript("CloseRefresh()");
//PageContext.RegisterStartupScript("CloseRefresh()");
return;
}
@ -1063,13 +1067,17 @@ namespace FineUIPro.Web.CQMS.Performance
//循环list给每周任务、工程量、资源需求计划、本周工作任务完成情况 ,每日工作计划、完成情况赋值
//获取周数
var NowDate = Convert.ToDateTime(drpCompileDateMonth.Text.Trim());
var Year = NowDate.Year;
var Month = 1;
if (NowDate.Month != 12)
{
Month = NowDate.Month + 1;
}
else {
Year += 1;
}
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == NowDate.Year.ToString() && x.SortIndex == Month);
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == Year.ToString() && x.SortIndex == Month);
for (int i = 0; i < listChild1.Count; i++)
{
@ -1177,6 +1185,24 @@ namespace FineUIPro.Web.CQMS.Performance
}
else
{
var NowDate = Convert.ToDateTime(drpCompileDateMonth.Text.Trim());
var Year = NowDate.Year;
var Month = 1;
if (NowDate.Month != 12)
{
Month = NowDate.Month + 1;
}
else
{
Year += 1;
}
//获取配置
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == Year.ToString() && x.SortIndex == Month);
if (modelConfig==null)
{
return;
}
if (string.IsNullOrEmpty(CurrUser.LoginProjectId))
{
ShowNotify("未查询到当前项目,请刷新页面重试。", MessageBoxIcon.Warning);
@ -1238,14 +1264,19 @@ namespace FineUIPro.Web.CQMS.Performance
return;
}
var dates = Convert.ToDateTime(drpCompileDateMonth.Text.Trim());
var Year = dates.Year;
var Month = 1;
if (dates.Month != 12)
{
Month = dates.Month + 1;
}
else
{
Year += 1;
}
//按照日期查询是否有设置
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == dates.Year.ToString() && x.SortIndex == Month);
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == Year.ToString() && x.SortIndex == Month);
if (modelConfig == null)
{
ShowNotify("当前日期未设置规则,请前往施工绩效设置页面进行操作。", MessageBoxIcon.Warning);
@ -1495,12 +1526,54 @@ namespace FineUIPro.Web.CQMS.Performance
return;
}
else {
model.States = "1";
Funs.DB.SubmitChanges();
ShowNotify("提交成功,请等待领导打分。", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PerformanceSubmit.aspx?PerformanceGid=" + PerformanceGid + "&CreateDateMonth=" + drpCompileDateMonth.Text.Trim(), ""),
"提交报表", Unit.Parse("440px"), Unit.Parse("300px")));
//model.States = "1";
//Funs.DB.SubmitChanges();
//ShowNotify("提交成功,请等待领导打分。", MessageBoxIcon.Success);
}
}
}
/// <summary>
/// 修改出差天数
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnDays_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(PerformanceGid))
{
ShowNotify("未查询到数据,请先生成表单。", MessageBoxIcon.Warning);
return;
}
else
{
//查询状态是否是0 不是0的不允许修改
var model = Funs.DB.CQMS_Performance.FirstOrDefault(x => x.PerformanceGid == PerformanceGid);
if (model == null)
{
ShowNotify("未查询到数据,请先生成表单。", MessageBoxIcon.Warning);
return;
}
else
{
if (CurrUser.UserId != Const.sysglyId && CurrUser.UserId != Const.hfnbdId)
{
if (model.States != "0")
{
ShowNotify("当前数据已经提交,不允许修改。", MessageBoxIcon.Warning);
return;
}
}
}
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("OutDayEdit.aspx?PerformanceGid=" + PerformanceGid, ""),
"修改出差天数", Unit.Parse("440px"), Unit.Parse("300px")));
}
}
#region excel

View File

@ -86,6 +86,15 @@ namespace FineUIPro.Web.CQMS.Performance
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// Button2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button Button2;
/// <summary>
/// btnUpdateMonth 控件。
/// </summary>
@ -140,6 +149,15 @@ namespace FineUIPro.Web.CQMS.Performance
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// Menu1 控件。
/// </summary>

View File

@ -109,7 +109,16 @@ namespace FineUIPro.Web.CQMS.Performance
}
}
//根据projectid加载CQMS_Performance表中成功的user数据
//超级管理员
if (CurrUser.UserId != Const.sysglyId && CurrUser.UserId != Const.hfnbdId)
{
BLL.PerformanceService.InitUserDropDownListByUser(drpUser, CurrUser.LoginProjectId,CurrUser.UserId, true);
}
else {
BLL.PerformanceService.InitUserDropDownList(drpUser, CurrUser.LoginProjectId, true);
}
CreateUser = Request.QueryString["CreateUser"];
if (!string.IsNullOrEmpty(CreateUser))
{
@ -144,13 +153,17 @@ namespace FineUIPro.Web.CQMS.Performance
{
var NowDate = Convert.ToDateTime(drpCompileDateMonth.Text.Trim());
var Month = 1;
var Year = NowDate.Year;
if (NowDate.Month != 12)
{
Month = NowDate.Month + 1;
}
else {
Year += 1;
}
//获取配置
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == NowDate.Year.ToString() && x.SortIndex == Month);
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == Year.ToString() && x.SortIndex == Month);
if (modelConfig != null)
{
int child3Index = 1;
@ -1095,12 +1108,16 @@ namespace FineUIPro.Web.CQMS.Performance
//获取周数
var NowDate = Convert.ToDateTime(drpCompileDateMonth.Text.Trim());
var Month = 1;
var Year = NowDate.Year;
if (NowDate.Month != 12)
{
Month = NowDate.Month + 1;
}
else {
Year += 1;
}
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == NowDate.Year.ToString() && x.SortIndex == Month);
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == Year.ToString() && x.SortIndex == Month);
for (int i = 0; i < listChild1.Count; i++)
{

View File

@ -22,6 +22,7 @@
<f:DatePicker runat="server" Label="请选择年月" DateFormatString="yyyy-MM" EmptyText="请选择年月"
ID="drpCompileDateMonth" DisplayType="Month" ShowTodayButton="false" Required="true" ShowRedStar="true" LabelWidth="110px">
</f:DatePicker>
</Items>
</f:FormRow>
@ -29,8 +30,10 @@
<Items>
<f:TextBox ID="txtHeadUserid" runat="server" Label="五环负责人" MaxLength="50" LabelWidth="110px" Required="true" ShowRedStar="true">
</f:TextBox>
<f:NumberBox ID="txtProOutputValue" runat="server" Label="本月完成专业产值" MaxLength="50" LabelWidth="150px" >
</f:NumberBox>
<f:TextBox ID="txtWorkRange" runat="server" Label="工作范围" MaxLength="50" LabelWidth="150px" Required="true" ShowRedStar="true">
</f:TextBox>
<%-- <f:NumberBox ID="txtProOutputValue" runat="server" Label="本月完成专业产值" MaxLength="50" LabelWidth="150px" >
</f:NumberBox>--%>
</Items>
</f:FormRow>

View File

@ -191,14 +191,15 @@ namespace FineUIPro.Web.CQMS.Performance
PerformanceGid = Guid.NewGuid().ToString();
modelP.PerformanceGid = PerformanceGid;
modelP.HeadUserid = txtHeadUserid.Text.Trim();
if (!string.IsNullOrEmpty(txtProOutputValue.Text.Trim()))
{
modelP.ProOutputValue = Convert.ToDecimal(txtProOutputValue.Text.Trim());
}
else {
modelP.ProOutputValue = 0;
}
//if (!string.IsNullOrEmpty(txtProOutputValue.Text.Trim()))
//{
// modelP.ProOutputValue = Convert.ToDecimal(txtProOutputValue.Text.Trim());
//}
//else {
// modelP.ProOutputValue = 0;
//}
modelP.WorkRange = txtWorkRange.Text.Trim();
modelP.SubUserids = txtSubUserids.Text.Trim();
modelP.SubpackageUserids = txtSubpackageUserids.Text.Trim();
modelP.TotalScore = 0;
@ -468,14 +469,18 @@ namespace FineUIPro.Web.CQMS.Performance
#endregion
var datesConfig = Convert.ToDateTime(drpCompileDateMonth.Text.Trim());
var Month = 1;
var nowYear = datesConfig.Year;
if (datesConfig.Month != 12)
{
Month = datesConfig.Month+ 1;
Month = datesConfig.Month + 1;
}
else {
nowYear += 1;
}
var Child2SortIndex = 1;
//按照日期查询是否有设置
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == datesConfig.Year.ToString() && x.SortIndex == Month);
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == nowYear.ToString() && x.SortIndex == Month);
if (modelConfig!=null)
{
//根据设置的周数插入表格CQMS_Performance_Child2
@ -622,7 +627,7 @@ namespace FineUIPro.Web.CQMS.Performance
var OneWeekDate3 = Convert.ToDateTime(modelConfig.SetUpStartDate);
#endregion
var OneWeekStartDate = Convert.ToDateTime(modelConfig.SetUpStartDate);
foreach (var item in listChild2)
{
Model.CQMS_Performance_Child3 modelChild3 = new Model.CQMS_Performance_Child3();
@ -675,7 +680,7 @@ namespace FineUIPro.Web.CQMS.Performance
#region
//循环的天数
var Xhi = 1;
switch (OneWeekDate.DayOfWeek)
switch (OneWeekStartDate.DayOfWeek)
{
//星期天
case DayOfWeek.Sunday:

View File

@ -69,13 +69,13 @@ namespace FineUIPro.Web.CQMS.Performance
protected global::FineUIPro.TextBox txtHeadUserid;
/// <summary>
/// txtProOutputValue 控件。
/// txtWorkRange 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtProOutputValue;
protected global::FineUIPro.TextBox txtWorkRange;
/// <summary>
/// txtSubUserids 控件。

View File

@ -0,0 +1,44 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PerformanceSubmit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Performance.PerformanceSubmit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>提交数据</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" />
<f:Window ID="Window1" runat="server" IsModal="false" EnableClose="false" EnableResize="true" ShowHeader="false"
AutoScroll="true" Width="1200px" Height="800px">
<Items>
<f:Form ID="SimpleForm2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" Title="出差天数">
<Rows>
<f:FormRow>
<Items>
<f:DropDownList ID="drpUser" runat="server" EnableEdit="false" Label="选择审核人"
ForceSelection="false"
AutoPostBack="true" >
</f:DropDownList>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
<Toolbars>
<f:Toolbar ID="Toolbar4" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="Button2" Icon="SystemSave" ConfirmText="请注意:提交后不可修改。是否确认提交数据?" Text="提交报表" ToolTip="提交报表" runat="server" ValidateForms="SimpleForm2"
OnClick="btnEdit_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Window>
</form>
</body>
</html>

View File

@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Web.UI.WebControls;
using BLL;
using Model;
using Newtonsoft.Json.Linq;
namespace FineUIPro.Web.CQMS.Performance
{
public partial class PerformanceSubmit : PageBase
{
/// <summary>
/// 主键
/// </summary>
public string PerformanceGid
{
get
{
return (string)ViewState["PerformanceGid"];
}
set
{
ViewState["PerformanceGid"] = value;
}
}
/// <summary>
/// 日期
/// </summary>
public string CreateDateMonth
{
get
{
return (string)ViewState["CreateDateMonth"];
}
set
{
ViewState["CreateDateMonth"] = value;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//主键
PerformanceGid = Request.Params["PerformanceGid"];
CreateDateMonth = Request.Params["CreateDateMonth"];
//加载当前项目下的审核人
UserService.InitUserDropDownList(drpUser, CurrUser.LoginProjectId, true);
}
}
protected void btnEdit_Click(object sender, EventArgs e) {
if (drpUser.SelectedValue == Const._Null)
{
ShowNotify("请选择审核人。", MessageBoxIcon.Warning);
}
else {
var model = Funs.DB.CQMS_Performance.FirstOrDefault(x => x.PerformanceGid == PerformanceGid);
model.States = "1";
model.ScorMan = drpUser.SelectedValue;
Funs.DB.SubmitChanges();
ShowNotify("提交成功,请等待领导打分。", MessageBoxIcon.Success);
ViewState["CompileDateMonth"] = CreateDateMonth;
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
}
}
}

View File

@ -0,0 +1,80 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.Performance
{
public partial class PerformanceSubmit
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// SimpleForm2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm2;
/// <summary>
/// drpUser 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUser;
/// <summary>
/// Toolbar4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar4;
/// <summary>
/// Button2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button Button2;
}
}

View File

@ -89,6 +89,19 @@
</f:FormRow>
</Rows>
</f:Form>
<f:Form ID="Form2" ShowBorder="false" ShowHeader="true" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" Title="7、工作负荷60%)(专业完成产值)">
<Rows>
<f:FormRow>
<Items>
<f:NumberBox ID="txtWorkloads" runat="server" Label="专业完成产值" MaxLength="50" Required="true" ShowRedStar="true" LabelWidth="100px">
</f:NumberBox>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
<Toolbars>

View File

@ -39,6 +39,10 @@ namespace FineUIPro.Web.CQMS.Performance
txtScore4.Text = child1List[3].EvaScore.ToString();
txtScore5.Text = child1List[4].EvaScore.ToString();
txtScore6.Text = child1List[5].EvaScore.ToString();
//根据主键加载主表
var pModel = Funs.DB.CQMS_Performance.FirstOrDefault(x => x.PerformanceGid == PerformanceGid);
txtWorkloads.Text = pModel.Workloads.ToString();
}
else
{
@ -76,6 +80,10 @@ namespace FineUIPro.Web.CQMS.Performance
child2Model6.EvaScore = Convert.ToDecimal(txtScore6.Text.Trim());
db.SubmitChanges();
var pModel = Funs.DB.CQMS_Performance.FirstOrDefault(x => x.PerformanceGid == PerformanceGid);
pModel.Workloads = Convert.ToDecimal(txtWorkloads.Text);
Funs.DB.SubmitChanges();
ShowNotify("保存成功。", MessageBoxIcon.Success);
}
}

View File

@ -149,6 +149,24 @@ namespace FineUIPro.Web.CQMS.Performance
/// </remarks>
protected global::FineUIPro.NumberBox txtScore6;
/// <summary>
/// Form2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// txtWorkloads 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtWorkloads;
/// <summary>
/// Toolbar4 控件。
/// </summary>

View File

@ -79,13 +79,17 @@ namespace FineUIPro.Web.CQMS.Performance
var CreateDateWeek = db.CQMS_Performance.FirstOrDefault(x => x.PerformanceGid == PerformanceGid).CreateDateMonth;
var datesConfig = Convert.ToDateTime(CreateDateMonth);
var Year = datesConfig.Year;
var Month = 1;
if (datesConfig.Month != 12)
{
Month = datesConfig.Month + 1;
}
else {
Year += 1;
}
//按照日期查询是否有设置
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == datesConfig.Year.ToString() && x.SortIndex == Month);
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == Year.ToString() && x.SortIndex == Month);
List<CustomClass> myList = new List<CustomClass>();
myList.Add(new CustomClass("1", "第一周"));
myList.Add(new CustomClass("2", "第二周"));

View File

@ -200,7 +200,7 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtTaskCompletContent8" runat="server" Label="本周工作任务完成情况" MaxLength="500" LabelWidth="120px" Required="true" ShowRedStar="true">
<f:TextBox ID="txtTaskCompletContent8" runat="server" Label="本周工作任务完成情况" MaxLength="500" LabelWidth="120px" >
</f:TextBox>
</Items>
</f:FormRow>

View File

@ -151,8 +151,11 @@
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true" Hidden="true" Icon="Pencil"
runat="server" Text="修改">
</f:MenuButton>
<f:MenuButton ID="btnMenuCopy" OnClick="btnMenuCopy_Click" EnablePostBack="true" Icon="DatabaseCopy"
runat="server" Text="拷贝">
<f:MenuButton ID="btnMenuCopy" OnClick="btnMenuCopy_Click" EnablePostBack="true" Icon="PageCopy"
runat="server" Text="复制">
</f:MenuButton>
<f:MenuButton ID="btnMenuPaste" OnClick="btnMenuPaste_Click" EnablePostBack="true" Icon="PagePaste"
runat="server" Text="粘贴">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" Hidden="true" Icon="Delete"
ConfirmText="确认删除选中项?" ConfirmTarget="Top" runat="server" Text="删除">

View File

@ -15,6 +15,7 @@ namespace FineUIPro.Web.CQMS.WBS
{
public partial class ProjectControlPoint : PageBase
{
#region
/// <summary>
/// 被选择项列表
/// </summary>
@ -44,6 +45,7 @@ namespace FineUIPro.Web.CQMS.WBS
ViewState["NoSelectedList"] = value;
}
}
#endregion
#region
/// <summary>
@ -84,6 +86,7 @@ namespace FineUIPro.Web.CQMS.WBS
this.trWBS.EnableIcons = true;
this.trWBS.AutoScroll = true;
this.trWBS.EnableSingleClickExpand = true;
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId orderby x.UnitWorkCode select x;
foreach (var q in unitWorks)
{
@ -367,7 +370,7 @@ namespace FineUIPro.Web.CQMS.WBS
//{
if (b == false)
{
var selectedDivisionProject = Funs.DB.WBS_DivisionProject.FirstOrDefault(x=> x.SuperDivisionId == superDivisionProject.DivisionProjectId && x.IsSelected==true);
var selectedDivisionProject = Funs.DB.WBS_DivisionProject.FirstOrDefault(x => x.SuperDivisionId == superDivisionProject.DivisionProjectId && x.IsSelected == true);
if (selectedDivisionProject != null)
{
@ -417,8 +420,28 @@ namespace FineUIPro.Web.CQMS.WBS
var temp = BLL.DivisionProjectService.GetDivisionProjectById(divisionProjectId);
if (temp == null)
{
this.btnMenuCopy.Hidden = true;
string cNProfessionalId = this.trWBS.SelectedNodeID;
if (cNProfessionalId.Contains("|"))
{
cNProfessionalId = e.NodeID.Split('|')[1];
}
var cnp = CNProfessionalService.GetCNProfessional(cNProfessionalId);
if (cnp != null)
{
this.btnMenuPaste.Hidden = false;
}
else
{
this.btnMenuPaste.Hidden = true;
}
return;
}
else
{
this.btnMenuCopy.Hidden = false;
this.btnMenuPaste.Hidden = false;
}
if (temp.CNProfessionalId != null && temp.CNProfessionalId == Const.CNProfessionalConstructId)
{
this.Grid1.Columns[2].Hidden = false;
@ -688,6 +711,7 @@ namespace FineUIPro.Web.CQMS.WBS
}
#endregion
#region
/// <summary>
/// 增加
/// </summary>
@ -712,6 +736,7 @@ namespace FineUIPro.Web.CQMS.WBS
Alert.ShowInTop("请选择树节点!", MessageBoxIcon.Warning);
}
}
#endregion
#region Grid双击事件
/// <summary>
@ -724,6 +749,7 @@ namespace FineUIPro.Web.CQMS.WBS
btnMenuModify_Click(null, null);
}
#endregion
#region
/// <summary>
/// 编辑按钮
@ -1375,9 +1401,56 @@ namespace FineUIPro.Web.CQMS.WBS
}
#endregion
#region
#region
#region
/// <summary>
/// 拷贝单位工程下勾选状态
/// 选中节点ID
/// </summary>
public string treeSelectId
{
get
{
return (string)ViewState["treeSelectId"];
}
set
{
ViewState["treeSelectId"] = value;
}
}
/// <summary>
/// 单位工程id
/// </summary>
public string unitWorkId
{
get
{
return (string)ViewState["unitWorkId"];
}
set
{
ViewState["unitWorkId"] = value;
}
}
/// <summary>
/// 专业Id
/// </summary>
public string CNProfessionalId
{
get
{
return (string)ViewState["CNProfessionalId"];
}
set
{
ViewState["CNProfessionalId"] = value;
}
}
#endregion
/// <summary>
/// 复制
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
@ -1385,73 +1458,310 @@ namespace FineUIPro.Web.CQMS.WBS
{
if (this.trWBS.SelectedNode != null)
{
string unitWorkId = string.Empty;
var newUnitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(this.trWBS.SelectedNode.NodeID);
if (newUnitWork != null)
treeSelectId = this.trWBS.SelectedNodeID;
var divisionProject = BLL.DivisionProjectService.GetDivisionProjectById(treeSelectId);
if (divisionProject != null)
{
unitWorkId = newUnitWork.UnitWorkId;
}
else
{
var div = BLL.DivisionProjectService.GetDivisionProjectById(this.trWBS.SelectedNode.NodeID);
if (div != null)
{
if (!string.IsNullOrEmpty(div.UnitWorkId))
{
unitWorkId = div.UnitWorkId;
}
}
else
{
var div2 = (from x in Funs.DB.WBS_DivisionProject where x.CNProfessionalId != null && x.CNProfessionalId == this.trWBS.SelectedNodeID select x).FirstOrDefault();
if (div2 != null)
{
if (!string.IsNullOrEmpty(div2.UnitWorkId))
{
unitWorkId = div2.UnitWorkId;
}
}
else
{
var nodeId = this.trWBS.SelectedNodeID.Split('|')[0];
var uw = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(nodeId);
if (uw != null)
{
unitWorkId = uw.UnitWorkId;
unitWorkId = divisionProject.UnitWorkId;
CNProfessionalId = divisionProject.CNProfessionalId;
}
}
}
}
var unitWork = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.UnitWorkId != unitWorkId
select x).FirstOrDefault();
var oldDivsionProject = (from x in Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.IsSelected == true
&& x.UnitWorkId == unitWork.UnitWorkId
select x).ToList();
foreach (var item in oldDivsionProject)
/// <summary>
/// 粘贴
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuPaste_Click(object sender, EventArgs e)
{
var div = Funs.DB.WBS_DivisionProject.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == unitWorkId && x.DivisionCode == item.DivisionCode);
if (div != null)
if (!string.IsNullOrEmpty(treeSelectId))
{
div.IsSelected = true;
Funs.DB.SubmitChanges();
if (!string.IsNullOrEmpty(this.trWBS.SelectedNodeID))
{
string cNProfessionalId = this.trWBS.SelectedNodeID;
if (cNProfessionalId.Contains("|"))
{
cNProfessionalId = cNProfessionalId.Split('|')[1];
}
var divisionProject = BLL.DivisionProjectService.GetDivisionProjectById(cNProfessionalId);
if (divisionProject != null)
{
var division = (from x in Funs.DB.WBS_DivisionProject where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId && x.CNProfessionalId == CNProfessionalId && x.DivisionProjectId == treeSelectId select x).FirstOrDefault();
if (division != null)
{
var oldDivisionProject = (from x in Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == divisionProject.CNProfessionalId
&& x.UnitWorkId == divisionProject.UnitWorkId
&& x.SuperDivisionId != null
&& x.DivisionName == division.DivisionName
select x);
if (oldDivisionProject.Count() == 0)
{
Model.WBS_DivisionProject newDiv = new Model.WBS_DivisionProject();
newDiv.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject));
newDiv.ProjectId = this.CurrUser.LoginProjectId;
newDiv.DivisionCode = division.DivisionCode;
newDiv.DivisionName = division.DivisionName;
newDiv.SortIndex = division.SortIndex;
newDiv.SuperDivisionId = this.trWBS.SelectedNodeID;
newDiv.CNProfessionalId = divisionProject.CNProfessionalId;
newDiv.UnitWorkId = divisionProject.UnitWorkId;
newDiv.OldDivisionId = division.OldDivisionId;
newDiv.SubItemType = division.SubItemType;
BLL.DivisionProjectService.AddDivisionProject(newDiv);
var breakdownProjects = (from x in Funs.DB.WBS_BreakdownProject
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.UnitWorkId == unitWorkId
&& x.DivisionProjectId == div.DivisionProjectId
select x).ToList();
foreach (var b in breakdownProjects)
var divisions = BLL.DivisionProjectService.GetDivisionProjectBySupId(division.DivisionProjectId);
if (divisions.Count > 0)
{
b.IsSelected = true;
Funs.DB.SubmitChanges();
List<Model.WBS_DivisionProject> divisions2 = (from x in Funs.DB.WBS_DivisionProject where x.SuperDivisionId == division.DivisionProjectId select x).ToList();
if (divisions2.Count() > 0)
{
this.InsertDivisionDetail(divisions2, newDiv.DivisionProjectId, newDiv.UnitWorkId);
}
}
else
{
var breakLists = BLL.BreakdownProjectService.GetBreakdownProjectsByDivisionProjectId(division.DivisionProjectId);
if (breakLists.Count > 0)
{
foreach (var item in breakLists)
{
Model.WBS_BreakdownProject bp = new Model.WBS_BreakdownProject();
bp.BreakdownProjectId = SQLHelper.GetNewID(typeof(Model.WBS_BreakdownProject));
bp.ProjectId = this.CurrUser.LoginProjectId;
bp.BreakdownCode = item.BreakdownCode;
bp.BreakdownName = item.BreakdownName;
bp.DivisionProjectId = newDiv.DivisionProjectId;
bp.Basis = item.Basis;
bp.CheckPoints = item.CheckPoints;
bp.RecordAndCode = item.RecordAndCode;
bp.Class = item.Class;
bp.SortIndex = item.SortIndex;
bp.Remark = item.Remark;
bp.IsSelected = item.IsSelected;
bp.ModelURL = item.ModelURL;
bp.UnitWorkId = newDiv.UnitWorkId;
bp.IsAcceptance = item.IsAcceptance;
bp.IsYellow = item.IsYellow;
bp.WuHuan = item.WuHuan;
bp.JianLi = item.JianLi;
bp.FenBao = item.FenBao;
bp.YeZhu = item.YeZhu;
BLL.BreakdownProjectService.AddBreakdownProject(bp);
}
}
}
}
}
else
{
#region
var d1 = BLL.DivisionProjectService.GetDivisionProjectById(treeSelectId);
if (d1 != null)
{
if (divisionProject.DivisionName != d1.DivisionName)
{
//粘贴分部
Model.WBS_DivisionProject newDivisionProject = new Model.WBS_DivisionProject();
newDivisionProject.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject));
newDivisionProject.ProjectId = this.CurrUser.LoginProjectId;
newDivisionProject.DivisionCode = d1.DivisionCode;
newDivisionProject.DivisionName = d1.DivisionName;
newDivisionProject.SortIndex = d1.SortIndex;
newDivisionProject.SuperDivisionId = divisionProject.DivisionProjectId;
newDivisionProject.CNProfessionalId = d1.CNProfessionalId;
newDivisionProject.UnitWorkId = divisionProject.UnitWorkId;
newDivisionProject.OldDivisionId = d1.OldDivisionId;
newDivisionProject.SubItemType = d1.SubItemType;
BLL.DivisionProjectService.AddDivisionProject(newDivisionProject);
//粘贴分项
var breakLists = BLL.BreakdownProjectService.GetBreakdownProjectsByDivisionProjectId(d1.DivisionProjectId);
if (breakLists.Count > 0)
{
foreach (var item in breakLists)
{
Model.WBS_BreakdownProject bp = new Model.WBS_BreakdownProject();
bp.BreakdownProjectId = SQLHelper.GetNewID(typeof(Model.WBS_BreakdownProject));
bp.ProjectId = this.CurrUser.LoginProjectId;
bp.BreakdownCode = item.BreakdownCode;
bp.BreakdownName = item.BreakdownName;
bp.DivisionProjectId = newDivisionProject.DivisionProjectId;
bp.Basis = item.Basis;
bp.CheckPoints = item.CheckPoints;
bp.RecordAndCode = item.RecordAndCode;
bp.Class = item.Class;
bp.SortIndex = item.SortIndex;
bp.Remark = item.Remark;
bp.IsSelected = item.IsSelected;
bp.ModelURL = item.ModelURL;
bp.UnitWorkId = newDivisionProject.UnitWorkId;
bp.IsAcceptance = item.IsAcceptance;
bp.IsYellow = item.IsYellow;
bp.WuHuan = item.WuHuan;
bp.JianLi = item.JianLi;
bp.FenBao = item.FenBao;
bp.YeZhu = item.YeZhu;
BLL.BreakdownProjectService.AddBreakdownProject(bp);
}
}
}
}
#endregion
}
}
else //粘贴到专业下
{
string professionId = this.trWBS.SelectedNodeID;
if (professionId.Contains("|"))
{
professionId = professionId.Split('|')[1];
}
var cnPro = BLL.CNProfessionalService.GetCNProfessional(professionId);
if (cnPro != null)
{
var division = (from x in Funs.DB.WBS_DivisionProject where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId && x.CNProfessionalId == CNProfessionalId && x.DivisionProjectId == treeSelectId select x).FirstOrDefault();
if (division != null)
{
var oldDivisionProject = (from x in Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == professionId
&& x.UnitWorkId == this.trWBS.SelectedNode.ParentNode.ParentNode.NodeID
&& x.SuperDivisionId == null
&& x.DivisionName == division.DivisionName
select x);
if (oldDivisionProject.Count() == 0)
{
Model.WBS_DivisionProject newDivisionProject = new Model.WBS_DivisionProject();
newDivisionProject.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject));
newDivisionProject.ProjectId = this.CurrUser.LoginProjectId;
newDivisionProject.DivisionCode = division.DivisionCode;
newDivisionProject.DivisionName = division.DivisionName;
newDivisionProject.SortIndex = division.SortIndex;
newDivisionProject.SuperDivisionId = null;
newDivisionProject.CNProfessionalId = cnPro.CNProfessionalId;
newDivisionProject.UnitWorkId = this.trWBS.SelectedNode.ParentNode.ParentNode.NodeID;
newDivisionProject.OldDivisionId = division.OldDivisionId;
newDivisionProject.SubItemType = division.SubItemType;
BLL.DivisionProjectService.AddDivisionProject(newDivisionProject);
var divisions = BLL.DivisionProjectService.GetDivisionProjectBySupId(division.DivisionProjectId);
if (divisions.Count > 0)
{
List<Model.WBS_DivisionProject> divisions2 = (from x in Funs.DB.WBS_DivisionProject where x.SuperDivisionId == division.DivisionProjectId select x).ToList();
if (divisions2.Count() > 0)
{
this.InsertDivisionDetail(divisions2, newDivisionProject.DivisionProjectId, newDivisionProject.UnitWorkId);
}
}
else
{
var breakLists = BLL.BreakdownProjectService.GetBreakdownProjectsByDivisionProjectId(division.DivisionProjectId);
if (breakLists.Count > 0)
{
foreach (var item in breakLists)
{
Model.WBS_BreakdownProject bp = new Model.WBS_BreakdownProject();
bp.BreakdownProjectId = SQLHelper.GetNewID(typeof(Model.WBS_BreakdownProject));
bp.ProjectId = this.CurrUser.LoginProjectId;
bp.BreakdownCode = item.BreakdownCode;
bp.BreakdownName = item.BreakdownName;
bp.DivisionProjectId = newDivisionProject.DivisionProjectId;
bp.Basis = item.Basis;
bp.CheckPoints = item.CheckPoints;
bp.RecordAndCode = item.RecordAndCode;
bp.Class = item.Class;
bp.SortIndex = item.SortIndex;
bp.Remark = item.Remark;
bp.IsSelected = item.IsSelected;
bp.ModelURL = item.ModelURL;
bp.UnitWorkId = newDivisionProject.UnitWorkId;
bp.IsAcceptance = item.IsAcceptance;
bp.IsYellow = item.IsYellow;
bp.WuHuan = item.WuHuan;
bp.JianLi = item.JianLi;
bp.FenBao = item.FenBao;
bp.YeZhu = item.YeZhu;
BLL.BreakdownProjectService.AddBreakdownProject(bp);
}
}
}
}
}
}
}
}
ShowNotify("粘贴成功!", MessageBoxIcon.Success);
InitTreeMenu();
}
else
{
Alert.ShowInParent("请先复制节点!", MessageBoxIcon.Warning);
}
}
//循环拷贝子级
private void InsertDivisionDetail(List<Model.WBS_DivisionProject> divisions, string superDivisionId, string unitWorkId)
{
foreach (var d in divisions)
{
var oldDivisionProject = BLL.DivisionProjectService.GetDivisionProjectByName(d.CNProfessionalId, unitWorkId,superDivisionId, d.DivisionName);
if (oldDivisionProject == null)
{
Model.WBS_DivisionProject newDivisionProject = new Model.WBS_DivisionProject();
newDivisionProject.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject));
newDivisionProject.ProjectId = this.CurrUser.LoginProjectId;
newDivisionProject.DivisionCode = d.DivisionCode;
newDivisionProject.DivisionName = d.DivisionName;
newDivisionProject.SortIndex = d.SortIndex;
newDivisionProject.SuperDivisionId = superDivisionId;
newDivisionProject.CNProfessionalId = d.CNProfessionalId;
newDivisionProject.UnitWorkId = unitWorkId;
newDivisionProject.OldDivisionId = d.OldDivisionId;
newDivisionProject.SubItemType = d.SubItemType;
BLL.DivisionProjectService.AddDivisionProject(newDivisionProject); //子级分部
List<Model.WBS_DivisionProject> divisions2 = (from x in Funs.DB.WBS_DivisionProject where x.SuperDivisionId == d.DivisionProjectId select x).ToList();
if (divisions2.Count() > 0)
{
this.InsertDivisionDetail(divisions2, newDivisionProject.DivisionProjectId, unitWorkId);
}
//拷贝分项
var breakdowns = from x in Funs.DB.WBS_BreakdownProject
join y in Funs.DB.WBS_DivisionProject on x.DivisionProjectId equals y.DivisionProjectId
where y.DivisionProjectId == d.DivisionProjectId
select x;
foreach (var b in breakdowns)
{
var oldBreakdownProject = BLL.BreakdownProjectService.GetBreakdownProjectByName(newDivisionProject.DivisionProjectId,b.BreakdownName);
if (oldBreakdownProject == null)
{
Model.WBS_BreakdownProject bp = new Model.WBS_BreakdownProject();
bp.BreakdownProjectId = SQLHelper.GetNewID(typeof(Model.WBS_BreakdownProject));
bp.ProjectId = this.CurrUser.LoginProjectId;
bp.BreakdownCode = b.BreakdownCode;
bp.BreakdownName = b.BreakdownName;
bp.DivisionProjectId = newDivisionProject.DivisionProjectId;
bp.Basis = b.Basis;
bp.CheckPoints = b.CheckPoints;
bp.RecordAndCode = b.RecordAndCode;
bp.Class = b.Class;
bp.SortIndex = b.SortIndex;
bp.Remark = b.Remark;
bp.ModelURL = b.ModelURL;
bp.UnitWorkId = newDivisionProject.UnitWorkId;
bp.IsAcceptance = b.IsAcceptance;
bp.IsYellow = b.IsYellow;
bp.WuHuan = b.WuHuan;
bp.JianLi = b.JianLi;
bp.FenBao = b.FenBao;
bp.YeZhu = b.YeZhu;
bp.SourceBreakdownId = b.SourceBreakdownId;
BLL.BreakdownProjectService.AddBreakdownProject(bp);
}
}
}
ShowNotify("拷贝成功", MessageBoxIcon.Success);
}
}
#endregion

View File

@ -228,6 +228,15 @@ namespace FineUIPro.Web.CQMS.WBS {
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuCopy;
/// <summary>
/// btnMenuPaste 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuPaste;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>

View File

@ -265,7 +265,7 @@
<div class="tab" data-value="4">
<div class="t-item active">人员类型</div>
<div class="spline"></div>
<div class="t-item">专业</div>
<%--<div class="t-item">专业</div>--%>
</div>
</div>
<div class="bw-item-content">
@ -320,6 +320,28 @@
interval: 0,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
},
formatter: function (value) {
var ret = "";//拼接加\n返回的类目项
var maxLength = 2;//每项显示文字个数
var valLength = value.length;//X轴类目项的文字个数
var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
if (rowN > 1)//如果类目项的文字大于maxLength,
{
for (var i = 0; i < rowN; i++) {
var temp = "";//每次截取的字符串
var start = i * maxLength;//开始截取的位置
var end = start + maxLength;//结束截取的位置
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
//temp = value.substring(start, end) + "\n";
temp = value.substring(start, end) + (i == rowN - 1 ? "" : "\n");
ret += temp; //凭借最终的字符串
}
return ret;
}
else {
return value;
}
}
},
type: 'category',

View File

@ -32,7 +32,7 @@ namespace FineUIPro.Web.Door
List<string> listCategories = new List<string>();
Model.SingleSerie s1 = new Model.SingleSerie();
List<double> listdata1 = new List<double>();
DateTime startDate = Convert.ToDateTime(DateTime.Now.Date.Year + '-' + DateTime.Now.Date.Month + "-1");
DateTime startDate = Convert.ToDateTime(DateTime.Now.Date.Year.ToString() + '-' + DateTime.Now.Date.Month.ToString() + "-1");
DateTime endDate = startDate.AddMonths(1);
var totalList = (from x in Funs.DB.T_d_EmployInOutRecord
where x.ProjectId == this.CurrUser.LoginProjectId && x.RecordDate >= startDate && x.RecordDate < endDate

View File

@ -3380,3 +3380,81 @@ IP地址:::1
出错时间:10/22/2023 17:53:02
错误信息开始=====>
错误类型:HttpCompileException
错误信息:e:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\WBS\ProjectControlPoint.aspx(157): error CS1061: “ASP.cqms_wbs_projectcontrolpoint_aspx”不包含“btnMenuPaste_Click”的定义并且找不到可接受类型为“ASP.cqms_wbs_projectcontrolpoint_aspx”的第一个参数的扩展方法“btnMenuPaste_Click”(是否缺少 using 指令或程序集引用?)
错误堆栈:
在 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
在 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
在 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
在 System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
出错时间:10/25/2023 21:29:28
出错文件:http://localhost:8579/CQMS/WBS/ProjectControlPoint.aspx
IP地址:::1
出错时间:10/25/2023 21:29:28
错误信息开始=====>
错误类型:IndexOutOfRangeException
错误信息:索引超出了数组界限。
错误堆栈:
在 FineUIPro.Web.CQMS.WBS.ProjectControlPoint.trWBS_NodeExpand(Object sender, TreeNodeEventArgs e) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\WBS\ProjectControlPoint.aspx.cs:行号 0
在 FineUIPro.Tree.OnNodeExpand(TreeNodeEventArgs e)
在 (Tree , TreeNodeEventArgs )
在 FineUIPro.Tree.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:10/26/2023 14:57:53
出错文件:http://localhost:8579/CQMS/WBS/ProjectControlPoint.aspx
IP地址:::1
操作人员:JT
出错时间:10/26/2023 14:57:53
错误信息开始=====>
错误类型:IndexOutOfRangeException
错误信息:索引超出了数组界限。
错误堆栈:
在 FineUIPro.Web.CQMS.WBS.ProjectControlPoint.btnMenuPaste_Click(Object sender, EventArgs e) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\WBS\ProjectControlPoint.aspx.cs:行号 1522
在 FineUIPro.MenuButton.OnClick(EventArgs e)
在 (MenuButton , EventArgs )
在 FineUIPro.MenuButton.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:10/27/2023 16:57:15
出错文件:http://localhost:8579/CQMS/WBS/ProjectControlPoint.aspx
IP地址:::1
操作人员:JT
出错时间:10/27/2023 16:57:15
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 (TreeNode )
在 FineUIPro.TreeCommandEventArgs..ctor(TreeNode node, String commandName, String commandArgument)
在 (TreeNode , String , String )
在 FineUIPro.Tree.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:10/31/2023 09:48:02
出错文件:http://localhost:8579/CQMS/WBS/ProjectControlPoint.aspx
IP地址:::1
操作人员:JT
出错时间:10/31/2023 09:48:02

View File

@ -507,10 +507,12 @@
<Content Include="CQMS\ManageReport\WeekReportEdit.aspx" />
<Content Include="CQMS\ManageReport\WeekReportPrint.aspx" />
<Content Include="CQMS\Performance\MonthTargetEdit.aspx" />
<Content Include="CQMS\Performance\OutDayEdit.aspx" />
<Content Include="CQMS\Performance\Performance.aspx" />
<Content Include="CQMS\Performance\PerformanceAudit.aspx" />
<Content Include="CQMS\Performance\PerformanceConfig.aspx" />
<Content Include="CQMS\Performance\PerformanceEdit.aspx" />
<Content Include="CQMS\Performance\PerformanceSubmit.aspx" />
<Content Include="CQMS\Performance\ScoreEdit.aspx" />
<Content Include="CQMS\Performance\TaskContentEdit.aspx" />
<Content Include="CQMS\Performance\WorkPlanEdit.aspx" />
@ -1903,6 +1905,7 @@
<Content Include="ZHGL\OccupationHealth\PhysicalExamination.aspx" />
<Content Include="ZHGL\OccupationHealth\PhysicalExaminationEdit.aspx" />
<Content Include="ZHGL\OccupationHealth\PhysicalExaminationView.aspx" />
<Content Include="ZHGL\Performance\PerformanceAllData.aspx" />
<Content Include="ZHGL\Person\BranchPerson.aspx" />
<Content Include="ZHGL\Person\BranchPersonEdit.aspx" />
<Content Include="ZHGL\Person\BranchPersonIn.aspx" />
@ -7739,6 +7742,13 @@
<Compile Include="CQMS\Performance\MonthTargetEdit.aspx.designer.cs">
<DependentUpon>MonthTargetEdit.aspx</DependentUpon>
</Compile>
<Compile Include="CQMS\Performance\OutDayEdit.aspx.cs">
<DependentUpon>OutDayEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="CQMS\Performance\OutDayEdit.aspx.designer.cs">
<DependentUpon>OutDayEdit.aspx</DependentUpon>
</Compile>
<Compile Include="CQMS\Performance\Performance.aspx.cs">
<DependentUpon>Performance.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -7767,6 +7777,13 @@
<Compile Include="CQMS\Performance\PerformanceEdit.aspx.designer.cs">
<DependentUpon>PerformanceEdit.aspx</DependentUpon>
</Compile>
<Compile Include="CQMS\Performance\PerformanceSubmit.aspx.cs">
<DependentUpon>PerformanceSubmit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="CQMS\Performance\PerformanceSubmit.aspx.designer.cs">
<DependentUpon>PerformanceSubmit.aspx</DependentUpon>
</Compile>
<Compile Include="CQMS\Performance\ScoreEdit.aspx.cs">
<DependentUpon>ScoreEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -16779,6 +16796,13 @@
<Compile Include="ZHGL\OccupationHealth\PhysicalExaminationView.aspx.designer.cs">
<DependentUpon>PhysicalExaminationView.aspx</DependentUpon>
</Compile>
<Compile Include="ZHGL\Performance\PerformanceAllData.aspx.cs">
<DependentUpon>PerformanceAllData.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ZHGL\Performance\PerformanceAllData.aspx.designer.cs">
<DependentUpon>PerformanceAllData.aspx</DependentUpon>
</Compile>
<Compile Include="ZHGL\Person\BranchPerson.aspx.cs">
<DependentUpon>BranchPerson.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -17103,35 +17127,6 @@
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
<ItemGroup>
<COMReference Include="Microsoft.Office.Core">
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>4</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="Microsoft.Office.Interop.Excel">
<Guid>{00020813-0000-0000-C000-000000000046}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>6</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="VBIDE">
<Guid>{0002E157-0000-0000-C000-000000000046}</Guid>
<VersionMajor>5</VersionMajor>
<VersionMinor>3</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
<ProjectExtensions>

View File

@ -130,9 +130,9 @@ namespace FineUIPro.Web.HSSE.Manager
{
PersonSortId = SQLHelper.GetNewID(typeof(Model.Manager_PersonSortC)),
UnitId = u.UnitId,
SumPersonNum = BLL.PersonService.GetPersonCountByUnitId(u.UnitId, this.CurrUser.LoginProjectId, false),//本部
SumOutPersonNum = BLL.PersonService.GetPersonCountByUnitId(u.UnitId, this.CurrUser.LoginProjectId, true),//外聘
HSEPersonNum = BLL.PersonService.GetHSEPersonCountByUnitId(u.UnitId, this.CurrUser.LoginProjectId),
SumPersonNum = BLL.PersonService.GetPersonCountByUnitId(u.UnitId, this.CurrUser.LoginProjectId, Convert.ToDateTime(Request.Params["months"]), false),//本部
SumOutPersonNum = BLL.PersonService.GetPersonCountByUnitId(u.UnitId, this.CurrUser.LoginProjectId, Convert.ToDateTime(Request.Params["months"]), true),//外聘
HSEPersonNum = BLL.PersonService.GetHSEPersonCountByUnitId(u.UnitId, this.CurrUser.LoginProjectId, Convert.ToDateTime(Request.Params["months"])),
ContractRange = u.ContractRange
};
personSorts.Add(personSort);

View File

@ -130,9 +130,9 @@ namespace FineUIPro.Web.HSSE.Manager
{
PersonSortId = SQLHelper.GetNewID(typeof(Model.Manager_PersonSortC)),
UnitId = u.UnitId,
SumPersonNum = BLL.PersonService.GetPersonCountByUnitId(u.UnitId, this.CurrUser.LoginProjectId,false),//本部
SumOutPersonNum = BLL.PersonService.GetPersonCountByUnitId(u.UnitId, this.CurrUser.LoginProjectId, true),//外聘
HSEPersonNum = BLL.PersonService.GetHSEPersonCountByUnitId(u.UnitId, this.CurrUser.LoginProjectId)
SumPersonNum = BLL.PersonService.GetPersonCountByUnitId(u.UnitId, this.CurrUser.LoginProjectId, Convert.ToDateTime(Request.Params["months"]), false),//本部
SumOutPersonNum = BLL.PersonService.GetPersonCountByUnitId(u.UnitId, this.CurrUser.LoginProjectId, Convert.ToDateTime(Request.Params["months"]), true),//外聘
HSEPersonNum = BLL.PersonService.GetHSEPersonCountByUnitId(u.UnitId, this.CurrUser.LoginProjectId, Convert.ToDateTime(Request.Params["months"]))
};
personSorts.Add(personSort);
totalSumPersonNum += Convert.ToInt32(personSort.SumPersonNum);

View File

@ -0,0 +1,134 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PerformanceAllData.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Performance.PerformanceAllData" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>施工管理绩效数据</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" AutoScroll="true"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="表格" EnableCollapse="false"
runat="server" BoxFlex="1" DataKeyNames="SortId" AllowCellEditing="true"
ClicksToEdit="2" DataIDField="SortId"
EnableColumnLines="true"
IsFluid="true"
EnableSummary="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DatePicker runat="server" DateFormatString="yyyy" EmptyText="请选择年份"
ID="drpCompileDateMonth" DisplayType="Month" ShowTodayButton="false" >
</f:DatePicker>
<f:DropDownList ID="drpUser" runat="server" EnableEdit="false"
ForceSelection="false"
AutoPostBack="true" OnSelectedIndexChanged="drpUser_SelectedIndexChanged">
</f:DropDownList>
<f:Button ID="btnSearch" runat="server" Icon="SystemSearch" ToolTip="查询" OnClick="btnBindGrid">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false" >
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:BoundField HeaderText="时间" ColumnID="CreateDateMonth" DataField="CreateDateMonth" HeaderTextAlign="Center" TextAlign="Center" Width="100px"
>
</f:BoundField>
<f:BoundField HeaderText="项目名称" ColumnID="ProjectName" DataField="ProjectName" HeaderTextAlign="Center" TextAlign="Center" Width="100px"
>
</f:BoundField>
<f:BoundField HeaderText="工程范围" ColumnID="WorkRange" DataField="WorkRange" HeaderTextAlign="Center" TextAlign="Center" Width="100px"
>
</f:BoundField>
<f:BoundField HeaderText="责任人" ColumnID="HeadUserid" DataField="HeadUserid" HeaderTextAlign="Center" TextAlign="Center" Width="100px"
>
</f:BoundField>
<f:BoundField HeaderText="工作负荷60%)(专业完成产值)" ColumnID="Workloads" DataField="Workloads"
HeaderTextAlign="Center" TextAlign="Center" Width="200px" >
</f:BoundField>
<f:BoundField HeaderText="出差天数" ColumnID="OutDay" DataField="OutDay"
HeaderTextAlign="Center" TextAlign="Center" Width="100px" >
</f:BoundField>
<f:BoundField HeaderText="工作效果得分40%" ColumnID="SumZdf" DataField="SumZdf"
HeaderTextAlign="Center" TextAlign="Center" Width="200px" >
</f:BoundField>
<f:GroupField HeaderText="工作效果40%" TextAlign="Center">
<Columns>
<f:BoundField Width="100px" DataField="EvaScore1" HeaderText="计划管理权重40%" />
<f:BoundField Width="100px" DataField="EvaScore2" HeaderText="HSE管理个人安全行动计划完成情况权重15%" />
<f:BoundField Width="100px" DataField="EvaScore3" HeaderText="质量管理质量检查计划及实施权重20%" />
<f:BoundField Width="100px" DataField="EvaScore4" HeaderText="图纸、材料状态跟踪;统计台账权重5%" />
<f:BoundField Width="100px" DataField="EvaScore5" HeaderText="关键事项跟踪权重5%" />
<f:BoundField Width="100px" DataField="EvaScore6" HeaderText="可交付成果工程签证、费用审核方案审编、计划编制技术总结等权重15%" />
</Columns>
</f:GroupField>
</Columns>
</f:Grid>
</Items>
</f:Panel>
<f:Menu ID="Menu1" runat="server">
</f:Menu>
</form>
<script type="text/javascript">
<%-- var menuID = '<%= Menu1.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}--%>
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
$(function () {
})
var Form1ClientID = '<%= Grid1.ClientID %>';
function refresh() {
var form1 = F(Form1ClientID);
form1.showLoading();
}
function CloseRefresh() {
var form1 = F(Form1ClientID);
form1.hideLoading();
}
</script>
</body>
</html>

View File

@ -0,0 +1,634 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Web.UI.WebControls;
using BLL;
using Model;
using Newtonsoft.Json.Linq;
using AspNet = System.Web.UI.WebControls;
namespace FineUIPro.Web.ZHGL.Performance
{
public partial class PerformanceAllData : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
public string PerformanceGid
{
get
{
return (string)ViewState["PerformanceGid"];
}
set
{
ViewState["PerformanceGid"] = value;
}
}
public string CompileDateMonth
{
get
{
return (string)ViewState["CompileDateMonth"];
}
set
{
ViewState["CompileDateMonth"] = value;
}
}
public string CreateUser
{
get
{
return (string)ViewState["CreateUser"];
}
set
{
ViewState["CreateUser"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//根据projectid加载CQMS_Performance表中成功的user数据
BLL.PerformanceService.InitAllUserDropDownList(drpUser, true);
CreateUser = Request.QueryString["CreateUser"];
if (!string.IsNullOrEmpty(CreateUser))
{
drpUser.SelectedValue = CreateUser;
}
drpCompileDateMonth.Text = DateTime.Now.ToString();
if (drpUser.SelectedValue != BLL.Const._Null)
{
// BindGrid();
//OutputSummaryData();
}
}
}
#region
public class Grid1Model
{
public int SortId { get; set; }
/// <summary>
/// 时间
/// </summary>
public string CreateDateMonth { get; set; }
/// <summary>
/// 项目名称
/// </summary>
public string ProjectName { get; set; }
/// <summary>
/// 工程范围
/// </summary>
public string WorkRange { get; set; }
/// <summary>
/// 责任人
/// </summary>
public string HeadUserid { get; set; }
/// <summary>
/// 工作负荷
/// </summary>
public decimal? Workloads { get; set; }
/// <summary>
/// 出差天数
/// </summary>
public int? OutDay { get; set; }
public decimal? EvaScore1 { get; set; }
public decimal? EvaScore2 { get; set; }
public decimal? EvaScore3 { get; set; }
public decimal? EvaScore4 { get; set; }
public decimal? EvaScore5 { get; set; }
public decimal? EvaScore6 { get; set; }
/// <summary>
/// 总得分
/// </summary>
public decimal? SumZdf { get; set; }
}
/// <summary>
/// 加载数据
/// </summary>
private void BindGrid()
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
//根据年份和查询的人来加载
//去年12月到今年11月
var StartDate = Convert.ToDateTime((Convert.ToInt32(drpCompileDateMonth.Text) - 1).ToString() + "-12");
var EndDate = Convert.ToDateTime(drpCompileDateMonth.Text + "-11");
List<Grid1Model> listGrid1 = new List<Grid1Model>();
var Plist = db.CQMS_Performance.Where(x => x.CreateDate >= StartDate && x.CreateDate <= EndDate && x.CreateMan == drpUser.SelectedValue
&& x.States == "1")
.OrderBy(x => x.CreateDate).ToList();
var i = 1;
foreach (var item in Plist)
{
Grid1Model gmodel = new Grid1Model();
gmodel.CreateDateMonth = item.CreateDateMonth;
gmodel.ProjectName = ProjectService.GetProjectNameByProjectId(item.ProjectId);
gmodel.WorkRange = item.WorkRange;
gmodel.HeadUserid = item.HeadUserid;
gmodel.Workloads = item.Workloads;
gmodel.OutDay = item.OutDay;
//加载6个得分
var Child1List = db.CQMS_Performance_Child1.Where(x => x.PerformanceGid == item.PerformanceGid).OrderBy(x => x.SortIndex).ToList();
gmodel.EvaScore1 = Child1List[0].EvaScore;
gmodel.EvaScore2 = Child1List[1].EvaScore;
gmodel.EvaScore3 = Child1List[2].EvaScore;
gmodel.EvaScore4 = Child1List[3].EvaScore;
gmodel.EvaScore5 = Child1List[4].EvaScore;
gmodel.EvaScore6 = Child1List[5].EvaScore;
gmodel.SumZdf = gmodel.EvaScore1 + gmodel.EvaScore2 + gmodel.EvaScore3 + gmodel.EvaScore4 + gmodel.EvaScore5 + gmodel.EvaScore6;
gmodel.SortId = i;
i += 1;
listGrid1.Add(gmodel);
}
if (listGrid1.Count > 0)
{
var table = ToDataTable<Grid1Model>(listGrid1);
Grid1.DataSource = table;
Grid1.DataBind();
OutputSummaryData();
}
else
{
ShowNotify("未查询到数据。", MessageBoxIcon.Warning);
}
}
}
#endregion
#region
private void OutputSummaryData()
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
//根据年份和查询的人来加载
//去年12月到今年11月
var StartDate = Convert.ToDateTime((Convert.ToInt32(drpCompileDateMonth.Text) - 1).ToString() + "-12");
var EndDate = Convert.ToDateTime(drpCompileDateMonth.Text + "-11");
List<Grid1Model> listGrid1 = new List<Grid1Model>();
var Plist = db.CQMS_Performance.Where(x => x.CreateDate >= StartDate && x.CreateDate <= EndDate && x.CreateMan == drpUser.SelectedValue
&& x.States == "1")
.OrderBy(x => x.CreateDate).ToList();
var i = 1;
foreach (var item in Plist)
{
Grid1Model gmodel = new Grid1Model();
gmodel.CreateDateMonth = item.CreateDateMonth;
gmodel.ProjectName = ProjectService.GetProjectNameByProjectId(item.ProjectId);
gmodel.WorkRange = item.WorkRange;
gmodel.HeadUserid = item.HeadUserid;
gmodel.Workloads = item.Workloads;
gmodel.OutDay = item.OutDay;
//加载6个得分
var Child1List = db.CQMS_Performance_Child1.Where(x => x.PerformanceGid == item.PerformanceGid).OrderBy(x => x.SortIndex).ToList();
gmodel.EvaScore1 = Child1List[0].EvaScore;
gmodel.EvaScore2 = Child1List[1].EvaScore;
gmodel.EvaScore3 = Child1List[2].EvaScore;
gmodel.EvaScore4 = Child1List[3].EvaScore;
gmodel.EvaScore5 = Child1List[4].EvaScore;
gmodel.EvaScore6 = Child1List[5].EvaScore;
gmodel.SumZdf = gmodel.EvaScore1 + gmodel.EvaScore2 + gmodel.EvaScore3 + gmodel.EvaScore4 + gmodel.EvaScore5 + gmodel.EvaScore6;
gmodel.SortId = i;
i += 1;
listGrid1.Add(gmodel);
}
var table = ToDataTable<Grid1Model>(listGrid1);
double Workloads = 0.0f;
int OutDay = 0;
double SumZdf = 0.0f;
foreach (DataRow row in table.Rows)
{
var rowWorkloads = row["Workloads"].ToString();
if (rowWorkloads == "")
{
rowWorkloads = "0";
}
var rowSumZdf = row["SumZdf"].ToString();
if (rowSumZdf == "")
{
rowSumZdf = "0";
}
var rowOutDay = row["OutDay"].ToString();
if (rowOutDay == "")
{
rowOutDay = "0";
}
Workloads += Convert.ToDouble(rowWorkloads);
OutDay += Convert.ToInt32(rowOutDay);
SumZdf += Convert.ToDouble(rowSumZdf);
}
JObject summary = new JObject();
summary.Add("CreateDateMonth", "总计");
summary.Add("Workloads", Workloads.ToString("F2"));
summary.Add("OutDay", OutDay.ToString());
summary.Add("SumZdf", SumZdf.ToString("F2"));
Grid1.SummaryData = summary;
}
}
#endregion
#region list转换datatable
/// <summary>
/// Convert a List{T} to a DataTable.
/// </summary>
private DataTable ToDataTable<T>(List<T> items)
{
var tb = new DataTable(typeof(T).Name);
PropertyInfo[] props = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance);
foreach (PropertyInfo prop in props)
{
Type t = GetCoreType(prop.PropertyType);
tb.Columns.Add(prop.Name, t);
}
foreach (T item in items)
{
var values = new object[props.Length];
for (int i = 0; i < props.Length; i++)
{
values[i] = props[i].GetValue(item, null);
}
tb.Rows.Add(values);
}
return tb;
}
/// <summary>
/// Determine of specified type is nullable
/// </summary>
public static bool IsNullable(Type t)
{
return !t.IsValueType || (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Nullable<>));
}
/// <summary>
/// Return underlying type if type is Nullable otherwise return the type
/// </summary>
public static Type GetCoreType(Type t)
{
if (t != null && IsNullable(t))
{
if (!t.IsValueType)
{
return t;
}
else
{
return Nullable.GetUnderlyingType(t);
}
}
else
{
return t;
}
}
#endregion
protected void drpUser_SelectedIndexChanged(object sender, EventArgs e)
{
//if (drpUser.SelectedValue == BLL.Const._Null)
//{
// ShowNotify("请选择要打分的施工工程师。", MessageBoxIcon.Warning);
// return;
//}
//if (string.IsNullOrEmpty(drpCompileDateMonth.Text))
//{
// ShowNotify("请选择年份。", MessageBoxIcon.Warning);
// return;
//}
//BindGrid();
}
#region excel
#region excel
/// <summary>
/// 格式化html
/// </summary>
/// <param name="grid"></param>
/// <returns></returns>
private string GetGridTableHtml(Grid grid)
{
StringBuilder sb = new StringBuilder();
MultiHeaderTable mht = new MultiHeaderTable();
mht.ResolveMultiHeaderTable(Grid1.Columns);
sb.Append("<meta http-equiv=\"Content-Type\" content=\"application/vnd.ms-excel;charset=utf-8\"/>");
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
////列数
//var rowCount = "";
//var list = Funs.DB.Base_Project.Where(x => x.ProjectState == Const.ProjectState_1 || x.ProjectState == null).OrderBy(x => x.ProjectCode).ToList();
//for (int i = 0; i < list.Count; i++)
//{
// rowCount+="{}"
//}
foreach (List<object[]> rows in mht.MultiTable)
{
sb.Append("<tr>");
foreach (object[] cell in rows)
{
int rowspan = Convert.ToInt32(cell[0]);
int colspan = Convert.ToInt32(cell[1]);
GridColumn column = cell[2] as GridColumn;
sb.AppendFormat("<th{0}{1}{2}>{3}</th>",
rowspan != 1 ? " rowspan=\"" + rowspan + "\"" : "",
colspan != 1 ? " colspan=\"" + colspan + "\"" : "",
colspan != 1 ? " style=\"text-align:center;\"" : "",
column.HeaderText);
}
sb.Append("</tr>");
}
int i = 0;
foreach (GridRow row in grid.Rows)
{
sb.Append("<tr>");
string MenuC = "";
int y = 1;
foreach (GridColumn column in mht.Columns)
{
string html = row.Values[column.ColumnIndex].ToString();
sb.AppendFormat("<td>{0}</td>", html);
#endregion
y += 1;
}
i += 1;
sb.Append("</tr>");
}
sb.Append("</table>");
return sb.ToString();
}
public static string MidStrEx(string sourse, string startstr, string endstr)
{
string result = string.Empty;
int startindex, endindex;
try
{
startindex = sourse.IndexOf(startstr);
if (startindex == -1)
return result;
string tmpstr = sourse.Substring(startindex + startstr.Length);
endindex = tmpstr.IndexOf(endstr);
if (endindex == -1)
return result;
result = tmpstr.Remove(endindex);
}
catch (Exception ex)
{
}
return result;
}
#region
/// <summary>
/// 处理多表头的类
/// </summary>
public class MultiHeaderTable
{
// 包含 rowspancolspan 的多表头,方便生成 HTML 的 table 标签
public List<List<object[]>> MultiTable = new List<List<object[]>>();
// 最终渲染的列数组
public List<GridColumn> Columns = new List<GridColumn>();
public void ResolveMultiHeaderTable(GridColumnCollection columns)
{
List<object[]> row = new List<object[]>();
foreach (GridColumn column in columns)
{
object[] cell = new object[4];
cell[0] = 1; // rowspan
cell[1] = 1; // colspan
cell[2] = column;
cell[3] = null;
row.Add(cell);
}
ResolveMultiTable(row, 0);
ResolveColumns(row);
}
private void ResolveColumns(List<object[]> row)
{
foreach (object[] cell in row)
{
GroupField groupField = cell[2] as GroupField;
if (groupField != null && groupField.Columns.Count > 0)
{
List<object[]> subrow = new List<object[]>();
foreach (GridColumn column in groupField.Columns)
{
subrow.Add(new object[]
{
1,
1,
column,
groupField
});
}
ResolveColumns(subrow);
}
else
{
Columns.Add(cell[2] as GridColumn);
}
}
}
private void ResolveMultiTable(List<object[]> row, int level)
{
List<object[]> nextrow = new List<object[]>();
foreach (object[] cell in row)
{
GroupField groupField = cell[2] as GroupField;
if (groupField != null && groupField.Columns.Count > 0)
{
// 如果当前列包含子列,则更改当前列的 colspan以及增加父列向上递归的colspan
cell[1] = Convert.ToInt32(groupField.Columns.Count);
PlusColspan(level - 1, cell[3] as GridColumn, groupField.Columns.Count - 1);
foreach (GridColumn column in groupField.Columns)
{
nextrow.Add(new object[]
{
1,
1,
column,
groupField
});
}
}
}
MultiTable.Add(row);
// 如果当前下一行,则增加上一行(向上递归)中没有子列的列的 rowspan
if (nextrow.Count > 0)
{
PlusRowspan(level);
ResolveMultiTable(nextrow, level + 1);
}
}
private void PlusRowspan(int level)
{
if (level < 0)
{
return;
}
foreach (object[] cells in MultiTable[level])
{
GroupField groupField = cells[2] as GroupField;
if (groupField != null && groupField.Columns.Count > 0)
{
// ...
}
else
{
cells[0] = Convert.ToInt32(cells[0]) + 1;
}
}
PlusRowspan(level - 1);
}
private void PlusColspan(int level, GridColumn parent, int plusCount)
{
if (level < 0)
{
return;
}
foreach (object[] cells in MultiTable[level])
{
GridColumn column = cells[2] as GridColumn;
if (column == parent)
{
cells[1] = Convert.ToInt32(cells[1]) + plusCount;
PlusColspan(level - 1, cells[3] as GridColumn, plusCount);
}
}
}
}
#endregion
/// <summary>
/// 导出exccel
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
{
Response.ClearContent();
var excelDate = drpCompileDateMonth.Text + "年";
var uName = drpUser.SelectedText;
var FileName = excelDate + "施工工程师(" + uName + ")施工管理绩效数据收集";
Response.AddHeader("content-disposition", "attachment; filename=" + FileName + ".xls");
Response.ContentType = "application/vnd.ms-excel";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.Write(GetGridTableHtml(Grid1));
Response.End();
}
#endregion
/// <summary>
/// 查询绑定数据
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnBindGrid(object sender, EventArgs e)
{
if (drpUser.SelectedValue == BLL.Const._Null)
{
ShowNotify("请选择要打分的施工工程师。", MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(drpCompileDateMonth.Text))
{
ShowNotify("请选择年份。", MessageBoxIcon.Warning);
return;
}
BindGrid();
}
}
}

View File

@ -0,0 +1,107 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.ZHGL.Performance
{
public partial class PerformanceAllData
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// drpCompileDateMonth 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker drpCompileDateMonth;
/// <summary>
/// drpUser 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUser;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnOut 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
}
}

View File

@ -295,9 +295,9 @@
var one1 =<%=One1 %>
var one2 =<%=One2 %>
var one3 =<%=One3 %>
category_One('one1', "质量验收一次合格率", one1, one1+"%")
category_One('one2', "施工资料同步率", one2, one2+"%")
category_One('one3', "质量问题整改完成率", one3, one3+"%")
category_One('one1', "质量验收一次合格率", one1, one1 + "%")
category_One('one2', "施工资料同步率", one2, one2 + "%")
category_One('one3', "质量问题整改完成率", one3, one3 + "%")
</script>
<script type="text/javascript">
function category_six(id, title, xArr, data) {
@ -506,7 +506,7 @@
</script>
<script type="text/javascript">
function category_Two(id, xArr, data,num) {
function category_Two(id, xArr, data, num) {
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById(id))
// 指定图表的配置项和数据
@ -545,8 +545,7 @@
color: 'rgba(255, 255, 255, 0.8)'
},
interval: 0,
formatter:function(value)
{
formatter: function (value) {
var ret = "";//拼接加\n返回的类目项
var maxLength = num;//每项显示文字个数
var valLength = value.length;//X轴类目项的文字个数
@ -559,7 +558,7 @@
var end = start + maxLength;//结束截取的位置
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
//temp = value.substring(start, end) + "\n";
temp = value.substring(start, end) + (i == rowN -1 ? "" : "\n");
temp = value.substring(start, end) + (i == rowN - 1 ? "" : "\n");
ret += temp; //凭借最终的字符串
}
return ret;
@ -632,7 +631,7 @@
itemStyle: { normal: { color: 'rgba(206,143,135,1)' } }
}
]
category_Two('two', xArr, data,two2.xFontNum)
category_Two('two', xArr, data, two2.xFontNum)
</script>
<script type="text/javascript">
function category_Three(id, xArr, series) {
@ -724,7 +723,7 @@
var series = [{
name: '质量验收一次合格率',
type: 'bar',
barGap:0,
barGap: 0,
data: three.series[0].data,
itemStyle: { normal: { color: 'rgba(43,155,176,1)' } }
},
@ -732,7 +731,7 @@
name: '施工资料同步率',
type: 'bar',
data: three.series[1].data,
barCategoryGap:10,
barCategoryGap: 10,
itemStyle: { normal: { color: 'rgba(140,202,214, 1)' } }
}]
category_Three('three', xArr, series)
@ -777,8 +776,7 @@
color: 'rgba(255, 255, 255, 0.8)'
},
interval: 0,
formatter:function(value)
{
formatter: function (value) {
var ret = "";//拼接加\n返回的类目项
var maxLength = 5;//每项显示文字个数
var valLength = value.length;//X轴类目项的文字个数
@ -791,7 +789,7 @@
var end = start + maxLength;//结束截取的位置
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
//temp = value.substring(start, end) + "\n";
temp = value.substring(start, end) + (i == rowN -1 ? "" : "\n");
temp = value.substring(start, end) + (i == rowN - 1 ? "" : "\n");
ret += temp; //凭借最终的字符串
}
return ret;
@ -848,8 +846,8 @@
var series = [{
name: '质量验收一次合格率',
type: 'bar',
barWidth:30,
barGap:0,
barWidth: 30,
barGap: 0,
data: four.series[0].data,
itemStyle: { normal: { color: 'rgba(43,155,176,1)' } }
},
@ -857,7 +855,7 @@
name: '施工资料同步率',
type: 'bar',
data: four.series[1].data,
barWidth:30,
barWidth: 30,
//barCategoryGap:20,
itemStyle: { normal: { color: 'rgba(140,202,214, 1)' } }
}];
@ -975,7 +973,7 @@
];
num = two3.xFontNum;
}
category_Two('two', xArr, data,num)
category_Two('two', xArr, data, num)
}
else if (value == 3) {
//var xArr = ["分包1", "分包2", "分包3", "分包4", "分包5", "分包6"]

View File

@ -110966,6 +110966,14 @@ namespace Model
private string _States;
private System.Nullable<int> _OutDay;
private System.Nullable<decimal> _Workloads;
private string _WorkRange;
private string _ScorMan;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -110992,6 +111000,14 @@ namespace Model
partial void OnCreateDateMonthChanged();
partial void OnStatesChanging(string value);
partial void OnStatesChanged();
partial void OnOutDayChanging(System.Nullable<int> value);
partial void OnOutDayChanged();
partial void OnWorkloadsChanging(System.Nullable<decimal> value);
partial void OnWorkloadsChanged();
partial void OnWorkRangeChanging(string value);
partial void OnWorkRangeChanged();
partial void OnScorManChanging(string value);
partial void OnScorManChanged();
#endregion
public CQMS_Performance()
@ -111219,6 +111235,86 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OutDay", DbType="Int")]
public System.Nullable<int> OutDay
{
get
{
return this._OutDay;
}
set
{
if ((this._OutDay != value))
{
this.OnOutDayChanging(value);
this.SendPropertyChanging();
this._OutDay = value;
this.SendPropertyChanged("OutDay");
this.OnOutDayChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Workloads", DbType="Decimal(18,2)")]
public System.Nullable<decimal> Workloads
{
get
{
return this._Workloads;
}
set
{
if ((this._Workloads != value))
{
this.OnWorkloadsChanging(value);
this.SendPropertyChanging();
this._Workloads = value;
this.SendPropertyChanged("Workloads");
this.OnWorkloadsChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkRange", DbType="NVarChar(200)")]
public string WorkRange
{
get
{
return this._WorkRange;
}
set
{
if ((this._WorkRange != value))
{
this.OnWorkRangeChanging(value);
this.SendPropertyChanging();
this._WorkRange = value;
this.SendPropertyChanged("WorkRange");
this.OnWorkRangeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ScorMan", DbType="NVarChar(50)")]
public string ScorMan
{
get
{
return this._ScorMan;
}
set
{
if ((this._ScorMan != value))
{
this.OnScorManChanging(value);
this.SendPropertyChanging();
this._ScorMan = value;
this.SendPropertyChanged("ScorMan");
this.OnScorManChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;