|
@@ -1793,7 +1793,23 @@ public class FabricLossServiceImpl extends ServiceImpl<FabricLossMapper, FabricL
|
|
|
Collections.sort(allInList, new Comparator<FabricPoOrderIn>() {
|
|
|
@Override
|
|
|
public int compare(FabricPoOrderIn o1, FabricPoOrderIn o2) {
|
|
|
- return (int)((o1.getIPrice() == null ?0 : o1.getIPrice())-(o2.getIPrice() == null ?0 : o2.getIPrice()));
|
|
|
+ if (o1.getIPrice() == null && o2.getIPrice() == null) {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ if (o1.getIPrice() == null){
|
|
|
+ if (o2.getIPrice()<0){
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ if (o2.getIPrice() == null){
|
|
|
+ if (o2.getIPrice()<0){
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ return (int)(o1.getIPrice()-o2.getIPrice());
|
|
|
}
|
|
|
});
|
|
|
// 转入数量有负数的,从正数扣除
|