Err String --> clock and AutoExtension sprated js - completed CustomizeChekout publish

This commit is contained in:
SamSys
2025-01-04 22:42:40 +03:30
parent 3a866a6a6d
commit 332d076cd5
41 changed files with 16556 additions and 11809 deletions

View File

@@ -10,5 +10,6 @@ public class GroupedRollCalls
public DateTime CreationDate { get; set; }
public bool HasFriday { get; set; }
public List<ShiftList> ShiftList { get; set; }
public TimeSpan BreakTime { get; set; }
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,360 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CompanyManagment.EFCore.Migrations
{
/// <inheritdoc />
public partial class CoustomizeChekout_And_temporary : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "DateOfBirth",
table: "CustomizeCheckouts",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "EmployeeFName",
table: "CustomizeCheckouts",
type: "nvarchar(100)",
maxLength: 100,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "EmployeeLName",
table: "CustomizeCheckouts",
type: "nvarchar(100)",
maxLength: 100,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "NationalCode",
table: "CustomizeCheckouts",
type: "nvarchar(10)",
maxLength: 10,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "WorkshopFullName",
table: "CustomizeCheckouts",
type: "nvarchar(255)",
maxLength: 255,
nullable: true);
migrationBuilder.CreateTable(
name: "CustomizeCheckoutFine",
columns: table => new
{
CustomizeCheckoutid = table.Column<long>(type: "bigint", nullable: false),
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Title = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
Amount = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
FineDateFa = table.Column<string>(type: "nvarchar(12)", maxLength: 12, nullable: true),
FineDateGr = table.Column<DateTime>(type: "datetime2", nullable: false),
IsActive = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: false),
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckoutFine", x => new { x.CustomizeCheckoutid, x.Id });
table.ForeignKey(
name: "FK_CustomizeCheckoutFine_CustomizeCheckouts_CustomizeCheckoutid",
column: x => x.CustomizeCheckoutid,
principalTable: "CustomizeCheckouts",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CustomizeCheckoutLoanInstallments",
columns: table => new
{
CustomizeCheckoutid = table.Column<long>(type: "bigint", nullable: false),
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
AmountForMonth = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: true),
Month = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true),
Year = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: true),
IsActive = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckoutLoanInstallments", x => new { x.CustomizeCheckoutid, x.Id });
table.ForeignKey(
name: "FK_CustomizeCheckoutLoanInstallments_CustomizeCheckouts_CustomizeCheckoutid",
column: x => x.CustomizeCheckoutid,
principalTable: "CustomizeCheckouts",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CustomizeCheckoutReward",
columns: table => new
{
CustomizeCheckoutid = table.Column<long>(type: "bigint", nullable: false),
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Amount = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: true),
Description = table.Column<string>(type: "ntext", nullable: true),
GrantDate = table.Column<DateTime>(type: "datetime2", nullable: false),
GrantDateFa = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: true),
IsActive = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckoutReward", x => new { x.CustomizeCheckoutid, x.Id });
table.ForeignKey(
name: "FK_CustomizeCheckoutReward_CustomizeCheckouts_CustomizeCheckoutid",
column: x => x.CustomizeCheckoutid,
principalTable: "CustomizeCheckouts",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CustomizeCheckoutSalaryAid",
columns: table => new
{
CustomizeCheckoutid = table.Column<long>(type: "bigint", nullable: false),
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Amount = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: true),
SalaryAidDateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
SalaryAidDateTimeFa = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckoutSalaryAid", x => new { x.CustomizeCheckoutid, x.Id });
table.ForeignKey(
name: "FK_CustomizeCheckoutSalaryAid_CustomizeCheckouts_CustomizeCheckoutid",
column: x => x.CustomizeCheckoutid,
principalTable: "CustomizeCheckouts",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CustomizeCheckoutTemps",
columns: table => new
{
id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
EmployeeFName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
EmployeeLName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
DateOfBirth = table.Column<DateTime>(type: "datetime2", nullable: false),
NationalCode = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
WorkshopFullName = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
EmployeeId = table.Column<long>(type: "bigint", nullable: false),
WorkshopId = table.Column<long>(type: "bigint", nullable: false),
ContractId = table.Column<long>(type: "bigint", nullable: true),
ContractNo = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
YearInt = table.Column<int>(type: "int", nullable: false),
MonthInt = table.Column<int>(type: "int", nullable: false),
MonthlySalary = table.Column<double>(type: "float", nullable: false),
ContractStart = table.Column<DateTime>(type: "datetime2", nullable: false),
ContractEnd = table.Column<DateTime>(type: "datetime2", nullable: false),
FridayPay = table.Column<double>(type: "float", nullable: false),
OverTimePay = table.Column<double>(type: "float", nullable: false),
BaseYearsPay = table.Column<double>(type: "float", nullable: false),
BonusesPay = table.Column<double>(type: "float", nullable: false),
NightWorkPay = table.Column<double>(type: "float", nullable: false),
MarriedAllowance = table.Column<double>(type: "float", nullable: false),
ShiftPay = table.Column<double>(type: "float", nullable: false),
FamilyAllowance = table.Column<double>(type: "float", nullable: false),
LeavePay = table.Column<double>(type: "float", nullable: false),
InsuranceDeduction = table.Column<double>(type: "float", nullable: false),
FineAbsenceDeduction = table.Column<double>(type: "float", nullable: false),
LateToWorkDeduction = table.Column<double>(type: "float", nullable: false),
EarlyExitDeduction = table.Column<double>(type: "float", nullable: false),
RewardPay = table.Column<double>(type: "float", nullable: false),
SalaryAidDeduction = table.Column<double>(type: "float", nullable: false),
InstallmentDeduction = table.Column<double>(type: "float", nullable: false),
FineDeduction = table.Column<double>(type: "float", nullable: false),
TaxDeduction = table.Column<double>(type: "float", nullable: false),
SumOfWorkingDays = table.Column<string>(type: "nvarchar(max)", nullable: true),
TotalClaims = table.Column<string>(type: "nvarchar(max)", nullable: true),
TotalDeductions = table.Column<string>(type: "nvarchar(max)", nullable: true),
TotalPayment = table.Column<double>(type: "float", nullable: false),
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckoutTemps", x => x.id);
table.ForeignKey(
name: "FK_CustomizeCheckoutTemps_Employees_EmployeeId",
column: x => x.EmployeeId,
principalTable: "Employees",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_CustomizeCheckoutTemps_Workshops_WorkshopId",
column: x => x.WorkshopId,
principalTable: "Workshops",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CustomizeCheckoutTempFine",
columns: table => new
{
CustomizeCheckoutTempid = table.Column<long>(type: "bigint", nullable: false),
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Title = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
Amount = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
FineDateFa = table.Column<string>(type: "nvarchar(12)", maxLength: 12, nullable: true),
FineDateGr = table.Column<DateTime>(type: "datetime2", nullable: false),
IsActive = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: false),
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckoutTempFine", x => new { x.CustomizeCheckoutTempid, x.Id });
table.ForeignKey(
name: "FK_CustomizeCheckoutTempFine_CustomizeCheckoutTemps_CustomizeCheckoutTempid",
column: x => x.CustomizeCheckoutTempid,
principalTable: "CustomizeCheckoutTemps",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CustomizeCheckoutTempLoanInstallments",
columns: table => new
{
CustomizeCheckoutTempid = table.Column<long>(type: "bigint", nullable: false),
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
AmountForMonth = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: true),
Month = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true),
Year = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: true),
IsActive = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckoutTempLoanInstallments", x => new { x.CustomizeCheckoutTempid, x.Id });
table.ForeignKey(
name: "FK_CustomizeCheckoutTempLoanInstallments_CustomizeCheckoutTemps_CustomizeCheckoutTempid",
column: x => x.CustomizeCheckoutTempid,
principalTable: "CustomizeCheckoutTemps",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CustomizeCheckoutTempReward",
columns: table => new
{
CustomizeCheckoutTempid = table.Column<long>(type: "bigint", nullable: false),
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Amount = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: true),
Description = table.Column<string>(type: "ntext", nullable: true),
GrantDate = table.Column<DateTime>(type: "datetime2", nullable: false),
GrantDateFa = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: true),
IsActive = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckoutTempReward", x => new { x.CustomizeCheckoutTempid, x.Id });
table.ForeignKey(
name: "FK_CustomizeCheckoutTempReward_CustomizeCheckoutTemps_CustomizeCheckoutTempid",
column: x => x.CustomizeCheckoutTempid,
principalTable: "CustomizeCheckoutTemps",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CustomizeCheckoutTempSalaryAid",
columns: table => new
{
CustomizeCheckoutTempid = table.Column<long>(type: "bigint", nullable: false),
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Amount = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: true),
SalaryAidDateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
SalaryAidDateTimeFa = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckoutTempSalaryAid", x => new { x.CustomizeCheckoutTempid, x.Id });
table.ForeignKey(
name: "FK_CustomizeCheckoutTempSalaryAid_CustomizeCheckoutTemps_CustomizeCheckoutTempid",
column: x => x.CustomizeCheckoutTempid,
principalTable: "CustomizeCheckoutTemps",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_CustomizeCheckoutTemps_EmployeeId",
table: "CustomizeCheckoutTemps",
column: "EmployeeId");
migrationBuilder.CreateIndex(
name: "IX_CustomizeCheckoutTemps_WorkshopId",
table: "CustomizeCheckoutTemps",
column: "WorkshopId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CustomizeCheckoutFine");
migrationBuilder.DropTable(
name: "CustomizeCheckoutLoanInstallments");
migrationBuilder.DropTable(
name: "CustomizeCheckoutReward");
migrationBuilder.DropTable(
name: "CustomizeCheckoutSalaryAid");
migrationBuilder.DropTable(
name: "CustomizeCheckoutTempFine");
migrationBuilder.DropTable(
name: "CustomizeCheckoutTempLoanInstallments");
migrationBuilder.DropTable(
name: "CustomizeCheckoutTempReward");
migrationBuilder.DropTable(
name: "CustomizeCheckoutTempSalaryAid");
migrationBuilder.DropTable(
name: "CustomizeCheckoutTemps");
migrationBuilder.DropColumn(
name: "DateOfBirth",
table: "CustomizeCheckouts");
migrationBuilder.DropColumn(
name: "EmployeeFName",
table: "CustomizeCheckouts");
migrationBuilder.DropColumn(
name: "EmployeeLName",
table: "CustomizeCheckouts");
migrationBuilder.DropColumn(
name: "NationalCode",
table: "CustomizeCheckouts");
migrationBuilder.DropColumn(
name: "WorkshopFullName",
table: "CustomizeCheckouts");
}
}
}

View File

@@ -872,12 +872,23 @@ namespace CompanyManagment.EFCore.Migrations
b.Property<DateTime>("CreationDate")
.HasColumnType("datetime2");
b.Property<DateTime>("DateOfBirth")
.HasColumnType("datetime2");
b.Property<double>("EarlyExitDeduction")
.HasColumnType("float");
b.Property<string>("EmployeeFName")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<long>("EmployeeId")
.HasColumnType("bigint");
b.Property<string>("EmployeeLName")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<double>("FamilyAllowance")
.HasColumnType("float");
@@ -911,6 +922,10 @@ namespace CompanyManagment.EFCore.Migrations
b.Property<double>("MonthlySalary")
.HasColumnType("float");
b.Property<string>("NationalCode")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<double>("NightWorkPay")
.HasColumnType("float");
@@ -941,6 +956,10 @@ namespace CompanyManagment.EFCore.Migrations
b.Property<double>("TotalPayment")
.HasColumnType("float");
b.Property<string>("WorkshopFullName")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)");
b.Property<long>("WorkshopId")
.HasColumnType("bigint");
@@ -956,6 +975,139 @@ namespace CompanyManagment.EFCore.Migrations
b.ToTable("CustomizeCheckouts", (string)null);
});
modelBuilder.Entity("Company.Domain.CustomizeCheckoutTempAgg.CustomizeCheckoutTemp", b =>
{
b.Property<long>("id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
b.Property<double>("BaseYearsPay")
.HasColumnType("float");
b.Property<double>("BonusesPay")
.HasColumnType("float");
b.Property<DateTime>("ContractEnd")
.HasColumnType("datetime2");
b.Property<long?>("ContractId")
.HasColumnType("bigint");
b.Property<string>("ContractNo")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<DateTime>("ContractStart")
.HasColumnType("datetime2");
b.Property<DateTime>("CreationDate")
.HasColumnType("datetime2");
b.Property<DateTime>("DateOfBirth")
.HasColumnType("datetime2");
b.Property<double>("EarlyExitDeduction")
.HasColumnType("float");
b.Property<string>("EmployeeFName")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<long>("EmployeeId")
.HasColumnType("bigint");
b.Property<string>("EmployeeLName")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<double>("FamilyAllowance")
.HasColumnType("float");
b.Property<double>("FineAbsenceDeduction")
.HasColumnType("float");
b.Property<double>("FineDeduction")
.HasColumnType("float");
b.Property<double>("FridayPay")
.HasColumnType("float");
b.Property<double>("InstallmentDeduction")
.HasColumnType("float");
b.Property<double>("InsuranceDeduction")
.HasColumnType("float");
b.Property<double>("LateToWorkDeduction")
.HasColumnType("float");
b.Property<double>("LeavePay")
.HasColumnType("float");
b.Property<double>("MarriedAllowance")
.HasColumnType("float");
b.Property<int>("MonthInt")
.HasColumnType("int");
b.Property<double>("MonthlySalary")
.HasColumnType("float");
b.Property<string>("NationalCode")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<double>("NightWorkPay")
.HasColumnType("float");
b.Property<double>("OverTimePay")
.HasColumnType("float");
b.Property<double>("RewardPay")
.HasColumnType("float");
b.Property<double>("SalaryAidDeduction")
.HasColumnType("float");
b.Property<double>("ShiftPay")
.HasColumnType("float");
b.Property<string>("SumOfWorkingDays")
.HasColumnType("nvarchar(max)");
b.Property<double>("TaxDeduction")
.HasColumnType("float");
b.Property<string>("TotalClaims")
.HasColumnType("nvarchar(max)");
b.Property<string>("TotalDeductions")
.HasColumnType("nvarchar(max)");
b.Property<double>("TotalPayment")
.HasColumnType("float");
b.Property<string>("WorkshopFullName")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)");
b.Property<long>("WorkshopId")
.HasColumnType("bigint");
b.Property<int>("YearInt")
.HasColumnType("int");
b.HasKey("id");
b.HasIndex("EmployeeId");
b.HasIndex("WorkshopId");
b.ToTable("CustomizeCheckoutTemps", (string)null);
});
modelBuilder.Entity("Company.Domain.CustomizeWorkshopEmployeeSettingsAgg.Entities.CustomizeWorkshopEmployeeSettings", b =>
{
b.Property<long>("id")
@@ -5290,6 +5442,333 @@ namespace CompanyManagment.EFCore.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsMany("Company.Domain.CustomizeCheckoutAgg.ValueObjects.CustomizeCheckoutFine", "CheckoutFines", b1 =>
{
b1.Property<long>("CustomizeCheckoutid")
.HasColumnType("bigint");
b1.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<int>("Id"));
b1.Property<string>("Amount")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b1.Property<DateTime>("CreationDate")
.HasColumnType("datetime2");
b1.Property<string>("FineDateFa")
.HasMaxLength(12)
.HasColumnType("nvarchar(12)");
b1.Property<DateTime>("FineDateGr")
.HasColumnType("datetime2");
b1.Property<string>("IsActive")
.IsRequired()
.HasMaxLength(1)
.HasColumnType("nvarchar(1)");
b1.Property<string>("Title")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)");
b1.HasKey("CustomizeCheckoutid", "Id");
b1.ToTable("CustomizeCheckoutFine");
b1.WithOwner()
.HasForeignKey("CustomizeCheckoutid");
});
b.OwnsMany("Company.Domain.CustomizeCheckoutAgg.ValueObjects.CustomizeCheckoutLoanInstallments", "CustomizeCheckoutLoanInstallments", b1 =>
{
b1.Property<long>("CustomizeCheckoutid")
.HasColumnType("bigint");
b1.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<int>("Id"));
b1.Property<string>("AmountForMonth")
.HasMaxLength(25)
.HasColumnType("nvarchar(25)");
b1.Property<string>("IsActive")
.IsRequired()
.HasMaxLength(1)
.HasColumnType("nvarchar(1)");
b1.Property<string>("Month")
.HasMaxLength(2)
.HasColumnType("nvarchar(2)");
b1.Property<string>("Year")
.HasMaxLength(4)
.HasColumnType("nvarchar(4)");
b1.HasKey("CustomizeCheckoutid", "Id");
b1.ToTable("CustomizeCheckoutLoanInstallments");
b1.WithOwner()
.HasForeignKey("CustomizeCheckoutid");
});
b.OwnsMany("Company.Domain.CustomizeCheckoutAgg.ValueObjects.CustomizeCheckoutReward", "CustomizeCheckoutRewards", b1 =>
{
b1.Property<long>("CustomizeCheckoutid")
.HasColumnType("bigint");
b1.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<int>("Id"));
b1.Property<string>("Amount")
.HasMaxLength(25)
.HasColumnType("nvarchar(25)");
b1.Property<string>("Description")
.HasColumnType("ntext");
b1.Property<DateTime>("GrantDate")
.HasColumnType("datetime2");
b1.Property<string>("GrantDateFa")
.HasMaxLength(15)
.HasColumnType("nvarchar(15)");
b1.Property<string>("IsActive")
.IsRequired()
.HasMaxLength(1)
.HasColumnType("nvarchar(1)");
b1.HasKey("CustomizeCheckoutid", "Id");
b1.ToTable("CustomizeCheckoutReward");
b1.WithOwner()
.HasForeignKey("CustomizeCheckoutid");
});
b.OwnsMany("Company.Domain.CustomizeCheckoutAgg.ValueObjects.CustomizeCheckoutSalaryAid", "CustomizeCheckoutSalaryAids", b1 =>
{
b1.Property<long>("CustomizeCheckoutid")
.HasColumnType("bigint");
b1.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<int>("Id"));
b1.Property<string>("Amount")
.HasMaxLength(25)
.HasColumnType("nvarchar(25)");
b1.Property<DateTime>("SalaryAidDateTime")
.HasColumnType("datetime2");
b1.Property<string>("SalaryAidDateTimeFa")
.HasMaxLength(15)
.HasColumnType("nvarchar(15)");
b1.HasKey("CustomizeCheckoutid", "Id");
b1.ToTable("CustomizeCheckoutSalaryAid");
b1.WithOwner()
.HasForeignKey("CustomizeCheckoutid");
});
b.Navigation("CheckoutFines");
b.Navigation("CustomizeCheckoutLoanInstallments");
b.Navigation("CustomizeCheckoutRewards");
b.Navigation("CustomizeCheckoutSalaryAids");
b.Navigation("Employee");
b.Navigation("Workshop");
});
modelBuilder.Entity("Company.Domain.CustomizeCheckoutTempAgg.CustomizeCheckoutTemp", b =>
{
b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee")
.WithMany()
.HasForeignKey("EmployeeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop")
.WithMany()
.HasForeignKey("WorkshopId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsMany("Company.Domain.CustomizeCheckoutTempAgg.ValueObjects.CustomizeCheckoutTempFine", "CheckoutFines", b1 =>
{
b1.Property<long>("CustomizeCheckoutTempid")
.HasColumnType("bigint");
b1.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<int>("Id"));
b1.Property<string>("Amount")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b1.Property<DateTime>("CreationDate")
.HasColumnType("datetime2");
b1.Property<string>("FineDateFa")
.HasMaxLength(12)
.HasColumnType("nvarchar(12)");
b1.Property<DateTime>("FineDateGr")
.HasColumnType("datetime2");
b1.Property<string>("IsActive")
.IsRequired()
.HasMaxLength(1)
.HasColumnType("nvarchar(1)");
b1.Property<string>("Title")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)");
b1.HasKey("CustomizeCheckoutTempid", "Id");
b1.ToTable("CustomizeCheckoutTempFine");
b1.WithOwner()
.HasForeignKey("CustomizeCheckoutTempid");
});
b.OwnsMany("Company.Domain.CustomizeCheckoutTempAgg.ValueObjects.CustomizeCheckoutTempLoanInstallments", "CustomizeCheckoutLoanInstallments", b1 =>
{
b1.Property<long>("CustomizeCheckoutTempid")
.HasColumnType("bigint");
b1.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<int>("Id"));
b1.Property<string>("AmountForMonth")
.HasMaxLength(25)
.HasColumnType("nvarchar(25)");
b1.Property<string>("IsActive")
.IsRequired()
.HasMaxLength(1)
.HasColumnType("nvarchar(1)");
b1.Property<string>("Month")
.HasMaxLength(2)
.HasColumnType("nvarchar(2)");
b1.Property<string>("Year")
.HasMaxLength(4)
.HasColumnType("nvarchar(4)");
b1.HasKey("CustomizeCheckoutTempid", "Id");
b1.ToTable("CustomizeCheckoutTempLoanInstallments");
b1.WithOwner()
.HasForeignKey("CustomizeCheckoutTempid");
});
b.OwnsMany("Company.Domain.CustomizeCheckoutTempAgg.ValueObjects.CustomizeCheckoutTempReward", "CustomizeCheckoutRewards", b1 =>
{
b1.Property<long>("CustomizeCheckoutTempid")
.HasColumnType("bigint");
b1.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<int>("Id"));
b1.Property<string>("Amount")
.HasMaxLength(25)
.HasColumnType("nvarchar(25)");
b1.Property<string>("Description")
.HasColumnType("ntext");
b1.Property<DateTime>("GrantDate")
.HasColumnType("datetime2");
b1.Property<string>("GrantDateFa")
.HasMaxLength(15)
.HasColumnType("nvarchar(15)");
b1.Property<string>("IsActive")
.IsRequired()
.HasMaxLength(1)
.HasColumnType("nvarchar(1)");
b1.HasKey("CustomizeCheckoutTempid", "Id");
b1.ToTable("CustomizeCheckoutTempReward");
b1.WithOwner()
.HasForeignKey("CustomizeCheckoutTempid");
});
b.OwnsMany("Company.Domain.CustomizeCheckoutTempAgg.ValueObjects.CustomizeCheckoutTempSalaryAid", "CustomizeCheckoutSalaryAids", b1 =>
{
b1.Property<long>("CustomizeCheckoutTempid")
.HasColumnType("bigint");
b1.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<int>("Id"));
b1.Property<string>("Amount")
.HasMaxLength(25)
.HasColumnType("nvarchar(25)");
b1.Property<DateTime>("SalaryAidDateTime")
.HasColumnType("datetime2");
b1.Property<string>("SalaryAidDateTimeFa")
.HasMaxLength(15)
.HasColumnType("nvarchar(15)");
b1.HasKey("CustomizeCheckoutTempid", "Id");
b1.ToTable("CustomizeCheckoutTempSalaryAid");
b1.WithOwner()
.HasForeignKey("CustomizeCheckoutTempid");
});
b.Navigation("CheckoutFines");
b.Navigation("CustomizeCheckoutLoanInstallments");
b.Navigation("CustomizeCheckoutRewards");
b.Navigation("CustomizeCheckoutSalaryAids");
b.Navigation("Employee");
b.Navigation("Workshop");

View File

