| | |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.dict.DictDto; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.dto.fee.FeeDetailDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.dto.report.ReportExcelDto; |
| | | import com.java110.dto.report.ReportQueryRecord; |
| | | import com.java110.dto.room.RoomDto; |
| | |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.dev.IDictV1InnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeDetailInnerServiceSMO; |
| | | import com.java110.intf.fee.IReportFeeInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerInnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | |
| | | @Autowired |
| | | private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerInnerServiceSMO ownerInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeDetailInnerServiceSMO feeDetailInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | Assert.hasKey(reqJson, "communityId", "请求报文中未包含小区编号"); |
| | |
| | | reportQueryRecord.setOperator("白单流水物业表"); |
| | | List<ReportQueryRecord> reportQueryRecords = reportFeeInnerServiceSMOImpl.queryReport(BeanConvertUtil.beanCovertMap(reportQueryRecord)); |
| | | |
| | | if (reqJson.containsKey("roomId")){ |
| | | if (reqJson.containsKey("roomNum")){ |
| | | RoomDto roomDto = new RoomDto(); |
| | | roomDto.setRoomNum(reqJson.getString("roomNum")); |
| | | roomDto.setCommunityId(reqJson.getString("communityId")); |
| | | List<RoomDto> roomDtos = roomInnerServiceSMOImpl.queryRooms(roomDto);//获取房屋 |
| | | |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setCommunityId(reqJson.getString("communityId")); |
| | | ownerDto.setRoomId(reqJson.getString("roomNum")); |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto);//获取业主 |
| | | ReportExcelDto reportExcelDto = new ReportExcelDto(); |
| | | // reportExcelDto.setRoomDto(roomInnerServiceSMOImpl.queryRooms()); |
| | | reportExcelDto.setOwner(ownerDtos.get(0)); |
| | | FeeDetailDto feeDetailDto = new FeeDetailDto(); |
| | | List<Map> rooms = roomInnerServiceSMOImpl.queryRoomsAsReport(roomDto); |
| | | String[][] strings = new String[rooms.size() + 1][]; |
| | | setHeader(strings[0]); |
| | | List<Map> onceOwner = roomInnerServiceSMOImpl.queryRoomsAsReport(roomDto); |
| | | |
| | | ResultVo resultVo = new ResultVo(strings); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | else if(reportQueryRecords.size()>0 && !reqJson.containsKey("reload")){ |
| | |
| | | } |
| | | } |
| | | |
| | | private void setHeader(String[] header) { |
| | | header[0] = "年份"; |
| | | header[1] = "应缴月数"; |
| | | header[2] = "应缴金额"; |
| | | header[3] = "折扣"; |
| | | header[4] = "打折金额"; |
| | | header[5] = "打折区间"; |
| | | header[6] = "打折单归档日期"; |
| | | header[7] = "申请人"; |
| | | header[8] = "审批人"; |
| | | header[9] = "发起日期"; |
| | | header[10] = "折后应缴"; |
| | | header[11] = "已收月数"; |
| | | header[12] = "已缴金额"; |
| | | header[13] = "已收区间"; |
| | | header[14] = "未缴月数"; |
| | | header[15] = "未缴金额"; |
| | | header[16] = "未收区间"; |
| | | |
| | | } |
| | | |
| | | private List<List<ReportExcelDto>> headerDoing(List<FeeConfigDto> feeConfigDtos, int startYear, int endYear, int arrLength) { |
| | | LinkedList<List<ReportExcelDto>> reportExcelDtos = new LinkedList<>(); |
| | | int feeRow = feeConfigDtos.size(); |