Compare commits

..

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

4 changed files with 13 additions and 77 deletions

View File

@ -140,9 +140,6 @@ public class ShoppingController extends ControllerBase {
@Resource
private ITBaseDepartmentService departmentService;
@Resource
private IQuotationShoppingOrderDeliveryMethodService shoppingOrderDeliveryMethodService;
/**
* 购物车-获取报价主体
*/
@ -501,10 +498,6 @@ public class ShoppingController extends ControllerBase {
.eq(QuotationShoppingCartService::getCartId, cart.getId())
.list()
);
vo.setOthers(shoppingCartOtherService.lambdaQuery()
.eq(QuotationShoppingCartOther::getCartId, cart.getId())
.list()
);
return ApiResult.success(vo);
}
@ -561,19 +554,18 @@ public class ShoppingController extends ControllerBase {
.throwMessage("客户名称不一致");
VUtils.trueThrowBusinessError(carts.stream().map(QuotationShoppingCart::getTargetId).collect(Collectors.toSet()).size() > 1)
.throwMessage("报价主体不一致");
QuotationShoppingOrder order = Convert.convert(QuotationShoppingOrder.class, request);
order.setId(IdUtil.getId());
order.setNo(genOrderNo());
order.setCreateByType(AppUserUtil.isAgent() ? 1 : 0);
order.setCreateBy(AppUserUtil.getUserName());
order.setCreateById(AppUserUtil.getUserId());
order.setCreateTime(LocalDateTime.now());
order.setCustomerName(carts.get(0).getCustomerName());
order.setEffectiveStartTime(DateTimeUtil.format(LocalDate.now(), "yyyy-MM-dd"));
order.setEffectiveEndTime(DateTimeUtil.format(LocalDate.now().plusMonths(1), "yyyy-MM-dd"));
order.setQuotationCode(getQuotationCode());
order.setTargetId(carts.get(0).getTargetId());
order.setTotalFee(carts.stream().map(QuotationShoppingCart::getActualFee).reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
QuotationShoppingOrder order = new QuotationShoppingOrder()
.setCreateByType(AppUserUtil.isAgent() ? 1 : 0)
.setCreateBy(AppUserUtil.getUserName())
.setCreateById(AppUserUtil.getUserId())
.setCreateTime(LocalDateTime.now())
.setId(IdUtil.getId())
.setCustomerName(carts.get(0).getCustomerName())
.setEffectiveStartTime(DateTimeUtil.format(LocalDate.now(), "yyyy-MM-dd"))
.setEffectiveEndTime(DateTimeUtil.format(LocalDate.now().plusMonths(1), "yyyy-MM-dd"))
.setQuotationCode(getQuotationCode())
.setTargetId(carts.get(0).getTargetId())
.setTotalFee(carts.stream().map(QuotationShoppingCart::getActualFee).reduce(BigDecimal::add).get());
order.setActualFee(order.getTotalFee());
order.setExchangeFee(NumberUtil.multiply(order.getActualFee(), request.getExchangeRate()));
shoppingOrderItemService.saveBatch(
@ -583,17 +575,7 @@ public class ShoppingController extends ControllerBase {
.setCartId(cart.getId()))
.collect(Collectors.toList())
);
if (CollectionUtil.isNotEmpty(request.getDeliveryMethods())) {
shoppingOrderDeliveryMethodService.saveBatch(
request.getDeliveryMethods().stream()
.map(deliveryMethod -> {
QuotationShoppingOrderDeliveryMethod dm = Convert.convert(QuotationShoppingOrderDeliveryMethod.class, deliveryMethod);
dm.setOrderId(order.getId());
return dm;
})
.collect(Collectors.toList())
);
}
order.setNo(genOrderNo());
shoppingOrderService.save(order);
shoppingCartService.lambdaUpdate()
.set(QuotationShoppingCart::getStatus, 1)

View File

@ -57,24 +57,4 @@ public class QuotationGenerateRequest {
* 备注
*/
private String remark;
/**
* 联系人
*/
private String contactPerson;
/**
* 联系方式
*/
private String contactInformation;
/**
* 联系邮箱
*/
private String contactEmail;
/**
* 国家/地区
*/
private String contactCountry;
}

View File

@ -1,7 +1,6 @@
package com.nflg.mobilebroken.quotation.pojo.vo;
import com.nflg.mobilebroken.repository.entity.QuotationShoppingCartAccessory;
import com.nflg.mobilebroken.repository.entity.QuotationShoppingCartOther;
import com.nflg.mobilebroken.repository.entity.QuotationShoppingCartService;
import lombok.Data;
import lombok.experimental.Accessors;
@ -210,9 +209,4 @@ public class ShoppingCartVO {
* 交机服务
*/
private List<QuotationShoppingCartService> services;
/**
* 其他要求
*/
private List<QuotationShoppingCartOther> others;
}

View File

@ -135,24 +135,4 @@ public class QuotationShoppingOrder implements Serializable {
* 备注
*/
private String remark;
/**
* 联系人
*/
private String contactPerson;
/**
* 联系方式
*/
private String contactInformation;
/**
* 联系邮箱
*/
private String contactEmail;
/**
* 国家/地区
*/
private String contactCountry;
}