Quellcode durchsuchen

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_java

# Conflicts:
#	fs-service/src/main/java/com/fs/his/service/IFsUserInformationCollectionService.java
#	fs-service/src/main/java/com/fs/his/service/impl/FsUserInformationCollectionServiceImpl.java
15376779826 vor 1 Woche
Ursprung
Commit
d98703df4d

+ 3 - 0
fs-service/src/main/java/com/fs/his/domain/FsUserInformationCollection.java

@@ -63,6 +63,9 @@ public class FsUserInformationCollection extends BaseEntity{
     //医生建议
     private String doctorAdvice;
 
+    //医生签名
+    private String doctorSign;
+
     //是否关联套餐包 0-不关联 1-关联
     private Integer isPackage;
 

+ 3 - 0
fs-service/src/main/java/com/fs/his/param/CollectionInfoConfirmParam.java

@@ -2,8 +2,11 @@ package com.fs.his.param;
 
 import lombok.Data;
 
+import javax.validation.constraints.NotNull;
+
 @Data
 public class CollectionInfoConfirmParam {
+    @NotNull(message = "信息id不能位空")
     private Long id;
 
     private Long userId;

+ 2 - 0
fs-service/src/main/java/com/fs/his/param/FsUserInformationCollectionParam.java

@@ -45,4 +45,6 @@ public class FsUserInformationCollectionParam {
     private String remark;
 
     private Long patientId;
+
+    private String doctorSign;
 }

+ 0 - 1
fs-service/src/main/java/com/fs/his/service/IFsDoctorConfirmService.java

@@ -12,7 +12,6 @@ import java.util.List;
  * @author fs
  * @date 2025-10-18
  */
-@Service
 public interface IFsDoctorConfirmService extends IService<FsDoctorConfirm>{
     /**
      * 查询【请填写功能名称】

+ 9 - 0
fs-service/src/main/java/com/fs/his/service/IFsUserInformationCollectionService.java

@@ -8,6 +8,7 @@ import com.fs.his.param.CollectionInfoConfirmParam;
 import com.fs.his.param.FsUserInformationCollectionListDParam;
 import com.fs.his.param.FsUserInformationCollectionParam;
 import com.fs.his.vo.FsUserInfoCollectionUVO;
+import com.fs.his.vo.FsUserInformationCollectionAndPatientVO;
 import com.fs.his.vo.FsUserInformationCollectionListDVO;
 import com.fs.his.vo.FsUserInformationCollectionVO;
 
@@ -44,6 +45,14 @@ public interface IFsUserInformationCollectionService extends IService<FsUserInfo
      */
     Long insertFsUserInformationCollection(FsUserInformationCollectionParam fsUserInformationCollection);
 
+    /**
+     * 修改用户信息采集
+     *
+     * @param fsUserInformationCollection 用户信息采集
+     * @return 结果
+     */
+    Long update(FsUserInformationCollectionParam fsUserInformationCollection);
+
     /**
      * 修改用户信息采集
      *

+ 41 - 29
fs-service/src/main/java/com/fs/his/service/impl/FsUserInformationCollectionServiceImpl.java

@@ -192,6 +192,31 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
         return fsUserInformationCollection.getId();
     }
 
+    /**
+     * 修改用户信息采集
+     *
+     * @param param 用户信息采集
+     * @return 结果
+     */
+    @Override
+    public Long update(FsUserInformationCollectionParam param)
+    {
+        if (param.getId() == null || param.getId() < 1) {
+            throw new CustomException("参数错误");
+        }
+        FsUserInformationCollection collection = fsUserInformationCollectionMapper.selectFsUserInformationCollectionById(param.getId());
+        if (collection == null) {
+            throw new CustomException("没有用户采集信息");
+        }
+        if (collection.getUserConfirm() == 1 && collection.getUserConfirm2() == 0) {
+            throw new CustomException("确认中,暂无法修改");
+        }
+        FsUserInformationCollection fsUserInformationCollection = getFsUserInformationCollection(param);
+        fsUserInformationCollection.setUpdateTime(DateUtils.getNowDate());
+        baseMapper.updateFsUserInformationCollection(fsUserInformationCollection);
+        return fsUserInformationCollection.getId();
+    }
+
     /**
      * 修改用户信息采集
      *
@@ -609,35 +634,21 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
 //            //插入医生消息
 //            doctorMsgMapper.insertDoctorMsg(msg);
 //            //第一次确认
-//            map.setStatus(2);
-        }
-//        else if (collection.getStatus() == 2) {
-//            //第二次确认
-//            map.setUserConfirm2(1);
-//            if (collection.getUserConfirm2() == 0 && collection.getIsPackage() == 1) {
-//                FsStoreOrder fsStoreOrder = storeOrderService.selectFsStoreOrderByOrderCode(collection.getPackageOrderCode());
-//                if (fsStoreOrder != null) {
-//                    FsStoreOrder editOrder   = new FsStoreOrder();
-//                    editOrder.setOrderId(fsStoreOrder.getOrderId());
-////                    editOrder.setIsConfirm(1); todo
-//                    storeOrderService.updateFsStoreOrder(editOrder);
-//                } else {
-//                    return R.error("没有找到订单");
-//                }
-//            }
+            map.setStatus(2);
+            baseMapper.updateFsUserInformationCollection(map);
+        }
+//        if (fsUserInformationCollectionMapper.updateFsUserInformationCollection(map) > 0) {
+//            //存入医生确认统计时间数据
+//            FsDoctorConfirm doctorConfirm = new FsDoctorConfirm();
+//            doctorConfirm.setCollectionId(collection.getId());
+//            doctorConfirm.setDoctorId(collection.getDoctorId());
+//            doctorConfirm.setStartTime(DateUtils.getNowDate());
+//            doctorConfirmService.insertFsDoctorConfirm(doctorConfirm);
+//            //医生确认时间存入缓存 医生确认后删除
+//            redisCache.setCacheObject("doctorConfirm:" + collection.getId(), doctorConfirm);
+//            return R.ok();
 //        }
-        if (fsUserInformationCollectionMapper.updateFsUserInformationCollection(map) > 0) {
-            //存入医生确认统计时间数据
-            FsDoctorConfirm doctorConfirm = new FsDoctorConfirm();
-            doctorConfirm.setCollectionId(collection.getId());
-            doctorConfirm.setDoctorId(collection.getDoctorId());
-            doctorConfirm.setStartTime(DateUtils.getNowDate());
-            doctorConfirmService.insertFsDoctorConfirm(doctorConfirm);
-            //医生确认时间存入缓存 医生确认后删除
-            redisCache.setCacheObject("doctorConfirm:" + collection.getId(), doctorConfirm);
-            return R.ok();
-        }
-        return R.error("用户确认失败");
+        return R.ok();
     }
 
 
@@ -886,6 +897,8 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
         fsUserInformationCollection.setSex(param.getSex());
         fsUserInformationCollection.setAllergy(param.getAllergy());
         fsUserInformationCollection.setRemark(param.getRemark());
+        fsUserInformationCollection.setPatientId(param.getPatientId());
+        fsUserInformationCollection.setDoctorSign(param.getDoctorSign());
         //获取医生信息
         CompanyUser companyUser = companyUserMapper.selectCompanyUserById(param.getCompanyUserId());
         if (companyUser == null) {
@@ -924,5 +937,4 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
 //        System.out.println(JSON.toJSONString(collect1));
         boolean contains = "是否有糖尿病相关疾病?".contains("糖尿病");
     }
-
 }

+ 18 - 0
fs-service/src/main/java/com/fs/his/vo/FsUserInformationCollectionAndPatientVO.java

@@ -0,0 +1,18 @@
+package com.fs.his.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fs.common.annotation.Excel;
+import com.fs.his.domain.FsPatient;
+import com.fs.his.domain.FsUserInformationCollection;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class FsUserInformationCollectionAndPatientVO extends FsUserInformationCollection {
+    private FsPatient patientInfo; //病人信息
+
+
+}

+ 5 - 1
fs-service/src/main/resources/mapper/his/FsUserInformationCollectionMapper.xml

@@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="packageOrderCode"    column="package_order_code"    />
         <result property="status"    column="status"    />
         <result property="userAdvice"    column="user_advice"    />
+        <result property="doctorSign"    column="doctor_sign"    />
         <result property="doctorAdvice"    column="doctor_advice"    />
         <result property="doctorConfirmTime"    column="doctor_confirm_time"    />
         <result property="sex"    column="sex"    />
@@ -37,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select id, question_id, user_id, json_info, user_confirm
              , doctor_confirm, create_time, update_time,doctor_id,company_user_id
              ,package_id,pay_type,amount,is_package,user_confirm2,package_order_code
-             ,status,user_advice,doctor_advice,doctor_confirm_time,sex,user_name,user_phone_four
+             ,status,user_advice,doctor_advice,doctor_sign,doctor_confirm_time,sex,user_name,user_phone_four
              ,allergy,remark,patient_id  from fs_user_information_collection
     </sql>
 
@@ -100,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="amount != null">amount,</if>
             <if test="userAdvice != null">user_advice,</if>
             <if test="doctorAdvice != null">doctor_advice,</if>
+            <if test="doctorSign != null">doctor_sign,</if>
             <if test="isPackage != null">is_package,</if>
             <if test="userConfirm2 != null">user_confirm2,</if>
             <if test="packageOrderCode != null">package_order_code,</if>
@@ -127,6 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="amount != null">#{amount},</if>
             <if test="userAdvice != null">#{userAdvice},</if>
             <if test="doctorAdvice != null">#{doctorAdvice},</if>
+            <if test="doctorSign != null">#{doctorSign},</if>
             <if test="isPackage != null">#{isPackage},</if>
             <if test="userConfirm2 != null">#{userConfirm2},</if>
             <if test="packageOrderCode != null">#{packageOrderCode},</if>
@@ -158,6 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="amount != null">amount = #{amount},</if>
             <if test="userAdvice != null">user_advice = #{userAdvice},</if>
             <if test="doctorAdvice != null">doctor_advice = #{doctorAdvice},</if>
+            <if test="doctorSign != null and doctorSign != ''">doctor_sign = #{doctorSign},</if>
             <if test="userConfirm2 != null">user_confirm2 = #{userConfirm2},</if>
             <if test="isPackage != null">is_package = #{isPackage},</if>
             <if test="packageOrderCode != null">package_order_code = #{packageOrderCode},</if>

+ 33 - 1
fs-user-app/src/main/java/com/fs/app/controller/FsUserInformationCollectionController.java

@@ -3,9 +3,14 @@ package com.fs.app.controller;
 import com.fs.app.annotation.Login;
 import com.fs.common.core.domain.R;
 import com.fs.company.service.ICompanyUserUserService;
+import com.fs.his.domain.FsPatient;
 import com.fs.his.domain.FsUserInformationCollection;
+import com.fs.his.param.CollectionInfoConfirmParam;
 import com.fs.his.param.FsUserInformationCollectionParam;
+import com.fs.his.service.IFsPatientService;
 import com.fs.his.service.IFsUserInformationCollectionService;
+import com.fs.his.vo.FsUserInformationCollectionAndPatientVO;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -22,6 +27,8 @@ public class FsUserInformationCollectionController extends AppBaseController
 {
     @Autowired
     private IFsUserInformationCollectionService fsUserInformationCollectionService;
+    @Autowired
+    private IFsPatientService fsPatientService;
 
 
 
@@ -34,6 +41,7 @@ public class FsUserInformationCollectionController extends AppBaseController
     {
 
         FsUserInformationCollection info = fsUserInformationCollectionService.selectFsUserInformationCollectionById(id);
+
         if (info == null){
             return R.error("未查询到信息!");
         }
@@ -44,6 +52,16 @@ public class FsUserInformationCollectionController extends AppBaseController
         if (info.getDoctorConfirm() == 0){
             info.setPackageId(null);
         }
+        Long patientId = info.getPatientId();
+        if(patientId != null){
+            FsPatient fsPatient = fsPatientService.selectFsPatientByPatientId(patientId);
+            if (fsPatient != null){
+                FsUserInformationCollectionAndPatientVO vo = new FsUserInformationCollectionAndPatientVO();
+                BeanUtils.copyProperties(info, vo);
+                vo.setPatientInfo(fsPatient);
+                return R.ok().put("data", vo);
+            }
+        }
         return R.ok().put("data", info);
     }
 
@@ -70,9 +88,23 @@ public class FsUserInformationCollectionController extends AppBaseController
         if (!info.getUserId().equals(fsUserInformationCollection.getUserId())){
             return R.error("用户id不能修改");
         }
-        fsUserInformationCollectionService.updateFsUserInformationCollection(fsUserInformationCollection);
+        fsUserInformationCollectionService.update(fsUserInformationCollection);
         return R.ok();
     }
 
 
+    /**
+     * 用户确认
+     * @param param
+     * @return
+     */
+    @Login
+    @PostMapping("/userConfirm")
+    public R userConfirm(@RequestBody CollectionInfoConfirmParam param)
+    {
+        param.setUserId(Long.parseLong(getUserId()));
+        return fsUserInformationCollectionService.userConfirm(param);
+    }
+
+
 }