|
|
|
@ -28,6 +28,7 @@ import com.logpm.factory.listener.ExcelListener;
|
|
|
|
|
import com.logpm.factory.listener.OrderStatusLogListener; |
|
|
|
|
import com.logpm.factory.mt.dto.MtFactoryDataDTO; |
|
|
|
|
import com.logpm.factory.mt.feign.IMtOrderMainClinet; |
|
|
|
|
import com.logpm.factory.mt.service.IMtFactoryOrderMainService; |
|
|
|
|
import com.logpm.factory.oupai.entity.FactoryOrderEntity; |
|
|
|
|
import com.logpm.factory.oupai.entity.FactoryPackageEntity; |
|
|
|
|
import com.logpm.factory.oupai.entity.OpOrderStatusLogEntity; |
|
|
|
@ -39,6 +40,7 @@ import com.logpm.factory.oupai.vo.OuPaiDataPushVO;
|
|
|
|
|
import com.logpm.factory.pan.service.IPanFactoryDataService; |
|
|
|
|
import com.logpm.factory.props.ZbFactoryProperties; |
|
|
|
|
import com.logpm.factory.snm.bean.Resp; |
|
|
|
|
import com.logpm.factory.snm.vo.MTOrderPackageRelationVO; |
|
|
|
|
import com.logpm.factory.zb.dto.ZBReceiptDTO; |
|
|
|
|
import com.logpm.factory.zb.entity.ZbFactoryLogEntity; |
|
|
|
|
import com.logpm.factory.zb.mapper.ZbCategoryContrastMapper; |
|
|
|
@ -80,6 +82,7 @@ import java.security.NoSuchAlgorithmException;
|
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.regex.Matcher; |
|
|
|
|
import java.util.regex.Pattern; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
import static com.logpm.factory.zb.untils.QmSignUntil.areNotEmpty; |
|
|
|
|
|
|
|
|
@ -118,6 +121,9 @@ public class TestService {
|
|
|
|
|
@Autowired |
|
|
|
|
private ZbCategoryContrastMapper zbCategoryContrastMapper; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private IMtFactoryOrderMainService mtFactoryOrderMainService; |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void test2() { |
|
|
|
|
// ouPaiFactoryService.findOuPaiFactoryOrderDTOByCarCarNumber("LCD230505047");
|
|
|
|
@ -1125,6 +1131,60 @@ public class TestService {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void test28() throws IOException { |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
2.通过车次查询来系统中车次绑定的运单 |
|
|
|
|
3.通过运单查询货物上的包件 |
|
|
|
|
4.需要过滤出来 只要梦天的 |
|
|
|
|
*/ |
|
|
|
|
List<String> carNumList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
File file = new File("D:\\temp\\hwy\\111\\111.txt"); |
|
|
|
|
BufferedReader bufferedReader = new BufferedReader(new FileReader(file)); |
|
|
|
|
|
|
|
|
|
while (bufferedReader.ready()) { |
|
|
|
|
String line = bufferedReader.readLine(); |
|
|
|
|
carNumList.add(line); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
List<MTOrderPackageRelationVO> allMtData = mtFactoryOrderMainService.mtOrderPackageRelation(); |
|
|
|
|
// 对这个集合内进行分组
|
|
|
|
|
Map<String, List<MTOrderPackageRelationVO>> stringListMap = allMtData.stream().collect(Collectors.groupingBy(MTOrderPackageRelationVO::getInvoiceOrderCode)); |
|
|
|
|
Set<String> set = stringListMap.keySet(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set<String> r = new HashSet<>(); |
|
|
|
|
for (String s : set) { |
|
|
|
|
String carNum = null; |
|
|
|
|
// 得到某个工厂运输批次的集合
|
|
|
|
|
List<MTOrderPackageRelationVO> t = stringListMap.get(s); |
|
|
|
|
//得到这个批次下面所有的包件
|
|
|
|
|
List<String> strs = t.stream().map(MTOrderPackageRelationVO::getPackageCode).collect(Collectors.toList()); |
|
|
|
|
// 当前批次的包件 在 这个配载计划中存在一个 则进行通知
|
|
|
|
|
for (String mtStr : carNumList) { |
|
|
|
|
if (strs.contains(mtStr)) { |
|
|
|
|
carNum = s; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (StringUtil.isNoneBlank(carNum)) { |
|
|
|
|
r.add(carNum); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
System.out.println(r); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|