小程序接口修改

This commit is contained in:
2023-07-11 16:32:16 +08:00
parent ca5c3fe9a7
commit 4449a7754f
68 changed files with 4634 additions and 2984 deletions
@@ -78,12 +78,40 @@ namespace BLL
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectConstructSolutionMenuId, constructSolution.ProjectId, null, constructSolution.ConstructSolutionId, constructSolution.CompileDate);
}
}
/// <summary>
/// 修改施工方案/审查
/// </summary>
/// <param name="constructSolution"></param>
public static void UpdateConstructSolution(Model.Solution_ConstructSolution constructSolution)
public static void AddConstructSolutionForApi(Model.Solution_ConstructSolution constructSolution)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Solution_ConstructSolution newConstructSolution = new Model.Solution_ConstructSolution
{
ConstructSolutionId = constructSolution.ConstructSolutionId,
ProjectId = constructSolution.ProjectId,
ConstructSolutionCode = constructSolution.ConstructSolutionCode,
ConstructSolutionName = constructSolution.ConstructSolutionName,
VersionNo = constructSolution.VersionNo,
UnitId = constructSolution.UnitId,
InvestigateType = constructSolution.InvestigateType,
SolutinType = constructSolution.SolutinType,
FileContents = constructSolution.FileContents,
Remark = constructSolution.Remark,
CompileMan = constructSolution.CompileMan,
CompileManName = constructSolution.CompileManName,
CompileDate = constructSolution.CompileDate,
States = constructSolution.States
};
db.Solution_ConstructSolution.InsertOnSubmit(newConstructSolution);
db.SubmitChanges();
if (constructSolution.ConstructSolutionCode == BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectConstructSolutionMenuId, constructSolution.ProjectId, null))
{
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectConstructSolutionMenuId, constructSolution.ProjectId, null, constructSolution.ConstructSolutionId, constructSolution.CompileDate);
}
}
}
/// <summary>
/// 修改施工方案/审查
/// </summary>
/// <param name="constructSolution"></param>
public static void UpdateConstructSolution(Model.Solution_ConstructSolution constructSolution)
{
Model.SGGLDB db = Funs.DB;
Model.Solution_ConstructSolution newConstructSolution = db.Solution_ConstructSolution.FirstOrDefault(e => e.ConstructSolutionId == constructSolution.ConstructSolutionId);
@@ -109,12 +137,55 @@ namespace BLL
}
}
}
public static void UpdateConstructSolutionForApi(Model.Solution_ConstructSolution constructSolution)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Solution_ConstructSolution newConstructSolution = db.Solution_ConstructSolution.FirstOrDefault(e => e.ConstructSolutionId == constructSolution.ConstructSolutionId);
if (newConstructSolution != null)
{
newConstructSolution.ConstructSolutionName = constructSolution.ConstructSolutionName;
newConstructSolution.VersionNo = constructSolution.VersionNo;
newConstructSolution.UnitId = constructSolution.UnitId;
newConstructSolution.InvestigateType = constructSolution.InvestigateType;
newConstructSolution.SolutinType = constructSolution.SolutinType;
newConstructSolution.FileContents = constructSolution.FileContents;
newConstructSolution.Remark = constructSolution.Remark;
newConstructSolution.States = constructSolution.States;
if (!string.IsNullOrEmpty(constructSolution.QRCodeAttachUrl))
{
newConstructSolution.QRCodeAttachUrl = constructSolution.QRCodeAttachUrl;
}
/// <summary>
/// 根据主键删除施工方案/审查
/// </summary>
/// <param name="constructSolutionId"></param>
public static void DeleteConstructSolutionById(string constructSolutionId)
db.SubmitChanges();
string code = string.Empty;
var codeRecords = db.Sys_CodeRecords.FirstOrDefault(x => x.DataId == constructSolution.ConstructSolutionId);
if (codeRecords != null)
{
code = codeRecords.Code;
}
if (constructSolution.ConstructSolutionCode != code)
{
var codeRecords1 = db.Sys_CodeRecords.FirstOrDefault(x => x.DataId == constructSolution.ConstructSolutionId);
if (codeRecords1 != null)
{
///删除文件柜A中数据
// BLL.FileCabinetAItemService.DeleteFileCabinetAItemByID(dataId);
db.Sys_CodeRecords.DeleteOnSubmit(codeRecords1);
db.SubmitChanges();
}
}
}
}
}
/// <summary>
/// 根据主键删除施工方案/审查
/// </summary>
/// <param name="constructSolutionId"></param>
public static void DeleteConstructSolutionById(string constructSolutionId)
{
Model.SGGLDB db = Funs.DB;
Model.Solution_ConstructSolution constructSolution = db.Solution_ConstructSolution.FirstOrDefault(e => e.ConstructSolutionId == constructSolutionId);