123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- package com.ruoyi.web.controller.proposal;
- import java.util.List;
- import javax.servlet.http.HttpServletResponse;
- import com.ruoyi.system.domain.ProposalUnitReply;
- import org.springframework.security.access.prepost.PreAuthorize;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.PutMapping;
- import org.springframework.web.bind.annotation.DeleteMapping;
- import org.springframework.web.bind.annotation.PathVariable;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import com.ruoyi.common.annotation.Log;
- import com.ruoyi.common.core.controller.BaseController;
- import com.ruoyi.common.core.domain.AjaxResult;
- import com.ruoyi.common.enums.BusinessType;
- import com.ruoyi.system.domain.ProposalInfo;
- import com.ruoyi.system.service.IProposalInfoService;
- import com.ruoyi.common.utils.poi.ExcelUtil;
- import com.ruoyi.common.core.page.TableDataInfo;
- @RestController
- @RequestMapping("/proposalInfo/info")
- public class ProposalInfoController extends BaseController
- {
- @Autowired
- private IProposalInfoService proposalInfoService;
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:list')")
- @GetMapping("/list")
- public TableDataInfo list(ProposalInfo proposalInfo)
- {
- startPage();
- List<ProposalInfo> list = proposalInfoService.selectProposalInfoList(proposalInfo);
- return getDataTable(list);
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:statistics')")
- @GetMapping("/list/statistics")
- public AjaxResult statistics(ProposalInfo proposalInfo)
- {
- return proposalInfoService.statistics(proposalInfo);
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:jointlyList')")
- @GetMapping("/jointlyList")
- public TableDataInfo jointlyList(ProposalInfo proposalInfo)
- {
- startPage();
- List<ProposalInfo> list = proposalInfoService.jointlyList(proposalInfo);
- return getDataTable(list);
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:unitList')")
- @GetMapping("/unitList")
- public TableDataInfo unitList(ProposalInfo proposalInfo)
- {
- startPage();
- List<ProposalInfo> list = proposalInfoService.unitList(proposalInfo);
- return getDataTable(list);
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:export')")
- @Log(title = "提案信息", businessType = BusinessType.EXPORT)
- @PostMapping("/export")
- public void export(HttpServletResponse response, ProposalInfo proposalInfo)
- {
- List<ProposalInfo> list = proposalInfoService.selectProposalInfoList(proposalInfo);
- ExcelUtil<ProposalInfo> util = new ExcelUtil<ProposalInfo>(ProposalInfo.class);
- util.exportExcel(response, list, "提案信息数据");
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:query')")
- @GetMapping(value = "/{proposalId}")
- public AjaxResult getInfo(@PathVariable("proposalId") Long proposalId)
- {
- return success(proposalInfoService.selectProposalInfoByProposalId(proposalId));
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:add')")
- @Log(title = "提案信息", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody ProposalInfo proposalInfo)
- {
- return toAjax(proposalInfoService.insertProposalInfo(proposalInfo));
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:edit')")
- @Log(title = "提案信息", businessType = BusinessType.UPDATE)
- @PostMapping("/put")
- public AjaxResult edit(@RequestBody ProposalInfo proposalInfo)
- {
- return toAjax(proposalInfoService.updateProposalInfo(proposalInfo));
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:remove')")
- @Log(title = "提案信息", businessType = BusinessType.DELETE)
- @GetMapping("/delete/{proposalIds}")
- public AjaxResult remove(@PathVariable Long[] proposalIds)
- {
- return toAjax(proposalInfoService.deleteProposalInfoByProposalIds(proposalIds));
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:isRecord')")
- @Log(title = "提案信息", businessType = BusinessType.UPDATE)
- @PostMapping("/isRecord")
- public AjaxResult isRecord(@RequestBody ProposalInfo proposalInfo)
- {
- return proposalInfoService.isRecord(proposalInfo);
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:assign')")
- @Log(title = "提案信息", businessType = BusinessType.UPDATE)
- @PostMapping("/assign")
- public AjaxResult assign(@RequestBody ProposalInfo proposalInfo)
- {
- return proposalInfoService.assign(proposalInfo);
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:assignsh')")
- @Log(title = "提案信息", businessType = BusinessType.UPDATE)
- @PostMapping("/assignsh")
- public AjaxResult assignsh(@RequestBody ProposalInfo proposalInfo)
- {
- return proposalInfoService.assignsh(proposalInfo);
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:idea')")
- @Log(title = "提案信息", businessType = BusinessType.UPDATE)
- @PostMapping("/idea")
- public AjaxResult idea(@RequestBody ProposalInfo proposalInfo)
- {
- return proposalInfoService.idea(proposalInfo);
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:zxIdea')")
- @Log(title = "提案信息", businessType = BusinessType.UPDATE)
- @PostMapping("/zxIdea")
- public AjaxResult zxIdea(@RequestBody ProposalInfo proposalInfo)
- {
- return proposalInfoService.zxIdea(proposalInfo);
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:keyPoint')")
- @Log(title = "提案信息", businessType = BusinessType.UPDATE)
- @PostMapping("/keyPoint")
- public AjaxResult keyPoint(@RequestBody ProposalInfo proposalInfo)
- {
- return proposalInfoService.keyPoint(proposalInfo);
- }
-
- @PreAuthorize("@ss.hasPermi('proposalInfo:info:outstanding')")
- @Log(title = "提案信息", businessType = BusinessType.UPDATE)
- @PostMapping("/outstanding")
- public AjaxResult outstanding(@RequestBody ProposalInfo proposalInfo)
- {
- return proposalInfoService.outstanding(proposalInfo);
- }
- }
|