|
@@ -24,6 +24,7 @@ import javax.annotation.Resource;
|
|
|
|
|
|
import java.math.BigInteger;
|
|
|
import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 服务实现类 Created by Bridge.
|
|
@@ -64,7 +65,10 @@ public class AppDeviceServiceImp extends JpaServiceImp<AppDevice, String> implem
|
|
|
List<Map<String, Object>> data = (List<Map<String, Object>>) page.getData();
|
|
|
BigInteger operateID = (BigInteger)data.get(0).get("max_opid");
|
|
|
operateID = operateID.add(BigInteger.valueOf(1));
|
|
|
- for (Map<String, Object> p : list) {
|
|
|
+ List<Map<String, Object>> mapList = list.stream()
|
|
|
+ .filter(o -> null!=o.get("sn") && !"".equals(o.get("sn") .toString()))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ for (Map<String, Object> p : mapList) {
|
|
|
AppDevice device = new AppDevice(p);
|
|
|
if (null == device.getDeliverTime()) throw new ApiRuntimeException("发货时间读取错误");
|
|
|
// 数据效验
|