Commit a337353b by kangxiaoshan

DMP 收入导入

parent c24c5ac8
......@@ -20,9 +20,9 @@ public class DmpIncomeController {
@GetMapping("/list/bycode")
public ResultModel listByContract(String contractCode) {
public ResultModel listByContract(String code) {
//按合同查询
return ResultModel.OK(dmpIncomeService.listByCode(contractCode));
return ResultModel.OK(dmpIncomeService.listByCode(code));
}
@GetMapping("/list/byds")
......@@ -52,5 +52,4 @@ public class DmpIncomeController {
}
}
......@@ -91,6 +91,9 @@ public class DmpIncomeServiceImpl implements DmpIncomeService {
@Override
public List<DmpIncome> listByDs(String start, String end) {
List<DmpIncome> dmpIncomes = dmpIncomeRepository.findByContractDs(start, end);
if (dmpIncomes.isEmpty()) {
return dmpIncomes;
}
List<String> codes = dmpIncomes.stream().map(v -> v.getContractCode()).collect(Collectors.toList());
List<Object[]> contracts = contractRepository.findByDmpContractCode(codes);
Map<String, Object[]> names = contracts.stream().collect(Collectors.toMap(v -> v[0] + "", v -> v, (v1, v2) -> v1));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment