lining 6 anos atrás
pai
commit
55bd504858

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

@@ -197,13 +197,15 @@ func (this *OilSupplierCertAppendController) AddAppend() {
 	svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
 	where_app := " SupplierCertId = "+ utils.ToStr(model.SupplierCertId)+ " and SupplierId = "+ utils.ToStr(model.SupplierId)+ " and AppendType = '"+ model.AppendType +"'"
 	where_app += " and Status < 6"
-	has := svc.GetEntityByWhere(OilSupplierCertAppendName, where_app, &model)
+	var modeltmp suppliercertappend.OilSupplierCertAppend
+	has := svc.GetEntityByWhere(OilSupplierCertAppendName, where_app, &modeltmp)
 	if has {
 		errinfo.Message = "已提交增项申请,审批通过后才可再提交申请!"
 		errinfo.Code = -1
 		errinfo.Info = model.Id
 		this.Data["json"] = &errinfo
 		this.ServeJSON()
+		return
 	}
 	svc.GetEntityByWhere(OilSupplierCertName, where, &cermodel)