Helius
2022-10-19 581835e407eab022616b4a62377ea5e4ae9ba346
Merge branch 'score_shop'
1 files modified
12 ■■■■■ changed files
zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java 12 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java
@@ -462,15 +462,19 @@
        Date target = null;
        Date buyValidDate = null;
        if (type == 1 && StrUtil.isNotBlank(shoppingGoods.getBuyValid())) {
            buyValidDate = DateUtil.stringToDate(shoppingGoods.getBuyValid(), "yyyy-MM-dd");
        if (type == 1) {
            if (shoppingGoods.getBuyDateNum() != null && StrUtil.isNotBlank(shoppingGoods.getBuyDateUnit())) {
                buyValidDate = DateUtil.calDate(shoppingGoods.getBuyDateNum(), shoppingGoods.getBuyDateUnit());
            }
        } else {
            buyValidDate = buyDate;
        }
        Date useValidDate = DateUtil.stringToDate("2099-12-31", DateUtil.DATE_FORMAT_DD);
        if (type == 2 && StrUtil.isNotBlank(shoppingGoods.getUseValid())) {
            useValidDate = DateUtil.stringToDate(shoppingGoods.getUseValid(), "yyyy-MM-dd");
        if (type == 2) {
            if (shoppingGoods.getUseDateNum() != null && StrUtil.isNotBlank(shoppingGoods.getUseDateUnit())) {
                useValidDate = DateUtil.calDate(shoppingGoods.getUseDateNum(), shoppingGoods.getUseDateUnit());
            }
        }
        if (buyValidDate != null) {