20240308 会议管理

This commit is contained in:
2024-03-08 23:33:50 +08:00
57 changed files with 6449 additions and 3470 deletions
@@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BLL
{
/// <summary>
/// 请购单明细
/// </summary>
public static class GoodsBuyItemService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据主键获取请购单明细
/// </summary>
/// <param name="GoodsBuyItemId"></param>
/// <returns></returns>
public static Model.DriverGoods_GoodsBuyItem GetGoodsBuyItemById(string GoodsBuyItemId)
{
return Funs.DB.DriverGoods_GoodsBuyItem.FirstOrDefault(e => e.GoodsBuyItemId == GoodsBuyItemId);
}
/// <summary>
/// 根据周(月)报Id获取请购单明细
/// </summary>
/// <param name="GoodsBuyId"></param>
/// <returns></returns>
public static List<Model.DriverGoods_GoodsBuyItem> GetGoodsBuyItemByGoodsBuyId(string GoodsBuyId)
{
return (from x in Funs.DB.DriverGoods_GoodsBuyItem where x.GoodsBuyId == GoodsBuyId select x).ToList();
}
/// <summary>
/// 添加请购单明细
/// </summary>
/// <param name="GoodsBuyItem"></param>
public static void AddGoodsBuyItem(Model.DriverGoods_GoodsBuyItem GoodsBuyItem)
{
Model.SGGLDB db = Funs.DB;
Model.DriverGoods_GoodsBuyItem newGoodsBuyItem = new Model.DriverGoods_GoodsBuyItem();
newGoodsBuyItem.GoodsBuyItemId = GoodsBuyItem.GoodsBuyItemId;
newGoodsBuyItem.GoodsBuyId = GoodsBuyItem.GoodsBuyId;
newGoodsBuyItem.GoodsModelId = GoodsBuyItem.GoodsModelId;
newGoodsBuyItem.Quantity = GoodsBuyItem.Quantity;
newGoodsBuyItem.RequiredTime = GoodsBuyItem.RequiredTime;
db.DriverGoods_GoodsBuyItem.InsertOnSubmit(newGoodsBuyItem);
db.SubmitChanges();
}
/// <summary>
/// 根据周(月)报Id删除所有相关明细信息
/// </summary>
/// <param name="GoodsBuyId"></param>
public static void DeleteGoodsBuyItemByGoodsBuyId(string GoodsBuyId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.DriverGoods_GoodsBuyItem where x.GoodsBuyId == GoodsBuyId select x).ToList();
if (q.Count() > 0)
{
db.DriverGoods_GoodsBuyItem.DeleteAllOnSubmit(q);
db.SubmitChanges();
}
}
}
}
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.UI.WebControls;
namespace BLL
{
@@ -39,6 +40,7 @@ namespace BLL
newGoodsBuy.GetGoodsDate = GoodsBuy.GetGoodsDate;
newGoodsBuy.AttachUrl = GoodsBuy.AttachUrl;
newGoodsBuy.Remark = GoodsBuy.Remark;
newGoodsBuy.UnitCode = GoodsBuy.UnitCode;
Funs.DB.DriverGoods_GoodsBuy.InsertOnSubmit(newGoodsBuy);
Funs.DB.SubmitChanges();
}
@@ -56,11 +58,12 @@ namespace BLL
newGoodsBuy.BuyName = GoodsBuy.BuyName;
newGoodsBuy.BuyCode = GoodsBuy.BuyCode;
//newGoodsBuy.CompileMan = GoodsBuy.CompileMan;
newGoodsBuy.ApprovalDate = GoodsBuy.ApprovalDate;
//newGoodsBuy.ApprovalDate = GoodsBuy.ApprovalDate;
newGoodsBuy.SubmitDate = GoodsBuy.SubmitDate;
newGoodsBuy.GetGoodsDate = GoodsBuy.GetGoodsDate;
newGoodsBuy.AttachUrl = GoodsBuy.AttachUrl;
newGoodsBuy.Remark = GoodsBuy.Remark;
newGoodsBuy.UnitCode = GoodsBuy.UnitCode;
Funs.DB.SubmitChanges();
}
}
@@ -82,5 +85,39 @@ namespace BLL
Funs.DB.SubmitChanges();
}
}
/// <summary>
/// 获取类型信息
/// </summary>
/// <returns></returns>
public static ListItem[] GetBugType()
{
ListItem[] list = new ListItem[5];
list[0] = new ListItem("01 开车临时材料请购单", "01");
list[1] = new ListItem("02 润滑油、脂请购单", "02");
list[2] = new ListItem("03 化学品消耗清单", "03");
list[3] = new ListItem("04 开车垫片请购单", "04");
list[4] = new ListItem("05 开车其他物资", "05");
return list;
}
/// <summary>
/// 获取方案类别
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
public static string ConvertBugType(object solutionType)
{
if (solutionType != null)
{
ListItem[] list = GetBugType();
var item = list.FirstOrDefault(x => x.Value == solutionType.ToString());
if (item != null)
{
return item.Text.Substring(3);
}
}
return "";
}
}
}
@@ -0,0 +1,74 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public static class GoodsModelService
{
/// <summary>
/// 根据主键获取开车物资库信息
/// </summary>
/// <param name="GoodsModelId"></param>
/// <returns></returns>
public static Model.DriverGoods_GoodsModel GetGoodsModelById(string GoodsModelId)
{
return Funs.DB.DriverGoods_GoodsModel.FirstOrDefault(e => e.GoodsModelId == GoodsModelId);
}
/// <summary>
/// 添加开车物资库信息
/// </summary>
/// <param name="GoodsModel"></param>
public static void AddGoodsModel(Model.DriverGoods_GoodsModel GoodsModel)
{
Model.DriverGoods_GoodsModel newGoodsModel = new Model.DriverGoods_GoodsModel();
newGoodsModel.GoodsModelId = GoodsModel.GoodsModelId;
newGoodsModel.ProjectId = GoodsModel.ProjectId;
newGoodsModel.Code = GoodsModel.Code;
newGoodsModel.Description = GoodsModel.Description;
newGoodsModel.Quantity = GoodsModel.Quantity;
newGoodsModel.Purpose = GoodsModel.Purpose;
newGoodsModel.Attachment = GoodsModel.Attachment;
newGoodsModel.Remark = GoodsModel.Remark;
Funs.DB.DriverGoods_GoodsModel.InsertOnSubmit(newGoodsModel);
Funs.DB.SubmitChanges();
}
/// <summary>
/// 修改开车物资库
/// </summary>
/// <param name="GoodsModel"></param>
public static void UpdateGoodsModel(Model.DriverGoods_GoodsModel GoodsModel)
{
Model.DriverGoods_GoodsModel newGoodsModel = Funs.DB.DriverGoods_GoodsModel.FirstOrDefault(e => e.GoodsModelId == GoodsModel.GoodsModelId);
if (newGoodsModel != null)
{
newGoodsModel.Code = GoodsModel.Code;
newGoodsModel.Description = GoodsModel.Description;
newGoodsModel.Quantity = GoodsModel.Quantity;
newGoodsModel.Purpose = GoodsModel.Purpose;
newGoodsModel.Attachment = GoodsModel.Attachment;
newGoodsModel.Remark = GoodsModel.Remark;
Funs.DB.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除开车物资库
/// </summary>
/// <param name="GoodsModelId"></param>
public static void DeleteGoodsModel(string GoodsModelId)
{
Model.DriverGoods_GoodsModel GoodsModel = Funs.DB.DriverGoods_GoodsModel.FirstOrDefault(e => e.GoodsModelId == GoodsModelId);
if (GoodsModel != null)
{
BLL.CommonService.DeleteAttachFileById(GoodsModelId);
Funs.DB.DriverGoods_GoodsModel.DeleteOnSubmit(GoodsModel);
Funs.DB.SubmitChanges();
}
}
}
}
@@ -44,6 +44,8 @@ namespace BLL
newDriverRun.CompileDate = driverRun.CompileDate;
newDriverRun.AttachUrl = driverRun.AttachUrl;
newDriverRun.Remark = driverRun.Remark;
newDriverRun.Status = driverRun.Status;
newDriverRun.Priority = driverRun.Priority;
newDriverRun.State = driverRun.State;
Funs.DB.DriverRun_DriverRun.InsertOnSubmit(newDriverRun);
Funs.DB.SubmitChanges();
@@ -68,6 +70,8 @@ namespace BLL
newDriverRun.CompileDate = driverRun.CompileDate;
newDriverRun.AttachUrl = driverRun.AttachUrl;
newDriverRun.Remark = driverRun.Remark;
newDriverRun.Status = driverRun.Status;
newDriverRun.Priority = driverRun.Priority;
newDriverRun.State = driverRun.State;
db.DriverRun_DriverRun.InsertOnSubmit(newDriverRun);
@@ -66,6 +66,7 @@ namespace BLL
newConstructSolution.Edition = constructSolution.Edition;
newConstructSolution.SpecialSchemeTypeId = constructSolution.SpecialSchemeTypeId;
newConstructSolution.Content = constructSolution.Content;
newConstructSolution.System = constructSolution.System;
db.Solution_TestRunConstructSolution.InsertOnSubmit(newConstructSolution);
db.SubmitChanges();
}
@@ -88,6 +89,7 @@ namespace BLL
newConstructSolution.Edition = constructSolution.Edition;
newConstructSolution.SpecialSchemeTypeId = constructSolution.SpecialSchemeTypeId;
newConstructSolution.Content = constructSolution.Content;
newConstructSolution.System = constructSolution.System;
db.SubmitChanges();
}
@@ -112,11 +114,15 @@ namespace BLL
}
else if (state.ToString() == BLL.Const.TestRunConstructSolution_Audit)
{
return "会签";
return "审核";
}
else if (state.ToString() == BLL.Const.TestRunConstructSolution_Audit2)
{
return "审批";
}
else if (state.ToString() == BLL.Const.TestRunConstructSolution_Complete)
{
return "审批完成";
return "发布";
}
}
return "";
@@ -127,7 +133,7 @@ namespace BLL
/// <returns></returns>
public static ListItem[] GetSolutionType()
{
ListItem[] list = new ListItem[13];
ListItem[] list = new ListItem[12];
list[0] = new ListItem("01 开车文件编制计划", "01");
list[1] = new ListItem("02 单机试车方案", "02");
list[2] = new ListItem("03 冲洗吹扫方案", "03");
@@ -140,7 +146,7 @@ namespace BLL
list[9] = new ListItem("10 性能考核方案", "10");
list[10] = new ListItem("11 其他方案(如:真空试验、升温还原、煮炉、预冷、预热等)", "11");
list[11] = new ListItem("12 总体试车方案", "12");
list[12] = new ListItem("13 方案审查记录", "13");
//list[12] = new ListItem("13 方案审查记录", "13");
return list;
}
@@ -419,5 +425,48 @@ namespace BLL
db.SubmitChanges();
}
}
public static void Init(FineUIPro.DropDownList dropName, string state, bool isShowPlease)
{
dropName.DataValueField = "Value";
dropName.DataTextField = "Text";
dropName.DataSource = GetDHandleTypeByState(state);
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
/// <summary>
/// 根据状态选择下一步办理类型
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
public static ListItem[] GetDHandleTypeByState(string state)
{
if (state == Const.TestRunConstructSolution_Compile || state == Const.TestRunConstructSolution_ReCompile) //无是否同意
{
ListItem[] lis = new ListItem[1];
lis[0] = new ListItem("审核", Const.TestRunConstructSolution_Audit);
return lis;
}
else if (state == Const.TestRunConstructSolution_Audit)//有是否同意
{
ListItem[] lis = new ListItem[2];
lis[0] = new ListItem("审批", Const.TestRunConstructSolution_Audit2);//是 加载
lis[1] = new ListItem("重新编制", Const.TestRunConstructSolution_ReCompile);//否加载
return lis;
}
else if (state == Const.TestRunConstructSolution_Audit2)//无是否同意
{
ListItem[] lis = new ListItem[2];
lis[0] = new ListItem("发布", Const.TestRunConstructSolution_Complete);
lis[1] = new ListItem("重新编制", Const.TestRunConstructSolution_ReCompile);
return lis;
}
else
return null;
}
}
}