|
|
@@ -2,6 +2,7 @@ package oilcontract
|
|
|
|
|
|
import (
|
|
|
"dashoo.cn/backend/api/business/auditsetting"
|
|
|
+ "dashoo.cn/backend/api/business/oilcontract/contract"
|
|
|
"dashoo.cn/backend/api/business/oilcontract/contractReview"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
|
|
|
"dashoo.cn/backend/api/business/workflow"
|
|
|
@@ -182,11 +183,22 @@ func (this *OilContractDailyListenerController) WorkflowEndAudit() {
|
|
|
cols := []string{
|
|
|
"Id",
|
|
|
"Status",
|
|
|
- "ApplyTime",
|
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
|
contractReviewEntity.Status = suppliercert.STORE_STATUS //审核完成
|
|
|
srv.UpdateEntityByIdCols(dailyId, contractReviewEntity, cols)
|
|
|
+ // 如果是最后一条 改状态
|
|
|
+ if contractReviewEntity.IsFinal == 1 {
|
|
|
+ col := []string{
|
|
|
+ "Id",
|
|
|
+ "Status",
|
|
|
+ }
|
|
|
+ var contractEntity contract.OilContract
|
|
|
+ sr := contract.GetOilContractService(utils.DBE)
|
|
|
+ sr.GetEntityById(contractReviewEntity.ContractId, &contractEntity)
|
|
|
+ contractEntity.Status = 3
|
|
|
+ sr.UpdateEntityByIdCols(contractReviewEntity.ContractId, &contractEntity, col)
|
|
|
+ }
|
|
|
|
|
|
this.Data["json"] = 1
|
|
|
this.ServeJSON()
|