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)
|
||||
{
|
||||
var project = await Repository.AsQueryable().SingleAsync(a => a.Id == id && a.handle_status_id != 99);
|
||||
if (project == null)
|
||||
{
|
||||
throw new Exception("项目不存在或停止生产");
|
||||
}
|
||||
|
||||
var newProject = new DroneSsnyd()
|
||||
{
|
||||
Id = project.Id,
|
||||
handle_status_id = 99,
|
||||
handle_status_name = "项目终止",
|
||||
};
|
||||
await Repository.AsUpdateable(newProject).IgnoreNullColumns().ExecuteCommandAsync();
|
||||
}
|
||||
{
|
||||
var project = await Repository.AsQueryable().SingleAsync(a => a.Id == id && a.handle_status_id != 99);
|
||||
if (project == null)
|
||||
{
|
||||
throw new Exception("项目不存在或停止生产");
|
||||
}
|
||||
|
||||
var newProject = new DroneSsnyd()
|
||||
{
|
||||
Id = project.Id,
|
||||
handle_status_id = 99,
|
||||
handle_status_name = "项目终止",
|
||||
};
|
||||
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()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
|
|
@ -710,5 +709,7 @@ namespace OpenAuth.Repository.Domain
|
|||
/// </summary>
|
||||
public DateTime? yijiaoshijian { get; set; }
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public List<DroneSsnydRcjg> RcjgList { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -218,6 +218,30 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
|||
|
||||
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>
|
||||
/// 历史项目导出
|
||||
|
|
|
|||
Loading…
Reference in New Issue