Преглед изворни кода

Merge remote-tracking branch 'origin/master'

xyx пре 1 недеља
родитељ
комит
cd6a746841
19 измењених фајлова са 121 додато и 33 уклоњено
  1. 2 1
      fs-company/src/main/java/com/fs/company/controller/fastGpt/FastGptRoleController.java
  2. 0 1
      fs-company/src/main/java/com/fs/hisStore/controller/FsStoreOrderScrmController.java
  3. 17 4
      fs-doctor-app/src/main/java/com/fs/app/controller/FsUserInformationCollectionController.java
  4. 1 1
      fs-qw-task/src/main/java/com/fs/app/taskService/impl/SopLogsTaskServiceImpl.java
  5. 10 10
      fs-service/src/main/java/com/fs/core/utils/OrderCodeUtils.java
  6. 17 1
      fs-service/src/main/java/com/fs/fastGpt/mapper/FastGptRoleMapper.java
  7. 2 0
      fs-service/src/main/java/com/fs/fastGpt/service/IFastGptRoleService.java
  8. 5 0
      fs-service/src/main/java/com/fs/fastGpt/service/impl/FastGptRoleServiceImpl.java
  9. 3 0
      fs-service/src/main/java/com/fs/his/domain/FsUserInformationCollection.java
  10. 1 0
      fs-service/src/main/java/com/fs/his/mapper/FsUserInformationCollectionMapper.java
  11. 3 0
      fs-service/src/main/java/com/fs/his/param/UserInformationDoctorType2Param.java
  12. 1 0
      fs-service/src/main/java/com/fs/his/service/IFsUserInformationCollectionService.java
  13. 10 4
      fs-service/src/main/java/com/fs/his/service/impl/FsPackageOrderServiceImpl.java
  14. 8 1
      fs-service/src/main/java/com/fs/his/service/impl/FsUserInformationCollectionServiceImpl.java
  15. 1 1
      fs-service/src/main/java/com/fs/live/mapper/LiveOrderMapper.java
  16. 1 0
      fs-service/src/main/java/com/fs/live/vo/FsMyLiveOrderListQueryVO.java
  17. 16 2
      fs-service/src/main/resources/mapper/his/FsUserInformationCollectionMapper.xml
  18. 4 1
      fs-service/src/main/resources/mapper/live/LiveOrderMapper.xml
  19. 19 6
      fs-user-app/src/main/java/com/fs/app/controller/CompanyUserController.java

+ 2 - 1
fs-company/src/main/java/com/fs/company/controller/fastGpt/FastGptRoleController.java

@@ -47,7 +47,8 @@ public class FastGptRoleController extends BaseController
         startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         fastGptRole.setCompanyId(loginUser.getCompany().getCompanyId());
