集团三库

This commit is contained in:
2026-09-10 18:51:12 +08:00
parent dc6abc4cbb
commit 5be709c0e6
131 changed files with 25364 additions and 970 deletions
+7 -1
View File
@@ -557,7 +557,13 @@ namespace BLL
itemRecord.TestScores = db.Training_TestRecordItem.Where(x => x.TestRecordId == itemRecord.TestRecordId).Sum(x => x.SubjectScore) ?? 0;
db.SubmitChanges();
}
//更新三库考试考核
string message = string.Empty;
SanKuDataSummaryReportService.UpdateExaminationRecord(getTestPlan.TestPlanId, ref message);
//if (!string.IsNullOrWhiteSpace(message))
//{
// ShowNotify(message, MessageBoxIcon.Warning);
//}
var getTrainingTasks = from x in db.Training_Task
where x.PlanId == getTestPlan.PlanId && (x.States != "2" || x.States == null)
select x;
@@ -575,6 +575,13 @@ namespace BLL
}
db.SubmitChanges();
//更新三库考试考核
string message = string.Empty;
SanKuDataSummaryReportService.UpdateExaminationRecordItem(testRecord.TestRecordId, ref message);
//if (!string.IsNullOrWhiteSpace(message))
//{
// ShowNotify(message, MessageBoxIcon.Warning);
//}
getCode = getTestRecord.TestScores ?? 0;
}
}
+7 -1
View File
@@ -176,7 +176,13 @@ namespace BLL
}
}
}
//更新三库教育培训
string message = string.Empty;
SanKuDataSummaryReportService.UpdateTrainingRecord(newTrainRecord.TrainingId, ref message);
//if (!string.IsNullOrWhiteSpace(message))
//{
// ShowNotify(message, MessageBoxIcon.Warning);
//}
////增加一条编码记录
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTrainRecordMenuId, newTrainRecord.ProjectId, null, newTrainRecord.TrainingId, newTrainRecord.TrainStartDate);
CommonService.btnSaveData(newTrainRecord.ProjectId, Const.ProjectTrainRecordMenuId, newTrainRecord.TrainingId, getTrainingPlan.DesignerId, true, newTrainRecord.TrainTitle, "../EduTrain/TrainRecordView.aspx?TrainingId={0}");
+5
View File
@@ -201,6 +201,7 @@
<Compile Include="CostGoods\MeasuresPlanService.cs" />
<Compile Include="CostGoods\PayRegistrationService.cs" />
<Compile Include="CostGoods\SubPayRegistrationService.cs" />
<Compile Include="CQMS\Check\AdminPenaltyService.cs" />
<Compile Include="CQMS\Check\RewardAndPunishService.cs" />
<Compile Include="CQMS\Comprehensive\ConTechnologyDisclosureService.cs" />
<Compile Include="CQMS\Comprehensive\DataDistributionApproveService.cs" />
@@ -319,6 +320,7 @@
<Compile Include="CQMS\WBS\WorkPackageProjectService.cs" />
<Compile Include="CQMS\WBS\WorkPackageService.cs" />
<Compile Include="DataGovernance\DataGovernanceService.cs" />
<Compile Include="DataGovernance\MasterOrgService.cs" />
<Compile Include="DataGovernance\PreProjectApplyService.cs" />
<Compile Include="DataShare\APIDataShareSyncService.cs" />
<Compile Include="DataShare\CQMS\APICheckControlSyncService.cs" />
@@ -745,6 +747,9 @@
<Compile Include="PZHGL\InformationProject\WorkHandoverService.cs" />
<Compile Include="PZHGL\ProjectData\ProjectMapService.cs" />
<Compile Include="PZHGL\ProjectData\ProjectPageDataService.cs" />
<Compile Include="SanKu\MasterProjectDataService.cs" />
<Compile Include="SanKu\SanKuDataSummaryReportService.cs" />
<Compile Include="SanKu\SanKuReportLogService.cs" />
<Compile Include="Service References\CNCECHSSEService\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ProjectFiles</ProjectView>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
</Project>
@@ -0,0 +1,97 @@
using System.Linq;
namespace BLL
{
/// <summary>
/// 行政处罚
/// </summary>
public class AdminPenaltyService
{
/// <summary>
/// 获取行政处罚信息
/// </summary>
/// <param name="PenaltyId"></param>
/// <returns></returns>
public static Model.Check_AdminPenalty GetAdminPenaltyById(string PenaltyId)
{
return Funs.DB.Check_AdminPenalty.FirstOrDefault(e => e.PenaltyId == PenaltyId);
}
/// <summary>
/// 添加行政处罚信息
/// </summary>
/// <param name="model"></param>
public static void AddAdminPenalty(Model.Check_AdminPenalty model)
{
Model.SGGLDB db = Funs.DB;
Model.Check_AdminPenalty newModel = new Model.Check_AdminPenalty();
newModel.PenaltyId = model.PenaltyId;
newModel.ProjectId = model.ProjectId;
newModel.PenaltyCode = model.PenaltyCode;
newModel.UnitId = model.UnitId;
newModel.UnitName = model.UnitName;
newModel.PenaltyDate = model.PenaltyDate;
newModel.PenaltyType = model.PenaltyType;
newModel.PenaltyContent = model.PenaltyContent;
newModel.PenaltyAmount = model.PenaltyAmount;
newModel.PenaltyAuthority = model.PenaltyAuthority;
newModel.PenaltyStatus = model.PenaltyStatus;
newModel.CompileMan = model.CompileMan;
newModel.CompileDate = model.CompileDate;
newModel.Remark = model.Remark;
newModel.SysType = model.SysType;
db.Check_AdminPenalty.InsertOnSubmit(newModel);
db.SubmitChanges();
////增加一条编码记录
string menuId = BLL.Const.AdminPenaltyMenuId;
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(menuId, model.ProjectId, null, model.PenaltyId, model.PenaltyDate);
}
/// <summary>
/// 修改行政处罚信息
/// </summary>
/// <param name="model"></param>
public static void UpdateAdminPenalty(Model.Check_AdminPenalty model)
{
Model.SGGLDB db = Funs.DB;
Model.Check_AdminPenalty newModel = db.Check_AdminPenalty.FirstOrDefault(e => e.PenaltyId == model.PenaltyId);
if (newModel != null)
{
//newModel.PenaltyId = model.PenaltyId;
//newModel.ProjectId = model.ProjectId;
newModel.PenaltyCode = model.PenaltyCode;
newModel.UnitId = model.UnitId;
newModel.UnitName = model.UnitName;
newModel.PenaltyDate = model.PenaltyDate;
newModel.PenaltyType = model.PenaltyType;
newModel.PenaltyContent = model.PenaltyContent;
newModel.PenaltyAmount = model.PenaltyAmount;
newModel.PenaltyAuthority = model.PenaltyAuthority;
newModel.PenaltyStatus = model.PenaltyStatus;
//newModel.CompileMan = model.CompileMan;
//newModel.CompileDate = model.CompileDate;
newModel.Remark = model.Remark;
newModel.SysType = model.SysType;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除行政处罚信息
/// </summary>
/// <param name="PenaltyId"></param>
public static void DeleteAdminPenaltyById(string PenaltyId)
{
Model.SGGLDB db = Funs.DB;
Model.Check_AdminPenalty model = db.Check_AdminPenalty.FirstOrDefault(e => e.PenaltyId == PenaltyId);
if (model != null)
{
//删除对应的附件
BLL.UploadFileService.DeleteFile(Funs.RootPath, AttachFileService.getFileUrl(model.PenaltyId));
db.Check_AdminPenalty.DeleteOnSubmit(model);
db.SubmitChanges();
}
}
}
}
+6
View File
@@ -2005,6 +2005,12 @@ namespace BLL
/// 奖罚通知单(定稿)
/// </summary>
public const string RewardAndPunishMenuId = "288C955A-E379-4F24-85F9-585343B33D46";
/// <summary>
/// 行政处罚菜单
/// </summary>
public const string AdminPenaltyMenuId = "67EE8A9B-2C49-47ED-B4A1-DCC90A4AD111";
#endregion
#region /
+4
View File
@@ -353,6 +353,10 @@ namespace BLL
/// </summary>
public const string Group_RewardType = "RewardType";
/// <summary>
/// -惩罚类型:组id
/// </summary>
public const string Group_PunishType = "PunishType";
/// <summary>
/// -违规人员处理措施:组id
/// </summary>
public const string Group_ViolationPersonHandleStep = "ViolationPersonHandleStep";
+107
View File
@@ -0,0 +1,107 @@
using Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
namespace BLL
{
/// <summary>
/// 数据治理服务
/// </summary>
public static class MasterOrgService
{
/// <summary>
/// 获取已启用的组织单位
/// </summary>
/// <returns></returns>
public static List<CNCEC_MasterData_ad_org> GetMasterOrgUnits()
{
var q = (from x in Funs.DB.CNCEC_MasterData_ad_org where x.OrgType == "01" && x.IsEnable == "1" orderby x.AdOrgCode select x ).ToList();
return q;
}
/// <summary>
/// 根据组织编码获取组织信息
/// </summary>
/// <param name="AdOrgCode"></param>
/// <returns></returns>
public static CNCEC_MasterData_ad_org GetMasterOrg(string AdOrgCode)
{
var q = (from x in Funs.DB.CNCEC_MasterData_ad_org where x.AdOrgCode == AdOrgCode select x).FirstOrDefault();
return q;
}
#region
/// <summary>
/// 获取集团主数据组织架构
/// </summary>
/// <param name="userName"></param>
/// <returns></returns>
public static Model.ResponeData GetMasterOrgDataInfos(string userName)
{
var db = Funs.DB;
var responeData = new Model.ResponeData();
try
{
var thisUnit = CommonService.GetIsThisUnit();
Dictionary<string, string> dic = new Dictionary<string, string>()
{
{"collCropCode", thisUnit.CollCropCode}
};
List<CNCEC_MasterData_ad_org> projectlist = new List<CNCEC_MasterData_ad_org>();
var returnData = ServerService.GerDataFromCncec("/api/Common/GetMasterOrgDataByCollCropCode", dic, null);
if (returnData != null && returnData.code == 1)
{
projectlist = JsonConvert.DeserializeObject<List<CNCEC_MasterData_ad_org>>(returnData.data.ToString());
if (projectlist.Any())
{
var oldProList = from x in db.CNCEC_MasterData_ad_org select x;
if (oldProList.Any())
{
db.CNCEC_MasterData_ad_org.DeleteAllOnSubmit(oldProList);
db.SubmitChanges();
}
db.CNCEC_MasterData_ad_org.InsertAllOnSubmit(projectlist);
db.SubmitChanges();
string msg = $"成功获取{projectlist.Count()}条组织机构信息";
responeData.message = msg;
//记录操作日志
Model.SANKU_REPORT_LOG newModel = new Model.SANKU_REPORT_LOG();
newModel.OPTYPE = "其它";
newModel.CONTENT = "获取主数据组织架构信息";
newModel.RESULT = "成功";
newModel.DETAIL = msg;
newModel.OPERATOR = userName;
newModel.CREATE_TIME = DateTime.Now;
db.SANKU_REPORT_LOG.InsertOnSubmit(newModel);
db.SubmitChanges();
}
}
}
catch (Exception ex)
{
string msg = ex.Message;
responeData.code = 0;
responeData.message = "获取失败,具体错误信息请查看三库操作日志";
//记录操作日志
Model.SANKU_REPORT_LOG newModel = new Model.SANKU_REPORT_LOG();
newModel.OPTYPE = "其它";
newModel.CONTENT = "获取主数据组织架构信息";
newModel.RESULT = "失败";
newModel.DETAIL = msg;
newModel.OPERATOR = userName;
newModel.CREATE_TIME = DateTime.Now;
db.SANKU_REPORT_LOG.InsertOnSubmit(newModel);
db.SubmitChanges();
}
return responeData;
}
#endregion
}
}
@@ -48,7 +48,17 @@ namespace BLL
DeathPersonNum = accidentHandle.DeathPersonNum,
InjuriesPersonNum = accidentHandle.InjuriesPersonNum,
MinorInjuriesPersonNum = accidentHandle.MinorInjuriesPersonNum,
WorkHoursLoss = accidentHandle.WorkHoursLoss
WorkHoursLoss = accidentHandle.WorkHoursLoss,
AccidentLevel = accidentHandle.AccidentLevel,
AccidentType = accidentHandle.AccidentType,
AccidentLocation = accidentHandle.AccidentLocation,
IndirectMoneyLoss = accidentHandle.IndirectMoneyLoss,
ContractingResponsibility = accidentHandle.ContractingResponsibility,
PositionName = accidentHandle.PositionName,
ResponsibilityType = accidentHandle.ResponsibilityType,
ResponsibilityDesc = accidentHandle.ResponsibilityDesc,
ResponsibleMan = accidentHandle.ResponsibleMan,
ResponsibleManName = accidentHandle.ResponsibleManName,
};
db.Accident_AccidentHandle.InsertOnSubmit(newAccidentHandle);
db.SubmitChanges();
@@ -82,6 +92,16 @@ namespace BLL
newAccidentHandle.InjuriesPersonNum = accidentHandle.InjuriesPersonNum;
newAccidentHandle.MinorInjuriesPersonNum = accidentHandle.MinorInjuriesPersonNum;
newAccidentHandle.WorkHoursLoss = accidentHandle.WorkHoursLoss;
newAccidentHandle.AccidentLevel = accidentHandle.AccidentLevel;
newAccidentHandle.AccidentType = accidentHandle.AccidentType;
newAccidentHandle.AccidentLocation = accidentHandle.AccidentLocation;
newAccidentHandle.IndirectMoneyLoss = accidentHandle.IndirectMoneyLoss;
newAccidentHandle.ContractingResponsibility = accidentHandle.ContractingResponsibility;
newAccidentHandle.PositionName = accidentHandle.PositionName;
newAccidentHandle.ResponsibilityType = accidentHandle.ResponsibilityType;
newAccidentHandle.ResponsibilityDesc = accidentHandle.ResponsibilityDesc;
newAccidentHandle.ResponsibleMan = accidentHandle.ResponsibleMan;
newAccidentHandle.ResponsibleManName = accidentHandle.ResponsibleManName;
db.SubmitChanges();
}
}
@@ -52,12 +52,15 @@ namespace BLL
ViolationDate = violationPerson.ViolationDate,
ViolationName = violationPerson.ViolationName,
ViolationType = violationPerson.ViolationType,
CompileMan = violationPerson.CompileMan
CompileMan = violationPerson.CompileMan,
CompileDate = violationPerson.CompileDate
};
newViolationPerson.ViolationDate = violationPerson.ViolationDate;
newViolationPerson.States = violationPerson.States;
newViolationPerson.HandleStep = violationPerson.HandleStep;
newViolationPerson.ViolationDef = violationPerson.ViolationDef;
newViolationPerson.RectificationStatus = violationPerson.RectificationStatus;
newViolationPerson.ViolationLevel = violationPerson.ViolationLevel;
db.Check_ViolationPerson.InsertOnSubmit(newViolationPerson);
db.SubmitChanges();
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectViolationPersonMenuId, violationPerson.ProjectId, null, violationPerson.ViolationPersonId, violationPerson.CompileDate);
@@ -86,6 +89,8 @@ namespace BLL
newViolationPerson.States = violationPerson.States;
newViolationPerson.HandleStep = violationPerson.HandleStep;
newViolationPerson.ViolationDef = violationPerson.ViolationDef;
newViolationPerson.RectificationStatus = violationPerson.RectificationStatus;
newViolationPerson.ViolationLevel = violationPerson.ViolationLevel;
db.SubmitChanges();
}
}
@@ -63,6 +63,13 @@ namespace BLL
newTestRecord.TestEndTime = testRecord.TestEndTime;
newTestRecord.IsFiled = testRecord.IsFiled;
db.SubmitChanges();
//更新三库考试考核
string message = string.Empty;
SanKuDataSummaryReportService.UpdateExaminationRecordItem(testRecord.TestRecordId, ref message);
//if (!string.IsNullOrWhiteSpace(message))
//{
// ShowNotify(message, MessageBoxIcon.Warning);
//}
}
}
@@ -1,8 +1,9 @@
using System;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace BLL
{
@@ -47,6 +48,8 @@ namespace BLL
Descriptions = largerHazard.Descriptions,
OperativesNum = largerHazard.OperativesNum,
ApprovalState = largerHazard.ApprovalState,
UnitId = largerHazard.UnitId,
StandbyPersonnelId = largerHazard.StandbyPersonnelId,
};
db.Solution_LargerHazard.InsertOnSubmit(newLargerHazard);
@@ -91,6 +94,8 @@ namespace BLL
newLargerHazard.IsUpdate = null;
newLargerHazard.OperativesNum = largerHazard.OperativesNum;
newLargerHazard.ApprovalState = largerHazard.ApprovalState;
newLargerHazard.UnitId = largerHazard.UnitId;
newLargerHazard.StandbyPersonnelId = largerHazard.StandbyPersonnelId;
db.SubmitChanges();
//判断是否有数据 有数据则更新 没有数据则添加
var majorPlanApproval = BLL.MajorPlanApprovalService.GetMajorPlanApprovalById(largerHazard.HazardId);
+16 -2
View File
@@ -800,6 +800,7 @@
#region
/// <summary>
/// 获取主数据项目【新的主数据表】
/// </summary>
@@ -811,7 +812,7 @@
{
{"collCropCode", thisUnit.CollCropCode}
};
//var cacheKey = "MasterDataProjects";
//var cacheKey = "MasterDataProjectsInfo";
//if (CacheHelper.Exists(cacheKey))
//{
// return CacheHelper.Get<List<Model.Ads_pms_pro_info_build>>(cacheKey);
@@ -821,13 +822,26 @@
if (returnData != null && returnData.code == 1)
{
projectlist = JsonConvert.DeserializeObject<List<Ads_pms_pro_info_build>>(returnData.data.ToString());
//CacheHelper.Add(cacheKey, projectlist, DateTimeOffset.Now.AddDays(2));
//CacheHelper.Add(cacheKey, projectlist, DateTimeOffset.Now.AddHours(3));
if (projectlist.Any())
{
var db = Funs.DB;
var oldProList = from x in db.Ads_pms_pro_info_build select x;
if (oldProList.Any())
{
db.Ads_pms_pro_info_build.DeleteAllOnSubmit(oldProList);
db.SubmitChanges();
}
db.Ads_pms_pro_info_build.InsertAllOnSubmit(projectlist);
db.SubmitChanges();
}
}
return projectlist;
}
/// <summary>
/// 获取主数据项目
/// </summary>
+144
View File
@@ -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
+42
View File
@@ -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();
}
}
}
+4
View File
@@ -92,6 +92,8 @@ namespace BLL
LinkMobile = unit.LinkMobile,
CollCropStatus = unit.CollCropStatus,
RealNamePushTime = null,
MasterAdOrgCode = unit.MasterAdOrgCode,
MasterAdOrgName = unit.MasterAdOrgName,
};
db.Base_Unit.InsertOnSubmit(newUnit);
db.SubmitChanges();
@@ -129,6 +131,8 @@ namespace BLL
newUnit.LinkMobile = unit.LinkMobile;
newUnit.CollCropStatus = unit.CollCropStatus;
newUnit.RealNamePushTime = null;
newUnit.MasterAdOrgCode = unit.MasterAdOrgCode;
newUnit.MasterAdOrgName = unit.MasterAdOrgName;
db.SubmitChanges();
}
}