Compare commits

..

2 Commits

Author SHA1 Message Date
JNG
5f2089fa53 Merge branch 'jng-supplier-0105' into dev 2026-01-15 16:13:20 +08:00
JNG
4f544673bb 加一个字段 2026-01-15 16:12:53 +08:00
4 changed files with 56 additions and 9 deletions

View File

@ -820,6 +820,7 @@ type GetSupplierListRequest struct {
Status uint64 `protobuf:"varint,23,opt,name=status,proto3" json:"status"`
UpdateStart string `protobuf:"bytes,24,opt,name=updateStart,proto3" json:"updateStart"`
UpdateEnd string `protobuf:"bytes,25,opt,name=updateEnd,proto3" json:"updateEnd"`
ConnectedParty string `protobuf:"bytes,26,opt,name=connectedParty,proto3" json:"connectedParty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -1029,6 +1030,13 @@ func (x *GetSupplierListRequest) GetUpdateEnd() string {
return ""
}
func (x *GetSupplierListRequest) GetConnectedParty() string {
if x != nil {
return x.ConnectedParty
}
return ""
}
type GetSupplierListResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
@ -1126,6 +1134,7 @@ type SupplierInfo struct {
SupplierUniqueCode string `protobuf:"bytes,25,opt,name=supplierUniqueCode,proto3" json:"supplierUniqueCode"`
OwningEntityName string `protobuf:"bytes,26,opt,name=owningEntityName,proto3" json:"owningEntityName"`
CountryOrRegionCode string `protobuf:"bytes,27,opt,name=countryOrRegionCode,proto3" json:"countryOrRegionCode"`
ConnectedParty string `protobuf:"bytes,28,opt,name=connectedParty,proto3" json:"connectedParty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -1349,6 +1358,13 @@ func (x *SupplierInfo) GetCountryOrRegionCode() string {
return ""
}
func (x *SupplierInfo) GetConnectedParty() string {
if x != nil {
return x.ConnectedParty
}
return ""
}
type UpdateSupplierRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
@ -1373,6 +1389,7 @@ type UpdateSupplierRequest struct {
SupplementaryText string `protobuf:"bytes,20,opt,name=supplementaryText,proto3" json:"supplementaryText"`
Attachments []*Attachment `protobuf:"bytes,21,rep,name=attachments,proto3" json:"attachments"`
Status uint64 `protobuf:"varint,22,opt,name=status,proto3" json:"status"`
ConnectedParty string `protobuf:"bytes,23,opt,name=connectedParty,proto3" json:"connectedParty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -1561,6 +1578,13 @@ func (x *UpdateSupplierRequest) GetStatus() uint64 {
return 0
}
func (x *UpdateSupplierRequest) GetConnectedParty() string {
if x != nil {
return x.ConnectedParty
}
return ""
}
type CreateSupplierRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
OwningEntityId uint64 `protobuf:"varint,1,opt,name=owningEntityId,proto3" json:"owningEntityId"`
@ -1584,6 +1608,7 @@ type CreateSupplierRequest struct {
SupplementaryText string `protobuf:"bytes,19,opt,name=supplementaryText,proto3" json:"supplementaryText"`
Attachments []*Attachment `protobuf:"bytes,20,rep,name=attachments,proto3" json:"attachments"`
Status uint64 `protobuf:"varint,21,opt,name=status,proto3" json:"status"`
ConnectedParty string `protobuf:"bytes,22,opt,name=connectedParty,proto3" json:"connectedParty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -1765,6 +1790,13 @@ func (x *CreateSupplierRequest) GetStatus() uint64 {
return 0
}
func (x *CreateSupplierRequest) GetConnectedParty() string {
if x != nil {
return x.ConnectedParty
}
return ""
}
type Attachment struct {
state protoimpl.MessageState `protogen:"open.v1"`
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"`
@ -1980,7 +2012,7 @@ const file_api_supplier_supplier_proto_rawDesc = "" +
" GetOrganizeDictionaryListRequest\x12\x12\n" +
"\x04page\x18\x01 \x01(\x04R\x04page\x12\x1a\n" +
"\bpageSize\x18\x02 \x01(\x04R\bpageSize\x12\x12\n" +
"\x04name\x18\x03 \x01(\tR\x04name\"\xa4\b\n" +
"\x04name\x18\x03 \x01(\tR\x04name\"\xcc\b\n" +
"\x16GetSupplierListRequest\x12\x12\n" +
"\x04page\x18\x01 \x01(\x04R\x04page\x12\x1a\n" +
"\bpageSize\x18\x02 \x01(\x04R\bpageSize\x12&\n" +
@ -2007,12 +2039,13 @@ const file_api_supplier_supplier_proto_rawDesc = "" +
"\x17basicCompanyInformation\x18\x16 \x01(\tR\x17basicCompanyInformation\x12\x16\n" +
"\x06status\x18\x17 \x01(\x04R\x06status\x12 \n" +
"\vupdateStart\x18\x18 \x01(\tR\vupdateStart\x12\x1c\n" +
"\tupdateEnd\x18\x19 \x01(\tR\tupdateEnd\"\x8b\x01\n" +
"\tupdateEnd\x18\x19 \x01(\tR\tupdateEnd\x12&\n" +
"\x0econnectedParty\x18\x1a \x01(\tR\x0econnectedParty\"\x8b\x01\n" +
"\x17GetSupplierListResponse\x12\x14\n" +
"\x05total\x18\x01 \x01(\x04R\x05total\x12*\n" +
"\x04data\x18\x02 \x03(\v2\x16.supplier.SupplierInfoR\x04data\x12\x12\n" +
"\x04page\x18\x03 \x01(\x04R\x04page\x12\x1a\n" +
"\bpageSize\x18\x04 \x01(\x04R\bpageSize\"\xf0\b\n" +
"\bpageSize\x18\x04 \x01(\x04R\bpageSize\"\x98\t\n" +
"\fSupplierInfo\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x04R\x02id\x12&\n" +
"\x0eowningEntityId\x18\x02 \x01(\x04R\x0eowningEntityId\x12\x1c\n" +
@ -2041,7 +2074,8 @@ const file_api_supplier_supplier_proto_rawDesc = "" +
"\tupdatedAt\x18\x18 \x01(\tR\tupdatedAt\x12.\n" +
"\x12supplierUniqueCode\x18\x19 \x01(\tR\x12supplierUniqueCode\x12*\n" +
"\x10owningEntityName\x18\x1a \x01(\tR\x10owningEntityName\x120\n" +
"\x13countryOrRegionCode\x18\x1b \x01(\tR\x13countryOrRegionCode\"\xaf\a\n" +
"\x13countryOrRegionCode\x18\x1b \x01(\tR\x13countryOrRegionCode\x12&\n" +
"\x0econnectedParty\x18\x1c \x01(\tR\x0econnectedParty\"\xd7\a\n" +
"\x15UpdateSupplierRequest\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x04R\x02id\x12&\n" +
"\x0eowningEntityId\x18\x02 \x01(\x04R\x0eowningEntityId\x12\x1c\n" +
@ -2065,7 +2099,8 @@ const file_api_supplier_supplier_proto_rawDesc = "" +
"\vlinkAddress\x18\x13 \x01(\tR\vlinkAddress\x12,\n" +
"\x11supplementaryText\x18\x14 \x01(\tR\x11supplementaryText\x126\n" +
"\vattachments\x18\x15 \x03(\v2\x14.supplier.attachmentR\vattachments\x12\x16\n" +
"\x06status\x18\x16 \x01(\x04R\x06status\"\x9f\a\n" +
"\x06status\x18\x16 \x01(\x04R\x06status\x12&\n" +
"\x0econnectedParty\x18\x17 \x01(\tR\x0econnectedParty\"\xc7\a\n" +
"\x15CreateSupplierRequest\x12&\n" +
"\x0eowningEntityId\x18\x01 \x01(\x04R\x0eowningEntityId\x12\x1c\n" +
"\tlegalName\x18\x02 \x01(\tR\tlegalName\x12\x1c\n" +
@ -2088,7 +2123,8 @@ const file_api_supplier_supplier_proto_rawDesc = "" +
"\vlinkAddress\x18\x12 \x01(\tR\vlinkAddress\x12,\n" +
"\x11supplementaryText\x18\x13 \x01(\tR\x11supplementaryText\x126\n" +
"\vattachments\x18\x14 \x03(\v2\x14.supplier.attachmentR\vattachments\x12\x16\n" +
"\x06status\x18\x15 \x01(\x04R\x06status\"F\n" +
"\x06status\x18\x15 \x01(\x04R\x06status\x12&\n" +
"\x0econnectedParty\x18\x16 \x01(\tR\x0econnectedParty\"F\n" +
"\n" +
"attachment\x12\x10\n" +
"\x03url\x18\x01 \x01(\tR\x03url\x12\x12\n" +

View File

@ -111,6 +111,7 @@ message GetSupplierListRequest{
uint64 status = 23;
string updateStart = 24;
string updateEnd = 25;
string connectedParty = 26;
}
message GetSupplierListResponse{
uint64 total = 1;
@ -146,6 +147,7 @@ message SupplierInfo{
string supplierUniqueCode = 25;
string owningEntityName = 26;
string countryOrRegionCode = 27;
string connectedParty = 28;
}
message UpdateSupplierRequest{
uint64 id = 1;
@ -170,6 +172,7 @@ message UpdateSupplierRequest{
string supplementaryText = 20;
repeated attachment attachments = 21;
uint64 status = 22;
string connectedParty = 23;
}
message CreateSupplierRequest{
uint64 owningEntityId = 1;
@ -193,6 +196,7 @@ message CreateSupplierRequest{
string supplementaryText = 19;
repeated attachment attachments = 20;
uint64 status = 21;
string connectedParty = 22;
}
message attachment{
string url = 1;

View File

@ -30,6 +30,7 @@ type SupplierLogic struct {
DataOwnerDepartment string `json:"dataOwnerDepartment"`
BasicCompanyInformation string `json:"basicCompanyInformation"`
SupplementaryText string `json:"supplementaryText"`
ConnectedParty string `json:"connectedParty"`
}
type ErrSupplierRes struct {
ID int `json:"id"`
@ -96,6 +97,7 @@ func getListFromRaw(list []map[int]string) ([]*SupplierLogic, error) {
"数据维护部门&人员/Data Owner Department/Personnel": "dataOwnerDepartment",
"公司信息概要/Summary of Basic Company Information": "basicCompanyInformation",
"其他补充信息/Other Supplementary Information": "supplementaryText",
"*是否关联方/Connected party": "connectedParty",
}
keyMap := list[0]
for index, tt := range list {
@ -149,6 +151,8 @@ func getListFromRaw(list []map[int]string) ([]*SupplierLogic, error) {
temp.BasicCompanyInformation = t
case "supplementaryText":
temp.SupplementaryText = t
case "connectedParty":
temp.ConnectedParty = t
}
}

View File

@ -174,7 +174,7 @@ func CreateImportRecord(c *gin.Context) {
var ErrSupplierRes []*logic.ErrSupplierRes
for idx, i := range supplierList {
rowNum := idx + 1
if i.OwningEntityName == "" || i.LegalName == "" || i.CountryOrRegionName == "" || i.CompanyRegistrationNumber == "" || i.SupplierType == "" || i.ApprovalStatus == "" {
if i.OwningEntityName == "" || i.LegalName == "" || i.CountryOrRegionName == "" || i.CompanyRegistrationNumber == "" || i.SupplierType == "" || i.ApprovalStatus == "" || i.ConnectedParty == "" {
ErrSupplierRes = append(ErrSupplierRes, &logic.ErrSupplierRes{
ID: rowNum,
LegalName: i.LegalName,
@ -230,6 +230,7 @@ func CreateImportRecord(c *gin.Context) {
BasicCompanyInformation: i.BasicCompanyInformation,
SupplementaryText: i.SupplementaryText,
Status: 1,
ConnectedParty: i.ConnectedParty,
})
if err != nil {
ErrSupplierRes = append(ErrSupplierRes, &logic.ErrSupplierRes{
@ -311,7 +312,7 @@ func GetExportList(c *gin.Context) {
// 定义标题列表
titleList := []string{
"状态/State", "使用组织/Owning Entity", "供应商唯一编码/SupplierUnique Code", "供应商法定全称(英文)/LegalName (English)", "供应商本地名称(如有)/LocalName (if applicable)",
"所在国家或地区/Country or Region", "公司注册编号/Company RegistrationNumber", "供应商类型/Supplier Type", "准入状态/Approval Status", "准入日期/ApprovalDate",
"所在国家或地区/Country or Region", "公司注册编号/Company RegistrationNumber", "供应商类型/Supplier Type", "*是否关联方/Connected party", "准入状态/Approval Status", "准入日期/ApprovalDate",
"法律实体形式/Legal Entity Type", "制裁与高风险国家筛查结果/Sanctions & High-RiskCountry Screening Result", "关键财务与付款信息/Key Financial & Payment Information",
"公司地址/Company Address", "主要联系人、职位及联系方式/Primary Contact,Position&Details", "数据维护部门&人员/Data Owner Department/Personnel", "最后更新日期/Last Updated Date",
"公司信息概要/Summary of Basic Company Information",
@ -326,6 +327,7 @@ func GetExportList(c *gin.Context) {
CountryOrRegion string
CompanyRegistrationNumber string
SupplierType string
ConnectedParty string
ApprovalStatus string
ApprovalDate string
LegalEntityType string
@ -355,6 +357,7 @@ func GetExportList(c *gin.Context) {
CountryOrRegion: info.CountryOrRegionCode,
CompanyRegistrationNumber: info.CompanyRegistrationNumber,
SupplierType: info.SupplierType,
ConnectedParty: info.ConnectedParty,
ApprovalStatus: info.ApprovalStatus,
ApprovalDate: info.ApprovalDate,
LegalEntityType: info.LegalEntityType,
@ -372,7 +375,7 @@ func GetExportList(c *gin.Context) {
for _, data := range dataMap {
dataList = append(dataList, &[]any{
data.Status, data.OwningEntity, data.SupplierUniqueCode, data.LegalName, data.LocalName,
data.CountryOrRegion, data.CompanyRegistrationNumber, data.SupplierType, data.ApprovalStatus, data.ApprovalDate,
data.CountryOrRegion, data.CompanyRegistrationNumber, data.SupplierType, data.ConnectedParty, data.ApprovalStatus, data.ApprovalDate,
data.LegalEntityType, data.SanctionsCountryScreeningResult, data.KeyFinancial, data.CompanyAddress, data.PrimaryContact,
data.DataOwnerDepartment, data.UpdatedAt, data.BasicCompanyInformation,
})