|
|
@@ -0,0 +1,61 @@
|
|
|
+package com.ym.mec.web.controller;
|
|
|
+
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.MediaType;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import com.ym.mec.biz.dal.entity.ChargeTypeSubjectMapper;
|
|
|
+import com.ym.mec.biz.service.ChargeTypeSubjectMapperService;
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
+import com.ym.mec.common.page.QueryInfo;
|
|
|
+
|
|
|
+@RequestMapping("chargeTypeSubjectMapper")
|
|
|
+@Api(tags = "收费类型与科目的关联服务")
|
|
|
+@RestController
|
|
|
+public class ChargeTypeSubjectMapperController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ChargeTypeSubjectMapperService chargeTypeSubjectMapperService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "分页查询收费类型列表")
|
|
|
+ @GetMapping(value = "/queryPage", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('chargeTypeSubjectMapper/queryPage')")
|
|
|
+ public Object queryPage(QueryInfo queryInfo) {
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "新增对象")
|
|
|
+ @PostMapping(value = "/insert", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('chargeTypeSubjectMapper/update')")
|
|
|
+ public Object insert(@RequestBody ChargeTypeSubjectMapper chargeTypeSubjectMapper) {
|
|
|
+ chargeTypeSubjectMapperService.insert(chargeTypeSubjectMapper);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "修改对象")
|
|
|
+ @PostMapping(value = "/update", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('chargeTypeSubjectMapper/update')")
|
|
|
+ public Object update(@RequestBody ChargeTypeSubjectMapper chargeTypeSubjectMapper) {
|
|
|
+ chargeTypeSubjectMapperService.update(chargeTypeSubjectMapper);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "删除收费类型")
|
|
|
+ @PostMapping("/del/{id}")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('chargeTypeSubjectMapper/del')")
|
|
|
+ public Object del(@ApiParam(value = "收费类型编号", required = true) @PathVariable("id") Long id) {
|
|
|
+ chargeTypeSubjectMapperService.deleteById(id);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|