质量更新:

1、企业及分支机构检查
2、机具设备  批量退场
3、质量会议互通到总包
4、机具设备互通到总包
This commit is contained in:
夏菊 2026-03-20 17:05:24 +08:00
parent 2d1a5a2314
commit 327b94c42b
51 changed files with 2855 additions and 832 deletions

View File

@ -0,0 +1,96 @@
--
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Comprehensive_InspectionMachine' AND COLUMN_NAME = 'SourceDes')
BEGIN
ALTER TABLE Comprehensive_InspectionMachine ADD SourceDes nvarchar(500);
END
GO
--
IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '30754DF1-CB18-4F53-BB66-2B2A398D7180')
BEGIN
INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
VALUES (N'30754DF1-CB18-4F53-BB66-2B2A398D7180', N'质量会议', N'CQMS/ProcessControl/Meeting.aspx', 50, N'149f1f1c-a925-412b-970e-e9b79d54e03f', N'Menu_CQMS', 0,1, 1);
END
GO
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '30754DF1-CB18-4F53-BB66-2B2A398D7180' )
BEGIN
INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex)
VALUES (N'A2989CA7-6BD9-41D2-B7EF-421C36C172A8', N'30754DF1-CB18-4F53-BB66-2B2A398D7180', N'修改', 2);
INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex)
VALUES (N'A9C950E3-2522-44F1-8527-4E53D9F8960F', N'30754DF1-CB18-4F53-BB66-2B2A398D7180', N'删除', 3);
INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex)
VALUES (N'0F77E01A-7BF0-4321-9DAD-D461E8FF70AB', N'30754DF1-CB18-4F53-BB66-2B2A398D7180', N'保存', 4);
INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex)
VALUES (N'159D2EF3-502D-49CF-BD8A-A754BC178E36', N'30754DF1-CB18-4F53-BB66-2B2A398D7180', N'增加', 1);
END
GO
--
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'CQMS_Meeting') AND type = N'U')
BEGIN
CREATE TABLE [dbo].[CQMS_Meeting](
[MeetingId] [nvarchar](50) NOT NULL,
[ProjectId] [nvarchar](50) NULL,
[MeetingCode] [nvarchar](50) NULL,
[MeetingName] [nvarchar](50) NULL,
[MeetingDate] [datetime] NULL,
[CompileMan] [nvarchar](50) NULL,
[MeetingContents] [nvarchar](max) NULL,
[CompileDate] [datetime] NULL,
[States] [char](1) NULL,
[AttentPersonNum] [int] NULL,
[MeetingHours] [decimal](9, 1) NULL,
[MeetingHostMan] [nvarchar](50) NULL,
[AttentPerson] [nvarchar](300) NULL,
[MeetingPlace] [nvarchar](200) NULL,
[UnitId] [nvarchar](50) NULL,
[MeetingHostManId] [nvarchar](50) NULL,
[AttentPersonIds] [nvarchar](4000) NULL,
[MeetingHostManOther] [nvarchar](500) NULL,
[SourceDes] [nvarchar](500) NULL,
CONSTRAINT [PK_CQMS_Meeting] PRIMARY KEY CLUSTERED
(
[MeetingId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
ALTER TABLE [dbo].[CQMS_Meeting] WITH CHECK ADD CONSTRAINT [FK_CQMS_Meeting_Base_Project] FOREIGN KEY([ProjectId])
REFERENCES [dbo].[Base_Project] ([ProjectId])
ALTER TABLE [dbo].[CQMS_Meeting] CHECK CONSTRAINT [FK_CQMS_Meeting_Base_Project]
ALTER TABLE [dbo].[CQMS_Meeting] WITH CHECK ADD CONSTRAINT [FK_CQMS_Meeting_Base_Unit] FOREIGN KEY([UnitId])
REFERENCES [dbo].[Base_Unit] ([UnitId])
ALTER TABLE [dbo].[CQMS_Meeting] CHECK CONSTRAINT [FK_CQMS_Meeting_Base_Unit]
ALTER TABLE [dbo].[CQMS_Meeting] WITH CHECK ADD CONSTRAINT [FK_CQMS_Meeting_Sys_User] FOREIGN KEY([CompileMan])
REFERENCES [dbo].[Sys_User] ([UserId])
ALTER TABLE [dbo].[CQMS_Meeting] CHECK CONSTRAINT [FK_CQMS_Meeting_Sys_User]
ALTER TABLE [dbo].[CQMS_Meeting] WITH CHECK ADD CONSTRAINT [FK_CQMS_Meeting_Sys_User1] FOREIGN KEY([MeetingHostManId])
REFERENCES [dbo].[Sys_User] ([UserId])
ALTER TABLE [dbo].[CQMS_Meeting] CHECK CONSTRAINT [FK_CQMS_Meeting_Sys_User1]
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_Meeting', @level2type=N'COLUMN',@level2name=N'MeetingId'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_Meeting', @level2type=N'COLUMN',@level2name=N'ProjectId'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会议编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_Meeting', @level2type=N'COLUMN',@level2name=N'MeetingCode'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会议名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_Meeting', @level2type=N'COLUMN',@level2name=N'MeetingName'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会议时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_Meeting', @level2type=N'COLUMN',@level2name=N'MeetingDate'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'整理人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_Meeting', @level2type=N'COLUMN',@level2name=N'CompileMan'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会议内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_Meeting', @level2type=N'COLUMN',@level2name=N'MeetingContents'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_Meeting', @level2type=N'COLUMN',@level2name=N'CompileDate'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_Meeting', @level2type=N'COLUMN',@level2name=N'States'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单位ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_Meeting', @level2type=N'COLUMN',@level2name=N'UnitId'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主持人ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_Meeting', @level2type=N'COLUMN',@level2name=N'MeetingHostManId'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'参会人IDs' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_Meeting', @level2type=N'COLUMN',@level2name=N'AttentPersonIds'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'质量会议' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_Meeting'
END
GO
--
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'CQMS_Meeting' AND COLUMN_NAME = 'SourceDes')
BEGIN
ALTER TABLE CQMS_Meeting ADD SourceDes nvarchar(500);
END
GO

View File

@ -287,6 +287,7 @@
<Compile Include="CQMS\ProcessControl\HotProessManageService.cs" /> <Compile Include="CQMS\ProcessControl\HotProessManageService.cs" />
<Compile Include="CQMS\ProcessControl\InspectionManagementDetailService.cs" /> <Compile Include="CQMS\ProcessControl\InspectionManagementDetailService.cs" />
<Compile Include="CQMS\ProcessControl\InspectionManagementService.cs" /> <Compile Include="CQMS\ProcessControl\InspectionManagementService.cs" />
<Compile Include="CQMS\ProcessControl\MeetingService.cs" />
<Compile Include="CQMS\ProcessControl\NondestructiveTestNewService.cs" /> <Compile Include="CQMS\ProcessControl\NondestructiveTestNewService.cs" />
<Compile Include="CQMS\ProcessControl\NondestructiveTestService.cs" /> <Compile Include="CQMS\ProcessControl\NondestructiveTestService.cs" />
<Compile Include="CQMS\ProcessControl\TestPackageManagementService.cs" /> <Compile Include="CQMS\ProcessControl\TestPackageManagementService.cs" />
@ -820,7 +821,7 @@
<Compile Include="TestRun\FeedingTestRunService.cs" /> <Compile Include="TestRun\FeedingTestRunService.cs" />
<Compile Include="TestRun\Meeting\MeetingItemService.cs" /> <Compile Include="TestRun\Meeting\MeetingItemService.cs" />
<Compile Include="TestRun\Meeting\MeetingMinutesService.cs" /> <Compile Include="TestRun\Meeting\MeetingMinutesService.cs" />
<Compile Include="TestRun\Meeting\MeetingService.cs" /> <Compile Include="TestRun\Meeting\DriverMeetingService.cs" />
<Compile Include="TestRun\PersonTrain\DriverPrepareTrainPlanService.cs" /> <Compile Include="TestRun\PersonTrain\DriverPrepareTrainPlanService.cs" />
<Compile Include="TestRun\PersonTrain\PersonTrainPlanService.cs" /> <Compile Include="TestRun\PersonTrain\PersonTrainPlanService.cs" />
<Compile Include="TestRun\PersonTrain\TrainContactService.cs" /> <Compile Include="TestRun\PersonTrain\TrainContactService.cs" />

View File

@ -0,0 +1,152 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
/// <summary>
/// 质量会议
/// </summary>
public class MeetingService
{
/// <summary>
/// 根据主键获取质量会议
/// </summary>
/// <param name="weekMeetingId"></param>
/// <returns></returns>
public static Model.CQMS_Meeting GetMeetingById(string meetingId)
{
return Funs.DB.CQMS_Meeting.FirstOrDefault(e => e.MeetingId == meetingId);
}
/// <summary>
/// 根据时间段获取质量会议集合
/// </summary>
/// <param name="startTime"></param>
/// <param name="endTime"></param>
/// <param name="projectId"></param>
/// <returns></returns>
public static int GetCountByTime(DateTime startTime, DateTime endTime, string projectId)
{
return (from x in Funs.DB.CQMS_Meeting where x.MeetingDate >= startTime && x.MeetingDate < endTime && x.ProjectId == projectId && x.States == BLL.Const.State_2 select x).Count();
}
/// <summary>
/// 根据时间段获取质量会议参会人数
/// </summary>
/// <param name="startTime"></param>
/// <param name="endTime"></param>
/// <param name="projectId"></param>
/// <returns></returns>
public static int? GetSumAttentPersonNumByMeetingDate(DateTime startTime, DateTime endTime, string projectId)
{
int? sumAttentPersonNum = (from x in Funs.DB.CQMS_Meeting where x.MeetingDate >= startTime && x.MeetingDate < endTime && x.ProjectId == projectId && x.States == BLL.Const.State_2 select x.AttentPersonNum).Sum();
if (sumAttentPersonNum == null)
{
return 0;
}
return sumAttentPersonNum;
}
/// <summary>
/// 根据日期和类型获取会议记录集合
/// </summary>
/// <param name="startTime">开始时间</param>
/// <param name="endTime">结束时间</param>
/// <param name="projectId">项目号</param>
/// <returns>会议记录集合</returns>
public static List<Model.CQMS_Meeting> GetMeetingListsByDate(DateTime startTime, DateTime endTime, string projectId)
{
return (from x in Funs.DB.CQMS_Meeting where x.MeetingDate >= startTime && x.MeetingDate <= endTime && x.ProjectId == projectId orderby x.MeetingDate select x).ToList();
}
/// <summary>
/// 添加质量会议
/// </summary>
/// <param name="meeting"></param>
public static void AddMeeting(Model.CQMS_Meeting meeting)
{
Model.SGGLDB db = Funs.DB;
Model.CQMS_Meeting newMeeting = new Model.CQMS_Meeting
{
MeetingId = meeting.MeetingId,
ProjectId = meeting.ProjectId,
UnitId = meeting.UnitId,
MeetingCode = meeting.MeetingCode,
MeetingName = meeting.MeetingName,
MeetingDate = meeting.MeetingDate,
CompileMan = meeting.CompileMan,
MeetingContents = meeting.MeetingContents,
CompileDate = meeting.CompileDate,
States = meeting.States,
AttentPersonNum = meeting.AttentPersonNum,
MeetingHours = meeting.MeetingHours,
MeetingHostMan = meeting.MeetingHostMan,
AttentPerson = meeting.AttentPerson,
MeetingPlace = meeting.MeetingPlace,
MeetingHostManId = meeting.MeetingHostManId,
AttentPersonIds = meeting.AttentPersonIds,
MeetingHostManOther = meeting.MeetingHostManOther
};
db.CQMS_Meeting.InsertOnSubmit(newMeeting);
db.SubmitChanges();
////增加一条编码记录
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.CQMS_MeetingMenuId, meeting.ProjectId, null, meeting.MeetingId, meeting.CompileDate);
}
/// <summary>
/// 修改质量会议
/// </summary>
/// <param name="meeting"></param>
public static void UpdateMeeting(Model.CQMS_Meeting meeting)
{
Model.SGGLDB db = Funs.DB;
Model.CQMS_Meeting newMeeting = db.CQMS_Meeting.FirstOrDefault(e => e.MeetingId == meeting.MeetingId);
if (newMeeting != null)
{
//newWeekMeeting.ProjectId = weekMeeting.ProjectId;
newMeeting.UnitId = meeting.UnitId;
newMeeting.MeetingCode = meeting.MeetingCode;
newMeeting.MeetingName = meeting.MeetingName;
newMeeting.MeetingDate = meeting.MeetingDate;
newMeeting.CompileMan = meeting.CompileMan;
newMeeting.MeetingContents = meeting.MeetingContents;
newMeeting.CompileDate = meeting.CompileDate;
newMeeting.States = meeting.States;
newMeeting.AttentPersonNum = meeting.AttentPersonNum;
newMeeting.MeetingHours = meeting.MeetingHours;
newMeeting.MeetingHostMan = meeting.MeetingHostMan;
newMeeting.AttentPerson = meeting.AttentPerson;
newMeeting.MeetingPlace = meeting.MeetingPlace;
newMeeting.MeetingHostManId = meeting.MeetingHostManId;
newMeeting.AttentPersonIds = meeting.AttentPersonIds;
newMeeting.MeetingHostManOther = meeting.MeetingHostManOther;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除质量会议
/// </summary>
/// <param name="meetingId"></param>
public static void DeleteMeetingById(string meetingId)
{
Model.SGGLDB db = Funs.DB;
Model.CQMS_Meeting meeting = db.CQMS_Meeting.FirstOrDefault(e => e.MeetingId == meetingId);
if (meeting != null)
{
///删除编码表记录
BLL.CodeRecordsService.DeleteCodeRecordsByDataId(meeting.MeetingId);
////删除附件表
BLL.CommonService.DeleteAttachFileById(meeting.MeetingId);
////删除流程表
BLL.CommonService.DeleteFlowOperateByID(meeting.MeetingId);
db.CQMS_Meeting.DeleteOnSubmit(meeting);
db.SubmitChanges();
}
}
}
}

View File

@ -3135,6 +3135,13 @@ namespace BLL
/// 意见收集 /// 意见收集
/// </summary> /// </summary>
public const string OpinionCollectionMenuId = "D801290C-1FD9-4467-AFF9-7D788C6344B1"; public const string OpinionCollectionMenuId = "D801290C-1FD9-4467-AFF9-7D788C6344B1";
/// <summary>
/// 质量会议
/// </summary>
public const string CQMS_MeetingMenuId = "30754DF1-CB18-4F53-BB66-2B2A398D7180";
#endregion #endregion
#region #region

View File

@ -1,16 +1,8 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Model; using Model;
using Newtonsoft.Json; using Newtonsoft.Json;
using RestSharp; using Newtonsoft.Json.Linq;
using System.Net; using System;
using System.Web; using System.Linq;
namespace BLL namespace BLL
{ {
@ -19,47 +11,51 @@ namespace BLL
/// </summary> /// </summary>
public class APICqmsMeetingSyncService public class APICqmsMeetingSyncService
{ {
#region
#region
/// <summary> /// <summary>
/// 根据项目、单位获取质量会议列表 /// 分包单位推送数据到总包单位
/// </summary> /// </summary>
/// <param name="projectId">项目ID</param> /// <param name="projectId">项目ID</param>
/// <param name="unitId">单位ID</param> /// <param name="dataId">数据ID可选用于单条数据推送</param>
/// <param name="dataId">数据ID可选用于单条数据同步</param> /// <returns>推送结果</returns>
/// <returns>质量会议数据列表</returns> public static ReturnData PushCqmsMeetingLists(string projectId, string dataId = "")
public static List<Model.CqmsMeetingSyncItem> GetCqmsMeetingListsByProjectIdUnitIdPage(
string projectId, string unitId, string dataId = "")
{ {
Model.ReturnData responeData = new Model.ReturnData();
responeData.code = 0;
responeData.message = string.Empty;
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
var list = from x in db.CQMS_Meeting try
where x.ProjectId == projectId
select x;
if (!string.IsNullOrEmpty(unitId))
{ {
list = list.Where(x => x.UnitId == unitId); var project = db.Base_Project.FirstOrDefault(x => x.ProjectId == projectId);
} if (project != null)
{
var list = from x in db.CQMS_Meeting where x.ProjectId == projectId select x;
if (!string.IsNullOrEmpty(dataId)) if (!string.IsNullOrEmpty(dataId))
{ {
list = list.Where(x => x.MeetingId == dataId); list = list.Where(x => x.MeetingId == dataId);
} }
var dataList = (from x in list var dataList = (from x in list
join unit in db.Base_Unit on x.UnitId equals unit.UnitId into unitTemp join unit in db.Base_Unit on x.UnitId equals unit.UnitId into unitTemp
from unit in unitTemp.DefaultIfEmpty() from unit in unitTemp.DefaultIfEmpty()
join u1 in db.Sys_User on x.CompileMan equals u1.UserId into u1Temp join u1 in db.Sys_User on x.CompileMan equals u1.UserId into u1Temp
from u1 in u1Temp.DefaultIfEmpty() from u1 in u1Temp.DefaultIfEmpty()
join u2 in db.Sys_User on x.MeetingHostMan equals u2.UserId into u2Temp //join u2 in db.Sys_User on x.MeetingHostMan equals u2.UserId into u2Temp
from u2 in u2Temp.DefaultIfEmpty() //from u2 in u2Temp.DefaultIfEmpty()
join cr in db.Sys_CodeRecords on x.MeetingId equals cr.DataId into crTemp //join cr in db.Sys_CodeRecords on x.MeetingId equals cr.DataId into crTemp
from cr in crTemp.DefaultIfEmpty() //from cr in crTemp.DefaultIfEmpty()
join att in db.AttachFile on x.MeetingId equals att.ToKeyId into attTemp
from att in attTemp.DefaultIfEmpty()
join att1 in db.AttachFile on (x.MeetingId + "#1") equals att1.ToKeyId into att1Temp
from att1 in att1Temp.DefaultIfEmpty()
join att2 in db.AttachFile on (x.MeetingId + "#2") equals att2.ToKeyId into att2Temp
from att2 in att2Temp.DefaultIfEmpty()
select new CqmsMeetingSyncItem select new CqmsMeetingSyncItem
{ {
MeetingId = x.MeetingId, MeetingId = x.MeetingId,
MeetingCode = cr.Code, MeetingCode = x.MeetingCode,
MeetingName = x.MeetingName, MeetingName = x.MeetingName,
ProjectId = x.ProjectId, ProjectId = x.ProjectId,
UnitId = x.UnitId, UnitId = x.UnitId,
@ -67,8 +63,9 @@ namespace BLL
MeetingDate = x.MeetingDate, MeetingDate = x.MeetingDate,
MeetingHours = x.MeetingHours, MeetingHours = x.MeetingHours,
MeetingPlace = x.MeetingPlace, MeetingPlace = x.MeetingPlace,
MeetingHostManId = x.MeetingHostManId,
MeetingHostMan = x.MeetingHostMan, MeetingHostMan = x.MeetingHostMan,
MeetingHostManName = u2.UserName, //MeetingHostManName = u2.UserName,
MeetingHostManOther = x.MeetingHostManOther, MeetingHostManOther = x.MeetingHostManOther,
AttentPersonNum = x.AttentPersonNum, AttentPersonNum = x.AttentPersonNum,
AttentPerson = x.AttentPerson, AttentPerson = x.AttentPerson,
@ -78,148 +75,38 @@ namespace BLL
CompileManName = u1.UserName, CompileManName = u1.UserName,
CompileDate = x.CompileDate, CompileDate = x.CompileDate,
States = x.States, States = x.States,
DataSource = "1" AttachFileId = att.AttachFileId,
ToKeyId = att.ToKeyId,
AttachSource = att.AttachSource,
AttachUrl = att.AttachUrl,
AttachFileId1 = att1.AttachFileId,
ToKeyId1 = att1.ToKeyId,
AttachSource1 = att1.AttachSource,
AttachUrl1 = att1.AttachUrl,
AttachFileId2 = att2.AttachFileId,
ToKeyId2 = att2.ToKeyId,
AttachSource2 = att2.AttachSource,
AttachUrl2 = att2.AttachUrl,
}).ToList(); }).ToList();
return dataList; if (dataList.Count() > 0)
}
}
#endregion
#region
/// <summary>
/// 拉取质量会议数据
/// </summary>
/// <returns>处理结果消息</returns>
public static string getCqmsMeetingLists()
{
int code = 0;
string message = "";
try
{
string CollCropCode = string.Empty;
string unitId = string.Empty;
var thisUnit = CommonService.GetIsThisUnit(); //当前单位
if (thisUnit != null)
{
CollCropCode = thisUnit.CollCropCode; //社会统一信用代码
unitId = thisUnit.UnitId;
}
var ProjectList = (from x in Funs.DB.Base_Project
where (x.IsDelete == null || x.IsDelete == false) &&
x.SubjectUnit != null && x.SubjectProject != null
select x).ToList();
if (ProjectList.Count > 0)
{
foreach (var project in ProjectList)
{
string SubjectUnitId = project.SubjectUnit; //集团的单位id
string SubjectProjectId = project.SubjectProject; //集团的项目id
//获取对应单位的apiurl地址
var Url = BLL.UnitService.getUnitApiUrlByUnitId(SubjectUnitId);
var ApiUrl = "";
var WebUrl = "";
if (!string.IsNullOrEmpty(Url))
{
var urls = Url.Split(',');
ApiUrl = urls[0];
if (urls.Length > 1)
{
WebUrl = urls[1];
}
}
string url = "/api/CqmsMeetingSync/getCqmsMeetingListByProjectIdAndCollCropCode?projectId=" +
SubjectProjectId + "&collCropCode=" + CollCropCode;
string baseurl = ApiUrl + url;
string contenttype = "application/json;charset=unicode";
var strJosn = APIGetHttpService.Http(baseurl, "GET", contenttype, null, null);
if (!string.IsNullOrEmpty(strJosn))
{
JObject obj = JObject.Parse(strJosn);
code = Funs.GetNewIntOrZero(obj["code"].ToString());
message = obj["message"].ToString();
if (code == 1)
{
var getData = JsonConvert.DeserializeObject<List<CqmsMeetingSyncItem>>(obj["data"].ToString());
if (getData.Count() > 0)
{
ProcessCqmsMeetingData(getData, project.ProjectId, unitId, WebUrl);
}
message = "获取成功:同步质量会议数" + getData.Count().ToString() + "条";
}
}
}
}
}
catch (Exception ex)
{
message = "获取失败:" + ex.Message;
ErrLogInfo.WriteLog("质量会议获取!", ex);
}
return message;
}
#endregion
#region
/// <summary>
/// 推送质量会议数据
/// </summary>
/// <param name="projectId">项目ID</param>
/// <param name="dataId">数据ID可选用于单条数据推送</param>
/// <returns>推送结果</returns>
public static ReturnData pushCqmsMeetingLists(string projectId, string dataId = "")
{
Model.ReturnData responeData = new Model.ReturnData();
responeData.code = 0;
responeData.message = string.Empty;
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == projectId);
try
{
if (project != null)
{
//获取质量会议数据
var items = GetCqmsMeetingListsByProjectIdUnitIdPage(projectId, "", dataId);
if (items.Count() > 0)
{ {
var thisUnit = CommonService.GetIsThisUnit(); //当前单位 var thisUnit = CommonService.GetIsThisUnit(); //当前单位
var apiurl = "/api/CqmsMeetingSync/SaveCqmsMeetingSyncData"; var apiurl = "/api/CqmsMeetingSync/SaveCqmsMeetingSyncData";
//总包单位接口地址 //总包单位接口地址
var Url = BLL.UnitService.getUnitApiUrlByUnitId(project.SubjectUnit); string ApiUrl = project.SubjectUnitApiUrl;
var ApiUrl = ""; string WebUrl = project.SubjectUnitWebUrl;
var WebUrl = "";
if (!string.IsNullOrEmpty(Url))
{
var urls = Url.Split(',');
ApiUrl = urls[0];
if (urls.Length > 1)
{
WebUrl = urls[1];
}
}
var pushData = new CqmsMeetingSyncData var pushData = new CqmsMeetingSyncData
{ {
CollCropCode = thisUnit.CollCropCode,//分包单位社会统一信用码 CollCropCode = thisUnit.CollCropCode,//分包单位社会统一信用码
ProjectId = project.SubjectProject, //主包项目Id UnitId = thisUnit.UnitId,//分包单位Id
UnitName = thisUnit.UnitName,//分包单位名称
ShortUnitName = thisUnit.ShortUnitName,//分包单位简称
UnitDomain = Funs.SGGLUrl,//分包单位域名地址【文件存储地址】 UnitDomain = Funs.SGGLUrl,//分包单位域名地址【文件存储地址】
Items = items //质量会议数据 SubjectUnit = project.SubjectUnit,//主包单位Id
SubjectProject = project.SubjectProject,//主包项目Id
Items = dataList//会议数据
}; };
var pushContent = JsonConvert.SerializeObject(pushData); var pushContent = JsonConvert.SerializeObject(pushData);
@ -229,6 +116,7 @@ namespace BLL
if (!string.IsNullOrEmpty(returndata)) if (!string.IsNullOrEmpty(returndata))
{ {
// ErrLogInfo.WriteLog($"【质量会议返回结果】接口地址:{baseurl}{returndata}");
JObject obj = JObject.Parse(returndata); JObject obj = JObject.Parse(returndata);
string code = obj["code"].ToString(); string code = obj["code"].ToString();
string message = obj["message"].ToString(); string message = obj["message"].ToString();
@ -248,36 +136,37 @@ namespace BLL
responeData.message = "同步到总包单位失败!"; responeData.message = "同步到总包单位失败!";
ErrLogInfo.WriteLog("【质量会议】同步到总包单位失败!", ex); ErrLogInfo.WriteLog("【质量会议】同步到总包单位失败!", ex);
} }
}
return responeData; return responeData;
} }
#endregion #endregion
#region #region
/// <summary> /// <summary>
/// 接收保存质量会议数据 /// 接收保存质量会议数据
/// </summary> /// </summary>
/// <param name="items">质量会议同步数据</param> /// <param name="data">质量会议同步数据</param>
/// <returns>处理结果消息</returns> /// <returns>处理结果消息</returns>
public static string SaveCqmsMeetingSyncData(Model.CqmsMeetingSyncData items) public static string SaveCqmsMeetingSyncData(Model.CqmsMeetingSyncData data)
{ {
int code = 0; using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
string message = "";
try
{ {
if (items.Items.Count > 0 || items.Items.Count > 0) string result = string.Empty;
{
var CollCropCode = items.CollCropCode; //分包单位社会统一信用码
var ProjectId = items.ProjectId; //总包项目Id
var UnitDomain = items.UnitDomain; //分包单位域名地址【文件存储地址】
var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.CollCropCode == CollCropCode); //根据CollCropCode获取单位id if (data.Items.Count > 0)
{
var CollCropCode = data.CollCropCode; //分包单位社会统一信用码
var ProjectId = data.SubjectProject; //总包项目Id
var UnitDomain = data.UnitDomain; //分包单位域名地址【文件存储地址】
//1、判断分包单位是否存在
var unit = UnitService.getUnitByCollCropCodeUnitName(CollCropCode, data.UnitName);
if (unit == null) if (unit == null)
{ {
message = "总包单位不存在本单位,请登录总包系统检查维护本单位信息!"; result = "总包单位不存在本单位,请登录总包系统检查维护本单位信息!";
} }
else else
{ {
@ -285,79 +174,80 @@ namespace BLL
var porject = BLL.ProjectService.GetProjectByProjectId(ProjectId); var porject = BLL.ProjectService.GetProjectByProjectId(ProjectId);
if (porject == null) if (porject == null)
{ {
message = "总包单位不存在本项目,请检查总包项目关联是否正确!"; result = "总包单位不存在本项目,请检查总包项目关联是否正确!";
} }
else else
{ {
ProcessCqmsMeetingData(items.Items, ProjectId, unit.UnitId, UnitDomain); int succ = 0;
message = "数据推送成功!"; foreach (var item in data.Items)
}
}
}
else
{ {
message = "暂无质量会议数据!"; try
}
}
catch (Exception ex)
{
throw ex;
}
return message;
}
#endregion
#region
/// <summary>
/// 处理质量会议数据的新增或更新逻辑
/// </summary>
/// <param name="getData">质量会议数据列表</param>
/// <param name="projectId">项目id</param>
/// <param name="unitId">单位ID</param>
/// <param name="WebUrl">Web地址</param>
private static void ProcessCqmsMeetingData(
List<Model.CqmsMeetingSyncItem> getData,
string projectId,
string unitId,
string WebUrl)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
foreach (var item in getData)
{ {
Model.CQMS_Meeting model = db.CQMS_Meeting.FirstOrDefault(x => x.MeetingId == item.MeetingId); Model.CQMS_Meeting model = db.CQMS_Meeting.FirstOrDefault(x => x.MeetingId == item.MeetingId);
//HTML解码会议内容 if (model != null)
string meetingContents = !string.IsNullOrEmpty(item.MeetingContents) {
? HttpUtility.HtmlDecode(item.MeetingContents) //更新
: item.MeetingContents; model.ProjectId = ProjectId;
model.UnitId = unit.UnitId;
model.MeetingCode = item.MeetingCode;
model.MeetingName = item.MeetingName;
model.MeetingDate = item.MeetingDate;
model.MeetingHours = item.MeetingHours;
model.MeetingPlace = item.MeetingPlace;
//model.MeetingHostManId = item.MeetingHostManId;
model.MeetingHostMan = item.MeetingHostMan;
model.MeetingHostManOther = item.MeetingHostManOther;
model.AttentPersonNum = item.AttentPersonNum;
model.AttentPerson = item.AttentPerson;
model.AttentPersonIds = item.AttentPersonIds;
//model.MeetingContents = meetingContents;
//model.MeetingContents = HttpUtility.HtmlEncode(item.MeetingContents);
model.MeetingContents = item.MeetingContents;
//model.CompileMan = APIDataShareSyncService.getUserId(item.CompileManName);
model.CompileDate = item.CompileDate;
model.SourceDes = $"{(!string.IsNullOrWhiteSpace(data.ShortUnitName) ? data.ShortUnitName : data.UnitName)}#{item.CompileManName}";
//model.States = item.States;
model.States = BLL.Const.State_2;//分包推送过来的质量会议数据默认已完成
db.SubmitChanges();
if (model == null) //更新会议编码
if (!string.IsNullOrEmpty(item.MeetingCode))
{
var codeRecords = db.Sys_CodeRecords.FirstOrDefault(x => x.DataId == item.MeetingId);
if (codeRecords != null)
{
codeRecords.Code = item.MeetingCode;
db.SubmitChanges();
}
}
}
else
{ {
//新增 //新增
Model.CQMS_Meeting newModel = new Model.CQMS_Meeting Model.CQMS_Meeting newModel = new Model.CQMS_Meeting
{ {
MeetingId = item.MeetingId, MeetingId = item.MeetingId,
ProjectId = projectId, UnitId = unit.UnitId,
UnitId = getUnitIdByUnitName(item.UnitName) ?? unitId, ProjectId = ProjectId,
MeetingCode = item.MeetingCode, MeetingCode = item.MeetingCode,
MeetingName = item.MeetingName, MeetingName = item.MeetingName,
MeetingDate = item.MeetingDate, MeetingDate = item.MeetingDate,
MeetingHours = item.MeetingHours, MeetingHours = item.MeetingHours,
MeetingPlace = item.MeetingPlace, MeetingPlace = item.MeetingPlace,
MeetingHostMan = APIDataShareSyncService.getUserId(item.MeetingHostManName), //MeetingHostManId = item.MeetingHostManId,
MeetingHostMan = item.MeetingHostMan,
MeetingHostManOther = item.MeetingHostManOther, MeetingHostManOther = item.MeetingHostManOther,
AttentPersonNum = item.AttentPersonNum, AttentPersonNum = item.AttentPersonNum,
AttentPerson = item.AttentPerson, AttentPerson = item.AttentPerson,
AttentPersonIds = item.AttentPersonIds, AttentPersonIds = item.AttentPersonIds,
MeetingContents = meetingContents, //MeetingContents = HttpUtility.HtmlEncode(item.MeetingContents),
CompileMan = APIDataShareSyncService.getUserId(item.CompileManName), MeetingContents = item.MeetingContents,
//CompileMan = APIDataShareSyncService.getUserId(item.CompileManName),
CompileDate = item.CompileDate, CompileDate = item.CompileDate,
States = item.States SourceDes = $"{(!string.IsNullOrWhiteSpace(data.ShortUnitName) ? data.ShortUnitName : data.UnitName)}#{item.CompileManName}",
//States = item.States
States = BLL.Const.State_2//分包推送过来的质量会议数据默认已完成
}; };
db.CQMS_Meeting.InsertOnSubmit(newModel); db.CQMS_Meeting.InsertOnSubmit(newModel);
@ -376,66 +266,34 @@ namespace BLL
db.SubmitChanges(); db.SubmitChanges();
} }
} }
succ++;
//附件处理:内容附件
BLL.FileInsertService.SaveAttachFileRecords(data.UnitDomain, item.AttachFileId, item.ToKeyId, item.AttachSource, item.AttachUrl);
//附件处理:签到表
BLL.FileInsertService.SaveAttachFileRecords(data.UnitDomain, item.AttachFileId1, item.ToKeyId1, item.AttachSource1, item.AttachUrl1);
//附件处理:会议过程
BLL.FileInsertService.SaveAttachFileRecords(data.UnitDomain, item.AttachFileId2, item.ToKeyId2, item.AttachSource2, item.AttachUrl2);
}
catch (Exception ex)
{
BLL.ErrLogInfo.WriteLog($"【{porject.ProjectName}】质量会议数据推送总包失败", ex.Message);
continue;
}
}
result = $"推送成功:总数{data.Items.Count()}条,成功{succ}条";
}
}
}
else else
{ {
//更新 result = "暂无质量会议数据!";
model.ProjectId = projectId; }
model.UnitId = getUnitIdByUnitName(item.UnitName) ?? unitId;
model.MeetingCode = item.MeetingCode;
model.MeetingName = item.MeetingName;
model.MeetingDate = item.MeetingDate;
model.MeetingHours = item.MeetingHours;
model.MeetingPlace = item.MeetingPlace;
model.MeetingHostMan = APIDataShareSyncService.getUserId(item.MeetingHostManName);
model.MeetingHostManOther = item.MeetingHostManOther;
model.AttentPersonNum = item.AttentPersonNum;
model.AttentPerson = item.AttentPerson;
model.AttentPersonIds = item.AttentPersonIds;
model.MeetingContents = meetingContents;
model.CompileMan = APIDataShareSyncService.getUserId(item.CompileManName);
model.CompileDate = item.CompileDate;
model.States = item.States;
db.SubmitChanges();
//更新会议编码 return result;
if (!string.IsNullOrEmpty(item.MeetingCode))
{
var codeRecords = db.Sys_CodeRecords.FirstOrDefault(x => x.DataId == item.MeetingId);
if (codeRecords != null)
{
codeRecords.Code = item.MeetingCode;
db.SubmitChanges();
}
}
}
}
} }
} }
#endregion #endregion
#region
/// <summary>
/// 获取单位ID根据名称
/// </summary>
/// <param name="unitName">单位名称</param>
/// <returns>单位ID</returns>
private static string getUnitIdByUnitName(string unitName)
{
string unitId = null;
if (!string.IsNullOrEmpty(unitName))
{
var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitName == unitName);
if (unit != null)
{
unitId = unit.UnitId;
}
}
return unitId;
}
#endregion
} }
} }

