+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.epidemic.controller;
+
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.dto.epidemic.TestingPointDTO;
+import com.elink.esua.epdc.dto.epidemic.result.TestingPointSelectionResultDTO;
+import com.elink.esua.epdc.modules.epidemic.excel.TestingPointExcel;
+import com.elink.esua.epdc.modules.epidemic.service.TestingPointService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 核酸检测点
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2021-09-09
+ */
+@RestController
+@RequestMapping("testingpoint")
+public class TestingPointController {
+
+ @Autowired
+ private TestingPointService testingPointService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = testingPointService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ TestingPointDTO data = testingPointService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody TestingPointDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ testingPointService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody TestingPointDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ testingPointService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ testingPointService.delete(ids);
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = testingPointService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, TestingPointExcel.class);
+ }
+
+
+ /**
+ * 下拉选择 监测点
+ *
+ * @param
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @Author zhangyong
+ * @Date 09:39 2021-09-10
+ **/
+ @GetMapping("testingPointSelection")
+ public Result> testingPointSelection(){
+ List data = testingPointService.getTestingPointSelector();
+ return new Result>().ok(data);
+ }
+}
diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/PersonTestingDao.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/PersonTestingDao.java
index 2956907..aba767b 100644
--- a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/PersonTestingDao.java
+++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/PersonTestingDao.java
@@ -18,6 +18,7 @@
package com.elink.esua.epdc.modules.epidemic.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.dto.PersonTestingDTO;
import com.elink.esua.epdc.dto.PersonTestingPageDTO;
import com.elink.esua.epdc.modules.epidemic.entity.PersonTestingEntity;
import org.apache.ibatis.annotations.Mapper;
@@ -45,4 +46,14 @@ public interface PersonTestingDao extends BaseDao {
* @return java.lang.String
*/
String getMobileByIdCard(@Param("idcard") String idcard);
-}
\ No newline at end of file
+
+ /**
+ * 详情查询
+ * @param id
+ * @return com.elink.esua.epdc.dto.PersonTestingDTO
+ * @Author zhangyong
+ * @Date 11:04 2021-09-10
+ **/
+ PersonTestingDTO getDetailPersonTesting(@Param("id") String id);
+
+}
diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/TestingPointDao.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/TestingPointDao.java
new file mode 100644
index 0000000..92ed904
--- /dev/null
+++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/TestingPointDao.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *