| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import liquibase.pro.packaged.S; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.node.TreeIntegerNode; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.house.entity.HouseholdEntity; |
| | | import org.springblade.modules.house.excel.HouseHoldExcel; |
| | | import org.springblade.modules.house.excel.HouseHoldImporter; |
| | | import org.springblade.modules.house.service.IHouseholdService; |
| | | import org.springblade.modules.house.vo.HouseholdVO; |
| | | import org.springblade.modules.house.wrapper.HouseholdWrapper; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 住户 控制器 |
| | |
| | | |
| | | /** |
| | | * 住户 自定义查询详情 |
| | | * |
| | | * @param household |
| | | * @return |
| | | */ |
| | |
| | | public R getDetail(HouseholdEntity household) { |
| | | return R.data(householdService.getDetail(household)); |
| | | } |
| | | |
| | | /** |
| | | * 住户 分页 |
| | | */ |
| | |
| | | public R<IPage<HouseholdVO>> page(HouseholdVO household, Query query) { |
| | | IPage<HouseholdVO> pages = householdService.selectHouseholdPage(Condition.getPage(query), household); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 住户 自定义分页 |
| | | */ |
| | | @GetMapping("/getKeynotePersonnelPage") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入household") |
| | | public R<IPage<HouseholdVO>> getKeynotePersonnelPage(HouseholdVO household, Query query) { |
| | | IPage<HouseholdVO> pages = householdService.getKeynotePersonnelPage(Condition.getPage(query), household); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 住户标签统计 |
| | | */ |
| | | @GetMapping("/getlabelStatistics") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "住户标签统计", notes = "传入household") |
| | | public R<List<TreeIntegerNode>> getlabelStatistics(HouseholdVO household) { |
| | | List<TreeIntegerNode> pages = householdService.getlabelStatistics(household); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 住户列表查询 |
| | | * |
| | | * @param household |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectHouseholdList") |
| | | public R selectHouseholdList(HouseholdVO household) { |
| | | return R.data(householdService.selectHouseholdList(household)); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 住户 自定义新增或修改 |
| | | * |
| | | * @param household |
| | | * @return |
| | | */ |
| | | @PostMapping("/saveOrUpdateHousehold") |
| | | @ApiOperation(value = "自定义新增或修改", notes = "传入household") |
| | | public R saveOrUpdateHousehold(@Valid @RequestBody HouseholdEntity household) { |
| | | public R saveOrUpdateHousehold(@Valid @RequestBody HouseholdVO household) { |
| | | return R.status(householdService.saveOrUpdateHousehold(household)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(householdService.removeByIds(Func.toLongList(ids))); |
| | | // 返回 |
| | | return R.status(householdService.removeHousehold(ids)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 住户审核统计 |
| | |
| | | |
| | | /** |
| | | * 住户对应物业,网格,公安负责人查询 |
| | | * |
| | | * @param household |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 用户信息统计 |
| | | * |
| | | * @param code |
| | | * @param roleType |
| | | * @return |
| | |
| | | @ApiOperationSupport(order = 14) |
| | | @ApiOperation(value = "用户信息统计", notes = " ") |
| | | public R getHouseHoldStatistics(@RequestParam("code") String code, @RequestParam("roleType") String roleType) { |
| | | return R.data(householdService.getHouseHoldStatistics(code,roleType)); |
| | | return R.data(householdService.getHouseHoldStatistics(code, roleType)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 住户业主信息处理,将业主人员插入到用户表 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/userHandle") |
| | | public R userHandle() { |
| | | return R.data(householdService.userHandle()); |
| | | } |
| | | |
| | | /** |
| | | * 获取所有住户 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/getAllHouseHold") |
| | | public R getAllHouseHold(HouseholdVO household) { |
| | | return R.data(householdService.getAllHouseHold(household)); |
| | | } |
| | | |
| | | |