|
@@ -0,0 +1,77 @@
|
|
|
+package com.sooka.sponest.mobile.comprehensive.organizationAndInstitutioncontroller;
|
|
|
+
|
|
|
+import com.ruoyi.common.core.constant.HttpStatus;
|
|
|
+import com.ruoyi.common.core.web.controller.BaseController;
|
|
|
+import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
|
+import com.ruoyi.common.core.web.page.PageDomain;
|
|
|
+import com.ruoyi.common.core.web.page.TableDataInfo;
|
|
|
+import com.ruoyi.common.core.web.page.TableSupport;
|
|
|
+import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.domain.ComprehensiveInstitutions;
|
|
|
+import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.service.RemoteInstitutionsService;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 综治机构
|
|
|
+ *
|
|
|
+ * @author hanfucheng
|
|
|
+ * @date 2023/9/13 15:37
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/AppInstitutionsController")
|
|
|
+public class AppInstitutionsController extends BaseController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ RemoteInstitutionsService remoteInstitutionsService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询综治机构列表
|
|
|
+ */
|
|
|
+ @GetMapping("/comprehensiveInstitutionsf/list")
|
|
|
+ public AjaxResult list(ComprehensiveInstitutions comprehensiveInstitutions) {
|
|
|
+ PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
+ Integer pageNum = pageDomain.getPageNum();
|
|
|
+ Integer pageSize = pageDomain.getPageSize();
|
|
|
+ TableDataInfo tableDataInfo = remoteInstitutionsService.selectComprehensiveInstitutionsList(pageNum, pageSize,comprehensiveInstitutions.getInstitutionName(),comprehensiveInstitutions.getInstitutionType(),comprehensiveInstitutions.getLevel() );
|
|
|
+ if(HttpStatus.SUCCESS == tableDataInfo.getCode()){
|
|
|
+ return AjaxResult.success(tableDataInfo.getRows());
|
|
|
+ }else{
|
|
|
+ return AjaxResult.error(tableDataInfo.getCode(),tableDataInfo.getMsg());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取综治机构详细信息
|
|
|
+ */
|
|
|
+ @GetMapping("/comprehensiveInstitutionsf/edit")
|
|
|
+ public AjaxResult getInfo(String id) {
|
|
|
+ return remoteInstitutionsService.selectComprehensiveInstitutionsById(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增综治机构
|
|
|
+ */
|
|
|
+ @PostMapping("/comprehensiveInstitutionsf")
|
|
|
+ public AjaxResult add(@RequestBody String json) {
|
|
|
+ return remoteInstitutionsService.insertComprehensiveInstitutions(json);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 修改综治机构
|
|
|
+ */
|
|
|
+ @PostMapping("/comprehensiveInstitutionsf/put")
|
|
|
+ public AjaxResult edit(@RequestBody String json) {
|
|
|
+ return remoteInstitutionsService.updateComprehensiveInstitutions(json);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除综治机构
|
|
|
+ */
|
|
|
+ @GetMapping("/comprehensiveInstitutionsf/del")
|
|
|
+ public AjaxResult remove(@RequestParam("id") List<String> id) {
|
|
|
+ return remoteInstitutionsService.deleteComprehensiveInstitutionsByIds(id.toArray(new String[0]));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|