|
|
@@ -1023,8 +1023,8 @@ func (this *OilSupplierCertController) ConcentrateAuditEntity() {
|
|
|
// @router /update-is-storage/:id [post]
|
|
|
func (this *OilSupplierCertController) UpdateIsStorage() {
|
|
|
id := this.Ctx.Input.Param(":id")
|
|
|
- status := this.GetString("Status")
|
|
|
- PACNumber := this.GetString("PACNumber")
|
|
|
+ result := this.GetString("result")
|
|
|
+ WZAccessCardNo := this.GetString("WZAccessCardNo")
|
|
|
SupplierId := this.GetString("SupplierId")
|
|
|
var errinfo ErrorInfo
|
|
|
if id == "" {
|
|
|
@@ -1053,19 +1053,17 @@ func (this *OilSupplierCertController) UpdateIsStorage() {
|
|
|
certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
certSrv.GetEntityById(id, &supplierCertEntity)
|
|
|
|
|
|
- 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 := ""
|
|
|
- fmt.Println("审批入库传入状态:", status)
|
|
|
- if status == "1" {
|
|
|
- AuditRemark = "审批通过已入库。"
|
|
|
+ if result == "1" {
|
|
|
+ AuditRemark = "审批通过, 已入库。"
|
|
|
+ var supplierEntity supplier.OilSupplier
|
|
|
+ srv := supplier.GetOilSupplierService(utils.DBE)
|
|
|
+ srv.GetEntityById(SupplierId, &supplierEntity)
|
|
|
+ supplierEntity.WZAccessCardNo = WZAccessCardNo
|
|
|
+ srvCols := []string{"WZAccessCardNo"}
|
|
|
+ srv.UpdateEntityByIdCols(SupplierId, &supplierEntity, srvCols)
|
|
|
} else {
|
|
|
- AuditRemark = "已入库。"
|
|
|
+ AuditRemark = "待入库未通过。"
|
|
|
}
|
|
|
|
|
|
svcActiviti := workflow.GetActivitiService(utils.DBE)
|
|
|
@@ -1073,7 +1071,7 @@ func (this *OilSupplierCertController) UpdateIsStorage() {
|
|
|
ActiComplete.ProcessKey = workflow.OIL_ENUSER_SUPPLIER_APPLY
|
|
|
ActiComplete.BusinessKey = supplierCertEntity.BusinessKey
|
|
|
ActiComplete.UserId = this.User.Id //审批人员
|
|
|
- ActiComplete.Result = "1" //前台审批[同意、不同意]
|
|
|
+ ActiComplete.Result = result
|
|
|
ActiComplete.Remarks = AuditRemark
|
|
|
ActiComplete.CallbackUrl = utils.Cfg.MustValue("workflow", "callbackHost")
|
|
|
receiveVal := svcActiviti.TaskComplete(ActiComplete)
|