|
@@ -3,9 +3,11 @@ package com.zhongzheng.modules.top.goods.service.impl;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.lang.Validator;
|
|
import cn.hutool.core.lang.Validator;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.github.pagehelper.Page;
|
|
import com.github.pagehelper.Page;
|
|
import com.zhongzheng.common.exception.CustomException;
|
|
import com.zhongzheng.common.exception.CustomException;
|
|
@@ -17,6 +19,7 @@ import com.zhongzheng.modules.grade.domain.UserPeriod;
|
|
import com.zhongzheng.modules.grade.service.IClassGradeUserService;
|
|
import com.zhongzheng.modules.grade.service.IClassGradeUserService;
|
|
import com.zhongzheng.modules.grade.service.IUserPeriodService;
|
|
import com.zhongzheng.modules.grade.service.IUserPeriodService;
|
|
import com.zhongzheng.modules.order.service.IOrderGoodsService;
|
|
import com.zhongzheng.modules.order.service.IOrderGoodsService;
|
|
|
|
+import com.zhongzheng.modules.top.financial.domain.TopCostTp;
|
|
import com.zhongzheng.modules.top.goods.bo.*;
|
|
import com.zhongzheng.modules.top.goods.bo.*;
|
|
import com.zhongzheng.modules.top.goods.domain.TopOldOrder;
|
|
import com.zhongzheng.modules.top.goods.domain.TopOldOrder;
|
|
import com.zhongzheng.modules.top.goods.domain.TopOldOrderAttachment;
|
|
import com.zhongzheng.modules.top.goods.domain.TopOldOrderAttachment;
|
|
@@ -35,10 +38,7 @@ import com.zhongzheng.modules.top.user.service.ITopSysUserService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.Arrays;
|
|
|
|
-import java.util.Collection;
|
|
|
|
-import java.util.List;
|
|
|
|
|
|
+import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -271,4 +271,70 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
|
|
}
|
|
}
|
|
return listExport;
|
|
return listExport;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public List<TopOldOrderVo> queryDivSellerList(TopOldOrderQueryBo bo) {
|
|
|
|
+ if(Validator.isNotEmpty(bo.getCreditStatus())){
|
|
|
|
+ List<Integer> divideStatusList = new ArrayList<>();
|
|
|
|
+ if(bo.getCreditStatus()==0){
|
|
|
|
+ divideStatusList.add(1);
|
|
|
|
+ divideStatusList.add(2);
|
|
|
|
+ divideStatusList.add(3);
|
|
|
|
+ divideStatusList.add(4);
|
|
|
|
+ divideStatusList.add(5);
|
|
|
|
+ }
|
|
|
|
+ if(bo.getCreditStatus()==1){
|
|
|
|
+ divideStatusList.add(6);
|
|
|
|
+ }
|
|
|
|
+ bo.setDivideStatusList(divideStatusList);
|
|
|
|
+ }
|
|
|
|
+ return this.baseMapper.queryDivSellerList(bo);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public List<TopOldOrderVo> queryTenantList(TopOldOrderQueryBo bo) {
|
|
|
|
+ if(Validator.isNotEmpty(bo.getCreditStatus())){
|
|
|
|
+ List<Integer> divideStatusList = new ArrayList<>();
|
|
|
|
+ if(bo.getCreditStatus()==0){
|
|
|
|
+ divideStatusList.add(1);
|
|
|
|
+ divideStatusList.add(2);
|
|
|
|
+ divideStatusList.add(3);
|
|
|
|
+ divideStatusList.add(4);
|
|
|
|
+ divideStatusList.add(5);
|
|
|
|
+ }
|
|
|
|
+ if(bo.getCreditStatus()==1){
|
|
|
|
+ divideStatusList.add(6);
|
|
|
|
+ }
|
|
|
|
+ bo.setDivideStatusList(divideStatusList);
|
|
|
|
+ }
|
|
|
|
+ return this.baseMapper.queryTenantList(bo);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public boolean updateRemark(TopOldOrderEditBo bo) {
|
|
|
|
+ if(Validator.isEmpty(bo.getRemark())||Validator.isEmpty(bo.getOrderSn())){
|
|
|
|
+ throw new CustomException("参数缺失");
|
|
|
|
+ }
|
|
|
|
+ LambdaUpdateWrapper<TopOldOrder> objectLambdaUpdateWrapper = Wrappers.lambdaUpdate();
|
|
|
|
+ objectLambdaUpdateWrapper.eq(TopOldOrder::getOrderSn, bo.getOrderSn());
|
|
|
|
+
|
|
|
|
+ objectLambdaUpdateWrapper.set(TopOldOrder::getRemark, bo.getRemark());
|
|
|
|
+ objectLambdaUpdateWrapper.set(TopOldOrder::getUpdateTime, DateUtils.getNowTime());
|
|
|
|
+ return update(null, objectLambdaUpdateWrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Map<String, Object> countOrderNum(TopOldOrderQueryBo bo) {
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
+ if(bo.getTotalType()==1){
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(bo.getTotalType()==2){
|
|
|
|
+ map.put("tenantPay",baseMapper.tenantMoneyTotal(bo));
|
|
|
|
+ }
|
|
|
|
+ if(bo.getTotalType()==3){
|
|
|
|
+ map.put("sellerPay",baseMapper.tenantSellerTotal(bo));
|
|
|
|
+ }
|
|
|
|
+ return map;
|
|
|
|
+ }
|
|
}
|
|
}
|