|
@@ -23,6 +23,8 @@ import org.springframework.validation.annotation.Validated; |
|
@@ -23,6 +23,8 @@ import org.springframework.validation.annotation.Validated; |
|
23
|
import org.springframework.web.bind.annotation.*;
|
23
|
import org.springframework.web.bind.annotation.*;
|
|
24
|
|
24
|
|
|
25
|
import javax.validation.Valid;
|
25
|
import javax.validation.Valid;
|
|
|
|
26
|
+import java.time.LocalDateTime;
|
|
|
|
27
|
+import java.time.format.DateTimeFormatter;
|
|
26
|
import java.util.List;
|
28
|
import java.util.List;
|
|
27
|
import java.util.stream.Collectors;
|
29
|
import java.util.stream.Collectors;
|
|
28
|
|
30
|
|
|
@@ -33,7 +35,7 @@ import java.util.stream.Collectors; |
|
@@ -33,7 +35,7 @@ import java.util.stream.Collectors; |
|
33
|
@Api(tags = "客户资信历史记录表")
|
35
|
@Api(tags = "客户资信历史记录表")
|
|
34
|
@Validated
|
36
|
@Validated
|
|
35
|
@RestController
|
37
|
@RestController
|
|
36
|
-@RequestMapping("/customerCreditHistory/customercredithistory")
|
38
|
+@RequestMapping("/customerCreditHistory")
|
|
37
|
public class CustomerCreditHistoryController extends DefaultBaseController {
|
39
|
public class CustomerCreditHistoryController extends DefaultBaseController {
|
|
38
|
|
40
|
|
|
39
|
@Autowired
|
41
|
@Autowired
|
|
@@ -60,6 +62,35 @@ public class CustomerCreditHistoryController extends DefaultBaseController { |
|
@@ -60,6 +62,35 @@ public class CustomerCreditHistoryController extends DefaultBaseController { |
|
60
|
}
|
62
|
}
|
|
61
|
|
63
|
|
|
62
|
/**
|
64
|
/**
|
|
|
|
65
|
+ * 查询列表
|
|
|
|
66
|
+ */
|
|
|
|
67
|
+ @ApiOperation("查询列表")
|
|
|
|
68
|
+ @HasPermission({"customerCreditHistory:customercredithistory:query"})
|
|
|
|
69
|
+ @GetMapping("/customerCreditHistoryList")
|
|
|
|
70
|
+ public InvokeResult<List<GetCustomerCreditHistoryBo>> customerCreditHistoryList(@Valid QueryCustomerCreditHistoryVo vo) {
|
|
|
|
71
|
+
|
|
|
|
72
|
+ List<CustomerCreditHistory> query = customerCreditHistoryService.query(vo);
|
|
|
|
73
|
+
|
|
|
|
74
|
+ List<GetCustomerCreditHistoryBo> results = null;
|
|
|
|
75
|
+
|
|
|
|
76
|
+ if (!CollectionUtil.isEmpty(query)) {
|
|
|
|
77
|
+ results = query.stream().map(GetCustomerCreditHistoryBo::new).collect(Collectors.toList());
|
|
|
|
78
|
+ }
|
|
|
|
79
|
+ if (!CollectionUtil.isEmpty(results)) {
|
|
|
|
80
|
+ for (GetCustomerCreditHistoryBo bo : results) {
|
|
|
|
81
|
+ String sort = bo.getSort();
|
|
|
|
82
|
+ LocalDateTime createTime = bo.getCreateTime();
|
|
|
|
83
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
84
|
+ String newDate = createTime.format(formatter);
|
|
|
|
85
|
+ String title = "第" + sort + "次变更,变更时间:" + newDate;
|
|
|
|
86
|
+ bo.setTitle(title);
|
|
|
|
87
|
+ }
|
|
|
|
88
|
+ }
|
|
|
|
89
|
+
|
|
|
|
90
|
+ return InvokeResultBuilder.success(results);
|
|
|
|
91
|
+ }
|
|
|
|
92
|
+
|
|
|
|
93
|
+ /**
|
|
63
|
* 根据ID查询
|
94
|
* 根据ID查询
|
|
64
|
*/
|
95
|
*/
|
|
65
|
@ApiOperation("根据ID查询")
|
96
|
@ApiOperation("根据ID查询")
|