|
|
@@ -633,55 +633,6 @@ func (this *AnnualAuditController) AddEntity() {
|
|
|
this.Data["json"] = &errInfo
|
|
|
this.ServeJSON()
|
|
|
}
|
|
|
- //annualId := model.Id
|
|
|
- //svcActiviti := workflow.GetActivitiService(utils.DBE)
|
|
|
- ////启动工作流
|
|
|
- //businessKey := utils.ToStr(annualId) + "-" + strconv.Itoa(model.AuditIndex)
|
|
|
- //result := strconv.Itoa(this.User.IsCompanyUser)
|
|
|
- //processInstanceId := svcActiviti.StartProcess2(workflow.OIL_AUDIT_APPLY, businessKey, this.User.Id, result, model.SupplierTypeName, model.SupplierName)
|
|
|
- //var ActiComplete workflow.ActiCompleteVM
|
|
|
- //ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
|
|
|
- //ActiComplete.BusinessKey = businessKey
|
|
|
- //ActiComplete.UserNames = firstAudit
|
|
|
- //ActiComplete.UserId = this.User.Id
|
|
|
- //ActiComplete.Result = "1"
|
|
|
- //ActiComplete.Remarks = model.Remark
|
|
|
- //ActiComplete.CallbackUrl = ""
|
|
|
- //提交给二级单位初审
|
|
|
- //receiveVal := svcActiviti.TaskComplete(ActiComplete)
|
|
|
- //var auditmodel annualaudit.OilAnnualAudit
|
|
|
- //auditmodel.WorkflowId = processInstanceId
|
|
|
- //auditmodel.FirstAudit, _ = strconv.Atoi(firstAudit)
|
|
|
- //auditmodel.AuditIndex = model.AuditIndex
|
|
|
- //auditmodel.BusinessKey = businessKey
|
|
|
- //cols := []string{
|
|
|
- // "Id",
|
|
|
- // "WorkflowId",
|
|
|
- // "FirstAudit",
|
|
|
- // "AuditIndex",
|
|
|
- // "BusinessKey",
|
|
|
- //}
|
|
|
- //if receiveVal == "true" {
|
|
|
- //_, err = svc.UpdateEntityByIdCols(annualId, auditmodel, cols)
|
|
|
- //if err == nil {
|
|
|
- // //新增
|
|
|
- // errinfo.Message = "添加成功!"
|
|
|
- // errinfo.Code = 0
|
|
|
- // errinfo.Item = model.Id
|
|
|
- // this.Data["json"] = &errinfo
|
|
|
- // this.ServeJSON()
|
|
|
- //} else {
|
|
|
- // errinfo.Message = "添加失败!" + utils.AlertProcess(err.Error())
|
|
|
- // errinfo.Code = -1
|
|
|
- // this.Data["json"] = &errinfo
|
|
|
- // this.ServeJSON()
|
|
|
- //}
|
|
|
- //} else {
|
|
|
- // errinfo.Message = "工作流异常,请联系管理员!"
|
|
|
- // errinfo.Code = -1
|
|
|
- // this.Data["json"] = &errinfo
|
|
|
- // this.ServeJSON()
|
|
|
- //}
|
|
|
}
|
|
|
|
|
|
func (this *AnnualAuditController) getTimeSub(t1, t2 time.Time) int {
|