|
@@ -5,6 +5,7 @@ import (
|
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
|
"hongze/hz_crm_api/controllers"
|
|
|
"hongze/hz_crm_api/models"
|
|
|
+ "hongze/hz_crm_api/models/company"
|
|
|
"hongze/hz_crm_api/models/seal/request"
|
|
|
"hongze/hz_crm_api/models/seal/response"
|
|
|
"hongze/hz_crm_api/services/seal"
|
|
@@ -28,6 +29,7 @@ type SealApprovalController struct {
|
|
|
// @Param StartTime query string false "提交开始时间"
|
|
|
// @Param EndTime query string false "提交结束时间"
|
|
|
// @Param Keyword query string false "搜索关键词(客户名称/社会信用码)"
|
|
|
+// @Param IsExport query bool false "是否导出excel,默认是false"
|
|
|
// @Success 200 {object} response.SealApprovalListResp
|
|
|
// @router /getApprovalPageList [get]
|
|
|
func (this *SealApprovalController) List() {
|
|
@@ -55,7 +57,7 @@ func (this *SealApprovalController) List() {
|
|
|
currentIndex = 1
|
|
|
}
|
|
|
startSize = paging.StartIndex(currentIndex, pageSize)
|
|
|
-
|
|
|
+ isExport, _ := this.GetBool("IsExport", false)
|
|
|
// 筛选条件
|
|
|
condition := ""
|
|
|
joinCondition := " AND a.curr_node_id = d.node_id" // contract_approval和contract_approval_record的join条件
|
|
@@ -158,6 +160,12 @@ func (this *SealApprovalController) List() {
|
|
|
pars = append(pars, keywords, keywords, keywords)
|
|
|
}
|
|
|
|
|
|
+ //导出excel
|
|
|
+ if isExport {
|
|
|
+ //TripListExport(this, condition, joinCondition, pars)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
// 列表
|
|
|
listData, listTotal, err := seal.GetSealApprovalPageList(condition, joinCondition, pars, startSize, pageSize, sysUser)
|
|
|
if err != nil {
|
|
@@ -693,3 +701,36 @@ func (this *SealApprovalController) OperationList() {
|
|
|
List: list,
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+// 关联公司列表
|
|
|
+// @Title 关联公司列表
|
|
|
+// @Description 关联公司列表
|
|
|
+// @Success 200 {object} response.SealApprovalListResp
|
|
|
+// @router /getAffiliatedCompany [get]
|
|
|
+func (this *SealApprovalController) AffiliatedCompanyList() {
|
|
|
+ br := new(models.BaseResponse).Init()
|
|
|
+ defer func() {
|
|
|
+ this.Data["json"] = br
|
|
|
+ this.ServeJSON()
|
|
|
+ }()
|
|
|
+ sysUser := this.SysUser
|
|
|
+ if sysUser == nil {
|
|
|
+ br.Msg = "请登录"
|
|
|
+ br.ErrMsg = "请登录,SysUser is Empty"
|
|
|
+ br.Ret = 408
|
|
|
+ return
|
|
|
+ }
|
|
|
+ crmConfig, err := company.GetConfigDetailByCode("affiliated_company")
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取配置失败"
|
|
|
+ br.ErrMsg = "获取配置失败"
|
|
|
+ br.IsSendEmail = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ list := strings.Split(crmConfig.ConfigValue, ",")
|
|
|
+
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "获取成功"
|
|
|
+ br.Data = list
|
|
|
+}
|