12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- package logic
- import (
- "app.yhyue.com/moapp/jybase/encrypt"
- "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/rpc/type/bxcore"
- "context"
- "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/api/internal/svc"
- "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/api/internal/types"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type ProjectStatisticsLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewProjectStatisticsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ProjectStatisticsLogic {
- return &ProjectStatisticsLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *ProjectStatisticsLogic) ProjectStatistics(req *types.PtatisticsListReq) (resp *types.CommonResp, err error) {
- // todo: add your logic here and delete this line
- for k, v := range req.EntUserIdArr {
- req.EntUserIdArr[k] = encrypt.SE.Decode4Hex(v)
- }
- res, err := l.svcCtx.BxCore.ProjectStatistics(l.ctx, &bxcore.StatisticsListReq{
- EntId: req.EntId,
- EntUserId: req.EntUserId,
- PositionId: req.PositionId,
- EntUserIdArr: req.EntUserIdArr,
- DeptId: req.DeptId,
- StartTime: req.StartTime,
- EndTime: req.EndTime,
- BidWay: req.BidWay,
- })
- if err != nil {
- return nil, err
- }
- return &types.CommonResp{
- Data: res.Data,
- }, nil
- }
|