| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.information.service.IInformationService; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import org.springblade.modules.record.entity.Record; |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import org.springblade.modules.recordk.service.IRecordkService; |
| | | import org.springblade.modules.recordk.vo.RecordkVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | public class RecordkController extends BladeController { |
| | | |
| | | private final IRecordkService recordkService; |
| | | |
| | | private final IInformationService informationService; |
| | | /** |
| | | * 详情 |
| | | */ |
| | |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入recordk") |
| | | public R<IPage<Recordk>> list(Recordk recordk, Query query) { |
| | | IPage<Recordk> pages = recordkService.page(Condition.getPage(query), Condition.getQueryWrapper(recordk)); |
| | | public R<IPage<Recordk>> list(@ApiIgnore @RequestParam Map<String, Object> recordk, Query query) { |
| | | IPage<Recordk> pages = recordkService.page(Condition.getPage(query), Condition.getQueryWrapper(recordk, Recordk.class)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入recordk") |
| | | public R<IPage<RecordkVO>> page(RecordkVO recordk, Query query) { |
| | | IPage<RecordkVO> pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk); |
| | | IPage<RecordkVO> pages; |
| | | if (recordk.getUsetype().equals("0")) { |
| | | pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk,null); |
| | | } else if (recordk.getUsetype().equals("1")) { |
| | | String childer = informationService.selJurchilder(recordk.getJurisdiction()); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | | for (int j = 0; j < split.length; j++) { |
| | | strArrays += "'" + split[j] + "',"; |
| | | } |
| | | String jurisdiction = strArrays.substring(0, strArrays.length() - 1); |
| | | pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk,jurisdiction); |
| | | } else { |
| | | pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk,null); |
| | | } |
| | | return R.data(pages); |
| | | } |
| | | |