@@ -24,6 +24,9 @@ using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
using Microsoft.EntityFrameworkCore;
using Company.Domain.EmployeeAgg;
using CompanyManagment.App.Contracts.Loan;
using CompanyManagment.App.Contracts.Reward;
using CompanyManagment.App.Contracts.SalaryAid;
namespace CompanyManagment.EFCore.Repository;
@@ -924,9 +927,18 @@ CreateWorkingHoursTemp command, long leavId)
string endPersianDate = contractEnd.ToFarsi();
int monthOfCheckout = Convert.ToInt32(endPersianDate.Substring(5, 2));
int yearOfCheckout = Convert.ToInt32(endPersianDate.Substring(0, 4));
//روز هایی که پرسنل موظف بوده کار کند
var mandatoryDays = 0;
TimeSpan contractDuration = contractEnd - contractStart;
var employee = _context.Employees.FirstOrDefault(x => x.id == employeeId);
var personnelCode =
_context.PersonnelCodeSet.FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId)?.PersonnelCode ?? 0;
var contract = _context.Contracts.Where(x => x.WorkshopIds == workshopId && x.EmployeeId == employeeId &&
x.ContractEnd.Date >= contractStart.Date &&
x.ContarctStart.Date <= contractEnd.Date).ToList()?.MaxBy(x => x.ContarctStart);
var totalDays = (int)(contractEnd - contractStart).TotalDays + 1;
mandatoryDays = totalDays;
#endregion
@@ -942,7 +954,8 @@ CreateWorkingHoursTemp command, long leavId)
monthDays = customizeWorkshopSettings.MaxMonthDays == MaxMonthDays.ThirtyDaysForAllMonth
? 30
: firstDayOfMonth.CountMonthDays();
dailyWage = monthySalary / monthDays;
var shiftSettings = customizeWorkshopEmployeeSettings.CustomizeWorkshopEmployeeSettingsShifts;
var employeeShiftsSpans = shiftSettings.Select(x =>
@@ -952,7 +965,7 @@ CreateWorkingHoursTemp command, long leavId)
if (x.EndTime < x.StartTime)
end = end.AddDays(1);
var span = end - start;
return new
return new EmployeeShiftResult
{
Placement = x.Placement,
ShiftSpan = span
@@ -960,28 +973,47 @@ CreateWorkingHoursTemp command, long leavId)
});
var sumOfEmployeeShiftSpan = new TimeSpan(employeeShiftsSpans.Sum(x => x.ShiftSpan.Ticks));
if (customizeWorkshopEmployeeSettings.WorkshopShiftStatus == WorkshopShiftStatus.Irregular)
{
sumOfEmployeeShiftSpan = CalculateIrregularShift(customizeWorkshopEmployeeSettings.IrregularShift);
}
if (customizeWorkshopEmployeeSettings.BreakTime.BreakTimeType == BreakTimeType.WithTime)
{
sumOfEmployeeShiftSpan -= customizeWorkshopEmployeeSettings.BreakTime.BreakTimeValue.ToTimeSpan();
}
#endregion
List<RollCallViewModel> rollCallResult = _context.RollCalls.Where(x =>
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate.Value.Date >= contractStart.Date &&
x.StartDate.Value.Date <= contractEnd.Date && x.EndDate != null).Select(x => new RollCallViewModel()
x.StartDate.Value.Date <= contractEnd.Date && x.EndDate != null)
.Select(x => new RollCallViewModel()
{
StartDate = x.StartDate,
EndDate = x.EndDate,
ShiftSpan = (x.EndDate.Value - x.StartDate.Value),
CreationDate = x.CreationDate,
}).ToList();
List<GroupedRollCalls> groupedRollCall = rollCallResult.GroupBy(x => x.StartDate!.Value.Date).Select(x => new GroupedRollCalls()
{
CreationDate = x.Key,
ShiftList = x.Select(s => new ShiftList() { Start = s.StartDate!.Value, End = s.EndDate!.Value }).ToList(),
HasFriday = x.Any(s => s.StartDate.Value.DayOfWeek == DayOfWeek.Friday || s.EndDate.Value.DayOfWeek == DayOfWeek.Friday),
SumOneDaySpan = new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks)),
SumOneDaySpan = new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks)) - CalculateBreakTime(customizeWorkshopEmployeeSettings.BreakTime,
new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks))),
BreakTime = CalculateBreakTime(customizeWorkshopEmployeeSettings.BreakTime, new TimeSpan(x.Sum(shift => shift.ShiftSpan.Ticks)))
}).ToList();
TimeSpan sumSpans = new TimeSpan(groupedRollCall.Sum(x => x.SumOneDaySpan.Ticks));
numberOfFridays = groupedRollCall.Count(x => x.HasFriday);
@@ -991,12 +1023,13 @@ CreateWorkingHoursTemp command, long leavId)
int contractDays = (int)contractDuration.TotalDays + 1;
//روز های غیبت
int absentsDays = contractDays - numberOfWorkingDay;
int fridays = 0;
int holiday = _context.HolidayItems.Count(x => x.Holidaydate >= contractStart && x.Holidaydate <= contractEnd);
;
for (var gDate = contractStart; gDate <= contractEnd; gDate = gDate.AddDays(1))
{
if (gDate.DayOfWeek == DayOfWeek.Friday)
@@ -1005,15 +1038,42 @@ CreateWorkingHoursTemp command, long leavId)
}
}
if (customizeWorkshopEmployeeSettings.FridayWork != FridayWork.WorkInFriday)
if (customizeWorkshopEmployeeSettings.FridayWork == FridayWork.Default)
{
absentsDays -= fridays;
var fridayWorkingTotalDays = CalculateFridayWorkingTotalDays(rollCallResult);
fridays = fridays - fridayWorkingTotalDays;
mandatoryDays -= fridays;
}
if (customizeWorkshopEmployeeSettings.HolidayWork != HolidayWork.WorkInHolidays)
if (customizeWorkshopEmployeeSettings.HolidayWork == HolidayWork.Default)
{
absentsDays -= holiday;
var groupStartDaysDates = groupedRollCall.Select(x => x.CreationDate.Date).ToList();
var holidayWorkingDays = _context.HolidayItems.Count(x =>
groupStartDaysDates.Any(r => r == x.Holidaydate.Date));
holiday = holiday - holidayWorkingDays;
mandatoryDays -= holiday;
}
TimeSpan absentTimeSpans = new();
if ((mandatoryDays * sumOfEmployeeShiftSpan) > sumSpans)
{
absentTimeSpans = (mandatoryDays * sumOfEmployeeShiftSpan) - sumSpans;
}
if (customizeWorkshopEmployeeSettings.CustomizeWorkshopGroupSettingId == 77)
{
var absentsDays = mandatoryDays - groupedRollCall.Count;
absentTimeSpans = absentsDays > 0 ? absentsDays * sumOfEmployeeShiftSpan : TimeSpan.Zero;
}
dailyWage = monthySalary / monthDays;
var minuteWage = sumOfEmployeeShiftSpan.TotalMinutes == 0 ? 0 : (dailyWage / sumOfEmployeeShiftSpan.TotalMinutes);
// یافتن مرخصی ساعتی
@@ -1055,10 +1115,14 @@ CreateWorkingHoursTemp command, long leavId)
double absentsDeductionAmount = 0;
if (customizeWorkshopEmployeeSettings.LeavePay.LeavePayType != LeavePayType.None)
{
int permittedDays = customizeWorkshopSettings.LeavePermittedDays;
int permittedDays = customizeWorkshopEmployeeSettings.LeavePermittedDays;
double leaveValue = customizeWorkshopEmployeeSettings.LeavePay.Value;
sumSpans = CalculateLeavePay(sumOfEmployeeShiftSpan, absentsDays, permittedDays, monthDays, contractDays, sumSpans
, leaveValue, dailyWage, leaveList, contractStart, contractEnd, out leavePayAmount, out absentsDeductionAmount);
sumSpans = CalculateLeavePay(sumOfEmployeeShiftSpan, absentTimeSpans, permittedDays, monthDays, contractDays, sumSpans
, leaveValue, minuteWage, contractStart, contractEnd, out leavePayAmount, out absentsDeductionAmount);
}
else
{
absentsDeductionAmount = absentTimeSpans.TotalMinutes * minuteWage;
}
@@ -1092,32 +1156,50 @@ CreateWorkingHoursTemp command, long leavId)
#endregion
#region SalaryAidDeduction
double salaryAidDeduction = _context.SalaryAids.Where(x => x.SalaryAidDateTime > contractStart && x.SalaryAidDateTime < contractEnd).Sum(x => x.Amount);
var salaryAidViewModel = _context.SalaryAids
.Where(x => x.SalaryAidDateTime >= contractStart && x.SalaryAidDateTime <= contractEnd && x.EmployeeId == employeeId && x.WorkshopId == workshopId).Select(x => new SalaryAidViewModel()
{
Amount = x.Amount.ToMoney(),
AmountDouble = x.Amount,
SalaryAidDateTimeFa = x.SalaryAidDateTime.ToFarsi(),
SalaryAidDateTimeGe = x.SalaryAidDateTime,
}).ToList();
double salaryAidDeduction = salaryAidViewModel.Sum(x => x.AmountDouble);
#endregion
#region Loan
double loanInstallments = _context.Loans
var loanInstallments = _context.Loans
.Where(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId)
.SelectMany(x => x.LoanInstallments)
.Where(i => i.Month == monthOfCheckout.ToString("00") && i.Year == yearOfCheckout.ToString("0000")).Select(x => x.AmountForMonth).Sum(x => x);
.Where(i => i.InstallmentDate > contractStart && i.InstallmentDate < contractEnd && i.IsActive == IsActive.True)
.Select(x => new LoanInstallmentViewModel()
{
Month = x.Month,
IsActive = x.IsActive,
Amount = x.AmountForMonth.ToMoney(),
Year = x.Year,
AmountDouble = x.AmountForMonth
}).ToList();
double loanDeduction = loanInstallments;
double loanDeduction = loanInstallments.Sum(x => x.AmountDouble);
#endregion
#region Fine
var fineViewModels = _context.Fines.Where(x =>
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.FineDate > contractStart &&
x.FineDate < contractStart && x.IsActive == IsActive.True).Select(x => new EditFineViewModel()
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.FineDate >= contractStart &&
x.FineDate <= contractEnd && x.IsActive == IsActive.True).Select(x => new FineViewModel()
{
IsActive = x.IsActive,
Amount = x.Amount.ToMoney(),
FineDate = x.FineDate.ToFarsi(),
Id = x.id,
Title = x.Title
Title = x.Title,
EmployeeId = x.EmployeeId,
CreationDate = x.CreationDate.ToFarsi()
}).ToList();
double fineDeduction = fineViewModels.Sum(x => x.Amount.MoneyToDouble());
@@ -1130,8 +1212,37 @@ CreateWorkingHoursTemp command, long leavId)
#region Payments
//اضافه کاری
#region OvertimePay
double overtimePayAmount = 0;
overtimePayAmount = CalculateOvertimePay(sumSpans, customizeWorkshopEmployeeSettings.OverTimePay, dailyWage);
TimeSpan overtimeTimeSpan;
if (customizeWorkshopSettings.WorkshopShiftStatus == WorkshopShiftStatus.Regular && customizeWorkshopEmployeeSettings.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
{
TimeOnly employeeOffSet = customizeWorkshopSettings.EndTimeOffSet;
overtimeTimeSpan = CalculateOvertimeTimeSpan(rollCallResult, shiftSettings, employeeOffSet);
}
else if (customizeWorkshopEmployeeSettings.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
{
var date = new DateOnly();
var firstStartShift = new DateTime(date, customizeWorkshopEmployeeSettings.CustomizeWorkshopEmployeeSettingsShifts.MinBy(x => x.Placement).StartTime);
var lastEndShift = new DateTime(date, customizeWorkshopEmployeeSettings.CustomizeWorkshopEmployeeSettingsShifts.MaxBy(x => x.Placement).EndTime);
if (lastEndShift > firstStartShift)
firstStartShift = firstStartShift.AddDays(1);
var offSet = (firstStartShift - lastEndShift).Divide(2);
var employeeOffSet = TimeOnly.FromDateTime(lastEndShift.Add(offSet));
overtimeTimeSpan = CalculateOvertimeTimeSpan(rollCallResult, shiftSettings, employeeOffSet);
}
else
{
var irregularShifts = customizeWorkshopEmployeeSettings.IrregularShift.WorkshopIrregularShifts;
overtimeTimeSpan = CalculateIrregularOverTime(rollCallResult, sumOfEmployeeShiftSpan, irregularShifts, mandatoryDays);
//Todo: fix for irregular and rotating shifts
}
overtimePayAmount = CalculateOvertimePay(overtimeTimeSpan, customizeWorkshopEmployeeSettings.OverTimePay, dailyWage);
if (overtimePayAmount >= absentsDeductionAmount)
{
overtimePayAmount = overtimePayAmount - absentsDeductionAmount;
@@ -1178,23 +1289,27 @@ CreateWorkingHoursTemp command, long leavId)
//شب کاری
#region NightWorkPay
double nightworkPayAmount = 0;
var nightWorks = RotatingShiftCheck(groupedRollCall).Where(x => x.IsNightShift);
if (nightWorks.Any())
List<RotatingShiftViewModel> rotatingResultList = RotatingShiftCheck(groupedRollCall);
// شبکاری
TimeSpan nightWorks = new TimeSpan(rotatingResultList.Sum(x => x.NightWorkSpan.Ticks));
if (nightWorks > new TimeSpan())
{
switch (customizeWorkshopEmployeeSettings.NightWorkPay.NightWorkingType)
{
case NightWorkType.MoneyPerHour:
{
var baseAmount = customizeWorkshopEmployeeSettings.NightWorkPay.Value;
var nightWorkHours = (int)(new TimeSpan(nightWorks.Sum(x => x.NightWorkSpan.Ticks))).TotalHours;
nightworkPayAmount += nightWorkHours * baseAmount;
var nightWorkMinutes = (int)(nightWorks).TotalMinutes;
nightworkPayAmount += nightWorkMinutes * (baseAmount / 60);
break;
}
case NightWorkType.PercentageFromSalary:
{
double multiplier = customizeWorkshopEmployeeSettings.NightWorkPay.Value / 100;
var nightWorkHours = (int)(new TimeSpan(nightWorks.Sum(x => x.NightWorkSpan.Ticks))).TotalHours;
nightworkPayAmount += dailyWage * multiplier * nightWorkHours;
var nightWorkMinutes = (int)(nightWorks).TotalMinutes;
nightworkPayAmount += ((dailyWage * multiplier) / 60) * nightWorkMinutes;
break;
}
@@ -1232,10 +1347,19 @@ CreateWorkingHoursTemp command, long leavId)
#endregion
#region Reward
double rewardPay = _context.Rewards.Where(x =>
x.WorkshopId == workshopId && x.EmployeeId == employeeId && x.CreationDate < contractEnd &&
x.CreationDate > contractStart).Sum(x => x.Amount);
var rewardViewModels = _context.Rewards.Where(x =>
x.WorkshopId == workshopId && x.EmployeeId == employeeId && x.GrantDate <= contractEnd &&
x.GrantDate >= contractStart).Select(x => new RewardViewModel
{
Amount = x.Amount.ToMoney(),
AmountDouble = x.Amount,
Description = x.Description,
GrantDateGr = x.GrantDate,
GrantDateFa = x.GrantDate.ToFarsi(),
IsActive = x.IsActive,
}).ToList();
double rewardPay = rewardViewModels.Sum(x => x.AmountDouble);
#endregion
#region LeavePay
@@ -1312,9 +1436,7 @@ CreateWorkingHoursTemp command, long leavId)
#endregion
#region Test
#region LateToWork & EarlyExit
var lateToWorkEarlyExit = LateToWorkEarlyExit(groupedRollCall, shiftSettings, leaveList);
foreach (var i in lateToWorkEarlyExit)
@@ -1337,16 +1459,15 @@ CreateWorkingHoursTemp command, long leavId)
double earlyExitDeduction = 0;
double lateToWorkDeduction = 0;
//محاسبه مزد روزانه به ازای هر دقیقه
double dailyWagePerMinute =
(customizeWorkshopEmployeeSettings.Salary / monthDays) / sumOfEmployeeShiftSpan.TotalMinutes;
////محاسبه مزد روزانه به ازای هر دقیقه
//double dailyWagePerMinute =
// (customizeWorkshopEmployeeSettings.Salary / monthDays) / sumOfEmployeeShiftSpan.TotalMinutes;
if (customizeWorkshopEmployeeSettings.EarlyExit.EarlyExitType != EarlyExitType.None && earlyExist > new TimeSpan())
{
earlyExitDeduction = customizeWorkshopEmployeeSettings.EarlyExit.EarlyExitType switch
{
EarlyExitType.Default => earlyExist.TotalMinutes * dailyWagePerMinute,
EarlyExitType.Default => earlyExist.TotalMinutes * minuteWage,
EarlyExitType.MoneyPerMinute => earlyExist.TotalMinutes * customizeWorkshopEmployeeSettings.EarlyExit.Value,
@@ -1355,11 +1476,12 @@ CreateWorkingHoursTemp command, long leavId)
}
if (customizeWorkshopEmployeeSettings.LateToWork.LateToWorkType != LateToWorkType.None && lateToWork > new TimeSpan())
{
lateToWorkDeduction = customizeWorkshopEmployeeSettings.LateToWork.LateToWorkType switch
{
LateToWorkType.Default => lateToWork.TotalMinutes * dailyWagePerMinute,
LateToWorkType.Default => lateToWork.TotalMinutes * minuteWage,
LateToWorkType.MoneyPerMinute => lateToWork.TotalMinutes * customizeWorkshopEmployeeSettings.LateToWork.Value,
@@ -1372,15 +1494,15 @@ CreateWorkingHoursTemp command, long leavId)
{
lateToWorkDeduction +=
(from lateToWorkTimeFine in customizeWorkshopEmployeeSettings.LateToWork.LateToWorkTimeFines
let stepFine = lateToWoks.Count(x => x.Spanning.TotalMinutes >= Convert.ToInt32(lateToWorkTimeFine.Minute))
select stepFine * lateToWorkTimeFine.FineMoney).Sum();
let stepFine = lateToWoks.Count(x => x.Spanning.TotalMinutes >= Convert.ToInt32(lateToWorkTimeFine.Minute))
select stepFine * lateToWorkTimeFine.FineMoney).Sum();
}
if (customizeWorkshopEmployeeSettings.EarlyExit.EarlyExitTimeFines.Any())
{
earlyExitDeduction +=
(from earlyExitFine in customizeWorkshopEmployeeSettings.EarlyExit.EarlyExitTimeFines
let stepFine = earlyExits.Count(x => x.Spanning.TotalMinutes >= Convert.ToInt32(earlyExitFine.Minute))
select stepFine * earlyExitFine.FineMoney).Sum();
let stepFine = earlyExits.Count(x => x.Spanning.TotalMinutes >= Convert.ToInt32(earlyExitFine.Minute))
select stepFine * earlyExitFine.FineMoney).Sum();
}
@@ -1410,9 +1532,98 @@ CreateWorkingHoursTemp command, long leavId)
Year = yearOfCheckout,
LateToWorkDeduction = lateToWorkDeduction,
EarlyExitDeduction = earlyExitDeduction,
ShiftPay = 0,
TaxDeduction = 0,
EmployeeId = employeeId,
SumOfWorkingDays = totalDays.ToString(),
ContractNo = contract?.ContractNo ?? "-",
MonthlySalary = dailyWage * mandatoryDays,
PersonnelCode = personnelCode,
FineViewModels = fineViewModels,
InstallmentViewModels = loanInstallments,
SalaryAidViewModels = salaryAidViewModel,
RewardViewModels = rewardViewModels
};
}
private TimeSpan CalculateIrregularOverTime(List<RollCallViewModel> rollCalls, TimeSpan employeeShiftSpan, WorkshopIrregularShifts irregularShifts, int mandatoryDays)
{
var sumOfRollCallTicks = rollCalls.Sum(x => (x.EndDate.Value - x.StartDate.Value).Ticks);
var sumRollCall = new TimeSpan(sumOfRollCallTicks);
var sumOfShift = employeeShiftSpan * mandatoryDays;
if (sumOfShift > sumRollCall)
return TimeSpan.Zero;
return sumRollCall - sumOfShift;
}
public static TimeSpan CalculateIrregularShiftSpans(int totalDays, IrregularShift irregularShift)
{
//مبنای تقسیم که بر اساس جمع مقدار ساعت استراحت و ساعت کاری بدست میاد
double baseDivideTime = 0;
//مقدار ساعت کارکرد در هر شیفت
double workTime = 0;
switch (irregularShift.WorkshopIrregularShifts)
{
case WorkshopIrregularShifts.TwelveThirtySix:
baseDivideTime = 48;
workTime = 12;
break;
case WorkshopIrregularShifts.TwelveTwentyFour:
baseDivideTime = 36;
workTime = 12;
break;
case WorkshopIrregularShifts.TwentyFourFortyEight:
baseDivideTime = 72;
workTime = 24;
break;
case WorkshopIrregularShifts.TwentyFourTwentyFour:
baseDivideTime = 48;
workTime = 24;
break;
}
//کل ساعاتی داخلش ممکنه کار کرده باشه
var workingHour = totalDays * 24;
//مقدار تعداد خالصی که سر شیفت بوده است
int countOfWorking = (int)(workingHour / baseDivideTime);
//باقی مونده تعدادی که سر شیفت بوده است
double fractionalPart = (workingHour / baseDivideTime) - countOfWorking;
//مقدار ساعت خالصی که سر کار بوده است
TimeSpan sumOfEmployeeWorkingHours = TimeSpan.FromHours(countOfWorking * workTime);
//مقدار احتمال سر کار بودن بر حسب باقی مونده تقسیم
var workingTimesDiff = fractionalPart * workTime;
workingTimesDiff = workingTimesDiff >= workTime ? workTime : workingTimesDiff;
//جمع ساعات خالصی و احتمالی
sumOfEmployeeWorkingHours = sumOfEmployeeWorkingHours.Add(TimeSpan.FromHours(workingTimesDiff));
return sumOfEmployeeWorkingHours;
}
public static TimeSpan CalculateIrregularShift(IrregularShift irregularShift)
{
var workingTime = irregularShift.WorkshopIrregularShifts switch
{
WorkshopIrregularShifts.TwelveThirtySix => TimeSpan.FromHours(6),
WorkshopIrregularShifts.TwelveTwentyFour => TimeSpan.FromHours(8),
WorkshopIrregularShifts.TwentyFourFortyEight => TimeSpan.FromHours(8),
WorkshopIrregularShifts.TwentyFourTwentyFour => TimeSpan.FromHours(12),
_ => new TimeSpan()
};
return workingTime;
}
#region CustomizeCheckoutCalculation
@@ -1431,25 +1642,25 @@ CreateWorkingHoursTemp command, long leavId)
}
case (FridayPayType.MoneyPerFridayPerHour):
{
int workedFridaysHours = (int)CalculateFridayWorkingTimeSpan(rollCallResult).TotalHours;
int workedFridaysMinutes = (int)CalculateFridayWorkingTimeSpan(rollCallResult).TotalMinutes;
double baseAmount = customizeWorkshopEmployeeSettings.FridayPay.Value;
fridayPayAmount = baseAmount * workedFridaysHours;
fridayPayAmount = (baseAmount / 60) * workedFridaysMinutes;
break;
}
case (FridayPayType.PercentageFromSalaryPerHour):
{
int workedFridaysHours = (int)CalculateFridayWorkingTimeSpan(rollCallResult).TotalHours;
int workedFridaysMinutes = (int)CalculateFridayWorkingTimeSpan(rollCallResult).TotalMinutes;
double percentageAmount = (customizeWorkshopEmployeeSettings.FridayPay.Value / 100 * dailyWage);
fridayPayAmount = percentageAmount * workedFridaysHours;
fridayPayAmount = (percentageAmount / 60) * workedFridaysMinutes;
break;
}
//case (FridayPayType.ExtraWorking):
// {
// var fridayOvertimeTimeSpan = CalculateFridayWorkingTimeSpanWithoutOvertime(rollCallResult, shiftSettings);
// overtimePayAmount += CalculateOvertimePay(fridayOvertimeTimeSpan, customizeWorkshopEmployeeSettings.OverTimePay, dailyWage);
// return overtimePayAmount;
// break;
// }
// {
// var fridayOvertimeTimeSpan = CalculateFridayWorkingTimeSpanWithoutOvertime(rollCallResult, shiftSettings);
// overtimePayAmount += CalculateOvertimePay(fridayOvertimeTimeSpan, customizeWorkshopEmployeeSettings.OverTimePay, dailyWage);
// return overtimePayAmount;
// break;
// }
default:
break;
}
@@ -1503,38 +1714,12 @@ CreateWorkingHoursTemp command, long leavId)
return insurancePayAmount;
}
public static TimeSpan CalculateLeavePay(TimeSpan sumOfEmployeeShiftSpan, int absentsDays,
public static TimeSpan CalculateLeavePay(TimeSpan sumOfEmployeeShiftSpan, TimeSpan absentsTimeSpan,
int permittedLeaveDay, int monthDays, int contractDays, TimeSpan sumSpans,
double leaveValue, double dailyWage, List<LeaveViewModel> leaveList, DateTime startDate, DateTime endDate, out double leavePayAmount, out double absentsDeduction)
double leaveValue, double minuteWage, DateTime startDate, DateTime endDate, out double leavePayAmount, out double absentsDeduction)
{
#region SumLeaves
var usedLeavesCheckout = new TimeSpan();
foreach (var item in leaveList)
{
var start = new DateTime();
var end = new DateTime();
start = item.StartLeaveGr < startDate ? startDate : item.StartLeaveGr;
end = item.EndLeaveGr > endDate ? endDate : item.EndLeaveGr;
if (item.PaidLeaveType == "روزانه")
{
var leaveSpan = (end - start);
usedLeavesCheckout = usedLeavesCheckout.Add(leaveSpan);
}
else
{
var leavingHourses = TimeSpan.Parse(item.LeaveHourses);
usedLeavesCheckout = usedLeavesCheckout.Add(leavingHourses);
}
}
#endregion
// مقدار ساعت های غیبت
TimeSpan absentsTimeSpan = sumOfEmployeeShiftSpan * absentsDays;
// زمان مجاز مرخصی
@@ -1565,51 +1750,83 @@ CreateWorkingHoursTemp command, long leavId)
//مقدار مبلغ غیبت
absentsDeduction = 0;
if (permittedLeaveTimeSpan >= usedLeavesCheckout)
permittedLeaveTimeSpan = permittedLeaveTimeSpan - usedLeavesCheckout;
else
{
absentsTimeSpan = usedLeavesCheckout - permittedLeaveTimeSpan;
permittedLeaveTimeSpan = new TimeSpan();
}
//#region SumLeaves
//var usedLeavesCheckout = new TimeSpan();
//foreach (var item in leaveList)
//{
// var start = new DateTime();
// var end = new DateTime();
// start = item.StartLeaveGr < startDate ? startDate : item.StartLeaveGr;
// end = item.EndLeaveGr > endDate ? endDate : item.EndLeaveGr;
// if (item.PaidLeaveType == "روزانه")
// {
// var leaveSpan = (end - start);
// usedLeavesCheckout = usedLeavesCheckout.Add(leaveSpan);
// }
// else
// {
// var leavingHourses = TimeSpan.Parse(item.LeaveHourses);
// usedLeavesCheckout = usedLeavesCheckout.Add(leavingHourses);
// }
//}
//#endregion
//if (permittedLeaveTimeSpan >= usedLeavesCheckout)
//{
// permittedLeaveTimeSpan = permittedLeaveTimeSpan - usedLeavesCheckout;
// sumSpans += usedLeavesCheckout;
// usedLeavesCheckout = new TimeSpan();
//}
//else
//{
// sumSpans += permittedLeaveTimeSpan;
// absentsTimeSpan = (absentsTimeSpan - usedLeavesCheckout) - permittedLeaveTimeSpan;
// permittedLeaveTimeSpan = new TimeSpan();
//}
//اگر مقدار مرخصی بیشتر از غیبت یا مساوی باشد
//اگر مقدار مجاز مرخصی بیشتر از غیبت یا مساوی باشد
if (permittedLeaveTimeSpan >= absentsTimeSpan)
{
//محاسبه مقدار باقی مانده مزد مرخصی
absentAndLeaveDifference.Diffrence = absentsTimeSpan - permittedLeaveTimeSpan;
absentAndLeaveDifference.Diffrence = permittedLeaveTimeSpan - absentsTimeSpan;
absentAndLeaveDifference.absentOrLeave = AbsentOrLeave.LeavePay;
//صفر کردن مقدار غیبت
absentsTimeSpan = new TimeSpan(0);
absentsDays = 0;
//برگرداندن ساعت کاری باقی مونده از مزد مرخصی به ساعت کاری
sumSpans += absentAndLeaveDifference.Diffrence;
////برگرداندن ساعت کاری باقی مونده از مزد مرخصی به ساعت کاری
//sumSpans += absentAndLeaveDifference.Diffrence;
//مقدار مزد مرخصی برای هرروز استفاده نشده
double leavePayPerDayWage = (leaveValue * dailyWage);
double leavePayPerDayWage = (leaveValue * (minuteWage * sumOfEmployeeShiftSpan.TotalMinutes));
leavePayAmount = (leavePayPerDayWage / permittedLeaveTimeSpan.TotalHours) * absentAndLeaveDifference.Diffrence.TotalHours;
if (permittedLeaveTimeSpan.TotalHours == 0)
return TimeSpan.Zero;
leavePayAmount = (leavePayPerDayWage / permittedLeaveTimeSpan.TotalMinutes) * absentAndLeaveDifference.Diffrence.TotalMinutes;
}
//اگر مقدار غیبت بیشتر از مرخصی باشد
else
{
//محاسبه مقدار باقی مانده از غیبت
absentAndLeaveDifference.Diffrence = permittedLeaveTimeSpan - absentsTimeSpan;
absentAndLeaveDifference.Diffrence = absentsTimeSpan - permittedLeaveTimeSpan;
absentAndLeaveDifference.absentOrLeave = AbsentOrLeave.AbsentDeduction;
//صفر کردن مقدار مزد مرخصی
permittedLeaveTimeSpan = new TimeSpan(0);
permittedLeaveDay = 0;
//برگرداندن ساعت کاری باقی مونده از مزد مرخصی به ساعت کاری
sumSpans += permittedLeaveTimeSpan;
////برگرداندن ساعت کاری باقی مونده از مزد مرخصی به ساعت کاری
//sumSpans += permittedLeaveTimeSpan;
absentsDeduction = absentsDays * dailyWage;
absentsDeduction = absentsTimeSpan.TotalMinutes * minuteWage;
}
@@ -1762,6 +1979,22 @@ CreateWorkingHoursTemp command, long leavId)
return basePay * underageChildrenCount;
}
//Deprecated
private TimeSpan CalculateOvertimeTimeSpanWithThreshold(List<RollCallViewModel> rollCalls,
ICollection<CustomizeWorkshopEmployeeSettingsShift> shiftSettings, int overtimeThresholdMinutes)
{
var mandatoryTotalTimeSpan = new TimeSpan(shiftSettings.Sum(x => (x.EndTime - x.StartTime).Ticks));
mandatoryTotalTimeSpan += new TimeSpan(0, overtimeThresholdMinutes, 0);
var rollCallsTimeSpans = rollCalls.Select(x => x.EndDate.Value - x.StartDate.Value).Where(x => x > mandatoryTotalTimeSpan).ToList();
var rollCallTotalTimeSpan = new TimeSpan(rollCallsTimeSpans.Sum(x => x.Ticks));
if (rollCallTotalTimeSpan < mandatoryTotalTimeSpan)
return TimeSpan.Zero;
return rollCallTotalTimeSpan - mandatoryTotalTimeSpan;
}
#region سنوات
/// <summary>
@@ -1770,7 +2003,7 @@ CreateWorkingHoursTemp command, long leavId)
/// <param name="monthlySalary">حقوق ماهیانه پرسنل</param>
/// <param name="baseYearsSettings">تنظیمات سنوات</param>
/// <param name="payOnLeave">تنظیم مربوط به پرداخت هنگام ترک کار</param>
private double CalculateYearsPayAmount(long employeeId, long workshopId, double monthlySalary, DateTime contractStart, DateTime contractEnd,
public double CalculateYearsPayAmount(long employeeId, long workshopId, double monthlySalary, DateTime contractStart, DateTime contractEnd,
BaseYearsPay baseYearsSettings, BaseYearsPayInEndOfYear payOnLeave, MaxMonthDays maxMonthDays)
{
double baseYearPayAmount = 0;
@@ -1778,7 +2011,10 @@ CreateWorkingHoursTemp command, long leavId)
var leftWorks = _context.LeftWorkList
.Where(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId &&
x.LeftWorkDate.Date.AddDays(-1) >= contractStart && x.StartWorkDate.Date <= contractEnd);
x.LeftWorkDate.Date.AddDays(-1) >= contractStart && x.StartWorkDate.Date <= contractEnd).ToList();
if (!leftWorks.Any())
return 0;
int daysWorked = (int)new TimeSpan(leftWorks.Select(x => new
{
@@ -1898,7 +2134,8 @@ CreateWorkingHoursTemp command, long leavId)
/// <summary>
/// محاسبه مدت اضافه کاری
/// </summary>
public static TimeSpan CalculateOvertimeTimeSpan(List<RollCallViewModel> rollCalls, ICollection<CustomizeWorkshopEmployeeSettingsShift> shiftSettings)
public static TimeSpan CalculateOvertimeTimeSpan(List<RollCallViewModel> rollCalls,
ICollection<CustomizeWorkshopEmployeeSettingsShift> shiftSettings, TimeOnly employeeOffSet)
{
//for (DateTime offset = start; offset <= end; offset.AddDays(1))
@@ -1916,20 +2153,67 @@ CreateWorkingHoursTemp command, long leavId)
// break;
// }
//}
var groupedRollCalls = rollCalls.GroupBy(x => x.StartDate!.Value.Date);
if (!rollCalls.Any())
return TimeSpan.Zero;
var startRollCall = rollCalls.MinBy(x => x.StartDate!.Value).StartDate!.Value;
var endRollCall = rollCalls.Max(x => x.EndDate)!.Value;
DateTime startDateTime = new DateTime(DateOnly.FromDateTime(startRollCall), employeeOffSet);
DateTime endDateTime = new DateTime(DateOnly.FromDateTime(endRollCall), employeeOffSet);
endDateTime = endDateTime == startDateTime ? endDateTime.AddDays(1) : endDateTime;
var mandatoryPerDayTimeSpan = new TimeSpan(shiftSettings.Sum(x => (x.EndTime - x.StartTime).Ticks));
bool isFirst = true;
var rollCallsTimeSpans = groupedRollCalls.Where(x => x.Sum(y => (y.EndDate!.Value - y.StartDate!.Value).Ticks) > mandatoryPerDayTimeSpan.Ticks)
.Select(x => x.Sum(y => (y.EndDate!.Value - y.StartDate!.Value).Ticks)).ToList();
var sumOfOverTime = TimeSpan.Zero;
var daysCount = rollCallsTimeSpans.Count();
for (var startDateOffset = startDateTime; startDateOffset <= endDateTime; startDateOffset = startDateOffset.AddDays(1))
{
IEnumerable<RollCallViewModel> rollCallViewModels;
var startPeriod = startDateOffset;
var endPeriod = startDateOffset.AddDays(1);
var totalMandatoryTotalTimeSpan = mandatoryPerDayTimeSpan * daysCount;
var rollCallTotalTimeSpan = new TimeSpan(rollCallsTimeSpans.Sum(x => x));
if (rollCallTotalTimeSpan < totalMandatoryTotalTimeSpan)
return TimeSpan.Zero;
return rollCallTotalTimeSpan - totalMandatoryTotalTimeSpan;
if (isFirst)
{
rollCallViewModels = rollCalls
.Where(x => x.StartDate.Value > startPeriod.Date && x.EndDate.Value <= endPeriod);
isFirst = false;
}
else
{
rollCallViewModels = rollCalls
.Where(x => x.StartDate.Value > startPeriod && x.EndDate.Value <= endPeriod);
}
var sum = rollCallViewModels.Sum(x => (x.EndDate.Value - x.StartDate.Value).Ticks);
var rollCallTimeSpan = new TimeSpan(sum);
if (rollCallTimeSpan > mandatoryPerDayTimeSpan)
{
var overTime = rollCallTimeSpan - mandatoryPerDayTimeSpan;
sumOfOverTime = sumOfOverTime.Add(overTime);
}
}
return sumOfOverTime;
//var groupedRollCalls = rollCalls.GroupBy(x => x.StartDate!.Value.Date);
//var rollCallsTimeSpans = groupedRollCalls.Where(x =>
// x.Sum(y => (y.EndDate!.Value - y.StartDate!.Value).Ticks) > mandatoryPerDayTimeSpan.Ticks)
// .Select(x => x.Sum(y => (y.EndDate!.Value - y.StartDate!.Value).Ticks)).ToList();
//var daysCount = rollCallsTimeSpans.Count();
//var totalMandatoryTotalTimeSpan = mandatoryPerDayTimeSpan * daysCount;
//var rollCallTotalTimeSpan = new TimeSpan(rollCallsTimeSpans.Sum(x => x));
//if (rollCallTotalTimeSpan < totalMandatoryTotalTimeSpan)
// return TimeSpan.Zero;
//return rollCallTotalTimeSpan - totalMandatoryTotalTimeSpan;
}
/// <summary>
@@ -1952,17 +2236,17 @@ CreateWorkingHoursTemp command, long leavId)
case OverTimePayType.MoneyPerHour:
{
int totalHours = (int)overtimeTimeSpan.TotalHours;
result = totalHours * baseAmount;
int totalMinutes = (int)overtimeTimeSpan.TotalMinutes;
result = totalMinutes * (baseAmount / 60);
break;
}
case OverTimePayType.PercentagePerHourOfSalary:
{
int totalHours = (int)overtimeTimeSpan.TotalHours;
int totalMinutes = (int)overtimeTimeSpan.TotalMinutes;
double multiplier = overTimePaySettings.Value / 100;
result = dailyWage * totalHours * multiplier;
result = ((dailyWage * multiplier) / 60) * totalMinutes;
break;
}
@@ -1990,7 +2274,7 @@ CreateWorkingHoursTemp command, long leavId)
//var timeSpan = new TimeSpan(preprocessedRollCalls.Sum(x => (x.EndDate.Value - x.StartDate.Value).Ticks));
var extraWorkingTimeSpan = CalculateOvertimeTimeSpan(preprocessedRollCalls, shiftSettings);
var extraWorkingTimeSpan = CalculateOvertimeTimeSpan(preprocessedRollCalls, shiftSettings, new TimeOnly());
var rollCallTimeSpan = CalculateFridayWorkingTimeSpan(preprocessedRollCalls);
if (rollCallTimeSpan <= extraWorkingTimeSpan)
@@ -2056,4 +2340,9 @@ enum AbsentOrLeave
{
LeavePay,
AbsentDeduction
}
internal class EmployeeShiftResult
{
public ShiftPlacement Placement { get; set; }
public TimeSpan ShiftSpan { get; set; }
}

