Sfoglia il codice sorgente

场站api接口同步功能自动bug修改

纪新园 3 giorni fa
parent
commit
6f2bfba7e8

+ 3 - 3
blade-service/blade-los/src/main/java/org/springblade/los/basic/corps/controller/BCorpsController.java

@@ -335,10 +335,10 @@ public class BCorpsController extends BladeController {
 			.like(ObjectUtils.isNotNull(bCorps.getTel()), BCorps::getTel, bCorps.getTel())
 			.like(ObjectUtils.isNotNull(bCorps.getAdminProfiles()), BCorps::getAdminProfiles, bCorps.getAdminProfiles())
 			.apply(ObjectUtils.isNotNull(bCorps.getCorpType()), "find_in_set('" + bCorps.getCorpType() + "',corp_type)");
-		if (AuthUtil.getUserRole().contains("admin") || AuthUtil.getUserRole().contains("secondaryAdmin")) {
-			//管理员、次级管理员查看全部数据
+		if (!AuthUtil.getUserRole().contains("总部") && !AuthUtil.getUserRole().contains("admin")) {
+			lambdaQueryWrapper.apply("(find_in_set('" + AuthUtil.getDeptId() + "',branch_id) or branch_id is null)");
 		} else {
-			lambdaQueryWrapper.apply("find_in_set('" + AuthUtil.getDeptId() + "',branch_id)");
+			lambdaQueryWrapper.eq(ObjectUtils.isNotNull(bCorps.getBranchId()), BCorps::getBranchId, bCorps.getBranchId());
 		}
 		lambdaQueryWrapper.orderByDesc(BCorps::getCreateTime);
 		List<BCorps> bCorpsList = bCorpsService.list(lambdaQueryWrapper);

+ 2 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/ContainersServiceImpl.java

@@ -521,6 +521,8 @@ public class ContainersServiceImpl extends ServiceImpl<ContainersMapper, Contain
 			bills.setUpdateUserName(AuthUtil.getUserName());
 			bills.setUpdateUser(AuthUtil.getUserId());
 			bills.setUpdateTime(new Date());
+			bills.setExtendedData(list.stream().map(Containers::getCntrNo).filter(Objects::nonNull)
+				.collect(Collectors.joining(",")));
 			billsMapper.updateById(bills);
 		}
 		for (Containers containers : list) {