...
|
...
|
@@ -10,6 +10,245 @@ type CooperationController struct { |
|
|
baseController
|
|
|
}
|
|
|
|
|
|
/***** CooperationApplicationsService 共创申请服务 *****/
|
|
|
func (controller *CooperationController) SearchFeedback() {
|
|
|
svr := service.UndertakerFeedbackService{}
|
|
|
cmd := &command.SearchFeedbackCommand{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.SearchFeedback(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationController) CreateFeedback() {
|
|
|
svr := service.UndertakerFeedbackService{}
|
|
|
cmd := &command.CreateFeedbackCommand{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.CreateFeedback(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
/***** CooperationApplicationsService 共创申请服务 - 企业端 *****/
|
|
|
func (controller *CooperationController) GetCooperationApplication() {
|
|
|
svr := service.CooperationApplicationsService{}
|
|
|
cmd := &command.GetCooperationApplicationQuery{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.GetCooperationApplications(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationController) AuditCooperationApplication() {
|
|
|
svr := service.CooperationApplicationsService{}
|
|
|
cmd := &command.AuditCooperationApplicationCommand{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.AuditCooperationApplications(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationController) SearchCooperationApplication() {
|
|
|
svr := service.CooperationApplicationsService{}
|
|
|
cmd := &command.ListCooperationApplicationQuery{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.SearchCooperationApplications(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
/***** CooperationApplicationsService 共创申请服务 - 共创用户端 *****/
|
|
|
func (controller *CooperationController) CreateCooperationApplication() {
|
|
|
svr := service.CooperationApplicationsService{}
|
|
|
cmd := &command.CreateCooperationApplicationCommand{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.CreateCooperationApplications(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationController) PersonGetCooperationApplication() {
|
|
|
svr := service.CooperationApplicationsService{}
|
|
|
cmd := &command.GetCooperationApplicationQuery{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.PersonGetCooperationApplications(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationController) PersonCancelCooperationApplication() {
|
|
|
svr := service.CooperationApplicationsService{}
|
|
|
cmd := &command.CancelCooperationApplicationCommand{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.PersonCancelCooperationApplications(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationController) PersonSearchCooperationApplication() {
|
|
|
svr := service.CooperationApplicationsService{}
|
|
|
cmd := &command.ListCooperationApplicationQuery{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.PersonSearchCooperationApplications(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
/***** CooperationProjectService 共创项目服务 *****/
|
|
|
func (controller *CooperationController) CreateCooperationProject() {
|
|
|
svr := service.CooperationProjectService{}
|
|
|
cmd := &command.CreateCooperationProjectCommand{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.CreateCooperationProject(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationController) GetCooperationProject() {
|
|
|
svr := service.CooperationProjectService{}
|
|
|
cmd := &command.GetCooperationProjectQuery{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.GetCooperationProject(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationController) UpdateCooperationProject() {
|
|
|
svr := service.CooperationProjectService{}
|
|
|
cmd := &command.UpdateCooperationProjectCommand{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.UpdateCooperationProject(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationController) EndCooperationProject() {
|
|
|
svr := service.CooperationProjectService{}
|
|
|
cmd := &command.EndCooperationProjectCommand{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.EndCooperationProject(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationController) SearchCooperationProject() {
|
|
|
svr := service.CooperationProjectService{}
|
|
|
cmd := &command.ListCooperationProjectQuery{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.SearchCooperationProject(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
/***** CompanyCreditAccountService 企业端账期结算 *****/
|
|
|
func (controller *CooperationController) CreditAccountSearch() {
|
|
|
svr := service.CompanyCreditAccountService{}
|
|
|
cmd := &command.CreditAccountSearchCommand{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.CreditAccountSearch(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationController) CreditAccountGet() {
|
|
|
svr := service.CompanyCreditAccountService{}
|
|
|
cmd := &command.CreditAccountGetCommand{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.CreditAccountGet(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationController) CreditAccountPay() {
|
|
|
svr := service.CompanyCreditAccountService{}
|
|
|
cmd := &command.CreditAccountPayCommand{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.CreditAccountPay(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationController) CreditAccountPaySearch() {
|
|
|
svr := service.CompanyCreditAccountService{}
|
|
|
cmd := &command.CreditAccountPaySearchCommand{}
|
|
|
err := controller.Unmarshal(cmd)
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
data, err := svr.CreditAccountPaySearch(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
/***** CompanyDividends 企业端分红 *****/
|
|
|
func (controller *CooperationController) GetDividendContracts() {
|
|
|
svr := service.CompanyStatisticsService{}
|
...
|
...
|
|