fix:补充企业大检查等web
This commit is contained in:
@@ -299,6 +299,7 @@
|
||||
<Compile Include="Common\Redis\ICache.cs" />
|
||||
<Compile Include="Common\Redis\Redis.cs" />
|
||||
<Compile Include="Common\Redis\RedisHelper.cs" />
|
||||
<Compile Include="Common\Sys_CQMS_DataInTempService.cs" />
|
||||
<Compile Include="Common\UploadFileService.cs" />
|
||||
<Compile Include="Common\UpLoadImageService.cs" />
|
||||
<Compile Include="Common\UserShowColumnsService.cs" />
|
||||
@@ -310,6 +311,8 @@
|
||||
<Compile Include="CostGoods\SubPayRegistrationService.cs" />
|
||||
<Compile Include="CQMS\Check\CheckFineService.cs" />
|
||||
<Compile Include="CQMS\Check\RewardAndPunishService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\ConTechnologyDisclosureService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\QualityAssuranceService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\QualitySampleFirstAccFileService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\FinalFileService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\DesignDrawingsApproveService.cs" />
|
||||
@@ -321,6 +324,7 @@
|
||||
<Compile Include="CQMS\Comprehensive\PersonWeldMethodService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\QualityAccidentApproveService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\PressurePipeApproveService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\ReviewDrawingsService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\SpecialEquipmentApproveService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\NCRManagementApproveService.cs" />
|
||||
<Compile Include="CQMS\Comprehensive\DesignDetailsApproveService.cs" />
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 施工技术交底管理
|
||||
/// </summary>
|
||||
public class ConTechnologyDisclosureService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取施工技术交底管理
|
||||
/// </summary>
|
||||
/// <param name="conTechnologyDisclosureId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Comprehensive_ConTechnologyDisclosure GetConTechnologyDisclosureById(string conTechnologyDisclosureId)
|
||||
{
|
||||
return Funs.DB.Comprehensive_ConTechnologyDisclosure.FirstOrDefault(e => e.ConTechnologyDisclosureId == conTechnologyDisclosureId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加施工技术交底管理
|
||||
/// </summary>
|
||||
/// <param name="newCon"></param>
|
||||
public static void AddConTechnologyDisclosure(Model.Comprehensive_ConTechnologyDisclosure con)
|
||||
{
|
||||
Model.Comprehensive_ConTechnologyDisclosure newCon = new Model.Comprehensive_ConTechnologyDisclosure
|
||||
{
|
||||
ConTechnologyDisclosureId = con.ConTechnologyDisclosureId,
|
||||
ProjectId = con.ProjectId,
|
||||
CNProfessionalId = con.CNProfessionalId,
|
||||
DisclosureCode = con.DisclosureCode,
|
||||
DisclosureName = con.DisclosureName,
|
||||
UnitId = con.UnitId,
|
||||
DisclosureMan = con.DisclosureMan,
|
||||
DisclosureDate = con.DisclosureDate,
|
||||
UnitWorkId = con.UnitWorkId,
|
||||
AttendMan = con.AttendMan,
|
||||
DisclosurePersonNum = con.DisclosurePersonNum,
|
||||
CompileMan = con.CompileMan,
|
||||
CompileDate = con.CompileDate,
|
||||
RemarkCode = con.RemarkCode
|
||||
};
|
||||
Funs.DB.Comprehensive_ConTechnologyDisclosure.InsertOnSubmit(newCon);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改施工技术交底管理
|
||||
/// </summary>
|
||||
/// <param name="con"></param>
|
||||
public static void UpdateConTechnologyDisclosure(Model.Comprehensive_ConTechnologyDisclosure con)
|
||||
{
|
||||
Model.Comprehensive_ConTechnologyDisclosure newCon = Funs.DB.Comprehensive_ConTechnologyDisclosure.FirstOrDefault(e => e.ConTechnologyDisclosureId == con.ConTechnologyDisclosureId);
|
||||
if (newCon != null)
|
||||
{
|
||||
newCon.CNProfessionalId = con.CNProfessionalId;
|
||||
newCon.DisclosureCode = con.DisclosureCode;
|
||||
newCon.DisclosureName = con.DisclosureName;
|
||||
newCon.UnitId = con.UnitId;
|
||||
newCon.DisclosureMan = con.DisclosureMan;
|
||||
newCon.DisclosureDate = con.DisclosureDate;
|
||||
newCon.UnitWorkId = con.UnitWorkId;
|
||||
newCon.AttendMan = con.AttendMan;
|
||||
newCon.DisclosurePersonNum = con.DisclosurePersonNum;
|
||||
newCon.RemarkCode = con.RemarkCode;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id删除施工技术交底管理
|
||||
/// </summary>
|
||||
/// <param name="conTechnologyDisclosureId"></param>
|
||||
public static void DeleteConTechnologyDisclosureById(string conTechnologyDisclosureId)
|
||||
{
|
||||
Model.Comprehensive_ConTechnologyDisclosure newCon = Funs.DB.Comprehensive_ConTechnologyDisclosure.FirstOrDefault(e => e.ConTechnologyDisclosureId == conTechnologyDisclosureId);
|
||||
if (newCon != null)
|
||||
{
|
||||
Funs.DB.Comprehensive_ConTechnologyDisclosure.DeleteOnSubmit(newCon);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 特设质保体系
|
||||
/// </summary>
|
||||
public class QualityAssuranceService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取特设质保体系
|
||||
/// </summary>
|
||||
/// <param name="qualityAssuranceId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Comprehensive_QualityAssurance GetQualityAssuranceById(string qualityAssuranceId)
|
||||
{
|
||||
return Funs.DB.Comprehensive_QualityAssurance.FirstOrDefault(e => e.QualityAssuranceId == qualityAssuranceId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加特设质保体系
|
||||
/// </summary>
|
||||
/// <param name="qualityAssurance"></param>
|
||||
public static void AddQualityAssurance(Model.Comprehensive_QualityAssurance qualityAssurance)
|
||||
{
|
||||
Model.SUBQHSEDB db = Funs.DB;
|
||||
Model.Comprehensive_QualityAssurance newAssurance = new Model.Comprehensive_QualityAssurance
|
||||
{
|
||||
QualityAssuranceId = qualityAssurance.QualityAssuranceId,
|
||||
ProjectId = qualityAssurance.ProjectId,
|
||||
QualityAssuranceCode = qualityAssurance.QualityAssuranceCode,
|
||||
QualityAssuranceName = qualityAssurance.QualityAssuranceName,
|
||||
QualityAssuranceType = qualityAssurance.QualityAssuranceType,
|
||||
ContentTexts = qualityAssurance.ContentTexts,
|
||||
CompileMan = qualityAssurance.CompileMan,
|
||||
CompileDate = qualityAssurance.CompileDate,
|
||||
};
|
||||
db.Comprehensive_QualityAssurance.InsertOnSubmit(newAssurance);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改特设质保体系
|
||||
/// </summary>
|
||||
/// <param name="qualityAssurance"></param>
|
||||
public static void UpdateQualityAssurance(Model.Comprehensive_QualityAssurance qualityAssurance)
|
||||
{
|
||||
Model.SUBQHSEDB db = Funs.DB;
|
||||
Model.Comprehensive_QualityAssurance newAssurance = db.Comprehensive_QualityAssurance.FirstOrDefault(e => e.QualityAssuranceId == qualityAssurance.QualityAssuranceId);
|
||||
if (newAssurance != null)
|
||||
{
|
||||
newAssurance.QualityAssuranceCode = qualityAssurance.QualityAssuranceCode;
|
||||
newAssurance.QualityAssuranceName = qualityAssurance.QualityAssuranceName;
|
||||
newAssurance.QualityAssuranceType = qualityAssurance.QualityAssuranceType;
|
||||
newAssurance.ContentTexts = qualityAssurance.ContentTexts;
|
||||
newAssurance.CompileMan = qualityAssurance.CompileMan;
|
||||
newAssurance.CompileDate = qualityAssurance.CompileDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除特设质保体系
|
||||
/// </summary>
|
||||
/// <param name="qualityAssuranceId"></param>
|
||||
public static void DeleteQualityAssuranceById(string qualityAssuranceId)
|
||||
{
|
||||
Model.SUBQHSEDB db = Funs.DB;
|
||||
Model.Comprehensive_QualityAssurance qualityAssurance = db.Comprehensive_QualityAssurance.FirstOrDefault(e => e.QualityAssuranceId == qualityAssuranceId);
|
||||
if (qualityAssurance != null)
|
||||
{
|
||||
db.Comprehensive_QualityAssurance.DeleteOnSubmit(qualityAssurance);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class ReviewDrawingsService
|
||||
{
|
||||
public static bool Insert(Model.Comprehensive_ReviewDrawings model)
|
||||
{
|
||||
try
|
||||
{
|
||||
Funs.DB.Comprehensive_ReviewDrawings.InsertOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"插入数据失败,原因:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Update(Model.Comprehensive_ReviewDrawings model)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(a => a.Id == model.Id);
|
||||
if (result != null)
|
||||
{
|
||||
result.CNProfessionalId = model.CNProfessionalId;
|
||||
result.DraCode = model.DraCode;
|
||||
result.ReviewDate = model.ReviewDate;
|
||||
result.UnitWorkId = model.UnitWorkId;
|
||||
result.ReceiveUnits = model.ReceiveUnits;
|
||||
result.Status = model.Status;
|
||||
result.Remarks = model.Remarks;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"更新表数据失败,原因:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Delete(List<string> newId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = Funs.DB.Comprehensive_ReviewDrawings.Where(a => newId.Contains(a.Id)).ToList();
|
||||
if (result.Count > 0)
|
||||
{
|
||||
Funs.DB.Comprehensive_ReviewDrawings.DeleteAllOnSubmit(result);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Delete(string newId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = Funs.DB.Comprehensive_ReviewDrawings.Where(a => a.Id == newId).ToList();
|
||||
if (result.Count > 0)
|
||||
{
|
||||
Funs.DB.Comprehensive_ReviewDrawings.DeleteAllOnSubmit(result);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static Model.Comprehensive_ReviewDrawings Detail(string newId)
|
||||
{
|
||||
var result = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(a => a.Id == newId);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6732,5 +6732,25 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string CQMSRectifyMenuId = "D72BB321-11A8-485B-BAC7-367C7FCA7FBA";
|
||||
/// <summary>
|
||||
/// /// <summary>
|
||||
/// 施工技术交底管理导入模板原始虚拟路径
|
||||
/// </summary>
|
||||
public const string ConTechnologyDisclosureTemUrl = "File\\Excel\\DataIn\\施工技术交底管理导入模板.xls";
|
||||
/// <summary>
|
||||
/// 施工技术交底管理
|
||||
/// </summary>
|
||||
public const string ConTechnologyDisclosureMenuId = "A16CFA9D-2783-4573-95F9-EBA2B682B7EA";
|
||||
/// <summary>
|
||||
/// 特设质保体系
|
||||
/// </summary>
|
||||
public const string CQMS_QualityAssuranceMenuId = "2C49EC5E-BF6F-4C44-BA02-9BD183CF68C6";
|
||||
/// <summary>
|
||||
/// 图纸会审管理
|
||||
/// </summary>
|
||||
public const string ReviewDrawingsMenuId = "856D53B3-C5FB-443F-917B-39E83BE685DB";
|
||||
/// <summary>
|
||||
/// 图纸会审记录导入模板文件原始虚拟路径
|
||||
/// </summary>
|
||||
public const string ReviewDrawingsTemplateUrl = "File\\Excel\\DataIn\\图纸会审管理导入模板.xls";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class Sys_CQMS_DataInTempService
|
||||
{ /// <summary>
|
||||
/// 根据主键获取导入临时表信息
|
||||
/// </summary>
|
||||
/// <param name="tempId">Id</param>
|
||||
/// <returns></returns>
|
||||
public static Model.Sys_CQMS_DataInTemp GetDataInTempByTempId(string tempId)
|
||||
{
|
||||
return Funs.DB.Sys_CQMS_DataInTemp.FirstOrDefault(x => x.TempId == tempId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加导入临时表记录
|
||||
/// </summary>
|
||||
/// <param name="dataInTemp">委托实体</param>
|
||||
public static void AddDataInTemp(Model.Sys_CQMS_DataInTemp dataInTemp)
|
||||
{
|
||||
Model.SUBQHSEDB db = Funs.DB;
|
||||
Model.Sys_CQMS_DataInTemp newDataInTemp = new Model.Sys_CQMS_DataInTemp();
|
||||
newDataInTemp.TempId = dataInTemp.TempId;
|
||||
newDataInTemp.ProjectId = dataInTemp.ProjectId;
|
||||
newDataInTemp.UserId = dataInTemp.UserId;
|
||||
newDataInTemp.Time = dataInTemp.Time;
|
||||
newDataInTemp.RowNo = dataInTemp.RowNo;
|
||||
newDataInTemp.Type = dataInTemp.Type;
|
||||
newDataInTemp.Value1 = dataInTemp.Value1;
|
||||
newDataInTemp.Value2 = dataInTemp.Value2;
|
||||
newDataInTemp.Value3 = dataInTemp.Value3;
|
||||
newDataInTemp.Value4 = dataInTemp.Value4;
|
||||
newDataInTemp.Value5 = dataInTemp.Value5;
|
||||
newDataInTemp.Value6 = dataInTemp.Value6;
|
||||
newDataInTemp.Value7 = dataInTemp.Value7;
|
||||
newDataInTemp.Value8 = dataInTemp.Value8;
|
||||
newDataInTemp.Value9 = dataInTemp.Value9;
|
||||
newDataInTemp.Value10 = dataInTemp.Value10;
|
||||
newDataInTemp.Value11 = dataInTemp.Value11;
|
||||
newDataInTemp.Value12 = dataInTemp.Value12;
|
||||
newDataInTemp.Value13 = dataInTemp.Value13;
|
||||
newDataInTemp.Value14 = dataInTemp.Value14;
|
||||
newDataInTemp.Value15 = dataInTemp.Value15;
|
||||
newDataInTemp.Value16 = dataInTemp.Value16;
|
||||
newDataInTemp.Value17 = dataInTemp.Value17;
|
||||
newDataInTemp.Value18 = dataInTemp.Value18;
|
||||
newDataInTemp.Value19 = dataInTemp.Value19;
|
||||
newDataInTemp.Value20 = dataInTemp.Value20;
|
||||
|
||||
newDataInTemp.ToopValue = dataInTemp.ToopValue;
|
||||
db.Sys_CQMS_DataInTemp.InsertOnSubmit(newDataInTemp);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
public static void AddDataInTemp(List<Model.Sys_CQMS_DataInTemp> dataInTemps)
|
||||
{
|
||||
Model.SUBQHSEDB db = Funs.DB;
|
||||
foreach (var dataInTemp in dataInTemps)
|
||||
{
|
||||
Model.Sys_CQMS_DataInTemp newDataInTemp = new Model.Sys_CQMS_DataInTemp();
|
||||
newDataInTemp.TempId = dataInTemp.TempId;
|
||||
newDataInTemp.ProjectId = dataInTemp.ProjectId;
|
||||
newDataInTemp.UserId = dataInTemp.UserId;
|
||||
newDataInTemp.Time = dataInTemp.Time;
|
||||
newDataInTemp.RowNo = dataInTemp.RowNo;
|
||||
newDataInTemp.Type = dataInTemp.Type;
|
||||
newDataInTemp.Value1 = dataInTemp.Value1;
|
||||
newDataInTemp.Value2 = dataInTemp.Value2;
|
||||
newDataInTemp.Value3 = dataInTemp.Value3;
|
||||
newDataInTemp.Value4 = dataInTemp.Value4;
|
||||
newDataInTemp.Value5 = dataInTemp.Value5;
|
||||
newDataInTemp.Value6 = dataInTemp.Value6;
|
||||
newDataInTemp.Value7 = dataInTemp.Value7;
|
||||
newDataInTemp.Value8 = dataInTemp.Value8;
|
||||
newDataInTemp.Value9 = dataInTemp.Value9;
|
||||
newDataInTemp.Value10 = dataInTemp.Value10;
|
||||
newDataInTemp.Value11 = dataInTemp.Value11;
|
||||
newDataInTemp.Value12 = dataInTemp.Value12;
|
||||
newDataInTemp.Value13 = dataInTemp.Value13;
|
||||
newDataInTemp.Value14 = dataInTemp.Value14;
|
||||
newDataInTemp.Value15 = dataInTemp.Value15;
|
||||
newDataInTemp.Value16 = dataInTemp.Value16;
|
||||
newDataInTemp.Value17 = dataInTemp.Value17;
|
||||
newDataInTemp.Value18 = dataInTemp.Value18;
|
||||
newDataInTemp.Value19 = dataInTemp.Value19;
|
||||
newDataInTemp.Value20 = dataInTemp.Value20;
|
||||
|
||||
newDataInTemp.ToopValue = dataInTemp.ToopValue;
|
||||
db.Sys_CQMS_DataInTemp.InsertOnSubmit(newDataInTemp);
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改导入临时表记录
|
||||
/// </summary>
|
||||
/// <param name="weldReport">焊接实体</param>
|
||||
public static void UpdateDataInTemp(Model.Sys_CQMS_DataInTemp dataInTemp)
|
||||
{
|
||||
Model.SUBQHSEDB db = Funs.DB;
|
||||
Model.Sys_CQMS_DataInTemp newDataInTemp = db.Sys_CQMS_DataInTemp.FirstOrDefault(e => e.TempId == dataInTemp.TempId);
|
||||
if (newDataInTemp != null)
|
||||
{
|
||||
newDataInTemp.UserId = dataInTemp.UserId;
|
||||
newDataInTemp.Time = dataInTemp.Time;
|
||||
newDataInTemp.Value1 = dataInTemp.Value1;
|
||||
newDataInTemp.Value2 = dataInTemp.Value2;
|
||||
newDataInTemp.Value3 = dataInTemp.Value3;
|
||||
newDataInTemp.Value4 = dataInTemp.Value4;
|
||||
newDataInTemp.Value5 = dataInTemp.Value5;
|
||||
newDataInTemp.Value6 = dataInTemp.Value6;
|
||||
newDataInTemp.Value7 = dataInTemp.Value7;
|
||||
newDataInTemp.Value8 = dataInTemp.Value8;
|
||||
newDataInTemp.Value9 = dataInTemp.Value9;
|
||||
newDataInTemp.Value10 = dataInTemp.Value10;
|
||||
newDataInTemp.Value11 = dataInTemp.Value11;
|
||||
newDataInTemp.Value12 = dataInTemp.Value12;
|
||||
newDataInTemp.Value13 = dataInTemp.Value13;
|
||||
newDataInTemp.Value14 = dataInTemp.Value14;
|
||||
newDataInTemp.Value15 = dataInTemp.Value15;
|
||||
newDataInTemp.Value16 = dataInTemp.Value16;
|
||||
newDataInTemp.Value17 = dataInTemp.Value17;
|
||||
newDataInTemp.Value18 = dataInTemp.Value18;
|
||||
newDataInTemp.Value19 = dataInTemp.Value19;
|
||||
newDataInTemp.Value20 = dataInTemp.Value20;
|
||||
newDataInTemp.ToopValue = dataInTemp.ToopValue;
|
||||
newDataInTemp.Type = dataInTemp.Type;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除导入临时表记录
|
||||
/// </summary>
|
||||
/// <param name="tempId">委托主键</param>
|
||||
public static void DeleteDataInTempByDataInTempID(string tempId)
|
||||
{
|
||||
Model.SUBQHSEDB db = Funs.DB;
|
||||
Model.Sys_CQMS_DataInTemp dataInTemp = db.Sys_CQMS_DataInTemp.FirstOrDefault(e => e.TempId == tempId);
|
||||
if (dataInTemp != null)
|
||||
{
|
||||
db.Sys_CQMS_DataInTemp.DeleteOnSubmit(dataInTemp);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目用户主键删除导入临时表记录
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="userId"></param>
|
||||
public static void DeleteDataInTempByProjectIdUserId(string projectId, string userId, string type)
|
||||
{
|
||||
Model.SUBQHSEDB db = Funs.DB;
|
||||
var dataInTemp = from x in db.Sys_CQMS_DataInTemp where x.ProjectId == projectId && x.UserId == userId && x.Type == type select x;
|
||||
if (dataInTemp.Count() > 0)
|
||||
{
|
||||
db.Sys_CQMS_DataInTemp.DeleteAllOnSubmit(dataInTemp);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -415,5 +415,17 @@
|
||||
}
|
||||
return lis;
|
||||
}
|
||||
|
||||
public static ListItem[] drpQualityAssuranceTypeList()
|
||||
{
|
||||
ListItem[] list = new ListItem[6];
|
||||
list[0] = new ListItem("压力管道安装", "压力管道安装");
|
||||
list[1] = new ListItem("压力容器制造", "压力容器制造");
|
||||
list[2] = new ListItem("压力容器安装", "压力容器安装");
|
||||
list[3] = new ListItem("锅炉安装", "锅炉安装");
|
||||
list[4] = new ListItem("起重机械安装", "起重机械安装");
|
||||
list[5] = new ListItem("电梯安装", "电梯安装");
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -641,5 +641,24 @@ namespace BLL
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
public static string GetUnitWorkIdsByUnitWorkNames(string projectId, string unitWorks)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(unitWorks))
|
||||
{
|
||||
string[] ins = unitWorks.Split(',');
|
||||
string unitIds = string.Empty;
|
||||
foreach (string s in ins)
|
||||
{
|
||||
var q = GetUnitWorkByUnitWorkName(projectId, s.Trim()).UnitWorkId;
|
||||
unitIds += q + ",";
|
||||
}
|
||||
return unitIds.Substring(0, unitIds.LastIndexOf(','));
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -946,5 +946,21 @@ namespace BLL
|
||||
return q;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 单位表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void GetUnit(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "UnitId";
|
||||
dropName.DataTextField = "UnitName";
|
||||
dropName.DataSource = GetUnitByProjectIdList(projectId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user