新增接口
This commit is contained in:
parent
73cdef71c5
commit
28de42db7a
|
|
@ -415,4 +415,36 @@ public class InvoicingApi {
|
|||
IPage<MaterialInfoEntity> pageList = invoicingApi.queryCgdWaringList(pageNo, pageSize, materialInfoEntityDto,req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "采购单-查询物料出入库记录", notes = "采购单-查询购物车信息-分页列表查询")
|
||||
@GetMapping(value = "/queryCrkInfoList")
|
||||
public Result<IPage<WarehouseMaterialCrkInfoEntity>> queryCrkInfoList(WarehouseMaterialCrkInfoEntity crkInfoEntity,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
if(StringUtils.isEmpty(crkInfoEntity.getWlId())){
|
||||
return Result.error("参数错误,请选择物料");
|
||||
}
|
||||
if(StringUtils.isEmpty(crkInfoEntity.getNuId())){
|
||||
return Result.error("参数错误,请选择仓库");
|
||||
}
|
||||
IPage<WarehouseMaterialCrkInfoEntity> pageList = invoicingApi.queryCrkInfoList(pageNo, pageSize, crkInfoEntity,req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
@ApiOperation(value = "采购单-查询出入库数量", notes = "采购单-查询出入库数量")
|
||||
@GetMapping(value = "/queryCrkInfoNumList")
|
||||
public Result<Map<String, Object>> queryCrkInfoNumList(WarehouseMaterialCrkInfoEntity crkInfoEntity,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
if(StringUtils.isEmpty(crkInfoEntity.getWlId())){
|
||||
return Result.error("参数错误,请选择物料");
|
||||
}
|
||||
if(StringUtils.isEmpty(crkInfoEntity.getNuId())){
|
||||
return Result.error("参数错误,请选择仓库");
|
||||
}
|
||||
Map<String, Object> pageList = invoicingApi.queryCrkInfoNumList(pageNo, pageSize, crkInfoEntity,req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,5 +64,6 @@ public class WarehouseMaterialCrkInfoEntity implements Serializable {
|
|||
private BigDecimal newPrice;
|
||||
@Dict(dicCode = "crk_status")
|
||||
private String crkStatus;
|
||||
private String colomnDesc;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,4 +85,8 @@ public interface IInvoicingApi {
|
|||
Map<String, Object> getShareInfoByCgdId(CgdMainEntity cgdMainEntityDto);
|
||||
|
||||
IPage<MaterialInfoEntity> queryCgdWaringList(Integer pageNo, Integer pageSize, MaterialInfoEntity materialInfoEntityDto, HttpServletRequest req);
|
||||
|
||||
IPage<WarehouseMaterialCrkInfoEntity> queryCrkInfoList(Integer pageNo, Integer pageSize, WarehouseMaterialCrkInfoEntity crkInfoEntity, HttpServletRequest req);
|
||||
|
||||
Map<String, Object> queryCrkInfoNumList(Integer pageNo, Integer pageSize, WarehouseMaterialCrkInfoEntity crkInfoEntity, HttpServletRequest req);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1329,4 +1329,51 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
return entityPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<WarehouseMaterialCrkInfoEntity> queryCrkInfoList(Integer pageNo, Integer pageSize, WarehouseMaterialCrkInfoEntity crkInfoEntity, HttpServletRequest req) {
|
||||
NuWarehouseMaterialCrkInfo nuWarehouseMaterialCrkInfo = new NuWarehouseMaterialCrkInfo();
|
||||
String colomnDesc = crkInfoEntity.getColomnDesc();//排序规则
|
||||
BeanUtils.copyProperties(crkInfoEntity,nuWarehouseMaterialCrkInfo);
|
||||
QueryWrapper<NuWarehouseMaterialCrkInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("wl_id",nuWarehouseMaterialCrkInfo.getWlId());
|
||||
queryWrapper.eq("nu_id",nuWarehouseMaterialCrkInfo.getNuId());
|
||||
queryWrapper.in("crk_status",1,3);
|
||||
if(StringUtils.equals("asc",colomnDesc)){
|
||||
queryWrapper.orderByAsc("create_time");
|
||||
}else{
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
}
|
||||
Page<NuWarehouseMaterialCrkInfo> page = new Page<>(pageNo, pageSize);
|
||||
List<NuWarehouseMaterialCrkInfo> list = crkInfoMapper.selectList(page,queryWrapper);
|
||||
IPage<WarehouseMaterialCrkInfoEntity> entityPage = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());
|
||||
entityPage.setRecords(BeanUtil.copyToList(list, WarehouseMaterialCrkInfoEntity.class));
|
||||
return entityPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryCrkInfoNumList(Integer pageNo, Integer pageSize, WarehouseMaterialCrkInfoEntity crkInfoEntity, HttpServletRequest req) {
|
||||
NuWarehouseMaterialCrkInfo nuWarehouseMaterialCrkInfo = new NuWarehouseMaterialCrkInfo();
|
||||
String colomnDesc = crkInfoEntity.getColomnDesc();//排序规则
|
||||
BeanUtils.copyProperties(crkInfoEntity,nuWarehouseMaterialCrkInfo);
|
||||
QueryWrapper<NuWarehouseMaterialCrkInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("wl_id",nuWarehouseMaterialCrkInfo.getWlId());
|
||||
queryWrapper.eq("nu_id",nuWarehouseMaterialCrkInfo.getNuId());
|
||||
queryWrapper.in("crk_status",1,3);
|
||||
Page<NuWarehouseMaterialCrkInfo> page = new Page<>(pageNo, pageSize);
|
||||
List<NuWarehouseMaterialCrkInfo> list = crkInfoMapper.selectList(page,queryWrapper);
|
||||
IPage<WarehouseMaterialCrkInfoEntity> entityPage = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());
|
||||
entityPage.setRecords(BeanUtil.copyToList(list, WarehouseMaterialCrkInfoEntity.class));
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
//计算有多少比入库记录
|
||||
List<NuWarehouseMaterialCrkInfo> list1 = crkInfoMapper.selectList(new QueryWrapper<NuWarehouseMaterialCrkInfo>().eq("wl_id",nuWarehouseMaterialCrkInfo.getWlId()).eq("crk_status",1).eq("nu_id",nuWarehouseMaterialCrkInfo.getNuId()));
|
||||
int rksl = list1.size();
|
||||
int crkzl = Integer.parseInt(page.getTotal()+"");
|
||||
int cksl = crkzl - rksl;
|
||||
map.put("cksl",cksl);
|
||||
map.put("rksl",rksl);
|
||||
map.put("crkzl",crkzl);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue