Commit 097ea0ac by huangjinxin

fix:代码格式化

1 parent 75e91158
......@@ -69,7 +69,7 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
}
}
if (ListUtils.isNotEmpty(reqDTO.getEngineerCodes())){
if (ListUtils.isNotEmpty(reqDTO.getEngineerCodes())) {
lqw.and(w ->
w.in(OrderInfo::getEngineerCode, reqDTO.getEngineerCodes())
.or()
......@@ -156,42 +156,42 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
private Map<String, String> getEngineerNames(List<OrderInfo> orders) {
// 获取技术员姓名
Set<String> engineerCodes = new HashSet<>();
for(OrderInfo r: orders){
if(StringUtils.isNotEmpty(r.getEngineerCode())){
for (OrderInfo r : orders) {
if (StringUtils.isNotEmpty(r.getEngineerCode())) {
engineerCodes.add(r.getEngineerCode());
}
if(StringUtils.isNotEmpty(r.getEngineerCodeSub())){
if (StringUtils.isNotEmpty(r.getEngineerCodeSub())) {
engineerCodes.add(r.getEngineerCodeSub());
}
}
if(engineerCodes.isEmpty()){
if (engineerCodes.isEmpty()) {
return new HashMap<>();
}
List<EngineerInfoEntity> engineers = engineerInfoDao.findByEngineerCodeIn(new ArrayList<>(engineerCodes));
return engineers.stream().collect(Collectors.toMap(EngineerInfoEntity::getEngineerCode, EngineerInfoEntity::getName));
}
private Map<String, String> getBranchNames(List<OrderInfo> orders){
private Map<String, String> getBranchNames(List<OrderInfo> orders) {
// 获取branch名称
Set<String> branches = new HashSet<>();
for(OrderInfo r: orders){
if(StringUtils.isNotEmpty(r.getOrgBranchId())){
for (OrderInfo r : orders) {
if (StringUtils.isNotEmpty(r.getOrgBranchId())) {
branches.add(r.getOrgBranchId());
}
}
if(branches.isEmpty()){
if (branches.isEmpty()) {
return new HashMap<>();
}
List<OrgBranchEntity> records = orgBranchDao.findByBranchIdIn(new ArrayList<>(branches));
return records.stream().collect(Collectors.toMap(OrgBranchEntity::getBranchId, OrgBranchEntity::getBranchName));
}
private List<String> getOrderEngineerNames(String engineerCode, String engineerCodeSub, Map<String,String> engineerNames){
private List<String> getOrderEngineerNames(String engineerCode, String engineerCodeSub, Map<String, String> engineerNames) {
// 获取订单技术员姓名信息
List<String> names = new ArrayList<>();
for(String code: List.of(engineerCode, engineerCodeSub)){
for (String code : List.of(engineerCode, engineerCodeSub)) {
String name = engineerNames.getOrDefault(code, "");
if(StringUtils.isNotEmpty(name)){
if (StringUtils.isNotEmpty(name)) {
names.add(name);
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!