Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
17901b6d0c
|
|
@ -10,11 +10,10 @@ import com.czg.resp.CzgResult;
|
|||
import com.czg.utils.AssertUtil;
|
||||
import com.czg.validator.ValidatorUtil;
|
||||
import com.czg.validator.group.DefaultGroup;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 耗材进销存
|
||||
|
|
@ -61,9 +60,9 @@ public class ConsStockFlowController {
|
|||
@GetMapping("checkRecord")
|
||||
@OperationLog("库存盘点记录")
|
||||
//@SaAdminCheckPermission("consStockFlow:check-record")
|
||||
public CzgResult<List<ConsCheckStockRecordVo>> checkStock(@RequestParam Long conId) {
|
||||
public CzgResult<Page<ConsCheckStockRecordVo>> checkStock(@RequestParam Long conId) {
|
||||
AssertUtil.isNull(conId, "耗材ID不能为空");
|
||||
List<ConsCheckStockRecordVo> data = consStockFlowService.getCheckStockRecordList(conId);
|
||||
Page<ConsCheckStockRecordVo> data = consStockFlowService.getCheckStockRecordPage(conId);
|
||||
return CzgResult.success(data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
package com.czg.account.dto.shopuser;
|
||||
|
||||
import com.czg.account.entity.ShopExtend;
|
||||
import com.czg.account.entity.ShopInfo;
|
||||
import com.czg.account.entity.ShopUser;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
|
|
@ -30,6 +33,13 @@ public class ShopUserDetailDTO extends ShopUser {
|
|||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 店铺信息
|
||||
*/
|
||||
private ShopInfo shopInfo;
|
||||
/**
|
||||
* 店铺拓展参数
|
||||
*/
|
||||
private List<ShopExtend> shopExtendList = new ArrayList<>();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.czg.product.param.ConsCheckStockParam;
|
|||
import com.czg.product.param.ConsInOutStockHeadParam;
|
||||
import com.czg.product.param.ConsReportDamageParam;
|
||||
import com.czg.product.vo.ConsCheckStockRecordVo;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -38,6 +39,14 @@ public interface ConsStockFlowService extends IService<ConsStockFlow> {
|
|||
*/
|
||||
void checkStock(ConsCheckStockParam param);
|
||||
|
||||
/**
|
||||
* 获取盘点记录
|
||||
*
|
||||
* @param conId 耗材id
|
||||
* @return 盘点记录列表
|
||||
*/
|
||||
Page<ConsCheckStockRecordVo> getCheckStockRecordPage(Long conId);
|
||||
|
||||
/**
|
||||
* 获取盘点记录
|
||||
*
|
||||
|
|
|
|||
|
|
@ -6,10 +6,7 @@ import cn.hutool.core.util.RandomUtil;
|
|||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.account.dto.shopuser.*;
|
||||
import com.czg.account.entity.*;
|
||||
import com.czg.account.service.ShopActivateCouponRecordService;
|
||||
import com.czg.account.service.ShopUserFlowService;
|
||||
import com.czg.account.service.ShopUserService;
|
||||
import com.czg.account.service.UserInfoService;
|
||||
import com.czg.account.service.*;
|
||||
import com.czg.config.RedisCst;
|
||||
import com.czg.exception.ApiNotPrintException;
|
||||
import com.czg.resp.CzgResult;
|
||||
|
|
@ -32,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -55,6 +53,8 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
|||
private ShopActivateCouponRecordService shopActivateCouponRecordService;
|
||||
@Resource
|
||||
private ShopInfoMapper shopInfoMapper;
|
||||
@Resource
|
||||
private ShopExtendService shopExtendService;
|
||||
|
||||
private ShopUser getUserInfo(Long shopId, Long shopUserId) {
|
||||
ShopUser shopUser = queryChain().eq(ShopUser::getShopId, shopId).eq(ShopUser::getId, shopUserId).one();
|
||||
|
|
@ -279,6 +279,8 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
|||
shopUserDetailDTO.setShopName(shopInfo.getShopName());
|
||||
shopUserDetailDTO.setShopId(shopInfo.getId());
|
||||
shopUserDetailDTO.setShopInfo(shopInfo);
|
||||
List<ShopExtend> shopExtends = shopExtendService.list(new QueryWrapper().eq(ShopExtend::getShopId, shopInfo.getId()));
|
||||
shopUserDetailDTO.setShopExtendList(shopExtends);
|
||||
}
|
||||
return shopUserDetailDTO;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import com.czg.sa.StpKit;
|
|||
import com.czg.service.product.mapper.ConsInfoMapper;
|
||||
import com.czg.service.product.mapper.ConsStockFlowMapper;
|
||||
import com.czg.utils.PageUtil;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -157,6 +158,12 @@ public class ConsStockFlowServiceImpl extends ServiceImpl<ConsStockFlowMapper, C
|
|||
consInfoMapper.update(consInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<ConsCheckStockRecordVo> getCheckStockRecordPage(Long conId) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
return super.pageAs(PageUtil.buildPage(), query().eq(ConsStockFlow::getShopId, shopId).eq(ConsStockFlow::getConId, conId).orderBy(ConsStockFlow::getId, true), ConsCheckStockRecordVo.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ConsCheckStockRecordVo> getCheckStockRecordList(Long conId) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
|
|
|
|||
Loading…
Reference in New Issue