View File

@ -1,15 +1,8 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Model; using Model;
using Newtonsoft.Json; using Newtonsoft.Json;
using RestSharp; using Newtonsoft.Json.Linq;
using System.Net; using System;
using System.Linq;
namespace BLL namespace BLL
{ {
@ -18,28 +11,28 @@ namespace BLL
/// </summary> /// </summary>
public class APIInspectionMachineSyncService public class APIInspectionMachineSyncService
{ {
#region #region
/// <summary> /// <summary>
/// 根据项目、单位获取质量计量器具列表 /// 分包单位推送数据到总包单位
/// </summary> /// </summary>
/// <param name="projectId">项目ID</param> /// <param name="projectId">项目ID</param>
/// <param name="unitId">单位ID</param> /// <param name="dataId">数据ID可选用于单条数据推送</param>
/// <param name="dataId">数据ID可选用于单条数据同步</param> /// <returns>推送结果</returns>
/// <returns>质量计量器具数据列表</returns> public static ReturnData PushInspectionMachineLists(string projectId, string dataId = "")
public static List<Model.InspectionMachineSyncItem> GetInspectionMachineListsByProjectIdUnitIdPage(
string projectId, string unitId, string dataId = "")
{ {
Model.ReturnData responeData = new Model.ReturnData();
responeData.code = 0;
responeData.message = string.Empty;
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
var list = from x in db.Comprehensive_InspectionMachine try
where x.ProjectId == projectId
select x;
if (!string.IsNullOrEmpty(unitId))
{ {
list = list.Where(x => x.UnitId == unitId); var project = db.Base_Project.FirstOrDefault(x => x.ProjectId == projectId);
} if (project != null)
{
//获取质量计量器具数据
var list = from x in db.Comprehensive_InspectionMachine where x.ProjectId == projectId select x;
if (!string.IsNullOrEmpty(dataId)) if (!string.IsNullOrEmpty(dataId))
{ {
@ -53,6 +46,8 @@ namespace BLL
from pro in proTemp.DefaultIfEmpty() from pro in proTemp.DefaultIfEmpty()
join u1 in db.Sys_User on x.CompileMan equals u1.UserId into u1Temp join u1 in db.Sys_User on x.CompileMan equals u1.UserId into u1Temp
from u1 in u1Temp.DefaultIfEmpty() from u1 in u1Temp.DefaultIfEmpty()
join att in db.AttachFile on x.InspectionMachineId equals att.ToKeyId into attTemp
from att in attTemp.DefaultIfEmpty()
select new InspectionMachineSyncItem select new InspectionMachineSyncItem
{ {
InspectionMachineId = x.InspectionMachineId, InspectionMachineId = x.InspectionMachineId,
@ -77,150 +72,31 @@ namespace BLL
CompileMan = x.CompileMan, CompileMan = x.CompileMan,
CompileManName = u1.UserName, CompileManName = u1.UserName,
CompileDate = x.CompileDate, CompileDate = x.CompileDate,
AttachUrl = x.AttachUrl,
ProjectId = x.ProjectId, ProjectId = x.ProjectId,
DataSource = "1" AttachFileId = att.AttachFileId,
ToKeyId = att.ToKeyId,
AttachSource = att.AttachSource,
AttachUrl = att.AttachUrl,
}).ToList(); }).ToList();
return dataList; if (dataList.Count() > 0)
}
}
#endregion
#region
/// <summary>
/// 拉取质量计量器具数据
/// </summary>
/// <returns>处理结果消息</returns>
public static string getInspectionMachineLists()
{
int code = 0;
string message = "";
try
{
string CollCropCode = string.Empty;
string unitId = string.Empty;
var thisUnit = CommonService.GetIsThisUnit(); //当前单位
if (thisUnit != null)
{
CollCropCode = thisUnit.CollCropCode; //社会统一信用代码
unitId = thisUnit.UnitId;
}
var ProjectList = (from x in Funs.DB.Base_Project
where (x.IsDelete == null || x.IsDelete == false) &&
x.SubjectUnit != null && x.SubjectProject != null
select x).ToList();
if (ProjectList.Count > 0)
{
foreach (var project in ProjectList)
{
string SubjectUnitId = project.SubjectUnit; //集团的单位id
string SubjectProjectId = project.SubjectProject; //集团的项目id
//获取对应单位的apiurl地址
var Url = BLL.UnitService.getUnitApiUrlByUnitId(SubjectUnitId);
var ApiUrl = "";
var WebUrl = "";
if (!string.IsNullOrEmpty(Url))
{
var urls = Url.Split(',');
ApiUrl = urls[0];
if (urls.Length > 1)
{
WebUrl = urls[1];
}
}
string url = "/api/InspectionMachineSync/getInspectionMachineListByProjectIdAndCollCropCode?projectId=" +
SubjectProjectId + "&collCropCode=" + CollCropCode;
string baseurl = ApiUrl + url;
string contenttype = "application/json;charset=unicode";
var strJosn = APIGetHttpService.Http(baseurl, "GET", contenttype, null, null);
if (!string.IsNullOrEmpty(strJosn))
{
JObject obj = JObject.Parse(strJosn);
code = Funs.GetNewIntOrZero(obj["code"].ToString());
message = obj["message"].ToString();
if (code == 1)
{
var getData = JsonConvert.DeserializeObject<List<InspectionMachineSyncItem>>(obj["data"].ToString());
if (getData.Count() > 0)
{
ProcessInspectionMachineData(getData, project.ProjectId, unitId, WebUrl);
}
message = "获取成功:同步质量计量器具数" + getData.Count().ToString() + "条";
}
}
}
}
}
catch (Exception ex)
{
message = "获取失败:" + ex.Message;
ErrLogInfo.WriteLog("质量计量器具获取!", ex);
}
return message;
}
#endregion
#region
/// <summary>
/// 推送质量计量器具数据
/// </summary>
/// <param name="projectId">项目ID</param>
/// <param name="dataId">数据ID可选用于单条数据推送</param>
/// <returns>推送结果</returns>
public static ReturnData pushInspectionMachineLists(string projectId, string dataId = "")
{
Model.ReturnData responeData = new Model.ReturnData();
responeData.code = 0;
responeData.message = string.Empty;
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == projectId);
try
{
if (project != null)
{
//获取质量计量器具数据
var items = GetInspectionMachineListsByProjectIdUnitIdPage(projectId, "", dataId);
if (items.Count() > 0)
{ {
var thisUnit = CommonService.GetIsThisUnit(); //当前单位 var thisUnit = CommonService.GetIsThisUnit(); //当前单位
var apiurl = "/api/InspectionMachineSync/SaveInspectionMachineSyncData"; var apiurl = "/api/InspectionMachineSync/SaveInspectionMachineSyncData";
//总包单位接口地址 //总包单位接口地址
var Url = BLL.UnitService.getUnitApiUrlByUnitId(project.SubjectUnit); string ApiUrl = project.SubjectUnitApiUrl;
var ApiUrl = ""; string WebUrl = project.SubjectUnitWebUrl;
var WebUrl = "";
if (!string.IsNullOrEmpty(Url))
{
var urls = Url.Split(',');
ApiUrl = urls[0];
if (urls.Length > 1)
{
WebUrl = urls[1];
}
}
var pushData = new InspectionMachineSyncData var pushData = new InspectionMachineSyncData
{ {
CollCropCode = thisUnit.CollCropCode,//分包单位社会统一信用码 CollCropCode = thisUnit.CollCropCode,//分包单位社会统一信用码
ProjectId = project.SubjectProject, //主包项目Id UnitId = thisUnit.UnitId,//分包单位Id
UnitName = thisUnit.UnitName,//分包单位名称
ShortUnitName = thisUnit.ShortUnitName,//分包单位简称
UnitDomain = Funs.SGGLUrl,//分包单位域名地址【文件存储地址】 UnitDomain = Funs.SGGLUrl,//分包单位域名地址【文件存储地址】
Items = items //质量计量器具数据 SubjectUnit = project.SubjectUnit,//主包单位Id
SubjectProject = project.SubjectProject,//主包项目Id
Items = dataList//质量计量器具数据
}; };
var pushContent = JsonConvert.SerializeObject(pushData); var pushContent = JsonConvert.SerializeObject(pushData);
@ -250,35 +126,37 @@ namespace BLL
ErrLogInfo.WriteLog("【质量计量器具】同步到总包单位失败!", ex); ErrLogInfo.WriteLog("【质量计量器具】同步到总包单位失败!", ex);
} }
}
return responeData; return responeData;
} }
#endregion #endregion
#region #region
/// <summary> /// <summary>
/// 接收保存质量计量器具数据 /// 总包单位接收分包单位推送数据
/// </summary> /// </summary>
/// <param name="items">质量计量器具同步数据</param> /// <param name="items">质量计量器具同步数据</param>
/// <returns>处理结果消息</returns> /// <returns>处理结果消息</returns>
public static string SaveInspectionMachineSyncData(Model.InspectionMachineSyncData items) public static string SaveInspectionMachineSyncData(Model.InspectionMachineSyncData data)
{ {
int code = 0; using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
string message = "";
try
{ {
if (items.Items.Count > 0 || items.Items.Count > 0) string result = string.Empty;
{
var CollCropCode = items.CollCropCode; //分包单位社会统一信用码
var ProjectId = items.ProjectId; //总包项目Id
var UnitDomain = items.UnitDomain; //分包单位域名地址【文件存储地址】
var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.CollCropCode == CollCropCode); //根据CollCropCode获取单位id if (data.Items.Count > 0 || data.Items.Count > 0)
{
var CollCropCode = data.CollCropCode; //分包单位社会统一信用码
var ProjectId = data.SubjectProject; //总包项目Id
var UnitDomain = data.UnitDomain; //分包单位域名地址【文件存储地址】
//1、判断分包单位是否存在
var unit = UnitService.getUnitByCollCropCodeUnitName(CollCropCode, data.UnitName);
if (unit == null) if (unit == null)
{ {
message = "总包单位不存在本单位,请登录总包系统检查维护本单位信息!"; result = "总包单位不存在本单位,请登录总包系统检查维护本单位信息!";
} }
else else
{ {
@ -286,78 +164,44 @@ namespace BLL
var porject = BLL.ProjectService.GetProjectByProjectId(ProjectId); var porject = BLL.ProjectService.GetProjectByProjectId(ProjectId);
if (porject == null) if (porject == null)
{ {
message = "总包单位不存在本项目,请检查总包项目关联是否正确!"; result = "总包单位不存在本项目,请检查总包项目关联是否正确!";
} }
else else
{ {
ProcessInspectionMachineData(items.Items, ProjectId, unit.UnitId, UnitDomain); int succ = 0;
message = "数据推送成功!"; foreach (var item in data.Items)
}
}
}
else
{ {
message = "暂无质量计量器具数据!"; try
}
}
catch (Exception ex)
{
throw ex;
}
return message;
}
#endregion
#region
/// <summary>
/// 处理质量计量器具数据的新增或更新逻辑
/// </summary>
/// <param name="getData">质量计量器具数据列表</param>
/// <param name="projectId">项目id</param>
/// <param name="unitId">单位ID</param>
/// <param name="WebUrl">Web地址</param>
private static void ProcessInspectionMachineData(
List<Model.InspectionMachineSyncItem> getData,
string projectId,
string unitId,
string WebUrl)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
foreach (var item in getData)
{ {
Model.Comprehensive_InspectionMachine model = db.Comprehensive_InspectionMachine.FirstOrDefault(x => x.InspectionMachineId == item.InspectionMachineId); Model.Comprehensive_InspectionMachine model = db.Comprehensive_InspectionMachine.FirstOrDefault(x => x.InspectionMachineId == item.InspectionMachineId);
if (model == null) if (model == null)
{ {
//新增 //新增
Model.Comprehensive_InspectionMachine newModel = new Model.Comprehensive_InspectionMachine Model.Comprehensive_InspectionMachine newModel = new Model.Comprehensive_InspectionMachine
{ {
ProjectId = ProjectId,
UnitId = unit.UnitId,
InspectionMachineId = item.InspectionMachineId, InspectionMachineId = item.InspectionMachineId,
ProjectId = projectId,
UnitId = getUnitIdByUnitName(item.UnitName) ?? unitId,
InspectionMachineCode = item.InspectionMachineCode, InspectionMachineCode = item.InspectionMachineCode,
InspectionMachineName = item.InspectionMachineName, InspectionMachineName = item.InspectionMachineName,
SpecificationModel = item.SpecificationModel, SpecificationModel = item.SpecificationModel,
UnitsCount = item.UnitsCount,
//SType = item.SType,
InspectionType = item.InspectionType,
InspectionDate = item.InspectionDate,
NextTestDate = item.NextTestDate, NextTestDate = item.NextTestDate,
TestCycle = item.TestCycle, TestCycle = item.TestCycle,
IsCheckOK = item.IsCheckOK,
IsVerification = item.IsVerification, IsVerification = item.IsVerification,
Status = item.Status, InspectionDate = item.InspectionDate,
IsOnSite = item.IsOnSite, AttachUrl = item.AttachUrl,
LeaveDate = item.LeaveDate,
CNProfessionalId = getCNProfessionalId(item.CNProfessionalName), CNProfessionalId = getCNProfessionalId(item.CNProfessionalName),
CompileMan = APIDataShareSyncService.getUserId(item.CompileManName), //CompileMan = APIDataShareSyncService.getUserId(item.CompileManName),
CompileDate = item.CompileDate, CompileDate = item.CompileDate,
AttachUrl = item.AttachUrl IsOnSite = item.IsOnSite,
InspectionType = item.InspectionType,
LeaveDate = item.LeaveDate,
UnitsCount = item.UnitsCount,
//AuditMan = item.AuditMan,
Status = item.Status,
IsCheckOK = item.IsCheckOK,
//SType = item.SType,
SourceDes = $"{(!string.IsNullOrWhiteSpace(data.ShortUnitName) ? data.ShortUnitName : data.UnitName)}#{item.CompileManName}#专业名称:{item.CNProfessionalName}",
}; };
db.Comprehensive_InspectionMachine.InsertOnSubmit(newModel); db.Comprehensive_InspectionMachine.InsertOnSubmit(newModel);
@ -366,36 +210,52 @@ namespace BLL
else else
{ {
//更新 //更新
model.ProjectId = projectId; model.ProjectId = ProjectId;
model.UnitId = getUnitIdByUnitName(item.UnitName) ?? unitId; model.UnitId = unit.UnitId;
model.InspectionMachineCode = item.InspectionMachineCode; model.InspectionMachineCode = item.InspectionMachineCode;
model.InspectionMachineName = item.InspectionMachineName; model.InspectionMachineName = item.InspectionMachineName;
model.SpecificationModel = item.SpecificationModel; model.SpecificationModel = item.SpecificationModel;
model.UnitsCount = item.UnitsCount;
//model.SType = item.SType;
model.InspectionType = item.InspectionType;
model.InspectionDate = item.InspectionDate;
model.NextTestDate = item.NextTestDate; model.NextTestDate = item.NextTestDate;
model.TestCycle = item.TestCycle; model.TestCycle = item.TestCycle;
model.IsCheckOK = item.IsCheckOK;
model.IsVerification = item.IsVerification; model.IsVerification = item.IsVerification;
model.Status = item.Status; model.InspectionDate = item.InspectionDate;
model.IsOnSite = item.IsOnSite;
model.LeaveDate = item.LeaveDate;
model.CNProfessionalId = getCNProfessionalId(item.CNProfessionalName);
model.CompileMan = APIDataShareSyncService.getUserId(item.CompileManName);
model.CompileDate = item.CompileDate;
model.AttachUrl = item.AttachUrl; model.AttachUrl = item.AttachUrl;
model.CNProfessionalId = getCNProfessionalId(item.CNProfessionalName);
//model.CompileMan = APIDataShareSyncService.getUserId(item.CompileManName);
model.CompileDate = item.CompileDate;
model.IsOnSite = item.IsOnSite;
model.InspectionType = item.InspectionType;
model.LeaveDate = item.LeaveDate;
model.UnitsCount = item.UnitsCount;
//model.AuditMan = item.AuditMan;
model.Status = item.Status;
model.IsCheckOK = item.IsCheckOK;
//model.SType = item.SType;
model.SourceDes = $"{(!string.IsNullOrWhiteSpace(data.ShortUnitName) ? data.ShortUnitName : data.UnitName)}#{item.CompileManName}#专业名称:{item.CNProfessionalName}";
db.SubmitChanges(); db.SubmitChanges();
} }
//处理附件 succ++;
if (!string.IsNullOrEmpty(item.AttachUrl)) //附件处理:附件
BLL.FileInsertService.SaveAttachFileRecords(data.UnitDomain, item.AttachFileId, item.ToKeyId, item.AttachSource, item.AttachUrl);
}
catch (Exception ex)
{ {
APIDataShareSyncService.OperationAttachFile(WebUrl, item.InspectionMachineId, BLL.ErrLogInfo.WriteLog($"【{porject.ProjectName}】计量器具数据推送总包失败", ex.Message);
BLL.Const.InspectionMachineMenuId, item.AttachUrl); continue;
} }
} }
result = "数据推送成功!";
}
}
}
else
{
result = "暂无质量计量器具数据!";
}
return result;
} }
} }
@ -423,24 +283,7 @@ namespace BLL
return professionalId; return professionalId;
} }
/// <summary>
/// 获取单位ID根据名称
/// </summary>
/// <param name="unitName">单位名称</param>
/// <returns>单位ID</returns>
private static string getUnitIdByUnitName(string unitName)
{
string unitId = null;
if (!string.IsNullOrEmpty(unitName))
{
var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitName == unitName);
if (unit != null)
{
unitId = unit.UnitId;
}
}
return unitId;
}
#endregion #endregion
} }

