|
@@ -6,9 +6,11 @@ import (
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/annualaudit"
|
|
"dashoo.cn/backend/api/business/oilsupplier/annualaudit"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/infochange"
|
|
"dashoo.cn/backend/api/business/oilsupplier/infochange"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/oilactivity"
|
|
"dashoo.cn/backend/api/business/oilsupplier/oilactivity"
|
|
|
|
|
+ "dashoo.cn/backend/api/business/oilsupplier/oilcostmanage"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/supplier"
|
|
"dashoo.cn/backend/api/business/oilsupplier/supplier"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/supplierapplytime"
|
|
"dashoo.cn/backend/api/business/oilsupplier/supplierapplytime"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/suppliercertappend"
|
|
"dashoo.cn/backend/api/business/oilsupplier/suppliercertappend"
|
|
|
|
|
+ "dashoo.cn/backend/api/business/oilsupplier/suppliercertcommon"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
|
|
"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/supplierfile"
|
|
"dashoo.cn/backend/api/business/oilsupplier/supplierfile"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/supplierlog"
|
|
"dashoo.cn/backend/api/business/oilsupplier/supplierlog"
|
|
@@ -945,8 +947,8 @@ func (this *OilSupplierCertController) CommonAuditEntity() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// @Title 分办之后的各级审批 --审批 包含:二级单位初审、复审, 业务处室专业审核, 集中评审
|
|
|
|
|
-// @Description 分办之后的各级审批
|
|
|
|
|
|
|
+// @Title 撤回申请
|
|
|
|
|
+// @Description 交费环节之后撤回节点
|
|
|
// @Success 200 {object} controllers.Request
|
|
// @Success 200 {object} controllers.Request
|
|
|
// @router /recall-apply/:id [post]
|
|
// @router /recall-apply/:id [post]
|
|
|
func (this *OilSupplierCertController) RecallApply() {
|
|
func (this *OilSupplierCertController) RecallApply() {
|
|
@@ -962,7 +964,7 @@ func (this *OilSupplierCertController) RecallApply() {
|
|
|
this.ServeJSON()
|
|
this.ServeJSON()
|
|
|
} else {
|
|
} else {
|
|
|
//返回正确结果
|
|
//返回正确结果
|
|
|
- errInfo.Message = "审核提交成功"
|
|
|
|
|
|
|
+ errInfo.Message = "申请撤回成功!"
|
|
|
errInfo.Code = 0
|
|
errInfo.Code = 0
|
|
|
this.Data["json"] = &errInfo
|
|
this.Data["json"] = &errInfo
|
|
|
this.ServeJSON()
|
|
this.ServeJSON()
|
|
@@ -970,10 +972,7 @@ func (this *OilSupplierCertController) RecallApply() {
|
|
|
}()
|
|
}()
|
|
|
|
|
|
|
|
if AuditRemark == "" {
|
|
if AuditRemark == "" {
|
|
|
- errInfo.Message = "撤回原因不能为空!"
|
|
|
|
|
- errInfo.Code = -1
|
|
|
|
|
- this.Data["json"] = &errInfo
|
|
|
|
|
- this.ServeJSON()
|
|
|
|
|
|
|
+ panic("撤回原因不能为空!")
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//取出准入表信息
|
|
//取出准入表信息
|
|
@@ -982,10 +981,7 @@ func (this *OilSupplierCertController) RecallApply() {
|
|
|
certSrv.GetEntityById(certId, &supplierCertEntity)
|
|
certSrv.GetEntityById(certId, &supplierCertEntity)
|
|
|
|
|
|
|
|
if this.User.Id != strconv.Itoa(supplierCertEntity.CreateUserId) {
|
|
if this.User.Id != strconv.Itoa(supplierCertEntity.CreateUserId) {
|
|
|
- errInfo.Message = "权限错误,仅申请人可撤回当前申请!"
|
|
|
|
|
- errInfo.Code = -1
|
|
|
|
|
- this.Data["json"] = &errInfo
|
|
|
|
|
- this.ServeJSON()
|
|
|
|
|
|
|
+ panic("权限错误,仅申请人可撤回当前申请!")
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
svcPaymentInfo := paymentinfo.GetPaymentService(utils.DBE)
|
|
svcPaymentInfo := paymentinfo.GetPaymentService(utils.DBE)
|
|
@@ -995,23 +991,14 @@ func (this *OilSupplierCertController) RecallApply() {
|
|
|
if hasPayInfo {
|
|
if hasPayInfo {
|
|
|
if paymentInfo.PayType != "1" {
|
|
if paymentInfo.PayType != "1" {
|
|
|
log.Println("交费类型错误:" + paymentInfo.PayType + ", 准入申请ID: " + certId + ", 企业ID:" + strconv.Itoa(supplierCertEntity.SupplierId))
|
|
log.Println("交费类型错误:" + paymentInfo.PayType + ", 准入申请ID: " + certId + ", 企业ID:" + strconv.Itoa(supplierCertEntity.SupplierId))
|
|
|
- errInfo.Message = "交费类型错误,不允许撤回!"
|
|
|
|
|
- errInfo.Code = -1
|
|
|
|
|
- this.Data["json"] = &errInfo
|
|
|
|
|
- this.ServeJSON()
|
|
|
|
|
|
|
+ panic("交费类型错误,不允许撤回!")
|
|
|
}
|
|
}
|
|
|
if paymentInfo.IsPay == "2" {
|
|
if paymentInfo.IsPay == "2" {
|
|
|
- errInfo.Message = "该申请已完成交费,不允许撤回!"
|
|
|
|
|
- errInfo.Code = -1
|
|
|
|
|
- this.Data["json"] = &errInfo
|
|
|
|
|
- this.ServeJSON()
|
|
|
|
|
|
|
+ panic("该申请已完成交费,不允许撤回!")
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
log.Println("交费信息不存在:" + ", 准入申请ID: " + certId + ", 企业ID:" + strconv.Itoa(supplierCertEntity.SupplierId))
|
|
log.Println("交费信息不存在:" + ", 准入申请ID: " + certId + ", 企业ID:" + strconv.Itoa(supplierCertEntity.SupplierId))
|
|
|
- errInfo.Message = "交费信息不存在或当前申请状态不允许撤回,请重新确认!"
|
|
|
|
|
- errInfo.Code = -1
|
|
|
|
|
- this.Data["json"] = &errInfo
|
|
|
|
|
- this.ServeJSON()
|
|
|
|
|
|
|
+ panic("交费信息不存在或当前申请状态不允许撤回,请重新确认!")
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
svcActiviti := workflow.GetActivitiService(utils.DBE)
|
|
svcActiviti := workflow.GetActivitiService(utils.DBE)
|
|
@@ -1024,7 +1011,7 @@ func (this *OilSupplierCertController) RecallApply() {
|
|
|
ActiComplete.CallbackUrl = utils.Cfg.MustValue("workflow", "callbackHost")
|
|
ActiComplete.CallbackUrl = utils.Cfg.MustValue("workflow", "callbackHost")
|
|
|
receiveVal := svcActiviti.TaskComplete(ActiComplete)
|
|
receiveVal := svcActiviti.TaskComplete(ActiComplete)
|
|
|
if receiveVal != "true" {
|
|
if receiveVal != "true" {
|
|
|
- log.Println("工作流异常, 业务ID:"+supplierCertEntity.BusinessKey+", 流程ID:"+supplierCertEntity.WorkflowId, " 工作流传参: ", ActiComplete, receiveVal)
|
|
|
|
|
|
|
+ log.Println("工作流异常, 业务ID:"+supplierCertEntity.BusinessKey+", 流程ID:"+supplierCertEntity.WorkflowId+", 工作流传参: ", ActiComplete, receiveVal)
|
|
|
panic("任务已审批,请刷新!")
|
|
panic("任务已审批,请刷新!")
|
|
|
} else {
|
|
} else {
|
|
|
// 删除已产生的交费信息
|
|
// 删除已产生的交费信息
|
|
@@ -2018,7 +2005,7 @@ func (this *OilSupplierCertController) UpdateInput() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
svc := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
svc := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
- err := svc.UpdateEntityBytbl(OilSupplierCertName, id, &model, []string{"InFlag", "Remark"})
|
|
|
|
|
|
|
+ err := svc.UpdateEntityBytbl(OilSupplierCertName, id, &model, []string{"InFlag", "Remark"})
|
|
|
|
|
|
|
|
if err == nil {
|
|
if err == nil {
|
|
|
errinfo.Message = "修改成功!"
|
|
errinfo.Message = "修改成功!"
|
|
@@ -2174,6 +2161,36 @@ func (this *OilSupplierCertController) UpdateIsRestrict() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// @Title 查询是否交费及交费数
|
|
|
|
|
+// @Description get user by token
|
|
|
|
|
+// @Success 200 {string} string
|
|
|
|
|
+// @router /check-need-pay [get]
|
|
|
|
|
+func (this *OilSupplierCertController) CheckNeedPayAndAmount() {
|
|
|
|
|
+ certId := this.GetString("certId")
|
|
|
|
|
+
|
|
|
|
|
+ checkStatus := suppliercertcommon.GetOilSupplierCertCheckStatusService(utils.DBE)
|
|
|
|
|
+ result := checkStatus.CheckOilSupplierCertIsNeedPay(certId)
|
|
|
|
|
+ checkHavePayed := false
|
|
|
|
|
+ checkHavePayed = checkStatus.CheckOilSupplierCertHavePayed(certId)
|
|
|
|
|
+ if checkHavePayed {
|
|
|
|
|
+ result = 2 // 已交费, 不再需要交费
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 获取交费额 1需交费 0未知 2已交费
|
|
|
|
|
+ var Amount float64
|
|
|
|
|
+ Amount = 0.00
|
|
|
|
|
+ if result == 1 {
|
|
|
|
|
+ var supplierCertEntity suppliercert.OilSupplierCert
|
|
|
|
|
+ svcCert := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
|
|
+ svcCert.GetEntityById(certId, &supplierCertEntity)
|
|
|
|
|
+ costSvc := oilcostmanage.GetOilCostManageService(utils.DBE)
|
|
|
|
|
+ Amount = costSvc.GetAmount("ZHUNRU", supplierCertEntity.SupplierTypeCode)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.Data["json"] = Amount
|
|
|
|
|
+ this.ServeJSON()
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// @Title 交费用户确认交费
|
|
// @Title 交费用户确认交费
|
|
|
// @Description 交费用户确认交费
|
|
// @Description 交费用户确认交费
|
|
|
// @Success 200 {object} controllers.Request
|
|
// @Success 200 {object} controllers.Request
|