岗位合并清理、班前会数据同步、
This commit is contained in:
parent
d5fe6816ce
commit
73511d2e03
|
|
@ -0,0 +1,59 @@
|
|||
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[SP_DataIdMove] Script Date: 2026-2-6 17:34:01 ******/
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
|
||||
|
||||
ALTER PROC [dbo].[SP_DataIdMove]
|
||||
@exTable NVARCHAR(50) = NULL ,
|
||||
@colums NVARCHAR(50) = NULL ,
|
||||
@trueId NVARCHAR(50) = NULL
|
||||
--,@returnVal int output
|
||||
AS
|
||||
|
||||
BEGIN
|
||||
--DECLARE @returnVal int =0
|
||||
--SET @returnVal = 0
|
||||
DECLARE @OldId nvarchar(50),@NewId nvarchar(50)
|
||||
DECLARE @tablename nvarchar(1000),@columnname nvarchar(1000)
|
||||
DECLARE @sql nvarchar(2000)
|
||||
DECLARE cursor_Id CURSOR FOR -- 定义游标
|
||||
SELECT OldId ,NewIds FROM DataIdMove WHERE ColumType = @colums and NewIds = @trueId
|
||||
OPEN cursor_Id
|
||||
FETCH NEXT FROM cursor_Id INTO @OldId, @NewId -- 抓取下一行游标数据
|
||||
WHILE @@FETCH_STATUS = 0 --(-1 语句失败, -2 被提取行不存在)
|
||||
BEGIN
|
||||
--SET @returnVal=@returnVal+1
|
||||
--print @OldId
|
||||
DECLARE cursor_name CURSOR FOR -- 定义游标
|
||||
SELECT DISTINCT TABLE_NAME,COLUMN_NAME
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE COLUMN_NAME like '%'+@colums+'%' and TABLE_NAME in (SELECT distinct TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE') and TABLE_NAME <> @exTable
|
||||
OPEN cursor_name -- 打开游标
|
||||
FETCH NEXT FROM cursor_name INTO @tablename ,@columnname -- 抓取下一行游标数据
|
||||
WHILE @@FETCH_STATUS = 0 --(-1 语句失败, -2 被提取行不存在)
|
||||
BEGIN
|
||||
SET @sql = 'update ' + @tablename + ' set ' + @columnname + ' =REPLACE('+@columnname+', '''+@OldId+''', '''+@NewId+''') where '+ @columnname + ' like '+'''%'+@OldId+'%'';' ;
|
||||
--print @sql
|
||||
EXEC sp_executesql @sql
|
||||
FETCH NEXT FROM cursor_name INTO @tablename,@columnname;
|
||||
END
|
||||
CLOSE cursor_name -- 关闭游标
|
||||
DEALLOCATE cursor_name -- 释放游标
|
||||
FETCH NEXT FROM cursor_Id INTO @OldId, @NewId
|
||||
END
|
||||
CLOSE cursor_Id -- 关闭游标
|
||||
DEALLOCATE cursor_Id -- 释放游标
|
||||
--SELECT @returnVal
|
||||
END
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
|
||||
--겯품삔껸념俚뙈
|
||||
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Meeting_ClassMeeting' AND COLUMN_NAME = 'Remark')
|
||||
BEGIN
|
||||
ALTER TABLE Meeting_ClassMeeting ADD Remark nvarchar(500);
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
--淃커깊껸념俚뙈:悧관데貫、悧관데貫淃커
|
||||
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Base_Project' AND COLUMN_NAME = 'SubjectUnit')
|
||||
BEGIN
|
||||
-- 悧관데貫
|
||||
ALTER TABLE Base_Project ADD SubjectUnit nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL;
|
||||
-- 悧관데貫苟淃커id
|
||||
ALTER TABLE Base_Project ADD SubjectProject nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL;
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
|
@ -179,6 +179,7 @@
|
|||
<Compile Include="BoSheng\BOSHENGService.cs" />
|
||||
<Compile Include="Common\AttachFileService.cs" />
|
||||
<Compile Include="Common\CodeRecordsService.cs" />
|
||||
<Compile Include="Common\DataCleanupMergeHelper.cs" />
|
||||
<Compile Include="Common\CommonService.cs" />
|
||||
<Compile Include="Common\TokenHelper.cs" />
|
||||
<Compile Include="Common\HttpHelper.cs" />
|
||||
|
|
@ -313,6 +314,8 @@
|
|||
<Compile Include="CQMS\WBS\WorkPackageInitService.cs" />
|
||||
<Compile Include="CQMS\WBS\WorkPackageProjectService.cs" />
|
||||
<Compile Include="CQMS\WBS\WorkPackageService.cs" />
|
||||
<Compile Include="DataShare\APIDataShareSyncService.cs" />
|
||||
<Compile Include="DataShare\HSSE\APIMeetingSyncService.cs" />
|
||||
<Compile Include="DCGL\ServerCheck\DCGLCheckNoticeItemService.cs" />
|
||||
<Compile Include="DCGL\ServerCheck\DCGLCheckRectifyItemService.cs" />
|
||||
<Compile Include="DCGL\ServerCheck\DCGLCheckRectifyService.cs" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据合并清理
|
||||
/// </summary>
|
||||
public class DataCleanupMergeHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据合并清理
|
||||
/// </summary>
|
||||
/// <param name="exTable">排除操作数据表</param>
|
||||
/// <param name="columType">替换字段(模糊匹配)</param>
|
||||
/// <param name="mergeDataIds">需要替换的数据值</param>
|
||||
/// <param name="dataId">新的字段数据值</param>
|
||||
/// <returns></returns>
|
||||
public static bool DataCleanupMerge(string exTable, string columType, List<string> mergeDataIds, string dataId, ref string msg)
|
||||
{
|
||||
bool result = false;
|
||||
try
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var clist = db.DataIdMove.Where(x => x.ColumType == columType && x.NewIds == dataId).ToList();
|
||||
db.DataIdMove.DeleteAllOnSubmit(clist);
|
||||
db.SubmitChanges();
|
||||
List<Model.DataIdMove> list = new List<Model.DataIdMove>();
|
||||
foreach (var mergeId in mergeDataIds)
|
||||
{
|
||||
list.Add(new Model.DataIdMove { OldId = mergeId.Trim(), NewIds = dataId.Trim(), ColumType = columType });
|
||||
}
|
||||
|
||||
db.DataIdMove.InsertAllOnSubmit(list);
|
||||
db.SubmitChanges();
|
||||
|
||||
|
||||
//SP_DataIdMove[排除操作数据表,替换字段(模糊匹配),字段数据值]
|
||||
string strSql = $"exec SP_DataIdMove '{exTable}','{columType}','{dataId}'";
|
||||
result = BLL.SQLHelper.ExecuteSql(strSql);
|
||||
|
||||
//SqlParameter[] parameters = {
|
||||
// new SqlParameter("@exTable", exTable),
|
||||
// new SqlParameter("@colums", columType),
|
||||
// new SqlParameter("@trueId", dataId),
|
||||
// new SqlParameter("@returnVal", SqlDbType.Int)
|
||||
//};
|
||||
//BLL.SQLHelper.ExecuteNonQueryStoredProcedure("SP_DataIdMove", parameters);
|
||||
//int succ = BLL.SQLHelper.ExecuteProcedure("SP_DataIdMove", parameters);
|
||||
//Thread.Sleep(30000); // 等待30秒,30000毫秒等于30秒
|
||||
if (result)
|
||||
{
|
||||
db.DataIdMove.DeleteAllOnSubmit(list);
|
||||
db.SubmitChanges();
|
||||
msg = "数据合并成功!";
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = "数据合并失败,请稍后再试!";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
msg = ex.Message;
|
||||
result = false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据共享互通辅助服务
|
||||
/// </summary>
|
||||
public class APIDataShareSyncService
|
||||
{
|
||||
#region 班组
|
||||
|
||||
/// <summary>
|
||||
/// 获取班组Id
|
||||
/// </summary>
|
||||
/// <param name="TeamGroupName"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="unitId"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetTeamGroupId(string TeamGroupName, string projectId, string unitId)
|
||||
{
|
||||
string TeamGroupId = null;
|
||||
if (!string.IsNullOrEmpty(TeamGroupName))
|
||||
{
|
||||
var tg = Funs.DB.ProjectData_TeamGroup.Where(x => x.TeamGroupName == TeamGroupName && x.ProjectId == projectId && x.UnitId == unitId).ToList();
|
||||
if (tg.Count == 0)
|
||||
{
|
||||
Model.ProjectData_TeamGroup newTeamGroup = new Model.ProjectData_TeamGroup
|
||||
{
|
||||
TeamGroupId = SQLHelper.GetNewID(typeof(Model.ProjectData_TeamGroup)),
|
||||
ProjectId = projectId,
|
||||
UnitId = unitId,
|
||||
TeamGroupName = TeamGroupName,
|
||||
Remark = "导入"
|
||||
};
|
||||
TeamGroupService.AddTeamGroup(newTeamGroup);
|
||||
TeamGroupId = newTeamGroup.TeamGroupId;
|
||||
}
|
||||
else
|
||||
{
|
||||
TeamGroupId = tg.FirstOrDefault().TeamGroupId;
|
||||
}
|
||||
}
|
||||
return TeamGroupId;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,273 @@
|
|||
using Model;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全会议数据共享互通
|
||||
/// </summary>
|
||||
public class APIMeetingSyncService
|
||||
{
|
||||
#region 分包单位推送数据到总包单位
|
||||
|
||||
/// <summary>
|
||||
/// 推送分包班前会数据
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目Id</param>
|
||||
/// <param name="dataId">班前会数据Id(为空的时候推送全部)</param>
|
||||
/// <returns></returns>
|
||||
public static ReturnData PushClassMeetingLists(string projectId, string dataId = "")
|
||||
{
|
||||
Model.ReturnData responeData = new Model.ReturnData();
|
||||
responeData.code = 0;
|
||||
responeData.message = string.Empty;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
try
|
||||
{
|
||||
var list = from x in db.Meeting_ClassMeeting where x.ProjectId == projectId select x;
|
||||
if (!string.IsNullOrWhiteSpace(dataId))
|
||||
{
|
||||
list = list.Where(x => x.ClassMeetingId == dataId);
|
||||
}
|
||||
var dataList = (from x in list
|
||||
join ptg in db.ProjectData_TeamGroup on x.TeamGroupId equals ptg.TeamGroupId into ptGroup
|
||||
from ptg in ptGroup.DefaultIfEmpty()
|
||||
join su in db.Sys_User on x.CompileMan equals su.UserId into sUser
|
||||
from su in sUser.DefaultIfEmpty()
|
||||
join att in db.AttachFile on x.ClassMeetingId equals att.ToKeyId into attTemp
|
||||
from att in attTemp.DefaultIfEmpty()
|
||||
join att1 in db.AttachFile on (x.ClassMeetingId + "#1") equals att1.ToKeyId into att1Temp
|
||||
from att1 in att1Temp.DefaultIfEmpty()
|
||||
join att2 in db.AttachFile on (x.ClassMeetingId + "#2") equals att2.ToKeyId into att2Temp
|
||||
from att2 in att2Temp.DefaultIfEmpty()
|
||||
orderby x.CompileDate descending
|
||||
select new ClassMeetingItem
|
||||
{
|
||||
ProjectId = x.ProjectId,
|
||||
UnitId = x.UnitId,
|
||||
ClassMeetingId = x.ClassMeetingId,
|
||||
ClassMeetingCode = x.ClassMeetingCode,
|
||||
ClassMeetingName = x.ClassMeetingName,
|
||||
ClassMeetingDate = x.ClassMeetingDate,
|
||||
ClassMeetingContents = x.ClassMeetingContents,
|
||||
CompileMan = x.CompileMan,
|
||||
CompileManName = su.UserName,
|
||||
TeamGroupId = x.TeamGroupId,
|
||||
TeamGroupName = ptg.TeamGroupName,
|
||||
CompileDate = x.CompileDate,
|
||||
States = x.States,
|
||||
MeetingPlace = x.MeetingPlace,
|
||||
MeetingHours = x.MeetingHours,
|
||||
MeetingHostMan = x.MeetingHostMan,
|
||||
AttentPerson = x.AttentPerson,
|
||||
AttentPersonNum = x.AttentPersonNum,
|
||||
//MeetingHostManOther = x.MeetingHostManOther,
|
||||
Remark = x.Remark,
|
||||
//AttachUrl = AttachFileService.getFileUrl(x.ClassMeetingId),//内容
|
||||
//AttachUrl1 = AttachFileService.getFileUrl(x.ClassMeetingId + "#1"),//签到表
|
||||
//AttachUrl2 = AttachFileService.getFileUrl(x.ClassMeetingId + "#2"),//会议过程
|
||||
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();
|
||||
|
||||
if (dataList.Count() > 0)
|
||||
{
|
||||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(projectId);
|
||||
var pushData = new ClassMeetingData
|
||||
{
|
||||
CollCropCode = thisUnit.CollCropCode,//分包单位社会统一信用码
|
||||
UnitId = thisUnit.UnitId,//分包单位Id
|
||||
UnitName = thisUnit.UnitName,//分包单位名称
|
||||
ShortUnitName = thisUnit.ShortUnitName,//分包单位简称
|
||||
UnitDomain = Funs.SGGLUrl,//分包单位域名地址【文件存储地址】
|
||||
SubjectUnit = porject.SubjectUnit,//主包单位Id
|
||||
SubjectProject = porject.SubjectProject,//主包项目Id
|
||||
Items = dataList//会议数据
|
||||
};
|
||||
var pushContent = JsonConvert.SerializeObject(pushData);
|
||||
|
||||
//获取总包单位接口apiurl地址
|
||||
var Url = BLL.UnitService.getUnitApiUrlByUnitId(porject.SubjectUnit);
|
||||
var ApiUrl = string.Empty;
|
||||
var WebUrl = string.Empty;
|
||||
if (Url != null)
|
||||
{
|
||||
var urls = Url.Split(',');
|
||||
ApiUrl = urls[0];
|
||||
if (urls.Length > 1)
|
||||
{
|
||||
WebUrl = urls[1];
|
||||
}
|
||||
}
|
||||
var baseurl = $"{ApiUrl}/api/MeetingSync/ReceiveSaveProjectClassMeetingData";
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
Hashtable newToken = new Hashtable
|
||||
{
|
||||
{ "token", ServerService.GetToken().Token }
|
||||
};
|
||||
//var returndata = APIGetHttpService.Http(baseurl, "Post", contenttype, newToken, pushContent);
|
||||
var returndata = "";
|
||||
if (!string.IsNullOrEmpty(returndata))
|
||||
{
|
||||
JObject obj = JObject.Parse(returndata);
|
||||
string mess = obj["message"].ToString();
|
||||
string code = obj["code"].ToString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
responeData.message = "当前项目没有班前会数据";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.message = "同步到总包单位失败!";
|
||||
ErrLogInfo.WriteLog("【班前会】同步到总包单位失败!", ex);
|
||||
}
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 总包单位接收分包单位推送数据
|
||||
|
||||
/// <summary>
|
||||
/// 总包单位接收保存分包单位推送的班前会数据
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public static string ReceiveSaveProjectClassMeetingData(ClassMeetingData data)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string result = string.Empty;
|
||||
if (data.Items.Count() > 0)
|
||||
{
|
||||
//1、判断分包单位是否存在
|
||||
var unit = UnitService.getUnitByCollCropCodeUnitName(data.CollCropCode, data.UnitName);
|
||||
if (unit == null)
|
||||
{
|
||||
result = "总包单位不存在本单位,请登录总包系统检查维护本单位信息!";
|
||||
}
|
||||
else
|
||||
{
|
||||
//2、判断主包项目是否存在
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(data.SubjectProject);
|
||||
if (porject == null)
|
||||
{
|
||||
result = "总包单位不存在本项目,请检查总包项目关联是否正确!";
|
||||
}
|
||||
else
|
||||
{
|
||||
int succ = 0;
|
||||
//3、保存数据
|
||||
foreach (var item in data.Items)
|
||||
{
|
||||
try
|
||||
{
|
||||
var model = ClassMeetingService.GetClassMeetingById(item.ClassMeetingId);
|
||||
if (model != null)
|
||||
{//编辑
|
||||
model.ProjectId = data.SubjectProject;
|
||||
model.UnitId = unit.UnitId;
|
||||
model.ClassMeetingCode = item.ClassMeetingCode;
|
||||
model.ClassMeetingName = item.ClassMeetingName;
|
||||
model.ClassMeetingDate = item.ClassMeetingDate;
|
||||
model.AttentPersonNum = item.AttentPersonNum;
|
||||
//model.TeamGroupId = item.TeamGroupId;
|
||||
model.TeamGroupId = APIDataShareSyncService.GetTeamGroupId(item.TeamGroupName, data.SubjectProject, unit.UnitId);
|
||||
model.AttentPersonNum = item.AttentPersonNum;
|
||||
//model.ClassMeetingContents = HttpUtility.HtmlEncode(item.ClassMeetingContents);
|
||||
model.ClassMeetingContents = item.ClassMeetingContents;
|
||||
//model.States = item.States;
|
||||
model.States = BLL.Const.State_2; ;//分包推送过来的班前会数据默认已完成
|
||||
model.MeetingPlace = item.MeetingPlace;
|
||||
model.MeetingHours = item.MeetingHours;
|
||||
model.MeetingHostMan = item.MeetingHostMan;
|
||||
model.AttentPerson = item.AttentPerson;
|
||||
model.AttentPersonNum = item.AttentPersonNum;
|
||||
//model.MeetingHostManOther = item.MeetingHostManOther;
|
||||
//model.Remark = item.Remark;
|
||||
model.Remark = $"{(!string.IsNullOrWhiteSpace(data.ShortUnitName) ? data.ShortUnitName : data.UnitName)}#{item.CompileManName}";
|
||||
model.CompileDate = item.CompileDate;
|
||||
//newModel.CompileMan = item.CompileMan;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{//新增
|
||||
Model.Meeting_ClassMeeting newModel = new Model.Meeting_ClassMeeting();
|
||||
newModel.ClassMeetingId = item.ClassMeetingId;
|
||||
newModel.ProjectId = data.SubjectProject;
|
||||
newModel.UnitId = unit.UnitId;
|
||||
newModel.ClassMeetingCode = item.ClassMeetingCode;
|
||||
newModel.ClassMeetingName = item.ClassMeetingName;
|
||||
newModel.ClassMeetingDate = item.ClassMeetingDate;
|
||||
newModel.AttentPersonNum = item.AttentPersonNum;
|
||||
//newModel.TeamGroupId = item.TeamGroupId;
|
||||
newModel.TeamGroupId = APIDataShareSyncService.GetTeamGroupId(item.TeamGroupName, data.SubjectProject, unit.UnitId);
|
||||
newModel.AttentPersonNum = item.AttentPersonNum;
|
||||
//newModel.ClassMeetingContents = HttpUtility.HtmlEncode(item.ClassMeetingContents);
|
||||
newModel.ClassMeetingContents = item.ClassMeetingContents;
|
||||
//newModel.States = item.States;
|
||||
newModel.States = BLL.Const.State_2; ;//分包推送过来的班前会数据默认已完成
|
||||
newModel.MeetingPlace = item.MeetingPlace;
|
||||
newModel.MeetingHours = item.MeetingHours;
|
||||
newModel.MeetingHostMan = item.MeetingHostMan;
|
||||
newModel.AttentPerson = item.AttentPerson;
|
||||
newModel.AttentPersonNum = item.AttentPersonNum;
|
||||
//newModel.MeetingHostManOther = item.MeetingHostManOther;
|
||||
//newModel.Remark = item.Remark;
|
||||
newModel.Remark = $"{(!string.IsNullOrWhiteSpace(data.ShortUnitName) ? data.ShortUnitName : data.UnitName)}#{item.CompileManName}";
|
||||
newModel.CompileDate = item.CompileDate;
|
||||
//newModel.CompileMan = item.CompileMan;
|
||||
|
||||
db.Meeting_ClassMeeting.InsertOnSubmit(newModel);
|
||||
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
|
||||
{
|
||||
result = "推送数据对象为空!";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +1,40 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class FileInsertService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 保存其他单位附件同步处理
|
||||
/// </summary>
|
||||
/// <param name="domain">单位域名地址</param>
|
||||
/// <param name="attachFileId">附件id</param>
|
||||
/// <param name="tokeyId">附件keyid</param>
|
||||
/// <param name="attachSource">附件json信息</param>
|
||||
/// <param name="attachUrl">附件地址</param>
|
||||
public static void SaveAttachFileRecords(string domain, string attachFileId, string tokeyId, string attachSource, string attachUrl)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(attachFileId) && !string.IsNullOrEmpty(attachSource) && !string.IsNullOrEmpty(attachUrl))
|
||||
{
|
||||
List<byte[]> FileContext = new List<byte[]>();
|
||||
if (!string.IsNullOrWhiteSpace(domain) && !string.IsNullOrWhiteSpace(attachUrl))
|
||||
{
|
||||
FileContext = FilePathTransStream(domain, attachUrl);
|
||||
}
|
||||
InsertAttachFilesRecord(attachFileId, tokeyId, attachSource, attachUrl, FileContext);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取服务器图片转byte
|
||||
/// </summary>
|
||||
|
|
@ -22,12 +45,16 @@ namespace BLL
|
|||
{
|
||||
List<byte[]> bytes = new List<byte[]>();
|
||||
var strs = attachUrl.Trim().Split(',');
|
||||
|
||||
try
|
||||
{
|
||||
foreach (var fileUrl in strs)
|
||||
{
|
||||
string path = ConfigurationManager.AppSettings["localRoot"] + fileUrl;
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
//BLL.ErrLogInfo.WriteLog($"不存在则新增,附件地址:{path}");
|
||||
string filepath = $"{fileHost}{fileUrl}";
|
||||
//BLL.ErrLogInfo.WriteLog($"不存在则新增,责任单位附件地址:{filepath}");
|
||||
// 创建WebClient实例
|
||||
using (WebClient webClient = new WebClient())
|
||||
{
|
||||
|
|
@ -42,15 +69,19 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// BLL.ErrLogInfo.WriteLog($"已存在附件地址:{path}");
|
||||
//}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Error: " + ex.Message);
|
||||
BLL.ErrLogInfo.WriteLog($"服务器图片转换异常:{fileHost};图片地址:{attachUrl}", ex.Message);
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取附件数据流类
|
||||
/// </summary>
|
||||
|
|
@ -187,6 +218,46 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数据和附件插入到多附件表
|
||||
/// </summary>
|
||||
public static void InsertAttachFilesRecord(string attachFileId, string dataId, string attachSource, string attachUrl, List<byte[]> fileContext)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(attachFileId))
|
||||
{
|
||||
//多附件
|
||||
var attachFile = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataId);
|
||||
if (attachFile == null)
|
||||
{
|
||||
////插入附件文件
|
||||
BLL.FileInsertService.FileMoreInsert(fileContext, attachUrl);
|
||||
|
||||
Model.AttachFile newAttachFile = new Model.AttachFile
|
||||
{
|
||||
AttachFileId = attachFileId,
|
||||
ToKeyId = dataId,
|
||||
AttachSource = attachSource,
|
||||
AttachUrl = attachUrl
|
||||
};
|
||||
Funs.DB.AttachFile.InsertOnSubmit(newAttachFile);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (attachFile.AttachUrl != attachUrl)
|
||||
{
|
||||
/////删除附件文件
|
||||
//BLL.UploadAttachmentService.DeleteFile(ConfigurationManager.AppSettings["localRoot"], attachFile.AttachUrl);
|
||||
////插入附件文件
|
||||
BLL.FileInsertService.FileMoreInsert(fileContext, attachUrl);
|
||||
attachFile.AttachSource = attachSource;
|
||||
attachFile.AttachUrl = attachUrl;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 数据和附件插入到多附件表【不存实际文件,只存地址】
|
||||
|
|
|
|||
|
|
@ -505,6 +505,40 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 执行SQL语句
|
||||
/// </summary>
|
||||
/// <param name="sql">sql语句</param>
|
||||
public static bool ExecuteSql(string sql)
|
||||
{
|
||||
bool result = false;
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
result = true;
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(sql, Connection)
|
||||
{
|
||||
CommandTimeout = 0,
|
||||
CommandType = CommandType.Text
|
||||
};
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result = false;
|
||||
ErrLogInfo.WriteLog($"【执行SQL语句报错】{sql};【错误信息】{ex.Message}");
|
||||
}
|
||||
finally
|
||||
{
|
||||
Connection.Close();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Creates a DataSet by running the stored procedure and placing the results
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
using System;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
|
@ -857,5 +859,50 @@ namespace BLL
|
|||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region 根据单位id获取单位信息列表
|
||||
|
||||
/// <summary>
|
||||
/// 获取集团单位列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string getUnitApiUrlByUnitId(string userId)
|
||||
{
|
||||
string url = "";
|
||||
try
|
||||
{
|
||||
string baseurl = $"{SysConstSetService.CNCECPath}/api/Unit/getUnitApiUrlByUnitId?unitId=" + userId;
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
Hashtable newToken = new Hashtable
|
||||
{
|
||||
{ "token", ServerService.GetToken().Token }
|
||||
};
|
||||
var strJosn = APIGetHttpService.Http(baseurl, "GET", contenttype, newToken, null);
|
||||
if (!string.IsNullOrEmpty(strJosn))
|
||||
{
|
||||
JObject obj = JObject.Parse(strJosn);
|
||||
if (Funs.GetNewIntOrZero(obj["code"].ToString()) == 1)
|
||||
{
|
||||
if (obj["data"] != null)
|
||||
{
|
||||
JObject dataObj = obj["data"] as JObject;
|
||||
if (dataObj != null && dataObj["BaseInfoCode"] != null)
|
||||
{
|
||||
url = dataObj["BaseInfoCode"].ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("获取失败!", ex);
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,21 @@
|
|||
SortField="PostType,WorkPostCode" SortDirection="ASC"
|
||||
OnPageIndexChange="Grid1_PageIndexChange" AllowFilters="true" OnFilterChange="Grid1_FilterChange"
|
||||
EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox runat="server" Label="名称" ID="txtKey" EmptyText="输入查询条件" AutoPostBack="true" Width="200px" LabelWidth="50px">
|
||||
</f:TextBox>
|
||||
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Text="查询" Icon="SystemSearch" EnablePostBack="true" runat="server">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<%--<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出" EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>--%>
|
||||
<f:Button ID="btnDataBase" Text="岗位合并" ToolTip="数据清理" Icon="DatabaseWrench" runat="server" Hidden="true" OnClick="btnDataBase_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
|
|
@ -134,6 +149,10 @@
|
|||
</f:SimpleForm>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="单位合并" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="false"
|
||||
CloseAction="HidePostBack" Width="1200px" Height="600px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
Hidden="true" runat="server" Text="编辑" Icon="Pencil">
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ namespace FineUIPro.Web.BaseInfo
|
|||
case wp.IsHsse when 1 then '是' else '否' end as IsHsseStr,const.ConstText as PostTypeName
|
||||
FROM dbo.Base_WorkPost AS wp
|
||||
LEFT JOIN Sys_Const AS const ON const.ConstValue = wp.PostType and const.GroupId = '" + ConstValue.Group_PostType + "' ";
|
||||
if (!string.IsNullOrEmpty(this.txtKey.Text.Trim()))
|
||||
{
|
||||
strSql += "where wp.WorkPostName like '%" + this.txtKey.Text.Trim() + "%' ";
|
||||
}
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
//strSql += " AND HazardList.ProjectId = @ProjectId";
|
||||
//listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||
|
|
@ -256,6 +260,10 @@ namespace FineUIPro.Web.BaseInfo
|
|||
{
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
if (this.CurrUser.UserId == Const.sysglyId || this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.fuweiId || this.CurrUser.UserId == Const.shenyinhangId)
|
||||
{//系统管理员、合肥诺必达、付伟、申银行
|
||||
this.btnDataBase.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
@ -333,5 +341,20 @@ namespace FineUIPro.Web.BaseInfo
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 数据清理
|
||||
|
||||
/// <summary>
|
||||
/// 数据清理
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDataBase_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference($"WorkPostCleanupMerge.aspx", "岗位清理合并"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -7,10 +7,12 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.BaseInfo {
|
||||
namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
|
||||
|
||||
public partial class WorkPost {
|
||||
public partial class WorkPost
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
|
|
@ -48,6 +50,42 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtKey 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtKey;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnDataBase 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDataBase;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
|
|
@ -255,6 +293,15 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,161 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WorkPostCleanupMerge.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.WorkPostCleanupMerge" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>岗位清理合并</title>
|
||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.customlabel span {
|
||||
margin-left: 140px;
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true" LabelWidth="140px"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownBox runat="server" ID="drpWorkPostBox" AutoPostBack="true" OnTextChanged="MergeTextBox_TextChanged" Label="合并后的岗位" EmptyText="请从下拉表格中选择合并后的岗位" DataControlID="Grid1"
|
||||
EnableMultiSelect="false" MatchFieldWidth="false" Required="true" ShowRedStar="true">
|
||||
<PopPanel>
|
||||
<f:Panel ID="Panel1" runat="server" BodyPadding="10px" Width="820px" Height="420px" Hidden="true"
|
||||
ShowBorder="true" ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Form ID="Form2" ShowBorder="False" ShowHeader="False" runat="server">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TwinTriggerBox Width="200px" runat="server" EmptyText="按岗位代码、名称查找" ShowLabel="false" ID="ttbWorkPostNameCodeSearch"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" ShowTrigger1="false" OnTrigger1Click="ttbWorkPostNameCodeSearch_Trigger1Click" OnTrigger2Click="ttbWorkPostNameCodeSearch_Trigger2Click" Trigger1Icon="Clear" Trigger2Icon="Search">
|
||||
</f:TwinTriggerBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
<f:Grid ID="Grid1" BoxFlex="1" DataKeyNames="WorkPostId"
|
||||
DataIDField="WorkPostId" DataTextField="WorkPostName" EnableMultiSelect="false"
|
||||
PageSize="50" ShowBorder="true" ShowHeader="false"
|
||||
AllowPaging="true" IsDatabasePaging="true" OnPageIndexChange="Grid1_PageIndexChange" runat="server" EnableCheckBoxSelect="true"
|
||||
AllowSorting="false" SortField="WorkPostName" SortDirection="ASC"
|
||||
OnSort="Grid1_Sort">
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="50px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="true">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:BoundField ExpandUnusedSpace="true" Width="200px" DataField="WorkPostCode" HeaderText="编号" />
|
||||
<f:BoundField ExpandUnusedSpace="true" Width="260px" DataField="WorkPostName" HeaderText="岗位名称" />
|
||||
<f:BoundField ExpandUnusedSpace="true" Width="120px" DataField="PostTypeName" HeaderText="类型" />
|
||||
<f:BoundField ExpandUnusedSpace="true" Width="80px" DataField="IsHsseStr" HeaderText="安管人员" />
|
||||
<f:BoundField ExpandUnusedSpace="true" Width="80px" DataField="IsCQMSStr" HeaderText="质量管理" />
|
||||
<f:BoundField ExpandUnusedSpace="true" Width="80px" DataField="IsCQMSCheckStr" HeaderText="质量报验" />
|
||||
<%--<f:RenderField ExpandUnusedSpace="true" Width="80px" DataField="IsHsse" FieldType="Boolean" HeaderText="安管人员" />
|
||||
<f:RenderField ExpandUnusedSpace="true" Width="80px" DataField="IsCQMS" FieldType="Boolean" HeaderText="质量管理" />
|
||||
<f:RenderField ExpandUnusedSpace="true" Width="80px" DataField="IsCQMSCheck" FieldType="Boolean" HeaderText="质量报验" />--%>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</PopPanel>
|
||||
</f:DropDownBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownBox runat="server" ID="drpMergeWorkPostBox" Label="需要合并的岗位" EmptyText="请从下拉表格中选择需要合并的岗位" DataControlID="Grid2"
|
||||
EnableMultiSelect="true" MatchFieldWidth="false" Required="true" ShowRedStar="true">
|
||||
<PopPanel>
|
||||
<f:Panel ID="Panel2" runat="server" BodyPadding="10px" Width="820px" Height="420px" Hidden="true"
|
||||
ShowBorder="true" ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Form ID="Form3" ShowBorder="False" ShowHeader="False" runat="server">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TwinTriggerBox Width="200px" runat="server" EmptyText="按编号、名称查找" ShowLabel="false" ID="ttbMergeWorkPostNameCodeSearch"
|
||||
AutoPostBack="true" OnTextChanged="MergeTextBox_TextChanged" ShowTrigger1="false" OnTrigger1Click="ttbMergeWorkPostNameCodeSearch_Trigger1Click" OnTrigger2Click="ttbMergeWorkPostNameCodeSearch_Trigger2Click" Trigger1Icon="Clear" Trigger2Icon="Search">
|
||||
</f:TwinTriggerBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
<f:Grid ID="Grid2" BoxFlex="1" DataKeyNames="WorkPostId"
|
||||
DataIDField="WorkPostId" DataTextField="WorkPostName" EnableMultiSelect="true"
|
||||
PageSize="50" ShowBorder="true" ShowHeader="false"
|
||||
AllowPaging="true" IsDatabasePaging="true" OnPageIndexChange="Grid2_PageIndexChange" runat="server" EnableCheckBoxSelect="true"
|
||||
AllowSorting="false" SortField="WorkPostName" SortDirection="ASC"
|
||||
OnSort="Grid2_Sort">
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="50px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="true">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid2.PageIndex * Grid2.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:BoundField ExpandUnusedSpace="true" Width="200px" DataField="WorkPostCode" HeaderText="编号" />
|
||||
<f:BoundField ExpandUnusedSpace="true" Width="260px" DataField="WorkPostName" HeaderText="岗位名称" />
|
||||
<f:BoundField ExpandUnusedSpace="true" Width="120px" DataField="PostTypeName" HeaderText="类型" />
|
||||
<f:BoundField ExpandUnusedSpace="true" Width="80px" DataField="IsHsseStr" HeaderText="安管人员" />
|
||||
<f:BoundField ExpandUnusedSpace="true" Width="80px" DataField="IsCQMSStr" HeaderText="质量管理" />
|
||||
<f:BoundField ExpandUnusedSpace="true" Width="80px" DataField="IsCQMSCheckStr" HeaderText="质量报验" />
|
||||
<%--<f:RenderField ExpandUnusedSpace="true" Width="80px" DataField="IsHsse" FieldType="Boolean" HeaderText="安管人员" />
|
||||
<f:RenderField ExpandUnusedSpace="true" Width="80px" DataField="IsCQMS" FieldType="Boolean" HeaderText="质量管理" />
|
||||
<f:RenderField ExpandUnusedSpace="true" Width="80px" DataField="IsCQMSCheck" FieldType="Boolean" HeaderText="质量报验" />--%>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</PopPanel>
|
||||
</f:DropDownBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRemark" runat="server" Label="备注说明" Height="120px" EmptyText="100字内">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="Label2" runat="server" Text="注:" CssClass="customlabel"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="Label3" runat="server" Text="1、请谨慎操作,合并后数据无法恢复;" CssClass="customlabel"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="Label4" runat="server" Text="2、建议在系统使用低峰时期合并项目岗位数据;" CssClass="customlabel"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="Label5" runat="server" Text="3、数据合并过程缓慢,请勿关闭此界面,请耐心等待。" CssClass="customlabel"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" Hidden="true"
|
||||
OnClick="btnSave_Click" ToolTip="开始清理">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,280 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
public partial class WorkPostCleanupMerge : PageBase
|
||||
{
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
|
||||
BindGrid();
|
||||
BindGrid2();
|
||||
}
|
||||
}
|
||||
|
||||
#region 加载合并后的岗位
|
||||
|
||||
/// <summary>
|
||||
/// 加载合并后的岗位
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
var pType = (from x in Funs.DB.Sys_Const where x.GroupId == ConstValue.Group_PostType select x);
|
||||
var list = (from x in Funs.DB.Base_WorkPost
|
||||
join y in pType on x.PostType equals y.ConstValue into yGroup
|
||||
from y in yGroup.DefaultIfEmpty()
|
||||
orderby x.WorkPostName descending
|
||||
select new
|
||||
{
|
||||
x.WorkPostId,
|
||||
x.WorkPostName,
|
||||
x.WorkPostCode,
|
||||
x.IsHsse,
|
||||
x.IsCQMS,
|
||||
x.IsCQMSCheck,
|
||||
x.PostType,
|
||||
IsHsseStr = x.IsHsse == true ? "是" : "否",
|
||||
IsCQMSStr = x.IsHsse == true ? "是" : "否",
|
||||
IsCQMSCheckStr = x.IsHsse == true ? "是" : "否",
|
||||
PostTypeName = y.ConstText,
|
||||
x.Remark
|
||||
}).ToList();
|
||||
string codeName = ttbWorkPostNameCodeSearch.Text.Trim();
|
||||
if (!string.IsNullOrWhiteSpace(codeName))
|
||||
{
|
||||
list = list.Where(x => (!string.IsNullOrWhiteSpace(x.WorkPostName) && x.WorkPostName.Contains(codeName)) || (!string.IsNullOrWhiteSpace(x.WorkPostCode) && x.WorkPostCode.Contains(codeName))).ToList();
|
||||
}
|
||||
|
||||
// 1.设置总项数(特别注意:数据库分页一定要设置总记录数RecordCount)
|
||||
Grid1.RecordCount = list.Count();
|
||||
// 2.获取当前分页数据
|
||||
DataTable table = Funs.LINQToDataTable(list);
|
||||
|
||||
// 3.绑定到Grid
|
||||
//Grid1.DataSource = table;
|
||||
Grid1.DataSource = this.GetPagedDataTable(Grid1, table);
|
||||
Grid1.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
protected void ttbWorkPostNameCodeSearch_Trigger1Click(object sender, EventArgs e)
|
||||
{
|
||||
ttbWorkPostNameCodeSearch.Text = string.Empty;
|
||||
ttbWorkPostNameCodeSearch.ShowTrigger1 = false;
|
||||
BindGrid();
|
||||
}
|
||||
protected void ttbWorkPostNameCodeSearch_Trigger2Click(object sender, EventArgs e)
|
||||
{
|
||||
ttbWorkPostNameCodeSearch.ShowTrigger1 = true;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 加载需要合并的岗位
|
||||
|
||||
/// <summary>
|
||||
/// 加载需要合并的岗位
|
||||
/// </summary>
|
||||
private void BindGrid2()
|
||||
{
|
||||
var pType = (from x in Funs.DB.Sys_Const where x.GroupId == ConstValue.Group_PostType select x);
|
||||
var list = (from x in Funs.DB.Base_WorkPost
|
||||
join y in pType on x.PostType equals y.ConstValue into yGroup
|
||||
from y in yGroup.DefaultIfEmpty()
|
||||
orderby x.WorkPostName descending
|
||||
select new
|
||||
{
|
||||
x.WorkPostId,
|
||||
x.WorkPostName,
|
||||
x.WorkPostCode,
|
||||
x.IsHsse,
|
||||
x.IsCQMS,
|
||||
x.IsCQMSCheck,
|
||||
x.PostType,
|
||||
IsHsseStr = x.IsHsse == true ? "是" : "否",
|
||||
IsCQMSStr = x.IsHsse == true ? "是" : "否",
|
||||
IsCQMSCheckStr = x.IsHsse == true ? "是" : "否",
|
||||
PostTypeName = y.ConstText,
|
||||
x.Remark
|
||||
}).ToList();
|
||||
|
||||
string workPostId = this.drpWorkPostBox.Value;
|
||||
if (!string.IsNullOrWhiteSpace(workPostId))
|
||||
{
|
||||
list = list.Where(x => x.WorkPostId != workPostId).ToList();
|
||||
}
|
||||
string codeName = ttbMergeWorkPostNameCodeSearch.Text.Trim();
|
||||
if (!string.IsNullOrWhiteSpace(codeName))
|
||||
{
|
||||
list = list.Where(x => (!string.IsNullOrWhiteSpace(x.WorkPostName) && x.WorkPostName.Contains(codeName)) || (!string.IsNullOrWhiteSpace(x.WorkPostCode) && x.WorkPostCode.Contains(codeName))).ToList();
|
||||
}
|
||||
|
||||
// 1.设置总项数(特别注意:数据库分页一定要设置总记录数RecordCount)
|
||||
Grid2.RecordCount = list.Count();
|
||||
// 2.获取当前分页数据
|
||||
DataTable table = Funs.LINQToDataTable(list);
|
||||
|
||||
// 3.绑定到Grid
|
||||
//Grid2.DataSource = table;
|
||||
Grid2.DataSource = this.GetPagedDataTable(Grid2, table);
|
||||
Grid2.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid2_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid2();
|
||||
}
|
||||
protected void Grid2_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
BindGrid2();
|
||||
}
|
||||
|
||||
|
||||
protected void ttbMergeWorkPostNameCodeSearch_Trigger1Click(object sender, EventArgs e)
|
||||
{
|
||||
ttbMergeWorkPostNameCodeSearch.Text = string.Empty;
|
||||
ttbMergeWorkPostNameCodeSearch.ShowTrigger1 = false;
|
||||
BindGrid2();
|
||||
}
|
||||
protected void ttbMergeWorkPostNameCodeSearch_Trigger2Click(object sender, EventArgs e)
|
||||
{
|
||||
ttbMergeWorkPostNameCodeSearch.ShowTrigger1 = true;
|
||||
BindGrid2();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void MergeTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid2();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
string workPostId = string.Empty;
|
||||
string workPostMergeId = string.Empty;
|
||||
string workPostName = string.Empty;
|
||||
string workPostMergeName = string.Empty;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.drpWorkPostBox.Text))
|
||||
{
|
||||
workPostId = this.drpWorkPostBox.Value.Trim();
|
||||
workPostName = this.drpWorkPostBox.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInParent("请选择合并后岗位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.drpMergeWorkPostBox.Text))
|
||||
{
|
||||
workPostMergeId = this.drpMergeWorkPostBox.Value.Trim();
|
||||
workPostMergeName = this.drpMergeWorkPostBox.Text;
|
||||
if (workPostMergeId == workPostId)
|
||||
{
|
||||
Alert.ShowInParent("两个岗位为同一个岗位,无需合并!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInParent("请选择需要合并的岗位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
List<string> workPostMergeIds = workPostMergeId.Split(',').ToList();
|
||||
workPostMergeIds = workPostMergeIds.Where(x => x != workPostId).ToList();
|
||||
|
||||
string msg = string.Empty;
|
||||
bool merge = DataCleanupMergeHelper.DataCleanupMerge("Base_WorkPost", "PostId", workPostMergeIds, workPostId, ref msg);
|
||||
|
||||
if (merge)
|
||||
{
|
||||
string txtRemark = this.txtRemark.Text.Trim();
|
||||
//其他数据表岗位数据合并后,删除岗位表冗余岗位
|
||||
foreach (var mergeId in workPostMergeIds)
|
||||
{
|
||||
string wId = mergeId.Trim();
|
||||
var workPost = BLL.WorkPostService.GetWorkPostById(wId);
|
||||
if (workPost != null)
|
||||
{
|
||||
WorkPostService.DeleteWorkPostById(wId);
|
||||
string op = $"岗位合并清理后,{Const.BtnDelete};备注:{txtRemark}";
|
||||
LogService.AddSys_Log(this.CurrUser, workPost.WorkPostCode, workPost.WorkPostId, Const.WorkPostMenuId, op);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
|
||||
#region 获取按钮权限
|
||||
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (this.CurrUser.UserId == Const.sysglyId || this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.fuweiId || this.CurrUser.UserId == Const.shenyinhangId)
|
||||
{//系统管理员、合肥诺必达、付伟、申银行
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,224 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
|
||||
|
||||
public partial class WorkPostCleanupMerge
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// drpWorkPostBox 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownBox drpWorkPostBox;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Form2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
/// <summary>
|
||||
/// ttbWorkPostNameCodeSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TwinTriggerBox ttbWorkPostNameCodeSearch;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// drpMergeWorkPostBox 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownBox drpMergeWorkPostBox;
|
||||
|
||||
/// <summary>
|
||||
/// Panel2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel2;
|
||||
|
||||
/// <summary>
|
||||
/// Form3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form3;
|
||||
|
||||
/// <summary>
|
||||
/// ttbMergeWorkPostNameCodeSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TwinTriggerBox ttbMergeWorkPostNameCodeSearch;
|
||||
|
||||
/// <summary>
|
||||
/// Grid2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid2;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// Label3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label3;
|
||||
|
||||
/// <summary>
|
||||
/// Label4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label4;
|
||||
|
||||
/// <summary>
|
||||
/// Label5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label5;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
}
|
||||
}
|
||||
|
|
@ -280,6 +280,7 @@
|
|||
<Content Include="BaseInfo\TransferMajor.aspx" />
|
||||
<Content Include="BaseInfo\UnitType.aspx" />
|
||||
<Content Include="BaseInfo\WorkPost.aspx" />
|
||||
<Content Include="BaseInfo\WorkPostCleanupMerge.aspx" />
|
||||
<Content Include="BaseInfo\WorkStage.aspx" />
|
||||
<Content Include="BoSheng\BoExam.aspx" />
|
||||
<Content Include="BoSheng\BoPersonEdit.aspx" />
|
||||
|
|
@ -6948,6 +6949,13 @@
|
|||
<Compile Include="BaseInfo\WorkPost.aspx.designer.cs">
|
||||
<DependentUpon>WorkPost.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BaseInfo\WorkPostCleanupMerge.aspx.cs">
|
||||
<DependentUpon>WorkPostCleanupMerge.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BaseInfo\WorkPostCleanupMerge.aspx.designer.cs">
|
||||
<DependentUpon>WorkPostCleanupMerge.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BaseInfo\WorkStage.aspx.cs">
|
||||
<DependentUpon>WorkStage.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@
|
|||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPush" ToolTip="推送至总包单位" Icon="ApplicationGo" runat="server" Hidden="true" Text="批量推送" OnClick="btnPush_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
|
@ -74,6 +76,9 @@
|
|||
SortField="FlowOperateName" FieldType="String" HeaderText="状态" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" ColumnID="Remark" DataField="Remark" FieldType="String" HeaderText="备注" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
|
|
@ -65,37 +66,39 @@ namespace FineUIPro.Web.HSSE.Meeting
|
|||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = "SELECT ClassMeeting.ClassMeetingId,ClassMeeting.ProjectId,CodeRecords.Code AS ClassMeetingCode,Unit.UnitId,Unit.UnitName,ClassMeeting.ClassMeetingName,ClassMeeting.ClassMeetingDate,ClassMeeting.CompileMan,ClassMeeting.ClassMeetingContents,ClassMeeting.CompileDate,ClassMeeting.States "
|
||||
+ @" ,(CASE WHEN ClassMeeting.States = " + BLL.Const.State_0 + " OR ClassMeeting.States IS NULL THEN '待['+ISNULL(OperateUser.UserName,Users.UserName)+']提交' WHEN ClassMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
||||
+ @" FROM Meeting_ClassMeeting AS ClassMeeting "
|
||||
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON ClassMeeting.ClassMeetingId = CodeRecords.DataId "
|
||||
+ @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON ClassMeeting.ClassMeetingId = FlowOperate.DataId AND FlowOperate.IsClosed <> 1"
|
||||
+ @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId"
|
||||
+ @" LEFT JOIN Sys_User AS Users ON ClassMeeting.CompileMan = Users.UserId"
|
||||
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId WHERE 1=1 ";
|
||||
StringBuilder sb = new StringBuilder();//CodeRecords.Code AS ClassMeetingCode,
|
||||
sb.AppendFormat("SELECT ClassMeeting.ClassMeetingId,ClassMeeting.ProjectId,ClassMeeting.ClassMeetingCode,Unit.UnitId,Unit.UnitName,ClassMeeting.ClassMeetingName,ClassMeeting.ClassMeetingDate,ClassMeeting.CompileMan,ClassMeeting.ClassMeetingContents,ClassMeeting.CompileDate,ClassMeeting.States,(CASE WHEN ClassMeeting.States ='{0}' OR ClassMeeting.States IS NULL THEN '待['+ISNULL(OperateUser.UserName,Users.UserName)+']提交' WHEN ClassMeeting.States = '{1}' THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName,ClassMeeting.Remark ", BLL.Const.State_0, BLL.Const.State_2);
|
||||
sb.Append("FROM Meeting_ClassMeeting AS ClassMeeting ");
|
||||
//sb.Append("LEFT JOIN Sys_CodeRecords AS CodeRecords ON ClassMeeting.ClassMeetingId = CodeRecords.DataId ");
|
||||
sb.Append("LEFT JOIN Sys_FlowOperate AS FlowOperate ON ClassMeeting.ClassMeetingId = FlowOperate.DataId AND FlowOperate.IsClosed <> 1 ");
|
||||
sb.Append("LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId ");
|
||||
sb.Append("LEFT JOIN Sys_User AS Users ON ClassMeeting.CompileMan = Users.UserId ");
|
||||
sb.Append("LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=ClassMeeting.UnitId ");//Users.UnitId
|
||||
sb.Append("WHERE 1=1 ");
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
strSql += " AND ClassMeeting.ProjectId = @ProjectId";
|
||||
sb.Append("AND ClassMeeting.ProjectId = @ProjectId ");
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
}
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND Unit.UnitId = @UnitId";
|
||||
sb.Append("AND Unit.UnitId = @UnitId ");
|
||||
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtClassMeetingCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND ClassMeetingCode LIKE @ClassMeetingCode";
|
||||
sb.Append("AND ClassMeetingCode LIKE @ClassMeetingCode ");
|
||||
listStr.Add(new SqlParameter("@ClassMeetingCode", "%" + this.txtClassMeetingCode.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtClassMeetingName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND ClassMeetingName LIKE @ClassMeetingName";
|
||||
sb.Append("AND ClassMeetingName LIKE @ClassMeetingName ");
|
||||
listStr.Add(new SqlParameter("@ClassMeetingName", "%" + this.txtClassMeetingName.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(sb.ToString(), parameter);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
|
@ -272,6 +275,11 @@ namespace FineUIPro.Web.HSSE.Meeting
|
|||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||
if (!string.IsNullOrWhiteSpace(porject.SubjectUnit) && !string.IsNullOrWhiteSpace(porject.SubjectProject))
|
||||
{//项目关联了总包单位项目,显示推送操作按钮
|
||||
this.btnPush.Hidden = false;
|
||||
}
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
|
|
@ -303,5 +311,32 @@ namespace FineUIPro.Web.HSSE.Meeting
|
|||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 分包会议数据推送至总包单位
|
||||
|
||||
/// <summary>
|
||||
/// 分包会议数据推送至总包单位
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPush_Click(object sender, EventArgs e)
|
||||
{
|
||||
ReturnData responeData = APIMeetingSyncService.PushClassMeetingLists(this.ProjectId, string.Empty);
|
||||
//if (responeData.code == 0)
|
||||
//{
|
||||
// Alert.ShowInTop(responeData.message, MessageBoxIcon.Warning);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// ShowNotify(responeData.message, MessageBoxIcon.Success);
|
||||
//}
|
||||
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
ShowNotify(responeData.message, responeData.code == 0 ? MessageBoxIcon.Warning : MessageBoxIcon.Success);
|
||||
return;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -7,10 +7,12 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Meeting {
|
||||
namespace FineUIPro.Web.HSSE.Meeting
|
||||
{
|
||||
|
||||
|
||||
public partial class ClassMeeting {
|
||||
public partial class ClassMeeting
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
|
|
@ -111,6 +113,15 @@ namespace FineUIPro.Web.HSSE.Meeting {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// btnPush 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPush;
|
||||
|
||||
/// <summary>
|
||||
/// labNumber 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -65,7 +65,8 @@ namespace FineUIPro.Web.HSSE.Meeting
|
|||
{
|
||||
this.InitDropDownList();
|
||||
}
|
||||
this.txtClassMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.ClassMeetingId);
|
||||
this.txtClassMeetingCode.Text = classMeeting.ClassMeetingCode;
|
||||
//this.txtClassMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.ClassMeetingId);
|
||||
this.txtClassMeetingName.Text = classMeeting.ClassMeetingName;
|
||||
this.txtClassMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", classMeeting.ClassMeetingDate);
|
||||
if (!string.IsNullOrEmpty(classMeeting.CompileMan))
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ namespace FineUIPro.Web.HSSE.Meeting
|
|||
Model.Meeting_ClassMeeting classMeeting = BLL.ClassMeetingService.GetClassMeetingById(this.ClassMeetingId);
|
||||
if (classMeeting != null)
|
||||
{
|
||||
this.txtClassMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.ClassMeetingId);
|
||||
this.txtClassMeetingCode.Text = classMeeting.ClassMeetingCode;
|
||||
//this.txtClassMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.ClassMeetingId);
|
||||
this.txtClassMeetingName.Text = classMeeting.ClassMeetingName;
|
||||
if (classMeeting.ClassMeetingDate != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using FineUIPro.Web.DataShow;
|
||||
using NPOI.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using FineUIPro.Web.DataShow;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.SysManage
|
||||
{
|
||||
|
|
@ -225,24 +226,26 @@ namespace FineUIPro.Web.SysManage
|
|||
|
||||
List<string> unitMergeIds = unitMergeId.Split(',').ToList();
|
||||
unitMergeIds = unitMergeIds.Where(x => x != unitId).ToList();
|
||||
//db.DataIdMove.DeleteAllOnSubmit();
|
||||
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var clist = db.DataIdMove.Where(x => x.ColumType == "Unit" && x.NewIds == unitId).ToList();
|
||||
db.DataIdMove.DeleteAllOnSubmit(clist);
|
||||
db.SubmitChanges();
|
||||
List<Model.DataIdMove> list = new List<Model.DataIdMove>();
|
||||
foreach (var mergeId in unitMergeIds)
|
||||
{
|
||||
list.Add(new Model.DataIdMove { OldId = mergeId.Trim(), NewIds = unitId.Trim(), ColumType = "Unit" });
|
||||
}
|
||||
string msg = string.Empty;
|
||||
bool merge = DataCleanupMergeHelper.DataCleanupMerge("Base_Unit", "Unit", unitMergeIds, unitId, ref msg);
|
||||
|
||||
db.DataIdMove.InsertAllOnSubmit(list);
|
||||
db.SubmitChanges();
|
||||
//Model.SUBQHSEDB db = Funs.DB;
|
||||
//var clist = db.DataIdMove.Where(x => x.ColumType == "Unit" && x.NewIds == unitId).ToList();
|
||||
//db.DataIdMove.DeleteAllOnSubmit(clist);
|
||||
//db.SubmitChanges();
|
||||
//List<Model.DataIdMove> list = new List<Model.DataIdMove>();
|
||||
//foreach (var mergeId in unitMergeIds)
|
||||
//{
|
||||
// list.Add(new Model.DataIdMove { OldId = mergeId.Trim(), NewIds = unitId.Trim(), ColumType = "Unit" });
|
||||
//}
|
||||
|
||||
//db.DataIdMove.InsertAllOnSubmit(list);
|
||||
//db.SubmitChanges();
|
||||
|
||||
|
||||
string strSql = $"exec SP_DataIdMove 'Unit','{unitId}'";
|
||||
BLL.SQLHelper.ExecutSql(strSql);
|
||||
//string strSql = $"exec SP_DataIdMove 'Unit','{unitId}'";
|
||||
//BLL.SQLHelper.ExecutSql(strSql);
|
||||
|
||||
//SqlParameter[] parameters = {
|
||||
// new SqlParameter("@colums", "Unit"),
|
||||
|
|
@ -252,6 +255,8 @@ namespace FineUIPro.Web.SysManage
|
|||
//int succ = BLL.SQLHelper.ExecuteProcedure("SP_DataIdMove", parameters);
|
||||
//Thread.Sleep(30000); // 等待30秒,30000毫秒等于30秒
|
||||
|
||||
if (merge)
|
||||
{
|
||||
string txtRemark = this.txtRemark.Text.Trim();
|
||||
//其他数据表单位数据合并后,删除单位表冗余单位
|
||||
foreach (var mergeId in unitMergeIds)
|
||||
|
|
@ -265,9 +270,9 @@ namespace FineUIPro.Web.SysManage
|
|||
LogService.AddSys_Log(this.CurrUser, unit.UnitCode, unit.UnitId, Const.UnitMenuId, op);
|
||||
}
|
||||
}
|
||||
|
||||
db.DataIdMove.DeleteAllOnSubmit(list);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
//db.DataIdMove.DeleteAllOnSubmit(list);
|
||||
//db.SubmitChanges();
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,93 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
/// <summary>
|
||||
/// 班前会接收数据
|
||||
/// </summary>
|
||||
public class ClassMeetingData
|
||||
{
|
||||
/// <summary>
|
||||
/// 分包单位社会统一信用码
|
||||
/// </summary>
|
||||
public string CollCropCode { get; set; }
|
||||
/// <summary>
|
||||
/// 分包单位Id
|
||||
/// </summary>
|
||||
public string UnitId { get; set; }
|
||||
/// <summary>
|
||||
/// 分包单位名称
|
||||
/// </summary>
|
||||
public string UnitName { get; set; }
|
||||
/// <summary>
|
||||
/// 分包单位简称
|
||||
/// </summary>
|
||||
public string ShortUnitName { get; set; }
|
||||
/// <summary>
|
||||
/// 分包单位域名
|
||||
/// </summary>
|
||||
public string UnitDomain { get; set; }
|
||||
/// <summary>
|
||||
/// 总包单位Id
|
||||
/// </summary>
|
||||
public string SubjectUnit { get; set; }
|
||||
/// <summary>
|
||||
/// 总包单位项目Id
|
||||
/// </summary>
|
||||
public string SubjectProject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 班前会数据集合
|
||||
/// </summary>
|
||||
public List<ClassMeetingItem> Items { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 班前会数据
|
||||
/// </summary>
|
||||
public class ClassMeetingItem
|
||||
{
|
||||
public string ProjectId { get; set; }
|
||||
public string UnitId { get; set; }
|
||||
public string ClassMeetingId { get; set; }
|
||||
public string ClassMeetingCode { get; set; }
|
||||
public string ClassMeetingName { get; set; }
|
||||
public DateTime? ClassMeetingDate { get; set; }
|
||||
public string ClassMeetingContents { get; set; }
|
||||
public string CompileMan { get; set; }
|
||||
public string CompileManName { get; set; }
|
||||
public string TeamGroupId { get; set; }
|
||||
public string TeamGroupName { get; set; }
|
||||
public DateTime? CompileDate { get; set; }
|
||||
public string States { get; set; }
|
||||
public string MeetingPlace { get; set; }
|
||||
public decimal? MeetingHours { get; set; }
|
||||
public string MeetingHostMan { get; set; }
|
||||
public string AttentPerson { get; set; }
|
||||
public int? AttentPersonNum { get; set; }
|
||||
public string MeetingHostManOther { get; set; }
|
||||
public string Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 内容附件
|
||||
/// </summary>
|
||||
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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -26995,6 +26995,10 @@ namespace Model
|
|||
|
||||
private string _AQMPwd;
|
||||
|
||||
private string _SubjectUnit;
|
||||
|
||||
private string _SubjectProject;
|
||||
|
||||
private EntitySet<Accident_AccidentHandle> _Accident_AccidentHandle;
|
||||
|
||||
private EntitySet<Accident_AccidentPersonRecord> _Accident_AccidentPersonRecord;
|
||||
|
|
@ -27719,6 +27723,10 @@ namespace Model
|
|||
partial void OnAQMAccountChanged();
|
||||
partial void OnAQMPwdChanging(string value);
|
||||
partial void OnAQMPwdChanged();
|
||||
partial void OnSubjectUnitChanging(string value);
|
||||
partial void OnSubjectUnitChanged();
|
||||
partial void OnSubjectProjectChanging(string value);
|
||||
partial void OnSubjectProjectChanged();
|
||||
#endregion
|
||||
|
||||
public Base_Project()
|
||||
|
|
@ -29044,6 +29052,46 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubjectUnit", DbType="NVarChar(50)")]
|
||||
public string SubjectUnit
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._SubjectUnit;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._SubjectUnit != value))
|
||||
{
|
||||
this.OnSubjectUnitChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._SubjectUnit = value;
|
||||
this.SendPropertyChanged("SubjectUnit");
|
||||
this.OnSubjectUnitChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubjectProject", DbType="NVarChar(50)")]
|
||||
public string SubjectProject
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._SubjectProject;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._SubjectProject != value))
|
||||
{
|
||||
this.OnSubjectProjectChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._SubjectProject = value;
|
||||
this.SendPropertyChanged("SubjectProject");
|
||||
this.OnSubjectProjectChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentHandle_Base_Project", Storage="_Accident_AccidentHandle", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Accident_AccidentHandle> Accident_AccidentHandle
|
||||
{
|
||||
|
|
@ -273613,6 +273661,8 @@ namespace Model
|
|||
|
||||
private System.Nullable<int> _AttentPersonNum;
|
||||
|
||||
private string _Remark;
|
||||
|
||||
private EntityRef<Base_Project> _Base_Project;
|
||||
|
||||
private EntityRef<Base_Unit> _Base_Unit;
|
||||
|
|
@ -273657,6 +273707,8 @@ namespace Model
|
|||
partial void OnTeamGroupIdChanged();
|
||||
partial void OnAttentPersonNumChanging(System.Nullable<int> value);
|
||||
partial void OnAttentPersonNumChanged();
|
||||
partial void OnRemarkChanging(string value);
|
||||
partial void OnRemarkChanged();
|
||||
#endregion
|
||||
|
||||
public Meeting_ClassMeeting()
|
||||
|
|
@ -274004,6 +274056,26 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(500)")]
|
||||
public string Remark
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Remark;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Remark != value))
|
||||
{
|
||||
this.OnRemarkChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._Remark = value;
|
||||
this.SendPropertyChanged("Remark");
|
||||
this.OnRemarkChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Meeting_ClassMeeting_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
|
||||
public Base_Project Base_Project
|
||||
{
|
||||
|
|
|
|||
|
|
@ -219,6 +219,7 @@
|
|||
<Compile Include="CQMS\SteelItem.cs" />
|
||||
<Compile Include="CQMS\UnitWork.cs" />
|
||||
<Compile Include="CQMS\WelderItem.cs" />
|
||||
<Compile Include="DataShare\ClassMeetingData.cs" />
|
||||
<Compile Include="DoorServer\AbsenceDutyItem.cs" />
|
||||
<Compile Include="DoorServer\attendanceItem.cs" />
|
||||
<Compile Include="DoorServer\attendanceItems.cs" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,64 @@
|
|||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebAPI.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全会议
|
||||
/// </summary>
|
||||
public class MeetingSyncController : ApiController
|
||||
{
|
||||
#region 分包单位推送数据到总包单位
|
||||
|
||||
/// <summary>
|
||||
/// 推送项目班前会数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<Model.ResponeData> PushClassMeetingLists()
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var returndata = APIMeetingSyncService.PushClassMeetingLists("");
|
||||
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="data">班前会数据</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData ReceiveSaveProjectClassMeetingData([FromBody] ClassMeetingData data)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.message = APIMeetingSyncService.ReceiveSaveProjectClassMeetingData(data);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -13,3 +13,9 @@
|
|||
出错时间:11/19/2025 19:20:26
|
||||
|
||||
【邮箱提醒异常】张小松邮箱:1784m;时间:2025-11-19 19:46:42;异常信息:指定字符串与电子邮件地址所要求的形式不符。
|
||||
附件【FileUpload/ClassMeetingAttachUrl/2026-02/】获取异常!
|
||||
附件【FileUpload/ClassMeetingAttachUrl/2026-02/】获取异常!
|
||||
附件【FileUpload/ClassMeetingAttachUrl/2026-02/】获取异常!
|
||||
附件【FileUpload/ClassMeetingAttachUrl/2026-02/】获取异常!
|
||||
附件【FileUpload/ClassMeetingAttachUrl/2026-02/】获取异常!
|
||||
附件【FileUpload/ClassMeetingAttachUrl/2026-02/】获取异常!
|
||||
|
|
|
|||
|
|
@ -156,6 +156,7 @@
|
|||
<Compile Include="Controllers\CQMS\PerformanceController.cs" />
|
||||
<Compile Include="Controllers\CQMS\QualityAssuranceController.cs" />
|
||||
<Compile Include="Controllers\CQMS\WBSController.cs" />
|
||||
<Compile Include="Controllers\DataShare\HSSE\MeetingSyncController.cs" />
|
||||
<Compile Include="Controllers\DataSync\CNCECServerController.cs" />
|
||||
<Compile Include="Controllers\DataSync\EnvironmentalController.cs" />
|
||||
<Compile Include="Controllers\DoorProject\getController.cs" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue