调整校区/品牌查询
This commit is contained in:
parent
8465ceb4d0
commit
5f2973e4a2
@ -89,7 +89,7 @@ public class MiniLoginStrategy implements LoginStrategy {
|
|||||||
private void changeJamboxUser(MiniUserLoginInfo loginInfo, Map<String, Object> credentials, SourceType sourceType) {
|
private void changeJamboxUser(MiniUserLoginInfo loginInfo, Map<String, Object> credentials, SourceType sourceType) {
|
||||||
//获取品牌表
|
//获取品牌表
|
||||||
Row brand = DbChain.table("cp_sys_brand")
|
Row brand = DbChain.table("cp_sys_brand")
|
||||||
.select("csb.id", "csb.is_open_mall")
|
.select("csb.id", "csb.is_open_sharing")
|
||||||
.from("cp_sys_brand").as("csb")
|
.from("cp_sys_brand").as("csb")
|
||||||
.leftJoin("cp_j_brand_extend").as("cjbe").on("cjbe.brand_id = csb.id")
|
.leftJoin("cp_j_brand_extend").as("cjbe").on("cjbe.brand_id = csb.id")
|
||||||
.and("cjbe.brand_cloud_id = ?", credentials.get("brandId"))
|
.and("cjbe.brand_cloud_id = ?", credentials.get("brandId"))
|
||||||
|
|||||||
@ -2,13 +2,9 @@ package com.cpop.oam.business.controller.callback;
|
|||||||
|
|
||||||
import com.cpop.common.utils.JsonUtils;
|
import com.cpop.common.utils.JsonUtils;
|
||||||
import com.cpop.common.utils.StringUtils;
|
import com.cpop.common.utils.StringUtils;
|
||||||
import com.cpop.core.service.RedisService;
|
|
||||||
import com.cpop.core.utils.SpringUtils;
|
|
||||||
import com.cpop.oam.business.service.OamWxCpService;
|
import com.cpop.oam.business.service.OamWxCpService;
|
||||||
import com.cpop.oam.framework.config.wxCp.WxCpConfiguration;
|
import com.cpop.oam.framework.config.wxCp.WxCpConfiguration;
|
||||||
import com.cpop.oam.framework.constant.WxCpConstant;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import me.chanjar.weixin.cp.api.WxCpService;
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
|
||||||
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
|
||||||
|
|||||||
@ -145,14 +145,10 @@ public class FinanceReimburseServiceImpl extends ServiceImpl<FinanceReimburseMap
|
|||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public ReimbursePersonStatisticVo getPersonStatistic() {
|
public ReimbursePersonStatisticVo getPersonStatistic() {
|
||||||
//获取用户信息
|
|
||||||
LoginUser loginUser = SecurityUtils.getInstance().getLoginUser();
|
|
||||||
//读取员工信息
|
//读取员工信息
|
||||||
RedisService redisService = SpringUtils.getBean(RedisService.class);
|
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
|
||||||
JSONObject cacheObject = redisService.getCacheObject(UserType.OAM_USER.getKey() + loginUser.getUsername());
|
|
||||||
OamStaffLoginInfo loginInfo = cacheObject.getJSONObject("user").toJavaObject(OamStaffLoginInfo.class);
|
|
||||||
List<FinanceReimburse> list = this.list(QueryWrapper.create()
|
List<FinanceReimburse> list = this.list(QueryWrapper.create()
|
||||||
.where(FINANCE_REIMBURSE.STAFF_ID.eq(loginInfo.getId()))
|
.where(FINANCE_REIMBURSE.STAFF_ID.eq(loginUserInfo.getString("id")))
|
||||||
.and(FINANCE_REIMBURSE.STATUS.ne(4)));
|
.and(FINANCE_REIMBURSE.STATUS.ne(4)));
|
||||||
//统计
|
//统计
|
||||||
ReimbursePersonStatisticVo vo = new ReimbursePersonStatisticVo();
|
ReimbursePersonStatisticVo vo = new ReimbursePersonStatisticVo();
|
||||||
|
|||||||
@ -73,8 +73,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
|
|||||||
public Page<TaskPageVo> getTaskPage(TaskPageBo bo) {
|
public Page<TaskPageVo> getTaskPage(TaskPageBo bo) {
|
||||||
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
|
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
|
||||||
return this.mapper.paginateAs(pageDomain.getPageNum(),pageDomain.getPageSize(),
|
return this.mapper.paginateAs(pageDomain.getPageNum(),pageDomain.getPageSize(),
|
||||||
QueryWrapper.create()
|
QueryWrapper.create().where(TASK.TASK_STATUS.eq(1))
|
||||||
.where(TASK.TASK_STATUS.eq(1))
|
|
||||||
.and(TASK.TASK_TYPE.eq(bo.getTaskType()))
|
.and(TASK.TASK_TYPE.eq(bo.getTaskType()))
|
||||||
.and(TASK.TASK_RATING.eq(bo.getTaskRating()))
|
.and(TASK.TASK_RATING.eq(bo.getTaskRating()))
|
||||||
.orderBy(TASK.EXPECTED_COMPLETION_DATE.asc()),
|
.orderBy(TASK.EXPECTED_COMPLETION_DATE.asc()),
|
||||||
@ -415,18 +414,15 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
|
|||||||
public TaskMonthStatisticsVo getTaskMonthStatistics(TaskMonthStatisticsBo bo) {
|
public TaskMonthStatisticsVo getTaskMonthStatistics(TaskMonthStatisticsBo bo) {
|
||||||
//员工组绩点信息
|
//员工组绩点信息
|
||||||
List<TaskStaffGroup> taskStaffGroups = null;
|
List<TaskStaffGroup> taskStaffGroups = null;
|
||||||
LoginUser loginUser = SecurityUtils.getInstance().getLoginUser();
|
|
||||||
//读取员工信息
|
//读取员工信息
|
||||||
RedisService redisService = SpringUtils.getBean(RedisService.class);
|
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
|
||||||
JSONObject cacheObject = redisService.getCacheObject(UserType.OAM_USER.getKey() + loginUser.getUsername());
|
|
||||||
OamStaffLoginInfo loginInfo = cacheObject.getJSONObject("user").toJavaObject(OamStaffLoginInfo.class);
|
|
||||||
QueryWrapper queryWrapper = QueryWrapper.create();
|
QueryWrapper queryWrapper = QueryWrapper.create();
|
||||||
if (Constants.SUPER_ADMIN.equals(loginUser.getUsername())) {
|
if (Constants.SUPER_ADMIN.equals(loginUserInfo.getString("userName"))) {
|
||||||
//TODO:超级管理员暂时获取所有任务
|
//TODO:超级管理员暂时获取所有任务
|
||||||
} else {
|
} else {
|
||||||
//查询个人涉及到的任务
|
//查询个人涉及到的任务
|
||||||
TaskStaffGroupService taskStaffGroupService = SpringUtils.getBean(TaskStaffGroupService.class);
|
TaskStaffGroupService taskStaffGroupService = SpringUtils.getBean(TaskStaffGroupService.class);
|
||||||
taskStaffGroups = taskStaffGroupService.list(QueryWrapper.create().where(TASK_STAFF_GROUP.STAFF_ID.eq(loginInfo.getId())));
|
taskStaffGroups = taskStaffGroupService.list(QueryWrapper.create().where(TASK_STAFF_GROUP.STAFF_ID.eq(loginUserInfo.getString("id"))));
|
||||||
if (!taskStaffGroups.isEmpty()) {
|
if (!taskStaffGroups.isEmpty()) {
|
||||||
queryWrapper.and(TASK.ID.in(taskStaffGroups.stream().map(TaskStaffGroup::getTaskId).collect(Collectors.toSet())));
|
queryWrapper.and(TASK.ID.in(taskStaffGroups.stream().map(TaskStaffGroup::getTaskId).collect(Collectors.toSet())));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* @Author: DB
|
||||||
|
* @Date: 2023-11-23 15:22:53
|
||||||
|
* @Description: 请填写简介
|
||||||
|
*/
|
||||||
|
package com.cpop.system.business.bo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value = "校区分页对象")
|
||||||
|
public class StorePageBo implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校区名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("校区名")
|
||||||
|
private String name;
|
||||||
|
}
|
||||||
@ -1,22 +1,16 @@
|
|||||||
package com.cpop.system.business.controller;
|
package com.cpop.system.business.controller;
|
||||||
|
|
||||||
|
import com.cpop.core.base.R;
|
||||||
|
import com.cpop.system.business.bo.StorePageBo;
|
||||||
|
import com.cpop.system.business.vo.StorePageVo;
|
||||||
import com.mybatisflex.core.paginate.Page;
|
import com.mybatisflex.core.paginate.Page;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import com.cpop.system.business.entity.Store;
|
|
||||||
import com.cpop.system.business.service.StoreService;
|
import com.cpop.system.business.service.StoreService;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import io.swagger.annotations.ApiParam;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统-店铺/校区表 控制层。
|
* 系统-店铺/校区表 控制层。
|
||||||
@ -29,7 +23,21 @@ import java.util.List;
|
|||||||
@RequestMapping("/store")
|
@RequestMapping("/store")
|
||||||
public class StoreController {
|
public class StoreController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StoreService storeService;
|
private StoreService storeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 查询校区分页列表
|
||||||
|
* @param bo
|
||||||
|
* @return R<PageVo<CampusPageListVo>>
|
||||||
|
* @Author Administrator
|
||||||
|
* @Date: 2023/6/7 0007 10:18
|
||||||
|
*/
|
||||||
|
@ApiOperation("查询校区分页列表")
|
||||||
|
@GetMapping("/getStorePage")
|
||||||
|
public R<Page<StorePageVo>> getStorePage(StorePageBo bo) {
|
||||||
|
Page<StorePageVo> pageVo = storeService.getStorePage(bo);
|
||||||
|
return R.ok(pageVo);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
package com.cpop.system.business.service;
|
package com.cpop.system.business.service;
|
||||||
|
|
||||||
|
import com.cpop.system.business.bo.StorePageBo;
|
||||||
|
import com.cpop.system.business.vo.StorePageVo;
|
||||||
|
import com.mybatisflex.core.paginate.Page;
|
||||||
import com.mybatisflex.core.service.IService;
|
import com.mybatisflex.core.service.IService;
|
||||||
import com.cpop.system.business.entity.Store;
|
import com.cpop.system.business.entity.Store;
|
||||||
|
|
||||||
@ -11,4 +14,11 @@ import com.cpop.system.business.entity.Store;
|
|||||||
*/
|
*/
|
||||||
public interface StoreService extends IService<Store> {
|
public interface StoreService extends IService<Store> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: DB
|
||||||
|
* @description: 获取校区分页列表
|
||||||
|
* @Date: 2023-11-23 15:40:30
|
||||||
|
* @return {*}
|
||||||
|
*/
|
||||||
|
Page<StorePageVo> getStorePage(StorePageBo bo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* @Author: DB
|
||||||
|
*
|
||||||
|
* @Date: 2023-10-26 18:22:22
|
||||||
|
*
|
||||||
|
* @Description: 请填写简介
|
||||||
|
*/
|
||||||
package com.cpop.system.business.service.impl;
|
package com.cpop.system.business.service.impl;
|
||||||
|
|
||||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
import com.cpop.core.base.entity.PageDomain;
|
||||||
|
import com.cpop.core.utils.sql.SqlUtils;
|
||||||
|
import com.cpop.system.business.bo.StorePageBo;
|
||||||
import com.cpop.system.business.entity.Store;
|
import com.cpop.system.business.entity.Store;
|
||||||
import com.cpop.system.business.mapper.StoreMapper;
|
import com.cpop.system.business.mapper.StoreMapper;
|
||||||
import com.cpop.system.business.service.StoreService;
|
import com.cpop.system.business.service.StoreService;
|
||||||
|
import com.cpop.system.business.vo.StorePageVo;
|
||||||
|
import com.mybatisflex.core.paginate.Page;
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
|
|
||||||
|
import static com.cpop.system.business.entity.table.BrandTableDef.BRAND;
|
||||||
|
import static com.cpop.system.business.entity.table.StoreTableDef.STORE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统-店铺/校区表 服务层实现。
|
* 系统-店铺/校区表 服务层实现。
|
||||||
@ -15,4 +31,18 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service("storeService")
|
@Service("storeService")
|
||||||
public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements StoreService {
|
public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements StoreService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: DB
|
||||||
|
* @description: 获取校区分页列表
|
||||||
|
* @Date: 2023-11-23 15:35:05
|
||||||
|
* @return {*}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Page<StorePageVo> getStorePage(StorePageBo bo) {
|
||||||
|
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
|
||||||
|
return this.getMapper().paginateAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()),
|
||||||
|
QueryWrapper.create().select(STORE.ALL_COLUMNS).select(BRAND.BRAND_NAME).from(STORE).leftJoin(BRAND)
|
||||||
|
.on(BRAND.ID.eq(STORE.BRAND_ID)),
|
||||||
|
StorePageVo.class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,64 @@
|
|||||||
|
package com.cpop.system.business.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import com.cpop.core.base.enums.SourceType;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @Author: DB
|
||||||
|
*
|
||||||
|
* @Date: 2023-11-23 15:05:53
|
||||||
|
*
|
||||||
|
* @Description: 店铺分页返回对象
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value = "校区/店铺分页返回对象")
|
||||||
|
public class StorePageVo implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺/校区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 云校区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("云校区id")
|
||||||
|
private String campusCloudId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 品牌id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("品牌id")
|
||||||
|
private String brandId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 品牌名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("品牌名")
|
||||||
|
private String brandName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺/校区名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("店铺/校区名")
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据来源
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("数据来源")
|
||||||
|
private SourceType sourceType;
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user