|
@@ -2,7 +2,7 @@ package oilcontract
|
|
|
|
|
|
|
|
import (
|
|
import (
|
|
|
"dashoo.cn/backend/api/business/auditsetting"
|
|
"dashoo.cn/backend/api/business/auditsetting"
|
|
|
- "dashoo.cn/backend/api/business/oilcontract/contractReview"
|
|
|
|
|
|
|
+ "dashoo.cn/backend/api/business/oilcontract/contractSumScore"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
|
|
"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
|
|
|
"dashoo.cn/backend/api/business/workflow"
|
|
"dashoo.cn/backend/api/business/workflow"
|
|
|
. "dashoo.cn/backend/api/controllers"
|
|
. "dashoo.cn/backend/api/controllers"
|
|
@@ -23,21 +23,22 @@ type OilContractAnnualListenerController struct {
|
|
|
// @router /pre-first-trail [get]
|
|
// @router /pre-first-trail [get]
|
|
|
func (this *OilContractAnnualListenerController) PreFirstTrail() {
|
|
func (this *OilContractAnnualListenerController) PreFirstTrail() {
|
|
|
businessKey := this.GetString("businessKey")
|
|
businessKey := this.GetString("businessKey")
|
|
|
- reviewId := strings.Split(businessKey, "-")[0]
|
|
|
|
|
|
|
+ annualId := strings.Split(businessKey, "-")[0]
|
|
|
|
|
|
|
|
- var contractReviewEntity contractReview.OilContractReview
|
|
|
|
|
- svc := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
|
|
- svc.GetEntityById(reviewId, &contractReviewEntity)
|
|
|
|
|
|
|
+ svc := contractSumScore.GetOilContractSumScoreService(utils.DBE)
|
|
|
|
|
+ var contractSumEntity contractSumScore.OilContractSumScore
|
|
|
|
|
+ svc.GetEntityById(annualId, &contractSumEntity)
|
|
|
|
|
+
|
|
|
cols := []string{
|
|
cols := []string{
|
|
|
"Id",
|
|
"Id",
|
|
|
"Status",
|
|
"Status",
|
|
|
}
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
//进入此步骤,记录在数据库中
|
|
|
- contractReviewEntity.Status = suppliercert.FIRST_TRIAL_STATUS //二级单位初审
|
|
|
|
|
- svc.UpdateEntityByIdCols(reviewId, contractReviewEntity, cols)
|
|
|
|
|
|
|
+ contractSumEntity.Status = suppliercert.FIRST_TRIAL_STATUS //二级单位初审
|
|
|
|
|
+ svc.UpdateEntityByIdCols(annualId, contractSumEntity, cols)
|
|
|
|
|
|
|
|
//返回查出的初审人员操作人员列表
|
|
//返回查出的初审人员操作人员列表
|
|
|
- approverIds := contractReviewEntity.FirstAudit
|
|
|
|
|
|
|
+ approverIds := contractSumEntity.FirstAudit
|
|
|
this.Data["json"] = approverIds
|
|
this.Data["json"] = approverIds
|
|
|
this.ServeJSON()
|
|
this.ServeJSON()
|
|
|
}
|
|
}
|
|
@@ -48,21 +49,21 @@ func (this *OilContractAnnualListenerController) PreFirstTrail() {
|
|
|
// @router /pre-second-trail [get]
|
|
// @router /pre-second-trail [get]
|
|
|
func (this *OilContractAnnualListenerController) PreSecondTrail() {
|
|
func (this *OilContractAnnualListenerController) PreSecondTrail() {
|
|
|
businessKey := this.GetString("businessKey")
|
|
businessKey := this.GetString("businessKey")
|
|
|
- dailyId := strings.Split(businessKey, "_")[0]
|
|
|
|
|
|
|
+ annualId := strings.Split(businessKey, "_")[0]
|
|
|
|
|
|
|
|
- var contractReviewEntity contractReview.OilContractReview
|
|
|
|
|
- svc := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
|
|
- svc.GetEntityById(dailyId, &contractReviewEntity)
|
|
|
|
|
|
|
+ svc := contractSumScore.GetOilContractSumScoreService(utils.DBE)
|
|
|
|
|
+ var contractSumEntity contractSumScore.OilContractSumScore
|
|
|
|
|
+ svc.GetEntityById(annualId, &contractSumEntity)
|
|
|
cols := []string{
|
|
cols := []string{
|
|
|
"Id",
|
|
"Id",
|
|
|
"Status",
|
|
"Status",
|
|
|
}
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
//进入此步骤,记录在数据库中
|
|
|
- contractReviewEntity.Status = suppliercert.SECOND_TRIAL_STATUS //二级单位复审
|
|
|
|
|
- svc.UpdateEntityByIdCols(dailyId, contractReviewEntity, cols)
|
|
|
|
|
|
|
+ contractSumEntity.Status = suppliercert.SECOND_TRIAL_STATUS //二级单位复审
|
|
|
|
|
+ svc.UpdateEntityByIdCols(annualId, contractSumEntity, cols)
|
|
|
|
|
|
|
|
//返回查出的复审人员操作人员列表
|
|
//返回查出的复审人员操作人员列表
|
|
|
- approverIds := contractReviewEntity.SecondAudit
|
|
|
|
|
|
|
+ approverIds := contractSumEntity.SecondAudit
|
|
|
this.Data["json"] = approverIds
|
|
this.Data["json"] = approverIds
|
|
|
this.ServeJSON()
|
|
this.ServeJSON()
|
|
|
}
|
|
}
|
|
@@ -75,24 +76,24 @@ func (this *OilContractAnnualListenerController) PreThirdTrialStatus() {
|
|
|
var jsonBlob = this.Ctx.Input.RequestBody
|
|
var jsonBlob = this.Ctx.Input.RequestBody
|
|
|
var listenerApprove ListenerApproveParams
|
|
var listenerApprove ListenerApproveParams
|
|
|
json.Unmarshal(jsonBlob, &listenerApprove)
|
|
json.Unmarshal(jsonBlob, &listenerApprove)
|
|
|
- dailyId := strings.Split(listenerApprove.BusinessKey, "-")[0]
|
|
|
|
|
|
|
+ annualId := strings.Split(listenerApprove.BusinessKey, "-")[0]
|
|
|
|
|
|
|
|
- var contractReviewEntity contractReview.OilContractReview
|
|
|
|
|
- svc := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
|
|
- svc.GetEntityById(dailyId, &contractReviewEntity)
|
|
|
|
|
|
|
+ svc := contractSumScore.GetOilContractSumScoreService(utils.DBE)
|
|
|
|
|
+ var contractSumEntity contractSumScore.OilContractSumScore
|
|
|
|
|
+ svc.GetEntityById(annualId, &contractSumEntity)
|
|
|
|
|
|
|
|
//查出业务处室接收分办的人员
|
|
//查出业务处室接收分办的人员
|
|
|
stepCode := workflow.PROF_RECE //专业处室接收
|
|
stepCode := workflow.PROF_RECE //专业处室接收
|
|
|
auditSettingService := auditsetting.GetOilAuditSettingService(utils.DBE)
|
|
auditSettingService := auditsetting.GetOilAuditSettingService(utils.DBE)
|
|
|
- approverIds := auditSettingService.GetApproverIdsByStepCodeAndUnitId(stepCode, strconv.Itoa(contractReviewEntity.ThirdAudit))
|
|
|
|
|
|
|
+ approverIds := auditSettingService.GetApproverIdsByStepCodeAndUnitId(stepCode, strconv.Itoa(contractSumEntity.ThirdAudit))
|
|
|
if approverIds != "" {
|
|
if approverIds != "" {
|
|
|
cols := []string{
|
|
cols := []string{
|
|
|
"Id",
|
|
"Id",
|
|
|
"Status",
|
|
"Status",
|
|
|
}
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
//进入此步骤,记录在数据库中
|
|
|
- contractReviewEntity.Status = suppliercert.THIRD_TRIAL_STATUS ////专业处接收
|
|
|
|
|
- svc.UpdateEntityByIdCols(dailyId, contractReviewEntity, cols)
|
|
|
|
|
|
|
+ contractSumEntity.Status = suppliercert.THIRD_TRIAL_STATUS ////专业处接收
|
|
|
|
|
+ svc.UpdateEntityByIdCols(annualId, contractSumEntity, cols)
|
|
|
}
|
|
}
|
|
|
var approveInfo ListenerApproveInfo
|
|
var approveInfo ListenerApproveInfo
|
|
|
approveInfo.Users = approverIds
|
|
approveInfo.Users = approverIds
|
|
@@ -106,18 +107,18 @@ func (this *OilContractAnnualListenerController) PreThirdTrialStatus() {
|
|
|
// @router /pre-prof-audit [get]
|
|
// @router /pre-prof-audit [get]
|
|
|
func (this *OilContractAnnualListenerController) PreProfAudit() {
|
|
func (this *OilContractAnnualListenerController) PreProfAudit() {
|
|
|
businessKey := this.GetString("businessKey")
|
|
businessKey := this.GetString("businessKey")
|
|
|
- dailyId := strings.Split(businessKey, "-")[0]
|
|
|
|
|
|
|
+ annualId := strings.Split(businessKey, "-")[0]
|
|
|
|
|
|
|
|
- var contractReviewEntity contractReview.OilContractReview
|
|
|
|
|
- svc := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
|
|
- svc.GetEntityById(dailyId, &contractReviewEntity)
|
|
|
|
|
|
|
+ svc := contractSumScore.GetOilContractSumScoreService(utils.DBE)
|
|
|
|
|
+ var contractSumEntity contractSumScore.OilContractSumScore
|
|
|
|
|
+ svc.GetEntityById(annualId, &contractSumEntity)
|
|
|
cols := []string{
|
|
cols := []string{
|
|
|
"Id",
|
|
"Id",
|
|
|
"Status",
|
|
"Status",
|
|
|
}
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
//进入此步骤,记录在数据库中
|
|
|
- contractReviewEntity.Status = suppliercert.PROF_AUDIT_STATUS //业务处室专业审批
|
|
|
|
|
- svc.UpdateEntityByIdCols(dailyId, contractReviewEntity, cols)
|
|
|
|
|
|
|
+ contractSumEntity.Status = suppliercert.PROF_AUDIT_STATUS //业务处室专业审批
|
|
|
|
|
+ svc.UpdateEntityByIdCols(annualId, contractSumEntity, cols)
|
|
|
|
|
|
|
|
//查出业务处室专业审批的人员
|
|
//查出业务处室专业审批的人员
|
|
|
//专业审批人已在分办时指定
|
|
//专业审批人已在分办时指定
|
|
@@ -136,18 +137,18 @@ func (this *OilContractAnnualListenerController) GetLawOfficeAuditors() {
|
|
|
var jsonBlob = this.Ctx.Input.RequestBody
|
|
var jsonBlob = this.Ctx.Input.RequestBody
|
|
|
var listenerApprove ListenerApproveParams
|
|
var listenerApprove ListenerApproveParams
|
|
|
json.Unmarshal(jsonBlob, &listenerApprove)
|
|
json.Unmarshal(jsonBlob, &listenerApprove)
|
|
|
- dailylId := strings.Split(listenerApprove.BusinessKey, "-")[0]
|
|
|
|
|
|
|
+ annualId := strings.Split(listenerApprove.BusinessKey, "-")[0]
|
|
|
|
|
|
|
|
- var contractReviewEntity contractReview.OilContractReview
|
|
|
|
|
- svc := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
|
|
- svc.GetEntityById(dailylId, &contractReviewEntity)
|
|
|
|
|
|
|
+ svc := contractSumScore.GetOilContractSumScoreService(utils.DBE)
|
|
|
|
|
+ var contractSumEntity contractSumScore.OilContractSumScore
|
|
|
|
|
+ svc.GetEntityById(annualId, &contractSumEntity)
|
|
|
cols := []string{
|
|
cols := []string{
|
|
|
"Id",
|
|
"Id",
|
|
|
"Status",
|
|
"Status",
|
|
|
}
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
//进入此步骤,记录在数据库中
|
|
|
- contractReviewEntity.Status = suppliercert.STOREING_STATUS //企业法规处
|
|
|
|
|
- svc.UpdateEntityByIdCols(dailylId, contractReviewEntity, cols)
|
|
|
|
|
|
|
+ contractSumEntity.Status = suppliercert.STOREING_STATUS //企业法规处
|
|
|
|
|
+ svc.UpdateEntityByIdCols(annualId, contractSumEntity, cols)
|
|
|
|
|
|
|
|
//查出企业法规处审批的人员
|
|
//查出企业法规处审批的人员
|
|
|
stepCode := workflow.PROF_REGULATION //企业法规处
|
|
stepCode := workflow.PROF_REGULATION //企业法规处
|
|
@@ -166,10 +167,10 @@ func (this *OilContractAnnualListenerController) GetLawOfficeAuditors() {
|
|
|
// @router /workflow-end [get]
|
|
// @router /workflow-end [get]
|
|
|
func (this *OilContractAnnualListenerController) WorkflowEndAudit() {
|
|
func (this *OilContractAnnualListenerController) WorkflowEndAudit() {
|
|
|
businessKey := this.GetString("businessKey")
|
|
businessKey := this.GetString("businessKey")
|
|
|
- dailyId := strings.Split(businessKey, "-")[0]
|
|
|
|
|
- var contractReviewEntity contractReview.OilContractReview
|
|
|
|
|
- srv := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
|
|
- srv.GetEntityById(dailyId, &contractReviewEntity)
|
|
|
|
|
|
|
+ annualId := strings.Split(businessKey, "-")[0]
|
|
|
|
|
+ svc := contractSumScore.GetOilContractSumScoreService(utils.DBE)
|
|
|
|
|
+ var contractSumEntity contractSumScore.OilContractSumScore
|
|
|
|
|
+ svc.GetEntityById(annualId, &contractSumEntity)
|
|
|
|
|
|
|
|
cols := []string{
|
|
cols := []string{
|
|
|
"Id",
|
|
"Id",
|
|
@@ -177,8 +178,8 @@ func (this *OilContractAnnualListenerController) WorkflowEndAudit() {
|
|
|
"ApplyTime",
|
|
"ApplyTime",
|
|
|
}
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
//进入此步骤,记录在数据库中
|
|
|
- contractReviewEntity.Status = suppliercert.STORE_STATUS //审核完成
|
|
|
|
|
- srv.UpdateEntityByIdCols(dailyId, contractReviewEntity, cols)
|
|
|
|
|
|
|
+ contractSumEntity.Status = suppliercert.STORE_STATUS //审核完成
|
|
|
|
|
+ svc.UpdateEntityByIdCols(annualId, contractSumEntity, cols)
|
|
|
|
|
|
|
|
this.Data["json"] = 1
|
|
this.Data["json"] = 1
|
|
|
this.ServeJSON()
|
|
this.ServeJSON()
|
|
@@ -191,19 +192,19 @@ func (this *OilContractAnnualListenerController) WorkflowEndAudit() {
|
|
|
func (this *OilContractAnnualListenerController) ApprovalRefuse() {
|
|
func (this *OilContractAnnualListenerController) ApprovalRefuse() {
|
|
|
businessKey := this.GetString("businessKey")
|
|
businessKey := this.GetString("businessKey")
|
|
|
stepCodeStatus := this.GetString("stepCode")
|
|
stepCodeStatus := this.GetString("stepCode")
|
|
|
- dailyId := strings.Split(businessKey, "-")[0]
|
|
|
|
|
- var contractReviewEntity contractReview.OilContractReview
|
|
|
|
|
- srv := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
|
|
- srv.GetEntityById(dailyId, &contractReviewEntity)
|
|
|
|
|
|
|
+ annualId := strings.Split(businessKey, "-")[0]
|
|
|
|
|
+ svc := contractSumScore.GetOilContractSumScoreService(utils.DBE)
|
|
|
|
|
+ var contractSumEntity contractSumScore.OilContractSumScore
|
|
|
|
|
+ svc.GetEntityById(annualId, &contractSumEntity)
|
|
|
|
|
|
|
|
cols := []string{
|
|
cols := []string{
|
|
|
"Id",
|
|
"Id",
|
|
|
"Status",
|
|
"Status",
|
|
|
}
|
|
}
|
|
|
//进入此步骤,记录在数据库中
|
|
//进入此步骤,记录在数据库中
|
|
|
- contractReviewEntity.Status = stepCodeStatus
|
|
|
|
|
- srv.UpdateEntityByIdCols(dailyId, contractReviewEntity, cols)
|
|
|
|
|
|
|
+ contractSumEntity.Status = stepCodeStatus
|
|
|
|
|
+ svc.UpdateEntityByIdCols(annualId, contractSumEntity, cols)
|
|
|
|
|
|
|
|
- this.Data["json"] = contractReviewEntity.CreateUserId
|
|
|
|
|
|
|
+ this.Data["json"] = contractSumEntity.CreateUserId
|
|
|
this.ServeJSON()
|
|
this.ServeJSON()
|
|
|
}
|
|
}
|