小程序接口修改
This commit is contained in:
parent
ca5c3fe9a7
commit
4449a7754f
File diff suppressed because it is too large
Load Diff
|
@ -355,7 +355,7 @@ namespace BLL
|
|||
}
|
||||
if (states == "0")
|
||||
{
|
||||
getViews = getViews.Where(x => x.IsUsed == 0 && !x.AuditorDate.HasValue);
|
||||
getViews = getViews.Where(x => x.IsUsed == 2 && !x.AuditorDate.HasValue);
|
||||
}
|
||||
else if (states == "1")
|
||||
{
|
||||
|
@ -583,7 +583,7 @@ namespace BLL
|
|||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
DateTime inDateTime=DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(InTime))
|
||||
if (!string.IsNullOrEmpty(InTime)&&!"null".Equals(InTime))
|
||||
{
|
||||
inDateTime = DateTime.Parse(InTime);
|
||||
}
|
||||
|
|
|
@ -122,35 +122,38 @@ namespace BLL
|
|||
toDoItem.UrlStr = att.AttachUrl + "," + toDoItem.UrlStr;
|
||||
}
|
||||
}
|
||||
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(toDoItem.UrlStr, 10, null), toDoItem.UrlStr, toDoItem.MenuId, toDoItem.DataId);
|
||||
UploadFileService.SaveAttachUrlForApi(UploadFileService.GetSourceByAttachUrl(toDoItem.UrlStr, 10, null), toDoItem.UrlStr, toDoItem.MenuId, toDoItem.DataId);
|
||||
}
|
||||
else
|
||||
{
|
||||
CommonService.DeleteAttachFileById(toDoItem.DataId);
|
||||
CommonService.DeleteAttachFileByIdForApi(toDoItem.DataId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void SaveAttachUrl(string menuId, string dataId, string url, string isInsert)
|
||||
{
|
||||
////保存附件
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
public static void SaveAttachUrl(string menuId, string dataId, string url, string isInsert)
|
||||
{
|
||||
if (isInsert == "1")
|
||||
{
|
||||
var att = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataId);
|
||||
if (att != null)
|
||||
{
|
||||
url = att.AttachUrl + "," + url;
|
||||
}
|
||||
}
|
||||
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(url, 10, null), url, menuId, dataId);
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
////保存附件
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
if (isInsert == "1")
|
||||
{
|
||||
var att = db.AttachFile.FirstOrDefault(x => x.ToKeyId == dataId);
|
||||
if (att != null)
|
||||
{
|
||||
url = att.AttachUrl + "," + url;
|
||||
}
|
||||
}
|
||||
UploadFileService.SaveAttachUrlForApi(UploadFileService.GetSourceByAttachUrl(url, 10, null), url, menuId, dataId);
|
||||
}
|
||||
else
|
||||
{
|
||||
CommonService.DeleteAttachFileByIdForApi(dataId);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CommonService.DeleteAttachFileById(dataId);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取附件路径
|
||||
|
@ -177,12 +180,12 @@ namespace BLL
|
|||
}
|
||||
return fileUrl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取附件路径
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string getFileUrl(string menuId, string tokeyId, string url)
|
||||
|
||||
/// <summary>
|
||||
/// 获取附件路径
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string getFileUrl(string menuId, string tokeyId, string url)
|
||||
{
|
||||
string fileUrl = url;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
|
|
|
@ -208,7 +208,7 @@ namespace BLL
|
|||
Password = x.Password,
|
||||
UserName = x.UserName,
|
||||
RoleId = y.RoleId,
|
||||
RoleName = RoleService.getRoleNamesRoleIds(y.RoleId),
|
||||
RoleName = RoleService.getRoleNamesRoleIdsForApi(y.RoleId),
|
||||
UnitId = y.UnitId,
|
||||
UnitName = db.Base_Unit.First(z => z.UnitId == y.UnitId).UnitName,
|
||||
LoginProjectId = y.ProjectId,
|
||||
|
|
|
@ -137,11 +137,11 @@ namespace BLL.API.CQMS
|
|||
inspectionManagement.AttachUrl2 = item.ProcessControl_InspectionManagement.AttachUrl2;
|
||||
inspectionManagement.MainSendUnitId = item.ProcessControl_InspectionManagement.MainSendUnitId;
|
||||
if(!string.IsNullOrEmpty(inspectionManagement.MainSendUnitId))
|
||||
inspectionManagement.MainSendUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.MainSendUnitId);//item.ProcessControl_InspectionManagement.MainSendUnitName;
|
||||
inspectionManagement.MainSendUnitName = UnitService.getUnitNamesUnitIdsForApi(inspectionManagement.MainSendUnitId);//item.ProcessControl_InspectionManagement.MainSendUnitName;
|
||||
inspectionManagement.CCUnitIds = item.ProcessControl_InspectionManagement.CCUnitIds;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.CCUnitIds))
|
||||
{
|
||||
inspectionManagement.CCUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.CCUnitIds);// item.ProcessControl_InspectionManagement.CCUnitName;
|
||||
inspectionManagement.CCUnitName = UnitService.getUnitNamesUnitIdsForApi(inspectionManagement.CCUnitIds);// item.ProcessControl_InspectionManagement.CCUnitName;
|
||||
}
|
||||
inspectionManagement.PlanComplateDate = item.ProcessControl_InspectionManagement.PlanComplateDate.HasValue? item.ProcessControl_InspectionManagement.PlanComplateDate.Value.ToString("yyyy-MM-dd"): "";
|
||||
|
||||
|
@ -211,11 +211,11 @@ namespace BLL.API.CQMS
|
|||
inspectionManagement.AttachUrl2 = item.AttachUrl2;
|
||||
inspectionManagement.MainSendUnitId = item.MainSendUnitId;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.MainSendUnitId))
|
||||
inspectionManagement.MainSendUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.MainSendUnitId);//item.MainSendUnitName;
|
||||
inspectionManagement.MainSendUnitName = UnitService.getUnitNamesUnitIdsForApi(inspectionManagement.MainSendUnitId);//item.MainSendUnitName;
|
||||
inspectionManagement.CCUnitIds = item.CCUnitIds;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.CCUnitIds))
|
||||
{
|
||||
inspectionManagement.CCUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.CCUnitIds);// item.CCUnitName;
|
||||
inspectionManagement.CCUnitName = UnitService.getUnitNamesUnitIdsForApi(inspectionManagement.CCUnitIds);// item.CCUnitName;
|
||||
}
|
||||
inspectionManagement.PlanComplateDate = item.PlanComplateDate.HasValue ? item.PlanComplateDate.Value.ToString("yyyy-MM-dd") : "";
|
||||
|
||||
|
@ -297,11 +297,11 @@ namespace BLL.API.CQMS
|
|||
inspectionManagement.AttachUrl2 = item.ProcessControl_InspectionManagement.AttachUrl2;
|
||||
inspectionManagement.MainSendUnitId = item.ProcessControl_InspectionManagement.MainSendUnitId;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.MainSendUnitId))
|
||||
inspectionManagement.MainSendUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.MainSendUnitId);//item.ProcessControl_InspectionManagement.MainSendUnitName;
|
||||
inspectionManagement.MainSendUnitName = UnitService.getUnitNamesUnitIdsForApi(inspectionManagement.MainSendUnitId);//item.ProcessControl_InspectionManagement.MainSendUnitName;
|
||||
inspectionManagement.CCUnitIds = item.ProcessControl_InspectionManagement.CCUnitIds;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.CCUnitIds))
|
||||
{
|
||||
inspectionManagement.CCUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.CCUnitIds);// item.ProcessControl_InspectionManagement.CCUnitName;
|
||||
inspectionManagement.CCUnitName = UnitService.getUnitNamesUnitIdsForApi(inspectionManagement.CCUnitIds);// item.ProcessControl_InspectionManagement.CCUnitName;
|
||||
}
|
||||
inspectionManagement.PlanComplateDate = item.ProcessControl_InspectionManagement.PlanComplateDate.HasValue ? item.ProcessControl_InspectionManagement.PlanComplateDate.Value.ToString("yyyy-MM-dd") : "";
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -253,24 +254,27 @@ namespace BLL
|
|||
return getDateInfo.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 根据管线ID获取探伤比例
|
||||
/// </summary>
|
||||
/// <param name="pipeLineId"></param>
|
||||
/// <returns></returns>
|
||||
private static string GetDetectionRate(string pipeLineId)
|
||||
{
|
||||
string detectionRate = string.Empty;
|
||||
var pipe = BLL.PipelineService.GetPipelineByPipelineId(pipeLineId);
|
||||
if (pipe != null && !string.IsNullOrEmpty(pipe.DetectionRateId))
|
||||
/// <summary>
|
||||
/// 根据管线ID获取探伤比例
|
||||
/// </summary>
|
||||
/// <param name="pipeLineId"></param>
|
||||
/// <returns></returns>
|
||||
private static string GetDetectionRate(string pipeLineId)
|
||||
{
|
||||
var r = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(pipe.DetectionRateId);
|
||||
detectionRate = r.DetectionRateValue + "%";
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string detectionRate = string.Empty;
|
||||
var pipe = db.HJGL_Pipeline.FirstOrDefault(e => e.PipelineId == pipeLineId);
|
||||
if (pipe != null && !string.IsNullOrEmpty(pipe.DetectionRateId))
|
||||
{
|
||||
var r = db.Base_DetectionRate.FirstOrDefault(e => e.DetectionRateId == pipe.DetectionRateId);
|
||||
detectionRate = r.DetectionRateValue + "%";
|
||||
}
|
||||
return detectionRate;
|
||||
}
|
||||
}
|
||||
return detectionRate;
|
||||
}
|
||||
|
||||
#region 根据焊口标识获取焊口详细信息
|
||||
/// <summary>
|
||||
|
@ -521,15 +525,15 @@ namespace BLL
|
|||
string jotId = addItem.WeldJointId;
|
||||
if (!string.IsNullOrEmpty(jotId))
|
||||
{
|
||||
var jotInfo = BLL.PW_JointInfoService.GetJointInfoByJotID(jotId);
|
||||
var jotInfo = db.PW_JointInfo.FirstOrDefault(e => e.JOT_ID == jotId);
|
||||
if (jotInfo != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(jotInfo.ISO_ID))
|
||||
{
|
||||
var isoInfo = BLL.PW_IsoInfoService.GetIsoInfoByIsoInfoId(jotInfo.ISO_ID);
|
||||
var isoInfo =db.PW_IsoInfo.FirstOrDefault(e => e.ISO_ID == jotInfo.ISO_ID);
|
||||
if (isoInfo != null)
|
||||
{
|
||||
workAreaCode = BLL.WorkAreaService.GetWorkAreaCodeByWorkAreaId(isoInfo.WorkAreaId);
|
||||
workAreaCode = BLL.WorkAreaService.GetWorkAreaCodeByWorkAreaIdForApi(isoInfo.WorkAreaId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -546,9 +550,9 @@ namespace BLL
|
|||
string DReportID = SQLHelper.GetNewID(typeof(Model.BO_WeldReportMain));
|
||||
newWeldReportMain.DReportID = DReportID;
|
||||
BLL.WeldReportService.AddWeldReport(newWeldReportMain);
|
||||
BLL.LogService.AddSys_Log(BLL.UserService.GetUserByUserId(addItem.UserId), newWeldReportMain.JOT_DailyReportNo, DReportID, BLL.Const.HJGL_WeldReportMenuId, "添加焊接日报信息");
|
||||
BLL.LogService.AddSys_Log(db.Sys_User.FirstOrDefault(e => e.UserId == addItem.UserId), newWeldReportMain.JOT_DailyReportNo, DReportID, BLL.Const.HJGL_WeldReportMenuId, "添加焊接日报信息");
|
||||
|
||||
Model.PW_JointInfo jot = BLL.PW_JointInfoService.GetJointInfoByJotID(addItem.WeldJointId);
|
||||
Model.PW_JointInfo jot = db.PW_JointInfo.FirstOrDefault(e => e.JOT_ID == addItem.WeldJointId);
|
||||
jot.DReportID = newWeldReportMain.DReportID;
|
||||
jot.JOT_CellWelder = addItem.CoverWelderId;
|
||||
jot.JOT_FloorWelder = addItem.BackingWelderId;
|
||||
|
@ -565,9 +569,9 @@ namespace BLL
|
|||
//jot.JOT_CellTemp = item.JOT_CellTemp;
|
||||
//jot.JOT_LastTemp = item.JOT_LastTemp;
|
||||
|
||||
BLL.PW_JointInfoService.UpdateJointInfoByDReport(jot);
|
||||
db.SubmitChanges();
|
||||
//更新焊口号 修改固定焊口号后 +G
|
||||
BLL.PW_JointInfoService.UpdateJointNoAddG(jot.JOT_ID, addItem.JointAttribute, "Add");
|
||||
BLL.PW_JointInfoService.UpdateJointNoAddGForApi(jot.JOT_ID, addItem.JointAttribute, "Add");
|
||||
|
||||
SaveAttachFile(addItem.WeldJointId, BLL.Const.HJGL_WeldReportMenuId, addItem.AttachUrl);
|
||||
}
|
||||
|
|
|
@ -73,29 +73,30 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SavePreWeldingDaily(Model.HJGL_PreWeldingDailyItem newItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_PreWeldingDaily newP= new Model.HJGL_PreWeldingDaily
|
||||
{
|
||||
PreWeldingDailyId = newItem.PreWeldingDailyId,
|
||||
ProjectId = newItem.ProjectId,
|
||||
UnitWorkId = newItem.UnitWorkId,
|
||||
UnitId = newItem.UnitId,
|
||||
};
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.HJGL_PreWeldingDaily newP = new Model.HJGL_PreWeldingDaily
|
||||
{
|
||||
PreWeldingDailyId = newItem.PreWeldingDailyId,
|
||||
ProjectId = newItem.ProjectId,
|
||||
UnitWorkId = newItem.UnitWorkId,
|
||||
UnitId = newItem.UnitId,
|
||||
};
|
||||
|
||||
var updateItem = db.HJGL_PreWeldingDaily.FirstOrDefault(x => x.PreWeldingDailyId == newItem.PreWeldingDailyId);
|
||||
if (updateItem == null)
|
||||
{
|
||||
|
||||
newP.PreWeldingDailyId = SQLHelper.GetNewID();
|
||||
db.HJGL_PreWeldingDaily.InsertOnSubmit(newP);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
/// 更新
|
||||
/// //
|
||||
}
|
||||
var updateItem = db.HJGL_PreWeldingDaily.FirstOrDefault(x => x.PreWeldingDailyId == newItem.PreWeldingDailyId);
|
||||
if (updateItem == null)
|
||||
{
|
||||
|
||||
newP.PreWeldingDailyId = SQLHelper.GetNewID();
|
||||
db.HJGL_PreWeldingDaily.InsertOnSubmit(newP);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
/// 更新
|
||||
/// //
|
||||
}
|
||||
}
|
||||
//if (newItem.BaseInfoItem != null && newItem.BaseInfoItem.Count() > 0)
|
||||
//{
|
||||
// foreach (var item in newItem.BaseInfoItem)
|
||||
|
|
|
@ -5,185 +5,186 @@ using System.Data;
|
|||
using System.Data.SqlClient;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class APIReportQueryService
|
||||
{
|
||||
#region 根据人员二维码获取焊工业绩
|
||||
/// <summary>
|
||||
/// 根据人员二维码获取焊工业绩
|
||||
/// </summary>
|
||||
/// <param name="personId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.WelderPerformanceItem GetWelderPerformanceByQRC(string personId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
public static class APIReportQueryService
|
||||
{
|
||||
#region 根据人员二维码获取焊工业绩
|
||||
/// <summary>
|
||||
/// 根据人员二维码获取焊工业绩
|
||||
/// </summary>
|
||||
/// <param name="personId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.WelderPerformanceItem GetWelderPerformanceByQRC(string personId)
|
||||
{
|
||||
// todo 二维码分解待做
|
||||
var getDataLists = from x in db.View_WelderPerformance
|
||||
where x.PersonId == personId
|
||||
select new Model.WelderPerformanceItem
|
||||
{
|
||||
WelderCode = x.WelderCode,
|
||||
PersonName = x.PersonName,
|
||||
UnitName = x.UnitName,
|
||||
CertificateLimitTime = x.CertificateLimitTime.ToString(),
|
||||
WelderLevel = x.WelderLevel,
|
||||
OnePassRate = x.PassRate,
|
||||
TotalJotDin = x.Nowtotal_jot.ToString() + "/" + x.Nowtotal_din.ToString(),
|
||||
WeldAvgNum = GetWeldAvgNum(personId, x.Nowtotal_din.HasValue ? x.Nowtotal_din.Value : 0),
|
||||
OneCheckJotNum = x.OneCheckJotNum.ToString(),
|
||||
OneCheckPassJotNum = x.OneCheckPassJotNum,
|
||||
RepairJotNum = x.OneCheckRepairJotNum.ToString(),
|
||||
ExpandJotNum = x.ExpandJotNum.ToString()
|
||||
};
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
// todo 二维码分解待做
|
||||
var getDataLists = from x in db.View_WelderPerformance
|
||||
where x.PersonId == personId
|
||||
select new Model.WelderPerformanceItem
|
||||
{
|
||||
WelderCode = x.WelderCode,
|
||||
PersonName = x.PersonName,
|
||||
UnitName = x.UnitName,
|
||||
CertificateLimitTime = x.CertificateLimitTime.ToString(),
|
||||
WelderLevel = x.WelderLevel,
|
||||
OnePassRate = x.PassRate,
|
||||
TotalJotDin = x.Nowtotal_jot.ToString() + "/" + x.Nowtotal_din.ToString(),
|
||||
WeldAvgNum = GetWeldAvgNum(personId, x.Nowtotal_din.HasValue ? x.Nowtotal_din.Value : 0),
|
||||
OneCheckJotNum = x.OneCheckJotNum.ToString(),
|
||||
OneCheckPassJotNum = x.OneCheckPassJotNum,
|
||||
RepairJotNum = x.OneCheckRepairJotNum.ToString(),
|
||||
ExpandJotNum = x.ExpandJotNum.ToString()
|
||||
};
|
||||
|
||||
return getDataLists.FirstOrDefault();
|
||||
return getDataLists.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
private static string GetWeldAvgNum(string personId,decimal totalDin)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
private static string GetWeldAvgNum(string personId, decimal totalDin)
|
||||
{
|
||||
string vagDin = string.Empty;
|
||||
var date = from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId
|
||||
where x.BackingWelderId == personId || x.CoverWelderId == personId
|
||||
select y.WeldingDate;
|
||||
if (date.Count() > 0)
|
||||
{
|
||||
DateTime startDate = Convert.ToDateTime(date.Min());
|
||||
DateTime endDate = Convert.ToDateTime(date.Max());
|
||||
TimeSpan t = endDate - startDate;
|
||||
int dayNum = t.Days;
|
||||
vagDin = (totalDin / dayNum).ToString("0.##");
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string vagDin = string.Empty;
|
||||
var date = from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId
|
||||
where x.BackingWelderId == personId || x.CoverWelderId == personId
|
||||
select y.WeldingDate;
|
||||
if (date.Count() > 0)
|
||||
{
|
||||
DateTime startDate = Convert.ToDateTime(date.Min());
|
||||
DateTime endDate = Convert.ToDateTime(date.Max());
|
||||
TimeSpan t = endDate - startDate;
|
||||
int dayNum = t.Days;
|
||||
vagDin = (totalDin / dayNum).ToString("0.##");
|
||||
|
||||
}
|
||||
return vagDin;
|
||||
}
|
||||
return vagDin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 根据焊工号获取焊工业绩
|
||||
/// <summary>
|
||||
/// 根据焊工号获取焊工业绩
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="welderCode"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.WelderPerformanceItem GetWelderPerformanceByWelderCode(string projectId,string welderCode)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
#region 根据焊工号获取焊工业绩
|
||||
/// <summary>
|
||||
/// 根据焊工号获取焊工业绩
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="welderCode"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.WelderPerformanceItem GetWelderPerformanceByWelderCode(string projectId, string welderCode)
|
||||
{
|
||||
// todo 二维码分解待做
|
||||
var getDataLists = from x in db.View_WelderPerformance
|
||||
where x.ProjectId == projectId && x.WelderCode == welderCode
|
||||
select new Model.WelderPerformanceItem
|
||||
{
|
||||
WelderCode = x.WelderCode,
|
||||
PersonName = x.PersonName,
|
||||
UnitName = x.UnitName,
|
||||
CertificateLimitTime = x.CertificateLimitTime.ToString(),
|
||||
WelderLevel = x.WelderLevel,
|
||||
OnePassRate = x.PassRate,
|
||||
TotalJotDin = x.Nowtotal_jot.ToString() + "/" + x.Nowtotal_din.ToString(),
|
||||
WeldAvgNum = GetWeldAvgNum(x.PersonId, x.Nowtotal_din.HasValue ? x.Nowtotal_din.Value : 0),
|
||||
OneCheckJotNum = x.OneCheckJotNum.ToString(),
|
||||
OneCheckPassJotNum = x.OneCheckPassJotNum,
|
||||
RepairJotNum = x.OneCheckRepairJotNum.ToString(),
|
||||
ExpandJotNum = x.ExpandJotNum.ToString()
|
||||
};
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
// todo 二维码分解待做
|
||||
var getDataLists = from x in db.View_WelderPerformance
|
||||
where x.ProjectId == projectId && x.WelderCode == welderCode
|
||||
select new Model.WelderPerformanceItem
|
||||
{
|
||||
WelderCode = x.WelderCode,
|
||||
PersonName = x.PersonName,
|
||||
UnitName = x.UnitName,
|
||||
CertificateLimitTime = x.CertificateLimitTime.ToString(),
|
||||
WelderLevel = x.WelderLevel,
|
||||
OnePassRate = x.PassRate,
|
||||
TotalJotDin = x.Nowtotal_jot.ToString() + "/" + x.Nowtotal_din.ToString(),
|
||||
WeldAvgNum = GetWeldAvgNum(x.PersonId, x.Nowtotal_din.HasValue ? x.Nowtotal_din.Value : 0),
|
||||
OneCheckJotNum = x.OneCheckJotNum.ToString(),
|
||||
OneCheckPassJotNum = x.OneCheckPassJotNum,
|
||||
RepairJotNum = x.OneCheckRepairJotNum.ToString(),
|
||||
ExpandJotNum = x.ExpandJotNum.ToString()
|
||||
};
|
||||
|
||||
return getDataLists.FirstOrDefault();
|
||||
return getDataLists.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
# region 根据人员ID获取焊工合格项目
|
||||
/// <summary>
|
||||
/// 根据人员ID获取焊工合格项目
|
||||
/// </summary>
|
||||
/// <param name="personId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getWelderQualify(string personId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
#region 根据人员ID获取焊工合格项目
|
||||
/// <summary>
|
||||
/// 根据人员ID获取焊工合格项目
|
||||
/// </summary>
|
||||
/// <param name="personId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getWelderQualify(string personId)
|
||||
{
|
||||
var getDataLists = (from x in db.Welder_WelderQualify
|
||||
where x.WelderId == personId
|
||||
orderby x.LimitDate
|
||||
select new Model.BaseInfoItem
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Welder_WelderQualify
|
||||
where x.WelderId == personId
|
||||
orderby x.LimitDate
|
||||
select new Model.BaseInfoItem
|
||||
{
|
||||
BaseInfoId = x.QualificationItem, // 合格项目
|
||||
BaseInfoCode = x.CheckDate.HasValue ? x.CheckDate.Value.ToString() : "", // 批准日期
|
||||
BaseInfoName = x.LimitDate.HasValue ? x.LimitDate.Value.ToString() : "" // 有效日期
|
||||
}
|
||||
).ToList();
|
||||
return getDataLists;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 焊工资质预警
|
||||
/// <summary>
|
||||
/// 焊工资质预警
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetWelderQualifyWarning(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var welder = from x in db.SitePerson_Person
|
||||
where x.ProjectId == projectId && x.WorkPostId == Const.WorkPost_Welder
|
||||
&& x.WelderCode != null
|
||||
select x;
|
||||
List<Model.BaseInfoItem> warnWelder = new List<Model.BaseInfoItem>();
|
||||
|
||||
foreach (var q in welder)
|
||||
{
|
||||
|
||||
DateTime? validity = q.CertificateLimitTime;
|
||||
DateTime nowDate = DateTime.Now;
|
||||
if (validity != null)
|
||||
{
|
||||
if (validity.Value.AddMonths(-1) < nowDate && validity >= nowDate)
|
||||
{
|
||||
BaseInfoId = x.QualificationItem, // 合格项目
|
||||
BaseInfoCode = x.CheckDate.HasValue ? x.CheckDate.Value.ToString() : "", // 批准日期
|
||||
BaseInfoName = x.LimitDate.HasValue ? x.LimitDate.Value.ToString() : "" // 有效日期
|
||||
Model.BaseInfoItem item = new Model.BaseInfoItem();
|
||||
item.BaseInfoId = q.PersonId;
|
||||
item.BaseInfoCode = q.WelderCode;
|
||||
item.BaseInfoName = q.CertificateLimitTime.HasValue ? q.CertificateLimitTime.Value.ToString() : "" + "即将过期";
|
||||
warnWelder.Add(item);
|
||||
}
|
||||
).ToList();
|
||||
return getDataLists;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
else if (validity < nowDate)
|
||||
{
|
||||
Model.BaseInfoItem item = new Model.BaseInfoItem();
|
||||
item.BaseInfoId = q.PersonId;
|
||||
item.BaseInfoCode = q.WelderCode;
|
||||
item.BaseInfoName = q.CertificateLimitTime.HasValue ? q.CertificateLimitTime.Value.ToString() : "" + "已过期";
|
||||
warnWelder.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 焊工资质预警
|
||||
/// <summary>
|
||||
/// 焊工资质预警
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetWelderQualifyWarning(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
return warnWelder;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 焊工一次合格率低于96%预警
|
||||
/// <summary>
|
||||
/// 焊工一次合格率低于96%预警
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetWelderOnePassRateWarning(string projectId)
|
||||
{
|
||||
var welder = from x in db.SitePerson_Person
|
||||
where x.ProjectId == projectId && x.WorkPostId == Const.WorkPost_Welder
|
||||
&& x.WelderCode != null
|
||||
select x;
|
||||
List<Model.BaseInfoItem> warnWelder = new List<Model.BaseInfoItem>();
|
||||
|
||||
foreach (var q in welder)
|
||||
{
|
||||
|
||||
DateTime? validity = q.CertificateLimitTime;
|
||||
DateTime nowDate = DateTime.Now;
|
||||
if (validity != null)
|
||||
{
|
||||
if (validity.Value.AddMonths(-1) < nowDate && validity >= nowDate)
|
||||
{
|
||||
Model.BaseInfoItem item = new Model.BaseInfoItem();
|
||||
item.BaseInfoId = q.PersonId;
|
||||
item.BaseInfoCode = q.WelderCode;
|
||||
item.BaseInfoName = q.CertificateLimitTime.HasValue ? q.CertificateLimitTime.Value.ToString() : "" + "即将过期";
|
||||
warnWelder.Add(item);
|
||||
}
|
||||
else if (validity < nowDate)
|
||||
{
|
||||
Model.BaseInfoItem item = new Model.BaseInfoItem();
|
||||
item.BaseInfoId = q.PersonId;
|
||||
item.BaseInfoCode =q.WelderCode;
|
||||
item.BaseInfoName = q.CertificateLimitTime.HasValue ? q.CertificateLimitTime.Value.ToString() : "" + "已过期";
|
||||
warnWelder.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return warnWelder;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 焊工一次合格率低于96%预警
|
||||
/// <summary>
|
||||
/// 焊工一次合格率低于96%预警
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetWelderOnePassRateWarning(string projectId)
|
||||
{
|
||||
|
||||
string strSql = @"SELECT welder.ProjectId, welder.WelderCode, welder.PersonName,
|
||||
string strSql = @"SELECT welder.ProjectId, welder.WelderCode, welder.PersonName,
|
||||
CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(oneCheck.OneCheckJotNum,0) WHEN 0 THEN 0
|
||||
ELSE 100.0 * (ISNULL(oneCheck.OneCheckJotNum,0)-ISNULL(oneCheckRepair.oneCheckRepairJotNum,0))/(1.0 * oneCheck.OneCheckJotNum) END) AS DECIMAL(8,1))))+'%' AS passRate
|
||||
FROM SitePerson_Person AS welder
|
||||
|
@ -214,266 +215,269 @@ namespace BLL
|
|||
AND (CAST((CASE ISNULL(oneCheck.OneCheckJotNum,0) WHEN 0 THEN 0
|
||||
ELSE 100.0 * (ISNULL(oneCheck.OneCheckJotNum,0)-ISNULL(oneCheckRepair.oneCheckRepairJotNum,0))/(1.0 * oneCheck.OneCheckJotNum) END) AS DECIMAL(8,1)))<=96";
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
|
||||
strSql += " AND welder.ProjectId=@ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", projectId));
|
||||
strSql += " AND welder.ProjectId=@ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", projectId));
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
List<Model.BaseInfoItem> warnWelder = new List<Model.BaseInfoItem>();
|
||||
List<Model.BaseInfoItem> warnWelder = new List<Model.BaseInfoItem>();
|
||||
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
Model.BaseInfoItem item = new Model.BaseInfoItem();
|
||||
item.BaseInfoCode = row["WelderCode"].ToString();
|
||||
item.BaseInfoName = "一次合格率:" + row["passRate"].ToString();
|
||||
warnWelder.Add(item);
|
||||
}
|
||||
|
||||
return warnWelder;
|
||||
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
Model.BaseInfoItem item = new Model.BaseInfoItem();
|
||||
item.BaseInfoCode = row["WelderCode"].ToString();
|
||||
item.BaseInfoName = "一次合格率:" + row["passRate"].ToString();
|
||||
warnWelder.Add(item);
|
||||
}
|
||||
|
||||
return warnWelder;
|
||||
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
#region 根据焊口ID获取焊口信息和焊接信息
|
||||
/// <summary>
|
||||
/// 根据焊口ID获取焊口信息和焊接信息
|
||||
/// </summary>
|
||||
/// <param name="weldJointId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.JointCompreInfoItem GetJointCompreInfo(string weldJointId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
#region 根据焊口ID获取焊口信息和焊接信息
|
||||
/// <summary>
|
||||
/// 根据焊口ID获取焊口信息和焊接信息
|
||||
/// </summary>
|
||||
/// <param name="weldJointId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.JointCompreInfoItem GetJointCompreInfo(string weldJointId)
|
||||
{
|
||||
var getDateInfo = from x in db.View_HJGL_WeldJoint
|
||||
where x.WeldJointId == weldJointId
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getDateInfo = from x in db.View_HJGL_WeldJoint
|
||||
where x.WeldJointId == weldJointId
|
||||
|
||||
select new Model.JointCompreInfoItem
|
||||
{
|
||||
WeldJointCode = x.WeldJointCode,
|
||||
PipelineCode = x.PipelineCode,
|
||||
PipingClass = x.PipingClassCode,
|
||||
Medium = x.MediumCode,
|
||||
DetectionType = x.DetectionTypeCode,
|
||||
WeldType = x.WeldTypeCode,
|
||||
Material = x.MaterialCode,
|
||||
JointArea = x.JointArea,
|
||||
JointAttribute = x.JointAttribute,
|
||||
WeldingMode = x.WeldingMode,
|
||||
Size = x.Size,
|
||||
Dia = x.Dia,
|
||||
Thickness = x.Thickness,
|
||||
Specification = x.Specification,
|
||||
WeldingMethodCode = x.WeldingMethodCode,
|
||||
GrooveType = x.GrooveTypeCode,
|
||||
WeldingLocation = x.WeldingLocationCode,
|
||||
WeldingWire = x.WeldingWireCode,
|
||||
WeldingRod = x.WeldingRodCode,
|
||||
IsHotProess = x.IsHotProessStr,
|
||||
WelderCode = x.WelderCode,
|
||||
WeldingDate = x.WeldingDate,
|
||||
WeldingDailyCode = x.WeldingDailyCode,
|
||||
PointBatchCode = x.PointBatchCode,
|
||||
IsPoint = x.IsPoint
|
||||
select new Model.JointCompreInfoItem
|
||||
{
|
||||
WeldJointCode = x.WeldJointCode,
|
||||
PipelineCode = x.PipelineCode,
|
||||
PipingClass = x.PipingClassCode,
|
||||
Medium = x.MediumCode,
|
||||
DetectionType = x.DetectionTypeCode,
|
||||
WeldType = x.WeldTypeCode,
|
||||
Material = x.MaterialCode,
|
||||
JointArea = x.JointArea,
|
||||
JointAttribute = x.JointAttribute,
|
||||
WeldingMode = x.WeldingMode,
|
||||
Size = x.Size,
|
||||
Dia = x.Dia,
|
||||
Thickness = x.Thickness,
|
||||
Specification = x.Specification,
|
||||
WeldingMethodCode = x.WeldingMethodCode,
|
||||
GrooveType = x.GrooveTypeCode,
|
||||
WeldingLocation = x.WeldingLocationCode,
|
||||
WeldingWire = x.WeldingWireCode,
|
||||
WeldingRod = x.WeldingRodCode,
|
||||
IsHotProess = x.IsHotProessStr,
|
||||
WelderCode = x.WelderCode,
|
||||
WeldingDate = x.WeldingDate,
|
||||
WeldingDailyCode = x.WeldingDailyCode,
|
||||
PointBatchCode = x.PointBatchCode,
|
||||
IsPoint = x.IsPoint
|
||||
|
||||
};
|
||||
return getDateInfo.FirstOrDefault();
|
||||
};
|
||||
return getDateInfo.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 多维度查询报表
|
||||
/// <summary>
|
||||
/// 多维度查询报表
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="unitId"></param>
|
||||
/// <param name="unitWorkId"></param>
|
||||
/// <param name="pipeLineId"></param>
|
||||
/// <param name="material"></param>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.ReportQueryItem> GetReportQueryByRequir(string projectId,string unitId,string unitWorkId, string pipeLineId, string material, string startTime,string endTime)
|
||||
{
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@projectId", projectId));
|
||||
|
||||
if (!string.IsNullOrEmpty(pipeLineId))
|
||||
#region 多维度查询报表
|
||||
/// <summary>
|
||||
/// 多维度查询报表
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="unitId"></param>
|
||||
/// <param name="unitWorkId"></param>
|
||||
/// <param name="pipeLineId"></param>
|
||||
/// <param name="material"></param>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.ReportQueryItem> GetReportQueryByRequir(string projectId, string unitId, string unitWorkId, string pipeLineId, string material, string startTime, string endTime)
|
||||
{
|
||||
listStr.Add(new SqlParameter("@pipeLineId", pipeLineId));
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@unitWorkId", unitWorkId));
|
||||
}
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@projectId", projectId));
|
||||
|
||||
else if (!string.IsNullOrEmpty(unitId) && string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@unitId", unitId));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@pipeLineId", pipeLineId));
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@unitWorkId", unitWorkId));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(material))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@material", material));
|
||||
}
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@material", null));
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(unitId) && string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@unitId", unitId));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(startTime))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@startTime", Convert.ToDateTime(startTime)));
|
||||
}
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@startTime", null));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(material))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@material", material));
|
||||
}
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@material", null));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(endTime))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@endTime", Convert.ToDateTime(endTime)));
|
||||
if (!string.IsNullOrEmpty(startTime))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@startTime", Convert.ToDateTime(startTime)));
|
||||
}
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@startTime", null));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(endTime))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@endTime", Convert.ToDateTime(endTime)));
|
||||
}
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@endTime", null));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
|
||||
DataTable dt = null;
|
||||
if (string.IsNullOrEmpty(unitId) && string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
dt = SQLHelper.GetDataTableRunProc("sp_ReportQueryByProject", parameter);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitId) && string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
dt = SQLHelper.GetDataTableRunProc("sp_ReportQueryByUnit", parameter);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
dt = SQLHelper.GetDataTableRunProc("sp_ReportQueryByUnitWork", parameter);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
dt = SQLHelper.GetDataTableRunProc("sp_ReportQueryByPipeLine", parameter);
|
||||
}
|
||||
|
||||
List<Model.ReportQueryItem> reportList = new List<Model.ReportQueryItem>();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
string totalJot = row["TotalJot"].ToString();
|
||||
string totalDin = row["TotalDin"].ToString();
|
||||
string weldedJot = row["weldedJot"].ToString();
|
||||
string weldedDin = row["weldedDin"].ToString();
|
||||
string oneCheckJotNum = row["OneCheckJotNum"].ToString();
|
||||
string oneCheckRepairJotNum = row["OneCheckRepairJotNum"].ToString();
|
||||
string expandJotNum = row["OneExpandJotNum"].ToString();
|
||||
|
||||
Model.ReportQueryItem report = new Model.ReportQueryItem();
|
||||
|
||||
string code = string.Empty;
|
||||
int mustCheckJotNum = 0;
|
||||
if (string.IsNullOrEmpty(unitId) && string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
mustCheckJotNum = GetMustCheckJotNum("1", row["ProjectId"].ToString());
|
||||
code = row["ProjectCode"].ToString();
|
||||
report.ProjectCode = row["ProjectCode"].ToString();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitId) && string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
mustCheckJotNum = GetMustCheckJotNum("2", row["UnitId"].ToString());
|
||||
report.CUnit = row["UnitCode"].ToString();
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
mustCheckJotNum = GetMustCheckJotNum("3", row["UnitWorkId"].ToString());
|
||||
report.UnitWork = row["UnitWorkCode"].ToString();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
mustCheckJotNum = GetMustCheckJotNum("4", row["PipelineId"].ToString());
|
||||
report.PipeLine = row["PipelineCode"].ToString();
|
||||
}
|
||||
|
||||
|
||||
string weldingRate = "0.0%";
|
||||
if (totalJot != "0")
|
||||
{
|
||||
weldingRate = (Convert.ToInt32(weldedJot) * 100.0 / Convert.ToInt32(totalJot)).ToString() + "%";
|
||||
}
|
||||
|
||||
string weldingOnePassRate = "0.0%";
|
||||
if (oneCheckJotNum != "0")
|
||||
{
|
||||
weldingOnePassRate = ((Convert.ToInt32(oneCheckJotNum) - Convert.ToInt32(oneCheckRepairJotNum)) * 100.0 / Convert.ToInt32(oneCheckJotNum)).ToString() + "%";
|
||||
}
|
||||
|
||||
string checkCompRate = "0.0%";
|
||||
if (mustCheckJotNum != 0)
|
||||
{
|
||||
checkCompRate = (Convert.ToInt32(oneCheckJotNum) * 100.0 / mustCheckJotNum).ToString() + "%";
|
||||
}
|
||||
|
||||
report.TotalJotDin = totalJot + "/" + totalDin;
|
||||
report.WeldedJotDin = weldedJot + "/" + weldedDin;
|
||||
report.WeldingRate = weldingRate;
|
||||
report.WeldingOnePassRate = weldingOnePassRate;
|
||||
|
||||
report.MustCheckJotNum = mustCheckJotNum.ToString();
|
||||
report.CheckedJotNum = oneCheckJotNum;
|
||||
report.CheckCompRate = checkCompRate;
|
||||
report.RepairJotNum = oneCheckRepairJotNum;
|
||||
report.ExpandJotNum = expandJotNum;
|
||||
|
||||
reportList.Add(report);
|
||||
}
|
||||
|
||||
return reportList;
|
||||
}
|
||||
else
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 获取应检测焊口数
|
||||
/// </summary>
|
||||
/// <param name="flag">1-施工单位,2-单位工程,3-管线</param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
private static int GetMustCheckJotNum(string flag, string id)
|
||||
{
|
||||
listStr.Add(new SqlParameter("@endTime", null));
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
int num = 0;
|
||||
List<Model.HJGL_Pipeline> pipeList = null;
|
||||
if (flag == "1")
|
||||
{
|
||||
pipeList = (from x in db.HJGL_Pipeline where x.ProjectId == id select x).ToList();
|
||||
}
|
||||
if (flag == "2")
|
||||
{
|
||||
pipeList = (from x in db.HJGL_Pipeline where x.UnitId == id select x).ToList();
|
||||
}
|
||||
if (flag == "3")
|
||||
{
|
||||
pipeList = (from x in db.HJGL_Pipeline where x.UnitWorkId == id select x).ToList();
|
||||
}
|
||||
if (flag == "4")
|
||||
{
|
||||
pipeList = (from x in db.HJGL_Pipeline where x.PipelineId == id select x).ToList();
|
||||
}
|
||||
|
||||
foreach (var pipe in pipeList)
|
||||
{
|
||||
var rate = db.Base_DetectionRate.FirstOrDefault(e => e.DetectionRateId == pipe.DetectionRateId);
|
||||
int jointNum = (from x in db.HJGL_WeldJoint where x.PipelineId == pipe.PipelineId select x).Count();
|
||||
int DetectionRateValue = int.Parse(rate.DetectionRateValue);
|
||||
decimal n = Convert.ToDecimal(1.0 * jointNum * DetectionRateValue / 100);
|
||||
num = num + Convert.ToInt32(Math.Ceiling(n));
|
||||
}
|
||||
return num;
|
||||
}
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
|
||||
DataTable dt = null;
|
||||
if (string.IsNullOrEmpty(unitId) && string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
dt = SQLHelper.GetDataTableRunProc("sp_ReportQueryByProject", parameter);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitId) && string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
dt = SQLHelper.GetDataTableRunProc("sp_ReportQueryByUnit", parameter);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
dt = SQLHelper.GetDataTableRunProc("sp_ReportQueryByUnitWork", parameter);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
dt = SQLHelper.GetDataTableRunProc("sp_ReportQueryByPipeLine", parameter);
|
||||
}
|
||||
|
||||
List<Model.ReportQueryItem> reportList = new List<Model.ReportQueryItem>();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
string totalJot = row["TotalJot"].ToString();
|
||||
string totalDin = row["TotalDin"].ToString();
|
||||
string weldedJot = row["weldedJot"].ToString();
|
||||
string weldedDin = row["weldedDin"].ToString();
|
||||
string oneCheckJotNum = row["OneCheckJotNum"].ToString();
|
||||
string oneCheckRepairJotNum = row["OneCheckRepairJotNum"].ToString();
|
||||
string expandJotNum = row["OneExpandJotNum"].ToString();
|
||||
|
||||
Model.ReportQueryItem report = new Model.ReportQueryItem();
|
||||
|
||||
string code = string.Empty;
|
||||
int mustCheckJotNum = 0;
|
||||
if (string.IsNullOrEmpty(unitId) && string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
mustCheckJotNum = GetMustCheckJotNum("1", row["ProjectId"].ToString());
|
||||
code = row["ProjectCode"].ToString();
|
||||
report.ProjectCode = row["ProjectCode"].ToString();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitId) && string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
mustCheckJotNum = GetMustCheckJotNum("2", row["UnitId"].ToString());
|
||||
report.CUnit = row["UnitCode"].ToString();
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitWorkId) && string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
mustCheckJotNum = GetMustCheckJotNum("3", row["UnitWorkId"].ToString());
|
||||
report.UnitWork = row["UnitWorkCode"].ToString();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pipeLineId))
|
||||
{
|
||||
mustCheckJotNum = GetMustCheckJotNum("4", row["PipelineId"].ToString());
|
||||
report.PipeLine = row["PipelineCode"].ToString();
|
||||
}
|
||||
|
||||
|
||||
string weldingRate = "0.0%";
|
||||
if (totalJot != "0")
|
||||
{
|
||||
weldingRate = (Convert.ToInt32(weldedJot) * 100.0 / Convert.ToInt32(totalJot)).ToString() + "%";
|
||||
}
|
||||
|
||||
string weldingOnePassRate = "0.0%";
|
||||
if (oneCheckJotNum != "0")
|
||||
{
|
||||
weldingOnePassRate=((Convert.ToInt32(oneCheckJotNum)-Convert.ToInt32(oneCheckRepairJotNum))*100.0/ Convert.ToInt32(oneCheckJotNum)).ToString() + "%";
|
||||
}
|
||||
|
||||
string checkCompRate = "0.0%";
|
||||
if (mustCheckJotNum != 0)
|
||||
{
|
||||
checkCompRate = (Convert.ToInt32(oneCheckJotNum) * 100.0 / mustCheckJotNum).ToString() + "%";
|
||||
}
|
||||
|
||||
report.TotalJotDin = totalJot + "/" + totalDin;
|
||||
report.WeldedJotDin = weldedJot + "/" + weldedDin;
|
||||
report.WeldingRate = weldingRate;
|
||||
report.WeldingOnePassRate = weldingOnePassRate;
|
||||
|
||||
report.MustCheckJotNum = mustCheckJotNum.ToString();
|
||||
report.CheckedJotNum = oneCheckJotNum;
|
||||
report.CheckCompRate = checkCompRate;
|
||||
report.RepairJotNum = oneCheckRepairJotNum;
|
||||
report.ExpandJotNum = expandJotNum;
|
||||
|
||||
reportList.Add(report);
|
||||
}
|
||||
|
||||
return reportList;
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 获取应检测焊口数
|
||||
/// </summary>
|
||||
/// <param name="flag">1-施工单位,2-单位工程,3-管线</param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
private static int GetMustCheckJotNum(string flag, string id)
|
||||
{
|
||||
int num = 0;
|
||||
List<Model.HJGL_Pipeline> pipeList = null;
|
||||
if (flag == "1")
|
||||
{
|
||||
pipeList = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == id select x).ToList();
|
||||
}
|
||||
if (flag == "2")
|
||||
{
|
||||
pipeList = (from x in Funs.DB.HJGL_Pipeline where x.UnitId == id select x).ToList();
|
||||
}
|
||||
if (flag == "3")
|
||||
{
|
||||
pipeList = (from x in Funs.DB.HJGL_Pipeline where x.UnitWorkId == id select x).ToList();
|
||||
}
|
||||
if (flag == "4")
|
||||
{
|
||||
pipeList = (from x in Funs.DB.HJGL_Pipeline where x.PipelineId == id select x).ToList();
|
||||
}
|
||||
|
||||
foreach (var pipe in pipeList)
|
||||
{
|
||||
var rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(pipe.DetectionRateId);
|
||||
int jointNum = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == pipe.PipelineId select x).Count();
|
||||
int DetectionRateValue = int.Parse(rate.DetectionRateValue);
|
||||
decimal n = Convert.ToDecimal(1.0 * jointNum * DetectionRateValue / 100);
|
||||
num = num + Convert.ToInt32(Math.Ceiling(n));
|
||||
}
|
||||
return num;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,9 +99,9 @@ namespace BLL
|
|||
CheckTime = string.Format("{0:yyyy-MM-dd}", x.CheckTime),
|
||||
DaySummary = x.DaySummary,
|
||||
PartInUnitIds = x.PartInUnits,
|
||||
PartInUnitNames = UnitService.getUnitNamesUnitIds(x.PartInUnits),
|
||||
PartInUnitNames = UnitService.getUnitNamesUnitIdsForApi (x.PartInUnits),
|
||||
PartInPersonIds = x.PartInPersonIds,
|
||||
PartInPersonNames = UserService.getUserNamesUserIds(x.PartInPersonIds),
|
||||
PartInPersonNames = UserService.getUserNamesUserIdsForApi(x.PartInPersonIds),
|
||||
PartInPersonNames2 = x.PartInPersonNames,
|
||||
CompileManId = x.CompileMan,
|
||||
CompileManName = db.Sys_User.First(u => u.UserId == x.CompileMan).UserName,
|
||||
|
@ -159,7 +159,7 @@ namespace BLL
|
|||
DaySummary = System.Web.HttpUtility.HtmlEncode(newItem.DaySummary),
|
||||
PartInUnits = newItem.PartInUnitIds,
|
||||
PartInPersonIds = newItem.PartInPersonIds,
|
||||
PartInPersons = UserService.getUserNamesUserIds(newItem.PartInPersonIds),
|
||||
PartInPersons = UserService.getUserNamesUserIdsForApi(newItem.PartInPersonIds),
|
||||
PartInPersonNames = newItem.PartInPersonNames2,
|
||||
CompileMan = newItem.CompileManId,
|
||||
States = Const.State_0,
|
||||
|
@ -194,22 +194,22 @@ namespace BLL
|
|||
db.Check_CheckSpecial.InsertOnSubmit(newCheckSpecial);
|
||||
db.SubmitChanges();
|
||||
////增加一条编码记录
|
||||
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectCheckSpecialMenuId, newCheckSpecial.ProjectId, null, newCheckSpecial.CheckSpecialId, newCheckSpecial.CheckTime);
|
||||
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(BLL.Const.ProjectCheckSpecialMenuId, newCheckSpecial.ProjectId, null, newCheckSpecial.CheckSpecialId, newCheckSpecial.CheckTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
Check_CheckSpecialService.UpdateCheckSpecial(newCheckSpecial);
|
||||
Check_CheckSpecialService.UpdateCheckSpecialForApi(newCheckSpecial);
|
||||
//// 删除专项检查明细项
|
||||
Check_CheckSpecialDetailService.DeleteCheckSpecialDetails(newCheckSpecial.CheckSpecialId);
|
||||
Check_CheckSpecialDetailService.DeleteCheckSpecialDetailsForApi(newCheckSpecial.CheckSpecialId);
|
||||
}
|
||||
////保存附件
|
||||
if (!string.IsNullOrEmpty(newItem.AttachUrl1))
|
||||
{
|
||||
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(newItem.AttachUrl1, 10, null), newItem.AttachUrl1, Const.ProjectCheckSpecialMenuId, newCheckSpecial.CheckSpecialId);
|
||||
UploadFileService.SaveAttachUrlForApi(UploadFileService.GetSourceByAttachUrl(newItem.AttachUrl1, 10, null), newItem.AttachUrl1, Const.ProjectCheckSpecialMenuId, newCheckSpecial.CheckSpecialId);
|
||||
}
|
||||
else
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Const.ProjectCheckSpecialMenuId, newCheckSpecial.CheckSpecialId);
|
||||
CommonService.DeleteAttachFileByIdForApi(Const.ProjectCheckSpecialMenuId, newCheckSpecial.CheckSpecialId);
|
||||
}
|
||||
|
||||
///// 新增检查项
|
||||
|
@ -227,7 +227,7 @@ namespace BLL
|
|||
if (getC == null)
|
||||
{
|
||||
newCheckSpecial.States = Const.State_2;
|
||||
Check_CheckSpecialService.UpdateCheckSpecial(newCheckSpecial);
|
||||
Check_CheckSpecialService.UpdateCheckSpecialForApi(newCheckSpecial);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -235,7 +235,7 @@ namespace BLL
|
|||
var detailLists = db.Check_CheckSpecialDetail.Where(x => x.CheckSpecialId == newCheckSpecial.CheckSpecialId && x.CompleteStatus == false);
|
||||
if (detailLists.Count() > 0)
|
||||
{
|
||||
message = Check_CheckSpecialService.IssueRectification(detailLists.ToList(), newCheckSpecial);
|
||||
message = Check_CheckSpecialService.IssueRectificationForApi(detailLists.ToList(), newCheckSpecial);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -123,15 +123,15 @@ namespace BLL
|
|||
newConstructSolution.CompileDate = DateTime.Now;
|
||||
newConstructSolution.ConstructSolutionId = SQLHelper.GetNewID();
|
||||
newConstructSolution.ConstructSolutionCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectConstructSolutionMenuId, newConstructSolution.ProjectId, newConstructSolution.UnitId);
|
||||
ConstructSolutionService.AddConstructSolution(newConstructSolution);
|
||||
ConstructSolutionService.AddConstructSolutionForApi(newConstructSolution);
|
||||
}
|
||||
else
|
||||
{
|
||||
ConstructSolutionService.UpdateConstructSolution(newConstructSolution);
|
||||
ConstructSolutionService.UpdateConstructSolutionForApi(newConstructSolution);
|
||||
}
|
||||
if (newConstructSolution.States == "1")
|
||||
{
|
||||
CommonService.btnSaveData(newConstructSolution.ProjectId, Const.ProjectConstructSolutionMenuId, newConstructSolution.ConstructSolutionId, newConstructSolution.CompileMan, true, newConstructSolution.CompileManName, "../Solution/ConstructSolutionView.aspx?ConstructSolutionId={0}");
|
||||
CommonService.btnSaveDataForApi(newConstructSolution.ProjectId, Const.ProjectConstructSolutionMenuId, newConstructSolution.ConstructSolutionId, newConstructSolution.CompileMan, true, newConstructSolution.CompileManName, "../Solution/ConstructSolutionView.aspx?ConstructSolutionId={0}");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(newItem.AttachUrl))
|
||||
{
|
||||
|
@ -140,7 +140,7 @@ namespace BLL
|
|||
}
|
||||
else
|
||||
{
|
||||
CommonService.DeleteAttachFileById(newConstructSolution.ConstructSolutionId);
|
||||
CommonService.DeleteAttachFileByIdForApi(newConstructSolution.ConstructSolutionId);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -307,7 +307,7 @@ namespace BLL
|
|||
db.Emergency_EmergencyList.InsertOnSubmit(newEmergency);
|
||||
db.SubmitChanges();
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectEmergencyListMenuId, newEmergency.ProjectId, null, newEmergency.EmergencyListId, newEmergency.CompileDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectEmergencyListMenuId, newEmergency.ProjectId, null, newEmergency.EmergencyListId, newEmergency.CompileDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -322,7 +322,7 @@ namespace BLL
|
|||
}
|
||||
if (emergencyInfo.States == Const.State_1)
|
||||
{
|
||||
CommonService.btnSaveData(newEmergency.ProjectId, Const.ProjectEmergencyListMenuId, newEmergency.EmergencyListId, newEmergency.CompileMan, true, newEmergency.EmergencyName, "../Emergency/EmergencyListView.aspx?EmergencyListId={0}");
|
||||
CommonService.btnSaveDataForApi(newEmergency.ProjectId, Const.ProjectEmergencyListMenuId, newEmergency.EmergencyListId, newEmergency.CompileMan, true, newEmergency.EmergencyName, "../Emergency/EmergencyListView.aspx?EmergencyListId={0}");
|
||||
}
|
||||
|
||||
menuId = Const.ProjectEmergencyListMenuId;
|
||||
|
@ -366,7 +366,7 @@ namespace BLL
|
|||
}
|
||||
if (emergencyInfo.States == Const.State_1)
|
||||
{
|
||||
CommonService.btnSaveData(newEmergency.ProjectId, Const.ProjectEmergencySupplyMenuId, newEmergency.FileId, newEmergency.CompileMan, true, newEmergency.FileName, "../Emergency/EmergencySupplyView.aspx?FileId={0}");
|
||||
CommonService.btnSaveDataForApi(newEmergency.ProjectId, Const.ProjectEmergencySupplyMenuId, newEmergency.FileId, newEmergency.CompileMan, true, newEmergency.FileName, "../Emergency/EmergencySupplyView.aspx?FileId={0}");
|
||||
}
|
||||
menuId = Const.ProjectEmergencySupplyMenuId;
|
||||
}
|
||||
|
@ -435,7 +435,7 @@ namespace BLL
|
|||
|
||||
if (emergencyInfo.States == Const.State_1)
|
||||
{
|
||||
CommonService.btnSaveData(newEmergency.ProjectId, Const.ProjectEmergencyTeamAndTrainMenuId, newEmergency.FileId, newEmergency.CompileMan, true, newEmergency.FileName, "../Emergency/EmergencyTeamAndTrainView.aspx?FileId={0}");
|
||||
CommonService.btnSaveDataForApi(newEmergency.ProjectId, Const.ProjectEmergencyTeamAndTrainMenuId, newEmergency.FileId, newEmergency.CompileMan, true, newEmergency.FileName, "../Emergency/EmergencyTeamAndTrainView.aspx?FileId={0}");
|
||||
}
|
||||
menuId = Const.ProjectEmergencyTeamAndTrainMenuId;
|
||||
}
|
||||
|
@ -567,7 +567,7 @@ namespace BLL
|
|||
Model.BaseInfoItem newItem = new Model.BaseInfoItem
|
||||
{
|
||||
BaseInfoId = teamItem.PersonId,
|
||||
BaseInfoName = BLL.PersonService.GetPersonNameById(teamItem.PersonId),
|
||||
BaseInfoName = BLL.PersonService.GetPersonNameByIdForApi(teamItem.PersonId),
|
||||
BaseInfoCode = teamItem.Tel,
|
||||
Remark = teamItem.Job,
|
||||
RemarkOther = "1",
|
||||
|
|
|
@ -131,20 +131,20 @@ namespace BLL
|
|||
newEquipmentQuality.CompileDate = DateTime.Now;
|
||||
newEquipmentQuality.EquipmentQualityId = SQLHelper.GetNewID();
|
||||
newEquipmentQuality.EquipmentQualityCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.EquipmentQualityMenuId, newEquipmentQuality.ProjectId, newEquipmentQuality.UnitId);
|
||||
EquipmentQualityService.AddEquipmentQuality(newEquipmentQuality);
|
||||
EquipmentQualityService.AddEquipmentQualityForApi(newEquipmentQuality);
|
||||
}
|
||||
else
|
||||
{
|
||||
EquipmentQualityService.UpdateEquipmentQuality(newEquipmentQuality);
|
||||
EquipmentQualityService.UpdateEquipmentQualityForApi(newEquipmentQuality);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(newItem.AttachUrl))
|
||||
{
|
||||
////保存附件
|
||||
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(newItem.AttachUrl, 10, null), newItem.AttachUrl, Const.EquipmentQualityMenuId, newEquipmentQuality.EquipmentQualityId);
|
||||
UploadFileService.SaveAttachUrlForApi(UploadFileService.GetSourceByAttachUrl(newItem.AttachUrl, 10, null), newItem.AttachUrl, Const.EquipmentQualityMenuId, newEquipmentQuality.EquipmentQualityId);
|
||||
}
|
||||
else
|
||||
{
|
||||
CommonService.DeleteAttachFileById(newEquipmentQuality.EquipmentQualityId);
|
||||
CommonService.DeleteAttachFileByIdForApi(newEquipmentQuality.EquipmentQualityId);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
var getFlowOperteList = ReturnFlowOperteList(projectId, userId, getDiaryDate.Value);
|
||||
getItem.ProjectId = projectId;
|
||||
getItem.UserId = userId;
|
||||
getItem.UserName = UserService.GetUserNameByUserId(userId);
|
||||
getItem.UserName = UserService.GetUserNameByUserIdForApi(userId);
|
||||
getItem.DiaryDate = diaryDate;
|
||||
getItem.HSEDiaryId = SQLHelper.GetNewID();
|
||||
getItem.Value1 = getValues1(getFlowOperteList, projectId, userId, getDiaryDate.Value);
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace BLL
|
|||
CompileManName = db.Sys_User.First(u => u.UserId == x.CompileMan).UserName,
|
||||
CompileDate = string.Format("{0:yyyy-MM-dd}", x.CompileDate),
|
||||
WorkStageIds = x.WorkStage,
|
||||
WorkStageNames = WorkStageService.getWorkStageNamesWorkStageIds(x.WorkStage),
|
||||
WorkStageNames = WorkStageService.getWorkStageNamesWorkStageIdsForApi(x.WorkStage),
|
||||
Contents = x.Contents,
|
||||
WorkAreaName = x.WorkAreaName,
|
||||
IdentificationDate = string.Format("{0:yyyy-MM-dd}", x.IdentificationDate),
|
||||
|
@ -68,7 +68,7 @@ namespace BLL
|
|||
CompileManName = db.Sys_User.First(u => u.UserId == x.CompileMan).UserName,
|
||||
CompileDate = string.Format("{0:yyyy-MM-dd}", x.CompileDate),
|
||||
WorkStageIds = x.WorkStage,
|
||||
WorkStageNames = WorkStageService.getWorkStageNamesWorkStageIds(x.WorkStage),
|
||||
WorkStageNames = WorkStageService.getWorkStageNamesWorkStageIdsForApi(x.WorkStage),
|
||||
Contents = x.Contents,
|
||||
WorkAreaName = x.WorkAreaName,
|
||||
IdentificationDate = string.Format("{0:yyyy-MM-dd}", x.IdentificationDate),
|
||||
|
@ -98,7 +98,7 @@ namespace BLL
|
|||
select new Model.HazardListSelectedItem
|
||||
{
|
||||
HazardId = x.HazardId,
|
||||
WorkStageName = WorkStageService.getWorkStageNamesWorkStageIds(x.WorkStage),
|
||||
WorkStageName = WorkStageService.getWorkStageNamesWorkStageIdsForApi(x.WorkStage),
|
||||
SupHazardListTypeName = db.Technique_HazardListType.First(z => z.HazardListTypeId == y.SupHazardListTypeId).HazardListTypeName,
|
||||
HazardListTypeName = y.HazardListTypeName,
|
||||
HazardCode = y.HazardListTypeCode,
|
||||
|
|
|
@ -162,7 +162,7 @@ namespace BLL
|
|||
newIncentiveNotice.CompileDate = DateTime.Now;
|
||||
newIncentiveNotice.IncentiveNoticeId = SQLHelper.GetNewID();
|
||||
newIncentiveNotice.IncentiveNoticeCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectIncentiveNoticeMenuId, newIncentiveNotice.ProjectId, newIncentiveNotice.UnitId);
|
||||
IncentiveNoticeService.AddIncentiveNotice(newIncentiveNotice);
|
||||
IncentiveNoticeService.AddIncentiveNoticeForApi(newIncentiveNotice);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -261,7 +261,7 @@ namespace BLL
|
|||
}
|
||||
if (newIncentiveNotice.States == "1" || newIncentiveNotice.States == "0")
|
||||
{
|
||||
CommonService.btnSaveData(newIncentiveNotice.ProjectId, Const.ProjectIncentiveNoticeMenuId, newIncentiveNotice.IncentiveNoticeId, newIncentiveNotice.CompileMan, true, newIncentiveNotice.IncentiveNoticeCode, "../Check/IncentiveNoticeView.aspx?IncentiveNoticeId={0}");
|
||||
CommonService.btnSaveDataForApi(newIncentiveNotice.ProjectId, Const.ProjectIncentiveNoticeMenuId, newIncentiveNotice.IncentiveNoticeId, newIncentiveNotice.CompileMan, true, newIncentiveNotice.IncentiveNoticeCode, "../Check/IncentiveNoticeView.aspx?IncentiveNoticeId={0}");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -531,7 +531,7 @@ namespace BLL
|
|||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
if (!ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(projectId, unitId))
|
||||
if (!ProjectUnitService.GetProjectUnitTypeByProjectIdUnitIdForApi(projectId, unitId))
|
||||
{
|
||||
unitId = null;
|
||||
}
|
||||
|
@ -993,7 +993,7 @@ namespace BLL
|
|||
ApplyManId = x.CompileMan,
|
||||
ApplyManName = x.ApplicantMan,
|
||||
ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.CompileDate),
|
||||
WorkPalce = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
|
||||
WorkPalce = UnitWorkService.GetUnitWorkNameForApi(x.WorkAreaId),
|
||||
ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.StartDate),
|
||||
ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.EndDate),
|
||||
States = x.WorkStates,
|
||||
|
@ -1384,7 +1384,7 @@ namespace BLL
|
|||
ApplyUnitName = db.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName,
|
||||
ApplyManName = x.ApplicantMan,
|
||||
ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.CompileDate),
|
||||
WorkPalce = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
|
||||
WorkPalce = UnitWorkService.GetUnitWorkNameForApi(x.WorkAreaId),
|
||||
ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.StartDate),
|
||||
ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.EndDate),
|
||||
States = x.WorkStates,
|
||||
|
@ -1534,7 +1534,7 @@ namespace BLL
|
|||
newItem.LicenseCode = newFireWork.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectFireWorkMenuId, newFireWork.ProjectId, newFireWork.ApplyUnitId);
|
||||
db.License_FireWork.InsertOnSubmit(newFireWork);
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectFireWorkMenuId, newFireWork.ProjectId, newFireWork.ApplyUnitId, newFireWork.FireWorkId, newFireWork.ApplyDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectFireWorkMenuId, newFireWork.ProjectId, newFireWork.ApplyUnitId, newFireWork.FireWorkId, newFireWork.ApplyDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1619,7 +1619,7 @@ namespace BLL
|
|||
db.License_HeightWork.InsertOnSubmit(newHeightWork);
|
||||
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectHeightWorkMenuId, newHeightWork.ProjectId, newHeightWork.ApplyUnitId, newHeightWork.HeightWorkId, newHeightWork.ApplyDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectHeightWorkMenuId, newHeightWork.ProjectId, newHeightWork.ApplyUnitId, newHeightWork.HeightWorkId, newHeightWork.ApplyDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1701,7 +1701,7 @@ namespace BLL
|
|||
newItem.LicenseCode = newLimitedSpace.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectLimitedSpaceMenuId, newLimitedSpace.ProjectId, newLimitedSpace.ApplyUnitId);
|
||||
db.License_LimitedSpace.InsertOnSubmit(newLimitedSpace);
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectLimitedSpaceMenuId, newLimitedSpace.ProjectId, newLimitedSpace.ApplyUnitId, newLimitedSpace.LimitedSpaceId, newLimitedSpace.ApplyDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectLimitedSpaceMenuId, newLimitedSpace.ProjectId, newLimitedSpace.ApplyUnitId, newLimitedSpace.LimitedSpaceId, newLimitedSpace.ApplyDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1792,7 +1792,7 @@ namespace BLL
|
|||
newItem.LicenseCode = newRadialWork.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectRadialWorkMenuId, newRadialWork.ProjectId, newRadialWork.ApplyUnitId);
|
||||
db.License_RadialWork.InsertOnSubmit(newRadialWork);
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectRadialWorkMenuId, newRadialWork.ProjectId, newRadialWork.ApplyUnitId, newRadialWork.RadialWorkId, newRadialWork.ApplyDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectRadialWorkMenuId, newRadialWork.ProjectId, newRadialWork.ApplyUnitId, newRadialWork.RadialWorkId, newRadialWork.ApplyDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1877,7 +1877,7 @@ namespace BLL
|
|||
newItem.LicenseCode = newOpenCircuit.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectOpenCircuitMenuId, newOpenCircuit.ProjectId, newOpenCircuit.ApplyUnitId);
|
||||
db.License_OpenCircuit.InsertOnSubmit(newOpenCircuit);
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectOpenCircuitMenuId, newOpenCircuit.ProjectId, newOpenCircuit.ApplyUnitId, newOpenCircuit.OpenCircuitId, newOpenCircuit.ApplyDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectOpenCircuitMenuId, newOpenCircuit.ProjectId, newOpenCircuit.ApplyUnitId, newOpenCircuit.OpenCircuitId, newOpenCircuit.ApplyDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1958,7 +1958,7 @@ namespace BLL
|
|||
newItem.LicenseCode = newBreakGround.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectBreakGroundMenuId, newBreakGround.ProjectId, newBreakGround.ApplyUnitId);
|
||||
db.License_BreakGround.InsertOnSubmit(newBreakGround);
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectBreakGroundMenuId, newBreakGround.ProjectId, newBreakGround.ApplyUnitId, newBreakGround.BreakGroundId, newBreakGround.ApplyDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectBreakGroundMenuId, newBreakGround.ProjectId, newBreakGround.ApplyUnitId, newBreakGround.BreakGroundId, newBreakGround.ApplyDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2040,7 +2040,7 @@ namespace BLL
|
|||
newItem.LicenseCode = newNightWork.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectNightWorkMenuId, newNightWork.ProjectId, newNightWork.ApplyUnitId);
|
||||
db.License_NightWork.InsertOnSubmit(newNightWork);
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectNightWorkMenuId, newNightWork.ProjectId, newNightWork.ApplyUnitId, newNightWork.NightWorkId, newNightWork.ApplyDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectNightWorkMenuId, newNightWork.ProjectId, newNightWork.ApplyUnitId, newNightWork.NightWorkId, newNightWork.ApplyDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2130,7 +2130,7 @@ namespace BLL
|
|||
newItem.LicenseCode = newLiftingWork.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectLiftingWorkMenuId, newLiftingWork.ProjectId, newLiftingWork.ApplyUnitId);
|
||||
db.License_LiftingWork.InsertOnSubmit(newLiftingWork);
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectLiftingWorkMenuId, newLiftingWork.ProjectId, newLiftingWork.ApplyUnitId, newLiftingWork.LiftingWorkId, newLiftingWork.ApplyDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectLiftingWorkMenuId, newLiftingWork.ProjectId, newLiftingWork.ApplyUnitId, newLiftingWork.LiftingWorkId, newLiftingWork.ApplyDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2214,7 +2214,7 @@ namespace BLL
|
|||
newItem.LicenseCode = newTempElectricity.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectTempElectricityMenuId, newTempElectricity.ProjectId, newTempElectricity.ApplyUnitId);
|
||||
db.License_TempElectricity.InsertOnSubmit(newTempElectricity);
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTempElectricityMenuId, newTempElectricity.ProjectId, newTempElectricity.ApplyUnitId, newTempElectricity.TempElectricityId, newTempElectricity.ApplyDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectTempElectricityMenuId, newTempElectricity.ProjectId, newTempElectricity.ApplyUnitId, newTempElectricity.TempElectricityId, newTempElectricity.ApplyDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2299,7 +2299,7 @@ namespace BLL
|
|||
newItem.LicenseCode = newPressureTest.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectPressureTestMenuId, newPressureTest.ProjectId, newPressureTest.ApplyUnitId);
|
||||
db.License_PressureTest.InsertOnSubmit(newPressureTest);
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTempElectricityMenuId, newPressureTest.ProjectId, newPressureTest.ApplyUnitId, newPressureTest.PressureTestId, newPressureTest.ApplyDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectTempElectricityMenuId, newPressureTest.ProjectId, newPressureTest.ApplyUnitId, newPressureTest.PressureTestId, newPressureTest.ApplyDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2388,7 +2388,7 @@ namespace BLL
|
|||
db.License_JiaBan.InsertOnSubmit(newJiaBan);
|
||||
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectJiaBanWorkMenuId, newJiaBan.ProjectId, newJiaBan.ApplyUnitId, newJiaBan.JiaBanId, newJiaBan.ApplyDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectJiaBanWorkMenuId, newJiaBan.ProjectId, newJiaBan.ApplyUnitId, newJiaBan.JiaBanId, newJiaBan.ApplyDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2469,7 +2469,7 @@ namespace BLL
|
|||
newItem.LicenseCode = newLicenseManager.LicenseManagerCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectLicenseManagerMenuId, newLicenseManager.ProjectId, newLicenseManager.UnitId);
|
||||
db.License_LicenseManager.InsertOnSubmit(newLicenseManager);
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectLicenseManagerMenuId, newLicenseManager.ProjectId, newLicenseManager.UnitId, newLicenseManager.LicenseManagerId, newLicenseManager.CompileDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectLicenseManagerMenuId, newLicenseManager.ProjectId, newLicenseManager.UnitId, newLicenseManager.LicenseManagerId, newLicenseManager.CompileDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2488,7 +2488,7 @@ namespace BLL
|
|||
}
|
||||
if (newLicenseManager.States == Const.State_2)
|
||||
{
|
||||
CommonService.btnSaveData(newLicenseManager.ProjectId, Const.ProjectLicenseManagerMenuId, newLicenseManager.LicenseManagerId, newLicenseManager.CompileMan, true, newLicenseManager.LicenseManagerCode, "../License/LicenseManagerView.aspx?LicenseManagerId={0}");
|
||||
CommonService.btnSaveDataForApi(newLicenseManager.ProjectId, Const.ProjectLicenseManagerMenuId, newLicenseManager.LicenseManagerId, newLicenseManager.CompileMan, true, newLicenseManager.LicenseManagerCode, "../License/LicenseManagerView.aspx?LicenseManagerId={0}");
|
||||
}
|
||||
//// 保存附件
|
||||
APIUpLoadFileService.SaveAttachUrl(newItem.MenuId, strLicenseId, newItem.AttachUrl, "0");
|
||||
|
@ -3744,7 +3744,7 @@ namespace BLL
|
|||
db.License_FlowOperate.DeleteAllOnSubmit(getDelFlows);
|
||||
}
|
||||
//// 删除编码表记录
|
||||
CodeRecordsService.DeleteCodeRecordsByDataId(strLicenseId);
|
||||
CodeRecordsService.DeleteCodeRecordsByDataIdForApi(strLicenseId);
|
||||
#region 动火作业票
|
||||
if (newItem.MenuId == Const.ProjectFireWorkMenuId)
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
AuditFlowName = x.AuditFlowName,
|
||||
SortIndex = x.SortIndex ?? 1,
|
||||
RoleIds = x.RoleIds,
|
||||
RoleNames = RoleService.getRoleNamesRoleIds(x.RoleIds),
|
||||
RoleNames = RoleService.getRoleNamesRoleIdsForApi(x.RoleIds),
|
||||
OperaterId = x.OperaterId,
|
||||
OperaterName = db.Sys_User.First(u => u.UserId == x.OperaterId).UserName,
|
||||
OperaterTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.OperaterTime),
|
||||
|
@ -63,7 +63,7 @@ namespace BLL
|
|||
AuditFlowName = x.AuditFlowName,
|
||||
SortIndex = x.SortIndex ?? 1,
|
||||
RoleIds = x.RoleIds,
|
||||
RoleNames = RoleService.getRoleNamesRoleIds(x.RoleIds),
|
||||
RoleNames = RoleService.getRoleNamesRoleIdsForApi(x.RoleIds),
|
||||
OperaterId = x.OperaterId,
|
||||
OperaterName = db.Sys_User.First(u => u.UserId == x.OperaterId).UserName,
|
||||
OperaterTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.OperaterTime),
|
||||
|
@ -132,43 +132,46 @@ namespace BLL
|
|||
IsSelfRole = item.IsSelfRole
|
||||
};
|
||||
|
||||
LicensePublicService.AddFlowOperate(newFlowOperate);
|
||||
LicensePublicService.AddFlowOperateForApi(newFlowOperate);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 保存作业票-流程审核[State=1]
|
||||
/// <summary>
|
||||
/// 保存作业票-流程审核
|
||||
/// </summary>
|
||||
/// <param name="flowOperate">流程审核集合</param>
|
||||
/// <returns></returns>
|
||||
public static void SaveFlowOperate(Model.FlowOperateItem flowOperate)
|
||||
{
|
||||
var getFlowOperate = LicensePublicService.GetFlowOperateById(flowOperate.FlowOperateId);
|
||||
if (getFlowOperate != null)
|
||||
#region 保存作业票-流程审核[State=1]
|
||||
/// <summary>
|
||||
/// 保存作业票-流程审核
|
||||
/// </summary>
|
||||
/// <param name="flowOperate">流程审核集合</param>
|
||||
/// <returns></returns>
|
||||
public static void SaveFlowOperate(Model.FlowOperateItem flowOperate)
|
||||
{
|
||||
getFlowOperate.OperaterId = flowOperate.OperaterId;
|
||||
getFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
getFlowOperate.IsAgree = flowOperate.IsAgree;
|
||||
getFlowOperate.Opinion = flowOperate.Opinion;
|
||||
getFlowOperate.IsClosed = flowOperate.IsAgree;///同意时,当前流程关闭;不同意则返回申请人。
|
||||
LicensePublicService.UpdateFlowOperate(getFlowOperate);
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getFlowOperate = db.License_FlowOperate.FirstOrDefault(e => e.FlowOperateId == flowOperate.FlowOperateId);
|
||||
if (getFlowOperate != null)
|
||||
{
|
||||
getFlowOperate.OperaterId = flowOperate.OperaterId;
|
||||
getFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
getFlowOperate.IsAgree = flowOperate.IsAgree;
|
||||
getFlowOperate.Opinion = flowOperate.Opinion;
|
||||
getFlowOperate.IsClosed = flowOperate.IsAgree;///同意时,当前流程关闭;不同意则返回申请人。
|
||||
db.SubmitChanges();
|
||||
|
||||
Model.License_FlowOperateItem newFlowOperateItem = new Model.License_FlowOperateItem
|
||||
{
|
||||
FlowOperateItemId = SQLHelper.GetNewID(),
|
||||
FlowOperateId = getFlowOperate.FlowOperateId,
|
||||
OperaterId = getFlowOperate.OperaterId,
|
||||
OperaterTime = getFlowOperate.OperaterTime,
|
||||
IsAgree = getFlowOperate.IsAgree,
|
||||
Opinion = getFlowOperate.Opinion,
|
||||
};
|
||||
|
||||
LicensePublicService.AddFlowOperateItem(newFlowOperateItem);
|
||||
Model.License_FlowOperateItem newFlowOperateItem = new Model.License_FlowOperateItem
|
||||
{
|
||||
FlowOperateItemId = SQLHelper.GetNewID(),
|
||||
FlowOperateId = getFlowOperate.FlowOperateId,
|
||||
OperaterId = getFlowOperate.OperaterId,
|
||||
OperaterTime = getFlowOperate.OperaterTime,
|
||||
IsAgree = getFlowOperate.IsAgree,
|
||||
Opinion = getFlowOperate.Opinion,
|
||||
};
|
||||
db.License_FlowOperateItem.InsertOnSubmit(newFlowOperateItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ namespace BLL
|
|||
IsUsed = item.IsUsed,
|
||||
ConfirmManId = item.ConfirmManId,
|
||||
};
|
||||
LicensePublicService.AddLicenseItem(newLicenseItem);
|
||||
LicensePublicService.AddLicenseItemForApi(newLicenseItem);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace BLL
|
|||
MeetingHostManOther = x.MeetingHostManOther,
|
||||
MeetingHostManName = db.Sys_User.First(z => z.UserId == x.MeetingHostManId).UserName,
|
||||
AttentPersonIds = x.AttentPersonIds,
|
||||
AttentPersonNames = UserService.getUserNamesUserIds(x.AttentPersonIds),
|
||||
AttentPersonNames = UserService.getUserNamesUserIdsForApi(x.AttentPersonIds),
|
||||
}).FirstOrDefault();
|
||||
}
|
||||
else if (meetingType == "M")
|
||||
|
@ -119,7 +119,7 @@ namespace BLL
|
|||
MeetingHostManId = x.MeetingHostManId,
|
||||
MeetingHostManName = db.Sys_User.First(z => z.UserId == x.MeetingHostManId).UserName,
|
||||
AttentPersonIds = x.AttentPersonIds,
|
||||
AttentPersonNames = UserService.getUserNamesUserIds(x.AttentPersonIds),
|
||||
AttentPersonNames = UserService.getUserNamesUserIdsForApi(x.AttentPersonIds),
|
||||
}).FirstOrDefault();
|
||||
}
|
||||
else if (meetingType == "S")
|
||||
|
@ -152,7 +152,7 @@ namespace BLL
|
|||
MeetingHostManId = x.MeetingHostManId,
|
||||
MeetingHostManName = db.Sys_User.First(z => z.UserId == x.MeetingHostManId).UserName,
|
||||
AttentPersonIds = x.AttentPersonIds,
|
||||
AttentPersonNames = UserService.getUserNamesUserIds(x.AttentPersonIds),
|
||||
AttentPersonNames = UserService.getUserNamesUserIdsForApi(x.AttentPersonIds),
|
||||
}).FirstOrDefault();
|
||||
}
|
||||
else
|
||||
|
@ -185,7 +185,7 @@ namespace BLL
|
|||
MeetingHostManId = x.MeetingHostManId,
|
||||
MeetingHostManName = db.Sys_User.First(z => z.UserId == x.MeetingHostManId).UserName,
|
||||
AttentPersonIds = x.AttentPersonIds,
|
||||
AttentPersonNames = UserService.getUserNamesUserIds(x.AttentPersonIds),
|
||||
AttentPersonNames = UserService.getUserNamesUserIdsForApi(x.AttentPersonIds),
|
||||
}).FirstOrDefault();
|
||||
}
|
||||
return getMeetItem;
|
||||
|
@ -412,15 +412,15 @@ namespace BLL
|
|||
newClassMeeting.CompileDate = DateTime.Now;
|
||||
meeting.MeetingId = newClassMeeting.ClassMeetingId = SQLHelper.GetNewID();
|
||||
newClassMeeting.ClassMeetingCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectClassMeetingMenuId, newClassMeeting.ProjectId, null);
|
||||
ClassMeetingService.AddClassMeeting(newClassMeeting);
|
||||
ClassMeetingService.AddClassMeetingForApi(newClassMeeting);
|
||||
}
|
||||
else
|
||||
{
|
||||
ClassMeetingService.UpdateClassMeeting(newClassMeeting);
|
||||
ClassMeetingService.UpdateClassMeetingForApi(newClassMeeting);
|
||||
}
|
||||
if (meeting.States == "1")
|
||||
{
|
||||
CommonService.btnSaveData(meeting.ProjectId, Const.ProjectClassMeetingMenuId, newClassMeeting.ClassMeetingId, newClassMeeting.CompileMan, true, newClassMeeting.ClassMeetingName, "../Meeting/ClassMeetingView.aspx?ClassMeetingId={0}");
|
||||
CommonService.btnSaveDataForApi(meeting.ProjectId, Const.ProjectClassMeetingMenuId, newClassMeeting.ClassMeetingId, newClassMeeting.CompileMan, true, newClassMeeting.ClassMeetingName, "../Meeting/ClassMeetingView.aspx?ClassMeetingId={0}");
|
||||
}
|
||||
|
||||
menuId = Const.ProjectClassMeetingMenuId;
|
||||
|
@ -463,15 +463,15 @@ namespace BLL
|
|||
newWeekMeeting.CompileDate = DateTime.Now;
|
||||
meeting.MeetingId = newWeekMeeting.WeekMeetingId = SQLHelper.GetNewID();
|
||||
newWeekMeeting.WeekMeetingCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectWeekMeetingMenuId, newWeekMeeting.ProjectId, null);
|
||||
WeekMeetingService.AddWeekMeeting(newWeekMeeting);
|
||||
WeekMeetingService.AddWeekMeetingForApi(newWeekMeeting);
|
||||
}
|
||||
else
|
||||
{
|
||||
WeekMeetingService.UpdateWeekMeeting(newWeekMeeting);
|
||||
WeekMeetingService.UpdateWeekMeetingForApi(newWeekMeeting);
|
||||
}
|
||||
if (meeting.States == "1")
|
||||
{
|
||||
CommonService.btnSaveData(meeting.ProjectId, Const.ProjectWeekMeetingMenuId, newWeekMeeting.WeekMeetingId, newWeekMeeting.CompileMan, true, newWeekMeeting.WeekMeetingName, "../Meeting/WeekMeetingView.aspx?WeekMeetingId={0}");
|
||||
CommonService.btnSaveDataForApi(meeting.ProjectId, Const.ProjectWeekMeetingMenuId, newWeekMeeting.WeekMeetingId, newWeekMeeting.CompileMan, true, newWeekMeeting.WeekMeetingName, "../Meeting/WeekMeetingView.aspx?WeekMeetingId={0}");
|
||||
}
|
||||
menuId = Const.ProjectWeekMeetingMenuId;
|
||||
}
|
||||
|
@ -512,15 +512,15 @@ namespace BLL
|
|||
newMonthMeeting.CompileDate = DateTime.Now;
|
||||
meeting.MeetingId = newMonthMeeting.MonthMeetingId = SQLHelper.GetNewID();
|
||||
newMonthMeeting.MonthMeetingCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectMonthMeetingMenuId, newMonthMeeting.ProjectId, null);
|
||||
MonthMeetingService.AddMonthMeeting(newMonthMeeting);
|
||||
MonthMeetingService.AddMonthMeetingForApi(newMonthMeeting);
|
||||
}
|
||||
else
|
||||
{
|
||||
MonthMeetingService.UpdateMonthMeeting(newMonthMeeting);
|
||||
MonthMeetingService.UpdateMonthMeetingForApi(newMonthMeeting);
|
||||
}
|
||||
if (meeting.States == "1")
|
||||
{
|
||||
CommonService.btnSaveData(meeting.ProjectId, Const.ProjectMonthMeetingMenuId, newMonthMeeting.MonthMeetingId, newMonthMeeting.CompileMan, true, newMonthMeeting.MonthMeetingName, "../Meeting/MonthMeetingView.aspx?MonthMeetingId={0}");
|
||||
CommonService.btnSaveDataForApi(meeting.ProjectId, Const.ProjectMonthMeetingMenuId, newMonthMeeting.MonthMeetingId, newMonthMeeting.CompileMan, true, newMonthMeeting.MonthMeetingName, "../Meeting/MonthMeetingView.aspx?MonthMeetingId={0}");
|
||||
}
|
||||
menuId = Const.ProjectMonthMeetingMenuId;
|
||||
}
|
||||
|
@ -562,15 +562,15 @@ namespace BLL
|
|||
newSpecialMeeting.CompileDate = DateTime.Now;
|
||||
meeting.MeetingId = newSpecialMeeting.SpecialMeetingId = SQLHelper.GetNewID();
|
||||
newSpecialMeeting.SpecialMeetingCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectSpecialMeetingMenuId, newSpecialMeeting.ProjectId, null);
|
||||
SpecialMeetingService.AddSpecialMeeting(newSpecialMeeting);
|
||||
SpecialMeetingService.AddSpecialMeetingForApi(newSpecialMeeting);
|
||||
}
|
||||
else
|
||||
{
|
||||
SpecialMeetingService.UpdateSpecialMeeting(newSpecialMeeting);
|
||||
SpecialMeetingService.UpdateSpecialMeetingForApi(newSpecialMeeting);
|
||||
}
|
||||
if (meeting.States == "1")
|
||||
{
|
||||
CommonService.btnSaveData(meeting.ProjectId, Const.ProjectSpecialMeetingMenuId, newSpecialMeeting.SpecialMeetingId, newSpecialMeeting.CompileMan, true, newSpecialMeeting.SpecialMeetingName, "../Meeting/SpecialMeetingView.aspx?SpecialMeetingId={0}");
|
||||
CommonService.btnSaveDataForApi(meeting.ProjectId, Const.ProjectSpecialMeetingMenuId, newSpecialMeeting.SpecialMeetingId, newSpecialMeeting.CompileMan, true, newSpecialMeeting.SpecialMeetingName, "../Meeting/SpecialMeetingView.aspx?SpecialMeetingId={0}");
|
||||
}
|
||||
menuId = Const.ProjectSpecialMeetingMenuId;
|
||||
}
|
||||
|
@ -612,15 +612,15 @@ namespace BLL
|
|||
newAttendMeeting.CompileDate = DateTime.Now;
|
||||
meeting.MeetingId = newAttendMeeting.AttendMeetingId = SQLHelper.GetNewID();
|
||||
newAttendMeeting.AttendMeetingCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectAttendMeetingMenuId, newAttendMeeting.ProjectId, null);
|
||||
AttendMeetingService.AddAttendMeeting(newAttendMeeting);
|
||||
AttendMeetingService.AddAttendMeetingForApi(newAttendMeeting);
|
||||
}
|
||||
else
|
||||
{
|
||||
AttendMeetingService.UpdateAttendMeeting(newAttendMeeting);
|
||||
AttendMeetingService.UpdateAttendMeetingForApi(newAttendMeeting);
|
||||
}
|
||||
if (meeting.States == "1")
|
||||
{
|
||||
CommonService.btnSaveData(meeting.ProjectId, Const.ProjectAttendMeetingMenuId, newAttendMeeting.AttendMeetingId, newAttendMeeting.CompileMan, true, newAttendMeeting.AttendMeetingName, "../Meeting/AttendMeetingView.aspx?AttendMeetingId={0}");
|
||||
CommonService.btnSaveDataForApi(meeting.ProjectId, Const.ProjectAttendMeetingMenuId, newAttendMeeting.AttendMeetingId, newAttendMeeting.CompileMan, true, newAttendMeeting.AttendMeetingName, "../Meeting/AttendMeetingView.aspx?AttendMeetingId={0}");
|
||||
}
|
||||
menuId = Const.ProjectAttendMeetingMenuId;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace BLL
|
|||
DutyPersonName = db.Sys_User.First(u => u.UserId == x.DutyPersonId).UserName,
|
||||
DutyPersonDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.DutyPersonDate),
|
||||
ProfessionalEngineerId = x.ProfessionalEngineerId,
|
||||
ProfessionalEngineerName = UserService.getUserNamesUserIds(x.ProfessionalEngineerId),
|
||||
ProfessionalEngineerName = UserService.getUserNamesUserIdsForApi(x.ProfessionalEngineerId),
|
||||
ProfessionalEngineerTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ProfessionalEngineerTime),
|
||||
ConstructionManagerId = x.ConstructionManagerId,
|
||||
ConstructionManagerName = db.Sys_User.First(u => u.UserId == x.ConstructionManagerId).UserName,
|
||||
|
@ -203,7 +203,7 @@ namespace BLL
|
|||
db.Check_PauseNotice.InsertOnSubmit(newPauseNotice);
|
||||
db.SubmitChanges();
|
||||
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectPauseNoticeMenuId, newPauseNotice.ProjectId, newPauseNotice.UnitId, newPauseNotice.PauseNoticeId, newPauseNotice.CompileDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectPauseNoticeMenuId, newPauseNotice.ProjectId, newPauseNotice.UnitId, newPauseNotice.PauseNoticeId, newPauseNotice.CompileDate);
|
||||
//// 回写巡检记录表
|
||||
if (!string.IsNullOrEmpty(newItem.HazardRegisterId))
|
||||
{
|
||||
|
@ -360,7 +360,7 @@ namespace BLL
|
|||
|
||||
if (newItem.PauseStates == Const.State_0 || newItem.PauseStates == Const.State_1)
|
||||
{ //// 通知单附件
|
||||
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(newItem.PauseNoticeAttachUrl, 10, null), newItem.PauseNoticeAttachUrl, Const.ProjectPauseNoticeMenuId, newPauseNotice.PauseNoticeId);
|
||||
UploadFileService.SaveAttachUrlForApi(UploadFileService.GetSourceByAttachUrl(newItem.PauseNoticeAttachUrl, 10, null), newItem.PauseNoticeAttachUrl, Const.ProjectPauseNoticeMenuId, newPauseNotice.PauseNoticeId);
|
||||
}
|
||||
if (getUpdate != null && getUpdate.States == Const.State_2)
|
||||
{
|
||||
|
@ -373,7 +373,7 @@ namespace BLL
|
|||
getcheck.CompletedDate = DateTime.Now;
|
||||
db.SubmitChanges();
|
||||
//// 根据明细ID判断是否全部整改完成 并更新专项检查状态
|
||||
Check_CheckSpecialService.UpdateCheckSpecialStates(getcheck.CheckSpecialId);
|
||||
Check_CheckSpecialService.UpdateCheckSpecialStatesForApi(getcheck.CheckSpecialId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -397,11 +397,11 @@ namespace BLL
|
|||
////保存附件
|
||||
if (!string.IsNullOrEmpty(attachUrl))
|
||||
{
|
||||
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(attachUrl, 10, null), attachUrl, menuId, getPauseNotice.PauseNoticeId);
|
||||
UploadFileService.SaveAttachUrlForApi(UploadFileService.GetSourceByAttachUrl(attachUrl, 10, null), attachUrl, menuId, getPauseNotice.PauseNoticeId);
|
||||
}
|
||||
else
|
||||
{
|
||||
CommonService.DeleteAttachFileById(menuId, getPauseNotice.PauseNoticeId);
|
||||
CommonService.DeleteAttachFileByIdForApi(menuId, getPauseNotice.PauseNoticeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -220,7 +220,7 @@ namespace BLL
|
|||
newPunishNotice.PunishNoticeCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectPunishNoticeMenuId, newPunishNotice.ProjectId, newPunishNotice.UnitId);
|
||||
db.Check_PunishNotice.InsertOnSubmit(newPunishNotice);
|
||||
db.SubmitChanges();
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectPunishNoticeMenuId, newPunishNotice.ProjectId, newPunishNotice.UnitId, newPunishNotice.PunishNoticeId, newPunishNotice.CompileDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectPunishNoticeMenuId, newPunishNotice.ProjectId, newPunishNotice.UnitId, newPunishNotice.PunishNoticeId, newPunishNotice.CompileDate);
|
||||
|
||||
//// 回写巡检记录表
|
||||
if (!string.IsNullOrEmpty(newItem.HazardRegisterId))
|
||||
|
@ -438,7 +438,7 @@ namespace BLL
|
|||
getcheck.CompletedDate = DateTime.Now;
|
||||
db.SubmitChanges();
|
||||
//// 根据明细ID判断是否全部整改完成 并更新专项检查状态
|
||||
Check_CheckSpecialService.UpdateCheckSpecialStates(getcheck.CheckSpecialId);
|
||||
Check_CheckSpecialService.UpdateCheckSpecialStatesForApi(getcheck.CheckSpecialId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -466,11 +466,11 @@ namespace BLL
|
|||
////保存附件
|
||||
if (!string.IsNullOrEmpty(attachUrl))
|
||||
{
|
||||
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(attachUrl, 10, null), attachUrl, menuId, getPunishNotice.PunishNoticeId);
|
||||
UploadFileService.SaveAttachUrlForApi(UploadFileService.GetSourceByAttachUrl(attachUrl, 10, null), attachUrl, menuId, getPunishNotice.PunishNoticeId);
|
||||
}
|
||||
else
|
||||
{
|
||||
CommonService.DeleteAttachFileById(menuId, getPunishNotice.PunishNoticeId);
|
||||
CommonService.DeleteAttachFileByIdForApi(menuId, getPunishNotice.PunishNoticeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace BLL
|
|||
SendPersonName = db.Sys_User.First(u => u.UserId == x.SendPersonId).UserName,
|
||||
MainContent = x.MainContent,
|
||||
UnitIds = x.UnitIds,
|
||||
UnitNames = UnitService.getUnitNamesUnitIds(x.UnitIds),
|
||||
UnitNames = UnitService.getUnitNamesUnitIdsForApi(x.UnitIds),
|
||||
FileAttachUrl = APIUpLoadFileService.getFileUrl(x.ReceiveFileManagerId, null),
|
||||
ReplyFileAttachUrl = APIUpLoadFileService.getFileUrl(x.ReceiveFileManagerId + "#1", null),
|
||||
Issue = (db.InformationProject_ReceiveFileManager.FirstOrDefault(y => y.FromId == x.ReceiveFileManagerId) == null) ? false : true,
|
||||
|
@ -83,7 +83,7 @@ namespace BLL
|
|||
SendPersonName = db.Sys_User.First(u => u.UserId == x.SendPersonId).UserName,
|
||||
MainContent = x.MainContent,
|
||||
UnitIds = x.UnitIds,
|
||||
UnitNames = UnitService.getUnitNamesUnitIds(x.UnitIds),
|
||||
UnitNames = UnitService.getUnitNamesUnitIdsForApi(x.UnitIds),
|
||||
FileAttachUrl = APIUpLoadFileService.getFileUrl(x.ReceiveFileManagerId, null),
|
||||
ReplyFileAttachUrl = APIUpLoadFileService.getFileUrl(x.ReceiveFileManagerId + "#1", null),
|
||||
States = x.States,
|
||||
|
@ -165,7 +165,7 @@ namespace BLL
|
|||
}
|
||||
if (newItem.States == "1")
|
||||
{
|
||||
CommonService.btnSaveData(newItem.ProjectId, Const.ReceiveFileManagerMenuId, newReceiveFile.ReceiveFileManagerId, newReceiveFile.SendPersonId, true, newReceiveFile.ReceiveFileName, "../ReceiveFileManager/ReceiveFileManagerView.aspx?ReceiveFileManagerId={0}");
|
||||
CommonService.btnSaveDataForApi(newItem.ProjectId, Const.ReceiveFileManagerMenuId, newReceiveFile.ReceiveFileManagerId, newReceiveFile.SendPersonId, true, newReceiveFile.ReceiveFileName, "../ReceiveFileManager/ReceiveFileManagerView.aspx?ReceiveFileManagerId={0}");
|
||||
}
|
||||
|
||||
////保存附件
|
||||
|
|
|
@ -216,7 +216,7 @@ namespace BLL
|
|||
newRectifyNotices.RectifyNoticesCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectRectifyNoticesMenuId, newRectifyNotices.ProjectId, newRectifyNotices.UnitId);
|
||||
db.Check_RectifyNotices.InsertOnSubmit(newRectifyNotices);
|
||||
db.SubmitChanges();
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectRectifyNoticesMenuId, newRectifyNotices.ProjectId, newRectifyNotices.UnitId, newRectifyNotices.RectifyNoticesId, newRectifyNotices.CheckedDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectRectifyNoticesMenuId, newRectifyNotices.ProjectId, newRectifyNotices.UnitId, newRectifyNotices.RectifyNoticesId, newRectifyNotices.CheckedDate);
|
||||
//// 整改单附件
|
||||
if (!string.IsNullOrEmpty(rectifyNotices.BeAttachUrl))
|
||||
{
|
||||
|
@ -307,7 +307,7 @@ namespace BLL
|
|||
{
|
||||
foreach (var cdeleteItem in deleteItem)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(cdeleteItem.RectifyNoticesItemId);
|
||||
CommonService.DeleteAttachFileByIdForApi(cdeleteItem.RectifyNoticesItemId);
|
||||
}
|
||||
db.Check_RectifyNoticesItem.DeleteAllOnSubmit(deleteItem);
|
||||
}
|
||||
|
@ -454,7 +454,7 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
//// 根据明细ID判断是否全部整改完成 并更新专项检查状态
|
||||
Check_CheckSpecialService.UpdateCheckSpecialStates(getcheck.FirstOrDefault().CheckSpecialId);
|
||||
Check_CheckSpecialService.UpdateCheckSpecialStatesForApi(getcheck.FirstOrDefault().CheckSpecialId);
|
||||
}
|
||||
}
|
||||
db.SubmitChanges();
|
||||
|
|
|
@ -266,7 +266,7 @@ namespace BLL
|
|||
TestType = x.TestType,
|
||||
TestTypeName = x.TestType == "1" ? "单选题" : (x.TestType == "2" ? "多选题" : "判断题"),
|
||||
WorkPostIds = x.WorkPostIds,
|
||||
WorkPostNames = WorkPostService.getWorkPostNamesWorkPostIds(x.WorkPostIds),
|
||||
WorkPostNames = WorkPostService.getWorkPostNamesWorkPostIdsForApi(x.WorkPostIds),
|
||||
AItem = x.AItem,
|
||||
BItem = x.BItem,
|
||||
CItem = x.CItem,
|
||||
|
|
|
@ -81,9 +81,9 @@ namespace BLL
|
|||
newTestRecord.UnitId = newTestRecord.UnitId = Const.UnitId_CD;
|
||||
}
|
||||
}
|
||||
newTestRecord.DepartName = DepartService.getDepartNameById(newTestRecord.DepartId);
|
||||
newTestRecord.UnitName = UnitService.GetUnitNameByUnitId(newTestRecord.UnitId);
|
||||
newTestRecord.ProjectName = ProjectService.GetProjectNameByProjectId(newTestRecord.ProjectId);
|
||||
newTestRecord.DepartName = DepartService.getDepartNameByIdForApi(newTestRecord.DepartId);
|
||||
newTestRecord.UnitName = UnitService.GetUnitNameByUnitIdForApi(newTestRecord.UnitId);
|
||||
newTestRecord.ProjectName = ProjectService.GetProjectNameByProjectIdForApi(newTestRecord.ProjectId);
|
||||
if (newTestRecord.UnitId == Const.UnitId_CD)
|
||||
{
|
||||
newTestRecord.IsThiUnit = true;
|
||||
|
@ -146,7 +146,7 @@ namespace BLL
|
|||
{
|
||||
newTestRecord.ManType = "2";
|
||||
}
|
||||
else if (UserService.GetUserByUserId(testRecord.TestManId) != null)
|
||||
else if (db.Sys_User.FirstOrDefault(e => e.UserId == testRecord.TestManId) != null)
|
||||
{
|
||||
newTestRecord.ManType = "1";
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using EmitMapper;
|
||||
using EmitMapper.MappingConfiguration;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
@ -36,7 +37,7 @@ namespace BLL
|
|||
TestPlanName = x.PlanName,
|
||||
ProjectId = x.ProjectId,
|
||||
DepartIds = x.DepartIds,
|
||||
DepartNames = WorkPostService.getDepartNamesByIds(x.DepartIds),
|
||||
DepartNames = WorkPostService.getDepartNamesByIdsForApi(x.DepartIds),
|
||||
TestPlanManId = x.PlanManId,
|
||||
TestPlanManName = db.Sys_User.First(y => y.UserId == x.PlanManId).UserName,
|
||||
TestPalce = x.TestPalce,
|
||||
|
@ -60,7 +61,7 @@ namespace BLL
|
|||
ProjectId = x.ProjectId,
|
||||
TestPlanManId = x.PlanManId,
|
||||
DepartIds = x.DepartIds,
|
||||
DepartNames = WorkPostService.getDepartNamesByIds(x.DepartIds),
|
||||
DepartNames = WorkPostService.getDepartNamesByIdsForApi(x.DepartIds),
|
||||
TestPlanManName = db.Sys_User.First(y => y.UserId == x.PlanManId).UserName,
|
||||
TestPalce = x.TestPalce,
|
||||
TestStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.TestStartTime),
|
||||
|
@ -105,11 +106,11 @@ namespace BLL
|
|||
QuestionCount = x.QuestionCount ?? 0,
|
||||
TestPalce = x.TestPalce,
|
||||
UnitIds = x.UnitIds,
|
||||
UnitNames = UnitService.getUnitNamesUnitIds(x.UnitIds),
|
||||
UnitNames = UnitService.getUnitNamesUnitIdsForApi(x.UnitIds),
|
||||
WorkPostIds = x.WorkPostIds,
|
||||
WorkPostNames = WorkPostService.getWorkPostNamesWorkPostIds(x.WorkPostIds),
|
||||
WorkPostNames = WorkPostService.getWorkPostNamesWorkPostIdsForApi(x.WorkPostIds),
|
||||
DepartIds = x.DepartIds,
|
||||
DepartNames = WorkPostService.getDepartNamesByIds(x.DepartIds),
|
||||
DepartNames = WorkPostService.getDepartNamesByIdsForApi(x.DepartIds),
|
||||
States = x.States,
|
||||
QRCodeUrl = x.QRCodeUrl.Replace('\\', '/'),
|
||||
TrainingPlanId = x.PlanId,
|
||||
|
@ -203,7 +204,7 @@ namespace BLL
|
|||
|
||||
db.Training_TestPlan.InsertOnSubmit(newTestPlan);
|
||||
db.SubmitChanges();
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTestPlanMenuId, newTestPlan.ProjectId, null, newTestPlan.TestPlanId, newTestPlan.PlanDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectTestPlanMenuId, newTestPlan.ProjectId, null, newTestPlan.TestPlanId, newTestPlan.PlanDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -223,6 +224,9 @@ namespace BLL
|
|||
isUpdate.WorkPostIds = newTestPlan.WorkPostIds;
|
||||
isUpdate.DepartIds = newTestPlan.DepartIds;
|
||||
isUpdate.TrainTypeId = newTestPlan.TrainTypeId;
|
||||
isUpdate.SValue = newTestPlan.SValue;
|
||||
isUpdate.MValue = newTestPlan.MValue;
|
||||
isUpdate.JValue = newTestPlan.JValue;
|
||||
////删除 考生记录
|
||||
var deleteRecords = from x in db.Training_TestRecord
|
||||
where x.TestPlanId == isUpdate.TestPlanId
|
||||
|
@ -314,7 +318,7 @@ namespace BLL
|
|||
{
|
||||
foreach (var item in getTestPlan.TestPlanTrainingItems)
|
||||
{
|
||||
var trainingType = TestTrainingService.GetTestTrainingById(item.TrainingTypeId);
|
||||
var trainingType = db.Training_TestTraining.FirstOrDefault(e => e.TrainingId == item.TrainingTypeId);
|
||||
if (trainingType != null)
|
||||
{
|
||||
Model.Training_TestPlanTraining newPlanItem = new Model.Training_TestPlanTraining
|
||||
|
@ -341,24 +345,27 @@ namespace BLL
|
|||
/// 新增 考试人员明细
|
||||
/// </summary>
|
||||
public static void AddTrainingTestRecord(List<Model.TestRecordItem> testRecords, Model.Training_TestPlan newTestPlan)
|
||||
{
|
||||
foreach (var item in testRecords)
|
||||
{
|
||||
var person = PersonService.GetPersonById(item.TestManId);
|
||||
if (person != null)
|
||||
{
|
||||
Model.Training_TestRecord newTrainDetail = new Model.Training_TestRecord
|
||||
{
|
||||
TestRecordId = SQLHelper.GetNewID(),
|
||||
ProjectId = newTestPlan.ProjectId,
|
||||
TestPlanId = newTestPlan.TestPlanId,
|
||||
TestManId = item.TestManId,
|
||||
TestType = item.TestType,
|
||||
Duration= newTestPlan.Duration,
|
||||
};
|
||||
TestRecordService.AddTestRecord(newTrainDetail);
|
||||
}
|
||||
}
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
foreach (var item in testRecords)
|
||||
{
|
||||
var person = db.SitePerson_Person.FirstOrDefault(e => e.PersonId == item.TestManId);
|
||||
if (person != null)
|
||||
{
|
||||
Model.Training_TestRecord newTrainDetail = new Model.Training_TestRecord
|
||||
{
|
||||
TestRecordId = SQLHelper.GetNewID(),
|
||||
ProjectId = newTestPlan.ProjectId,
|
||||
TestPlanId = newTestPlan.TestPlanId,
|
||||
TestManId = item.TestManId,
|
||||
TestType = item.TestType,
|
||||
Duration = newTestPlan.Duration,
|
||||
};
|
||||
TestRecordService.AddTestRecordForApi(newTrainDetail);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -417,11 +424,11 @@ namespace BLL
|
|||
TestStartTime = DateTime.Now,
|
||||
TestPalce = getTrainingPlan.TeachAddress,
|
||||
UnitIds = getTrainingPlan.UnitIds,
|
||||
UnitNames = UnitService.getUnitNamesUnitIds(getTrainingPlan.UnitIds),
|
||||
UnitNames = UnitService.getUnitNamesUnitIdsForApi(getTrainingPlan.UnitIds),
|
||||
WorkPostIds = getTrainingPlan.WorkPostId,
|
||||
WorkPostNames = WorkPostService.getWorkPostNamesWorkPostIds(getTrainingPlan.WorkPostId),
|
||||
WorkPostNames = WorkPostService.getWorkPostNamesWorkPostIdsForApi(getTrainingPlan.WorkPostId),
|
||||
DepartIds=getTrainingPlan.DepartIds,
|
||||
DepartNames = WorkPostService.getDepartNamesByIds(getTrainingPlan.DepartIds),
|
||||
DepartNames = WorkPostService.getDepartNamesByIdsForApi(getTrainingPlan.DepartIds),
|
||||
PlanId = getTrainingPlan.PlanId,
|
||||
States = "0",
|
||||
};
|
||||
|
@ -477,7 +484,7 @@ namespace BLL
|
|||
{
|
||||
db.Training_TestPlan.InsertOnSubmit(newTestPlan);
|
||||
db.SubmitChanges();
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTestPlanMenuId, newTestPlan.ProjectId, null, testPlanId, newTestPlan.PlanDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectTestPlanMenuId, newTestPlan.ProjectId, null, testPlanId, newTestPlan.PlanDate);
|
||||
///培训人员
|
||||
var getTrainingTask = (from x in db.Training_Task where x.PlanId == trainingPlanId select x).ToList();
|
||||
foreach (var itemTask in getTrainingTask)
|
||||
|
|
|
@ -498,7 +498,7 @@ namespace BLL
|
|||
}
|
||||
if (!string.IsNullOrEmpty(strPass))
|
||||
{
|
||||
int PassingScore = SysConstSetService.getPassScore();
|
||||
int PassingScore = SysConstSetService.getPassScoreForApi();
|
||||
if (strPass == "0")
|
||||
{
|
||||
getDataLists = getDataLists.Where(x => x.TestScores < PassingScore);
|
||||
|
@ -556,7 +556,7 @@ namespace BLL
|
|||
}
|
||||
if (!string.IsNullOrEmpty(strPass))
|
||||
{
|
||||
int PassingScore = SysConstSetService.getPassScore();
|
||||
int PassingScore = SysConstSetService.getPassScoreForApi();
|
||||
if (strPass == "0")
|
||||
{
|
||||
getDataLists = getDataLists.Where(x => x.TestScores < PassingScore);
|
||||
|
@ -592,14 +592,14 @@ namespace BLL
|
|||
var user = db.Sys_User.FirstOrDefault(x => x.UserId == testManId);
|
||||
if (user != null)
|
||||
{
|
||||
name = UnitService.GetUnitNameByUnitId(user.UnitId);
|
||||
name = UnitService.GetUnitNameByUnitIdForApi(user.UnitId);
|
||||
}
|
||||
else
|
||||
{
|
||||
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == testManId);
|
||||
if (getPerson != null)
|
||||
{
|
||||
name = UnitService.GetUnitNameByUnitId(getPerson.UnitId);
|
||||
name = UnitService.GetUnitNameByUnitIdForApi(getPerson.UnitId);
|
||||
}
|
||||
}
|
||||
return name;
|
||||
|
|
|
@ -71,8 +71,8 @@ namespace BLL
|
|||
WorkPostIds = x.WorkPostIds,
|
||||
TrainContent = x.TrainContent,
|
||||
AttachUrl = db.AttachFile.First(y => y.ToKeyId == x.TrainingId).AttachUrl.Replace('\\', '/'),
|
||||
UnitNames = UnitService.getUnitNamesUnitIds(x.UnitIds),
|
||||
WorkPostNames = WorkPostService.getWorkPostNamesWorkPostIds(x.WorkPostIds),
|
||||
UnitNames = UnitService.getUnitNamesUnitIdsForApi(x.UnitIds),
|
||||
WorkPostNames = WorkPostService.getWorkPostNamesWorkPostIdsForApi(x.WorkPostIds),
|
||||
};
|
||||
return getDataLists.FirstOrDefault();
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ namespace BLL
|
|||
WorkPostIds = getTrainingPlan.WorkPostId,
|
||||
PlanId = getTrainingPlan.PlanId,
|
||||
};
|
||||
newTrainRecord.CompileMan = UserService.GetUserNameByUserId(getTrainingPlan.DesignerId);
|
||||
newTrainRecord.CompileMan = UserService.GetUserNameByUserIdForApi(getTrainingPlan.DesignerId);
|
||||
///获取培训人员
|
||||
var getTrainingTasks = from x in db.Training_Task
|
||||
where x.PlanId == getTrainingPlan.PlanId
|
||||
|
@ -171,15 +171,15 @@ namespace BLL
|
|||
var getPerson = db.SitePerson_Person.FirstOrDefault(e => e.PersonId == newDetail.PersonId);
|
||||
if (getPerson != null && string.IsNullOrEmpty(getPerson.CardNo))
|
||||
{
|
||||
getPerson.CardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", getPerson.ProjectId, UnitService.GetUnitCodeByUnitId(getPerson.UnitId));
|
||||
getPerson.CardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", getPerson.ProjectId, UnitService.GetUnitCodeByUnitIdForApi(getPerson.UnitId));
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTrainRecordMenuId, newTrainRecord.ProjectId, null, newTrainRecord.TrainingId, newTrainRecord.TrainStartDate);
|
||||
CommonService.btnSaveData(newTrainRecord.ProjectId, Const.ProjectTrainRecordMenuId, newTrainRecord.TrainingId, getTrainingPlan.DesignerId, true, newTrainRecord.TrainTitle, "../EduTrain/TrainRecordView.aspx?TrainingId={0}");
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectTrainRecordMenuId, newTrainRecord.ProjectId, null, newTrainRecord.TrainingId, newTrainRecord.TrainStartDate);
|
||||
CommonService.btnSaveDataForApi(newTrainRecord.ProjectId, Const.ProjectTrainRecordMenuId, newTrainRecord.TrainingId, getTrainingPlan.DesignerId, true, newTrainRecord.TrainTitle, "../EduTrain/TrainRecordView.aspx?TrainingId={0}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,10 +77,10 @@ namespace BLL
|
|||
UnitIds = x.UnitIds,
|
||||
WorkPostId = x.WorkPostId,
|
||||
DepartIds = x.DepartIds,
|
||||
DepartNames = WorkPostService.getDepartNamesByIds(x.DepartIds),
|
||||
DepartNames = WorkPostService.getDepartNamesByIdsForApi(x.DepartIds),
|
||||
TrainContent = x.TrainContent,
|
||||
UnitNames = UnitService.getUnitNamesUnitIds(x.UnitIds),
|
||||
WorkPostNames = WorkPostService.getWorkPostNamesWorkPostIds(x.WorkPostId),
|
||||
UnitNames = UnitService.getUnitNamesUnitIdsForApi(x.UnitIds),
|
||||
WorkPostNames = WorkPostService.getWorkPostNamesWorkPostIdsForApi(x.WorkPostId),
|
||||
DesignerId = x.DesignerId,
|
||||
DesignerName = db.Sys_User.First(y => y.UserId == x.DesignerId).UserName,
|
||||
DesignerDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TrainStartDate),
|
||||
|
@ -177,7 +177,7 @@ namespace BLL
|
|||
{
|
||||
newTrainingPlan.DesignerDate = DateTime.Now;
|
||||
string unitId = string.Empty;
|
||||
var user = UserService.GetUserByUserId(newTrainingPlan.DesignerId);
|
||||
var user = db.Sys_User.FirstOrDefault(x=>x.UserId==newTrainingPlan.DesignerId);
|
||||
if (user != null)
|
||||
{
|
||||
unitId = user.UnitId;
|
||||
|
@ -190,7 +190,7 @@ namespace BLL
|
|||
db.Training_Plan.InsertOnSubmit(newTrainingPlan);
|
||||
db.SubmitChanges();
|
||||
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTrainingPlanMenuId, newTrainingPlan.ProjectId, null, newTrainingPlan.PlanId, newTrainingPlan.DesignerDate);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectTrainingPlanMenuId, newTrainingPlan.ProjectId, null, newTrainingPlan.PlanId, newTrainingPlan.DesignerDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace BLL
|
|||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
personId = PersonService.GetPersonIdByUserId(personId);
|
||||
personId = PersonService.GetPersonIdByUserIdForApi(personId);
|
||||
var getDataLists = (from x in db.Training_Task
|
||||
join y in db.Training_Plan on x.PlanId equals y.PlanId
|
||||
where ((string.IsNullOrEmpty(projectId) && x.ProjectId == null) || (!string.IsNullOrEmpty(projectId) && x.ProjectId == projectId)) && x.UserId == personId && y.States != "0"
|
||||
|
|
|
@ -259,14 +259,39 @@ namespace BLL
|
|||
|
||||
return workPostName;
|
||||
}
|
||||
#endregion
|
||||
#region 根据岗位ID得到岗位名称
|
||||
/// <summary>
|
||||
/// 根据岗位ID得到岗位名称
|
||||
/// </summary>
|
||||
/// <param name="workPostId"></param>
|
||||
/// <returns></returns>
|
||||
public static string getDepartNameById(string workPostId)
|
||||
public static string getWorkPostNamesWorkPostIdsForApi(object workPostIds)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string workPostName = string.Empty;
|
||||
if (workPostIds != null)
|
||||
{
|
||||
string[] ids = workPostIds.ToString().Split(',');
|
||||
foreach (string id in ids)
|
||||
{
|
||||
var q = db.Base_WorkPost.FirstOrDefault(e => e.WorkPostId == id);
|
||||
if (q != null)
|
||||
{
|
||||
workPostName += q.WorkPostName + ",";
|
||||
}
|
||||
}
|
||||
if (workPostName != string.Empty)
|
||||
{
|
||||
workPostName = workPostName.Substring(0, workPostName.Length - 1); ;
|
||||
}
|
||||
}
|
||||
|
||||
return workPostName;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region 根据岗位ID得到岗位名称
|
||||
/// <summary>
|
||||
/// 根据岗位ID得到岗位名称
|
||||
/// </summary>
|
||||
/// <param name="workPostId"></param>
|
||||
/// <returns></returns>
|
||||
public static string getDepartNameById(string workPostId)
|
||||
{
|
||||
string workPostName = string.Empty;
|
||||
if (!string.IsNullOrEmpty(workPostId))
|
||||
|
@ -313,6 +338,31 @@ namespace BLL
|
|||
|
||||
return departName;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
public static string getDepartNamesByIdsForApi(object departIdsIds)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string departName = string.Empty;
|
||||
if (departIdsIds != null)
|
||||
{
|
||||
string[] ids = departIdsIds.ToString().Split(',');
|
||||
foreach (string id in ids)
|
||||
{
|
||||
var q = db.Base_Depart.FirstOrDefault(e => e.DepartId == id);
|
||||
if (q != null)
|
||||
{
|
||||
departName += q.DepartName + ",";
|
||||
}
|
||||
}
|
||||
if (departName != string.Empty)
|
||||
{
|
||||
departName = departName.Substring(0, departName.Length - 1); ;
|
||||
}
|
||||
}
|
||||
|
||||
return departName;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -134,5 +134,30 @@ namespace BLL
|
|||
|
||||
return workStageName;
|
||||
}
|
||||
}
|
||||
public static string getWorkStageNamesWorkStageIdsForApi(object workStageIds)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string workStageName = string.Empty;
|
||||
if (workStageIds != null)
|
||||
{
|
||||
string[] workStages = workStageIds.ToString().Split(',');
|
||||
foreach (string workStageId in workStages)
|
||||
{
|
||||
var q =db.Base_WorkStage.FirstOrDefault(e => e.WorkStageId == workStageId);
|
||||
if (q != null)
|
||||
{
|
||||
workStageName += q.WorkStageName + ",";
|
||||
}
|
||||
}
|
||||
if (workStageName != string.Empty)
|
||||
{
|
||||
workStageName = workStageName.Substring(0, workStageName.Length - 1); ;
|
||||
}
|
||||
}
|
||||
|
||||
return workStageName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -30,18 +30,20 @@ namespace BLL
|
|||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据方案审查Id删除一个方案审查信息
|
||||
/// </summary>
|
||||
/// <param name="constructSolutionCode">方案审查Id</param>
|
||||
public static void DeleteConstructSolution(string constructSolutionId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Solution_CQMSConstructSolution constructSolution = db.Solution_CQMSConstructSolution.First(e => e.ConstructSolutionId == constructSolutionId);
|
||||
|
||||
db.Solution_CQMSConstructSolution.DeleteOnSubmit(constructSolution);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据方案审查Id删除一个方案审查信息
|
||||
/// </summary>
|
||||
/// <param name="constructSolutionCode">方案审查Id</param>
|
||||
public static void DeleteConstructSolution(string constructSolutionId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Solution_CQMSConstructSolution constructSolution = db.Solution_CQMSConstructSolution.FirstOrDefault(e => e.ConstructSolutionId == constructSolutionId);
|
||||
if (constructSolution != null)
|
||||
{
|
||||
db.Solution_CQMSConstructSolution.DeleteOnSubmit(constructSolution);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加方案审查信息
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -43,114 +44,127 @@ namespace BLL
|
|||
// BLL.FileCabinetAItemService.DeleteFileCabinetAItemByID(dataId);
|
||||
Funs.DB.Sys_CodeRecords.DeleteOnSubmit(codeRecords);
|
||||
}
|
||||
}
|
||||
|
||||
#region 根据菜单id、项目id返回编码 (用于页面新增显示)
|
||||
/// <summary>
|
||||
/// 根据菜单id、项目id返回编码 (用于页面新增显示)
|
||||
/// </summary>
|
||||
/// <param name="menuId"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static string ReturnCodeByMenuIdProjectId(string menuId, string projectId, string unitId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string code = string.Empty;
|
||||
string ruleCodes = string.Empty;
|
||||
int digit = 4;
|
||||
string symbol = "-"; ///间隔符
|
||||
var codeRecords = (from x in db.Sys_CodeRecords where x.MenuId == menuId && x.ProjectId == projectId orderby x.CompileDate descending select x).FirstOrDefault();
|
||||
if (codeRecords != null && !string.IsNullOrEmpty(codeRecords.RuleCodes))
|
||||
{
|
||||
ruleCodes = codeRecords.RuleCodes;
|
||||
if (codeRecords.Digit.HasValue)
|
||||
{
|
||||
digit = codeRecords.Digit.Value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
////项目
|
||||
string ruleCode = string.Empty;
|
||||
var project = ProjectService.GetProjectByProjectId(projectId);
|
||||
if (project != null)
|
||||
{
|
||||
string projectCode = project.ProjectCode; ///项目编号
|
||||
////编码规则表
|
||||
var sysCodeTemplateRule = db.ProjectData_CodeTemplateRule.FirstOrDefault(x => x.MenuId == menuId && x.ProjectId == projectId);
|
||||
if (sysCodeTemplateRule != null)
|
||||
{
|
||||
symbol = sysCodeTemplateRule.Symbol;
|
||||
if (sysCodeTemplateRule.Digit.HasValue)
|
||||
{
|
||||
digit = sysCodeTemplateRule.Digit.Value;
|
||||
}
|
||||
if (sysCodeTemplateRule.IsProjectCode == true)
|
||||
{
|
||||
ruleCode = projectCode + symbol;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(sysCodeTemplateRule.Prefix))
|
||||
{
|
||||
ruleCode += sysCodeTemplateRule.Prefix + symbol;
|
||||
}
|
||||
if (sysCodeTemplateRule.IsUnitCode == true)
|
||||
{
|
||||
var unit = UnitService.GetUnitByUnitId(unitId);
|
||||
if (unit != null)
|
||||
{
|
||||
ruleCode += unit.UnitCode + symbol;
|
||||
}
|
||||
}
|
||||
ruleCodes = ruleCode;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var codeTempRule = db.Sys_CodeTemplateRule.FirstOrDefault(x => x.MenuId == menuId);
|
||||
if (codeTempRule != null && !string.IsNullOrEmpty(codeTempRule.Prefix))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(codeTempRule.Symbol))
|
||||
{
|
||||
symbol = codeTempRule.Symbol;
|
||||
}
|
||||
ruleCodes = codeTempRule.Prefix + symbol;
|
||||
if (codeTempRule.Digit.HasValue)
|
||||
{
|
||||
digit = codeTempRule.Digit.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////获取编码记录表最大排列序号
|
||||
int maxNewSortIndex = 0;
|
||||
var maxSortIndex = db.Sys_CodeRecords.Where(x => (x.ProjectId == projectId || projectId == null) && x.MenuId == menuId).Select(x => x.SortIndex).Max();
|
||||
|
||||
if (maxSortIndex.HasValue)
|
||||
{
|
||||
maxNewSortIndex = maxSortIndex.Value;
|
||||
}
|
||||
maxNewSortIndex = maxNewSortIndex + 1;
|
||||
code = (maxNewSortIndex.ToString().PadLeft(digit, '0')); ///字符自动补零
|
||||
if (!string.IsNullOrEmpty(ruleCodes))
|
||||
{
|
||||
code = ruleCodes + code;
|
||||
}
|
||||
|
||||
return code;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
public static void DeleteCodeRecordsByDataIdForApi(string dataId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var codeRecords = db.Sys_CodeRecords.FirstOrDefault(x => x.DataId == dataId);
|
||||
if (codeRecords != null)
|
||||
{
|
||||
///删除文件柜A中数据
|
||||
// BLL.FileCabinetAItemService.DeleteFileCabinetAItemByID(dataId);
|
||||
db.Sys_CodeRecords.DeleteOnSubmit(codeRecords);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 根据菜单id、项目id插入一条编码记录(数据新增到数据库 生成编码)
|
||||
/// <summary>
|
||||
/// 根据菜单id、项目id插入一条编码记录(数据新增到数据库 生成编码)
|
||||
/// </summary>
|
||||
/// <param name="menuId"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="unitId"></param>
|
||||
public static string InsertCodeRecordsByMenuIdProjectIdUnitId(string menuId, string projectId, string unitId, string dataId, DateTime? compileDate)
|
||||
#region 根据菜单id、项目id返回编码 (用于页面新增显示)
|
||||
/// <summary>
|
||||
/// 根据菜单id、项目id返回编码 (用于页面新增显示)
|
||||
/// </summary>
|
||||
/// <param name="menuId"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static string ReturnCodeByMenuIdProjectId(string menuId, string projectId, string unitId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string code = string.Empty;
|
||||
string ruleCodes = string.Empty;
|
||||
int digit = 4;
|
||||
string symbol = "-"; ///间隔符
|
||||
var codeRecords = (from x in db.Sys_CodeRecords where x.MenuId == menuId && x.ProjectId == projectId orderby x.CompileDate descending select x).FirstOrDefault();
|
||||
if (codeRecords != null && !string.IsNullOrEmpty(codeRecords.RuleCodes))
|
||||
{
|
||||
ruleCodes = codeRecords.RuleCodes;
|
||||
if (codeRecords.Digit.HasValue)
|
||||
{
|
||||
digit = codeRecords.Digit.Value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
////项目
|
||||
string ruleCode = string.Empty;
|
||||
var project = db.Base_Project.FirstOrDefault(e => e.ProjectId == projectId) ;
|
||||
if (project != null)
|
||||
{
|
||||
string projectCode = project.ProjectCode; ///项目编号
|
||||
////编码规则表
|
||||
var sysCodeTemplateRule = db.ProjectData_CodeTemplateRule.FirstOrDefault(x => x.MenuId == menuId && x.ProjectId == projectId);
|
||||
if (sysCodeTemplateRule != null)
|
||||
{
|
||||
symbol = sysCodeTemplateRule.Symbol;
|
||||
if (sysCodeTemplateRule.Digit.HasValue)
|
||||
{
|
||||
digit = sysCodeTemplateRule.Digit.Value;
|
||||
}
|
||||
if (sysCodeTemplateRule.IsProjectCode == true)
|
||||
{
|
||||
ruleCode = projectCode + symbol;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(sysCodeTemplateRule.Prefix))
|
||||
{
|
||||
ruleCode += sysCodeTemplateRule.Prefix + symbol;
|
||||
}
|
||||
if (sysCodeTemplateRule.IsUnitCode == true)
|
||||
{
|
||||
var unit = db.Base_Unit.FirstOrDefault(x => x.UnitId == unitId);
|
||||
if (unit != null)
|
||||
{
|
||||
ruleCode += unit.UnitCode + symbol;
|
||||
}
|
||||
}
|
||||
ruleCodes = ruleCode;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var codeTempRule = db.Sys_CodeTemplateRule.FirstOrDefault(x => x.MenuId == menuId);
|
||||
if (codeTempRule != null && !string.IsNullOrEmpty(codeTempRule.Prefix))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(codeTempRule.Symbol))
|
||||
{
|
||||
symbol = codeTempRule.Symbol;
|
||||
}
|
||||
ruleCodes = codeTempRule.Prefix + symbol;
|
||||
if (codeTempRule.Digit.HasValue)
|
||||
{
|
||||
digit = codeTempRule.Digit.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////获取编码记录表最大排列序号
|
||||
int maxNewSortIndex = 0;
|
||||
var maxSortIndex = db.Sys_CodeRecords.Where(x => (x.ProjectId == projectId || projectId == null) && x.MenuId == menuId).Select(x => x.SortIndex).Max();
|
||||
|
||||
if (maxSortIndex.HasValue)
|
||||
{
|
||||
maxNewSortIndex = maxSortIndex.Value;
|
||||
}
|
||||
maxNewSortIndex = maxNewSortIndex + 1;
|
||||
code = (maxNewSortIndex.ToString().PadLeft(digit, '0')); ///字符自动补零
|
||||
if (!string.IsNullOrEmpty(ruleCodes))
|
||||
{
|
||||
code = ruleCodes + code;
|
||||
}
|
||||
|
||||
return code;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据菜单id、项目id插入一条编码记录(数据新增到数据库 生成编码)
|
||||
/// <summary>
|
||||
/// 根据菜单id、项目id插入一条编码记录(数据新增到数据库 生成编码)
|
||||
/// </summary>
|
||||
/// <param name="menuId"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="unitId"></param>
|
||||
public static string InsertCodeRecordsByMenuIdProjectIdUnitId(string menuId, string projectId, string unitId, string dataId, DateTime? compileDate)
|
||||
{
|
||||
string ruleCode = string.Empty;
|
||||
var IsHaveCodeRecords = Funs.DB.Sys_CodeRecords.FirstOrDefault(x => x.DataId == dataId);
|
||||
|
@ -276,16 +290,148 @@ namespace BLL
|
|||
|
||||
return ruleCode;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据菜单id,项目id 更新编码记录(当编码规则改变的时候 更新编码)
|
||||
/// <summary>
|
||||
/// 根据菜单id 更新编码记录(当编码规则改变的时候 更新编码)
|
||||
/// </summary>
|
||||
/// <param name="menuId"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="unitId"></param>
|
||||
public static void UpdateCodeRecordsByMenuIdProjectId(string menuId, string projectId)
|
||||
|
||||
public static string InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(string menuId, string projectId, string unitId, string dataId, DateTime? compileDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string ruleCode = string.Empty;
|
||||
var IsHaveCodeRecords = db.Sys_CodeRecords.FirstOrDefault(x => x.DataId == dataId);
|
||||
if (IsHaveCodeRecords == null) ///是否已存在编码
|
||||
{
|
||||
string ruleCodeower = string.Empty;
|
||||
int digit = 4; ///流水位数
|
||||
string symbolower = "-"; ///业主间隔符
|
||||
int digitower = 4; ///业主流水位数
|
||||
string symbol = "-"; ///间隔符
|
||||
var project = db.Base_Project.FirstOrDefault(e => e.ProjectId == projectId); ////项目
|
||||
if (project != null && !string.IsNullOrEmpty(dataId))
|
||||
{
|
||||
string projectCode = project.ProjectCode; ///项目编号
|
||||
////编码规则表
|
||||
var sysCodeTemplateRule = db.ProjectData_CodeTemplateRule.FirstOrDefault(x => x.MenuId == menuId && x.ProjectId == projectId);
|
||||
if (sysCodeTemplateRule != null)
|
||||
{
|
||||
symbol = sysCodeTemplateRule.Symbol;
|
||||
symbolower = sysCodeTemplateRule.OwerSymbol;
|
||||
|
||||
if (sysCodeTemplateRule.Digit.HasValue)
|
||||
{
|
||||
digit = sysCodeTemplateRule.Digit.Value;
|
||||
}
|
||||
if (sysCodeTemplateRule.OwerDigit.HasValue)
|
||||
{
|
||||
digitower = sysCodeTemplateRule.OwerDigit.Value;
|
||||
}
|
||||
if (sysCodeTemplateRule.IsProjectCode == true)
|
||||
{
|
||||
ruleCode = projectCode + symbol;
|
||||
}
|
||||
if (sysCodeTemplateRule.OwerIsProjectCode == true)
|
||||
{
|
||||
ruleCodeower = projectCode + symbolower;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(sysCodeTemplateRule.Prefix))
|
||||
{
|
||||
ruleCode += sysCodeTemplateRule.Prefix + symbol;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(sysCodeTemplateRule.OwerPrefix))
|
||||
{
|
||||
ruleCodeower += sysCodeTemplateRule.OwerPrefix + symbolower;
|
||||
}
|
||||
if (sysCodeTemplateRule.IsUnitCode == true || sysCodeTemplateRule.OwerIsUnitCode == true)
|
||||
{
|
||||
var unit = db.Base_Unit.FirstOrDefault(x => x.UnitId == unitId);
|
||||
if (unit != null)
|
||||
{
|
||||
if (sysCodeTemplateRule.IsUnitCode == true)
|
||||
{ ruleCode = unit.UnitCode + symbol; }
|
||||
|
||||
if (sysCodeTemplateRule.OwerIsUnitCode == true)
|
||||
{
|
||||
ruleCodeower = unit.UnitCode + symbolower;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////获取编码记录表最大排列序号
|
||||
int maxNewSortIndex = 0;
|
||||
if (!String.IsNullOrEmpty(projectId))
|
||||
{
|
||||
var maxSortIndex = db.Sys_CodeRecords.Where(x => x.ProjectId == projectId && x.MenuId == menuId).Select(x => x.SortIndex).Max();
|
||||
if (maxSortIndex.HasValue)
|
||||
{
|
||||
maxNewSortIndex = maxSortIndex.Value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var maxSortIndexNull = db.Sys_CodeRecords.Where(x => x.MenuId == menuId).Select(x => x.SortIndex).Max();
|
||||
if (maxSortIndexNull.HasValue)
|
||||
{
|
||||
maxNewSortIndex = maxSortIndexNull.Value;
|
||||
}
|
||||
}
|
||||
maxNewSortIndex = maxNewSortIndex + 1;
|
||||
////插入数据库
|
||||
Model.Sys_CodeRecords newCodeRecords = new Model.Sys_CodeRecords
|
||||
{
|
||||
CodeRecordId = SQLHelper.GetNewID(typeof(Model.Sys_CodeRecords))
|
||||
};
|
||||
if (project != null)
|
||||
{
|
||||
newCodeRecords.ProjectId = project.ProjectId;
|
||||
}
|
||||
newCodeRecords.MenuId = menuId;
|
||||
newCodeRecords.DataId = dataId;
|
||||
newCodeRecords.UnitId = unitId;
|
||||
newCodeRecords.SortIndex = maxNewSortIndex;
|
||||
newCodeRecords.CompileDate = compileDate;
|
||||
newCodeRecords.RuleCodes = ruleCode;
|
||||
newCodeRecords.Digit = digit;
|
||||
newCodeRecords.OwnerRuleCodes = ruleCodeower;
|
||||
newCodeRecords.OwerDigit = digitower;
|
||||
if (!string.IsNullOrEmpty(ruleCode))
|
||||
{
|
||||
newCodeRecords.Code = ruleCode + (maxNewSortIndex.ToString().PadLeft(digit, '0')); ///字符自动补零 编码
|
||||
}
|
||||
else
|
||||
{
|
||||
newCodeRecords.Code = (maxNewSortIndex.ToString().PadLeft(digit, '0'));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(ruleCodeower))
|
||||
{
|
||||
newCodeRecords.OwnerCode = ruleCodeower + (maxNewSortIndex.ToString().PadLeft(digitower, '0')); ///字符自动补零 业主编码
|
||||
}
|
||||
else
|
||||
{
|
||||
newCodeRecords.OwnerCode = (maxNewSortIndex.ToString().PadLeft(digitower, '0'));
|
||||
}
|
||||
db.Sys_CodeRecords.InsertOnSubmit(newCodeRecords);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
ruleCode = IsHaveCodeRecords.Code;
|
||||
}
|
||||
|
||||
return ruleCode;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 根据菜单id,项目id 更新编码记录(当编码规则改变的时候 更新编码)
|
||||
/// <summary>
|
||||
/// 根据菜单id 更新编码记录(当编码规则改变的时候 更新编码)
|
||||
/// </summary>
|
||||
/// <param name="menuId"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="unitId"></param>
|
||||
public static void UpdateCodeRecordsByMenuIdProjectId(string menuId, string projectId)
|
||||
{
|
||||
var codeRecords = from x in Funs.DB.Sys_CodeRecords where x.MenuId == menuId && x.ProjectId == projectId select x;
|
||||
if (codeRecords.Count() > 0)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using BLL.CNCECHSSEService;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
@ -501,12 +502,28 @@ namespace BLL
|
|||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void DeleteAttachFileByIdForApi(string id)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.AttachFile attachFile = db.AttachFile.FirstOrDefault(e => e.ToKeyId == id);
|
||||
if (attachFile != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(attachFile.AttachUrl))
|
||||
{
|
||||
UploadFileService.DeleteFile(Funs.RootPath, attachFile.AttachUrl);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///根据主键删除附件
|
||||
/// </summary>
|
||||
/// <param name="lawRegulationId"></param>
|
||||
public static void DeleteAttachFileById(string menuId, string id)
|
||||
db.AttachFile.DeleteOnSubmit(attachFile);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///根据主键删除附件
|
||||
/// </summary>
|
||||
/// <param name="lawRegulationId"></param>
|
||||
public static void DeleteAttachFileById(string menuId, string id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.AttachFile attachFile = db.AttachFile.FirstOrDefault(e => e.MenuId == menuId && e.ToKeyId == id);
|
||||
|
@ -520,15 +537,32 @@ namespace BLL
|
|||
db.AttachFile.DeleteOnSubmit(attachFile);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
public static void DeleteAttachFileByIdForApi(string menuId, string id)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.AttachFile attachFile = db.AttachFile.FirstOrDefault(e => e.MenuId == menuId && e.ToKeyId == id);
|
||||
if (attachFile != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(attachFile.AttachUrl))
|
||||
{
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, attachFile.AttachUrl);
|
||||
}
|
||||
|
||||
#region 根据主键删除流程
|
||||
/// <summary>
|
||||
///根据主键删除流程
|
||||
/// </summary>
|
||||
/// <param name="lawRegulationId"></param>
|
||||
public static void DeleteFlowOperateByID(string id)
|
||||
db.AttachFile.DeleteOnSubmit(attachFile);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据主键删除流程
|
||||
/// <summary>
|
||||
///根据主键删除流程
|
||||
/// </summary>
|
||||
/// <param name="lawRegulationId"></param>
|
||||
public static void DeleteFlowOperateByID(string id)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
@ -628,15 +662,95 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
public static void btnSaveDataForApi(string projectId, string menuId, string dataId, string userId, bool isClosed, string content, string url)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Sys_FlowOperate newFlowOperate = new Model.Sys_FlowOperate
|
||||
{
|
||||
MenuId = menuId,
|
||||
DataId = dataId,
|
||||
OperaterId = userId,
|
||||
State = Const.State_2,
|
||||
IsClosed = isClosed,
|
||||
Opinion = "系统自动关闭流程",
|
||||
ProjectId = projectId,
|
||||
Url = url
|
||||
};
|
||||
var user = db.Sys_User.FirstOrDefault(e => e.UserId == newFlowOperate.OperaterId);
|
||||
if (user != null)
|
||||
{
|
||||
var roles = RoleService.GetRoleByRoleId(user.RoleId);
|
||||
if (roles != null && !string.IsNullOrEmpty(roles.RoleName))
|
||||
{
|
||||
newFlowOperate.AuditFlowName = "[" + roles.RoleName + "]";
|
||||
}
|
||||
else
|
||||
{
|
||||
newFlowOperate.AuditFlowName = "[" + user.UserName + "]";
|
||||
}
|
||||
|
||||
#region 接收http post请求
|
||||
/// 接收http post请求
|
||||
/// </summary>
|
||||
/// <param name="url">地址</param>
|
||||
/// <param name="parameters">查询参数集合</param>
|
||||
/// <returns></returns>
|
||||
public static string CreateGetHttpResponse(string url)
|
||||
newFlowOperate.AuditFlowName += "系统审核完成";
|
||||
}
|
||||
|
||||
var updateFlowOperate = from x in db.Sys_FlowOperate
|
||||
where x.DataId == newFlowOperate.DataId && (x.IsClosed == false || !x.IsClosed.HasValue)
|
||||
select x;
|
||||
if (updateFlowOperate.Count() > 0)
|
||||
{
|
||||
foreach (var item in updateFlowOperate)
|
||||
{
|
||||
item.OperaterId = newFlowOperate.OperaterId;
|
||||
item.OperaterTime = System.DateTime.Now;
|
||||
item.State = newFlowOperate.State;
|
||||
item.Opinion = newFlowOperate.Opinion;
|
||||
item.AuditFlowName = "系统审核完成";
|
||||
item.IsClosed = newFlowOperate.IsClosed;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int maxSortIndex = 1;
|
||||
var flowSet = db.Sys_FlowOperate.Where(x => x.DataId == newFlowOperate.DataId);
|
||||
var sortIndex = flowSet.Select(x => x.SortIndex).Max();
|
||||
if (sortIndex.HasValue)
|
||||
{
|
||||
maxSortIndex = sortIndex.Value + 1;
|
||||
}
|
||||
newFlowOperate.FlowOperateId = SQLHelper.GetNewID(typeof(Model.Sys_FlowOperate));
|
||||
newFlowOperate.SortIndex = maxSortIndex;
|
||||
newFlowOperate.OperaterTime = System.DateTime.Now;
|
||||
newFlowOperate.AuditFlowName = "系统审核完成";
|
||||
db.Sys_FlowOperate.InsertOnSubmit(newFlowOperate);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
if (newFlowOperate.IsClosed == true)
|
||||
{
|
||||
var updateNoClosedFlowOperate = from x in Funs.DB.Sys_FlowOperate
|
||||
where x.DataId == newFlowOperate.DataId && (x.IsClosed == false || !x.IsClosed.HasValue)
|
||||
select x;
|
||||
if (updateNoClosedFlowOperate.Count() > 0)
|
||||
{
|
||||
foreach (var itemClosed in updateNoClosedFlowOperate)
|
||||
{
|
||||
itemClosed.IsClosed = true;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 接收http post请求
|
||||
/// 接收http post请求
|
||||
/// </summary>
|
||||
/// <param name="url">地址</param>
|
||||
/// <param name="parameters">查询参数集合</param>
|
||||
/// <returns></returns>
|
||||
public static string CreateGetHttpResponse(string url)
|
||||
{
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
|
||||
|
|
|
@ -350,13 +350,62 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
}
|
||||
public static void SaveAttachUrlForApi(string source, string attachUrl, string menuId, string toKeyId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string rootUrl = ConfigurationManager.AppSettings["localRoot"];
|
||||
if (string.IsNullOrEmpty(rootUrl))
|
||||
{
|
||||
rootUrl = Funs.RootPath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通过附件路径得到Source
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetSourceByAttachUrl(string attachUrl, int size, string oldSrouce)
|
||||
List<Model.AttachFile> sour = (from x in db.AttachFile
|
||||
where x.MenuId == menuId && x.ToKeyId == toKeyId
|
||||
select x).ToList();
|
||||
if (sour.Count() == 0)
|
||||
{
|
||||
Model.AttachFile att = new Model.AttachFile
|
||||
{
|
||||
AttachFileId = SQLHelper.GetNewID(),
|
||||
ToKeyId = toKeyId,
|
||||
AttachSource = source.ToString(),
|
||||
AttachUrl = attachUrl,
|
||||
MenuId = menuId,
|
||||
// ImageByte= imageByte,
|
||||
//AttachPath= attachPath,
|
||||
};
|
||||
if (menuId == BLL.Const.PersonListMenuId)
|
||||
{
|
||||
att.ImageByte = AttachFileService.SetImageToByteArray(rootUrl + attachUrl.Split(',')[0]);
|
||||
}
|
||||
db.AttachFile.InsertOnSubmit(att);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.AttachFile att = db.AttachFile.FirstOrDefault(x => x.MenuId == menuId && x.AttachFileId == sour.First().AttachFileId);
|
||||
if (att != null)
|
||||
{
|
||||
att.ToKeyId = toKeyId;
|
||||
att.AttachSource = source.ToString();
|
||||
att.AttachUrl = attachUrl;
|
||||
att.MenuId = menuId;
|
||||
if (menuId == BLL.Const.PersonListMenuId)
|
||||
{
|
||||
att.ImageByte = AttachFileService.SetImageToByteArray(rootUrl + attachUrl.Split(',')[0]);
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 通过附件路径得到Source
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetSourceByAttachUrl(string attachUrl, int size, string oldSrouce)
|
||||
{
|
||||
string attachSource = string.Empty;
|
||||
if (!string.IsNullOrEmpty(attachUrl))
|
||||
|
|
|
@ -1,150 +1,179 @@
|
|||
using System;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 无损委托明细
|
||||
/// </summary>
|
||||
public static class Batch_BatchTrustItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取无损委托明细
|
||||
/// </summary>
|
||||
/// <param name="batchTrustItemId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_Batch_BatchTrustItem GetBatchTrustItemById(string trustBatchItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return db.HJGL_Batch_BatchTrustItem.FirstOrDefault(e => e.TrustBatchItemId == trustBatchItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据无损委托Id获取相关明细信息
|
||||
/// </summary>
|
||||
/// <param name="hardTrustId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_Batch_BatchTrustItem> GetBatchTrustItemByTrustBatchId(string trustBatchId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return (from x in db.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustBatchId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加无损委托明细
|
||||
/// </summary>
|
||||
/// <param name="batchTrustItem"></param>
|
||||
public static void AddBatchTrustItem(Model.HJGL_Batch_BatchTrustItem batchTrustItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_Batch_BatchTrustItem newTrustBatchItem = new Model.HJGL_Batch_BatchTrustItem
|
||||
/// <summary>
|
||||
/// 无损委托明细
|
||||
/// </summary>
|
||||
public static class Batch_BatchTrustItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取无损委托明细
|
||||
/// </summary>
|
||||
/// <param name="batchTrustItemId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_Batch_BatchTrustItem GetBatchTrustItemById(string trustBatchItemId)
|
||||
{
|
||||
TrustBatchItemId = batchTrustItem.TrustBatchItemId,
|
||||
TrustBatchId = batchTrustItem.TrustBatchId,
|
||||
PointBatchItemId = batchTrustItem.PointBatchItemId,
|
||||
RepairRecordId = batchTrustItem.RepairRecordId,
|
||||
WeldJointId = batchTrustItem.WeldJointId,
|
||||
CreateDate = batchTrustItem.CreateDate,
|
||||
RepairNum = batchTrustItem.RepairNum,
|
||||
};
|
||||
db.HJGL_Batch_BatchTrustItem.InsertOnSubmit(newTrustBatchItem);
|
||||
db.SubmitChanges();
|
||||
UpdateTrustNum(batchTrustItem.TrustBatchItemId, 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改无损委托
|
||||
/// </summary>
|
||||
/// <param name="batchTrustItem"></param>
|
||||
public static void UpdateBatchTrustItem(Model.HJGL_Batch_BatchTrustItem batchTrustItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_Batch_BatchTrustItem newBatchTrustItem = db.HJGL_Batch_BatchTrustItem.FirstOrDefault(e => e.TrustBatchItemId == batchTrustItem.TrustBatchItemId);
|
||||
if (newBatchTrustItem != null)
|
||||
{
|
||||
newBatchTrustItem.PointBatchItemId = batchTrustItem.PointBatchItemId;
|
||||
newBatchTrustItem.WeldJointId = batchTrustItem.WeldJointId;
|
||||
newBatchTrustItem.CreateDate = batchTrustItem.CreateDate;
|
||||
newBatchTrustItem.RepairNum = batchTrustItem.RepairNum;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据无损委托Id获取相关明细视图信息
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="hardTrustId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.View_Batch_BatchTrustItem> GetViewBatchTrustItem(string trustBatchId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return (from x in db.View_Batch_BatchTrustItem where x.TrustBatchId == trustBatchId select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id删除明细信息
|
||||
/// </summary>
|
||||
/// <param name="checkItemId"></param>
|
||||
public static void DeleteTrustItemByTrustBatchItemId(string trustBatchItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_Batch_BatchTrustItem trustItem = db.HJGL_Batch_BatchTrustItem.FirstOrDefault(e => e.TrustBatchItemId == trustBatchItemId);
|
||||
if (trustItem != null)
|
||||
{
|
||||
UpdateTrustNum(trustBatchItemId, -1);
|
||||
db.HJGL_Batch_BatchTrustItem.DeleteOnSubmit(trustItem);
|
||||
db.SubmitChanges();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新委托次数
|
||||
/// </summary>
|
||||
/// <param name="trustBatchItemId">委托批明细ID</param>
|
||||
/// <param name="num"></param>
|
||||
public static void UpdateTrustNum(string trustBatchItemId, int num)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var trustBatchItem = db.HJGL_Batch_BatchTrustItem.FirstOrDefault(x => x.TrustBatchItemId == trustBatchItemId);
|
||||
if (trustBatchItem != null)
|
||||
{
|
||||
trustBatchItem.TrustNum = trustBatchItem.TrustNum ?? 0 + num;
|
||||
if (trustBatchItem.TrustNum < 0)
|
||||
{
|
||||
trustBatchItem.TrustNum = 0;
|
||||
}
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
#region 是否满足生成委托条件
|
||||
/// <summary>
|
||||
/// 是否满足生成委托条件
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool GetIsGenerateTrust(string pointBatchItemId)
|
||||
{
|
||||
bool isShow = true;
|
||||
var trustBatchItem = Funs.DB.HJGL_Batch_BatchTrustItem.FirstOrDefault(x => x.PointBatchItemId == pointBatchItemId);
|
||||
if (trustBatchItem != null)
|
||||
{
|
||||
var checkItem = Funs.DB.HJGL_Batch_NDEItem.FirstOrDefault(x => x.TrustBatchItemId == trustBatchItem.TrustBatchItemId && x.CheckResult == "1");
|
||||
if (checkItem != null)
|
||||
{
|
||||
isShow = false;
|
||||
}
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return db.HJGL_Batch_BatchTrustItem.FirstOrDefault(e => e.TrustBatchItemId == trustBatchItemId);
|
||||
}
|
||||
|
||||
return isShow;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据无损委托Id获取相关明细信息
|
||||
/// </summary>
|
||||
/// <param name="hardTrustId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_Batch_BatchTrustItem> GetBatchTrustItemByTrustBatchId(string trustBatchId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return (from x in db.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustBatchId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加无损委托明细
|
||||
/// </summary>
|
||||
/// <param name="batchTrustItem"></param>
|
||||
public static void AddBatchTrustItem(Model.HJGL_Batch_BatchTrustItem batchTrustItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_Batch_BatchTrustItem newTrustBatchItem = new Model.HJGL_Batch_BatchTrustItem
|
||||
{
|
||||
TrustBatchItemId = batchTrustItem.TrustBatchItemId,
|
||||
TrustBatchId = batchTrustItem.TrustBatchId,
|
||||
PointBatchItemId = batchTrustItem.PointBatchItemId,
|
||||
RepairRecordId = batchTrustItem.RepairRecordId,
|
||||
WeldJointId = batchTrustItem.WeldJointId,
|
||||
CreateDate = batchTrustItem.CreateDate,
|
||||
RepairNum = batchTrustItem.RepairNum,
|
||||
};
|
||||
db.HJGL_Batch_BatchTrustItem.InsertOnSubmit(newTrustBatchItem);
|
||||
db.SubmitChanges();
|
||||
UpdateTrustNum(batchTrustItem.TrustBatchItemId, 1);
|
||||
|
||||
}
|
||||
public static void AddBatchTrustItemForApi(Model.HJGL_Batch_BatchTrustItem batchTrustItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_Batch_BatchTrustItem newTrustBatchItem = new Model.HJGL_Batch_BatchTrustItem
|
||||
{
|
||||
TrustBatchItemId = batchTrustItem.TrustBatchItemId,
|
||||
TrustBatchId = batchTrustItem.TrustBatchId,
|
||||
PointBatchItemId = batchTrustItem.PointBatchItemId,
|
||||
RepairRecordId = batchTrustItem.RepairRecordId,
|
||||
WeldJointId = batchTrustItem.WeldJointId,
|
||||
CreateDate = batchTrustItem.CreateDate,
|
||||
RepairNum = batchTrustItem.RepairNum,
|
||||
};
|
||||
db.HJGL_Batch_BatchTrustItem.InsertOnSubmit(newTrustBatchItem);
|
||||
|
||||
var trustBatchItem = db.HJGL_Batch_BatchTrustItem.FirstOrDefault(x => x.TrustBatchItemId == batchTrustItem.TrustBatchItemId);
|
||||
if (trustBatchItem != null)
|
||||
{
|
||||
trustBatchItem.TrustNum = trustBatchItem.TrustNum ?? 0 + 1;
|
||||
if (trustBatchItem.TrustNum < 0)
|
||||
{
|
||||
trustBatchItem.TrustNum = 0;
|
||||
}
|
||||
}
|
||||
db.SubmitChanges();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改无损委托
|
||||
/// </summary>
|
||||
/// <param name="batchTrustItem"></param>
|
||||
public static void UpdateBatchTrustItem(Model.HJGL_Batch_BatchTrustItem batchTrustItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_Batch_BatchTrustItem newBatchTrustItem = db.HJGL_Batch_BatchTrustItem.FirstOrDefault(e => e.TrustBatchItemId == batchTrustItem.TrustBatchItemId);
|
||||
if (newBatchTrustItem != null)
|
||||
{
|
||||
newBatchTrustItem.PointBatchItemId = batchTrustItem.PointBatchItemId;
|
||||
newBatchTrustItem.WeldJointId = batchTrustItem.WeldJointId;
|
||||
newBatchTrustItem.CreateDate = batchTrustItem.CreateDate;
|
||||
newBatchTrustItem.RepairNum = batchTrustItem.RepairNum;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据无损委托Id获取相关明细视图信息
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="hardTrustId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.View_Batch_BatchTrustItem> GetViewBatchTrustItem(string trustBatchId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return (from x in db.View_Batch_BatchTrustItem where x.TrustBatchId == trustBatchId select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id删除明细信息
|
||||
/// </summary>
|
||||
/// <param name="checkItemId"></param>
|
||||
public static void DeleteTrustItemByTrustBatchItemId(string trustBatchItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_Batch_BatchTrustItem trustItem = db.HJGL_Batch_BatchTrustItem.FirstOrDefault(e => e.TrustBatchItemId == trustBatchItemId);
|
||||
if (trustItem != null)
|
||||
{
|
||||
UpdateTrustNum(trustBatchItemId, -1);
|
||||
db.HJGL_Batch_BatchTrustItem.DeleteOnSubmit(trustItem);
|
||||
db.SubmitChanges();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新委托次数
|
||||
/// </summary>
|
||||
/// <param name="trustBatchItemId">委托批明细ID</param>
|
||||
/// <param name="num"></param>
|
||||
public static void UpdateTrustNum(string trustBatchItemId, int num)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var trustBatchItem = db.HJGL_Batch_BatchTrustItem.FirstOrDefault(x => x.TrustBatchItemId == trustBatchItemId);
|
||||
if (trustBatchItem != null)
|
||||
{
|
||||
trustBatchItem.TrustNum = trustBatchItem.TrustNum ?? 0 + num;
|
||||
if (trustBatchItem.TrustNum < 0)
|
||||
{
|
||||
trustBatchItem.TrustNum = 0;
|
||||
}
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
#region 是否满足生成委托条件
|
||||
/// <summary>
|
||||
/// 是否满足生成委托条件
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool GetIsGenerateTrust(string pointBatchItemId)
|
||||
{
|
||||
bool isShow = true;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var trustBatchItem = db.HJGL_Batch_BatchTrustItem.FirstOrDefault(x => x.PointBatchItemId == pointBatchItemId);
|
||||
if (trustBatchItem != null)
|
||||
{
|
||||
var checkItem = db.HJGL_Batch_NDEItem.FirstOrDefault(x => x.TrustBatchItemId == trustBatchItem.TrustBatchItemId && x.CheckResult == "1");
|
||||
if (checkItem != null)
|
||||
{
|
||||
isShow = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return isShow;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -450,13 +450,36 @@ namespace BLL
|
|||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据焊接日报ID获取焊接日期
|
||||
/// </summary>
|
||||
/// <param name="dReportID"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime GetReportDateByDReportID(string dReportID)
|
||||
public static void UpdateJointNoAddGForApi(string jotId, string jointAttribute, string operateState)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
if (operateState == Const.BtnDelete || jointAttribute != "固定")
|
||||
{
|
||||
Model.PW_JointInfo deleteJointInfo = db.PW_JointInfo.FirstOrDefault(e => e.JOT_ID == jotId);
|
||||
if (deleteJointInfo.JOT_JointNo.Last() == 'G')
|
||||
{
|
||||
deleteJointInfo.JOT_JointNo = deleteJointInfo.JOT_JointNo.Substring(0, deleteJointInfo.JOT_JointNo.Length - 1);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.PW_JointInfo addJointInfo = db.PW_JointInfo.FirstOrDefault(e => e.JOT_ID == jotId);
|
||||
if (addJointInfo.JOT_JointNo.Last() != 'G')
|
||||
{
|
||||
addJointInfo.JOT_JointNo += "G";
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据焊接日报ID获取焊接日期
|
||||
/// </summary>
|
||||
/// <param name="dReportID"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime GetReportDateByDReportID(string dReportID)
|
||||
{
|
||||
return (from y in Funs.DB.BO_WeldReportMain where y.DReportID == dReportID select y.JOT_WeldDate).FirstOrDefault();
|
||||
}
|
||||
|
|
|
@ -122,12 +122,28 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据专项检查ID删除一条专项检查明细信息
|
||||
/// </summary>
|
||||
/// <param name="checkSpecialDetailId"></param>
|
||||
public static void DeleteCheckSpecialDetailById(string checkSpecialDetailId)
|
||||
public static void DeleteCheckSpecialDetailsForApi(string checkSpecialId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q = (from x in db.Check_CheckSpecialDetail where x.CheckSpecialId == checkSpecialId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
//foreach (var item in q)
|
||||
//{
|
||||
// ////删除附件表
|
||||
// BLL.CommonService.DeleteAttachFileById(item.CheckSpecialDetailId);
|
||||
//}
|
||||
db.Check_CheckSpecialDetail.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据专项检查ID删除一条专项检查明细信息
|
||||
/// </summary>
|
||||
/// <param name="checkSpecialDetailId"></param>
|
||||
public static void DeleteCheckSpecialDetailById(string checkSpecialDetailId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.Check_CheckSpecialDetail where x.CheckSpecialDetailId == checkSpecialDetailId select x).FirstOrDefault();
|
||||
|
|
|
@ -120,12 +120,36 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据专项检查ID 更新专项检查状态
|
||||
/// </summary>
|
||||
/// <param name="checkSpecialDetailId"></param>
|
||||
public static void UpdateCheckSpecialStates(string checkSpecialId)
|
||||
public static void UpdateCheckSpecialForApi(Model.Check_CheckSpecial checkSpecial)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_CheckSpecial newCheckSpecial = db.Check_CheckSpecial.FirstOrDefault(e => e.CheckSpecialId == checkSpecial.CheckSpecialId);
|
||||
if (newCheckSpecial != null)
|
||||
{
|
||||
newCheckSpecial.CheckSpecialCode = checkSpecial.CheckSpecialCode;
|
||||
//newCheckSpecial.ProjectId = checkSpecial.ProjectId;
|
||||
newCheckSpecial.CheckPerson = checkSpecial.CheckPerson;
|
||||
newCheckSpecial.CheckTime = checkSpecial.CheckTime;
|
||||
newCheckSpecial.ScanUrl = checkSpecial.ScanUrl;
|
||||
newCheckSpecial.DaySummary = checkSpecial.DaySummary;
|
||||
newCheckSpecial.PartInUnits = checkSpecial.PartInUnits;
|
||||
newCheckSpecial.PartInPersons = checkSpecial.PartInPersons;
|
||||
newCheckSpecial.PartInPersonIds = checkSpecial.PartInPersonIds;
|
||||
newCheckSpecial.PartInPersonNames = checkSpecial.PartInPersonNames;
|
||||
newCheckSpecial.CheckAreas = checkSpecial.CheckAreas;
|
||||
newCheckSpecial.States = checkSpecial.States;
|
||||
newCheckSpecial.CheckType = checkSpecial.CheckType;
|
||||
newCheckSpecial.CheckItemSetId = checkSpecial.CheckItemSetId;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据专项检查ID 更新专项检查状态
|
||||
/// </summary>
|
||||
/// <param name="checkSpecialDetailId"></param>
|
||||
public static void UpdateCheckSpecialStates(string checkSpecialId)
|
||||
{
|
||||
var getS = Funs.DB.Check_CheckSpecial.FirstOrDefault(x => x.CheckSpecialId == checkSpecialId);
|
||||
if (getS != null && getS.States == Const.State_1)
|
||||
|
@ -137,13 +161,29 @@ namespace BLL
|
|||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void UpdateCheckSpecialStatesForApi(string checkSpecialId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getS = db.Check_CheckSpecial.FirstOrDefault(x => x.CheckSpecialId == checkSpecialId);
|
||||
if (getS != null && getS.States == Const.State_1)
|
||||
{
|
||||
var getNCDetail = db.Check_CheckSpecialDetail.FirstOrDefault(x => x.CheckSpecialId == getS.CheckSpecialId && x.CompleteStatus == false);
|
||||
if (getNCDetail == null)
|
||||
{
|
||||
getS.States = Const.State_2;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据专项检查ID删除对应专项检查记录信息
|
||||
/// </summary>
|
||||
/// <param name="superviseCheckReportId"></param>
|
||||
public static void DeleteCheckSpecial(string checkSpecialId)
|
||||
/// <summary>
|
||||
/// 根据专项检查ID删除对应专项检查记录信息
|
||||
/// </summary>
|
||||
/// <param name="superviseCheckReportId"></param>
|
||||
public static void DeleteCheckSpecial(string checkSpecialId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.Check_CheckSpecial where x.CheckSpecialId == checkSpecialId select x).FirstOrDefault();
|
||||
|
@ -205,84 +245,160 @@ namespace BLL
|
|||
return name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="detailLists"></param>
|
||||
/// <param name="checkSpecial"></param>
|
||||
/// <returns></returns>
|
||||
public static string IssueRectification(List<Model.Check_CheckSpecialDetail> detailLists, Model.Check_CheckSpecial checkSpecial)
|
||||
{
|
||||
string info = string.Empty;
|
||||
if (detailLists.Count() > 0 && checkSpecial != null)
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="detailLists"></param>
|
||||
/// <param name="checkSpecial"></param>
|
||||
/// <returns></returns>
|
||||
public static string IssueRectification(List<Model.Check_CheckSpecialDetail> detailLists, Model.Check_CheckSpecial checkSpecial)
|
||||
{
|
||||
////隐患整改单
|
||||
var getDetail1 = detailLists.Where(x => x.CompleteStatus==false);
|
||||
if (getDetail1.Count() > 0)
|
||||
{
|
||||
var getUnitList = getDetail1.Select(x => x.UnitId).Distinct();
|
||||
foreach (var unitItem in getUnitList)
|
||||
{
|
||||
var getUnitItemList = getDetail1.Where(x => x.UnitId == unitItem);
|
||||
foreach (var item in getUnitItemList)
|
||||
string info = string.Empty;
|
||||
if (detailLists.Count() > 0 && checkSpecial != null)
|
||||
{
|
||||
////隐患整改单
|
||||
var getDetail1 = detailLists.Where(x => x.CompleteStatus == false);
|
||||
if (getDetail1.Count() > 0)
|
||||
{
|
||||
Model.HSSE_Hazard_HazardRegister register = Funs.DB.HSSE_Hazard_HazardRegister.FirstOrDefault(x => x.CheckItemDetailId == item.CheckSpecialDetailId);
|
||||
if (register == null)
|
||||
{
|
||||
register = new Model.HSSE_Hazard_HazardRegister();
|
||||
}
|
||||
register.ProjectId = checkSpecial.ProjectId;
|
||||
register.CheckItemDetailId = item.CheckSpecialDetailId;
|
||||
register.ProblemTypes = "2"; //1 安全问题 2 专项巡检
|
||||
register.RegisterTypesId = item.CheckItem;
|
||||
// register.CheckCycle = this.ckType.SelectedValue;
|
||||
register.IsEffective = "1";
|
||||
register.RegisterDate = checkSpecial.CheckTime;
|
||||
register.CheckTime = checkSpecial.CheckTime;
|
||||
register.ResponsibleUnit = item.UnitId;
|
||||
var getUnitList = getDetail1.Select(x => x.UnitId).Distinct();
|
||||
foreach (var unitItem in getUnitList)
|
||||
{
|
||||
var getUnitItemList = getDetail1.Where(x => x.UnitId == unitItem);
|
||||
foreach (var item in getUnitItemList)
|
||||
{
|
||||
Model.HSSE_Hazard_HazardRegister register = Funs.DB.HSSE_Hazard_HazardRegister.FirstOrDefault(x => x.CheckItemDetailId == item.CheckSpecialDetailId);
|
||||
if (register == null)
|
||||
{
|
||||
register = new Model.HSSE_Hazard_HazardRegister();
|
||||
}
|
||||
register.ProjectId = checkSpecial.ProjectId;
|
||||
register.CheckItemDetailId = item.CheckSpecialDetailId;
|
||||
register.ProblemTypes = "2"; //1 安全问题 2 专项巡检
|
||||
register.RegisterTypesId = item.CheckItem;
|
||||
// register.CheckCycle = this.ckType.SelectedValue;
|
||||
register.IsEffective = "1";
|
||||
register.RegisterDate = checkSpecial.CheckTime;
|
||||
register.CheckTime = checkSpecial.CheckTime;
|
||||
register.ResponsibleUnit = item.UnitId;
|
||||
|
||||
register.Place = item.WorkArea;
|
||||
register.Place = item.WorkArea;
|
||||
|
||||
register.RegisterDef = item.Unqualified;
|
||||
// register.HandleIdea = item.Suggestions;
|
||||
register.ResponsibleMan = item.HSEManage;
|
||||
register.Risk_Level = item.RiskLevel;
|
||||
register.Requirements = item.Suggestions;
|
||||
register.RegisterDef = item.Unqualified;
|
||||
// register.HandleIdea = item.Suggestions;
|
||||
register.ResponsibleMan = item.HSEManage;
|
||||
register.Risk_Level = item.RiskLevel;
|
||||
register.Requirements = item.Suggestions;
|
||||
|
||||
register.RectificationPeriod = item.LimitedDate;
|
||||
register.CheckManId = checkSpecial.CompileMan;
|
||||
//register.CutPayment = Funs.GetNewIntOrZero(this.txtCutPayment.Text.Trim());
|
||||
register.States = "1"; //待整改
|
||||
if (string.IsNullOrEmpty(register.HazardRegisterId))
|
||||
{
|
||||
register.HazardRegisterId = Guid.NewGuid().ToString();
|
||||
var url = AttachFileService.getFileUrl(item.CheckSpecialDetailId);
|
||||
register.ImageUrl = url;
|
||||
SaveAttachFile(register.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, url);
|
||||
BLL.HSSE_Hazard_HazardRegisterService.AddHazardRegister(register);
|
||||
}
|
||||
else
|
||||
{
|
||||
var url = AttachFileService.getFileUrl(item.CheckSpecialDetailId);
|
||||
register.ImageUrl = url;
|
||||
SaveAttachFile(register.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, url);
|
||||
BLL.HSSE_Hazard_HazardRegisterService.UpdateHazardRegister(register);
|
||||
}
|
||||
register.RectificationPeriod = item.LimitedDate;
|
||||
register.CheckManId = checkSpecial.CompileMan;
|
||||
//register.CutPayment = Funs.GetNewIntOrZero(this.txtCutPayment.Text.Trim());
|
||||
register.States = "1"; //待整改
|
||||
if (string.IsNullOrEmpty(register.HazardRegisterId))
|
||||
{
|
||||
register.HazardRegisterId = Guid.NewGuid().ToString();
|
||||
var url = AttachFileService.getFileUrl(item.CheckSpecialDetailId);
|
||||
register.ImageUrl = url;
|
||||
SaveAttachFile(register.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, url);
|
||||
BLL.HSSE_Hazard_HazardRegisterService.AddHazardRegister(register);
|
||||
}
|
||||
else
|
||||
{
|
||||
var url = AttachFileService.getFileUrl(item.CheckSpecialDetailId);
|
||||
register.ImageUrl = url;
|
||||
SaveAttachFile(register.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, url);
|
||||
BLL.HSSE_Hazard_HazardRegisterService.UpdateHazardRegister(register);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
info += "整改已下发。";
|
||||
}
|
||||
}
|
||||
info += "整改已下发。";
|
||||
}
|
||||
Check_CheckSpecialService.UpdateCheckSpecial(checkSpecial);
|
||||
}
|
||||
Check_CheckSpecialService.UpdateCheckSpecial(checkSpecial);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(info))
|
||||
{
|
||||
info += "请在相应办理页面提交!";
|
||||
if (!string.IsNullOrEmpty(info))
|
||||
{
|
||||
info += "请在相应办理页面提交!";
|
||||
}
|
||||
return info;
|
||||
}
|
||||
return info;
|
||||
}
|
||||
public static void SaveAttachFile(string dataId, string menuId, string url)
|
||||
public static string IssueRectificationForApi(List<Model.Check_CheckSpecialDetail> detailLists, Model.Check_CheckSpecial checkSpecial)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string info = string.Empty;
|
||||
if (detailLists.Count() > 0 && checkSpecial != null)
|
||||
{
|
||||
////隐患整改单
|
||||
var getDetail1 = detailLists.Where(x => x.CompleteStatus == false);
|
||||
if (getDetail1.Count() > 0)
|
||||
{
|
||||
var getUnitList = getDetail1.Select(x => x.UnitId).Distinct();
|
||||
foreach (var unitItem in getUnitList)
|
||||
{
|
||||
var getUnitItemList = getDetail1.Where(x => x.UnitId == unitItem);
|
||||
foreach (var item in getUnitItemList)
|
||||
{
|
||||
Model.HSSE_Hazard_HazardRegister register = db.HSSE_Hazard_HazardRegister.FirstOrDefault(x => x.CheckItemDetailId == item.CheckSpecialDetailId);
|
||||
if (register == null)
|
||||
{
|
||||
register = new Model.HSSE_Hazard_HazardRegister();
|
||||
db.HSSE_Hazard_HazardRegister.InsertOnSubmit(register);
|
||||
|
||||
}
|
||||
register.ProjectId = checkSpecial.ProjectId;
|
||||
register.CheckItemDetailId = item.CheckSpecialDetailId;
|
||||
register.ProblemTypes = "2"; //1 安全问题 2 专项巡检
|
||||
register.RegisterTypesId = item.CheckItem;
|
||||
// register.CheckCycle = this.ckType.SelectedValue;
|
||||
register.IsEffective = "1";
|
||||
register.RegisterDate = checkSpecial.CheckTime;
|
||||
register.CheckTime = checkSpecial.CheckTime;
|
||||
register.ResponsibleUnit = item.UnitId;
|
||||
|
||||
register.Place = item.WorkArea;
|
||||
|
||||
register.RegisterDef = item.Unqualified;
|
||||
// register.HandleIdea = item.Suggestions;
|
||||
register.ResponsibleMan = item.HSEManage;
|
||||
register.Risk_Level = item.RiskLevel;
|
||||
register.Requirements = item.Suggestions;
|
||||
|
||||
register.RectificationPeriod = item.LimitedDate;
|
||||
register.CheckManId = checkSpecial.CompileMan;
|
||||
//register.CutPayment = Funs.GetNewIntOrZero(this.txtCutPayment.Text.Trim());
|
||||
register.States = "1"; //待整改
|
||||
if (string.IsNullOrEmpty(register.HazardRegisterId))
|
||||
{
|
||||
register.HazardRegisterId = Guid.NewGuid().ToString();
|
||||
var url = AttachFileService.getFileUrl(item.CheckSpecialDetailId);
|
||||
register.ImageUrl = url;
|
||||
SaveAttachFile(register.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, url);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
var url = AttachFileService.getFileUrl(item.CheckSpecialDetailId);
|
||||
register.ImageUrl = url;
|
||||
SaveAttachFile(register.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, url);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
info += "整改已下发。";
|
||||
}
|
||||
Check_CheckSpecialService.UpdateCheckSpecialForApi(checkSpecial);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(info))
|
||||
{
|
||||
info += "请在相应办理页面提交!";
|
||||
}
|
||||
return info;
|
||||
}
|
||||
}
|
||||
public static void SaveAttachFile(string dataId, string menuId, string url)
|
||||
{
|
||||
Model.ToDoItem toDoItem = new Model.ToDoItem
|
||||
{
|
||||
|
|
|
@ -162,13 +162,45 @@ namespace BLL
|
|||
db.Check_IncentiveNotice.InsertOnSubmit(newIncentiveNotice);
|
||||
db.SubmitChanges();
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectIncentiveNoticeMenuId, incentiveNotice.ProjectId, null, incentiveNotice.IncentiveNoticeId, incentiveNotice.CompileDate);
|
||||
}
|
||||
}
|
||||
public static void AddIncentiveNoticeForApi(Model.Check_IncentiveNotice incentiveNotice)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_IncentiveNotice newIncentiveNotice = new Model.Check_IncentiveNotice
|
||||
{
|
||||
IncentiveNoticeId = incentiveNotice.IncentiveNoticeId,
|
||||
ProjectId = incentiveNotice.ProjectId,
|
||||
IncentiveNoticeCode = incentiveNotice.IncentiveNoticeCode,
|
||||
UnitId = incentiveNotice.UnitId,
|
||||
TeamGroupId = incentiveNotice.TeamGroupId,
|
||||
IncentiveDate = incentiveNotice.IncentiveDate,
|
||||
PersonId = incentiveNotice.PersonId,
|
||||
BasicItem = incentiveNotice.BasicItem,
|
||||
IncentiveMoney = incentiveNotice.IncentiveMoney,
|
||||
TitleReward = incentiveNotice.TitleReward,
|
||||
MattleReward = incentiveNotice.MattleReward,
|
||||
FileContents = incentiveNotice.FileContents,
|
||||
AttachUrl = incentiveNotice.AttachUrl,
|
||||
CompileMan = incentiveNotice.CompileMan,
|
||||
CompileDate = incentiveNotice.CompileDate,
|
||||
States = incentiveNotice.States,
|
||||
SignMan = incentiveNotice.SignMan,
|
||||
ApproveMan = incentiveNotice.ApproveMan,
|
||||
RewardType = incentiveNotice.RewardType,
|
||||
Currency = incentiveNotice.Currency
|
||||
};
|
||||
db.Check_IncentiveNotice.InsertOnSubmit(newIncentiveNotice);
|
||||
db.SubmitChanges();
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectIncentiveNoticeMenuId, incentiveNotice.ProjectId, null, incentiveNotice.IncentiveNoticeId, incentiveNotice.CompileDate);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改奖励通知单
|
||||
/// </summary>
|
||||
/// <param name="incentiveNotice"></param>
|
||||
public static void UpdateIncentiveNotice(Model.Check_IncentiveNotice incentiveNotice)
|
||||
/// <summary>
|
||||
/// 修改奖励通知单
|
||||
/// </summary>
|
||||
/// <param name="incentiveNotice"></param>
|
||||
public static void UpdateIncentiveNotice(Model.Check_IncentiveNotice incentiveNotice)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Check_IncentiveNotice newIncentiveNotice = db.Check_IncentiveNotice.FirstOrDefault(e => e.IncentiveNoticeId == incentiveNotice.IncentiveNoticeId);
|
||||
|
|
|
@ -52,13 +52,43 @@ namespace BLL
|
|||
|
||||
db.Training_TestRecord.InsertOnSubmit(newTestRecord);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void AddTestRecordForApi(Model.Training_TestRecord testRecord)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Training_TestRecord newTestRecord = new Model.Training_TestRecord
|
||||
{
|
||||
TestRecordId = testRecord.TestRecordId,
|
||||
ProjectId = testRecord.ProjectId,
|
||||
TestPlanId = testRecord.TestPlanId,
|
||||
TestManId = testRecord.TestManId,
|
||||
TestType = testRecord.TestType,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// 修改考试记录信息
|
||||
/// </summary>
|
||||
/// <param name="Training"></param>
|
||||
public static void UpdateTestRecord(Model.Training_TestRecord testRecord)
|
||||
if (string.IsNullOrEmpty(newTestRecord.TestType))
|
||||
{
|
||||
var getTrainTypeName = (from x in db.Training_TestPlan
|
||||
join y in db.Training_Plan on x.PlanId equals y.PlanId
|
||||
join z in db.Base_TrainType on y.TrainTypeId equals z.TrainTypeId
|
||||
where x.TestPlanId == testRecord.TestPlanId
|
||||
select z).FirstOrDefault();
|
||||
|
||||
if (getTrainTypeName != null)
|
||||
{
|
||||
testRecord.TestType = getTrainTypeName.TrainTypeName;
|
||||
}
|
||||
}
|
||||
|
||||
db.Training_TestRecord.InsertOnSubmit(newTestRecord);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改考试记录信息
|
||||
/// </summary>
|
||||
/// <param name="Training"></param>
|
||||
public static void UpdateTestRecord(Model.Training_TestRecord testRecord)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Training_TestRecord newTestRecord = db.Training_TestRecord.FirstOrDefault(e => e.TestRecordId == testRecord.TestRecordId);
|
||||
|
|
|
@ -1253,12 +1253,29 @@ namespace BLL
|
|||
db.License_LicenseItem.InsertOnSubmit(newLicenseItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
public static void AddLicenseItemForApi(Model.License_LicenseItem licenseItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.License_LicenseItem newLicenseItem = new Model.License_LicenseItem
|
||||
{
|
||||
LicenseItemId = SQLHelper.GetNewID(),
|
||||
DataId = licenseItem.DataId,
|
||||
SortIndex = licenseItem.SortIndex,
|
||||
SafetyMeasures = licenseItem.SafetyMeasures,
|
||||
IsUsed = licenseItem.IsUsed,
|
||||
ConfirmManId = licenseItem.ConfirmManId,
|
||||
};
|
||||
db.License_LicenseItem.InsertOnSubmit(newLicenseItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改-安全措施
|
||||
/// </summary>
|
||||
/// <param name="licenseItem"></param>
|
||||
public static void UpdateLicenseItem(Model.License_LicenseItem licenseItem)
|
||||
/// <summary>
|
||||
/// 修改-安全措施
|
||||
/// </summary>
|
||||
/// <param name="licenseItem"></param>
|
||||
public static void UpdateLicenseItem(Model.License_LicenseItem licenseItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.License_LicenseItem newLicenseItem = db.License_LicenseItem.FirstOrDefault(e => e.LicenseItemId == licenseItem.LicenseItemId);
|
||||
|
@ -1346,13 +1363,32 @@ namespace BLL
|
|||
};
|
||||
db.License_FlowOperate.InsertOnSubmit(newFlowOperate);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void AddFlowOperateForApi(Model.License_FlowOperate flowOperate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.License_FlowOperate newFlowOperate = new Model.License_FlowOperate
|
||||
{
|
||||
FlowOperateId = SQLHelper.GetNewID(),
|
||||
DataId = flowOperate.DataId,
|
||||
MenuId = flowOperate.MenuId,
|
||||
OperaterId = flowOperate.OperaterId,
|
||||
AuditFlowName = flowOperate.AuditFlowName,
|
||||
SortIndex = flowOperate.SortIndex,
|
||||
RoleIds = flowOperate.RoleIds,
|
||||
IsFlowEnd = flowOperate.IsFlowEnd,
|
||||
};
|
||||
db.License_FlowOperate.InsertOnSubmit(newFlowOperate);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改审核信息
|
||||
/// </summary>
|
||||
/// <param name="flowOperate"></param>
|
||||
public static void UpdateFlowOperate(Model.License_FlowOperate flowOperate)
|
||||
/// <summary>
|
||||
/// 修改审核信息
|
||||
/// </summary>
|
||||
/// <param name="flowOperate"></param>
|
||||
public static void UpdateFlowOperate(Model.License_FlowOperate flowOperate)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.License_FlowOperate newFlowOperate = db.License_FlowOperate.FirstOrDefault(e => e.FlowOperateId == flowOperate.FlowOperateId);
|
||||
|
|
|
@ -79,12 +79,43 @@ namespace BLL
|
|||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectAttendMeetingMenuId, attendMeeting.ProjectId, null, attendMeeting.AttendMeetingId, attendMeeting.CompileDate);
|
||||
}
|
||||
public static void AddAttendMeetingForApi(Model.Meeting_AttendMeeting attendMeeting)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 修改其他会议记录
|
||||
/// </summary>
|
||||
/// <param name="attendMeeting"></param>
|
||||
public static void UpdateAttendMeeting(Model.Meeting_AttendMeeting attendMeeting)
|
||||
Model.Meeting_AttendMeeting newAttendMeeting = new Model.Meeting_AttendMeeting
|
||||
{
|
||||
AttendMeetingId = attendMeeting.AttendMeetingId,
|
||||
ProjectId = attendMeeting.ProjectId,
|
||||
UnitId = attendMeeting.UnitId,
|
||||
AttendMeetingCode = attendMeeting.AttendMeetingCode,
|
||||
AttendMeetingName = attendMeeting.AttendMeetingName,
|
||||
AttendMeetingDate = attendMeeting.AttendMeetingDate,
|
||||
CompileMan = attendMeeting.CompileMan,
|
||||
AttendMeetingContents = attendMeeting.AttendMeetingContents,
|
||||
CompileDate = attendMeeting.CompileDate,
|
||||
States = attendMeeting.States,
|
||||
MeetingHours = attendMeeting.MeetingHours,
|
||||
MeetingHostMan = attendMeeting.MeetingHostMan,
|
||||
AttentPerson = attendMeeting.AttentPerson,
|
||||
MeetingPlace = attendMeeting.MeetingPlace,
|
||||
MeetingHostManId = attendMeeting.MeetingHostManId,
|
||||
AttentPersonIds = attendMeeting.AttentPersonIds,
|
||||
AttentPersonNum = attendMeeting.AttentPersonNum,
|
||||
MeetingHostManOther = attendMeeting.MeetingHostManOther
|
||||
};
|
||||
db.Meeting_AttendMeeting.InsertOnSubmit(attendMeeting);
|
||||
db.SubmitChanges();
|
||||
////增加一条编码记录
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectAttendMeetingMenuId, attendMeeting.ProjectId, null, attendMeeting.AttendMeetingId, attendMeeting.CompileDate);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改其他会议记录
|
||||
/// </summary>
|
||||
/// <param name="attendMeeting"></param>
|
||||
public static void UpdateAttendMeeting(Model.Meeting_AttendMeeting attendMeeting)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Meeting_AttendMeeting newAttendMeeting = db.Meeting_AttendMeeting.FirstOrDefault(e => e.AttendMeetingId == attendMeeting.AttendMeetingId);
|
||||
|
@ -110,12 +141,39 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除其他会议记录
|
||||
/// </summary>
|
||||
/// <param name="attendMeetingId"></param>
|
||||
public static void DeleteAttendMeetingById(string attendMeetingId)
|
||||
public static void UpdateAttendMeetingForApi(Model.Meeting_AttendMeeting attendMeeting)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Meeting_AttendMeeting newAttendMeeting = db.Meeting_AttendMeeting.FirstOrDefault(e => e.AttendMeetingId == attendMeeting.AttendMeetingId);
|
||||
if (newAttendMeeting != null)
|
||||
{
|
||||
//newAttendMeeting.ProjectId = attendMeeting.ProjectId;
|
||||
newAttendMeeting.UnitId = attendMeeting.UnitId;
|
||||
newAttendMeeting.AttendMeetingCode = attendMeeting.AttendMeetingCode;
|
||||
newAttendMeeting.AttendMeetingName = attendMeeting.AttendMeetingName;
|
||||
newAttendMeeting.AttendMeetingDate = attendMeeting.AttendMeetingDate;
|
||||
newAttendMeeting.CompileMan = attendMeeting.CompileMan;
|
||||
newAttendMeeting.AttendMeetingContents = attendMeeting.AttendMeetingContents;
|
||||
newAttendMeeting.CompileDate = attendMeeting.CompileDate;
|
||||
newAttendMeeting.States = attendMeeting.States;
|
||||
newAttendMeeting.MeetingHours = attendMeeting.MeetingHours;
|
||||
newAttendMeeting.MeetingHostMan = attendMeeting.MeetingHostMan;
|
||||
newAttendMeeting.AttentPerson = attendMeeting.AttentPerson;
|
||||
newAttendMeeting.MeetingPlace = attendMeeting.MeetingPlace;
|
||||
newAttendMeeting.MeetingHostManId = attendMeeting.MeetingHostManId;
|
||||
newAttendMeeting.AttentPersonIds = attendMeeting.AttentPersonIds;
|
||||
newAttendMeeting.MeetingHostManOther = attendMeeting.MeetingHostManOther;
|
||||
newAttendMeeting.AttentPersonNum = attendMeeting.AttentPersonNum;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据主键删除其他会议记录
|
||||
/// </summary>
|
||||
/// <param name="attendMeetingId"></param>
|
||||
public static void DeleteAttendMeetingById(string attendMeetingId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Meeting_AttendMeeting attendMeeting = db.Meeting_AttendMeeting.FirstOrDefault(e => e.AttendMeetingId == attendMeetingId);
|
||||
|
|
|
@ -51,12 +51,41 @@ namespace BLL
|
|||
////增加一条编码记录
|
||||
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectClassMeetingMenuId, classMeeting.ProjectId, null, classMeeting.ClassMeetingId, classMeeting.CompileDate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改班前会
|
||||
/// </summary>
|
||||
/// <param name="classMeeting"></param>
|
||||
public static void UpdateClassMeeting(Model.Meeting_ClassMeeting classMeeting)
|
||||
public static void AddClassMeetingForApi(Model.Meeting_ClassMeeting classMeeting)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Meeting_ClassMeeting newClassMeeting = new Model.Meeting_ClassMeeting
|
||||
{
|
||||
ClassMeetingId = classMeeting.ClassMeetingId,
|
||||
ProjectId = classMeeting.ProjectId,
|
||||
UnitId = classMeeting.UnitId,
|
||||
TeamGroupId = classMeeting.TeamGroupId,
|
||||
ClassMeetingCode = classMeeting.ClassMeetingCode,
|
||||
ClassMeetingName = classMeeting.ClassMeetingName,
|
||||
ClassMeetingDate = classMeeting.ClassMeetingDate,
|
||||
ClassMeetingContents = classMeeting.ClassMeetingContents,
|
||||
CompileMan = classMeeting.CompileMan,
|
||||
CompileDate = classMeeting.CompileDate,
|
||||
States = classMeeting.States,
|
||||
MeetingPlace = classMeeting.MeetingPlace,
|
||||
MeetingHours = classMeeting.MeetingHours,
|
||||
MeetingHostMan = classMeeting.MeetingHostMan,
|
||||
AttentPerson = classMeeting.AttentPerson,
|
||||
AttentPersonNum = classMeeting.AttentPersonNum,
|
||||
MeetingHostManOther = classMeeting.MeetingHostManOther
|
||||
};
|
||||
db.Meeting_ClassMeeting.InsertOnSubmit(newClassMeeting);
|
||||
db.SubmitChanges();
|
||||
////增加一条编码记录
|
||||
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(BLL.Const.ProjectClassMeetingMenuId, classMeeting.ProjectId, null, classMeeting.ClassMeetingId, classMeeting.CompileDate);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改班前会
|
||||
/// </summary>
|
||||
/// <param name="classMeeting"></param>
|
||||
public static void UpdateClassMeeting(Model.Meeting_ClassMeeting classMeeting)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Meeting_ClassMeeting newClassMeeting = db.Meeting_ClassMeeting.FirstOrDefault(e => e.ClassMeetingId == classMeeting.ClassMeetingId);
|
||||
|
@ -82,12 +111,39 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void UpdateClassMeetingForApi(Model.Meeting_ClassMeeting classMeeting)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Meeting_ClassMeeting newClassMeeting = db.Meeting_ClassMeeting.FirstOrDefault(e => e.ClassMeetingId == classMeeting.ClassMeetingId);
|
||||
if (newClassMeeting != null)
|
||||
{
|
||||
// newClassMeeting.ProjectId = classMeeting.ProjectId;
|
||||
newClassMeeting.UnitId = classMeeting.UnitId;
|
||||
newClassMeeting.TeamGroupId = classMeeting.TeamGroupId;
|
||||
newClassMeeting.ClassMeetingCode = classMeeting.ClassMeetingCode;
|
||||
newClassMeeting.ClassMeetingName = classMeeting.ClassMeetingName;
|
||||
newClassMeeting.ClassMeetingDate = classMeeting.ClassMeetingDate;
|
||||
newClassMeeting.ClassMeetingContents = classMeeting.ClassMeetingContents;
|
||||
newClassMeeting.CompileMan = classMeeting.CompileMan;
|
||||
newClassMeeting.CompileDate = classMeeting.CompileDate;
|
||||
newClassMeeting.States = classMeeting.States;
|
||||
newClassMeeting.MeetingPlace = classMeeting.MeetingPlace;
|
||||
newClassMeeting.MeetingHours = classMeeting.MeetingHours;
|
||||
newClassMeeting.MeetingHostMan = classMeeting.MeetingHostMan;
|
||||
newClassMeeting.AttentPerson = classMeeting.AttentPerson;
|
||||
newClassMeeting.AttentPersonNum = classMeeting.AttentPersonNum;
|
||||
newClassMeeting.MeetingHostManOther = classMeeting.MeetingHostManOther;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除班前会
|
||||
/// </summary>
|
||||
/// <param name="classMeetingId"></param>
|
||||
public static void DeleteClassMeetingById(string classMeetingId)
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据主键删除班前会
|
||||
/// </summary>
|
||||
/// <param name="classMeetingId"></param>
|
||||
public static void DeleteClassMeetingById(string classMeetingId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Meeting_ClassMeeting classMeeting = db.Meeting_ClassMeeting.FirstOrDefault(e => e.ClassMeetingId == classMeetingId);
|
||||
|
|
|
@ -95,12 +95,42 @@ namespace BLL
|
|||
////增加一条编码记录
|
||||
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectMonthMeetingMenuId, monthMeeting.ProjectId, null, monthMeeting.MonthMeetingId, monthMeeting.CompileDate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改安全月例会
|
||||
/// </summary>
|
||||
/// <param name="monthMeeting"></param>
|
||||
public static void UpdateMonthMeeting(Model.Meeting_MonthMeeting monthMeeting)
|
||||
public static void AddMonthMeetingForApi(Model.Meeting_MonthMeeting monthMeeting)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Meeting_MonthMeeting newMonthMeeting = new Model.Meeting_MonthMeeting
|
||||
{
|
||||
MonthMeetingId = monthMeeting.MonthMeetingId,
|
||||
ProjectId = monthMeeting.ProjectId,
|
||||
UnitId = monthMeeting.UnitId,
|
||||
MonthMeetingCode = monthMeeting.MonthMeetingCode,
|
||||
MonthMeetingName = monthMeeting.MonthMeetingName,
|
||||
MonthMeetingDate = monthMeeting.MonthMeetingDate,
|
||||
CompileMan = monthMeeting.CompileMan,
|
||||
MonthMeetingContents = monthMeeting.MonthMeetingContents,
|
||||
CompileDate = monthMeeting.CompileDate,
|
||||
States = monthMeeting.States,
|
||||
AttentPersonNum = monthMeeting.AttentPersonNum,
|
||||
MeetingHours = monthMeeting.MeetingHours,
|
||||
MeetingHostMan = monthMeeting.MeetingHostMan,
|
||||
AttentPerson = monthMeeting.AttentPerson,
|
||||
MeetingPlace = monthMeeting.MeetingPlace,
|
||||
MeetingHostManId = monthMeeting.MeetingHostManId,
|
||||
AttentPersonIds = monthMeeting.AttentPersonIds,
|
||||
MeetingHostManOther = monthMeeting.MeetingHostManOther
|
||||
};
|
||||
db.Meeting_MonthMeeting.InsertOnSubmit(newMonthMeeting);
|
||||
db.SubmitChanges();
|
||||
////增加一条编码记录
|
||||
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(BLL.Const.ProjectMonthMeetingMenuId, monthMeeting.ProjectId, null, monthMeeting.MonthMeetingId, monthMeeting.CompileDate);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改安全月例会
|
||||
/// </summary>
|
||||
/// <param name="monthMeeting"></param>
|
||||
public static void UpdateMonthMeeting(Model.Meeting_MonthMeeting monthMeeting)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Meeting_MonthMeeting newMonthMeeting = db.Meeting_MonthMeeting.FirstOrDefault(e => e.MonthMeetingId == monthMeeting.MonthMeetingId);
|
||||
|
@ -126,12 +156,40 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void UpdateMonthMeetingForApi(Model.Meeting_MonthMeeting monthMeeting)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Meeting_MonthMeeting newMonthMeeting = db.Meeting_MonthMeeting.FirstOrDefault(e => e.MonthMeetingId == monthMeeting.MonthMeetingId);
|
||||
if (newMonthMeeting != null)
|
||||
{
|
||||
//newMonthMeeting.ProjectId = monthMeeting.ProjectId;
|
||||
newMonthMeeting.UnitId = monthMeeting.UnitId;
|
||||
newMonthMeeting.MonthMeetingCode = monthMeeting.MonthMeetingCode;
|
||||
newMonthMeeting.MonthMeetingName = monthMeeting.MonthMeetingName;
|
||||
newMonthMeeting.MonthMeetingDate = monthMeeting.MonthMeetingDate;
|
||||
newMonthMeeting.CompileMan = monthMeeting.CompileMan;
|
||||
newMonthMeeting.MonthMeetingContents = monthMeeting.MonthMeetingContents;
|
||||
newMonthMeeting.CompileDate = monthMeeting.CompileDate;
|
||||
newMonthMeeting.States = monthMeeting.States;
|
||||
newMonthMeeting.AttentPersonNum = monthMeeting.AttentPersonNum;
|
||||
newMonthMeeting.MeetingHours = monthMeeting.MeetingHours;
|
||||
newMonthMeeting.MeetingHostMan = monthMeeting.MeetingHostMan;
|
||||
newMonthMeeting.AttentPerson = monthMeeting.AttentPerson;
|
||||
newMonthMeeting.MeetingPlace = monthMeeting.MeetingPlace;
|
||||
newMonthMeeting.MeetingHostManId = monthMeeting.MeetingHostManId;
|
||||
newMonthMeeting.AttentPersonIds = monthMeeting.AttentPersonIds;
|
||||
newMonthMeeting.MeetingHostManOther = monthMeeting.MeetingHostManOther;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除安全月例会
|
||||
/// </summary>
|
||||
/// <param name="monthMeetingId"></param>
|
||||
public static void DeleteMonthMeetingById(string monthMeetingId)
|
||||
/// <summary>
|
||||
/// 根据主键删除安全月例会
|
||||
/// </summary>
|
||||
/// <param name="monthMeetingId"></param>
|
||||
public static void DeleteMonthMeetingById(string monthMeetingId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Meeting_MonthMeeting monthMeeting = db.Meeting_MonthMeeting.FirstOrDefault(e => e.MonthMeetingId == monthMeetingId);
|
||||
|
|
|
@ -95,12 +95,43 @@ namespace BLL
|
|||
////增加一条编码记录
|
||||
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectSpecialMeetingMenuId, specialMeeting.ProjectId, null, specialMeeting.SpecialMeetingId, specialMeeting.CompileDate);
|
||||
}
|
||||
public static void AddSpecialMeetingForApi(Model.Meeting_SpecialMeeting specialMeeting)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Meeting_SpecialMeeting newSpecialMeeting = new Model.Meeting_SpecialMeeting
|
||||
{
|
||||
SpecialMeetingId = specialMeeting.SpecialMeetingId,
|
||||
ProjectId = specialMeeting.ProjectId,
|
||||
UnitId = specialMeeting.UnitId,
|
||||
SpecialMeetingCode = specialMeeting.SpecialMeetingCode,
|
||||
SpecialMeetingName = specialMeeting.SpecialMeetingName,
|
||||
SpecialMeetingDate = specialMeeting.SpecialMeetingDate,
|
||||
CompileMan = specialMeeting.CompileMan,
|
||||
SpecialMeetingContents = specialMeeting.SpecialMeetingContents,
|
||||
CompileDate = specialMeeting.CompileDate,
|
||||
States = specialMeeting.States,
|
||||
AttentPersonNum = specialMeeting.AttentPersonNum,
|
||||
MeetingHours = specialMeeting.MeetingHours,
|
||||
MeetingHostMan = specialMeeting.MeetingHostMan,
|
||||
AttentPerson = specialMeeting.AttentPerson,
|
||||
MeetingPlace = specialMeeting.MeetingPlace,
|
||||
MeetingHostManId = specialMeeting.MeetingHostManId,
|
||||
AttentPersonIds = specialMeeting.AttentPersonIds,
|
||||
MeetingHostManOther = specialMeeting.MeetingHostManOther
|
||||
};
|
||||
db.Meeting_SpecialMeeting.InsertOnSubmit(newSpecialMeeting);
|
||||
db.SubmitChanges();
|
||||
////增加一条编码记录
|
||||
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(BLL.Const.ProjectSpecialMeetingMenuId, specialMeeting.ProjectId, null, specialMeeting.SpecialMeetingId, specialMeeting.CompileDate);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改专题例会
|
||||
/// </summary>
|
||||
/// <param name="specialMeeting"></param>
|
||||
public static void UpdateSpecialMeeting(Model.Meeting_SpecialMeeting specialMeeting)
|
||||
/// <summary>
|
||||
/// 修改专题例会
|
||||
/// </summary>
|
||||
/// <param name="specialMeeting"></param>
|
||||
public static void UpdateSpecialMeeting(Model.Meeting_SpecialMeeting specialMeeting)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Meeting_SpecialMeeting newSpecialMeeting = db.Meeting_SpecialMeeting.FirstOrDefault(e => e.SpecialMeetingId == specialMeeting.SpecialMeetingId);
|
||||
|
@ -126,12 +157,40 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void UpdateSpecialMeetingForApi(Model.Meeting_SpecialMeeting specialMeeting)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Meeting_SpecialMeeting newSpecialMeeting = db.Meeting_SpecialMeeting.FirstOrDefault(e => e.SpecialMeetingId == specialMeeting.SpecialMeetingId);
|
||||
if (newSpecialMeeting != null)
|
||||
{
|
||||
//newSpecialMeeting.ProjectId = specialMeeting.ProjectId;
|
||||
newSpecialMeeting.UnitId = specialMeeting.UnitId;
|
||||
newSpecialMeeting.SpecialMeetingCode = specialMeeting.SpecialMeetingCode;
|
||||
newSpecialMeeting.SpecialMeetingName = specialMeeting.SpecialMeetingName;
|
||||
newSpecialMeeting.SpecialMeetingDate = specialMeeting.SpecialMeetingDate;
|
||||
newSpecialMeeting.CompileMan = specialMeeting.CompileMan;
|
||||
newSpecialMeeting.SpecialMeetingContents = specialMeeting.SpecialMeetingContents;
|
||||
newSpecialMeeting.CompileDate = specialMeeting.CompileDate;
|
||||
newSpecialMeeting.States = specialMeeting.States;
|
||||
newSpecialMeeting.AttentPersonNum = specialMeeting.AttentPersonNum;
|
||||
newSpecialMeeting.MeetingHours = specialMeeting.MeetingHours;
|
||||
newSpecialMeeting.MeetingHostMan = specialMeeting.MeetingHostMan;
|
||||
newSpecialMeeting.AttentPerson = specialMeeting.AttentPerson;
|
||||
newSpecialMeeting.MeetingPlace = specialMeeting.MeetingPlace;
|
||||
newSpecialMeeting.MeetingHostManId = specialMeeting.MeetingHostManId;
|
||||
newSpecialMeeting.AttentPersonIds = specialMeeting.AttentPersonIds;
|
||||
newSpecialMeeting.MeetingHostManOther = specialMeeting.MeetingHostManOther;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除专题例会
|
||||
/// </summary>
|
||||
/// <param name="specialMeetingId"></param>
|
||||
public static void DeleteSpecialMeetingById(string specialMeetingId)
|
||||
/// <summary>
|
||||
/// 根据主键删除专题例会
|
||||
/// </summary>
|
||||
/// <param name="specialMeetingId"></param>
|
||||
public static void DeleteSpecialMeetingById(string specialMeetingId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Meeting_SpecialMeeting spcialMeeting = db.Meeting_SpecialMeeting.FirstOrDefault(e => e.SpecialMeetingId == specialMeetingId);
|
||||
|
|
|
@ -95,12 +95,42 @@ namespace BLL
|
|||
////增加一条编码记录
|
||||
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectWeekMeetingMenuId, weekMeeting.ProjectId, null, weekMeeting.WeekMeetingId, weekMeeting.CompileDate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改周例会
|
||||
/// </summary>
|
||||
/// <param name="weekMeeting"></param>
|
||||
public static void UpdateWeekMeeting(Model.Meeting_WeekMeeting weekMeeting)
|
||||
public static void AddWeekMeetingForApi(Model.Meeting_WeekMeeting weekMeeting)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Meeting_WeekMeeting newWeekMeeting = new Model.Meeting_WeekMeeting
|
||||
{
|
||||
WeekMeetingId = weekMeeting.WeekMeetingId,
|
||||
ProjectId = weekMeeting.ProjectId,
|
||||
UnitId = weekMeeting.UnitId,
|
||||
WeekMeetingCode = weekMeeting.WeekMeetingCode,
|
||||
WeekMeetingName = weekMeeting.WeekMeetingName,
|
||||
WeekMeetingDate = weekMeeting.WeekMeetingDate,
|
||||
CompileMan = weekMeeting.CompileMan,
|
||||
WeekMeetingContents = weekMeeting.WeekMeetingContents,
|
||||
CompileDate = weekMeeting.CompileDate,
|
||||
States = weekMeeting.States,
|
||||
AttentPersonNum = weekMeeting.AttentPersonNum,
|
||||
MeetingHours = weekMeeting.MeetingHours,
|
||||
MeetingHostMan = weekMeeting.MeetingHostMan,
|
||||
AttentPerson = weekMeeting.AttentPerson,
|
||||
MeetingPlace = weekMeeting.MeetingPlace,
|
||||
MeetingHostManId = weekMeeting.MeetingHostManId,
|
||||
AttentPersonIds = weekMeeting.AttentPersonIds,
|
||||
MeetingHostManOther = weekMeeting.MeetingHostManOther
|
||||
};
|
||||
db.Meeting_WeekMeeting.InsertOnSubmit(newWeekMeeting);
|
||||
db.SubmitChanges();
|
||||
////增加一条编码记录
|
||||
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(BLL.Const.ProjectWeekMeetingMenuId, weekMeeting.ProjectId, null, weekMeeting.WeekMeetingId, weekMeeting.CompileDate);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改周例会
|
||||
/// </summary>
|
||||
/// <param name="weekMeeting"></param>
|
||||
public static void UpdateWeekMeeting(Model.Meeting_WeekMeeting weekMeeting)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Meeting_WeekMeeting newWeekMeeting = db.Meeting_WeekMeeting.FirstOrDefault(e => e.WeekMeetingId == weekMeeting.WeekMeetingId);
|
||||
|
@ -126,12 +156,41 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void UpdateWeekMeetingForApi(Model.Meeting_WeekMeeting weekMeeting)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除周例会
|
||||
/// </summary>
|
||||
/// <param name="weekMeetingId"></param>
|
||||
public static void DeleteWeekMeetingById(string weekMeetingId)
|
||||
Model.Meeting_WeekMeeting newWeekMeeting = db.Meeting_WeekMeeting.FirstOrDefault(e => e.WeekMeetingId == weekMeeting.WeekMeetingId);
|
||||
if (newWeekMeeting != null)
|
||||
{
|
||||
//newWeekMeeting.ProjectId = weekMeeting.ProjectId;
|
||||
newWeekMeeting.UnitId = weekMeeting.UnitId;
|
||||
newWeekMeeting.WeekMeetingCode = weekMeeting.WeekMeetingCode;
|
||||
newWeekMeeting.WeekMeetingName = weekMeeting.WeekMeetingName;
|
||||
newWeekMeeting.WeekMeetingDate = weekMeeting.WeekMeetingDate;
|
||||
newWeekMeeting.CompileMan = weekMeeting.CompileMan;
|
||||
newWeekMeeting.WeekMeetingContents = weekMeeting.WeekMeetingContents;
|
||||
newWeekMeeting.CompileDate = weekMeeting.CompileDate;
|
||||
newWeekMeeting.States = weekMeeting.States;
|
||||
newWeekMeeting.AttentPersonNum = weekMeeting.AttentPersonNum;
|
||||
newWeekMeeting.MeetingHours = weekMeeting.MeetingHours;
|
||||
newWeekMeeting.MeetingHostMan = weekMeeting.MeetingHostMan;
|
||||
newWeekMeeting.AttentPerson = weekMeeting.AttentPerson;
|
||||
newWeekMeeting.MeetingPlace = weekMeeting.MeetingPlace;
|
||||
newWeekMeeting.MeetingHostManId = weekMeeting.MeetingHostManId;
|
||||
newWeekMeeting.AttentPersonIds = weekMeeting.AttentPersonIds;
|
||||
newWeekMeeting.MeetingHostManOther = weekMeeting.MeetingHostManOther;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除周例会
|
||||
/// </summary>
|
||||
/// <param name="weekMeetingId"></param>
|
||||
public static void DeleteWeekMeetingById(string weekMeetingId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Meeting_WeekMeeting weekMeeting = db.Meeting_WeekMeeting.FirstOrDefault(e => e.WeekMeetingId == weekMeetingId);
|
||||
|
|
|
@ -67,12 +67,42 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.EquipmentQualityMenuId, equipmentQuality.ProjectId, null, equipmentQuality.EquipmentQualityId, equipmentQuality.CompileDate);
|
||||
}
|
||||
public static void AddEquipmentQualityForApi(Model.QualityAudit_EquipmentQuality equipmentQuality)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 修改特殊机具设备资质
|
||||
/// </summary>
|
||||
/// <param name="equipmentQuality"></param>
|
||||
public static void UpdateEquipmentQuality(Model.QualityAudit_EquipmentQuality equipmentQuality)
|
||||
Model.QualityAudit_EquipmentQuality newEquipmentQuality = new Model.QualityAudit_EquipmentQuality
|
||||
{
|
||||
EquipmentQualityId = equipmentQuality.EquipmentQualityId,
|
||||
ProjectId = equipmentQuality.ProjectId,
|
||||
EquipmentQualityCode = equipmentQuality.EquipmentQualityCode,
|
||||
UnitId = equipmentQuality.UnitId,
|
||||
SpecialEquipmentId = equipmentQuality.SpecialEquipmentId,
|
||||
EquipmentQualityName = equipmentQuality.EquipmentQualityName,
|
||||
SizeModel = equipmentQuality.SizeModel,
|
||||
FactoryCode = equipmentQuality.FactoryCode,
|
||||
CertificateCode = equipmentQuality.CertificateCode,
|
||||
CheckDate = equipmentQuality.CheckDate,
|
||||
LimitDate = equipmentQuality.LimitDate,
|
||||
InDate = equipmentQuality.InDate,
|
||||
OutDate = equipmentQuality.OutDate,
|
||||
ApprovalPerson = equipmentQuality.ApprovalPerson,
|
||||
CarNum = equipmentQuality.CarNum,
|
||||
Remark = equipmentQuality.Remark,
|
||||
CompileMan = equipmentQuality.CompileMan,
|
||||
CompileDate = equipmentQuality.CompileDate
|
||||
};
|
||||
db.QualityAudit_EquipmentQuality.InsertOnSubmit(newEquipmentQuality);
|
||||
db.SubmitChanges();
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.EquipmentQualityMenuId, equipmentQuality.ProjectId, null, equipmentQuality.EquipmentQualityId, equipmentQuality.CompileDate);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改特殊机具设备资质
|
||||
/// </summary>
|
||||
/// <param name="equipmentQuality"></param>
|
||||
public static void UpdateEquipmentQuality(Model.QualityAudit_EquipmentQuality equipmentQuality)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.QualityAudit_EquipmentQuality newEquipmentQuality = db.QualityAudit_EquipmentQuality.FirstOrDefault(e => e.EquipmentQualityId == equipmentQuality.EquipmentQualityId);
|
||||
|
@ -99,12 +129,40 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除特殊机具设备资质
|
||||
/// </summary>
|
||||
/// <param name="equipmentQualityId"></param>
|
||||
public static void DeleteEquipmentQualityById(string equipmentQualityId)
|
||||
public static void UpdateEquipmentQualityForApi(Model.QualityAudit_EquipmentQuality equipmentQuality)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.QualityAudit_EquipmentQuality newEquipmentQuality = db.QualityAudit_EquipmentQuality.FirstOrDefault(e => e.EquipmentQualityId == equipmentQuality.EquipmentQualityId);
|
||||
if (newEquipmentQuality != null)
|
||||
{
|
||||
newEquipmentQuality.ProjectId = equipmentQuality.ProjectId;
|
||||
newEquipmentQuality.EquipmentQualityCode = equipmentQuality.EquipmentQualityCode;
|
||||
newEquipmentQuality.UnitId = equipmentQuality.UnitId;
|
||||
newEquipmentQuality.SpecialEquipmentId = equipmentQuality.SpecialEquipmentId;
|
||||
newEquipmentQuality.EquipmentQualityName = equipmentQuality.EquipmentQualityName;
|
||||
newEquipmentQuality.SizeModel = equipmentQuality.SizeModel;
|
||||
newEquipmentQuality.FactoryCode = equipmentQuality.FactoryCode;
|
||||
newEquipmentQuality.CertificateCode = equipmentQuality.CertificateCode;
|
||||
newEquipmentQuality.CheckDate = equipmentQuality.CheckDate;
|
||||
newEquipmentQuality.LimitDate = equipmentQuality.LimitDate;
|
||||
newEquipmentQuality.InDate = equipmentQuality.InDate;
|
||||
newEquipmentQuality.OutDate = equipmentQuality.OutDate;
|
||||
newEquipmentQuality.ApprovalPerson = equipmentQuality.ApprovalPerson;
|
||||
newEquipmentQuality.CarNum = equipmentQuality.CarNum;
|
||||
newEquipmentQuality.Remark = equipmentQuality.Remark;
|
||||
newEquipmentQuality.CompileMan = equipmentQuality.CompileMan;
|
||||
newEquipmentQuality.CompileDate = equipmentQuality.CompileDate;
|
||||
newEquipmentQuality.QRCodeAttachUrl = equipmentQuality.QRCodeAttachUrl;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据主键删除特殊机具设备资质
|
||||
/// </summary>
|
||||
/// <param name="equipmentQualityId"></param>
|
||||
public static void DeleteEquipmentQualityById(string equipmentQualityId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.QualityAudit_EquipmentQuality equipmentQuality = db.QualityAudit_EquipmentQuality.FirstOrDefault(e => e.EquipmentQualityId == equipmentQualityId);
|
||||
|
|
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using FineUIPro;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
@ -125,14 +126,27 @@ namespace BLL
|
|||
name = getp.PersonName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
public static string GetPersonNameByIdForApi(string personId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string name = string.Empty;
|
||||
var getp = db.SitePerson_Person.FirstOrDefault(e => e.PersonId == personId);
|
||||
if (getp != null)
|
||||
{
|
||||
name = getp.PersonName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据UserId主键获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetPersonIdByUserId(string userId)
|
||||
/// <summary>
|
||||
/// 根据UserId主键获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetPersonIdByUserId(string userId)
|
||||
{
|
||||
string personId = userId;
|
||||
var getPerson = GetPersonById(userId);
|
||||
|
@ -151,13 +165,35 @@ namespace BLL
|
|||
|
||||
return personId;
|
||||
}
|
||||
public static string GetPersonIdByUserIdForApi(string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string personId = userId;
|
||||
var getPerson = db.SitePerson_Person.FirstOrDefault(e => e.PersonId == userId);
|
||||
if (getPerson == null)
|
||||
{
|
||||
var getUser = db.Sys_User.FirstOrDefault(e => e.UserId == userId);
|
||||
if (getUser != null)
|
||||
{
|
||||
getPerson = db.SitePerson_Person.FirstOrDefault(e => e.IdentityCard == getUser.IdentityCard);
|
||||
if (getPerson != null)
|
||||
{
|
||||
personId = getPerson.PersonId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据UserId主键获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.SitePerson_Person GetPersonByUserId(string userId, string projectId)
|
||||
return personId;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据UserId主键获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.SitePerson_Person GetPersonByUserId(string userId, string projectId)
|
||||
{
|
||||
var getPerson = GetPersonById(userId);
|
||||
if (getPerson == null)
|
||||
|
|
|
@ -78,12 +78,40 @@ namespace BLL
|
|||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectConstructSolutionMenuId, constructSolution.ProjectId, null, constructSolution.ConstructSolutionId, constructSolution.CompileDate);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改施工方案/审查
|
||||
/// </summary>
|
||||
/// <param name="constructSolution"></param>
|
||||
public static void UpdateConstructSolution(Model.Solution_ConstructSolution constructSolution)
|
||||
public static void AddConstructSolutionForApi(Model.Solution_ConstructSolution constructSolution)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Solution_ConstructSolution newConstructSolution = new Model.Solution_ConstructSolution
|
||||
{
|
||||
ConstructSolutionId = constructSolution.ConstructSolutionId,
|
||||
ProjectId = constructSolution.ProjectId,
|
||||
ConstructSolutionCode = constructSolution.ConstructSolutionCode,
|
||||
ConstructSolutionName = constructSolution.ConstructSolutionName,
|
||||
VersionNo = constructSolution.VersionNo,
|
||||
UnitId = constructSolution.UnitId,
|
||||
InvestigateType = constructSolution.InvestigateType,
|
||||
SolutinType = constructSolution.SolutinType,
|
||||
FileContents = constructSolution.FileContents,
|
||||
Remark = constructSolution.Remark,
|
||||
CompileMan = constructSolution.CompileMan,
|
||||
CompileManName = constructSolution.CompileManName,
|
||||
CompileDate = constructSolution.CompileDate,
|
||||
States = constructSolution.States
|
||||
};
|
||||
db.Solution_ConstructSolution.InsertOnSubmit(newConstructSolution);
|
||||
db.SubmitChanges();
|
||||
if (constructSolution.ConstructSolutionCode == BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectConstructSolutionMenuId, constructSolution.ProjectId, null))
|
||||
{
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectConstructSolutionMenuId, constructSolution.ProjectId, null, constructSolution.ConstructSolutionId, constructSolution.CompileDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改施工方案/审查
|
||||
/// </summary>
|
||||
/// <param name="constructSolution"></param>
|
||||
public static void UpdateConstructSolution(Model.Solution_ConstructSolution constructSolution)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Solution_ConstructSolution newConstructSolution = db.Solution_ConstructSolution.FirstOrDefault(e => e.ConstructSolutionId == constructSolution.ConstructSolutionId);
|
||||
|
@ -109,12 +137,55 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
}
|
||||
public static void UpdateConstructSolutionForApi(Model.Solution_ConstructSolution constructSolution)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Solution_ConstructSolution newConstructSolution = db.Solution_ConstructSolution.FirstOrDefault(e => e.ConstructSolutionId == constructSolution.ConstructSolutionId);
|
||||
if (newConstructSolution != null)
|
||||
{
|
||||
newConstructSolution.ConstructSolutionName = constructSolution.ConstructSolutionName;
|
||||
newConstructSolution.VersionNo = constructSolution.VersionNo;
|
||||
newConstructSolution.UnitId = constructSolution.UnitId;
|
||||
newConstructSolution.InvestigateType = constructSolution.InvestigateType;
|
||||
newConstructSolution.SolutinType = constructSolution.SolutinType;
|
||||
newConstructSolution.FileContents = constructSolution.FileContents;
|
||||
newConstructSolution.Remark = constructSolution.Remark;
|
||||
newConstructSolution.States = constructSolution.States;
|
||||
if (!string.IsNullOrEmpty(constructSolution.QRCodeAttachUrl))
|
||||
{
|
||||
newConstructSolution.QRCodeAttachUrl = constructSolution.QRCodeAttachUrl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除施工方案/审查
|
||||
/// </summary>
|
||||
/// <param name="constructSolutionId"></param>
|
||||
public static void DeleteConstructSolutionById(string constructSolutionId)
|
||||
db.SubmitChanges();
|
||||
string code = string.Empty;
|
||||
var codeRecords = db.Sys_CodeRecords.FirstOrDefault(x => x.DataId == constructSolution.ConstructSolutionId);
|
||||
if (codeRecords != null)
|
||||
{
|
||||
code = codeRecords.Code;
|
||||
}
|
||||
|
||||
if (constructSolution.ConstructSolutionCode != code)
|
||||
{
|
||||
var codeRecords1 = db.Sys_CodeRecords.FirstOrDefault(x => x.DataId == constructSolution.ConstructSolutionId);
|
||||
if (codeRecords1 != null)
|
||||
{
|
||||
///删除文件柜A中数据
|
||||
// BLL.FileCabinetAItemService.DeleteFileCabinetAItemByID(dataId);
|
||||
db.Sys_CodeRecords.DeleteOnSubmit(codeRecords1);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除施工方案/审查
|
||||
/// </summary>
|
||||
/// <param name="constructSolutionId"></param>
|
||||
public static void DeleteConstructSolutionById(string constructSolutionId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Solution_ConstructSolution constructSolution = db.Solution_ConstructSolution.FirstOrDefault(e => e.ConstructSolutionId == constructSolutionId);
|
||||
|
|
|
@ -37,24 +37,26 @@ namespace BLL
|
|||
public static void DeleteConstructSolution(string constructSolutionId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Solution_HSSEConstructSolution constructSolution = db.Solution_HSSEConstructSolution.First(e => e.ConstructSolutionId == constructSolutionId);
|
||||
Model.Solution_HSSEConstructSolution constructSolution = db.Solution_HSSEConstructSolution.FirstOrDefault(e => e.ConstructSolutionId == constructSolutionId);
|
||||
|
||||
db.Solution_HSSEConstructSolution.DeleteOnSubmit(constructSolution);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据方案审查Id删除一个方案审查信息
|
||||
/// </summary>
|
||||
/// <param name="constructSolutionCode">方案审查Id</param>
|
||||
public static void DeleteConstructSolutionByCQMSConstructSolutionId(string CQMSConstructSolutionId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Solution_HSSEConstructSolution constructSolution = db.Solution_HSSEConstructSolution.First(e => e.CQMSConstructSolutionId == CQMSConstructSolutionId);
|
||||
|
||||
db.Solution_HSSEConstructSolution.DeleteOnSubmit(constructSolution);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据方案审查Id删除一个方案审查信息
|
||||
/// </summary>
|
||||
/// <param name="constructSolutionCode">方案审查Id</param>
|
||||
public static void DeleteConstructSolutionByCQMSConstructSolutionId(string CQMSConstructSolutionId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Solution_HSSEConstructSolution constructSolution = db.Solution_HSSEConstructSolution.FirstOrDefault(e => e.CQMSConstructSolutionId == CQMSConstructSolutionId);
|
||||
if (constructSolution != null)
|
||||
{
|
||||
db.Solution_HSSEConstructSolution.DeleteOnSubmit(constructSolution);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加方案审查信息
|
||||
|
|
|
@ -81,12 +81,34 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void UpdateReceiveFileManagerForApi(Model.InformationProject_ReceiveFileManager ReceiveFileManager)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.InformationProject_ReceiveFileManager newReceiveFileManager = db.InformationProject_ReceiveFileManager.FirstOrDefault(e => e.ReceiveFileManagerId == ReceiveFileManager.ReceiveFileManagerId);
|
||||
if (newReceiveFileManager != null)
|
||||
{
|
||||
// newReceiveFileManager.ReceiveFileCode = ReceiveFileManager.ReceiveFileCode;
|
||||
newReceiveFileManager.ReceiveFileName = ReceiveFileManager.ReceiveFileName;
|
||||
newReceiveFileManager.Version = ReceiveFileManager.Version;
|
||||
newReceiveFileManager.FileUnitId = ReceiveFileManager.FileUnitId;
|
||||
newReceiveFileManager.FileCode = ReceiveFileManager.FileCode;
|
||||
newReceiveFileManager.FilePageNum = ReceiveFileManager.FilePageNum;
|
||||
newReceiveFileManager.GetFileDate = ReceiveFileManager.GetFileDate;
|
||||
newReceiveFileManager.SendPersonId = ReceiveFileManager.SendPersonId;
|
||||
newReceiveFileManager.MainContent = ReceiveFileManager.MainContent;
|
||||
newReceiveFileManager.AttachUrl = ReceiveFileManager.AttachUrl;
|
||||
newReceiveFileManager.States = ReceiveFileManager.States;
|
||||
newReceiveFileManager.UnitIds = ReceiveFileManager.UnitIds;
|
||||
newReceiveFileManager.FileType = ReceiveFileManager.FileType;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除一般来文
|
||||
/// </summary>
|
||||
/// <param name="ReceiveFileManagerId"></param>
|
||||
public static void DeleteReceiveFileManagerById(string ReceiveFileManagerId)
|
||||
/// <summary>
|
||||
/// 根据主键删除一般来文
|
||||
/// </summary>
|
||||
/// <param name="ReceiveFileManagerId"></param>
|
||||
public static void DeleteReceiveFileManagerById(string ReceiveFileManagerId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.InformationProject_ReceiveFileManager ReceiveFileManager = db.InformationProject_ReceiveFileManager.FirstOrDefault(e => e.ReceiveFileManagerId == ReceiveFileManagerId);
|
||||
|
|
|
@ -45,12 +45,24 @@
|
|||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///根据ID获取项目编号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string GetProjectCodeByProjectId(string projectId)
|
||||
public static string GetProjectNameByProjectIdForApi(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string name = string.Empty;
|
||||
var project =db.Base_Project.FirstOrDefault(e => e.ProjectId == projectId);
|
||||
if (project != null)
|
||||
{
|
||||
name = project.ProjectName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///根据ID获取项目编号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string GetProjectCodeByProjectId(string projectId)
|
||||
{
|
||||
string name = string.Empty;
|
||||
var project = Funs.DB.Base_Project.FirstOrDefault(e => e.ProjectId == projectId);
|
||||
|
|
|
@ -142,14 +142,33 @@
|
|||
|
||||
return isShow;
|
||||
}
|
||||
public static bool GetProjectUnitTypeByProjectIdUnitIdForApi(string projectId, string unitId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
bool isShow = false;
|
||||
if (unitId != Const.UnitId_CD)
|
||||
{
|
||||
var pUnit = db.Project_ProjectUnit.FirstOrDefault(e => e.ProjectId == projectId && e.UnitId == unitId);
|
||||
if (pUnit != null)
|
||||
{
|
||||
if (pUnit.UnitType == Const.ProjectUnitType_2 || pUnit.UnitType == Const.ProjectUnitType_0)
|
||||
{
|
||||
isShow = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 项目类型单位表下拉框
|
||||
/// <summary>
|
||||
/// 项目类型单位表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitUnitDropDownList(FineUIPro.DropDownList dropName, string projectId, string unitType, bool isShowPlease)
|
||||
return isShow;
|
||||
}
|
||||
}
|
||||
#region 项目类型单位表下拉框
|
||||
/// <summary>
|
||||
/// 项目类型单位表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitUnitDropDownList(FineUIPro.DropDownList dropName, string projectId, string unitType, bool isShowPlease)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
|
|
@ -482,15 +482,39 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
return unitWorkName;
|
||||
}
|
||||
}
|
||||
public static string GetUnitWorkNameForApi(string unitWorkIds)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string unitWorkName = string.Empty;
|
||||
if (!string.IsNullOrEmpty(unitWorkIds))
|
||||
{
|
||||
string[] strs = unitWorkIds.Split(',');
|
||||
foreach (var item in strs)
|
||||
{
|
||||
var un = db.WBS_UnitWork.FirstOrDefault(e => e.UnitWorkId == item);
|
||||
if (un != null)
|
||||
{
|
||||
unitWorkName += un.UnitWorkName + GetProjectType(un.ProjectType) + ",";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitWorkName))
|
||||
{
|
||||
unitWorkName = unitWorkName.Substring(0, unitWorkName.LastIndexOf(","));
|
||||
}
|
||||
}
|
||||
return unitWorkName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单位工程下拉列表
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitUnitWorkDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
|
||||
/// <summary>
|
||||
/// 获取单位工程下拉列表
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitUnitWorkDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
|
||||
{
|
||||
var unitWorks = from x in Funs.DB.WBS_UnitWork
|
||||
where x.ProjectId == projectId && x.SuperUnitWork == null
|
||||
|
|
|
@ -282,15 +282,28 @@ namespace BLL
|
|||
name = WorkArea.WorkAreaCode;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
public static string GetWorkAreaCodeByWorkAreaIdForApi(string workAreaId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string name = string.Empty;
|
||||
var WorkArea =db.ProjectData_WorkArea.FirstOrDefault(x => x.WorkAreaId == workAreaId);
|
||||
if (WorkArea != null)
|
||||
{
|
||||
name = WorkArea.WorkAreaCode;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目ID、装置Id、单位ID获取班组下拉选择项
|
||||
/// </summary>
|
||||
/// <param name="p"></param>
|
||||
/// <param name="p_2"></param>
|
||||
/// <returns></returns>
|
||||
public static object GetWorkAreaListByInstallUnitId(string projectId, string installId, string unitId)
|
||||
/// <summary>
|
||||
/// 根据项目ID、装置Id、单位ID获取班组下拉选择项
|
||||
/// </summary>
|
||||
/// <param name="p"></param>
|
||||
/// <param name="p_2"></param>
|
||||
/// <returns></returns>
|
||||
public static object GetWorkAreaListByInstallUnitId(string projectId, string installId, string unitId)
|
||||
{
|
||||
return (from x in Funs.DB.ProjectData_WorkArea
|
||||
where x.ProjectId == projectId && x.InstallationId == installId && x.UnitId == unitId
|
||||
|
|
|
@ -99,14 +99,27 @@ namespace BLL
|
|||
}
|
||||
return name;
|
||||
}
|
||||
public static string getDepartNameByIdForApi(string departId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string name = string.Empty;
|
||||
var dep = db.Base_Depart.FirstOrDefault(e => e.DepartId == departId);
|
||||
if (dep != null)
|
||||
{
|
||||
name = dep.DepartName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
#region 表下拉框
|
||||
/// <summary>
|
||||
/// 表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitDepartDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
#region 表下拉框
|
||||
/// <summary>
|
||||
/// 表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitDepartDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "DepartId";
|
||||
dropName.DataTextField = "DepartName";
|
||||
|
|
|
@ -170,14 +170,38 @@
|
|||
|
||||
return roleName;
|
||||
}
|
||||
public static string getRoleNamesRoleIdsForApi(object roleIds)
|
||||
{
|
||||
string roleName = string.Empty;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
if (roleIds != null)
|
||||
{
|
||||
string[] roles = roleIds.ToString().Split(',');
|
||||
foreach (string roleId in roles)
|
||||
{
|
||||
var q = db.Sys_Role.FirstOrDefault(x => x.RoleId == roleId);
|
||||
if (q != null && !roleName.Contains(q.RoleName))
|
||||
{
|
||||
roleName += q.RoleName + ",";
|
||||
}
|
||||
}
|
||||
if (roleName != string.Empty)
|
||||
{
|
||||
roleName = roleName.Substring(0, roleName.Length - 1); ;
|
||||
}
|
||||
}
|
||||
}
|
||||
return roleName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 角色下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="projectId">项目id</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitRoleDropDownList(FineUIPro.DropDownList dropName, string roleId, bool? isOffice, bool isShowPlease)
|
||||
/// <summary>
|
||||
/// 角色下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="projectId">项目id</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitRoleDropDownList(FineUIPro.DropDownList dropName, string roleId, bool? isOffice, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "RoleId";
|
||||
dropName.DataTextField = "RoleName";
|
||||
|
|
|
@ -126,14 +126,27 @@
|
|||
}
|
||||
return passScore;
|
||||
}
|
||||
public static int getPassScoreForApi()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
int passScore = 80;
|
||||
var testRule = db.Sys_TestRule.FirstOrDefault();
|
||||
if (testRule != null)
|
||||
{
|
||||
passScore = testRule.PassingScore;
|
||||
}
|
||||
return passScore;
|
||||
}
|
||||
}
|
||||
|
||||
#region 菜单编码模板
|
||||
/// <summary>
|
||||
/// 获取菜单编码模板信息 根据MenuId
|
||||
/// </summary>
|
||||
/// <param name="menuId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Sys_CodeTemplateRule GetCodeTemplateRuleByMenuId(string menuId)
|
||||
#region 菜单编码模板
|
||||
/// <summary>
|
||||
/// 获取菜单编码模板信息 根据MenuId
|
||||
/// </summary>
|
||||
/// <param name="menuId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Sys_CodeTemplateRule GetCodeTemplateRuleByMenuId(string menuId)
|
||||
{
|
||||
return Funs.DB.Sys_CodeTemplateRule.FirstOrDefault(x => x.MenuId == menuId);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using NPOI.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -331,8 +332,22 @@ namespace BLL
|
|||
name = unit.UnitName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
public static string GetUnitNameByUnitId(object unitId)
|
||||
}
|
||||
public static string GetUnitNameByUnitIdForApi(string unitId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
string name = string.Empty;
|
||||
var unit = db.Base_Unit.FirstOrDefault(x => x.UnitId == unitId);
|
||||
if (unit != null)
|
||||
{
|
||||
name = unit.UnitName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
public static string GetUnitNameByUnitId(object unitId)
|
||||
{
|
||||
string name = string.Empty;
|
||||
if (unitId != null)
|
||||
|
@ -391,14 +406,26 @@ namespace BLL
|
|||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
#region 单位表下拉框
|
||||
/// <summary>
|
||||
/// 单位表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitUnitDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
|
||||
public static string GetUnitCodeByUnitIdForApi(string unitId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string code = string.Empty;
|
||||
var unit = db.Base_Unit.FirstOrDefault(x => x.UnitId == unitId);
|
||||
if (unit != null)
|
||||
{
|
||||
code = unit.UnitCode;
|
||||
}
|
||||
return code;
|
||||
}
|
||||
}
|
||||
#region 单位表下拉框
|
||||
/// <summary>
|
||||
/// 单位表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitUnitDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "UnitId";
|
||||
dropName.DataTextField = "UnitName";
|
||||
|
@ -645,14 +672,39 @@ namespace BLL
|
|||
|
||||
return unitName;
|
||||
}
|
||||
#endregion
|
||||
public static string getUnitNamesUnitIdsForApi(object unitIds)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string unitName = string.Empty;
|
||||
if (unitIds != null)
|
||||
{
|
||||
string[] ids = unitIds.ToString().Split(',');
|
||||
foreach (string id in ids)
|
||||
{
|
||||
var q = db.Base_Unit.FirstOrDefault(x => x.UnitId == id) ;
|
||||
if (q != null)
|
||||
{
|
||||
unitName += q.UnitName + ",";
|
||||
}
|
||||
}
|
||||
if (unitName != string.Empty)
|
||||
{
|
||||
unitName = unitName.Substring(0, unitName.Length - 1); ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目Id获取总包和分包单位名称项
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目Id</param>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] drpMainOrSubUnitList(string projectId)
|
||||
return unitName;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目Id获取总包和分包单位名称项
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目Id</param>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] drpMainOrSubUnitList(string projectId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Project_ProjectUnit
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
|
|
|
@ -160,13 +160,26 @@ namespace BLL
|
|||
|
||||
return userName;
|
||||
}
|
||||
public static string GetUserNameByUserIdForApi(string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string userName = string.Empty;
|
||||
Model.Sys_User user = db.Sys_User.FirstOrDefault(e => e.UserId == userId);
|
||||
if (user != null)
|
||||
{
|
||||
userName = user.UserName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ¸ù¾ÝÓû§»ñÈ¡Óû§Ãû³Æ
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetUserNameAndTelByUserId(string userId)
|
||||
return userName;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// ¸ù¾ÝÓû§»ñÈ¡Óû§Ãû³Æ
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetUserNameAndTelByUserId(string userId)
|
||||
{
|
||||
string userName = string.Empty;
|
||||
Model.Sys_User user = Funs.DB.Sys_User.FirstOrDefault(e => e.UserId == userId);
|
||||
|
@ -1322,16 +1335,41 @@ namespace BLL
|
|||
}
|
||||
|
||||
return userName;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
public static string getUserNamesUserIdsForApi(object userIds)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string userName = string.Empty;
|
||||
if (userIds != null)
|
||||
{
|
||||
string[] ids = userIds.ToString().Split(',');
|
||||
foreach (string id in ids)
|
||||
{
|
||||
var q = db.Sys_User.FirstOrDefault(e => e.UserId == id);
|
||||
if (q != null)
|
||||
{
|
||||
userName += q.UserName + ",";
|
||||
}
|
||||
}
|
||||
if (userName != string.Empty)
|
||||
{
|
||||
userName = userName.Substring(0, userName.Length - 1); ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Sys_User> GetProjectUserListByProjectIdForApi(string projectId, string name)
|
||||
return userName;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Sys_User> GetProjectUserListByProjectIdForApi(string projectId, string name)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="施工图纸" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="DrawId" AllowCellEditing="true"
|
||||
ClicksToEdit="2" DataIDField="DrawId" AllowSorting="true" SortField="DrawId"
|
||||
ClicksToEdit="2" DataIDField="DrawId" AllowSorting="true" SortField="DrawId"
|
||||
SortDirection="DESC" EnableColumnLines="true" ForceFit="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10"
|
||||
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True" OnRowDoubleClick="Grid1_RowDoubleClick" OnPageIndexChange="Grid1_PageIndexChange">
|
||||
|
|
|
@ -597,3 +597,140 @@ IP地址:::1
|
|||
|
||||
出错时间:07/01/2023 14:46:08
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:InvalidOperationException
|
||||
错误信息:序列不包含任何元素
|
||||
错误堆栈:
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
|
||||
在 System.Data.Linq.Table`1.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
|
||||
在 System.Linq.Queryable.First[TSource](IQueryable`1 source, Expression`1 predicate)
|
||||
在 BLL.HSSEConstructSolutionService.DeleteConstructSolutionByCQMSConstructSolutionId(String CQMSConstructSolutionId) 位置 D:\project\vs\sggl_cd\SGGL\BLL\HSSE\Solution\HSSEConstructSolutionService.cs:行号 53
|
||||
在 FineUIPro.Web.CQMS.Solution.ConstructSolution.btnMenuDel_Click(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\CQMS\Solution\ConstructSolution.aspx.cs:行号 852
|
||||
在 FineUIPro.MenuButton.OnClick(EventArgs e)
|
||||
在 (MenuButton , EventArgs )
|
||||
在 FineUIPro.MenuButton.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:07/04/2023 15:36:22
|
||||
出错文件:http://localhost:1295/CQMS/Solution/ConstructSolution.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:07/04/2023 15:36:22
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:InvalidOperationException
|
||||
错误信息:序列不包含任何元素
|
||||
错误堆栈:
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
|
||||
在 System.Data.Linq.Table`1.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
|
||||
在 System.Linq.Queryable.First[TSource](IQueryable`1 source, Expression`1 predicate)
|
||||
在 BLL.HSSEConstructSolutionService.DeleteConstructSolutionByCQMSConstructSolutionId(String CQMSConstructSolutionId) 位置 D:\project\vs\sggl_cd\SGGL\BLL\HSSE\Solution\HSSEConstructSolutionService.cs:行号 53
|
||||
在 FineUIPro.Web.CQMS.Solution.ConstructSolution.btnMenuDel_Click(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\CQMS\Solution\ConstructSolution.aspx.cs:行号 852
|
||||
在 FineUIPro.MenuButton.OnClick(EventArgs e)
|
||||
在 (MenuButton , EventArgs )
|
||||
在 FineUIPro.MenuButton.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:07/04/2023 15:36:36
|
||||
出错文件:http://localhost:1295/CQMS/Solution/ConstructSolution.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:07/04/2023 15:36:36
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:FormatException
|
||||
错误信息:索引(从零开始)必须大于或等于零,且小于参数列表的大小。
|
||||
错误堆栈:
|
||||
在 System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
|
||||
在 System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
|
||||
在 System.String.Format(String format, Object arg0)
|
||||
在 FineUIPro.HyperLinkField.VQscVYXUOqxsrrrlgEYaXHIhTAZB(GridRow )
|
||||
在 (GridColumn , GridRow )
|
||||
在 FineUIPro.GridRow.BkpgFeAELTFlAvoTrOBrConfcLJbA()
|
||||
在 (GridRow )
|
||||
在 FineUIPro.Grid.BkpgFeAELTFlAvoTrOBrConfcLJbA(Int32 , Object )
|
||||
在 (Grid , Int32 , Object )
|
||||
在 FineUIPro.Grid.CRTRkdQFrrBRFQuCddjZPswlTORP(IEnumerable , Boolean )
|
||||
在 (Grid , IEnumerable , Boolean )
|
||||
在 FineUIPro.Grid.DataBind(Boolean keepCurrentData)
|
||||
在 (Grid , Boolean )
|
||||
在 FineUIPro.Grid.DataBind()
|
||||
在 FineUIPro.Web.AttachFile.webuploader.BindGrid() 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\AttachFile\webuploader.aspx.cs:行号 153
|
||||
在 FineUIPro.Web.AttachFile.webuploader.Page_Load(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\AttachFile\webuploader.aspx.cs:行号 117
|
||||
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
|
||||
在 System.EventHandler.Invoke(Object sender, EventArgs e)
|
||||
在 System.Web.UI.Control.OnLoad(EventArgs e)
|
||||
在 System.Web.UI.Control.LoadRecursive()
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:07/08/2023 17:49:49
|
||||
出错文件:http://localhost:1295/AttachFile/webuploader.aspx?type=0&toKeyId=444bf309-526a-4c08-b9e9-76a4f676740b&path=FileUpload/PZHGL/XmsgGlgdUrl/&menuId=90217D8E-D2AC-4B8D-A1A7-A27317890408
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:07/08/2023 17:49:49
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:NullReferenceException
|
||||
错误信息:未将对象引用设置到对象的实例。
|
||||
错误堆栈:
|
||||
在 FineUIPro.Web.HSSE.HiddenInspection.HiddenRectificationList.GetButtonPower() 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\HiddenInspection\HiddenRectificationList.aspx.cs:行号 826
|
||||
在 FineUIPro.Web.HSSE.HiddenInspection.HiddenRectificationList.Page_Load(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\HiddenInspection\HiddenRectificationList.aspx.cs:行号 44
|
||||
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
|
||||
在 System.EventHandler.Invoke(Object sender, EventArgs e)
|
||||
在 System.Web.UI.Control.OnLoad(EventArgs e)
|
||||
在 System.Web.UI.Control.LoadRecursive()
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:07/09/2023 10:53:56
|
||||
出错文件:http://localhost:1295/HSSE/HiddenInspection/HiddenRectificationList.aspx
|
||||
IP地址:::1
|
||||
|
||||
出错时间:07/09/2023 10:53:57
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:SqlException
|
||||
错误信息:参数化查询 '(@ProjectId nvarchar(4000))select HazardList.HazardListId,Hazard' 需要参数 '@ProjectId',但未提供该参数。
|
||||
错误堆栈:
|
||||
在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
|
||||
在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
|
||||
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
|
||||
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
|
||||
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
|
||||
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
|
||||
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
|
||||
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
|
||||
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
|
||||
在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
|
||||
在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 D:\project\vs\sggl_cd\SGGL\BLL\SQLHelper.cs:行号 311
|
||||
在 FineUIPro.Web.HSSE.Hazard.HazardList.BindGrid() 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Hazard\HazardList.aspx.cs:行号 100
|
||||
在 FineUIPro.Web.HSSE.Hazard.HazardList.Page_Load(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Hazard\HazardList.aspx.cs:行号 65
|
||||
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
|
||||
在 System.EventHandler.Invoke(Object sender, EventArgs e)
|
||||
在 System.Web.UI.Control.OnLoad(EventArgs e)
|
||||
在 System.Web.UI.Control.LoadRecursive()
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:07/09/2023 11:29:41
|
||||
出错文件:http://localhost:1295/HSSE/Hazard/HazardList.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:07/09/2023 11:29:41
|
||||
|
||||
|
|
|
@ -374,7 +374,11 @@ namespace FineUIPro.Web.HSSE.Hazard
|
|||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = Grid1.RecordCount;
|
||||
this.BindGrid();
|
||||
|
||||
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
|
||||
|
||||
Response.End();
|
||||
}
|
||||
|
||||
|
|
|
@ -174,12 +174,12 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
|||
}
|
||||
if (this.drpStates.SelectedValueArray.Contains("2"))
|
||||
{
|
||||
strSqlTemp += " ( States in( '2','3') and RectificationPeriod > RectificationTime) OR";
|
||||
strSqlTemp += " ( States in( '2','3') and datediff(DAY,RectificationPeriod,RectificationTime)>0 ) OR";
|
||||
|
||||
}
|
||||
if (this.drpStates.SelectedValueArray.Contains("3"))
|
||||
{
|
||||
strSqlTemp += " (States in( '2','3') and RectificationPeriod < RectificationTime ) OR";
|
||||
strSqlTemp += " (States in( '2','3') and datediff(DAY,RectificationPeriod,RectificationTime)<=0 ) OR";
|
||||
|
||||
}
|
||||
if (this.drpStates.SelectedValueArray.Contains("4"))
|
||||
|
@ -655,15 +655,17 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
|||
Model.View_Hazard_HazardRegister registration = (from x in Funs.DB.View_Hazard_HazardRegister where x.HazardRegisterId == registrationId.ToString() select x).FirstOrDefault();
|
||||
if (registration != null)
|
||||
{
|
||||
if (registration.States == "1" && registration.RectificationPeriod.Value > DateTime.Now)
|
||||
DateTime RectificationPeriod = DateTime.Parse(registration.RectificationPeriod.Value.ToString("yyyy-MM-dd")).AddDays(1);
|
||||
|
||||
if (registration.States == "1" && RectificationPeriod > DateTime.Now)
|
||||
{
|
||||
state += "未整改";
|
||||
}
|
||||
else if ((registration.States == "2" || registration.States == "3")&& registration.RectificationPeriod.Value>registration.RectificationTime.Value)
|
||||
else if ((registration.States == "2" || registration.States == "3")&& RectificationPeriod > registration.RectificationTime.Value)
|
||||
{
|
||||
state += "按时整改";
|
||||
}
|
||||
else if ((registration.States == "2" || registration.States == "3") && registration.RectificationPeriod.Value < registration.RectificationTime.Value)
|
||||
else if ((registration.States == "2" || registration.States == "3") && RectificationPeriod <= registration.RectificationTime.Value)
|
||||
{
|
||||
state += "超期整改";
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<appSettings>
|
||||
<!--连接字符串-->
|
||||
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_CD;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
|
||||
<add key="ConnectionString" value="Server=.\;Database=SGGLDB_CD;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true; Connect Timeout=1200;Pooling=true; MAX Pool Size=512;Min Pool Size=50;Connection Lifetime=30"/>
|
||||
<add key="ConnectionString" value="Server=.;Database=SGGLDB_CD;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true; Connect Timeout=1200;Pooling=true; MAX Pool Size=512;Min Pool Size=50;Connection Lifetime=30"/>
|
||||
<!--系统名称-->
|
||||
<add key="SystemName" value="数字化施工管理信息平台V1.0"/>
|
||||
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
||||
|
|
Loading…
Reference in New Issue