Compare commits

..

No commits in common. "0e2b46713fca3d7e05631181ad6d82a300e32c6e" and "5eb48c2c096c625667da4a80277c14e3eeeea7ab" have entirely different histories.

9 changed files with 10 additions and 167 deletions

View File

@ -2,8 +2,6 @@ package com.nflg.mobilebroken.common.pojo.vo;
import com.nflg.mobilebroken.common.util.NumberUtil; import com.nflg.mobilebroken.common.util.NumberUtil;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.AccessType;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
@ -11,7 +9,6 @@ import java.math.BigDecimal;
import java.util.Objects; import java.util.Objects;
@Data @Data
@Accessors(chain = true)
public class PlanSearchItemVO { public class PlanSearchItemVO {
private Long id; private Long id;

View File

@ -137,7 +137,7 @@ public class PlanController extends ControllerBase {
boolean multiRegionQuotations = isMultiRegionQuotationsUser(); boolean multiRegionQuotations = isMultiRegionQuotationsUser();
List<Long> categoryIds = new ArrayList<>(); List<Long> categoryIds = new ArrayList<>();
if (multiRegionQuotations) { if (multiRegionQuotations) {
categoryIds = dictionaryItemService.getListByDictionaryCode("DirectSalesCategory") categoryIds = dictionaryItemService.getListByDictionaryCode("MultiRegionQuotationsSupplier")
.stream() .stream()
.map(DictionaryItem::getId) .map(DictionaryItem::getId)
.collect(Collectors.toList()); .collect(Collectors.toList());
@ -146,7 +146,6 @@ public class PlanController extends ControllerBase {
} }
List<ModelPriceVO> prices = priceService.getAllModelPrice(); List<ModelPriceVO> prices = priceService.getAllModelPrice();
Map<Long, List<PlanSearchItemVO>> fgroup = items.stream().collect(Collectors.groupingBy(PlanSearchItemVO::getModelId)); Map<Long, List<PlanSearchItemVO>> fgroup = items.stream().collect(Collectors.groupingBy(PlanSearchItemVO::getModelId));
pageData.setTotal(fgroup.size());
for (Map.Entry<Long, List<PlanSearchItemVO>> entry : fgroup.entrySet()) { for (Map.Entry<Long, List<PlanSearchItemVO>> entry : fgroup.entrySet()) {
if (index >= startIndex && index < endIndex) { if (index >= startIndex && index < endIndex) {
categoryIds.forEach(categoryId -> { categoryIds.forEach(categoryId -> {
@ -157,30 +156,14 @@ public class PlanController extends ControllerBase {
.collect(Collectors.toList()); .collect(Collectors.toList());
if (CollectionUtil.isEmpty(vos)) { if (CollectionUtil.isEmpty(vos)) {
entry.getValue().forEach(item -> { entry.getValue().forEach(item -> {
datas.add(new PlanSearchItemVO() item.setStandardPrice(salePrice);
.setPlanId(item.getPlanId()) item.setAreaId(categoryId);
.setIsDefault(item.getIsDefault()) datas.add(item);
.setModelId(item.getModelId())
.setModelNo(item.getModelNo())
.setName(item.getName())
.setRatio(item.getRatio())
.setAreaId(categoryId)
.setStandardPrice(salePrice)
);
}); });
} else { } else {
vos.forEach(item -> { vos.forEach(item -> {
datas.add(new PlanSearchItemVO() item.setStandardPrice(salePrice);
.setId(item.getId()) datas.add(item);
.setPlanId(item.getPlanId())
.setIsDefault(item.getIsDefault())
.setModelId(item.getModelId())
.setModelNo(item.getModelNo())
.setName(item.getName())
.setRatio(item.getRatio())
.setAreaId(categoryId)
.setStandardPrice(salePrice)
);
}); });
} }
}); });

View File

@ -101,9 +101,6 @@ public class ShoppingController extends ControllerBase {
@Resource @Resource
private IQuotationShoppingCartServiceService shoppingCartServiceService; private IQuotationShoppingCartServiceService shoppingCartServiceService;
@Resource
private IQuotationShoppingCartOtherService shoppingCartOtherService;
@Resource @Resource
private IQuotationShoppingOrderService shoppingOrderService; private IQuotationShoppingOrderService shoppingOrderService;
@ -360,16 +357,6 @@ public class ShoppingController extends ControllerBase {
).collect(Collectors.toList()) ).collect(Collectors.toList())
); );
} }
if (CollectionUtil.isNotEmpty(request.getOthers())) {
shoppingCartOtherService.saveBatch(
request.getOthers().stream().map(as -> {
QuotationShoppingCartOther ci = Convert.convert(QuotationShoppingCartOther.class, as);
ci.setCartId(cartId);
return ci;
}
).collect(Collectors.toList())
);
}
shoppingCartService.save(cart); shoppingCartService.save(cart);
return ApiResult.success(cartId); return ApiResult.success(cartId);
} }
@ -1038,20 +1025,20 @@ public class ShoppingController extends ControllerBase {
* 获取下属报价单 * 获取下属报价单
*/ */
@PostMapping("/getQuotationOfSubordinate") @PostMapping("/getQuotationOfSubordinate")
public ApiResult<PageData<QuotationSearchVO>> getQuotationOfSubordinate(@Valid @RequestBody SubordinateQuotationSearchRequest request) { public ApiResult<PageData<QuotationSearchVO>> getQuotationOfSubordinate(@Valid @RequestBody SubordinateQuotationSearchRequest request){
VUtils.trueThrowBusinessError(AppUserUtil.isAgent() && !AppUserUtil.isPrimary()) VUtils.trueThrowBusinessError(AppUserUtil.isAgent() && !AppUserUtil.isPrimary())
.throwMessage("你不是代理商主账号无权查看"); .throwMessage("你不是代理商主账号无权查看");
if (Objects.isNull(request.getCreateById())) { if (Objects.isNull(request.getCreateById())){
request.setCreateByIds( request.setCreateByIds(
appUserService.getChildren(appUserService.getById(AppUserUtil.getUserId())) appUserService.getChildren(appUserService.getById(AppUserUtil.getUserId()))
.stream() .stream()
.map(AppUser::getId) .map(AppUser::getId)
.collect(Collectors.toList()) .collect(Collectors.toList())
); );
} else { }else {
request.setCreateByIds(List.of(request.getCreateById())); request.setCreateByIds(List.of(request.getCreateById()));
} }
if (!AppUserUtil.isAgent()) { if (!AppUserUtil.isAgent()){
request.setTargetId(null); request.setTargetId(null);
} }
return ApiResult.success(shoppingOrderService.getQuotationOfSubordinate(request)); return ApiResult.success(shoppingOrderService.getQuotationOfSubordinate(request));

View File

@ -1,23 +0,0 @@
package com.nflg.mobilebroken.quotation.pojo.request;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
@Data
public class ShoppingCartOtherRequest {
/**
* 要求说明
*/
@NotBlank(message = "要求说明不能为空")
private String desc;
/**
* 费用
*/
@NotNull(message = "费用不能为空")
private BigDecimal fee;
}

View File

@ -148,10 +148,4 @@ public class ShoppingSaveRequest {
*/ */
@Valid @Valid
private List<ShoppingSaveServiceRequest> services; private List<ShoppingSaveServiceRequest> services;
/**
* 其他要求
*/
@Valid
private List<ShoppingCartOtherRequest> others;
} }

View File

@ -1,43 +0,0 @@
package com.nflg.mobilebroken.repository.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* <p>
* 报价-购物车-其他要求
* </p>
* @author 代码生成器生成
* @since 2026
*/
@Getter
@Setter
@Accessors(chain = true)
@TableName("quotation_shopping_cart_other")
public class QuotationShoppingCartOther implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
/**
* 购物车id
*/
private Long cartId;
/**
* 要求说明
*/
private String desc;
/**
* 费用
*/
private BigDecimal fee;
}

View File

@ -1,16 +0,0 @@
package com.nflg.mobilebroken.repository.mapper;
import com.nflg.mobilebroken.repository.entity.QuotationShoppingCartOther;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 报价-购物车-其他要求 Mapper 接口
* </p>
*
* @author 代码生成器生成
* @since 2026
*/
public interface QuotationShoppingCartOtherMapper extends BaseMapper<QuotationShoppingCartOther> {
}

View File

@ -1,16 +0,0 @@
package com.nflg.mobilebroken.repository.service;
import com.nflg.mobilebroken.repository.entity.QuotationShoppingCartOther;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 报价-购物车-其他要求 服务类
* </p>
*
* @author 代码生成器生成
* @since 2026
*/
public interface IQuotationShoppingCartOtherService extends IService<QuotationShoppingCartOther> {
}

View File

@ -1,20 +0,0 @@
package com.nflg.mobilebroken.repository.service.impl;
import com.nflg.mobilebroken.repository.entity.QuotationShoppingCartOther;
import com.nflg.mobilebroken.repository.mapper.QuotationShoppingCartOtherMapper;
import com.nflg.mobilebroken.repository.service.IQuotationShoppingCartOtherService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 报价-购物车-其他要求 服务实现类
* </p>
*
* @author 代码生成器生成
* @since 2026
*/
@Service
public class QuotationShoppingCartOtherServiceImpl extends ServiceImpl<QuotationShoppingCartOtherMapper, QuotationShoppingCartOther> implements IQuotationShoppingCartOtherService {
}