48 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
using APT.Infrastructure.Core;
 | 
						|
using APT.MS.Domain.Entities.SK;
 | 
						|
using APT.Utility;
 | 
						|
using Microsoft.AspNetCore.Mvc;
 | 
						|
using System.Collections.Generic;
 | 
						|
 | 
						|
namespace APT.SK.WebApi.Controllers.Api
 | 
						|
{
 | 
						|
    /// <summary>
 | 
						|
    ///  辨识区域
 | 
						|
    /// </summary>
 | 
						|
    [Route("api/SK/SKRiskArea")]
 | 
						|
    public partial class RiskAreaController : AuthorizeTreeApiController<T_SK_RISK_AREA>
 | 
						|
    {
 | 
						|
        /// <summary>
 | 
						|
        /// 更新或新增数据
 | 
						|
        /// </summary>
 | 
						|
        /// <param name="entity">对象实体</param>
 | 
						|
        /// <returns></returns>
 | 
						|
        [HttpPost, Route("FullUpdate")]
 | 
						|
        public JsonActionResult<bool> FullUpdate([FromBody] T_SK_RISK_AREA entity)
 | 
						|
        {
 | 
						|
            //return WitUpdate(entity);
 | 
						|
            return SafeExecute(() =>
 | 
						|
            {
 | 
						|
                var videos = entity.Nav_Videos;
 | 
						|
                entity.Nav_Videos = null;
 | 
						|
                if (videos.Count > 0)
 | 
						|
                {
 | 
						|
                    foreach (var item in videos)
 | 
						|
                    {
 | 
						|
                        item.Nav_Viedo = null;
 | 
						|
                        item.Nav_Area = null;
 | 
						|
                    }
 | 
						|
                }
 | 
						|
                this.UnifiedCommit(() =>
 | 
						|
                {
 | 
						|
                    if (videos != null && videos.Count > 0)
 | 
						|
                    {
 | 
						|
                        BantchSaveEntityNoCommit(videos);
 | 
						|
                    }
 | 
						|
                    TreeUpdateEntity(entity);
 | 
						|
                });
 | 
						|
                return true;
 | 
						|
            });
 | 
						|
        }
 | 
						|
    }
 | 
						|
} |