fix(drone): 修复无人机数据更新逻辑
- 修正几何数据更新条件判断,当shpPath不为空时才进行几何数据更新 - 移除几何数据更新操作中的空值赋值 - 注释掉几何数据表的更新操作避免重复执行 - 简化事务提交条件,仅检查项目数据更新结果dev
parent
44fa06d87f
commit
453bd6b595
|
|
@ -934,20 +934,20 @@ namespace OpenAuth.App.ServiceApp.DroneSsnydManage
|
|||
var oldProject = await Repository.GetByIdAsync(project.Id);
|
||||
using var uow = base.UnitWork.CreateContext();
|
||||
var a = 0;
|
||||
if (string.IsNullOrEmpty(req.shpPath))
|
||||
if (!string.IsNullOrEmpty(req.shpPath))
|
||||
{
|
||||
var geomid = oldProject.geomid;
|
||||
var geometry = new DroneShpData()
|
||||
{
|
||||
gid = int.Parse(geomid),
|
||||
geom = null
|
||||
geom = req.shpPath
|
||||
};
|
||||
a = await uow.DroneShpData.AsUpdateable(geometry).IgnoreNullColumns().ExecuteCommandAsync();
|
||||
//a = await uow.DroneShpData.AsUpdateable(geometry).IgnoreNullColumns().ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
|
||||
var b = await uow.DroneSsnyd.AsUpdateable(project).IgnoreNullColumns().ExecuteCommandAsync();
|
||||
if (a > 0 && b > 0)
|
||||
if (b > 0)
|
||||
{
|
||||
uow.Commit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue