|
@@ -0,0 +1,68 @@
|
|
|
+package com.sooka.sponest.mobile.comprehensive.organizationAndInstitutioncontroller;
|
|
|
+
|
|
|
+import com.ruoyi.common.core.constant.HttpStatus;
|
|
|
+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.ComprehensiveTPreventionOrganization;
|
|
|
+import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.service.ComprehensiveTPreventionOrganizationService;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author zhaozhan
|
|
|
+ * @date 2023/9/18
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/APPComprehensiveTPreventionOrganizationController")
|
|
|
+public class APPComprehensiveTPreventionOrganizationController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private ComprehensiveTPreventionOrganizationService comprehensiveTPreventionOrganizationService;
|
|
|
+ /**
|
|
|
+ * 查询群防群治组织列表
|
|
|
+ */
|
|
|
+ @GetMapping("/preventionOrganization/list")
|
|
|
+ public AjaxResult list(ComprehensiveTPreventionOrganization comprehensiveTPreventionOrganization) {
|
|
|
+ PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
+ Integer pageNum = pageDomain.getPageNum();
|
|
|
+ Integer pageSize = pageDomain.getPageSize();
|
|
|
+ TableDataInfo tableDataInfo = comprehensiveTPreventionOrganizationService.list(pageNum, pageSize, comprehensiveTPreventionOrganization.getOrganizationName(), comprehensiveTPreventionOrganization.getOrganizationType(), comprehensiveTPreventionOrganization.getLevel(), comprehensiveTPreventionOrganization.getGuidanceDepartment(), comprehensiveTPreventionOrganization.getPersonnel(), comprehensiveTPreventionOrganization.getFunctions());
|
|
|
+ if(HttpStatus.SUCCESS == tableDataInfo.getCode()){
|
|
|
+ return AjaxResult.success(tableDataInfo.getRows());
|
|
|
+ }else{
|
|
|
+ return AjaxResult.error(tableDataInfo.getCode(),tableDataInfo.getMsg());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 获取群防群治组织详细信息
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/preventionOrganization/{id}")
|
|
|
+ public AjaxResult getInfo(String id) {
|
|
|
+ return AjaxResult.success(comprehensiveTPreventionOrganizationService.getInfo(id));
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 新增群防群治组织
|
|
|
+ */
|
|
|
+ @PostMapping("/preventionOrganization")
|
|
|
+ public AjaxResult add(@RequestBody String json) {
|
|
|
+ return comprehensiveTPreventionOrganizationService.add(json);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 修改群防群治组织
|
|
|
+ */
|
|
|
+ @PostMapping("/preventionOrganization/put")
|
|
|
+ public AjaxResult edit(@RequestBody String json) {
|
|
|
+ return comprehensiveTPreventionOrganizationService.edit(json);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 删除群防群治组织
|
|
|
+ */
|
|
|
+ @GetMapping("/preventionOrganization/del")
|
|
|
+ public AjaxResult remove(@RequestParam("id") List<String> id) {
|
|
|
+ return comprehensiveTPreventionOrganizationService.remove(id.toArray(new String[0]));
|
|
|
+ }
|
|
|
+}
|