|
@@ -0,0 +1,76 @@
|
|
|
+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.ComprehensiveTeam;
|
|
|
+import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.service.RemoteTeamService;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 综治队伍
|
|
|
+ *
|
|
|
+ * @author hanfucheng
|
|
|
+ * @date 2023/9/14 10:16
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/AppTeamController")
|
|
|
+public class AppTeamController extends BaseController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ RemoteTeamService remoteTeamService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询综治机构列表
|
|
|
+ */
|
|
|
+ @GetMapping("/comprehensiveTeam/list")
|
|
|
+ public AjaxResult list(ComprehensiveTeam comprehensiveTeam) {
|
|
|
+ PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
+ Integer pageNum = pageDomain.getPageNum();
|
|
|
+ Integer pageSize = pageDomain.getPageSize();
|
|
|
+ TableDataInfo tableDataInfo = remoteTeamService.selectComprehensiveTeamList(pageNum, pageSize,comprehensiveTeam.getName(),comprehensiveTeam.getInstitutionId(),comprehensiveTeam.getIdentityNumber() );
|
|
|
+ if(HttpStatus.SUCCESS == tableDataInfo.getCode()){
|
|
|
+ return AjaxResult.success(tableDataInfo.getRows());
|
|
|
+ }else{
|
|
|
+ return AjaxResult.error(tableDataInfo.getCode(),tableDataInfo.getMsg());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取综治机构详细信息
|
|
|
+ */
|
|
|
+ @GetMapping("/comprehensiveTeam/edit")
|
|
|
+ public AjaxResult getInfo(String id) {
|
|
|
+ return remoteTeamService.selectComprehensiveTeamById(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增综治机构
|
|
|
+ */
|
|
|
+ @PostMapping("/comprehensiveTeam")
|
|
|
+ public AjaxResult add(@RequestBody String json) {
|
|
|
+ return remoteTeamService.insertComprehensiveTeam(json);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 修改综治机构
|
|
|
+ */
|
|
|
+ @PostMapping("/comprehensiveTeam/put")
|
|
|
+ public AjaxResult edit(@RequestBody String json) {
|
|
|
+ return remoteTeamService.updateComprehensiveTeam(json);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除综治机构
|
|
|
+ */
|
|
|
+ @GetMapping("/comprehensiveTeam/del")
|
|
|
+ public AjaxResult remove(@RequestParam("id") List<String> id) {
|
|
|
+ return remoteTeamService.deleteComprehensiveTeamByIds(id.toArray(new String[0]));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|