New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.panzhihua.common.model.dtos.civil.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.civil.ComActSocialWorkerDetailsVO; |
| | | import com.panzhihua.common.model.vos.civil.ComActSocialWorkerVO; |
| | | import com.panzhihua.service_community.entity.ComActSocialWorker; |
| | | import com.panzhihua.service_community.service.ComActSocialWorkerService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 社工(ComActSocialWorker)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-25 10:56:48 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comActSocialWorker") |
| | | public class ComActSocialWorkerApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComActSocialWorkerService comActSocialWorkerService; |
| | | |
| | | /** |
| | | * 新增社工 |
| | | * @param comActSocialWorkerAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/add") |
| | | R add(@RequestBody ComActSocialWorkerAddDTO comActSocialWorkerAddDTO){ |
| | | return comActSocialWorkerService.add(comActSocialWorkerAddDTO); |
| | | }; |
| | | |
| | | /** |
| | | * 修改社工 |
| | | * @param comActSocialWorkerEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @PostMapping("/edit") |
| | | R edit(@RequestBody ComActSocialWorkerEditDTO comActSocialWorkerEditDTO){ |
| | | return comActSocialWorkerService.edit(comActSocialWorkerEditDTO); |
| | | }; |
| | | |
| | | /** |
| | | * 分页查找社工 |
| | | * @param pageComActSocialWorkerDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @PostMapping("/page") |
| | | R<IPage<ComActSocialWorkerVO>> query(@RequestBody PageComActSocialWorkerDTO pageComActSocialWorkerDTO){ |
| | | return comActSocialWorkerService.query(pageComActSocialWorkerDTO); |
| | | }; |
| | | |
| | | /** |
| | | * 删除社工 |
| | | * @param ComActSocialWorkerDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | | @PostMapping("/delete") |
| | | R delete(@RequestBody ComActSocialWorkerDeleteDTO ComActSocialWorkerDeleteDTO){ |
| | | return comActSocialWorkerService.delete(ComActSocialWorkerDeleteDTO); |
| | | }; |
| | | |
| | | /** |
| | | * 查询社工详细信息 |
| | | * @param id 社工 id |
| | | * @return 查找结果 |
| | | */ |
| | | @PostMapping("/{id}") |
| | | R<ComActSocialWorkerVO> comActSocialWorkerDetails(@PathVariable("id") Long id){ |
| | | return comActSocialWorkerService.comActSocialWorkerDetails(id); |
| | | } |
| | | |
| | | /** |
| | | * 导入社工名单 |
| | | * @param list |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @PostMapping("/input") |
| | | R export(@RequestBody List<ComActSocialWorkerExcelVO> list, @RequestParam("communityId") Long communityId){ |
| | | return comActSocialWorkerService.export(list,communityId); |
| | | } |
| | | @PostMapping("/activity") |
| | | R activity(@RequestBody CommonPage commonPage){ |
| | | return comActSocialWorkerService.activity(commonPage); |
| | | } |
| | | @PostMapping("/activityList") |
| | | R activityList(@RequestBody CommonPage commonPage){ |
| | | return comActSocialWorkerService.activityList(commonPage); |
| | | } |
| | | } |
| | | |
| | | |