View File

@ -201,7 +201,7 @@ namespace BLL
//model.ClassMeetingContents = HttpUtility.HtmlEncode(item.ClassMeetingContents); //model.ClassMeetingContents = HttpUtility.HtmlEncode(item.ClassMeetingContents);
model.ClassMeetingContents = item.ClassMeetingContents; model.ClassMeetingContents = item.ClassMeetingContents;
//model.States = item.States; //model.States = item.States;
model.States = BLL.Const.State_2; ;//分包推送过来的班前会数据默认已完成 model.States = BLL.Const.State_2; //分包推送过来的班前会数据默认已完成
model.MeetingPlace = item.MeetingPlace; model.MeetingPlace = item.MeetingPlace;
model.MeetingHours = item.MeetingHours; model.MeetingHours = item.MeetingHours;
model.MeetingHostMan = item.MeetingHostMan; model.MeetingHostMan = item.MeetingHostMan;
@ -211,7 +211,7 @@ namespace BLL
//model.Remark = item.Remark; //model.Remark = item.Remark;
model.Remark = $"{(!string.IsNullOrWhiteSpace(data.ShortUnitName) ? data.ShortUnitName : data.UnitName)}#{item.CompileManName}"; model.Remark = $"{(!string.IsNullOrWhiteSpace(data.ShortUnitName) ? data.ShortUnitName : data.UnitName)}#{item.CompileManName}";
model.CompileDate = item.CompileDate; model.CompileDate = item.CompileDate;
model.CompileMan = item.CompileMan; //model.CompileMan = item.CompileMan;
db.SubmitChanges(); db.SubmitChanges();
} }
@ -231,7 +231,7 @@ namespace BLL
//newModel.ClassMeetingContents = HttpUtility.HtmlEncode(item.ClassMeetingContents); //newModel.ClassMeetingContents = HttpUtility.HtmlEncode(item.ClassMeetingContents);
newModel.ClassMeetingContents = item.ClassMeetingContents; newModel.ClassMeetingContents = item.ClassMeetingContents;
//newModel.States = item.States; //newModel.States = item.States;
newModel.States = BLL.Const.State_2; ;//分包推送过来的班前会数据默认已完成 newModel.States = BLL.Const.State_2; //分包推送过来的班前会数据默认已完成
newModel.MeetingPlace = item.MeetingPlace; newModel.MeetingPlace = item.MeetingPlace;
newModel.MeetingHours = item.MeetingHours; newModel.MeetingHours = item.MeetingHours;
newModel.MeetingHostMan = item.MeetingHostMan; newModel.MeetingHostMan = item.MeetingHostMan;
@ -241,7 +241,7 @@ namespace BLL
//newModel.Remark = item.Remark; //newModel.Remark = item.Remark;
newModel.Remark = $"{(!string.IsNullOrWhiteSpace(data.ShortUnitName) ? data.ShortUnitName : data.UnitName)}#{item.CompileManName}"; newModel.Remark = $"{(!string.IsNullOrWhiteSpace(data.ShortUnitName) ? data.ShortUnitName : data.UnitName)}#{item.CompileManName}";
newModel.CompileDate = item.CompileDate; newModel.CompileDate = item.CompileDate;
newModel.CompileMan = item.CompileMan; //newModel.CompileMan = item.CompileMan;
db.Meeting_ClassMeeting.InsertOnSubmit(newModel); db.Meeting_ClassMeeting.InsertOnSubmit(newModel);
db.SubmitChanges(); db.SubmitChanges();

