|
|
@@ -1008,7 +1008,7 @@ func (this *OilSupplierCertAppendController) AppendBusinessOfficeSeparateAuditEn
|
|
|
// @Description 集中审批
|
|
|
// @Success 200 {object} controllers.Request
|
|
|
// @router /concentrate-audit/:id [post]
|
|
|
-func (this *OilSupplierCertController) AppendConcentrateAuditEntity() {
|
|
|
+func (this *OilSupplierCertAppendController) AppendConcentrateAuditEntity() {
|
|
|
certAppendId := this.Ctx.Input.Param(":id")
|
|
|
AuditRemark := this.GetString("AuditRemark") // TODO 前台选择的审批结果
|
|
|
|
|
|
@@ -1054,6 +1054,57 @@ func (this *OilSupplierCertController) AppendConcentrateAuditEntity() {
|
|
|
//certSrv.UpdateEntityByIdCols(supplierCertId, supplierCertEntity, cols)
|
|
|
}
|
|
|
|
|
|
+// @Title 确认是否入库
|
|
|
+// @Description 确认是否入库
|
|
|
+// @Success 200 {object} controllers.Request
|
|
|
+// @router /update-is-storage/:id [post]
|
|
|
+func (this *OilSupplierCertAppendController) UpdateIsStorage() {
|
|
|
+ id := this.Ctx.Input.Param(":id")
|
|
|
+ status := this.GetString("Status")
|
|
|
+ PACNumber := this.GetString("PACNumber")
|
|
|
+ SupplierId := this.GetString("SupplierId")
|
|
|
+ var errinfo ErrorInfo
|
|
|
+ if id == "" {
|
|
|
+ errinfo.Message = "操作失败!请求信息不完整"
|
|
|
+ errinfo.Code = -2
|
|
|
+ this.Data["json"] = &errinfo
|
|
|
+ this.ServeJSON()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ var supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend
|
|
|
+ certAppendSrv := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
+ certAppendSrv.GetEntityById(id, &supplierCertAppendEntity)
|
|
|
+
|
|
|
+ var supplierEntity supplier.OilSupplier
|
|
|
+ srv := supplier.GetOilSupplierService(utils.DBE)
|
|
|
+ srv.GetEntityById(SupplierId, &supplierEntity)
|
|
|
+ supplierEntity.PACNumber = PACNumber
|
|
|
+ srvCols := []string{"PACNumber"}
|
|
|
+ srv.UpdateEntityByIdCols(SupplierId, &supplierEntity, srvCols)
|
|
|
+
|
|
|
+ AuditRemark := ""
|
|
|
+ if status == "1" {
|
|
|
+ AuditRemark = "已入库。"
|
|
|
+ } else {
|
|
|
+ AuditRemark = "入库审批驳回。"
|
|
|
+ }
|
|
|
+
|
|
|
+ svcActiviti := workflow.GetActivitiService(utils.DBE)
|
|
|
+ var ActiComplete workflow.ActiCompleteVM
|
|
|
+ ActiComplete.ProcessKey = workflow.OIL_ENUSER_APPEND_APPLY
|
|
|
+ ActiComplete.BusinessKey = supplierCertAppendEntity.BusinessKey
|
|
|
+ ActiComplete.UserId = this.User.Id //审批人员
|
|
|
+ ActiComplete.Result = "1" //前台审批[同意、不同意]
|
|
|
+ ActiComplete.Remarks = AuditRemark
|
|
|
+ ActiComplete.CallbackUrl = utils.Cfg.MustValue("workflow", "callbackHost")
|
|
|
+ receiveVal := svcActiviti.TaskComplete(ActiComplete)
|
|
|
+ if receiveVal != "true" {
|
|
|
+ panic("工作流异常,请联系管理员!" + receiveVal)
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
// @Title 审批
|
|
|
// @Description 审批
|
|
|
// @Param body body suppliercert.OilSupplierCert
|