| | |
| | | |
| | | import com.gkhy.exam.pay.dto.rep.NonCoalPayPageRepDto; |
| | | import com.gkhy.exam.pay.dto.req.NonCoalPayReqDto; |
| | | import com.gkhy.exam.pay.dto.req.NonCoalPayStuImport; |
| | | import com.gkhy.exam.pay.dto.req.NonCoalPayStudentReqDto; |
| | | import com.gkhy.exam.pay.dto.req.NonCoalPayTypeEditReqDto; |
| | | import com.gkhy.exam.pay.entity.NonCoalPay; |
| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | * 新增非煤缴费管理 |
| | | */ |
| | | @PostMapping("/add") |
| | | @PreAuthorize("@ss.hasPermi('noncoal:nonpay:add')") |
| | | //@PreAuthorize("@ss.hasPermi('noncoal:nonpay:add')") |
| | | @ApiOperation(value = "新增非煤缴费管理") |
| | | public AjaxResult add(@Validated @RequestBody NonCoalPayReqDto nonCoalPay) { |
| | | return toAjax(nonCoalPayService.insertNonCoalPay(nonCoalPay)); |
| | |
| | | /** |
| | | * 删除非煤缴费管理 |
| | | */ |
| | | @DeleteMapping("/id") |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "删除非煤缴费管理") |
| | | @ApiImplicitParam(name = "id", dataTypeClass = Long.class, value = "id", required = true) |
| | | public AjaxResult remove(@PathVariable Long id) { |
| | |
| | | */ |
| | | @PostMapping("/editNonCoalStu") |
| | | @ApiOperation(value = "修改非煤缴费学员") |
| | | public AjaxResult editNonCoalStu(@RequestBody NonCoalPayStudent nonCoalPayStudent) { |
| | | public AjaxResult editNonCoalStu(@Validated @RequestBody NonCoalPayStudent nonCoalPayStudent) { |
| | | return toAjax(nonCoalPayStudentService.updateNonCoalPayStudent(nonCoalPayStudent)); |
| | | } |
| | | |
| | | /** |
| | | * 删除【请填写功能名称】 |
| | | */ |
| | | @DeleteMapping("/delNonCalStu/id") |
| | | @DeleteMapping("/delNonCalStu/{id}") |
| | | @ApiOperation(value = "删除非煤缴费学员") |
| | | @ApiImplicitParam(name = "id", dataTypeClass = Long.class, value = "id", required = true) |
| | | public AjaxResult delNonCalStu(@PathVariable Long id) { |
| | |
| | | |
| | | |
| | | @PostMapping("/stuImportData") |
| | | @ApiOperation(value = "导入学员") |
| | | @ApiImplicitParam(name = "nonCoalPayId", dataTypeClass = Long.class, value = "nonCoalPayId", required = true) |
| | | public AjaxResult importData(MultipartFile file, Long nonCoalPayId) throws Exception { |
| | | ExcelUtil<NonCoalPayStudent> util = new ExcelUtil<NonCoalPayStudent>(NonCoalPayStudent.class); |
| | | List<NonCoalPayStudent> nonCoalPayStudents = util.importExcel(file.getInputStream()); |
| | | ExcelUtil<NonCoalPayStuImport> util = new ExcelUtil<NonCoalPayStuImport>(NonCoalPayStuImport.class); |
| | | List<NonCoalPayStuImport> nonCoalPayStudents = util.importExcel(file.getInputStream()); |
| | | String operName = getUsername(); |
| | | String message = nonCoalPayStudentService.importData(nonCoalPayStudents, operName, nonCoalPayId); |
| | | return success(message); |
| | |
| | | |
| | | @PostMapping("/updateNonCoalStu") |
| | | @ApiOperation(value = "更新财政缴款码") |
| | | @Anonymous |
| | | public AjaxResult updateNonCoalStu(@RequestBody NonCoalPayStudentReqDto nonCoalPayStudent) { |
| | | return toAjax(nonCoalPayStudentService.updateNonCoalStu(nonCoalPayStudent)); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @PostMapping("/sendOrder") |
| | | @ApiOperation(value = "生成财政订单") |
| | | @Anonymous |
| | | @RepeatSubmit |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", dataTypeClass = Long.class, value = "个人缴费学员数据id,团队缴费数据id", required = true), |
| | | @ApiImplicitParam(name = "payType", dataTypeClass = String.class, value = "1个人2是团队", required = true), |
| | | }) |
| | | public AjaxResult sendOrder(@RequestParam("id") Long id, @RequestParam("payType") String payType) { |
| | | return success(nonCoalPayStudentService.sendOrder(id, payType)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/queryOrder") |
| | | @ApiOperation(value = "查询是否缴费成功") |
| | | @Anonymous |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", dataTypeClass = Long.class, value = "个人缴费学员数据id,团队缴费数据id", required = true), |
| | | @ApiImplicitParam(name = "payType", dataTypeClass = String.class, value = "1个人2是团队", required = true), |
| | | }) |
| | | public AjaxResult queryOrder(@RequestParam("id") Long id, @RequestParam("payType") String payType) { |
| | | return success(nonCoalPayStudentService.queryOrder(id, payType)); |
| | | } |
| | | |
| | | |
| | | } |