View File

@ -593,6 +593,23 @@ namespace BLL
} }
} }
/// <summary>
/// 单位表下拉框
/// </summary>
/// <param name="dropName">下拉框名字</param>
/// <param name="isShowPlease">是否显示请选择</param>
public static void InitProjectUnitDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
{
dropName.DataValueField = "UnitId";
dropName.DataTextField = "UnitName";
dropName.DataSource = GetUnitByProjectIdList(projectId);
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
/// <summary> /// <summary>
/// 根据项目Id获取单位名称下拉选择项 /// 根据项目Id获取单位名称下拉选择项
/// </summary> /// </summary>

View File

@ -93,6 +93,7 @@ namespace BLL
uU.LastIsOffice = LastIsOffice; uU.LastIsOffice = LastIsOffice;
uU.LastMenuType = LastMenuType; uU.LastMenuType = LastMenuType;
uU.LastProjectId = LastProjectId; uU.LastProjectId = LastProjectId;
uU.LoginProjectId = LastProjectId;
db.SubmitChanges(); db.SubmitChanges();
} }
} }

View File

@ -5,7 +5,7 @@ namespace BLL
/// <summary> /// <summary>
/// 会议管理 /// 会议管理
/// </summary> /// </summary>
public static class MeetingService public static class DriverMeetingService
{ {
/// <summary> /// <summary>
/// 根据主键获取会议信息 /// 根据主键获取会议信息

File diff suppressed because one or more lines are too long

View File

@ -10,13 +10,16 @@
.f-grid-row.Red { .f-grid-row.Red {
background-color: red; background-color: red;
} }
.f-grid-row.Yellow { .f-grid-row.Yellow {
background-color: yellow; background-color: yellow;
} }
.LabelColor { .LabelColor {
color: Red; color: Red;
font-size: small; font-size: small;
} }
.f-grid-row.Gray { .f-grid-row.Gray {
background-color: gray; background-color: gray;
} }
@ -39,15 +42,29 @@
</f:DropDownList> </f:DropDownList>
<f:DropDownList ID="sdrpCNProfessional" Label="专业" runat="server" CssClass="textboxStyle" LabelAlign="Right" LabelWidth="60px"> <f:DropDownList ID="sdrpCNProfessional" Label="专业" runat="server" CssClass="textboxStyle" LabelAlign="Right" LabelWidth="60px">
</f:DropDownList> </f:DropDownList>
<f:DropDownList ID="sdrpType" runat="server" CssClass="textboxStyle" Label="类型" LabelAlign="Right" LabelWidth="60px"> <f:DropDownList ID="sdrpType" runat="server" CssClass="textboxStyle" Label="类型" LabelAlign="Right" LabelWidth="60px"
AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
<f:ListItem Text="-请选择-" Selected="true"></f:ListItem> <f:ListItem Text="-请选择-" Selected="true"></f:ListItem>
<f:ListItem Value="施工" Text="施工"></f:ListItem> <f:ListItem Value="施工" Text="施工"></f:ListItem>
<f:ListItem Value="计量" Text="计量"></f:ListItem> <f:ListItem Value="计量" Text="计量"></f:ListItem>
</f:DropDownList> </f:DropDownList>
<f:RadioButtonList runat="server" ID="ckIsOnSite" AutoPostBack="true" Label="在场状态" LabelWidth="90px" LabelAlign="Right"
OnSelectedIndexChanged="TextBox_TextChanged" Width="300px">
<f:RadioItem Text="全部" Value="" />
<f:RadioItem Text="在场" Value="1" Selected="true" />
<f:RadioItem Text="已退场" Value="0" />
</f:RadioButtonList>
<f:RadioButtonList runat="server" ID="rbSource" Width="220px" Label="来源" LabelWidth="50px"
AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" AutoColumnWidth="true">
<f:RadioItem Text="全部" Value="0" Selected="true" />
<f:RadioItem Text="系统内单位" Value="1" />
</f:RadioButtonList>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSearch" Icon="SystemSearch" <f:Button ID="btnSearch" Icon="SystemSearch"
EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询"> EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
</f:Button> </f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill> <f:Button ID="btnOutSite" ToolTip="批量退场" Icon="CogDelete" runat="server" Hidden="true" Text="批量退场" OnClick="btnOutSite_Click">
</f:Button>
<f:Button ID="btnNew" Icon="Add" EnablePostBack="true" runat="server" OnClick="btnNew_Click" ToolTip="新增" Hidden="true"> <f:Button ID="btnNew" Icon="Add" EnablePostBack="true" runat="server" OnClick="btnNew_Click" ToolTip="新增" Hidden="true">
</f:Button> </f:Button>
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true"> <f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
@ -100,6 +117,9 @@
<f:RenderField ColumnID="LeaveDate" DataField="LeaveDate" FieldType="Date" Renderer="Date" HeaderText="离场时间" TextAlign="Center" <f:RenderField ColumnID="LeaveDate" DataField="LeaveDate" FieldType="Date" Renderer="Date" HeaderText="离场时间" TextAlign="Center"
HeaderTextAlign="Center" Width="120px"> HeaderTextAlign="Center" Width="120px">
</f:RenderField> </f:RenderField>
<f:RenderField ColumnID="SourceDes" DataField="SourceDes" FieldType="String" HeaderText="来源说明" HeaderTextAlign="Center"
TextAlign="Left" Width="120px">
</f:RenderField>
<%--<f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center"> <%--<f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label> <asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>

View File

@ -33,7 +33,7 @@ namespace FineUIPro.Web.Comprehensive
public void BindGrid() public void BindGrid()
{ {
string strSql = @"select InspectionMachineId, InspectionMachineCode, U.UnitName,CN.ProfessionalName ,Status, string strSql = @"select InspectionMachineId, InspectionMachineCode, U.UnitName,CN.ProfessionalName ,Status,
InspectionMachineName, SpecificationModel, NextTestDate, TestCycle, C.InspectionDate, InspectionMachineName, SpecificationModel, NextTestDate, TestCycle, C.InspectionDate,C.SourceDes,
InspectionDate CompileDate, (CASE WHEN IsVerification=1 THEN '是' WHEN IsVerification=0 THEN '否' ELSE '' END) AS IsVerification, InspectionType, LeaveDate, UnitsCount,C.RemarkCode,C.IsOnSite InspectionDate CompileDate, (CASE WHEN IsVerification=1 THEN '是' WHEN IsVerification=0 THEN '否' ELSE '' END) AS IsVerification, InspectionType, LeaveDate, UnitsCount,C.RemarkCode,C.IsOnSite
from Comprehensive_InspectionMachine C from Comprehensive_InspectionMachine C
left join Base_Unit U on C.UnitId=U.UnitId left join Base_Unit U on C.UnitId=U.UnitId
@ -56,6 +56,17 @@ namespace FineUIPro.Web.Comprehensive
strSql += " AND C.InspectionType=@InspectionType"; strSql += " AND C.InspectionType=@InspectionType";
listStr.Add(new SqlParameter("@InspectionType", sdrpType.SelectedValue)); listStr.Add(new SqlParameter("@InspectionType", sdrpType.SelectedValue));
} }
string isOnSite = this.ckIsOnSite.SelectedValue;
if (!string.IsNullOrWhiteSpace(isOnSite))
{
strSql += " AND C.IsOnSite = @IsOnSite ";
listStr.Add(new SqlParameter("@IsOnSite", this.ckIsOnSite.SelectedValue));
}
if (this.rbSource.SelectedValue == "1")
{
strSql += " AND C.SourceDes LIKE @SourceDes ";
listStr.Add(new SqlParameter("@SourceDes", "%#%"));
}
SqlParameter[] parameter = listStr.ToArray(); SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count; Grid1.RecordCount = tb.Rows.Count;
@ -253,6 +264,7 @@ namespace FineUIPro.Web.Comprehensive
if (buttonList.Contains(BLL.Const.BtnAdd)) if (buttonList.Contains(BLL.Const.BtnAdd))
{ {
this.btnNew.Hidden = false; this.btnNew.Hidden = false;
this.btnOutSite.Hidden = false;
} }
if (buttonList.Contains(BLL.Const.BtnModify)) if (buttonList.Contains(BLL.Const.BtnModify))
{ {
@ -303,6 +315,50 @@ namespace FineUIPro.Web.Comprehensive
return "编制"; return "编制";
} }
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
#region 退
/// <summary>
/// 批量退场按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnOutSite_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
int succ = 0;
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var rows = BLL.InspectionMachineService.GetInspectionMachineById(rowID);
if (rows != null && rows.IsOnSite != false)
{
rows.IsOnSite = false;
rows.LeaveDate = rows.LeaveDate != null ? rows.LeaveDate : DateTime.Now;
BLL.InspectionMachineService.UpdateInspectionMachine(rows);
succ++;
}
}
BindGrid();
ShowNotify("操作完成,已退场" + succ + "条", MessageBoxIcon.Success);
}
else
{
ShowNotify("请选择需要退场的机具设备", MessageBoxIcon.Warning);
}
}
#endregion
#region #region
/// 导出按钮 /// 导出按钮

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.Comprehensive { namespace FineUIPro.Web.Comprehensive
{
public partial class InspectionMachine { public partial class InspectionMachine
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -84,6 +86,24 @@ namespace FineUIPro.Web.Comprehensive {
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList sdrpType; protected global::FineUIPro.DropDownList sdrpType;
/// <summary>
/// ckIsOnSite 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList ckIsOnSite;
/// <summary>
/// rbSource 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rbSource;
/// <summary> /// <summary>
/// btnSearch 控件。 /// btnSearch 控件。
/// </summary> /// </summary>
@ -93,6 +113,15 @@ namespace FineUIPro.Web.Comprehensive {
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnSearch; protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnOutSite 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOutSite;
/// <summary> /// <summary>
/// btnNew 控件。 /// btnNew 控件。
/// </summary> /// </summary>

View File

@ -265,6 +265,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
BLL.InspectionMachineService.UpdateInspectionMachine(inspectionMachone); BLL.InspectionMachineService.UpdateInspectionMachine(inspectionMachone);
} }
var porject = BLL.ProjectService.GetProjectByProjectId(inspectionMachone.ProjectId);
if (!string.IsNullOrWhiteSpace(porject.SubjectUnit) && !string.IsNullOrWhiteSpace(porject.SubjectProject))
{//项目关联了总包单位项目,保存成功后自动推送至总包单位
APIInspectionMachineSyncService.PushInspectionMachineLists(inspectionMachone.ProjectId, this.InspectionMachineId);
}
ShowNotify("保存成功!", MessageBoxIcon.Success); ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} }

View File

@ -0,0 +1,169 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Meeting.aspx.cs" Inherits="FineUIPro.Web.CQMS.ProcessControl.Meeting" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!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>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="质量会议" EnableCollapse="true"
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="MeetingId"
DataIDField="MeetingId" AllowSorting="true" ForceFit="true"
SortField="MeetingCode" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtMeetingCode" EmptyText="按编号查询"
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="150px">
</f:TextBox>
<f:DropDownList ID="drpUnitId" runat="server" AutoPostBack="true"
OnSelectedIndexChanged="TextBox_TextChanged" Width="250px">
</f:DropDownList>
<f:TextBox runat="server" ID="txtMeetingName" EmptyText="按名称查询"
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="150px">
</f:TextBox>
<f:RadioButtonList runat="server" ID="rbSource" Width="220px" Label="来源" LabelWidth="50px"
AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" AutoColumnWidth="true">
<f:RadioItem Text="全部" Value="0" Selected="true" />
<f:RadioItem Text="系统内单位" Value="1" />
</f:RadioButtonList>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" Hidden="true" Text="新增"
runat="server">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="200px" ColumnID="ProjectName" DataField="ProjectName" FieldType="String" HeaderText="项目"
HeaderTextAlign="Center" TextAlign="Left" Hidden="true">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="MeetingCode" DataField="MeetingCode"
SortField="MeetingCode" FieldType="String" HeaderText="编号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="110px" ColumnID="MeetingName" DataField="MeetingName"
FieldType="String" HeaderText="名称"
HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="240px" ColumnID="UnitName" DataField="UnitName"
FieldType="String" HeaderText="参会单位" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="MeetingDate" DataField="MeetingDate"
SortField="MeetingDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
HeaderText="会议日期" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<%-- <f:RenderField Width="90px" ColumnID="CompileManName" DataField="CompileManName"
SortField="CompileManName" FieldType="String" HeaderText="整理人" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>--%>
<f:RenderField Width="80px" ColumnID="MeetingHours" DataField="MeetingHours"
FieldType="Int" HeaderText="时数" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" ColumnID="MeetingHostMan" DataField="MeetingHostMan"
FieldType="String" HeaderText="主持人" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" ColumnID="AttentPersonNum" DataField="AttentPersonNum"
FieldType="Int" HeaderText="参会人数" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="SourceDes" DataField="SourceDes"
FieldType="String" HeaderText="来源说明" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<%-- <f:RenderField Width="90px" ColumnID="AttentPerson" DataField="AttentPerson"
SortField="AttentPerson" FieldType="String" HeaderText="参会人员" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>--%>
<%--<f:RenderField Width="150px" ColumnID="FlowOperateName" DataField="FlowOperateName"
SortField="FlowOperateName" FieldType="String" HeaderText="状态" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>--%>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="质量会议" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1024px"
Height="630px">
</f:Window>
<f:Window ID="WindowAtt" Title="附件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="Pencil" EnablePostBack="true"
Hidden="true" runat="server" Text="编辑">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
Hidden="true" Icon="Delete" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server"
Text="删除">
</f:MenuButton>
<f:MenuButton ID="btnView" OnClick="btnView_Click" Icon="Find" EnablePostBack="true"
runat="server" Text="查看">
</f:MenuButton>
</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');
}
</script>
</body>
</html>

View File

