给商品库存统计接口增加重量字段展示

This commit is contained in:
季圣华
2023-03-24 23:39:50 +08:00
parent a543e4437a
commit 74c2f40d44
4 changed files with 23 additions and 6 deletions

View File

@@ -627,6 +627,7 @@ public class MaterialController {
map.put("total", total);
map.put("currentStock", materialVo4Unit.getCurrentStock());
map.put("currentStockPrice", materialVo4Unit.getCurrentStockPrice());
map.put("currentWeight", materialVo4Unit.getCurrentWeight());
map.put("rows", dataList);
res.code = 200;
res.data = map;

View File

@@ -34,6 +34,8 @@ public class MaterialVo4Unit extends Material{
private BigDecimal currentStockPrice;
private BigDecimal currentWeight;
private String sku;
private Long depotId;
@@ -163,6 +165,14 @@ public class MaterialVo4Unit extends Material{
this.currentStockPrice = currentStockPrice;
}
public BigDecimal getCurrentWeight() {
return currentWeight;
}
public void setCurrentWeight(BigDecimal currentWeight) {
this.currentWeight = currentWeight;
}
public String getSku() {
return sku;
}

View File

@@ -765,10 +765,13 @@ public class UserService {
int selectUserSize = list.size();
//查询启用状态的用户的数量
int enableUserSize = getUser().size();
long userNumLimit = Long.parseLong(redisService.getObjectFromSessionByKey(request,"userNumLimit").toString());
if(selectUserSize + enableUserSize > userNumLimit && status == 0) {
throw new BusinessParamCheckingException(ExceptionConstants.USER_ENABLE_OVER_LIMIT_FAILED_CODE,
ExceptionConstants.USER_ENABLE_OVER_LIMIT_FAILED_MSG);
User userInfo = userService.getCurrentUser();
Tenant tenant = tenantService.getTenantByTenantId(userInfo.getTenantId());
if(tenant!=null) {
if (selectUserSize + enableUserSize > tenant.getUserNumLimit() && status == 0) {
throw new BusinessParamCheckingException(ExceptionConstants.USER_ENABLE_OVER_LIMIT_FAILED_CODE,
ExceptionConstants.USER_ENABLE_OVER_LIMIT_FAILED_MSG);
}
}
StringBuilder userStr = new StringBuilder();
List<Long> idList = new ArrayList<>();