耗材 记录 统计 Bug

This commit is contained in:
wangw 2024-09-25 17:38:54 +08:00
parent faa463e396
commit 57269a1e92
2 changed files with 7 additions and 5 deletions

View File

@ -134,8 +134,8 @@ public class TbConsInfoFlowServiceImpl implements TbConsInfoFlowService {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
criteria.setStartTime(sdf.parse("2024-01-01"));//创建2024年1月1日的Date对象
}
return stockRepository.consStockCount(criteria.getShopId().toString(), criteria.getProductName(),
criteria.getCategoryId(), DateUtil.getStrTime(criteria.getStartTime()), DateUtil.getStrTime(criteria.getEndTime()));
return stockRepository.consStockCount(criteria.getShopId(), criteria.getProductName(),
criteria.getCategoryId(), criteria.getStartTime(), criteria.getEndTime());
}
@Override

View File

@ -7,6 +7,8 @@ import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import java.util.Date;
/**
* @author lyf
@ -158,8 +160,8 @@ public interface ProductStockCountRepository extends JpaRepository<TbProductStoc
" flow.shopId = :shopId " +
" AND flow.createTime > :startTime " +
" AND flow.createTime < :endTime ")
TbProductStockCountVo consStockCount(String shopId,
String conName,
String conTypeId, String startTime, String endTime);
TbProductStockCountVo consStockCount(Integer shopId,
String conName,
String conTypeId, Date startTime, Date endTime);
}