Merge branch 'ww' into test

This commit is contained in:
wangw 2024-09-27 09:59:10 +08:00
commit 7285de2024
2 changed files with 55 additions and 58 deletions

View File

@ -86,9 +86,7 @@ public class TbConsInfoFlowServiceImpl implements TbConsInfoFlowService {
//入库stockInNumber; stockIn
//出库stockOutNumber; stockout
public Map<String,Object> queryPage(TbConsInfoFlowQueryCriteria criteria){
if(StringUtils.isBlank(criteria.getColumn())){
throw new BadRequestException("必填参数未填写");
}
if(StringUtils.isNotBlank(criteria.getColumn())){
switch (criteria.getColumn()){
case "addCountNumber":
criteria.setBizCode(Arrays.asList("stockIn","cancelCart","init","stockIn","checkStockIn"));
@ -118,7 +116,7 @@ public class TbConsInfoFlowServiceImpl implements TbConsInfoFlowService {
criteria.setBizCode(Arrays.asList("stockout"));
break;
}
}
Sort sort = Sort.by(Sort.Direction.DESC, "id");
Pageable pageable = PageRequest.of(criteria.getPage(), criteria.getSize(), sort);

View File

@ -69,9 +69,7 @@ public class TbProductStockDetailServiceImpl implements TbProductStockDetailServ
@Override
public Map<String,Object> queryPage(TbProductStockDetailQueryCriteria criteria){
if(StringUtils.isBlank(criteria.getColumn())){
throw new BadRequestException("必填参数未填写");
}
if(StringUtils.isNotBlank(criteria.getColumn())){
switch (criteria.getColumn()){
case "addCountNumber":
criteria.setType(Arrays.asList("供应商入库", "盘点入库", "其他入库", "退单"));
@ -95,6 +93,7 @@ public class TbProductStockDetailServiceImpl implements TbProductStockDetailServ
criteria.setType(Arrays.asList("报损"));
break;
}
}
Sort sort = Sort.by(Sort.Direction.DESC, "id");
Pageable pageable = PageRequest.of(criteria.getPage(), criteria.getSize(), sort);
@ -121,7 +120,7 @@ public class TbProductStockDetailServiceImpl implements TbProductStockDetailServ
@Override
public TbProductStockCountVo stockCount(TbProductStockCountQueryCriteria criteria) throws ParseException {
if (criteria.getStartTime() == null || criteria.getEndTime() == null) {
criteria.setEndTime(new Date());//
criteria.setEndTime(new Date());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
criteria.setStartTime(sdf.parse("2024-01-01"));//创建2024年1月1日的Date对象
}