java110
2022-09-13 5944e78b1eb21b233a582e80a165bf74ce7746f0
service-community/src/main/java/com/java110/community/cmd/notice/SaveNoticeCmd.java
@@ -100,6 +100,12 @@
        Assert.hasKeyAndValue(reqJson, "startTime", "必选,请填写开始时间 ");
        Assert.hasKeyAndValue(reqJson, "endTime", "必选,请填写结束时间 ");
        String userId = cmdDataFlowContext.getReqHeaders().get("user-id");
        String storeId = cmdDataFlowContext.getReqHeaders().get("store-id");
        reqJson.put("userId",userId);
        reqJson.put("storeId",storeId);
    }
    @Override
@@ -115,23 +121,6 @@
        reqJson.put("storeId", storeId);
        //查询当前员工 的小区
        //1.0 先查询 员工对应的部门
        OrgStaffRelDto orgStaffRelDto = new OrgStaffRelDto();
        orgStaffRelDto.setStoreId(reqJson.getString("storeId"));
        orgStaffRelDto.setStaffId(reqJson.getString("userId"));
        List<OrgStaffRelDto> orgStaffRelDtos = orgStaffRelInnerServiceSMOImpl.queryOrgStaffRels(orgStaffRelDto);
        Assert.listOnlyOne(orgStaffRelDtos, "未查询到相应员工对应的部门信息或查询到多条");
        //2.0 再根据 部门对应的 小区ID查询小区信息
        OrgDto orgDto = new OrgDto();
        orgDto.setOrgId(orgStaffRelDtos.get(0).getParentOrgId());
        orgDto.setStoreId(reqJson.getString("storeId"));
        orgDto.setOrgLevel("2");
        List<OrgDto> orgDtos = orgInnerServiceSMOImpl.queryOrgs(orgDto);
        Assert.listOnlyOne(orgDtos, "根据组织ID未查询到员工对应部门信息或查询到多条数据");
        List<ApiCommunityDataVo> communitys = getStoreCommunity(reqJson);
        for (ApiCommunityDataVo apiCommunityDataVo : communitys) {
@@ -179,7 +168,7 @@
            }
        } else {
            RoleCommunityDto orgCommunityDto = BeanConvertUtil.covertBean(reqJson, RoleCommunityDto.class);
            orgCommunityDto.setStaffId(userDtos.get(0).getStaffId());
            orgCommunityDto.setStaffId(userDtos.get(0).getUserId());
            count = roleCommunityV1InnerServiceSMOImpl.queryRoleCommunitysCount(orgCommunityDto);
            if (count > 0) {
                List<RoleCommunityDto> roleCommunityDtos = roleCommunityV1InnerServiceSMOImpl.queryRoleCommunitys(orgCommunityDto);