瀏覽代碼

红德堂-给用户发送确认收货地址和就诊人的链接,让用户确认
分页参数位置调整

Long 4 天之前
父節點
當前提交
5cbab02b5a
共有 66 個文件被更改,包括 758 次插入108 次删除
  1. 1 1
      fs-admin/src/main/java/com/fs/course/controller/FsUserCourseVideoController.java
  2. 3 3
      fs-admin/src/main/java/com/fs/crm/controller/CrmCustomerController.java
  3. 1 1
      fs-admin/src/main/java/com/fs/crm/controller/CrmCustomerVisitController.java
  4. 2 1
      fs-admin/src/main/java/com/fs/his/controller/FsStoreOrderController.java
  5. 2 0
      fs-admin/src/main/java/com/fs/his/controller/FsUserAddressController.java
  6. 1 1
      fs-admin/src/main/java/com/fs/qw/controller/QwCompanyController.java
  7. 2 1
      fs-company-app/src/main/java/com/fs/app/controller/CompanyTagController.java
  8. 2 2
      fs-company-app/src/main/java/com/fs/app/controller/CrmController.java
  9. 1 1
      fs-company-app/src/main/java/com/fs/app/controller/CrmCustomerController.java
  10. 1 1
      fs-company-app/src/main/java/com/fs/app/controller/CrmEventController.java
  11. 1 1
      fs-company-app/src/main/java/com/fs/app/controller/CrmMsgController.java
  12. 3 3
      fs-company-app/src/main/java/com/fs/app/controller/FsUserCourseVideoController.java
  13. 1 1
      fs-company-app/src/main/java/com/fs/app/controller/StorePaymentController.java
  14. 1 1
      fs-company-app/src/main/java/com/fs/app/controller/UserController.java
  15. 1 1
      fs-company/src/main/java/com/fs/chat/controller/ChatDatasetController.java
  16. 1 1
      fs-company/src/main/java/com/fs/chat/controller/ChatKeywordController.java
  17. 1 1
      fs-company/src/main/java/com/fs/chat/controller/ChatMsgController.java
  18. 1 1
      fs-company/src/main/java/com/fs/chat/controller/ChatMsgLogsController.java
  19. 1 1
      fs-company/src/main/java/com/fs/chat/controller/ChatRoleController.java
  20. 1 1
      fs-company/src/main/java/com/fs/chat/controller/ChatSessionController.java
  21. 7 6
      fs-company/src/main/java/com/fs/company/controller/crm/CrmCustomerController.java
  22. 1 2
      fs-company/src/main/java/com/fs/company/controller/crm/CrmEventController.java
  23. 1 1
      fs-company/src/main/java/com/fs/company/controller/qw/FsAppContactWayController.java
  24. 1 1
      fs-company/src/main/java/com/fs/company/controller/qw/QwContactWayController.java
  25. 1 1
      fs-company/src/main/java/com/fs/company/controller/qw/QwExternalContactController.java
  26. 1 1
      fs-company/src/main/java/com/fs/company/controller/qw/QwExternalContactTransferLogController.java
  27. 2 2
      fs-company/src/main/java/com/fs/company/controller/qw/QwGroupChatTransferController.java
  28. 1 1
      fs-company/src/main/java/com/fs/company/controller/qw/QwMaterialController.java
  29. 1 1
      fs-company/src/main/java/com/fs/company/controller/qw/QwSopTempController.java
  30. 1 1
      fs-company/src/main/java/com/fs/company/controller/qw/QwUserVoiceLogController.java
  31. 3 3
      fs-company/src/main/java/com/fs/company/controller/qw/QwWorkTaskNewController.java
  32. 3 0
      fs-company/src/main/java/com/fs/company/controller/store/FsUserAddressController.java
  33. 1 3
      fs-qwhook-sop/src/main/java/com/fs/app/controller/ApisQwMaterialBySidebar.java
  34. 2 3
      fs-qwhook-sop/src/main/java/com/fs/app/controller/QwMaterialBySidebar.java
  35. 1 1
      fs-qwhook-sop/src/main/java/com/fs/app/controller/RoomSopController.java
  36. 7 0
      fs-service/src/main/java/com/fs/company/mapper/CompanyUserUserMapper.java
  37. 57 0
      fs-service/src/main/java/com/fs/company/param/HelpAddPatientParam.java
  38. 59 0
      fs-service/src/main/java/com/fs/company/param/HelpAddUserAddressParam.java
  39. 15 3
      fs-service/src/main/java/com/fs/company/service/ICompanyUserService.java
  40. 6 0
      fs-service/src/main/java/com/fs/company/service/ICompanyUserUserService.java
  41. 212 16
      fs-service/src/main/java/com/fs/company/service/impl/CompanyUserServiceImpl.java
  42. 12 0
      fs-service/src/main/java/com/fs/company/service/impl/CompanyUserUserServiceImpl.java
  43. 18 0
      fs-service/src/main/java/com/fs/his/domain/FsPatient.java
  44. 23 1
      fs-service/src/main/java/com/fs/his/domain/FsUserAddress.java
  45. 7 2
      fs-service/src/main/java/com/fs/his/mapper/FsPatientMapper.java
  46. 8 3
      fs-service/src/main/java/com/fs/his/mapper/FsUserAddressMapper.java
  47. 11 1
      fs-service/src/main/java/com/fs/his/service/IFsUserService.java
  48. 62 1
      fs-service/src/main/java/com/fs/his/service/impl/FsUserServiceImpl.java
  49. 39 0
      fs-service/src/main/java/com/fs/his/vo/MyMemberVO.java
  50. 1 1
      fs-service/src/main/resources/application-common.yml
  51. 7 0
      fs-service/src/main/resources/application-config-dev.yml
  52. 24 2
      fs-service/src/main/resources/mapper/company/CompanyUserUserMapper.xml
  53. 13 2
      fs-service/src/main/resources/mapper/his/FsPatientMapper.xml
  54. 11 1
      fs-service/src/main/resources/mapper/his/FsUserAddressMapper.xml
  55. 1 1
      fs-store/src/main/java/com/fs/store/controller/store/FsStoreAfterSalesController.java
  56. 1 1
      fs-store/src/main/java/com/fs/store/controller/store/FsStoreProductController.java
  57. 30 13
      fs-user-app/src/main/java/com/fs/app/controller/CompanyUserController.java
  58. 1 0
      fs-user-app/src/main/java/com/fs/app/controller/PatientController.java
  59. 4 3
      fs-user-app/src/main/java/com/fs/app/controller/TalentController.java
  60. 2 2
      fs-user-app/src/main/java/com/fs/app/controller/UserAddressController.java
  61. 18 0
      fs-user-app/src/main/java/com/fs/app/controller/UserController.java
  62. 20 0
      fs-user-app/src/main/java/com/fs/app/param/ConfirmPatientAndAddressParam.java
  63. 30 0
      fs-user-app/src/main/java/com/fs/app/param/HelpPatientAndAddressParam.java
  64. 2 2
      fs-watch/src/main/java/com/fs/app/controller/WatchController.java
  65. 1 1
      fs-wx-api/src/main/java/com/fs/app/controller/CompanyWxUserController.java
  66. 1 1
      fs-wx-api/src/main/java/com/fs/app/controller/CrmCustomerController.java

+ 1 - 1
fs-admin/src/main/java/com/fs/course/controller/FsUserCourseVideoController.java

@@ -165,7 +165,6 @@ public class FsUserCourseVideoController extends BaseController
     @GetMapping("/getVideoListByCourseId")
     public TableDataInfo getVideoListByCourseId(FsUserCourseVideo fsUserCourseVideo)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         Long userId = loginUser.getUser().getUserId();
         String json = configService.selectConfigByKey("course.config");
@@ -173,6 +172,7 @@ public class FsUserCourseVideoController extends BaseController
         if (ObjectUtil.isNotEmpty(config.getIsBound())&&config.getIsBound()){
             fsUserCourseVideo.setUserId(userId);
         }
+        startPage();
         List<FsUserCourseVideo> list = fsUserCourseVideoService.selectFsUserCourseVideoListByCourseId(fsUserCourseVideo);
         return getDataTable(list);
     }

+ 3 - 3
fs-admin/src/main/java/com/fs/crm/controller/CrmCustomerController.java

@@ -53,8 +53,8 @@ public class CrmCustomerController extends BaseController
     @GetMapping("/lineList")
     public TableDataInfo line(CrmCustomer crmCustomer)
     {
-        startPage();
         crmCustomer.setIsLine(1);
+        startPage();
         List<CrmCustomerListVO> list = crmCustomerService.selectCrmCustomerListVO(crmCustomer);
         return getDataTable(list);
     }
