| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.context.CmdContextUtils; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | |
| | | import com.java110.dto.repair.RepairSettingDto; |
| | | import com.java110.intf.dev.IDictV1InnerServiceSMO; |
| | | import com.java110.intf.report.IReportCommunityInnerServiceSMO; |
| | | import com.java110.intf.user.IStaffCommunityV1InnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.ListUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | |
| | | @Autowired |
| | | private IDictV1InnerServiceSMO dictV1InnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IStaffCommunityV1InnerServiceSMO staffCommunityV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | // must be administrator |
| | |
| | | List<RepairSettingDto> repairSettingDtos = null; |
| | | |
| | | RepairSettingDto repairSettingDto = new RepairSettingDto(); |
| | | String staffId = CmdContextUtils.getUserId(context); |
| | | |
| | | List<String> communityIds = staffCommunityV1InnerServiceSMOImpl.queryStaffCommunityIds(staffId); |
| | | |
| | | if (!ListUtil.isNull(communityIds)) { |
| | | repairSettingDto.setCommunityIds(communityIds.toArray(new String[communityIds.size()])); |
| | | } |
| | | |
| | | repairSettingDtos = reportCommunityInnerServiceSMOImpl.queryCommunityRepairTree(repairSettingDto); |
| | | JSONArray communitys = new JSONArray(); |