Merge branch 'master' of https://gitee.com/frane-yang/SGGL_SeDin_New
This commit is contained in:
@@ -266,6 +266,7 @@
|
||||
<Compile Include="CQMS\Check\CheckControlService.cs" />
|
||||
<Compile Include="CQMS\Check\CheckEquipmentApproveService.cs" />
|
||||
<Compile Include="CQMS\Check\CheckEquipmentService.cs" />
|
||||
<Compile Include="CQMS\Check\CheckMaterialacceptance.cs" />
|
||||
<Compile Include="CQMS\Check\CheckMonthService.cs" />
|
||||
<Compile Include="CQMS\Check\DesignApproveService.cs" />
|
||||
<Compile Include="CQMS\Check\DesignService.cs" />
|
||||
|
||||
@@ -34,7 +34,8 @@ namespace BLL
|
||||
TrainTypeName = trainType.TrainTypeName,
|
||||
Remark = trainType.Remark,
|
||||
IsAboutSendCard = trainType.IsAboutSendCard,
|
||||
IsRepeat = trainType.IsRepeat
|
||||
IsRepeat = trainType.IsRepeat,
|
||||
TrainType=trainType.TrainType,
|
||||
};
|
||||
db.Base_TrainType.InsertOnSubmit(newTrainType);
|
||||
db.SubmitChanges();
|
||||
@@ -55,6 +56,7 @@ namespace BLL
|
||||
newTrainType.Remark = trainType.Remark;
|
||||
newTrainType.IsAboutSendCard = trainType.IsAboutSendCard;
|
||||
newTrainType.IsRepeat = trainType.IsRepeat;
|
||||
newTrainType.TrainType = trainType.TrainType;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace BLL
|
||||
WorkPostCode = workPost.WorkPostCode,
|
||||
WorkPostName = workPost.WorkPostName,
|
||||
PostType = workPost.PostType,
|
||||
IsCQMS=workPost.IsCQMS,
|
||||
IsHsse = workPost.IsHsse,
|
||||
CNCodes = workPost.CNCodes,
|
||||
Remark = workPost.Remark
|
||||
@@ -54,6 +55,7 @@ namespace BLL
|
||||
newWorkPost.WorkPostName = workPost.WorkPostName;
|
||||
newWorkPost.PostType = workPost.PostType;
|
||||
newWorkPost.IsHsse = workPost.IsHsse;
|
||||
newWorkPost.IsCQMS = workPost.IsCQMS;
|
||||
newWorkPost.CNCodes = workPost.CNCodes;
|
||||
newWorkPost.Remark = workPost.Remark;
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
using FineUIPro;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
||||
public static class CheckMaterialacceptanceService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
public static int count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public static List<Model.Check_MaterialAcceptance> GetCheck_MaterialAcceptanceByModle(Model.Check_MaterialAcceptance table)
|
||||
{
|
||||
var q = from x in db.Check_MaterialAcceptance
|
||||
where
|
||||
(string.IsNullOrEmpty(table.MaterialAcceptanceId) || x.MaterialAcceptanceId.Contains(table.MaterialAcceptanceId)) &&
|
||||
(string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) &&
|
||||
(string.IsNullOrEmpty(table.PlanCode) || x.PlanCode.Contains(table.PlanCode)) &&
|
||||
(string.IsNullOrEmpty(table.FileName) || x.FileName.Contains(table.FileName)) &&
|
||||
(string.IsNullOrEmpty(table.CompileMan) || x.CompileMan.Contains(table.CompileMan)) &&
|
||||
(string.IsNullOrEmpty(table.State) || x.State.Contains(table.State)) &&
|
||||
(string.IsNullOrEmpty(table.FilePath) || x.FilePath.Contains(table.FilePath))
|
||||
select x
|
||||
;
|
||||
|
||||
return q.ToList();
|
||||
}
|
||||
|
||||
/// 获取分页列表
|
||||
/// </summary>
|
||||
/// <param name="PageIndex">页码</param>
|
||||
/// <param name="PageSize">每页数量</param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(Model.Check_MaterialAcceptance table, Grid Grid1)
|
||||
{
|
||||
var q = GetCheck_MaterialAcceptanceByModle(table);
|
||||
count = q.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
// q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList();
|
||||
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in q
|
||||
select new
|
||||
{
|
||||
x.MaterialAcceptanceId,
|
||||
x.ProjectId,
|
||||
x.PlanCode,
|
||||
x.FileName,
|
||||
x.CompileMan,
|
||||
x.CompileDate,
|
||||
x.State,
|
||||
x.FilePath,
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static Model.Check_MaterialAcceptance GetCheck_MaterialAcceptanceById(string MaterialAcceptanceId)
|
||||
{
|
||||
return db.Check_MaterialAcceptance.FirstOrDefault(x => x.MaterialAcceptanceId == MaterialAcceptanceId);
|
||||
}
|
||||
|
||||
|
||||
public static void AddCheck_MaterialAcceptance(Model.Check_MaterialAcceptance newtable)
|
||||
{
|
||||
|
||||
Model.Check_MaterialAcceptance table = new Model.Check_MaterialAcceptance
|
||||
{
|
||||
MaterialAcceptanceId = newtable.MaterialAcceptanceId,
|
||||
ProjectId = newtable.ProjectId,
|
||||
PlanCode = newtable.PlanCode,
|
||||
FileName = newtable.FileName,
|
||||
CompileMan = newtable.CompileMan,
|
||||
CompileDate = newtable.CompileDate,
|
||||
State = newtable.State,
|
||||
FilePath = newtable.FilePath,
|
||||
};
|
||||
db.Check_MaterialAcceptance.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkCheck_MaterialAcceptance(List<Model.Check_MaterialAcceptance> newtables)
|
||||
{
|
||||
|
||||
db.Check_MaterialAcceptance.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
public static void UpdateCheck_MaterialAcceptance(Model.Check_MaterialAcceptance newtable)
|
||||
{
|
||||
|
||||
Model.Check_MaterialAcceptance table = db.Check_MaterialAcceptance.FirstOrDefault(x => x.MaterialAcceptanceId == newtable.MaterialAcceptanceId);
|
||||
if (table != null)
|
||||
{
|
||||
table.MaterialAcceptanceId = newtable.MaterialAcceptanceId;
|
||||
table.ProjectId = newtable.ProjectId;
|
||||
table.PlanCode = newtable.PlanCode;
|
||||
table.FileName = newtable.FileName;
|
||||
table.CompileMan = newtable.CompileMan;
|
||||
table.CompileDate = newtable.CompileDate;
|
||||
table.State = newtable.State;
|
||||
table.FilePath = newtable.FilePath;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteCheck_MaterialAcceptanceById(string MaterialAcceptanceId)
|
||||
{
|
||||
|
||||
Model.Check_MaterialAcceptance table = db.Check_MaterialAcceptance.FirstOrDefault(x => x.MaterialAcceptanceId == MaterialAcceptanceId);
|
||||
if (table != null)
|
||||
{
|
||||
db.Check_MaterialAcceptance.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteALLCheck_MaterialAcceptance()
|
||||
{
|
||||
if (db.Check_MaterialAcceptance != null)
|
||||
{
|
||||
db.Check_MaterialAcceptance.DeleteAllOnSubmit(db.Check_MaterialAcceptance);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -80,6 +80,25 @@ namespace BLL
|
||||
return Funs.DB.AttachFile.FirstOrDefault(e => e.ToKeyId == toKey);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据对应主键获取文件信息
|
||||
/// </summary>
|
||||
/// <param name="toKey">对应主键</param>
|
||||
/// <returns>文件信息</returns>
|
||||
public static string GetBtnFileUrl(object toKey)
|
||||
{
|
||||
string fileUrl = string.Empty;
|
||||
if (toKey != null)
|
||||
{
|
||||
Model.AttachFile file = Funs.DB.AttachFile.FirstOrDefault(e => e.ToKeyId == toKey.ToString());
|
||||
if (file != null && !string.IsNullOrEmpty(file.AttachUrl))
|
||||
{
|
||||
string url = file.AttachUrl.Replace('\\', '/');
|
||||
fileUrl = BLL.UploadAttachmentService.ShowAttachment2("../../", url);
|
||||
}
|
||||
}
|
||||
return fileUrl;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -149,6 +168,22 @@ namespace BLL
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="toKeyId"></param>
|
||||
/// <param name="menuId"></param>
|
||||
/// <returns></returns>
|
||||
public static IList<Model.AttachFile> GetBeforeFileList(string toKeyId, string menuId)
|
||||
{
|
||||
List<string> listToKeyId = new List<string>();
|
||||
listToKeyId.Add(toKeyId);
|
||||
// listToKeyId.Add(toKeyId + "r");
|
||||
//listToKeyId.Add(toKeyId + "re");
|
||||
var list = Funs.DB.AttachFile.Where(p => listToKeyId.Contains(p.ToKeyId) && p.MenuId == menuId).ToList();
|
||||
return list;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
@@ -317,6 +317,16 @@
|
||||
#endregion
|
||||
|
||||
#region 内置岗位
|
||||
/// <summary>
|
||||
/// 安全总监岗位Id
|
||||
/// </summary>
|
||||
public static string WorkPost_HSSEDirector = "8A7C2CDF-AFB5-4826-9951-343253342DAC";
|
||||
|
||||
/// <summary>
|
||||
/// 项目安全总监岗位Id
|
||||
/// </summary>
|
||||
public static string WorkPost_ProjectHSSEDirector = "5e6e259e-ea0a-4a63-8f52-df4a19a6c9fa";
|
||||
|
||||
/// <summary>
|
||||
/// HSE工程师岗位Id
|
||||
/// </summary>
|
||||
@@ -3423,6 +3433,11 @@
|
||||
/// 工序资料记录
|
||||
/// </summary>
|
||||
public const string SpotDataCheckMenuId = "8317C0F7-3A69-48AB-87E5-03E96C543B1C";
|
||||
/// <summary>
|
||||
/// 资料验收
|
||||
/// </summary>
|
||||
public const string CheckMaterialacceptanceMenuId = "0B17549C-2749-4255-BFF4-574902E878FA";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 人员管理
|
||||
@@ -4271,6 +4286,7 @@
|
||||
/// </summary>
|
||||
public const string Pipeline_ComponentPath = "File\\Excel\\DataIn\\组件管理二维码信息导入.xlsx";
|
||||
|
||||
|
||||
#region 焊接报表
|
||||
/// <summary>
|
||||
/// 管道焊接工作记录
|
||||
@@ -4349,6 +4365,11 @@
|
||||
#endregion
|
||||
|
||||
#region 合同附件Id
|
||||
/// <summary>
|
||||
/// 招标文件台账模板
|
||||
/// </summary>
|
||||
public const string BidDocumentsStandingBookIn = "File\\Excel\\DataIn\\BidDocumentsStandingBookIn.xlsx";
|
||||
|
||||
/// <summary>
|
||||
/// 附件1
|
||||
/// </summary>
|
||||
|
||||
@@ -47,6 +47,43 @@ namespace BLL
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件显示不带删除
|
||||
/// <summary>
|
||||
/// 附件显示
|
||||
/// </summary>
|
||||
public static string ShowAttachment2(string rootPath, string path)
|
||||
{
|
||||
string htmlStr = string.Empty;
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
htmlStr = "<table runat='server' cellpadding='5' cellspacing='5' style=\"width: 100%\">";
|
||||
string[] arrStr = path.Split(new string[] { "," }, System.StringSplitOptions.RemoveEmptyEntries);
|
||||
for (int i = 0; i < arrStr.Length; i++)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(arrStr[i]))
|
||||
{
|
||||
string[] urlArray = arrStr[i].Split('\\');
|
||||
string scanUrl = string.Empty;
|
||||
for (int j = 0; j < urlArray.Length; j++)
|
||||
{
|
||||
scanUrl += urlArray[j] + "|";
|
||||
}
|
||||
|
||||
string url = rootPath + arrStr[i].Replace('\\', '/');
|
||||
string[] subUrl = url.Split('/');
|
||||
string fileName = subUrl[subUrl.Count() - 1];
|
||||
string newFileName = fileName.Substring(fileName.IndexOf("_") + 1);
|
||||
htmlStr += "<tr><td style=\"width: 60%\" align=\"left\"><span style='cursor:pointer;cursor:pointer;cursor:pointer;TEXT-DECORATION: underline;color:blue' onclick=\"window.open('" + url + "')\">" + newFileName + "</span></td>";
|
||||
}
|
||||
}
|
||||
|
||||
htmlStr += "</table>";
|
||||
}
|
||||
|
||||
return htmlStr;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件显示带删除 页面单个附件
|
||||
/// <summary>
|
||||
/// 附件显示
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.View_SitePerson_Person> getDataLists = from x in db.View_SitePerson_Person
|
||||
private static IQueryable<Model.View_SitePerson_Person> getDataLists = from x in Funs.DB.View_SitePerson_Person
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
@@ -637,7 +637,7 @@ namespace BLL
|
||||
var getSitePerson = GetSitePersonByProjectIdPersonId(projectId, personId);
|
||||
if (getSitePerson != null && string.IsNullOrEmpty(getSitePerson.CardNo))
|
||||
{
|
||||
string prefix = UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId);
|
||||
string prefix = UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId) + "-";
|
||||
var getMaxCarNo = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == projectId && x.CardNo.Contains(prefix)).Max(x => x.CardNo);
|
||||
if (!string.IsNullOrEmpty(getMaxCarNo) && getMaxCarNo.Length > 5)
|
||||
{
|
||||
@@ -660,7 +660,7 @@ namespace BLL
|
||||
var getSitePerson = GetSitePersonById(sitepersinId);
|
||||
if (getSitePerson != null && string.IsNullOrEmpty(getSitePerson.CardNo))
|
||||
{
|
||||
cardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", getSitePerson.ProjectId, UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId));
|
||||
cardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", getSitePerson.ProjectId, UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId) +"-");
|
||||
getSitePerson.CardNo = cardNo;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using FineUIPro;
|
||||
using MiniExcelLibs.Attributes;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -39,8 +40,10 @@ namespace BLL
|
||||
(string.IsNullOrEmpty(table.ProposedInviter) || x.ProposedInviter.Contains(table.ProposedInviter)) &&
|
||||
(string.IsNullOrEmpty(table.ApprovePersonFormCode) || x.ApprovePersonFormCode.Contains(table.ApprovePersonFormCode)) &&
|
||||
(string.IsNullOrEmpty(table.BidWinner) || x.BidWinner.Contains(table.BidWinner)) &&
|
||||
(string.IsNullOrEmpty(table.SetSubReviewCode) || x.SetSubReviewCode.Contains(table.SetSubReviewCode))
|
||||
select x
|
||||
(string.IsNullOrEmpty(table.SetSubReviewCode) || x.SetSubReviewCode.Contains(table.SetSubReviewCode)) &&
|
||||
(string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId))&&
|
||||
(table.State == null||x.State==table.State)
|
||||
select x
|
||||
;
|
||||
|
||||
return q.ToList();
|
||||
@@ -80,6 +83,8 @@ namespace BLL
|
||||
x.ApprovePersonFormCode,
|
||||
x.BidWinner,
|
||||
x.SetSubReviewCode,
|
||||
x.ProjectId,
|
||||
x.State
|
||||
|
||||
};
|
||||
}
|
||||
@@ -112,6 +117,8 @@ namespace BLL
|
||||
ApprovePersonFormCode = newtable.ApprovePersonFormCode,
|
||||
BidWinner = newtable.BidWinner,
|
||||
SetSubReviewCode = newtable.SetSubReviewCode,
|
||||
ProjectId= newtable.ProjectId,
|
||||
State=newtable.State,
|
||||
};
|
||||
db.PHTGL_BidDocumentsStandingBook.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
@@ -147,6 +154,8 @@ namespace BLL
|
||||
table.ApprovePersonFormCode = newtable.ApprovePersonFormCode;
|
||||
table.BidWinner = newtable.BidWinner;
|
||||
table.SetSubReviewCode = newtable.SetSubReviewCode;
|
||||
table.ProjectId=newtable.ProjectId;
|
||||
table.State=newtable.State;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -173,4 +182,5 @@ namespace BLL
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user