View File

@@ -1,479 +0,0 @@
@page
@model ServiceHost.Areas.Admin.Pages.Company.FaceRecognition.IndexModel
@{
Layout = "Shared/_AdminLayoutCopy";
ViewData["title"] = "حضور غیاب";
<style>
#btnName {
font-size: 64px;
border-radius: 13px;
background-color: #37ad4f;
border-color: #339380;
margin: 7px;
color: #fff;
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.btnAction {
font-size: 64px;
border-radius: 13px;
margin: 7px;
color: #fff;
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
canvas {
position: absolute;
top: 0px;
right: 0px;
<!--display: inline-block;
direction: ltr;
width: 1800px;
height: 1800px;-->
}
.hiddenCanvas {
position: unset;
}
#video {
<!--border: 7px solid #797979;-->
border-radius: 15px;
display: inline-block;
width: 1800px;
height: 1800px;
}
#reAnalyz {
position: fixed;
top: 600px;
/* margin-right: 7px; */
}
@@media only screen and (max-width : 992px) {
<!--
#reAnalyz {
top: 600px;
margin-right: 3px;
}
#waiting {
color: #ffffff;
position: absolute;
top: 600px;
}
#recognizing {
color: #ffffff;
position: absolute;
top: 230px;
} -->
canvas {
position: absolute;
top: 0px;
right: 0px;
<!--display: inline-block;
direction: ltr;
width: 1800px;
height: 1800px;-->
}
}
</style>
}
<div style="display: block; position: relative; width: 4000px; height: 200px; background-color: #888888;">
<div id="reAnalyz" style="position: absolute; top: 70px;z-index: 999 ">
<a id="reloadRec" class="btn btn-primary " style="border-radius: 15px;display: none; right: 40px; position: absolute; font-size: 62px">شروع شناسایی </a>
<a id="notFound" class="btn btn-warning " style="border-radius: 15px;display: none; right: 484px; position: absolute; font-size: 64px"> شناسایی نشد </a>
</div>
<div id="waiting" style=" display: none;position: absolute; top: 100px; right: 40px; color: #ffffff; z-index: 996;font-size: 64px">
<i class="ion-loading-a" style="font-size: 60px"> </i> آماده سازی...
</div>
<div id="recognizing" style="display: none; position: absolute; top: 100px; right: 40px; color: #ffffff; z-index: 997;font-size: 64px">
<i class="ion-loading-a" style="font-size: 60px"> </i> در حال شناسایی...
</div>
<div id="users" style="position: absolute; top: 62px; z-index: 998; right: 40px;">
</div>
</div>
<div id="display" style="display: block;position: relative;width: 1800px; height: 1800px; background-color:#cfdddb;">
<video style="position: absolute; top: 0px;object-fit: cover" id="video" width="1000" height="1000" autoplay></video>
</div>
<div style="display: block; position: relative; width: 1600px; height: 200px;">
<div id="testDistance" dir="ltr">
</div>
</div>
<input type="hidden" asp-for="@Model.filePath" value="@Model.filePath" id="filePath"/>
<input type="hidden" asp-for="@Model.modelPath" value="@Model.modelPath" id="modelPath"/>
@section Script
{
@* <script src="~/weights/face-api.js"></script> *@
@* <script src="@Model.faceApiJs"></script> *@
<script src="~/weights/face-api.js"></script>
<script>
const video = document.getElementById("video");
const waiting = document.getElementById("waiting");
const recognizing = document.getElementById("recognizing");
const reloadRec = document.getElementById("reloadRec");
const notFound = document.getElementById("notFound");
const filePath = document.getElementById("filePath").value;
const modelPath = document.getElementById("modelPath").value;
// let modelsUrl = "https://raw.githubusercontent.com/justadudewhohacks/face-api.js/master/weights/";
const run = async () => {
await Promise.all([
//api
// faceapi.nets.ssdMobilenetv1.loadFromUri(modelsUrl + 'ssd_mobilenetv1_model-weights_manifest.json'),
// faceapi.nets.faceRecognitionNet.loadFromUri(modelsUrl + 'face_recognition_model-weights_manifest.json'),
// faceapi.nets.faceLandmark68Net.loadFromUri(modelsUrl + 'face_landmark_68_model-weights_manifest.json')
//local source
faceapi.nets.ssdMobilenetv1.loadFromUri("\\weights\\"),
faceapi.nets.faceRecognitionNet.loadFromUri("\\weights\\"),
faceapi.nets.faceLandmark68Net.loadFromUri("\\weights\\")
// faceapi.nets.ssdMobilenetv1.loadFromDisk(modelPath),
// faceapi.nets.faceRecognitionNet.loadFromDisk(modelPath),
// faceapi.nets.faceLandmark68Net.loadFromDisk(modelPath)
]).then(startWebcam);
};
run();
function startWebcam() {
navigator.mediaDevices
.getUserMedia({
video: true,
audio: false,
})
.then((stream) => {
video.srcObject = stream;
waiting.style.display = "block";
})
.catch((error) => {
console.error(error);
});
}
var stop = false;
function getLabeledFaceDescriptions() {
// const labels = ["صادق فرخی", "میلاد مصباح", "وفا پورتوکلی", "صفا پور توکلی"];
const labels = ["2008", "9200", "7371", "9201", "3056", "7164", "1", "41289", "7317", "41604", "42202"];
const workshopId = "11";
return Promise.all(
labels.map(async (label) => {
const descriptions = [];
for (let i = 1; i <= 2; i++) {
const a = `\\Faces\\${workshopId}\\${label}\\${i}.jpg`;
// console.log(a);
const img = await faceapi.fetchImage(a);
const detections = await faceapi.detectSingleFace(img).withFaceLandmarks().withFaceDescriptor();
descriptions.push(detections.descriptor);
}
return new faceapi.LabeledFaceDescriptors(label, descriptions);
})
);
}
var cacheName = [];
var unknown = [];
var endOfRecognition = true;
let display = document.getElementById("display");
var reloadActionControl = false;
// //شناسایی مجدد
// function reset() {
// let oldName = document.getElementById("btnName");
// if (oldName != null) {
// oldName.remove(); // حذف نام قبلی
// }
// endOfRecognition = false; // خاموشی پایان شناسایی
// stop = false; //خاموشی استاپ شناسایی
// recognizing.style.display = "block"; // نمایش آیکون درحال شناسایی
// reloadRec.style.display = "none"; // مخفی شدن دکمه شناسایی مجدد
// cacheName = []; // خالی کردن لیست شناسایی شده ها
// }
reloadRec.addEventListener("click",
function() {
// let oldName = document.getElementById("btnName");
// if (oldName != null) {
// oldName.remove(); // حذف نام قبلی
// }
$('#users').html('');
$('#testDistance').html('');
endOfRecognition = false; // خاموشی پایان شناسایی
stop = false; //خاموشی استاپ شناسایی
recognizing.style.display = "block"; // نمایش آیکون درحال شناسایی
reloadActionControl = true;
reloadRec.style.display = "none"; // مخفی شدن دکمه شناسایی
notFound.style.display = "none"; // مخفی شدن دکمه شناسایی
cacheName = []; // خالی کردن لیست شناسایی شده ها
unknown = [];
});
var interId;
video.addEventListener("play",
async () => {
const labeledFaceDescriptors = await getLabeledFaceDescriptions();
const faceMatcher = new faceapi.FaceMatcher(labeledFaceDescriptors);
const canvas = faceapi.createCanvasFromMedia(video);
display.append(canvas);
const displaySize = { width: video.width, height: video.height };
faceapi.matchDimensions(canvas, displaySize);
interId = setInterval(async () => {
if (!stop) {
waiting.style.display = "none";
if (!reloadActionControl) {
reloadRec.style.display = "block";
}
if (endOfRecognition === false) {
waiting.style.display = "none";
reloadActionControl = true;
recognizing.style.display = "block";
const detections = await faceapi
.detectAllFaces(video)
.withFaceLandmarks()
.withFaceDescriptors();
const resizedDetections = faceapi.resizeResults(detections, displaySize);
canvas.getContext("2d").clearRect(0, 0, canvas.width, canvas.height);
const results = resizedDetections.map((d) => {
return faceMatcher.findBestMatch(d.descriptor);
});
results.forEach((result, i) => {
// reloadRec.style.display = "none";
const box = resizedDetections[i].detection.box;
const drawBox = new faceapi.draw.DrawBox(box,
{
label: "آنالیز چهره",
});
drawBox.draw(canvas);
const userId = result.label;
const userDistance = result.distance;
// console.log(cacheName.length);
if (userId != "unknown" && userDistance <= 0.38) {
cacheName.push(userId);
const res = `[ user : ${result.label} - distance : ${userDistance} ]`;
const testUser = `<h1 style="color:green;">${res}</h1>`;
$('#testDistance').append(testUser);
} else {
const res2 = `[ user : ${result.label} - distance : ${userDistance} ]`;
const testUser = `<h1 style="color:red;">${res2}</h1>`;
$('#testDistance').append(testUser);
unknown.push("unknown");
}
// var t = $('#display').find;
// cacheName.push(userId);
if (cacheName.length > 7) {
recognizing.style.display = "none";
reloadRec.style.display = "none";
// t.addClass('.hiddenCanvas');
getPersonel(result.label);
endOfRecognition = true;
stop = true;
} else if (unknown.length > 30) {
recognizing.style.display = "none";
reloadActionControl = false;
reloadRec.style.display = "block";
endOfRecognition = true;
stop = true;
notFound.style.display = "block";
// t.addClass('.hiddenCanvas');
}
});
}
}
},
100);
});
function getPersonel(employeeId) {
const workshopId = "11";
const users = document.getElementById("users");
const user1 = $('#users');
$.ajax({
async: false,
// contentType: 'application/json',
// dataType: 'data',
type: 'GET',
url: '@Url.Page("./Index", "EmployeeFlag")',
data: { "employeeId": Number(employeeId), "workshopId": Number(workshopId) },
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
success: function(response) {
if (response.flag > 0) {
const e = document.createElement('button');
e.innerHTML = response.employeeName;
e.id = "btnName";
e.className += "btn ";
e.className += "btn-primary";
user1.html('');
const out = `<button type="button" id="out" class="btn btn-warning btnAction" onclick="out(${response.flag})">ثبت خروج</button>`;
users.append(e);
user1.append(out);
} else {
const e = document.createElement('button');
e.innerHTML = response.employeeName;
e.id = "btnName";
e.className += "btn ";
e.className += "btn-primary";
const incom = `<button type="button" id="incom" class="btn btn-info btnAction" onclick="inCom(${employeeId})">ثبت ورود</button>`;
user1.html('');
users.appendChild(e);
user1.append(incom);
}
},
failure: function(response) {
console.log(5, response);
}
});
}
function out(flagId) {
$.ajax({
async: false,
// contentType: 'application/json',
// dataType: 'data',
type: 'GET',
url: '@Url.Page("./Index", "Out")',
data: { "flagId": Number(flagId) },
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
success: function(response) {
if (response.isSuccess) {
$.Notification.autoHideNotify('success', 'top center', 'پیام سیستم ', "خروج شما ثبت شد");
$('#users').html('');
reloadRec.style.display = "block";
reloadActionControl = false;
} else {
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "خطا در ثبت اطلاعات");
}
},
failure: function(response) {
console.log(5, response);
}
});
}
function inCom(employeeId) {
const workshopId = "11";
$.ajax({
async: false,
// contentType: 'application/json',
// dataType: 'data',
type: 'GET',
url: '@Url.Page("./Index", "InCom")',
data: { "employeeId": Number(employeeId), "workshopId": Number(workshopId) },
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
success: function(response) {
if (response.isSuccess) {
$.Notification.autoHideNotify('success', 'top center', 'پیام سیستم ', "ورود شما ثبت شد");
$('#users').html('');
reloadRec.style.display = "block";
reloadActionControl = false;
} else {
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "خطا در ثبت اطلاعات");
}
},
failure: function(response) {
console.log(5, response);
}
});
}
</script>
}

