|
|
@@ -1,21 +1,16 @@
|
|
|
package oilcontract
|
|
|
|
|
|
import (
|
|
|
- msg2 "dashoo.cn/backend/api/business/msg"
|
|
|
- "dashoo.cn/backend/api/business/oilsupplier/annualaudit"
|
|
|
- "dashoo.cn/backend/api/business/oilsupplier/oilcostmanage"
|
|
|
- "dashoo.cn/backend/api/business/oilsupplier/supplier"
|
|
|
- "dashoo.cn/backend/api/business/paymentinfo"
|
|
|
- "encoding/json"
|
|
|
- "strconv"
|
|
|
- "strings"
|
|
|
- "time"
|
|
|
-
|
|
|
"dashoo.cn/backend/api/business/auditsetting"
|
|
|
+ "dashoo.cn/backend/api/business/oilcontract/contract"
|
|
|
+ "dashoo.cn/backend/api/business/oilcontract/contractReview"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
|
|
|
"dashoo.cn/backend/api/business/workflow"
|
|
|
. "dashoo.cn/backend/api/controllers"
|
|
|
"dashoo.cn/utils"
|
|
|
+ "encoding/json"
|
|
|
+ "strconv"
|
|
|
+ "strings"
|
|
|
)
|
|
|
|
|
|
type OilContractDailyListenerController struct {
|
|
|
@@ -38,28 +33,28 @@ func (this *OilContractDailyListenerController) PreFenTrialStatus() {
|
|
|
var jsonBlob = this.Ctx.Input.RequestBody
|
|
|
var listenerApprove ListenerApproveParams
|
|
|
json.Unmarshal(jsonBlob, &listenerApprove)
|
|
|
- annualId := strings.Split(listenerApprove.BusinessKey, "-")[0]
|
|
|
+ var contractReviewEntity contractReview.OilContractReview
|
|
|
+ srv := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
+ reviewId := strings.Split(listenerApprove.BusinessKey, "-")[0]
|
|
|
|
|
|
- srv := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
- var annualEntity annualaudit.OilAnnualAudit
|
|
|
- srv.GetEntityById(annualId, &annualEntity)
|
|
|
+ srv.GetEntityById(reviewId, &contractReviewEntity)
|
|
|
cols := []string{
|
|
|
"Id",
|
|
|
"Status",
|
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
|
- annualEntity.Status = suppliercert.FEN_TRIAL_STATUS //二级单位分办
|
|
|
- srv.UpdateEntityByIdCols(annualId, annualEntity, cols)
|
|
|
+ contractReviewEntity.Status = suppliercert.FEN_TRIAL_STATUS //二级单位分办
|
|
|
+ srv.UpdateEntityByIdCols(reviewId, contractReviewEntity, cols)
|
|
|
|
|
|
//查出二级单位分办的人员
|
|
|
- // 获取准入资质信息:
|
|
|
- supplierCertSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
- var supplierCertEntity suppliercert.OilSupplierCert
|
|
|
- supplierCertSrv.GetEntityById(annualEntity.CerId, &supplierCertEntity)
|
|
|
+ //取出合同表
|
|
|
+ contractSvc := contract.GetOilContractService(utils.DBE)
|
|
|
+ var contractEntity contract.OilContract
|
|
|
+ contractSvc.GetEntityById(contractReviewEntity.ContractId, &contractEntity)
|
|
|
|
|
|
- stepCode := workflow.GetWorkFlowStepCode(supplierCertEntity.SupplierTypeCode) // TODO 年审的准入方式
|
|
|
+ stepCode := workflow.GetWorkFlowStepCode(contractEntity.ContractClass)
|
|
|
auditSettingService := auditsetting.GetOilAuditSettingService(utils.DBE)
|
|
|
- approverIds := auditSettingService.GetApproverIdsByStepCodeAndUnitId(stepCode, annualEntity.CommitComId)
|
|
|
+ approverIds := auditSettingService.GetApproverIdsByStepCodeAndUnitId(stepCode, contractReviewEntity.CommitComId)
|
|
|
var approveInfo ListenerApproveInfo
|
|
|
approveInfo.Users = approverIds
|
|
|
this.Data["json"] = &approveInfo
|
|
|
@@ -73,21 +68,21 @@ func (this *OilContractDailyListenerController) PreFenTrialStatus() {
|
|
|
// @router /pre-first-trail [get]
|
|
|
func (this *OilContractDailyListenerController) PreFirstTrail() {
|
|
|
businessKey := this.GetString("businessKey")
|
|
|
- annualId := strings.Split(businessKey, "-")[0]
|
|
|
+ reviewId := strings.Split(businessKey, "-")[0]
|
|
|
|
|
|
- svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
- var annualEntity annualaudit.OilAnnualAudit
|
|
|
- svc.GetEntityById(annualId, &annualEntity)
|
|
|
+ var contractReviewEntity contractReview.OilContractReview
|
|
|
+ svc := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
+ svc.GetEntityById(reviewId, &contractReviewEntity)
|
|
|
cols := []string{
|
|
|
"Id",
|
|
|
"Status",
|
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
|
- annualEntity.Status = suppliercert.FIRST_TRIAL_STATUS //二级单位初审
|
|
|
- svc.UpdateEntityByIdCols(annualId, annualEntity, cols)
|
|
|
+ contractReviewEntity.Status = suppliercert.FIRST_TRIAL_STATUS //二级单位初审
|
|
|
+ svc.UpdateEntityByIdCols(reviewId, contractReviewEntity, cols)
|
|
|
|
|
|
//返回查出的初审人员操作人员列表
|
|
|
- approverIds := annualEntity.FirstAudit
|
|
|
+ approverIds := contractReviewEntity.FirstAudit
|
|
|
this.Data["json"] = approverIds
|
|
|
this.ServeJSON()
|
|
|
}
|
|
|
@@ -98,129 +93,83 @@ func (this *OilContractDailyListenerController) PreFirstTrail() {
|
|
|
// @router /pre-second-trail [get]
|
|
|
func (this *OilContractDailyListenerController) PreSecondTrail() {
|
|
|
businessKey := this.GetString("businessKey")
|
|
|
- annualId := strings.Split(businessKey, "_")[0]
|
|
|
+ dailyId := strings.Split(businessKey, "_")[0]
|
|
|
|
|
|
- certSrv := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
- var annualEntity annualaudit.OilAnnualAudit
|
|
|
- certSrv.GetEntityById(annualId, &annualEntity)
|
|
|
+ var contractReviewEntity contractReview.OilContractReview
|
|
|
+ svc := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
+ svc.GetEntityById(dailyId, &contractReviewEntity)
|
|
|
cols := []string{
|
|
|
"Id",
|
|
|
"Status",
|
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
|
- annualEntity.Status = suppliercert.SECOND_TRIAL_STATUS //二级单位复审
|
|
|
- certSrv.UpdateEntityByIdCols(annualId, annualEntity, cols)
|
|
|
+ contractReviewEntity.Status = suppliercert.SECOND_TRIAL_STATUS //二级单位复审
|
|
|
+ svc.UpdateEntityByIdCols(dailyId, contractReviewEntity, cols)
|
|
|
|
|
|
//返回查出的复审人员操作人员列表
|
|
|
- approverIds := annualEntity.SecondAudit
|
|
|
+ approverIds := contractReviewEntity.SecondAudit
|
|
|
this.Data["json"] = approverIds
|
|
|
this.ServeJSON()
|
|
|
}
|
|
|
|
|
|
-// @Title 查询是否交费--回调
|
|
|
+// @Title 获取业务处室接收分办人员列表 --回调
|
|
|
// @Description get user by token
|
|
|
// @Success 200 {string} string
|
|
|
-// @router /check-need-pay [get]
|
|
|
-func (this *OilContractDailyListenerController) CheckNeedPay() {
|
|
|
- businessKey := this.GetString("businessKey")
|
|
|
- annualId := strings.Split(businessKey, "-")[0]
|
|
|
-
|
|
|
- svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
- var annualEntity annualaudit.OilAnnualAudit
|
|
|
- svc.GetEntityById(annualId, &annualEntity)
|
|
|
-
|
|
|
- certSvc := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
- var supplierCertEntity suppliercert.OilSupplierCert
|
|
|
- certSvc.GetEntityById(annualEntity.CerId, &supplierCertEntity)
|
|
|
+// @router /pre-third-trail [post]
|
|
|
+func (this *OilContractDailyListenerController) PreThirdTrialStatus() {
|
|
|
+ var jsonBlob = this.Ctx.Input.RequestBody
|
|
|
+ var listenerApprove ListenerApproveParams
|
|
|
+ json.Unmarshal(jsonBlob, &listenerApprove)
|
|
|
+ dailyId := strings.Split(listenerApprove.BusinessKey, "-")[0]
|
|
|
|
|
|
- var isPayList []string
|
|
|
- isPayList = append(isPayList, suppliercert.PINGSHEN)
|
|
|
- isPayList = append(isPayList, suppliercert.WAIBUSHICHANG)
|
|
|
- var unPayList []string
|
|
|
- unPayList = append(unPayList, suppliercert.YIJIWUZI)
|
|
|
- unPayList = append(unPayList, suppliercert.ERJIWUZI)
|
|
|
- unPayList = append(unPayList, suppliercert.ZHANLUEHEZUO)
|
|
|
- unPayList = append(unPayList, suppliercert.NEIBUDUOYUAN)
|
|
|
+ var contractReviewEntity contractReview.OilContractReview
|
|
|
+ svc := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
+ svc.GetEntityById(dailyId, &contractReviewEntity)
|
|
|
|
|
|
- result := 0
|
|
|
- isPay := "false"
|
|
|
- unPay := "false"
|
|
|
- for _, eachItem := range isPayList {
|
|
|
- if eachItem == supplierCertEntity.InStyle {
|
|
|
- // 需要付费
|
|
|
- isPay = "true"
|
|
|
- result = 1
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- for _, eachItem := range unPayList {
|
|
|
- if eachItem == supplierCertEntity.InStyle {
|
|
|
- // 不需要付费
|
|
|
- unPay = "true"
|
|
|
- result = 2
|
|
|
- break
|
|
|
+ //查出业务处室接收分办的人员
|
|
|
+ stepCode := workflow.PROF_RECE //专业处室接收
|
|
|
+ auditSettingService := auditsetting.GetOilAuditSettingService(utils.DBE)
|
|
|
+ approverIds := auditSettingService.GetApproverIdsByStepCodeAndUnitId(stepCode, strconv.Itoa(contractReviewEntity.ThirdAudit))
|
|
|
+ if approverIds != "" {
|
|
|
+ cols := []string{
|
|
|
+ "Id",
|
|
|
+ "Status",
|
|
|
}
|
|
|
+ //进入此步骤,记录在数据库中
|
|
|
+ contractReviewEntity.Status = suppliercert.THIRD_TRIAL_STATUS ////专业处接收
|
|
|
+ svc.UpdateEntityByIdCols(dailyId, contractReviewEntity, cols)
|
|
|
}
|
|
|
- if isPay == unPay {
|
|
|
- // 准入类型是否付费有误!请联系管理员
|
|
|
- result = 0
|
|
|
- }
|
|
|
-
|
|
|
- this.Data["json"] = result
|
|
|
+ var approveInfo ListenerApproveInfo
|
|
|
+ approveInfo.Users = approverIds
|
|
|
+ this.Data["json"] = &approveInfo
|
|
|
this.ServeJSON()
|
|
|
}
|
|
|
|
|
|
-// @Title 获取交费人--回调
|
|
|
+// @Title 获取业务处室专业审批人员列表--回调
|
|
|
// @Description get user by token
|
|
|
// @Success 200 {string} string
|
|
|
-// @router /pre-payer [get]
|
|
|
-func (this *OilContractDailyListenerController) GetPrePayer() {
|
|
|
+// @router /pre-prof-audit [get]
|
|
|
+func (this *OilContractDailyListenerController) PreProfAudit() {
|
|
|
businessKey := this.GetString("businessKey")
|
|
|
- annualId := strings.Split(businessKey, "-")[0]
|
|
|
- srv := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
- var annualEntity annualaudit.OilAnnualAudit
|
|
|
- srv.GetEntityById(annualId, &annualEntity)
|
|
|
+ dailyId := strings.Split(businessKey, "-")[0]
|
|
|
|
|
|
+ var contractReviewEntity contractReview.OilContractReview
|
|
|
+ svc := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
+ svc.GetEntityById(dailyId, &contractReviewEntity)
|
|
|
cols := []string{
|
|
|
"Id",
|
|
|
"Status",
|
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
|
- annualEntity.Status = suppliercert.PAYING_AUDIT_STATUS //待缴费
|
|
|
- srv.UpdateEntityByIdCols(annualId, annualEntity, cols)
|
|
|
-
|
|
|
- // 获取准入资质信息:
|
|
|
- supplierCertSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
- var supplierCertEntity suppliercert.OilSupplierCert
|
|
|
- supplierCertSrv.GetEntityById(annualEntity.CerId, &supplierCertEntity)
|
|
|
-
|
|
|
- // 年审审批通过且需要交费, 创建交费信息
|
|
|
- supplierSrv := supplier.GetOilSupplierService(utils.DBE)
|
|
|
- var supplierEntity supplier.OilSupplier
|
|
|
- supplierSrv.GetEntityById(annualEntity.SupplierId, &supplierEntity)
|
|
|
-
|
|
|
- paySvc := paymentinfo.GetPaymentService(utils.DBE)
|
|
|
- var Amount float64
|
|
|
- costSvc := oilcostmanage.GetOilCostManageService(utils.DBE)
|
|
|
- Amount = costSvc.GetAmount("ANNUAL", supplierCertEntity.SupplierTypeCode)
|
|
|
- var payInfo paymentinfo.OilPaymentInfo
|
|
|
- payInfo.SrcId = annualEntity.Id
|
|
|
- payInfo.SupplierId = annualEntity.SupplierId
|
|
|
- payInfo.SupplierCertId = annualEntity.CerId
|
|
|
- payInfo.USCCode = supplierEntity.CommercialNo
|
|
|
- payInfo.SupplierName = supplierEntity.SupplierName
|
|
|
- payInfo.PayType = "2"
|
|
|
- payInfo.IsPay = "0"
|
|
|
- payInfo.IsInvoice = "0"
|
|
|
- payInfo.Amount = strconv.FormatFloat(Amount, 'E', -1, 64)
|
|
|
- payInfo.CreateUserId = annualEntity.CreateUserId
|
|
|
- payInfo.CreateBy = annualEntity.CreateBy
|
|
|
- payInfo.CreateOn = time.Now()
|
|
|
- paySvc.InsertEntity(&payInfo)
|
|
|
-
|
|
|
- //创建人即为交费的人员
|
|
|
- approverIds := annualEntity.CreateUserId
|
|
|
- this.Data["json"] = approverIds
|
|
|
+ contractReviewEntity.Status = suppliercert.PROF_AUDIT_STATUS //业务处室专业审批
|
|
|
+ svc.UpdateEntityByIdCols(dailyId, contractReviewEntity, cols)
|
|
|
+
|
|
|
+ //查出业务处室专业审批的人员
|
|
|
+ //专业审批人已在分办时指定
|
|
|
+ //stepCode := workflow.PROF_AUDIT
|
|
|
+ //auditSettingService := auditsetting.GetOilAuditSettingService(utils.DBE)
|
|
|
+ //approverIds := auditSettingService.GetApproverIdsByStepCodeAndUnitId(stepCode, supplierCertEntity.CommitComId)
|
|
|
+ this.Data["json"] = 1
|
|
|
this.ServeJSON()
|
|
|
}
|
|
|
|
|
|
@@ -232,18 +181,18 @@ func (this *OilContractDailyListenerController) GetLawOfficeAuditors() {
|
|
|
var jsonBlob = this.Ctx.Input.RequestBody
|
|
|
var listenerApprove ListenerApproveParams
|
|
|
json.Unmarshal(jsonBlob, &listenerApprove)
|
|
|
- annualId := strings.Split(listenerApprove.BusinessKey, "-")[0]
|
|
|
+ dailylId := strings.Split(listenerApprove.BusinessKey, "-")[0]
|
|
|
|
|
|
- svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
- var annualEntity annualaudit.OilAnnualAudit
|
|
|
- svc.GetEntityById(annualId, &annualEntity)
|
|
|
+ var contractReviewEntity contractReview.OilContractReview
|
|
|
+ svc := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
+ svc.GetEntityById(dailylId, &contractReviewEntity)
|
|
|
cols := []string{
|
|
|
"Id",
|
|
|
"Status",
|
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
|
- annualEntity.Status = suppliercert.CENT_AUDIT_STATUS //企业法规处
|
|
|
- svc.UpdateEntityByIdCols(annualId, annualEntity, cols)
|
|
|
+ contractReviewEntity.Status = suppliercert.STOREING_STATUS //企业法规处
|
|
|
+ svc.UpdateEntityByIdCols(dailylId, contractReviewEntity, cols)
|
|
|
|
|
|
//查出企业法规处审批的人员
|
|
|
stepCode := workflow.PROF_REGULATION //企业法规处
|
|
|
@@ -255,47 +204,17 @@ func (this *OilContractDailyListenerController) GetLawOfficeAuditors() {
|
|
|
this.ServeJSON()
|
|
|
}
|
|
|
|
|
|
-// @Title 企业法规处入库人员列表 --回调
|
|
|
-// @Description get user by token
|
|
|
-// @Success 200 {string} string
|
|
|
-// @router /pre-storage-audit [post]
|
|
|
-func (this *OilContractDailyListenerController) GetStorageAuditor() {
|
|
|
- var jsonBlob = this.Ctx.Input.RequestBody
|
|
|
- var listenerApprove ListenerApproveParams
|
|
|
- json.Unmarshal(jsonBlob, &listenerApprove)
|
|
|
- annualId := strings.Split(listenerApprove.BusinessKey, "-")[0]
|
|
|
-
|
|
|
- srv := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
- var annualEntity annualaudit.OilAnnualAudit
|
|
|
- srv.GetEntityById(annualId, &annualEntity)
|
|
|
- cols := []string{
|
|
|
- "Id",
|
|
|
- "Status",
|
|
|
- }
|
|
|
- //进入此步骤,记录在数据库中
|
|
|
- annualEntity.Status = suppliercert.STOREING_STATUS //待入库
|
|
|
- srv.UpdateEntityByIdCols(annualId, annualEntity, cols)
|
|
|
-
|
|
|
- //查出入库审批的人员
|
|
|
- stepCode := workflow.PROF_REGULATION //待入库(企业法规处)
|
|
|
- auditSettingService := auditsetting.GetOilAuditSettingService(utils.DBE)
|
|
|
- approverIds := auditSettingService.GetApproverIdsByStepCodeForConcentrateAudit(stepCode)
|
|
|
- var approveInfo ListenerApproveInfo
|
|
|
- approveInfo.Users = approverIds
|
|
|
- this.Data["json"] = &approveInfo
|
|
|
- this.ServeJSON()
|
|
|
-}
|
|
|
|
|
|
-// @Title 企业法规处审批入库完成, 工作流结束--回调
|
|
|
+// @Title 企业法规处审批完成, 工作流结束--回调
|
|
|
// @Description get user by token
|
|
|
// @Success 200 {string} string
|
|
|
// @router /workflow-end [get]
|
|
|
func (this *OilContractDailyListenerController) WorkflowEndAudit() {
|
|
|
businessKey := this.GetString("businessKey")
|
|
|
- annualId := strings.Split(businessKey, "-")[0]
|
|
|
- srv := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
- var annualEntity annualaudit.OilAnnualAudit
|
|
|
- srv.GetEntityById(annualId, &annualEntity)
|
|
|
+ dailyId := strings.Split(businessKey, "-")[0]
|
|
|
+ var contractReviewEntity contractReview.OilContractReview
|
|
|
+ srv := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
+ srv.GetEntityById(dailyId, &contractReviewEntity)
|
|
|
|
|
|
cols := []string{
|
|
|
"Id",
|
|
|
@@ -303,16 +222,8 @@ func (this *OilContractDailyListenerController) WorkflowEndAudit() {
|
|
|
"ApplyTime",
|
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
|
- annualEntity.Status = suppliercert.STORE_STATUS //审核完成
|
|
|
- annualEntity.ApplyTime = annualEntity.ApplyTime.AddDate(1, 0, 0) //更新年审表时间
|
|
|
- srv.UpdateEntityByIdCols(annualId, annualEntity, cols)
|
|
|
-
|
|
|
- //更新准入表时间
|
|
|
- paymentInfoSvc := paymentinfo.GetPaymentService(utils.DBE)
|
|
|
- var certModel suppliercert.OilSupplierCert
|
|
|
- certModel.ApplyTime = annualEntity.ApplyTime.AddDate(1, 0, 0)
|
|
|
- certModel.InFlag = "1"
|
|
|
- paymentInfoSvc.UpdateEntityByIdCols(strconv.Itoa(annualEntity.CerId), &certModel, []string{"ApplyTime", "InFlag"})
|
|
|
+ contractReviewEntity.Status = suppliercert.STORE_STATUS //审核完成
|
|
|
+ srv.UpdateEntityByIdCols(dailyId, contractReviewEntity, cols)
|
|
|
|
|
|
this.Data["json"] = 1
|
|
|
this.ServeJSON()
|
|
|
@@ -325,49 +236,19 @@ func (this *OilContractDailyListenerController) WorkflowEndAudit() {
|
|
|
func (this *OilContractDailyListenerController) ApprovalRefuse() {
|
|
|
businessKey := this.GetString("businessKey")
|
|
|
stepCodeStatus := this.GetString("stepCode")
|
|
|
- annualId := strings.Split(businessKey, "-")[0]
|
|
|
- srv := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
- var annualEntity annualaudit.OilAnnualAudit
|
|
|
- srv.GetEntityById(annualId, &annualEntity)
|
|
|
+ dailyId := strings.Split(businessKey, "-")[0]
|
|
|
+ var contractReviewEntity contractReview.OilContractReview
|
|
|
+ srv := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
+ srv.GetEntityById(dailyId, &contractReviewEntity)
|
|
|
|
|
|
cols := []string{
|
|
|
"Id",
|
|
|
"Status",
|
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
|
- annualEntity.Status = stepCodeStatus
|
|
|
- srv.UpdateEntityByIdCols(annualId, annualEntity, cols)
|
|
|
-
|
|
|
- // 获取准入资质信息:
|
|
|
- //supplierCertSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
- //var supplierCertEntity suppliercert.OilSupplierCert
|
|
|
- //supplierCertSrv.GetEntityById(annualEntity.CerId, &supplierCertEntity)
|
|
|
- //supplierSrv := supplier.GetOilSupplierService(utils.DBE)
|
|
|
- //var supplierEntity supplier.OilSupplier
|
|
|
- //supplierSrv.GetEntityById(annualEntity.SupplierId, &supplierEntity)
|
|
|
-
|
|
|
- // TODO 发送驳回通知短信
|
|
|
- //this.AuditRejectNotice(supplierCertEntity, supplierEntity)
|
|
|
+ contractReviewEntity.Status = stepCodeStatus
|
|
|
+ srv.UpdateEntityByIdCols(dailyId, contractReviewEntity, cols)
|
|
|
|
|
|
- this.Data["json"] = annualEntity.CreateUserId
|
|
|
+ this.Data["json"] = contractReviewEntity.CreateUserId
|
|
|
this.ServeJSON()
|
|
|
}
|
|
|
-
|
|
|
-// @Title 增项申请审核未通过短信通知
|
|
|
-// @Description 审核未通过短信通知
|
|
|
-// @Success 200 {object}
|
|
|
-// @router /audit-reject-notice/:id [post]
|
|
|
-func (this *OilContractDailyListenerController) AuditRejectNotice(supplierCertEntity suppliercert.OilSupplierCert, supplierEntity supplier.OilSupplier) {
|
|
|
- toMobile := supplierEntity.Mobile
|
|
|
- bFlag := ""
|
|
|
- if supplierCertEntity.SupplierTypeCode == "01" {
|
|
|
- bFlag = "物资类"
|
|
|
- } else if supplierCertEntity.SupplierTypeCode == "02" {
|
|
|
- bFlag = "基建类"
|
|
|
- } else {
|
|
|
- bFlag = "服务类"
|
|
|
- }
|
|
|
- msg := "您的" + bFlag + "年审申请审核未通过,请及时查看!"
|
|
|
- msgService := msg2.GetMsgService(utils.DBE)
|
|
|
- msgService.HandleMsg(toMobile, msg, "5-2", supplierCertEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertEntity.CreateUserId), this.User.Username)
|
|
|
-}
|