@ -0,0 +1,312 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
namespace FineUIPro.Web.CQMS.ProcessControl
{
public partial class Meeting : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
this.btnNew.OnClientClick = Window1.GetShowReference("MeetingEdit.aspx") + "return false;";
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
{
Grid1.PageSize = this.CurrUser.PageSize.Value;
}
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
this.BindGrid();
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
// this.Grid1.Columns[0].Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
}
}
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.BindGrid();
}
/// <summary>
/// 绑定数据
/// </summary>
protected void BindGrid()
{
if (!string.IsNullOrEmpty(this.ProjectId))
{
string strSql = @"SELECT Meeting.MeetingId,Meeting.ProjectId,CodeRecords.Code AS MeetingCode,Unit.UnitId,Unit.UnitName,Meeting.MeetingName,Meeting.MeetingDate,Meeting.CompileMan,Users.UserName AS CompileManName
,Meeting.MeetingContents,Meeting.CompileDate,Meeting.States,Meeting.MeetingHours,Meeting.MeetingHostMan,Meeting.SourceDes
,UsersH.UserName as MeetingHostManName ,Meeting.AttentPersonNum,Meeting.AttentPerson,Project.ProjectName
FROM CQMS_Meeting AS Meeting
LEFT JOIN Base_Project AS Project ON Meeting.ProjectId=Project.ProjectId
LEFT JOIN Sys_CodeRecords AS CodeRecords ON Meeting.MeetingId=CodeRecords.DataId
LEFT JOIN Sys_User AS Users ON Meeting.CompileMan=Users.UserId
LEFT JOIN Sys_User AS UsersH ON Meeting.MeetingHostMan=UsersH.UserId
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Meeting.UnitId WHERE 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " AND Meeting.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND Unit.UnitId = @UnitId";
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
}
if (!string.IsNullOrEmpty(this.txtMeetingCode.Text.Trim()))
{
strSql += " AND MeetingCode LIKE @MeetingCode";
listStr.Add(new SqlParameter("@MeetingCode", "%" + this.txtMeetingCode.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtMeetingName.Text.Trim()))
{
strSql += " AND Meeting.MeetingName LIKE @MeetingName";
listStr.Add(new SqlParameter("@MeetingName", "%" + this.txtMeetingName.Text.Trim() + "%"));
}
if (this.rbSource.SelectedValue == "1")
{
strSql += " AND Meeting.SourceDes LIKE @SourceDes ";
listStr.Add(new SqlParameter("@SourceDes", "%#%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
}
#region
/// <summary>
/// 改变索引事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
/// <summary>
/// 分页下拉选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
this.BindGrid();
}
#endregion
#endregion
#region
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
this.EditData();
}
/// <summary>
/// 右键编辑事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
this.EditData();
}
/// <summary>
/// 编辑数据方法
/// </summary>
private void EditData()
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string id = Grid1.SelectedRowID;
var meeting = BLL.MeetingService.GetMeetingById(id);
if (meeting != null)
{
if (this.btnMenuEdit.Hidden || meeting.States == BLL.Const.State_2) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MeetingView.aspx?MeetingId={0}", id, "查看 - ")));
}
else
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MeetingEdit.aspx?MeetingId={0}", id, "编辑 - ")));
}
}
}
#endregion
#region
/// <summary>
/// 右键删除事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var meet = BLL.MeetingService.GetMeetingById(rowID);
if (meet != null)
{
BLL.LogService.AddSys_Log(this.CurrUser, meet.MeetingCode, meet.MeetingId, BLL.Const.CQMS_MeetingMenuId, BLL.Const.BtnDelete);
BLL.MeetingService.DeleteMeetingById(rowID);
}
}
//Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.SafetyMeeting);
this.BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
}
#endregion
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
if (Request.Params["value"] == "0")
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.CQMS_MeetingMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
{
this.btnNew.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnModify))
{
this.btnMenuEdit.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnDelete))
{
this.btnMenuDelete.Hidden = false;
}
}
}
#endregion
#region
/// 导出按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
{
Response.ClearContent();
string filename = Funs.GetNewFileName();
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("质量会议" + filename, System.Text.Encoding.UTF8) + ".xls");
Response.ContentType = "application/excel";
Response.ContentEncoding = System.Text.Encoding.UTF8;
this.Grid1.PageSize = this.Grid1.RecordCount;
this.BindGrid();
Response.Write(GetGridTableHtml(Grid1));
Response.End();
}
#endregion
protected void btnView_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string id = Grid1.SelectedRowID;
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MeetingView.aspx?MeetingId={0}", id, "查看 - ")));
}
}
}

View File

@ -0,0 +1,251 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.ProcessControl
{
public partial class Meeting
{
/// <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>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtMeetingCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMeetingCode;
/// <summary>
/// drpUnitId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitId;
/// <summary>
/// txtMeetingName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMeetingName;
/// <summary>
/// rbSource 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rbSource;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// btnOut 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// lblNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblNumber;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
/// <summary>
/// btnView 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnView;
}
}

View File

@ -0,0 +1,90 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MeetingEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.ProcessControl.MeetingEdit" ValidateRequest="false" %>
<!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>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="质量会议" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="85px">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtMeetingCode" runat="server" Label="会议编号"
MaxLength="50">
</f:TextBox>
<f:TextBox ID="txtMeetingName" runat="server" Label="会议名称" Required="true" ShowRedStar="true"
MaxLength="50" FocusOnPageLoad="true">
</f:TextBox>
<f:DatePicker ID="txtMeetingDate" runat="server" Label="会议日期"
EnableEdit="true">
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpCompileMan" runat="server" Label="整理人">
</f:DropDownList>
<f:NumberBox ID="txtMeetingHours" runat="server" Label="时数" NoDecimal="false" NoNegative="true"
MinValue="0">
</f:NumberBox>
<f:DropDownList runat="server" ID="drpUnit" ShowRedStar="true" Label="单位">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtMeetingHostMan" runat="server" Label="主持人" MaxLength="50">
</f:TextBox>
<f:NumberBox ID="txtAttentPersonNum" NoDecimal="true" NoNegative="true" MinValue="0"
runat="server" Label="参会人数" ShowRedStar="true" Required="true">
</f:NumberBox>
<f:TextBox ID="txtAttentPerson" runat="server" Label="参会人员"
MaxLength="300" EnableBlurEvent="true" OnBlur="txtAttentPerson_Blur">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:HtmlEditor runat="server" Label="会议内容" ID="txtMeetingContents" ShowLabel="false"
Editor="UMEditor" BasePath="~/res/umeditor/" ToolbarSet="Full" Height="240">
</f:HtmlEditor>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnAttachUrl" Text="内容" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
</f:Button>
<f:Button ID="btnAttachUrl1" Text="签到表" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
OnClick="btnAttachUrl1_Click" ValidateForms="SimpleForm1">
</f:Button>
<f:Button ID="btnAttachUrl2" Text="会议过程" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
OnClick="btnAttachUrl2_Click" ValidateForms="SimpleForm1">
</f:Button>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1" Text="保存"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose" Text="关闭">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:Window ID="WindowAtt" Title="附件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
</form>
</body>
</html>

View File

@ -0,0 +1,251 @@
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.ProcessControl
{
public partial class MeetingEdit : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
public string MeetingId
{
get
{
return (string)ViewState["MeetingId"];
}
set
{
ViewState["MeetingId"] = value;
}
}
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.InitDropDownList();
this.MeetingId = Request.Params["MeetingId"];
if (!string.IsNullOrEmpty(this.MeetingId))
{
Model.CQMS_Meeting meeting = BLL.MeetingService.GetMeetingById(this.MeetingId);
if (meeting != null)
{
this.ProjectId = meeting.ProjectId;
if (this.ProjectId != this.CurrUser.LoginProjectId)
{
this.InitDropDownList();
}
///读取编号
this.txtMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.MeetingId);
this.txtMeetingName.Text = meeting.MeetingName;
this.txtMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", meeting.MeetingDate);
if (meeting.AttentPersonNum != null)
{
this.txtAttentPersonNum.Text = meeting.AttentPersonNum.ToString();
}
if (!string.IsNullOrEmpty(meeting.CompileMan))
{
this.drpCompileMan.SelectedValue = meeting.CompileMan;
}
this.txtMeetingContents.Text = HttpUtility.HtmlDecode(meeting.MeetingContents);
this.txtMeetingHours.Text = Convert.ToString(meeting.MeetingHours);
var hostMan = BLL.UserService.GetUserByUserId(meeting.MeetingHostMan);
if (hostMan != null)
{
this.txtMeetingHostMan.Text = hostMan.UserName;
}
else
{
this.txtMeetingHostMan.Text = meeting.MeetingHostMan;
}
this.txtAttentPerson.Text = meeting.AttentPerson;
this.drpUnit.SelectedValue = meeting.UnitId;
}
}
else
{
this.drpCompileMan.SelectedValue = this.CurrUser.UserId;
this.drpUnit.SelectedValue = this.CurrUser.UnitId ?? CommonService.GetThisUnitId();
this.txtMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
var codeTemplateRule = BLL.SysConstSetService.GetCodeTemplateRuleByMenuId(BLL.Const.CQMS_MeetingMenuId);
if (codeTemplateRule != null)
{
this.txtMeetingContents.Text = HttpUtility.HtmlDecode(codeTemplateRule.Template);
}
////自动生成编码
this.txtMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.CQMS_MeetingMenuId, this.ProjectId, this.CurrUser.UnitId);
this.txtMeetingName.Text = this.SimpleForm1.Title;
this.txtMeetingHours.Text = "1";
this.txtMeetingHostMan.Text = this.CurrUser.UserName;
}
}
}
#endregion
/// <summary>
/// 初始化下拉框
/// </summary>
private void InitDropDownList()
{
BLL.UnitService.InitProjectUnitDropDownList(this.drpUnit, this.ProjectId, false);
BLL.UserService.InitUserDropDownList(this.drpCompileMan, this.ProjectId, true);
}
#region
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
this.SaveData(BLL.Const.BtnSave);
var porject = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
if (!string.IsNullOrWhiteSpace(porject.SubjectUnit) && !string.IsNullOrWhiteSpace(porject.SubjectProject))
{//项目关联了总包单位项目,保存成功后自动推送至总包单位
APICqmsMeetingSyncService.PushCqmsMeetingLists(this.ProjectId, this.MeetingId);
}
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
/// <summary>
/// 保存数据
/// </summary>
/// <param name="type"></param>
private void SaveData(string type)
{
Model.CQMS_Meeting meeting = new Model.CQMS_Meeting
{
ProjectId = this.ProjectId,
MeetingCode = this.txtMeetingCode.Text.Trim(),
MeetingName = this.txtMeetingName.Text.Trim(),
MeetingDate = Funs.GetNewDateTime(this.txtMeetingDate.Text.Trim()),
AttentPersonNum = Funs.GetNewIntOrZero(this.txtAttentPersonNum.Text.Trim()),
MeetingContents = HttpUtility.HtmlEncode(this.txtMeetingContents.Text),
CompileDate = DateTime.Now,
MeetingHours = Funs.GetNewIntOrZero(this.txtMeetingHours.Text.Trim()),
MeetingHostMan = this.txtMeetingHostMan.Text.Trim(),
AttentPerson = this.txtAttentPerson.Text.Trim(),
States = BLL.Const.State_2,
};
if (this.drpCompileMan.SelectedValue != BLL.Const._Null)
{
meeting.CompileMan = this.drpCompileMan.SelectedValue;
}
if (this.drpUnit.SelectedValue != BLL.Const._Null)
{
meeting.UnitId = this.drpUnit.SelectedValue;
}
if (!string.IsNullOrEmpty(this.MeetingId))
{
meeting.MeetingId = this.MeetingId;
BLL.MeetingService.UpdateMeeting(meeting);
BLL.LogService.AddSys_Log(this.CurrUser,meeting.MeetingCode, meeting.MeetingId, BLL.Const.CQMS_MeetingMenuId, BLL.Const.BtnModify);
}
else
{
this.MeetingId = SQLHelper.GetNewID();
meeting.MeetingId = this.MeetingId;
BLL.MeetingService.AddMeeting(meeting);
BLL.LogService.AddSys_Log(this.CurrUser, meeting.MeetingCode, meeting.MeetingId, BLL.Const.CQMS_MeetingMenuId, BLL.Const.BtnAdd);
}
//Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.SafetyMeeting);
}
#endregion
#region
/// <summary>
/// 上传附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.MeetingId))
{
SaveData(BLL.Const.BtnSave);
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/MeetingAttachUrl&menuId={1}", MeetingId, BLL.Const.CQMS_MeetingMenuId)));
}
#endregion
protected void btnAttachUrl1_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.MeetingId))
{
SaveData(Const.BtnSave);
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ClassMeetingAttachUrl&menuId={1}&strParam=1", this.MeetingId, Const.CQMS_MeetingMenuId)));
}
protected void btnAttachUrl2_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.MeetingId))
{
SaveData(Const.BtnSave);
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ClassMeetingAttachUrl&menuId={1}&strParam=2", this.MeetingId, Const.CQMS_MeetingMenuId)));
}
/// <summary>
/// 计算参会人数
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtAttentPerson_Blur(object sender, EventArgs e)
{
string str = this.txtAttentPerson.Text.Trim();
if (!string.IsNullOrEmpty(str))
{
if (str.Contains(","))
{
this.txtAttentPersonNum.Text = str.Split(',').Length.ToString();
}
else if (str.Contains(""))
{
this.txtAttentPersonNum.Text = str.Split('').Length.ToString();
}
else if (str.Contains(";"))
{
this.txtAttentPersonNum.Text = str.Split(';').Length.ToString();
}
else if (str.Contains(""))
{
this.txtAttentPersonNum.Text = str.Split('').Length.ToString();
}
}
}
}
}

View File

@ -0,0 +1,197 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.ProcessControl
{
public partial class MeetingEdit
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtMeetingCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMeetingCode;
/// <summary>
/// txtMeetingName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMeetingName;
/// <summary>
/// txtMeetingDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtMeetingDate;
/// <summary>
/// drpCompileMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCompileMan;
/// <summary>
/// txtMeetingHours 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtMeetingHours;
/// <summary>
/// drpUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnit;
/// <summary>
/// txtMeetingHostMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMeetingHostMan;
/// <summary>
/// txtAttentPersonNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtAttentPersonNum;
/// <summary>
/// txtAttentPerson 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtAttentPerson;
/// <summary>
/// txtMeetingContents 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HtmlEditor txtMeetingContents;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl;
/// <summary>
/// btnAttachUrl1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl1;
/// <summary>
/// btnAttachUrl2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl2;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
}
}

View File

@ -0,0 +1,85 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MeetingView.aspx.cs" Inherits="FineUIPro.Web.CQMS.ProcessControl.MeetingView" ValidateRequest="false" %>
<!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>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="质量会议" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtMeetingCode" runat="server" Label="会议编号" LabelAlign="Right"
Readonly="true">
</f:TextBox>
<f:TextBox ID="txtMeetingName" runat="server" Label="会议名称" LabelAlign="Right"
Readonly="true">
</f:TextBox>
<f:TextBox ID="txtMeetingDate" runat="server" Label="会议日期" LabelAlign="Right"
Readonly="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="drpCompileMan" runat="server" Label="整理人" LabelAlign="Right" Readonly="true">
</f:TextBox>
<f:NumberBox ID="txtMeetingHours" runat="server" Label="时数" Readonly="true" LabelAlign="Right">
</f:NumberBox>
<f:TextBox ID="txtUnit" runat="server" Label="单位" LabelAlign="Right" Readonly="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtMeetingHostMan" runat="server" Label="主持人" LabelAlign="Right" Readonly="true">
</f:TextBox>
<f:NumberBox ID="txtAttentPersonNum" LabelAlign="Right"
runat="server" Label="参会人数" Readonly="true">
</f:NumberBox>
<f:TextBox ID="txtAttentPerson" runat="server" Label="参会人员" LabelAlign="Right" Readonly="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:HtmlEditor runat="server" Label="会议内容" ID="txtMeetingContents" ShowLabel="false"
Editor="UMEditor" BasePath="~/res/umeditor/" ToolbarSet="Full" Height="260" LabelAlign="Right">
</f:HtmlEditor>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnAttachUrl" Text="内容" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
OnClick="btnAttachUrl_Click">
</f:Button>
<f:Button ID="btnAttachUrl1" Text="签到表" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
OnClick="btnAttachUrl1_Click">
</f:Button>
<f:Button ID="btnAttachUrl2" Text="会议过程" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
OnClick="btnAttachUrl2_Click">
</f:Button>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose" Text="关闭">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:Window ID="WindowAtt" Title="附件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
</form>
</body>
</html>

View File

@ -0,0 +1,113 @@
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.ProcessControl
{
public partial class MeetingView : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
public string MeetingId
{
get
{
return (string)ViewState["MeetingId"];
}
set
{
ViewState["MeetingId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.MeetingId = Request.Params["MeetingId"];
if (!string.IsNullOrEmpty(this.MeetingId))
{
Model.CQMS_Meeting meeting = BLL.MeetingService.GetMeetingById(this.MeetingId);
if (meeting != null)
{
///读取编号
this.txtMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.MeetingId);
this.txtMeetingName.Text = meeting.MeetingName;
if (meeting.MeetingDate != null)
{
this.txtMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", meeting.MeetingDate);
}
var users = BLL.UserService.GetUserByUserId(meeting.CompileMan);
if (users != null)
{
this.drpCompileMan.Text = users.UserName;
}
if (meeting.AttentPersonNum != null)
{
this.txtAttentPersonNum.Text = meeting.AttentPersonNum.ToString();
}
this.txtMeetingContents.Text = HttpUtility.HtmlDecode(meeting.MeetingContents);
this.txtMeetingHours.Text = Convert.ToString(meeting.MeetingHours);
var hostMan = BLL.UserService.GetUserByUserId(meeting.MeetingHostMan);
if (hostMan != null)
{
this.txtMeetingHostMan.Text = hostMan.UserName;
}
else
{
this.txtMeetingHostMan.Text = meeting.MeetingHostMan;
}
this.txtAttentPerson.Text = meeting.AttentPerson;
this.txtUnit.Text = UnitService.GetUnitNameByUnitId(meeting.UnitId);
}
}
}
}
#endregion
#region
/// <summary>
/// 上传附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.MeetingId))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/MeetingAttachUrl&menuId={1}&type=-1", MeetingId, BLL.Const.CQMS_MeetingMenuId)));
}
}
#endregion
protected void btnAttachUrl1_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.MeetingId))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ClassMeetingAttachUrl&menuId={1}&strParam=1&type=-1", this.MeetingId, BLL.Const.CQMS_MeetingMenuId)));
}
}
protected void btnAttachUrl2_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.MeetingId))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ClassMeetingAttachUrl&menuId={1}&strParam=2&type=-1", this.MeetingId, BLL.Const.CQMS_MeetingMenuId)));
}
}
}
}

View File

@ -0,0 +1,188 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.ProcessControl
{
public partial class MeetingView
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtMeetingCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMeetingCode;
/// <summary>
/// txtMeetingName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMeetingName;
/// <summary>
/// txtMeetingDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMeetingDate;
/// <summary>
/// drpCompileMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox drpCompileMan;
/// <summary>
/// txtMeetingHours 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtMeetingHours;
/// <summary>
/// txtUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtUnit;
/// <summary>
/// txtMeetingHostMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMeetingHostMan;
/// <summary>
/// txtAttentPersonNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtAttentPersonNum;
/// <summary>
/// txtAttentPerson 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtAttentPerson;
/// <summary>
/// txtMeetingContents 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HtmlEditor txtMeetingContents;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl;
/// <summary>
/// btnAttachUrl1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl1;
/// <summary>
/// btnAttachUrl2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl2;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
}
}

View File