View File

@@ -1,89 +0,0 @@
using CompanyManagment.App.Contracts.Employee;
using CompanyManagment.App.Contracts.RollCall;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace ServiceHost.Areas.Admin.Pages.Company.FaceRecognition;
public class IndexModel : PageModel
{
private readonly IConfiguration _configuration;
private readonly IEmployeeApplication _employeeApplication;
private readonly IRollCallApplication _rollCallApplication;
private readonly IWebHostEnvironment _webHostEnvironment;
public string filePath = "";
public string modelPath = "";
public IndexModel(IWebHostEnvironment webHostEnvironment, IConfiguration configuration,
IEmployeeApplication employeeApplication, IRollCallApplication rollCallApplication)
{
_webHostEnvironment = webHostEnvironment;
_configuration = configuration;
_employeeApplication = employeeApplication;
_rollCallApplication = rollCallApplication;
}
public void OnGet()
{
var workshopId = 20;
filePath = $"{_webHostEnvironment.ContentRootPath}\\labels\\{workshopId}\\1\\1.png";
;
modelPath = _configuration["faceModels:Faces"];
}
public IActionResult OnGetEmployeeFlag(long employeeId, long workshopId)
{
var employeeName = _employeeApplication.GetDetails(employeeId).EmployeeFullName;
var flagId = _rollCallApplication.Flag(employeeId, workshopId);
return new JsonResult(new
{
employeeName,
flag = flagId
});
}
public IActionResult OnGetOut(long flagId)
{
var res = _rollCallApplication.Edit(flagId);
if (res.IsSuccedded)
return new JsonResult(new
{
isSuccess = true
});
return new JsonResult(new
{
isSuccess = false
});
}
public IActionResult OnGetInCom(long employeeId, long workshopId)
{
var now = DateTime.Now;
var command = new CreateRollCall
{
WorkshopId = workshopId,
EmployeeId = employeeId,
StartDate = now
};
var res = _rollCallApplication.Create(command);
if (res.IsSuccedded)
return new JsonResult(new
{
isSuccess = true
});
return new JsonResult(new
{
isSuccess = false
});
}
}
public class ImagesModel
{
public string FullPath { get; set; }
public string FileName { get; set; }
}

View File

@@ -1,199 +0,0 @@
[
{
"weights": [
{
"name": "entry_flow/conv_in/filters",
"shape": [3, 3, 3, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005431825039433498, "min": -0.7441600304023892 }
}, { "name": "entry_flow/conv_in/bias", "shape": [32], "dtype": "float32" },
{
"name": "entry_flow/reduction_block_0/separable_conv0/depthwise_filter",
"shape": [3, 3, 32, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005691980614381678, "min": -0.6090419257388395 }
},
{
"name": "entry_flow/reduction_block_0/separable_conv0/pointwise_filter",
"shape": [1, 1, 32, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.009089225881239947, "min": -1.1179747833925135 }
}, { "name": "entry_flow/reduction_block_0/separable_conv0/bias", "shape": [64], "dtype": "float32" },
{
"name": "entry_flow/reduction_block_0/separable_conv1/depthwise_filter",
"shape": [3, 3, 64, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00683894624897078, "min": -0.8138346036275228 }
},
{
"name": "entry_flow/reduction_block_0/separable_conv1/pointwise_filter",
"shape": [1, 1, 64, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.011632566358528886, "min": -1.3028474321552352 }
}, { "name": "entry_flow/reduction_block_0/separable_conv1/bias", "shape": [64], "dtype": "float32" },
{
"name": "entry_flow/reduction_block_0/expansion_conv/filters",
"shape": [1, 1, 32, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010254812240600587, "min": -0.9229331016540528 }
}, { "name": "entry_flow/reduction_block_0/expansion_conv/bias", "shape": [64], "dtype": "float32" },
{
"name": "entry_flow/reduction_block_1/separable_conv0/depthwise_filter",
"shape": [3, 3, 64, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0052509616403018725, "min": -0.6406173201168285 }
},
{
"name": "entry_flow/reduction_block_1/separable_conv0/pointwise_filter",
"shape": [1, 1, 64, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010788509424994973, "min": -1.4564487723743214 }
}, { "name": "entry_flow/reduction_block_1/separable_conv0/bias", "shape": [128], "dtype": "float32" },
{
"name": "entry_flow/reduction_block_1/separable_conv1/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00553213918910307, "min": -0.7025816770160899 }
},
{
"name": "entry_flow/reduction_block_1/separable_conv1/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.013602388606351965, "min": -1.6186842441558837 }
}, { "name": "entry_flow/reduction_block_1/separable_conv1/bias", "shape": [128], "dtype": "float32" },
{
"name": "entry_flow/reduction_block_1/expansion_conv/filters",
"shape": [1, 1, 64, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.007571851038465313, "min": -1.158493208885193 }
}, { "name": "entry_flow/reduction_block_1/expansion_conv/bias", "shape": [128], "dtype": "float32" },
{
"name": "middle_flow/main_block_0/separable_conv0/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005766328409606335, "min": -0.6688940955143349 }
},
{
"name": "middle_flow/main_block_0/separable_conv0/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.012136116214826995, "min": -1.5776951079275094 }
}, { "name": "middle_flow/main_block_0/separable_conv0/bias", "shape": [128], "dtype": "float32" },
{
"name": "middle_flow/main_block_0/separable_conv1/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.004314773222979377, "min": -0.5652352922102984 }
},
{
"name": "middle_flow/main_block_0/separable_conv1/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.01107162026798024, "min": -1.2400214700137868 }
}, { "name": "middle_flow/main_block_0/separable_conv1/bias", "shape": [128], "dtype": "float32" },
{
"name": "middle_flow/main_block_0/separable_conv2/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0036451735917259667, "min": -0.4848080876995536 }
},
{
"name": "middle_flow/main_block_0/separable_conv2/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.008791744942758598, "min": -1.134135097615859 }
}, { "name": "middle_flow/main_block_0/separable_conv2/bias", "shape": [128], "dtype": "float32" },
{
"name": "middle_flow/main_block_1/separable_conv0/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.004915751896652521, "min": -0.6095532351849126 }
},
{
"name": "middle_flow/main_block_1/separable_conv0/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010868691463096469, "min": -1.3368490499608656 }
}, { "name": "middle_flow/main_block_1/separable_conv0/bias", "shape": [128], "dtype": "float32" },
{
"name": "middle_flow/main_block_1/separable_conv1/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005010117269029804, "min": -0.6012140722835765 }
},
{
"name": "middle_flow/main_block_1/separable_conv1/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010311148213405235, "min": -1.3816938605963016 }
}, { "name": "middle_flow/main_block_1/separable_conv1/bias", "shape": [128], "dtype": "float32" },
{
"name": "middle_flow/main_block_1/separable_conv2/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.004911523706772748, "min": -0.7367285560159123 }
},
{
"name": "middle_flow/main_block_1/separable_conv2/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.008976466047997568, "min": -1.2207993825276693 }
}, { "name": "middle_flow/main_block_1/separable_conv2/bias", "shape": [128], "dtype": "float32" },
{
"name": "exit_flow/reduction_block/separable_conv0/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005074804436926748, "min": -0.7104726211697447 }
},
{
"name": "exit_flow/reduction_block/separable_conv0/pointwise_filter",
"shape": [1, 1, 128, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.011453078307357489, "min": -1.4545409450344011 }
}, { "name": "exit_flow/reduction_block/separable_conv0/bias", "shape": [256], "dtype": "float32" },
{
"name": "exit_flow/reduction_block/separable_conv1/depthwise_filter",
"shape": [3, 3, 256, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.007741751390344957, "min": -1.1380374543807086 }
},
{
"name": "exit_flow/reduction_block/separable_conv1/pointwise_filter",
"shape": [1, 1, 256, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.011347713189966538, "min": -1.497898141075583 }
}, { "name": "exit_flow/reduction_block/separable_conv1/bias", "shape": [256], "dtype": "float32" },
{
"name": "exit_flow/reduction_block/expansion_conv/filters",
"shape": [1, 1, 128, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006717281014311547, "min": -0.8329428457746318 }
}, { "name": "exit_flow/reduction_block/expansion_conv/bias", "shape": [256], "dtype": "float32" },
{
"name": "exit_flow/separable_conv/depthwise_filter",
"shape": [3, 3, 256, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0027201742518181892, "min": -0.3237007359663645 }
},
{
"name": "exit_flow/separable_conv/pointwise_filter",
"shape": [1, 1, 256, 512],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010076364348916447, "min": -1.330080094056971 }
}, { "name": "exit_flow/separable_conv/bias", "shape": [512], "dtype": "float32" },
{
"name": "fc/age/weights",
"shape": [512, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.008674054987290326, "min": -1.2664120281443876 }
}, { "name": "fc/age/bias", "shape": [1], "dtype": "float32" },
{
"name": "fc/gender/weights",
"shape": [512, 2],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0029948226377075793, "min": -0.34140978069866407 }
}, { "name": "fc/gender/bias", "shape": [2], "dtype": "float32" }
],
"paths": ["age_gender_model-shard1"]
}
]

View File

@@ -1,199 +0,0 @@
[
{
"weights": [
{
"name": "dense0/conv0/filters",
"shape": [3, 3, 3, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0057930146946626555, "min": -0.7125408074435067 }
}, { "name": "dense0/conv0/bias", "shape": [32], "dtype": "float32" },
{
"name": "dense0/conv1/depthwise_filter",
"shape": [3, 3, 32, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006473719839956246, "min": -0.6408982641556684 }
},
{
"name": "dense0/conv1/pointwise_filter",
"shape": [1, 1, 32, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010509579321917366, "min": -1.408283629136927 }
}, { "name": "dense0/conv1/bias", "shape": [32], "dtype": "float32" },
{
"name": "dense0/conv2/depthwise_filter",
"shape": [3, 3, 32, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005666389652326995, "min": -0.7252978754978554 }
},
{
"name": "dense0/conv2/pointwise_filter",
"shape": [1, 1, 32, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010316079270605948, "min": -1.1760330368490781 }
}, { "name": "dense0/conv2/bias", "shape": [32], "dtype": "float32" },
{
"name": "dense0/conv3/depthwise_filter",
"shape": [3, 3, 32, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0063220320963392074, "min": -0.853474333005793 }
},
{
"name": "dense0/conv3/pointwise_filter",
"shape": [1, 1, 32, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010322785377502442, "min": -1.4658355236053466 }
}, { "name": "dense0/conv3/bias", "shape": [32], "dtype": "float32" },
{
"name": "dense1/conv0/depthwise_filter",
"shape": [3, 3, 32, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0042531527724920535, "min": -0.5741756242864272 }
},
{
"name": "dense1/conv0/pointwise_filter",
"shape": [1, 1, 32, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010653339647779278, "min": -1.1825207009035 }
}, { "name": "dense1/conv0/bias", "shape": [64], "dtype": "float32" },
{
"name": "dense1/conv1/depthwise_filter",
"shape": [3, 3, 64, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005166931012097527, "min": -0.6355325144879957 }
},
{
"name": "dense1/conv1/pointwise_filter",
"shape": [1, 1, 64, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.011478300188101974, "min": -1.3888743227603388 }
}, { "name": "dense1/conv1/bias", "shape": [64], "dtype": "float32" },
{
"name": "dense1/conv2/depthwise_filter",
"shape": [3, 3, 64, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006144821410085641, "min": -0.8479853545918185 }
},
{
"name": "dense1/conv2/pointwise_filter",
"shape": [1, 1, 64, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010541967317169788, "min": -1.3809977185492421 }
}, { "name": "dense1/conv2/bias", "shape": [64], "dtype": "float32" },
{
"name": "dense1/conv3/depthwise_filter",
"shape": [3, 3, 64, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005769844849904378, "min": -0.686611537138621 }
},
{
"name": "dense1/conv3/pointwise_filter",
"shape": [1, 1, 64, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010939095534530341, "min": -1.2689350820055196 }
}, { "name": "dense1/conv3/bias", "shape": [64], "dtype": "float32" },
{
"name": "dense2/conv0/depthwise_filter",
"shape": [3, 3, 64, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0037769308277204924, "min": -0.40790852939381317 }
},
{
"name": "dense2/conv0/pointwise_filter",
"shape": [1, 1, 64, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.01188667194516051, "min": -1.4382873053644218 }
}, { "name": "dense2/conv0/bias", "shape": [128], "dtype": "float32" },
{
"name": "dense2/conv1/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006497045825509464, "min": -0.8381189114907208 }
},
{
"name": "dense2/conv1/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.011632198913424622, "min": -1.3377028750438316 }
}, { "name": "dense2/conv1/bias", "shape": [128], "dtype": "float32" },
{
"name": "dense2/conv2/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005947182225246056, "min": -0.7969224181829715 }
},
{
"name": "dense2/conv2/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.011436844339557722, "min": -1.4524792311238306 }
}, { "name": "dense2/conv2/bias", "shape": [128], "dtype": "float32" },
{
"name": "dense2/conv3/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006665432686899222, "min": -0.8998334127313949 }
},
{
"name": "dense2/conv3/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.01283421422920975, "min": -1.642779421338848 }
}, { "name": "dense2/conv3/bias", "shape": [128], "dtype": "float32" },
{
"name": "dense3/conv0/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.004711699953266218, "min": -0.6737730933170692 }
},
{
"name": "dense3/conv0/pointwise_filter",
"shape": [1, 1, 128, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010955964817720302, "min": -1.3914075318504784 }
}, { "name": "dense3/conv0/bias", "shape": [256], "dtype": "float32" },
{
"name": "dense3/conv1/depthwise_filter",
"shape": [3, 3, 256, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00554193468654857, "min": -0.7149095745647656 }
},
{
"name": "dense3/conv1/pointwise_filter",
"shape": [1, 1, 256, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.016790372250126858, "min": -2.484975093018775 }
}, { "name": "dense3/conv1/bias", "shape": [256], "dtype": "float32" },
{
"name": "dense3/conv2/depthwise_filter",
"shape": [3, 3, 256, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006361540626077091, "min": -0.8142772001378676 }
},
{
"name": "dense3/conv2/pointwise_filter",
"shape": [1, 1, 256, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.01777329678628959, "min": -1.7062364914838006 }
}, { "name": "dense3/conv2/bias", "shape": [256], "dtype": "float32" },
{
"name": "dense3/conv3/depthwise_filter",
"shape": [3, 3, 256, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006900275922289082, "min": -0.8625344902861353 }
},
{
"name": "dense3/conv3/pointwise_filter",
"shape": [1, 1, 256, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.015449936717164282, "min": -1.9003422162112067 }
}, { "name": "dense3/conv3/bias", "shape": [256], "dtype": "float32" },
{
"name": "fc/weights",
"shape": [256, 7],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.004834276554631252, "min": -0.7203072066400565 }
}, { "name": "fc/bias", "shape": [7], "dtype": "float32" }
],
"paths": ["face_expression_model-shard1"]
}
]

View File

@@ -1,301 +0,0 @@
[
{
"weights": [
{
"name": "dense0/conv0/filters",
"shape": [3, 3, 3, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.004853619781194949, "min": -0.5872879935245888 }
},
{
"name": "dense0/conv0/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.004396426443960153, "min": -0.7298067896973853 }
},
{
"name": "dense0/conv1/depthwise_filter",
"shape": [3, 3, 32, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00635151559231328, "min": -0.5589333721235686 }
},
{
"name": "dense0/conv1/pointwise_filter",
"shape": [1, 1, 32, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.009354315552057004, "min": -1.2628325995276957 }
},
{
"name": "dense0/conv1/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0029380727048013726, "min": -0.5846764682554731 }
},
{
"name": "dense0/conv2/depthwise_filter",
"shape": [3, 3, 32, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0049374802439820535, "min": -0.6171850304977566 }
},
{
"name": "dense0/conv2/pointwise_filter",
"shape": [1, 1, 32, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.009941946758943446, "min": -1.3421628124573652 }
},
{
"name": "dense0/conv2/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0030300481062309416, "min": -0.5272283704841838 }
},
{
"name": "dense0/conv3/depthwise_filter",
"shape": [3, 3, 32, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005672684837790097, "min": -0.7431217137505026 }
},
{
"name": "dense0/conv3/pointwise_filter",
"shape": [1, 1, 32, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010712201455060173, "min": -1.5639814124387852 }
},
{
"name": "dense0/conv3/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0030966934035806097, "min": -0.3839899820439956 }
},
{
"name": "dense1/conv0/depthwise_filter",
"shape": [3, 3, 32, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0039155554537679636, "min": -0.48161332081345953 }
},
{
"name": "dense1/conv0/pointwise_filter",
"shape": [1, 1, 32, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.01023082966898002, "min": -1.094698774580862 }
},
{
"name": "dense1/conv0/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0027264176630506327, "min": -0.3871513081531898 }
},
{
"name": "dense1/conv1/depthwise_filter",
"shape": [3, 3, 64, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.004583378632863362, "min": -0.5454220573107401 }
},
{
"name": "dense1/conv1/pointwise_filter",
"shape": [1, 1, 64, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00915846403907327, "min": -1.117332612766939 }
},
{
"name": "dense1/conv1/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.003091680419211294, "min": -0.5966943209077797 }
},
{
"name": "dense1/conv2/depthwise_filter",
"shape": [3, 3, 64, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005407439727409214, "min": -0.708374604290607 }
},
{
"name": "dense1/conv2/pointwise_filter",
"shape": [1, 1, 64, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00946493943532308, "min": -1.2399070660273235 }
},
{
"name": "dense1/conv2/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.004409168514550901, "min": -0.9788354102303 }
},
{
"name": "dense1/conv3/depthwise_filter",
"shape": [3, 3, 64, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.004478132958505668, "min": -0.6493292789833219 }
},
{
"name": "dense1/conv3/pointwise_filter",
"shape": [1, 1, 64, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.011063695888893277, "min": -1.2501976354449402 }
},
{
"name": "dense1/conv3/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.003909627596537272, "min": -0.6646366914113363 }
},
{
"name": "dense2/conv0/depthwise_filter",
"shape": [3, 3, 64, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.003213915404151468, "min": -0.3374611174359041 }
},
{
"name": "dense2/conv0/pointwise_filter",
"shape": [1, 1, 64, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010917326048308728, "min": -1.4520043644250609 }
},
{
"name": "dense2/conv0/bias",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.002800439152063108, "min": -0.38085972468058266 }
},
{
"name": "dense2/conv1/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0050568851770139206, "min": -0.6927932692509071 }
},
{
"name": "dense2/conv1/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.01074961213504567, "min": -1.3222022926106174 }
},
{
"name": "dense2/conv1/bias",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0030654204242369708, "min": -0.5487102559384177 }
},
{
"name": "dense2/conv2/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00591809165244009, "min": -0.917304206128214 }
},
{
"name": "dense2/conv2/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.01092823346455892, "min": -1.366029183069865 }
},
{
"name": "dense2/conv2/bias",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.002681120470458386, "min": -0.36463238398234055 }
},
{
"name": "dense2/conv3/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0048311497650894465, "min": -0.5797379718107336 }
},
{
"name": "dense2/conv3/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.011227761062921263, "min": -1.4483811771168429 }
},
{
"name": "dense2/conv3/bias",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0034643323982463162, "min": -0.3360402426298927 }
},
{
"name": "dense3/conv0/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.003394978887894574, "min": -0.49227193874471326 }
},
{
"name": "dense3/conv0/pointwise_filter",
"shape": [1, 1, 128, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010051267287310432, "min": -1.2765109454884247 }
},
{
"name": "dense3/conv0/bias",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.003142924752889895, "min": -0.4588670139219247 }
},
{
"name": "dense3/conv1/depthwise_filter",
"shape": [3, 3, 256, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00448304671867221, "min": -0.5872791201460595 }
},
{
"name": "dense3/conv1/pointwise_filter",
"shape": [1, 1, 256, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.016063522357566685, "min": -2.3613377865623026 }
},
{
"name": "dense3/conv1/bias",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00287135781026354, "min": -0.47664539650374765 }
},
{
"name": "dense3/conv2/depthwise_filter",
"shape": [3, 3, 256, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006002906724518421, "min": -0.7923836876364315 }
},
{
"name": "dense3/conv2/pointwise_filter",
"shape": [1, 1, 256, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.017087187019048954, "min": -1.6061955797906016 }
},
{
"name": "dense3/conv2/bias",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.003124481205846749, "min": -0.46242321846531886 }
},
{
"name": "dense3/conv3/depthwise_filter",
"shape": [3, 3, 256, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006576311588287353, "min": -1.0193282961845398 }
},
{
"name": "dense3/conv3/pointwise_filter",
"shape": [1, 1, 256, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.015590153955945782, "min": -1.99553970636106 }
},
{
"name": "dense3/conv3/bias",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.004453541601405424, "min": -0.6546706154065973 }
},
{
"name": "fc/weights",
"shape": [256, 136],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010417488509533453, "min": -1.500118345372817 }
},
{
"name": "fc/bias",
"shape": [136],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0025084222648658005, "min": 0.07683877646923065 }
}
],
"paths": ["face_landmark_68_model-shard1"]
}
]

