集团三库
This commit is contained in:
@@ -0,0 +1,144 @@
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 集团主数据项目
|
||||
/// </summary>
|
||||
public static class MasterProjectDataService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取已关联集团主数据项目的项目
|
||||
/// </summary>
|
||||
/// <param name=""></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_Project> GetProjectFromMasterProject()
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var list = (from x in db.Base_Project
|
||||
join y in db.Ads_pms_pro_info_build on x.MasterSysId equals y.Pro_id
|
||||
where x.MasterSysId != null
|
||||
select x).ToList();
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取已关联集团主数据项目的项目Id
|
||||
/// </summary>
|
||||
/// <param name=""></param>
|
||||
/// <returns></returns>
|
||||
public static List<string> GetProjectIdsFromMasterProject()
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var list = (from x in db.Base_Project
|
||||
join y in db.Ads_pms_pro_info_build on x.MasterSysId equals y.Pro_id
|
||||
where x.MasterSysId != null && y != null
|
||||
select x.ProjectId).ToList();
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键Id查询集团主数据项目数据
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Ads_pms_pro_info_build GetMasterProjectById(string Id)
|
||||
{
|
||||
return Funs.DB.Ads_pms_pro_info_build.FirstOrDefault(e => e.Pro_id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目名称查询集团主数据项目数据
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Ads_pms_pro_info_build GetMasterProjectByProjectName(string projectName)
|
||||
{
|
||||
return Funs.DB.Ads_pms_pro_info_build.FirstOrDefault(e => e.Pro_name == projectName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteMasterProject(string Id)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Ads_pms_pro_info_build apply = db.Ads_pms_pro_info_build.FirstOrDefault(e => e.Pro_id == Id);
|
||||
if (apply != null)
|
||||
{
|
||||
db.Ads_pms_pro_info_build.DeleteOnSubmit(apply);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加项目集团主数据项目
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddMasterProject(Model.Ads_pms_pro_info_build model)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Ads_pms_pro_info_build newModel = new Model.Ads_pms_pro_info_build();
|
||||
newModel.Main_data_code = model.Main_data_code;
|
||||
newModel.Pro_id = model.Pro_id;
|
||||
newModel.Pro_code = model.Pro_code;
|
||||
newModel.Pro_name = model.Pro_name;
|
||||
newModel.Pro_short_name = model.Pro_short_name;
|
||||
newModel.Org_id = model.Org_id;
|
||||
newModel.Org_id2 = model.Org_id2;
|
||||
newModel.Org_name = model.Org_name;
|
||||
newModel.Org_name2 = model.Org_name2;
|
||||
newModel.Pro_nature = model.Pro_nature;
|
||||
newModel.Pro_nature_code = model.Pro_nature_code;
|
||||
newModel.Start_date = model.Start_date;
|
||||
newModel.End_date = model.End_date;
|
||||
newModel.Address = model.Address;
|
||||
newModel.Pro_add_type = model.Pro_add_type;
|
||||
newModel.Ori_amt_sum_vat_fc = model.Ori_amt_sum_vat_fc;
|
||||
newModel.Amt_add_sum_vat_fc_local = model.Amt_add_sum_vat_fc_local;
|
||||
newModel.Con_mode_code = model.Con_mode_code;
|
||||
newModel.Con_mode_desc = model.Con_mode_desc;
|
||||
|
||||
db.Ads_pms_pro_info_build.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改项目集团主数据项目
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateMasterProject(Model.Ads_pms_pro_info_build model)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Ads_pms_pro_info_build newModel = db.Ads_pms_pro_info_build.First(e => e.Pro_id == model.Pro_id);
|
||||
//newModel.Main_data_code = model.Main_data_code;
|
||||
//newModel.Pro_id = model.Pro_id;
|
||||
newModel.Pro_code = model.Pro_code;
|
||||
newModel.Pro_name = model.Pro_name;
|
||||
newModel.Pro_short_name = model.Pro_short_name;
|
||||
newModel.Org_id = model.Org_id;
|
||||
newModel.Org_id2 = model.Org_id2;
|
||||
newModel.Org_name = model.Org_name;
|
||||
newModel.Org_name2 = model.Org_name2;
|
||||
newModel.Pro_nature = model.Pro_nature;
|
||||
newModel.Pro_nature_code = model.Pro_nature_code;
|
||||
newModel.Start_date = model.Start_date;
|
||||
newModel.End_date = model.End_date;
|
||||
newModel.Address = model.Address;
|
||||
newModel.Pro_add_type = model.Pro_add_type;
|
||||
newModel.Ori_amt_sum_vat_fc = model.Ori_amt_sum_vat_fc;
|
||||
newModel.Amt_add_sum_vat_fc_local = model.Amt_add_sum_vat_fc_local;
|
||||
newModel.Con_mode_code = model.Con_mode_code;
|
||||
newModel.Con_mode_desc = model.Con_mode_desc;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,42 @@
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 三库业务数据上报记录
|
||||
/// </summary>
|
||||
public static class SanKuReportLogService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取三库业务数据上报记录
|
||||
/// </summary>
|
||||
/// <param name=""></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.SANKU_REPORT_LOG> GetReportLogList()
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var list = (from x in db.SANKU_REPORT_LOG orderby x.CREATE_TIME descending select x ).ToList();
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加业务数据上报记录日志
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddReportLog(Model.SANKU_REPORT_LOG model)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.SANKU_REPORT_LOG newModel = new Model.SANKU_REPORT_LOG();
|
||||
newModel.OPTYPE = model.OPTYPE;
|
||||
newModel.CONTENT = model.CONTENT;
|
||||
newModel.RESULT = model.RESULT;
|
||||
newModel.DETAIL = model.DETAIL;
|
||||
newModel.OPERATOR = model.OPERATOR;
|
||||
newModel.CREATE_TIME = model.CREATE_TIME;
|
||||
db.SANKU_REPORT_LOG.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user