wfg 1 year ago
parent
commit
e2cbf7ad10

+ 14 - 10
blade-service/blade-los/src/main/java/org/springblade/los/edi/service/impl/EdiTypesServiceImpl.java

@@ -293,7 +293,7 @@ public class EdiTypesServiceImpl extends ServiceImpl<EdiTypesMapper, EdiTypes> i
 
 
 				BCorps bCorps = bCorpsService.getById(bVessels.getCarrierId());
 				BCorps bCorps = bCorpsService.getById(bVessels.getCarrierId());
 				if (bCorps != null) {
 				if (bCorps != null) {
-					inttraSoDto.setVesselCarrierCode(bCorps.getInttraCode());
+					inttraSoDto.setVesselCarrierCode(bCorps.getScacCode());
 				}
 				}
 			}
 			}
 		}
 		}
@@ -472,15 +472,17 @@ public class EdiTypesServiceImpl extends ServiceImpl<EdiTypesMapper, EdiTypes> i
 		List<PreContainers> preContainersList = preContainersService.list(new LambdaQueryWrapper<PreContainers>()
 		List<PreContainers> preContainersList = preContainersService.list(new LambdaQueryWrapper<PreContainers>()
 			.eq(PreContainers::getPid, details.getId())
 			.eq(PreContainers::getPid, details.getId())
 			.eq(PreContainers::getIsDeleted, 0));
 			.eq(PreContainers::getIsDeleted, 0));