@ -641,6 +641,9 @@
<Content Include="CQMS\ProcessControl\InspectionManagementStatistics.aspx" /> <Content Include="CQMS\ProcessControl\InspectionManagementStatistics.aspx" />
<Content Include="CQMS\ProcessControl\InspectionNotice.aspx" /> <Content Include="CQMS\ProcessControl\InspectionNotice.aspx" />
<Content Include="CQMS\ProcessControl\InspectionNoticeEdit.aspx" /> <Content Include="CQMS\ProcessControl\InspectionNoticeEdit.aspx" />
<Content Include="CQMS\ProcessControl\Meeting.aspx" />
<Content Include="CQMS\ProcessControl\MeetingEdit.aspx" />
<Content Include="CQMS\ProcessControl\MeetingView.aspx" />
<Content Include="CQMS\ProcessControl\NondestructiveTest.aspx" /> <Content Include="CQMS\ProcessControl\NondestructiveTest.aspx" />
<Content Include="CQMS\ProcessControl\NondestructiveTestEdit.aspx" /> <Content Include="CQMS\ProcessControl\NondestructiveTestEdit.aspx" />
<Content Include="CQMS\ProcessControl\NondestructiveTest_New.aspx" /> <Content Include="CQMS\ProcessControl\NondestructiveTest_New.aspx" />
@ -8979,6 +8982,27 @@
<Compile Include="CQMS\ProcessControl\InspectionNoticeEdit.aspx.designer.cs"> <Compile Include="CQMS\ProcessControl\InspectionNoticeEdit.aspx.designer.cs">
<DependentUpon>InspectionNoticeEdit.aspx</DependentUpon> <DependentUpon>InspectionNoticeEdit.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="CQMS\ProcessControl\Meeting.aspx.cs">
<DependentUpon>Meeting.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="CQMS\ProcessControl\Meeting.aspx.designer.cs">
<DependentUpon>Meeting.aspx</DependentUpon>
</Compile>
<Compile Include="CQMS\ProcessControl\MeetingEdit.aspx.cs">
<DependentUpon>MeetingEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="CQMS\ProcessControl\MeetingEdit.aspx.designer.cs">
<DependentUpon>MeetingEdit.aspx</DependentUpon>
</Compile>
<Compile Include="CQMS\ProcessControl\MeetingView.aspx.cs">
<DependentUpon>MeetingView.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="CQMS\ProcessControl\MeetingView.aspx.designer.cs">
<DependentUpon>MeetingView.aspx</DependentUpon>
</Compile>
<Compile Include="CQMS\ProcessControl\NondestructiveTest.aspx.cs"> <Compile Include="CQMS\ProcessControl\NondestructiveTest.aspx.cs">
<DependentUpon>NondestructiveTest.aspx</DependentUpon> <DependentUpon>NondestructiveTest.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>

View File

@ -13,7 +13,7 @@ namespace FineUIPro.Web.TestRun.Meeting
string id = Request.Params["id"]; string id = Request.Params["id"];
if (!string.IsNullOrEmpty(id)) if (!string.IsNullOrEmpty(id))
{ {
Model.Driver_Meeting data = BLL.MeetingService.GetMeetingById(id); Model.Driver_Meeting data = BLL.DriverMeetingService.GetMeetingById(id);
if (data != null) if (data != null)
{ {
this.hdId.Text = id; this.hdId.Text = id;

View File

@ -147,11 +147,11 @@ namespace FineUIPro.Web.TestRun.Meeting
foreach (int rowIndex in Grid1.SelectedRowIndexArray) foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{ {
string rowID = Grid1.DataKeys[rowIndex][0].ToString(); string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var info = BLL.MeetingService.GetMeetingById(rowID); var info = BLL.DriverMeetingService.GetMeetingById(rowID);
if (info != null) if (info != null)
{ {
BLL.MeetingItemService.DeleteMeetingItemByMeetingId(rowID); BLL.MeetingItemService.DeleteMeetingItemByMeetingId(rowID);
BLL.MeetingService.DeleteMeeting(rowID); BLL.DriverMeetingService.DeleteMeeting(rowID);
} }
} }
BindGrid(); BindGrid();
@ -199,7 +199,7 @@ namespace FineUIPro.Web.TestRun.Meeting
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return; return;
} }
var meeting = BLL.MeetingService.GetMeetingById(Grid1.SelectedRowID); var meeting = BLL.DriverMeetingService.GetMeetingById(Grid1.SelectedRowID);
//if (meeting.States == "2") //if (meeting.States == "2")
//{ //{
var items = BLL.MeetingItemService.GetMeetingItemByMeetingId(Grid1.SelectedRowID); var items = BLL.MeetingItemService.GetMeetingItemByMeetingId(Grid1.SelectedRowID);

View File

@ -18,7 +18,7 @@ namespace FineUIPro.Web.TestRun.Meeting
string id = Request.Params["id"]; string id = Request.Params["id"];
if (!string.IsNullOrEmpty(id)) if (!string.IsNullOrEmpty(id))
{ {
Model.Driver_Meeting data = BLL.MeetingService.GetMeetingById(id); Model.Driver_Meeting data = BLL.DriverMeetingService.GetMeetingById(id);
if (data != null) if (data != null)
{ {
this.hdId.Text = id; this.hdId.Text = id;
@ -77,7 +77,7 @@ namespace FineUIPro.Web.TestRun.Meeting
if (!string.IsNullOrEmpty(id)) if (!string.IsNullOrEmpty(id))
{ {
newData.MeetingId = id; newData.MeetingId = id;
BLL.MeetingService.UpdateMeeting(newData); BLL.DriverMeetingService.UpdateMeeting(newData);
} }
else else
{ {
@ -90,7 +90,7 @@ namespace FineUIPro.Web.TestRun.Meeting
newData.MeetingId = SQLHelper.GetNewID(typeof(Model.Driver_Meeting)); newData.MeetingId = SQLHelper.GetNewID(typeof(Model.Driver_Meeting));
this.hdId.Text = newData.MeetingId; this.hdId.Text = newData.MeetingId;
} }
BLL.MeetingService.AddMeeting(newData); BLL.DriverMeetingService.AddMeeting(newData);
} }
#region #region
@ -167,7 +167,7 @@ namespace FineUIPro.Web.TestRun.Meeting
chidNode.Checked = true; chidNode.Checked = true;
chidNode.Expanded = true; chidNode.Expanded = true;
chidNode.Selectable = true; chidNode.Selectable = true;
var meeting = BLL.MeetingService.GetMeetingById(this.hdId.Text.Trim()); var meeting = BLL.DriverMeetingService.GetMeetingById(this.hdId.Text.Trim());
if (meeting != null) if (meeting != null)
{ {
if (i.IsMeeting == true) if (i.IsMeeting == true)

View File

@ -280,7 +280,7 @@ namespace FineUIPro.Web.TestRun.Meeting
// chidNode.Checked = true; // chidNode.Checked = true;
// chidNode.Expanded = true; // chidNode.Expanded = true;
// chidNode.Selectable = true; // chidNode.Selectable = true;
// //var meeting = BLL.MeetingService.GetMeetingById(this.hdId.Text.Trim()); // //var meeting = BLL.DriverMeetingService.GetMeetingById(this.hdId.Text.Trim());
// //if (meeting != null) // //if (meeting != null)
// //{ // //{
// // if (meeting.States == "2") // // if (meeting.States == "2")

View File

@ -170,11 +170,11 @@ namespace FineUIPro.Web.TestRun.Meeting
foreach (int rowIndex in Grid1.SelectedRowIndexArray) foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{ {
string rowID = Grid1.DataKeys[rowIndex][0].ToString(); string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var info = BLL.MeetingService.GetMeetingById(rowID); var info = BLL.DriverMeetingService.GetMeetingById(rowID);
if (info != null) if (info != null)
{ {
BLL.MeetingItemService.DeleteMeetingItemByMeetingId(rowID); BLL.MeetingItemService.DeleteMeetingItemByMeetingId(rowID);
BLL.MeetingService.DeleteMeeting(rowID); BLL.DriverMeetingService.DeleteMeeting(rowID);
} }
} }
BindGrid(); BindGrid();
@ -260,7 +260,7 @@ namespace FineUIPro.Web.TestRun.Meeting
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return; return;
} }
//var meeting = BLL.MeetingService.GetMeetingById(Grid1.SelectedRowID); //var meeting = BLL.DriverMeetingService.GetMeetingById(Grid1.SelectedRowID);
//if (meeting.States == "2") //if (meeting.States == "2")
//{ //{
// var items = BLL.MeetingItemService.GetMeetingItemByMeetingId(Grid1.SelectedRowID); // var items = BLL.MeetingItemService.GetMeetingItemByMeetingId(Grid1.SelectedRowID);

View File

@ -19,7 +19,7 @@ namespace FineUIPro.Web.TestRun.Meeting
string id = Request.Params["id"]; string id = Request.Params["id"];
if (!string.IsNullOrEmpty(id)) if (!string.IsNullOrEmpty(id))
{ {
Model.Driver_Meeting data = BLL.MeetingService.GetMeetingById(id); Model.Driver_Meeting data = BLL.DriverMeetingService.GetMeetingById(id);
if (data != null) if (data != null)
{ {
this.hdId.Text = id; this.hdId.Text = id;
@ -140,7 +140,7 @@ namespace FineUIPro.Web.TestRun.Meeting
if (!string.IsNullOrEmpty(id)) if (!string.IsNullOrEmpty(id))
{ {
newData.MeetingId = id; newData.MeetingId = id;
BLL.MeetingService.UpdateMeeting(newData); BLL.DriverMeetingService.UpdateMeeting(newData);
} }
else else
{ {
@ -154,7 +154,7 @@ namespace FineUIPro.Web.TestRun.Meeting
newData.MeetingId = SQLHelper.GetNewID(typeof(Model.Driver_Meeting)); newData.MeetingId = SQLHelper.GetNewID(typeof(Model.Driver_Meeting));
this.hdId.Text = newData.MeetingId; this.hdId.Text = newData.MeetingId;
} }
BLL.MeetingService.AddMeeting(newData); BLL.DriverMeetingService.AddMeeting(newData);
} }
#region #region
@ -234,7 +234,7 @@ namespace FineUIPro.Web.TestRun.Meeting
chidNode.Checked = true; chidNode.Checked = true;
chidNode.Expanded = true; chidNode.Expanded = true;
chidNode.Selectable = true; chidNode.Selectable = true;
//var meeting = BLL.MeetingService.GetMeetingById(this.hdId.Text.Trim()); //var meeting = BLL.DriverMeetingService.GetMeetingById(this.hdId.Text.Trim());
//if (meeting != null) //if (meeting != null)
//{ //{
// if (meeting.States == "2") // if (meeting.States == "2")

View File

@ -18,7 +18,7 @@ namespace FineUIPro.Web.TestRun.Meeting
string id = Request.Params["id"]; string id = Request.Params["id"];
if (!string.IsNullOrEmpty(id)) if (!string.IsNullOrEmpty(id))
{ {
Model.Driver_Meeting data = BLL.MeetingService.GetMeetingById(id); Model.Driver_Meeting data = BLL.DriverMeetingService.GetMeetingById(id);
if (data != null) if (data != null)
{ {
this.hdId.Text = id; this.hdId.Text = id;
@ -120,7 +120,7 @@ namespace FineUIPro.Web.TestRun.Meeting
chidNode.Checked = true; chidNode.Checked = true;
chidNode.Expanded = true; chidNode.Expanded = true;
chidNode.Selectable = true; chidNode.Selectable = true;
//var meeting = BLL.MeetingService.GetMeetingById(this.hdId.Text.Trim()); //var meeting = BLL.DriverMeetingService.GetMeetingById(this.hdId.Text.Trim());
//if (meeting != null) //if (meeting != null)
//{ //{
// if (meeting.States == "2") // if (meeting.States == "2")

View File

@ -170,11 +170,11 @@ namespace FineUIPro.Web.TestRun.Meeting
foreach (int rowIndex in Grid1.SelectedRowIndexArray) foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{ {
string rowID = Grid1.DataKeys[rowIndex][0].ToString(); string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var info = BLL.MeetingService.GetMeetingById(rowID); var info = BLL.DriverMeetingService.GetMeetingById(rowID);
if (info != null) if (info != null)
{ {
BLL.MeetingItemService.DeleteMeetingItemByMeetingId(rowID); BLL.MeetingItemService.DeleteMeetingItemByMeetingId(rowID);
BLL.MeetingService.DeleteMeeting(rowID); BLL.DriverMeetingService.DeleteMeeting(rowID);
} }
} }
BindGrid(); BindGrid();
@ -267,7 +267,7 @@ namespace FineUIPro.Web.TestRun.Meeting
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return; return;
} }
//var meeting = BLL.MeetingService.GetMeetingById(Grid1.SelectedRowID); //var meeting = BLL.DriverMeetingService.GetMeetingById(Grid1.SelectedRowID);
//if (meeting.States == "2") //if (meeting.States == "2")
//{ //{
// var items = BLL.MeetingItemService.GetMeetingItemByMeetingId(Grid1.SelectedRowID); // var items = BLL.MeetingItemService.GetMeetingItemByMeetingId(Grid1.SelectedRowID);

View File

@ -19,7 +19,7 @@ namespace FineUIPro.Web.TestRun.Meeting
string id = Request.Params["id"]; string id = Request.Params["id"];
if (!string.IsNullOrEmpty(id)) if (!string.IsNullOrEmpty(id))
{ {
Model.Driver_Meeting data = BLL.MeetingService.GetMeetingById(id); Model.Driver_Meeting data = BLL.DriverMeetingService.GetMeetingById(id);
if (data != null) if (data != null)
{ {
this.hdId.Text = id; this.hdId.Text = id;
@ -140,7 +140,7 @@ namespace FineUIPro.Web.TestRun.Meeting
if (!string.IsNullOrEmpty(id)) if (!string.IsNullOrEmpty(id))
{ {
newData.MeetingId = id; newData.MeetingId = id;
BLL.MeetingService.UpdateMeeting(newData); BLL.DriverMeetingService.UpdateMeeting(newData);
} }
else else
{ {
@ -154,7 +154,7 @@ namespace FineUIPro.Web.TestRun.Meeting
newData.MeetingId = SQLHelper.GetNewID(typeof(Model.Driver_Meeting)); newData.MeetingId = SQLHelper.GetNewID(typeof(Model.Driver_Meeting));
this.hdId.Text = newData.MeetingId; this.hdId.Text = newData.MeetingId;
} }
BLL.MeetingService.AddMeeting(newData); BLL.DriverMeetingService.AddMeeting(newData);
} }
#region #region
@ -234,7 +234,7 @@ namespace FineUIPro.Web.TestRun.Meeting
chidNode.Checked = true; chidNode.Checked = true;
chidNode.Expanded = true; chidNode.Expanded = true;
chidNode.Selectable = true; chidNode.Selectable = true;
//var meeting = BLL.MeetingService.GetMeetingById(this.hdId.Text.Trim()); //var meeting = BLL.DriverMeetingService.GetMeetingById(this.hdId.Text.Trim());
//if (meeting != null) //if (meeting != null)
//{ //{
// if (meeting.States == "2") // if (meeting.States == "2")

View File

@ -18,7 +18,7 @@ namespace FineUIPro.Web.TestRun.Meeting
string id = Request.Params["id"]; string id = Request.Params["id"];
if (!string.IsNullOrEmpty(id)) if (!string.IsNullOrEmpty(id))
{ {
Model.Driver_Meeting data = BLL.MeetingService.GetMeetingById(id); Model.Driver_Meeting data = BLL.DriverMeetingService.GetMeetingById(id);
if (data != null) if (data != null)
{ {
this.hdId.Text = id; this.hdId.Text = id;
@ -120,7 +120,7 @@ namespace FineUIPro.Web.TestRun.Meeting
chidNode.Checked = true; chidNode.Checked = true;
chidNode.Expanded = true; chidNode.Expanded = true;
chidNode.Selectable = true; chidNode.Selectable = true;
//var meeting = BLL.MeetingService.GetMeetingById(this.hdId.Text.Trim()); //var meeting = BLL.DriverMeetingService.GetMeetingById(this.hdId.Text.Trim());
//if (meeting != null) //if (meeting != null)
//{ //{
// if (meeting.States == "2") // if (meeting.States == "2")

View File

@ -170,11 +170,11 @@ namespace FineUIPro.Web.TestRun.Meeting
foreach (int rowIndex in Grid1.SelectedRowIndexArray) foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{ {
string rowID = Grid1.DataKeys[rowIndex][0].ToString(); string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var info = BLL.MeetingService.GetMeetingById(rowID); var info = BLL.DriverMeetingService.GetMeetingById(rowID);
if (info != null) if (info != null)
{ {
BLL.MeetingItemService.DeleteMeetingItemByMeetingId(rowID); BLL.MeetingItemService.DeleteMeetingItemByMeetingId(rowID);
BLL.MeetingService.DeleteMeeting(rowID); BLL.DriverMeetingService.DeleteMeeting(rowID);
} }
} }
BindGrid(); BindGrid();
@ -267,7 +267,7 @@ namespace FineUIPro.Web.TestRun.Meeting
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return; return;
} }
//var meeting = BLL.MeetingService.GetMeetingById(Grid1.SelectedRowID); //var meeting = BLL.DriverMeetingService.GetMeetingById(Grid1.SelectedRowID);
//if (meeting.States == "2") //if (meeting.States == "2")
//{ //{
// var items = BLL.MeetingItemService.GetMeetingItemByMeetingId(Grid1.SelectedRowID); // var items = BLL.MeetingItemService.GetMeetingItemByMeetingId(Grid1.SelectedRowID);

View File

@ -19,7 +19,7 @@ namespace FineUIPro.Web.TestRun.Meeting
string id = Request.Params["id"]; string id = Request.Params["id"];
if (!string.IsNullOrEmpty(id)) if (!string.IsNullOrEmpty(id))
{ {
Model.Driver_Meeting data = BLL.MeetingService.GetMeetingById(id); Model.Driver_Meeting data = BLL.DriverMeetingService.GetMeetingById(id);
if (data != null) if (data != null)
{ {
this.hdId.Text = id; this.hdId.Text = id;
@ -140,7 +140,7 @@ namespace FineUIPro.Web.TestRun.Meeting
if (!string.IsNullOrEmpty(id)) if (!string.IsNullOrEmpty(id))
{ {
newData.MeetingId = id; newData.MeetingId = id;
BLL.MeetingService.UpdateMeeting(newData); BLL.DriverMeetingService.UpdateMeeting(newData);
} }
else else
{ {
@ -154,7 +154,7 @@ namespace FineUIPro.Web.TestRun.Meeting
newData.MeetingId = SQLHelper.GetNewID(typeof(Model.Driver_Meeting)); newData.MeetingId = SQLHelper.GetNewID(typeof(Model.Driver_Meeting));
this.hdId.Text = newData.MeetingId; this.hdId.Text = newData.MeetingId;
} }
BLL.MeetingService.AddMeeting(newData); BLL.DriverMeetingService.AddMeeting(newData);
} }
#region #region
@ -235,7 +235,7 @@ namespace FineUIPro.Web.TestRun.Meeting
chidNode.Expanded = true; chidNode.Expanded = true;
chidNode.Selectable = true; chidNode.Selectable = true;
//var meeting = BLL.MeetingService.GetMeetingById(this.hdId.Text.Trim()); //var meeting = BLL.DriverMeetingService.GetMeetingById(this.hdId.Text.Trim());
//if (meeting != null) //if (meeting != null)
//{ //{
// if (meeting.States == "2") // if (meeting.States == "2")

View File

@ -18,7 +18,7 @@ namespace FineUIPro.Web.TestRun.Meeting
string id = Request.Params["id"]; string id = Request.Params["id"];
if (!string.IsNullOrEmpty(id)) if (!string.IsNullOrEmpty(id))
{ {
Model.Driver_Meeting data = BLL.MeetingService.GetMeetingById(id); Model.Driver_Meeting data = BLL.DriverMeetingService.GetMeetingById(id);
if (data != null) if (data != null)
{ {
this.hdId.Text = id; this.hdId.Text = id;
@ -120,7 +120,7 @@ namespace FineUIPro.Web.TestRun.Meeting
chidNode.Checked = true; chidNode.Checked = true;
chidNode.Expanded = true; chidNode.Expanded = true;
chidNode.Selectable = true; chidNode.Selectable = true;
//var meeting = BLL.MeetingService.GetMeetingById(this.hdId.Text.Trim()); //var meeting = BLL.DriverMeetingService.GetMeetingById(this.hdId.Text.Trim());
//if (meeting != null) //if (meeting != null)
//{ //{
// if (meeting.States == "2") // if (meeting.States == "2")

View File

@ -114,6 +114,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
} }
else else
{ {
this.ddlInspectionUnit.SelectedValue = thisUnitId;
this.ddlCheckUnitId.SelectedValue = thisUnitId; this.ddlCheckUnitId.SelectedValue = thisUnitId;
} }
BLL.UserService.InitUserDropDownList(this.ddlInsResponsibleUserId, null, true, this.ddlCheckUnitId.SelectedValue); BLL.UserService.InitUserDropDownList(this.ddlInsResponsibleUserId, null, true, this.ddlCheckUnitId.SelectedValue);

View File

@ -43,6 +43,7 @@
<TreeNode id="e6b18529-5d1b-4fde-bdab-7354b996e5de" Text="热处理检测" NavigateUrl="CQMS/ProcessControl/HotProessManage.aspx"></TreeNode> <TreeNode id="e6b18529-5d1b-4fde-bdab-7354b996e5de" Text="热处理检测" NavigateUrl="CQMS/ProcessControl/HotProessManage.aspx"></TreeNode>
<TreeNode id="6177c436-5cc7-4ed9-929c-6b7d2082fd28" Text="管道试压包管理" NavigateUrl="CQMS/ProcessControl/TestPackageManagement.aspx"></TreeNode> <TreeNode id="6177c436-5cc7-4ed9-929c-6b7d2082fd28" Text="管道试压包管理" NavigateUrl="CQMS/ProcessControl/TestPackageManagement.aspx"></TreeNode>
<TreeNode id="3e0bf9b3-b497-4627-b93c-367dd60f901d" Text="检查人检查次数统计" NavigateUrl="CQMS/ProcessControl/CheckManStatistics.aspx"></TreeNode> <TreeNode id="3e0bf9b3-b497-4627-b93c-367dd60f901d" Text="检查人检查次数统计" NavigateUrl="CQMS/ProcessControl/CheckManStatistics.aspx"></TreeNode>
<TreeNode id="30754DF1-CB18-4F53-BB66-2B2A398D7180" Text="质量会议" NavigateUrl="CQMS/ProcessControl/Meeting.aspx"></TreeNode>
</TreeNode> </TreeNode>
<TreeNode id="7ecf0229-8a0b-40ce-8b04-e556f7bd3394" Text="质量报表管理" NavigateUrl=""><TreeNode id="69327975-cd18-4443-8d2c-c8b6e31be5ef" Text="现场检查情况" NavigateUrl="CQMS/ManageReport/CheckStatisc.aspx"></TreeNode> <TreeNode id="7ecf0229-8a0b-40ce-8b04-e556f7bd3394" Text="质量报表管理" NavigateUrl=""><TreeNode id="69327975-cd18-4443-8d2c-c8b6e31be5ef" Text="现场检查情况" NavigateUrl="CQMS/ManageReport/CheckStatisc.aspx"></TreeNode>
<TreeNode id="e58366b4-70a5-41d1-a26f-0ab4a234004c" Text="现场焊接无损检测情况" NavigateUrl="CQMS/ManageReport/HJGLStatisc.aspx"></TreeNode> <TreeNode id="e58366b4-70a5-41d1-a26f-0ab4a234004c" Text="现场焊接无损检测情况" NavigateUrl="CQMS/ManageReport/HJGLStatisc.aspx"></TreeNode>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Tree>
</Tree>

View File

@ -9,19 +9,33 @@ namespace Model
public class CqmsMeetingSyncData public class CqmsMeetingSyncData
{ {
/// <summary> /// <summary>
/// 公司社会统一信用代 /// 分包单位社会统一信用
/// </summary> /// </summary>
public string CollCropCode { get; set; } public string CollCropCode { get; set; }
/// <summary> /// <summary>
/// 项目id /// 分包单位Id
/// </summary> /// </summary>
public string ProjectId { get; set; } public string UnitId { get; set; }
/// <summary> /// <summary>
/// 分包单位程序访问地址 /// 分包单位名称
/// </summary>
public string UnitName { get; set; }
/// <summary>
/// 分包单位简称
/// </summary>
public string ShortUnitName { get; set; }
/// <summary>
/// 分包单位域名
/// </summary> /// </summary>
public string UnitDomain { get; set; } public string UnitDomain { get; set; }
/// <summary>
/// 总包单位Id
/// </summary>
public string SubjectUnit { get; set; }
/// <summary>
/// 总包单位项目Id
/// </summary>
public string SubjectProject { get; set; }
/// <summary> /// <summary>
/// 质量会议数据列表 /// 质量会议数据列表
@ -82,12 +96,12 @@ namespace Model
/// <summary> /// <summary>
/// 主持人ID /// 主持人ID
/// </summary> /// </summary>
public string MeetingHostMan { get; set; } public string MeetingHostManId { get; set; }
/// <summary> /// <summary>
/// 主持人姓名 /// 主持人姓名
/// </summary> /// </summary>
public string MeetingHostManName { get; set; } public string MeetingHostMan { get; set; }
/// <summary> /// <summary>
/// 其他主持人 /// 其他主持人
@ -134,9 +148,32 @@ namespace Model
/// </summary> /// </summary>
public string States { get; set; } public string States { get; set; }
///// <summary>
///// 数据来源1-同步数据)
///// </summary>
//public string DataSource { get; set; }
/// <summary> /// <summary>
/// 数据来源1-同步数据) /// 内容附件
/// </summary> /// </summary>
public string DataSource { get; set; } public string AttachFileId { get; set; }
public string ToKeyId { get; set; }
public string AttachSource { get; set; }
public string AttachUrl { get; set; }
/// <summary>
/// 签到表
/// </summary>
public string AttachFileId1 { get; set; }
public string ToKeyId1 { get; set; }
public string AttachSource1 { get; set; }
public string AttachUrl1 { get; set; }
/// <summary>
/// 会议过程
/// </summary>
public string AttachFileId2 { get; set; }
public string ToKeyId2 { get; set; }
public string AttachSource2 { get; set; }
public string AttachUrl2 { get; set; }
} }
} }

View File

@ -9,19 +9,33 @@ namespace Model
public class InspectionMachineSyncData public class InspectionMachineSyncData
{ {
/// <summary> /// <summary>
/// 公司社会统一信用代 /// 分包单位社会统一信用
/// </summary> /// </summary>
public string CollCropCode { get; set; } public string CollCropCode { get; set; }
/// <summary> /// <summary>
/// 项目id /// 分包单位Id
/// </summary> /// </summary>
public string ProjectId { get; set; } public string UnitId { get; set; }
/// <summary> /// <summary>
/// 分包单位程序访问地址 /// 分包单位名称
/// </summary>
public string UnitName { get; set; }
/// <summary>
/// 分包单位简称
/// </summary>
public string ShortUnitName { get; set; }
/// <summary>
/// 分包单位域名
/// </summary> /// </summary>
public string UnitDomain { get; set; } public string UnitDomain { get; set; }
/// <summary>
/// 总包单位Id
/// </summary>
public string SubjectUnit { get; set; }
/// <summary>
/// 总包单位项目Id
/// </summary>
public string SubjectProject { get; set; }
/// <summary> /// <summary>
/// 质量计量器具数据列表 /// 质量计量器具数据列表
@ -158,5 +172,13 @@ namespace Model
/// 数据来源1-同步数据) /// 数据来源1-同步数据)
/// </summary> /// </summary>
public string DataSource { get; set; } public string DataSource { get; set; }
/// <summary>
/// 附件
/// </summary>
public string AttachFileId { get; set; }
public string ToKeyId { get; set; }
public string AttachSource { get; set; }
//public string AttachUrl { get; set; }
} }
} }

View File

@ -99574,6 +99574,8 @@ namespace Model
private System.Nullable<int> _RemarkCode; private System.Nullable<int> _RemarkCode;
private string _SourceDes;
private EntityRef<Base_CNProfessional> _Base_CNProfessional; private EntityRef<Base_CNProfessional> _Base_CNProfessional;
private EntityRef<Base_Project> _Base_Project; private EntityRef<Base_Project> _Base_Project;
@ -99628,6 +99630,8 @@ namespace Model
partial void OnAuditManChanged(); partial void OnAuditManChanged();
partial void OnRemarkCodeChanging(System.Nullable<int> value); partial void OnRemarkCodeChanging(System.Nullable<int> value);
partial void OnRemarkCodeChanged(); partial void OnRemarkCodeChanged();
partial void OnSourceDesChanging(string value);
partial void OnSourceDesChanged();
#endregion #endregion
public Comprehensive_InspectionMachine() public Comprehensive_InspectionMachine()
@ -100090,6 +100094,26 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SourceDes", DbType="NVarChar(500)")]
public string SourceDes
{
get
{
return this._SourceDes;
}
set
{
if ((this._SourceDes != value))
{
this.OnSourceDesChanging(value);
this.SendPropertyChanging();
this._SourceDes = value;
this.SendPropertyChanged("SourceDes");
this.OnSourceDesChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_InspectionMachine_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)] [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_InspectionMachine_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)]
public Base_CNProfessional Base_CNProfessional public Base_CNProfessional Base_CNProfessional
{ {
@ -122165,6 +122189,8 @@ namespace Model
private string _MeetingHostManOther; private string _MeetingHostManOther;
private string _SourceDes;
private EntityRef<Base_Project> _Base_Project; private EntityRef<Base_Project> _Base_Project;
private EntityRef<Base_Unit> _Base_Unit; private EntityRef<Base_Unit> _Base_Unit;
@ -122213,6 +122239,8 @@ namespace Model
partial void OnAttentPersonIdsChanged(); partial void OnAttentPersonIdsChanged();
partial void OnMeetingHostManOtherChanging(string value); partial void OnMeetingHostManOtherChanging(string value);
partial void OnMeetingHostManOtherChanged(); partial void OnMeetingHostManOtherChanged();
partial void OnSourceDesChanging(string value);
partial void OnSourceDesChanged();
#endregion #endregion
public CQMS_Meeting() public CQMS_Meeting()
@ -122600,6 +122628,26 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SourceDes", DbType="NVarChar(500)")]
public string SourceDes
{
get
{
return this._SourceDes;
}
set
{
if ((this._SourceDes != value))
{
this.OnSourceDesChanging(value);
this.SendPropertyChanging();
this._SourceDes = value;
this.SendPropertyChanged("SourceDes");
this.OnSourceDesChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_CQMS_Meeting_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_CQMS_Meeting_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project public Base_Project Base_Project
{ {

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,72 @@
using BLL;
using System;
using System.Linq;
using System.Web.Http;
namespace WebAPI.Controllers
{
/// <summary>
/// 质量会议同步控制器
/// </summary>
public class CqmsMeetingSyncController : ApiController
{
#region
/// <summary>
/// 推送质量会议数据
/// </summary>
/// <param name="projectId">项目ID</param>
/// <param name="dataId">数据ID可选</param>
/// <returns>响应数据</returns>
[HttpPost]
public Model.ResponeData pushCqmsMeetingLists(string projectId, string dataId)
{
var responeData = new Model.ResponeData();
try
{
var returndata = APICqmsMeetingSyncService.PushCqmsMeetingLists(projectId, dataId);
responeData.code = returndata.code;
responeData.message = returndata.message;
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region
/// <summary>
/// 接收保存质量会议数据
/// </summary>
/// <param name="newItem">质量会议同步数据</param>
/// <returns>响应数据</returns>
[HttpPost]
public Model.ResponeData SaveCqmsMeetingSyncData([FromBody] Model.CqmsMeetingSyncData newItem)
{
var responeData = new Model.ResponeData();
try
{
responeData.code = 1;
responeData.message = APICqmsMeetingSyncService.SaveCqmsMeetingSyncData(newItem);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
}
}

View File

@ -0,0 +1,70 @@
using BLL;
using System;
using System.Linq;
using System.Web.Http;
namespace WebAPI.Controllers
{
/// <summary>
/// 质量计量器具同步控制器
/// </summary>
public class InspectionMachineSyncController : ApiController
{
#region
/// <summary>
/// 分包单位推送数据到总包单位
/// </summary>
/// <param name="projectId">项目ID</param>
/// <param name="dataId">数据ID可选</param>
/// <returns>响应数据</returns>
[HttpPost]
public Model.ResponeData pushInspectionMachineLists(string projectId, string dataId)
{
var responeData = new Model.ResponeData();
try
{
var returndata = APIInspectionMachineSyncService.PushInspectionMachineLists(projectId, dataId);
responeData.code = returndata.code;
responeData.message = returndata.message;
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region
/// <summary>
/// 总包单位接收分包单位推送数据
/// </summary>
/// <param name="newItem">质量计量器具同步数据</param>
/// <returns>响应数据</returns>
[HttpPost]
public Model.ResponeData SaveInspectionMachineSyncData([FromBody] Model.InspectionMachineSyncData newItem)
{
var responeData = new Model.ResponeData();
try
{
responeData.code = 1;
responeData.message = APIInspectionMachineSyncService.SaveInspectionMachineSyncData(newItem);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
}
}

View File

@ -106,6 +106,8 @@ namespace WebAPI.Filter
"CNCECServer*PostGetHJGLData", "CNCECServer*PostGetHJGLData",
"AIAlarmEvent*alarmEvent", "AIAlarmEvent*alarmEvent",
"SGManPower*getSGPersonWarningStatistics", "SGManPower*getSGPersonWarningStatistics",
"InspectionMachineSync*SaveInspectionMachineSyncData",
"CqmsMeetingSync*SaveCqmsMeetingSyncData",
"MeetingSync*ReceiveSaveProjectClassMeetingData", "MeetingSync*ReceiveSaveProjectClassMeetingData",
"LicenseSync*ReceiveSaveProjectLicenseManagerData", "LicenseSync*ReceiveSaveProjectLicenseManagerData",
"PersonSync*getPersonLists" "PersonSync*getPersonLists"

View File

@ -6,7 +6,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<_PublishTargetUrl>G:\发布\五环WebApi</_PublishTargetUrl> <_PublishTargetUrl>G:\发布\五环WebApi</_PublishTargetUrl>
<History>True|2026-03-11T11:40:09.7470523Z||;True|2026-03-11T17:57:46.6298303+08:00||;True|2026-03-06T12:42:13.4499176+08:00||;True|2026-03-05T15:19:57.4320764+08:00||;True|2026-03-04T19:14:37.2772043+08:00||;True|2026-03-01T17:32:51.9305697+08:00||;True|2026-03-01T16:45:09.4172340+08:00||;True|2026-03-01T14:50:18.5222913+08:00||;True|2026-02-28T17:34:46.4778856+08:00||;True|2026-02-28T15:29:45.4981175+08:00||;True|2026-02-28T15:22:44.8350431+08:00||;True|2026-02-28T15:16:49.0265188+08:00||;True|2026-02-28T15:01:52.0489798+08:00||;True|2026-02-28T14:40:09.1723344+08:00||;True|2026-02-28T09:47:26.7601751+08:00||;True|2026-01-24T15:12:59.9025754+08:00||;True|2026-01-19T14:30:45.4370000+08:00||;True|2025-12-24T19:02:35.3684081+08:00||;True|2025-12-18T09:29:13.2909255+08:00||;True|2025-11-25T10:18:00.9729814+08:00||;True|2025-11-25T10:14:14.6947178+08:00||;True|2025-11-25T10:06:29.1167142+08:00||;True|2025-11-25T09:25:18.3566779+08:00||;True|2025-11-24T16:07:37.5433070+08:00||;True|2025-11-19T19:50:54.0090859+08:00||;True|2025-11-19T19:29:28.5861506+08:00||;True|2025-11-19T19:14:02.6887533+08:00||;True|2025-11-19T19:08:28.7856694+08:00||;True|2025-11-17T14:41:29.0529618+08:00||;True|2025-11-17T12:28:22.9224307+08:00||;True|2025-11-17T11:17:50.1481769+08:00||;True|2025-11-07T14:46:56.1446809+08:00||;True|2025-11-05T09:32:06.4998794+08:00||;True|2025-11-04T16:39:28.2175670+08:00||;True|2025-11-04T16:39:02.3610432+08:00||;True|2025-11-04T15:44:06.1295264+08:00||;True|2025-10-31T16:41:11.6570385+08:00||;True|2025-10-30T15:58:05.2014433+08:00||;True|2025-10-29T16:22:27.7866967+08:00||;True|2025-10-29T11:19:32.1187038+08:00||;True|2025-10-24T15:59:19.4176668+08:00||;True|2025-10-23T10:17:32.2384443+08:00||;True|2025-10-23T10:09:35.0601937+08:00||;True|2025-10-23T09:59:27.2018799+08:00||;True|2025-09-29T15:39:36.8617347+08:00||;True|2025-09-29T11:28:10.9193152+08:00||;True|2025-09-29T10:59:58.2893583+08:00||;True|2025-09-23T16:56:39.6344263+08:00||;True|2025-09-23T16:44:57.4175593+08:00||;True|2025-09-23T16:44:35.0478492+08:00||;True|2025-09-23T16:06:50.5843534+08:00||;True|2025-09-22T20:54:35.9805610+08:00||;True|2025-09-22T20:45:58.7044128+08:00||;True|2025-09-22T20:40:46.7449595+08:00||;True|2025-09-22T15:14:22.9602725+08:00||;True|2025-09-22T15:08:27.5989706+08:00||;True|2025-09-22T14:54:19.5237685+08:00||;True|2025-09-18T09:53:17.9300539+08:00||;True|2025-09-16T19:11:12.4383069+08:00||;True|2025-09-02T11:14:00.9580707+08:00||;True|2025-09-02T10:52:20.0445598+08:00||;True|2025-08-29T17:56:01.6245615+08:00||;True|2025-08-29T17:55:41.2802685+08:00||;True|2025-08-09T21:27:40.2103961+08:00||;True|2025-08-06T15:31:52.1166645+08:00||;True|2025-08-04T18:56:13.9675910+08:00||;True|2025-07-23T11:12:18.0134770+08:00||;True|2025-07-23T10:36:09.9990536+08:00||;True|2025-07-23T10:35:51.8814789+08:00||;True|2025-07-21T17:46:45.4620710+08:00||;True|2025-07-21T17:40:43.9871097+08:00||;True|2025-07-21T17:29:11.9275869+08:00||;True|2025-07-21T17:05:21.7763763+08:00||;True|2025-07-18T17:55:59.4892329+08:00||;True|2025-07-18T11:08:56.2628896+08:00||;True|2025-07-18T10:53:44.2534260+08:00||;True|2025-07-18T10:27:52.6751668+08:00||;True|2025-07-18T10:03:09.1785776+08:00||;True|2025-07-18T10:02:38.1252107+08:00||;True|2025-07-17T18:19:07.5837609+08:00||;True|2025-07-17T15:40:11.9126705+08:00||;True|2025-07-11T17:54:03.0298703+08:00||;True|2025-07-11T16:19:50.3283029+08:00||;True|2025-07-11T15:49:22.5920473+08:00||;True|2025-07-02T14:39:27.0436873+08:00||;True|2025-07-02T11:18:29.1208369+08:00||;True|2025-07-01T15:52:16.6767496+08:00||;True|2025-07-01T10:14:59.0471052+08:00||;True|2025-06-28T11:40:36.0544739+08:00||;True|2025-06-27T15:10:24.4628086+08:00||;True|2025-06-27T10:31:14.8332810+08:00||;True|2025-06-27T10:13:13.3022394+08:00||;True|2025-06-26T23:51:04.1304509+08:00||;True|2025-06-26T23:34:06.4223762+08:00||;True|2025-06-26T22:42:08.9018138+08:00||;True|2025-06-26T22:16:01.8954571+08:00||;True|2025-06-26T21:19:42.2638204+08:00||;True|2025-06-25T23:22:39.7267591+08:00||;True|2025-06-25T23:19:33.2378458+08:00||;True|2025-06-25T22:18:16.2863303+08:00||;</History> <History>True|2026-03-20T08:59:16.0930705Z||;True|2026-03-11T19:40:09.7470523+08:00||;True|2026-03-11T17:57:46.6298303+08:00||;True|2026-03-06T12:42:13.4499176+08:00||;True|2026-03-05T15:19:57.4320764+08:00||;True|2026-03-04T19:14:37.2772043+08:00||;True|2026-03-01T17:32:51.9305697+08:00||;True|2026-03-01T16:45:09.4172340+08:00||;True|2026-03-01T14:50:18.5222913+08:00||;True|2026-02-28T17:34:46.4778856+08:00||;True|2026-02-28T15:29:45.4981175+08:00||;True|2026-02-28T15:22:44.8350431+08:00||;True|2026-02-28T15:16:49.0265188+08:00||;True|2026-02-28T15:01:52.0489798+08:00||;True|2026-02-28T14:40:09.1723344+08:00||;True|2026-02-28T09:47:26.7601751+08:00||;True|2026-01-24T15:12:59.9025754+08:00||;True|2026-01-19T14:30:45.4370000+08:00||;True|2025-12-24T19:02:35.3684081+08:00||;True|2025-12-18T09:29:13.2909255+08:00||;True|2025-11-25T10:18:00.9729814+08:00||;True|2025-11-25T10:14:14.6947178+08:00||;True|2025-11-25T10:06:29.1167142+08:00||;True|2025-11-25T09:25:18.3566779+08:00||;True|2025-11-24T16:07:37.5433070+08:00||;True|2025-11-19T19:50:54.0090859+08:00||;True|2025-11-19T19:29:28.5861506+08:00||;True|2025-11-19T19:14:02.6887533+08:00||;True|2025-11-19T19:08:28.7856694+08:00||;True|2025-11-17T14:41:29.0529618+08:00||;True|2025-11-17T12:28:22.9224307+08:00||;True|2025-11-17T11:17:50.1481769+08:00||;True|2025-11-07T14:46:56.1446809+08:00||;True|2025-11-05T09:32:06.4998794+08:00||;True|2025-11-04T16:39:28.2175670+08:00||;True|2025-11-04T16:39:02.3610432+08:00||;True|2025-11-04T15:44:06.1295264+08:00||;True|2025-10-31T16:41:11.6570385+08:00||;True|2025-10-30T15:58:05.2014433+08:00||;True|2025-10-29T16:22:27.7866967+08:00||;True|2025-10-29T11:19:32.1187038+08:00||;True|2025-10-24T15:59:19.4176668+08:00||;True|2025-10-23T10:17:32.2384443+08:00||;True|2025-10-23T10:09:35.0601937+08:00||;True|2025-10-23T09:59:27.2018799+08:00||;True|2025-09-29T15:39:36.8617347+08:00||;True|2025-09-29T11:28:10.9193152+08:00||;True|2025-09-29T10:59:58.2893583+08:00||;True|2025-09-23T16:56:39.6344263+08:00||;True|2025-09-23T16:44:57.4175593+08:00||;True|2025-09-23T16:44:35.0478492+08:00||;True|2025-09-23T16:06:50.5843534+08:00||;True|2025-09-22T20:54:35.9805610+08:00||;True|2025-09-22T20:45:58.7044128+08:00||;True|2025-09-22T20:40:46.7449595+08:00||;True|2025-09-22T15:14:22.9602725+08:00||;True|2025-09-22T15:08:27.5989706+08:00||;True|2025-09-22T14:54:19.5237685+08:00||;True|2025-09-18T09:53:17.9300539+08:00||;True|2025-09-16T19:11:12.4383069+08:00||;True|2025-09-02T11:14:00.9580707+08:00||;True|2025-09-02T10:52:20.0445598+08:00||;True|2025-08-29T17:56:01.6245615+08:00||;True|2025-08-29T17:55:41.2802685+08:00||;True|2025-08-09T21:27:40.2103961+08:00||;True|2025-08-06T15:31:52.1166645+08:00||;True|2025-08-04T18:56:13.9675910+08:00||;True|2025-07-23T11:12:18.0134770+08:00||;True|2025-07-23T10:36:09.9990536+08:00||;True|2025-07-23T10:35:51.8814789+08:00||;True|2025-07-21T17:46:45.4620710+08:00||;True|2025-07-21T17:40:43.9871097+08:00||;True|2025-07-21T17:29:11.9275869+08:00||;True|2025-07-21T17:05:21.7763763+08:00||;True|2025-07-18T17:55:59.4892329+08:00||;True|2025-07-18T11:08:56.2628896+08:00||;True|2025-07-18T10:53:44.2534260+08:00||;True|2025-07-18T10:27:52.6751668+08:00||;True|2025-07-18T10:03:09.1785776+08:00||;True|2025-07-18T10:02:38.1252107+08:00||;True|2025-07-17T18:19:07.5837609+08:00||;True|2025-07-17T15:40:11.9126705+08:00||;True|2025-07-11T17:54:03.0298703+08:00||;True|2025-07-11T16:19:50.3283029+08:00||;True|2025-07-11T15:49:22.5920473+08:00||;True|2025-07-02T14:39:27.0436873+08:00||;True|2025-07-02T11:18:29.1208369+08:00||;True|2025-07-01T15:52:16.6767496+08:00||;True|2025-07-01T10:14:59.0471052+08:00||;True|2025-06-28T11:40:36.0544739+08:00||;True|2025-06-27T15:10:24.4628086+08:00||;True|2025-06-27T10:31:14.8332810+08:00||;True|2025-06-27T10:13:13.3022394+08:00||;True|2025-06-26T23:51:04.1304509+08:00||;True|2025-06-26T23:34:06.4223762+08:00||;True|2025-06-26T22:42:08.9018138+08:00||;True|2025-06-26T22:16:01.8954571+08:00||;True|2025-06-26T21:19:42.2638204+08:00||;True|2025-06-25T23:22:39.7267591+08:00||;True|2025-06-25T23:19:33.2378458+08:00||;</History>
<LastFailureDetails /> <LastFailureDetails />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -86,22 +86,22 @@
<publishTime>10/28/2024 14:02:50</publishTime> <publishTime>10/28/2024 14:02:50</publishTime>
</File> </File>
<File Include="bin/App_global.asax.compiled"> <File Include="bin/App_global.asax.compiled">
<publishTime>03/16/2026 20:03:36</publishTime> <publishTime>03/20/2026 16:59:13</publishTime>
</File> </File>
<File Include="bin/App_global.asax.dll"> <File Include="bin/App_global.asax.dll">
<publishTime>03/16/2026 20:03:36</publishTime> <publishTime>03/20/2026 16:59:13</publishTime>
</File> </File>
<File Include="bin/Aspose.Words.dll"> <File Include="bin/Aspose.Words.dll">
<publishTime>12/06/2024 20:13:58</publishTime> <publishTime>12/06/2024 20:13:58</publishTime>
</File> </File>
<File Include="bin/BLL.dll"> <File Include="bin/BLL.dll">
<publishTime>03/16/2026 20:03:13</publishTime> <publishTime>03/20/2026 16:58:51</publishTime>
</File> </File>
<File Include="bin/BLL.dll.config"> <File Include="bin/BLL.dll.config">
<publishTime>12/26/2024 09:46:52</publishTime> <publishTime>12/26/2024 09:46:52</publishTime>
</File> </File>
<File Include="bin/BLL.pdb"> <File Include="bin/BLL.pdb">
<publishTime>03/16/2026 20:03:13</publishTime> <publishTime>03/20/2026 16:58:51</publishTime>
</File> </File>
<File Include="bin/BouncyCastle.Crypto.dll"> <File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>12/18/2020 05:32:28</publishTime> <publishTime>12/18/2020 05:32:28</publishTime>
@ -128,13 +128,13 @@
<publishTime>07/25/2012 19:48:56</publishTime> <publishTime>07/25/2012 19:48:56</publishTime>
</File> </File>
<File Include="bin/Model.dll"> <File Include="bin/Model.dll">
<publishTime>03/16/2026 20:03:05</publishTime> <publishTime>03/20/2026 16:58:45</publishTime>
</File> </File>
<File Include="bin/Model.pdb"> <File Include="bin/Model.pdb">
<publishTime>03/16/2026 20:03:05</publishTime> <publishTime>03/20/2026 16:58:45</publishTime>
</File> </File>
<File Include="bin/netstandard.dll"> <File Include="bin/netstandard.dll">
<publishTime>03/11/2026 09:12:36</publishTime> <publishTime>03/16/2026 20:22:47</publishTime>
</File> </File>
<File Include="bin/Newtonsoft.Json.dll"> <File Include="bin/Newtonsoft.Json.dll">
<publishTime>03/18/2021 04:03:36</publishTime> <publishTime>03/18/2021 04:03:36</publishTime>
@ -332,7 +332,7 @@
<publishTime>04/15/2020 06:49:20</publishTime> <publishTime>04/15/2020 06:49:20</publishTime>
</File> </File>
<File Include="bin/System.IO.Compression.dll"> <File Include="bin/System.IO.Compression.dll">
<publishTime>03/11/2026 09:12:36</publishTime> <publishTime>03/16/2026 20:22:47</publishTime>
</File> </File>
<File Include="bin/System.Memory.dll"> <File Include="bin/System.Memory.dll">
<publishTime>02/19/2020 18:05:18</publishTime> <publishTime>02/19/2020 18:05:18</publishTime>
@ -347,7 +347,7 @@
<publishTime>02/19/2020 18:05:16</publishTime> <publishTime>02/19/2020 18:05:16</publishTime>
</File> </File>
<File Include="bin/System.ValueTuple.dll"> <File Include="bin/System.ValueTuple.dll">
<publishTime>03/11/2026 09:12:36</publishTime> <publishTime>03/16/2026 20:22:47</publishTime>
</File> </File>
<File Include="bin/System.Web.Cors.dll"> <File Include="bin/System.Web.Cors.dll">
<publishTime>11/28/2018 20:58:44</publishTime> <publishTime>11/28/2018 20:58:44</publishTime>
@ -389,13 +389,13 @@
<publishTime>02/09/2013 00:42:28</publishTime> <publishTime>02/09/2013 00:42:28</publishTime>
</File> </File>
<File Include="bin/WebAPI.dll"> <File Include="bin/WebAPI.dll">
<publishTime>03/16/2026 20:03:14</publishTime> <publishTime>03/20/2026 16:58:53</publishTime>
</File> </File>
<File Include="bin/WebAPI.pdb"> <File Include="bin/WebAPI.pdb">
<publishTime>03/16/2026 20:03:14</publishTime> <publishTime>03/20/2026 16:58:53</publishTime>
</File> </File>
<File Include="bin/WebAPI.xml"> <File Include="bin/WebAPI.xml">
<publishTime>03/16/2026 20:03:14</publishTime> <publishTime>03/20/2026 16:58:52</publishTime>
</File> </File>
<File Include="bin/WebGrease.dll"> <File Include="bin/WebGrease.dll">
<publishTime>01/23/2014 21:57:34</publishTime> <publishTime>01/23/2014 21:57:34</publishTime>
@ -479,7 +479,7 @@
<publishTime>10/28/2024 14:02:50</publishTime> <publishTime>10/28/2024 14:02:50</publishTime>
</File> </File>
<File Include="PrecompiledApp.config"> <File Include="PrecompiledApp.config">
<publishTime>03/16/2026 20:03:15</publishTime> <publishTime>03/20/2026 16:58:54</publishTime>
</File> </File>
<File Include="Scripts/bootstrap.js"> <File Include="Scripts/bootstrap.js">
<publishTime>10/28/2024 14:02:50</publishTime> <publishTime>10/28/2024 14:02:50</publishTime>
@ -542,7 +542,7 @@
<publishTime>10/28/2024 14:02:50</publishTime> <publishTime>10/28/2024 14:02:50</publishTime>
</File> </File>
<File Include="Web.config"> <File Include="Web.config">
<publishTime>03/10/2026 15:59:19</publishTime> <publishTime>03/19/2026 15:44:38</publishTime>
</File> </File>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -10,7 +10,7 @@
<add key="ClientValidationEnabled" value="true" /> <add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="true" />
<!--连接字符串--> <!--连接字符串-->
<add key="ConnectionString" value="Server=.\MSSQLSERVER2022;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200" /> <add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200" />
<!--版本号--> <!--版本号-->
<add key="SystemVersion" value="WebApi_V2019-08-27-001" /> <add key="SystemVersion" value="WebApi_V2019-08-27-001" />
<!--附件上传物理路径--> <!--附件上传物理路径-->

View File

@ -156,6 +156,8 @@
<Compile Include="Controllers\CQMS\PerformanceController.cs" /> <Compile Include="Controllers\CQMS\PerformanceController.cs" />
<Compile Include="Controllers\CQMS\QualityAssuranceController.cs" /> <Compile Include="Controllers\CQMS\QualityAssuranceController.cs" />
<Compile Include="Controllers\CQMS\WBSController.cs" /> <Compile Include="Controllers\CQMS\WBSController.cs" />
<Compile Include="Controllers\DataShare\CQMS\InspectionMachineSyncController.cs" />
<Compile Include="Controllers\DataShare\CQMS\CqmsMeetingSyncController.cs" />
<Compile Include="Controllers\DataShare\CQMS\CheckControlSyncController.cs" /> <Compile Include="Controllers\DataShare\CQMS\CheckControlSyncController.cs" />
<Compile Include="Controllers\DataShare\HSSE\CheckSpecialSyncController.cs" /> <Compile Include="Controllers\DataShare\HSSE\CheckSpecialSyncController.cs" />
<Compile Include="Controllers\DataShare\HSSE\HazardRegisterSyncController.cs" /> <Compile Include="Controllers\DataShare\HSSE\HazardRegisterSyncController.cs" />