|
|
@@ -1,7 +1,11 @@
|
|
|
package oilsupplier
|
|
|
|
|
|
import (
|
|
|
+ "dashoo.cn/backend/api/business/oilsupplier/annualaudit"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/paymentbankinfo"
|
|
|
+ "dashoo.cn/backend/api/business/oilsupplier/suppliercertappend"
|
|
|
+ "dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
|
|
|
+ "dashoo.cn/backend/api/business/oilsupplier/supplierfile"
|
|
|
"dashoo.cn/backend/api/business/register"
|
|
|
"encoding/json"
|
|
|
"strconv"
|
|
|
@@ -373,10 +377,39 @@ func (this *PaymentInfoController) ReceiveMoneyBillList() {
|
|
|
|
|
|
} else if payItem.PayType == "2" {//年审
|
|
|
//TODO: 修改年审时间
|
|
|
-
|
|
|
+ annuasvc := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
+ var annualentities []annualaudit.OilAnnualAudit
|
|
|
+ annwhere := " SupplierId = " + utils.ToStr(payItem.SupplierId)+ " and CerId = "+utils.ToStr(payItem.SupplierCertId) +" and Status = '6'"
|
|
|
+ svc.GetEntitysByWhere(OilAnnualAuditName, annwhere, &annualentities)
|
|
|
+ if len(annualentities) >0 {
|
|
|
+ //更新年审表时间
|
|
|
+ var annmodel annualaudit.OilAnnualAudit
|
|
|
+ annmodel.Status = suppliercert.ALL_PASE_STATUS
|
|
|
+ annmodel.ApplyTime = annualentities[0].ApplyTime.AddDate(1, 0, 0)
|
|
|
+ annuasvc.UpdateEntityBywheretbl(OilAnnualAuditName,&annmodel,[]string{"ApplyTime", "Status"},annwhere)
|
|
|
+ //更新准入表时间
|
|
|
+ var certmodel suppliercert.OilSupplierCert
|
|
|
+ certmodel.ApplyTime = annualentities[0].ApplyTime.AddDate(1, 0, 0)
|
|
|
+ svc.UpdateEntityByIdCols(strconv.Itoa(payItem.SupplierCertId), &certmodel, []string{"ApplyTime"})
|
|
|
+ }
|
|
|
} else if payItem.PayType == "3" {//增项
|
|
|
-
|
|
|
- }
|
|
|
+ appsvc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
+ //更新准入项表
|
|
|
+ appendwhere := " SupplierId = " + utils.ToStr(payItem.SupplierId)+ " and SupplierCertId = "+utils.ToStr(payItem.SupplierCertId)+" and Type = '2'"
|
|
|
+ var appendsubmodel suppliercertsub.OilSupplierCertSub
|
|
|
+ appendsubmodel.Type = "3"
|
|
|
+ appsvc.UpdateEntityBywheretbl(OilSupplierCertSubName, &appendsubmodel, []string{"Type"}, appendwhere)
|
|
|
+ //更新资质表
|
|
|
+ appendfilewhere := " SupplierId = " + utils.ToStr(payItem.SupplierId)+" and SupType = 2"
|
|
|
+ var appendsubfilemodel supplierfile.OilSupplierFile
|
|
|
+ appendsubfilemodel.SupType = 3
|
|
|
+ appsvc.UpdateEntityBywheretbl(OilSupplierCertSubName, &appendsubfilemodel, []string{"SupType"}, appendfilewhere)
|
|
|
+ //更新增项表
|
|
|
+ appdwhere := " SupplierId = " + utils.ToStr(payItem.SupplierId)+ " and SupplierCertId = "+utils.ToStr(payItem.SupplierCertId)+" and Status = '6'"
|
|
|
+ var appendmodel suppliercertappend.OilSupplierCertAppend
|
|
|
+ appendmodel.Status = suppliercert.ALL_PASE_STATUS
|
|
|
+ appsvc.UpdateEntityBywheretbl(OilSupplierCertAppendName,&appendmodel,[]string{"Status"},appdwhere)
|
|
|
+ }
|
|
|
}
|
|
|
//记录对账日志
|
|
|
paymentBankInfo := new(paymentbankinfo.OilPaymentBankInfo)
|