|
@@ -3,33 +3,26 @@ package com.gree.mall.manager.logic.count;
|
|
|
import cn.hutool.core.convert.Convert;
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
-import cn.hutool.core.io.unit.DataUnit;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.gree.mall.manager.bean.admin.AdminUserCom;
|
|
|
import com.gree.mall.manager.bean.count.*;
|
|
|
import com.gree.mall.manager.bean.workorder.MaterialPeiJianCount;
|
|
|
import com.gree.mall.manager.commonmapper.CountMapper;
|
|
|
import com.gree.mall.manager.enums.*;
|
|
|
-import com.gree.mall.manager.enums.engin.EnginPayManageStatusEnum;
|
|
|
import com.gree.mall.manager.enums.material.*;
|
|
|
import com.gree.mall.manager.enums.workorder.SourceChannelEnum;
|
|
|
import com.gree.mall.manager.logic.common.CommonLogic;
|
|
|
import com.gree.mall.manager.plus.entity.*;
|
|
|
import com.gree.mall.manager.plus.service.*;
|
|
|
-import com.gree.mall.manager.utils.CommonUtils;
|
|
|
import com.gree.mall.manager.utils.DateUtils;
|
|
|
import com.gree.mall.manager.utils.StringUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-import sun.java2d.pipe.SpanShapeRenderer;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.xml.crypto.Data;
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
public class CountLogic {
|
|
@@ -473,8 +466,12 @@ public class CountLogic {
|
|
|
|
|
|
MaterialCount materialCount = new MaterialCount();
|
|
|
|
|
|
+ boolean isAdmin = adminUser.getType().equals(2) && adminUser.getUserName().equals("admin");
|
|
|
+
|
|
|
List<WebsitGoods> websitGoods = websitGoodsService.lambdaQuery()
|
|
|
+ .eq(isAdmin, WebsitGoods::getCompanyWechatId, "1")
|
|
|
.in(!CollectionUtils.isEmpty(adminUser.getCompanyWechatIds()), WebsitGoods::getCompanyWechatId, adminUser.getCompanyWechatId())
|
|
|
+ .eq(WebsitGoods::getGoodsType, WebsitGoodsTypeEnum.M.getKey())
|
|
|
.select(WebsitGoods::getGoodsId, WebsitGoods::getStatus, WebsitGoods::getGoodsType).list();
|
|
|
|
|
|
|
|
@@ -877,10 +874,14 @@ public class CountLogic {
|
|
|
|
|
|
AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
|
|
|
+ boolean isAdmin = adminUser.getType().equals(2) && adminUser.getUserName().equals("admin");
|
|
|
+
|
|
|
MaterialPeiJianCount materialPeiJianCount = new MaterialPeiJianCount();
|
|
|
|
|
|
List<WebsitGoods> websitGoods = websitGoodsService.lambdaQuery()
|
|
|
+ .eq(isAdmin, WebsitGoods::getCompanyWechatId, "1")
|
|
|
.in(!CollectionUtils.isEmpty(adminUser.getCompanyWechatIds()), WebsitGoods::getCompanyWechatId, adminUser.getCompanyWechatId())
|
|
|
+ .eq(WebsitGoods::getGoodsType, WebsitGoodsTypeEnum.P.getKey())
|
|
|
.select(WebsitGoods::getGoodsId, WebsitGoods::getStatus, WebsitGoods::getGoodsType).list();
|
|
|
|
|
|
materialPeiJianCount.setAllpGoodsNum(
|