|
@@ -53,6 +53,7 @@ public class WorkerStockLogic {
|
|
|
private final WebsitGoodsService websitGoodsService;
|
|
|
private final WorkerStockBakService workerStockBakService;
|
|
|
private final WorkerStockAccBakService workerStockAccBakService;
|
|
|
+ private final WebsitUserService websitUserService;
|
|
|
|
|
|
/**
|
|
|
* 师傅辅材库存列表
|
|
@@ -63,8 +64,16 @@ public class WorkerStockLogic {
|
|
|
public IPage<WorkerStockVO> workerStockList(ZfireParamBean zfireParamBean) {
|
|
|
final AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
FieldUtils.materialParam(zfireParamBean, WorkerStockVO.class, adminUser);
|
|
|
-
|
|
|
- IPage<WorkerStockVO> page = commonMapper.workerStockList(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()), zfireParamBean);
|
|
|
+ List<String> workers = null;
|
|
|
+ if (CollectionUtil.isNotEmpty(zfireParamBean.getAdminWebsitIds())) {
|
|
|
+ List<WebsitUser> workerList = websitUserService.lambdaQuery()
|
|
|
+ .eq(StringUtils.isNotBlank(adminUser.getCompanyWechatId()), WebsitUser::getCompanyWechatId, adminUser.getCompanyWechatId())
|
|
|
+ .in(WebsitUser::getWebsitId, zfireParamBean.getAdminWebsitIds())
|
|
|
+ .groupBy(WebsitUser::getWorkerNumber)
|
|
|
+ .list();
|
|
|
+ workers = workerList.stream().map(WebsitUser::getWorkerNumber).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ IPage<WorkerStockVO> page = commonMapper.workerStockList(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()), zfireParamBean, workers);
|
|
|
return page;
|
|
|
}
|
|
|
|
|
@@ -75,8 +84,9 @@ public class WorkerStockLogic {
|
|
|
* @return
|
|
|
*/
|
|
|
public IPage<WorkerStockAccVO> workerStockAccList(ZfireParamBean zfireParamBean) {
|
|
|
+ final AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
zfireParamBean.setCompanyWechatId(commonLogic.getAdminUser().getCompanyWechatId());
|
|
|
- FieldUtils.supplyParam(zfireParamBean, WorkerStockAccVO.class);
|
|
|
+ FieldUtils.supplyParam(zfireParamBean, WorkerStockAccVO.class, adminUser);
|
|
|
IPage<WorkerStockAccVO> page = commonMapper.workerStockAccList(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()), zfireParamBean);
|
|
|
return page;
|
|
|
}
|