diff --git a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/AdminMessageVO.java b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/AdminMessageVO.java index 93724f9a..a85de62a 100644 --- a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/AdminMessageVO.java +++ b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/AdminMessageVO.java @@ -6,6 +6,7 @@ import lombok.Data; import lombok.experimental.Accessors; import java.time.LocalDateTime; +import java.util.Optional; @Data @Accessors(chain = true) @@ -37,7 +38,7 @@ public class AdminMessageVO { private String subTypeDesc; public String getSubTypeDesc() { - return MessageSubType.findByValue(subType).getDescription(); + return Optional.ofNullable(MessageSubType.findByValue(subType)).map(MessageSubType::getDescription).orElse("任务事项类型不存在"); } /** diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/admin/AdminShoppingController.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/admin/AdminShoppingController.java index 59ba48fb..2738411c 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/admin/AdminShoppingController.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/admin/AdminShoppingController.java @@ -86,7 +86,7 @@ public class AdminShoppingController extends ControllerBase { public ApiResult> getAdjusts(@RequestParam Long orderId) { List datas = shoppingOrderAdjustService.lambdaQuery() .eq(QuotationShoppingOrderAdjust::getOrderId, orderId) - .orderByAsc(QuotationShoppingOrderAdjust::getId) + .orderByDesc(QuotationShoppingOrderAdjust::getId) .list(); List adjustItems = shoppingOrderAdjustItemService.lambdaQuery() .eq(QuotationShoppingOrderAdjustItem::getOrderId, orderId) @@ -152,7 +152,7 @@ public class AdminShoppingController extends ControllerBase { * 导出报价单 * @param id 报价单ID */ - @GetMapping("/export") + @GetMapping("/exportToPdf") public void exportPdf(HttpServletResponse response, @RequestParam Long id) throws IOException { pdfExportService.export(id,response); } diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java index e9eaefdc..ea759a92 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java @@ -195,6 +195,7 @@ public class ShoppingController extends ControllerBase { .throwMessage("该机型已禁售"); ModelPrice1VO modelPrice = priceService.getModelPrice(request.getModelId(), categoryId); VUtils.trueThrowBusinessError(Objects.isNull(modelPrice)).throwMessage("该机型尚未设置价格"); + DictionaryItem modelDescription = dictionaryItemService.getByCodeAndLanguage("ModelDescription", MultilingualUtil.getLanguage()); ShoppingCartVO vo = new ShoppingCartVO() .setModelId(request.getModelId()) .setTargetId(request.getTargetId()) @@ -202,7 +203,8 @@ public class ShoppingController extends ControllerBase { .setPriceId(modelPrice.getPriceId()) .setConfigId(modelPrice.getConfigId()) .setTotalFee(modelPrice.getAmount()) - .setActualFee(modelPrice.getAmount()); + .setActualFee(modelPrice.getAmount()) + .setModelDesc(Optional.ofNullable(modelDescription).map(DictionaryItem::getName).orElse(null)); log.debug("机型【{}】售价为{}", request.getModelNo(), modelPrice); //系数 Pair pair = getRatio(request.getModelId()); @@ -452,6 +454,8 @@ public class ShoppingController extends ControllerBase { if (Objects.nonNull(model)) { vo.setModelKeyId(model.getId()); } + DictionaryItem modelDescription = dictionaryItemService.getByCodeAndLanguage("ModelDescription", MultilingualUtil.getLanguage()); + vo.setModelDesc(modelDescription == null ? "" : modelDescription.getValue()); BigDecimal optionalRatio; if (Objects.nonNull(cart.getPlanItemId())) { QuotationUserPlanModelItem planItem = userPlanModelItemService.getById(cart.getPlanItemId()); @@ -734,6 +738,14 @@ public class ShoppingController extends ControllerBase { DictionaryItem currency = dictionaryItemService.getByIdAndLanguage(vo.getCurrency(), MultilingualUtil.getLanguage()); vo.setCurrencyName(currency.getName()); vo.setDeliveryMethods(shoppingOrderDeliveryMethodService.getList(order.getId())); + if (AppUserUtil.isAgent()) { + TBaseCustomer customer = customerService.lambdaQuery() + .eq(TBaseCustomer::getId, vo.getTargetId()) + .one(); + vo.setTargetName(Optional.ofNullable(customer).map(TBaseCustomer::getAgencyCompanyName).orElse("报价主体不存在")); + } else { + vo.setTargetName(Constant.COMPANY_NAME); + } List orderItems = shoppingOrderItemService.lambdaQuery() .eq(QuotationShoppingOrderItem::getOrderId, id) .list(); @@ -743,6 +755,11 @@ public class ShoppingController extends ControllerBase { List adjustItems = shoppingOrderAdjustItemService.getParts(id); carts.forEach(cart -> { ShoppingCartVO cartVO = Convert.convert(ShoppingCartVO.class, cart); + ProductModel model = productModelService.getInfoByBatchNumber(cart.getModelId()); + cartVO.setModelNo(model.getNo()); + cartVO.setModelKeyId(model.getId()); + DictionaryItem modelDescription = dictionaryItemService.getByCodeAndLanguage("ModelDescription", MultilingualUtil.getLanguage()); + cartVO.setModelDesc(Optional.ofNullable(modelDescription).map(DictionaryItem::getName).orElse(null)); QuotationShoppingOrderAdjustItem adjustItem = adjustItems.stream() .filter(item -> item.getCartId().equals(cart.getId()) && item.getConfigItemId().equals(0L)) .findFirst() @@ -787,6 +804,18 @@ public class ShoppingController extends ControllerBase { } ).collect(Collectors.toList()) ); + cartVO.setAccessories(shoppingCartAccessoryService.lambdaQuery() + .eq(QuotationShoppingCartAccessory::getCartId, cart.getId()) + .list() + ); + cartVO.setServices(shoppingCartServiceService.lambdaQuery() + .eq(QuotationShoppingCartService::getCartId, cart.getId()) + .list() + ); + cartVO.setOthers(shoppingCartOtherService.lambdaQuery() + .eq(QuotationShoppingCartOther::getCartId, cart.getId()) + .list() + ); vo.getItems().add(cartVO); }); return ApiResult.success(vo); @@ -817,7 +846,13 @@ public class ShoppingController extends ControllerBase { VUtils.trueThrowBusinessError(Objects.isNull(order)).throwMessage("未找到报价单"); return ApiResult.success(shoppingOrderService.getCarts(orderId) .stream() - .map(cart -> new CartsForCopyVO(cart.getId(), cart.getModelNo())) + .map(cart -> { + ProductModel model = productModelService.lambdaQuery() + .eq(ProductModel::getBatchNumber, cart.getModelId()) + .eq(ProductModel::getState, 1) + .one(); + return new CartsForCopyVO(cart.getId(), cart.getModelNo(), cart.getModelId(), model.getId()); + }) .collect(Collectors.toList()) ); } @@ -851,6 +886,8 @@ public class ShoppingController extends ControllerBase { .setPlanItemId(cart.getPlanItemId()) .setConfigId(cart.getConfigId()) .setDiscount(cart.getDiscount()) + .setStandardFee(cart.getStandardFee()) + .setOptionalFee(cart.getOptionalFee()) .setTotalFee(cart.getStandardFee().add(cart.getOptionalFee())) .setActualFee(cart.getStandardFee().add(cart.getOptionalFee())); // //系数 @@ -966,7 +1003,8 @@ public class ShoppingController extends ControllerBase { .setId(IdUtil.getId()) .setOrderId(order.getId()) .setDiscount(order.getActualFee().subtract(request.getActualFee())) - .setActualFee(request.getActualFee()) + .setOldActualFee(order.getActualFee()) + .setNewActualFee(request.getActualFee()) .setReason(request.getReason()) .setCreateTime(LocalDateTime.now()); order.setActualFee(request.getActualFee()); @@ -1015,7 +1053,7 @@ public class ShoppingController extends ControllerBase { * 报价单-导出报价单 * @param id 报价单ID */ - @GetMapping("/export") + @GetMapping("/exportToPdf") public void exportPdf(HttpServletResponse response, @RequestParam Long id) throws IOException { pdfExportService.export(id, response); } diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/request/QuotationPriceUpdateItemPartRequest.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/request/QuotationPriceUpdateItemPartRequest.java index 64efb634..70422760 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/request/QuotationPriceUpdateItemPartRequest.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/request/QuotationPriceUpdateItemPartRequest.java @@ -17,12 +17,12 @@ public class QuotationPriceUpdateItemPartRequest { /** * 标准配置调价前价格 */ - @NotNull + @NotNull(message = "标准配置调价前价格不能为空") private BigDecimal oldStandardFee; /** * 标准配置调价后价格 */ - @NotNull + @NotNull(message = "标准配置调价后价格不能为空") private BigDecimal newStandardFee; } diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/request/QuotationPriceUpdateItemRequest.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/request/QuotationPriceUpdateItemRequest.java index 60802bb4..496acea0 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/request/QuotationPriceUpdateItemRequest.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/request/QuotationPriceUpdateItemRequest.java @@ -19,11 +19,13 @@ public class QuotationPriceUpdateItemRequest { /** * 标准配置调价前价格 */ + @NotNull(message = "标准配置调价前价格不能为空") private BigDecimal oldStandardFee; /** * 标准配置调价后价格 */ + @NotNull(message = "标准配置调价后价格不能为空") private BigDecimal newStandardFee; /** diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/request/QuotationPriceUpdateRequest.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/request/QuotationPriceUpdateRequest.java index 035e5bfd..0c009f55 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/request/QuotationPriceUpdateRequest.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/request/QuotationPriceUpdateRequest.java @@ -19,17 +19,19 @@ public class QuotationPriceUpdateRequest { /** * 调价后实际总价 */ + @NotNull(message = "调价后实际总价不能为空") private BigDecimal actualFee; /** * 调价原因 */ + @NotBlank(message = "调价原因不能为空") private String reason; /** * 报价失效时间 */ - @NotNull + @NotNull(message = "报价失效时间不能为空") private LocalDate effectiveEndTime; /** diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/CartsForCopyVO.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/CartsForCopyVO.java index fdcd61e1..9b035e1c 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/CartsForCopyVO.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/CartsForCopyVO.java @@ -16,4 +16,14 @@ public class CartsForCopyVO { * 机型 */ private String modelNo; + + /** + * 机型batch_number + */ + private Long modelId; + + /** + * 机型自增id + */ + private Integer modelKeyId; } diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/QuotationOrderInfoVO.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/QuotationOrderInfoVO.java index c2471328..6584063c 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/QuotationOrderInfoVO.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/QuotationOrderInfoVO.java @@ -28,6 +28,11 @@ public class QuotationOrderInfoVO { */ private Integer targetId; + /** + * 报价主体名称 + */ + private String targetName; + /** * 报价人代码 */ @@ -148,6 +153,11 @@ public class QuotationOrderInfoVO { */ private String contactCountry; + /** + * 报价公司地址 + */ + private String address; + /** * 交付方式列表 */ diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/ShoppingCartVO.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/ShoppingCartVO.java index 82670458..3edac97c 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/ShoppingCartVO.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/ShoppingCartVO.java @@ -21,11 +21,21 @@ public class ShoppingCartVO { */ private Long modelId; + /** + * 机型编号 + */ + private String modelNo; + /** * 机型自增id */ private Integer modelKeyId; + /** + * 机型描述 + */ + private String modelDesc; + /** * 价格id */ diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/ShoppingOrderAdjustVO.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/ShoppingOrderAdjustVO.java index 31d80e28..8390b977 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/ShoppingOrderAdjustVO.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/pojo/vo/ShoppingOrderAdjustVO.java @@ -18,9 +18,14 @@ public class ShoppingOrderAdjustVO { private BigDecimal discount; /** - * 实际总价 + * 调价前实际总价 */ - private BigDecimal actualFee; + private BigDecimal oldActualFee; + + /** + * 调价后实际总价 + */ + private BigDecimal newActualFee; /** * 调价原因 diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/service/PdfExportService.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/service/PdfExportService.java index 8d289e64..87f68dd6 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/service/PdfExportService.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/service/PdfExportService.java @@ -1,5 +1,6 @@ package com.nflg.mobilebroken.quotation.service; +import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.text.StrBuilder; import cn.hutool.core.util.StrUtil; import com.google.common.primitives.Floats; @@ -324,49 +325,53 @@ public class PdfExportService { private void addRandomAccessories(Document document, List accessories , List translates) { - document.add(new Paragraph(new Chunk(getText(translates, "RandomAccessories"), new Font(bfChinese, 13, Font.BOLD)))); - PdfPTable table = new PdfPTable(5); - table.setWidthPercentage(100); - table.setSpacingBefore(10f); - table.setWidths(new float[]{20f, 20f, 20f, 20f, 20f}); - //表头 - table.addCell(createBJQDCell(getText(translates, "MaterialNo"), 1, normalFont)); - table.addCell(createBJQDCell(getText(translates, "MaterialName"), 1, normalFont)); - table.addCell(createBJQDCell(getText(translates, "Num"), 1, normalFont)); - table.addCell(createBJQDCell(getText(translates, "Price"), 1, normalFont)); - table.addCell(createBJQDCell(getText(translates, "TotalPrice"), 1, normalFont)); - accessories.forEach(accessory -> { - table.addCell(createBJQDCell(accessory.getMaterialNo(), 1, normalFont)); - table.addCell(createBJQDCell(accessory.getName(), 1, normalFont)); - table.addCell(createBJQDCell(String.valueOf(accessory.getNum()), 1, normalFont)); - table.addCell(createBJQDCell(accessory.getAmount().toPlainString(), 1, normalFont)); - table.addCell(createBJQDCell(accessory.getTotalAmount().toPlainString(), 1, normalFont)); - }); - document.add(table); + if (CollectionUtil.isNotEmpty(accessories)) { + document.add(new Paragraph(new Chunk(getText(translates, "RandomAccessories"), new Font(bfChinese, 13, Font.BOLD)))); + PdfPTable table = new PdfPTable(5); + table.setWidthPercentage(100); + table.setSpacingBefore(10f); + table.setWidths(new float[]{20f, 20f, 20f, 20f, 20f}); + //表头 + table.addCell(createBJQDCell(getText(translates, "MaterialNo"), 1, normalFont)); + table.addCell(createBJQDCell(getText(translates, "MaterialName"), 1, normalFont)); + table.addCell(createBJQDCell(getText(translates, "Num"), 1, normalFont)); + table.addCell(createBJQDCell(getText(translates, "Price"), 1, normalFont)); + table.addCell(createBJQDCell(getText(translates, "TotalPrice"), 1, normalFont)); + accessories.forEach(accessory -> { + table.addCell(createBJQDCell(accessory.getMaterialNo(), 1, normalFont)); + table.addCell(createBJQDCell(accessory.getName(), 1, normalFont)); + table.addCell(createBJQDCell(String.valueOf(accessory.getNum()), 1, normalFont)); + table.addCell(createBJQDCell(accessory.getAmount().toPlainString(), 1, normalFont)); + table.addCell(createBJQDCell(accessory.getTotalAmount().toPlainString(), 1, normalFont)); + }); + document.add(table); + } } private void addJJFF(Document document, List services, List translates) { - document.add(new Paragraph(new Chunk(getText(translates, "HandoverService"), new Font(bfChinese, 13, Font.BOLD)))); - PdfPTable table = new PdfPTable(6); - table.setWidthPercentage(100); - table.setSpacingBefore(10f); - table.setWidths(new float[]{15f, 15f, 15f, 15f, 20f, 20f}); - //表头 - table.addCell(createBJQDCell(getText(translates, "Numberofpeople"), 1, normalFont)); - table.addCell(createBJQDCell(getText(translates, "Days"), 1, normalFont)); - table.addCell(createBJQDCell(getText(translates, "Price"), 1, normalFont)); - table.addCell(createBJQDCell(getText(translates, "TotalPrice"), 1, normalFont)); - table.addCell(createBJQDCell(getText(translates, "Address"), 1, normalFont)); - table.addCell(createBJQDCell(getText(translates, "Remark"), 1, normalFont)); - for (QuotationShoppingCartService service : services) { - table.addCell(createBJQDCell(String.valueOf(service.getUserNum()), 1, normalFont)); - table.addCell(createBJQDCell(String.valueOf(service.getDays()), 1, normalFont)); - table.addCell(createBJQDCell(String.valueOf(service.getFee()), 1, normalFont)); - table.addCell(createBJQDCell(String.valueOf(service.getTotalFee()), 1, normalFont)); - table.addCell(createBJQDCell(service.getAddress(), 1, normalFont)); - table.addCell(createBJQDCell(service.getRemark(), 1, normalFont)); + if (CollectionUtil.isNotEmpty(services)) { + document.add(new Paragraph(new Chunk(getText(translates, "HandoverService"), new Font(bfChinese, 13, Font.BOLD)))); + PdfPTable table = new PdfPTable(6); + table.setWidthPercentage(100); + table.setSpacingBefore(10f); + table.setWidths(new float[]{15f, 15f, 15f, 15f, 20f, 20f}); + //表头 + table.addCell(createBJQDCell(getText(translates, "Numberofpeople"), 1, normalFont)); + table.addCell(createBJQDCell(getText(translates, "Days"), 1, normalFont)); + table.addCell(createBJQDCell(getText(translates, "Price"), 1, normalFont)); + table.addCell(createBJQDCell(getText(translates, "TotalPrice"), 1, normalFont)); + table.addCell(createBJQDCell(getText(translates, "Address"), 1, normalFont)); + table.addCell(createBJQDCell(getText(translates, "Remark"), 1, normalFont)); + for (QuotationShoppingCartService service : services) { + table.addCell(createBJQDCell(String.valueOf(service.getUserNum()), 1, normalFont)); + table.addCell(createBJQDCell(String.valueOf(service.getDays()), 1, normalFont)); + table.addCell(createBJQDCell(String.valueOf(service.getFee()), 1, normalFont)); + table.addCell(createBJQDCell(String.valueOf(service.getTotalFee()), 1, normalFont)); + table.addCell(createBJQDCell(service.getAddress(), 1, normalFont)); + table.addCell(createBJQDCell(service.getRemark(), 1, normalFont)); + } + document.add(table); } - document.add(table); } private void addPriceInfo(Document document, List deliveryMethods diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/QuotationShoppingOrderAdjust.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/QuotationShoppingOrderAdjust.java index 1dc30dea..ef8fadd7 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/QuotationShoppingOrderAdjust.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/entity/QuotationShoppingOrderAdjust.java @@ -37,9 +37,14 @@ public class QuotationShoppingOrderAdjust implements Serializable { private BigDecimal discount; /** - * 实际总价 + * 调价前实际总价 */ - private BigDecimal actualFee; + private BigDecimal oldActualFee; + + /** + * 调价后实际总价 + */ + private BigDecimal newActualFee; /** * 调价原因 diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/mapper/DictionaryItemMapper.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/mapper/DictionaryItemMapper.java index 1d68751c..b195f766 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/mapper/DictionaryItemMapper.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/mapper/DictionaryItemMapper.java @@ -29,4 +29,6 @@ public interface DictionaryItemMapper extends BaseMapper { List getListByDictionaryCodeAndType(String dictionaryCode, String type); DictionaryItem getByIdAndLanguage(Long id, String language); + + DictionaryItem getByCodeAndLanguage(String code, String language); } diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/IDictionaryItemService.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/IDictionaryItemService.java index 8c9c4a02..aa8801c3 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/IDictionaryItemService.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/IDictionaryItemService.java @@ -33,4 +33,6 @@ public interface IDictionaryItemService extends IService { List getListByDictionaryCodeAndType(String dictionaryCode,String type); DictionaryItem getByIdAndLanguage(Long id, String language); + + DictionaryItem getByCodeAndLanguage(String code, String language); } diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/IProductModelService.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/IProductModelService.java index d9815b49..6df9f1d2 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/IProductModelService.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/IProductModelService.java @@ -58,4 +58,6 @@ public interface IProductModelService extends IService { IPage searchForQuotation(QuotationProductModelSearchRequest request, String language); QuotationProductModelInfoVO getInfoForQuotation(Long id, String language); + + ProductModel getInfoByBatchNumber(Long modelId); } diff --git a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/DictionaryItemServiceImpl.java b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/DictionaryItemServiceImpl.java index fd17729f..a2250f25 100644 --- a/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/DictionaryItemServiceImpl.java +++ b/nflg-mobilebroken-repository/src/main/java/com/nflg/mobilebroken/repository/service/impl/DictionaryItemServiceImpl.java @@ -158,4 +158,9 @@ public class DictionaryItemServiceImpl extends ServiceImpl + + diff --git a/nflg-mobilebroken-repository/src/main/resources/mapper/QuotationShoppingCartMapper.xml b/nflg-mobilebroken-repository/src/main/resources/mapper/QuotationShoppingCartMapper.xml index 8e195841..7d11b353 100644 --- a/nflg-mobilebroken-repository/src/main/resources/mapper/QuotationShoppingCartMapper.xml +++ b/nflg-mobilebroken-repository/src/main/resources/mapper/QuotationShoppingCartMapper.xml @@ -24,5 +24,6 @@ AND pm.`no` like concat('%', #{request.no}, '%') + order by qsc.id desc diff --git a/nflg-mobilebroken-starter/src/main/java/com/nflg/mobilebroken/starter/filter/TraceIdFilter.java b/nflg-mobilebroken-starter/src/main/java/com/nflg/mobilebroken/starter/filter/TraceIdFilter.java index fc324317..ec1ac384 100644 --- a/nflg-mobilebroken-starter/src/main/java/com/nflg/mobilebroken/starter/filter/TraceIdFilter.java +++ b/nflg-mobilebroken-starter/src/main/java/com/nflg/mobilebroken/starter/filter/TraceIdFilter.java @@ -72,11 +72,7 @@ public class TraceIdFilter extends OncePerRequestFilter { } byte[] buf = response.getContentAsByteArray(); if (buf.length > 0) { - if (buf.length<=1024) { - return new String(buf, StandardCharsets.UTF_8); - }else { - return "数据过长,只记录前1024字节"; - } + return new String(buf, StandardCharsets.UTF_8); } return "无数据"; }