Compare commits
2 Commits
d6fb16811f
...
d56a896b45
| Author | SHA1 | Date |
|---|---|---|
|
|
d56a896b45 | |
|
|
d4e779a6f4 |
|
|
@ -460,20 +460,35 @@ namespace OpenAuth.App.ServiceApp.DroneSsnydManage
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task CloseProject(string id)
|
public async Task CloseProject(string id)
|
||||||
{
|
{
|
||||||
var project = await Repository.AsQueryable().SingleAsync(a => a.Id == id && a.handle_status_id != 99);
|
var project = await Repository.AsQueryable().SingleAsync(a => a.Id == id && a.handle_status_id != 99);
|
||||||
if (project == null)
|
if (project == null)
|
||||||
{
|
{
|
||||||
throw new Exception("项目不存在或停止生产");
|
throw new Exception("项目不存在或停止生产");
|
||||||
}
|
}
|
||||||
|
|
||||||
var newProject = new DroneSsnyd()
|
var newProject = new DroneSsnyd()
|
||||||
{
|
{
|
||||||
Id = project.Id,
|
Id = project.Id,
|
||||||
handle_status_id = 99,
|
handle_status_id = 99,
|
||||||
handle_status_name = "项目终止",
|
handle_status_name = "项目终止",
|
||||||
};
|
};
|
||||||
await Repository.AsUpdateable(newProject).IgnoreNullColumns().ExecuteCommandAsync();
|
await Repository.AsUpdateable(newProject).IgnoreNullColumns().ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DroneSsnyd ProjectDetail(string id)
|
||||||
|
{
|
||||||
|
var project = Repository.GetById(id);
|
||||||
|
if (project == null)
|
||||||
|
{
|
||||||
|
throw new Exception("项目不存在");
|
||||||
|
}
|
||||||
|
project.RcjgList = Repository
|
||||||
|
.ChangeRepository<SugarRepositiry<DroneSsnydRcjg>>().AsQueryable()
|
||||||
|
.Where(c => c.ssnyd_id == id)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
return project;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -13,9 +13,8 @@ namespace OpenAuth.Repository.Domain
|
||||||
{
|
{
|
||||||
public DroneSsnyd()
|
public DroneSsnyd()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:
|
/// Desc:
|
||||||
/// Default:
|
/// Default:
|
||||||
|
|
@ -710,5 +709,7 @@ namespace OpenAuth.Repository.Domain
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? yijiaoshijian { get; set; }
|
public DateTime? yijiaoshijian { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public List<DroneSsnydRcjg> RcjgList { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -219,6 +219,30 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 项目移交 项目详情
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 项目详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public Response<DroneSsnyd> ProjectDetail(string id)
|
||||||
|
{
|
||||||
|
var response = new Response<DroneSsnyd>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
response.Result = droneSsnyApp.ProjectDetail(id);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
response.Code = 500;
|
||||||
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 历史项目导出
|
/// 历史项目导出
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue