| | |
| | | import com.ruoyi.common.constant.OrderNumConstants; |
| | | import com.ruoyi.common.utils.CodeGenerateUtils; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.domain.*; |
| | | import com.ruoyi.system.dto.TOrderSaleDTO; |
| | | import com.ruoyi.system.dto.TOrderStockDTO; |
| | |
| | | dto.setIsCover(0); |
| | | } |
| | | this.save(dto); |
| | | List<TGoods> goods = goodsService.list(Wrappers.lambdaQuery(TGoods.class)); |
| | | List<TGoods> goods = goodsService.list(Wrappers.lambdaQuery(TGoods.class).eq(TGoods::getShopId,dto.getShopId())); |
| | | List<TGoods> goodsUpdateList = new ArrayList<>(); |
| | | // 添加商品 |
| | | orderStockGoods.forEach(orderSaleGoods1 -> { |
| | |
| | | if(good.getGoodsNum().equals(orderSaleGoods1.getGoodsNum())){ |
| | | good.setInventory(orderSaleGoods1.getStockCount()+good.getInventory()); |
| | | goodsUpdateList.add(good); |
| | | }else { |
| | | break; |
| | | } |
| | | } |
| | | }); |
| | |
| | | |
| | | @Override |
| | | public PageInfo<TOrderStockVO> pageList(TOrderStockQuery query) { |
| | | if(Objects.isNull(query.getStartTime()) && Objects.isNull(query.getEndTime())){ |
| | | if(StringUtils.isEmpty(query.getStartTime()) && StringUtils.isEmpty(query.getEndTime())){ |
| | | // 判断时间 |
| | | if(Objects.nonNull(query.getTimeType())){ |
| | | LocalDateTime startTime = null; |
| | |
| | | |
| | | @Override |
| | | public Map<String, Object> getDataGeneratorStockDetail(TDataGeneratorStockQuery query) { |
| | | if(Objects.isNull(query.getStartTime()) && Objects.isNull(query.getEndTime())){ |
| | | if(StringUtils.isEmpty(query.getStartTime()) && StringUtils.isEmpty(query.getEndTime())){ |
| | | // 判断时间 |
| | | if(Objects.nonNull(query.getTimeType())){ |
| | | LocalDateTime startTime = null; |
| | |
| | | }); |
| | | tOrderStockGoodsService.saveBatch(orderStockGoods); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByShopId(Long shopId) { |
| | | this.baseMapper.deleteByShopId(shopId); |
| | | } |
| | | } |