11
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -745,6 +745,7 @@
|
||||
<Compile Include="TestRun\DriverRun\DriverRunService.cs" />
|
||||
<Compile Include="TestRun\DriverSchemeService.cs" />
|
||||
<Compile Include="TestRun\DriverSub\DriverSubContactService.cs" />
|
||||
<Compile Include="TestRun\DriverSub\DriverSubContractorsService.cs" />
|
||||
<Compile Include="TestRun\DriverSub\DriverSubPlanService.cs" />
|
||||
<Compile Include="TestRun\DriverSub\DriverSubService.cs" />
|
||||
<Compile Include="TestRun\DriverSummary\DriverSummaryService.cs" />
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -3210,6 +3210,13 @@ namespace BLL
|
||||
/// ProjectSetup导入模版文件原始的虚拟路径
|
||||
/// </summary>
|
||||
public const string ProjectSetupDataInUrl = "File\\Excel\\DataIn\\ProjectSetup导入模板.xls";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 开车分包联络单模板文件原始虚拟路径
|
||||
/// </summary>
|
||||
public const string DriverSubContactTemplateUrl = "File\\Excel\\TestRun\\开车合作单位名录.xlsx";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 绩效考核模板文件路径
|
||||
|
||||
@@ -195,6 +195,17 @@
|
||||
list[6] = new ListItem("保运人员一览", "07");
|
||||
return list;
|
||||
}
|
||||
|
||||
//开车分包名称下拉框
|
||||
public static ListItem[] drpDriverSubNameList()
|
||||
{
|
||||
ListItem[] list = new ListItem[4];
|
||||
list[0] = new ListItem("催化剂装填", "1");
|
||||
list[1] = new ListItem("烘炉", "2");
|
||||
list[2] = new ListItem("化学清洗", "3");
|
||||
list[3] = new ListItem("开车队", "4");
|
||||
return list;
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -17,6 +18,16 @@ namespace BLL
|
||||
return Funs.DB.DriverSub_DriverSubContact.FirstOrDefault(e => e.DriverSubContactId == DriverSubContactId);
|
||||
}
|
||||
|
||||
public static List<Model.DriverSub_DriverSubContact> GetDriverSubContactByProjectid(string projectId)
|
||||
{
|
||||
return Funs.DB.DriverSub_DriverSubContact.Where(e => e.ProjectId == projectId).ToList();
|
||||
}
|
||||
|
||||
public static List<Model.DriverSub_DriverSubContact> GetDriverSubContactByDriverSubPlanId(
|
||||
string DriverSubPlanId)
|
||||
{
|
||||
return Funs.DB.DriverSub_DriverSubContact.Where(e => e.DriverSubPlanId == DriverSubPlanId).ToList();
|
||||
}
|
||||
/// <summary>
|
||||
/// 添加开车分包联络信息
|
||||
/// </summary>
|
||||
@@ -36,6 +47,9 @@ namespace BLL
|
||||
newDriverSubContact.OutTime = DriverSubContact.OutTime;
|
||||
newDriverSubContact.AttachUrl = DriverSubContact.AttachUrl;
|
||||
newDriverSubContact.Remark = DriverSubContact.Remark;
|
||||
newDriverSubContact.DriverSubPlanId= DriverSubContact.DriverSubPlanId;
|
||||
newDriverSubContact.DriverSubContractorsId = DriverSubContact.DriverSubContractorsId;
|
||||
newDriverSubContact.SubcontractingType = DriverSubContact.SubcontractingType;
|
||||
Funs.DB.DriverSub_DriverSubContact.InsertOnSubmit(newDriverSubContact);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
@@ -59,6 +73,9 @@ namespace BLL
|
||||
newDriverSubContact.OutTime = DriverSubContact.OutTime;
|
||||
newDriverSubContact.AttachUrl = DriverSubContact.AttachUrl;
|
||||
newDriverSubContact.Remark = DriverSubContact.Remark;
|
||||
newDriverSubContact.DriverSubPlanId = DriverSubContact.DriverSubPlanId;
|
||||
newDriverSubContact.DriverSubContractorsId = DriverSubContact.DriverSubContractorsId;
|
||||
newDriverSubContact.SubcontractingType = DriverSubContact.SubcontractingType;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
@@ -80,5 +97,22 @@ namespace BLL
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static void DeleteDriverSubContactByDriverSubPlanId(string DriverSubPlanId)
|
||||
{
|
||||
List<Model.DriverSub_DriverSubContact> DriverSubContact = Funs.DB.DriverSub_DriverSubContact.Where(e => e.DriverSubPlanId == DriverSubPlanId).ToList();
|
||||
if (DriverSubContact != null)
|
||||
{
|
||||
foreach (var item in DriverSubContact)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.AttachUrl))
|
||||
{
|
||||
BLL.UploadAttachmentService.DeleteFile(Funs.RootPath, item.AttachUrl);//删除附件
|
||||
}
|
||||
Funs.DB.DriverSub_DriverSubContact.DeleteOnSubmit(item);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
using FineUIPro;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
||||
public static class DriversubcontractorsService
|
||||
{
|
||||
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
public static int Count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public static IQueryable<Model.DriverSub_DriverSubContractors> GetDriverSub_DriverSubContractorsByModle(Model.DriverSub_DriverSubContractors table)
|
||||
{
|
||||
var q = from x in Funs.DB.DriverSub_DriverSubContractors
|
||||
where
|
||||
(string.IsNullOrEmpty(table.DriverSubContractorsId) || x.DriverSubContractorsId.Contains(table.DriverSubContractorsId)) &&
|
||||
(string.IsNullOrEmpty(table.SubUnitName) || x.SubUnitName.Contains(table.SubUnitName)) &&
|
||||
(string.IsNullOrEmpty(table.EnterpriseNature) || x.EnterpriseNature.Contains(table.EnterpriseNature)) &&
|
||||
(string.IsNullOrEmpty(table.SubcontractingType) || x.SubcontractingType.Contains(table.SubcontractingType)) &&
|
||||
(string.IsNullOrEmpty(table.CollCropCode) || x.CollCropCode.Contains(table.CollCropCode)) &&
|
||||
(string.IsNullOrEmpty(table.SafetyProductionLicense) || x.SafetyProductionLicense.Contains(table.SafetyProductionLicense)) &&
|
||||
(string.IsNullOrEmpty(table.QualificationCertificateNumber) || x.QualificationCertificateNumber.Contains(table.QualificationCertificateNumber)) &&
|
||||
(string.IsNullOrEmpty(table.QualificationType) || x.QualificationType.Contains(table.QualificationType)) &&
|
||||
(string.IsNullOrEmpty(table.QualificationLevel) || x.QualificationLevel.Contains(table.QualificationLevel)) &&
|
||||
(string.IsNullOrEmpty(table.Province) || x.Province.Contains(table.Province)) &&
|
||||
(string.IsNullOrEmpty(table.City) || x.City.Contains(table.City))
|
||||
select x
|
||||
;
|
||||
|
||||
return q;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
/// <param name="grid1"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable GetListData(Model.DriverSub_DriverSubContractors table, Grid grid1)
|
||||
{
|
||||
var q = GetDriverSub_DriverSubContractorsByModle(table);
|
||||
Count = q.Count();
|
||||
if (Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize) ;
|
||||
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in q
|
||||
select new
|
||||
{
|
||||
x.DriverSubContractorsId,
|
||||
x.SubUnitName,
|
||||
x.EnterpriseNature,
|
||||
x.SubcontractingType,
|
||||
x.CollCropCode,
|
||||
x.SafetyProductionLicense,
|
||||
x.QualificationCertificateNumber,
|
||||
x.QualificationType,
|
||||
x.QualificationLevel,
|
||||
x.Province,
|
||||
x.City,
|
||||
x.IsUse
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
public static Model.DriverSub_DriverSubContractors GetDriverSub_DriverSubContractorsById(string DriverSubContractorsId)
|
||||
{
|
||||
return Funs.DB.DriverSub_DriverSubContractors.FirstOrDefault(x => x.DriverSubContractorsId == DriverSubContractorsId);
|
||||
}
|
||||
|
||||
public static Model.DriverSub_DriverSubContractors GetDriverSubContractorsByCollCropCode(
|
||||
string CollCropCode)
|
||||
{
|
||||
return Funs.DB.DriverSub_DriverSubContractors.FirstOrDefault(e => e.CollCropCode == CollCropCode);
|
||||
}
|
||||
public static void AddDriverSub_DriverSubContractors(Model.DriverSub_DriverSubContractors newtable)
|
||||
{
|
||||
|
||||
Model.DriverSub_DriverSubContractors table = new Model.DriverSub_DriverSubContractors
|
||||
{
|
||||
DriverSubContractorsId = newtable.DriverSubContractorsId,
|
||||
SubUnitName = newtable.SubUnitName,
|
||||
EnterpriseNature = newtable.EnterpriseNature,
|
||||
SubcontractingType = newtable.SubcontractingType,
|
||||
CollCropCode = newtable.CollCropCode,
|
||||
SafetyProductionLicense = newtable.SafetyProductionLicense,
|
||||
QualificationCertificateNumber = newtable.QualificationCertificateNumber,
|
||||
QualificationType = newtable.QualificationType,
|
||||
QualificationLevel = newtable.QualificationLevel,
|
||||
Province = newtable.Province,
|
||||
City = newtable.City,
|
||||
IsUse = newtable.IsUse
|
||||
};
|
||||
Funs.DB.DriverSub_DriverSubContractors.InsertOnSubmit(table);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="newtable"></param>
|
||||
public static void UpdateDriverSub_DriverSubContractors(Model.DriverSub_DriverSubContractors newtable)
|
||||
{
|
||||
|
||||
Model.DriverSub_DriverSubContractors table = Funs.DB.DriverSub_DriverSubContractors.FirstOrDefault(x => x.DriverSubContractorsId == newtable.DriverSubContractorsId);
|
||||
if (table != null)
|
||||
{
|
||||
table.DriverSubContractorsId = newtable.DriverSubContractorsId;
|
||||
table.SubUnitName = newtable.SubUnitName;
|
||||
table.EnterpriseNature = newtable.EnterpriseNature;
|
||||
table.SubcontractingType = newtable.SubcontractingType;
|
||||
table.CollCropCode = newtable.CollCropCode;
|
||||
table.SafetyProductionLicense = newtable.SafetyProductionLicense;
|
||||
table.QualificationCertificateNumber = newtable.QualificationCertificateNumber;
|
||||
table.QualificationType = newtable.QualificationType;
|
||||
table.QualificationLevel = newtable.QualificationLevel;
|
||||
table.Province = newtable.Province;
|
||||
table.City = newtable.City;
|
||||
table.IsUse = newtable.IsUse;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 将所有的IsUse设置为false
|
||||
/// </summary>
|
||||
public static void UpdateDriverSub_DriverSubContractorsIsUse()
|
||||
{
|
||||
var list = Funs.DB.DriverSub_DriverSubContractors.ToList();
|
||||
foreach (var item in list)
|
||||
{
|
||||
item.IsUse = false;
|
||||
}
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="DriverSubContractorsId"></param>
|
||||
public static void DeleteDriverSub_DriverSubContractorsById(string DriverSubContractorsId)
|
||||
{
|
||||
|
||||
Model.DriverSub_DriverSubContractors table = Funs.DB.DriverSub_DriverSubContractors.FirstOrDefault(x => x.DriverSubContractorsId == DriverSubContractorsId);
|
||||
if (table != null)
|
||||
{
|
||||
Funs.DB.DriverSub_DriverSubContractors.DeleteOnSubmit(table);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using FineUIPro;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -11,6 +13,74 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class DriverSubPlanService
|
||||
{
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
public static int Count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public static IQueryable<Model.DriverSub_DriverSubPlan> GetDriverSub_DriverSubPlanByModle(Model.DriverSub_DriverSubPlan table)
|
||||
{
|
||||
var q = from x in Funs.DB.DriverSub_DriverSubPlan
|
||||
where
|
||||
(string.IsNullOrEmpty(table.DriverSubPlanId) || x.DriverSubPlanId.Contains(table.DriverSubPlanId)) &&
|
||||
(string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) &&
|
||||
(string.IsNullOrEmpty(table.Code) || x.Code.Contains(table.Code)) &&
|
||||
(string.IsNullOrEmpty(table.SubUnitId) || x.SubUnitId.Contains(table.SubUnitId)) &&
|
||||
(string.IsNullOrEmpty(table.Introductions) || x.Introductions.Contains(table.Introductions)) &&
|
||||
(string.IsNullOrEmpty(table.Achievement) || x.Achievement.Contains(table.Achievement)) &&
|
||||
(string.IsNullOrEmpty(table.Cooperation) || x.Cooperation.Contains(table.Cooperation)) &&
|
||||
(string.IsNullOrEmpty(table.InstallationIds) || x.InstallationIds.Contains(table.InstallationIds)) &&
|
||||
(string.IsNullOrEmpty(table.InstallationNames) || x.InstallationNames.Contains(table.InstallationNames)) &&
|
||||
(string.IsNullOrEmpty(table.AttachUrl) || x.AttachUrl.Contains(table.AttachUrl)) &&
|
||||
(string.IsNullOrEmpty(table.Remark) || x.Remark.Contains(table.Remark)) &&
|
||||
(string.IsNullOrEmpty(table.DriverSubNames) || x.DriverSubNames.Contains(table.DriverSubNames))
|
||||
select x
|
||||
;
|
||||
|
||||
return q;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
/// <param name="grid1"></param>
|
||||
/// <returns></returns>
|
||||
public static IQueryable GetListData(Model.DriverSub_DriverSubPlan table, Grid grid1)
|
||||
{
|
||||
var q = GetDriverSub_DriverSubPlanByModle(table);
|
||||
Count = q.Count() ;
|
||||
if (Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize);
|
||||
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in q
|
||||
select new
|
||||
{
|
||||
x.DriverSubPlanId,
|
||||
x.ProjectId,
|
||||
x.Code,
|
||||
x.SubUnitId,
|
||||
x.Introductions,
|
||||
x.Achievement,
|
||||
x.Cooperation,
|
||||
x.InstallationIds,
|
||||
x.InstallationNames,
|
||||
x.IsInvited,
|
||||
x.AttachUrl,
|
||||
x.Remark,
|
||||
x.DriverSubNames,
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取开车分包计划信息
|
||||
/// </summary>
|
||||
@@ -20,7 +90,10 @@ namespace BLL
|
||||
{
|
||||
return Funs.DB.DriverSub_DriverSubPlan.FirstOrDefault(e => e.DriverSubPlanId == DriverSubPlanId);
|
||||
}
|
||||
|
||||
public static List<Model.DriverSub_DriverSubPlan> GetDriverSubPlanByProjectid(string projectId)
|
||||
{
|
||||
return Funs.DB.DriverSub_DriverSubPlan.Where(e => e.ProjectId == projectId).ToList();
|
||||
}
|
||||
/// <summary>
|
||||
/// 添加开车分包计划信息
|
||||
/// </summary>
|
||||
@@ -40,6 +113,7 @@ namespace BLL
|
||||
newDriverSubPlan.IsInvited = DriverSubPlan.IsInvited;
|
||||
newDriverSubPlan.AttachUrl = DriverSubPlan.AttachUrl;
|
||||
newDriverSubPlan.Remark = DriverSubPlan.Remark;
|
||||
newDriverSubPlan.DriverSubNames= DriverSubPlan.DriverSubNames;
|
||||
Funs.DB.DriverSub_DriverSubPlan.InsertOnSubmit(newDriverSubPlan);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
@@ -63,6 +137,8 @@ namespace BLL
|
||||
newDriverSubPlan.IsInvited = DriverSubPlan.IsInvited;
|
||||
newDriverSubPlan.AttachUrl = DriverSubPlan.AttachUrl;
|
||||
newDriverSubPlan.Remark = DriverSubPlan.Remark;
|
||||
newDriverSubPlan.DriverSubNames = DriverSubPlan.DriverSubNames;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
@@ -84,5 +160,16 @@ namespace BLL
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void InitSubPlanDropDownList(FineUIPro.DropDownList dropName,string projectid, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "DriverSubPlanId";
|
||||
dropName.DataTextField = "Code";
|
||||
dropName.DataSource = GetDriverSubPlanByProjectid(projectid);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user