|
|
|
@ -22,7 +22,6 @@ import com.logpm.factorydata.vo.PushData;
|
|
|
|
|
import com.logpm.factorydata.vo.SendMsg; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.bouncycastle.util.Pack; |
|
|
|
|
import org.springblade.common.constant.WorkNodeEnums; |
|
|
|
|
import org.springblade.common.constant.factorydata.FactoryDataConstants; |
|
|
|
|
import org.springframework.amqp.core.ExchangeTypes; |
|
|
|
@ -142,6 +141,8 @@ public class NodeDataPushListener {
|
|
|
|
|
List<String> collect = value.stream().map(PushData::getPackageCode).collect(Collectors.toList()); |
|
|
|
|
// 5 根据订单号,包件码 查看数据是否齐套,齐套直接推送工厂
|
|
|
|
|
List<PackageInfoEntity> entities = packageInfoMap.get(orderCode); |
|
|
|
|
PackageInfoEntity infoEntity = entities.get(0); |
|
|
|
|
String billCode = infoEntity.getBillCode(); |
|
|
|
|
// 过滤掉entities 中的 workedNodeCode < code 的数据
|
|
|
|
|
List<PackageInfoEntity> workerList = entities.stream() |
|
|
|
|
.filter(packageInfoEntity -> !collect.contains(packageInfoEntity.getBarcode())) |
|
|
|
@ -174,7 +175,7 @@ public class NodeDataPushListener {
|
|
|
|
|
} |
|
|
|
|
// 推送工厂
|
|
|
|
|
JSONObject sendObj = new JSONObject(); |
|
|
|
|
sendObj.set("billCode", orderCode); |
|
|
|
|
sendObj.set("billCode", billCode); |
|
|
|
|
sendObj.set("status", factoryByNodeAndStatus.getText()); |
|
|
|
|
sendObj.set("packages", entities.stream().map(packageInfoEntity -> { |
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|