mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
磅房数据校验不能超过32天
This commit is contained in:
@@ -90,6 +90,15 @@ public class WeightDeviceDataService
|
||||
@SneakyThrows
|
||||
public List<Map> checkLocalData(CheckLocalDataRequest requst) {
|
||||
|
||||
if (requst.getStart()!=null && requst.getEnd()!=null){
|
||||
|
||||
// 不能超过32天
|
||||
if (requst.getStart().plusDays(32).isBefore(requst.getEnd())){
|
||||
|
||||
throw new BizException("时间范围不能超过32天");
|
||||
}
|
||||
}
|
||||
|
||||
List<WeightDeviceEntity> devices =
|
||||
em.createQuery(
|
||||
" from WeightDeviceEntity d where d.organizationId = :organizationId",
|
||||
|
||||
Reference in New Issue
Block a user