项目下发更新caseno接口修改
parent
607dfd799c
commit
509169a8b2
|
|
@ -6186,6 +6186,47 @@ WHERE is_closed = 0 and b.""Id"" is not null and synchronoustime >= @StartTime a
|
|||
}, it => it.Id == req.Id);
|
||||
}
|
||||
|
||||
var result = db.Commit();
|
||||
if (result)
|
||||
return new Response<bool> { Result = true, Code = 200, Message = "更新成功" };
|
||||
else
|
||||
return new Response<bool> { Result = false, Code = 500, Message = "更新失败" };
|
||||
}
|
||||
|
||||
case "设施农业监管":
|
||||
using (var db = base.UnitWork.CreateContext())
|
||||
{
|
||||
var caseInfo = await db.DroneSsnyd.AsQueryable().FirstAsync(r => r.Id == req.Id);
|
||||
if (caseInfo == null)
|
||||
throw new Exception("未找到图斑信息");
|
||||
|
||||
if (!string.IsNullOrEmpty(caseInfo.xiangmu_no))
|
||||
{
|
||||
await db.DroneSsnyd.UpdateAsync(it => new DroneSsnyd()
|
||||
{
|
||||
synchronoustime = DateTime.Now,
|
||||
handle_status_id=1
|
||||
}, it => it.Id == req.Id);
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
caseno = caseInfo.countyid + DateTime.Now.ToString("yyyyMMdd") +
|
||||
random.Next(1000, 9999).ToString();
|
||||
var count = await db.DroneSsnyd.AsQueryable().Where(c => c.xiangmu_no == caseno)
|
||||
.CountAsync();
|
||||
isUnique = count == 0;
|
||||
} while (!isUnique);
|
||||
|
||||
await db.DroneSsnyd.UpdateAsync(it => new DroneSsnyd()
|
||||
{
|
||||
xiangmu_no = caseno,
|
||||
synchronoustime = DateTime.Now,
|
||||
handle_status_id=1
|
||||
}, it => it.Id == req.Id);
|
||||
}
|
||||
|
||||
var result = db.Commit();
|
||||
if (result)
|
||||
return new Response<bool> { Result = true, Code = 200, Message = "更新成功" };
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
|
||||
<NameOfLastUsedPublishProfile>D:\Projects\lanlingxian_ziranziyuanheguihua\OpenAuth.WebApi\Properties\PublishProfiles\IISProfile1.pubxml</NameOfLastUsedPublishProfile>
|
||||
<NameOfLastUsedPublishProfile>E:\2025\兰陵批后监管\OpenAuth.WebApi\Properties\PublishProfiles\continue.pubxml</NameOfLastUsedPublishProfile>
|
||||
<ActiveDebugProfile>OpenAuthApi</ActiveDebugProfile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
|
|
|||
Loading…
Reference in New Issue