|
|
@@ -204,20 +204,22 @@ func (this *AnnualAuditController) GetMyTaskEntityList() {
|
|
|
// @Success 200 {object} annualaudit.OilAnnualAudit
|
|
|
// @router /supplierlist [get]
|
|
|
func (this *AnnualAuditController) GetSupplierList() {
|
|
|
+ code := this.GetString("code")
|
|
|
svc := infochange.GetInfoChangeService(utils.DBE)
|
|
|
var supplierlist []annualaudit.Suppliername
|
|
|
where := "1=1"
|
|
|
//企业用户必须加创建人条件
|
|
|
if this.User.IsCompanyUser == 1 {
|
|
|
- where = where + " and CreateUserId = '" + this.User.Id + "'"
|
|
|
+ where = where + " and a.CreateUserId = '" + this.User.Id + "'"
|
|
|
} else {
|
|
|
//超级管理员和有查看所有数据权限的用户不加条件
|
|
|
svcPerm := permission.GetPermissionService(utils.DBE)
|
|
|
isauth := svcPerm.IsAuthorized(this.User.Id, "oil_supplier.marketAccess.AllRecord")
|
|
|
if !svcPerm.IsAdmin(this.User.Id) && !isauth {
|
|
|
- where = where + " and CreateUserId = '" + this.User.Id + "'"
|
|
|
+ where = where + " and a.CreateUserId = '" + this.User.Id + "'"
|
|
|
}
|
|
|
}
|
|
|
+ where = where + " and b.SupplierTypeCode='" + code + "' and b.Status='8'"
|
|
|
supplierlist = svc.GetSupplierList(""+OilSupplierName, where)
|
|
|
var datainfo DataInfo
|
|
|
datainfo.Items = supplierlist
|
|
|
@@ -310,7 +312,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' "
|
|
|
supsvc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
var list []supplier.OilSupplierView
|
|
|
total := supsvc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, 1, 1, "a.Id", true, &list, supwhere)
|
|
|
@@ -654,19 +656,6 @@ func (this *AnnualAuditController) AnnualAudit() {
|
|
|
"AuditDate",
|
|
|
}
|
|
|
svc.UpdateEntityByIdCols(list.CerId, certmodel, certcols)
|
|
|
- }else {
|
|
|
- auditmodel.ApplyTime = oldaplydate
|
|
|
- }
|
|
|
- auditmodel.Step = step
|
|
|
- if receiveVal == "true" {
|
|
|
- cols := []string{
|
|
|
- "Id",
|
|
|
- "Status",
|
|
|
- "Step",
|
|
|
- "ApplyTime",
|
|
|
- }
|
|
|
- svc.UpdateEntityByIdCols(dataother.AnnualId, auditmodel, cols)
|
|
|
-
|
|
|
paysvc := paymentinfo.GetPaymentService(utils.DBE)
|
|
|
var Amount float64
|
|
|
if list.SupplierTypeName == "01" {
|
|
|
@@ -686,6 +675,19 @@ func (this *AnnualAuditController) AnnualAudit() {
|
|
|
payinfo.CreateBy = list.CreateBy
|
|
|
payinfo.CreateOn = time.Now()
|
|
|
paysvc.InsertEntity(&payinfo)
|
|
|
+ }else {
|
|
|
+ auditmodel.ApplyTime = oldaplydate
|
|
|
+ }
|
|
|
+ auditmodel.Step = step
|
|
|
+ if receiveVal == "true" {
|
|
|
+ cols := []string{
|
|
|
+ "Id",
|
|
|
+ "Status",
|
|
|
+ "Step",
|
|
|
+ "ApplyTime",
|
|
|
+ }
|
|
|
+ svc.UpdateEntityByIdCols(dataother.AnnualId, auditmodel, cols)
|
|
|
+
|
|
|
//paysvc.AddPaymentinfo(list.SupplierId, list.Id, Amount, "2")
|
|
|
errinfo.Message = "提交成功!"
|
|
|
errinfo.Code = 0
|