-        List<FastGptRoleVO> list = fastGptRoleService.selectFastGptRoleListVO(fastGptRole);
+        //List<FastGptRoleVO> list = fastGptRoleService.selectFastGptRoleListVO(fastGptRole);
+        List<FastGptRoleVO> list = fastGptRoleService.selectFastGptRoleListVONew(fastGptRole);
         for (FastGptRoleVO fastGptRoleVO : list) {
             String reminderWords = fastGptRoleVO.getReminderWords();
             if (reminderWords!=null && reminderWords.length()>110) {

+ 0 - 1
fs-company/src/main/java/com/fs/hisStore/controller/FsStoreOrderScrmController.java

@@ -87,7 +87,6 @@ public class FsStoreOrderScrmController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('store:storeOrder:list')")
     @GetMapping("/list")
-    @DataScope(deptAlias = "cu",userAlias = "cu")
     public TableDataInfo list(FsStoreOrderParam param)
     {
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());

+ 17 - 4
fs-doctor-app/src/main/java/com/fs/app/controller/FsUserInformationCollectionController.java

@@ -26,6 +26,7 @@ public class FsUserInformationCollectionController extends  AppBaseController {
 
         return R.ok().put("data", fsUserInformationCollection);
     }
+    //医生确认
     @PostMapping("/doctorConfirm")
     public R doctorConfirm(@RequestBody FsUserInformationCollection collection){
         return fsUserInformationCollectionService.doctorConfirm(collection);
@@ -33,13 +34,25 @@ public class FsUserInformationCollectionController extends  AppBaseController {
 
     @GetMapping("/getCollectionList")
     private R getCollectionList(UserInformationDoctorType2Param userInformationDoctorType2Param) {
+
         PageHelper.startPage(userInformationDoctorType2Param.getPageNum(), userInformationDoctorType2Param.getPageSize());
-        userInformationDoctorType2Param.setDoctorType2Id(Long.parseLong(getDoctorId()));
-        List<FsUserInformationCollection> fsUserInformationCollections = fsUserInformationCollectionService.selectFsUserInformationCollectionByDoctorType2(userInformationDoctorType2Param);
-        PageInfo<FsUserInformationCollection> listPageInfo=new PageInfo<>(fsUserInformationCollections);
-        return R.ok().put("data",listPageInfo);
+        if (userInformationDoctorType2Param.getDoctorType()==2){
+            userInformationDoctorType2Param.setDoctorType2Id(Long.parseLong(getDoctorId()));
+            List<FsUserInformationCollection> fsUserInformationCollections = fsUserInformationCollectionService.selectFsUserInformationCollectionByDoctorType2(userInformationDoctorType2Param);
+            PageInfo<FsUserInformationCollection> listPageInfo=new PageInfo<>(fsUserInformationCollections);
+            return R.ok().put("data",listPageInfo);
+        }else if (userInformationDoctorType2Param.getDoctorType()==1){
+            userInformationDoctorType2Param.setDoctorId(Long.parseLong(getDoctorId()));
+            List<FsUserInformationCollection> fsUserInformationCollections = fsUserInformationCollectionService.selectFsUserInformationCollectionByDoctorType1(userInformationDoctorType2Param);
+            PageInfo<FsUserInformationCollection> listPageInfo=new PageInfo<>(fsUserInformationCollections);
+            return R.ok().put("data",listPageInfo);
+        }
+        return R.ok().put("data",null);
+
     }
 
+
+    //药师确认
     @PostMapping("/doctorType2Confirm")
     public R doctorType2Confirm(@RequestBody FsUserInformationCollection collection){
         return fsUserInformationCollectionService.doctorType2Confirm(collection);

+ 1 - 1
fs-qw-task/src/main/java/com/fs/app/taskService/impl/SopLogsTaskServiceImpl.java

@@ -1074,7 +1074,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                     setting.setLinkUrl(linkByApp.getSortLink().replaceAll("^[\\s\\u2005]+", ""));
                     setting.setAppLinkUrl(linkByApp.getAppMsgLink().replaceAll("^[\\s\\u2005]+", ""));
                     setting.setCourseUrl(setting.getLinkImageUrl());
-                    setting.setTitle(setting.getLinkTitle());
+                    setting.setTitle(setting.getLinkDescribe()); //小节名称
 
                     break;
                 //自定义小程序

+ 10 - 10
fs-service/src/main/java/com/fs/core/utils/OrderCodeUtils.java

@@ -44,16 +44,16 @@ public class OrderCodeUtils {
 
     }
     public static String getOrderSn(){
-//        String url= FSConfig.getCommonApi()+ "/app/common/genOrderCode";
-////        String url= "42.194.245.189:8010/app/common/genOrderCode";
-//        String json = HttpRequest.get(url)
-//                .execute().body();
-//        OrderCodeVO vo= JSONUtil.toBean(json, OrderCodeVO.class);
-//        if(vo.getCode()==200){
-//            return vo.getOrderCode();
-//        }
-//        else return null;
-        return OrderCodeUtils.genOrderSn();
+        String url= FSConfig.getCommonApi()+ "/app/common/genOrderCode";
+//        String url= "42.194.245.189:8010/app/common/genOrderCode";
+        String json = HttpRequest.get(url)
+                .execute().body();
+        OrderCodeVO vo= JSONUtil.toBean(json, OrderCodeVO.class);
+        if(vo.getCode()==200){
+            return vo.getOrderCode();
+        }
+        else return null;
+//        return OrderCodeUtils.genOrderSn();
 
     }
 

+ 17 - 1
fs-service/src/main/java/com/fs/fastGpt/mapper/FastGptRoleMapper.java

@@ -97,5 +97,21 @@ public interface FastGptRoleMapper
 
     List<FastgptEventLogTotalVo> selectFastGptRoleAppKeyList();
 
-
+    @Select("<script> " +
+            "select fr.*,qc.corp_name as corpName  from fastgpt_role fr left join qw_company qc on fr.bind_corp_id=qc.corp_id " +
+            "         <where>  \n" +
+            "            <if test=\"roleName != null  and roleName != ''\"> and role_name like concat('%', #{roleName}, '%')</if>\n" +
+            "            <if test=\"companyId != null \"> and company_id = #{companyId}</if>\n" +
+            "            <if test=\"roleType != null \"> and role_type = #{roleType}</if>\n" +
+            "            <if test=\"modeConfigJson != null  and modeConfigJson != ''\"> and mode_config_json = #{modeConfigJson}</if>\n" +
+            "            <if test=\"mode != null \"> and mode = #{mode}</if>\n" +
+            "            <if test=\"kfId != null  and kfId != ''\"> and kf_id = #{kfId}</if>\n" +
+            "            <if test=\"kfUrl != null  and kfUrl != ''\"> and kf_url = #{kfUrl}</if>\n" +
+            "            <if test=\"avatar != null  and avatar != ''\"> and avatar = #{avatar}</if>\n" +
+            "            <if test=\"kfMediaId != null  and kfMediaId != ''\"> and kf_media_id = #{kfMediaId}</if>\n" +
+            "            <if test=\"reminderWords != null  and reminderWords != ''\"> and reminder_words = #{reminderWords}</if>\n" +
+            "            <if test=\"bindCorpId != null  and bindCorpId != ''\"> and (bind_corp_id = #{bindCorpId} or bind_corp_id is null)</if>\n" +
+            "        </where>" +
+            "</script> ")
+    List<FastGptRoleVO> selectFastGptRoleListVONew(FastGptRole fastGptRole);
 }

+ 2 - 0
fs-service/src/main/java/com/fs/fastGpt/service/IFastGptRoleService.java

@@ -81,4 +81,6 @@ public interface IFastGptRoleService
 
     List<FastGptRoleDataVO> selectFastGptRoleAppKeyList();
 
+    List<FastGptRoleVO> selectFastGptRoleListVONew(FastGptRole fastGptRole);
+
 }

+ 5 - 0
fs-service/src/main/java/com/fs/fastGpt/service/impl/FastGptRoleServiceImpl.java

@@ -248,5 +248,10 @@ public class FastGptRoleServiceImpl implements IFastGptRoleService
         return roleDataList;
     }
 
+    @Override
+    public List<FastGptRoleVO> selectFastGptRoleListVONew(FastGptRole fastGptRole) {
+        return fastGptRoleMapper.selectFastGptRoleListVONew(fastGptRole);
+    }
+
 
 }

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

@@ -72,6 +72,9 @@ public class FsUserInformationCollection extends BaseEntity{
     //套餐包订单号
     private String packageOrderCode;
 
+    //套餐包订单id
+    private Long packageOrderId;
+
     //用户第二次确认状态
     private Integer userConfirm2;
 

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

@@ -98,4 +98,5 @@ public interface FsUserInformationCollectionMapper extends BaseMapper<FsUserInfo
     FsUserInformationCollectionDTO selectFsUserInformationCollectionDTOById(Long id);
 
     List<FsUserInformationCollection>selectFsUserInformationCollectionByDoctorType2(@Param("maps") UserInformationDoctorType2Param userInformationDoctorType2Param);
+    List<FsUserInformationCollection>selectFsUserInformationCollectionByDoctorType1(@Param("maps") UserInformationDoctorType2Param userInformationDoctorType2Param);
 }

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

@@ -10,4 +10,7 @@ public class UserInformationDoctorType2Param extends BaseParam implements Serial
     private String patientName;
     private String packageOrderCode;
     private Long doctorType2Id;
+    private Long doctorType;
+    private Long doctorId;
+    private Integer doctorConfirm;
 }

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

