瀏覽代碼

Merge remote-tracking branch 'origin/master'

yjwang 5 天之前
父節點
當前提交
7b7ef7f1cc
共有 57 個文件被更改,包括 1105 次插入125 次删除
  1. 13 0
      fs-admin/src/main/java/com/fs/course/controller/FsCourseProductOrderController.java
  2. 103 0
      fs-admin/src/main/java/com/fs/his/controller/FsFirstDiagnosisController.java
  3. 3 1
      fs-admin/src/main/java/com/fs/his/controller/FsStorePaymentController.java
  4. 30 0
      fs-admin/src/main/java/com/fs/web/controller/system/SysConfigController.java
  5. 54 0
      fs-company/src/main/java/com/fs/company/controller/company/FsFirstDiagnosisController.java
  6. 6 6
      fs-ipad-task/src/main/java/com/fs/app/service/IpadSendServer.java
  7. 15 9
      fs-ipad-task/src/main/java/com/fs/app/task/SendMsg.java
  8. 16 5
      fs-qw-api-msg/src/main/java/com/fs/app/controller/QwMsgController.java
  9. 9 8
      fs-qwhook/src/main/java/com/fs/framework/config/MyBatisConfig.java
  10. 1 1
      fs-service/src/main/java/com/fs/course/config/CourseConfig.java
  11. 1 1
      fs-service/src/main/java/com/fs/course/param/newfs/FsUserCourseAddCompanyUserParam.java
  12. 2 0
      fs-service/src/main/java/com/fs/course/service/IFsCourseProductOrderService.java
  13. 14 0
      fs-service/src/main/java/com/fs/course/service/impl/FsCourseProductOrderServiceImpl.java
  14. 45 28
      fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java
  15. 74 0
      fs-service/src/main/java/com/fs/his/domain/FsFirstDiagnosis.java
  16. 1 1
      fs-service/src/main/java/com/fs/his/mapper/FsDoctorMapper.java
  17. 68 0
      fs-service/src/main/java/com/fs/his/mapper/FsFirstDiagnosisMapper.java
  18. 68 0
      fs-service/src/main/java/com/fs/his/service/IFsFirstDiagnosisService.java
  19. 17 0
      fs-service/src/main/java/com/fs/his/service/impl/FsDiseaseServiceImpl.java
  20. 18 0
      fs-service/src/main/java/com/fs/his/service/impl/FsFamousPrescribeServiceImpl.java
  21. 99 0
      fs-service/src/main/java/com/fs/his/service/impl/FsFirstDiagnosisServiceImpl.java
  22. 18 0
      fs-service/src/main/java/com/fs/his/service/impl/FsMedicatedFoodServiceImpl.java
  23. 16 0
      fs-service/src/main/java/com/fs/his/service/impl/FsVesselServiceImpl.java
  24. 2 0
      fs-service/src/main/java/com/fs/his/vo/UserVo.java
  25. 1 1
      fs-service/src/main/java/com/fs/sop/mapper/SopUserLogsMapper.java
  26. 24 10
      fs-service/src/main/java/com/fs/sop/service/impl/SopUserLogsInfoServiceImpl.java
  27. 3 1
      fs-service/src/main/java/com/fs/statis/service/impl/FsStatisSalerWatchServiceImpl.java
  28. 18 21
      fs-service/src/main/java/com/fs/wxwork/service/WxWorkServiceNew.java
  29. 13 24
      fs-service/src/main/java/com/fs/wxwork/utils/WxWorkHttpUtilNew.java
  30. 1 1
      fs-service/src/main/resources/application-config-druid-sft.yml
  31. 2 0
      fs-service/src/main/resources/application-dev.yml
  32. 3 1
      fs-service/src/main/resources/application-druid-bjczwh.yml
  33. 2 0
      fs-service/src/main/resources/application-druid-bnkc.yml
  34. 3 1
      fs-service/src/main/resources/application-druid-drk-test.yml
  35. 3 1
      fs-service/src/main/resources/application-druid-drk.yml
  36. 2 0
      fs-service/src/main/resources/application-druid-fby.yml
  37. 2 0
      fs-service/src/main/resources/application-druid-hcl.yml
  38. 3 1
      fs-service/src/main/resources/application-druid-hdt.yml
  39. 2 0
      fs-service/src/main/resources/application-druid-hyt.yml
  40. 3 1
      fs-service/src/main/resources/application-druid-hzyy.yml
  41. 2 0
      fs-service/src/main/resources/application-druid-jnmy.yml
  42. 2 0
      fs-service/src/main/resources/application-druid-jzzx-test.yml
  43. 2 0
      fs-service/src/main/resources/application-druid-jzzx.yml
  44. 2 0
      fs-service/src/main/resources/application-druid-kyt.yml
  45. 2 0
      fs-service/src/main/resources/application-druid-myhk-test.yml
  46. 2 0
      fs-service/src/main/resources/application-druid-myhk.yml
  47. 2 0
      fs-service/src/main/resources/application-druid-qdtst.yml
  48. 144 0
      fs-service/src/main/resources/application-druid-sft-test.yml
  49. 6 0
      fs-service/src/main/resources/application-druid-sft.yml
  50. 2 0
      fs-service/src/main/resources/application-druid-sxjz.yml
  51. 2 0
      fs-service/src/main/resources/application-druid-syysy.yml
  52. 3 1
      fs-service/src/main/resources/application-druid-whhm.yml
  53. 2 0
      fs-service/src/main/resources/application-druid-xfk.yml
  54. 3 1
      fs-service/src/main/resources/application-druid-xzt.yml
  55. 2 0
      fs-service/src/main/resources/application-druid-zkzh.yml
  56. 126 0
      fs-service/src/main/resources/mapper/his/FsFirstDiagnosisMapper.xml
  57. 23 0
      fs-user-app/src/main/java/com/fs/app/controller/IndexController.java

+ 13 - 0
fs-admin/src/main/java/com/fs/course/controller/FsCourseProductOrderController.java

@@ -69,6 +69,19 @@ public class FsCourseProductOrderController extends BaseController
         return util.exportExcel(list, "拍单商品订单数据");
     }
 
+    /**
+     * 导出拍单商品订单列表
+     */
+    @PreAuthorize("@ss.hasPermi('course:fsCourseProductOrder:decodeExport')")
+    @Log(title = "拍单商品订单", businessType = BusinessType.EXPORT)
+    @GetMapping("/decodeExport")
+    public AjaxResult decodeExport(FsCourseProductOrderListParam param)
+    {
+        List<FsCourseProductOrderVO> list = fsCourseProductOrderService.selectFsCourseProductOrderDecodePhoneList(param);
+        ExcelUtil<FsCourseProductOrderVO> util = new ExcelUtil<FsCourseProductOrderVO>(FsCourseProductOrderVO.class);
+        return util.exportExcel(list, "拍单商品订单数据");
+    }
+
     /**
      * 获取拍单商品订单详细信息
      */

+ 103 - 0
fs-admin/src/main/java/com/fs/his/controller/FsFirstDiagnosisController.java

@@ -0,0 +1,103 @@
+package com.fs.his.controller;
+
+import java.util.List;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.enums.BusinessType;
+import com.fs.his.domain.FsFirstDiagnosis;
+import com.fs.his.service.IFsFirstDiagnosisService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 初诊单Controller
+ * 
+ * @author fs
+ * @date 2025-09-01
+ */
+@RestController
+@RequestMapping("/his/fsFirstDiagnosis")
+public class FsFirstDiagnosisController extends BaseController
+{
+    @Autowired
+    private IFsFirstDiagnosisService fsFirstDiagnosisService;
+
+    /**
+     * 查询初诊单列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        startPage();
+        List<FsFirstDiagnosis> list = fsFirstDiagnosisService.selectFsFirstDiagnosisList(fsFirstDiagnosis);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出初诊单列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:export')")
+    @Log(title = "初诊单", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        List<FsFirstDiagnosis> list = fsFirstDiagnosisService.selectFsFirstDiagnosisList(fsFirstDiagnosis);
+        ExcelUtil<FsFirstDiagnosis> util = new ExcelUtil<FsFirstDiagnosis>(FsFirstDiagnosis.class);
+        return util.exportExcel(list, "初诊单数据");
+    }
+
+    /**
+     * 获取初诊单详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsFirstDiagnosisService.selectFsFirstDiagnosisById(id));
+    }
+
+    /**
+     * 新增初诊单
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:add')")
+    @Log(title = "初诊单", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        return toAjax(fsFirstDiagnosisService.insertFsFirstDiagnosis(fsFirstDiagnosis));
+    }
+
+    /**
+     * 修改初诊单
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:edit')")
+    @Log(title = "初诊单", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        return toAjax(fsFirstDiagnosisService.updateFsFirstDiagnosis(fsFirstDiagnosis));
+    }
+
+    /**
+     * 删除初诊单
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:remove')")
+    @Log(title = "初诊单", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsFirstDiagnosisService.deleteFsFirstDiagnosisByIds(ids));
+    }
+}

+ 3 - 1
fs-admin/src/main/java/com/fs/his/controller/FsStorePaymentController.java

@@ -11,6 +11,7 @@ import com.fs.his.param.FsStorePaymentParam;
 import com.fs.his.service.IFsExportTaskService;
 import com.fs.his.vo.FsStorePaymentExcelVO;
 import com.fs.his.vo.FsStorePaymentVO;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -38,6 +39,7 @@ import com.fs.common.core.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/his/storePayment")
+@Slf4j
 public class FsStorePaymentController extends BaseController
 {
     @Autowired
@@ -131,7 +133,7 @@ public class FsStorePaymentController extends BaseController
     @GetMapping(value = "refund/{paymentId}")
     public R refund(@PathVariable("paymentId") Long paymentId)
     {
-
+        log.info("sysUserId: {} 提交退款", getUserId());
         return fsStorePaymentService.refundFsStorePayment(paymentId);
     }
 

+ 30 - 0
fs-admin/src/main/java/com/fs/web/controller/system/SysConfigController.java

@@ -2,6 +2,9 @@ package com.fs.web.controller.system;
 
 import java.util.List;
 
+import cn.hutool.core.util.ObjectUtil;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.redis.RedisCache;
 import com.fs.common.utils.SecurityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -36,6 +39,8 @@ public class SysConfigController extends BaseController
 {
     @Autowired
     private ISysConfigService configService;
+    @Autowired
+    public RedisCache redisCache;
 
     /**
      * 获取参数配置列表
@@ -150,4 +155,29 @@ public class SysConfigController extends BaseController
         config.setCreateBy(SecurityUtils.getUsername());
         return toAjax(configService.updateConfig(config));
     }
+
+
+    /**
+     * 启用-关闭小程序销售管理
+     * @param bock
+     * @return
+     */
+    @GetMapping("/updateIsTownOn")
+    public R queryIsTownOn(String bock, String appId)
+    {
+        String key = appId+"start_status_001";
+        String start = redisCache.getCacheObject(key);
+        if (ObjectUtil.isNotEmpty(bock)){
+            if (bock.equals("001")){
+                redisCache.setCacheObject(key,bock);
+                return R.ok("调整成功");
+            }else if (bock.equals("002")){
+                redisCache.setCacheObject(key,bock);
+                return R.ok("调整成功");
+            }
+
+        }
+        return R.ok().put("date",start);
+    }
+
 }

