作者 yangfu
... ... @@ -34,7 +34,7 @@ func ToCooperationProjectItem(projecetParam *allied_creation_cooperation.Coopera
}
data.CooperationProjectSponsor.UsersId = projecetParam.CooperationProjectSponsor.UsersId
data.CooperationProjectSponsor.UserInfo.UsersId = projecetParam.CooperationProjectSponsor.UsersId
data.CooperationProjectSponsor.UserInfo.Phone = projecetParam.CooperationProjectSponsor.UserInfo.Phone
data.CooperationProjectSponsor.UserInfo.Phone = projecetParam.CooperationProjectSponsor.UserInfo.UserPhone
data.CooperationProjectSponsor.UserInfo.UsersName = projecetParam.CooperationProjectSponsor.UserInfo.UsersName
return &data
}
... ... @@ -77,7 +77,7 @@ func ToCooperationProjectInfo(projecetParam *allied_creation_cooperation.Coopera
}
data.CooperationProjectSponsor.UsersId = projecetParam.CooperationProjectSponsor.UsersId
data.CooperationProjectSponsor.UserInfo.UsersId = projecetParam.CooperationProjectSponsor.UsersId
data.CooperationProjectSponsor.UserInfo.Phone = projecetParam.CooperationProjectSponsor.UserInfo.Phone
data.CooperationProjectSponsor.UserInfo.Phone = projecetParam.CooperationProjectSponsor.UserInfo.UserPhone
data.CooperationProjectSponsor.UserInfo.UsersName = projecetParam.CooperationProjectSponsor.UserInfo.UsersName
return &data
}
... ...
... ... @@ -70,7 +70,10 @@ func ToCooperationProjectInfo(param *allied_creation_cooperation.CooperationProj
data.CooperationProjectSponsor.UsersCode = param.CooperationProjectSponsor.UserInfo.UsersCode
data.CooperationProjectSponsor.UsersName = param.CooperationProjectSponsor.UserInfo.UsersName
data.CooperationProjectSponsor.UserId = param.CooperationProjectSponsor.UsersId
data.CooperationProjectSponsor.UserInfo = param.CooperationProjectSponsor.UserInfo
data.CooperationProjectSponsor.UserInfo.Phone = param.CooperationProjectSponsor.UserInfo.UserPhone
data.CooperationProjectSponsor.UserInfo.UsersId = param.CooperationProjectSponsor.UsersId
data.CooperationProjectSponsor.UserInfo.UsersName = param.CooperationProjectSponsor.UserInfo.UsersName
data.CooperationProjectSponsor.UserInfo.UsersCode = param.CooperationProjectSponsor.UserInfo.UsersCode
return &data
}
... ...
... ... @@ -88,7 +88,7 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
var (
applications []dto.CooperationApplicationItem
applications = []dto.CooperationApplicationItem{}
)
for i := range resultApplication.Grid.List {
item := dto.ToCooperationApplicationItem(&resultApplication.Grid.List[i])
... ...
... ... @@ -14,6 +14,8 @@ type NoticeSettingListQuery struct {
PageNumber int `json:"pageNumber"`
// 查询限制
PageSize int `json:"pageSize" valid:"Required"`
ModuleAction string `json:"moduleAction"`
OrgName string `json:"orgName"`
}
func (noticeSettingListCommand *NoticeSettingListQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -8,6 +8,7 @@ import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/noticesetting/dto"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/noticesetting/query"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_basic"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
)
// 推送消息配置
... ... @@ -22,10 +23,34 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettin
creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(
noticeSettingListQuery.Operator,
)
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
noticeSettingListQuery.Operator,
)
orgResult, err := creationUserGateway.OrgSearch(allied_creation_user.ReqOrgSearch{
Offset: 1,
Limit: 20,
CompanyId: int(noticeSettingListQuery.Operator.CompanyId),
IsOrg: 1,
DepName: noticeSettingListQuery.OrgName,
})
if err != nil {
if err != nil {
return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
}
}
if len(orgResult.Orgs) == 0 {
return 0, []dto.NoticeSettingItem{}, nil
}
var orgIds []int
for _, v := range orgResult.Orgs {
orgIds = append(orgIds, v.OrgID)
}
result, err := creationBasicGateway.NoticeSettingSearch(allied_creation_basic.ReqNoticeSettingSearch{
PageIndex: noticeSettingListQuery.PageNumber,
PageSize: noticeSettingListQuery.PageSize,
CompanyId: noticeSettingListQuery.Operator.CompanyId,
OrgIds: orgIds,
ModuleActionName: noticeSettingListQuery.ModuleAction,
})
if err != nil {
return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
... ...
... ... @@ -68,6 +68,8 @@ type (
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
CompanyId int64 `json:"companyId"`
OrgIds []int `json:"orgIds"`
ModuleActionName string `json:"moduleActionName"` //消息环节名称
}
DataNoticeSettingSearch struct {
... ... @@ -96,7 +98,7 @@ type (
ModuleActionList []struct {
ModuleCode string `json:"moduleCode"`
ActionCode string `json:"actionCode"`
Name string `json:"name"`
ActionName string `json:"actionName"`
} `json:"moduleActionList"`
ParamList []struct {
// 变量的代码标识
... ...
... ... @@ -37,9 +37,11 @@ type (
}
DataSystemSettingSearch struct {
SystemSetting []struct {
Grid struct {
Total int `json:"total"`
List []struct {
// 公司id
CompanyId int64 `json:"companyId,string"`
CompanyId int64 `json:"companyId,string,"`
// 管控层级
ControlLevel string `json:"controlLevel"`
// 描述
... ... @@ -49,12 +51,13 @@ type (
// 设置对应的名称
SettingName string `json:"settingName"`
// 数据id
SystemSettingId int64 `json:"systemSettingId,string"`
SystemSettingId int64 `json:"systemSettingId,string,"`
// 设定的值
Value string `json:"value"`
// 值类型
ValueType string `json:"valueType"`
}
} `json:"list"`
} `json:"grid"`
}
)
... ...
... ... @@ -40,8 +40,8 @@ type CooperationProject struct {
UserInfo struct {
UsersName string `json:"userName"`
UsersCode string `json:"userCode"`
Phone string `json:"phone"`
UsersId int `json:"userId,string,"`
UserPhone string `json:"userPhone"`
UserAccount string `json:"userAccount"`
} `json:"userInfo"`
} `json:"cooperationProjectPublisher"` //项目发布人,即操作人
CooperationProjectSponsor struct {
... ... @@ -49,8 +49,8 @@ type CooperationProject struct {
UserInfo struct {
UsersName string `json:"userName"`
UsersCode string `json:"userCode"`
Phone string `json:"phone"`
UsersId int `json:"userId,string"`
UserPhone string `json:"userPhone"`
UserAccount string `json:"userAccount"`
} `json:"userInfo"`
} `json:"cooperationProjectSponsor"` //项目发起人
CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerTypes"` //共创合约承接对象,1员工,2共创用户,3公开
... ...
... ... @@ -31,7 +31,9 @@ func (controller *DictionaryController) UpdateDictionary() {
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
dictionaryId, _ := controller.GetInt64("::dictionaryId")
updateCommand.Operator = controller.GetOperator()
updateCommand.DictionaryId = dictionaryId
data, err := dictionaryService.UpdateDictionay(updateCommand)
controller.Response(data, err)
}
... ... @@ -51,10 +53,9 @@ func (controller *DictionaryController) RemoveDictionary() {
func (controller *DictionaryController) GetDictionary() {
dictionaryService := service.NewDictionayService(nil)
getQuery := &query.GetDictionaryQuery{}
err := controller.Unmarshal(getQuery)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
dictionaryId, _ := controller.GetInt64("::dictionaryId")
getQuery.DictionaryId = int(dictionaryId)
getQuery.Operator = controller.GetOperator()
data, err := dictionaryService.GetDictionay(getQuery)
controller.Response(data, err)
... ...