clean code
This commit is contained in:
parent
3419f107df
commit
932ca07115
@ -30,7 +30,6 @@ public class PacRemote extends AbstractRemote {
|
|||||||
resultMap.put("cancelled", TextUtil.format(cancelled));
|
resultMap.put("cancelled", TextUtil.format(cancelled));
|
||||||
}
|
}
|
||||||
resultMap.put("basepac", pac.getBasepac().getName());
|
resultMap.put("basepac", pac.getBasepac().getName());
|
||||||
|
|
||||||
Map<String, Object> components = new HashMap<String, Object>();
|
Map<String, Object> components = new HashMap<String, Object>();
|
||||||
Set<PacComponent> pacComponents = pac.getPacComponents();
|
Set<PacComponent> pacComponents = pac.getPacComponents();
|
||||||
for (PacComponent comp : pacComponents) {
|
for (PacComponent comp : pacComponents) {
|
||||||
@ -40,28 +39,6 @@ public class PacRemote extends AbstractRemote {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
resultMap.put("components", components);
|
resultMap.put("components", components);
|
||||||
|
|
||||||
// SortedSet<PacComponent> sortedComponents = new TreeSet<PacComponent>(new Comparator<PacComponent>() {
|
|
||||||
// @Override
|
|
||||||
// public int compare(PacComponent o1, PacComponent o2) {
|
|
||||||
// return o2.getBaseComponent().getSorting() - o1.getBaseComponent().getSorting();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// sortedComponents.addAll(pac.getPacComponents());
|
|
||||||
// StringBuffer bf = new StringBuffer();
|
|
||||||
// boolean empty = true;
|
|
||||||
// for (PacComponent comp : sortedComponents) {
|
|
||||||
// if (comp.getQuantity() > 0) {
|
|
||||||
// if (!empty) {
|
|
||||||
// bf.append("; ");
|
|
||||||
// }
|
|
||||||
// bf.append(comp.getBaseComponent().getFeature());
|
|
||||||
// bf.append("=");
|
|
||||||
// bf.append(comp.getQuantity());
|
|
||||||
// empty = false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// resultMap.put("components", bf.toString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -79,7 +56,6 @@ public class PacRemote extends AbstractRemote {
|
|||||||
basePac.setName(basePacName);
|
basePac.setName(basePacName);
|
||||||
pac.setBasepac(basePac);
|
pac.setBasepac(basePac);
|
||||||
}
|
}
|
||||||
// pac.setCreated(new Date());
|
|
||||||
String createdStr = (String) setParams.get("created");
|
String createdStr = (String) setParams.get("created");
|
||||||
if (createdStr != null && !createdStr.isEmpty()) {
|
if (createdStr != null && !createdStr.isEmpty()) {
|
||||||
Date createdDate = TextUtil.parse(createdStr);
|
Date createdDate = TextUtil.parse(createdStr);
|
||||||
|
Loading…
Reference in New Issue
Block a user