|
|
@@ -488,31 +488,38 @@ func (this *OilSupplierCertController) UpdateStorage() {
|
|
|
|
|
|
//var jsonBlob = this.Ctx.Input.RequestBody
|
|
|
//json.Unmarshal(jsonBlob, &model)
|
|
|
- if status == suppliercert.NOPASS_STATUS {
|
|
|
+ var err error
|
|
|
+ if status == suppliercert.NO_CENT_AUDIT_STATUS {
|
|
|
model.Status = suppliercert.DRAFT_STATUS
|
|
|
+ cols := []string{
|
|
|
+ "Status",
|
|
|
+ }
|
|
|
+ err = svc.UpdateEntityBytbl(OilSupplierCertName, id, &model, cols)
|
|
|
} else {
|
|
|
model.Status = suppliercert.STORE_STATUS
|
|
|
+ model.Step = 7
|
|
|
+ model.StorageOn = time.Now()
|
|
|
+ model.ApplyTime = time.Now().AddDate(1, 0 ,0)
|
|
|
+ model.InFlag = "1"
|
|
|
+ model.ModifiedOn = time.Now()
|
|
|
+ model.ModifiedBy = this.User.Realname
|
|
|
+ model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
|
|
|
+
|
|
|
+ cols := []string{
|
|
|
+ "Step",
|
|
|
+ "Status",
|
|
|
+ "ApplyTime",
|
|
|
+ "InFlag",
|
|
|
+ "StorageOn",
|
|
|
+ "ModifiedOn",
|
|
|
+ "ModifiedUserId",
|
|
|
+ "ModifiedBy",
|
|
|
+ }
|
|
|
+ err = svc.UpdateEntityBytbl(OilSupplierCertName, id, &model, cols)
|
|
|
}
|
|
|
|
|
|
- model.Step = 7
|
|
|
- model.StorageOn = time.Now()
|
|
|
- model.ApplyTime = time.Now().AddDate(1, 0 ,0)
|
|
|
- model.InFlag = "1"
|
|
|
- model.ModifiedOn = time.Now()
|
|
|
- model.ModifiedBy = this.User.Realname
|
|
|
- model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
|
|
|
|
|
|
- cols := []string{
|
|
|
- "Step",
|
|
|
- "Status",
|
|
|
- "ApplyTime",
|
|
|
- "InFlag",
|
|
|
- "StorageOn",
|
|
|
- "ModifiedOn",
|
|
|
- "ModifiedUserId",
|
|
|
- "ModifiedBy",
|
|
|
- }
|
|
|
- err := svc.UpdateEntityBytbl(OilSupplierCertName, id, &model, cols)
|
|
|
+
|
|
|
if err == nil {
|
|
|
errinfo.Message = "提交成功!"
|
|
|
errinfo.Code = 0
|
|
|
@@ -1080,7 +1087,12 @@ func (this *OilSupplierCertController) AuditEntityFir() {
|
|
|
audithistoryentity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
|
|
|
certSrv.InsertEntity(audithistoryentity)
|
|
|
if supplierCertEntity.Status == suppliercert.CENT_AUDIT_STATUS {
|
|
|
- supplierCertEntity.Status = suppliercert.NOPASS_STATUS
|
|
|
+ supplierCertEntity.Status = suppliercert.NO_CENT_AUDIT_STATUS
|
|
|
+ supplierCertEntity.BackReason = dataother.AuditorRemark
|
|
|
+ cols := []string{
|
|
|
+ "BackReason",
|
|
|
+ }
|
|
|
+ certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
|
|
|
} else {
|
|
|
supplierCertEntity.Status = backstatus
|
|
|
}
|