11
This commit is contained in:
1 parent
bad9b24aa5
commit
cee050edb9
5 files changed
+9
-10
No files matched your search
+3
-5
@@ -157,14 +157,12 @@ public class HardOrderController {
|
||||
@GetMapping("/page-join")
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardwareOrder_view')")
|
||||
public R pageJoin(@ParameterObject Page page, @ParameterObject HardOrderDto dto) {
|
||||
DataScope dataScope = DataScope.of();
|
||||
dataScope.setScopeDeptName("hardTypeDeptId");
|
||||
PjcloudUser user = SecurityUtils.getUser();
|
||||
CurrentUserHardTypeInfoDto hardTypeInfo = hardManagerService.getCurrentUserHardTypeInfo(user);
|
||||
dto.setMchTypeCodes(hardTypeInfo.getHardTypeList());
|
||||
MchManageVo data = mchService.getByDeptId(user.getDeptId(), MerchantTypeEnum.SELF_SUPERMARKET).getData();
|
||||
if (ObjectUtil.isNotEmpty(data)) {
|
||||
dto.setMerchantId(data.getId());
|
||||
}
|
||||
return R.ok(hardwareOrderService.scopePageList(page, dto));
|
||||
return R.ok(hardwareOrderService.scopePageList(page, dto, dataScope));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id查询", description = "通过id查询")
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ public interface HardOrderMapper extends PjcloudBaseMapper<HardOrderEntity> {
|
||||
return selectListByScope(commonWrapper(dto), DataScope.of());
|
||||
}
|
||||
|
||||
Page<HardOrderVo> scopePageList(Page page, @Param("dto") HardOrderDto dto);
|
||||
Page<HardOrderVo> scopePageList(Page page, @Param("dto") HardOrderDto dto, DataScope dataScope);
|
||||
|
||||
List<HardOrderSbVo> listSb(@Param("dto") HardOrderDto dto, DataScope dataScope);
|
||||
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ public interface HardOrderService extends IService<HardOrderEntity> {
|
||||
*/
|
||||
Page<HardOrderVo> appMchPageJoin(Page page, HardOrderDto dto, PjcloudUser user);
|
||||
|
||||
Page<HardOrderVo> scopePageList(Page page, HardOrderDto dto);
|
||||
Page<HardOrderVo> scopePageList(Page page, HardOrderDto dto, DataScope dataScope);
|
||||
|
||||
List<HardOrderVo> scopeList(HardOrderDto dto);
|
||||
|
||||
|
||||
+2
-2
@@ -132,8 +132,8 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<HardOrderVo> scopePageList(Page page, HardOrderDto dto) {
|
||||
Page<HardOrderVo> list = baseMapper.scopePageList(page, dto);
|
||||
public Page<HardOrderVo> scopePageList(Page page, HardOrderDto dto, DataScope dataScope) {
|
||||
Page<HardOrderVo> list = baseMapper.scopePageList(page, dto, dataScope);
|
||||
if (ObjectUtil.isNotEmpty(list.getRecords())) {
|
||||
// 用户
|
||||
List<Long> userIds = list.getRecords().stream().map(HardOrderVo::getUserId).filter(ObjectUtil::isNotEmpty).distinct().toList();
|
||||
|
||||
+2
-1
@@ -168,7 +168,8 @@
|
||||
<select id="scopePageList" resultType="com.bsd.pjcloud.hard.api.vo.order.HardOrderVo">
|
||||
<include refid="selectA"/>
|
||||
m.name as hardName,
|
||||
m.type as hardType
|
||||
m.type as hardType,
|
||||
m.dept_id as hardTypeDeptId
|
||||
from hard_order a
|
||||
left join hard_manager m on m.id = a.hard_id
|
||||
<where>
|
||||
|
||||
Reference in new issue
Block a user