| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.WebUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.HandleAppealServicesDTO; |
| | | import com.ruoyi.system.dto.HandleHelpNeedsDTO; |
| | | import com.ruoyi.system.export.THelpNeedsExport; |
| | | import com.ruoyi.system.export.TMicroWishExport; |
| | | import com.ruoyi.system.model.TAppUser; |
| | | import com.ruoyi.system.model.TAppealServices; |
| | | import com.ruoyi.system.model.THelpNeeds; |
| | | import com.ruoyi.system.model.THelpNeeds; |
| | | import com.ruoyi.system.query.AssistedDiningListQuery; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | |
| | | public class THelpNeedsController { |
| | | @Autowired |
| | | private THelpNeedsService helpNeedsService; |
| | | @Autowired |
| | | private TokenService tokenService; |
| | | @ApiOperation(value = "助需管理分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<THelpNeeds>> pageList(@RequestBody HelpNeedsListQuery query) { |
| | |
| | | @Log(title = "助需管理-添加", businessType = BusinessType.INSERT) |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> save(@RequestBody THelpNeeds dto) { |
| | | String nickName = tokenService.getLoginUser().getUser().getNickName(); |
| | | dto.setNickName(nickName); |
| | | helpNeedsService.save(dto); |
| | | return R.ok(); |
| | | } |
| | |
| | | return R.ok(helpNeedsService.getById( id)); |
| | | } |
| | | |
| | | /** |
| | | * 处理助需 |
| | | */ |
| | | @Log(title = "助需管理-处理助需", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "处理助需") |
| | | @PostMapping(value = "/handleHelpNeeds") |
| | | public R<String> handleHelpNeeds(@RequestBody HandleHelpNeedsDTO dto) { |
| | | |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | String nickName = tokenService.getLoginUser().getUser().getNickName(); |
| | | |
| | | THelpNeeds helpNeeds = helpNeedsService.getById(dto.getId()); |
| | | helpNeeds.setStatus(2); |
| | | helpNeeds.setUserId(userId); |
| | | helpNeeds.setProcessPersonName(nickName); |
| | | helpNeeds.setProcessTime(LocalDateTime.now()); |
| | | helpNeeds.setProcessRemark(dto.getProcessRemark()); |
| | | helpNeeds.setProcessPictures(dto.getProcessPictures()); |
| | | helpNeedsService.updateById(helpNeeds); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Log(title = "助需管理-助需记录导出", businessType = BusinessType.EXPORT) |
| | | @ApiOperation(value = "助需记录导出") |
| | | @PostMapping("/exportHelpNeeds") |