|
@@ -0,0 +1,79 @@
|
|
|
+package com.sooka.sponest.mobile.comprehensive.comprehensivePersonBasicInfo;
|
|
|
+
|
|
|
+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.ComprehensiveRfhGridLeader;
|
|
|
+import com.sooka.sponest.comprehensive.api.comprehensiveSchoolSafety.domain.ComprehensiveSchool;
|
|
|
+import com.sooka.sponest.comprehensive.api.comprehensiveSchoolSafety.service.RemoteSchoolService;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 学校app
|
|
|
+ *
|
|
|
+ * @author hanfucheng
|
|
|
+ * @date 2023/9/18 9:39
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/AppSchoolController")
|
|
|
+public class AppSchoolController extends BaseController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ RemoteSchoolService remoteSchoolService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询学校列表
|
|
|
+ */
|
|
|
+ @GetMapping("/leader/list")
|
|
|
+ public AjaxResult list(ComprehensiveSchool comprehensiveSchool) {
|
|
|
+ PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
+ Integer pageNum = pageDomain.getPageNum();
|
|
|
+ Integer pageSize = pageDomain.getPageSize();
|
|
|
+ TableDataInfo tableDataInfo = remoteSchoolService.selectComprehensiveSchoolList(pageNum, pageSize, comprehensiveSchool.getSchoolName());
|
|
|
+ if(HttpStatus.SUCCESS == tableDataInfo.getCode()){
|
|
|
+ return AjaxResult.success(tableDataInfo.getRows());
|
|
|
+ }else{
|
|
|
+ return AjaxResult.error(tableDataInfo.getCode(),tableDataInfo.getMsg());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取学校详细信息
|
|
|
+ */
|
|
|
+ @GetMapping("/leader/edit")
|
|
|
+ public AjaxResult getInfo(String id) {
|
|
|
+ return remoteSchoolService.selectComprehensiveSchoolById(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增学校
|
|
|
+ */
|
|
|
+ @PostMapping("/leader")
|
|
|
+ public AjaxResult add(@RequestBody String json) {
|
|
|
+ return remoteSchoolService.insertComprehensiveSchool(json);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 修改学校
|
|
|
+ */
|
|
|
+ @PostMapping("/leader/put")
|
|
|
+ public AjaxResult edit(@RequestBody String json) {
|
|
|
+ return remoteSchoolService.updateComprehensiveSchool(json);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除学校
|
|
|
+ */
|
|
|
+ @GetMapping("/leader/del")
|
|
|
+ public AjaxResult remove(@RequestParam("id") List<String> id) {
|
|
|
+ return remoteSchoolService.deleteComprehensiveSchoolByIds(id.toArray(new String[0]));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|