|
@@ -52,29 +52,31 @@ public class DyeLossController extends JeecgController<DyeLoss, IDyeLossService>
|
|
@AutoLog(value = "染损报表查询")
|
|
@AutoLog(value = "染损报表查询")
|
|
@ApiOperation(value="染损报表查询", notes="染损报表查询")
|
|
@ApiOperation(value="染损报表查询", notes="染损报表查询")
|
|
@RequestMapping(value = "/list",method = RequestMethod.GET)
|
|
@RequestMapping(value = "/list",method = RequestMethod.GET)
|
|
- public Result<IPage<DyeLoss>> list2(DyeLossDto dyeLossDto, HttpServletRequest req){
|
|
|
|
- if(dyeLossDto.getPageSize()>10){//页面长度不能大于10
|
|
|
|
- dyeLossDto.setPageSize(10);
|
|
|
|
|
|
+ public Result<IPage<DyeLoss>> list2( @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
|
+ DyeLossDto dyeLossDto,
|
|
|
|
+ HttpServletRequest req){
|
|
|
|
+ if(pageSize>10){//页面长度不能大于10
|
|
|
|
+ pageSize=10;
|
|
}
|
|
}
|
|
Result<IPage<DyeLoss>> result = new Result<IPage<DyeLoss>>();
|
|
Result<IPage<DyeLoss>> result = new Result<IPage<DyeLoss>>();
|
|
QueryWrapper<DyeLossDto> queryWrapper = new QueryWrapper<>();//初始化
|
|
QueryWrapper<DyeLossDto> queryWrapper = new QueryWrapper<>();//初始化
|
|
- System.out.println("pageno"+dyeLossDto.getPageNo()+"pagesize"+dyeLossDto.getPageSize());
|
|
|
|
- if(StringUtils.isNotBlank(dyeLossDto.getCode())){ //code;//订单号
|
|
|
|
|
|
+ if(dyeLossDto.getCode()!=null&& !dyeLossDto.getCode().trim().equals("") &&StringUtils.isNotBlank(dyeLossDto.getCode())){ //code;//订单号
|
|
queryWrapper.eq("a.cCode",dyeLossDto.getCode());
|
|
queryWrapper.eq("a.cCode",dyeLossDto.getCode());
|
|
}
|
|
}
|
|
- if(StringUtils.isNotBlank(dyeLossDto.getVenName())){//供应商名称
|
|
|
|
|
|
+ if(dyeLossDto.getVenName()!=null && !dyeLossDto.getVenName().trim().equals("") &&StringUtils.isNotBlank(dyeLossDto.getVenName())){//供应商名称
|
|
queryWrapper.eq("c.cVenName",dyeLossDto.getVenName());
|
|
queryWrapper.eq("c.cVenName",dyeLossDto.getVenName());
|
|
}
|
|
}
|
|
- if(StringUtils.isNotBlank(dyeLossDto.getOrderType())){//订单类型
|
|
|
|
|
|
+ if(dyeLossDto.getOrderType()!=null && !dyeLossDto.getOrderType().trim().equals("") &&StringUtils.isNotBlank(dyeLossDto.getOrderType())){//订单类型
|
|
queryWrapper.eq("a.iOrderType",dyeLossDto.getOrderType());
|
|
queryWrapper.eq("a.iOrderType",dyeLossDto.getOrderType());
|
|
}
|
|
}
|
|
- if(StringUtils.isNotBlank(dyeLossDto.getPlanLotNumber())){//计划单号
|
|
|
|
|
|
+ if(dyeLossDto.getPlanLotNumber()!=null && !dyeLossDto.getPlanLotNumber().trim().equals("") &&StringUtils.isNotBlank(dyeLossDto.getPlanLotNumber())){//计划单号
|
|
queryWrapper.eq("b.cPlanLotNumber",dyeLossDto.getPlanLotNumber());
|
|
queryWrapper.eq("b.cPlanLotNumber",dyeLossDto.getPlanLotNumber());
|
|
}
|
|
}
|
|
- if(StringUtils.isNotBlank(dyeLossDto.getCsocode())){//销售订单号
|
|
|
|
|
|
+ if(dyeLossDto.getCsocode()!=null && !dyeLossDto.getCsocode().trim().equals("") &&StringUtils.isNotBlank(dyeLossDto.getCsocode())){//销售订单号
|
|
queryWrapper.eq("e.csocode",dyeLossDto.getCsocode());
|
|
queryWrapper.eq("e.csocode",dyeLossDto.getCsocode());
|
|
}
|
|
}
|
|
- Page<DyeLoss> page = new Page<DyeLoss>(dyeLossDto.getPageNo(), dyeLossDto.getPageSize());
|
|
|
|
|
|
+ Page<DyeLoss> page = new Page<DyeLoss>(pageNo, pageSize);
|
|
IPage<DyeLoss> pageList = dyeLossService.selectPage(page, queryWrapper);
|
|
IPage<DyeLoss> pageList = dyeLossService.selectPage(page, queryWrapper);
|
|
result.setSuccess(true);
|
|
result.setSuccess(true);
|
|
result.setResult(pageList);
|
|
result.setResult(pageList);
|
|
@@ -82,18 +84,19 @@ public class DyeLossController extends JeecgController<DyeLoss, IDyeLossService>
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
- @AutoLog(value = "染损报表数据合计")
|
|
|
|
|
|
+ /*@AutoLog(value = "染损报表数据合计")
|
|
@ApiOperation(value="染损报表数据合计", notes="染损报表数据合计")
|
|
@ApiOperation(value="染损报表数据合计", notes="染损报表数据合计")
|
|
@RequestMapping(value = "/selectSum",method = RequestMethod.GET)
|
|
@RequestMapping(value = "/selectSum",method = RequestMethod.GET)
|
|
public Result<?> selectSum(){
|
|
public Result<?> selectSum(){
|
|
- return Result.ok(dyeLossService.selectSum());
|
|
|
|
- }
|
|
|
|
|
|
+ Result.ok(dyeLossService.selectSum());
|
|
|
|
+ return Result.ok("查询成功!");
|
|
|
|
+ }*/
|
|
|
|
|
|
@AutoLog(value = "按供应商名称按物料分组展现每个物料的染损")
|
|
@AutoLog(value = "按供应商名称按物料分组展现每个物料的染损")
|
|
@ApiOperation(value="按供应商名称按物料分组展现每个物料的染损", notes="按供应商名称按物料分组展现每个物料的染损")
|
|
@ApiOperation(value="按供应商名称按物料分组展现每个物料的染损", notes="按供应商名称按物料分组展现每个物料的染损")
|
|
@RequestMapping(value = "/vendor",method = RequestMethod.GET)
|
|
@RequestMapping(value = "/vendor",method = RequestMethod.GET)
|
|
public Result<?> vendor(@RequestParam(name="venName") String venName){
|
|
public Result<?> vendor(@RequestParam(name="venName") String venName){
|
|
- return Result.ok(dyeLossService.selectVendor(venName));
|
|
|
|
|
|
+ return Result.ok(dyeLossService.selectVendor(venName));
|
|
}
|
|
}
|
|
|
|
|
|
@AutoLog(value = "按供应商分组展现每个供应商的染损")
|
|
@AutoLog(value = "按供应商分组展现每个供应商的染损")
|