葛恒:奖惩
This commit is contained in:
@@ -200,6 +200,7 @@
|
||||
<Compile Include="CostGoods\MeasuresPlanService.cs" />
|
||||
<Compile Include="CostGoods\PayRegistrationService.cs" />
|
||||
<Compile Include="CostGoods\SubPayRegistrationService.cs" />
|
||||
<Compile Include="CQMS\Check\RewardAndPunishService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\ConTechnologyDisclosureService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\DataDistributionApproveService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\DataDistributionService.cs" />
|
||||
@@ -317,6 +318,8 @@
|
||||
<Compile Include="CQMS\WBS\WorkPackageService.cs" />
|
||||
<Compile Include="DataShare\APIDataShareSyncService.cs" />
|
||||
<Compile Include="DataShare\CQMS\APICheckControlSyncService.cs" />
|
||||
<Compile Include="DataShare\CQMS\APICqmsMeetingSyncService.cs" />
|
||||
<Compile Include="DataShare\CQMS\APIInspectionMachineSyncService.cs" />
|
||||
<Compile Include="DataShare\HSSE\APICheckSpecialSyncService.cs" />
|
||||
<Compile Include="DataShare\HSSE\APIHazardRegisterSyncService.cs" />
|
||||
<Compile Include="DataShare\HSSE\APILicenseSyncService.cs" />
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class RewardAndPunishService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取施工图纸信息
|
||||
/// </summary>
|
||||
/// <param name="UnitWorkId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Check_RewardAndPunish GetRewardAndPunishById(string RewardAndPunishID)
|
||||
{
|
||||
return Funs.DB.Check_RewardAndPunish.FirstOrDefault(e => e.RewardAndPunishID == RewardAndPunishID);
|
||||
}
|
||||
/// <summary>
|
||||
/// 添加施工图纸信息
|
||||
/// </summary>
|
||||
/// <param name="WPQ"></param>
|
||||
public static void AddRewardAndPunish(Model.Check_RewardAndPunish RewardAndPunish)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Check_RewardAndPunish newRewardAndPunish = new Model.Check_RewardAndPunish();
|
||||
newRewardAndPunish.RewardAndPunishID = RewardAndPunish.RewardAndPunishID;
|
||||
newRewardAndPunish.ProjectId = RewardAndPunish.ProjectId;
|
||||
newRewardAndPunish.CreateMan = RewardAndPunish.CreateMan;
|
||||
newRewardAndPunish.Date = RewardAndPunish.Date;
|
||||
newRewardAndPunish.Description = RewardAndPunish.Description;
|
||||
newRewardAndPunish.Money = RewardAndPunish.Money;
|
||||
newRewardAndPunish.Type = RewardAndPunish.Type;
|
||||
newRewardAndPunish.ResponseUnit = RewardAndPunish.ResponseUnit;
|
||||
newRewardAndPunish.NoticeUnit = RewardAndPunish.NoticeUnit;
|
||||
newRewardAndPunish.RewardAndPunishType = RewardAndPunish.RewardAndPunishType;
|
||||
newRewardAndPunish.RewardAndPunishCode = RewardAndPunish.RewardAndPunishCode;
|
||||
newRewardAndPunish.RewardAndPunishMan = RewardAndPunish.RewardAndPunishMan;
|
||||
newRewardAndPunish.TeamGroupId = RewardAndPunish.TeamGroupId;
|
||||
newRewardAndPunish.Remark = RewardAndPunish.Remark;
|
||||
newRewardAndPunish.DataSource = RewardAndPunish.DataSource;
|
||||
newRewardAndPunish.HazardRegisterId = RewardAndPunish.HazardRegisterId;
|
||||
newRewardAndPunish.SysTemType = RewardAndPunish.SysTemType;
|
||||
db.Check_RewardAndPunish.InsertOnSubmit(newRewardAndPunish);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改施工图纸信息
|
||||
/// </summary>
|
||||
/// <param name="WPQ"></param>
|
||||
public static void UpdateRewardAndPunish(Model.Check_RewardAndPunish RewardAndPunish)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Check_RewardAndPunish newRewardAndPunish = db.Check_RewardAndPunish.FirstOrDefault(e => e.RewardAndPunishID == RewardAndPunish.RewardAndPunishID);
|
||||
if (newRewardAndPunish != null)
|
||||
{
|
||||
newRewardAndPunish.RewardAndPunishID = RewardAndPunish.RewardAndPunishID;
|
||||
newRewardAndPunish.ProjectId = RewardAndPunish.ProjectId;
|
||||
newRewardAndPunish.CreateMan = RewardAndPunish.CreateMan;
|
||||
newRewardAndPunish.Date = RewardAndPunish.Date;
|
||||
newRewardAndPunish.Description = RewardAndPunish.Description;
|
||||
newRewardAndPunish.Money = RewardAndPunish.Money;
|
||||
newRewardAndPunish.Type = RewardAndPunish.Type;
|
||||
newRewardAndPunish.ResponseUnit = RewardAndPunish.ResponseUnit;
|
||||
newRewardAndPunish.NoticeUnit = RewardAndPunish.NoticeUnit;
|
||||
newRewardAndPunish.RewardAndPunishType = RewardAndPunish.RewardAndPunishType;
|
||||
newRewardAndPunish.RewardAndPunishCode = RewardAndPunish.RewardAndPunishCode;
|
||||
newRewardAndPunish.RewardAndPunishMan = RewardAndPunish.RewardAndPunishMan;
|
||||
newRewardAndPunish.TeamGroupId = RewardAndPunish.TeamGroupId;
|
||||
newRewardAndPunish.Remark = RewardAndPunish.Remark;
|
||||
newRewardAndPunish.DataSource = RewardAndPunish.DataSource;
|
||||
newRewardAndPunish.HazardRegisterId = RewardAndPunish.HazardRegisterId;
|
||||
newRewardAndPunish.SysTemType = RewardAndPunish.SysTemType;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据主键删除施工图纸信息
|
||||
/// </summary>
|
||||
/// <param name="checkerId"></param>
|
||||
public static void DeleteRewardAndPunishById(string RewardAndPunishID)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Check_RewardAndPunish RewardAndPunish = db.Check_RewardAndPunish.FirstOrDefault(e => e.RewardAndPunishID == RewardAndPunishID);
|
||||
if (RewardAndPunish != null)
|
||||
{
|
||||
db.Check_RewardAndPunish.DeleteOnSubmit(RewardAndPunish);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitTypeDropDownList(FineUIPro.DropDownList dropName)
|
||||
{
|
||||
ListItem[] list = new ListItem[2];
|
||||
|
||||
list[0] = new ListItem("奖励通知单", "0");
|
||||
list[1] = new ListItem("处罚通知单", "1");
|
||||
dropName.DataValueField = "Value";
|
||||
dropName.DataTextField = "Text";
|
||||
dropName.DataSource = list;
|
||||
dropName.DataBind();
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据巡检主键删除
|
||||
/// </summary>
|
||||
/// <param name="checkerId"></param>
|
||||
public static void DeleteRewardAndPunishByHazardRegisterId(string HazardRegisterId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Check_RewardAndPunish RewardAndPunish = db.Check_RewardAndPunish.FirstOrDefault(e => e.HazardRegisterId == HazardRegisterId);
|
||||
if (RewardAndPunish != null)
|
||||
{
|
||||
db.Check_RewardAndPunish.DeleteOnSubmit(RewardAndPunish);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1965,6 +1965,23 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string ProjectEmergencySupplyMenuId = "39244F05-0D9E-4750-B12E-CEA5E11338A8";
|
||||
|
||||
/// <summary>
|
||||
/// 货物单位类型
|
||||
/// </summary>
|
||||
public const string MaterialUnitMenuId = "3DD3F0E8-D3EA-41AA-BA1F-CA3168657D67";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 物资进出记录
|
||||
/// </summary>
|
||||
public const string MaterialInAndOutRecordMenuId = "5DAB5F9A-097A-46D4-8EB1-F60D1D65E812";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 奖励与惩罚
|
||||
/// </summary>
|
||||
public const string RewardAndPunishManagerMenuId = "621A9295-DD82-425A-863D-310AD319752B";
|
||||
|
||||
/// <summary>
|
||||
/// 应急队伍与培训
|
||||
/// </summary>
|
||||
@@ -1974,6 +1991,10 @@ namespace BLL
|
||||
/// 应急流程
|
||||
/// </summary>
|
||||
public const string ProjectEmergencyProcessMenuId = "A5D0287B-2410-4DB1-8BD4-E0534EBAE308";
|
||||
/// <summary>
|
||||
/// 奖罚通知单(定稿)
|
||||
/// </summary>
|
||||
public const string RewardAndPunishMenuId = "288C955A-E379-4F24-85F9-585343B33D46";
|
||||
#endregion
|
||||
|
||||
#region 施工方案/方案审查
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -28,7 +29,8 @@ namespace BLL
|
||||
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();
|
||||
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
|
||||
@@ -47,10 +49,10 @@ namespace BLL
|
||||
TeamGroupId = tg.FirstOrDefault().TeamGroupId;
|
||||
}
|
||||
}
|
||||
|
||||
return TeamGroupId;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 作业票许可证类型
|
||||
@@ -97,7 +99,6 @@ namespace BLL
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 获取作业区域
|
||||
|
||||
/// <summary>
|
||||
@@ -611,7 +612,46 @@ namespace BLL
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 下载并保存文件
|
||||
/// </summary>
|
||||
/// <param name="webUrl"></param>
|
||||
/// <param name="fileUrl"></param>
|
||||
/// <returns></returns>
|
||||
public static byte[] SafeDownloadHeadImageAsync(string webUrl, string fileUrl)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(fileUrl))
|
||||
return null;
|
||||
|
||||
// 构造完整的远程文件 URL
|
||||
string fullRemoteUrl = $"{webUrl.TrimEnd('/')}/{fileUrl.TrimStart('/')}";
|
||||
|
||||
// 构造本地文件路径
|
||||
string localFilePath = Path.Combine(ConfigurationManager.AppSettings["localRoot"], fileUrl);
|
||||
|
||||
|
||||
// 确保本地目录存在
|
||||
string directoryPath = Path.GetDirectoryName(localFilePath);
|
||||
if (!string.IsNullOrEmpty(directoryPath) && !Directory.Exists(directoryPath))
|
||||
{
|
||||
Directory.CreateDirectory(directoryPath);
|
||||
}
|
||||
//下载文件到本地
|
||||
using (WebClient client = new WebClient())
|
||||
{
|
||||
byte[] fileData = client.DownloadData(fullRemoteUrl);
|
||||
// 将文件数据写入本地文件
|
||||
File.WriteAllBytes(localFilePath, fileData);
|
||||
return fileData;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BLL.ErrLogInfo.WriteLog($"下载头像失败: {fileUrl}, 错误: {ex.Message}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,8 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class APICheckControlSyncService
|
||||
{
|
||||
#region 根据项目、单位获取质量巡检列表
|
||||
#region 根据项目、单位获取质量巡检列表
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目、单位获取质量巡检列表
|
||||
/// </summary>
|
||||
@@ -63,7 +64,7 @@ namespace BLL
|
||||
from pu in puTemp.DefaultIfEmpty()
|
||||
join att in db.AttachFile on x.CheckControlCode equals att.ToKeyId into attTemp
|
||||
from att in attTemp.DefaultIfEmpty()
|
||||
join attRe in db.AttachFile on x.CheckControlCode + "r" equals attRe.ToKeyId into attReTemp
|
||||
join attRe in db.AttachFile on x.CheckControlCode+"r" equals attRe.ToKeyId into attReTemp
|
||||
from attRe in attReTemp.DefaultIfEmpty()
|
||||
select new CheckControlSyncItem
|
||||
{
|
||||
@@ -145,6 +146,8 @@ namespace BLL
|
||||
|
||||
//获取对应单位的apiurl地址
|
||||
var Url = BLL.UnitService.getUnitApiUrlByUnitId(SubjectUnitId);
|
||||
//var Url = "http://localhost:14957/,http://localhost:8579/";
|
||||
|
||||
var ApiUrl = "";
|
||||
var WebUrl = "";
|
||||
if (!string.IsNullOrEmpty(Url))
|
||||
@@ -223,6 +226,7 @@ namespace BLL
|
||||
|
||||
//总包单位接口地址
|
||||
var Url = BLL.UnitService.getUnitApiUrlByUnitId(project.SubjectUnit);
|
||||
//var Url = "http://localhost:14957/";
|
||||
var ApiUrl = "";
|
||||
var WebUrl = "";
|
||||
|
||||
@@ -475,6 +479,8 @@ namespace BLL
|
||||
return questionTypeId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取专业ID(不存在则创建)
|
||||
/// </summary>
|
||||
@@ -512,7 +518,7 @@ namespace BLL
|
||||
}
|
||||
|
||||
return Id;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单位ID(根据名称)
|
||||
|
||||
@@ -0,0 +1,441 @@
|
||||
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 Newtonsoft.Json;
|
||||
using RestSharp;
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量会议同步服务
|
||||
/// </summary>
|
||||
public class APICqmsMeetingSyncService
|
||||
{
|
||||
#region 根据项目、单位获取质量会议列表
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目、单位获取质量会议列表
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目ID</param>
|
||||
/// <param name="unitId">单位ID</param>
|
||||
/// <param name="dataId">数据ID(可选,用于单条数据同步)</param>
|
||||
/// <returns>质量会议数据列表</returns>
|
||||
public static List<Model.CqmsMeetingSyncItem> GetCqmsMeetingListsByProjectIdUnitIdPage(
|
||||
string projectId, string unitId, string dataId = "")
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var list = from x in db.CQMS_Meeting
|
||||
where x.ProjectId == projectId
|
||||
select x;
|
||||
|
||||
if (!string.IsNullOrEmpty(unitId))
|
||||
{
|
||||
list = list.Where(x => x.UnitId == unitId);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(dataId))
|
||||
{
|
||||
list = list.Where(x => x.MeetingId == dataId);
|
||||
}
|
||||
|
||||
var dataList = (from x in list
|
||||
join unit in db.Base_Unit on x.UnitId equals unit.UnitId into unitTemp
|
||||
from unit in unitTemp.DefaultIfEmpty()
|
||||
join u1 in db.Sys_User on x.CompileMan equals u1.UserId into u1Temp
|
||||
from u1 in u1Temp.DefaultIfEmpty()
|
||||
join u2 in db.Sys_User on x.MeetingHostMan equals u2.UserId into u2Temp
|
||||
from u2 in u2Temp.DefaultIfEmpty()
|
||||
join cr in db.Sys_CodeRecords on x.MeetingId equals cr.DataId into crTemp
|
||||
from cr in crTemp.DefaultIfEmpty()
|
||||
select new CqmsMeetingSyncItem
|
||||
{
|
||||
MeetingId = x.MeetingId,
|
||||
MeetingCode = cr.Code,
|
||||
MeetingName = x.MeetingName,
|
||||
ProjectId = x.ProjectId,
|
||||
UnitId = x.UnitId,
|
||||
UnitName = unit.UnitName,
|
||||
MeetingDate = x.MeetingDate,
|
||||
MeetingHours = x.MeetingHours,
|
||||
MeetingPlace = x.MeetingPlace,
|
||||
MeetingHostMan = x.MeetingHostMan,
|
||||
MeetingHostManName = u2.UserName,
|
||||
MeetingHostManOther = x.MeetingHostManOther,
|
||||
AttentPersonNum = x.AttentPersonNum,
|
||||
AttentPerson = x.AttentPerson,
|
||||
AttentPersonIds = x.AttentPersonIds,
|
||||
MeetingContents = x.MeetingContents,
|
||||
CompileMan = x.CompileMan,
|
||||
CompileManName = u1.UserName,
|
||||
CompileDate = x.CompileDate,
|
||||
States = x.States,
|
||||
DataSource = "1"
|
||||
}).ToList();
|
||||
|
||||
return dataList;
|
||||
}
|
||||
}
|
||||
|
||||
#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 apiurl = "/api/CqmsMeetingSync/SaveCqmsMeetingSyncData";
|
||||
|
||||
//总包单位接口地址
|
||||
var Url = BLL.UnitService.getUnitApiUrlByUnitId(project.SubjectUnit);
|
||||
var ApiUrl = "";
|
||||
var WebUrl = "";
|
||||
|
||||
if (!string.IsNullOrEmpty(Url))
|
||||
{
|
||||
var urls = Url.Split(',');
|
||||
ApiUrl = urls[0];
|
||||
if (urls.Length > 1)
|
||||
{
|
||||
WebUrl = urls[1];
|
||||
}
|
||||
}
|
||||
|
||||
var pushData = new CqmsMeetingSyncData
|
||||
{
|
||||
CollCropCode = thisUnit.CollCropCode, //分包单位社会统一信用码
|
||||
ProjectId = project.SubjectProject, //主包项目Id
|
||||
UnitDomain = Funs.SGGLUrl, //分包单位域名地址【文件存储地址】
|
||||
Items = items //质量会议数据
|
||||
};
|
||||
|
||||
var pushContent = JsonConvert.SerializeObject(pushData);
|
||||
string baseurl = ApiUrl + apiurl;
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
var returndata = APIGetHttpService.Http(baseurl, "Post", contenttype, null, pushContent);
|
||||
|
||||
if (!string.IsNullOrEmpty(returndata))
|
||||
{
|
||||
JObject obj = JObject.Parse(returndata);
|
||||
string code = obj["code"].ToString();
|
||||
string message = obj["message"].ToString();
|
||||
responeData.code = int.Parse(code);
|
||||
responeData.message = message;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "当前没有质量会议数据";
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.message = "同步到总包单位失败!";
|
||||
ErrLogInfo.WriteLog("【质量会议】同步到总包单位失败!", ex);
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 接收保存质量会议数据
|
||||
|
||||
/// <summary>
|
||||
/// 接收保存质量会议数据
|
||||
/// </summary>
|
||||
/// <param name="items">质量会议同步数据</param>
|
||||
/// <returns>处理结果消息</returns>
|
||||
public static string SaveCqmsMeetingSyncData(Model.CqmsMeetingSyncData items)
|
||||
{
|
||||
int code = 0;
|
||||
string message = "";
|
||||
try
|
||||
{
|
||||
if (items.Items.Count > 0 || items.Items.Count > 0)
|
||||
{
|
||||
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 (unit == null)
|
||||
{
|
||||
message = "总包单位不存在本单位,请登录总包系统检查维护本单位信息!";
|
||||
}
|
||||
else
|
||||
{
|
||||
//判断主包项目是否存在
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(ProjectId);
|
||||
if (porject == null)
|
||||
{
|
||||
message = "总包单位不存在本项目,请检查总包项目关联是否正确!";
|
||||
}
|
||||
else
|
||||
{
|
||||
ProcessCqmsMeetingData(items.Items, ProjectId, unit.UnitId, UnitDomain);
|
||||
message = "数据推送成功!";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
message = "暂无质量会议数据!";
|
||||
}
|
||||
}
|
||||
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);
|
||||
|
||||
//HTML解码会议内容
|
||||
string meetingContents = !string.IsNullOrEmpty(item.MeetingContents)
|
||||
? HttpUtility.HtmlDecode(item.MeetingContents)
|
||||
: item.MeetingContents;
|
||||
|
||||
if (model == null)
|
||||
{
|
||||
//新增
|
||||
Model.CQMS_Meeting newModel = new Model.CQMS_Meeting
|
||||
{
|
||||
MeetingId = item.MeetingId,
|
||||
ProjectId = projectId,
|
||||
UnitId = getUnitIdByUnitName(item.UnitName) ?? unitId,
|
||||
MeetingCode = item.MeetingCode,
|
||||
MeetingName = item.MeetingName,
|
||||
MeetingDate = item.MeetingDate,
|
||||
MeetingHours = item.MeetingHours,
|
||||
MeetingPlace = item.MeetingPlace,
|
||||
MeetingHostMan = APIDataShareSyncService.getUserId(item.MeetingHostManName),
|
||||
MeetingHostManOther = item.MeetingHostManOther,
|
||||
AttentPersonNum = item.AttentPersonNum,
|
||||
AttentPerson = item.AttentPerson,
|
||||
AttentPersonIds = item.AttentPersonIds,
|
||||
MeetingContents = meetingContents,
|
||||
CompileMan = APIDataShareSyncService.getUserId(item.CompileManName),
|
||||
CompileDate = item.CompileDate,
|
||||
States = item.States
|
||||
};
|
||||
|
||||
db.CQMS_Meeting.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
|
||||
//保存会议编码
|
||||
if (!string.IsNullOrEmpty(item.MeetingCode))
|
||||
{
|
||||
Model.Sys_CodeRecords codeRecords = new Model.Sys_CodeRecords
|
||||
{
|
||||
CodeRecordId = SQLHelper.GetNewID(typeof(Model.Sys_CodeRecords)),
|
||||
DataId = item.MeetingId,
|
||||
Code = item.MeetingCode
|
||||
};
|
||||
db.Sys_CodeRecords.InsertOnSubmit(codeRecords);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//更新
|
||||
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();
|
||||
|
||||
//更新会议编码
|
||||
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
|
||||
|
||||
|
||||
#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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,447 @@
|
||||
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 Newtonsoft.Json;
|
||||
using RestSharp;
|
||||
using System.Net;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量计量器具同步服务
|
||||
/// </summary>
|
||||
public class APIInspectionMachineSyncService
|
||||
{
|
||||
#region 根据项目、单位获取质量计量器具列表
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目、单位获取质量计量器具列表
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目ID</param>
|
||||
/// <param name="unitId">单位ID</param>
|
||||
/// <param name="dataId">数据ID(可选,用于单条数据同步)</param>
|
||||
/// <returns>质量计量器具数据列表</returns>
|
||||
public static List<Model.InspectionMachineSyncItem> GetInspectionMachineListsByProjectIdUnitIdPage(
|
||||
string projectId, string unitId, string dataId = "")
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var list = from x in db.Comprehensive_InspectionMachine
|
||||
where x.ProjectId == projectId
|
||||
select x;
|
||||
|
||||
if (!string.IsNullOrEmpty(unitId))
|
||||
{
|
||||
list = list.Where(x => x.UnitId == unitId);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(dataId))
|
||||
{
|
||||
list = list.Where(x => x.InspectionMachineId == dataId);
|
||||
}
|
||||
|
||||
var dataList = (from x in list
|
||||
join unit in db.Base_Unit on x.UnitId equals unit.UnitId into unitTemp
|
||||
from unit in unitTemp.DefaultIfEmpty()
|
||||
join pro in db.Base_CNProfessional on x.CNProfessionalId equals pro.CNProfessionalId into proTemp
|
||||
from pro in proTemp.DefaultIfEmpty()
|
||||
join u1 in db.Sys_User on x.CompileMan equals u1.UserId into u1Temp
|
||||
from u1 in u1Temp.DefaultIfEmpty()
|
||||
select new InspectionMachineSyncItem
|
||||
{
|
||||
InspectionMachineId = x.InspectionMachineId,
|
||||
InspectionMachineCode = x.InspectionMachineCode,
|
||||
InspectionMachineName = x.InspectionMachineName,
|
||||
SpecificationModel = x.SpecificationModel,
|
||||
UnitsCount = x.UnitsCount,
|
||||
//SType = x.SType,
|
||||
InspectionType = x.InspectionType,
|
||||
InspectionDate = x.InspectionDate,
|
||||
NextTestDate = x.NextTestDate,
|
||||
TestCycle = x.TestCycle,
|
||||
IsCheckOK = x.IsCheckOK,
|
||||
IsVerification = x.IsVerification,
|
||||
Status = x.Status,
|
||||
IsOnSite = x.IsOnSite,
|
||||
LeaveDate = x.LeaveDate,
|
||||
UnitId = x.UnitId,
|
||||
UnitName = unit.UnitName,
|
||||
CNProfessionalId = x.CNProfessionalId,
|
||||
CNProfessionalName = pro.ProfessionalName,
|
||||
CompileMan = x.CompileMan,
|
||||
CompileManName = u1.UserName,
|
||||
CompileDate = x.CompileDate,
|
||||
AttachUrl = x.AttachUrl,
|
||||
ProjectId = x.ProjectId,
|
||||
DataSource = "1"
|
||||
}).ToList();
|
||||
|
||||
return dataList;
|
||||
}
|
||||
}
|
||||
|
||||
#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 apiurl = "/api/InspectionMachineSync/SaveInspectionMachineSyncData";
|
||||
|
||||
//总包单位接口地址
|
||||
var Url = BLL.UnitService.getUnitApiUrlByUnitId(project.SubjectUnit);
|
||||
var ApiUrl = "";
|
||||
var WebUrl = "";
|
||||
|
||||
if (!string.IsNullOrEmpty(Url))
|
||||
{
|
||||
var urls = Url.Split(',');
|
||||
ApiUrl = urls[0];
|
||||
if (urls.Length > 1)
|
||||
{
|
||||
WebUrl = urls[1];
|
||||
}
|
||||
}
|
||||
|
||||
var pushData = new InspectionMachineSyncData
|
||||
{
|
||||
CollCropCode = thisUnit.CollCropCode, //分包单位社会统一信用码
|
||||
ProjectId = project.SubjectProject, //主包项目Id
|
||||
UnitDomain = Funs.SGGLUrl, //分包单位域名地址【文件存储地址】
|
||||
Items = items //质量计量器具数据
|
||||
};
|
||||
|
||||
var pushContent = JsonConvert.SerializeObject(pushData);
|
||||
string baseurl = ApiUrl + apiurl;
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
var returndata = APIGetHttpService.Http(baseurl, "Post", contenttype, null, pushContent);
|
||||
|
||||
if (!string.IsNullOrEmpty(returndata))
|
||||
{
|
||||
JObject obj = JObject.Parse(returndata);
|
||||
string code = obj["code"].ToString();
|
||||
string message = obj["message"].ToString();
|
||||
responeData.code = int.Parse(code);
|
||||
responeData.message = message;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "当前没有质量计量器具数据";
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.message = "同步到总包单位失败!";
|
||||
ErrLogInfo.WriteLog("【质量计量器具】同步到总包单位失败!", ex);
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 接收保存质量计量器具数据
|
||||
|
||||
/// <summary>
|
||||
/// 接收保存质量计量器具数据
|
||||
/// </summary>
|
||||
/// <param name="items">质量计量器具同步数据</param>
|
||||
/// <returns>处理结果消息</returns>
|
||||
public static string SaveInspectionMachineSyncData(Model.InspectionMachineSyncData items)
|
||||
{
|
||||
int code = 0;
|
||||
string message = "";
|
||||
try
|
||||
{
|
||||
if (items.Items.Count > 0 || items.Items.Count > 0)
|
||||
{
|
||||
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 (unit == null)
|
||||
{
|
||||
message = "总包单位不存在本单位,请登录总包系统检查维护本单位信息!";
|
||||
}
|
||||
else
|
||||
{
|
||||
//判断主包项目是否存在
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(ProjectId);
|
||||
if (porject == null)
|
||||
{
|
||||
message = "总包单位不存在本项目,请检查总包项目关联是否正确!";
|
||||
}
|
||||
else
|
||||
{
|
||||
ProcessInspectionMachineData(items.Items, ProjectId, unit.UnitId, UnitDomain);
|
||||
message = "数据推送成功!";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
message = "暂无质量计量器具数据!";
|
||||
}
|
||||
}
|
||||
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);
|
||||
|
||||
if (model == null)
|
||||
{
|
||||
//新增
|
||||
Model.Comprehensive_InspectionMachine newModel = new Model.Comprehensive_InspectionMachine
|
||||
{
|
||||
InspectionMachineId = item.InspectionMachineId,
|
||||
ProjectId = projectId,
|
||||
UnitId = getUnitIdByUnitName(item.UnitName) ?? unitId,
|
||||
InspectionMachineCode = item.InspectionMachineCode,
|
||||
InspectionMachineName = item.InspectionMachineName,
|
||||
SpecificationModel = item.SpecificationModel,
|
||||
UnitsCount = item.UnitsCount,
|
||||
//SType = item.SType,
|
||||
InspectionType = item.InspectionType,
|
||||
InspectionDate = item.InspectionDate,
|
||||
NextTestDate = item.NextTestDate,
|
||||
TestCycle = item.TestCycle,
|
||||
IsCheckOK = item.IsCheckOK,
|
||||
IsVerification = item.IsVerification,
|
||||
Status = item.Status,
|
||||
IsOnSite = item.IsOnSite,
|
||||
LeaveDate = item.LeaveDate,
|
||||
CNProfessionalId = getCNProfessionalId(item.CNProfessionalName),
|
||||
CompileMan = APIDataShareSyncService.getUserId(item.CompileManName),
|
||||
CompileDate = item.CompileDate,
|
||||
AttachUrl = item.AttachUrl
|
||||
};
|
||||
|
||||
db.Comprehensive_InspectionMachine.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
//更新
|
||||
model.ProjectId = projectId;
|
||||
model.UnitId = getUnitIdByUnitName(item.UnitName) ?? unitId;
|
||||
model.InspectionMachineCode = item.InspectionMachineCode;
|
||||
model.InspectionMachineName = item.InspectionMachineName;
|
||||
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.TestCycle = item.TestCycle;
|
||||
model.IsCheckOK = item.IsCheckOK;
|
||||
model.IsVerification = item.IsVerification;
|
||||
model.Status = item.Status;
|
||||
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;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
//处理附件
|
||||
if (!string.IsNullOrEmpty(item.AttachUrl))
|
||||
{
|
||||
APIDataShareSyncService.OperationAttachFile(WebUrl, item.InspectionMachineId,
|
||||
BLL.Const.InspectionMachineMenuId, item.AttachUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 辅助映射方法
|
||||
|
||||
/// <summary>
|
||||
/// 获取专业ID(根据名称)
|
||||
/// </summary>
|
||||
/// <param name="professionalName">专业名称</param>
|
||||
/// <returns>专业ID</returns>
|
||||
private static string getCNProfessionalId(string professionalName)
|
||||
{
|
||||
string professionalId = null;
|
||||
if (!string.IsNullOrEmpty(professionalName))
|
||||
{
|
||||
var pro = Funs.DB.Base_CNProfessional.FirstOrDefault(x => x.ProfessionalName == professionalName);
|
||||
if (pro != null)
|
||||
{
|
||||
professionalId = pro.CNProfessionalId;
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -13,447 +13,456 @@ using RestSharp;
|
||||
using System.Net;
|
||||
|
||||
|
||||
namespace BLL;
|
||||
|
||||
public class APIHazardRegisterSyncService
|
||||
namespace BLL
|
||||
{
|
||||
#region 根据项目、单位获取安全检查列表分页
|
||||
|
||||
public static List<Model.HazardRegisterSyncItem> GetHazardRegisterLitsByprojectIdUnitIdPage(string projectId,
|
||||
string unitId, string dataId = "")
|
||||
public class APIHazardRegisterSyncService
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
#region 根据项目、单位获取安全检查列表分页
|
||||
|
||||
public static List<Model.HazardRegisterSyncItem> GetHazardRegisterLitsByprojectIdUnitIdPage(string projectId,
|
||||
string unitId, string dataId = "")
|
||||
{
|
||||
var list = from x in db.HSSE_Hazard_HazardRegister where x.ProjectId == projectId select x;
|
||||
if (!string.IsNullOrEmpty(unitId))
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
list = list.Where(x => x.ResponsibleUnit == unitId);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(dataId))
|
||||
{
|
||||
list = list.Where(x => x.HazardRegisterId == dataId);
|
||||
}
|
||||
|
||||
var dataList = (from x in list
|
||||
join ht in db.HSSE_Hazard_HazardRegisterTypes on x.RegisterTypesId equals ht.RegisterTypesId into htTemp
|
||||
from ht in htTemp.DefaultIfEmpty()
|
||||
join uw in db.WBS_UnitWork on x.Place equals uw.UnitWorkId into uwTemp
|
||||
from uw in uwTemp.DefaultIfEmpty()
|
||||
join u1 in db.Sys_User on x.ResponsibleMan equals u1.UserId into u1Temp
|
||||
from u1 in u1Temp.DefaultIfEmpty()
|
||||
join u2 in db.Sys_User on x.CheckManId equals u2.UserId into u2Temp
|
||||
from u2 in u2Temp.DefaultIfEmpty()
|
||||
join u3 in db.Sys_User on x.ConfirmMan equals u3.UserId into u3Temp
|
||||
from u3 in u3Temp.DefaultIfEmpty()
|
||||
join u4 in db.Sys_User on x.ResponsibleMan2 equals u4.UserId into u4Temp
|
||||
from u4 in u4Temp.DefaultIfEmpty()
|
||||
select new HazardRegisterSyncItem
|
||||
var list = from x in db.HSSE_Hazard_HazardRegister where x.ProjectId == projectId select x;
|
||||
if (!string.IsNullOrEmpty(unitId))
|
||||
{
|
||||
HazardRegisterId = x.HazardRegisterId,
|
||||
HazardCode = x.HazardCode,
|
||||
RegisterDate = x.RegisterDate,
|
||||
RegisterDef = x.RegisterDef,
|
||||
Rectification = x.Rectification,
|
||||
Place = x.Place,
|
||||
PlaceName = uw.UnitWorkName,
|
||||
ResponsibleUnit = x.ResponsibleUnit,
|
||||
Observer = x.Observer,
|
||||
RectifiedDate = x.RectifiedDate,
|
||||
AttachUrl = x.AttachUrl,
|
||||
ProjectId = x.ProjectId,
|
||||
States = x.States,
|
||||
IsEffective = x.IsEffective,
|
||||
ResponsibleMan = x.ResponsibleMan,
|
||||
ResponsibleManName = u1.UserName,
|
||||
CheckManId = x.CheckManId,
|
||||
CheckManName = u2.UserName,
|
||||
CheckTime = x.CheckTime,
|
||||
RectificationPeriod = x.RectificationPeriod,
|
||||
ImageUrl = x.ImageUrl,
|
||||
RectificationImageUrl = x.RectificationImageUrl,
|
||||
RectificationTime = x.RectificationTime,
|
||||
ConfirmMan = x.ConfirmMan,
|
||||
ConfirmManName = u3.UserName,
|
||||
ConfirmDate = x.ConfirmDate,
|
||||
HandleIdea = x.HandleIdea,
|
||||
CutPayment = x.CutPayment,
|
||||
ProblemTypes = x.ProblemTypes,
|
||||
RegisterTypesId = x.RegisterTypesId,
|
||||
RegisterTypesName = ht.RegisterTypesName,
|
||||
CheckCycle = x.CheckCycle,
|
||||
CheckItemDetailId = x.CheckItemDetailId,
|
||||
SupCheckItemSetId = x.SupCheckItemSetId,
|
||||
CheckItemSetId = x.CheckItemSetId,
|
||||
CheckSpecialId = x.CheckSpecialId,
|
||||
InstallationId = x.InstallationId,
|
||||
SafeSupervisionId = x.SafeSupervisionId,
|
||||
ResponsibleMan2 = x.ResponsibleMan2,
|
||||
ResponsibleMan2Name = u4.UserName,
|
||||
SafeSupervisionIsOK = x.SafeSupervisionIsOK,
|
||||
GpsLocation = x.GpsLocation,
|
||||
IsWx = x.IsWx,
|
||||
DIC_ID = x.DIC_ID,
|
||||
CCManIds = x.CCManIds,
|
||||
ResultType = x.ResultType,
|
||||
ResultId = x.ResultId,
|
||||
Requirements = x.Requirements,
|
||||
Risk_Level = x.Risk_Level,
|
||||
//ControlId = x.ControlId,
|
||||
DataSource = "1",
|
||||
}).ToList();
|
||||
list = list.Where(x => x.ResponsibleUnit == unitId);
|
||||
}
|
||||
|
||||
return dataList;
|
||||
if (!string.IsNullOrEmpty(dataId))
|
||||
{
|
||||
list = list.Where(x => x.HazardRegisterId == dataId);
|
||||
}
|
||||
|
||||
var dataList = (from x in list
|
||||
join ht in db.HSSE_Hazard_HazardRegisterTypes on x.RegisterTypesId equals ht.RegisterTypesId into htTemp
|
||||
from ht in htTemp.DefaultIfEmpty()
|
||||
join uw in db.WBS_UnitWork on x.Place equals uw.UnitWorkId into uwTemp
|
||||
from uw in uwTemp.DefaultIfEmpty()
|
||||
join u1 in db.Sys_User on x.ResponsibleMan equals u1.UserId into u1Temp
|
||||
from u1 in u1Temp.DefaultIfEmpty()
|
||||
join u2 in db.Sys_User on x.CheckManId equals u2.UserId into u2Temp
|
||||
from u2 in u2Temp.DefaultIfEmpty()
|
||||
join u3 in db.Sys_User on x.ConfirmMan equals u3.UserId into u3Temp
|
||||
from u3 in u3Temp.DefaultIfEmpty()
|
||||
join u4 in db.Sys_User on x.ResponsibleMan2 equals u4.UserId into u4Temp
|
||||
from u4 in u4Temp.DefaultIfEmpty()
|
||||
join att1 in db.AttachFile on x.HazardRegisterId equals att1.ToKeyId into att1Temp
|
||||
from att1 in att1Temp.DefaultIfEmpty()
|
||||
join att2 in db.AttachFile on (x.HazardRegisterId + "-R") equals att2.ToKeyId into att2Temp
|
||||
from att2 in att2Temp.DefaultIfEmpty()
|
||||
select new HazardRegisterSyncItem
|
||||
{
|
||||
HazardRegisterId = x.HazardRegisterId,
|
||||
HazardCode = x.HazardCode,
|
||||
RegisterDate = x.RegisterDate,
|
||||
RegisterDef = x.RegisterDef,
|
||||
Rectification = x.Rectification,
|
||||
Place = x.Place,
|
||||
PlaceName = uw.UnitWorkName,
|
||||
ResponsibleUnit = x.ResponsibleUnit,
|
||||
Observer = x.Observer,
|
||||
RectifiedDate = x.RectifiedDate,
|
||||
AttachUrl = x.AttachUrl,
|
||||
ProjectId = x.ProjectId,
|
||||
States = x.States,
|
||||
IsEffective = x.IsEffective,
|
||||
ResponsibleMan = x.ResponsibleMan,
|
||||
ResponsibleManName = u1.UserName,
|
||||
CheckManId = x.CheckManId,
|
||||
CheckManName = u2.UserName,
|
||||
CheckTime = x.CheckTime,
|
||||
RectificationPeriod = x.RectificationPeriod,
|
||||
ImageUrl = x.ImageUrl,
|
||||
RectificationImageUrl = x.RectificationImageUrl,
|
||||
RectificationTime = x.RectificationTime,
|
||||
ConfirmMan = x.ConfirmMan,
|
||||
ConfirmManName = u3.UserName,
|
||||
ConfirmDate = x.ConfirmDate,
|
||||
HandleIdea = x.HandleIdea,
|
||||
CutPayment = x.CutPayment,
|
||||
ProblemTypes = x.ProblemTypes,
|
||||
RegisterTypesId = x.RegisterTypesId,
|
||||
RegisterTypesName = ht.RegisterTypesName,
|
||||
CheckCycle = x.CheckCycle,
|
||||
CheckItemDetailId = x.CheckItemDetailId,
|
||||
SupCheckItemSetId = x.SupCheckItemSetId,
|
||||
CheckItemSetId = x.CheckItemSetId,
|
||||
CheckSpecialId = x.CheckSpecialId,
|
||||
InstallationId = x.InstallationId,
|
||||
SafeSupervisionId = x.SafeSupervisionId,
|
||||
ResponsibleMan2 = x.ResponsibleMan2,
|
||||
ResponsibleMan2Name = u4.UserName,
|
||||
SafeSupervisionIsOK = x.SafeSupervisionIsOK,
|
||||
GpsLocation = x.GpsLocation,
|
||||
IsWx = x.IsWx,
|
||||
DIC_ID = x.DIC_ID,
|
||||
CCManIds = x.CCManIds,
|
||||
ResultType = x.ResultType,
|
||||
ResultId = x.ResultId,
|
||||
Requirements = x.Requirements,
|
||||
Risk_Level = x.Risk_Level,
|
||||
//ControlId = x.ControlId,
|
||||
AttachFileId1 = att1.AttachFileId,
|
||||
ToKeyId1 = att1.ToKeyId,
|
||||
AttachSource1 = att1.AttachSource,
|
||||
AttachUrl1 = att1.AttachUrl,
|
||||
AttachFileId2 = att2.AttachFileId,
|
||||
ToKeyId2 = att2.ToKeyId,
|
||||
AttachSource2 = att2.AttachSource,
|
||||
AttachUrl2 = att2.AttachUrl,
|
||||
DataSource = "1",
|
||||
}).ToList();
|
||||
|
||||
return dataList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
#region 拉取项目安全检查数据
|
||||
#region 拉取项目安全检查数据
|
||||
|
||||
public static string getHazardRegisterLists()
|
||||
{
|
||||
int code = 0;
|
||||
string message = "";
|
||||
try
|
||||
public static string getHazardRegisterLists(string projectId = "")
|
||||
{
|
||||
string CollCropCode = string.Empty;
|
||||
string unitId = string.Empty;
|
||||
var thisUnit = CommonService.GetIsThisUnit(); //当前单位
|
||||
if (thisUnit != null)
|
||||
int code = 0;
|
||||
string message = "";
|
||||
try
|
||||
{
|
||||
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 CollCropCode = string.Empty;
|
||||
string unitId = string.Empty;
|
||||
var thisUnit = CommonService.GetIsThisUnit(); //当前单位
|
||||
if (thisUnit != null)
|
||||
{
|
||||
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];
|
||||
}
|
||||
}
|
||||
CollCropCode = thisUnit.CollCropCode; //社会统一信用代码
|
||||
unitId = thisUnit.UnitId;
|
||||
}
|
||||
|
||||
// CollCropCode = "913404001520228377Y"; //三化建 测试使用
|
||||
// SubjectProjectId = "B409A8D7-48C7-486E-84C7-E3E7B2C0E5B7";//测试使用
|
||||
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();
|
||||
|
||||
string url =
|
||||
"/api/HazardRegisterSync/getHazardRegisterListByProjectIdAndCollCropCode?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))
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
ProjectList = ProjectList.Where(x => x.ProjectId == projectId).ToList();
|
||||
}
|
||||
|
||||
if (ProjectList.Count > 0)
|
||||
{
|
||||
foreach (var project in ProjectList)
|
||||
{
|
||||
JObject obj = JObject.Parse(strJosn);
|
||||
code = Funs.GetNewIntOrZero(obj["code"].ToString());
|
||||
message = obj["message"].ToString();
|
||||
if (code == 1)
|
||||
string SubjectUnitId = project.SubjectUnit; //集团的单位id
|
||||
string SubjectProjectId = project.SubjectProject; //集团的项目id
|
||||
string ApiUrl = project.SubjectUnitApiUrl;
|
||||
string WebUrl = project.SubjectUnitWebUrl;
|
||||
|
||||
|
||||
// CollCropCode = "91420000177570439L"; //三化建 测试使用
|
||||
// SubjectProjectId = "c7ade79e-7646-4c59-a8fd-020a7e3138c6";//测试使用
|
||||
|
||||
string url =
|
||||
"/api/HazardRegisterSync/getHazardRegisterListByProjectIdAndCollCropCode?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))
|
||||
{
|
||||
var getData =
|
||||
JsonConvert.DeserializeObject<List<HazardRegisterSyncItem>>(obj["data"].ToString());
|
||||
if (getData.Count() > 0)
|
||||
JObject obj = JObject.Parse(strJosn);
|
||||
code = Funs.GetNewIntOrZero(obj["code"].ToString());
|
||||
message = obj["message"].ToString();
|
||||
if (code == 1)
|
||||
{
|
||||
ProcessHazardRegisterData(getData, project.ProjectId, unitId, WebUrl,"pull");
|
||||
var getData =
|
||||
JsonConvert.DeserializeObject<List<HazardRegisterSyncItem>>(obj["data"].ToString());
|
||||
if (getData.Count() > 0)
|
||||
{
|
||||
ProcessHazardRegisterData(getData, project.ProjectId, unitId, WebUrl, "pull");
|
||||
}
|
||||
message = "获取成功:同步安全检查数" + getData.Count().ToString() + "条";
|
||||
}
|
||||
message = "获取成功:同步安全检查数" + getData.Count().ToString() + "条";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
message = "获取失败:" + ex.Message;
|
||||
ErrLogInfo.WriteLog("安全检查获取!", ex);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 推送安全检查数据
|
||||
|
||||
public static ReturnData pushHazardRegisterLists(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)
|
||||
catch (Exception ex)
|
||||
{
|
||||
//获取安全检查数据
|
||||
var items = GetHazardRegisterLitsByprojectIdUnitIdPage(projectId, "", dataId);
|
||||
//总包地址推送
|
||||
if (items.Count() > 0)
|
||||
message = "获取失败:" + ex.Message;
|
||||
ErrLogInfo.WriteLog("安全检查获取!", ex);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 推送安全检查数据
|
||||
|
||||
public static ReturnData pushHazardRegisterLists(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 thisUnit = CommonService.GetIsThisUnit(); //当前单位
|
||||
var apiurl = "/api/HazardRegisterSync/SaveHazardRegisterSyncData";
|
||||
//总包单位接口地址
|
||||
var Url = BLL.UnitService.getUnitApiUrlByUnitId(project.SubjectUnit);
|
||||
var ApiUrl = "";
|
||||
var WebUrl = "";
|
||||
if (!string.IsNullOrEmpty(Url))
|
||||
//获取安全检查数据
|
||||
var items = GetHazardRegisterLitsByprojectIdUnitIdPage(projectId, "", dataId);
|
||||
//总包地址推送
|
||||
if (items.Count() > 0)
|
||||
{
|
||||
var urls = Url.Split(',');
|
||||
ApiUrl = urls[0];
|
||||
if (urls.Length > 1)
|
||||
var thisUnit = CommonService.GetIsThisUnit(); //当前单位
|
||||
var apiurl = "/api/HazardRegisterSync/SaveHazardRegisterSyncData";
|
||||
string ApiUrl = project.SubjectUnitApiUrl;
|
||||
string WebUrl = project.SubjectUnitWebUrl;
|
||||
// thisUnit.CollCropCode = "913404001520228377Y";//测试使用
|
||||
// project.SubjectProject = "B409A8D7-48C7-486E-84C7-E3E7B2C0E5B7";//测试使用
|
||||
|
||||
var pushData = new HazardRegisterSyncData
|
||||
{
|
||||
WebUrl = urls[1];
|
||||
CollCropCode = thisUnit.CollCropCode, //分包单位社会统一信用码
|
||||
// CollCropCode = "91420000177570439L", //分包单位社会统一信用码
|
||||
// ProjectId = "c7ade79e-7646-4c59-a8fd-020a7e3138c6", //主包项目Id
|
||||
ProjectId = project.SubjectProject, //主包项目Id
|
||||
UnitDomain = Funs.SGGLUrl, //分包单位域名地址【文件存储地址】
|
||||
Items = items //安全检查数据
|
||||
};
|
||||
var pushContent = JsonConvert.SerializeObject(pushData);
|
||||
string baseurl = ApiUrl + apiurl;
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
var returndata = APIGetHttpService.Http(baseurl, "Post", contenttype, null, pushContent);
|
||||
if (!string.IsNullOrEmpty(returndata))
|
||||
{
|
||||
JObject obj = JObject.Parse(returndata);
|
||||
string code = obj["code"].ToString();
|
||||
string message = obj["message"].ToString();
|
||||
responeData.code = int.Parse(code);
|
||||
responeData.message = message;
|
||||
}
|
||||
}
|
||||
// thisUnit.CollCropCode = "913404001520228377Y";//测试使用
|
||||
// project.SubjectProject = "B409A8D7-48C7-486E-84C7-E3E7B2C0E5B7";//测试使用
|
||||
|
||||
var pushData = new HazardRegisterSyncData
|
||||
{
|
||||
CollCropCode = thisUnit.CollCropCode, //分包单位社会统一信用码
|
||||
ProjectId = project.SubjectProject, //主包项目Id
|
||||
UnitDomain = Funs.SGGLUrl, //分包单位域名地址【文件存储地址】
|
||||
Items = items //安全检查数据
|
||||
};
|
||||
var pushContent = JsonConvert.SerializeObject(pushData);
|
||||
string baseurl = ApiUrl + apiurl;
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
var returndata = APIGetHttpService.Http(baseurl, "Post", contenttype, null, pushContent);
|
||||
if (!string.IsNullOrEmpty(returndata))
|
||||
{
|
||||
JObject obj = JObject.Parse(returndata);
|
||||
string code = obj["code"].ToString();
|
||||
string message = obj["message"].ToString();
|
||||
responeData.code = int.Parse(code);
|
||||
responeData.message = message;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "当前没有项目安全检查数据";
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.message = "同步到总包单位失败!";
|
||||
ErrLogInfo.WriteLog("【安全检查】同步到总包单位失败!", ex);
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 接收保存项目安全检查数据
|
||||
|
||||
public static string SaveHazardRegisterSyncData(Model.HazardRegisterSyncData items)
|
||||
{
|
||||
int code = 0;
|
||||
string message = "";
|
||||
try
|
||||
{
|
||||
if (items.Items.Count > 0 || items.Items.Count > 0)
|
||||
{
|
||||
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 (unit == null)
|
||||
{
|
||||
message = "总包单位不存在本单位,请登录总包系统检查维护本单位信息!";
|
||||
}
|
||||
else
|
||||
{
|
||||
//2、判断主包项目是否存在
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(ProjectId);
|
||||
if (porject == null)
|
||||
{
|
||||
message = "总包单位不存在本项目,请检查总包项目关联是否正确!";
|
||||
}
|
||||
else
|
||||
{
|
||||
ProcessHazardRegisterData(items.Items, ProjectId, unit.UnitId, UnitDomain,"push");
|
||||
message = "数据推送成功!";
|
||||
responeData.code = 0;
|
||||
responeData.message = "当前没有项目安全检查数据";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
catch (Exception ex)
|
||||
{
|
||||
message = "暂无项目安全检查数据!";
|
||||
responeData.message = "同步到总包单位失败!";
|
||||
ErrLogInfo.WriteLog("【安全检查】同步到总包单位失败!", ex);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
#region 处理单个安全检查数据的新增或更新逻辑
|
||||
#region 接收保存项目安全检查数据
|
||||
|
||||
/// <summary>
|
||||
/// 处理单个安全检查数据的新增或更新逻辑
|
||||
/// </summary>
|
||||
/// <param name="item">安全检查数据项</param>
|
||||
/// <param name="projectId">项目id</param>
|
||||
/// <param name="unitId">单位ID</param>
|
||||
/// <param name="WebUrl">Web地址</param>
|
||||
private static void ProcessHazardRegisterData(List<Model.HazardRegisterSyncItem> getData, string projectId,
|
||||
string unitId, string WebUrl, string type)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
public static string SaveHazardRegisterSyncData(Model.HazardRegisterSyncData items)
|
||||
{
|
||||
foreach (var item in getData)
|
||||
int code = 0;
|
||||
string message = "";
|
||||
try
|
||||
{
|
||||
Model.HSSE_Hazard_HazardRegister model =
|
||||
db.HSSE_Hazard_HazardRegister.FirstOrDefault(x => x.HazardRegisterId == item.HazardRegisterId);
|
||||
if (model == null)
|
||||
if (items.Items.Count > 0 || items.Items.Count > 0)
|
||||
{
|
||||
Model.HSSE_Hazard_HazardRegister newModel = new Model.HSSE_Hazard_HazardRegister
|
||||
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 (unit == null)
|
||||
{
|
||||
HazardRegisterId = item.HazardRegisterId,
|
||||
HazardCode = item.HazardCode,
|
||||
RegisterDate = item.RegisterDate,
|
||||
RegisterDef = item.RegisterDef,
|
||||
Rectification = item.Rectification,
|
||||
Place = APIDataShareSyncService.getUnitWorkId(item.PlaceName, projectId),
|
||||
ResponsibleUnit = unitId,
|
||||
Observer = item.Observer,
|
||||
AttachUrl = item.AttachUrl,
|
||||
ProjectId = projectId,
|
||||
States = item.States,
|
||||
IsEffective = item.IsEffective,
|
||||
ResponsibleMan = APIDataShareSyncService.getUserId(item.ResponsibleManName),
|
||||
CheckManId = APIDataShareSyncService.getUserId(item.CheckManName),
|
||||
CheckTime = item.CheckTime,
|
||||
RectificationPeriod = item.RectificationPeriod,
|
||||
ImageUrl = item.ImageUrl,
|
||||
RectificationImageUrl = item.RectificationImageUrl,
|
||||
RectificationTime = item.RectificationTime,
|
||||
ConfirmMan = APIDataShareSyncService.getUserId(item.ConfirmManName),
|
||||
ConfirmDate = item.ConfirmDate,
|
||||
HandleIdea = item.HandleIdea,
|
||||
CutPayment = item.CutPayment,
|
||||
ProblemTypes = item.ProblemTypes,
|
||||
RegisterTypesId = APIDataShareSyncService.getRegisterTypesId(item.RegisterTypesName),
|
||||
CheckCycle = item.CheckCycle,
|
||||
CheckItemDetailId = item.CheckItemDetailId,
|
||||
SupCheckItemSetId = item.SupCheckItemSetId,
|
||||
CheckItemSetId = item.CheckItemSetId,
|
||||
CheckSpecialId = item.CheckSpecialId,
|
||||
InstallationId = item.InstallationId,
|
||||
SafeSupervisionId = item.SafeSupervisionId,
|
||||
ResponsibleMan2 = APIDataShareSyncService.getUserId(item.ResponsibleMan2Name),
|
||||
SafeSupervisionIsOK = item.SafeSupervisionIsOK,
|
||||
GpsLocation = item.GpsLocation,
|
||||
IsWx = item.IsWx,
|
||||
DIC_ID = item.DIC_ID,
|
||||
CCManIds = item.CCManIds,
|
||||
ResultType = item.ResultType,
|
||||
ResultId = item.ResultId,
|
||||
Requirements = item.Requirements,
|
||||
Risk_Level = item.Risk_Level,
|
||||
//ControlId = item.ControlId,
|
||||
};
|
||||
if (type == "pull")
|
||||
{
|
||||
newModel.DataSource = item.DataSource;
|
||||
message = "总包单位不存在本单位,请登录总包系统检查维护本单位信息!";
|
||||
}
|
||||
else
|
||||
{
|
||||
//2、判断主包项目是否存在
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(ProjectId);
|
||||
if (porject == null)
|
||||
{
|
||||
message = "总包单位不存在本项目,请检查总包项目关联是否正确!";
|
||||
}
|
||||
else
|
||||
{
|
||||
ProcessHazardRegisterData(items.Items, ProjectId, unit.UnitId, UnitDomain, "push");
|
||||
message = "数据推送成功!";
|
||||
}
|
||||
}
|
||||
db.HSSE_Hazard_HazardRegister.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
model.HazardRegisterId = item.HazardRegisterId;
|
||||
model.HazardCode = item.HazardCode;
|
||||
model.RegisterDate = item.RegisterDate;
|
||||
model.RegisterDef = item.RegisterDef;
|
||||
model.Rectification = item.Rectification;
|
||||
model.Place = APIDataShareSyncService.getUnitWorkId(item.PlaceName, projectId);
|
||||
model.ResponsibleUnit = unitId;
|
||||
model.Observer = item.Observer;
|
||||
model.AttachUrl = item.AttachUrl;
|
||||
model.ProjectId = projectId;
|
||||
model.States = item.States;
|
||||
model.IsEffective = item.IsEffective;
|
||||
model.ResponsibleMan = APIDataShareSyncService.getUserId(item.ResponsibleManName);
|
||||
model.CheckManId = APIDataShareSyncService.getUserId(item.CheckManName);
|
||||
model.CheckTime = item.CheckTime;
|
||||
model.RectificationPeriod = item.RectificationPeriod;
|
||||
model.ImageUrl = item.ImageUrl;
|
||||
model.RectificationImageUrl = item.RectificationImageUrl;
|
||||
model.RectificationTime = item.RectificationTime;
|
||||
model.ConfirmMan = APIDataShareSyncService.getUserId(item.ConfirmManName);
|
||||
model.ConfirmDate = item.ConfirmDate;
|
||||
model.HandleIdea = item.HandleIdea;
|
||||
model.CutPayment = item.CutPayment;
|
||||
model.ProblemTypes = item.ProblemTypes;
|
||||
model.RegisterTypesId = APIDataShareSyncService.getRegisterTypesId(item.RegisterTypesName);
|
||||
model.CheckCycle = item.CheckCycle;
|
||||
model.CheckItemDetailId = item.CheckItemDetailId;
|
||||
model.SupCheckItemSetId = item.SupCheckItemSetId;
|
||||
model.CheckItemSetId = item.CheckItemSetId;
|
||||
model.CheckSpecialId = item.CheckSpecialId;
|
||||
model.InstallationId = item.InstallationId;
|
||||
model.SafeSupervisionId = item.SafeSupervisionId;
|
||||
model.ResponsibleMan2 = APIDataShareSyncService.getUserId(item.ResponsibleMan2Name);
|
||||
model.SafeSupervisionIsOK = item.SafeSupervisionIsOK;
|
||||
model.GpsLocation = item.GpsLocation;
|
||||
model.IsWx = item.IsWx;
|
||||
model.DIC_ID = item.DIC_ID;
|
||||
model.CCManIds = item.CCManIds;
|
||||
model.ResultType = item.ResultType;
|
||||
model.ResultId = item.ResultId;
|
||||
model.Requirements = item.Requirements;
|
||||
model.Risk_Level = item.Risk_Level;
|
||||
//model.ControlId = item.ControlId;
|
||||
if (type == "pull")
|
||||
message = "暂无项目安全检查数据!";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 处理单个安全检查数据的新增或更新逻辑
|
||||
|
||||
/// <summary>
|
||||
/// 处理单个安全检查数据的新增或更新逻辑
|
||||
/// </summary>
|
||||
/// <param name="item">安全检查数据项</param>
|
||||
/// <param name="projectId">项目id</param>
|
||||
/// <param name="unitId">单位ID</param>
|
||||
/// <param name="WebUrl">Web地址</param>
|
||||
private static void ProcessHazardRegisterData(List<Model.HazardRegisterSyncItem> getData, string projectId,
|
||||
string unitId, string WebUrl, string type)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
foreach (var item in getData)
|
||||
{
|
||||
Model.HSSE_Hazard_HazardRegister model =
|
||||
db.HSSE_Hazard_HazardRegister.FirstOrDefault(x => x.HazardRegisterId == item.HazardRegisterId);
|
||||
if (model == null)
|
||||
{
|
||||
model.DataSource = item.DataSource;
|
||||
Model.HSSE_Hazard_HazardRegister newModel = new Model.HSSE_Hazard_HazardRegister
|
||||
{
|
||||
HazardRegisterId = item.HazardRegisterId,
|
||||
HazardCode = item.HazardCode,
|
||||
RegisterDate = item.RegisterDate,
|
||||
RegisterDef = item.RegisterDef,
|
||||
Rectification = item.Rectification,
|
||||
Place = APIDataShareSyncService.getUnitWorkId(item.PlaceName, projectId),
|
||||
ResponsibleUnit = unitId,
|
||||
Observer = item.Observer,
|
||||
AttachUrl = item.AttachUrl,
|
||||
ProjectId = projectId,
|
||||
States = item.States,
|
||||
IsEffective = item.IsEffective,
|
||||
ResponsibleMan = APIDataShareSyncService.getUserId(item.ResponsibleManName),
|
||||
CheckManId = APIDataShareSyncService.getUserId(item.CheckManName),
|
||||
CheckTime = item.CheckTime,
|
||||
RectificationPeriod = item.RectificationPeriod,
|
||||
ImageUrl = item.ImageUrl,
|
||||
RectificationImageUrl = item.RectificationImageUrl,
|
||||
RectificationTime = item.RectificationTime,
|
||||
ConfirmMan = APIDataShareSyncService.getUserId(item.ConfirmManName),
|
||||
ConfirmDate = item.ConfirmDate,
|
||||
HandleIdea = item.HandleIdea,
|
||||
CutPayment = item.CutPayment,
|
||||
ProblemTypes = item.ProblemTypes,
|
||||
RegisterTypesId = APIDataShareSyncService.getRegisterTypesId(item.RegisterTypesName),
|
||||
CheckCycle = item.CheckCycle,
|
||||
CheckItemDetailId = item.CheckItemDetailId,
|
||||
SupCheckItemSetId = item.SupCheckItemSetId,
|
||||
CheckItemSetId = item.CheckItemSetId,
|
||||
CheckSpecialId = item.CheckSpecialId,
|
||||
InstallationId = item.InstallationId,
|
||||
SafeSupervisionId = item.SafeSupervisionId,
|
||||
ResponsibleMan2 = APIDataShareSyncService.getUserId(item.ResponsibleMan2Name),
|
||||
SafeSupervisionIsOK = item.SafeSupervisionIsOK,
|
||||
GpsLocation = item.GpsLocation,
|
||||
IsWx = item.IsWx,
|
||||
DIC_ID = item.DIC_ID,
|
||||
CCManIds = item.CCManIds,
|
||||
ResultType = item.ResultType,
|
||||
ResultId = item.ResultId,
|
||||
Requirements = item.Requirements,
|
||||
Risk_Level = item.Risk_Level,
|
||||
//ControlId = item.ControlId,
|
||||
};
|
||||
if (type == "pull")
|
||||
{
|
||||
newModel.DataSource = item.DataSource;
|
||||
}
|
||||
db.HSSE_Hazard_HazardRegister.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
// model.HazardRegisterId = item.HazardRegisterId;
|
||||
model.HazardCode = item.HazardCode;
|
||||
model.RegisterDate = item.RegisterDate;
|
||||
model.RegisterDef = item.RegisterDef;
|
||||
model.Rectification = item.Rectification;
|
||||
model.Place = APIDataShareSyncService.getUnitWorkId(item.PlaceName, projectId);
|
||||
model.ResponsibleUnit = unitId;
|
||||
model.Observer = item.Observer;
|
||||
model.AttachUrl = item.AttachUrl;
|
||||
model.ProjectId = projectId;
|
||||
model.States = item.States;
|
||||
model.IsEffective = item.IsEffective;
|
||||
model.ResponsibleMan = APIDataShareSyncService.getUserId(item.ResponsibleManName);
|
||||
model.CheckManId = APIDataShareSyncService.getUserId(item.CheckManName);
|
||||
model.CheckTime = item.CheckTime;
|
||||
model.RectificationPeriod = item.RectificationPeriod;
|
||||
model.ImageUrl = item.ImageUrl;
|
||||
model.RectificationImageUrl = item.RectificationImageUrl;
|
||||
model.RectificationTime = item.RectificationTime;
|
||||
model.ConfirmMan = APIDataShareSyncService.getUserId(item.ConfirmManName);
|
||||
model.ConfirmDate = item.ConfirmDate;
|
||||
model.HandleIdea = item.HandleIdea;
|
||||
model.CutPayment = item.CutPayment;
|
||||
model.ProblemTypes = item.ProblemTypes;
|
||||
model.RegisterTypesId = APIDataShareSyncService.getRegisterTypesId(item.RegisterTypesName);
|
||||
model.CheckCycle = item.CheckCycle;
|
||||
model.CheckItemDetailId = item.CheckItemDetailId;
|
||||
model.SupCheckItemSetId = item.SupCheckItemSetId;
|
||||
model.CheckItemSetId = item.CheckItemSetId;
|
||||
model.CheckSpecialId = item.CheckSpecialId;
|
||||
model.InstallationId = item.InstallationId;
|
||||
model.SafeSupervisionId = item.SafeSupervisionId;
|
||||
model.ResponsibleMan2 = APIDataShareSyncService.getUserId(item.ResponsibleMan2Name);
|
||||
model.SafeSupervisionIsOK = item.SafeSupervisionIsOK;
|
||||
model.GpsLocation = item.GpsLocation;
|
||||
model.IsWx = item.IsWx;
|
||||
model.DIC_ID = item.DIC_ID;
|
||||
model.CCManIds = item.CCManIds;
|
||||
model.ResultType = item.ResultType;
|
||||
model.ResultId = item.ResultId;
|
||||
model.Requirements = item.Requirements;
|
||||
model.Risk_Level = item.Risk_Level;
|
||||
//model.ControlId = item.ControlId;
|
||||
if (type == "pull")
|
||||
{
|
||||
model.DataSource = item.DataSource;
|
||||
}
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
//附件处理
|
||||
if (!string.IsNullOrEmpty(item.AttachUrl1))
|
||||
{
|
||||
BLL.FileInsertService.SaveAttachFileRecords(WebUrl, item.AttachFileId1, item.ToKeyId1,
|
||||
item.AttachSource1, item.AttachUrl1);
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(item.ImageUrl))
|
||||
{
|
||||
APIDataShareSyncService.SafeDownloadHeadImageAsync(WebUrl, item.ImageUrl);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(item.ImageUrl))
|
||||
{
|
||||
APIDataShareSyncService.OperationAttachFile(WebUrl, item.HazardRegisterId,
|
||||
BLL.Const.HSSE_HiddenRectificationListMenuId, item.ImageUrl);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(item.RectificationImageUrl))
|
||||
{
|
||||
APIDataShareSyncService.OperationAttachFile(WebUrl, item.HazardRegisterId+"-R",
|
||||
BLL.Const.HSSE_HiddenRectificationListMenuId, item.RectificationImageUrl);
|
||||
if (!string.IsNullOrEmpty(item.AttachUrl2))
|
||||
{
|
||||
BLL.FileInsertService.SaveAttachFileRecords(WebUrl, item.AttachFileId2, item.ToKeyId2,
|
||||
item.AttachSource2, item.AttachUrl2);
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(item.RectificationImageUrl))
|
||||
{
|
||||
APIDataShareSyncService.SafeDownloadHeadImageAsync(WebUrl, item.RectificationImageUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,7 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -40,8 +38,8 @@ namespace BLL
|
||||
from blt in bltGroup.DefaultIfEmpty()
|
||||
join su in db.Sys_User on x.CompileMan equals su.UserId into sUser
|
||||
from su in sUser.DefaultIfEmpty()
|
||||
//join uw in db.WBS_UnitWork on x.WorkAreaId equals uw.UnitWorkId into uwGroup
|
||||
//from uw in uwGroup.DefaultIfEmpty()
|
||||
//join uw in db.WBS_UnitWork on x.WorkAreaId equals uw.UnitWorkId into uwGroup
|
||||
//from uw in uwGroup.DefaultIfEmpty()
|
||||
join att in db.AttachFile on x.LicenseManagerId equals att.ToKeyId into attTemp
|
||||
from att in attTemp.DefaultIfEmpty()
|
||||
join att1 in db.AttachFile on (x.LicenseManagerId + "_GB") equals att1.ToKeyId into att1Temp
|
||||
@@ -88,7 +86,7 @@ namespace BLL
|
||||
if (dataList.Count() > 0)
|
||||
{
|
||||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(projectId);
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(projectId);
|
||||
var pushData = new LicenseManagerData
|
||||
{
|
||||
CollCropCode = thisUnit.CollCropCode,//分包单位社会统一信用码
|
||||
@@ -96,34 +94,41 @@ namespace BLL
|
||||
UnitName = thisUnit.UnitName,//分包单位名称
|
||||
ShortUnitName = thisUnit.ShortUnitName,//分包单位简称
|
||||
UnitDomain = Funs.SGGLUrl,//分包单位域名地址【文件存储地址】
|
||||
SubjectUnit = porject.SubjectUnit,//主包单位Id
|
||||
SubjectProject = porject.SubjectProject,//主包项目Id
|
||||
SubjectUnit = project.SubjectUnit,//主包单位Id
|
||||
SubjectProject = project.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];
|
||||
}
|
||||
}
|
||||
////获取总包单位接口apiurl地址
|
||||
//var Url = BLL.UnitService.getUnitApiUrlByUnitId(project.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];
|
||||
// }
|
||||
//}
|
||||
|
||||
//总包单位接口地址
|
||||
string ApiUrl = project.SubjectUnitApiUrl;
|
||||
string WebUrl = project.SubjectUnitWebUrl;
|
||||
var baseurl = $"{ApiUrl}/api/LicenseSync/ReceiveSaveProjectLicenseManagerData";
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
//Hashtable newToken = new Hashtable
|
||||
//{
|
||||
// { "token", ServerService.GetToken().Token }
|
||||
//};
|
||||
|
||||
//ErrLogInfo.WriteLog($"【班前会推送数据】接口地址:{baseurl};{pushContent}");
|
||||
var returndata = APIGetHttpService.Http(baseurl, "Post", contenttype, null, pushContent);
|
||||
if (!string.IsNullOrEmpty(returndata))
|
||||
{
|
||||
//ErrLogInfo.WriteLog($"【作业票返回结果】接口地址:{baseurl};{returndata}");
|
||||
JObject obj = JObject.Parse(returndata);
|
||||
string mess = obj["message"].ToString();
|
||||
string code = obj["code"].ToString();
|
||||
@@ -183,7 +188,7 @@ namespace BLL
|
||||
{
|
||||
try
|
||||
{
|
||||
var model= db.License_LicenseManager.FirstOrDefault(e => e.LicenseManagerId == item.LicenseManagerId);
|
||||
var model = db.License_LicenseManager.FirstOrDefault(e => e.LicenseManagerId == item.LicenseManagerId);
|
||||
if (model != null)
|
||||
{//编辑
|
||||
model.ProjectId = data.SubjectProject;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using Model;
|
||||
using Model;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -89,7 +87,7 @@ namespace BLL
|
||||
if (dataList.Count() > 0)
|
||||
{
|
||||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(projectId);
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(projectId);
|
||||
var pushData = new ClassMeetingData
|
||||
{
|
||||
CollCropCode = thisUnit.CollCropCode,//分包单位社会统一信用码
|
||||
@@ -97,25 +95,28 @@ namespace BLL
|
||||
UnitName = thisUnit.UnitName,//分包单位名称
|
||||
ShortUnitName = thisUnit.ShortUnitName,//分包单位简称
|
||||
UnitDomain = Funs.SGGLUrl,//分包单位域名地址【文件存储地址】
|
||||
SubjectUnit = porject.SubjectUnit,//主包单位Id
|
||||
SubjectProject = porject.SubjectProject,//主包项目Id
|
||||
SubjectUnit = project.SubjectUnit,//主包单位Id
|
||||
SubjectProject = project.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];
|
||||
}
|
||||
}
|
||||
////获取总包单位接口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];
|
||||
// }
|
||||
//}
|
||||
//总包单位接口地址
|
||||
string ApiUrl = project.SubjectUnitApiUrl;
|
||||
string WebUrl = project.SubjectUnitWebUrl;
|
||||
var baseurl = $"{ApiUrl}/api/MeetingSync/ReceiveSaveProjectClassMeetingData";
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
//Hashtable newToken = new Hashtable
|
||||
@@ -125,9 +126,12 @@ namespace BLL
|
||||
var returndata = APIGetHttpService.Http(baseurl, "Post", contenttype, null, pushContent);
|
||||
if (!string.IsNullOrEmpty(returndata))
|
||||
{
|
||||
// ErrLogInfo.WriteLog($"【班前会返回结果】接口地址:{baseurl};{returndata}");
|
||||
JObject obj = JObject.Parse(returndata);
|
||||
string mess = obj["message"].ToString();
|
||||
string code = obj["code"].ToString();
|
||||
string message = obj["message"].ToString();
|
||||
responeData.code = int.Parse(code);
|
||||
responeData.message = message;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -160,8 +164,6 @@ namespace BLL
|
||||
string result = string.Empty;
|
||||
if (data.Items.Count() > 0)
|
||||
{
|
||||
//var jsonData = JsonConvert.SerializeObject(data);
|
||||
//ErrLogInfo.WriteLog($"【班前会接收数据】{jsonData}");
|
||||
//1、判断分包单位是否存在
|
||||
var unit = UnitService.getUnitByCollCropCodeUnitName(data.CollCropCode, data.UnitName);
|
||||
if (unit == null)
|
||||
@@ -209,7 +211,7 @@ namespace BLL
|
||||
//model.Remark = item.Remark;
|
||||
model.Remark = $"{(!string.IsNullOrWhiteSpace(data.ShortUnitName) ? data.ShortUnitName : data.UnitName)}#{item.CompileManName}";
|
||||
model.CompileDate = item.CompileDate;
|
||||
//newModel.CompileMan = item.CompileMan;
|
||||
model.CompileMan = item.CompileMan;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -239,14 +241,12 @@ namespace BLL
|
||||
//newModel.Remark = item.Remark;
|
||||
newModel.Remark = $"{(!string.IsNullOrWhiteSpace(data.ShortUnitName) ? data.ShortUnitName : data.UnitName)}#{item.CompileManName}";
|
||||
newModel.CompileDate = item.CompileDate;
|
||||
//newModel.CompileMan = item.CompileMan;
|
||||
newModel.CompileMan = item.CompileMan;
|
||||
|
||||
db.Meeting_ClassMeeting.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
succ++;
|
||||
|
||||
//ErrLogInfo.WriteLog($"【班前会接收数据——内容附件】UnitDomain:{data.UnitDomain};AttachFileId:{item.AttachFileId};ToKeyId:{item.ToKeyId};AttachSource:{item.AttachSource};AttachUrl:{item.AttachUrl}");
|
||||
//附件处理:内容附件
|
||||
BLL.FileInsertService.SaveAttachFileRecords(data.UnitDomain, item.AttachFileId, item.ToKeyId, item.AttachSource, item.AttachUrl);
|
||||
//附件处理:签到表
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -75,7 +75,8 @@ namespace BLL
|
||||
newHazardRegister.DIC_ID = hazardRegister.DIC_ID;
|
||||
newHazardRegister.Risk_Level = hazardRegister.Risk_Level;
|
||||
newHazardRegister.Type=hazardRegister.Type;
|
||||
newHazardRegister.CheckSpecialId=hazardRegister.CheckSpecialId;
|
||||
newHazardRegister.CheckSpecialId=hazardRegister.CheckSpecialId;
|
||||
newHazardRegister.PunishPerson = hazardRegister.PunishPerson;
|
||||
|
||||
newHazardRegister.HiddenType = hazardRegister.HiddenType;
|
||||
db.HSSE_Hazard_HazardRegister.InsertOnSubmit(newHazardRegister);
|
||||
@@ -121,7 +122,8 @@ namespace BLL
|
||||
newHazardRegister.Type = hazardRegister.Type;
|
||||
newHazardRegister.Risk_Level = hazardRegister.Risk_Level;
|
||||
newHazardRegister.HiddenType = hazardRegister.HiddenType;
|
||||
newHazardRegister.CheckSpecialId = hazardRegister.CheckSpecialId;
|
||||
newHazardRegister.CheckSpecialId = hazardRegister.CheckSpecialId;
|
||||
newHazardRegister.PunishPerson = hazardRegister.PunishPerson;
|
||||
//把附件表的路径复制过来
|
||||
Model.AttachFile file = BLL.AttachFileService.GetAttachFile(hazardRegister.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId);
|
||||
if (file != null)
|
||||
|
||||
@@ -306,6 +306,27 @@ namespace BLL
|
||||
return personId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据UserId主键获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static void UpdatePersonTypeByProjectIdAndIdentityCard(string projectId, string identityCard)
|
||||
{
|
||||
|
||||
var persons = Funs.DB.SitePerson_Person.Where(x => x.IdentityCard == identityCard).ToList();
|
||||
|
||||
foreach (var item in persons)
|
||||
{
|
||||
if (item.ProjectId != projectId && item.IsUsed == true)
|
||||
{
|
||||
item.IsUsed = false;
|
||||
item.OutTime = DateTime.Now;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 根据多用户ID得到用户名称字符串
|
||||
/// <summary>
|
||||
/// 根据多用户ID得到用户名称字符串
|
||||
|
||||
@@ -151,6 +151,8 @@
|
||||
MasterSysId = project.MasterSysId,
|
||||
SubjectUnit = project.SubjectUnit,
|
||||
SubjectProject = project.SubjectProject,
|
||||
SubjectUnitApiUrl = project.SubjectUnitApiUrl,
|
||||
SubjectUnitWebUrl = project.SubjectUnitWebUrl,
|
||||
};
|
||||
db.Base_Project.InsertOnSubmit(newProject);
|
||||
db.SubmitChanges();
|
||||
@@ -207,9 +209,11 @@
|
||||
newProject.Progress = project.Progress;
|
||||
newProject.ProjType = project.ProjType;
|
||||
newProject.ProjPhase = project.ProjPhase;
|
||||
newProject.MasterSysId = project.MasterSysId;
|
||||
newProject.MasterSysId = project.MasterSysId;
|
||||
newProject.SubjectUnit = project.SubjectUnit;
|
||||
newProject.SubjectProject = project.SubjectProject;
|
||||
newProject.SubjectUnitApiUrl = project.SubjectUnitApiUrl;
|
||||
newProject.SubjectUnitWebUrl = project.SubjectUnitWebUrl;
|
||||
db.SubmitChanges();
|
||||
HSEDataCollectService.ProjectHSEDataCollectSubmission(newProject);
|
||||
}
|
||||
@@ -286,15 +290,15 @@
|
||||
{
|
||||
result = result.Where(e => pids.Contains(e.ProjectId)).ToList();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
var list = (from x in Funs.DB.Base_Project
|
||||
where x.ProjectState == Const.ProjectState_1 || x.ProjectState == null
|
||||
var list = (from x in Funs.DB.Base_Project
|
||||
where x.ProjectState == Const.ProjectState_1 || x.ProjectState == null
|
||||
orderby x.ProjectCode descending
|
||||
select x).ToList();
|
||||
select x).ToList();
|
||||
var policy = new CacheItemPolicy
|
||||
{
|
||||
AbsoluteExpiration = DateTimeOffset.Now.AddMinutes(Const.CacheMinutes),
|
||||
@@ -309,8 +313,8 @@
|
||||
{
|
||||
var result = list.Where(e => pids.Contains(e.ProjectId)).ToList();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,29 @@ namespace BLL
|
||||
return Funs.DB.ProjectData_TeamGroup.FirstOrDefault(e => e.TeamGroupId == teamGroupId);
|
||||
}
|
||||
|
||||
#region 根据班组ID得到班组名称
|
||||
/// <summary>
|
||||
/// 根据班组ID得到班组名称
|
||||
/// </summary>
|
||||
/// <param name="TeamGroupId"></param>
|
||||
/// <returns></returns>
|
||||
public static string getTeamGroupNameById(string TeamGroupId)
|
||||
{
|
||||
string TeamGroupName = string.Empty;
|
||||
if (!string.IsNullOrEmpty(TeamGroupId))
|
||||
{
|
||||
var q = GetTeamGroupById(TeamGroupId);
|
||||
if (q != null)
|
||||
{
|
||||
TeamGroupName = q.TeamGroupName;
|
||||
}
|
||||
}
|
||||
|
||||
return TeamGroupName;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加班组信息
|
||||
/// </summary>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,149 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RewardAndPunishManager.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.RewardAndPunishManager" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<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" Margin="5px" BodyPadding="5px" Title="奖罚类别维护" Layout="HBox" ShowHeader="false">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" Title="奖罚类别维护" ShowHeader="false" EnableCollapse="true" PageSize="10" ForceFit="true"
|
||||
ShowBorder="true" AllowPaging="true" IsDatabasePaging="true" runat="server" Width="850px" EnableColumnLines="true"
|
||||
DataKeyNames="ID" DataIDField="ID" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
AllowFilters="true" OnFilterChange="Grid1_FilterChange" EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
|
||||
<f:RenderField Width="300px" ColumnID="ConstText" DataField="ConstText" FieldType="String"
|
||||
HeaderText="奖罚名称" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="300px" ColumnID="GroupName" DataField="GroupName" FieldType="String"
|
||||
HeaderText="类别" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="300px" ColumnID="Remark" DataField="Remark" FieldType="String"
|
||||
HeaderText="备注" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="rowselect" Handler="onGridRowSelect" />
|
||||
<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>
|
||||
<f:SimpleForm ID="SimpleForm1" runat="server" ShowBorder="true" ShowHeader="false"
|
||||
LabelWidth="80px" BodyPadding="5px" Width="350px">
|
||||
<Items>
|
||||
<f:TextBox ID="hfFormID" Hidden="true"
|
||||
runat="server" LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtTrainLevelName" Label="奖罚名称" ShowRedStar="true" Required="true" runat="server" LabelWidth="110px"
|
||||
LabelAlign="right" AutoPostBack="true" OnTextChanged="TextBox_TextChanged">
|
||||
</f:TextBox>
|
||||
<f:RadioButtonList ID="rblIsType" runat="server" Label="类别" LabelAlign="Right" Required="True" ShowRedStar="True" LabelWidth="110px">
|
||||
<f:RadioItem Value="奖励" Text="奖励" />
|
||||
<f:RadioItem Value="处罚" Text="处罚" />
|
||||
</f:RadioButtonList>
|
||||
<f:TextArea ID="txtRemark" runat="server" Label="备注" LabelAlign="right" LabelWidth="110px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnNew" Icon="Add" ToolTip="新增" EnablePostBack="false" runat="server" Text="新增">
|
||||
<Listeners>
|
||||
<f:Listener Event="click" Handler="onNewButtonClick" />
|
||||
</Listeners>
|
||||
</f:Button>
|
||||
<f:Button ID="btnDelete" Enabled="false" ToolTip="删除" Icon="Delete" ConfirmText="确定删除当前数据?" Text="删除"
|
||||
OnClick="btnDelete_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" Text="保存"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:SimpleForm>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
runat="server" Text="编辑" Icon="Pencil">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除" Icon="Delete">
|
||||
</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');
|
||||
}
|
||||
|
||||
var gridClientID = '<%= Grid1.ClientID %>';
|
||||
var btnDeleteClientID = '<%= btnDelete.ClientID %>';
|
||||
var btnSaveClientID = '<%= btnSave.ClientID %>';
|
||||
var formClientID = '<%= SimpleForm1.ClientID %>';
|
||||
var hfFormIDClientID = '<%= hfFormID.ClientID %>';
|
||||
var rblIsTypeClientID = '<%= rblIsType.ClientID %>';
|
||||
var txtNameClientID = '<%= txtTrainLevelName.ClientID %>';
|
||||
var txtRemarkClientID = '<%= txtRemark.ClientID %>';
|
||||
|
||||
function onGridRowSelect(event, rowId) {
|
||||
var grid = F(gridClientID);
|
||||
|
||||
// 启用删除按钮
|
||||
F(btnDeleteClientID).enable();
|
||||
|
||||
// 当前行数据
|
||||
var rowValue = grid.getRowValue(rowId);
|
||||
|
||||
console.log(rowValue)
|
||||
// 使用当前行数据填充表单字段
|
||||
F(hfFormIDClientID).setValue(rowId);
|
||||
F(rblIsTypeClientID).setValue(rowValue['GroupName']);
|
||||
F(txtNameClientID).setValue(rowValue['ConstText']);
|
||||
F(txtRemarkClientID).setValue(rowValue['Remark']);
|
||||
|
||||
// 更新保存按钮文本
|
||||
// F(btnSaveClientID).setText('保存数据(编辑)');
|
||||
}
|
||||
|
||||
function onNewButtonClick() {
|
||||
// 重置表单字段
|
||||
F(formClientID).reset();
|
||||
F(hfFormIDClientID).reset();
|
||||
// 清空表格选中行
|
||||
F(gridClientID).clearSelections();
|
||||
// 禁用删除按钮
|
||||
F(btnDeleteClientID).disable();
|
||||
|
||||
// 更新保存按钮文本
|
||||
// F(btnSaveClientID).setText('保存数据(新增)');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,349 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BLL;
|
||||
|
||||
namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
public partial class RewardAndPunishManager : PageBase
|
||||
{
|
||||
#region 加载
|
||||
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
#region 获取按钮权限
|
||||
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId,
|
||||
BLL.Const.RewardAndPunishManagerMenuId);
|
||||
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.btnDelete.Hidden = false;
|
||||
this.btnMenuDelete.Hidden = false;
|
||||
}
|
||||
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
var q = from x in Funs.DB.Sys_Const
|
||||
where x.GroupId == "RewardType" || x.GroupId == "PunishType"
|
||||
orderby x.SortIndex
|
||||
select new
|
||||
{
|
||||
ID = x.ID,
|
||||
ConstText = x.ConstText,
|
||||
Remark = x.Remark,
|
||||
GroupName = x.GroupId == "RewardType" ? "奖励" : "处罚"
|
||||
};
|
||||
Grid1.RecordCount = q.Count();
|
||||
// 2.获取当前分页数据
|
||||
var table = GetPagedDataTable(Grid1.PageIndex, Grid1.PageSize);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private List<dynamic> GetPagedDataTable(int pageIndex, int pageSize)
|
||||
{
|
||||
var source =
|
||||
(from x in Funs.DB.Sys_Const
|
||||
where x.GroupId == "RewardType" || x.GroupId == "PunishType"
|
||||
orderby x.SortIndex
|
||||
select new
|
||||
{
|
||||
ID = x.ID,
|
||||
ConstText = x.ConstText,
|
||||
Remark = x.Remark,
|
||||
GroupName = x.GroupId == "RewardType" ? "奖励" : "处罚"
|
||||
}).ToList();
|
||||
|
||||
List<dynamic> paged = new List<dynamic>();
|
||||
|
||||
int rowbegin = pageIndex * pageSize;
|
||||
int rowend = (pageIndex + 1) * pageSize;
|
||||
if (rowend > source.Count())
|
||||
{
|
||||
rowend = source.Count();
|
||||
}
|
||||
|
||||
for (int i = rowbegin; i < rowend; i++)
|
||||
{
|
||||
paged.Add(source[i]);
|
||||
}
|
||||
|
||||
return paged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 改变索引事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页下拉选择
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 删除
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
var trainLevel = Funs.DB.Sys_Const.FirstOrDefault(x => x.ID == hfFormID.Text);
|
||||
if (trainLevel != null)
|
||||
{
|
||||
Funs.DB.Sys_Const.DeleteOnSubmit(trainLevel);
|
||||
Funs.DB.SubmitChanges();
|
||||
// 重新绑定表格,并模拟点击[新增按钮]
|
||||
BindGrid();
|
||||
PageContext.RegisterStartupScript("onNewButtonClick();");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DeleteData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除方法
|
||||
/// </summary>
|
||||
private void DeleteData()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var model = Funs.DB.Sys_Const.FirstOrDefault(x => x.ID == rowID);
|
||||
if (model != null)
|
||||
{
|
||||
Funs.DB.Sys_Const.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
BindGrid();
|
||||
PageContext.RegisterStartupScript("onNewButtonClick();");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 编辑
|
||||
|
||||
/// <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 model = Funs.DB.Sys_Const.FirstOrDefault(x => x.ID == Id);
|
||||
if (model != null)
|
||||
{
|
||||
this.txtTrainLevelName.Text = model.ConstText;
|
||||
if (model.GroupId == "RewardType")
|
||||
{
|
||||
this.rblIsType.SelectedValue = "奖励";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.rblIsType.SelectedValue = "处罚";
|
||||
}
|
||||
|
||||
this.txtRemark.Text = model.Remark;
|
||||
hfFormID.Text = Id;
|
||||
this.btnDelete.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
string strRowID = hfFormID.Text;
|
||||
var model = new Model.Sys_Const
|
||||
{
|
||||
ConstText = this.txtTrainLevelName.Text.Trim(),
|
||||
Remark = txtRemark.Text.Trim()
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(this.rblIsType.SelectedValue))
|
||||
{
|
||||
if (this.rblIsType.SelectedValue == "奖励")
|
||||
{
|
||||
model.GroupId = "RewardType";
|
||||
}
|
||||
else
|
||||
{
|
||||
model.GroupId = "PunishType";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty(strRowID))
|
||||
{
|
||||
model.ID = SQLHelper.GetNewID(typeof(Model.Base_TrainLevel));
|
||||
model.SortIndex = Funs.DB.Sys_Const.Where(x => x.GroupId == "RewardType" || x.GroupId == "PunishType")
|
||||
.ToList().Count + 1;
|
||||
|
||||
if (!string.IsNullOrEmpty(this.rblIsType.SelectedValue))
|
||||
{
|
||||
if (this.rblIsType.SelectedValue == "奖励")
|
||||
{
|
||||
model.ConstValue = (Funs.DB.Sys_Const.Where(x => x.GroupId == "RewardType")
|
||||
.ToList().Count + 1).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
model.ConstValue = (Funs.DB.Sys_Const.Where(x => x.GroupId == "PunishType")
|
||||
.ToList().Count + 1).ToString();
|
||||
}
|
||||
}
|
||||
|
||||
Funs.DB.Sys_Const.InsertOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
model.ID = strRowID;
|
||||
var newmodel = Funs.DB.Sys_Const.FirstOrDefault(x => x.ID == model.ID);
|
||||
newmodel.ConstText = model.ConstText;
|
||||
newmodel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
this.SimpleForm1.Reset();
|
||||
// 重新绑定表格,并点击当前编辑或者新增的行
|
||||
BindGrid();
|
||||
PageContext.RegisterStartupScript(String.Format("F('{0}').selectRow('{1}');", Grid1.ClientID, model.ID));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 验证名称是否存在
|
||||
|
||||
/// <summary>
|
||||
/// 验证部门名称、编号是否存在
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
var q = Funs.DB.Sys_Const.FirstOrDefault(x =>
|
||||
(x.GroupId == "RewardType" || x.GroupId == "PunishType") &&
|
||||
x.ConstText == this.txtTrainLevelName.Text.Trim() &&
|
||||
(x.ID != hfFormID.Text || (hfFormID.Text == null && x.ID != null)));
|
||||
if (q != null)
|
||||
{
|
||||
ShowNotify("输入的奖罚类别名称已存在!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
|
||||
|
||||
public partial class RewardAndPunishManager
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// 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>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.SimpleForm SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// hfFormID 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox hfFormID;
|
||||
|
||||
/// <summary>
|
||||
/// txtTrainLevelName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTrainLevelName;
|
||||
|
||||
/// <summary>
|
||||
/// rblIsType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rblIsType;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDelete;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RewardAndPunish.aspx.cs" Inherits="FineUIPro.Web.CQMS.Check.RewardAndPunish" %>
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<script src="../../Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>奖罚通知单(定稿)</title>
|
||||
|
||||
</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" EnableAjax="false" ShowHeader="false" Title="奖罚通知单(定稿)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="RewardAndPunishID" AllowCellEditing="true"
|
||||
ClicksToEdit="2" DataIDField="RewardAndPunishID" AllowSorting="true" SortField="Date"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" ForceFit="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" AllowFilters="true"
|
||||
OnFilterChange="Grid1_FilterChange" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
|
||||
<f:DropDownList ID="drpResponseUnit" runat="server" Label="奖罚单位" EnableEdit="true" EmptyText="请选择查询条件" OnSelectedIndexChanged="drpType_SelectedIndexChanged" AutoPostBack="true"
|
||||
LabelAlign="right">
|
||||
</f:DropDownList>
|
||||
|
||||
<f:DropDownList ID="drpType" runat="server" Label="奖励/处罚" EnableEdit="true" EmptyText="请选择查询条件" OnSelectedIndexChanged="drpType_OnSelectedIndexChanged" AutoPostBack="true"
|
||||
LabelAlign="right">
|
||||
<f:ListItem Text="-请选择-" Value="null"/>
|
||||
<f:ListItem Text="奖励" Value="1"/>
|
||||
<f:ListItem Text="处罚" Value="2"/>
|
||||
</f:DropDownList>
|
||||
|
||||
<f:DropDownList ID="drpRewardAndPunishType" runat="server" Label="奖罚类型" EnableEdit="true" EmptyText="请选择查询条件" OnSelectedIndexChanged="drpType_SelectedIndexChanged" AutoPostBack="true"
|
||||
LabelAlign="right">
|
||||
</f:DropDownList>
|
||||
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" LabelWidth="80px" LabelAlign="Right" Label="来源" ID="drpDataSource" AutoPostBack="true" OnSelectedIndexChanged="drpType_SelectedIndexChanged">
|
||||
<f:ListItem Text="-请选择-" Value="null"/>
|
||||
<f:ListItem Text="常规" Value="0"/>
|
||||
<f:ListItem Text="巡检" Value="1"/>
|
||||
</f:DropDownList>
|
||||
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
|
||||
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Text="新增"
|
||||
Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="labNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
|
||||
<f:TemplateField ColumnID="Type" Width="80px" HeaderText="奖励/处罚" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# ConvertType(Eval("Type")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="80px" ColumnID="RewardAndPunishCode" DataField="RewardAndPunishCode"
|
||||
FieldType="String" HeaderText="编号" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="95px" ColumnID="Date" DataField="Date" SortField="Date"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="奖罚日期" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:TemplateField ColumnID="RewardAndPunishType" Width="80px" HeaderText="奖罚类型" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# ConvertRewardAndPunishType(Eval("Type"), Eval("RewardAndPunishType")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<f:TemplateField ColumnID="ResponseUnit" Width="150px" HeaderText="奖罚单位" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# ConvertUnitName(Eval("ResponseUnit")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField ColumnID="RewardAndPunishMan" Width="80px" HeaderText="奖罚人" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# ConvertPersionName(Eval("RewardAndPunishMan")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<f:TemplateField ColumnID="TeamGroupId" Width="80px" HeaderText="所属班组" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label5" runat="server" Text='<%# ConvertTeamGroupName(Eval("TeamGroupId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="180px" ColumnID="Description" DataField="Description" ExpandUnusedSpace="true"
|
||||
FieldType="String" HeaderText="奖罚依据" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="Money" DataField="Money" SortField="Money"
|
||||
FieldType="String" HeaderText="奖罚金额" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="80px" ColumnID="Remark" DataField="Remark"
|
||||
FieldType="String" HeaderText="备注" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:TemplateField ColumnID="DataSource" Width="80px" HeaderText="来源" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbDataSource" runat="server" Text='<%# ConvertDataSource(Eval("DataSource")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<f:TemplateField ColumnID="AttachFile" Width="100px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
Text='<%# ConvertAttachFile(Eval("RewardAndPunishID")) %>' ToolTip="附件查看">
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</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:ListItem Text="10" Value="10"/>
|
||||
<f:ListItem Text="15" Value="15"/>
|
||||
<f:ListItem Text="20" Value="20"/>
|
||||
<f:ListItem Text="25" Value="25"/>
|
||||
<f:ListItem Text="所有行" Value="100000"/>
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server">
|
||||
</f:ToolbarFill>
|
||||
|
||||
</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" OnClose="Window1_Close"
|
||||
Width="1100px" Height="480px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<Items>
|
||||
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Hidden="true" Text="修改" Icon="Pencil"
|
||||
OnClick="btnMenuModify_Click">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
|
||||
OnClick="btnMenuDel_Click">
|
||||
</f:MenuButton>
|
||||
|
||||
</Items>
|
||||
</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;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,465 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Model;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Check
|
||||
{
|
||||
public partial class RewardAndPunish : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目id
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get { return (string)ViewState["ProjectId"]; }
|
||||
set { ViewState["ProjectId"] = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string RewardAndPunishID
|
||||
{
|
||||
get { return (string)ViewState["RewardAndPunishID"]; }
|
||||
set { ViewState["RewardAndPunishID"] = value; }
|
||||
}
|
||||
public string SysTemType
|
||||
{
|
||||
get { return (string)ViewState["SysTemType"]; }
|
||||
set { ViewState["SysTemType"] = value; }
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
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;
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpResponseUnit, this.CurrUser.LoginProjectId, "", true);
|
||||
this.SysTemType = Request.Params["type"] ?? "1";
|
||||
btnNew.OnClientClick = Window1.GetShowReference(String.Format("RewardAndPunishEdit.aspx?sysTemType={0}",SysTemType, "编辑 - ")) + "return false;";
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.GetButtonPower();
|
||||
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
btnNew.Hidden = true;
|
||||
}
|
||||
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
public void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
DataTable tb = ChecklistData();
|
||||
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
|
||||
protected DataTable ChecklistData()
|
||||
{
|
||||
string strSql = @" SELECT RewardAndPunishID
|
||||
,Type
|
||||
,ResponseUnit
|
||||
,NoticeUnit
|
||||
,Description
|
||||
,Money
|
||||
,Date
|
||||
,CreateMan
|
||||
,ProjectId,RewardAndPunishCode,Remark,DataSource,RewardAndPunishType,RewardAndPunishMan,TeamGroupId
|
||||
FROM dbo.Check_RewardAndPunish
|
||||
where ProjectId=@ProjectId and SysTemType = @SysTemType ";
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
listStr.Add(new SqlParameter("@SysTemType", this.SysTemType));
|
||||
|
||||
if (drpType.SelectedValue != Const._Null)
|
||||
{
|
||||
strSql += " AND Type = @Type";
|
||||
listStr.Add(new SqlParameter("@Type", drpType.SelectedValue));
|
||||
}
|
||||
|
||||
if (drpRewardAndPunishType.SelectedValue != Const._Null && !string.IsNullOrEmpty(drpRewardAndPunishType.SelectedValue))
|
||||
{
|
||||
strSql += " AND RewardAndPunishType = @RewardAndPunishType";
|
||||
listStr.Add(new SqlParameter("@RewardAndPunishType", drpRewardAndPunishType.SelectedValue));
|
||||
}
|
||||
|
||||
if (this.drpDataSource.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
if (this.drpDataSource.SelectedValue == "0")
|
||||
{
|
||||
strSql += " AND (DataSource is null or DataSource = @DataSource) ";
|
||||
listStr.Add(new SqlParameter("@DataSource", drpDataSource.SelectedValue));
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql += " AND DataSource = @DataSource";
|
||||
listStr.Add(new SqlParameter("@DataSource", drpDataSource.SelectedValue));
|
||||
}
|
||||
}
|
||||
|
||||
if (drpResponseUnit.SelectedValue != Const._Null && !string.IsNullOrEmpty(drpRewardAndPunishType.SelectedValue))
|
||||
{
|
||||
strSql += " AND ResponseUnit = @ResponseUnit";
|
||||
listStr.Add(new SqlParameter("@ResponseUnit", drpResponseUnit.SelectedValue));
|
||||
}
|
||||
strSql += " ORDER BY Date DESC";
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
return tb;
|
||||
}
|
||||
|
||||
|
||||
#region 过滤表头、排序、分页、关闭窗口
|
||||
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
//Grid1.SortDirection = e.SortDirection;
|
||||
//Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
//<summary>
|
||||
//获取办理人姓名
|
||||
//</summary>
|
||||
//<param name="state"></param>
|
||||
//<returns></returns>
|
||||
protected string ConvertMan(object userid)
|
||||
{
|
||||
if (userid != null && !string.IsNullOrEmpty(userid.ToString()))
|
||||
{
|
||||
return BLL.UserService.GetUserByUserId(userid.ToString()).UserName;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
protected string ConvertRewardAndPunishType(object Type,object RewardAndPunishType)
|
||||
{
|
||||
Model.Sys_Const model;
|
||||
if (Type != null && Type.ToString() == "1")
|
||||
{
|
||||
model = Funs.DB.Sys_Const.FirstOrDefault(x => x.GroupId == "RewardType" && x.ConstValue == RewardAndPunishType.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
model = Funs.DB.Sys_Const.FirstOrDefault(x => x.GroupId == "PunishType" && x.ConstValue == RewardAndPunishType.ToString());
|
||||
}
|
||||
|
||||
if (model == null)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
return model.ConstText;
|
||||
}
|
||||
|
||||
|
||||
protected string ConvertUnitName(object uintid)
|
||||
{
|
||||
if (uintid != null && !string.IsNullOrEmpty(uintid.ToString()))
|
||||
{
|
||||
return BLL.UnitService.GetUnitByUnitId(uintid.ToString()).UnitName;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
protected string ConvertPersionName(object persionid)
|
||||
{
|
||||
if (persionid != null && !string.IsNullOrEmpty(persionid.ToString()))
|
||||
{
|
||||
return BLL.PersonService.GetPersonById(persionid.ToString()).PersonName;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
protected string ConvertTeamGroupName(object teamGroupid)
|
||||
{
|
||||
if (teamGroupid != null && !string.IsNullOrEmpty(teamGroupid.ToString()))
|
||||
{
|
||||
return BLL.TeamGroupService.getTeamGroupNameById(teamGroupid.ToString());
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
protected string ConvertDataSource(object dataSource)
|
||||
{
|
||||
string data = "常规";
|
||||
if (dataSource != null)
|
||||
{
|
||||
if (dataSource.ToString() == "1")
|
||||
{
|
||||
data = "巡检";
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
protected string ConvertType(object type)
|
||||
{
|
||||
if (type != null)
|
||||
{
|
||||
if (type.ToString() == "1")
|
||||
return "奖励";
|
||||
else
|
||||
return "处罚";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
#region Grid双击事件
|
||||
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
btnMenuModify_Click(null, null);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 编辑按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuModify_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
string codes = Grid1.SelectedRowID.Split(',')[0];
|
||||
var checks = BLL.RewardAndPunishService.GetRewardAndPunishById(codes);
|
||||
|
||||
if (checks != null)
|
||||
{
|
||||
if (checks.CreateMan != this.CurrUser.UserId)
|
||||
{
|
||||
Alert.ShowInTop("您不是当前办理人,无法编辑,请右键查看!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(
|
||||
String.Format("RewardAndPunishEdit.aspx?RewardAndPunishID={0}", codes, "编辑 - ")));
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#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.RewardAndPunishMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
}
|
||||
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnMenuDel.Hidden = false;
|
||||
}
|
||||
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuModify.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void drpType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string codes = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
BLL.RewardAndPunishService.DeleteRewardAndPunishById(codes);
|
||||
//删除对应的附件
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, AttachFileService.getFileUrl(codes));
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, "", codes, BLL.Const.CheckListMenuId, "删除奖罚通知单(定稿)");
|
||||
}
|
||||
Grid1.DataBind();
|
||||
BindGrid();
|
||||
Alert.ShowInTop("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭弹出窗
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void drpType_OnSelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpType.SelectedText == "奖励")
|
||||
{
|
||||
ConstValue.InitConstValueDropDownList(this.drpRewardAndPunishType, "RewardType", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ConstValue.InitConstValueDropDownList(this.drpRewardAndPunishType, "PunishType", true);
|
||||
}
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
protected string ConvertAttachFile(object rewardAndPunishID)
|
||||
{
|
||||
string fileUrl = "";
|
||||
var model = BLL.RewardAndPunishService.GetRewardAndPunishById(rewardAndPunishID.ToString());
|
||||
if (model != null)
|
||||
{
|
||||
if (model.DataSource == "1")
|
||||
{
|
||||
fileUrl = BLL.AttachFileService.GetBtnFileUrl(model.HazardRegisterId);
|
||||
}
|
||||
else
|
||||
{
|
||||
fileUrl = BLL.AttachFileService.GetBtnFileUrl(model.RewardAndPunishID);
|
||||
}
|
||||
}
|
||||
|
||||
return fileUrl;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Check
|
||||
{
|
||||
|
||||
|
||||
public partial class RewardAndPunish
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// drpResponseUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpResponseUnit;
|
||||
|
||||
/// <summary>
|
||||
/// drpType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpType;
|
||||
|
||||
/// <summary>
|
||||
/// drpRewardAndPunishType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpRewardAndPunishType;
|
||||
|
||||
/// <summary>
|
||||
/// drpDataSource 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDataSource;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// labNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label labNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// Label4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label4;
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// Label3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label3;
|
||||
|
||||
/// <summary>
|
||||
/// Label5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label5;
|
||||
|
||||
/// <summary>
|
||||
/// lbDataSource 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbDataSource;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
|
||||
|
||||
/// <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>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuModify 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RewardAndPunishEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Check.RewardAndPunishEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server"/>
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
|
||||
<f:FormRow >
|
||||
<Items>
|
||||
<f:RadioButtonList ID="drpType" runat="server" Label="类型" LabelAlign="Right" Required="True" ShowRedStar="True"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="drpType_OnSelectedIndexChanged">
|
||||
<f:RadioItem Value="1" Text="奖励" Selected="True"/>
|
||||
<f:RadioItem Value="2" Text="处罚"/>
|
||||
</f:RadioButtonList>
|
||||
|
||||
<f:TextBox ID="txtRewardAndPunishCode" runat="server" Label="编号" LabelAlign="Right" Readonly="True"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow >
|
||||
<Items>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="日期" ID="dpDate"
|
||||
LabelAlign="right" Required="true" ShowRedStar="true">
|
||||
</f:DatePicker>
|
||||
|
||||
<f:DropDownList ID="drpRewardAndPunishType" runat="server" Label="奖罚类型" LabelAlign="Right" Required="true"
|
||||
ShowRedStar="true" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow >
|
||||
<Items>
|
||||
<f:DropDownList ID="drpResponseUnit" runat="server" Required="true" ShowRedStar="true" Label="奖罚单位" LabelAlign="Right" EnableEdit="true"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="drpResponseUnit_OnSelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:Label runat="server" CssStyle="display:none"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow >
|
||||
<Items>
|
||||
<f:DropDownList ID="drpRewardAndPunishMan" runat="server" Required="true" ShowRedStar="true" Label="奖罚人" LabelAlign="Right" EnableEdit="true"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="drpUser_OnSelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpTeamGroup" runat="server" Label="所属班组" LabelAlign="Right" Readonly="True">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow >
|
||||
<Items>
|
||||
<f:NumberBox ID="txtMoney" Label="金额" runat="server">
|
||||
</f:NumberBox>
|
||||
<f:Label runat="server" CssStyle="display:none"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow >
|
||||
<Items>
|
||||
<f:TextArea ID="txtDescription" runat="server" Label="奖罚依据" MaxLength="3000">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow >
|
||||
<Items>
|
||||
<f:TextBox ID="txtRemark" Label="备注" runat="server">
|
||||
</f:TextBox>
|
||||
|
||||
<f:Panel ID="Panel1" ShowHeader="false" ShowBorder="false" Layout="Column" runat="server" MarginLeft="56px">
|
||||
<Items>
|
||||
<f:Label runat="server" Text="附件:" ShowLabel="false"></f:Label>
|
||||
<f:Button ID="imgBtnFile" Text="附件" ToolTip="上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="imgBtnFile_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:TextBox ID="hdId" runat="server" Hidden="true">
|
||||
</f:TextBox>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false"
|
||||
runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" OnClose="WindowAtt_Close" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,258 @@
|
||||
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.Check
|
||||
{
|
||||
public partial class RewardAndPunishEdit : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string RewardAndPunishID
|
||||
{
|
||||
get { return (string)ViewState["RewardAndPunishID"]; }
|
||||
set { ViewState["RewardAndPunishID"] = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 图片是否可以编辑 -1查看 0编辑
|
||||
/// </summary>
|
||||
public int QuestionImg
|
||||
{
|
||||
get { return Convert.ToInt32(ViewState["QuestionImg"]); }
|
||||
set { ViewState["QuestionImg"] = value; }
|
||||
}
|
||||
|
||||
public string SysTemType
|
||||
{
|
||||
get { return (string)ViewState["SysTemType"]; }
|
||||
set { ViewState["SysTemType"] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
drpTeamGroup.DataValueField = "TeamGroupId";
|
||||
drpTeamGroup.DataTextField = "TeamGroupName";
|
||||
drpTeamGroup.DataSource = TeamGroupService.GetTeamGroupList(this.CurrUser.LoginProjectId);
|
||||
drpTeamGroup.DataBind();
|
||||
Funs.FineUIPleaseSelect(drpTeamGroup, null);
|
||||
|
||||
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpResponseUnit, this.CurrUser.LoginProjectId, "", true);
|
||||
this.SysTemType = Request.Params["sysTemType"];
|
||||
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
RewardAndPunishID = Request.Params["RewardAndPunishID"];
|
||||
if (!string.IsNullOrEmpty(RewardAndPunishID))
|
||||
{
|
||||
this.hdId.Text = RewardAndPunishID;
|
||||
Model.Check_RewardAndPunish RewardAndPunish = BLL.RewardAndPunishService.GetRewardAndPunishById(RewardAndPunishID);
|
||||
if (RewardAndPunish != null)
|
||||
{
|
||||
this.CurrUser.LoginProjectId = RewardAndPunish.ProjectId;
|
||||
|
||||
this.drpRewardAndPunishType.SelectedValue = RewardAndPunish.RewardAndPunishType;
|
||||
|
||||
if (RewardAndPunish.Type.HasValue)
|
||||
{
|
||||
this.drpType.SelectedValue = RewardAndPunish.Type.Value.ToString();
|
||||
drpRewardAndPunishType_Click(sender, e);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(RewardAndPunish.ResponseUnit))
|
||||
{
|
||||
this.drpResponseUnit.SelectedValue = RewardAndPunish.ResponseUnit;
|
||||
}
|
||||
|
||||
if (RewardAndPunish.Money.HasValue)
|
||||
{
|
||||
this.txtMoney.Text = RewardAndPunish.Money.Value.ToString();
|
||||
}
|
||||
|
||||
if (RewardAndPunish.Date.HasValue)
|
||||
{
|
||||
this.dpDate.Text = string.Format("{0:yyyy-MM-dd}", RewardAndPunish.Date.Value);
|
||||
}
|
||||
this.txtDescription.Text = RewardAndPunish.Description;
|
||||
|
||||
this.txtRewardAndPunishCode.Text = RewardAndPunish.RewardAndPunishCode;
|
||||
|
||||
if (!string.IsNullOrEmpty(RewardAndPunish.RewardAndPunishType))
|
||||
{
|
||||
this.drpRewardAndPunishType.SelectedValue = RewardAndPunish.RewardAndPunishType;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(RewardAndPunish.RewardAndPunishMan))
|
||||
{
|
||||
this.drpRewardAndPunishMan.SelectedValue = RewardAndPunish.RewardAndPunishMan;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(RewardAndPunish.TeamGroupId))
|
||||
{
|
||||
this.drpTeamGroup.SelectedValue = RewardAndPunish.TeamGroupId;
|
||||
}
|
||||
this.txtRemark.Text = RewardAndPunish.Remark;
|
||||
if (this.CurrUser.UserId == RewardAndPunish.CreateMan)
|
||||
{
|
||||
QuestionImg = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestionImg = 0;
|
||||
this.btnSave.Hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
drpType_OnSelectedIndexChanged(sender, e);
|
||||
}
|
||||
drpResponseUnit_OnSelectedIndexChanged(sender, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
protected void imgBtnFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
|
||||
{
|
||||
this.hdId.Text = SQLHelper.GetNewID(typeof(Model.Check_CheckControl));
|
||||
}
|
||||
|
||||
var model = BLL.RewardAndPunishService.GetRewardAndPunishById(this.hdId.Text);
|
||||
if (model != null && model.HazardRegisterId != null)
|
||||
{
|
||||
Model.HSSE_Hazard_HazardRegister register =
|
||||
BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(model.HazardRegisterId);
|
||||
DateTime date = Convert.ToDateTime(register.CheckTime);
|
||||
string dateStr = date.Year.ToString() + date.Month.ToString();
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format(
|
||||
"~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Registration/" + dateStr +
|
||||
"&menuId={1}&edit={2}", register.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId, "1")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format(
|
||||
"../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/CheckControl&menuId={2}",
|
||||
QuestionImg, this.hdId.Text, BLL.Const.RewardAndPunishMenuId)));
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, this.CurrUser.UserId,
|
||||
BLL.Const.RewardAndPunishMenuId, BLL.Const.BtnSave))
|
||||
{
|
||||
SaveData();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveData()
|
||||
{
|
||||
Model.Check_RewardAndPunish RewardAndPunish = new Model.Check_RewardAndPunish();
|
||||
if (!string.IsNullOrEmpty(this.hdId.Text))
|
||||
{
|
||||
RewardAndPunish.RewardAndPunishID = this.hdId.Text;
|
||||
}
|
||||
RewardAndPunish.ProjectId = this.CurrUser.LoginProjectId;
|
||||
RewardAndPunish.Type = int.Parse(this.drpType.SelectedValue);
|
||||
RewardAndPunish.ResponseUnit = this.drpResponseUnit.SelectedValue;
|
||||
// RewardAndPunish.NoticeUnit = this.drpNoticeUnit.SelectedValue;
|
||||
RewardAndPunish.Money = Decimal.Parse(this.txtMoney.Text);
|
||||
RewardAndPunish.Date = Convert.ToDateTime(this.dpDate.Text.Trim());
|
||||
RewardAndPunish.Description = this.txtDescription.Text;
|
||||
RewardAndPunish.CreateMan = this.CurrUser.UserId;
|
||||
RewardAndPunish.RewardAndPunishType = this.drpRewardAndPunishType.SelectedValue;
|
||||
RewardAndPunish.RewardAndPunishCode = this.txtRewardAndPunishCode.Text;
|
||||
RewardAndPunish.RewardAndPunishMan = this.drpRewardAndPunishMan.SelectedValue;
|
||||
RewardAndPunish.TeamGroupId = this.drpTeamGroup.SelectedValue;
|
||||
RewardAndPunish.Remark = this.txtRemark.Text.Trim();
|
||||
RewardAndPunish.DataSource = "0";
|
||||
RewardAndPunish.SysTemType = this.SysTemType;
|
||||
|
||||
if (string.IsNullOrEmpty(this.hdId.Text.Trim()))
|
||||
{
|
||||
RewardAndPunish.RewardAndPunishID = Guid.NewGuid().ToString();
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(RewardAndPunishID))
|
||||
{
|
||||
BLL.RewardAndPunishService.AddRewardAndPunish(RewardAndPunish);
|
||||
}
|
||||
else
|
||||
{
|
||||
BLL.RewardAndPunishService.UpdateRewardAndPunish(RewardAndPunish);
|
||||
}
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
#region 单位下拉框事件
|
||||
|
||||
/// <summary>
|
||||
/// 单位下拉框事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpResponseUnit_OnSelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.drpResponseUnit.SelectedValue))
|
||||
{
|
||||
//根据单位和项目获取人员
|
||||
BLL.PersonService.InitPersonByProjectUnitDropDownList(this.drpRewardAndPunishMan,
|
||||
this.CurrUser.LoginProjectId, this.drpResponseUnit.SelectedValue, false);
|
||||
}
|
||||
}
|
||||
|
||||
protected void drpUser_OnSelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.drpRewardAndPunishMan.SelectedValue))
|
||||
{
|
||||
this.drpTeamGroup.SelectedValue = BLL.PersonService.GetPersonById(this.drpRewardAndPunishMan.SelectedValue).TeamGroupId;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
protected void drpType_OnSelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpType.SelectedValue == "1")
|
||||
{
|
||||
this.txtRewardAndPunishCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5",
|
||||
"Check_RewardAndPunish", "RewardAndPunishCode", $"JL");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtRewardAndPunishCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5",
|
||||
"Check_RewardAndPunish", "RewardAndPunishCode", $"CF");
|
||||
}
|
||||
drpRewardAndPunishType_Click(sender, e);
|
||||
}
|
||||
|
||||
|
||||
protected void drpRewardAndPunishType_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpType.SelectedValue == "1")
|
||||
{
|
||||
ConstValue.InitConstValueDropDownList(this.drpRewardAndPunishType, "RewardType", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ConstValue.InitConstValueDropDownList(this.drpRewardAndPunishType, "PunishType", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Check
|
||||
{
|
||||
|
||||
|
||||
public partial class RewardAndPunishEdit
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// drpType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList drpType;
|
||||
|
||||
/// <summary>
|
||||
/// txtRewardAndPunishCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtRewardAndPunishCode;
|
||||
|
||||
/// <summary>
|
||||
/// dpDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker dpDate;
|
||||
|
||||
/// <summary>
|
||||
/// drpRewardAndPunishType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpRewardAndPunishType;
|
||||
|
||||
/// <summary>
|
||||
/// drpResponseUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpResponseUnit;
|
||||
|
||||
/// <summary>
|
||||
/// drpRewardAndPunishMan 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpRewardAndPunishMan;
|
||||
|
||||
/// <summary>
|
||||
/// drpTeamGroup 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpTeamGroup;
|
||||
|
||||
/// <summary>
|
||||
/// txtMoney 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtMoney;
|
||||
|
||||
/// <summary>
|
||||
/// txtDescription 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtDescription;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// imgBtnFile 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgBtnFile;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// hdId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox hdId;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
@@ -270,6 +270,7 @@
|
||||
<Content Include="BaseInfo\QuestionType.aspx" />
|
||||
<Content Include="BaseInfo\RectificationMeasure.aspx" />
|
||||
<Content Include="BaseInfo\RectificationMeasureEdit.aspx" />
|
||||
<Content Include="BaseInfo\RewardAndPunishManager.aspx" />
|
||||
<Content Include="BaseInfo\RiskLevel.aspx" />
|
||||
<Content Include="BaseInfo\RiskLevelEdit.aspx" />
|
||||
<Content Include="BaseInfo\RulesRegulationsType.aspx" />
|
||||
@@ -446,6 +447,8 @@
|
||||
<Content Include="CQMS\Check\JointCheckFile.aspx" />
|
||||
<Content Include="CQMS\Check\JointCheckStatistics.aspx" />
|
||||
<Content Include="CQMS\Check\JointCheckView.aspx" />
|
||||
<Content Include="CQMS\Check\RewardAndPunish.aspx" />
|
||||
<Content Include="CQMS\Check\RewardAndPunishEdit.aspx" />
|
||||
<Content Include="CQMS\Check\ShowWBS.aspx" />
|
||||
<Content Include="CQMS\Check\SpotCheck.aspx" />
|
||||
<Content Include="CQMS\Check\SpotCheckFile.aspx" />
|
||||
@@ -6876,6 +6879,13 @@
|
||||
<Compile Include="BaseInfo\RectificationMeasureEdit.aspx.designer.cs">
|
||||
<DependentUpon>RectificationMeasureEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BaseInfo\RewardAndPunishManager.aspx.cs">
|
||||
<DependentUpon>RewardAndPunishManager.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BaseInfo\RewardAndPunishManager.aspx.designer.cs">
|
||||
<DependentUpon>RewardAndPunishManager.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BaseInfo\RiskLevel.aspx.cs">
|
||||
<DependentUpon>RiskLevel.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -7611,6 +7621,20 @@
|
||||
<Compile Include="CQMS\Check\JointCheckView.aspx.designer.cs">
|
||||
<DependentUpon>JointCheckView.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Check\RewardAndPunish.aspx.cs">
|
||||
<DependentUpon>RewardAndPunish.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Check\RewardAndPunish.aspx.designer.cs">
|
||||
<DependentUpon>RewardAndPunish.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Check\RewardAndPunishEdit.aspx.cs">
|
||||
<DependentUpon>RewardAndPunishEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Check\RewardAndPunishEdit.aspx.designer.cs">
|
||||
<DependentUpon>RewardAndPunishEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Check\ShowWBS.aspx.cs">
|
||||
<DependentUpon>ShowWBS.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -33,7 +33,14 @@
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="处罚人" ID="drpPunishPerson">
|
||||
</f:DropDownList>
|
||||
<f:Label ID="lblBottom" runat="server" Text="说明:当选择了处罚人,会关联到奖罚管理中。">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRegisterDef" runat="server" Label="隐患内容" ShowRedStar="true" Required="true">
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
Type = Request.Params["Type"];
|
||||
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
|
||||
|
||||
ConstValue.InitConstValueDropDownList(drpHiddenType, "Hiddendangertype", false);
|
||||
|
||||
UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true);
|
||||
@@ -126,7 +126,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
this.drpResponsibleMan.DataBind();
|
||||
this.drpWorkArea.SelectedValue = BLL.Const._Null;
|
||||
this.drpResponsibleMan.SelectedValue = BLL.Const._Null;
|
||||
BLL.PersonService.InitPersonByProjectUnitDropDownList(this.drpPunishPerson, this.CurrUser.LoginProjectId, registration.ResponsibleUnit, false);//添加人员下拉
|
||||
}
|
||||
if (!string.IsNullOrEmpty(registration.PunishPerson))
|
||||
{
|
||||
this.drpPunishPerson.SelectedValue = registration.PunishPerson;
|
||||
}
|
||||
|
||||
this.txtRequirements.Text = registration.Requirements;
|
||||
if (!string.IsNullOrEmpty(registration.Place))
|
||||
{
|
||||
@@ -194,6 +200,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == this.drpUnit.SelectedValue
|
||||
select x;
|
||||
this.drpResponsibleMan.DataBind();
|
||||
BLL.PersonService.InitPersonByProjectUnitDropDownList(this.drpPunishPerson, this.CurrUser.LoginProjectId, this.drpUnit.SelectedValue, false);//添加人员下拉
|
||||
}
|
||||
Funs.FineUIPleaseSelect(this.drpWorkArea);
|
||||
Funs.FineUIPleaseSelect(this.drpResponsibleMan);
|
||||
@@ -249,8 +256,8 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
register.CheckCycle = this.ckType.SelectedValue;
|
||||
register.Risk_Level = this.dpRiskLevel.SelectedText;
|
||||
register.IsEffective = "1";
|
||||
var RegisterTypesDt =BLL.HSSE_Hazard_HazardRegisterTypesService.GetTitleByRegisterTypesId(register.RegisterTypesId);
|
||||
if (RegisterTypesDt != null && RegisterTypesDt .HazardRegisterType=="4")
|
||||
var RegisterTypesDt = BLL.HSSE_Hazard_HazardRegisterTypesService.GetTitleByRegisterTypesId(register.RegisterTypesId);
|
||||
if (RegisterTypesDt != null && RegisterTypesDt.HazardRegisterType == "4")
|
||||
{
|
||||
register.Type = 1; //常规巡检
|
||||
|
||||
@@ -259,6 +266,10 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
{
|
||||
register.Type = 0; //日常巡检
|
||||
}
|
||||
if (this.drpPunishPerson.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
register.PunishPerson = this.drpPunishPerson.SelectedValue;
|
||||
}
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
register.ResponsibleUnit = this.drpUnit.SelectedValue;
|
||||
|
||||
+18
@@ -59,6 +59,24 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWorkArea;
|
||||
|
||||
/// <summary>
|
||||
/// drpPunishPerson 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPunishPerson;
|
||||
|
||||
/// <summary>
|
||||
/// lblBottom 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lblBottom;
|
||||
|
||||
/// <summary>
|
||||
/// txtRegisterDef 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -29,7 +29,13 @@
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtPunishPersonName" runat="server" Label="处罚人" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:Label runat="server" CssStyle="display:none"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtRiskLevel" runat="server" Label="隐患级别" Readonly="true">
|
||||
|
||||
@@ -74,7 +74,8 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
this.txtUnitName.Text = registration.ResponsibilityUnitName;
|
||||
this.txtWorkAreaName.Text = registration.WorkAreaName;
|
||||
this.txtRegisterTypesName.Text = registration.RegisterTypesName;
|
||||
this.txtRequirements.Text = registration.Requirements;
|
||||
this.txtRequirements.Text = registration.Requirements;
|
||||
this.txtPunishPersonName.Text = registration.PunishPersonName;
|
||||
if (registration.CheckCycle == "D")
|
||||
{
|
||||
this.txtType.Text = "日检";
|
||||
@@ -156,6 +157,44 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
if (this.ckConfirm.SelectedValue == "True") //通过
|
||||
{
|
||||
register.States = "3"; //已闭环
|
||||
if (!string.IsNullOrEmpty(register.CheckItemDetailId))
|
||||
{
|
||||
var checkSpecialDetail = Check_CheckSpecialDetailService.GetCheckSpecialDetailByCheckSpecialDetailId(register.CheckItemDetailId);
|
||||
if (checkSpecialDetail != null)
|
||||
{
|
||||
checkSpecialDetail.CompleteStatus = true;
|
||||
Check_CheckSpecialDetailService.UpdateCheckSpecialDetail(checkSpecialDetail);
|
||||
var checkSpecialDetails = Check_CheckSpecialDetailService.GetCheckSpecialDetailByCheckSpecialId(checkSpecialDetail.CheckSpecialId);
|
||||
var getDails = checkSpecialDetails.Where(x => x.CompleteStatus == false);
|
||||
if (getDails.Count() == 0)
|
||||
{
|
||||
var checkSpecial = Check_CheckSpecialService.GetCheckSpecialByCheckSpecialId(checkSpecialDetail.CheckSpecialId);
|
||||
checkSpecial.States = Const.State_2;
|
||||
Check_CheckSpecialService.UpdateCheckSpecial(checkSpecial);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//确认的时候把数据添加到奖惩管理表
|
||||
if (!string.IsNullOrEmpty(register.PunishPerson))
|
||||
{
|
||||
Model.Check_RewardAndPunish RewardAndPunish = new Model.Check_RewardAndPunish();
|
||||
RewardAndPunish.RewardAndPunishID = SQLHelper.GetNewID(typeof(Model.Check_RewardAndPunish));
|
||||
RewardAndPunish.ProjectId = this.CurrUser.LoginProjectId;
|
||||
RewardAndPunish.Type = 2;
|
||||
RewardAndPunish.ResponseUnit = register.ResponsibleUnit;
|
||||
RewardAndPunish.Date = register.CheckTime;
|
||||
RewardAndPunish.Description = register.RegisterDef;
|
||||
RewardAndPunish.CreateMan = register.CheckManId;
|
||||
RewardAndPunish.RewardAndPunishCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5",
|
||||
"Check_RewardAndPunish", "RewardAndPunishCode", $"CF");
|
||||
RewardAndPunish.RewardAndPunishMan = register.PunishPerson;
|
||||
RewardAndPunish.TeamGroupId = BLL.PersonService.GetPersonById(register.PunishPerson).TeamGroupId;
|
||||
RewardAndPunish.DataSource = "1";
|
||||
RewardAndPunish.SysTemType = "1";
|
||||
RewardAndPunish.HazardRegisterId = register.HazardRegisterId;
|
||||
BLL.RewardAndPunishService.AddRewardAndPunish(RewardAndPunish);
|
||||
}
|
||||
}
|
||||
else //未通过
|
||||
{
|
||||
|
||||
+9
@@ -77,6 +77,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWorkAreaName;
|
||||
|
||||
/// <summary>
|
||||
/// txtPunishPersonName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPunishPersonName;
|
||||
|
||||
/// <summary>
|
||||
/// txtRiskLevel 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -120,6 +120,9 @@
|
||||
SortField="ResponsibilityManName" FieldType="String" HeaderText="责任人" TextAlign="Center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="PunishPersonName" DataField="PunishPersonName" SortField="PunishPersonName"
|
||||
FieldType="String" HeaderText="处罚人" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="RectificationPeriod" DataField="RectificationPeriod"
|
||||
SortField="RectificationPeriod" FieldType="Date" Renderer="Date" HeaderText="整改期限"
|
||||
TextAlign="Center" HeaderTextAlign="Center">
|
||||
|
||||
@@ -525,6 +525,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 删除
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
@@ -560,6 +561,8 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
else
|
||||
{
|
||||
BLL.HSSE_Hazard_HazardRegisterService.DeleteHazardRegisterByHazardRegisterId(rowID);
|
||||
//删除奖罚管理数据
|
||||
BLL.RewardAndPunishService.DeleteRewardAndPunishByHazardRegisterId(rowID);
|
||||
}
|
||||
//}
|
||||
//else
|
||||
@@ -579,7 +582,6 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 格式化字符串
|
||||
|
||||
@@ -28,8 +28,13 @@
|
||||
<f:TextBox ID="txtWorkAreaName" runat="server" Label="单位工程" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow><f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtPunishPersonName" runat="server" Label="处罚人" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:Label runat="server" CssStyle="display:none"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtRiskLevel" runat="server" Label="隐患级别" Readonly="true">
|
||||
|
||||
@@ -79,6 +79,7 @@ namespace FineUIPro.Web.HiddenInspection
|
||||
this.txtWorkAreaName.Text = registration.WorkAreaName;
|
||||
this.txtRegisterTypesName.Text = registration.RegisterTypesName;
|
||||
this.txtRequirements.Text = registration.Requirements;
|
||||
this.txtPunishPersonName.Text = registration.PunishPersonName;
|
||||
if (registration.CheckCycle == "D")
|
||||
{
|
||||
this.txtType.Text = "日检";
|
||||
|
||||
+9
@@ -77,6 +77,15 @@ namespace FineUIPro.Web.HiddenInspection
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWorkAreaName;
|
||||
|
||||
/// <summary>
|
||||
/// txtPunishPersonName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPunishPersonName;
|
||||
|
||||
/// <summary>
|
||||
/// txtRiskLevel 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -21,6 +21,13 @@
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtPunishPersonName" runat="server" Label="处罚人" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:Label runat="server" CssStyle="display:none"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtRegisterTypesName" runat="server" Label="检查项" Readonly="true">
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
this.txtResponsibilityUnitName.Text = registration.ResponsibilityUnitName;
|
||||
this.txtRegisterTypesName.Text = registration.RegisterTypesName;
|
||||
this.txtRequirements.Text = registration.Requirements;
|
||||
this.txtPunishPersonName.Text = registration.PunishPersonName;
|
||||
this.txtProblemDescription.Text = registration.RegisterDef;
|
||||
this.txtTakeSteps.Text = registration.Rectification;
|
||||
this.txtResponsibilityManName.Text = registration.ResponsibilityManName;
|
||||
|
||||
+9
@@ -59,6 +59,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtResponsibilityUnitName;
|
||||
|
||||
/// <summary>
|
||||
/// txtPunishPersonName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPunishPersonName;
|
||||
|
||||
/// <summary>
|
||||
/// txtRegisterTypesName 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace FineUIPro.Web.HSSE.InformationProject
|
||||
this.drpUsers.SelectedValue = this.CurrUser.UserId;
|
||||
////自动生成编码
|
||||
this.txtCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.ProjectPromotionalActivitiesMenuId, this.ProjectId, this.CurrUser.UnitId);
|
||||
this.txtTitle.Text = this.SimpleForm1.Title;
|
||||
//this.txtTitle.Text = this.SimpleForm1.Title;
|
||||
}
|
||||
|
||||
///初始化审核菜单
|
||||
|
||||
@@ -288,6 +288,17 @@ namespace FineUIPro.Web.ProjectData
|
||||
if (this.drpSubjectUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
project.SubjectUnit = this.drpSubjectUnit.SelectedValue;
|
||||
//获取集团的单位的api保存起来
|
||||
var Url = BLL.UnitService.getUnitApiUrlByUnitId(this.drpSubjectUnit.SelectedValue);
|
||||
if (!string.IsNullOrEmpty(Url))
|
||||
{
|
||||
var urls = Url.Split(',');
|
||||
project.SubjectUnitApiUrl = urls[0];
|
||||
if (urls.Length > 1)
|
||||
{
|
||||
project.SubjectUnitWebUrl = urls[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.drpSubjectProject.SelectedValue != BLL.Const._Null)
|
||||
|
||||
@@ -85,6 +85,9 @@
|
||||
<TreeNode id="BB6CEC48-283B-46AD-BEDD-F964D261698F" Text="HSE专题会议" NavigateUrl="HSSE/Meeting/SpecialMeeting.aspx"></TreeNode>
|
||||
<TreeNode id="F8ADCDBC-AAAD-4884-9935-2B63562E4779" Text="班前会" NavigateUrl="HSSE/Meeting/ClassMeeting.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="66DFD649-FBC2-463F-BD1A-04095D713C8E" Text="安全活动" NavigateUrl=""><TreeNode id="16092FE7-938B-4713-8084-4FBFA030F386" Text="HSE宣传活动" NavigateUrl="HSSE/InformationProject/PromotionalActivities.aspx"></TreeNode>
|
||||
<TreeNode id="B06EC998-60D2-4CBF-8080-9F000A1595AA" Text="管理通知" NavigateUrl="HSSE/InformationProject/Notice.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="473A87D2-1365-4A68-BD38-06F312F81BC2" Text="作业许可" NavigateUrl=""><TreeNode id="2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B" Text="动火作业票" NavigateUrl="HSSE/License/FireWork.aspx"></TreeNode>
|
||||
<TreeNode id="DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9" Text="高处作业票" NavigateUrl="HSSE/License/HeightWork.aspx"></TreeNode>
|
||||
<TreeNode id="AEC9166D-1C91-45F0-8BFE-D3D0479A28C7" Text="受限空间作业票" NavigateUrl="HSSE/License/LimitedSpace.aspx"></TreeNode>
|
||||
@@ -116,7 +119,8 @@
|
||||
<TreeNode id="960812BA-ADE3-41C2-AE4A-BF24A58DE4CB" Text="塔吊状态" NavigateUrl="HSSE/TowerCrane/TowerCraneState.aspx"></TreeNode>
|
||||
<TreeNode id="DE0CA5F1-AE72-4752-A244-D474F3F5F9C8" Text="塔吊记录" NavigateUrl="HSSE/TowerCrane/TowerCraneRecord.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="012DF857-AD6B-49AA-87A8-030CD5F66D4C" Text="HSE奖惩" NavigateUrl=""><TreeNode id="96F21A83-6871-4CC4-8901-1B99C376395C" Text="奖励通知单" NavigateUrl="HSSE/Check/IncentiveNotice.aspx"></TreeNode>
|
||||
<TreeNode id="012DF857-AD6B-49AA-87A8-030CD5F66D4C" Text="HSE奖惩" NavigateUrl=""><TreeNode id="288C955A-E379-4F24-85F9-585343B33D46" Text="奖罚管理" NavigateUrl="CQMS/Check/RewardAndPunish.aspx"></TreeNode>
|
||||
<TreeNode id="96F21A83-6871-4CC4-8901-1B99C376395C" Text="奖励通知单" NavigateUrl="HSSE/Check/IncentiveNotice.aspx"></TreeNode>
|
||||
<TreeNode id="C13F1CE7-DAEF-4604-A13F-192621D28DF5" Text="奖励统计" NavigateUrl="HSSE/Check/IncentiveNoticeStatistics.aspx"></TreeNode>
|
||||
<TreeNode id="755F1C1D-2178-47D8-9F82-A501B53A2436" Text="处罚通知单" NavigateUrl="HSSE/Check/PunishNotice.aspx"></TreeNode>
|
||||
<TreeNode id="CCD0E55B-300A-454B-8559-155ADAD386AE" Text="处罚统计" NavigateUrl="HSSE/Check/PunishNoticeStatistics.aspx"></TreeNode>
|
||||
@@ -168,9 +172,6 @@
|
||||
<TreeNode id="D3576E49-DBC9-43EA-9822-EA5F4D96CA24" Text="绩效评价管理" NavigateUrl=""><TreeNode id="EED8DBEE-83F6-4B5B-8382-AF40EB66B0A9" Text="分包方绩效评价" NavigateUrl="HSSE/Perfomance/PerfomanceRecord.aspx"></TreeNode>
|
||||
<TreeNode id="1320A6D8-713B-43D4-BB00-CDA3DE6D24CB" Text="个人绩效评价" NavigateUrl="HSSE/Perfomance/PersonPerfomance.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="66DFD649-FBC2-463F-BD1A-04095D713C8E" Text="安全活动" NavigateUrl=""><TreeNode id="16092FE7-938B-4713-8084-4FBFA030F386" Text="HSE宣传活动" NavigateUrl="HSSE/InformationProject/PromotionalActivities.aspx"></TreeNode>
|
||||
<TreeNode id="B06EC998-60D2-4CBF-8080-9F000A1595AA" Text="管理通知" NavigateUrl="HSSE/InformationProject/Notice.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="14DD34F2-0682-48D6-A199-108297A9825E" Text="安全分析" NavigateUrl=""><TreeNode id="14C42C8E-8D3D-4D30-AA56-4F96828610AD" Text="危险因素分析" NavigateUrl="HSSE/InformationAnalysis/CheckAnalysis.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
</Tree>
|
||||
@@ -28,6 +28,7 @@
|
||||
<TreeNode id="3044D68E-5018-4B57-BFC4-FBE4BCCA8B8B" Text="紧急程度定义" NavigateUrl="BaseInfo/QuestionType.aspx"></TreeNode>
|
||||
<TreeNode id="C7E69F5F-04A8-41F9-8EA1-C41B13248421" Text="关键事项类别定义" NavigateUrl="BaseInfo/GJSXType.aspx"></TreeNode>
|
||||
<TreeNode id="F0DF2F2B-7C12-4A0F-B7D4-0B00BADE1D64" Text="文档类别定义" NavigateUrl="BaseInfo/DocType.aspx"></TreeNode>
|
||||
<TreeNode id="621A9295-DD82-425A-863D-310AD319752B" Text="奖罚类别定义" NavigateUrl="BaseInfo/RewardAndPunishManager.aspx"></TreeNode>
|
||||
<TreeNode id="D0850615-BF32-4CFA-84CA-EEA261676EA8" Text="移交专业设置" NavigateUrl="BaseInfo/TransferMajor.aspx"></TreeNode>
|
||||
<TreeNode id="CEB340BE-640E-4C95-ACB1-5E6207D4EDDA" Text="建筑业企业资质" NavigateUrl="BaseInfo/Qualification.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Tree>
|
||||
</Tree>
|
||||
@@ -4,22 +4,22 @@ namespace Model
|
||||
{
|
||||
public class HazardRegisterSyncData
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 公司社会统一信用代码
|
||||
/// </summary>
|
||||
public string CollCropCode { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 项目id
|
||||
/// </summary>
|
||||
public string ProjectId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 分包单位程序访问地址
|
||||
/// </summary>
|
||||
public string UnitDomain { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 项目安全隐患数据
|
||||
/// </summary>
|
||||
@@ -28,9 +28,9 @@ namespace Model
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class HazardRegisterSyncItem
|
||||
{
|
||||
public string HazardRegisterId { get; set; } // 主键
|
||||
@@ -84,6 +84,17 @@ namespace Model
|
||||
public string Risk_Level { get; set; } // 风险等级
|
||||
public string ControlId { get; set; } // 控制措施Id
|
||||
public string DataSource { get; set; } // 数据来源
|
||||
|
||||
/// <summary>
|
||||
/// 内容附件
|
||||
/// </summary>
|
||||
public string AttachFileId1 { get; set; }
|
||||
public string ToKeyId1 { get; set; }
|
||||
public string AttachSource1 { get; set; }
|
||||
public string AttachUrl1 { get; set; }
|
||||
public string AttachFileId2 { get; set; }
|
||||
public string ToKeyId2 { get; set; }
|
||||
public string AttachSource2 { get; set; }
|
||||
public string AttachUrl2 { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -8,18 +8,18 @@ namespace Model
|
||||
/// 公司社会统一信用代码
|
||||
/// </summary>
|
||||
public string CollCropCode { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 项目id
|
||||
/// </summary>
|
||||
public string ProjectId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 分包单位程序访问地址
|
||||
/// </summary>
|
||||
public string UnitDomain { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 项目安全隐患数据
|
||||
/// </summary>
|
||||
@@ -29,9 +29,9 @@ namespace Model
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class PersonSyncItem
|
||||
{
|
||||
public string PersonId { get; set; }
|
||||
@@ -60,7 +60,7 @@ namespace Model
|
||||
public string CertificateCode { get; set; }
|
||||
public string CertificateName { get; set; }
|
||||
public DateTime? CertificateLimitTime { get; set; }
|
||||
|
||||
|
||||
public CertificateItem CertificateItem { get; set; }
|
||||
public string QualificationCertificateUrl { get; set; }
|
||||
public string TrainingCertificateUrl { get; set; }
|
||||
@@ -91,10 +91,28 @@ namespace Model
|
||||
public bool? IsSafetyMonitoring { get; set; }
|
||||
public string ProvinceCode { get; set; }
|
||||
public bool? IsCardNoOK { get; set; }
|
||||
/// <summary>
|
||||
/// 内容附件
|
||||
/// </summary>
|
||||
public string AttachFileId1 { get; set; }
|
||||
public string ToKeyId1 { get; set; }
|
||||
public string AttachSource1 { get; set; }
|
||||
public string AttachUrl1 { get; set; }
|
||||
public string AttachFileId2 { get; set; }
|
||||
public string ToKeyId2 { get; set; }
|
||||
public string AttachSource2 { get; set; }
|
||||
public string AttachUrl2 { get; set; }
|
||||
public string AttachFileId3 { get; set; }
|
||||
public string ToKeyId3 { get; set; }
|
||||
public string AttachSource3 { get; set; }
|
||||
public string AttachUrl3 { get; set; }
|
||||
public string AttachFileId4 { get; set; }
|
||||
public string ToKeyId4 { get; set; }
|
||||
public string AttachSource4 { get; set; }
|
||||
public string AttachUrl4 { get; set; }
|
||||
public string AttachFileId5 { get; set; }
|
||||
public string ToKeyId5 { get; set; }
|
||||
public string AttachSource5 { get; set; }
|
||||
public string AttachUrl5 { get; set; }
|
||||
public string WorkPostName { get; set; }
|
||||
public string PostType { get; set; }
|
||||
@@ -103,16 +121,16 @@ namespace Model
|
||||
public string TeamGroupName { get; set; }
|
||||
public string WorkAreaName { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class CertificateItem
|
||||
{
|
||||
|
||||
|
||||
public class CertificateItem
|
||||
{
|
||||
public string PersonQualityId { get; set; }
|
||||
public string CertificateId { get; set; }
|
||||
public string CertificateNo { get; set; }
|
||||
public string CertificateName { get; set; }
|
||||
public DateTime? CertificateLimitDate { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+1322
File diff suppressed because it is too large
Load Diff
@@ -86,22 +86,22 @@
|
||||
<publishTime>10/28/2024 14:02:50</publishTime>
|
||||
</File>
|
||||
<File Include="bin/App_global.asax.compiled">
|
||||
<publishTime>03/16/2026 14:33:07</publishTime>
|
||||
<publishTime>03/16/2026 20:03:36</publishTime>
|
||||
</File>
|
||||
<File Include="bin/App_global.asax.dll">
|
||||
<publishTime>03/16/2026 14:33:07</publishTime>
|
||||
<publishTime>03/16/2026 20:03:36</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Aspose.Words.dll">
|
||||
<publishTime>12/06/2024 20:13:58</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BLL.dll">
|
||||
<publishTime>03/16/2026 14:32:47</publishTime>
|
||||
<publishTime>03/16/2026 20:03:13</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BLL.dll.config">
|
||||
<publishTime>12/26/2024 09:46:52</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BLL.pdb">
|
||||
<publishTime>03/16/2026 14:32:47</publishTime>
|
||||
<publishTime>03/16/2026 20:03:13</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BouncyCastle.Crypto.dll">
|
||||
<publishTime>12/18/2020 05:32:28</publishTime>
|
||||
@@ -128,10 +128,10 @@
|
||||
<publishTime>07/25/2012 19:48:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Model.dll">
|
||||
<publishTime>03/16/2026 14:32:40</publishTime>
|
||||
<publishTime>03/16/2026 20:03:05</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Model.pdb">
|
||||
<publishTime>03/16/2026 14:32:40</publishTime>
|
||||
<publishTime>03/16/2026 20:03:05</publishTime>
|
||||
</File>
|
||||
<File Include="bin/netstandard.dll">
|
||||
<publishTime>03/11/2026 09:12:36</publishTime>
|
||||
@@ -389,13 +389,13 @@
|
||||
<publishTime>02/09/2013 00:42:28</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebAPI.dll">
|
||||
<publishTime>03/16/2026 14:32:48</publishTime>
|
||||
<publishTime>03/16/2026 20:03:14</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebAPI.pdb">
|
||||
<publishTime>03/16/2026 14:32:48</publishTime>
|
||||
<publishTime>03/16/2026 20:03:14</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebAPI.xml">
|
||||
<publishTime>03/16/2026 14:32:47</publishTime>
|
||||
<publishTime>03/16/2026 20:03:14</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebGrease.dll">
|
||||
<publishTime>01/23/2014 21:57:34</publishTime>
|
||||
@@ -479,7 +479,7 @@
|
||||
<publishTime>10/28/2024 14:02:50</publishTime>
|
||||
</File>
|
||||
<File Include="PrecompiledApp.config">
|
||||
<publishTime>03/16/2026 14:32:49</publishTime>
|
||||
<publishTime>03/16/2026 20:03:15</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/bootstrap.js">
|
||||
<publishTime>10/28/2024 14:02:50</publishTime>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
|
||||
<WebStackScaffolding_LayoutPageFile />
|
||||
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
|
||||
Reference in New Issue
Block a user