From cc74efb36fd1f1de56b3acb2ba59d4b416eaed4f Mon Sep 17 00:00:00 2001 From: wzy <wzy19931122ai@163.com> Date: Tue, 19 Jan 2021 00:23:21 +0800 Subject: [PATCH] modify --- zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java index 61b165b..d8acf42 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java @@ -438,6 +438,10 @@ return DateUtil.stringToDate("9999-12-31", DateUtil.DATE_FORMAT_DD); } + if (type == 2 && shoppingGoods.getUseDateNum() == null && StringUtils.isNotBlank(shoppingGoods.getBuyDateUnit())) { + return DateUtil.stringToDate("9999-12-31", DateUtil.DATE_FORMAT_DD); + } + if (type == 2 && buyDate == null) { throw new GlobleException("购买日期不能为空"); } @@ -522,7 +526,8 @@ goodsDetailVo.setGoodsType(shoppingGoods.getGoodType()); goodsDetailVo.setDesc(shoppingGoods.getDescription()); goodsDetailVo.setMaxSaleCnt(shoppingGoods.getCarMaxSaleCount()); - goodsDetailVo.setLimitBuyCnt(shoppingGoods.getCarUseCount().toString()); + goodsDetailVo.setLimitBuyCnt("否".equals(shoppingGoods.getIsOnce()) ? null : shoppingGoods.getIsOnce()); + goodsDetailVo.setMaxUseCnt(shoppingGoods.getCarUseCount()); goodsDetailVo.setMeasure(shoppingGoods.getMeasure()); goodsDetailVo.setVolume(shoppingGoods.getVolume()); goodsDetailVo.setSalePrice(BigDecimal.valueOf(shoppingGoods.getSealPice())); -- Gitblit v1.9.1