View File

@@ -1,175 +0,0 @@
[
{
"weights": [
{
"name": "dense0/conv0/filters",
"shape": [3, 3, 3, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.008194216092427571, "min": -0.9423348506291708 }
},
{
"name": "dense0/conv0/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006839508168837603, "min": -0.8412595047670252 }
},
{
"name": "dense0/conv1/depthwise_filter",
"shape": [3, 3, 32, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.009194007106855804, "min": -1.2779669878529567 }
},
{
"name": "dense0/conv1/pointwise_filter",
"shape": [1, 1, 32, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0036026100317637128, "min": -0.3170296827952067 }
},
{
"name": "dense0/conv1/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.000740380117706224, "min": -0.06367269012273527 }
},
{
"name": "dense0/conv2/depthwise_filter",
"shape": [3, 3, 32, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 1, "min": 0 }
},
{
"name": "dense0/conv2/pointwise_filter",
"shape": [1, 1, 32, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 1, "min": 0 }
},
{
"name": "dense0/conv2/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0037702228508743585, "min": -0.6220867703942692 }
},
{
"name": "dense1/conv0/depthwise_filter",
"shape": [3, 3, 32, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0033707996209462483, "min": -0.421349952618281 }
},
{
"name": "dense1/conv0/pointwise_filter",
"shape": [1, 1, 32, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.014611541991140328, "min": -1.8556658328748217 }
},
{
"name": "dense1/conv0/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.002832523046755323, "min": -0.30307996600281956 }
},
{
"name": "dense1/conv1/depthwise_filter",
"shape": [3, 3, 64, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006593170586754294, "min": -0.6329443763284123 }
},
{
"name": "dense1/conv1/pointwise_filter",
"shape": [1, 1, 64, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.012215249211180444, "min": -1.6001976466646382 }
},
{
"name": "dense1/conv1/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.002384825547536214, "min": -0.3028728445370992 }
},
{
"name": "dense1/conv2/depthwise_filter",
"shape": [3, 3, 64, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005859645441466687, "min": -0.7617539073906693 }
},
{
"name": "dense1/conv2/pointwise_filter",
"shape": [1, 1, 64, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.013121426806730382, "min": -1.7845140457153321 }
},
{
"name": "dense1/conv2/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0032247188044529336, "min": -0.46435950784122243 }
},
{
"name": "dense2/conv0/depthwise_filter",
"shape": [3, 3, 64, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.002659512618008782, "min": -0.32977956463308894 }
},
{
"name": "dense2/conv0/pointwise_filter",
"shape": [1, 1, 64, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.015499923743453681, "min": -1.9839902391620712 }
},
{
"name": "dense2/conv0/bias",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0032450980999890497, "min": -0.522460794098237 }
},
{
"name": "dense2/conv1/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005911862382701799, "min": -0.792189559282041 }
},
{
"name": "dense2/conv1/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.021025861478319356, "min": -2.2077154552235325 }
},
{
"name": "dense2/conv1/bias",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00349616945958605, "min": -0.46149436866535865 }
},
{
"name": "dense2/conv2/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.008104994250278847, "min": -1.013124281284856 }
},
{
"name": "dense2/conv2/pointwise_filter",
"shape": [1, 1, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.029337059282789044, "min": -3.5791212325002633 }
},
{
"name": "dense2/conv2/bias",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0038808938334969913, "min": -0.4230174278511721 }
},
{
"name": "fc/weights",
"shape": [128, 136],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.014016061670639936, "min": -1.8921683255363912 }
},
{
"name": "fc/bias",
"shape": [136],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0029505149698724935, "min": 0.088760145008564 }
}
],
"paths": ["face_landmark_68_tiny_model-shard1"]
}
]

View File

@@ -1,661 +0,0 @@
[
{
"weights": [
{
"name": "conv32_down/conv/filters",
"shape": [7, 7, 3, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0005260649557207145, "min": -0.07101876902229645 }
},
{
"name": "conv32_down/conv/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 8.471445956577858e-7, "min": -0.00014740315964445472 }
},
{
"name": "conv32_down/scale/weights",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.06814416062598135, "min": 5.788674831390381 }
},
{
"name": "conv32_down/scale/biases",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.008471635042452345, "min": -0.931879854669758 }
},
{
"name": "conv32_1/conv1/conv/filters",
"shape": [3, 3, 32, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0007328585666768691, "min": -0.0974701893680236 }
},
{
"name": "conv32_1/conv1/conv/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 1.5952091238361e-8, "min": -0.000001978059313556764 }
},
{
"name": "conv32_1/conv1/scale/weights",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.02146628510718252, "min": 3.1103382110595703 }
},
{
"name": "conv32_1/conv1/scale/biases",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0194976619645661, "min": -2.3787147596770644 }
},
{
"name": "conv32_1/conv2/conv/filters",
"shape": [3, 3, 32, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0004114975824075587, "min": -0.05267169054816751 }
},
{
"name": "conv32_1/conv2/conv/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 4.600177166424806e-9, "min": -5.70421968636676e-7 }
},
{
"name": "conv32_1/conv2/scale/weights",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.03400764932819441, "min": 2.1677730083465576 }
},
{
"name": "conv32_1/conv2/scale/biases",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010974494616190593, "min": -1.240117891629537 }
},
{
"name": "conv32_2/conv1/conv/filters",
"shape": [3, 3, 32, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0005358753251094444, "min": -0.0760942961655411 }
},
{
"name": "conv32_2/conv1/conv/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 5.9886454383719385e-9, "min": -7.366033889197485e-7 }
},
{
"name": "conv32_2/conv1/scale/weights",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.014633869657329485, "min": 2.769575357437134 }
},
{
"name": "conv32_2/conv1/scale/biases",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.022131107367721257, "min": -2.5229462399202234 }
},
{
"name": "conv32_2/conv2/conv/filters",
"shape": [3, 3, 32, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00030145110452876373, "min": -0.03949009469326805 }
},
{
"name": "conv32_2/conv2/conv/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 6.8779549306497095e-9, "min": -9.010120959151119e-7 }
},
{
"name": "conv32_2/conv2/scale/weights",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.03929369870354148, "min": 4.8010945320129395 }
},
{
"name": "conv32_2/conv2/scale/biases",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010553357180427103, "min": -1.2452961472903983 }
},
{
"name": "conv32_3/conv1/conv/filters",
"shape": [3, 3, 32, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0003133527642371608, "min": -0.040735859350830905 }
},
{
"name": "conv32_3/conv1/conv/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 4.1064200719547974e-9, "min": -3.0387508532465503e-7 }
},
{
"name": "conv32_3/conv1/scale/weights",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.009252088210161994, "min": 2.333256721496582 }
},
{
"name": "conv32_3/conv1/scale/biases",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.007104101251153385, "min": -0.34810096130651585 }
},
{
"name": "conv32_3/conv2/conv/filters",
"shape": [3, 3, 32, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00029995629892629733, "min": -0.031195455088334923 }
},
{
"name": "conv32_3/conv2/conv/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 5.62726418316814e-9, "min": -6.921534945296811e-7 }
},
{
"name": "conv32_3/conv2/scale/weights",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0467432975769043, "min": 5.362040996551514 }
},
{
"name": "conv32_3/conv2/scale/biases",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010314425300149357, "min": -1.268674311918371 }
}, { "name": "conv64_down/conv1/conv/filters", "shape": [3, 3, 32, 64], "dtype": "float32" },
{
"name": "conv64_down/conv1/conv/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 8.373908033218849e-10, "min": -1.172347124650639e-7 }
},
{
"name": "conv64_down/conv1/scale/weights",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0066875364266189875, "min": 2.5088400840759277 }
},
{
"name": "conv64_down/conv1/scale/biases",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.01691421620986041, "min": -2.0973628100226906 }
}, { "name": "conv64_down/conv2/conv/filters", "shape": [3, 3, 64, 64], "dtype": "float32" },
{
"name": "conv64_down/conv2/conv/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 2.3252014483766877e-9, "min": -2.673981665633191e-7 }
},
{
"name": "conv64_down/conv2/scale/weights",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.032557439804077146, "min": 2.6351239681243896 }
},
{
"name": "conv64_down/conv2/scale/biases",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.015429047509735706, "min": -1.5429047509735707 }
}, { "name": "conv64_1/conv1/conv/filters", "shape": [3, 3, 64, 64], "dtype": "float32" },
{
"name": "conv64_1/conv1/conv/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 1.1319172039756998e-9, "min": -1.4941307092479238e-7 }
},
{
"name": "conv64_1/conv1/scale/weights",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.007802607031429515, "min": 3.401733160018921 }
},
{
"name": "conv64_1/conv1/scale/biases",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.01425027146058924, "min": -0.6982633015688727 }
}, { "name": "conv64_1/conv2/conv/filters", "shape": [3, 3, 64, 64], "dtype": "float32" },
{
"name": "conv64_1/conv2/conv/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 2.5635019893325435e-9, "min": -2.717312108692496e-7 }
},
{
"name": "conv64_1/conv2/scale/weights",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.04062801716374416, "min": 3.542381525039673 }
},
{
"name": "conv64_1/conv2/scale/biases",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.007973166306813557, "min": -0.7415044665336609 }
}, { "name": "conv64_2/conv1/conv/filters", "shape": [3, 3, 64, 64], "dtype": "float32" },
{
"name": "conv64_2/conv1/conv/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 1.2535732661062331e-9, "min": -1.8302169685151004e-7 }
},
{
"name": "conv64_2/conv1/scale/weights",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005631206549850164, "min": 2.9051668643951416 }
},
{
"name": "conv64_2/conv1/scale/biases",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.01859012585060269, "min": -2.3795361088771445 }
}, { "name": "conv64_2/conv2/conv/filters", "shape": [3, 3, 64, 64], "dtype": "float32" },
{
"name": "conv64_2/conv2/conv/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 2.486726369919351e-9, "min": -3.5311514452854786e-7 }
},
{
"name": "conv64_2/conv2/scale/weights",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.03740917467603497, "min": 5.571568965911865 }
},
{
"name": "conv64_2/conv2/scale/biases",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006418555858088475, "min": -0.5263215803632549 }
}, { "name": "conv64_3/conv1/conv/filters", "shape": [3, 3, 64, 64], "dtype": "float32" },
{
"name": "conv64_3/conv1/conv/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 7.432564576875473e-10, "min": -8.47312361763804e-8 }
},
{
"name": "conv64_3/conv1/scale/weights",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006400122362024644, "min": 2.268010377883911 }
},
{
"name": "conv64_3/conv1/scale/biases",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010945847922680425, "min": -1.3353934465670119 }
}, { "name": "conv64_3/conv2/conv/filters", "shape": [3, 3, 64, 64], "dtype": "float32" },
{
"name": "conv64_3/conv2/conv/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 2.278228722014533e-9, "min": -3.212302498040492e-7 }
},
{
"name": "conv64_3/conv2/scale/weights",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.029840927498013366, "min": 7.038398265838623 }
},
{
"name": "conv64_3/conv2/scale/biases",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.010651412197187834, "min": -1.161003929493474 }
},
{
"name": "conv128_down/conv1/conv/filters",
"shape": [3, 3, 64, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00020040544662989823, "min": -0.022245004575918704 }
},
{
"name": "conv128_down/conv1/conv/bias",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 4.3550543563576545e-10, "min": -4.311503812794078e-8 }
},
{
"name": "conv128_down/conv1/scale/weights",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.007448580685783835, "min": 2.830846071243286 }
},
{
"name": "conv128_down/conv1/scale/biases",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.01211262824488621, "min": -1.6957679542840696 }
},
{
"name": "conv128_down/conv2/conv/filters",
"shape": [3, 3, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00022380277514457702, "min": -0.02484210804104805 }
},
{
"name": "conv128_down/conv2/conv/bias",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 9.031058637304466e-10, "min": -1.1650065642122761e-7 }
},
{
"name": "conv128_down/conv2/scale/weights",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.027663578706629135, "min": 3.1111555099487305 }
},
{
"name": "conv128_down/conv2/scale/biases",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.008878476946961646, "min": -1.029903325847551 }
},
{
"name": "conv128_1/conv1/conv/filters",
"shape": [3, 3, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00022380667574265425, "min": -0.032899581334170175 }
},
{
"name": "conv128_1/conv1/conv/bias",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 4.4147297756478345e-10, "min": -5.253528433020923e-8 }
},
{
"name": "conv128_1/conv1/scale/weights",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.013599334978589825, "min": 3.634530782699585 }
},
{
"name": "conv128_1/conv1/scale/biases",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.014059314073300829, "min": -1.4059314073300828 }
},
{
"name": "conv128_1/conv2/conv/filters",
"shape": [3, 3, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00021715293474057143, "min": -0.02909849325523657 }
},
{
"name": "conv128_1/conv2/conv/bias",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 9.887046963276768e-10, "min": -1.1370104007768284e-7 }
},
{
"name": "conv128_1/conv2/scale/weights",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.029993299409454943, "min": 3.630716562271118 }
},
{
"name": "conv128_1/conv2/scale/biases",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00782704236460667, "min": -0.7200878975438136 }
},
{
"name": "conv128_2/conv1/conv/filters",
"shape": [3, 3, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00017718105923895743, "min": -0.022324813464108636 }
},
{
"name": "conv128_2/conv1/conv/bias",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 3.567012027797675e-10, "min": -5.243507680862582e-8 }
},
{
"name": "conv128_2/conv1/scale/weights",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.007940645778880399, "min": 4.927767753601074 }
},
{
"name": "conv128_2/conv1/scale/biases",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.015933452867994122, "min": -1.5614783810634238 }
},
{
"name": "conv128_2/conv2/conv/filters",
"shape": [3, 3, 128, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0001451439717236687, "min": -0.01712698866339291 }
},
{
"name": "conv128_2/conv2/conv/bias",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 1.0383988570966347e-9, "min": -1.2356946399449953e-7 }
},
{
"name": "conv128_2/conv2/scale/weights",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.02892604528688917, "min": 4.750600814819336 }
},
{
"name": "conv128_2/conv2/scale/biases",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00797275748907351, "min": -0.7414664464838364 }
},
{
"name": "conv256_down/conv1/conv/filters",
"shape": [3, 3, 128, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0002698827827093648, "min": -0.03994265184098599 }
},
{
"name": "conv256_down/conv1/conv/bias",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 5.036909834755123e-10, "min": -6.396875490139006e-8 }
},
{
"name": "conv256_down/conv1/scale/weights",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.014870181738161573, "min": 4.269900798797607 }
},
{
"name": "conv256_down/conv1/scale/biases",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.022031106200872685, "min": -3.1063859743230484 }
},
{
"name": "conv256_down/conv2/conv/filters",
"shape": [3, 3, 256, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00046430734150549946, "min": -0.03946612402796745 }
},
{
"name": "conv256_down/conv2/conv/bias",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 6.693064577513153e-10, "min": -7.630093618364995e-8 }
},
{
"name": "conv256_down/conv2/scale/weights",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.03475512242784687, "min": 3.608360528945923 }
},
{
"name": "conv256_down/conv2/scale/biases",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.01290142021927179, "min": -1.1482263995151893 }
},
{
"name": "conv256_1/conv1/conv/filters",
"shape": [3, 3, 256, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00037147209924810076, "min": -0.04234781931428348 }
},
{
"name": "conv256_1/conv1/conv/bias",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 3.2105515457510146e-10, "min": -3.467395669411096e-8 }
},
{
"name": "conv256_1/conv1/scale/weights",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.043242172166412955, "min": 5.28542947769165 }
},
{
"name": "conv256_1/conv1/scale/biases",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.01643658619300992, "min": -1.3149268954407936 }
},
{
"name": "conv256_1/conv2/conv/filters",
"shape": [3, 3, 256, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0003289232651392619, "min": -0.041773254672686264 }
},
{
"name": "conv256_1/conv2/conv/bias",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 9.13591691187321e-10, "min": -1.2333487831028833e-7 }
},
{
"name": "conv256_1/conv2/scale/weights",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0573908618852204, "min": 4.360693454742432 }
},
{
"name": "conv256_1/conv2/scale/biases",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0164216583850337, "min": -1.3958409627278647 }
},
{
"name": "conv256_2/conv1/conv/filters",
"shape": [3, 3, 256, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00010476927912118389, "min": -0.015610622589056398 }
},
{
"name": "conv256_2/conv1/conv/bias",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 2.418552539068639e-10, "min": -2.539480166022071e-8 }
},
{
"name": "conv256_2/conv1/scale/weights",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.06024209564807368, "min": 6.598613739013672 }
},
{
"name": "conv256_2/conv1/scale/biases",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.01578534350675695, "min": -1.1049740454729864 }
},
{
"name": "conv256_2/conv2/conv/filters",
"shape": [3, 3, 256, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.00005543030908002573, "min": -0.007427661416723448 }
},
{
"name": "conv256_2/conv2/conv/bias",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 1.0822061852320308e-9, "min": -1.515088659324843e-7 }
},
{
"name": "conv256_2/conv2/scale/weights",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.04302893993901272, "min": 2.2855491638183594 }
},
{
"name": "conv256_2/conv2/scale/biases",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006792667566561232, "min": -0.8083274404207865 }
},
{
"name": "conv256_down_out/conv1/conv/filters",
"shape": [3, 3, 256, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.000568966465253456, "min": -0.05632768006009214 }
},
{
"name": "conv256_down_out/conv1/conv/bias",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 4.5347887884881677e-10, "min": -6.530095855422961e-8 }
},
{
"name": "conv256_down_out/conv1/scale/weights",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.017565592597512638, "min": 4.594101905822754 }
},
{
"name": "conv256_down_out/conv1/scale/biases",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.04850864223405427, "min": -6.306123490427055 }
},
{
"name": "conv256_down_out/conv2/conv/filters",
"shape": [3, 3, 256, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0003739110687199761, "min": -0.06954745878191555 }
},
{
"name": "conv256_down_out/conv2/conv/bias",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 1.2668428328152895e-9, "min": -2.2549802424112154e-7 }
},
{
"name": "conv256_down_out/conv2/scale/weights",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.04351314469879749, "min": 4.31956672668457 }
},
{
"name": "conv256_down_out/conv2/scale/biases",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.021499746921015722, "min": -1.2039858275768804 }
},
{
"name": "fc",
"shape": [256, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.000357687911566566, "min": -0.04578405268052045 }
}
],
"paths": ["face_recognition_model-shard1", "face_recognition_model-shard2"]
}
]

View File

@@ -1,57 +0,0 @@
[
{
"paths": ["mtcnn_model-shard1"],
"weights": [
{ "dtype": "float32", "name": "pnet/conv1/weights", "shape": [3, 3, 3, 10] },
{ "dtype": "float32", "name": "pnet/conv1/bias", "shape": [10] },
{ "dtype": "float32", "name": "pnet/prelu1_alpha", "shape": [10] },
{ "dtype": "float32", "name": "pnet/conv2/weights", "shape": [3, 3, 10, 16] },
{ "dtype": "float32", "name": "pnet/conv2/bias", "shape": [16] },
{ "dtype": "float32", "name": "pnet/prelu2_alpha", "shape": [16] },
{ "dtype": "float32", "name": "pnet/conv3/weights", "shape": [3, 3, 16, 32] },
{ "dtype": "float32", "name": "pnet/conv3/bias", "shape": [32] },
{ "dtype": "float32", "name": "pnet/prelu3_alpha", "shape": [32] },
{ "dtype": "float32", "name": "pnet/conv4_1/weights", "shape": [1, 1, 32, 2] },
{ "dtype": "float32", "name": "pnet/conv4_1/bias", "shape": [2] },
{ "dtype": "float32", "name": "pnet/conv4_2/weights", "shape": [1, 1, 32, 4] },
{ "dtype": "float32", "name": "pnet/conv4_2/bias", "shape": [4] },
{ "dtype": "float32", "name": "rnet/conv1/weights", "shape": [3, 3, 3, 28] },
{ "dtype": "float32", "name": "rnet/conv1/bias", "shape": [28] },
{ "dtype": "float32", "name": "rnet/prelu1_alpha", "shape": [28] },
{ "dtype": "float32", "name": "rnet/conv2/weights", "shape": [3, 3, 28, 48] },
{ "dtype": "float32", "name": "rnet/conv2/bias", "shape": [48] },
{ "dtype": "float32", "name": "rnet/prelu2_alpha", "shape": [48] },
{ "dtype": "float32", "name": "rnet/conv3/weights", "shape": [2, 2, 48, 64] },
{ "dtype": "float32", "name": "rnet/conv3/bias", "shape": [64] },
{ "dtype": "float32", "name": "rnet/prelu3_alpha", "shape": [64] },
{ "dtype": "float32", "name": "rnet/fc1/weights", "shape": [576, 128] },
{ "dtype": "float32", "name": "rnet/fc1/bias", "shape": [128] },
{ "dtype": "float32", "name": "rnet/prelu4_alpha", "shape": [128] },
{ "dtype": "float32", "name": "rnet/fc2_1/weights", "shape": [128, 2] },
{ "dtype": "float32", "name": "rnet/fc2_1/bias", "shape": [2] },
{ "dtype": "float32", "name": "rnet/fc2_2/weights", "shape": [128, 4] },
{ "dtype": "float32", "name": "rnet/fc2_2/bias", "shape": [4] },
{ "dtype": "float32", "name": "onet/conv1/weights", "shape": [3, 3, 3, 32] },
{ "dtype": "float32", "name": "onet/conv1/bias", "shape": [32] },
{ "dtype": "float32", "name": "onet/prelu1_alpha", "shape": [32] },
{ "dtype": "float32", "name": "onet/conv2/weights", "shape": [3, 3, 32, 64] },
{ "dtype": "float32", "name": "onet/conv2/bias", "shape": [64] },
{ "dtype": "float32", "name": "onet/prelu2_alpha", "shape": [64] },
{ "dtype": "float32", "name": "onet/conv3/weights", "shape": [3, 3, 64, 64] },
{ "dtype": "float32", "name": "onet/conv3/bias", "shape": [64] },
{ "dtype": "float32", "name": "onet/prelu3_alpha", "shape": [64] },
{ "dtype": "float32", "name": "onet/conv4/weights", "shape": [2, 2, 64, 128] },
{ "dtype": "float32", "name": "onet/conv4/bias", "shape": [128] },
{ "dtype": "float32", "name": "onet/prelu4_alpha", "shape": [128] },
{ "dtype": "float32", "name": "onet/fc1/weights", "shape": [1152, 256] },
{ "dtype": "float32", "name": "onet/fc1/bias", "shape": [256] },
{ "dtype": "float32", "name": "onet/prelu5_alpha", "shape": [256] },
{ "dtype": "float32", "name": "onet/fc2_1/weights", "shape": [256, 2] },
{ "dtype": "float32", "name": "onet/fc2_1/bias", "shape": [2] },
{ "dtype": "float32", "name": "onet/fc2_2/weights", "shape": [256, 4] },
{ "dtype": "float32", "name": "onet/fc2_2/bias", "shape": [4] },
{ "dtype": "float32", "name": "onet/fc2_3/weights", "shape": [256, 10] },
{ "dtype": "float32", "name": "onet/fc2_3/bias", "shape": [10] }
]
}
]

