|
|
@@ -287,7 +287,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 < 4"
|
|
|
+ where := "SupplierId = " + utils.ToStr(model.SupplierId) + " and SupplierTypeName = " + model.SupplierTypeName + "and Status < 5"
|
|
|
var auditentity []annualaudit.OilAnnualAudit
|
|
|
svc.GetEntitysByWhere(""+OilAnnualAuditName, where, &auditentity)
|
|
|
if len(auditentity) == 1 {
|
|
|
@@ -297,14 +297,13 @@ func (this *AnnualAuditController) AddEntity() {
|
|
|
this.ServeJSON()
|
|
|
return
|
|
|
}
|
|
|
- supwhere := "a.Id = " + utils.ToStr(model.SupplierId) + " and b.SupplierTypeCode = " + model.SupplierTypeName
|
|
|
- // + " and b.Status > 5"
|
|
|
+ supwhere := "a.Id = " + utils.ToStr(model.SupplierId) + " and b.SupplierTypeCode = " + model.SupplierTypeName+ " and b.Status = 8 "
|
|
|
supsvc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
var list []supplier.OilSupplierView
|
|
|
total := supsvc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, 1, 1, "a.Id", true, &list, supwhere)
|
|
|
if total == 0 {
|
|
|
- errinfo.Message = "请先提交准入申请再提交年审!"
|
|
|
- //errinfo.Message = "请先提交准入,准入申请通过后,才可申请年审!"
|
|
|
+ //errinfo.Message = "请先提交准入申请再提交年审!"
|
|
|
+ errinfo.Message = "请先提交准入,准入申请通过后,才可申请年审!"
|
|
|
errinfo.Code = -1
|
|
|
this.Data["json"] = &errinfo
|
|
|
this.ServeJSON()
|