+ 54 - 0
fs-company/src/main/java/com/fs/company/controller/company/FsFirstDiagnosisController.java

@@ -0,0 +1,54 @@
+package com.fs.company.controller.company;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.enums.BusinessType;
+import com.fs.his.domain.FsFirstDiagnosis;
+import com.fs.his.service.IFsFirstDiagnosisService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 初诊单Controller
+ */
+@RestController
+@RequestMapping("/his/diagnosis")
+public class FsFirstDiagnosisController extends BaseController {
+
+    @Autowired
+    private IFsFirstDiagnosisService fsFirstDiagnosisService;
+
+    /**
+     * 获取初诊单详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:query')")
+    @GetMapping(value = "/{userId}")
+    public AjaxResult getInfo(@PathVariable("userId") Long userId)
+    {
+        return AjaxResult.success(fsFirstDiagnosisService.getByUserId(userId));
+    }
+
+    /**
+     * 新增初诊单
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:add')")
+    @Log(title = "初诊单", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        return toAjax(fsFirstDiagnosisService.insertFsFirstDiagnosis(fsFirstDiagnosis));
+    }
+
+    /**
+     * 修改初诊单
+     */
+    @PreAuthorize("@ss.hasPermi('his:fsFirstDiagnosis:edit')")
+    @Log(title = "初诊单", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        return toAjax(fsFirstDiagnosisService.updateFsFirstDiagnosis(fsFirstDiagnosis));
+    }
+}

+ 6 - 6
fs-ipad-task/src/main/java/com/fs/app/service/IpadSendServer.java

@@ -4,6 +4,7 @@ import com.fs.common.core.redis.RedisCache;
 import com.fs.common.utils.StringUtils;
 import com.fs.common.utils.date.DateUtil;
 import com.fs.course.config.CourseMaConfig;
+import com.fs.course.domain.FsCoursePlaySourceConfig;
 import com.fs.course.domain.FsCourseWatchLog;
 import com.fs.course.service.IFsCourseWatchLogService;
 import com.fs.ipad.IpadSendUtils;
