dev
洁 任 2 months ago
parent b1b3de8441
commit aad62755eb

@ -1087,55 +1087,104 @@ namespace OpenAuth.App.BaseApp.WFTask
public async Task<dynamic> GetTaskByCaseId(string caseid)
{
var x = await client.Queryable<Repository.Domain.WFTask>().Where(t => t.ProcessId == caseid && t.Type == 7).FirstAsync();
var code = x.ProcessCode;
if (code.Equals("0000001")) // 违法用地
Repository.Domain.WFTask x=new Repository.Domain.WFTask();
var process = await client.Queryable<WFProcess>().Where(r => r.ParentProcessId == caseid).FirstAsync();
if (process != null)
{
var info = await client.Queryable<Repository.Domain.WFTask>()
.Where(t => t.ProcessId == caseid &&
(t.Type == 1 || t.Type == 3 || t.Type == 4 || t.Type == 5 || t.Type == 7))
.LeftJoin<DroneCaseInfoSingle>((t, r) => t.ProcessId == r.Id)
.OrderByDescending((t, r) => t.CreateDate)
.Select<dynamic>((t, r) => new
{
taskid = t.Id,
handle_status_id = r.handle_status_id,
handle_status_name = r.handle_status_name
})
caseid = process.Id;
x = await client.Queryable<Repository.Domain.WFTask>()
.Where(t => t.ProcessId == caseid && t.Type == 7)
.FirstAsync();
return info;
} else if (x.ProcessCode == "004")
}
else
{
var info = await client.Queryable<Repository.Domain.WFTask>()
.Where(t => t.ProcessId == caseid &&
(t.Type == 1 || t.Type == 3 || t.Type == 4 || t.Type == 5 || t.Type == 7))
.LeftJoin<DroneSsnyd>((t, r) => t.ProcessId == r.Id)
.OrderByDescending((t, r) => t.CreateDate)
.Select<dynamic>((t, r) => new
{
taskid = t.Id,
handle_status_id = r.handle_status_id,
handle_status_name = r.handle_status_name
})
x = await client.Queryable<Repository.Domain.WFTask>()
.Where(t => t.ProcessId == caseid && (t.Type == 7||t.Type==3))
.FirstAsync();
return info;
}
else // 0000004 // 耕地非粮
if (x != null)
{
var info = await client.Queryable<Repository.Domain.WFTask>()
.Where(t => t.ProcessId == caseid &&
(t.Type == 1 || t.Type == 3 || t.Type == 4 || t.Type == 5 || t.Type == 7))
.LeftJoin<DroneCaseInfoFLH>((t, r) => t.ProcessId == r.Id)
.OrderByDescending((t, r) => t.CreateDate)
.Select<dynamic>((t, r) => new
{
taskid = t.Id,
handle_status_id = r.handle_status_id,
handle_status_name = r.handle_status_name
})
.FirstAsync();
return info;
var code = x.ProcessCode;
if (code.Equals("0000001")) // 违法用地
{
var info = await client.Queryable<Repository.Domain.WFTask>()
.Where(t => t.ProcessId == caseid &&
(t.Type == 1 || t.Type == 3 || t.Type == 4 || t.Type == 5 || t.Type == 7))
.LeftJoin<DroneCaseInfoSingle>((t, r) => t.ProcessId == r.Id)
.OrderByDescending((t, r) => t.CreateDate)
.Select<dynamic>((t, r) => new
{
taskid = t.Id,
handle_status_id = r.handle_status_id,
handle_status_name = r.handle_status_name,
ChildSchemeInfoCode = t.ChildSchemeInfoCode,
Type=t.Type
})
.FirstAsync();
return info;
}
else if (x.ProcessCode == "004")
{
var info = await client.Queryable<Repository.Domain.WFTask>()
.Where(t => t.ProcessId == caseid &&
(t.Type == 1 || t.Type == 3 || t.Type == 4 || t.Type == 5 || t.Type == 7))
.LeftJoin<DroneSsnyd>((t, r) => t.ProcessId == r.Id)
.OrderByDescending((t, r) => t.CreateDate)
.Select<dynamic>((t, r) => new
{
taskid = t.Id,
handle_status_id = r.handle_status_id,
handle_status_name = r.handle_status_name,
ChildSchemeInfoCode = t.ChildSchemeInfoCode,
Type = t.Type
})
.FirstAsync();
return info;
}
else if (x.ProcessCode == "005")
{
var info = await client.Queryable<Repository.Domain.WFTask>()
.Where(t => t.ProcessId == caseid &&
(t.Type == 1 || t.Type == 3 || t.Type == 4 || t.Type == 5 || t.Type == 7))
.LeftJoin<DroneSsnydRcjg>((t, r) => t.ProcessId == r.Id)
.LeftJoin<DroneSsnyd>((t,r,s)=>r.ssnyd_id==s.Id)
.OrderByDescending((t, r, s) => t.CreateDate)
.Select<dynamic>((t, r, s) => new
{
taskid = t.Id,
handle_status_id = s.handle_status_id,
handle_status_name = s.handle_status_name,
ChildSchemeInfoCode = t.ChildSchemeInfoCode,
Type = t.Type
})
.FirstAsync();
return info;
}
else // 0000004 // 耕地非粮
{
var info = await client.Queryable<Repository.Domain.WFTask>()
.Where(t => t.ProcessId == caseid &&
(t.Type == 1 || t.Type == 3 || t.Type == 4 || t.Type == 5 || t.Type == 7))
.LeftJoin<DroneCaseInfoFLH>((t, r) => t.ProcessId == r.Id)
.OrderByDescending((t, r) => t.CreateDate)
.Select<dynamic>((t, r) => new
{
taskid = t.Id,
handle_status_id = r.handle_status_id,
handle_status_name = r.handle_status_name,
ChildSchemeInfoCode = t.ChildSchemeInfoCode,
Type = t.Type
})
.FirstAsync();
return info;
}
}
else
{
return null;
}
}
#endregion

Loading…
Cancel
Save