| | |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.UnitDto; |
| | | import com.java110.dto.dataPrivilegeStaff.DataPrivilegeStaffDto; |
| | | import com.java110.intf.community.IDataPrivilegeUnitV1InnerServiceSMO; |
| | | import com.java110.intf.community.IFloorInnerServiceSMO; |
| | | import com.java110.intf.community.IUnitInnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | |
| | | @Autowired |
| | | private IFloorInnerServiceSMO floorInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IDataPrivilegeUnitV1InnerServiceSMO dataPrivilegeUnitV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.jsonObjectHaveKey(reqJson, "communityId", "请求中未包含communityId信息"); |
| | |
| | | UnitDto unitDto = BeanConvertUtil.covertBean(reqJson, UnitDto.class); |
| | | unitDto.setUserId(""); |
| | | |
| | | String staffId = cmdDataFlowContext.getReqHeaders().get("user-id"); |
| | | DataPrivilegeStaffDto dataPrivilegeStaffDto = new DataPrivilegeStaffDto(); |
| | | dataPrivilegeStaffDto.setStaffId(staffId); |
| | | String[] unitIds = dataPrivilegeUnitV1InnerServiceSMOImpl.queryDataPrivilegeUnitsByStaff(dataPrivilegeStaffDto); |
| | | |
| | | if(unitIds != null && unitIds.length>0){ |
| | | unitDto.setUnitIds(unitIds); |
| | | } |
| | | |
| | | List<UnitDto> unitDtoList = unitInnerServiceSMOImpl.queryUnits(unitDto); |
| | | |
| | | List<ApiUnitVo> apiUnitVos = BeanConvertUtil.covertBeanList(unitDtoList, ApiUnitVo.class); |