@@ -42,15 +43,15 @@ public class IpadSendServer {
     private final IQwUserVideoService qwUserVideoService;
     private final RedisCache redisCache;
 
-    private void sendMiniProgram(BaseVo vo, QwSopCourseFinishTempSetting.Setting content, Map<String, CourseMaConfig> miniMap) {
-        CourseMaConfig courseMaConfig = miniMap.get(content.getMiniprogramAppid());
+    private void sendMiniProgram(BaseVo vo, QwSopCourseFinishTempSetting.Setting content, Map<String, FsCoursePlaySourceConfig> miniMap) {
+        FsCoursePlaySourceConfig courseMaConfig = miniMap.get(content.getMiniprogramAppid());
         // 小程序
         MiniProgramVo miniProgramVo = MiniProgramVo.builder()
                 .desc(content.getMiniprogramTitle())
                 .title(courseMaConfig.getName())
-                .weappIconUrl(courseMaConfig.getLog())
+                .weappIconUrl(courseMaConfig.getImg())
                 .imgUrl(content.getMiniprogramPicUrl())
-                .username(courseMaConfig.getUsername() + "@app")
+                .username(courseMaConfig.getOriginalId() + "@app")
                 .pagepath(content.getMiniprogramPage())
                 .appid(content.getMiniprogramAppid())
                 .build();
@@ -200,7 +201,6 @@ public class IpadSendServer {
                 updateQwUser.setRemark("AI未初始化");
                 updateQwUser.setIpadStatus(0);
                 qwUserMapper.updateById(updateQwUser);
-                qwUserService.atMsg(qwUser, "掉线提醒(未初始化)");
                 return false;
             }
             if (login.getLoginType() == 1) {
@@ -311,7 +311,7 @@ public class IpadSendServer {
         return true;
     }
 
-    public void send(QwSopCourseFinishTempSetting.Setting content, QwUser qwUser, QwSopLogs qwSopLogs, Map<String, CourseMaConfig> miniMap, BaseVo parentVo) {
+    public void send(QwSopCourseFinishTempSetting.Setting content, QwUser qwUser, QwSopLogs qwSopLogs, Map<String, FsCoursePlaySourceConfig> miniMap, BaseVo parentVo) {
         BaseVo vo = new BaseVo();
         vo.setId(Long.parseLong(qwSopLogs.getId()));
         vo.setRoom(qwSopLogs.getSendType() == 12);

+ 15 - 9
fs-ipad-task/src/main/java/com/fs/app/task/SendMsg.java

@@ -6,8 +6,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.fs.app.service.IpadSendServer;
 import com.fs.common.core.redis.RedisCacheT;
 import com.fs.common.utils.PubFun;
+import com.fs.company.service.ICompanyMiniappService;
 import com.fs.course.config.CourseConfig;
 import com.fs.course.config.CourseMaConfig;
+import com.fs.course.domain.FsCoursePlaySourceConfig;
+import com.fs.course.service.IFsCoursePlaySourceConfigService;
 import com.fs.ipad.vo.BaseVo;
 import com.fs.qw.domain.QwIpadServer;
 import com.fs.qw.domain.QwUser;
@@ -48,9 +51,10 @@ public class SendMsg {
     private final IpadSendServer sendServer;
     private final SysConfigMapper sysConfigMapper;
     private final IQwSopLogsService qwSopLogsService;
-    private final AsyncSopTestService asyncSopTestService;
     private final QwIpadServerMapper qwIpadServerMapper;
     private final RedisCacheT<Long> redisCache;
+    private final ICompanyMiniappService companyMiniappService;
+    private final IFsCoursePlaySourceConfigService fsCoursePlaySourceConfigService;
 
     @Value("${group-no}")
     private String groupNo;
@@ -61,15 +65,16 @@ public class SendMsg {
     @Qualifier("customThreadPool")
     private ThreadPoolTaskExecutor customThreadPool;
 
-    public SendMsg(QwUserMapper qwUserMapper, QwSopLogsMapper qwSopLogsMapper, IpadSendServer sendServer, SysConfigMapper sysConfigMapper, IQwSopLogsService qwSopLogsService, AsyncSopTestService asyncSopTestService, QwIpadServerMapper qwIpadServerMapper, RedisCacheT<Long> redisCache) {
+    public SendMsg(QwUserMapper qwUserMapper, QwSopLogsMapper qwSopLogsMapper, IpadSendServer sendServer, SysConfigMapper sysConfigMapper, IQwSopLogsService qwSopLogsService, QwIpadServerMapper qwIpadServerMapper, RedisCacheT<Long> redisCache, ICompanyMiniappService companyMiniappService, IFsCoursePlaySourceConfigService fsCoursePlaySourceConfigService) {
         this.qwUserMapper = qwUserMapper;
         this.qwSopLogsMapper = qwSopLogsMapper;
         this.sendServer = sendServer;
         this.sysConfigMapper = sysConfigMapper;
         this.qwSopLogsService = qwSopLogsService;
-        this.asyncSopTestService = asyncSopTestService;
         this.qwIpadServerMapper = qwIpadServerMapper;
         this.redisCache = redisCache;
+        this.companyMiniappService = companyMiniappService;
+        this.fsCoursePlaySourceConfigService = fsCoursePlaySourceConfigService;
     }
     private List<QwUser> getQwUserList() {
         if (qwUserList.isEmpty()) {
@@ -84,10 +89,11 @@ public class SendMsg {
         return qwUserList;
     }
 
-    private Map<String, CourseMaConfig> getMiniMap() {
-        SysConfig maConfig = sysConfigMapper.selectConfigByConfigKey("courseMa.config");
-        List<CourseMaConfig> courseMaConfigs = JSON.parseArray(maConfig.getConfigValue(), CourseMaConfig.class);
-        return PubFun.listToMapByGroupObject(courseMaConfigs, CourseMaConfig::getAppid);
+    private Map<String, FsCoursePlaySourceConfig> getMiniMap() {
+        List<FsCoursePlaySourceConfig> list = fsCoursePlaySourceConfigService.list(new QueryWrapper<FsCoursePlaySourceConfig>().eq("type", 1).eq("is_del", 0));
+//        SysConfig maConfig = sysConfigMapper.selectConfigByConfigKey("courseMa.config");
+//        List<CourseMaConfig> courseMaConfigs = JSON.parseArray(maConfig.getConfigValue(), CourseMaConfig.class);
+        return PubFun.listToMapByGroupObject(list, FsCoursePlaySourceConfig::getAppid);
     }
 
 
@@ -117,7 +123,7 @@ public class SendMsg {
             delayEnd = config.getDelayEnd();
         }
         // 小程序配置获取
-        Map<String, CourseMaConfig> miniMap = getMiniMap();
+        Map<String, FsCoursePlaySourceConfig> miniMap = getMiniMap();
         // 获取 pad 发送的企微
         getQwUserList().forEach(e -> {
             // 如果没有值就执行后面的方法 并且入值
@@ -148,7 +154,7 @@ public class SendMsg {
      * @param delayEnd   随机延迟 最大值
      * @param miniMap    小程序配置
      */
-    private void processUser(QwUser qwUser, int delayStart, int delayEnd, Map<String, CourseMaConfig> miniMap) {
+    private void processUser(QwUser qwUser, int delayStart, int delayEnd, Map<String, FsCoursePlaySourceConfig> miniMap) {
         long start1 = System.currentTimeMillis();
         // 获取当前企微待发送记录
         List<QwSopLogs> qwSopLogList = qwSopLogsMapper.selectByQwUserId(qwUser.getId());

+ 16 - 5
fs-qw-api-msg/src/main/java/com/fs/app/controller/QwMsgController.java

@@ -12,6 +12,7 @@ import com.fs.qw.domain.QwUser;
 import com.fs.qw.mapper.QwExternalContactMapper;
 import com.fs.qw.mapper.QwUserMapper;
 import com.fs.qw.service.IQwExternalContactService;
+import com.fs.qw.service.IQwUserService;
 import com.fs.qw.service.IQwUserVoiceLogService;
 import com.fs.sop.mapper.QwSopLogsMapper;
 import com.fs.sop.mapper.SopUserLogsInfoMapper;
@@ -45,6 +46,8 @@ public class QwMsgController {
     @Autowired
     WxWorkService wxWorkService;
     @Autowired
+    IQwUserService qwUserService;
+    @Autowired
     IQwUserVoiceLogService qwUserVoiceLogService;
     @Autowired
     IFsStoreOrderService fsStoreOrderService;
@@ -189,23 +192,27 @@ public class QwMsgController {
             case 100005:
 
                 log.info("手机端结束登录:"+wxWorkMsgResp.getJson());
-                qwUserStatus(wxWorkMsgResp.getUuid(),0);
+                JSONObject jsonObject1 = new JSONObject(wxWorkMsgResp.getJson());
+                qwUserStatus(wxWorkMsgResp.getUuid(),0, jsonObject1.getString("msg"));
                 break;
             case 100008:
                 QwUser vidUser = qwUserMapper.selectQwUserById(id);
                 if (vidUser.getUid().equals(wxWorkMsgResp.getUuid())){
                     log.info("当前账号在其他设备登录:"+wxWorkMsgResp.getJson());
-                    qwUserStatus(wxWorkMsgResp.getUuid(),0);
+                    JSONObject jsonObject2 = new JSONObject(wxWorkMsgResp.getJson());
+                    qwUserStatus(wxWorkMsgResp.getUuid(),0, jsonObject2.getString("msg"));
                 }
                 log.info("当前账号重新登录:"+wxWorkMsgResp.getJson());
                 break;
             case 100007:
                 log.info("异常断开:"+wxWorkMsgResp.getJson());
-                qwUserStatus(wxWorkMsgResp.getUuid(),0);
+                JSONObject jsonObject3 = new JSONObject(wxWorkMsgResp.getJson());
+                qwUserStatus(wxWorkMsgResp.getUuid(),0, "异常断开 - " + jsonObject3.getString("msg"));
                 break;
             case 100009:
                 log.info("二次验证:"+wxWorkMsgResp.getJson());
-                qwUserStatus(wxWorkMsgResp.getUuid(),0);
+                JSONObject jsonObject4 = new JSONObject(wxWorkMsgResp.getJson());
+                qwUserStatus(wxWorkMsgResp.getUuid(),0, "二次验证 - " + jsonObject4.getString("msg"));
                 break;
             case 102001:
             case 102002:
@@ -428,12 +435,16 @@ public class QwMsgController {
 
 
 
-    void qwUserStatus(String uid,Integer status){
+    void qwUserStatus(String uid, Integer status, String msg){
         Long id = redisCache.getCacheObject("qrCode:uuid:"+uid);
         QwUser qwUser = new QwUser();
         qwUser.setId(id);
         qwUser.setIpadStatus(status);
         qwUserMapper.updateQwUser(qwUser);
+        QwUser qwUser1 = qwUserMapper.selectQwUserById(id);
+        if(uid.equals(qwUser1.getUid())){
+            qwUserService.atMsg(qwUser1, "掉线提醒("+msg+")");
+        }
     }
 
 }

+ 9 - 8
fs-qwhook/src/main/java/com/fs/framework/config/MyBatisConfig.java

@@ -1,5 +1,6 @@
 package com.fs.framework.config;
 
+import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
 import com.fs.common.utils.StringUtils;
 import org.apache.ibatis.io.VFS;
 import org.apache.ibatis.session.SqlSessionFactory;
@@ -27,7 +28,7 @@ import java.util.List;
 
 /**
  * Mybatis支持*匹配扫描包
- * 
+ *
 
  */
 @Configuration
@@ -115,19 +116,19 @@ public class MyBatisConfig
     }
 
     @Bean
-    public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception
+    public SqlSessionFactory sqlSessionFactorys(DataSource dataSource) throws Exception
     {
-        String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage");
-        String mapperLocations = env.getProperty("mybatis.mapperLocations");
-        String configLocation = env.getProperty("mybatis.configLocation");
+        String typeAliasesPackage = env.getProperty("mybatis-plus.typeAliasesPackage");
+        String mapperLocations = env.getProperty("mybatis-plus.mapperLocations");
+        String configLocation = env.getProperty("mybatis-plus.configLocation");
         typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
         VFS.addImplClass(SpringBootVFS.class);
 
-        final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
+        final MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean();
         sessionFactory.setDataSource(dataSource);
         sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
-        sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ",")));
+        sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(mapperLocations));
         sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
         return sessionFactory.getObject();
     }
-}
+}

+ 1 - 1
fs-service/src/main/java/com/fs/course/config/CourseConfig.java

@@ -23,7 +23,7 @@ public class CourseConfig implements Serializable {
     private String registerDomainName;//注册域名
     private String courseDomainName;//链接域名
     private String miniprogramAppid;//链接域名
-    private Integer rewardType; // 奖励类型 1红包 2积分
+    private Integer rewardType; // 奖励类型 1红包 2积分 3红包+积分
     private Integer redPacketMode;//红包模式 1总公司 2销售公司
     private BigDecimal moneyPri;//充值手续费百分比
     private BigDecimal redPackageMoney;//充值手续费百分比

+ 1 - 1
fs-service/src/main/java/com/fs/course/param/newfs/FsUserCourseAddCompanyUserParam.java

@@ -33,7 +33,7 @@ public class FsUserCourseAddCompanyUserParam implements Serializable {
     @ApiModelProperty(value = "营期id")
     private Long periodId;
 
-    @NotNull(message = "项目id不能为空")
+//    @NotNull(message = "项目id不能为空")
     @ApiModelProperty(value = "项目ID")
     private Long projectId;
     private Integer isOpenCourse;

+ 2 - 0
fs-service/src/main/java/com/fs/course/service/IFsCourseProductOrderService.java

@@ -84,4 +84,6 @@ public interface IFsCourseProductOrderService extends IService<FsCourseProductOr
     R refund(FsCourseProductOrderRefundParam param);
 
     R applyRefund(ApplyCourseProductOrderRefundParam param);
+
+    List<FsCourseProductOrderVO> selectFsCourseProductOrderDecodePhoneList(FsCourseProductOrderListParam param);
 }

+ 14 - 0
fs-service/src/main/java/com/fs/course/service/impl/FsCourseProductOrderServiceImpl.java

@@ -647,6 +647,20 @@ public class FsCourseProductOrderServiceImpl extends ServiceImpl<FsCourseProduct
         return R.error();
     }
 
+    @Override
+    public List<FsCourseProductOrderVO> selectFsCourseProductOrderDecodePhoneList(FsCourseProductOrderListParam param) {
+        List<FsCourseProductOrderVO> productOrderVOS = baseMapper.selectFsCourseProductOrderList(param);
+        if (CollectionUtils.isNotEmpty(productOrderVOS)) {
+            productOrderVOS.forEach(productOrderVO -> {
+                if (StringUtils.isNotEmpty(productOrderVO.getProductJson())) {
+                    FsCourseProduct courseProduct = JSONUtil.toBean(productOrderVO.getProductJson(), FsCourseProduct.class);
+                    productOrderVO.setProductName(courseProduct.getProductName());
+                }
+            });
+        }
+        return productOrderVOS;
+    }
+
     //生成核销码
     private String VerificationCodeGenerator(){
         Random random = new Random();

+ 45 - 28
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -101,7 +101,8 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
 {
     @Value("${cloud_host.company_name}")
     private String signProjectName;
-
+    @Value("${isNewWxMerchant}")
+    private Boolean isNewWxMerchant;
     private static final Logger logger = LoggerFactory.getLogger(FsUserCourseVideoServiceImpl.class);
 
 
@@ -924,6 +925,13 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             // 积分奖励
             case 2:
                 return sendIntegralReward(param,user, log, config);
+            // 红包+积分
+            case 3:
+                R sendRed = sendRedPacketReward(param, user, log, video, config);
+                if (!Objects.equals(sendRed.get("code"), 200)) {
+                    return sendRed;
+                }
+                return sendIntegralReward(param,user, log, config);
             default:
                 return R.error("参数错误!");
         }
@@ -983,6 +991,13 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             // 积分奖励
             case 2:
                 return sendIntegralReward(param,user, log, config);
+            // 红包+积分
+            case 3:
+                R sendRed = sendRedPacketReward(param, user, log, video, config);
+                if (!Objects.equals(sendRed.get("code"), 200)) {
+                    return sendRed;
+                }
+                return sendIntegralReward(param,user, log, config);
             default:
                 return R.error("参数错误!");
         }
@@ -1193,7 +1208,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
 //            if (company.getCourseMiniAppId()==null){
 //                return R.error("销售公司参数错误,未绑定小程序");
 //            }
-            if (user.getMpOpenId()!=null){
+            if (user.getMpOpenId()!=null&&!isNewWxMerchant){
                 packetParam.setOpenId(user.getMpOpenId());
             }else {
                 FsUserWx fsUserWx = fsUserWxService.selectByAppIdAndUserId(param.getAppId(),user.getUserId(),1);
@@ -1564,20 +1579,31 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             return ResponseResult.fail(405,"当前销售不存在");
         }
 
-        //判断:1、如果没有绑定销售,就返回给客服的微信图片;
-        //2、如果只绑定了当前销售,需要添加看课记录(正常流程);
-        //3、以上都不是,则标识重粉,需要加入关系表,并打上重粉标签
-        FsUserCompanyUser userCompanyUser = userCompanyUserService.selectByUserIdAndProjectId(fsUser.getUserId(), param.getProjectId());
+        // 获取课程所属项目id
+        FsUserCourse fsUserCourse = fsUserCourseMapper.selectFsUserCourseByCourseId(param.getCourseId());
+        Long courseProject = fsUserCourse.getProject();
+        if(Objects.isNull(courseProject)){
+            return ResponseResult.fail(504, "课程配置错误,项目归属为空,课程ID: " + param.getCourseId());
+        }
+
+        // 查询【用户-项目】关系
+        FsUserCompanyUser userCompanyUser = userCompanyUserService.selectByUserIdAndProjectId(fsUser.getUserId(), courseProject);
+
+        // 添加逻辑:如果存在fs_user表数据,但是又不存在fs_user_company_user表,则表示是以前企微看课的,需要手动绑定
         if(Objects.isNull(userCompanyUser)) {
-            Company company = companyService.selectCompanyById(param.getCompanyId());
-            if((companyUser.getIsAllowedAllRegister() !=null && companyUser.getIsAllowedAllRegister() != 1)){
-                return ResponseResult.fail(504,"当前销售禁止绑定会员,请联系销售!");
-            }
-            if (companyUser.getIsNeedRegisterMember() == null || companyUser.getIsNeedRegisterMember() == 1){
-                return ResponseResult.fail(504,"请联系销售发送邀请链接成为会员!");
+            if(fsUser.getCompanyUserId() == null && fsUser.getIsAddQw() == 1){
+                userCompanyUser = userCompanyUserService.bindRelationship(fsUser.getUserId(), courseProject, param.getCompanyId(), param.getCompanyUserId(), 1);
+            }else {
+                Company company = companyService.selectCompanyById(param.getCompanyId());
+                if((companyUser.getIsAllowedAllRegister() !=null && companyUser.getIsAllowedAllRegister() != 1)){
+                    return ResponseResult.fail(504,"当前销售禁止绑定会员,请联系销售!");
+                }
+                if (companyUser.getIsNeedRegisterMember() == null || companyUser.getIsNeedRegisterMember() == 1){
+                    return ResponseResult.fail(504,"请联系销售发送邀请链接成为会员!");
+                }
+                int defaultStatus = (company != null ? company.getFsUserIsDefaultBlack() : 0) == 1 ? 0 : 1;
+                userCompanyUser = userCompanyUserService.bindRelationship(param.getUserId(), courseProject, companyUser.getCompanyId(), companyUser.getUserId(), defaultStatus);
             }
-            int defaultStatus = (company != null ? company.getFsUserIsDefaultBlack() : 0) == 1 ? 0 : 1;
-            userCompanyUser = userCompanyUserService.bindRelationship(param.getUserId(), param.getProjectId(), companyUser.getCompanyId(), companyUser.getUserId(), defaultStatus);
         }
 
         // 逻辑调整:如果会员已经绑定了销售,直接提示,不添加重粉数据了-2025年6月16日14点53分
@@ -1602,25 +1628,16 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
         //查询看课记录
 //        FsCourseWatchLog watchCourseVideo = courseWatchLogMapper.getWatchCourseVideoByFsUser(param.getUserId(), param.getVideoId(), param.getCompanyUserId());
         FsCourseWatchLog watchCourseVideo = courseWatchLogMapper.getCourseWatchLogByUser(param.getUserId(), param.getVideoId());
-        // 获取课程所属项目id
-        FsUserCourse fsUserCourse = fsUserCourseMapper.selectFsUserCourseByCourseId(param.getCourseId());
-        Long courseProject = null;
-        if(fsUserCourse != null){
-            courseProject = fsUserCourse.getProject();
-        }
-
-        // 项目校验
-        if (Objects.isNull(courseProject) || !courseProject.equals(param.getProjectId())) {
-            return ResponseResult.fail(504, "课程项目不匹配");
-        }
 
         if (!isUserCoursePeriodValid(param)) {
             return ResponseResult.fail(504, "请观看最新的课程项目");
         }
         // 项目看课数限制
-        Integer logCount = fsUserCourseMapper.selectTodayCourseWatchLogCountByUserIdAndProjectId(param.getUserId(), param.getProjectId());
-        if (Objects.isNull(watchCourseVideo) && logCount > 0) {
-            return ResponseResult.fail(504, "超过项目看课数量限制");
+        if(!"福本源".equals(signProjectName) && !"宽益堂".equals(signProjectName)) {
+            Integer logCount = fsUserCourseMapper.selectTodayCourseWatchLogCountByUserIdAndProjectId(param.getUserId(), courseProject);
+            if (Objects.isNull(watchCourseVideo) && logCount > 0) {
+                return ResponseResult.fail(504, "超过项目看课数量限制");
+            }
         }
 
         //添加判断:该用户是否已经存在此课程的看课记录,并且看课记录的销售id不是传入的销售id

+ 74 - 0
fs-service/src/main/java/com/fs/his/domain/FsFirstDiagnosis.java

@@ -0,0 +1,74 @@
+package com.fs.his.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 初诊单对象 fs_first_diagnosis
+ *
+ * @author fs
+ * @date 2025-09-01
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FsFirstDiagnosis extends BaseEntity{
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 患者姓名 */
+    @Excel(name = "患者姓名")
+    private String patientName;
+
+    /** 年龄 */
+    @Excel(name = "年龄")
+    private String age;
+
+    /** 0-未知 1-男性 2-女性 */
+    @Excel(name = "0-未知 1-男性 2-女性")
+    private Long gender;
+
+    /** 电话 */
+    @Excel(name = "电话")
+    private String phone;
+
+    /** 身体状况 */
+    @Excel(name = "身体状况")
+    private String physicalCondition;
+
+    /** 日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date dateTime;
+
+    /** 出版诊断 */
+    @Excel(name = "出版诊断")
+    private String firstDiagnosis;
+
+    /** 医生id */
+    @Excel(name = "医生id")
+    private Long doctorId;
+
+    /** 医生名称 */
+    @Excel(name = "医生名称")
+    private String doctorName;
+
+    /** 职称 */
+    @Excel(name = "职称")
+    private String doctorDep;
+
+    /** 用户id */
+    @Excel(name = "用户id")
+    private Long userId;
+
+    /** 医生证号 */
+    @Excel(name = "医生证号")
+    private String doctorCertificate;
+
+
+}

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

@@ -195,7 +195,7 @@ public interface FsDoctorMapper
     List<OptionsVO> selectAllfollowDoctorList();
     @Select("select account from fs_doctor where doctor_id=#{id} ")
     String selectFsDoctorNameByDoctorId(Long id);
-    @Select("select doctor_id id,doctor_name name from fs_doctor where doctor_type =1 ")
+    @Select("select doctor_id id,doctor_name name,position,certificate_code from fs_doctor where doctor_type =1 ")
     List<UserVo> selectAllDocVoList();
 
     @Select("SELECT doctor_id id,doctor_name name  FROM fs_doctor WHERE FIND_IN_SET(doctor_id, (select doctor_ids from company where company_id=#{companyId})); ")

+ 68 - 0
fs-service/src/main/java/com/fs/his/mapper/FsFirstDiagnosisMapper.java

@@ -0,0 +1,68 @@
+package com.fs.his.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.his.domain.FsFirstDiagnosis;
+
+/**
+ * 初诊单Mapper接口
+ * 
+ * @author fs
+ * @date 2025-09-01
+ */
+public interface FsFirstDiagnosisMapper extends BaseMapper<FsFirstDiagnosis>{
+    /**
+     * 查询初诊单
+     * 
+     * @param id 初诊单主键
+     * @return 初诊单
+     */
+    FsFirstDiagnosis selectFsFirstDiagnosisById(Long id);
+
+    /**
+     * 查询初诊单列表
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 初诊单集合
+     */
+    List<FsFirstDiagnosis> selectFsFirstDiagnosisList(FsFirstDiagnosis fsFirstDiagnosis);
+
+    /**
+     * 新增初诊单
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 结果
+     */
+    int insertFsFirstDiagnosis(FsFirstDiagnosis fsFirstDiagnosis);
+
+    /**
+     * 修改初诊单
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 结果
+     */
+    int updateFsFirstDiagnosis(FsFirstDiagnosis fsFirstDiagnosis);
+
+    /**
+     * 删除初诊单
+     * 
+     * @param id 初诊单主键
+     * @return 结果
+     */
+    int deleteFsFirstDiagnosisById(Long id);
+
+    /**
+     * 批量删除初诊单
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteFsFirstDiagnosisByIds(Long[] ids);
+
+    /**
+     * 根据用户id查询初诊单
+     * @param userId 用户id
+     * @return 初诊单数据
+     */
+    FsFirstDiagnosis getByUserId(Long userId);
+}

+ 68 - 0
fs-service/src/main/java/com/fs/his/service/IFsFirstDiagnosisService.java

@@ -0,0 +1,68 @@
+package com.fs.his.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.his.domain.FsFirstDiagnosis;
+
+/**
+ * 初诊单Service接口
+ * 
+ * @author fs
+ * @date 2025-09-01
+ */
+public interface IFsFirstDiagnosisService extends IService<FsFirstDiagnosis>{
+    /**
+     * 查询初诊单
+     * 
+     * @param id 初诊单主键
+     * @return 初诊单
+     */
+    FsFirstDiagnosis selectFsFirstDiagnosisById(Long id);
+
+    /**
+     * 查询初诊单列表
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 初诊单集合
+     */
+    List<FsFirstDiagnosis> selectFsFirstDiagnosisList(FsFirstDiagnosis fsFirstDiagnosis);
+
+    /**
+     * 新增初诊单
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 结果
+     */
+    int insertFsFirstDiagnosis(FsFirstDiagnosis fsFirstDiagnosis);
+
+    /**
+     * 修改初诊单
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 结果
+     */
+    int updateFsFirstDiagnosis(FsFirstDiagnosis fsFirstDiagnosis);
+
+    /**
+     * 批量删除初诊单
+     * 
+     * @param ids 需要删除的初诊单主键集合
+     * @return 结果
+     */
+    int deleteFsFirstDiagnosisByIds(Long[] ids);
+
+    /**
+     * 删除初诊单信息
+     * 
+     * @param id 初诊单主键
+     * @return 结果
+     */
+    int deleteFsFirstDiagnosisById(Long id);
+
+/**
+ * 根据用户ID获取首次诊断信息
+ * @param userId 用户ID
+ * @return 返回对应的首次诊断信息对象,如果不存在则可能返回null
+ */
+    FsFirstDiagnosis getByUserId(Long userId);
+}

+ 17 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsDiseaseServiceImpl.java

@@ -9,6 +9,8 @@ import com.fs.his.vo.FsDiseaseListUVO;
 import com.fs.his.vo.FsDiseaseListVO;
 import com.fs.his.vo.FsDiseaseVO;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Caching;
 import org.springframework.stereotype.Service;
 import com.fs.his.mapper.FsDiseaseMapper;
 import com.fs.his.domain.FsDisease;
@@ -57,6 +59,7 @@ public class FsDiseaseServiceImpl implements IFsDiseaseService
      * @return 结果
      */
     @Override
+    @CacheEvict(value = "getDiseaseList",allEntries = true)
     public int insertFsDisease(FsDisease fsDisease)
     {
         FsDisease fsDisease1 = fsDiseaseMapper.selectFsDiseaseBydiseaseCode(fsDisease.getDiseaseCode());
@@ -75,6 +78,10 @@ public class FsDiseaseServiceImpl implements IFsDiseaseService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getDiseaseList", allEntries = true),
+            @CacheEvict(value = "getDiseaseById", key = "#fsDisease.diseaseId")
+    })
     public int updateFsDisease(FsDisease fsDisease)
     {
         FsDisease fsDisease1 = fsDiseaseMapper.selectFsDiseaseBydiseaseCode(fsDisease.getDiseaseCode());
@@ -93,6 +100,11 @@ public class FsDiseaseServiceImpl implements IFsDiseaseService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getDiseaseList", allEntries = true),
+            @CacheEvict(value = "getDiseaseById",
+                    key = "#diseaseIds")
+    })
     public int deleteFsDiseaseByDiseaseIds(Long[] diseaseIds)
     {
         return fsDiseaseMapper.deleteFsDiseaseByDiseaseIds(diseaseIds);
@@ -105,6 +117,11 @@ public class FsDiseaseServiceImpl implements IFsDiseaseService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getDiseaseList", allEntries = true),
+            @CacheEvict(value = "getDiseaseById",
+                    key = "diseaseId")
+    })
     public int deleteFsDiseaseByDiseaseId(Long diseaseId)
     {
         return fsDiseaseMapper.deleteFsDiseaseByDiseaseId(diseaseId);

+ 18 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsFamousPrescribeServiceImpl.java

@@ -11,6 +11,8 @@ import com.fs.his.vo.FsFamousPrescribeExecelVO;
 import com.fs.his.vo.FsFamousPrescribeListUVO;
 import com.fs.his.vo.FsFamousPrescribeListVO;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Caching;
 import org.springframework.stereotype.Service;
 import com.fs.his.mapper.FsFamousPrescribeMapper;
 import com.fs.his.domain.FsFamousPrescribe;
@@ -59,6 +61,7 @@ public class FsFamousPrescribeServiceImpl implements IFsFamousPrescribeService
      * @return 结果
      */
     @Override
+    @CacheEvict(value = "getFamousPrescribeList",allEntries = true)
     public int insertFsFamousPrescribe(FsFamousPrescribe fsFamousPrescribe)
     {
         fsFamousPrescribe.setCreateTime(DateUtils.getNowDate());
@@ -72,6 +75,10 @@ public class FsFamousPrescribeServiceImpl implements IFsFamousPrescribeService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getFamousPrescribeList", allEntries = true),
+            @CacheEvict(value = "getFamousPrescribeById", key = "#fsFamousPrescribe.id")
+    })
     public int updateFsFamousPrescribe(FsFamousPrescribe fsFamousPrescribe)
     {
         return fsFamousPrescribeMapper.updateFsFamousPrescribe(fsFamousPrescribe);
@@ -84,6 +91,11 @@ public class FsFamousPrescribeServiceImpl implements IFsFamousPrescribeService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getFamousPrescribeList", allEntries = true),
+            @CacheEvict(value = "getFamousPrescribeById",
+                    key = "#ids")
+    })
     public int deleteFsFamousPrescribeByIds(Long[] ids)
     {
         return fsFamousPrescribeMapper.deleteFsFamousPrescribeByIds(ids);
@@ -96,6 +108,11 @@ public class FsFamousPrescribeServiceImpl implements IFsFamousPrescribeService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getFamousPrescribeList", allEntries = true),
+            @CacheEvict(value = "getFamousPrescribeById",
+                    key = "#id")
+    })
     public int deleteFsFamousPrescribeById(Long id)
     {
         return fsFamousPrescribeMapper.deleteFsFamousPrescribeById(id);
@@ -107,6 +124,7 @@ public class FsFamousPrescribeServiceImpl implements IFsFamousPrescribeService
     }
 
     @Override
+    @CacheEvict(value = "getFamousPrescribeList",allEntries = true)
     public String importData(List<FsFamousPrescribeExecelVO> list) {
         if (com.fs.common.utils.StringUtils.isNull(list) || list.size() == 0)
         {

+ 99 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsFirstDiagnosisServiceImpl.java

@@ -0,0 +1,99 @@
+package com.fs.his.service.impl;
+
+import java.util.List;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.his.mapper.FsFirstDiagnosisMapper;
+import com.fs.his.domain.FsFirstDiagnosis;
+import com.fs.his.service.IFsFirstDiagnosisService;
+
+/**
+ * 初诊单Service业务层处理
+ * 
+ * @author fs
+ * @date 2025-09-01
+ */
+@Service
+public class FsFirstDiagnosisServiceImpl extends ServiceImpl<FsFirstDiagnosisMapper, FsFirstDiagnosis> implements IFsFirstDiagnosisService {
+
+    /**
+     * 查询初诊单
+     * 
+     * @param id 初诊单主键
+     * @return 初诊单
+     */
+    @Override
+    public FsFirstDiagnosis selectFsFirstDiagnosisById(Long id)
+    {
+        return baseMapper.selectFsFirstDiagnosisById(id);
+    }
+
+    /**
+     * 查询初诊单列表
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 初诊单
+     */
+    @Override
+    public List<FsFirstDiagnosis> selectFsFirstDiagnosisList(FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        return baseMapper.selectFsFirstDiagnosisList(fsFirstDiagnosis);
+    }
+
+    /**
+     * 新增初诊单
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 结果
+     */
+    @Override
+    public int insertFsFirstDiagnosis(FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        fsFirstDiagnosis.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertFsFirstDiagnosis(fsFirstDiagnosis);
+    }
+
+    /**
+     * 修改初诊单
+     * 
+     * @param fsFirstDiagnosis 初诊单
+     * @return 结果
+     */
+    @Override
+    public int updateFsFirstDiagnosis(FsFirstDiagnosis fsFirstDiagnosis)
+    {
+        fsFirstDiagnosis.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateFsFirstDiagnosis(fsFirstDiagnosis);
+    }
+
+    /**
+     * 批量删除初诊单
+     * 
+     * @param ids 需要删除的初诊单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsFirstDiagnosisByIds(Long[] ids)
+    {
+        return baseMapper.deleteFsFirstDiagnosisByIds(ids);
+    }
+
+    /**
+     * 删除初诊单信息
+     * 
+     * @param id 初诊单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsFirstDiagnosisById(Long id)
+    {
+        return baseMapper.deleteFsFirstDiagnosisById(id);
+    }
+
+    @Override
+    public FsFirstDiagnosis getByUserId(Long userId) {
+        return baseMapper.getByUserId(userId);
+    }
+}

+ 18 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsMedicatedFoodServiceImpl.java

@@ -11,6 +11,8 @@ import com.fs.his.domain.FsStoreOrder;
 import com.fs.his.param.FsMedicateFoodListUParam;
 import com.fs.his.vo.*;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Caching;
 import org.springframework.stereotype.Service;
 import com.fs.his.mapper.FsMedicatedFoodMapper;
 import com.fs.his.domain.FsMedicatedFood;
@@ -60,6 +62,7 @@ public class FsMedicatedFoodServiceImpl implements IFsMedicatedFoodService
      * @return 结果
      */
     @Override
+    @CacheEvict(value = "getMedicatedFoodList",allEntries = true)
     public int insertFsMedicatedFood(FsMedicatedFood fsMedicatedFood)
     {
         fsMedicatedFood.setCreateTime(DateUtils.getNowDate());
@@ -73,6 +76,10 @@ public class FsMedicatedFoodServiceImpl implements IFsMedicatedFoodService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getMedicatedFoodList", allEntries = true),
+            @CacheEvict(value = "getMedicatedFoodById", key = "#fsMedicatedFood.id")
+    })
     public int updateFsMedicatedFood(FsMedicatedFood fsMedicatedFood)
     {
         return fsMedicatedFoodMapper.updateFsMedicatedFood(fsMedicatedFood);
@@ -84,6 +91,11 @@ public class FsMedicatedFoodServiceImpl implements IFsMedicatedFoodService
      * @param ids 需要删除的药膳食疗主键
      * @return 结果
      */
+    @Caching(evict = {
+            @CacheEvict(value = "getMedicatedFoodList", allEntries = true),
+            @CacheEvict(value = "getMedicatedFoodById",
+                    key = "#ids")
+    })
     @Override
     public int deleteFsMedicatedFoodByIds(Long[] ids)
     {
@@ -97,6 +109,11 @@ public class FsMedicatedFoodServiceImpl implements IFsMedicatedFoodService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getMedicatedFoodList", allEntries = true),
+            @CacheEvict(value = "getMedicatedFoodById",
+                    key = "id")
+    })
     public int deleteFsMedicatedFoodById(Long id)
     {
         return fsMedicatedFoodMapper.deleteFsMedicatedFoodById(id);
@@ -108,6 +125,7 @@ public class FsMedicatedFoodServiceImpl implements IFsMedicatedFoodService
     }
     @SuppressWarnings("all")
     @Override
+    @CacheEvict(value = "getChineseMedicineList",allEntries = true)
     public String importDataMedicatedFoodExcel(List<FsMedicatedFood> list, boolean updateSupport) {
         if (com.fs.common.utils.StringUtils.isNull(list) || list.size() == 0)
         {

+ 16 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsVesselServiceImpl.java

@@ -10,6 +10,8 @@ import com.fs.his.vo.FsVesselListUVO;
 import com.fs.his.vo.FsVesselListVO;
 import com.fs.his.vo.OptionsVO;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Caching;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -57,6 +59,7 @@ public class FsVesselServiceImpl implements IFsVesselService
      * @return 结果
      */
     @Override
+    @CacheEvict(value = "getVesselList",allEntries = true)
     public int insertFsVessel(FsVessel fsVessel)
     {
         fsVessel.setCreateTime(DateUtils.getNowDate());
@@ -70,6 +73,10 @@ public class FsVesselServiceImpl implements IFsVesselService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getVesselList", allEntries = true),
+            @CacheEvict(value = "getVesselById", key = "#fsVessel.id")
+    })
     public int updateFsVessel(FsVessel fsVessel)
     {
         return fsVesselMapper.updateFsVessel(fsVessel);
@@ -82,6 +89,10 @@ public class FsVesselServiceImpl implements IFsVesselService
      * @return 结果
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(value = "getVesselList", allEntries = true),
+            @CacheEvict(value = "getVesselById", key = "#ids")
+    })
     public int deleteFsVesselByIds(Long[] ids)
     {
         return fsVesselMapper.deleteFsVesselByIds(ids);
@@ -93,6 +104,10 @@ public class FsVesselServiceImpl implements IFsVesselService
      * @param id 经络管理主键
      * @return 结果
      */
+    @Caching(evict = {
+            @CacheEvict(value = "getVesselList", allEntries = true),
+            @CacheEvict(value = "getVesselById", key = "id")
+    })
     @Override
     public int deleteFsVesselById(Long id)
     {
@@ -105,6 +120,7 @@ public class FsVesselServiceImpl implements IFsVesselService
     }
 
     @Override
+    @CacheEvict(value = "getVesselList",allEntries = true)
     public String importData(List<FsVessel> list) {
         if (com.fs.common.utils.StringUtils.isNull(list) || list.size() == 0)
         {

+ 2 - 0
fs-service/src/main/java/com/fs/his/vo/UserVo.java

@@ -6,4 +6,6 @@ import lombok.Data;
 public class UserVo {
     Long id;
     String name;
+    String position;
+    String certificateCode;
 }

+ 1 - 1
fs-service/src/main/java/com/fs/sop/mapper/SopUserLogsMapper.java

@@ -115,7 +115,7 @@ public interface SopUserLogsMapper {
     @Select("<script>" +
             "select li.sop_id,li.external_contact_id,li.qw_user_id,li.corp_id,li.external_id,li.external_user_name,li.fs_user_id,ul.start_time,li.is_days_not_study " +
             "from sop_user_logs ul  " +
-            "left join  sop_user_logs_info li on ul.id=li.user_logs_id " +
+            "INNER join  sop_user_logs_info li on ul.id=li.user_logs_id " +
             "        WHERE ul.id IN\n" +
             "        <foreach collection=\"ids\" item=\"id\" open=\"(\" separator=\",\" close=\")\">\n" +
             "            #{id}\n" +

+ 24 - 10
fs-service/src/main/java/com/fs/sop/service/impl/SopUserLogsInfoServiceImpl.java

@@ -744,9 +744,17 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
                 return R.error().put("msg","企业微信用户不存在:"+qwUserId);
             }
 
+            if (qwUser.getCompanyUserId() == null) {
+                return R.error().put("msg","企业微信用户不存在未绑定销售-请绑定后重试:"+qwUser.getQwUserName()+"|"+qwUser.getQwUserId());
+            }
+            if (qwUser.getCompanyId() == null) {
+                return R.error().put("msg","企业微信用户不存在未绑定销售公司-请绑定后重试:"+qwUser.getQwUserName()+"|"+qwUser.getQwUserId());
+            }
+
             String companyUserId = String.valueOf(qwUser.getCompanyUserId()).trim();
             String companyId = String.valueOf(qwUser.getCompanyId()).trim();
 
+
             //域名
 //            String domainName = companyUserMapper.selectDomainByUserId(Long.parseLong(companyUserId));
 //            if (StringUtils.isEmpty(domainName)){
@@ -1028,14 +1036,20 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
                 log.error("员工信息用户不存在:" + key.getKey()+",企业id:"+key.getValue());
             }else {
 
-                List<QwSopLogs> sopLogsList = processInsertSopUserLogsInfo(logs, qwUser, param, words, config, qwCompany, finalSort,
-                        finalSendType,miniMap );
+                if (qwUser.getCompanyUserId()!=null && qwUser.getCompanyId()!=null){
+                    List<QwSopLogs> sopLogsList = processInsertSopUserLogsInfo(logs, qwUser, param, words, config, qwCompany, finalSort,
+                            finalSendType,miniMap );
 
-                //批量插入 发送记录
-                if (!sopLogsList.isEmpty()) {
-                    processAndInsertQwSopLogsBySendMsg(sopLogsList);
+                    //批量插入 发送记录
+                    if (!sopLogsList.isEmpty()) {
+                        processAndInsertQwSopLogsBySendMsg(sopLogsList);
+                    }
+
+                }else {
+                    log.error("员工未绑定销售账号 请先绑定 :" + qwUser.getQwUserName()+",账号id:"+qwUser.getQwUserId());
                 }
 
+
             }
 
         });
@@ -1063,12 +1077,12 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
         List<QwSopLogs> sopLogsList=new ArrayList<>();
 
         //域名
-        String domainName = companyUserMapper.selectDomainByUserId(qwUser.getCompanyUserId());
-        if (StringUtils.isEmpty(domainName)){
-            domainName = config.getRealLinkDomainName();
-        }
+//        String domainName = companyUserMapper.selectDomainByUserId(qwUser.getCompanyUserId());
+//        if (StringUtils.isEmpty(domainName)){
+//            domainName = config.getRealLinkDomainName();
+//        }
 
-        String finalDomainName = domainName;
+        String finalDomainName = "domainName";
 
         sopUserLogsInfos.forEach(item->{
 

+ 3 - 1
fs-service/src/main/java/com/fs/statis/service/impl/FsStatisSalerWatchServiceImpl.java

@@ -357,7 +357,9 @@ public class FsStatisSalerWatchServiceImpl implements FsStatisSalerWatchService
 
         // 写入企微重粉数和看课重粉数临时表
         List<FsStatisTempFsuser> tempData = fsStatisSalerWatchMapper.querySopRepeatData(date);
-        fsStatisTempFsuserMapper.insertBatch(tempData);
+        if (tempData != null && !tempData.isEmpty()) {
+            fsStatisTempFsuserMapper.insertBatch(tempData);
+        }
         // 生成企微重粉数和看课重粉数
         fsStatisSalerWatchMapper.generateSopData(date);
         // 清空临时表

+ 18 - 21
fs-service/src/main/java/com/fs/wxwork/service/WxWorkServiceNew.java

@@ -1,6 +1,5 @@
 package com.fs.wxwork.service;
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.TypeReference;
 import com.fs.common.core.redis.RedisCache;
 import com.fs.common.exception.CustomException;
@@ -16,9 +15,7 @@ import com.fs.wxwork.dto.*;
 import com.fs.wxwork.utils.WxWorkHttpUtil;
 import com.fs.wxwork.utils.WxWorkHttpUtilNew;
 import lombok.AllArgsConstructor;
-import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -51,53 +48,53 @@ public class WxWorkServiceNew {
     public WxWorkResponseDTO<WxWorkInitRespDTO> init(WxWorkInitDTO param,Long serverId) {
         String url = getUrl(serverId) + "/init";
         return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxWorkInitRespDTO>>() {
-        });
+        }, serverId);
     }
 
     public WxWorkResponseDTO<WxWorkSendTextMsgRespDTO> SendTextMsg(WxWorkSendTextMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendTextMsg";
         return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxWorkSendTextMsgRespDTO>>() {
-        });
+        }, serverId);
     }
 
 
     public WxWorkResponseDTO<WxWorkSendAppMsgRespDTO> SendAppMsg(WxWorkSendAppMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendAppMsg";
         return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxWorkSendAppMsgRespDTO>>() {
-        });
+        }, serverId);
     }
 
 
     public WxWorkResponseDTO<WxwSendLinkMsgRespDTO> SendLinkMsg(WxwSendLinkMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendLinkMsg";
         return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendLinkMsgRespDTO>>() {
-        });
+        }, serverId);
     }
 
     public WxWorkResponseDTO<WxwSendCDNImgMsgRespDTO> SendCDNImgMsg(WxwSendCDNImgMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendCDNImgMsg";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNImgMsgRespDTO>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNImgMsgRespDTO>>() {}, serverId);
 
     }
 
     public WxWorkResponseDTO<WxwSendCDNFileMsgRespDTO> SendCDNFileMsg(WxwSendCDNFileMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendCDNFileMsg";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNFileMsgRespDTO>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNFileMsgRespDTO>>() {}, serverId);
     }
 
     public WxWorkResponseDTO<WxwSendCDNVoiceMsgRespDTO> SendCDNVoiceMsg(WxwSendCDNVoiceMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendCDNVoiceMsg";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNVoiceMsgRespDTO>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNVoiceMsgRespDTO>>() {}, serverId);
     }
 
     public WxWorkResponseDTO<WxwSendCDNVideoMsgRespDTO> SendCDNVideoMsg(WxwSendCDNVideoMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendCDNVideoMsg";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNVideoMsgRespDTO>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendCDNVideoMsgRespDTO>>() {}, serverId);
     }
 
     public WxWorkResponseDTO<WxwSendVideoNumberRespDTO> SendVideoNumber(WxwSendVideoNumberMsgDTO param,Long serverId) {
         String url = getUrl(serverId) + "/SendVideoNumber";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendVideoNumberRespDTO>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwSendVideoNumberRespDTO>>() {}, serverId);
     }
 
     public String getCorpId(String uuid, Long corpId,Long serverId) {
@@ -111,7 +108,7 @@ public class WxWorkServiceNew {
         param.setUuid(uuid);
         param.setCorpid(corpId);
 
-        WxWorkResponseDTO<WxWorkCorpRespDTO> listWxWorkResponseDTO = WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxWorkCorpRespDTO>>() {});
+        WxWorkResponseDTO<WxWorkCorpRespDTO> listWxWorkResponseDTO = WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxWorkCorpRespDTO>>() {}, serverId);
         WxWorkCorpRespDTO data = listWxWorkResponseDTO.getData();
         List<WxWorkCorpRespDTO.CorpInfo> list = data.getList();
         if (list != null && !list.isEmpty()) {
@@ -134,18 +131,18 @@ public class WxWorkServiceNew {
     public WxWorkResponseDTO<WxwUploadCdnLinkFileRespDTO> uploadCdnLinkFile(WxwUploadCdnLinkFileDTO param, Long serverId) {
 
         String url = getUrl(serverId) + "/UploadCdnLinkFile";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwUploadCdnLinkFileRespDTO>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwUploadCdnLinkFileRespDTO>>() {}, serverId);
     }
 
     public WxWorkResponseDTO<List<WxWorkVid2UserIdRespDTO>> UserId2Vid(WxWorkUserId2VidDTO param,Long serverId) {
         String url = getUrl(serverId) + "/UserId2Vid";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<List<WxWorkVid2UserIdRespDTO>>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<List<WxWorkVid2UserIdRespDTO>>>() {}, serverId);
     }
 
 
     public WxWorkResponseDTO<WxWorkChatIdToRoomIdResp> ChatIdToRoomId(WxWorkChatIdToRoomIdDTO param, Long serverId) {
         String url = getUrl(serverId) + "/ChatIdToRoomId";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxWorkChatIdToRoomIdResp>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxWorkChatIdToRoomIdResp>>() {}, serverId);
     }
 
     /**
@@ -157,7 +154,7 @@ public class WxWorkServiceNew {
 
     public WxWorkResponseDTO<WxCdnUploadImgLinkResp> cdnUploadImgLink(WxCdnUploadImgLinkDTO param, Long serverId) {
         String url = getUrl(serverId) + "/CdnUploadImgLink";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxCdnUploadImgLinkResp>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxCdnUploadImgLinkResp>>() {}, serverId);
     }
     /**
      * CDN上传网络视频
@@ -168,7 +165,7 @@ public class WxWorkServiceNew {
 
     public WxWorkResponseDTO<WxCdnUploadVideoResp> uploadCdnVideoLink(WxCdnUploadVideoLinkDTO param, Long serverId) {
         String url = getUrl(serverId) + "/UploadCdnVideoLink";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxCdnUploadVideoResp>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxCdnUploadVideoResp>>() {}, serverId);
     }
 
     /**
@@ -185,13 +182,13 @@ public class WxWorkServiceNew {
         param.setAuthkey(authkey.getData().getAuthKey());
         param.setFilekey(authkey.getData().getFilekey());
         String url = getUrl(serverId) + "/BigFileUploadLink";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxBigFileUploadLinkResp>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxBigFileUploadLinkResp>>() {}, serverId);
     }
 
 
     public WxWorkResponseDTO<WxLoginResp> isLogin(WxLoginDTO param, Long serverId) {
         String url = getUrl(serverId) + "/GetRunClientByUuid";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxLoginResp>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxLoginResp>>() {}, serverId);
     }
 
     /**
@@ -202,7 +199,7 @@ public class WxWorkServiceNew {
      */
     public WxWorkResponseDTO<WxGetBigAuthkeyResp> getBigAuthkey(WGetBigAuthkeyDTO param, Long serverId) {
         String url = getUrl(serverId) + "/GetBigAuthkey";
-        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxGetBigAuthkeyResp>>() {});
+        return WxWorkHttpUtilNew.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxGetBigAuthkeyResp>>() {}, serverId);
     }
 
     public void LoginOut(WxWorkGetQrCodeDTO dto, Long serverId) {

+ 13 - 24
fs-service/src/main/java/com/fs/wxwork/utils/WxWorkHttpUtilNew.java

@@ -1,5 +1,6 @@
 package com.fs.wxwork.utils;
 
+import cn.hutool.core.io.IORuntimeException;
 import cn.hutool.core.map.MapUtil;
 import cn.hutool.http.HttpRequest;
 import cn.hutool.http.HttpResponse;
@@ -77,34 +78,17 @@ public class WxWorkHttpUtilNew {
 
         return responseBody;
     }
-
-    /**
-     * 发送POST请求(JSON格式)
-     * @param url 请求URL
-     * @param jsonBody JSON请求体
-     * @return 响应字符串
-     */
-    public static String post(String url, String jsonBody) {
-        return post(url, jsonBody, null);
-    }
-    /**
-     * 发送POST请求(JSON格式)
-     * @param url 请求URL
-     * @param jsonBody JSON请求体
-     * @return 响应字符串
-     */
-    public static String post(String url, Object jsonBody) {
-        return post(url, JSON.toJSONString(jsonBody), null);
-    }
     /**
      * 发送POST请求(JSON格式)
-     * @param url 请求URL
+     *
+     * @param url      请求URL
      * @param jsonBody JSON请求体
+     * @param serverId
      * @return 响应字符串
      */
-    public static <T> T postWithType(String url, Object jsonBody, TypeReference<T> type) {
+    public static <T> T postWithType(String url, Object jsonBody, TypeReference<T> type, Long serverId) {
         String json = JSON.toJSONString(jsonBody);
-        String post = post(url, json, null);
+        String post = post(url, json, null, serverId);
         WxWorkResponseCodeDTO respone = JSON.parseObject(post, WxWorkResponseCodeDTO.class);
         if(respone.getErrcode() != 0){
             log.error("请求服务器地址:{},请求参数:{},返回数据:{},请求时间:{}", url, json, JSON.toJSONString(respone), LocalDateTime.now());
@@ -123,7 +107,7 @@ public class WxWorkHttpUtilNew {
      * @param headers 请求头
      * @return 响应字符串
      */
-    public static String post(String url, String jsonBody, Map<String, String> headers) {
+    public static String post(String url, String jsonBody, Map<String, String> headers, Long serviceId) {
         // 记录请求信息
         logRequest("POST", url, null, jsonBody, headers);
 
@@ -137,7 +121,12 @@ public class WxWorkHttpUtilNew {
         }
 
         // 执行请求并获取响应
-        HttpResponse response = request.execute();
+        HttpResponse response;
+        try {
+            response = request.execute();
+        }catch (IORuntimeException e){
+            return "{\"data\":null,\"errcode\":400,\"errmsg\":\"连接超时,服务器宕机 - serviceId: " + serviceId +"\"}";
+        }
         String responseBody = response.body();
 
         // 记录响应信息

+ 1 - 1
fs-service/src/main/resources/application-config-druid-sft.yml

@@ -80,7 +80,7 @@ cloud_host:
 headerImg:
   imgUrl: https://sft-1361917636.cos.ap-chongqing.myqcloud.com/sft/20250606/b08b1a6212f44f2998423c8c5d7712ee.png
 ipad:
-  ipadUrl: http://ipad.cdwjyyh.com
+  ipadUrl: http://qwipad.cqsft.vip
   aiApi:
 wx_miniapp_temp:
   pay_order_temp_id: V

+ 2 - 0
fs-service/src/main/resources/application-dev.yml

@@ -162,3 +162,5 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 3 - 1
fs-service/src/main/resources/application-druid-bjczwh.yml

@@ -148,4 +148,6 @@ rocketmq:
         secret-key: sk2ff1c6b15b74b888 # 替换为实际的 secretKey
 openIM:
     secret: openIM123
-    userID: imAdmin
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-bnkc.yml

@@ -149,3 +149,5 @@ rocketmq:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 3 - 1
fs-service/src/main/resources/application-druid-drk-test.yml

@@ -140,4 +140,6 @@ rocketmq:
         secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
 openIM:
     secret: openIM123
-    userID: imAdmin
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 3 - 1
fs-service/src/main/resources/application-druid-drk.yml

@@ -140,4 +140,6 @@ rocketmq:
         secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
 openIM:
     secret: openIM123
-    userID: imAdmin
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-fby.yml

@@ -166,3 +166,5 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-hcl.yml

@@ -151,3 +151,5 @@ rocketmq:
 openIM:
     secret: op
     userID: im
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 3 - 1
fs-service/src/main/resources/application-druid-hdt.yml

@@ -152,4 +152,6 @@ rocketmq:
         secret-key: aZS4z!88dNndKTfhITzTpTxRrVUShtH3
 openIM:
     secret: openIM123
-    userID: imAdmin
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-hyt.yml

@@ -153,3 +153,5 @@ rocketmq:
 openIM:
     secret:
     userID:
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 3 - 1
fs-service/src/main/resources/application-druid-hzyy.yml

@@ -165,4 +165,6 @@ token:
     expireTime: 180
 openIM:
     secret: openIM123
-    userID: imAdmin
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-jnmy.yml

@@ -151,3 +151,5 @@ rocketmq:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-jzzx-test.yml

@@ -170,3 +170,5 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-jzzx.yml

@@ -170,3 +170,5 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-kyt.yml

@@ -145,3 +145,5 @@ rocketmq:
 openIM:
   secret: op
   userID: im
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-myhk-test.yml

@@ -153,3 +153,5 @@ rocketmq:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-myhk.yml

@@ -153,3 +153,5 @@ rocketmq:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-qdtst.yml

@@ -166,3 +166,5 @@ token:
 openIM:
     secret:
     userID:
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 144 - 0
fs-service/src/main/resources/application-druid-sft-test.yml

@@ -0,0 +1,144 @@
+
+# 数据源配置
+spring:
+    profiles:
+        include: config-druid-sft,common
+    # redis 配置
+    redis:
+        host: 127.0.0.1
+        port: 6379
+        # 数据库索引
+        database: 0
+        # 密码
+        password:
+        # 连接超时时间
+        timeout: 10s
+        lettuce:
+            pool:
+                # 连接池中的最小空闲连接
+                min-idle: 0
+                # 连接池中的最大空闲连接
+                max-idle: 8
+                # 连接池的最大数据库连接数
+                max-active: 80
+                # #连接池最大阻塞等待时间(使用负值表示没有限制)
+                max-wait: -1ms
+    datasource:
+        mysql:
+            type: com.alibaba.druid.pool.DruidDataSource
+            driverClassName: com.mysql.cj.jdbc.Driver
+            druid:
+                # 主库数据源
+                master:
+                    url: jdbc:mysql://cq-cdb-6k8su00h.sql.tencentcdb.com:25049/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: root
+                    password: Sft13245600*
+                # 从库数据源
+                slave:
+                    # 从数据源开关/默认关闭
+                    enabled: false
+                    url:
+                    username:
+                    password:
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 2000
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+        sop:
+            type: com.alibaba.druid.pool.DruidDataSource
+            driverClassName: com.mysql.cj.jdbc.Driver
+            druid:
+                # 主库数据源
+                master:
+                    url: jdbc:mysql://cq-cdb-6k8su00h.sql.tencentcdb.com:25049/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: root
+                    password: Sft13245600*
+                # 初始连接数
+                initialSize: 5
+                # 最小连接池数量
+                minIdle: 10
+                # 最大连接池数量
+                maxActive: 200
+                # 配置获取连接等待超时的时间
+                maxWait: 60000
+                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+                timeBetweenEvictionRunsMillis: 60000
+                # 配置一个连接在池中最小生存的时间,单位是毫秒
+                minEvictableIdleTimeMillis: 300000
+                # 配置一个连接在池中最大生存的时间,单位是毫秒
+                maxEvictableIdleTimeMillis: 900000
+                # 配置检测连接是否有效
+                validationQuery: SELECT 1 FROM DUAL
+                testWhileIdle: true
+                testOnBorrow: false
+                testOnReturn: false
+                webStatFilter:
+                    enabled: true
+                statViewServlet:
+                    enabled: true
+                    # 设置白名单,不填则允许所有访问
+                    allow:
+                    url-pattern: /druid/*
+                    # 控制台管理用户名和密码
+                    login-username: fs
+                    login-password: 123456
+                filter:
+                    stat:
+                        enabled: true
+                        # 慢SQL记录
+                        log-slow-sql: true
+                        slow-sql-millis: 1000
+                        merge-sql: true
+                    wall:
+                        config:
+                            multi-statement-allow: true
+rocketmq:
+    name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
+    producer:
+        group: my-producer-group
+        access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
+        secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
+    consumer:
+        group: voice-group
+        access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
+        secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
+openIM:
+    secret: openIM123
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 6 - 0
fs-service/src/main/resources/application-druid-sft.yml

@@ -88,6 +88,10 @@ spring:
                     url: jdbc:mysql://172.30.0.15:3306/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                     username: root
                     password: Sft13245600*
+                read:
+                    url: jdbc:mysql://172.30.0.15:3306/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: root
+                    password: Sft13245600*
                 # 初始连接数
                 initialSize: 5
                 # 最小连接池数量
@@ -140,3 +144,5 @@ rocketmq:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-sxjz.yml

@@ -164,3 +164,5 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-syysy.yml

@@ -163,3 +163,5 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 3 - 1
fs-service/src/main/resources/application-druid-whhm.yml

@@ -140,4 +140,6 @@ rocketmq:
         secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
 openIM:
     secret: openIM123
-    userID: imAdmin
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-xfk.yml

@@ -151,3 +151,5 @@ rocketmq:
 openIM:
     secret: o
     userID: i
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 3 - 1
fs-service/src/main/resources/application-druid-xzt.yml

@@ -141,4 +141,6 @@ rocketmq:
         secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
 openIM:
     secret: openIM123
-    userID: imAdmin
+    userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: true

+ 2 - 0
fs-service/src/main/resources/application-druid-zkzh.yml

@@ -142,3 +142,5 @@ cloud_host:
 openIM:
     secret: openIM123
     userID: imAdmin
+#是否为新商户,新商户不走mpOpenId
+isNewWxMerchant: false

+ 126 - 0
fs-service/src/main/resources/mapper/his/FsFirstDiagnosisMapper.xml

@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fs.his.mapper.FsFirstDiagnosisMapper">
+    
+    <resultMap type="FsFirstDiagnosis" id="FsFirstDiagnosisResult">
+        <result property="id"    column="id"    />
+        <result property="patientName"    column="patient_name"    />
+        <result property="age"    column="age"    />
+        <result property="gender"    column="gender"    />
+        <result property="phone"    column="phone"    />
+        <result property="physicalCondition"    column="physical_condition"    />
+        <result property="dateTime"    column="date_time"    />
+        <result property="firstDiagnosis"    column="first_diagnosis"    />
+        <result property="doctorId"    column="doctor_id"    />
+        <result property="doctorName"    column="doctor_name"    />
+        <result property="doctorDep"    column="doctor_dep"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="userId"    column="user_id"    />
+        <result property="doctorCertificate"    column="doctor_certificate"    />
+    </resultMap>
+
+    <sql id="selectFsFirstDiagnosisVo">
+        select id, patient_name, age, gender, phone, physical_condition, date_time, first_diagnosis, doctor_id, doctor_name, doctor_dep, create_time, update_time, user_id, doctor_certificate from fs_first_diagnosis
+    </sql>
+
+    <select id="selectFsFirstDiagnosisList" parameterType="FsFirstDiagnosis" resultMap="FsFirstDiagnosisResult">
+        <include refid="selectFsFirstDiagnosisVo"/>
+        <where>  
+            <if test="patientName != null  and patientName != ''"> and patient_name like concat('%', #{patientName}, '%')</if>
+            <if test="age != null  and age != ''"> and age = #{age}</if>
+            <if test="gender != null "> and gender = #{gender}</if>
+            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
+            <if test="physicalCondition != null  and physicalCondition != ''"> and physical_condition = #{physicalCondition}</if>
+            <if test="dateTime != null "> and date_time = #{dateTime}</if>
+            <if test="firstDiagnosis != null  and firstDiagnosis != ''"> and first_diagnosis = #{firstDiagnosis}</if>
+            <if test="doctorId != null "> and doctor_id = #{doctorId}</if>
+            <if test="doctorName != null  and doctorName != ''"> and doctor_name like concat('%', #{doctorName}, '%')</if>
+            <if test="doctorDep != null  and doctorDep != ''"> and doctor_dep = #{doctorDep}</if>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="doctorCertificate != null  and doctorCertificate != ''"> and doctor_certificate = #{doctorCertificate}</if>
+        </where>
+    </select>
+    
+    <select id="selectFsFirstDiagnosisById" parameterType="Long" resultMap="FsFirstDiagnosisResult">
+        <include refid="selectFsFirstDiagnosisVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertFsFirstDiagnosis" parameterType="FsFirstDiagnosis">
+        insert into fs_first_diagnosis
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="patientName != null">patient_name,</if>
+            <if test="age != null">age,</if>
+            <if test="gender != null">gender,</if>
+            <if test="phone != null">phone,</if>
+            <if test="physicalCondition != null">physical_condition,</if>
+            <if test="dateTime != null">date_time,</if>
+            <if test="firstDiagnosis != null">first_diagnosis,</if>
+            <if test="doctorId != null">doctor_id,</if>
+            <if test="doctorName != null">doctor_name,</if>
+            <if test="doctorDep != null">doctor_dep,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="doctorCertificate != null">doctor_certificate,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="patientName != null">#{patientName},</if>
+            <if test="age != null">#{age},</if>
+            <if test="gender != null">#{gender},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="physicalCondition != null">#{physicalCondition},</if>
+            <if test="dateTime != null">#{dateTime},</if>
+            <if test="firstDiagnosis != null">#{firstDiagnosis},</if>
+            <if test="doctorId != null">#{doctorId},</if>
+            <if test="doctorName != null">#{doctorName},</if>
+            <if test="doctorDep != null">#{doctorDep},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="doctorCertificate != null">#{doctorCertificate},</if>
+         </trim>
+    </insert>
+
+    <update id="updateFsFirstDiagnosis" parameterType="FsFirstDiagnosis">
+        update fs_first_diagnosis
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="patientName != null">patient_name = #{patientName},</if>
+            <if test="age != null">age = #{age},</if>
+            <if test="gender != null">gender = #{gender},</if>
+            <if test="phone != null">phone = #{phone},</if>
+            <if test="physicalCondition != null">physical_condition = #{physicalCondition},</if>
+            <if test="dateTime != null">date_time = #{dateTime},</if>
+            <if test="firstDiagnosis != null">first_diagnosis = #{firstDiagnosis},</if>
+            <if test="doctorId != null">doctor_id = #{doctorId},</if>
+            <if test="doctorName != null">doctor_name = #{doctorName},</if>
+            <if test="doctorDep != null">doctor_dep = #{doctorDep},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="doctorCertificate != null">doctor_certificate = #{doctorCertificate},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteFsFirstDiagnosisById" parameterType="Long">
+        delete from fs_first_diagnosis where id = #{id}
+    </delete>
+
+    <delete id="deleteFsFirstDiagnosisByIds" parameterType="String">
+        delete from fs_first_diagnosis where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="getByUserId" parameterType="Long" resultMap="FsFirstDiagnosisResult">
+        <include refid="selectFsFirstDiagnosisVo"/>
+        where user_id = #{userId}
+    </select>
+</mapper>

+ 23 - 0
fs-user-app/src/main/java/com/fs/app/controller/IndexController.java

@@ -1,6 +1,7 @@
 package com.fs.app.controller;
 
 
+import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.json.JSONUtil;
 import com.fs.app.annotation.Login;
 import com.fs.common.core.domain.R;
@@ -149,5 +150,27 @@ public class IndexController extends AppBaseController {
 		return R.ok().put("data",config);
 	}
 
+	/**
+	 * 启用-关闭小程序销售管理
+	 * @param bock
+	 * @return
+	 */
+	@GetMapping("/queryIsTownOn")
+	public R queryIsTownOn(String bock,String appId)
+	{
+		String key = appId+"start_status_001";
+		String start = redisCache.getCacheObject(key);
+		if (ObjectUtil.isNotEmpty(bock)){
+			if (bock.equals("001")){
+				redisCache.setCacheObject(key,bock);
+				return R.ok("调整成功");
+			}else if (bock.equals("002")){
+				redisCache.setCacheObject(key,bock);
+				return R.ok("调整成功");
+			}
+
+		}
+		return R.ok().put("date",start);
+	}
 
 }