-		String boxType = preContainersList.stream().map(PreContainers::getCntrTypeCode).collect(Collectors.joining(","));
+		// String boxType = preContainersList.stream().map(PreContainers::getCntrTypeCode).collect(Collectors.joining(","));
+		String boxType = preContainersList.stream().map(PreContainers::getCntrTypeCodeId).collect(Collectors.joining(","));
 		List<BCntrTypes> bPreCntrTypesList = bCntrTypesService.list(new LambdaQueryWrapper<BCntrTypes>()
 		List<BCntrTypes> bPreCntrTypesList = bCntrTypesService.list(new LambdaQueryWrapper<BCntrTypes>()
-			.apply("find_in_set(cntr_type,'" + boxType + "')")
+			// .apply("find_in_set(cntr_type,'" + boxType + "')")
+			.apply("find_in_set(id,'" + boxType + "')")
 			.eq(BCntrTypes::getIsDeleted, 0));
 			.eq(BCntrTypes::getIsDeleted, 0));
 		List<Map<String, Object>> preCntrs = new ArrayList<>();
 		List<Map<String, Object>> preCntrs = new ArrayList<>();
 		int totalPreCntrQty = 0;
 		int totalPreCntrQty = 0;
 		for (PreContainers item : preContainersList) {
 		for (PreContainers item : preContainersList) {
 			totalPreCntrQty+=item.getQuantity();
 			totalPreCntrQty+=item.getQuantity();
-			BCntrTypes bCntrTypes = bPreCntrTypesList.stream().filter(e -> e.getCntrType().equals(item.getCntrTypeCode())).findFirst().orElse(null);
+			BCntrTypes bCntrTypes = bPreCntrTypesList.stream().filter(e -> e.getId().toString().equals(item.getCntrTypeCodeId())).findFirst().orElse(null);
 			if (bCntrTypes != null) {
 			if (bCntrTypes != null) {
 				String ediCode = RegularUtils.getEdiCode(ediCodeName, bCntrTypes.getExtendedData());
 				String ediCode = RegularUtils.getEdiCode(ediCodeName, bCntrTypes.getExtendedData());
 				Map<String, Object> map = new HashMap<>();
 				Map<String, Object> map = new HashMap<>();
@@ -524,13 +526,15 @@ public class EdiTypesServiceImpl extends ServiceImpl<EdiTypesMapper, EdiTypes> i
 			.eq(Containers::getIsDeleted, 0)
 			.eq(Containers::getIsDeleted, 0)
 			.eq(Containers::getPid, details.getId()));
 			.eq(Containers::getPid, details.getId()));
 
 
-		boxType = containersList.stream().map(Containers::getCntrTypeCode).collect(Collectors.joining(","));
+		// boxType = containersList.stream().map(Containers::getCntrTypeCode).collect(Collectors.joining(","));
+		boxType = containersList.stream().map(Containers::getCntrTypeCodeId).collect(Collectors.joining(","));
 		List<BCntrTypes> bCntrTypesList = bCntrTypesService.list(new LambdaQueryWrapper<BCntrTypes>()
 		List<BCntrTypes> bCntrTypesList = bCntrTypesService.list(new LambdaQueryWrapper<BCntrTypes>()
-			.apply("find_in_set(cntr_type,'" + boxType + "')")
+			// .apply("find_in_set(cntr_type,'" + boxType + "')")
+			.apply("find_in_set(id,'" + boxType + "')")
 			.eq(BCntrTypes::getIsDeleted, 0));
 			.eq(BCntrTypes::getIsDeleted, 0));
 		List<Map<String, Object>> cntrs = new ArrayList<>();
 		List<Map<String, Object>> cntrs = new ArrayList<>();
 		for (Containers item : containersList) {
 		for (Containers item : containersList) {
-			BCntrTypes bCntrTypes = bCntrTypesList.stream().filter(e -> e.getCntrType().equals(item.getCntrTypeCode())).findFirst().orElse(null);
+			BCntrTypes bCntrTypes = bCntrTypesList.stream().filter(e -> e.getId().toString().equals(item.getCntrTypeCodeId())).findFirst().orElse(null);
 			if (bCntrTypes != null) {
 			if (bCntrTypes != null) {
 				// 赫伯罗特需要装箱货物
 				// 赫伯罗特需要装箱货物
 				// if("HLCU".equals(carrierCode)) {
 				// if("HLCU".equals(carrierCode)) {
@@ -558,7 +562,7 @@ public class EdiTypesServiceImpl extends ServiceImpl<EdiTypesMapper, EdiTypes> i
 				map.put("sealNo", item.getSealNo());
 				map.put("sealNo", item.getSealNo());
 				map.put("sealUnit", "");
 				map.put("sealUnit", "");
 				map.put("isSoc", item.getIsSoc());
 				map.put("isSoc", item.getIsSoc());
-				PreContainers preContainers = preContainersList.stream().filter(e -> e.getCntrTypeCode().equals(item.getCntrTypeCode())).findFirst().orElse(null);
+				PreContainers preContainers = preContainersList.stream().filter(e -> e.getId().toString().equals(item.getCntrTypeCodeId())).findFirst().orElse(null);
 				if (preContainers != null) {
 				if (preContainers != null) {
 					map.put("rawTemperature", preContainers.getTemperature());
 					map.put("rawTemperature", preContainers.getTemperature());
 					map.put("temperature", RegularUtils.formatTempNumber(preContainers.getTemperature(), "T", "温度", 3));
 					map.put("temperature", RegularUtils.formatTempNumber(preContainers.getTemperature(), "T", "温度", 3));
@@ -655,11 +659,11 @@ public class EdiTypesServiceImpl extends ServiceImpl<EdiTypesMapper, EdiTypes> i
 			if (ObjectUtils.isNotNull(details.getCarrierId())) {
 			if (ObjectUtils.isNotNull(details.getCarrierId())) {
 				BCorps bCorps = bCorpsService.getById(details.getCarrierId());
 				BCorps bCorps = bCorpsService.getById(details.getCarrierId());
 				if (bCorps != null) {
 				if (bCorps != null) {
-					inttraSoDto.setCarrierCode(bCorps.getInttraCode());
+					inttraSoDto.setCarrierCode(bCorps.getScacCode());
 					inttraSoDto.setContactInformation(bCorps.getInttraIcua());
 					inttraSoDto.setContactInformation(bCorps.getInttraIcua());
 					inttraSoDto.setInttraUCAContacts(bCorps.getInttraIcuaAttn());
 					inttraSoDto.setInttraUCAContacts(bCorps.getInttraIcuaAttn());
 					inttraSoDto.setInttraUCAEmail(bCorps.getInttraIcuaEmail());
 					inttraSoDto.setInttraUCAEmail(bCorps.getInttraIcuaEmail());
-					carrierCode = bCorps.getInttraCode();
+					carrierCode = bCorps.getScacCode();
 				}
 				}
 			}
 			}