From d4c96b211479c3e2140432586f5f43306e8dffa4 Mon Sep 17 00:00:00 2001
From: zzc <Zhengzhic18@163.com>
Date: Mon, 14 Apr 2025 13:37:54 +0800
Subject: [PATCH] =?UTF-8?q?=E7=AD=9B=E6=9F=A5=E6=9F=A5=E8=AF=A2=E6=8E=A5?=
 =?UTF-8?q?=E5=8F=A3=E6=B7=BB=E5=8A=A0=E5=A7=93=E5=90=8D=E6=89=8B=E6=9C=BA?=
 =?UTF-8?q?=E5=8F=B7=E6=9D=A1=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../web/controller/web/ScreeningController.java        |  5 -----
 .../acupuncture/system/domain/dto/ScreeningDto.java    |  5 +++++
 .../com/acupuncture/system/domain/vo/ExternalVo.java   | 10 ++++++++++
 .../system/service/impl/ScreeningServiceImpl.java      |  9 ++++++---
 .../main/resources/mapper/dao/ScreeningDetailDao.xml   |  3 +++
 5 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/ScreeningController.java b/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/ScreeningController.java
index aab6bc0e..5afdf3b7 100644
--- a/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/ScreeningController.java
+++ b/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/ScreeningController.java
@@ -41,11 +41,6 @@ import java.util.List;
 public class ScreeningController {
     @Resource
     private IScreeningService screeningService;
-    @Resource
-    private DmsTenantMapper dmsTenantMapper;
-
-    @Resource
-    private UmsDataSourceMapper umsDataSourceMapper;
 
     @ApiOperation(value = "查询筛查列表", notes = "原:查询医院是否填写了调查筛查")
     @RequestMapping(value = "/queryDetail", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/ScreeningDto.java b/acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/ScreeningDto.java
index ad37fee1..d6507563 100644
--- a/acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/ScreeningDto.java
+++ b/acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/ScreeningDto.java
@@ -287,6 +287,11 @@ public class ScreeningDto {
         private Long tenantId;
 
         private Long centerId;
+
+        //用以下两个参数判断是否筛查过,如筛查过返回旧筛查ID,没有才创建新的筛查
+        private String name;
+        private String phone;
+
     }
 
     @Data
diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/ExternalVo.java b/acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/ExternalVo.java
index 67116276..2eb43efb 100644
--- a/acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/ExternalVo.java
+++ b/acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/ExternalVo.java
@@ -33,6 +33,16 @@ public class ExternalVo {
 
         private String weight;
         private String phone;
+
+        public String getSex() {
+            if ("0".equals(sex)) {
+                return "1";
+            }
+            if ("1".equals(sex)) {
+                return "2";
+            }
+            return sex;
+        }
     }
 
     @Data
diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/ScreeningServiceImpl.java b/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/ScreeningServiceImpl.java
index 85c56d53..b9dd33bc 100644
--- a/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/ScreeningServiceImpl.java
+++ b/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/ScreeningServiceImpl.java
@@ -360,10 +360,13 @@ public class ScreeningServiceImpl implements IScreeningService {
             redisCache.set(param.getDetailId() + "" + userId + param.getCode(), userId, 600);
             //查询是否已经提交,已提交不能保存修改
             ScrScreeningRecord questionnaireDetail = scrScreeningRecordMapper.selectByPrimaryKey(param.getDetailId());
-            if (UserConstants.SubmitStatus.submit.status == questionnaireDetail.getSubmitStatus()) {
-                redisCache.deleteObject(param.getDetailId() + "" + userId + param.getCode());
-                throw new BaseException(ErrorConstant.HOSPITAL_REPEAT_SUBMIT);
+            if (questionnaireDetail == null) {
+                return;
             }
+//            if (UserConstants.SubmitStatus.submit.status == questionnaireDetail.getSubmitStatus()) {
+//                redisCache.deleteObject(param.getDetailId() + "" + userId + param.getCode());
+//                throw new BaseException(ErrorConstant.HOSPITAL_REPEAT_SUBMIT);
+//            }
 
             log.info("param.getCode():{}", param.getCode());
             if (param.getCode().equals("SCWJ-NAME")) {
diff --git a/acupuncture-system/src/main/resources/mapper/dao/ScreeningDetailDao.xml b/acupuncture-system/src/main/resources/mapper/dao/ScreeningDetailDao.xml
index 5545f119..232ee102 100644
--- a/acupuncture-system/src/main/resources/mapper/dao/ScreeningDetailDao.xml
+++ b/acupuncture-system/src/main/resources/mapper/dao/ScreeningDetailDao.xml
@@ -102,6 +102,9 @@
             <if test="param.phone != null and param.phone != ''">
                 and r.phone = #{param.phone}
             </if>
+            <if test="param.name != null and param.name != ''">
+                and r.name = #{param.name}
+            </if>
         </where>
 --         group by r.id
         order by r.create_time desc