Browse Source

永发1.导入空箱出场增加判断箱型是否一直

纪新园 8 months ago
parent
commit
347c6daab4

+ 6 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/PutBoxServiceImpl.java

@@ -720,6 +720,9 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 						archives.setContainerNumberOw(item.getContainerNumber());
 						archives.setContainerNumberTypeOw("OW(放)");
 					}
+					if (!archives.getBoxType().equals(item.getBoxType())) {
+						throw new RemoteException("箱号:" + item.getBoxCode() + "与箱档案中箱型不符");
+					}
 					archives.setUpdateTime(new Date());
 					archives.setUpdateUser(AuthUtil.getUserId());
 					archives.setUpdateUserName(AuthUtil.getUserName());
@@ -1186,6 +1189,9 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 			if (archives == null) {
 				throw new RemoteException("箱号:" + item.getBoxCode() + "未查到数据");
 			}
+			if (!archives.getBoxType().equals(item.getBoxType())) {
+				throw new RemoteException("箱号:" + item.getBoxCode() + "与箱档案中箱型不符");
+			}
 			if (ObjectUtils.isNotNull(archives.getContainerNumberTypeOw()) && "OW(放)".equals(archives.getContainerNumberTypeOw())) {
 				//判断目的港是否存在对应放箱号单据处理
 				List<PutBox> putBoxes = this.create(putBoxList, archives, ports, corps, putBoxNewList, businessType.getId(), "1");