首页滚动条
This commit is contained in:
		
							parent
							
								
									42e916da7e
								
							
						
					
					
						commit
						6ba4ebeb87
					
				
							
								
								
									
										71
									
								
								APT.BaseData.Domain/Entities/PF/T_PF_HOME_TITLE.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								APT.BaseData.Domain/Entities/PF/T_PF_HOME_TITLE.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,71 @@
 | 
				
			|||||||
 | 
					using APT.BaseData.Domain.Entities.BD;
 | 
				
			||||||
 | 
					using APT.Infrastructure.Core;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.ComponentModel;
 | 
				
			||||||
 | 
					namespace APT.BaseData.Domain.Entities
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 首页方针
 | 
				
			||||||
 | 
					    /// </summary> 
 | 
				
			||||||
 | 
					    [Description("首页方针")]
 | 
				
			||||||
 | 
					    public partial class T_PF_HOME_TITLE : MesEntityBase
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 方针
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        [Description("方针")]
 | 
				
			||||||
 | 
					        [FormFieldEdit]
 | 
				
			||||||
 | 
					        [FormFieldTable]
 | 
				
			||||||
 | 
					        [FormFieldQuery]
 | 
				
			||||||
 | 
					        [DataFieldLength(200)]
 | 
				
			||||||
 | 
					        public string TITLE { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 总部配置
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        [Description("总部配置")]
 | 
				
			||||||
 | 
					        [FormFieldEdit]
 | 
				
			||||||
 | 
					        [FormFieldTable]
 | 
				
			||||||
 | 
					        [FormFieldQuery]
 | 
				
			||||||
 | 
					        public bool ISHEAD { get; set; } = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 周期时长
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        [Description("周期时长")]
 | 
				
			||||||
 | 
					        [FormFieldEdit]
 | 
				
			||||||
 | 
					        [FormFieldTable]
 | 
				
			||||||
 | 
					        [FormFieldQuery]
 | 
				
			||||||
 | 
					        public int SECOND { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 颜色
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        [Description("颜色")]
 | 
				
			||||||
 | 
					        [FormFieldEdit]
 | 
				
			||||||
 | 
					        [FormFieldTable]
 | 
				
			||||||
 | 
					        [FormFieldQuery]
 | 
				
			||||||
 | 
					        [DataFieldLength(50)]
 | 
				
			||||||
 | 
					        public string COCOR { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 字体大小
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        [Description("字体大小")]
 | 
				
			||||||
 | 
					        [FormFieldEdit]
 | 
				
			||||||
 | 
					        [FormFieldTable]
 | 
				
			||||||
 | 
					        [FormFieldQuery]
 | 
				
			||||||
 | 
					        public int FONTSIZE { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 同步到子公司
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        [Description("同步到子公司")]
 | 
				
			||||||
 | 
					        [FormFieldEdit]
 | 
				
			||||||
 | 
					        [FormFieldTable]
 | 
				
			||||||
 | 
					        [FormFieldQuery]
 | 
				
			||||||
 | 
					        public bool ISTOCHILE { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										128550
									
								
								APT.Data.Migrations/Migrations/20250922023123_wyw2025092202.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										128550
									
								
								APT.Data.Migrations/Migrations/20250922023123_wyw2025092202.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -0,0 +1,55 @@
 | 
				
			|||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using Microsoft.EntityFrameworkCore.Migrations;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace APT.Data.Migrations.Migrations
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public partial class wyw2025092202 : Migration
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        protected override void Up(MigrationBuilder migrationBuilder)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            migrationBuilder.CreateTable(
 | 
				
			||||||
 | 
					                name: "T_PF_HOME_TITLE",
 | 
				
			||||||
 | 
					                columns: table => new
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
				
			||||||
 | 
					                    TITLE = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
 | 
				
			||||||
 | 
					                    ISHEAD = table.Column<bool>(type: "bit", nullable: false),
 | 
				
			||||||
 | 
					                    SECOND = table.Column<int>(type: "int", nullable: false),
 | 
				
			||||||
 | 
					                    COCOR = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
 | 
				
			||||||
 | 
					                    FONTSIZE = table.Column<int>(type: "int", nullable: false),
 | 
				
			||||||
 | 
					                    IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
 | 
				
			||||||
 | 
					                    ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
 | 
				
			||||||
 | 
					                    ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
 | 
				
			||||||
 | 
					                    FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
 | 
				
			||||||
 | 
					                    FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
 | 
				
			||||||
 | 
					                    FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
				
			||||||
 | 
					                    MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
 | 
				
			||||||
 | 
					                    CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
 | 
				
			||||||
 | 
					                    MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                constraints: table =>
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    table.PrimaryKey("PK_T_PF_HOME_TITLE", x => x.ID);
 | 
				
			||||||
 | 
					                    table.ForeignKey(
 | 
				
			||||||
 | 
					                        name: "FK_T_PF_HOME_TITLE_T_FM_ORGANIZATION_ORG_ID",
 | 
				
			||||||
 | 
					                        column: x => x.ORG_ID,
 | 
				
			||||||
 | 
					                        principalTable: "T_FM_ORGANIZATION",
 | 
				
			||||||
 | 
					                        principalColumn: "ID",
 | 
				
			||||||
 | 
					                        onDelete: ReferentialAction.Restrict);
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            migrationBuilder.CreateIndex(
 | 
				
			||||||
 | 
					                name: "IX_T_PF_HOME_TITLE_ORG_ID",
 | 
				
			||||||
 | 
					                table: "T_PF_HOME_TITLE",
 | 
				
			||||||
 | 
					                column: "ORG_ID");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        protected override void Down(MigrationBuilder migrationBuilder)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            migrationBuilder.DropTable(
 | 
				
			||||||
 | 
					                name: "T_PF_HOME_TITLE");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										128553
									
								
								APT.Data.Migrations/Migrations/20250922031446_wyw2025092203.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										128553
									
								
								APT.Data.Migrations/Migrations/20250922031446_wyw2025092203.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -0,0 +1,24 @@
 | 
				
			|||||||
 | 
					using Microsoft.EntityFrameworkCore.Migrations;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace APT.Data.Migrations.Migrations
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public partial class wyw2025092203 : Migration
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        protected override void Up(MigrationBuilder migrationBuilder)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            migrationBuilder.AddColumn<bool>(
 | 
				
			||||||
 | 
					                name: "ISTOCHILE",
 | 
				
			||||||
 | 
					                table: "T_PF_HOME_TITLE",
 | 
				
			||||||
 | 
					                type: "bit",
 | 
				
			||||||
 | 
					                nullable: false,
 | 
				
			||||||
 | 
					                defaultValue: false);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        protected override void Down(MigrationBuilder migrationBuilder)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            migrationBuilder.DropColumn(
 | 
				
			||||||
 | 
					                name: "ISTOCHILE",
 | 
				
			||||||
 | 
					                table: "T_PF_HOME_TITLE");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -14584,6 +14584,73 @@ namespace APT.Data.Migrations.Migrations
 | 
				
			|||||||
                    b.ToTable("T_PF_FORM_QUERY");
 | 
					                    b.ToTable("T_PF_FORM_QUERY");
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_HOME_TITLE", b =>
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    b.Property<Guid>("ID")
 | 
				
			||||||
 | 
					                        .ValueGeneratedOnAdd()
 | 
				
			||||||
 | 
					                        .HasColumnType("uniqueidentifier");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<string>("COCOR")
 | 
				
			||||||
 | 
					                        .HasMaxLength(50)
 | 
				
			||||||
 | 
					                        .HasColumnType("nvarchar(50)");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<Guid?>("CREATER_ID")
 | 
				
			||||||
 | 
					                        .HasColumnType("uniqueidentifier");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<DateTime?>("CREATE_TIME")
 | 
				
			||||||
 | 
					                        .HasColumnType("datetime2");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<int>("ENTITY_ORG_TPYE")
 | 
				
			||||||
 | 
					                        .HasColumnType("int");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<Guid?>("FLOW_ID")
 | 
				
			||||||
 | 
					                        .HasColumnType("uniqueidentifier");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<int>("FLOW_SEND_STATUS")
 | 
				
			||||||
 | 
					                        .HasColumnType("int");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<int>("FLOW_STATUS")
 | 
				
			||||||
 | 
					                        .HasColumnType("int");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<int>("FONTSIZE")
 | 
				
			||||||
 | 
					                        .HasColumnType("int");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<Guid?>("FORM_ID")
 | 
				
			||||||
 | 
					                        .HasColumnType("uniqueidentifier");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<bool>("ISHEAD")
 | 
				
			||||||
 | 
					                        .HasColumnType("bit");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<bool>("ISTOCHILE")
 | 
				
			||||||
 | 
					                        .HasColumnType("bit");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<bool>("IS_DELETED")
 | 
				
			||||||
 | 
					                        .HasColumnType("bit");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<Guid?>("MODIFIER_ID")
 | 
				
			||||||
 | 
					                        .HasColumnType("uniqueidentifier");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<DateTime?>("MODIFY_TIME")
 | 
				
			||||||
 | 
					                        .HasColumnType("datetime2");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<Guid?>("ORG_ID")
 | 
				
			||||||
 | 
					                        .IsRequired()
 | 
				
			||||||
 | 
					                        .HasColumnType("uniqueidentifier");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<int>("SECOND")
 | 
				
			||||||
 | 
					                        .HasColumnType("int");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Property<string>("TITLE")
 | 
				
			||||||
 | 
					                        .HasMaxLength(200)
 | 
				
			||||||
 | 
					                        .HasColumnType("nvarchar(200)");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.HasKey("ID");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.HasIndex("ORG_ID");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.ToTable("T_PF_HOME_TITLE");
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", b =>
 | 
					            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", b =>
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    b.Property<Guid>("ID")
 | 
					                    b.Property<Guid>("ID")
 | 
				
			||||||
@ -96293,6 +96360,17 @@ namespace APT.Data.Migrations.Migrations
 | 
				
			|||||||
                    b.Navigation("Nav_PageForm");
 | 
					                    b.Navigation("Nav_PageForm");
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_HOME_TITLE", b =>
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
 | 
				
			||||||
 | 
					                        .WithMany()
 | 
				
			||||||
 | 
					                        .HasForeignKey("ORG_ID")
 | 
				
			||||||
 | 
					                        .OnDelete(DeleteBehavior.Restrict)
 | 
				
			||||||
 | 
					                        .IsRequired();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    b.Navigation("Nav_Org");
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", b =>
 | 
					            modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", b =>
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FILE", "Nav_File")
 | 
					                    b.HasOne("APT.BaseData.Domain.Entities.T_PF_FILE", "Nav_File")
 | 
				
			||||||
 | 
				
			|||||||
@ -15637,6 +15637,17 @@ builder.Property(t => t.NAME).HasMaxLength(500);
 | 
				
			|||||||
			builder.Property(t => t.CODE).HasMaxLength(30);
 | 
								builder.Property(t => t.CODE).HasMaxLength(30);
 | 
				
			||||||
builder.Property(t => t.REMARK).HasMaxLength(500);
 | 
					builder.Property(t => t.REMARK).HasMaxLength(500);
 | 
				
			||||||
		} 
 | 
							} 
 | 
				
			||||||
 | 
					     }
 | 
				
			||||||
 | 
						 #endregion
 | 
				
			||||||
 | 
										#region  HomeTitle
 | 
				
			||||||
 | 
					     public partial class PFHomeTitleMap :APTEntityBaseMap<T_PF_HOME_TITLE>
 | 
				
			||||||
 | 
					     {   
 | 
				
			||||||
 | 
					        public override void Configure(EntityTypeBuilder<T_PF_HOME_TITLE> builder)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								base.Configure(builder);
 | 
				
			||||||
 | 
								builder.Property(t => t.TITLE).HasMaxLength(200);
 | 
				
			||||||
 | 
					builder.Property(t => t.COCOR).HasMaxLength(50);
 | 
				
			||||||
 | 
							} 
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
	 #endregion
 | 
						 #endregion
 | 
				
			||||||
					#region  MqttConfig
 | 
										#region  MqttConfig
 | 
				
			||||||
 | 
				
			|||||||
@ -1326,6 +1326,7 @@ namespace APT.BS.WebApi.Controllers.Api
 | 
				
			|||||||
                            modelUser = new T_FM_USER();
 | 
					                            modelUser = new T_FM_USER();
 | 
				
			||||||
                            modelUser.ID = Guid.NewGuid();
 | 
					                            modelUser.ID = Guid.NewGuid();
 | 
				
			||||||
                            modelUser.CREATE_TIME = dtNow;
 | 
					                            modelUser.CREATE_TIME = dtNow;
 | 
				
			||||||
 | 
					                            modelUser.NUM = i;//排序
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        listAll.Add(new T_OP_ALLUSER()
 | 
					                        listAll.Add(new T_OP_ALLUSER()
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,93 @@
 | 
				
			|||||||
 | 
					using APT.BaseData.Domain.Entities;
 | 
				
			||||||
 | 
					using APT.BaseData.Domain.IServices;
 | 
				
			||||||
 | 
					using APT.Infrastructure.Core;
 | 
				
			||||||
 | 
					using Microsoft.AspNetCore.Mvc;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using APT.Utility;
 | 
				
			||||||
 | 
					using APT.Infrastructure.Api;
 | 
				
			||||||
 | 
					using APT.Migrations;
 | 
				
			||||||
 | 
					using APT.BaseData.Domain.Entities.OP;
 | 
				
			||||||
 | 
					using APT.BaseData.Domain.Enums.OP;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace APT.PF.WebApiControllers.Api.PF
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    [Route("api/PF/PFHomeTitle")]
 | 
				
			||||||
 | 
					    public class PFHomeTitleController : AuthorizeTreeApiController<T_PF_APPMENU>
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 更新或新增数据
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="entity">对象实体</param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        [HttpPost, Route("FullUpdate")]
 | 
				
			||||||
 | 
					        public JsonActionResult<bool> FullUpdate([FromBody] T_PF_HOME_TITLE entity)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return SafeExecute(() =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                //如果是总部 同步修改 子公司
 | 
				
			||||||
 | 
					                this.UnifiedCommit(() =>
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    UpdateEntityNoCommit(entity);
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    if (entity.ISTOCHILE)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        #region  总部
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        Dictionary<Guid, string> dicORGCONN = new Dictionary<Guid, string>();
 | 
				
			||||||
 | 
					                        string conn = string.Empty;
 | 
				
			||||||
 | 
					                        IEnumerable<T_OP_TENANT> listTent = null;
 | 
				
			||||||
 | 
					                        using (var context = new MigrationContext())
 | 
				
			||||||
 | 
					                        {
 | 
				
			||||||
 | 
					                            listTent = context.GetEntities<T_OP_TENANT>(e => e.DB_CONN_ID.HasValue && e.ID != entity.ORG_ID, null, null);
 | 
				
			||||||
 | 
					                            List<Guid> listConnID = listTent.Select(e => e.DB_CONN_ID.Value).ToList();
 | 
				
			||||||
 | 
					                            var listDbConn = context.GetEntities<T_OP_TENANT_DB_CONN>(e => listConnID.Contains(e.ID), null, null);
 | 
				
			||||||
 | 
					                            foreach (var item in listDbConn)
 | 
				
			||||||
 | 
					                            {
 | 
				
			||||||
 | 
					                                conn = item.DB_CONN;
 | 
				
			||||||
 | 
					                                if (ConfigurationManager.AppSettings["Env"] == ((int)EnvType.外网).ToString())
 | 
				
			||||||
 | 
					                                {
 | 
				
			||||||
 | 
					                                    conn = item.DB_CONN_WAN;
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					                                if (!dicORGCONN.ContainsKey(item.ID))
 | 
				
			||||||
 | 
					                                {
 | 
				
			||||||
 | 
					                                    dicORGCONN.Add(listTent.First(e => e.DB_CONN_ID == item.ID).ID, conn);
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        foreach (var itemConn in dicORGCONN)
 | 
				
			||||||
 | 
					                        {
 | 
				
			||||||
 | 
					                            using (var context = new MigrationContext(itemConn.Value))
 | 
				
			||||||
 | 
					                            {
 | 
				
			||||||
 | 
					                                entity.ISHEAD = true;
 | 
				
			||||||
 | 
					                                entity.ORG_ID = itemConn.Key;
 | 
				
			||||||
 | 
					                                try
 | 
				
			||||||
 | 
					                                {
 | 
				
			||||||
 | 
					                                    context.AddEntity(entity);
 | 
				
			||||||
 | 
					                                    context.SaveChanges();
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					                                catch
 | 
				
			||||||
 | 
					                                {
 | 
				
			||||||
 | 
					                                    context.UpdateEntity(entity);
 | 
				
			||||||
 | 
					                                    context.SaveChanges();
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch { }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                return true;
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -2642,6 +2642,111 @@ using APT.BaseData.Domain.Entities.T4;
 | 
				
			|||||||
            return WitEntity(null, filter);
 | 
					            return WitEntity(null, filter);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 | 
					     }
 | 
				
			||||||
 | 
						 #endregion
 | 
				
			||||||
 | 
										#region  HomeTitle-首页方针
 | 
				
			||||||
 | 
						 /// <summary>
 | 
				
			||||||
 | 
					    ///  首页方针
 | 
				
			||||||
 | 
					    /// </summary>
 | 
				
			||||||
 | 
						 [Route("api/PF/HomeTitle")]
 | 
				
			||||||
 | 
					     public partial class HomeTitleController : AuthorizeApiController<T_PF_HOME_TITLE>
 | 
				
			||||||
 | 
					     {   
 | 
				
			||||||
 | 
					         /// <summary>
 | 
				
			||||||
 | 
					        /// 查询所有数据
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="filter">过滤实体</param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        [HttpPost, Route("Entities")]
 | 
				
			||||||
 | 
					        public JsonActionResult<IEnumerable<T_PF_HOME_TITLE>> Entities([FromBody]KeywordFilter filter)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return WitEntities(null, filter);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					         /// <summary>
 | 
				
			||||||
 | 
					        /// 排序查询所有数据
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="filter">过滤实体</param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        [HttpPost, Route("OrderEntities")]
 | 
				
			||||||
 | 
					        public JsonActionResult<IEnumerable<T_PF_HOME_TITLE>> OrderEntities([FromBody]KeywordFilter filter)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return WitOrderEntities(null, filter);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					         /// <summary>
 | 
				
			||||||
 | 
					        /// 分页查询数据
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="pageFilter">分页过滤实体</param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        [HttpPost, Route("Paged")]
 | 
				
			||||||
 | 
					        public PagedActionResult<T_PF_HOME_TITLE> Paged([FromBody]KeywordPageFilter pageFilter)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return WitPaged(null, pageFilter);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 排序分页查询数据
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="pageFilter">分页过滤实体</param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        [HttpPost, Route("OrderPaged")]
 | 
				
			||||||
 | 
					        public PagedActionResult<T_PF_HOME_TITLE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return WitOrderPaged(null, pageFilter);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 根据主键删除数据
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="id">主键ID</param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        [HttpGet, Route("Delete")]
 | 
				
			||||||
 | 
					        public JsonActionResult<bool> Delete(string id)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return WitRealDelete(id);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 更新或新增数据
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="entity">对象实体</param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        [HttpPost, Route("Update")]
 | 
				
			||||||
 | 
					        public JsonActionResult<bool> Update([FromBody]T_PF_HOME_TITLE entity)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return WitUpdate(entity);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 批量更新
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="entity">对象实体</param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        [HttpPost, Route("BatchUpdate")]
 | 
				
			||||||
 | 
					        public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_PF_HOME_TITLE> entity)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					              return WitBantchUpdate(entity?.Data);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 批量删除数据
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="ids">id字符串(id用逗号分隔)</param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        [HttpGet, Route("BatchDelete")]
 | 
				
			||||||
 | 
					        public JsonActionResult<bool> BatchDelete(string ids)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return WitRealBatchDelete(ids);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 获得单条实体数据
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="filter">过滤实体</param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        [HttpPost, Route("Get")]
 | 
				
			||||||
 | 
					        public JsonActionResult<T_PF_HOME_TITLE> Get([FromBody] KeywordFilter filter)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return WitEntity(null, filter);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
	 #endregion
 | 
						 #endregion
 | 
				
			||||||
					#region  MqttConfig-MQTT配置表
 | 
										#region  MqttConfig-MQTT配置表
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user