Jelajahi Sumber

bug

Signed-off-by: lijunqing <lijunqing@dashoo.cn>
lijunqing 6 tahun lalu
induk
melakukan
81497b8cb4

+ 3 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappendsub.go

@@ -123,6 +123,7 @@ func (this *OilSupplierCertAppendSubController) AddAppendSub() {
 	json.Unmarshal(jsonblob, &model)
 	model.CreateBy = this.User.Realname
 	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+	model.CertSubStatus="1"
 	svc := suppliercertsub.GetOilSupplierCertSubService(utils.DBE)
 	var submodel suppliercertsub.OilSupplierCertSub
 	where_certsub := " SupplierCertId = "+ utils.ToStr(model.SupplierCertId) + " and SupplierTypeCode = 02"
@@ -261,6 +262,7 @@ func (this *OilSupplierCertAppendSubController) AddTechBus() {
 			datamain.Code = dataother.CheckList[n].Code
 			datamain.Name = dataother.CheckList[n].Name
 			datamain.Remark = dataother.Remark
+			datamain.CertSubStatus="1"
 			datamain.IsDelete = 0
 			datamain.CreateBy = this.User.Realname
 			datamain.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
@@ -371,6 +373,7 @@ func (this *OilSupplierCertAppendSubController) AddGoodsBus() {
 			datamain.SubClassId, _ = utils.StrTo(dataother.CheckList[n].Id).Int()
 			datamain.Code = dataother.CheckList[n].Code
 			datamain.Name = dataother.CheckList[n].Name
+			datamain.CertSubStatus="1"
 			datamain.Remark = dataother.Remark
 			datamain.IsDelete = 0
 			datamain.CreateBy = this.User.Realname

+ 3 - 3
src/dashoo.cn/backend/api/controllers/oilsupplier/supplierdataentry.go

@@ -94,7 +94,7 @@ func (this *SupplierDataEntryController) DocExport() {
 	svc.GetSelect(OilPatentStatisticalName, where5, &tabledata5)
 	where9 := "SupplierCertId = " + SupplierCertId + " LIMIT 9"
 	svc.GetSelect(OilWinningProjectName, where9, &tabledata6)
-	where := "SupplierCertId = " + SupplierCertId
+	where := "SupplierCertId = " + SupplierCertId+" and Type in ('1','3') and CertSubStatus='1'"
 	svc.GetEntitysByOrderbyWhere(OilSupplierCertSubName, where, "1", &tabledata7)
 
 	datamap := StructToMapDemo(model1.OilSupplier)
@@ -329,11 +329,11 @@ func (this *SupplierDataEntryController) PdfExport() {
 	svc.GetEntityByWhere(OilSupplierCertName, where2, &model2)
 
 	var tabledata []supplierdataentry.SupplierCertSubEntry
-	where3:="SupplierId = '" + Id + "' and SupplierTypecode='"+ SupplierTypeCode +"' and CertSubStatus='1'"//准入状态的准入项
+	where3:="SupplierId = '" + Id + "' and SupplierTypecode='"+ SupplierTypeCode +"' and CertSubStatus='1' and Type in ('1','3')"//准入状态的准入项
 	svc.GetEntitysByOrderbyWhere(OilSupplierCertSubName, where3, "1", &tabledata)
 
 	var tabledata2 []supplierdataentry.SupplierCertSubEntry
-	where4:="SupplierId = '" + Id + "' and SupplierTypecode='"+ SupplierTypeCode +"' and CertSubStatus='2'"//暂停状态的准入项
+	where4:="SupplierId = '" + Id + "' and SupplierTypecode='"+ SupplierTypeCode +"' and CertSubStatus='2' and Type in ('1','3')"//暂停状态的准入项
 	svc.GetEntitysByOrderbyWhere(OilSupplierCertSubName, where4, "1", &tabledata2)