@@ -191,10 +191,10 @@ public class CrmCustomerController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(CrmCustomerListQueryParam crmCustomer)
     {
-        startPage();
         if(!StringUtils.isEmpty(crmCustomer.getReceiveTimeRange())){
             crmCustomer.setReceiveTimeList(crmCustomer.getReceiveTimeRange().split("--"));
         }
+        startPage();
         List<CrmCustomerListVO> list = crmCustomerService.selectCrmCustomerListQueryParam(crmCustomer);
         if (list != null) {
             SysRole sysRole = isCheckPermission();
@@ -240,10 +240,10 @@ public class CrmCustomerController extends BaseController
     @PreAuthorize("@ss.hasPermi('crm:customer:list')")
     @GetMapping("/listAll")
     public R listAll(CrmCustomerListQueryParam crmCustomer){
-        PageHelper.startPage(1, 1000);
         if(!StringUtils.isEmpty(crmCustomer.getReceiveTimeRange())){
             crmCustomer.setReceiveTimeList(crmCustomer.getReceiveTimeRange().split("--"));
         }
+        PageHelper.startPage(1, 1000);
         List<CrmCustomerListVO> list = crmCustomerService.selectCrmCustomerListQueryParam(crmCustomer);
         if (list != null) {
             for (CrmCustomerListVO vo : list) {

+ 1 - 1
fs-admin/src/main/java/com/fs/crm/controller/CrmCustomerVisitController.java

@@ -37,13 +37,13 @@ public class CrmCustomerVisitController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(CrmCustomerVisitListParam param)
     {
-        startPage();
         if(!StringUtils.isEmpty(param.getCreateTimeRange())){
             param.setCustomerCreateTime(param.getCreateTimeRange().split("--"));
         }
         if(!StringUtils.isEmpty(param.getReceiveTimeRange())){
            param.setReceiveTimeList(param.getReceiveTimeRange().split("--"));
         }
+        startPage();
         List<CrmCustomerVisitListVO> list = crmCustomerVisitService.selectCrmCustomerVisitListVO(param);
         return getDataTable(list);
     }

+ 2 - 1
fs-admin/src/main/java/com/fs/his/controller/FsStoreOrderController.java

@@ -131,15 +131,16 @@ public class FsStoreOrderController extends BaseController
     @PostMapping("/list")
     public FsStoreOrderListAndStatisticsVo list(@RequestBody FsStoreOrderParam fsStoreOrder)
     {
-        PageHelper.startPage(fsStoreOrder);
         if (fsStoreOrder.getUserPhoneMk()!=null&& !fsStoreOrder.getUserPhoneMk().isEmpty()){
             fsStoreOrder.setUserPhone(encryptPhone(fsStoreOrder.getUserPhoneMk()));
         }
         List<FsStoreOrderListVO> list;
         if (StringUtils.isNotBlank(fsStoreOrder.getErpAccount())){
             //金牛erp查询
+            PageHelper.startPage(fsStoreOrder);
             list = fsStoreOrderService.selectFsStoreOrderListVOByErpAccount(fsStoreOrder);
         } else {
+            PageHelper.startPage(fsStoreOrder);
             list = fsStoreOrderService.selectFsStoreOrderListVO(fsStoreOrder);
         }
         //金牛需求 区别其他项目 status = 6 (金牛代服管家) ,其他项目请避免使用订单状态status = 6

+ 2 - 0
fs-admin/src/main/java/com/fs/his/controller/FsUserAddressController.java

@@ -49,6 +49,7 @@ public class FsUserAddressController extends BaseController
     public TableDataInfo list(FsUserAddress fsUserAddress)
     {
         startPage();
+        fsUserAddress.setIsConfirm(1);
         List<FsUserAddress> list = fsUserAddressService.selectFsUserAddressList(fsUserAddress);
         for (FsUserAddress userAddress : list) {
             userAddress.setPhone(decryptAutoPhoneMk(userAddress.getPhone()));
@@ -69,6 +70,7 @@ public class FsUserAddressController extends BaseController
         if (fsUserAddressService.isEntityNull(fsUserAddress)){
             return AjaxResult.error("请筛选数据导出");
         }
+        fsUserAddress.setIsConfirm(1);
         Long count = fsUserAddressService.selectFsUserAddressListCount(fsUserAddress);
 
         if (count>30000){

+ 1 - 1
fs-admin/src/main/java/com/fs/qw/controller/QwCompanyController.java

@@ -53,7 +53,6 @@ public class QwCompanyController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(QwCompany qwCompany)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         String json = configService.selectConfigByKey("course.config");
         CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
@@ -61,6 +60,7 @@ public class QwCompanyController extends BaseController
             qwCompany.setCreateDeptId(loginUser.getDeptId());
             qwCompany.setCreateUserId(loginUser.getUserId());
         }
+        startPage();
         List<QwCompany> list = qwCompanyService.selectQwCompanyList(qwCompany);
         return getDataTable(list);
     }

+ 2 - 1
fs-company-app/src/main/java/com/fs/app/controller/CompanyTagController.java

@@ -54,12 +54,13 @@ public class CompanyTagController extends AppBaseController {
             params.put("keyword", keyword.split(","));
         }
 
-        PageHelper.startPage(pageNum, pageSize);
         if (ObjectUtil.isNotEmpty(companyUserId)) {
             params.put("companyUserId", companyUserId);
+            PageHelper.startPage(pageNum, pageSize);
             List<CompanyTag> list = companyTagService.selectCompanyTagByList(params);
             return R.ok().put("data", new PageInfo<>(list));
         } else {
+            PageHelper.startPage(pageNum, pageSize);
             List<CompanyTag> list = companyTagService.selectCompanyTagListByMap(params);
             return R.ok().put("data", new PageInfo<>(list));
         }

+ 2 - 2
fs-company-app/src/main/java/com/fs/app/controller/CrmController.java

@@ -67,11 +67,11 @@ public class CrmController extends  AppBaseController {
 	@GetMapping("/getFullCustomerList")
 	@DataScope(deptAlias = "c",userAlias = "c")
 	public R getFullCustomerList(CrmFullCustomerListQueryParam param){
-		PageHelper.startPage(param.getPage(), param.getPageSize());
 		param.setCompanyId(getCompanyId());
 		if(getCompanyId()==116){   // 河北湘银信息咨询服务有限公司(JZ-1)客户假删除不显示
 			param.setCompanyId(0L);
 		}
+		PageHelper.startPage(param.getPage(), param.getPageSize());
 		List<CrmFullCustomerListQueryVO> list = crmCustomerService.selectCrmFullCustomerListQuery(param);
 		PageInfo<CrmFullCustomerListQueryVO> listPageInfo=new PageInfo<>(list);
 		return R.ok().put("data",listPageInfo);
@@ -81,12 +81,12 @@ public class CrmController extends  AppBaseController {
 	@ApiOperation("获取我的客户列表")
 	@GetMapping("/getMyCustomerList")
 	public R getMyCustomerList(CrmMyCustomerListQueryParam param){
-		PageHelper.startPage(param.getPage(), param.getPageSize());
 		param.setCompanyId(getCompanyId());
 		if(getCompanyId()==116){   // 河北湘银信息咨询服务有限公司(JZ-1)客户假删除不显示
 			param.setCompanyId(0L);
 		}
 		param.setCompanyUserId(Long.parseLong(getUserId()));
+		PageHelper.startPage(param.getPage(), param.getPageSize());
 		List<CrmMyCustomerListQueryVO> list = crmCustomerService.selectCrmMyCustomerListQuery(param);
 		PageInfo<CrmMyCustomerListQueryVO> listPageInfo=new PageInfo<>(list);
 		return R.ok().put("data",listPageInfo);

+ 1 - 1
fs-company-app/src/main/java/com/fs/app/controller/CrmCustomerController.java

@@ -49,8 +49,8 @@ public class CrmCustomerController extends AppBaseController
     public R getLineCustomerList( CrmLineCustomerListQueryParam param)
     {
         CompanyUser user = companyUserService.selectCompanyUserById(Long.parseLong(getUserId()));
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         param.setCompanyId(user.getCompanyId());
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<CrmLineCustomerListQueryVO> list = crmCustomerService.selectCrmLineCustomerListQuery(param);
         if (list != null) {
             for (CrmLineCustomerListQueryVO vo : list) {

+ 1 - 1
fs-company-app/src/main/java/com/fs/app/controller/CrmEventController.java

@@ -51,9 +51,9 @@ public class CrmEventController extends  AppBaseController {
 	@ApiOperation("获取我的事件列表")
 	public R getMyCrmEventList(CrmEventListQueryParam param)
 	{
-		PageHelper.startPage(param.getPage(), PAGE_SIZE);
 		param.setCompanyId(getCompanyId());
 		param.setCompanyUserId(Long.parseLong(getUserId()));
+		PageHelper.startPage(param.getPage(), PAGE_SIZE);
 		List<CrmEventListQueryVO> list = eventService.selectCrmEventListQuery(param);
 		PageInfo<CrmEventListQueryVO> listPageInfo=new PageInfo<>(list);
 		return R.ok().put("data",listPageInfo);

+ 1 - 1
fs-company-app/src/main/java/com/fs/app/controller/CrmMsgController.java

@@ -72,9 +72,9 @@ public class CrmMsgController extends  AppBaseController {
 	@ApiOperation("获取我的消息列表")
 	public R getMsgList(CrmMsgListQueryParam param)
 	{
-		PageHelper.startPage(param.getPage(), PAGE_SIZE);
 		param.setCompanyId(getCompanyId());
 		param.setCompanyUserId(Long.parseLong(getUserId()));
+		PageHelper.startPage(param.getPage(), PAGE_SIZE);
 		List<CrmMsgListQueryVO> list = msgService.selectCrmMsgListQuery(param);
 		PageInfo<CrmMsgListQueryVO> listPageInfo=new PageInfo<>(list);
 		return R.ok().put("data",listPageInfo);

+ 3 - 3
fs-company-app/src/main/java/com/fs/app/controller/FsUserCourseVideoController.java

@@ -81,9 +81,9 @@ public class FsUserCourseVideoController extends AppBaseController {
     @GetMapping("/pageList")
     @ApiOperation("课程分页列表")
     public ResponseResult<PageInfo<FsUserCourseVideoPageListVO>> list(UserCourseVideoPageParam param) {
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         param.setCompanyId(getCompanyId());
         param.setCompanyUserId(Long.parseLong(getUserId()));
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<FsUserCourseVideoPageListVO> list = fsUserCourseVideoService.pageListCourseVideo(param);
         PageInfo<FsUserCourseVideoPageListVO> pageInfo = new PageInfo<>(list);
         return ResponseResult.ok(pageInfo);
@@ -100,8 +100,8 @@ public class FsUserCourseVideoController extends AppBaseController {
     @GetMapping("/courseList")
     @ApiOperation("获取课程下拉列表")
     public ResponseResult<PageInfo<FsUserCourseListVO>> getAllCourseList(FsUserCourseListParam param) {
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         param.setCompanyId(getCompanyId());
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<FsUserCourseListVO> fsUserCourseList = fsUserCourseService.getFsUserCourseList(param);
         PageInfo<FsUserCourseListVO> pageInfo = new PageInfo<>(fsUserCourseList);
         return ResponseResult.ok(pageInfo);
@@ -111,8 +111,8 @@ public class FsUserCourseVideoController extends AppBaseController {
     @GetMapping("/videoList")
     @ApiOperation("获取视频下拉列表")
     public ResponseResult<PageInfo<FsUserVideoListVO>> getAllVideoList(UserCourseVideoPageParam param) {
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         param.setCompanyId(getCompanyId());
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<FsUserVideoListVO> listCourseVideo = fsUserCourseVideoService.getListCourseVideo(param);
         PageInfo<FsUserVideoListVO> result = new PageInfo<>(listCourseVideo);
         return ResponseResult.ok(result);

+ 1 - 1
fs-company-app/src/main/java/com/fs/app/controller/StorePaymentController.java

@@ -45,10 +45,10 @@ public class StorePaymentController extends AppBaseController
     @DataScope(deptAlias = "p",userAlias = "cu")
     public R list(FsStorePaymentParam param)
     {
-        PageHelper.startPage(ServletUtils.getParameterToInt("page"), ServletUtils.getParameterToInt("pageSize"));
         param.setBusinessType(1);
         param.setStatus(1);
         param.setCompanyId(getCompanyId());
+        PageHelper.startPage(ServletUtils.getParameterToInt("page"), ServletUtils.getParameterToInt("pageSize"));
         List<FsStorePaymentVO> list = fsStorePaymentService.selectFsStorePaymentListQueryVO(param);
         PageInfo<FsStorePaymentVO> listPageInfo=new PageInfo<>(list);
         return R.ok().put("data",listPageInfo);

+ 1 - 1
fs-company-app/src/main/java/com/fs/app/controller/UserController.java

@@ -531,9 +531,9 @@ public class UserController extends AppBaseController {
     @ApiOperation("获取我的名片列表")
     @GetMapping("/getMyCardList")
     public R getMyCardList(CompanyUserCardQueryParam param) {
-        PageHelper.startPage(param.getPage(), PAGE_SIZE);
         param.setCompanyId(getCompanyId());
         param.setCompanyUserId(Long.parseLong(getUserId()));
+        PageHelper.startPage(param.getPage(), PAGE_SIZE);
         List<CompanyUserCard> list = companyUserCardService.selectMyCardListQuery(param);
         PageInfo<CompanyUserCard> listPageInfo = new PageInfo<>(list);
         return R.ok().put("data", listPageInfo);

+ 1 - 1
fs-company/src/main/java/com/fs/chat/controller/ChatDatasetController.java

@@ -55,9 +55,9 @@ public class ChatDatasetController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(ChatDatasetCParam chatDataset)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         chatDataset.setCompanyId(loginUser.getCompany().getCompanyId());
+        startPage();
         List<ChatDatasetListCVO> list = chatDatasetService.selectChatDatasetListCVO(chatDataset);
         return getDataTable(list);
     }

+ 1 - 1
fs-company/src/main/java/com/fs/chat/controller/ChatKeywordController.java

@@ -45,9 +45,9 @@ public class ChatKeywordController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(ChatKeyword chatKeyword)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         chatKeyword.setCompanyId(loginUser.getCompany().getCompanyId());
+        startPage();
         List<ChatKeyword> list = chatKeywordService.selectChatKeywordList(chatKeyword);
         return getDataTable(list);
     }

+ 1 - 1
fs-company/src/main/java/com/fs/chat/controller/ChatMsgController.java

@@ -53,9 +53,9 @@ public class ChatMsgController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(ChatMsgListCParam param)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         param.setCompanyId(loginUser.getCompany().getCompanyId());
+        startPage();
         List<ChatMsgListCVO> list = chatMsgService.selectChatMsgListCVO(param);
         return getDataTable(list);
     }

+ 1 - 1
fs-company/src/main/java/com/fs/chat/controller/ChatMsgLogsController.java

@@ -61,9 +61,9 @@ public class ChatMsgLogsController extends BaseController
     @GetMapping("/logsList")
     public R list(ChatMsgLogsListCParam param)
     {
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         param.setCompanyId(loginUser.getCompany().getCompanyId());
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<ChatMsgLogsListCVO> list= chatMsgLogsService.selectChatMsgLogsListVO(param);
         PageInfo<ChatMsgLogsListCVO> listPageInfo=new PageInfo<>(list);
         return R.ok().put("data",listPageInfo);

+ 1 - 1
fs-company/src/main/java/com/fs/chat/controller/ChatRoleController.java

@@ -64,9 +64,9 @@ public class ChatRoleController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(ChatRole chatRole)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         chatRole.setCompanyId(loginUser.getCompany().getCompanyId());
+        startPage();
         List<ChatRole> list = chatRoleService.selectChatRoleList(chatRole);
         return getDataTable(list);
     }

+ 1 - 1
fs-company/src/main/java/com/fs/chat/controller/ChatSessionController.java

@@ -57,9 +57,9 @@ public class ChatSessionController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(ChatSessionListCParam param)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         param.setCompanyId(loginUser.getCompany().getCompanyId());
+        startPage();
         List<ChatSessionListCVO> list = chatSessionService.selectChatSessionListCVO(param);
         return getDataTable(list);
     }

+ 7 - 6
fs-company/src/main/java/com/fs/company/controller/crm/CrmCustomerController.java

@@ -58,8 +58,8 @@ public class CrmCustomerController extends BaseController
     public TableDataInfo getLineCustomerList(CrmLineCustomerListQueryParam param)
     {
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         param.setCompanyId(loginUser.getCompany().getCompanyId());
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<CrmLineCustomerListQueryVO> list = crmCustomerService.selectCrmLineCustomerListQuery(param);
         if (list != null) {
             for (CrmLineCustomerListQueryVO vo : list) {
@@ -79,11 +79,11 @@ public class CrmCustomerController extends BaseController
     public TableDataInfo getFullCustomerList(CrmFullCustomerListQueryParam param)
     {
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         param.setCompanyId(loginUser.getCompany().getCompanyId());
 //        if(loginUser.getCompany().getCompanyId()==116){   // 河北湘银信息咨询服务有限公司(JZ-1)客户假删除不显示
 //            param.setCompanyId(0L);
 //        }
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<CrmFullCustomerListQueryVO> list = crmCustomerService.selectCrmFullCustomerListQuery(param);
         if (list != null) {
             for (CrmFullCustomerListQueryVO vo : list) {
@@ -98,10 +98,10 @@ public class CrmCustomerController extends BaseController
     @PreAuthorize("@ss.hasPermi('crm:customer:list')")
     @GetMapping("/listAll")
     public R listAll(CrmCustomerListQueryParam crmCustomer){
-        PageHelper.startPage(1, 1000);
         if(!StringUtils.isEmpty(crmCustomer.getReceiveTimeRange())){
             crmCustomer.setReceiveTimeList(crmCustomer.getReceiveTimeRange().split("--"));
         }
+        PageHelper.startPage(1, 1000);
         List<CrmCustomerListVO> list = crmCustomerService.selectCrmCustomerListQueryParam(crmCustomer);
         if (list != null) {
             for (CrmCustomerListVO vo : list) {
@@ -118,12 +118,12 @@ public class CrmCustomerController extends BaseController
     @GetMapping("/getMyAssistList")
     public TableDataInfo getMyAssistList(CrmMyCustomerListQueryParam param){
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         param.setCompanyUserId(loginUser.getUser().getUserId());
         param.setCompanyId(loginUser.getCompany().getCompanyId());
         if(!StringUtils.isEmpty(param.getCreateTimeRange())){
             param.setCustomerCreateTime(param.getCreateTimeRange().split("--"));
         }
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<CrmMyCustomerListQueryVO> list = crmCustomerService.selectCrmMyAssistListQuery(param);
         if (list != null) {
             for (CrmMyCustomerListQueryVO vo : list) {
@@ -140,12 +140,12 @@ public class CrmCustomerController extends BaseController
     @GetMapping("/getMyCustomerList")
     public TableDataInfo getMyCustomerList(CrmMyCustomerListQueryParam param){
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         param.setCompanyUserId(loginUser.getUser().getUserId());
         param.setCompanyId(loginUser.getCompany().getCompanyId());
         if(!StringUtils.isEmpty(param.getCreateTimeRange())){
             param.setCustomerCreateTime(param.getCreateTimeRange().split("--"));
         }
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<CrmMyCustomerListQueryVO> list = crmCustomerService.selectCrmMyCustomerListQuery(param);
         if (list != null) {
             for (CrmMyCustomerListQueryVO vo : list) {
@@ -163,7 +163,6 @@ public class CrmCustomerController extends BaseController
     @PreAuthorize("@ss.hasPermi('crm:customer:list')")
     public TableDataInfo getCustomerList(CrmCustomerListQueryParam param){
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         param.setCompanyId(loginUser.getCompany().getCompanyId());
 //        if(loginUser.getCompany().getCompanyId()==116){   // 河北湘银信息咨询服务有限公司(JZ-1)客户假删除不显示
 //            param.setCompanyId(0L);
@@ -171,6 +170,7 @@ public class CrmCustomerController extends BaseController
         if (param.getIsReceive() != null && param.getIsReceive() == 0){
             CrmLineCustomerListQueryParam param1 = new CrmLineCustomerListQueryParam();
             BeanUtils.copyProperties(param,param1);
+            PageHelper.startPage(param.getPageNum(), param.getPageSize());
             List<CrmLineCustomerListQueryVO> list1 = crmCustomerService.selectCrmLineCustomerListQuery(param1);
             if (list1 != null) {
                 for (CrmLineCustomerListQueryVO vo : list1) {
@@ -182,6 +182,7 @@ public class CrmCustomerController extends BaseController
             }
             return getDataTable(list1);
         }else {
+            PageHelper.startPage(param.getPageNum(), param.getPageSize());
             List<CrmCustomerListQueryVO> list = crmCustomerService.selectCrmCustomerListQuery(param);
             if (list != null) {
                 for (CrmCustomerListQueryVO vo : list) {

+ 1 - 2
fs-company/src/main/java/com/fs/company/controller/crm/CrmEventController.java

@@ -53,10 +53,9 @@ public class CrmEventController extends BaseController {
 	public R getMyCrmEventList(CrmEventListQueryParam param)
 	{
 		LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-
-		PageHelper.startPage(param.getPageNum(), param.getPageSize());
 		param.setCompanyId(loginUser.getCompany().getCompanyId());
 		param.setCompanyUserId(loginUser.getUser().getUserId());
+		PageHelper.startPage(param.getPageNum(), param.getPageSize());
 		List<CrmEventListQueryVO> list = eventService.selectCrmEventListQuery(param);
 		PageInfo<CrmEventListQueryVO> listPageInfo=new PageInfo<>(list);
 		return R.ok().put("data",listPageInfo);

+ 1 - 1
fs-company/src/main/java/com/fs/company/controller/qw/FsAppContactWayController.java

@@ -40,9 +40,9 @@ public class FsAppContactWayController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(FsAppContactWay fsAppContactWay)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         fsAppContactWay.setCompanyId(loginUser.getCompany().getCompanyId());
+        startPage();
         List<FsAppContactWay> list = fsAppContactWayService.selectFsAppContactWayList(fsAppContactWay);
         return getDataTable(list);
     }

+ 1 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwContactWayController.java

@@ -49,9 +49,9 @@ public class QwContactWayController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(QwContactWay qwContactWay)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         qwContactWay.setCompanyId(loginUser.getCompany().getCompanyId());
+        startPage();
         List<QwContactWay> list = qwContactWayService.selectQwContactWayList(qwContactWay);
         return getDataTable(list);
     }

+ 1 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwExternalContactController.java

@@ -614,13 +614,13 @@ public class QwExternalContactController extends BaseController
     @GetMapping("/getMyCustomerList")
     public TableDataInfo getMyCustomerList(CrmMyCustomerListQueryParam param){
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         param.setCompanyUserId(loginUser.getUser().getUserId());
 //        param.setCompanyId(loginUser.getCompany().getCompanyId());
         param.setCorpId(param.getCorpId());
         if(!StringUtils.isEmpty(param.getCreateTimeRange())){
             param.setCustomerCreateTime(param.getCreateTimeRange().split("--"));
         }
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<CrmMyCustomerListQueryVO> list = crmCustomerService.selectCrmMyCustomerListQuery(param);
         if (list != null) {
             for (CrmMyCustomerListQueryVO vo : list) {

+ 1 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwExternalContactTransferLogController.java

@@ -89,11 +89,11 @@ public class QwExternalContactTransferLogController extends BaseController
     @GetMapping("/myList")
     public TableDataInfo myList(QwExternalContactTransferLogParam qwExternalContactTransferLog)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         Long companyId = loginUser.getCompany().getCompanyId();
         qwExternalContactTransferLog.setCompanyId(companyId);
         qwExternalContactTransferLog.setCompanyUserId(loginUser.getUser().getUserId());
+        startPage();
         List<QwExternalContactTransferLogListVO> list = qwExternalContactTransferLogService.selectQwExternalContactTransferLogListVO(qwExternalContactTransferLog);
         return getDataTable(list);
     }

+ 2 - 2
fs-company/src/main/java/com/fs/company/controller/qw/QwGroupChatTransferController.java

@@ -29,8 +29,8 @@ public class QwGroupChatTransferController extends BaseController {
     @PreAuthorize("@ss.hasPermi('qw:groupChatTransfer:listOnJob')")
     @GetMapping("/listOnJob")
     public TableDataInfo listOnJob(QwGroupChatParam qwGroupChat) {
-        startPage();
         qwGroupChat.setStatusList(Arrays.asList("0", "3"));
+        startPage();
         List<QwGroupChatTransferVO> list = qwGroupChatService.selectQwGroupChatTransferList(qwGroupChat);
         return getDataTable(list);
     }
@@ -49,8 +49,8 @@ public class QwGroupChatTransferController extends BaseController {
     @PreAuthorize("@ss.hasPermi('qw:groupChatTransfer:list')")
     @GetMapping("/list")
     public TableDataInfo list(QwGroupChatParam qwGroupChat) {
-        startPage();
         qwGroupChat.setStatusList(Collections.singletonList("1"));
+        startPage();
         List<QwGroupChatTransferVO> list = qwGroupChatService.selectQwGroupChatTransferList(qwGroupChat);
         return getDataTable(list);
     }

+ 1 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwMaterialController.java

@@ -48,10 +48,10 @@ public class QwMaterialController extends BaseController
     @GetMapping("/myList")
     public TableDataInfo myList(QwMaterialParam param)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         param.setCompanyId(loginUser.getUser().getCompanyId());
         param.setCreateUserId(loginUser.getUser().getUserId());
+        startPage();
         List<QwMaterialVO> list = qwMaterialService.selectQwMaterialList(param);
         return getDataTable(list);
     }

+ 1 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwSopTempController.java

@@ -54,11 +54,11 @@ public class QwSopTempController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(QwSopTemp qwSopTemp)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         qwSopTemp.setCompanyId(loginUser.getCompany().getCompanyId());
 
 //        List<QwSopTemp> list = qwSopTempService.selectQwSopTempList(qwSopTemp);
+        startPage();
         List<QwSopTemp> list = qwSopTempService.selectQwSopTempListNew(qwSopTemp);
         return getDataTable(list);
     }

+ 1 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwUserVoiceLogController.java

@@ -77,9 +77,9 @@ public class QwUserVoiceLogController extends BaseController
     @PostMapping("/newList")
     public TableDataInfo newList(@RequestBody QwUserVoiceLogVo qwUserVoiceLog)
     {
-        PageHelper.startPage(qwUserVoiceLog.getPageNum(), qwUserVoiceLog.getPageSize());
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         qwUserVoiceLog.setCompanyId(loginUser.getCompany().getCompanyId());
+        PageHelper.startPage(qwUserVoiceLog.getPageNum(), qwUserVoiceLog.getPageSize());
         List<QwUserVoiceLogVo> list = qwUserVoiceLogService.selectQwUserVoiceLogList(qwUserVoiceLog);
         list.forEach(item->{
 

+ 3 - 3
fs-company/src/main/java/com/fs/company/controller/qw/QwWorkTaskNewController.java

@@ -57,10 +57,10 @@ public class QwWorkTaskNewController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(QwWorkTaskListParam qwWorkTask)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         qwWorkTask.setCompanyId(loginUser.getCompany().getCompanyId());
         qwWorkTask.setCompanyUserId(loginUser.getUser().getUserId());
+        startPage();
         List<QwWorkTaskListVO> list = qwWorkTaskService.selectQwWorkTaskListVO(qwWorkTask);
 
         for (QwWorkTaskListVO qwWorkTaskListVO : list) {
@@ -107,9 +107,9 @@ public class QwWorkTaskNewController extends BaseController
     @GetMapping("/glList")
     public TableDataInfo glList(QwWorkTaskListParam qwWorkTask)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         qwWorkTask.setCompanyId(loginUser.getCompany().getCompanyId());
+        startPage();
         List<QwWorkTaskListVO> list = qwWorkTaskService.selectQwWorkTaskListVO(qwWorkTask);
         for (QwWorkTaskListVO qwWorkTaskListVO : list) {
             qwWorkTaskListVO.setLogs(fsCourseWatchLogMapper.selectFsCourseWatchLog7DayByExtId(qwWorkTaskListVO.getExtId()));
@@ -120,12 +120,12 @@ public class QwWorkTaskNewController extends BaseController
     @GetMapping("/allList")
     public TableDataInfo allList(QwWorkTaskListParam qwWorkTask)
     {
-        startPage();
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         qwWorkTask.setCompanyId(loginUser.getCompany().getCompanyId());
         if (qwWorkTask.getSTime()==null||qwWorkTask.getETime()==null){
             return new TableDataInfo();
         }
+        startPage();
         List<QwWorkTaskAllListVO> list = qwWorkTaskService.selectQwWorkTaskAllListVO(qwWorkTask);
 
         return getDataTable(list);

+ 3 - 0
fs-company/src/main/java/com/fs/company/controller/store/FsUserAddressController.java

@@ -41,6 +41,7 @@ public class FsUserAddressController extends BaseController
     public TableDataInfo list(FsUserAddress fsUserAddress)
     {
         startPage();
+        fsUserAddress.setIsConfirm(1);
         List<FsUserAddress> list = fsUserAddressService.selectFsUserAddressList(fsUserAddress);
         for (FsUserAddress userAddress : list) {
             if (userAddress.getPhone()!=null){
@@ -66,6 +67,7 @@ public class FsUserAddressController extends BaseController
         if (fsUserAddressService.isEntityNull(fsUserAddress)){
             return AjaxResult.error("请筛选数据导出");
         }
+        fsUserAddress.setIsConfirm(1);
         Long count =fsUserAddressService.selectFsUserAddressListCount(fsUserAddress);
         if (count>30000){
             return AjaxResult.error("导出数据不可超过3w条");
@@ -79,6 +81,7 @@ public class FsUserAddressController extends BaseController
     public R getAddressList(FsUserAddress fsUserAddress)
     {
         fsUserAddress.setIsDel(0);
+        fsUserAddress.setIsConfirm(1);
         List<FsUserAddress> list = fsUserAddressService.selectFsUserAddressList(fsUserAddress);
         return R.ok().put("data", list);
     }

+ 1 - 3
fs-qwhook-sop/src/main/java/com/fs/app/controller/ApisQwMaterialBySidebar.java

@@ -43,12 +43,10 @@ public class ApisQwMaterialBySidebar {
             return R.error("员工未绑定 销售公司 或 未获取到员工信息,请重试!");
         }
 
-
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
-
         QwMaterialParam materialParam=new QwMaterialParam();
         materialParam.setCompanyId(qwUser.getCompanyId());
         materialParam.setTitle(param.getKeyword());
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<QwMaterialVO> list = qwMaterialService.selectQwMaterialList(materialParam);
 
 

+ 2 - 3
fs-qwhook-sop/src/main/java/com/fs/app/controller/QwMaterialBySidebar.java

@@ -43,12 +43,11 @@ public class QwMaterialBySidebar {
             return R.error("员工未绑定 销售公司 或 未获取到员工信息,请重试!");
         }
 
-
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
-
         QwMaterialParam materialParam=new QwMaterialParam();
         materialParam.setCompanyId(qwUser.getCompanyId());
         materialParam.setTitle(param.getKeyword());
+
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<QwMaterialVO> list = qwMaterialService.selectQwMaterialList(materialParam);
 
 

+ 1 - 1
fs-qwhook-sop/src/main/java/com/fs/app/controller/RoomSopController.java

@@ -44,8 +44,8 @@ public class RoomSopController {
 
     @GetMapping("/getVideoList")
     public R getVideoList(FsUserCourseVideoParam param) {
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         param.setCourseId(param.getCourseId());
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<FsUserCourseVideoVO> list = courseVideoService.selectFsUserCourseVideoListByCourseIdAndCompany(param);
         PageInfo<FsUserCourseVideoVO> listPageInfo=new PageInfo<>(list);
         return R.ok().put("data",listPageInfo);

+ 7 - 0
fs-service/src/main/java/com/fs/company/mapper/CompanyUserUserMapper.java

@@ -2,6 +2,8 @@ package com.fs.company.mapper;
 
 import java.util.List;
 import com.fs.company.domain.CompanyUserUser;
+import com.fs.his.vo.MyMemberVO;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * companyUserUserMapper接口
@@ -58,4 +60,9 @@ public interface CompanyUserUserMapper
      * @return 结果
      */
     public int deleteCompanyUserUserByIds(Long[] ids);
+
+    /**
+     * 查询销售关联会员
+     */
+    List<MyMemberVO> selectFsUserByCompanyUserId(@Param("companyUserId") Long companyUserId, @Param("keyword") String keyword);
 }

+ 57 - 0
fs-service/src/main/java/com/fs/company/param/HelpAddPatientParam.java

@@ -0,0 +1,57 @@
+package com.fs.company.param;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Pattern;
+import java.io.Serializable;
+import java.util.Date;
+
+@Getter
+@Setter
+public class HelpAddPatientParam implements Serializable {
+
+    /** ID */
+    private Long patientId;
+
+    /** 患者姓名 */
+    @NotBlank(message = "患者姓名不能为空")
+    private String patientName;
+
+    /** 身份证号 */
+    //@NotBlank(message = "身份证号不能为空")
+    private String idCard;
+
+    /** 出生年月 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @NotNull(message = "出生年月不能为空")
+    private Date birthday;
+
+    /** 性别 */
+    @NotNull(message = "性别不能为空")
+    private Integer sex;
+
+    /** 体重G */
+    private Long weight;
+
+    /** 手机号 */
+    @NotBlank(message = "手机号不能为空")
+    @Pattern(regexp="^1[3456789]\\d{9}$",message="手机号格式不正确")
+    private String mobile;
+    @NotBlank(message = "与本人关系不能为空")
+    private String relation;  // 与本人关系
+    private String liverUnusual;  // 肝功能是否异常
+    private String renalUnusual;  // 肾功能是否异常
+    private String historyAllergic;  // 过敏史
+    private String familyMedHistory;  // 家族病史
+    private String selfMedHistory;  // 个人病史
+    private Integer isDefault; //是否默认
+
+
+    private Integer isFurther;
+    private String primaryHospital;
+    private String primaryImages;
+}

+ 59 - 0
fs-service/src/main/java/com/fs/company/param/HelpAddUserAddressParam.java

@@ -0,0 +1,59 @@
+package com.fs.company.param;
+
+import com.fs.common.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Pattern;
+import java.io.Serializable;
+
+@Getter
+@Setter
+public class HelpAddUserAddressParam implements Serializable {
+
+    /** ID */
+    private Long addressId;
+
+    /** 收货人姓名 */
+    @NotBlank(message = "收货人姓名不能为空")
+    private String realName;
+
+    /** 收货人电话 */
+    @NotBlank(message = "收货人电话不能为空")
+    @Pattern(regexp="^1[3456789]\\d{9}$",message="手机号格式不正确")
+    private String phone;
+
+    /** 收货人所在省 */
+    @NotBlank(message = "收货人地址不能为空")
+    private String province;
+
+    /** 收货人所在市 */
+    @NotBlank(message = "收货人地址不能为空")
+    private String city;
+
+    /** 收货人所在区 */
+    @NotBlank(message = "收货人地址不能为空")
+    private String district;
+
+    /** 城市IDS */
+    @Excel(name = "城市IDS")
+    private String cityIds;
+
+    /** 收货人详细地址 */
+    @NotBlank(message = "收货人详细地址不能为空")
+    private String detail;
+
+    /** 邮编 */
+    private String postCode;
+
+    /** 经度 */
+    private String longitude;
+
+    /** 纬度 */
+    private String latitude;
+
+    private Integer isDefault;
+
+
+}

+ 15 - 3
fs-service/src/main/java/com/fs/company/service/ICompanyUserService.java

@@ -2,12 +2,12 @@ package com.fs.company.service;
 
 import com.fs.common.core.domain.R;
 import com.fs.company.domain.CompanyUser;
-import com.fs.company.param.CompanyUserAreaParam;
-import com.fs.company.param.CompanyUserCodeParam;
-import com.fs.company.param.CompanyUserQwParam;
+import com.fs.company.param.*;
 import com.fs.company.vo.*;
 import com.fs.his.vo.CitysAreaVO;
 import com.fs.his.vo.OptionsVO;
+import com.fs.hisStore.param.FsPatientAddEditParam;
+import com.fs.hisStore.param.FsUserAddressAddEditParam;
 import com.fs.hisStore.vo.FsStoreProductExportVO;
 import com.fs.qw.dto.UserProjectDTO;
 import com.fs.qw.vo.CompanyUserQwVO;
@@ -17,6 +17,8 @@ import com.fs.wxUser.domain.CompanyWxUser;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
 import java.io.IOException;
 import java.util.List;
 import java.util.Map;
@@ -249,4 +251,14 @@ public interface ICompanyUserService {
     List<Long> selectCompanyQwUserByDept(List<Long> deptList,String userType);
 
     String selectMpOpenIdByCompanyUserId(Long companyUserId);
+
+    /**
+     * 销售帮填用户就诊人和地址
+     */
+    Map<String, Object> addHelpPatientAndAddress(Long companyUserId, Long userId, HelpAddPatientParam patientParam, HelpAddUserAddressParam addressParam);
+
+    /**
+     * 获取销售帮填用户就诊人和地址
+     */
+    Map<String, Object> getHelpPatientAndAddress(Long companyUserId, Long userId);
 }

+ 6 - 0
fs-service/src/main/java/com/fs/company/service/ICompanyUserUserService.java

@@ -2,6 +2,7 @@ package com.fs.company.service;
 
 import java.util.List;
 import com.fs.company.domain.CompanyUserUser;
+import com.fs.his.vo.MyMemberVO;
 
 /**
  * companyUserUserService接口
@@ -58,4 +59,9 @@ public interface ICompanyUserUserService
      * @return 结果
      */
     public int deleteCompanyUserUserById(Long id);
+
+    /**
+     * 查询销售关联会员
+     */
+    List<MyMemberVO> selectFsUserByCompanyUserId(Long companyUserId, String keyword);
 }

+ 212 - 16
fs-service/src/main/java/com/fs/company/service/impl/CompanyUserServiceImpl.java

@@ -1,14 +1,13 @@
 package com.fs.company.service.impl;
 
-import cn.hutool.core.collection.ListUtil;
+import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
 import com.fs.common.BeanCopyUtils;
 import com.fs.common.QRutils;
 import com.fs.common.annotation.DataScope;
 import com.fs.common.constant.UserConstants;
-import com.fs.common.core.domain.AjaxResult;
 import com.fs.common.core.domain.R;
 import com.fs.common.core.redis.RedisCache;
 import com.fs.common.exception.CustomException;
@@ -20,36 +19,35 @@ import com.fs.common.utils.SecurityUtils;
 import com.fs.common.utils.StringUtils;
 import com.fs.company.domain.*;
 import com.fs.company.mapper.*;
-import com.fs.company.param.CompanyUserAreaParam;
-import com.fs.company.param.CompanyUserCodeParam;
-import com.fs.company.param.CompanyUserQwParam;
+import com.fs.company.param.*;
 import com.fs.company.service.*;
 import com.fs.company.vo.*;
 import com.fs.course.service.IFsUserCompanyUserService;
+import com.fs.his.config.StoreConfig;
+import com.fs.his.domain.FsPatient;
+import com.fs.his.domain.FsUser;
+import com.fs.his.domain.FsUserAddress;
+import com.fs.his.enums.FsUserIntegralLogTypeEnum;
+import com.fs.his.mapper.FsPatientMapper;
+import com.fs.his.mapper.FsUserAddressMapper;
 import com.fs.his.mapper.FsUserMapper;
+import com.fs.his.param.FsUserAddIntegralTemplateParam;
 import com.fs.his.service.IFsCityService;
+import com.fs.his.utils.IdCardUtil;
+import com.fs.his.utils.PhoneUtil;
 import com.fs.his.vo.CitysAreaVO;
 import com.fs.his.vo.OptionsVO;
-import com.fs.hisStore.domain.FsStoreProductAttrScrm;
-import com.fs.hisStore.domain.FsStoreProductAttrValueScrm;
-import com.fs.hisStore.domain.FsStoreProductScrm;
-import com.fs.hisStore.dto.ProductArrtDTO;
-import com.fs.hisStore.vo.FsStoreProductExportVO;
 import com.fs.qw.domain.QwUser;
 import com.fs.qw.dto.UserProjectDTO;
 import com.fs.qw.mapper.QwUserMapper;
-import com.fs.qw.service.IQwExternalContactService;
 import com.fs.qw.service.IQwUserService;
 import com.fs.qw.vo.CompanyUserQwVO;
 import com.fs.qw.vo.QwOptionsVO;
 import com.fs.qw.vo.QwUserVO;
-import com.fs.system.domain.SysConfig;
-import com.fs.system.mapper.SysConfigMapper;
 import com.fs.system.oss.CloudStorageService;
 import com.fs.system.oss.OSSFactory;
 import com.fs.system.service.ISysConfigService;
 import com.fs.system.service.ISysRoleService;
-import com.fs.system.service.ISysUserService;
 import com.fs.voice.utils.StringUtil;
 import com.fs.wxUser.domain.CompanyWxUser;
 import com.github.pagehelper.PageHelper;
@@ -62,9 +60,12 @@ import org.springframework.web.multipart.MultipartFile;
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
 import java.util.*;
 import java.util.concurrent.TimeUnit;
+import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 
 /**
@@ -128,6 +129,13 @@ public class CompanyUserServiceImpl implements ICompanyUserService
 //    @Autowired
 //    private ICompanyUserRoleService userRoleService;
 
+    @Autowired
+    private ISysConfigService configService;
+    @Autowired
+    private FsPatientMapper fsPatientMapper;
+    @Autowired
+    private FsUserAddressMapper fsUserAddressMapper;
+
 
     /**
      * 查询物业公司管理员信息
@@ -1071,4 +1079,192 @@ public class CompanyUserServiceImpl implements ICompanyUserService
     public String selectMpOpenIdByCompanyUserId(Long companyUserId) {
         return companyUserMapper.selectMpOpenIdByCompanyUserId(companyUserId);
     }
+
+    /**
+     * 销售帮填用户就诊人和地址
+     */
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public Map<String, Object> addHelpPatientAndAddress(Long companyUserId, Long userId, HelpAddPatientParam patientParam, HelpAddUserAddressParam addressParam) {
+        FsUser fsUser = fsUserMapper.selectFsUserById(userId);
+        if (fsUser == null) {
+            throw new CustomException("帮填用户不存在");
+        }
+
+        // 保存帮填就诊人
+        FsPatient patient = addHelpPatient(companyUserId, userId, patientParam);
+
+        // 保存帮填地址
+        FsUserAddress userAddress = addHelpAddress(companyUserId, userId, addressParam);
+
+        Map<String, Object> result = new HashMap<>();
+        result.put("patient", patient);
+        result.put("userAddress", userAddress);
+        return result;
+    }
+
+    /**
+     * 帮填地址
+     */
+    private FsUserAddress addHelpAddress(Long companyUserId, Long userId, HelpAddUserAddressParam address) {
+        //处理地址数量 最大20个
+        Integer count = fsUserAddressMapper.selectFsUserAddressCountsByUserId(userId);
+        if(count > 10){
+            throw new CustomException("最多可创建10个地址");
+        }
+
+        if(address.getIsDefault() == 1){
+            //处理默认地址
+            fsUserAddressMapper.clearIsDefalut(userId);
+        }
+
+        FsUserAddress userAddress = fsUserAddressMapper.selectFsUserAddressByCompanyUserId(companyUserId, userId);
+        if (userAddress == null) {
+            userAddress = new FsUserAddress();
+        }
+        BeanUtil.copyProperties(address, userAddress, "addressId");
+        address.setPhone(address.getPhone().trim());
+        userAddress.setUserId(userId);
+        userAddress.setDetail(userAddress.getDetail().trim());
+        userAddress.setCreateTime(DateUtils.getNowDate());
+        userAddress.setIsConfirm(0);
+        userAddress.setHelpCompanyUserId(companyUserId);
+        if (userAddress.getAddressId() == null) {
+            fsUserAddressMapper.insertFsUserAddress(userAddress);
+        } else {
+            fsUserAddressMapper.updateFsUserAddress(userAddress);
+        }
+
+        return userAddress;
+    }
+
+    /**
+     * 帮填就诊人
+     */
+    private FsPatient addHelpPatient(Long companyUserId, Long userId, HelpAddPatientParam param) {
+        String json = configService.selectConfigByKey("his.store");
+        StoreConfig storeConfig = JSONUtil.toBean(json, StoreConfig.class);
+        Integer isIdVerification = storeConfig.getIsIdVerification();
+
+        String idCardNumber = param.getIdCard(); // 替换为要验证的身份证号码
+        String mobile = param.getMobile();
+        if (idCardNumber == null || idCardNumber.trim().isEmpty()) {
+            throw new CustomException("身份证号码不合法");
+        }
+        if (idCardNumber.length() != 18) {
+//            //大陆身份证是18位
+//            if (isIdVerification != 1) {
+//                return R.error("身份证号码不合法");
+//            } else {
+//                //非大陆身份校验需要手机号 手机号只支持大陆的办理的手机号
+//                if (StringUtils.isBlank(mobile)){
+//                    R.error("手机号不能为空");
+//                }
+//            }
+            //暂时仅支持大陆身份证
+            throw new CustomException("身份证号码不合法");
+        } else {
+            String regex = "\\d{17}[0-9Xx]";
+            if (!Pattern.matches(regex, idCardNumber)) {
+                throw new CustomException("身份证号码不合法");
+            }
+        }
+
+        if (param.getPatientName().length()<2||param.getPatientName().length()>30||!param.getPatientName().matches("^[\u4e00-\u9fa5]+$")) {
+            throw new CustomException("就诊人名称不合法");
+        }
+
+        try {
+            if (idCardNumber != null) {
+                String birthDateString = idCardNumber.substring(6, 14);
+                LocalDate birthDate = LocalDate.parse(birthDateString, DateTimeFormatter.ofPattern("yyyyMMdd"));
+                LocalDate currentDate = LocalDate.now();
+                int age = currentDate.getYear() - birthDate.getYear();
+                if (currentDate.getMonthValue() < birthDate.getMonthValue()
+                        || (currentDate.getMonthValue() == birthDate.getMonthValue()
+                        && currentDate.getDayOfMonth() < birthDate.getDayOfMonth())) {
+                    age--;
+                }
+                if (age < 18) {
+                    throw new CustomException("年龄必须大于18岁");
+                }
+                if (age > 200) {
+                    throw new CustomException("年龄超过200岁");
+
+                }
+                Date birthday = param.getBirthday();
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+                String formattedBirthday = sdf.format(birthday);
+                LocalDate da = LocalDate.parse(formattedBirthday, DateTimeFormatter.ofPattern("yyyyMMdd"));
+                LocalDate currentDate2 = LocalDate.now();
+                int age2 = currentDate2.getYear() - da.getYear();
+                if (currentDate2.getMonthValue() < da.getMonthValue()
+                        || (currentDate2.getMonthValue() == da.getMonthValue()
+                        && currentDate2.getDayOfMonth() < da.getDayOfMonth())) {
+                    age2--;
+                }
+                if (age2 < 18) {
+                    throw new CustomException("年龄必须大于18岁");
+                }
+                if (age2 > 200) {
+                    throw new CustomException("年龄超过200岁");
+                }
+            }
+        }catch (Exception e){
+            throw new CustomException("身份证校验错误");
+        }
+
+        //三方校验
+        if (isIdVerification!=null&&isIdVerification == 1){
+            boolean match = true;
+            if (idCardNumber.length() != 18) {
+                match = IdCardUtil.isMatchByMobile(storeConfig,param.getPatientName(), mobile);
+            } else {
+                match = IdCardUtil.isMatchById(storeConfig,param.getPatientName(), param.getIdCard());
+            }
+            if (!match){
+                throw new CustomException("身份证校验错误");
+            }
+        }
+
+        FsPatient patient = fsPatientMapper.selectFsPatientByCompanyUserId(companyUserId, userId);
+        if (patient == null) {
+            patient = new FsPatient();
+        }
+
+        BeanUtil.copyProperties(param, patient, "patientId");
+        patient.setUserId(userId);
+        patient.setHelpCompanyUserId(companyUserId);
+        patient.setIsDel(0);
+        patient.setStatus(1);
+        patient.setIsConfirm(0);
+        patient.setCreateTime(DateUtils.getNowDate());
+        if (StringUtils.isNotBlank(mobile)){
+            patient.setMobile(PhoneUtil.encryptPhone(mobile));
+        }
+
+        if (patient.getPatientId() == null) {
+            fsPatientMapper.insertFsPatient(patient);
+        } else {
+            fsPatientMapper.updateFsPatient(patient);
+        }
+
+        return patient;
+    }
+
+    /**
+     * 获取销售帮填用户就诊人和地址
+     */
+    @Override
+    public Map<String, Object> getHelpPatientAndAddress(Long companyUserId, Long userId) {
+        FsPatient fsPatient = fsPatientMapper.selectFsPatientByCompanyUserId(companyUserId, userId);
+        if (fsPatient != null && StringUtils.isNotNull(fsPatient.getMobile())) {
+            fsPatient.setMobile(PhoneUtil.decryptPhone(fsPatient.getMobile()));
+        }
+
+        Map<String, Object> result = new HashMap<>();
+        result.put("patient", fsPatient);
+        result.put("userAddress", fsUserAddressMapper.selectFsUserAddressByCompanyUserId(companyUserId, userId));
+        return result;
+    }
 }

+ 12 - 0
fs-service/src/main/java/com/fs/company/service/impl/CompanyUserUserServiceImpl.java

@@ -1,6 +1,9 @@
 package com.fs.company.service.impl;
 
+import java.util.Date;
 import java.util.List;
+
+import com.fs.his.vo.MyMemberVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.fs.company.mapper.CompanyUserUserMapper;
@@ -52,6 +55,7 @@ public class CompanyUserUserServiceImpl implements ICompanyUserUserService
     @Override
     public int insertCompanyUserUser(CompanyUserUser companyUserUser)
     {
+        companyUserUser.setCreateTime(new Date());
         return companyUserUserMapper.insertCompanyUserUser(companyUserUser);
     }
 
@@ -90,4 +94,12 @@ public class CompanyUserUserServiceImpl implements ICompanyUserUserService
     {
         return companyUserUserMapper.deleteCompanyUserUserById(id);
     }
+
+    /**
+     * 查询销售关联会员
+     */
+    @Override
+    public List<MyMemberVO> selectFsUserByCompanyUserId(Long companyUserId, String keyword) {
+        return companyUserUserMapper.selectFsUserByCompanyUserId(companyUserId, keyword);
+    }
 }

+ 18 - 0
fs-service/src/main/java/com/fs/his/domain/FsPatient.java

@@ -68,6 +68,24 @@ public class FsPatient extends BaseEntity
     private Integer isFurther;
     private String primaryHospital;
     private String primaryImages;
+    private Integer isConfirm;
+    private Long helpCompanyUserId;
+
+    public Integer getIsConfirm() {
+        return isConfirm;
+    }
+
+    public void setIsConfirm(Integer isConfirm) {
+        this.isConfirm = isConfirm;
+    }
+
+    public Long getHelpCompanyUserId() {
+        return helpCompanyUserId;
+    }
+
+    public void setHelpCompanyUserId(Long helpCompanyUserId) {
+        this.helpCompanyUserId = helpCompanyUserId;
+    }
 
     public Integer getIsFurther() {
         return isFurther;

+ 23 - 1
fs-service/src/main/java/com/fs/his/domain/FsUserAddress.java

@@ -70,7 +70,29 @@ public class FsUserAddress extends BaseEntity
     @Excel(name = "是否删除")
     private Integer isDel;
 
-    public void setAddressId(Long addressId) 
+    /** 用户是否确认 0未确认 1已确认 **/
+    private Integer isConfirm;
+
+    /** 帮填销售ID **/
+    private Long helpCompanyUserId;
+
+    public Integer getIsConfirm() {
+        return isConfirm;
+    }
+
+    public void setIsConfirm(Integer isConfirm) {
+        this.isConfirm = isConfirm;
+    }
+
+    public Long getHelpCompanyUserId() {
+        return helpCompanyUserId;
+    }
+
+    public void setHelpCompanyUserId(Long helpCompanyUserId) {
+        this.helpCompanyUserId = helpCompanyUserId;
+    }
+
+    public void setAddressId(Long addressId)
     {
         this.addressId = addressId;
     }

+ 7 - 2
fs-service/src/main/java/com/fs/his/mapper/FsPatientMapper.java

@@ -70,7 +70,7 @@ public interface FsPatientMapper
 
     @Select({"<script> " +
 "select pat.*,us.nick_name ,us.phone from fs_patient pat LEFT JOIN fs_user us ON pat.user_id=us.user_id"+
-            " where 1=1 and pat.is_del=0  \n" +
+            " where 1=1 and pat.is_del=0 and pat.is_confirm = 1  \n" +
             "            <if test=\"patientName != null  and patientName != ''\"> and pat.patient_name like concat('%', #{patientName}, '%')</if>\n" +
             "            <if test=\"userId != null \"> and pat.user_id = #{userId}</if>\n" +
             "            <if test=\"idCard != null  and idCard != ''\"> and pat.id_card = #{idCard}</if>\n" +
@@ -115,7 +115,7 @@ public interface FsPatientMapper
     List<FsPatientListDVO> selectFsPatientListDVO(@Param("maps") FsPatientListDParam param);
     @Select({"<script> " +
             "select count(1) from fs_patient pat LEFT JOIN fs_user us ON pat.user_id=us.user_id"+
-            " where 1=1 and pat.is_del=0  \n" +
+            " where 1=1 and pat.is_del=0 and pat.is_confirm = 1  \n" +
             "            <if test=\"patientName != null  and patientName != ''\"> and pat.patient_name like concat('%', #{patientName}, '%')</if>\n" +
             "            <if test=\"userId != null \"> and pat.user_id = #{userId}</if>\n" +
             "            <if test=\"idCard != null  and idCard != ''\"> and pat.id_card = #{idCard}</if>\n" +
@@ -130,4 +130,9 @@ public interface FsPatientMapper
             "</script>"})
     Long selectFsPatientListVOCount(FsPatientVO fsPatient);
 
+    /**
+     * 查询帮填就诊人
+     */
+    @Select("select * from fs_patient where help_company_user_id = #{companyUserId} and user_id = #{userId} and is_confirm = 0 limit 1")
+    FsPatient selectFsPatientByCompanyUserId(@Param("companyUserId") Long companyUserId, @Param("userId") Long userId);
 }

+ 8 - 3
fs-service/src/main/java/com/fs/his/mapper/FsUserAddressMapper.java

@@ -2,9 +2,8 @@ package com.fs.his.mapper;
 
 import java.util.List;
 import com.fs.his.domain.FsUserAddress;
-import com.fs.his.param.FsUserParam;
-import com.fs.his.vo.FsUserVO;
 import com.fs.his.vo.UserVo;
+import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.apache.ibatis.annotations.Update;
 
@@ -76,7 +75,7 @@ public interface FsUserAddressMapper
     @Select("select * from fs_user_address where user_id=#{userId} and  is_del=0 and is_default=1 limit 1 ")
     FsUserAddress selectFsUserAddressByDefault(long userId);
     @Select({"<script>select count(1) fs_user_address" +
-            "and is_del = 0\n" +
+            "and is_del = 0 and is_confirm = 1 \n" +
             "            <if test=\"userId != null \"> and user_id = #{userId}</if>\n" +
             "            <if test=\"realName != null  and realName != ''\"> and real_name like concat('%', #{realName}, '%')</if>\n" +
             "            <if test=\"phone != null  and phone != ''\"> and phone = #{phone}</if>\n" +
@@ -91,4 +90,10 @@ public interface FsUserAddressMapper
             "            <if test=\"isDefault != null \"> and is_default = #{isDefault}</if>" +
             "</script>"})
     Long selectFsUserAddressListCount(FsUserAddress fsUserAddress);
+
+    /**
+     * 查询销售帮填地址
+     */
+    @Select("select * from fs_user_address where help_company_user_id = #{companyUserId} and user_id = #{userId} and is_confirm = 0 limit 1")
+    FsUserAddress selectFsUserAddressByCompanyUserId(@Param("companyUserId") Long companyUserId, @Param("userId") Long userId);
 }

+ 11 - 1
fs-service/src/main/java/com/fs/his/service/IFsUserService.java

@@ -22,7 +22,6 @@ import com.fs.his.vo.FsUserExportListVO;
 import com.fs.his.vo.FsUserFollowDoctorVO;
 import com.fs.his.vo.UserVo;
 import com.fs.hisStore.domain.FsStoreOrderScrm;
-import com.fs.hisStore.domain.FsUserScrm;
 import com.fs.hisStore.vo.FsCompanyUserListQueryVO;
 import com.fs.qw.dto.FsUserTransferParamDTO;
 import com.fs.qw.param.QwFsUserParam;
@@ -34,6 +33,7 @@ import com.fs.watch.domain.vo.FsUserAndCompanyAndDoctorVo;
 import com.github.pagehelper.PageInfo;
 
 import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
 
 /**
  * 用户Service接口
@@ -221,4 +221,14 @@ public interface IFsUserService
     void handleFsUserWx(FsUser user, LoginMaWxParam param, WxMaJscode2SessionResult session);
 
     R removeUser(Long id);
+
+    /**
+     * 用户确认就诊人和收货地址信息
+     */
+    void confirmPatientAndAddress(long id, Long patientId, Long userAddressId);
+
+    /**
+     * 获取用户确认就诊人和收货地址信息
+     */
+    Map<String, Object> getConfirmPatientAndAddress(long id, Long patientId, Long userAddressId);
 }

+ 62 - 1
fs-service/src/main/java/com/fs/his/service/impl/FsUserServiceImpl.java

@@ -23,6 +23,7 @@ import com.fs.common.core.domain.entity.SysDictData;
 import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.core.redis.RedisCache;
 import com.fs.common.enums.ImTypeEnum;
+import com.fs.common.exception.CustomException;
 import com.fs.common.param.LoginMaWxParam;
 import com.fs.common.utils.DateUtils;
 import com.fs.common.utils.DictUtils;
@@ -55,6 +56,7 @@ import com.fs.his.param.FsUserParam;
 import com.fs.his.service.IFsUserIntegralLogsService;
 import com.fs.his.service.IFsUserProjectTagService;
 import com.fs.his.service.IFsUserWxService;
+import com.fs.his.utils.PhoneUtil;
 import com.fs.his.vo.FsUserVO;
 import com.fs.his.vo.FsUserExportListVO;
 import com.fs.his.vo.FsUserFollowDoctorVO;
@@ -63,7 +65,6 @@ import com.fs.im.config.ImTypeConfig;
 import com.fs.im.service.OpenIMService;
 import com.fs.hisStore.domain.FsStoreOrderScrm;
 import com.fs.hisStore.domain.FsUserBillScrm;
-import com.fs.hisStore.domain.FsUserScrm;
 import com.fs.hisStore.enums.BillDetailEnum;
 import com.fs.hisStore.mapper.FsStoreOrderScrmMapper;
 import com.fs.hisStore.service.IFsUserBillScrmService;
@@ -178,6 +179,8 @@ public class FsUserServiceImpl implements IFsUserService {
 
     @Autowired
     private IFsUserWxService fsUserWxService;
+    @Autowired
+    private FsPatientMapper fsPatientMapper;
 
 
     /**
@@ -315,6 +318,7 @@ public class FsUserServiceImpl implements IFsUserService {
     public List<FsUserAddress> selectFsUserAddressByUserId(Long userId) {
         FsUserAddress fsUserAddress = new FsUserAddress();
         fsUserAddress.setUserId(userId);
+        fsUserAddress.setIsConfirm(1);
         return fsUserAddressMapper.selectFsUserAddressList(fsUserAddress);
     }
 
@@ -1467,4 +1471,61 @@ public class FsUserServiceImpl implements IFsUserService {
         return R.ok();
     }
 
+    /**
+     * 用户确认就诊人和收货地址信息
+     */
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void confirmPatientAndAddress(long id, Long patientId, Long userAddressId) {
+        FsPatient fsPatient = fsPatientMapper.selectFsPatientByPatientId(patientId);
+        if (fsPatient == null) {
+            throw new CustomException("就诊人信息不存在");
+        }
+
+        if (!fsPatient.getUserId().equals(id)) {
+            throw new CustomException("非法操作");
+        }
+
+        fsPatient.setIsConfirm(1);
+        fsPatientMapper.updateFsPatient(fsPatient);
+
+        FsUserAddress fsUserAddress = fsUserAddressMapper.selectFsUserAddressByAddressId(userAddressId);
+        if (fsUserAddress == null) {
+            throw new CustomException("收货地址不存在");
+        }
+
+        if (!fsUserAddress.getUserId().equals(id)) {
+            throw new CustomException("非法操作");
+        }
+
+        fsUserAddress.setIsConfirm(1);
+        fsUserAddressMapper.updateFsUserAddress(fsUserAddress);
+    }
+
+    /**
+     * 获取用户确认就诊人和收货地址信息
+     */
+    @Override
+    public Map<String, Object> getConfirmPatientAndAddress(long id, Long patientId, Long userAddressId) {
+        Map<String, Object> result = new HashMap<>();
+        FsPatient fsPatient = fsPatientMapper.selectFsPatientByPatientId(patientId);
+        if (fsPatient != null && fsPatient.getUserId().equals(id)) {
+            if (StringUtils.isNotNull(fsPatient.getMobile())) {
+                fsPatient.setMobile(PhoneUtil.decryptPhone(fsPatient.getMobile()));
+            }
+            result.put("patient", fsPatient);
+        } else {
+            result.put("patient", null);
+        }
+
+        FsUserAddress fsUserAddress = fsUserAddressMapper.selectFsUserAddressByAddressId(userAddressId);
+        if (fsUserAddress != null && fsUserAddress.getUserId().equals(id)) {
+            result.put("userAddress", fsUserAddress);
+        } else {
+            result.put("userAddress", null);
+        }
+
+        return result;
+    }
+
 }

+ 39 - 0
fs-service/src/main/java/com/fs/his/vo/MyMemberVO.java

@@ -0,0 +1,39 @@
+package com.fs.his.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+@ApiModel("我的会员VO")
+@Data
+public class MyMemberVO {
+
+    @ApiModelProperty("会员ID")
+    private Long userId;
+
+    @ApiModelProperty("会员昵称")
+    private String nickName;
+
+    @ApiModelProperty("会员头像")
+    private String avatar;
+
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @ApiModelProperty("销售ID")
+    private Long companyUserId;
+
+    @ApiModelProperty("销售昵称")
+    private String companyUserNickName;
+
+    @ApiModelProperty("会员注册时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
+    private LocalDateTime registerTime;
+
+    @ApiModelProperty("会员绑定时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
+    private LocalDateTime bindTime;
+}

+ 1 - 1
fs-service/src/main/resources/application-common.yml

@@ -119,7 +119,7 @@ pagehelper:
 # Swagger配置
 swagger:
   # 是否开启swagger
-  enabled: false
+  enabled: true
   # 请求前缀
   pathMapping: /dev-api
 

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

@@ -77,6 +77,13 @@ watch:
 fs :
   commonApi: http://172.16.0.16:8010
   h5CommonApi: http://119.29.195.254:8010
+  jwt:
+    # 加密秘钥
+    #    secret: f4e2e52034348f86b67cde581c0f9eb5
+    secret: dev-zxqzbl
+    # token有效时长,7天,单位秒
+    expire: 31536000
+    header: AppToken
 nuonuo:
   key: 10924508
   secret: A2EB20764D304D16

+ 24 - 2
fs-service/src/main/resources/mapper/company/CompanyUserUserMapper.xml

@@ -9,10 +9,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="companyId"    column="company_id"    />
         <result property="companyUserId"    column="company_user_id"    />
         <result property="userId"    column="user_id"    />
+        <result property="createTime"    column="create_time"    />
     </resultMap>
 
     <sql id="selectCompanyUserUserVo">
-        select id, company_id, company_user_id, user_id from company_user_user
+        select id, company_id, company_user_id, user_id, create_time from company_user_user
     </sql>
 
     <select id="selectCompanyUserUserList" parameterType="CompanyUserUser" resultMap="CompanyUserUserResult">
@@ -28,7 +29,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectCompanyUserUserVo"/>
         where id = #{id}
     </select>
-        
+
+    <select id="selectFsUserByCompanyUserId" resultType="com.fs.his.vo.MyMemberVO">
+        select
+            fu.user_id,
+            fu.nick_name,
+            fu.avatar,
+            fu.remark,
+            cu.user_id companyUserId,
+            cu.nick_name companyUserNickName,
+            fu.create_time registerTime,
+            cuu.create_time bindTime
+        from company_user_user cuu
+        inner join fs_user fu on fu.user_id = cuu.user_id
+        left join company_user cu on cu.user_id = cuu.company_user_id
+        where fu.is_del = 0 and cuu.company_user_id = #{companyUserId}
+        <if test="keyword != null and keyword != ''">
+            and fu.nick_name like concat('%', #{keyword}, '%')
+        </if>
+    </select>
+
     <insert id="insertCompanyUserUser" parameterType="CompanyUserUser">
         insert into company_user_user
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -36,12 +56,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="companyId != null">company_id,</if>
             <if test="companyUserId != null">company_user_id,</if>
             <if test="userId != null">user_id,</if>
+            <if test="createTime != null">create_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
             <if test="companyId != null">#{companyId},</if>
             <if test="companyUserId != null">#{companyUserId},</if>
             <if test="userId != null">#{userId},</if>
+            <if test="createTime != null">#{createTime},</if>
          </trim>
     </insert>
 

+ 13 - 2
fs-service/src/main/resources/mapper/his/FsPatientMapper.xml

@@ -27,11 +27,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isFurther"    column="is_further"    />
         <result property="primaryHospital"    column="primary_hospital"    />
         <result property="primaryImages"    column="primary_images"    />
-
+        <result property="isConfirm"    column="is_confirm"    />
+        <result property="helpCompanyUserId"    column="help_company_user_id"    />
     </resultMap>
 
     <sql id="selectFsPatientVo">
-        select patient_id,is_further,primary_hospital,primary_images,renal_unusual,liver_unusual,is_default,relation, patient_name,self_med_history,family_med_history,history_allergic, user_id, id_card, birthday, sex, weight, mobile, is_del, status, create_time, update_time from fs_patient
+        select patient_id,is_further,primary_hospital,primary_images,renal_unusual,liver_unusual,is_default,relation,
+               patient_name,self_med_history,family_med_history,history_allergic, user_id, id_card, birthday, sex,
+               weight, mobile, is_del, status, create_time, update_time, is_confirm, help_company_user_id from fs_patient
     </sql>
 
     <select id="selectFsPatientList" parameterType="FsPatient" resultMap="FsPatientResult">
@@ -47,6 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDel != null "> and is_del = #{isDel}</if>
             <if test="status != null "> and status = #{status}</if>
             <if test="isDefault != null "> and is_default = #{isDefault}</if>
+            <if test="isConfirm != null "> and is_confirm = #{isConfirm}</if>
+            <if test="helpCompanyUserId != null "> and help_company_user_id = #{helpCompanyUserId}</if>
         </where>
     </select>
 
@@ -79,6 +84,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isFurther != null">is_further,</if>
             <if test="primaryHospital != null">primary_hospital,</if>
             <if test="primaryImages != null">primary_images,</if>
+            <if test="isConfirm != null">is_confirm,</if>
+            <if test="helpCompanyUserId != null">help_company_user_id,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="patientName != null">#{patientName},</if>
@@ -102,6 +109,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isFurther != null">#{isFurther},</if>
             <if test="primaryHospital != null">#{primaryHospital},</if>
             <if test="primaryImages != null">#{primaryImages},</if>
+            <if test="isConfirm != null">#{isConfirm},</if>
+            <if test="helpCompanyUserId != null">#{helpCompanyUserId},</if>
         </trim>
     </insert>
 
@@ -129,6 +138,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isFurther != null">is_further = #{isFurther},</if>
             <if test="primaryHospital != null">primary_hospital = #{primaryHospital},</if>
             <if test="primaryImages != null">primary_images = #{primaryImages},</if>
+            <if test="isConfirm != null">is_confirm = #{isConfirm},</if>
+            <if test="helpCompanyUserId != null">help_company_user_id = #{helpCompanyUserId},</if>
         </trim>
         where patient_id = #{patientId}
     </update>

+ 11 - 1
fs-service/src/main/resources/mapper/his/FsUserAddressMapper.xml

@@ -21,10 +21,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isDel"    column="is_del"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateTime"    column="update_time"    />
+        <result property="isConfirm"    column="is_confirm"    />
+        <result property="helpCompanyUserId"    column="help_company_user_id"    />
     </resultMap>
 
     <sql id="selectFsUserAddressVo">
-        select address_id, user_id, real_name, phone, province, city, district, city_ids, detail, post_code, longitude, latitude, is_default, is_del, create_time, update_time from fs_user_address
+        select address_id, user_id, real_name, phone, province, city, district, city_ids, detail, post_code, longitude, latitude, is_default, is_del, create_time, update_time, is_confirm, help_company_user_id from fs_user_address
     </sql>
 
     <select id="selectFsUserAddressList" parameterType="FsUserAddress" resultMap="FsUserAddressResult">
@@ -43,6 +45,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="longitude != null  and longitude != ''"> and longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''"> and latitude = #{latitude}</if>
             <if test="isDefault != null "> and is_default = #{isDefault}</if>
+            <if test="isConfirm != null "> and is_confirm = #{isConfirm}</if>
+            <if test="helpCompanyUserId != null "> and help_company_user_id = #{helpCompanyUserId}</if>
         </where>
     </select>
 
@@ -69,6 +73,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDel != null">is_del,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateTime != null">update_time,</if>
+            <if test="isConfirm != null">is_confirm,</if>
+            <if test="helpCompanyUserId != null">help_company_user_id,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="userId != null">#{userId},</if>
@@ -86,6 +92,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDel != null">#{isDel},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
+            <if test="isConfirm != null">#{isConfirm},</if>
+            <if test="helpCompanyUserId != null">#{helpCompanyUserId},</if>
          </trim>
     </insert>
 
@@ -107,6 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDel != null">is_del = #{isDel},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="isConfirm != null">is_confirm = #{isConfirm},</if>
+            <if test="helpCompanyUserId != null">help_company_user_id = #{helpCompanyUserId},</if>
         </trim>
         where address_id = #{addressId}
     </update>

+ 1 - 1
fs-store/src/main/java/com/fs/store/controller/store/FsStoreAfterSalesController.java

@@ -42,10 +42,10 @@ public class FsStoreAfterSalesController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(FsStoreAfterSalesParam fsStoreAfterSales)
     {
-        startPage();
         if(!StringUtils.isEmpty(fsStoreAfterSales.getCreateTimeRange())){
             fsStoreAfterSales.setCreateTimeList(fsStoreAfterSales.getCreateTimeRange().split("--"));
         }
+        startPage();
         List<FsStoreAfterSalesListVO> list = fsStoreAfterSalesService.selectFsStoreAfterSalesListVO(fsStoreAfterSales);
         return getDataTable(list);
     }

+ 1 - 1
fs-store/src/main/java/com/fs/store/controller/store/FsStoreProductController.java

@@ -50,8 +50,8 @@ public class FsStoreProductController extends BaseController
 @GetMapping("/list")
 public TableDataInfo list(FsStoreProductListSParam fsStoreProduct)
 {
-    startPage();
     fsStoreProduct.setStoreId(UserUtil.getLoginUserStoreID());
+    startPage();
     List<FsStoreProductListSVO> list = fsStoreProductService.selectFsStoreProductListSVO(fsStoreProduct);
     return getDataTable(list);
 }

+ 30 - 13
fs-user-app/src/main/java/com/fs/app/controller/CompanyUserController.java

@@ -1,30 +1,24 @@
 package com.fs.app.controller;
 
 
-import cn.hutool.core.img.ImgUtil;
-import cn.hutool.core.io.FileUtil;
-import cn.hutool.extra.qrcode.QrCodeUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.fs.app.annotation.Login;
 import com.fs.app.param.FsBindCompanyUserParam;
+import com.fs.app.param.HelpPatientAndAddressParam;
 import com.fs.common.annotation.Log;
-import com.fs.common.config.FSConfig;
+import com.fs.common.annotation.RepeatSubmit;
 import com.fs.common.core.domain.R;
 import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.core.redis.RedisCache;
 import com.fs.common.enums.BusinessType;
-import com.fs.common.exception.CustomException;
-import com.fs.common.exception.file.OssException;
 import com.fs.common.utils.SecurityUtils;
 import com.fs.common.utils.sign.Md5Utils;
 import com.fs.company.domain.CompanyUser;
-import com.fs.company.domain.CompanyUserCard;
 import com.fs.company.domain.CompanyUserUser;
 import com.fs.company.mapper.CompanyUserMapper;
 import com.fs.company.param.CompanyUserLoginParam;
 import com.fs.company.param.companyUserAddPrintParam;
-import com.fs.company.service.ICompanyUserCardService;
 import com.fs.company.service.ICompanyUserService;
 import com.fs.company.service.ICompanyUserUserService;
 import com.fs.config.ai.AiHostProper;
@@ -35,18 +29,16 @@ import com.fs.fastgptApi.vo.AudioVO;
 import com.fs.his.param.*;
 import com.fs.his.service.IFsPrescribeService;
 import com.fs.his.vo.FsPrescribeListDVO;
-import com.fs.his.vo.FsPrescribeListUVO;
-import com.fs.his.vo.FsPrescribeListVO;
+import com.fs.his.vo.FsUserVO;
+import com.fs.his.vo.MyMemberVO;
 import com.fs.sop.domain.QwSopTempVoice;
 import com.fs.sop.service.IQwSopTempVoiceService;
 import com.fs.system.oss.CloudStorageService;
 import com.fs.system.oss.OSSFactory;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
-import io.lettuce.core.dynamic.annotation.Param;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.io.FileUtils;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.entity.StringEntity;
@@ -56,9 +48,9 @@ import org.apache.http.util.EntityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.commons.CommonsMultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
 import java.io.*;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
@@ -385,5 +377,30 @@ public class CompanyUserController extends  AppBaseController {
         return R.ok().put("data",listPageInfo);
     }
 
+    @Login
+    @GetMapping("/myMember")
+    @ApiOperation("查询我的会员")
+    public R myMember(@RequestParam(required = false) String keyword) {
+        startPage();
+        List<MyMemberVO> fsUserVOS = companyUserUserService.selectFsUserByCompanyUserId(getCompanyUserId(), keyword);
+        PageInfo<MyMemberVO> fsUserPageInfo = new PageInfo<>(fsUserVOS);
+        return R.ok().put("data", fsUserPageInfo);
+    }
+
+    // 帮填就诊人和地址
+    @Login
+    @PostMapping("/addHelpPatientAndAddress")
+    @ApiOperation("帮填就诊人和地址")
+    public R addHelpPatientAndAddress(@Valid @RequestBody HelpPatientAndAddressParam param) {
+        return R.ok().put("data", companyUserService.addHelpPatientAndAddress(getCompanyUserId(), param.getUserId(), param.getPatientParam(), param.getAddressParam()));
+    }
+
+    // 查询帮填就诊人和地址
+    @Login
+    @GetMapping("/getHelpPatientAndAddress")
+    @ApiOperation("查询帮填就诊人和地址")
+    public R getHelpPatientAndAddress(@RequestParam Long userId) {
+        return R.ok().put("data", companyUserService.getHelpPatientAndAddress(getCompanyUserId(), userId));
+    }
 
 }

+ 1 - 0
fs-user-app/src/main/java/com/fs/app/controller/PatientController.java

@@ -55,6 +55,7 @@ public class PatientController extends  AppBaseController {
             map.setUserId(Long.parseLong(getUserId()));
             map.setIsDel(0);
             map.setStatus(1);
+            map.setIsConfirm(1);
             List<FsPatient> list=patientService.selectFsPatientList(map);
             for (FsPatient fsPatient : list) {
                 if (fsPatient.getMobile()!=null&&fsPatient.getMobile().length()>11&&!fsPatient.getMobile().matches("\\d+")){

+ 4 - 3
fs-user-app/src/main/java/com/fs/app/controller/TalentController.java

@@ -92,16 +92,16 @@ public class TalentController extends  AppBaseController{
     @ApiOperation("获取达人粉丝列表")
     @GetMapping("/getTalentFansByUserId")
     private TableDataInfo getFansByUserId(FsUserTalentFansParam param){
-        startPage();
         param.setUserId(null);
+        startPage();
         return getDataTable(userTalentFollowService.selectFsUserTalentFansVoList(param));
     }
 
     @ApiOperation("获取达人关注列表")
     @GetMapping("/getTalentFollowByUserId")
     private TableDataInfo getFollowByUserId(FsUserTalentFansParam param){
-        startPage();
         param.setTalentId(null);
+        startPage();
         return getDataTable(userTalentFollowService.selectFsUserFollowVoList(param));
     }
 
@@ -250,8 +250,9 @@ public class TalentController extends  AppBaseController{
         if (null==fsUserTalent){
             return R.error("您选择的用户还未注册达人");
         }
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
+
         boolean oneSelf = userId == param.getUserId();
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<FsUserVideoListUVO> list = fsUserVideoService.selectFsUserVideoListUVOByUser(fsUserTalent.getTalentId(),oneSelf,userId);
 
         PageInfo<FsUserVideoListUVO> listPageInfo=new PageInfo<>(list);

+ 2 - 2
fs-user-app/src/main/java/com/fs/app/controller/UserAddressController.java

@@ -56,6 +56,7 @@ public class UserAddressController extends  AppBaseController {
             FsUserAddress map=new FsUserAddress();
             map.setUserId(Long.parseLong(getUserId()));
             map.setIsDel(0);
+            map.setIsConfirm(1);
             List<FsUserAddress> list=addressService.selectFsUserAddressList(map);
             for (FsUserAddress fsUserAddress : list) {
 
@@ -101,14 +102,13 @@ public class UserAddressController extends  AppBaseController {
         userAddress.setUserId(Long.parseLong(getUserId()));
         addressService.insertFsUserAddress(userAddress);
 
-        // 填写就诊人信息
+        // 填写地址信息
         FsUserAddIntegralTemplateParam integralTemplateParam = new FsUserAddIntegralTemplateParam();
         integralTemplateParam.setUserId(Long.parseLong(getUserId()));
         integralTemplateParam.setLogType(FsUserIntegralLogTypeEnum.TYPE_12.getValue());
         integralTemplateParam.setBusinessId(userAddress.getAddressId().toString());
         fsUserIntegralLogsService.addIntegralTemplate(integralTemplateParam);
 
-        fsUserIntegralLogsService.addUserAddressIntegral(Long.parseLong(getUserId()),userAddress.getAddressId());
         return R.ok("操作成功");
     }
 

+ 18 - 0
fs-user-app/src/main/java/com/fs/app/controller/UserController.java

@@ -4,6 +4,7 @@ package com.fs.app.controller;
 import cn.hutool.core.lang.Validator;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.fs.app.annotation.Login;
+import com.fs.app.param.ConfirmPatientAndAddressParam;
 import com.fs.app.param.FsDoctorRegisterParam;
 import com.fs.app.param.FsUserEditParam;
 import com.fs.common.core.domain.R;
@@ -365,4 +366,21 @@ public class UserController extends  AppBaseController {
     public R removeUser(){
         return userService.removeUser(Long.parseLong(getUserId()));
     }
+
+    // 获取确认就诊人和地址
+    @Login
+    @PostMapping("/getConfirmPatientAndAddress")
+    @ApiOperation("获取确认就诊人和地址")
+    public R getConfirmPatientAndAddress(@Valid @RequestBody ConfirmPatientAndAddressParam param) {
+        return R.ok().put("data", userService.getConfirmPatientAndAddress(Long.parseLong(getUserId()), param.getPatientId(), param.getUserAddressId()));
+    }
+
+    // 确认就诊人和地址信息
+    @Login
+    @ApiOperation("确认就诊人和地址信息")
+    @PostMapping("/confirmPatientAndAddress")
+    public R confirmPatientAndAddress(@Valid @RequestBody ConfirmPatientAndAddressParam param) {
+        userService.confirmPatientAndAddress(Long.parseLong(getUserId()), param.getPatientId(), param.getUserAddressId());
+        return R.ok();
+    }
 }

+ 20 - 0
fs-user-app/src/main/java/com/fs/app/param/ConfirmPatientAndAddressParam.java

@@ -0,0 +1,20 @@
+package com.fs.app.param;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@ApiModel("确认就诊人和收货地址")
+@Data
+public class ConfirmPatientAndAddressParam {
+
+    @NotNull(message = "就诊人不能为空")
+    @ApiModelProperty("就诊人ID")
+    private Long patientId;
+
+    @NotNull(message = "收货地址不能为空")
+    @ApiModelProperty("收货地址ID")
+    private Long userAddressId;
+}

+ 30 - 0
fs-user-app/src/main/java/com/fs/app/param/HelpPatientAndAddressParam.java

@@ -0,0 +1,30 @@
+package com.fs.app.param;
+
+import com.fs.company.param.HelpAddPatientParam;
+import com.fs.company.param.HelpAddUserAddressParam;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.validation.annotation.Validated;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+
+@Data
+@ApiModel("就诊人和地址对象")
+public class HelpPatientAndAddressParam {
+
+    @NotNull(message = "会员ID不能为空")
+    @ApiModelProperty("会员ID")
+    private Long userId;
+
+    @Valid
+    @NotNull(message = "就诊人信息不能为空")
+    @ApiModelProperty("就诊人信息")
+    private HelpAddPatientParam patientParam;
+
+    @Valid
+    @NotNull(message = "地址信息不能为空")
+    @ApiModelProperty("地址信息")
+    private HelpAddUserAddressParam addressParam;
+}

+ 2 - 2
fs-watch/src/main/java/com/fs/app/controller/WatchController.java

@@ -605,7 +605,6 @@ public class WatchController extends AppBaseController {
     @Login
     @GetMapping("/queryAlarmPageByStatus")
     public AppTableDataInfoVo queryPageByStatus(WatchAlarmData data) {
-        startPage();
         if (StringUtils.isBlank(data.getDeviceId())) {
             //查询当前登录用户
             String userId = getUserId();
@@ -624,6 +623,7 @@ public class WatchController extends AppBaseController {
             }
             data.setDeviceId(deviceIdsStr);
         }
+        startPage();
         AppWatchAlarmDataVo vo = this.watchAlarmDataService.queryPageByAppStatus(data);
         TableDataInfo dataTable = getDataTable(vo.getData());
         AppTableDataInfoVo appTableDataInfoVo = new AppTableDataInfoVo();
@@ -1175,8 +1175,8 @@ public class WatchController extends AppBaseController {
     @ApiOperation("查询新手引导列表")
     @GetMapping("/guidList")
     public TableDataInfo guidList(WatchBeginnerGuide deviceBeginnerGuide) {
-        startPage();
         deviceBeginnerGuide.setBelong("rt");
+        startPage();
         List<WatchBeginnerGuide> list = watchBeginnerGuideService.selectWatchBeginnerGuideList(deviceBeginnerGuide);
         return getDataTable(list);
     }

+ 1 - 1
fs-wx-api/src/main/java/com/fs/app/controller/CompanyWxUserController.java

@@ -93,12 +93,12 @@ public class CompanyWxUserController extends AppBaseController
     @GetMapping("/getCompanyWxList")
     public R getCompanyWxList(CompanyWxListParam param){
         CompanyUser user = companyUserService.selectCompanyUserById(Long.parseLong(getUserId()));
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         CompanyWxUser wxUser = new CompanyWxUser();
         wxUser.setCompanyId(user.getCompanyId());
         wxUser.setCompanyUserId(user.getUserId());
         wxUser.setNickName(param.getKeyword());
         wxUser.setAccountId(Long.parseLong(getAccountId()));
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<CompanyWxUser> list = companyWxUserService.selectCompanyWxUserList(wxUser);
         PageInfo<CompanyWxUser> listPageInfo=new PageInfo<>(list);
         return R.ok().put("data",listPageInfo);

+ 1 - 1
fs-wx-api/src/main/java/com/fs/app/controller/CrmCustomerController.java

@@ -50,8 +50,8 @@ public class CrmCustomerController extends AppBaseController
     public R getLineCustomerList( CrmLineCustomerListQueryParam param)
     {
         CompanyUser user = companyUserService.selectCompanyUserById(Long.parseLong(getUserId()));
-        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         param.setCompanyId(user.getCompanyId());
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<CrmLineCustomerListQueryVO> list = crmCustomerService.selectCrmLineCustomerListQuery(param);
         if (list != null) {
             for (CrmLineCustomerListQueryVO vo : list) {