Browse Source

单位

bjmzak
wxd 2 years ago
parent
commit
e91ab03bea
  1. 11
      src/Shentun.Peis.Application.Contracts/CustomerOrgs/CreateCustomerOrgDto.cs
  2. 11
      src/Shentun.Peis.Application.Contracts/CustomerOrgs/UpdateCustomerOrgDto.cs
  3. 2
      src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
  4. 15
      src/Shentun.Peis.Domain/CustomerOrgs/CustomerOrg.cs
  5. 8
      src/Shentun.Peis.Domain/CustomerOrgs/CustomerOrgManager.cs
  6. 3
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/CustomerOrgs/CustomerOrgDbMapping.cs
  7. 14265
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240509150153_init2024050900.Designer.cs
  8. 39
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240509150153_init2024050900.cs
  9. 12
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

11
src/Shentun.Peis.Application.Contracts/CustomerOrgs/CreateCustomerOrgDto.cs

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
namespace Shentun.Peis.CustomerOrgs
@ -108,5 +109,15 @@ namespace Shentun.Peis.CustomerOrgs
/// 国家组织机构代码
/// </summary>
public string CountryOrgCode { get; set; }
/// <summary>
/// 销售员
/// </summary>
public string SalesPerson { get; set; }
/// <summary>
/// 销售员电话
/// </summary>
public string SalesPersonPhone { get; set; }
}
}

11
src/Shentun.Peis.Application.Contracts/CustomerOrgs/UpdateCustomerOrgDto.cs

@ -108,5 +108,16 @@ namespace Shentun.Peis.CustomerOrgs
/// 国家组织机构代码
/// </summary>
public string CountryOrgCode { get; set; }
/// <summary>
/// 销售员
/// </summary>
public string SalesPerson { get; set; }
/// <summary>
/// 销售员电话
/// </summary>
public string SalesPersonPhone { get; set; }
}
}

2
src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs

@ -1158,7 +1158,7 @@ namespace Shentun.Peis.PatientRegisters
}
//var hjk = sumquery.ToQueryString();
int totalCount = sumquery.Count();

15
src/Shentun.Peis.Domain/CustomerOrgs/CustomerOrg.cs

@ -142,6 +142,21 @@ namespace Shentun.Peis.Models
public string CountryOrgCode { get; set; }
/// <summary>
/// 销售员
/// </summary>
[Column("sales_person")]
[StringLength(50)]
public string SalesPerson { get; set; }
/// <summary>
/// 销售员电话
/// </summary>
[Column("sales_person_phone")]
[StringLength(20)]
public string SalesPersonPhone { get; set; }
//[Column("creator_id")]
//public Guid CreatorId { get; set; }
//[Column("creation_time", TypeName = "timestamp without time zone")]

8
src/Shentun.Peis.Domain/CustomerOrgs/CustomerOrgManager.cs

@ -105,8 +105,9 @@ namespace Shentun.Peis.CustomerOrgs
ShortName = entity.ShortName,
IsActive = entity.IsActive,
Telephone = entity.Telephone,
CountryOrgCode = entity.CountryOrgCode
CountryOrgCode = entity.CountryOrgCode,
SalesPerson = entity.SalesPerson,
SalesPersonPhone = entity.SalesPersonPhone
};
}
/// <summary>
@ -164,7 +165,8 @@ namespace Shentun.Peis.CustomerOrgs
targetEntity.IsActive = sourceEntity.IsActive;
targetEntity.Telephone = sourceEntity.Telephone;
targetEntity.CountryOrgCode = sourceEntity.CountryOrgCode;
targetEntity.SalesPerson = sourceEntity.SalesPerson;
targetEntity.SalesPersonPhone = sourceEntity.SalesPersonPhone;
}

3
src/Shentun.Peis.EntityFrameworkCore/DbMapping/CustomerOrgs/CustomerOrgDbMapping.cs

@ -65,6 +65,9 @@ namespace Shentun.Peis.DbMapping
entity.Property(e => e.Telephone).HasComment("联系电话");
entity.Property(e => e.SalesPerson).HasComment("销售员");
entity.Property(e => e.SalesPersonPhone).HasComment("销售员电话");
//9527
//entity.HasOne(d => d.OrganizationUnit)
// .WithMany(p => p.CustomerOrgs)

14265
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240509150153_init2024050900.Designer.cs
File diff suppressed because it is too large
View File

39
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240509150153_init2024050900.cs

@ -0,0 +1,39 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class init2024050900 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "sales_person",
table: "customer_org",
type: "character varying(50)",
maxLength: 50,
nullable: true,
comment: "销售员");
migrationBuilder.AddColumn<string>(
name: "sales_person_phone",
table: "customer_org",
type: "character varying(20)",
maxLength: 20,
nullable: true,
comment: "销售员电话");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "sales_person",
table: "customer_org");
migrationBuilder.DropColumn(
name: "sales_person_phone",
table: "customer_org");
}
}
}

12
src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

@ -2604,6 +2604,18 @@ namespace Shentun.Peis.Migrations
.HasColumnName("remark")
.HasComment("备注");
b.Property<string>("SalesPerson")
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("sales_person")
.HasComment("销售员");
b.Property<string>("SalesPersonPhone")
.HasMaxLength(20)
.HasColumnType("character varying(20)")
.HasColumnName("sales_person_phone")
.HasComment("销售员电话");
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(20)

Loading…
Cancel
Save