Compare commits
No commits in common. "0e2b46713fca3d7e05631181ad6d82a300e32c6e" and "5eb48c2c096c625667da4a80277c14e3eeeea7ab" have entirely different histories.
0e2b46713f
...
5eb48c2c09
|
|
@ -2,8 +2,6 @@ package com.nflg.mobilebroken.common.pojo.vo;
|
|||
|
||||
import com.nflg.mobilebroken.common.util.NumberUtil;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.data.annotation.AccessType;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
|
@ -11,7 +9,6 @@ import java.math.BigDecimal;
|
|||
import java.util.Objects;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PlanSearchItemVO {
|
||||
|
||||
private Long id;
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ public class PlanController extends ControllerBase {
|
|||
boolean multiRegionQuotations = isMultiRegionQuotationsUser();
|
||||
List<Long> categoryIds = new ArrayList<>();
|
||||
if (multiRegionQuotations) {
|
||||
categoryIds = dictionaryItemService.getListByDictionaryCode("DirectSalesCategory")
|
||||
categoryIds = dictionaryItemService.getListByDictionaryCode("MultiRegionQuotationsSupplier")
|
||||
.stream()
|
||||
.map(DictionaryItem::getId)
|
||||
.collect(Collectors.toList());
|
||||
|
|
@ -146,7 +146,6 @@ public class PlanController extends ControllerBase {
|
|||
}
|
||||
List<ModelPriceVO> prices = priceService.getAllModelPrice();
|
||||
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()) {
|
||||
if (index >= startIndex && index < endIndex) {
|
||||
categoryIds.forEach(categoryId -> {
|
||||
|
|
@ -157,30 +156,14 @@ public class PlanController extends ControllerBase {
|
|||
.collect(Collectors.toList());
|
||||
if (CollectionUtil.isEmpty(vos)) {
|
||||
entry.getValue().forEach(item -> {
|
||||
datas.add(new PlanSearchItemVO()
|
||||
.setPlanId(item.getPlanId())
|
||||
.setIsDefault(item.getIsDefault())
|
||||
.setModelId(item.getModelId())
|
||||
.setModelNo(item.getModelNo())
|
||||
.setName(item.getName())
|
||||
.setRatio(item.getRatio())
|
||||
.setAreaId(categoryId)
|
||||
.setStandardPrice(salePrice)
|
||||
);
|
||||
item.setStandardPrice(salePrice);
|
||||
item.setAreaId(categoryId);
|
||||
datas.add(item);
|
||||
});
|
||||
} else {
|
||||
vos.forEach(item -> {
|
||||
datas.add(new PlanSearchItemVO()
|
||||
.setId(item.getId())
|
||||
.setPlanId(item.getPlanId())
|
||||
.setIsDefault(item.getIsDefault())
|
||||
.setModelId(item.getModelId())
|
||||
.setModelNo(item.getModelNo())
|
||||
.setName(item.getName())
|
||||
.setRatio(item.getRatio())
|
||||
.setAreaId(categoryId)
|
||||
.setStandardPrice(salePrice)
|
||||
);
|
||||
item.setStandardPrice(salePrice);
|
||||
datas.add(item);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -101,9 +101,6 @@ public class ShoppingController extends ControllerBase {
|
|||
@Resource
|
||||
private IQuotationShoppingCartServiceService shoppingCartServiceService;
|
||||
|
||||
@Resource
|
||||
private IQuotationShoppingCartOtherService shoppingCartOtherService;
|
||||
|
||||
@Resource
|
||||
private IQuotationShoppingOrderService shoppingOrderService;
|
||||
|
||||
|
|
@ -360,16 +357,6 @@ public class ShoppingController extends ControllerBase {
|
|||
).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);
|
||||
return ApiResult.success(cartId);
|
||||
}
|
||||
|
|
@ -1038,20 +1025,20 @@ public class ShoppingController extends ControllerBase {
|
|||
* 获取下属报价单
|
||||
*/
|
||||
@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())
|
||||
.throwMessage("你不是代理商主账号无权查看");
|
||||
if (Objects.isNull(request.getCreateById())) {
|
||||
if (Objects.isNull(request.getCreateById())){
|
||||
request.setCreateByIds(
|
||||
appUserService.getChildren(appUserService.getById(AppUserUtil.getUserId()))
|
||||
.stream()
|
||||
.map(AppUser::getId)
|
||||
.collect(Collectors.toList())
|
||||
);
|
||||
} else {
|
||||
}else {
|
||||
request.setCreateByIds(List.of(request.getCreateById()));
|
||||
}
|
||||
if (!AppUserUtil.isAgent()) {
|
||||
if (!AppUserUtil.isAgent()){
|
||||
request.setTargetId(null);
|
||||
}
|
||||
return ApiResult.success(shoppingOrderService.getQuotationOfSubordinate(request));
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -148,10 +148,4 @@ public class ShoppingSaveRequest {
|
|||
*/
|
||||
@Valid
|
||||
private List<ShoppingSaveServiceRequest> services;
|
||||
|
||||
/**
|
||||
* 其他要求
|
||||
*/
|
||||
@Valid
|
||||
private List<ShoppingCartOtherRequest> others;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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> {
|
||||
|
||||
}
|
||||
|
|
@ -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> {
|
||||
|
||||
}
|
||||
|
|
@ -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 {
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue