|
@@ -1,6 +1,7 @@
|
|
|
package oilsupplier
|
|
package oilsupplier
|
|
|
|
|
|
|
|
import (
|
|
import (
|
|
|
|
|
+ "dashoo.cn/backend/api/business/oilsupplier/badrecord"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/supplierdataentry"
|
|
"dashoo.cn/backend/api/business/oilsupplier/supplierdataentry"
|
|
|
"dashoo.cn/backend/api/business/workflow"
|
|
"dashoo.cn/backend/api/business/workflow"
|
|
|
. "dashoo.cn/backend/api/controllers"
|
|
. "dashoo.cn/backend/api/controllers"
|
|
@@ -328,7 +329,13 @@ func (this *SupplierDataEntryController) PdfExport() {
|
|
|
svc.GetEntityByWhere(OilSupplierCertName, where2, &model2)
|
|
svc.GetEntityByWhere(OilSupplierCertName, where2, &model2)
|
|
|
|
|
|
|
|
var tabledata []supplierdataentry.SupplierCertSubEntry
|
|
var tabledata []supplierdataentry.SupplierCertSubEntry
|
|
|
- svc.GetEntitysByOrderbyWhere(OilSupplierCertSubName, where2, "1", &tabledata)
|
|
|
|
|
|
|
+ where3:="SupplierId = '" + Id + "' and SupplierTypecode='"+ SupplierTypeCode +"' and CertSubStatus='1'"//准入状态的准入项
|
|
|
|
|
+ svc.GetEntitysByOrderbyWhere(OilSupplierCertSubName, where3, "1", &tabledata)
|
|
|
|
|
+
|
|
|
|
|
+ var tabledata2 []supplierdataentry.SupplierCertSubEntry
|
|
|
|
|
+ where4:="SupplierId = '" + Id + "' and SupplierTypecode='"+ SupplierTypeCode +"' and CertSubStatus='2'"//暂停状态的准入项
|
|
|
|
|
+ svc.GetEntitysByOrderbyWhere(OilSupplierCertSubName, where4, "1", &tabledata2)
|
|
|
|
|
+
|
|
|
|
|
|
|
|
datamap := StructToMapDemo(model1)
|
|
datamap := StructToMapDemo(model1)
|
|
|
|
|
|
|
@@ -382,9 +389,29 @@ func (this *SupplierDataEntryController) PdfExport() {
|
|
|
datamap["BusinessScope"] = model1.BusinessScope
|
|
datamap["BusinessScope"] = model1.BusinessScope
|
|
|
datamap["Telphone"] = model1.Telphone
|
|
datamap["Telphone"] = model1.Telphone
|
|
|
|
|
|
|
|
|
|
+ //获取准入项不良记录
|
|
|
|
|
+ if len(tabledata2) != 0{
|
|
|
|
|
+ var badRecord BadRecord.BadRecord
|
|
|
|
|
+ svc.GetEntity(&badRecord,"CompanyCode='"+Id+"'")
|
|
|
|
|
+ //拼接已暂停准入范围编码名称
|
|
|
|
|
+ var Name string
|
|
|
|
|
+ Name = "\n已暂停: " + tabledata2[0].Code
|
|
|
|
|
+ Name = Name + " " + tabledata2[0].Name
|
|
|
|
|
+ var i int
|
|
|
|
|
+ for i = 1; i < len(tabledata2); i++ {
|
|
|
|
|
+ Name += ";"
|
|
|
|
|
+ Name += tabledata2[i].Code
|
|
|
|
|
+ Name = Name + " " + tabledata2[i].Name
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ datamap["Name"]=Name + " \n暂停原因:"+badRecord.Certrecord+""
|
|
|
|
|
+ }else{
|
|
|
|
|
+ datamap["Name"] = ""
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if len(tabledata) != 0 {
|
|
if len(tabledata) != 0 {
|
|
|
var Name string
|
|
var Name string
|
|
|
- Name = tabledata[0].Code
|
|
|
|
|
|
|
+ Name = "\n\n正常准入: "+ tabledata[0].Code
|
|
|
Name = Name + " " + tabledata[0].Name
|
|
Name = Name + " " + tabledata[0].Name
|
|
|
var i int
|
|
var i int
|
|
|
for i = 1; i < len(tabledata) && i < 100; i++ {
|
|
for i = 1; i < len(tabledata) && i < 100; i++ {
|
|
@@ -395,9 +422,10 @@ func (this *SupplierDataEntryController) PdfExport() {
|
|
|
if i == 100 {
|
|
if i == 100 {
|
|
|
Name += "(准入范围未完全显示,请到系统查看详情)"
|
|
Name += "(准入范围未完全显示,请到系统查看详情)"
|
|
|
}
|
|
}
|
|
|
- datamap["Name"] = Name
|
|
|
|
|
|
|
+
|
|
|
|
|
+ datamap["Name"] =datamap["Name"].(string) + Name
|
|
|
} else {
|
|
} else {
|
|
|
- datamap["Name"] = ""
|
|
|
|
|
|
|
+ datamap["Name"] =datamap["Name"].(string)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*var interfaceSlice2 = make([]interface{}, len(tabledata))
|
|
/*var interfaceSlice2 = make([]interface{}, len(tabledata))
|