@@ -41,6 +41,7 @@ public interface IFsUserInformationCollectionService extends IService<FsUserInfo
     List<FsUserInformationCollection> selectFsUserInformationCollectionList(FsUserInformationCollection fsUserInformationCollection);
 
     List<FsUserInformationCollection> selectFsUserInformationCollectionByDoctorType2(UserInformationDoctorType2Param userInformationDoctorType2Param);
+    List<FsUserInformationCollection> selectFsUserInformationCollectionByDoctorType1(UserInformationDoctorType2Param userInformationDoctorType2Param);
 
     /**
      * 新增用户信息采集

+ 10 - 4
fs-service/src/main/java/com/fs/his/service/impl/FsPackageOrderServiceImpl.java

@@ -497,6 +497,9 @@ public class FsPackageOrderServiceImpl implements IFsPackageOrderService
     @Override
     public R createOrder(FsPackageOrderCreateParam param) {
         FsUser user=userService.selectFsUserByUserId(param.getUserId());
+        if (user == null){
+            return R.error("请重新登录重试");
+        }
         if(user.getStatus()!=1){
             return R.error("非法用户操作");
         }
@@ -623,10 +626,13 @@ public class FsPackageOrderServiceImpl implements IFsPackageOrderService
         order.setCycle(fsPackage.getCycle());
         order.setCostDiscountMoney(fsPackage.getTotalCostPrice().subtract(fsPackage.getTotalPrice()));
         if(fsPackageOrderMapper.insertFsPackageOrder(order)>0){
-            FsUserInformationCollection fsUserInformationCollection = fsUserInformationCollectionService.selectFsUserInformationCollectionById(param.getUserInformationId());
-            if (fsUserInformationCollection != null) {
-                fsUserInformationCollection.setPackageOrderCode(order.getOrderSn());
-                fsUserInformationCollectionService.updatePackageOrderCode(fsUserInformationCollection);
+            if (param.getIsUserInformation()!=null && param.getIsUserInformation() == 1){
+                FsUserInformationCollection fsUserInformationCollection = fsUserInformationCollectionService.selectFsUserInformationCollectionById(param.getUserInformationId());
+                if (fsUserInformationCollection != null) {
+                    fsUserInformationCollection.setPackageOrderCode(order.getOrderSn());
+                    fsUserInformationCollection.setPackageOrderId(order.getOrderId());
+                    fsUserInformationCollectionService.updatePackageOrderCode(fsUserInformationCollection);
+                }
             }
             String redisKey = String.valueOf(StrUtil.format("{}{}", FsConstants.REDIS_PACKAGE_ORDER_UNPAY, order.getOrderId()));
             redisCache.setCacheObject(redisKey,order.getOrderId(),30, TimeUnit.MINUTES);

+ 8 - 1
fs-service/src/main/java/com/fs/his/service/impl/FsUserInformationCollectionServiceImpl.java

@@ -177,6 +177,11 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
     public List<FsUserInformationCollection> selectFsUserInformationCollectionByDoctorType2(UserInformationDoctorType2Param userInformationDoctorType2Param) {
         return fsUserInformationCollectionMapper.selectFsUserInformationCollectionByDoctorType2(userInformationDoctorType2Param);
 
+    }
+    @Override
+    public List<FsUserInformationCollection> selectFsUserInformationCollectionByDoctorType1(UserInformationDoctorType2Param userInformationDoctorType2Param) {
+        return fsUserInformationCollectionMapper.selectFsUserInformationCollectionByDoctorType1(userInformationDoctorType2Param);
+
     }
 
     /**
@@ -560,6 +565,9 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
         map.setDoctorConfirmTime(DateUtils.getNowDate());
         //写入药师签名
         FsDoctor fsDoctor = doctorMapper.selectFsDoctorByDoctorId(fsUserInformationCollection.getDoctorType2Id());
+        if(fsDoctor.getDoctorType()!=2){
+            return R.error("不是药师身份,无法确认");
+        }
         map.setDoctorType2Sign(fsDoctor.getSignUrl());
         map.setDoctorAdvice(collection.getDoctorAdvice());
         if (answerVOS != null && !answerVOS.isEmpty()) {
@@ -984,7 +992,6 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
             //随机获取医生id
             doctorId = iFsDoctorService.selectFsDoctorDoctorByPackage();
         }
-        doctorId = 324l;
         fsUserInformationCollection.setDoctorId(doctorId);
 
         return fsUserInformationCollection;

+ 1 - 1
fs-service/src/main/java/com/fs/live/mapper/LiveOrderMapper.java

@@ -369,7 +369,7 @@ public interface LiveOrderMapper {
     int batchUpdateErpByOrderIds(@Param("maps")ArrayList<Map<String, String>> maps);
 
     @Select({"<script> " +
-            "select o.order_id ,o.order_code,o.item_json,o.pay_price,o.status,o.delivery_sn as delivery_id,o.finish_time  from live_order o  " +
+            "select o.order_id,o.total_num ,o.order_code,o.item_json,o.pay_price,o.status,o.delivery_sn as delivery_id,o.finish_time  from live_order o  " +
             "where o.is_del=0 " +
             "<if test = 'maps.status != null and maps.status != \"\"     '> " +
             "and o.status =#{maps.status} " +

+ 1 - 0
fs-service/src/main/java/com/fs/live/vo/FsMyLiveOrderListQueryVO.java

@@ -36,6 +36,7 @@ public class FsMyLiveOrderListQueryVO implements Serializable
     private Integer status;
 
     private Integer isPackage;
+    private Integer totalNum;
 
     private String  packageJson;
 

+ 16 - 2
fs-service/src/main/resources/mapper/his/FsUserInformationCollectionMapper.xml

@@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isPackage"    column="is_package"    />
         <result property="userConfirm2"    column="user_confirm2"    />
         <result property="packageOrderCode"    column="package_order_code"    />
+        <result property="packageOrderId"    column="package_order_id"    />
         <result property="status"    column="status"    />
         <result property="userAdvice"    column="user_advice"    />
         <result property="doctorSign"    column="doctor_sign"    />
@@ -40,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <sql id="selectFsUserInformationCollectionVo">
         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
+             ,package_id,pay_type,amount,is_package,user_confirm2,package_order_code,package_order_id
              ,status,user_advice,doctor_advice,doctor_sign,doctor_confirm_time,sex,user_name,user_phone_four
              ,allergy,remark,patient_id,doctor_type2_id,doctor_type2_confirm,doctor_type2_sign  from fs_user_information_collection
     </sql>
@@ -54,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userConfirm != null "> and user_confirm = #{userConfirm}</if>
             <if test="doctorConfirm != null "> and doctor_confirm = #{doctorConfirm}</if>
         </where>
+        order by id desc
     </select>
 
     <select id="selectFsUserInformationCollectionById" parameterType="Long" resultMap="FsUserInformationCollectionResult">
@@ -92,11 +94,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select fui.*,fp.patient_name as patientName from fs_user_information_collection fui left join fs_patient fp on fui.patient_id = fp.patient_id
             <where>
                 <if test="maps.doctorType2Id != null and maps.doctorType2Id != ''"> and fui.doctor_type2_id = #{maps.doctorType2Id}</if>
-                <if test="maps.doctorType2Confirm != null and maps.doctorType2Confirm != ''"> and fui.doctor_type2_confirm = #{maps.doctorType2Confirm}</if>
+                <if test="maps.doctorType2Confirm != null"> and fui.doctor_type2_confirm = #{maps.doctorType2Confirm}</if>
                 <if test="maps.packageOrderCode != null  and maps.packageOrderCode != ''"> and fui.package_order_code = #{maps.packageOrderCode}</if>
             </where>
 
     </select>
+    <select id="selectFsUserInformationCollectionByDoctorType1"
+            resultType="com.fs.his.domain.FsUserInformationCollection">
+        select fui.*,fp.patient_name as patientName from fs_user_information_collection fui left join fs_patient fp on fui.patient_id = fp.patient_id
+        <where>
+            <if test="maps.doctorId != null and maps.doctorId != ''"> and fui.doctor_id = #{maps.doctorId}</if>
+            <if test="maps.doctorConfirm != null"> and fui.doctor_confirm = #{maps.doctorConfirm}</if>
+            <if test="maps.packageOrderCode != null  and maps.packageOrderCode != ''"> and fui.package_order_code = #{maps.packageOrderCode}</if>
+        </where>
+    </select>
 
     <insert id="insertFsUserInformationCollection" parameterType="FsUserInformationCollection" useGeneratedKeys="true" keyProperty="id">
         insert into fs_user_information_collection
@@ -119,6 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isPackage != null">is_package,</if>
             <if test="userConfirm2 != null">user_confirm2,</if>
             <if test="packageOrderCode != null">package_order_code,</if>
+            <if test="packageOrderId != null">package_order_id,</if>
             <if test="status != null">status,</if>
             <if test="doctorConfirmTime != null">doctor_confirm_time,</if>
             <if test="userPhoneFour != null">user_phone_four,</if>
@@ -150,6 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isPackage != null">#{isPackage},</if>
             <if test="userConfirm2 != null">#{userConfirm2},</if>
             <if test="packageOrderCode != null">#{packageOrderCode},</if>
+            <if test="packageOrderId != null">#{packageOrderId},</if>
             <if test="status != null">#{status},</if>
             <if test="doctorConfirmTime != null">#{doctorConfirmTime},</if>
             <if test="sex != null">#{sex},</if>
@@ -188,6 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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>
+            <if test="packageOrderId != null">package_order_id = #{packageOrderId},</if>
             <if test="status != null">status = #{status},</if>
             <if test="doctorConfirmTime != null">doctor_confirm_time = #{doctorConfirmTime},</if>
             <if test="sex != null">sex = #{sex},</if>

+ 4 - 1
fs-service/src/main/resources/mapper/live/LiveOrderMapper.xml

@@ -1051,11 +1051,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 AND p.prescribe_spec LIKE CONCAT('%', #{productSpec}, '%')
             </if>
             <if test="storeId != null and storeId != ''">
-                AND p.store_id #{storeId}
+                AND p.store_id = #{storeId}
             </if>
             <if test="userAddress != null and userAddress != ''">
                 AND o.user_address LIKE CONCAT('%', #{userAddress}, '%')
             </if>
+            <if test="userName != null and userName != ''">
+                AND o.user_name LIKE CONCAT('%', #{userName}, '%')
+            </if>
             <if test="createTimeStart != null ">
                 AND o.create_time &gt;= #{createTimeStart}
             </if>

+ 19 - 6
fs-user-app/src/main/java/com/fs/app/controller/CompanyUserController.java

@@ -34,15 +34,14 @@ import com.fs.fastGpt.domain.FastgptChatVoiceHomo;
 import com.fs.fastGpt.mapper.FastgptChatVoiceHomoMapper;
 import com.fs.fastgptApi.util.AudioUtils;
 import com.fs.fastgptApi.vo.AudioVO;
+import com.fs.his.domain.FsPatient;
 import com.fs.his.domain.FsUserInformationCollection;
 import com.fs.his.param.*;
+import com.fs.his.service.IFsPatientService;
 import com.fs.his.service.IFsPrescribeService;
 import com.fs.his.service.IFsQuestionAndAnswerService;
 import com.fs.his.service.IFsUserInformationCollectionService;
-import com.fs.his.vo.FsPrescribeListDVO;
-import com.fs.his.vo.FsPrescribeListUVO;
-import com.fs.his.vo.FsPrescribeListVO;
-import com.fs.his.vo.OptionsVO;
+import com.fs.his.vo.*;
 import com.fs.sop.domain.QwSopTempVoice;
 import com.fs.sop.service.IQwSopTempVoiceService;
 import com.fs.system.oss.CloudStorageService;
@@ -59,6 +58,7 @@ import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.util.EntityUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
@@ -98,6 +98,8 @@ public class CompanyUserController extends  AppBaseController {
     private IFsUserInformationCollectionService fsUserInformationCollectionService;
     @Autowired
     private IFsQuestionAndAnswerService fsQuestionAndAnswerService;
+    @Autowired
+    private IFsPatientService fsPatientService;
 
     public static final String SOP_TEMP_VOICE_KEY = "sop:tempVoice";
     @PostMapping("/login")
@@ -428,7 +430,18 @@ public class CompanyUserController extends  AppBaseController {
     @GetMapping(value = "/informationCollection/{id}")
     public R getInformationCollectionInfo(@PathVariable("id") Long id)
     {
-        return R.ok().put("data",fsUserInformationCollectionService.selectFsUserInformationCollectionById(id));
+        FsUserInformationCollection info = fsUserInformationCollectionService.selectFsUserInformationCollectionById(id);
+        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);
     }
 
     /**
@@ -466,7 +479,7 @@ public class CompanyUserController extends  AppBaseController {
     {
         Long companyUserId = getCompanyUserId();
         fsUserInformationCollection.setCompanyUserId(companyUserId);
-        fsUserInformationCollectionService.updateFsUserInformationCollection(fsUserInformationCollection);
+        fsUserInformationCollectionService.update(fsUserInformationCollection);
         return R.ok();
     }