File diff suppressed because one or more lines are too long

View File

@@ -1,907 +0,0 @@
[
{
"paths": ["ssd_mobilenetv1_model-shard1", "ssd_mobilenetv1_model-shard2"],
"weights": [
{
"dtype": "float32",
"shape": [1, 1, 512, 9],
"quantization": { "scale": 0.0026856216729856004, "min": -0.34107395246917127, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_0/ClassPredictor/weights"
},
{
"dtype": "float32",
"shape": [9],
"quantization": { "scale": 0.00198518248165355, "min": -0.32159956202787515, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_0/ClassPredictor/biases"
},
{
"dtype": "float32",
"shape": [1, 1, 1024, 18],
"quantization": { "scale": 0.003060340296988394, "min": -0.489654447518143, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_1/ClassPredictor/weights"
},
{
"dtype": "float32",
"shape": [18],
"quantization": { "scale": 0.0008040678851744708, "min": -0.12221831854651957, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_1/ClassPredictor/biases"
},
{
"dtype": "float32",
"shape": [1, 1, 512, 18],
"quantization": { "scale": 0.0012513800578958848, "min": -0.16017664741067325, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_2/ClassPredictor/weights"
},
{
"dtype": "float32",
"shape": [18],
"quantization": { "scale": 0.000338070518245884, "min": -0.05510549447407909, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_2/ClassPredictor/biases"
},
{
"dtype": "float32",
"shape": [1, 1, 256, 18],
"quantization": { "scale": 0.0011819932975021064, "min": -0.1453851755927591, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_3/ClassPredictor/weights"
},
{
"dtype": "float32",
"shape": [18],
"quantization": { "scale": 0.00015985782386041154, "min": -0.026536398760828316, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_3/ClassPredictor/biases"
},
{
"dtype": "float32",
"shape": [1, 1, 256, 18],
"quantization": { "scale": 0.0007035591438704846, "min": -0.08513065640832863, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_4/ClassPredictor/weights"
},
{
"dtype": "float32",
"shape": [18],
"quantization": { "scale": 0.00008793946574716008, "min": -0.013190919862074012, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_4/ClassPredictor/biases"
},
{
"dtype": "float32",
"shape": [1, 1, 128, 18],
"quantization": { "scale": 0.00081320781918133, "min": -0.11059626340866088, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_5/ClassPredictor/weights"
},
{
"dtype": "float32",
"shape": [18],
"quantization": { "scale": 0.0000980533805547976, "min": -0.014609953702664841, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_5/ClassPredictor/biases"
},
{
"dtype": "int32",
"shape": [],
"quantization": { "scale": 1, "min": 3, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_0/stack_1/2"
},
{
"dtype": "int32",
"shape": [3],
"quantization": { "scale": 0.00392156862745098, "min": 0, "dtype": "uint8" },
"name": "Postprocessor/Slice/begin"
},
{
"dtype": "int32",
"shape": [3],
"quantization": { "scale": 1, "min": -1, "dtype": "uint8" },
"name": "Postprocessor/Slice/size"
},
{
"dtype": "float32",
"shape": [1, 1, 512, 12],
"quantization": { "scale": 0.003730384859384275, "min": -0.4327246436885759, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_0/BoxEncodingPredictor/weights"
},
{
"dtype": "float32",
"shape": [12],
"quantization": { "scale": 0.0018744708568442102, "min": -0.3917644090804399, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_0/BoxEncodingPredictor/biases"
},
{
"dtype": "int32",
"shape": [],
"quantization": { "scale": 1, "min": 3072, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_0/stack_1/1"
},
{
"dtype": "float32",
"shape": [1, 1, 1024, 24],
"quantization": { "scale": 0.00157488017689948, "min": -0.20000978246623397, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_1/BoxEncodingPredictor/weights"
},
{
"dtype": "float32",
"shape": [24],
"quantization": { "scale": 0.0002823906713256649, "min": -0.043488163384152394, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_1/BoxEncodingPredictor/biases"
},
{
"dtype": "int32",
"shape": [],
"quantization": { "scale": 1, "min": 1536, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_1/stack_1/1"
},
{
"dtype": "float32",
"shape": [1, 1, 512, 24],
"quantization": { "scale": 0.0007974451663447361, "min": -0.11004743295557358, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_2/BoxEncodingPredictor/weights"
},
{
"dtype": "float32",
"shape": [24],
"quantization": { "scale": 0.0001350417988849621, "min": -0.02039131163162928, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_2/BoxEncodingPredictor/biases"
},
{
"dtype": "int32",
"shape": [],
"quantization": { "scale": 1, "min": 384, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_2/stack_1/1"
},
{
"dtype": "float32",
"shape": [1, 1, 256, 24],
"quantization": { "scale": 0.0007113990246080885, "min": -0.0860792819775787, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_3/BoxEncodingPredictor/weights"
},
{
"dtype": "float32",
"shape": [24],
"quantization": { "scale": 0.000050115815418608046, "min": -0.007617603943628423, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_3/BoxEncodingPredictor/biases"
},
{
"dtype": "int32",
"shape": [],
"quantization": { "scale": 1, "min": 96, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_3/stack_1/1"
},
{
"dtype": "float32",
"shape": [1, 1, 256, 24],
"quantization": { "scale": 0.000590049314732645, "min": -0.06903576982371946, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_4/BoxEncodingPredictor/weights"
},
{
"dtype": "float32",
"shape": [24],
"quantization": { "scale": 0.00003513663861097074, "min": -0.006359731588585704, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_4/BoxEncodingPredictor/biases"
},
{
"dtype": "int32",
"shape": [],
"quantization": { "scale": 1, "min": 24, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_4/stack_1/1"
},
{
"dtype": "float32",
"shape": [1, 1, 128, 24],
"quantization": { "scale": 0.0005990567744946948, "min": -0.07907549423329971, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_5/BoxEncodingPredictor/weights"
},
{
"dtype": "float32",
"shape": [24],
"quantization": { "scale": 0.00003392884288640583, "min": -0.006039334033780238, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_5/BoxEncodingPredictor/biases"
},
{
"dtype": "float32",
"shape": [],
"quantization": { "scale": 1, "min": 0.007843137718737125, "dtype": "uint8" },
"name": "Preprocessor/mul/x"
},
{
"dtype": "int32",
"shape": [2],
"quantization": { "scale": 1, "min": 512, "dtype": "uint8" },
"name": "Preprocessor/ResizeImage/size"
},
{
"dtype": "float32",
"shape": [],
"quantization": { "scale": 1, "min": 1, "dtype": "uint8" },
"name": "Preprocessor/sub/y"
},
{
"dtype": "float32",
"shape": [3, 3, 3, 32],
"quantization": { "scale": 0.03948551065781537, "min": -5.014659853542552, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_0_pointwise/weights"
},
{
"dtype": "float32",
"shape": [32],
"quantization": { "scale": 0.0498106133704092, "min": -7.371970778820562, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_0_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 32, 1],
"quantization": { "scale": 0.036833542468501075, "min": -4.714693435968138, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_1_depthwise/depthwise_weights"
},
{
"dtype": "float32",
"shape": [32],
"quantization": { "scale": 0.012173276705046495, "min": -0.012173276705046495, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_1_depthwise/BatchNorm/gamma"
},
{
"dtype": "float32",
"shape": [32],
"quantization": { "scale": 0.032182769214405736, "min": -2.4780732295092416, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_1_depthwise/BatchNorm/beta"
},
{
"dtype": "float32",
"shape": [32],
"quantization": { "scale": 0.028287527607936486, "min": -3.366215785344442, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_1_depthwise/BatchNorm/moving_mean"
},
{
"dtype": "float32",
"shape": [32],
"quantization": { "scale": 0.04716738532571232, "min": 3.9071404665769224e-36, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_1_depthwise/BatchNorm/moving_variance"
},
{
"dtype": "float32",
"shape": [1, 1, 32, 64],
"quantization": { "scale": 0.04010109433940812, "min": -4.290817094316669, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_1_pointwise/weights"
},
{
"dtype": "float32",
"shape": [64],
"quantization": { "scale": 0.2212210038129021, "min": -34.51047659481273, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_1_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 64, 1],
"quantization": { "scale": 0.010024750933927648, "min": -1.343316625146305, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_2_depthwise/depthwise_weights"
},
{
"dtype": "float32",
"shape": [64],
"quantization": { "scale": 0.006120916675118839, "min": 0.5227176547050476, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_2_depthwise/BatchNorm/gamma"
},
{
"dtype": "float32",
"shape": [64],
"quantization": { "scale": 0.02317035385206634, "min": -0.7646216771181892, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_2_depthwise/BatchNorm/beta"
},
{
"dtype": "float32",
"shape": [64],
"quantization": { "scale": 0.04980821422502106, "min": -5.8275610643274645, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_2_depthwise/BatchNorm/moving_mean"
},
{
"dtype": "float32",
"shape": [64],
"quantization": { "scale": 0.051751047022202436, "min": 3.916113799002297e-36, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_2_depthwise/BatchNorm/moving_variance"
},
{
"dtype": "float32",
"shape": [1, 1, 64, 128],
"quantization": { "scale": 0.021979344124887504, "min": -2.1319963801140878, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_2_pointwise/weights"
},
{
"dtype": "float32",
"shape": [128],
"quantization": { "scale": 0.09958663267247816, "min": -11.054116226645077, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_2_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 128, 1],
"quantization": { "scale": 0.01943492702409333, "min": -2.6237151482525993, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_3_depthwise/depthwise_weights"
},
{
"dtype": "float32",
"shape": [128],
"quantization": { "scale": 0.017852897737540452, "min": 0.40204083919525146, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_3_depthwise/BatchNorm/gamma"
},
{
"dtype": "float32",
"shape": [128],
"quantization": { "scale": 0.029888209174661076, "min": -1.972621805527631, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_3_depthwise/BatchNorm/beta"
},
{
"dtype": "float32",
"shape": [128],
"quantization": { "scale": 0.029319268581913967, "min": -5.130872001834945, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_3_depthwise/BatchNorm/moving_mean"
},
{
"dtype": "float32",
"shape": [128],
"quantization": { "scale": 0.014018708584355373, "min": 3.9083178263362604e-36, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_3_depthwise/BatchNorm/moving_variance"
},
{
"dtype": "float32",
"shape": [1, 1, 128, 128],
"quantization": { "scale": 0.020776657964669022, "min": -2.5347522716896207, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_3_pointwise/weights"
},
{
"dtype": "float32",
"shape": [128],
"quantization": { "scale": 0.14383157094319662, "min": -9.636715253194174, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_3_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 128, 1],
"quantization": { "scale": 0.004463558571011412, "min": -0.5981168485155293, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_4_depthwise/depthwise_weights"
},
{
"dtype": "float32",
"shape": [128],
"quantization": { "scale": 0.006487431245691636, "min": 0.47910428047180176, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_4_depthwise/BatchNorm/gamma"
},
{
"dtype": "float32",
"shape": [128],
"quantization": { "scale": 0.026542164297664865, "min": -1.2209395576925839, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_4_depthwise/BatchNorm/beta"
},
{
"dtype": "float32",
"shape": [128],
"quantization": { "scale": 0.05119945675719018, "min": -8.60150873520795, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_4_depthwise/BatchNorm/moving_mean"
},
{
"dtype": "float32",
"shape": [128],
"quantization": { "scale": 0.03081628388049556, "min": 3.911508751095344e-36, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_4_depthwise/BatchNorm/moving_variance"
},
{
"dtype": "float32",
"shape": [1, 1, 128, 256],
"quantization": { "scale": 0.010758659886378868, "min": -1.0328313490923713, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_4_pointwise/weights"
},
{
"dtype": "float32",
"shape": [256],
"quantization": { "scale": 0.08058219610476026, "min": -9.34753474815219, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_4_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 256, 1],
"quantization": { "scale": 0.01145936741548426, "min": -1.3292866201961742, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_5_depthwise/depthwise_weights"
},
{
"dtype": "float32",
"shape": [256],
"quantization": { "scale": 0.0083988838336047, "min": 0.36280909180641174, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_5_depthwise/BatchNorm/gamma"
},
{
"dtype": "float32",
"shape": [256],
"quantization": { "scale": 0.02858148649627087, "min": -3.6584302715226715, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_5_depthwise/BatchNorm/beta"
},
{
"dtype": "float32",
"shape": [256],
"quantization": { "scale": 0.03988401375564874, "min": -7.099354448505476, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_5_depthwise/BatchNorm/moving_mean"
},
{
"dtype": "float32",
"shape": [256],
"quantization": { "scale": 0.009090481683904049, "min": 0.020878996700048447, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_5_depthwise/BatchNorm/moving_variance"
},
{
"dtype": "float32",
"shape": [1, 1, 256, 256],
"quantization": { "scale": 0.008951201625898773, "min": -1.1189002032373465, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_5_pointwise/weights"
},
{
"dtype": "float32",
"shape": [256],
"quantization": { "scale": 0.051758006974762565, "min": -5.745138774198645, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_5_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 256, 1],
"quantization": { "scale": 0.004110433190476661, "min": -0.6042336790000691, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_6_depthwise/depthwise_weights"
},
{
"dtype": "float32",
"shape": [256],
"quantization": { "scale": 0.013170199768216002, "min": 0.3386639356613159, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_6_depthwise/BatchNorm/gamma"
},
{
"dtype": "float32",
"shape": [256],
"quantization": { "scale": 0.03599378548416437, "min": -3.70735990486893, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_6_depthwise/BatchNorm/beta"
},
{
"dtype": "float32",
"shape": [256],
"quantization": { "scale": 0.026967673208199296, "min": -3.748506575939702, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_6_depthwise/BatchNorm/moving_mean"
},
{
"dtype": "float32",
"shape": [256],
"quantization": { "scale": 0.012615410486857097, "min": 3.9111388979838637e-36, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_6_depthwise/BatchNorm/moving_variance"
},
{
"dtype": "float32",
"shape": [1, 1, 256, 512],
"quantization": { "scale": 0.00822840648538926, "min": -1.1848905338960536, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_6_pointwise/weights"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.06608965817619772, "min": -7.468131373910342, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_6_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 512, 1],
"quantization": { "scale": 0.008801074355256323, "min": -0.9593171047229393, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_7_depthwise/depthwise_weights"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.030577416513480393, "min": 0.3285980224609375, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_7_depthwise/BatchNorm/gamma"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.04778536441279393, "min": -8.935863145192464, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_7_depthwise/BatchNorm/beta"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.04331884945140165, "min": -9.660103427662568, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_7_depthwise/BatchNorm/moving_mean"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.04126455444367785, "min": 0.000604183878749609, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_7_depthwise/BatchNorm/moving_variance"
},
{
"dtype": "float32",
"shape": [1, 1, 512, 512],
"quantization": { "scale": 0.009305818408143287, "min": -1.1446156642016243, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_7_pointwise/weights"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.04640720217835669, "min": -4.733534622192383, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_7_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 512, 1],
"quantization": { "scale": 0.008138792655047248, "min": -0.9766551186056698, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_8_depthwise/depthwise_weights"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.027351748358969596, "min": 0.34030041098594666, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_8_depthwise/BatchNorm/gamma"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.04415061053107767, "min": -7.019947074441349, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_8_depthwise/BatchNorm/beta"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.02476683784933651, "min": -2.9224868662217083, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_8_depthwise/BatchNorm/moving_mean"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.02547598832684076, "min": 0.00026032101595774293, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_8_depthwise/BatchNorm/moving_variance"
},
{
"dtype": "float32",
"shape": [1, 1, 512, 512],
"quantization": { "scale": 0.01083052625843123, "min": -1.2563410459780227, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_8_pointwise/weights"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.06360894371481503, "min": -7.951117964351878, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_8_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 512, 1],
"quantization": { "scale": 0.006704086883395326, "min": -0.8648272079579971, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_9_depthwise/depthwise_weights"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.015343831567203297, "min": 0.2711026668548584, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_9_depthwise/BatchNorm/gamma"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.03378283930759804, "min": -4.797163181678922, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_9_depthwise/BatchNorm/beta"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.021910778213949763, "min": -3.987761634938857, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_9_depthwise/BatchNorm/moving_mean"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.009284070410007296, "min": 0.000021581046894425526, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_9_depthwise/BatchNorm/moving_variance"
},
{
"dtype": "float32",
"shape": [1, 1, 512, 512],
"quantization": { "scale": 0.012783036979974485, "min": -1.9046725100161983, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_9_pointwise/weights"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.07273082733154297, "min": -9.52773838043213, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_9_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 512, 1],
"quantization": { "scale": 0.006126228033327589, "min": -0.7351473639993107, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_10_depthwise/depthwise_weights"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.029703759212119908, "min": 0.28687000274658203, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_10_depthwise/BatchNorm/gamma"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.04394429898729511, "min": -6.3279790541704966, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_10_depthwise/BatchNorm/beta"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.016566915605582443, "min": -2.7501079905266854, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_10_depthwise/BatchNorm/moving_mean"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.012152872833551145, "min": 3.913338286370366e-36, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_10_depthwise/BatchNorm/moving_variance"
},
{
"dtype": "float32",
"shape": [1, 1, 512, 512],
"quantization": { "scale": 0.01354524388032801, "min": -1.7473364605623134, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_10_pointwise/weights"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.08566816367355047, "min": -9.937506986131854, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_10_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 512, 1],
"quantization": { "scale": 0.006012305558896532, "min": -0.7876120282154457, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_11_depthwise/depthwise_weights"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.01469323155926723, "min": 0.29223933815956116, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_11_depthwise/BatchNorm/gamma"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.030889174517463234, "min": -3.2433633243336395, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_11_depthwise/BatchNorm/beta"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.014836942448335536, "min": -2.047498057870304, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_11_depthwise/BatchNorm/moving_mean"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.007234466105343445, "min": 0.00013165915152058005, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_11_depthwise/BatchNorm/moving_variance"
},
{
"dtype": "float32",
"shape": [1, 1, 512, 512],
"quantization": { "scale": 0.016261722527298274, "min": -1.4798167499841428, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_11_pointwise/weights"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.091437328563017, "min": -14.172785927267636, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_11_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 512, 1],
"quantization": { "scale": 0.004750356487199372, "min": -0.650798838746314, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_12_depthwise/depthwise_weights"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.008174965545242907, "min": 0.3120670020580292, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_12_depthwise/BatchNorm/gamma"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.030133422215779623, "min": -2.41067377726237, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_12_depthwise/BatchNorm/beta"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.006088157261119169, "min": -0.7853722866843729, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_12_depthwise/BatchNorm/moving_mean"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.003668997334498985, "min": 3.9124486300013356e-36, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_12_depthwise/BatchNorm/moving_variance"
},
{
"dtype": "float32",
"shape": [1, 1, 512, 1024],
"quantization": { "scale": 0.010959514449624454, "min": -1.4028178495519301, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_12_pointwise/weights"
},
{
"dtype": "float32",
"shape": [1024],
"quantization": { "scale": 0.10896045834410424, "min": -14.818622334798176, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_12_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 1024, 1],
"quantization": { "scale": 0.004633033509347953, "min": -0.5652300881404502, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_13_depthwise/depthwise_weights"
},
{
"dtype": "float32",
"shape": [1024],
"quantization": { "scale": 0.022285057224479377, "min": 0.23505790531635284, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_13_depthwise/BatchNorm/gamma"
},
{
"dtype": "float32",
"shape": [1024],
"quantization": { "scale": 0.0324854850769043, "min": -3.9957146644592285, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_13_depthwise/BatchNorm/beta"
},
{
"dtype": "float32",
"shape": [1024],
"quantization": { "scale": 0.014760061806323482, "min": -2.125448900110581, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_13_depthwise/BatchNorm/moving_mean"
},
{
"dtype": "float32",
"shape": [1024],
"quantization": { "scale": 0.0036057423142825855, "min": 3.9067056828997994e-36, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_13_depthwise/BatchNorm/moving_variance"
},
{
"dtype": "float32",
"shape": [1, 1, 1024, 1024],
"quantization": { "scale": 0.017311988157384536, "min": -2.094750567043529, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_13_pointwise/weights"
},
{
"dtype": "float32",
"shape": [1024],
"quantization": { "scale": 0.16447528764313343, "min": -25.658144872328815, "dtype": "uint8" },
"name": "MobilenetV1/Conv2d_13_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [1, 1, 1024, 256],
"quantization": { "scale": 0.0026493051472832175, "min": -0.36825341547236723, "dtype": "uint8" },
"name": "Prediction/Conv2d_0_pointwise/weights"
},
{
"dtype": "float32",
"shape": [256],
"quantization": { "scale": 0.012474596734140433, "min": -2.3078003958159803, "dtype": "uint8" },
"name": "Prediction/Conv2d_0_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 256, 512],
"quantization": { "scale": 0.014533351449405445, "min": -1.8166689311756807, "dtype": "uint8" },
"name": "Prediction/Conv2d_1_pointwise/weights"
},
{
"dtype": "float32",
"shape": [512],
"quantization": { "scale": 0.024268776762719248, "min": -2.4754152297973633, "dtype": "uint8" },
"name": "Prediction/Conv2d_1_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [1, 1, 512, 128],
"quantization": { "scale": 0.002208403746287028, "min": -0.28709248701731366, "dtype": "uint8" },
"name": "Prediction/Conv2d_2_pointwise/weights"
},
{
"dtype": "float32",
"shape": [128],
"quantization": { "scale": 0.012451349052728392, "min": -1.5937726787492341, "dtype": "uint8" },
"name": "Prediction/Conv2d_2_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 128, 256],
"quantization": { "scale": 0.026334229637594783, "min": -2.8967652601354263, "dtype": "uint8" },
"name": "Prediction/Conv2d_3_pointwise/weights"
},
{
"dtype": "float32",
"shape": [256],
"quantization": { "scale": 0.02509917792151956, "min": -1.4055539636050953, "dtype": "uint8" },
"name": "Prediction/Conv2d_3_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [1, 1, 256, 128],
"quantization": { "scale": 0.004565340046789132, "min": -0.3971845840706545, "dtype": "uint8" },
"name": "Prediction/Conv2d_4_pointwise/weights"
},
{
"dtype": "float32",
"shape": [128],
"quantization": { "scale": 0.017302456556581983, "min": -2.5953684834872974, "dtype": "uint8" },
"name": "Prediction/Conv2d_4_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 128, 256],
"quantization": { "scale": 0.025347338470758176, "min": -3.8527954475552426, "dtype": "uint8" },
"name": "Prediction/Conv2d_5_pointwise/weights"
},
{
"dtype": "float32",
"shape": [256],
"quantization": { "scale": 0.033134659598855414, "min": -2.9158500446992766, "dtype": "uint8" },
"name": "Prediction/Conv2d_5_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [1, 1, 256, 64],
"quantization": { "scale": 0.002493104397081861, "min": -0.2817207968702503, "dtype": "uint8" },
"name": "Prediction/Conv2d_6_pointwise/weights"
},
{
"dtype": "float32",
"shape": [64],
"quantization": { "scale": 0.011383360974928912, "min": -1.2749364291920382, "dtype": "uint8" },
"name": "Prediction/Conv2d_6_pointwise/convolution_bn_offset"
},
{
"dtype": "float32",
"shape": [3, 3, 64, 128],
"quantization": { "scale": 0.020821522731407017, "min": -2.7484410005457263, "dtype": "uint8" },
"name": "Prediction/Conv2d_7_pointwise/weights"
},
{
"dtype": "float32",
"shape": [128],
"quantization": { "scale": 0.052144218893612135, "min": -3.5979511036592373, "dtype": "uint8" },
"name": "Prediction/Conv2d_7_pointwise/convolution_bn_offset"
},
{
"dtype": "int32",
"shape": [],
"quantization": { "scale": 1, "min": 6, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_5/stack_1/1"
},
{
"dtype": "int32",
"shape": [],
"quantization": { "scale": 1, "min": 1, "dtype": "uint8" },
"name": "concat_1/axis"
},
{
"dtype": "int32",
"shape": [1],
"quantization": { "scale": 1, "min": 0, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_0/strided_slice/stack"
},
{
"dtype": "int32",
"shape": [1],
"quantization": { "scale": 1, "min": 1, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_0/strided_slice/stack_1"
},
{
"dtype": "int32",
"shape": [],
"quantization": { "scale": 1, "min": 5118, "dtype": "uint8" },
"name": "Postprocessor/stack/1"
},
{
"dtype": "int32",
"shape": [],
"quantization": { "scale": 1, "min": 4, "dtype": "uint8" },
"name": "Prediction/BoxPredictor_0/stack/3"
}, { "dtype": "float32", "shape": [1, 5118, 4], "name": "Output/extra_dim" }
]
}
]

View File

@@ -1,121 +0,0 @@
[
{
"weights": [
{
"name": "conv0/filters",
"shape": [3, 3, 3, 16],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.009007044399485869, "min": -1.2069439495311063 }
},
{
"name": "conv0/bias",
"shape": [16],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.005263455241334205, "min": -0.9211046672334858 }
},
{
"name": "conv1/depthwise_filter",
"shape": [3, 3, 16, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.004001977630690033, "min": -0.5042491814669441 }
},
{
"name": "conv1/pointwise_filter",
"shape": [1, 1, 16, 32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.013836609615999109, "min": -1.411334180831909 }
},
{
"name": "conv1/bias",
"shape": [32],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0015159862590771096, "min": -0.30926119685173037 }
},
{
"name": "conv2/depthwise_filter",
"shape": [3, 3, 32, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.002666276225856706, "min": -0.317286870876948 }
},
{
"name": "conv2/pointwise_filter",
"shape": [1, 1, 32, 64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.015265831292844286, "min": -1.6792414422128714 }
},
{
"name": "conv2/bias",
"shape": [64],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0020280554598453, "min": -0.37113414915168985 }
},
{
"name": "conv3/depthwise_filter",
"shape": [3, 3, 64, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006100742489683862, "min": -0.8907084034938438 }
},
{
"name": "conv3/pointwise_filter",
"shape": [1, 1, 64, 128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.016276211832083907, "min": -2.0508026908425725 }
},
{
"name": "conv3/bias",
"shape": [128],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.003394414279975143, "min": -0.7637432129944072 }
},
{
"name": "conv4/depthwise_filter",
"shape": [3, 3, 128, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.006716050119961009, "min": -0.8059260143953211 }
},
{
"name": "conv4/pointwise_filter",
"shape": [1, 1, 128, 256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.021875603993733724, "min": -2.8875797271728514 }
},
{
"name": "conv4/bias",
"shape": [256],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.0041141652009066415, "min": -0.8187188749804216 }
},
{
"name": "conv5/depthwise_filter",
"shape": [3, 3, 256, 1],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.008423839597141042, "min": -0.9013508368940915 }
},
{
"name": "conv5/pointwise_filter",
"shape": [1, 1, 256, 512],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.030007277283014035, "min": -3.8709387695088107 }
},
{
"name": "conv5/bias",
"shape": [512],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.008402082966823203, "min": -1.4871686851277068 }
},
{
"name": "conv8/filters",
"shape": [1, 1, 512, 25],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.028336129469030042, "min": -4.675461362389957 }
},
{
"name": "conv8/bias",
"shape": [25],
"dtype": "float32",
"quantization": { "dtype": "uint8", "scale": 0.002268134028303857, "min": -0.41053225912299807 }
}
],
"paths": ["tiny_face_detector_model-shard1"]
}
]

View File

@@ -1,63 +0,0 @@
@model CompanyManagment.App.Contracts.OriginalTitle.CreateOriginalTitle
@{
}
@{
<style>
.select2-container {
width: 100% !important;
}
.modal-footer {
border-top: unset !important;
}
.modal .modal-dialog .modal-content .modal-footer {
padding-top: unset !important;
}
p {
direction: ltr !important;
text-align: right !important;
}
input[type=radio]:hover {
cursor: pointer;
}
.error {
font-size: 14px !important;
}
</style>
}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<form asp-page="./Index" asp-page-handler="Create" id="workshops" autocomplete="off"
method="post"
data-ajax="true"
data-callback=""
data-action="Refresh"
enctype="multipart/form-data">
<div class="modal-body">
<div class="row">
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert">
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 140px; text-align: center;"> تعریف عنوان </legend>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label asp-for="Title" class="control-label"> عنوان </label>
<input type="text" id="Title" name="Title" class="form-control" asp-for="Title">
<span asp-validation-for="Title" class="error"></span>
</div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-success btn-rounded waves-effect waves-light">ذخیره</button>
<button type="button" class="btn btn-default btn-rounded waves-effect waves-light m-b-5" data-dismiss="modal">بستن</button>
</div>
</form>
</div>

View File

@@ -1,58 +0,0 @@
@model CompanyManagment.App.Contracts.OriginalTitle.EditOriginalTitle
@{
}
@{
<style>
.select2-container {
width: 100% !important;
}
.modal-footer {
border-top: unset !important;
}
.modal .modal-dialog .modal-content .modal-footer {
padding-top: unset !important;
}
p {
direction: ltr !important;
text-align: right !important;
}
input[type=radio]:hover {
cursor: pointer;
}
</style>
}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<form asp-page="./Index" asp-page-handler="Edit" autocomplete="off"
method="post"
data-ajax="true"
data-callback=""
data-action="Refresh"
enctype="multipart/form-data">
<div class="modal-body">
<div class="row">
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert">
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 140px; text-align: center;"> ویرایش عنوان </legend>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label asp-for="Title" class="control-label"> عنوان </label>
<input type="text" class="form-control" asp-for="Title">
<span asp-validation-for="Title" class="error"></span>
</div>
</div>
</div>
</fieldset>
</div>
</div>
<input type="hidden" asp-for="Id" value="@Model.Id"/>
<div class="modal-footer">
<button type="submit" class="btn btn-success btn-rounded waves-effect waves-light">ذخیره</button>
<button type="button" class="btn btn-default btn-rounded waves-effect waves-light m-b-5" data-dismiss="modal">بستن</button>
</div>
</form>
</div>

View File

@@ -1,475 +0,0 @@
@page
@using Microsoft.AspNetCore.Http.Extensions
@model ServiceHost.Areas.Admin.Pages.Company.OriginalTitle.IndexModel
@{
}
@{
var url = HttpContext.Request.GetEncodedUrl();
//string colaps = "in";
//string act = "active";
var i = 1;
}
@{
Layout = "Shared/_AdminLayout";
ViewData["title"] = "عناوین";
}
<style>
.sizeSet {
padding: 2px !important;
text-align: center !important;
}
.rad {
border-radius: 8px !important;
/* padding: 10px; */
padding: 2px 5px 0px 5px;
}
.ionSize {
font-size: 20px !important;
top: 2px !important;
position: relative;
}
.ionRad {
border-radius: 8px !important;
padding: 0px 7px 0px 7px !important;
background-color: #ff7700 !important;
border-color: #ff7700 !important;
}
.ionRad2 {
border-radius: 8px !important;
padding: 0px 7px 0px 7px !important;
background-color: #7c7a7a !important;
border-color: #7c7a7a !important;
}
.faSize {
font-size: 22px !important;
}
.thh0 {
width: 8px !important;
}
.thh {
width: 40px !important;
}
.thh2 {
width: 130px !important;
}
.thhNastionalId {
width: 30px !important;
}
.inpt {
width: 100%;
border: 1px solid #c7c7c7;
}
.searchpanel {
background-color: #747272;
}
select {
cursor: pointer;
}
.panel-default > .panel-heading {
background-color: #950000 !important;
}
.tooltip-container {
cursor: pointer;
position: relative;
display: inline-block;
}
.tooltip2-container {
cursor: pointer;
position: relative;
display: inline-block;
}
.tooltip {
opacity: 0;
z-index: 99;
color: #fff;
width: 220px;
display: block;
font-size: 14px;
font-family: 'IranSans';
padding: 5px 10px;
border-radius: 3px;
text-align: center;
/*text-shadow: 1px 1px 2px #111;*/
background: #e67e22;
border: 1px solid #e67e22;
box-shadow: 0 0 3px rgba(0,0,0,0.5);
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
-ms-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
position: absolute;
right: -50px;
bottom: 40px;
}
.tooltip:before, .tooltip:after {
content: '';
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #e67e22;
position: absolute;
bottom: -10px;
left: 70%;
}
.tooltip-container:hover .tooltip, a:hover .tooltip {
opacity: 1;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
.tooltip2 {
opacity: 0;
z-index: 99;
color: #fff;
width: 220px;
display: block;
font-size: 14px;
font-family: 'IranSans';
padding: 5px 10px;
border-radius: 3px;
text-align: center;
/*text-shadow: 1px 1px 2px #111;*/
background: #e67e22;
border: 1px solid #e67e22;
box-shadow: 0 0 3px rgba(0,0,0,0.5);
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
-ms-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
position: absolute;
right: -90px;
bottom: 40px;
}
.tooltip2:before, .tooltip2:after {
content: '';
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #e67e22;
position: absolute;
bottom: -10px;
left: 50%;
}
.tooltip2-container:hover .tooltip2, a:hover .tooltip2 {
opacity: 1;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
</style>
<div class="row">
<div class="row">
<div class="col-sm-12 m-r-10">
<p class="pull-right">
</p>
<p class="pull-right">
<a id="btnPopModal" href="#showmodal=@Url.Page("/Company/OriginalTitle/Index", "Create")" class="btn btn-success btn-rounded waves-effect waves-light m-b-5" style=" background-color: #f5f5f5; border-color: #0f9500; font-family: 'Web_Yekan' !important; color: #0f9500 !important; margin-right: 10px "> <i class="fa fa-user-plus" style="padding-left: 3px; font-size: 14px; color: #0f9500 !important "></i> تعریف عنوان جدید </a>
</p>
<input type="hidden" id="sercheCheck" value="@Model.OriginalTitleSearch"/>
</div>
</div>
<div class="col-sm-12">
<div class="panel-group panel-group-joined" id="accordion-test">
<div class="panel panel-default" style="border-radius: 15px !important; background-color: #fdc0c0; ">
<div class="panel-heading" style="background-color: #950000 !important">
<h4 class="panel-title" style="color: #edebeb !important; display: inline;">
<a data-toggle="collapse" data-parent="#accordion-test" href="#collapseOne" class="collapsed" style="display: inline;">
جستجوی عنوان
</a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse in ">
<div class="panel-body" style="padding-top: 15px; padding-bottom: 15px;">
<div class="row">
<div class="col-sm-12">
<form class="form-inline" role="form" method="get" name="search-theme-form" id="search-theme-form" autocomplete="off">
<div class="form-group col-sm-12">
<div class="row">
<div class="col-sm-4 pull-right">
<label class="sr-only" asp-for="searchModel.Title"></label>
<input class=" form-control inpt" asp-for="searchModel.Title" placeholder="عنوان " style="width: 100%">
</div>
</div>
<div class="row" style="margin-top: 15px">
<div class="col-lg-9">
<label class="sr-only" asp-for="searchModel.IsActiveString"></label>
<select id="activing" class="form-control activer" asp-for="searchModel.IsActiveString" style="background-color: #dddddd; border-radius: 25px; border: 1px solid #bfbfbf;">
<option value="true"> فعال </option>
<option value="false"> غیرفعال</option>
<option value="both"> هردو</option>
</select>
</div>
<div class="col-lg-3">
<button type="submit" class="btn btn-success btn-rounded waves-effect waves-light m-b-5 search" style="border-bottom-left-radius: 0px; border-top-left-radius: 0px; background-color: #950000; border-color: #950000; font-family: 'Web_Yekan' !important; margin-left: -3px "> <i class="fa fa-search" style="padding-left: 3px; font-size: 14px;"></i> جستجو</button>
<a class="btn btn-info btn-rounded waves-effect waves-light m-b-5" style="border-bottom-right-radius: 0px; border-top-right-radius: 0px; background-color: #545353; border-color: #545353; font-family: 'Web_Yekan' !important;" asp-page="./Index">مشاهده همه</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i> لیست عنوان ها</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-12 col-sm-12 col-xs-12">
<table id="datatable" class="table table-striped table-bordered fc-scroller">
<thead style="background-color: #ecefee">
<tr>
<th style="font-size: 10px !important; display: none" class="sizeSet">
<span class="tooltip-container">
<input class="checkboxtitle" type="checkbox" id="checkSelect" onclick="selectori(this)" checked="checked"/>
</span>
</th>
<th style="width:5%; font-size: 10px !important" class="sizeSet">#</th>
<th style="font-size: 16px !important; text-align: center" class="sizeSet">عنوان</th>
<th style="font-size: 10px !important; width: 65px; ">
<span style="float: right;">
<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
</span>
<span class="act">
</span>
<a class="btn btn-danger pull-right m-rl-5 rad deact" onclick="deactiveAll()">
<i class="fa faSize fa-trash"></i>
</a>
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.OriginalTitles)
{
<tr>
<td style="font-size: 16px !important; text-align: center;display:none">
<input type="checkbox" name="foo" value="@item.Id" checked="checked"/>
</td>
<td style="font-size: 16px !important; text-align: center">@i </td>
<td style="font-size: 16px !important; text-align: center">@item.Title</td>
@{
i++;
}
<td>
<a permission="20114" class="btn btn-warning pull-right m-rl-5 rad"
href="#showmodal=@Url.Page("./Index", "Edit", new { item.Id })">
<i class="fa faSize fa-edit"></i>
</a>
@if (item.IsActiveString == "true")
{
<a permission="20116" id="googleLink" class="btn btn-danger pull-right m-rl-5 fff rad" onclick="DeActive('/Admin/Company/OriginalTitle?id=@item.Id&amp;url=@url&amp;handler=DeActive')">
<i class="fa faSize fa-trash"></i>
</a>
}
else
{
<a permission="20116" onclick="IsActive('/Admin/Company/OriginalTitle?id=@item.Id&amp;url=@url&amp;handler=IsActive')" class="btn btn-success pull-right m-rl-5 rad">
<i class="fa faSize fa-rotate-left"></i>
</a>
{
}
}
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
@section PanelScripts{
<script src="~/AdminTheme/assets/js/site.js"></script>
<script src="~/adminTheme/assets/datatables/jquery.dataTables.min.js"></script>
<script src="~/adminTheme/assets/datatables/dataTables.bootstrap.js"></script>
<script>
$('.activer').on('change',
function(e) {
e.preventDefault();
$('.search').click();
});
</script>
<script>
if (document.getElementById("activing").selectedIndex == 1) {
$('.deact').remove();
$('.act').append(
' <a class="btn btn-success pull-right m-rl-5 rad react" onclick="reActiveAll()">' + '<i class="fa faSize fa-rotate-left"></i>' + ' </a>'
);
}
if (document.getElementById("activing").selectedIndex == 2) {
$('.deact').remove();
}
</script>
<script type="text/javascript">
$(document).ready(function() {
$('#datatable').dataTable({
"lengthMenu": [[25, 10, 50, 100, -1], [25, 10, 50, 100, "All"]]
});
});
</script>
<script>
$(document).ready(function() {
$('#datatable2').dataTable(
{
"lengthMenu": [[25, 10, 50, 100, -1], [25, 10, 50, 100, "All"]]
});
});
</script>
<script>
var checkboxes;
function selectori(source) {
checkboxes = document.getElementsByName('foo');
for (var i = 0, n = checkboxes.length; i < n; i++) {
checkboxes[i].checked = source.checked;
}
}
</script>
<script>
function deactiveAll() {
if (document.getElementById("checkSelect").checked == false) {
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " هیچ متنی انتخاب نشده است ");
} else {
if (document.getElementById("sercheCheck").value == "true") {
swal({
title: "آیا حذف این عنوان ها اطمینان دارید؟",
text: "",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "بله",
cancelButtonText: "خیر",
closeOnConfirm: false
},
function(isConfirm) {
if (isConfirm) {
checkboxes2 = document.getElementsByName('foo');
let url3b = '';
for (var i2 = 0, n2 = checkboxes2.length; i2 < n2; i2++) {
if (checkboxes2[i2].checked == true) {
const u2 = `&ids=${checkboxes2[i2].value}`;
console.log(u2);
url3b = url3b + u2;
console.log(url3b);
}
}
/* var url1 = '#showmodal=';*/
const url2b = '@Url.Page("/Company/OriginalTitle/Index", "GroupDeActive")';
/* var url3 = document.getElementById('yearSend').value;*/
window.location.href = url2b + url3b;
console.log(url2b);
}
});
}
}
}
</script>
<script>
function reActiveAll() {
console.log(document.getElementById("sercheCheck").value);
if (document.getElementById("checkSelect").checked == false) {
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " هیچ متن ی انتخاب نشده است ");
} else {
if (document.getElementById("sercheCheck").value == "false") {
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " لطفا در قسمت جستجوی متن حداقل یکی از فیلدهای عنوان،متن،بخش را انتخاب نموده و سپس جستجو را کلیک کنید ");
} else if (document.getElementById("sercheCheck").value == "true") {
swal({
title: "آیا فعال نمودن این متن ها اطمینان دارید؟",
text: "",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "بله",
cancelButtonText: "خیر",
closeOnConfirm: false
},
function(isConfirm) {
if (isConfirm) {
checkboxes2 = document.getElementsByName('foo');
let url3b = '';
for (var i2 = 0, n2 = checkboxes2.length; i2 < n2; i2++) {
if (checkboxes2[i2].checked == true) {
const u2 = `&ids=${checkboxes2[i2].value}`;
console.log(u2);
url3b = url3b + u2;
console.log(url3b);
}
}
const url2b = '@Url.Page("/Company/OriginalTitle/Index", "GroupReActive")';
console.log(url2b);
window.location.href = url2b + url3b;
}
});
}
}
}
</script>
}

View File

@@ -1,104 +0,0 @@
using CompanyManagment.App.Contracts.OriginalTitle;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace ServiceHost.Areas.Admin.Pages.Company.OriginalTitle;
public class IndexModel : PageModel
{
private readonly IOriginalTitleApplication _originalTitleApplication;
public List<OriginalTitleViewModel> OriginalTitles;
public string OriginalTitleSearch = "false";
public OriginalTitleViewModel searchModel;
public IndexModel(IOriginalTitleApplication originalTitleApplication)
{
_originalTitleApplication = originalTitleApplication;
}
public string Message { get; set; }
public void OnGet(OriginalTitleSearchModel searchModel)
{
OriginalTitles = _originalTitleApplication.Search(searchModel);
if (OriginalTitles != null)
if (!string.IsNullOrEmpty(searchModel.Title))
OriginalTitleSearch = "true";
}
public IActionResult OnGetCreate()
{
return Partial("./Create");
}
public IActionResult OnPostCreate(CreateOriginalTitle command)
{
var result = _originalTitleApplication.Create(command);
return new JsonResult(result);
}
public IActionResult OnGetEdit(long id)
{
var OriginalTitle = _originalTitleApplication.GetDetails(id);
return Partial("Edit", OriginalTitle);
}
public JsonResult OnPostEdit(EditOriginalTitle command)
{
var result = _originalTitleApplication.Edit(command);
return new JsonResult(result);
}
public IActionResult OnGetDetails(long id)
{
var editJob = _originalTitleApplication.GetDetails(id);
return Partial("Details", editJob);
}
public IActionResult OnGetDeActive(long id, string url)
{
var result = _originalTitleApplication.DeActive(id);
if (result.IsSuccedded)
return new JsonResult(url);
Message = result.Message;
return RedirectToPage(url);
}
public IActionResult OnGetIsActive(long id, string url)
{
var result = _originalTitleApplication.Active(id);
if (result.IsSuccedded)
return new JsonResult(url);
Message = result.Message;
return RedirectToPage(url);
}
public IActionResult OnGetGroupDeActive(List<long> ids)
{
foreach (var item in ids)
{
var result = _originalTitleApplication.DeActive(item);
}
return RedirectToPage("./Index");
}
public IActionResult OnGetGroupReActive(List<long> ids)
{
foreach (var item in ids)
{
var result = _originalTitleApplication.Active(item);
}
//if (result.IsSuccedded)
// return RedirectToPage("./Index");
return RedirectToPage("./Index");
}
}

View File

@@ -1,71 +0,0 @@
@model CompanyManagment.App.Contracts.Subtitle.CreateSubtitle
@{
}
@{
<style>
.select2-container {
width: 100% !important;
}
.modal-footer {
border-top: unset !important;
}
.modal .modal-dialog .modal-content .modal-footer {
padding-top: unset !important;
}
p {
direction: ltr !important;
text-align: right !important;
}
input[type=radio]:hover {
cursor: pointer;
}
.error {
font-size: 14px !important;
}
</style>
}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<form asp-page="./Index" asp-page-handler="Create" id="workshops" autocomplete="off"
method="post"
data-ajax="true"
data-callback=""
data-action="Refresh"
enctype="multipart/form-data">
<div class="modal-body">
<div class="row">
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert">
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 140px; text-align: center;"> تعریف بخش </legend>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<select class="form-control select-city" asp-for="OriginalTitle_Id" asp-items='new SelectList(Model.OriginalTitleViewModels, "Id", "Title")'>
<option value="0"> عناوین</option>
</select>
<span asp-validation-for="OriginalTitle_Id" class="error"></span>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<input type="text" class="form-control" asp-for="Subtitle" placeholder="بخش">
<span asp-validation-for="Subtitle" class="error"></span>
</div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-success btn-rounded waves-effect waves-light">ذخیره</button>
<button type="button" class="btn btn-default btn-rounded waves-effect waves-light m-b-5" data-dismiss="modal">بستن</button>
</div>
</form>
</div>

View File

@@ -1,64 +0,0 @@
@model CompanyManagment.App.Contracts.Subtitle.EditSubtitle
@{
}
@{
<style>
.select2-container {
width: 100% !important;
}
.modal-footer {
border-top: unset !important;
}
.modal .modal-dialog .modal-content .modal-footer {
padding-top: unset !important;
}
p {
direction: ltr !important;
text-align: right !important;
}
input[type=radio]:hover {
cursor: pointer;
}
</style>
}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<form asp-page="./Index" asp-page-handler="Edit" autocomplete="off"
method="post"
data-ajax="true"
data-callback=""
data-action="Refresh"
enctype="multipart/form-data">
<div class="modal-body">
<div class="row">
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert">
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 140px; text-align: center;"> ویرایش بخش </legend>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<select class="form-control select-city" asp-for="OriginalTitle_Id" asp-items='new SelectList(Model.OriginalTitleViewModels, "Id", "Title")'>
<option value="0"> عناوین</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<input type="text" class="form-control" asp-for="Subtitle" placeholder="بخش">
<span asp-validation-for="Subtitle" class="error"></span>
</div>
</div>
</div>
</fieldset>
</div>
</div>
<input type="hidden" asp-for="Id" value="@Model.Id"/>
<div class="modal-footer">
<button type="submit" class="btn btn-success btn-rounded waves-effect waves-light">ذخیره</button>
<button type="button" class="btn btn-default btn-rounded waves-effect waves-light m-b-5" data-dismiss="modal">بستن</button>
</div>
</form>
</div>

View File

@@ -1,488 +0,0 @@
@page
@using Microsoft.AspNetCore.Http.Extensions
@model ServiceHost.Areas.Admin.Pages.Company.Subtitle.IndexModel
@{
}
@{
var url = HttpContext.Request.GetEncodedUrl();
//string colaps = "in";
//string act = "active";
var i = 1;
}
@{
Layout = "Shared/_AdminLayout";
ViewData["title"] = "بخش";
}
<style>
.sizeSet {
padding: 2px !important;
text-align: center !important;
}
.rad {
border-radius: 8px !important;
/* padding: 10px; */
padding: 2px 5px 0px 5px;
}
.ionSize {
font-size: 20px !important;
top: 2px !important;
position: relative;
}
.ionRad {
border-radius: 8px !important;
padding: 0px 7px 0px 7px !important;
background-color: #ff7700 !important;
border-color: #ff7700 !important;
}
.ionRad2 {
border-radius: 8px !important;
padding: 0px 7px 0px 7px !important;
background-color: #7c7a7a !important;
border-color: #7c7a7a !important;
}
.faSize {
font-size: 22px !important;
}
.thh0 {
width: 8px !important;
}
.thh {
width: 40px !important;
}
.thh2 {
width: 130px !important;
}
.thhNastionalId {
width: 30px !important;
}
.inpt {
width: 100%;
border: 1px solid #c7c7c7;
}
.searchpanel {
background-color: #747272;
}
select {
cursor: pointer;
}
.panel-default > .panel-heading {
background-color: #950000 !important;
}
.tooltip-container {
cursor: pointer;
position: relative;
display: inline-block;
}
.tooltip2-container {
cursor: pointer;
position: relative;
display: inline-block;
}
.tooltip {
opacity: 0;
z-index: 99;
color: #fff;
width: 220px;
display: block;
font-size: 14px;
font-family: 'IranSans';
padding: 5px 10px;
border-radius: 3px;
text-align: center;
/*text-shadow: 1px 1px 2px #111;*/
background: #e67e22;
border: 1px solid #e67e22;
box-shadow: 0 0 3px rgba(0,0,0,0.5);
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
-ms-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
position: absolute;
right: -50px;
bottom: 40px;
}
.tooltip:before, .tooltip:after {
content: '';
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #e67e22;
position: absolute;
bottom: -10px;
left: 70%;
}
.tooltip-container:hover .tooltip, a:hover .tooltip {
opacity: 1;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
.tooltip2 {
opacity: 0;
z-index: 99;
color: #fff;
width: 220px;
display: block;
font-size: 14px;
font-family: 'IranSans';
padding: 5px 10px;
border-radius: 3px;
text-align: center;
/*text-shadow: 1px 1px 2px #111;*/
background: #e67e22;
border: 1px solid #e67e22;
box-shadow: 0 0 3px rgba(0,0,0,0.5);
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
-ms-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
position: absolute;
right: -90px;
bottom: 40px;
}
.tooltip2:before, .tooltip2:after {
content: '';
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #e67e22;
position: absolute;
bottom: -10px;
left: 50%;
}
.tooltip2-container:hover .tooltip2, a:hover .tooltip2 {
opacity: 1;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
</style>
<div class="row">
<div class="row">
<div class="col-sm-12 m-r-10">
<p class="pull-right">
</p>
<p class="pull-right">
<a id="btnPopModal" href="#showmodal=@Url.Page("/Company/Subtitle/Index", "Create")" class="btn btn-success btn-rounded waves-effect waves-light m-b-5" style=" background-color: #f5f5f5; border-color: #0f9500; font-family: 'Web_Yekan' !important; color: #0f9500 !important; margin-right: 10px "> <i class="fa fa-user-plus" style="padding-left: 3px; font-size: 14px; color: #0f9500 !important "></i> تعریف بخش جدید </a>
</p>
<input type="hidden" id="sercheCheck" value="@Model.SubtitleSearch"/>
</div>
</div>
<div class="col-sm-12">
<div class="panel-group panel-group-joined" id="accordion-test">
<div class="panel panel-default" style="border-radius: 15px !important; background-color: #fdc0c0; ">
<div class="panel-heading" style="background-color: #950000 !important">
<h4 class="panel-title" style="color: #edebeb !important; display: inline;">
<a data-toggle="collapse" data-parent="#accordion-test" href="#collapseOne" class="collapsed" style="display: inline;">
جستجوی بخش
</a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse in ">
<div class="panel-body" style="padding-top: 15px; padding-bottom: 15px;">
<div class="row">
<div class="col-sm-12">
<form class="form-inline" role="form" method="get" name="search-theme-form" id="search-theme-form" autocomplete="off">
<div class="form-group col-sm-12">
<div class="row">
<div class="col-sm-3 pull-right">
<select class="form-control select-city" asp-for="searchModel.OriginalTitle_Id" asp-items="Model.SelectListOriginalTitle" placeholder="عنوان" id="originalTitle" style="width: 100%">
<option value="0" selected="selected">
عنوان راانتخاب کنید
</option>
</select>
</div>
<div class="col-sm-4 pull-right">
<label class="sr-only" asp-for="searchModel.Subtitle"></label>
<input class="form-control inpt" asp-for="searchModel.Subtitle" placeholder="بخش" style="width: 100%">
</div>
</div>
<hr style=" margin-top: 12px;margin-bottom: 12px;"/>
<div class="row" style="margin-top: 15px">
<div class="col-lg-9">
<label class="sr-only" asp-for="searchModel.IsActiveString"></label>
<select id="activing" class="form-control activer" asp-for="searchModel.IsActiveString" style="background-color: #dddddd; border-radius: 25px; border: 1px solid #bfbfbf;">
<option value="true"> فعال </option>
<option value="false"> غیر فعال </option>
<option value="both"> هردو </option>
</select>
</div>
<div class="col-lg-3">
<button type="submit" class="btn btn-success btn-rounded waves-effect waves-light m-b-5 search" style="border-bottom-left-radius: 0px; border-top-left-radius: 0px; background-color: #950000; border-color: #950000; font-family: 'Web_Yekan' !important; margin-left: -3px "> <i class="fa fa-search" style="padding-left: 3px; font-size: 10px;"></i> جستجو</button>
<a class="btn btn-info btn-rounded waves-effect waves-light m-b-5" style="border-bottom-right-radius: 0px; border-top-right-radius: 0px; background-color: #545353; border-color: #545353; font-family: 'Web_Yekan' !important;" asp-page="./Index">مشاهده همه</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i> لیست عنوان ها</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-12 col-sm-12 col-xs-12">
<table id="datatable" class="table table-striped table-bordered fc-scroller">
<thead style="background-color: #ecefee">
<tr>
<th style="font-size: 10px !important; display: none" class="sizeSet">
<span class="tooltip-container">
<input class="checkboxtitle" type="checkbox" id="checkSelect" onclick="selectori(this)" checked="checked"/>
</span>
</th>
<th style="font-size: 16px !important; width: 5% !important; width: 5% !important">#</th>
<th style="font-size: 16px !important; text-align: center;width: 40% !important">عنوان</th>
<th style="font-size: 16px !important; text-align: center; width: 40% !important"> بخش </th>
<th style="font-size: 10px !important; width: 65px; ">
<span style="float: right;">
<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
</span>
<span class="act">
</span>
<a class="btn btn-danger pull-right m-rl-5 rad deact" onclick="deactiveAll()">
<i class="fa faSize fa-trash"></i>
</a>
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.Subtitles)
{
<tr>
<td style="font-size: 16px !important; text-align: center;display:none">
<input type="checkbox" name="foo" value="@item.Id" checked="checked"/>
</td>
<td style="font-size: 16px !important; text-align: center">@i </td>
<td style="font-size: 14px !important; text-align: center">@item.OriginalTitle </td>
<td style="font-size: 14px !important; text-align: center">@item.Subtitle </td>
@{
i++;
}
<td>
<a permission="20114" class="btn btn-warning pull-right m-rl-5 rad"
href="#showmodal=@Url.Page("./Index", "Edit", new { item.Id })">
<i class="fa faSize fa-edit"></i>
</a>
@if (item.IsActiveString == "true")
{
<a permission="20116" id="googleLink" class="btn btn-danger pull-right m-rl-5 fff rad" onclick="DeActive('/Admin/Company/Subtitle?id=@item.Id&amp;url=@url&amp;handler=DeActive')">
<i class="fa faSize fa-trash"></i>
</a>
}
else
{
<a permission="20116" onclick="IsActive('/Admin/Company/Subtitle?id=@item.Id&amp;url=@url&amp;handler=IsActive')" class="btn btn-success pull-right m-rl-5 rad">
<i class="fa faSize fa-rotate-left"></i>
</a>
{
}
}
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
@section PanelScripts{
<script src="~/AdminTheme/assets/js/site.js"></script>
<script src="~/AdminTheme/assets/datatables/jquery.dataTables.min.js"></script>
<script src="~/AdminTheme/assets/datatables/dataTables.bootstrap.js"></script>
<script>
$('.activer').on('change',
function(e) {
e.preventDefault();
$('.search').click();
});
</script>
<script>
if (document.getElementById("activing").selectedIndex == 1) {
$('.deact').remove();
$('.act').append(
' <a class="btn btn-success pull-right m-rl-5 rad react" onclick="reActiveAll()">' + '<i class="fa faSize fa-rotate-left"></i>' + ' </a>'
);
}
if (document.getElementById("activing").selectedIndex == 2) {
$('.deact').remove();
}
</script>
<script type="text/javascript">
$(document).ready(function() {
$('#datatable').dataTable({
"lengthMenu": [[25, 10, 50, 100, -1], [25, 10, 50, 100, "All"]]
});
});
</script>
<script>
$(document).ready(function() {
$('#datatable2').dataTable(
{
"lengthMenu": [[25, 10, 50, 100, -1], [25, 10, 50, 100, "All"]]
});
});
</script>
<script>
var checkboxes;
function selectori(source) {
checkboxes = document.getElementsByName('foo');
for (var i = 0, n = checkboxes.length; i < n; i++) {
checkboxes[i].checked = source.checked;
}
}
</script>
<script>
function deactiveAll() {
if (document.getElementById("checkSelect").checked == false) {
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " هیچ عنوانی انتخاب نشده است ");
} else {
if (document.getElementById("sercheCheck").value == "false") {
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " لطفا در قسمت جستجوی متن حداقل یکی از فیلدهای عنوان را انتخاب نموده و سپس جستجو را کلیک کنید ");
} else if (document.getElementById("sercheCheck").value == "true") {
swal({
title: "آیا غیرفعال نمودن این موارد انتخاب شده اطمینان دارید؟",
text: "",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "بله",
cancelButtonText: "خیر",
closeOnConfirm: false
},
function(isConfirm) {
if (isConfirm) {
checkboxes2 = document.getElementsByName('foo');
let url3b = '';
for (var i2 = 0, n2 = checkboxes2.length; i2 < n2; i2++) {
if (checkboxes2[i2].checked == true) {
const u2 = `&ids=${checkboxes2[i2].value}`;
console.log(u2);
url3b = url3b + u2;
console.log(url3b);
}
}
const url2b = '@Url.Page("/Company/OriginalTitle/Index", "GroupDeActive")';
window.location.href = url2b + url3b;
console.log(url2b);
}
});
}
}
}
</script>
<script>
function reActiveAll() {
if (document.getElementById("checkSelect").checked == false) {
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " هیچ بخشی انتخاب نشده است ");
} else {
if (document.getElementById("sercheCheck").value == "false") {
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " لطفا در قسمت جستجوی متن حداقل یکی از فیلدهای عنوان را انتخاب نموده و سپس جستجو را کلیک کنید ");
} else if (document.getElementById("sercheCheck").value == "true") {
swal({
title: "آیا فعال نمودن این موارد انتخاب شده اطمینان دارید؟",
text: "",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "بله",
cancelButtonText: "خیر",
closeOnConfirm: false
},
function(isConfirm) {
if (isConfirm) {
checkboxes2 = document.getElementsByName('foo');
let url3b = '';
for (var i2 = 0, n2 = checkboxes2.length; i2 < n2; i2++) {
if (checkboxes2[i2].checked == true) {
const u2 = `&ids=${checkboxes2[i2].value}`;
console.log(u2);
url3b = url3b + u2;
console.log(url3b);
}
}
const url2b = '@Url.Page("/Company/OriginalTitle/Index", "GroupReActive")';
console.log(url2b);
window.location.href = url2b + url3b;
}
});
}
}
}
</script>
}

View File

@@ -1,124 +0,0 @@
using CompanyManagment.App.Contracts.OriginalTitle;
using CompanyManagment.App.Contracts.Subtitle;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace ServiceHost.Areas.Admin.Pages.Company.Subtitle;
public class IndexModel : PageModel
{
private readonly IOriginalTitleApplication _originalTitleApplication;
private readonly ISubtitleApplication _subtitleApplication;
public SelectList categoryListItems;
public string OriginalTitleSearch = "false";
public SubtitleSearchModel searchModel;
public SelectList SelectListOriginalTitle;
public List<SubtitleViewModel> Subtitles;
public string SubtitleSearch = "false";
public IndexModel(ISubtitleApplication subtitleApplication, IOriginalTitleApplication originalTitleApplication)
{
_subtitleApplication = subtitleApplication;
_originalTitleApplication = originalTitleApplication;
}
public string Message { get; set; }
public void OnGet(SubtitleSearchModel searchModel)
{
SelectListOriginalTitle = new SelectList(_originalTitleApplication.GetAllOriginalTitle(), "Id", "Title");
Subtitles = _subtitleApplication.Search(searchModel);
if (Subtitles != null)
if (searchModel.OriginalTitle_Id != 0)
SubtitleSearch = "true";
}
public IActionResult OnGetCreate()
{
var allCategory = new CreateSubtitle
{
OriginalTitleViewModels = _originalTitleApplication.GetAllOriginalTitle()
};
return Partial("./Create", allCategory);
}
public IActionResult OnPostCreate(CreateSubtitle command)
{
var result = _subtitleApplication.Create(command);
return new JsonResult(result);
}
public IActionResult OnGetEdit(long id)
{
var Subtitle = _subtitleApplication.GetDetails(id);
var SubtitleEdit = new EditSubtitle
{
Id = id,
Subtitle = Subtitle.Subtitle,
OriginalTitle_Id = Subtitle.OriginalTitle_Id,
OriginalTitleViewModels = _originalTitleApplication.GetAllOriginalTitle()
};
return Partial("Edit", SubtitleEdit);
}
public JsonResult OnPostEdit(EditSubtitle command)
{
var result = _subtitleApplication.Edit(command);
return new JsonResult(result);
}
public JsonResult OnPostDelete(EditSubtitle command)
{
var result = _subtitleApplication.Edit(command);
return new JsonResult(result);
}
public IActionResult OnGetDetails(long id)
{
var editJob = _subtitleApplication.GetDetails(id);
return Partial("Details", editJob);
}
public IActionResult OnGetGroupDeActive(List<long> ids)
{
foreach (var item in ids)
{
var result = _subtitleApplication.DeActive(item);
}
return RedirectToPage("./Index");
}
public IActionResult OnGetGroupReActive(List<long> ids)
{
foreach (var item in ids)
{
var result = _subtitleApplication.Active(item);
}
return RedirectToPage("./Index");
}
public IActionResult OnGetDeActive(long id, string url)
{
var result = _subtitleApplication.DeActive(id);
if (result.IsSuccedded)
return new JsonResult(url);
Message = result.Message;
return RedirectToPage(url);
}
public IActionResult OnGetIsActive(long id, string url)
{
var result = _subtitleApplication.Active(id);
if (result.IsSuccedded)
return new JsonResult(url);
Message = result.Message;
return RedirectToPage(url);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -281,7 +281,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout
return File(excelBytes,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
$"گزارش تجمیعی فیش حقوقی غیر رسمی موقت.xlsx");
$"گزارش تجمیعی فیش حقوقی غیر رسمی نهایی.xlsx");
}

View File

@@ -12,10 +12,10 @@
//"MesbahDb": "Data Source=DESKTOP-NUE119G\\MSNEW;Initial Catalog=Mesbah_db;Integrated Security=True"
//server
"MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]is[3019]#@ATt;TrustServerCertificate=true;"
//"MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]is[3019]#@ATt;TrustServerCertificate=true;"
//local
//"MesbahDb": "Data Source=.;Initial Catalog=mesbah_db;Integrated Security=True;TrustServerCertificate=true;"
"MesbahDb": "Data Source=.;Initial Catalog=mesbah_db;Integrated Security=True;TrustServerCertificate=true;"
},
"GoogleRecaptchaV3": {
"SiteKey": "6Lfhp_AnAAAAAB79WkrMoHd1k8ir4m8VvfjE7FTH",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -70,8 +70,9 @@
width: 100%;
padding: 3px 7px;
border-radius: 7px;
background: #dfe3ea;
background: #ffffff;
color: #575a5d;
border: 1px solid #DADADA;
font-size: 12px;
font-weight: 400;
cursor: pointer;
@@ -182,7 +183,7 @@ svg {
width: 100%;
padding: 3px 7px;
border-radius: 7px;
background: #f6f6f6;
background: #ffffff;
color: #575a5d;
border: 1px solid #DADADA;
font-size: 12px;
@@ -280,7 +281,7 @@ svg {
width: 100%;
padding: 3px 7px;
border-radius: 7px;
background: #f6f6f6;
background: #ffffff;
color: #575a5d;
border: 1px solid #DADADA;
font-size: 12px;
@@ -378,7 +379,7 @@ svg {
width: 100%;
padding: 3px 7px;
border-radius: 7px;
background: #f6f6f6;
background: #ffffff;
color: #575a5d;
border: 1px solid #DADADA;
font-size: 12px;
@@ -465,6 +466,15 @@ svg {
}
@media screen and (max-width: 1366px) {
.wrapper-dropdown .selected-display {
width: 130px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
@media screen and (max-width: 1024px) {
.wrapper-dropdown-year .dropdown-year {
width: 120px;
@@ -488,4 +498,73 @@ svg {
.wrapper-dropdown-year .dropdown-year {
right: initial;
}
}
/*-------------------------------------------------------------------------------------------------- DropDown Global */
.dropdown-global {
position: relative;
}
.dropdown-global-btn {
padding: 5px 10px 5px 0;
border-radius: 6px;
font-size: 15px;
cursor: pointer;
-webkit-transition: .3s;
-o-transition: .3s;
transition: .3s;
background: #FFF;
gap: 10px;
color: #000000;
font-weight: 400;
width: 100%;
border: 1px solid #ddd;
display: flex;
align-items: center;
justify-content: space-between;
-moz-font-feature-settings: "ss02";
-webkit-font-feature-settings: "ss02";
font-feature-settings: "ss02";
}
.dropdown-global-content {
display: none;
position: absolute;
top: calc(100% + 5px);
border: 1px solid #E8EDF9;
background: #ffffff;
padding: 5px;
left: 0;
border-radius: 6px;
right: auto;
box-shadow: 1px 6px 18px -12px #0000006e;
flex-direction: column;
gap: 10px 0;
min-width: 100%;
z-index: 50;
height: 220px;
overflow: hidden;
}
.dropdown-global-item {
padding: 4px 10px;
cursor: pointer;
border-radius: 5px;
transition: all 0.3s ease-in
}
.dropdown-global-item.active {
background-color: #3ad1d1;
color: #fff;
}
.dropdown-global-item:hover {
background-color: #3ad1d1;
color: #fff;
}
.dropdown-global.active .dropdown-global-content {
display: flex;
}

View File

@@ -227,3 +227,39 @@ $(document).ready(function () {
}
}
});
// ---------------------------------------------------------------------------- DropDown Global
$(document).ready(function () {
let selectedItemValue = '';
$('.dropdown-global-btn').click(function () {
var dropdown = $(this).closest('.dropdown-global');
$('.dropdown-global').not(dropdown).removeClass('active');
dropdown.toggleClass('active');
});
$('.dropdown-global-item').click(function () {
$('.dropdown-global-item').removeClass('active');
$(this).addClass('active');
var selectedItem = $(this).text();
selectedItemValue = $(this).data('value');
var dropdown = $(this).closest('.dropdown-global');
dropdown.find('.dropdown-global-btn').contents().filter(function () {
return this.nodeType === 3;
}).first().replaceWith(selectedItem + ' ');
dropdown.removeClass('active');
});
$(document).click(function () {
$('.dropdown-global').removeClass('active');
});
$('.dropdown-global').click(function (e) {
e.stopPropagation();
});
});