Explorar el Código

后端: 提交年审时的判断

baichengfei hace 4 años
padre
commit
72cc96c4d4

+ 2 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/annualaudit.go

@@ -582,7 +582,7 @@ func (this *AnnualAuditController) AddEntity() {
 	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
 	//firstAudit := this.GetString("firstAudit")
 	json.Unmarshal(jsonBlob, &model)
-	where := "SupplierId = " + utils.ToStr(model.SupplierId) + " and SupplierTypeName = " + model.SupplierTypeName + " and Status < 5"
+	where := "SupplierId = " + utils.ToStr(model.SupplierId) + " and SupplierTypeName = " + model.SupplierTypeName + " and (Status < 8 or Status in ('9','10'))"
 	var auditEntity []annualaudit.OilAnnualAudit
 	svc.GetEntitysByWhere(""+OilAnnualAuditName, where, &auditEntity)
 	if len(auditEntity) >= 1 {
@@ -592,7 +592,7 @@ func (this *AnnualAuditController) AddEntity() {
 		this.ServeJSON()
 		return
 	}
-	supWhere := "a.Id = " + utils.ToStr(model.SupplierId) + " and b.SupplierTypeCode = '" + model.SupplierTypeName + "' and b.Status = '8' "
+	supWhere := "a.Id = " + utils.ToStr(model.SupplierId) + " and b.SupplierTypeCode = '" + model.SupplierTypeName + "' and (b.Status = '8' or b.Status = '11' "
 	supSvc := supplier.GetOilSupplierService(utils.DBE)
 	var list []supplier.OilSupplierView
 	total := supSvc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, 1, 1, "a.Id", true, &list, supWhere)