| | |
| | | } |
| | | //查询出库数据 |
| | | param.setType(Constant.TYPE_OUT); |
| | | param.setProgress(Constant.PROGRESS_RECORD); |
| | | param.setRecordStatus(Constant.RECORD_STATUS_NORMAL); |
| | | //多参数分页查询 |
| | | com.baomidou.mybatisplus.extension.plugins.pagination.Page<InoutRecord> corePage = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(0, 10000); |
| | | //收储公司查询处理 |
| | | if(StringUtils.isNotEmpty(param.getDeptId()) && StringUtils.isNotEmpty(param.getCompanyId())){ |
| | | String substring = param.getDeptId().substring(0, (param.getDeptId().length() - 3)); |
| | | if (!substring.equals(param.getCompanyId())){ |
| | | return new ArrayList<InoutRecord>(); |
| | | } |
| | | } |
| | | if(StringUtils.isEmpty(param.getDeptId())){ |
| | | param.setDeptId(param.getCompanyId()); |
| | | } |
| | | |
| | | param.setCompanyId(null); |
| | | inoutReportService.listPageInout(corePage, param); |
| | | //获取查询到得list数据 |
| | | List<InoutRecord> result = corePage.getRecords(); |
| | |
| | | int index = 1; |
| | | List<InoutRecord> list = new ArrayList<>(); |
| | | for (InoutRecord record : result) { |
| | | if(StringUtils.isNotBlank(record.getDeptId())){ |
| | | record.setCompanyId(record.getDeptId().substring(0,(record.getDeptId().length()-3))); |
| | | } |
| | | list.add(record); |
| | | record.setRemarks(String.valueOf(index)); |
| | | emptyWeightSum += record.getEmptyWeight(); |