Progr1mmer 6 éve
szülő
commit
f010d4e85c
100 módosított fájl, 1256 hozzáadás és 1666 törlés
  1. 26 26
      app/app-iot-server/src/main/java/com/yihu/iot/controller/common/FileUploadController.java
  2. 2 2
      app/app-iot-server/src/main/java/com/yihu/iot/controller/common/IotSystemDictController.java
  3. 30 30
      app/app-iot-server/src/main/java/com/yihu/iot/controller/company/IotCompanyController.java
  4. 34 34
      app/app-iot-server/src/main/java/com/yihu/iot/controller/device/IotDeviceController.java
  5. 21 21
      app/app-iot-server/src/main/java/com/yihu/iot/controller/device/IotDeviceOrderController.java
  6. 15 15
      app/app-iot-server/src/main/java/com/yihu/iot/controller/device/IotDeviceQualityController.java
  7. 22 22
      app/app-iot-server/src/main/java/com/yihu/iot/controller/product/IotProductController.java
  8. 3 3
      app/app-iot-server/src/main/java/com/yihu/iot/controller/third/wlyy/MonitoringHealthPlatformController.java
  9. 6 6
      app/app-iot-server/src/main/java/com/yihu/iot/service/common/SystemDictService.java
  10. 30 30
      app/app-iot-server/src/main/java/com/yihu/iot/service/company/CompanyService.java
  11. 20 20
      app/app-iot-server/src/main/java/com/yihu/iot/service/device/DeviceOrderService.java
  12. 29 29
      app/app-iot-server/src/main/java/com/yihu/iot/service/device/DeviceService.java
  13. 14 14
      app/app-iot-server/src/main/java/com/yihu/iot/service/device/IotDeviceQualityService.java
  14. 18 18
      app/app-iot-server/src/main/java/com/yihu/iot/service/product/ProductService.java
  15. 6 6
      app/app-iot-server/src/main/java/com/yihu/iot/service/third/wlyy/MonitoringHealthService.java
  16. 5 0
      app/public-health-server/pom.xml
  17. 15 15
      app/public-health-server/src/main/java/com/yihu/health/controller/archives/ArchivesController.java
  18. 9 9
      app/public-health-server/src/main/java/com/yihu/health/service/archives/ArchivesService.java
  19. 2 2
      app/public-health-server/src/main/java/com/yihu/health/service/dictionary/SystemDictService.java
  20. 5 9
      common/common-entity/src/main/java/com/yihu/jw/entity/base/module/ModuleFunctionDO.java
  21. 11 11
      common/common-fegin/src/main/java/com/yihu/jw/fegin/archives/ArchivesFeign.java
  22. 48 48
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/FunctionFeign.java
  23. 54 54
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/ModuleFeign.java
  24. 26 26
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SaasFeign.java
  25. 45 45
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SystemDictFeign.java
  26. 48 48
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SystemDictListFeign.java
  27. 8 8
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/login/LoginFeign.java
  28. 4 4
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/sms/RegisterSmsFeign.java
  29. 14 14
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/BaseMenuFeign.java
  30. 12 12
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/BaseRoleFeign.java
  31. 12 12
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/EmployFeign.java
  32. 2 2
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/AccessTokenFeign.java
  33. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/GraphicMessageFeign.java
  34. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatFeign.java
  35. 10 10
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatMenuFeign.java
  36. 8 8
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatTemplateFeign.java
  37. 11 11
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/archives/ArchivesFallbackFactory.java
  38. 8 8
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/FunctionFeignFallbackFactory.java
  39. 9 9
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/LoginFeignFallbackFactory.java
  40. 10 10
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/ModuleFeignFallbackFactory.java
  41. 3 3
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SaasFeignFallbackFactory.java
  42. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SystemDictFeignFallbackFactory.java
  43. 8 8
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SystemDictListFeignFallbackFactory.java
  44. 8 8
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/BaseMenuFeignFallbackFactory.java
  45. 12 12
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/BaseRoleFeignFallbackFactory.java
  46. 12 12
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/EmployeeFeignFallbackFactory.java
  47. 2 2
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/AccessTokenFeignFallbackFactory.java
  48. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/GraphicMessageFeignFallbackFactory.java
  49. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatFeignFallbackFactory.java
  50. 10 10
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatMenuFeignFallbackFactory.java
  51. 8 8
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatTemplateFeignFallbackFactory.java
  52. 5 5
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/common/IotFileUploadFallbackFactory.java
  53. 2 2
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/common/IotSystemDictFallbackFactory.java
  54. 16 16
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/company/IotCompanyFallbackFactory.java
  55. 4 4
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataInputFeignFallbackFactory.java
  56. 11 12
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataSearchFeignFallbackFactory.java
  57. 2 2
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataStandardConvertFeignFallbackFactory.java
  58. 22 22
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceFallbackFactory.java
  59. 15 15
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceOrderFallbackFactory.java
  60. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceQualityFallbackFactory.java
  61. 10 10
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotPatientDeviceFallbackFactory.java
  62. 8 8
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/product/IotProductFallbackFactory.java
  63. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementFeignFallbackFactory.java
  64. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementKpiFeignFallbackFactory.java
  65. 5 5
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementKpiLogFeignFallbackFactory.java
  66. 6 6
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyySignFamilyFeignFallbackFactory.java
  67. 9 9
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/patient/AdvertisementFeignFallbackFactory.java
  68. 5 5
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/common/IotFileUploadFeign.java
  69. 2 2
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/common/IotSystemDictFeign.java
  70. 12 12
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/company/IotCompanyFeign.java
  71. 4 4
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataInputFeign.java
  72. 11 11
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataSearchFeign.java
  73. 2 2
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataStandardConvertFeign.java
  74. 14 14
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceFeign.java
  75. 10 10
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceOrderFeign.java
  76. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceQualityFeign.java
  77. 10 10
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotPatientDeviceFeign.java
  78. 8 8
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/product/IotProductFeign.java
  79. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementFeign.java
  80. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementKpiFeign.java
  81. 5 5
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementKpiLogFeign.java
  82. 6 6
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyySignFamilyFeign.java
  83. 9 9
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/patient/AdvertisementFeign.java
  84. 12 76
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java
  85. 0 203
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/EnvelopRestController.java
  86. 0 14
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/PageArg.java
  87. 13 13
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/base/BaseEnvelop.java
  88. 5 7
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/EnvelopList.java
  89. 55 54
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/Envelop.java
  90. 7 8
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/EnvelopObj.java
  91. 37 39
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/EnvelopPage.java
  92. 97 34
      common/common-web/src/main/java/com/yihu/jw/web/endpoint/EnvelopRestEndpoint.java
  93. 8 22
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/base/BaseEnvelopStatus.java
  94. 4 0
      common/common-web/pom.xml
  95. 13 13
      common/common-web/src/main/java/com/yihu/jw/web/handler/GlobalExceptionHandler.java
  96. 0 38
      common/common-web/src/main/java/com/yihu/jw/web/model/Envelop.java
  97. 0 20
      common/common-web/src/main/java/com/yihu/jw/web/model/ListEnvelop.java
  98. 0 101
      common/common-web/src/main/java/com/yihu/jw/web/model/MixEnvelop.java
  99. 0 19
      common/common-web/src/main/java/com/yihu/jw/web/model/ObjEnvelop.java
  100. 0 0
      common/common-web/src/main/java/com/yihu/jw/web/model/PageEnvelop.java

+ 26 - 26
app/app-iot-server/src/main/java/com/yihu/iot/controller/common/FileUploadController.java

@ -3,7 +3,7 @@ package com.yihu.iot.controller.common;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yihu.fastdfs.FastDFSUtil;
import com.yihu.iot.service.common.FileUploadService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.common.UploadVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import io.swagger.annotations.Api;
@ -41,24 +41,24 @@ public class FileUploadController extends BaseController {
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream_img)
    @ApiOperation(value = "文件流上传图片", notes = "文件流上传图片")
    public Envelop<UploadVO> uploadImg(@ApiParam(value = "文件", required = true)
    public MixEnvelop<UploadVO, UploadVO> uploadImg(@ApiParam(value = "文件", required = true)
                                       @RequestParam(value = "file", required = true) MultipartFile file){
        try {
            // 得到文件的完整名称  xxx.txt
            String fullName = file.getOriginalFilename();
            if(StringUtils.isBlank(fullName)){
                return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
                return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
            }
            //得到文件类型
            String fileType = fullName.substring(fullName.lastIndexOf(".") + 1).toLowerCase();
            if(StringUtils.isBlank(fileType)||!"jpg,jpeg,png".contains(fileType)){
                return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
                return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
            }
            long size = file.getSize();
            long max = 5*1024*1024;
            if(size>max){
                return Envelop.getError("文件大小不超过5M",IotRequestMapping.api_iot_fail);
                return MixEnvelop.getError("文件大小不超过5M",IotRequestMapping.api_iot_fail);
            }
            String fileName = fullName.substring(0, fullName.lastIndexOf("."));
@ -76,37 +76,37 @@ public class FileUploadController extends BaseController {
            }else {
                uploadVO = fileUploadService.request(request,file.getInputStream(),fullName);
                if(uploadVO==null){
                    return Envelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                    return MixEnvelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                }
            }
            return Envelop.getSuccess(IotRequestMapping.Common.message_success_create, uploadVO);
            return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_create, uploadVO);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
            return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
        }
    }
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream_attachment)
    @ApiOperation(value = "文件流上传附件", notes = "文件流上传附件")
    public Envelop<UploadVO> uploadAttachment(@ApiParam(value = "文件", required = true)
    public MixEnvelop<UploadVO, UploadVO> uploadAttachment(@ApiParam(value = "文件", required = true)
                                              @RequestParam(value = "file", required = true) MultipartFile file){
        try {
            // 得到文件的完整名称  xxx.txt
            String fullName = file.getOriginalFilename();
            if(StringUtils.isBlank(fullName)){
                return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
                return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
            }
            //得到文件类型
            String fileType = fullName.substring(fullName.lastIndexOf(".") + 1).toLowerCase();
            if(StringUtils.isBlank(fileType)||!"doc、docx、pdf、xls、xlsx、jpg、jpeg、png".contains(fileType)){
                return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
                return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
            }
            long size = file.getSize();
            long max = 5*1024*1024;
            if(size>max){
                return Envelop.getError("文件大小不超过5M",IotRequestMapping.api_iot_fail);
                return MixEnvelop.getError("文件大小不超过5M",IotRequestMapping.api_iot_fail);
            }
            String fileName = fullName.substring(0, fullName.lastIndexOf("."));
@ -124,20 +124,20 @@ public class FileUploadController extends BaseController {
            }else {
                uploadVO = fileUploadService.request(request,file.getInputStream(),fullName);
                if(uploadVO==null){
                    return Envelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                    return MixEnvelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                }
            }
            return Envelop.getSuccess(IotRequestMapping.Common.message_success_create, uploadVO);
            return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_create, uploadVO);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
            return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
        }
    }
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream)
    @ApiOperation(value = "文件流上传文件", notes = "文件流上传文件")
    public Envelop<UploadVO> uploadStream(@ApiParam(value = "文件", required = true) @RequestParam(value = "file", required = true) MultipartFile file) {
    public MixEnvelop<UploadVO, UploadVO> uploadStream(@ApiParam(value = "文件", required = true) @RequestParam(value = "file", required = true) MultipartFile file) {
        try {
            // 得到文件的完整名称  xxx.txt
            String fullName = file.getOriginalFilename();
@ -158,20 +158,20 @@ public class FileUploadController extends BaseController {
            }else {
                uploadVO = fileUploadService.request(request,file.getInputStream(),fullName);
                if(uploadVO==null){
                    return Envelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                    return MixEnvelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                }
            }
            return Envelop.getSuccess(IotRequestMapping.Common.message_success_create, uploadVO);
            return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_create, uploadVO);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
            return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
        }
    }
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_string)
    @ApiOperation(value = "base64上传图片",notes = "base64上传图片")
    public Envelop<UploadVO> uploadImages(@ApiParam(name = "jsonData", value = "头像转化后的输入流") @RequestBody String jsonData) throws Exception {
    public MixEnvelop<UploadVO, UploadVO> uploadImages(@ApiParam(name = "jsonData", value = "头像转化后的输入流") @RequestBody String jsonData) throws Exception {
        try {
            String date = URLDecoder.decode(jsonData,"UTF-8");
@ -197,22 +197,22 @@ public class FileUploadController extends BaseController {
            }else {
                uploadVO = fileUploadService.request(request,inputStream,"");
                if(uploadVO ==null){
                    return Envelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                    return MixEnvelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                }
            }
            //返回文件路径
            return Envelop.getSuccess(IotRequestMapping.FileUpload.message_success_upload, uploadVO);
            return MixEnvelop.getSuccess(IotRequestMapping.FileUpload.message_success_upload, uploadVO);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
            return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
        }
    }
    @RequestMapping(value = "commonUpload", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("公共的文件上传")
    public Envelop<UploadVO> commonUpload(HttpServletRequest request) {
    public MixEnvelop<UploadVO, UploadVO> commonUpload(HttpServletRequest request) {
        InputStream in = null;
        try {
            String paths = request.getParameter("filePaths");
@ -247,10 +247,10 @@ public class FileUploadController extends BaseController {
            UploadVO uploadVO = new UploadVO();
            uploadVO.setFullUri(result.get("fileId").toString().replaceAll("\"", ""));
            uploadVO.setFullUrl(fastdfs_file_url + result.get("fileId").toString().replaceAll("\"", ""));
            return Envelop.getSuccess(IotRequestMapping.FileUpload.message_success_upload, result);
            return MixEnvelop.getSuccess(IotRequestMapping.FileUpload.message_success_upload, result);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
            return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
        }finally {
            if(in!=null){
                try {

+ 2 - 2
app/app-iot-server/src/main/java/com/yihu/iot/controller/common/IotSystemDictController.java

@ -1,7 +1,7 @@
package com.yihu.iot.controller.common;
import com.yihu.iot.service.common.SystemDictService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.dict.IotSystemDictVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import io.swagger.annotations.Api;
@ -26,7 +26,7 @@ public class IotSystemDictController  extends BaseController{
    @GetMapping(value = IotRequestMapping.System.findDictByCode)
    @ApiOperation(value = "获取字典列表(不分页)")
    public Envelop<IotSystemDictVO> getList(
    public MixEnvelop<IotSystemDictVO, IotSystemDictVO> getList(
            @ApiParam(name = "dictName", value = "字典名称", defaultValue = "COMPANY_TYPE")
            @RequestParam(value = "dictName", required = true) String dictName) throws Exception {
        return systemDictService.getList(dictName);

+ 30 - 30
app/app-iot-server/src/main/java/com/yihu/iot/controller/company/IotCompanyController.java

@ -2,7 +2,7 @@ package com.yihu.iot.controller.company;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.company.CompanyService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.company.IotCompanyCertificateVO;
import com.yihu.jw.restmodel.iot.company.IotCompanyVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
@ -25,87 +25,87 @@ public class IotCompanyController extends BaseController {
    @GetMapping(value = IotRequestMapping.Company.findCompanyPage)
    @ApiOperation(value = "分页查找企业", notes = "分页查找企业")
    public Envelop<IotCompanyVO> findCompanyPage(@ApiParam(name = "name", value = "供应商名称或联系人姓名", defaultValue = "")
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findCompanyPage(@ApiParam(name = "name", value = "供应商名称或联系人姓名", defaultValue = "")
                                                 @RequestParam(value = "name", required = false) String name,
                                                 @ApiParam(name = "status", value = "审核状态", defaultValue = "")
                                                    @ApiParam(name = "status", value = "审核状态", defaultValue = "")
                                                 @RequestParam(value = "status", required = false) String status,
                                                 @ApiParam(name = "type", value = "企业类型", defaultValue = "")
                                                    @ApiParam(name = "type", value = "企业类型", defaultValue = "")
                                                 @RequestParam(value = "type", required = false) String type,
                                                 @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                    @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                 @RequestParam(value = "page", required = false) Integer page,
                                                 @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                    @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                 @RequestParam(value = "size", required = false) Integer size){
        try {
            return companyService.findCompanyPage(name,status,type,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Company.addCompany)
    @ApiOperation(value = "创建企业", notes = "创建企业")
    public Envelop<IotCompanyVO> addCompany(@ApiParam(name = "jsonData", value = "json串", defaultValue = "")
    public MixEnvelop<IotCompanyVO, IotCompanyVO> addCompany(@ApiParam(name = "jsonData", value = "json串", defaultValue = "")
                                            @RequestParam(value = "jsonData", required = true)String jsonData) {
        try {
            return companyService.addCompany(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Company.findCompanyById)
    @ApiOperation(value = "根据id查找企业", notes = "根据id查找企业")
    public Envelop<IotCompanyVO> findByCode(@ApiParam(name = "id", value = "企业id")
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findByCode(@ApiParam(name = "id", value = "企业id")
                                            @RequestParam(value = "id", required = true) String id) {
        try {
            return companyService.findByCode(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Company.findByBusinessLicense)
    @ApiOperation(value = "根据营业执照号查找企业", notes = "根据营业执照号查找企业")
    public Envelop<IotCompanyVO> findByBusinessLicense(@ApiParam(name = "businessLicense", value = "营业执照号")
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findByBusinessLicense(@ApiParam(name = "businessLicense", value = "营业执照号")
                                                       @RequestParam(value = "businessLicense", required = true) String businessLicense) {
        try {
            return companyService.findByBusinessLicense(businessLicense);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Company.delCompany)
    @ApiOperation(value = "删除企业", notes = "删除企业")
    public Envelop<IotCompanyVO> delCompany(@ApiParam(name = "id", value = "企业id")
    public MixEnvelop<IotCompanyVO, IotCompanyVO> delCompany(@ApiParam(name = "id", value = "企业id")
                                            @RequestParam(value = "id", required = true) String id) {
        try {
            return companyService.delCompany(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Company.updCompany)
    @ApiOperation(value = "修改企业信息", notes = "修改企业信息")
    public Envelop<IotCompanyVO> updCompany(@ApiParam(name = "jsonData", value = "json串", defaultValue = "")
    public MixEnvelop<IotCompanyVO, IotCompanyVO> updCompany(@ApiParam(name = "jsonData", value = "json串", defaultValue = "")
                                            @RequestParam(value = "jsonData", required = true)String jsonData) {
        try {
            return companyService.updCompany(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertPage)
    @ApiOperation(value = "分页获取企业证书", notes = "分页获取企业证书")
    public Envelop<IotCompanyCertificateVO> findCompanyCertPage
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertPage
            (@ApiParam(name = "name", value = "证书名称", defaultValue = "")
             @RequestParam(value = "name", required = false) String name,
             @ApiParam(name = "companyId", value = "企业id", defaultValue = "")
@ -124,69 +124,69 @@ public class IotCompanyController extends BaseController {
            return companyService.findCompanyCertPage(name,page,size,companyId);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertById)
    @ApiOperation(value = "根据id查找企业证书", notes = "根据id查找企业证书")
    public Envelop<IotCompanyCertificateVO> findCompanyCertById(@ApiParam(name = "id", value = "企业证书id")
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertById(@ApiParam(name = "id", value = "企业证书id")
                                                                @RequestParam(value = "id", required = true) String id) {
        try {
            return companyService.findCompanyCertById(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertByCompanyId)
    @ApiOperation(value = "根据企业id查找企业证书", notes = "根据企业id查找企业证书")
    public Envelop<IotCompanyCertificateVO> findCompanyCertByCompanyId(@ApiParam(name = "companyId", value = "企业id")
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertByCompanyId(@ApiParam(name = "companyId", value = "企业id")
                                                                       @RequestParam(value = "companyId", required = true) String companyId) {
        try {
            return companyService.findCompanyCertByCompanyId(companyId);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Company.addCompanyCert)
    @ApiOperation(value = "创建企业证书", notes = "创建企业证书")
    public Envelop<IotCompanyCertificateVO> addCompanyCert(@ApiParam(name = "jsonData", value = "json串", defaultValue = "")
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> addCompanyCert(@ApiParam(name = "jsonData", value = "json串", defaultValue = "")
                                                           @RequestParam(value = "jsonData", required = true)String jsonData) {
        try {
            return companyService.addCompanyCert(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Company.changePassWord)
    @ApiOperation(value = "修改用户密码", notes = "修改用户密码")
    public Envelop changePassWord(@ApiParam(name = "userId", value = "用户id", defaultValue = "")
    public MixEnvelop changePassWord(@ApiParam(name = "userId", value = "用户id", defaultValue = "")
                                  @RequestParam(value = "userId", required = true)String userId,
                                  @ApiParam(name = "passWord", value = "密码", defaultValue = "")
                                     @ApiParam(name = "passWord", value = "密码", defaultValue = "")
                                  @RequestParam(value = "passWord", required = true)String passWord){
        try {
            return companyService.changePassWord(userId,passWord);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Company.delCompanyCert)
    @ApiOperation(value = "删除企业证书", notes = "删除企业证书")
    public Envelop<IotCompanyCertificateVO> delCompanyCert(@ApiParam(name = "id", value = "id", defaultValue = "")
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> delCompanyCert(@ApiParam(name = "id", value = "id", defaultValue = "")
                                                           @RequestParam(value = "id", required = true)String id) {
        try {
            return companyService.delCompanyCert(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }

+ 34 - 34
app/app-iot-server/src/main/java/com/yihu/iot/controller/device/IotDeviceController.java

@ -2,8 +2,8 @@ package com.yihu.iot.controller.device;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.device.DeviceService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.iot.common.ExistVO;
import com.yihu.jw.restmodel.iot.device.IotDeviceImportRecordVO;
import com.yihu.jw.restmodel.iot.device.IotDeviceVO;
@ -28,107 +28,107 @@ public class IotDeviceController extends BaseController{
    @PostMapping(value = IotRequestMapping.Device.api_create)
    @ApiOperation(value = "创建设备", notes = "创建设备")
    public Envelop<IotDeviceVO> create(@ApiParam(name = "json_data", value = "", defaultValue = "")
    public MixEnvelop<IotDeviceVO, IotDeviceVO> create(@ApiParam(name = "json_data", value = "", defaultValue = "")
                          @RequestParam String jsonData) {
        try {
            return deviceService.create(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Device.api_getById)
    @ApiOperation(value = "根据code查找设备", notes = "根据code查找设备")
    public Envelop<IotDeviceVO> findByCode(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotDeviceVO, IotDeviceVO> findByCode(@ApiParam(name = "id", value = "id")
                              @RequestParam(value = "id", required = true) String id ) {
        try {
            return deviceService.findByCode(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Device.isSnExist)
    @ApiOperation(value = "sn码是否存在", notes = "sn码是否存在")
    public Envelop<ExistVO> isSnExist(@ApiParam(name = "sn", value = "sn")
    public MixEnvelop<ExistVO, ExistVO> isSnExist(@ApiParam(name = "sn", value = "sn")
                                      @RequestParam(value = "sn", required = true) String sn) {
        try {
            return deviceService.isSnExist(sn);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Device.isSimExist)
    @ApiOperation(value = "sim卡号是否存在", notes = "sim卡号是否存在")
    public Envelop<ExistVO> isSimExist(@ApiParam(name = "sim", value = "sim")
    public MixEnvelop<ExistVO, ExistVO> isSimExist(@ApiParam(name = "sim", value = "sim")
                                           @RequestParam(value = "sim", required = true) String sim) {
        try {
            return deviceService.isSimExist(sim);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Device.api_delete)
    @ApiOperation(value = "删除设备", notes = "删除设备")
    public Envelop<IotDeviceVO> delDevice(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotDeviceVO, IotDeviceVO> delDevice(@ApiParam(name = "id", value = "id")
                                          @RequestParam(value = "id", required = true) String id
    ) {
        try {
            return deviceService.delDevice(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Device.api_update)
    @ApiOperation(value = "修改设备", notes = "修改设备")
    public BaseEnvelop updDevice(@ApiParam(name = "jsonData", value = "", defaultValue = "")
    public Envelop updDevice(@ApiParam(name = "jsonData", value = "", defaultValue = "")
                                 @RequestParam String jsonData) {
        try {
            return deviceService.updDevice(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return BaseEnvelop.getError(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Device.updSim)
    @ApiOperation(value = "修改sim卡号", notes = "修改sim卡号")
    public BaseEnvelop updSim(@ApiParam(name = "sim", value = "sim")
    public Envelop updSim(@ApiParam(name = "sim", value = "sim")
                              @RequestParam(value = "sim", required = true) String sim,
                              @ApiParam(name = "id", value = "设备id")
                          @ApiParam(name = "id", value = "设备id")
                              @RequestParam(value = "id", required = true) String id) {
        try {
            return deviceService.updSim(sim,id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Device.api_queryPage)
    @ApiOperation(value = "分页查找设备", notes = "分页查找设备")
    public Envelop<IotDeviceVO> findProductPageByCompanyId(@ApiParam(name = "sn", value = "SN码或SIM卡号", defaultValue = "")
    public MixEnvelop<IotDeviceVO, IotDeviceVO> findProductPageByCompanyId(@ApiParam(name = "sn", value = "SN码或SIM卡号", defaultValue = "")
                                                           @RequestParam(value = "sn", required = false) String sn,
                                                           @ApiParam(name = "hospital", value = "社区医院", defaultValue = "")
                                                              @ApiParam(name = "hospital", value = "社区医院", defaultValue = "")
                                                           @RequestParam(value = "hospital", required = false) String hospital,
                                                           @ApiParam(name = "orderId", value = "订单id", defaultValue = "")
                                                              @ApiParam(name = "orderId", value = "订单id", defaultValue = "")
                                                           @RequestParam(value = "orderId", required = false) String orderId,
                                                           @ApiParam(name = "purcharseId", value = "采购id", defaultValue = "")
                                                              @ApiParam(name = "purcharseId", value = "采购id", defaultValue = "")
                                                           @RequestParam(value = "purcharseId", required = false) String purcharseId,
                                                           @ApiParam(name = "isBinding", value = "是否绑定(1已绑定,2未绑定)", defaultValue = "")
                                                              @ApiParam(name = "isBinding", value = "是否绑定(1已绑定,2未绑定)", defaultValue = "")
                                                           @RequestParam(value = "isBinding", required = false) Integer isBinding,
                                                           @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                              @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                           @RequestParam(value = "page", required = false) Integer page,
                                                           @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                              @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                           @RequestParam(value = "size", required = false) Integer size){
        try {
            if(page == null|| page < 0){
@ -140,44 +140,44 @@ public class IotDeviceController extends BaseController{
            return deviceService.findProductPageByCompanyId(sn,hospital,orderId,purcharseId,isBinding,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Device.isImportDevice)
    @ApiOperation(value = "是否正在导入设备数据", notes = "是否正在导入设备数据")
    public Envelop<ExistVO> isImportDevice(@ApiParam(name = "purcharseId", value = "purcharseId")
    public MixEnvelop<ExistVO, ExistVO> isImportDevice(@ApiParam(name = "purcharseId", value = "purcharseId")
                                           @RequestParam(value = "purcharseId", required = true) String purcharseId
    ) {
        try {
            return deviceService.isImportDevice(purcharseId);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
            return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
        }
    }
    @PostMapping(value = IotRequestMapping.Device.importDevice)
    @ApiOperation(value = "设备导入", notes = "设备导入")
    public Envelop<IotDeviceImportRecordVO> uploadStream(@ApiParam(value = "文件", required = true)
    public MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> uploadStream(@ApiParam(value = "文件", required = true)
                                          @RequestParam(value = "file", required = true) MultipartFile file,
                                          @ApiParam(name = "purcharseId", value = "采购id", defaultValue = "")
                                                            @ApiParam(name = "purcharseId", value = "采购id", defaultValue = "")
                                          @RequestParam(value = "purcharseId", required = true) String purcharseId) {
        try {
            return deviceService.uploadStream(file,purcharseId,request);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
            return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
        }
    }
    @GetMapping(value = IotRequestMapping.Device.queryImportRecordPage)
    @ApiOperation(value = "分页查找导入记录", notes = "分页查找导入记录")
    public Envelop<IotDeviceImportRecordVO> queryImportRecordPage(@ApiParam(name = "purcharseId", value = "采购id", defaultValue = "")
    public MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> queryImportRecordPage(@ApiParam(name = "purcharseId", value = "采购id", defaultValue = "")
                                                           @RequestParam(value = "purcharseId", required = true) String purcharseId,
                                                                       @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                                     @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                           @RequestParam(value = "page", required = false) Integer page,
                                                                       @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                                     @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                           @RequestParam(value = "size", required = false) Integer size){
        try {
            if(page == null|| page < 0){
@ -189,7 +189,7 @@ public class IotDeviceController extends BaseController{
            return queryImportRecordPage(purcharseId,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }

+ 21 - 21
app/app-iot-server/src/main/java/com/yihu/iot/controller/device/IotDeviceOrderController.java

@ -2,7 +2,7 @@ package com.yihu.iot.controller.device;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.device.DeviceOrderService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceOrderVO;
import com.yihu.jw.restmodel.iot.device.IotOrderPurchaseVO;
import com.yihu.jw.restmodel.iot.device.IotOrderVO;
@ -25,31 +25,31 @@ public class IotDeviceOrderController extends BaseController {
    @PostMapping(value = IotRequestMapping.DeviceOrder.createOrder)
    @ApiOperation(value = "创建设备订单", notes = "创建设备订单")
    public Envelop<IotOrderVO> create(@ApiParam(name = "jsonData", value = "", defaultValue = "")
    public MixEnvelop<IotOrderVO, IotOrderVO> create(@ApiParam(name = "jsonData", value = "", defaultValue = "")
                          @RequestParam String jsonData) {
        try {
            return deviceOrderService.create(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.DeviceOrder.findById)
    @ApiOperation(value = "根据id查找设备订单", notes = "根据id查找设备订单")
    public Envelop<IotDeviceOrderVO> findByCode(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> findByCode(@ApiParam(name = "id", value = "id")
                              @RequestParam(value = "id", required = true) String id) {
        try {
            return deviceOrderService.findByCode(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.DeviceOrder.findPage)
    @ApiOperation(value = "分页查找设备订单", notes = "分页查找设备订单")
    public Envelop<IotDeviceOrderVO> findPage(@ApiParam(name = "name", value = "供应商名称或负责人姓名", defaultValue = "")
    public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> findPage(@ApiParam(name = "name", value = "供应商名称或负责人姓名", defaultValue = "")
                                                 @RequestParam(value = "name", required = false) String name,
                                                 @ApiParam(name = "type", value = "企业类型", defaultValue = "")
                                                 @RequestParam(value = "type", required = false) String type,
@ -67,53 +67,53 @@ public class IotDeviceOrderController extends BaseController {
            return deviceOrderService.findPage(name,type,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.DeviceOrder.delOrder)
    @ApiOperation(value = "删除订单", notes = "删除订单")
    public Envelop<IotDeviceOrderVO> delOrder(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> delOrder(@ApiParam(name = "id", value = "id")
                                            @RequestParam(value = "id", required = true) String id) {
        try {
            return deviceOrderService.delOrder(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.DeviceOrder.delPurchase)
    @ApiOperation(value = "删除采购订单", notes = "删除采购订单")
    public Envelop<IotOrderPurchaseVO> delPurchase(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> delPurchase(@ApiParam(name = "id", value = "id")
                                                   @RequestParam(value = "id", required = true) String id) {
        try {
            return deviceOrderService.delPurchase(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.DeviceOrder.updOrder)
    @ApiOperation(value = "修改订单", notes = "修改订单")
    public Envelop<IotOrderVO> updOrder(@ApiParam(name = "jsonData", value = "json", defaultValue = "")
    public MixEnvelop<IotOrderVO, IotOrderVO> updOrder(@ApiParam(name = "jsonData", value = "json", defaultValue = "")
                                            @RequestParam(value = "jsonData", required = false)String jsonData) {
        try {
            return deviceOrderService.updOrder(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.DeviceOrder.findPurcharsePage)
    @ApiOperation(value = "分页查找采购清单", notes = "分页查找采购清单")
    public Envelop<IotOrderPurchaseVO> findPurcharsePage(@ApiParam(name = "orderId", value = "订单id", defaultValue = "")
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findPurcharsePage(@ApiParam(name = "orderId", value = "订单id", defaultValue = "")
                                                     @RequestParam(value = "orderId", required = true) String orderId,
                                                         @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                            @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                     @RequestParam(value = "page", required = false) Integer page,
                                                         @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                            @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                     @RequestParam(value = "size", required = false) Integer size){
        try {
            if(page == null|| page < 0){
@ -125,26 +125,26 @@ public class IotDeviceOrderController extends BaseController {
            return deviceOrderService.findPurcharsePage(orderId,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.DeviceOrder.findPurcharseById)
    @ApiOperation(value = "根据id查找采购订单", notes = "根据id查找采购订单")
    public Envelop<IotOrderPurchaseVO>  findPurcharseById(
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findPurcharseById(
            @ApiParam(name = "id", value = "id")
            @RequestParam(value = "id", required = true) String id) {
        try {
            return deviceOrderService.findPurcharseById(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.DeviceOrder.findQualityPage)
    @ApiOperation(value = "质检管理", notes = "质检管理")
    public Envelop<IotOrderPurchaseVO> findQualityPage(
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findQualityPage(
            @ApiParam(name = "qualityStatus", value = "质检状态", defaultValue = "")
            @RequestParam(value = "qualityStatus", required = false) String qualityStatus,
            @ApiParam(name = "orderNo", value = "订单编号", defaultValue = "")
@ -167,7 +167,7 @@ public class IotDeviceOrderController extends BaseController {
            return deviceOrderService.findQualityPage(qualityStatus, orderNo, startTime, endTime, page, size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }

+ 15 - 15
app/app-iot-server/src/main/java/com/yihu/iot/controller/device/IotDeviceQualityController.java

@ -2,7 +2,7 @@ package com.yihu.iot.controller.device;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.device.IotDeviceQualityService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceQualityInspectionPlanVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import io.swagger.annotations.Api;
@ -23,33 +23,33 @@ public class IotDeviceQualityController extends BaseController{
    @PostMapping(value = IotRequestMapping.DeviceQuality.addQualityPlan)
    @ApiOperation(value = "创建设备质检", notes = "创建设备质检")
    public Envelop<IotDeviceQualityInspectionPlanVO> create(@ApiParam(name = "jsonData", value = "", defaultValue = "")
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> create(@ApiParam(name = "jsonData", value = "", defaultValue = "")
                          @RequestParam String jsonData) {
        try {
            return iotDeviceQualityService.create(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.DeviceQuality.findById)
    @ApiOperation(value = "根据code查找设备质检", notes = "根据code查找设备质检")
    public Envelop<IotDeviceQualityInspectionPlanVO> findByCode(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> findByCode(@ApiParam(name = "id", value = "id")
                              @RequestParam(value = "id", required = true) String id
    ) {
        try {
            return iotDeviceQualityService.findByCode(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.DeviceQuality.queryQualityPlanPage)
    @ApiOperation(value = "分页获取设备质检计划", notes = "分页获取设备质检计划")
    public Envelop<IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(
            @ApiParam(name = "purcharseId", value = "采购id", defaultValue = "")
            @RequestParam(value = "purcharseId", required = false) String purcharseId,
            @ApiParam(name = "orderNo", value = "订单编号", defaultValue = "")
@ -66,47 +66,47 @@ public class IotDeviceQualityController extends BaseController{
            return iotDeviceQualityService.queryQualityPlanPage(purcharseId, orderNo, startTime, endTime, page, size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.DeviceQuality.delQualityPlan)
    @ApiOperation(value = "删除质检计划", notes = "删除质检计划")
    public Envelop<IotDeviceQualityInspectionPlanVO> delQualityPlan(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> delQualityPlan(@ApiParam(name = "id", value = "id")
                                            @RequestParam(value = "id", required = true) String id) {
        try {
            return iotDeviceQualityService.delQualityPlan(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.DeviceQuality.completeQualityPlan)
    @ApiOperation(value = "完成质检计划", notes = "完成质检计划")
    public Envelop<IotDeviceQualityInspectionPlanVO> completeQualityPlan(@ApiParam(name = "actualTime", value = "完成时间", defaultValue = "")
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completeQualityPlan(@ApiParam(name = "actualTime", value = "完成时间", defaultValue = "")
                                            @RequestParam(value = "actualTime", required = true) String actualTime,
                                            @ApiParam(name = "id", value = "id")
                                                                            @ApiParam(name = "id", value = "id")
                                            @RequestParam(value = "id", required = true) String id) {
        try {
            return iotDeviceQualityService.completeQualityPlan(actualTime, id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.DeviceQuality.completePlanByPurchaseId)
    @ApiOperation(value = "完成质检计划(按采购id)", notes = "完成质检计划(按采购id)")
    public Envelop<IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(@ApiParam(name = "actualTime", value = "完成时间", defaultValue = "")
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(@ApiParam(name = "actualTime", value = "完成时间", defaultValue = "")
                                                                              @RequestParam(value = "actualTime", required = true) String actualTime,
                                                                              @ApiParam(name = "purchaseId", value = "purchaseId")
                                                                                 @ApiParam(name = "purchaseId", value = "purchaseId")
                                                                              @RequestParam(value = "purchaseId", required = true) String purchaseId) {
        try {
            return iotDeviceQualityService.completePlanByPurchaseId(actualTime, purchaseId);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }

+ 22 - 22
app/app-iot-server/src/main/java/com/yihu/iot/controller/product/IotProductController.java

@ -3,7 +3,7 @@ package com.yihu.iot.controller.product;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.model.ehr.MStdDataSet;
import com.yihu.iot.service.product.ProductService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.product.IotMaintenanceUnitVO;
import com.yihu.jw.restmodel.iot.product.IotProductBaseInfoVO;
import com.yihu.jw.restmodel.iot.product.IotProductVO;
@ -27,11 +27,11 @@ public class IotProductController extends BaseController {
    @GetMapping(value = IotRequestMapping.Product.data_sets)
    @ApiOperation(value = "测量数据", notes = "测量数据")
    public Envelop<MStdDataSet> data_sets(@ApiParam(name = "name", value = "名称", defaultValue = "")
    public MixEnvelop<MStdDataSet, MStdDataSet> data_sets(@ApiParam(name = "name", value = "名称", defaultValue = "")
                                         @RequestParam(value = "name", required = false) String name,
                                         @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                             @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                         @RequestParam(value = "page", required = false) Integer page,
                                         @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                             @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                         @RequestParam(value = "size", required = false) Integer size){
        try {
            if(page == null|| page < 0){
@ -43,14 +43,14 @@ public class IotProductController extends BaseController {
            return productService.data_sets(page, size, name);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Product.findProductPage)
    @ApiOperation(value = "分页查找产品", notes = "分页查找产品")
    public Envelop<IotProductBaseInfoVO> findCompanyPage(
    public MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> findCompanyPage(
            @ApiParam(name = "name", value = "注册证号或产品名称", defaultValue = "")
            @RequestParam(value = "name", required = false) String name,
            @ApiParam(name = "classify", value = "产品分类", defaultValue = "")
@ -71,19 +71,19 @@ public class IotProductController extends BaseController {
            return productService.findCompanyPage(name,classify,companyId,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Product.findProductPageByCompanyId)
    @ApiOperation(value = "分页查找产品(按企业id)", notes = "分页查找产品")
    public Envelop<IotProductBaseInfoVO> findProductPageByCompanyId(@ApiParam(name = "name", value = "产品名称", defaultValue = "")
    public MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> findProductPageByCompanyId(@ApiParam(name = "name", value = "产品名称", defaultValue = "")
                                                         @RequestParam(value = "name", required = false) String name,
                                                         @ApiParam(name = "companyId", value = "企业id", defaultValue = "")
                                                                       @ApiParam(name = "companyId", value = "企业id", defaultValue = "")
                                                         @RequestParam(value = "companyId", required = true) String companyId,
                                                         @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                                       @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                         @RequestParam(value = "page", required = false) Integer page,
                                                         @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                                       @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                         @RequestParam(value = "size", required = false) Integer size){
        try {
            if(page == null|| page < 0){
@ -95,69 +95,69 @@ public class IotProductController extends BaseController {
            return productService.findProductPageByCompanyId(name,companyId,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Product.addProduct)
    @ApiOperation(value = "创建产品", notes = "创建产品")
    public Envelop<IotProductVO> addProduct(@ApiParam(name = "jsonData", value = "json", defaultValue = "")
    public MixEnvelop<IotProductVO, IotProductVO> addProduct(@ApiParam(name = "jsonData", value = "json", defaultValue = "")
                                            @RequestParam(value = "jsonData", required = false)String jsonData) {
        try {
            return productService.addProduct(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Product.findProductById)
    @ApiOperation(value = "根据id查找产品", notes = "根据id查找产品")
    public Envelop<IotProductVO> findByCode(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotProductVO, IotProductVO> findByCode(@ApiParam(name = "id", value = "id")
                                            @RequestParam(value = "id", required = true) String id) {
        try {
            return productService.findByCode(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Product.maintenanceUnitById)
    @ApiOperation(value = "根据id查找产品的维护单位", notes = "根据id查找产品的维护单位")
    public Envelop<IotMaintenanceUnitVO> maintenanceUnitById(@ApiParam(name = "productId", value = "productId")
    public MixEnvelop<IotMaintenanceUnitVO, IotMaintenanceUnitVO> maintenanceUnitById(@ApiParam(name = "productId", value = "productId")
                                            @RequestParam(value = "productId", required = true) String productId) {
        try {
            return productService.maintenanceUnitById(productId);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Product.delProduct)
    @ApiOperation(value = "删除产品", notes = "删除产品")
    public Envelop<IotProductVO> delCompany(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotProductVO, IotProductVO> delCompany(@ApiParam(name = "id", value = "id")
                                            @RequestParam(value = "id", required = true) String id) {
        try {
            return productService.delCompany(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Product.updProduct)
    @ApiOperation(value = "修改产品信息", notes = "修改产品信息")
    public Envelop<IotProductVO> updCompany(@ApiParam(name = "jsonData", value = "json", defaultValue = "")
    public MixEnvelop<IotProductVO, IotProductVO> updCompany(@ApiParam(name = "jsonData", value = "json", defaultValue = "")
                                            @RequestParam(value = "jsonData", required = false)String jsonData) {
        try {
            return productService.updCompany(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }

+ 3 - 3
app/app-iot-server/src/main/java/com/yihu/iot/controller/third/wlyy/MonitoringHealthPlatformController.java

@ -2,7 +2,7 @@ package com.yihu.iot.controller.third.wlyy;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.third.wlyy.MonitoringHealthService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.IotRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -36,7 +36,7 @@ public class MonitoringHealthPlatformController extends BaseController{
    @GetMapping(value = IotRequestMapping.PatientDevice.findLocationByIdCard)
    @ApiOperation(value = "根据idCard查询设备地址", notes = "根据idCard查询设备地址")
    public Envelop<LocationDataVO> findDeviceLocationsByIdCard(
    public MixEnvelop<LocationDataVO, LocationDataVO> findDeviceLocationsByIdCard(
            @ApiParam(name = "diseaseCondition", value = "病情:0绿标,1黄标,2红标,-1没有标注的居民", defaultValue = "")
            @RequestParam(value = "diseaseCondition",required = false) Integer diseaseCondition,
            @ApiParam(name = "type", value = "1高血压 2糖尿病", defaultValue = "")
@ -55,7 +55,7 @@ public class MonitoringHealthPlatformController extends BaseController{
            return monitoringHealthService.findDeviceLocations(diseaseCondition,page,pageSize,type);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }

+ 6 - 6
app/app-iot-server/src/main/java/com/yihu/iot/service/common/SystemDictService.java

@ -5,7 +5,7 @@ import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.model.ObjectResult;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.dict.IotSystemDictVO;
import org.springframework.stereotype.Service;
@ -25,14 +25,14 @@ public class SystemDictService extends BaseService{
     * @return
     * @throws Exception
     */
    public Envelop<IotSystemDictVO> getList(String dictName) throws Exception {
    public MixEnvelop<IotSystemDictVO, IotSystemDictVO> getList(String dictName) throws Exception {
        if("HOSPITAL".equals(dictName)){
            return organizations();
        }
        Map<String, Object> params = new HashMap<>();
        params.put("dictName", dictName);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.System.FindDictByCode, params);
        Envelop<IotSystemDictVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotSystemDictVO, IotSystemDictVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -40,9 +40,9 @@ public class SystemDictService extends BaseService{
     * 获取组织机构信息
     * @return
     */
    private Envelop<IotSystemDictVO> organizations(){
    private MixEnvelop<IotSystemDictVO, IotSystemDictVO> organizations(){
        String url = "/organizations";
        Envelop<IotSystemDictVO> envelop = new Envelop<IotSystemDictVO>();
        MixEnvelop<IotSystemDictVO, IotSystemDictVO> envelop = new MixEnvelop<>();
        Map<String, Object> params = new HashMap<>();
        params.put("fields","");
        params.put("sorts","");
@ -53,7 +53,7 @@ public class SystemDictService extends BaseService{
            HttpResponse response = HttpHelper.get(profileInnerUrl + url, params);
            ObjectResult result =  objectMapper.readValue(response.getBody(),ObjectResult.class);
            if(result.isSuccessFlg()){
                envelop = objectMapper.readValue(response.getBody(),Envelop.class);
                envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
                envelop.setStatus(200);
            }else {
                envelop.setStatus(-1);

+ 30 - 30
app/app-iot-server/src/main/java/com/yihu/iot/service/company/CompanyService.java

@ -8,7 +8,7 @@ import com.yihu.iot.model.user.UserModel;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.company.IotCompanyCertificateVO;
import com.yihu.jw.restmodel.iot.company.IotCompanyVO;
import org.springframework.beans.factory.annotation.Value;
@ -38,7 +38,7 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyVO> findCompanyPage(String name,String status,String type,Integer page,Integer size) throws IOException{
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findCompanyPage(String name, String status, String type, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("name", name);
        params.put("status", status);
@ -46,7 +46,7 @@ public class CompanyService extends BaseService {
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Company.FindCompanyPage, params);
        Envelop<IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyVO, IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -57,8 +57,8 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyVO> addCompany(String jsonData) throws IOException {
        Envelop<IotCompanyVO> envelop = new Envelop<IotCompanyVO>();
    public MixEnvelop<IotCompanyVO, IotCompanyVO> addCompany(String jsonData) throws IOException {
        MixEnvelop<IotCompanyVO, IotCompanyVO> envelop = new MixEnvelop<>();
        //新增ehr用户
        IotCompanyVO iotCompany = toModel(jsonData, IotCompanyVO.class);
@ -94,7 +94,7 @@ public class CompanyService extends BaseService {
            envelop.setMessage("该手机号码已存在");
            return envelop;
        }
        Envelop<UserModel> userModelEnvelop = updateUser(iotCompany);
        MixEnvelop<UserModel, UserModel> userModelEnvelop = updateUser(iotCompany);
        if(userModelEnvelop.getStatus()!=200){
            envelop.setStatus(-1);
            envelop.setMessage(userModelEnvelop.getMessage());
@ -104,7 +104,7 @@ public class CompanyService extends BaseService {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", toJson(iotCompany));
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Company.AddCompany, params);
        envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -114,7 +114,7 @@ public class CompanyService extends BaseService {
     * @param envelop
     * @return
     */
    private Envelop<IotCompanyVO> userVerification(IotCompanyVO iotCompany,Envelop<IotCompanyVO> envelop){
    private MixEnvelop<IotCompanyVO, IotCompanyVO> userVerification(IotCompanyVO iotCompany, MixEnvelop<IotCompanyVO, IotCompanyVO> envelop){
        if(StringUtils.isEmpty(iotCompany.getAccount())){
            envelop.setStatus(-1);
            envelop.setMessage("账号不能为空");
@ -168,7 +168,7 @@ public class CompanyService extends BaseService {
     * @param iotCompany
     * @return
     */
    private Envelop<UserModel> updateUser(IotCompanyVO iotCompany){
    private MixEnvelop<UserModel, UserModel> updateUser(IotCompanyVO iotCompany){
        String url = "/user/";
        UserModel userModel = new UserModel();
        userModel.setEmail(iotCompany.getContactsEmail());
@ -177,7 +177,7 @@ public class CompanyService extends BaseService {
        userModel.setTelephone(iotCompany.getContactsMobile());
        userModel.setRealName(iotCompany.getContactsName());
        userModel.setRole(roleId);
        Envelop envelop  = new Envelop();
        MixEnvelop envelop  = new MixEnvelop();
        Map<String, Object> params = new HashMap<>();
        params.put("user_json_data",toJson(userModel));
        try {
@ -208,8 +208,8 @@ public class CompanyService extends BaseService {
     * @param passWord
     * @return
     */
    public Envelop changePassWord(String userId,String passWord){
        Envelop envelop = new Envelop();
    public MixEnvelop changePassWord(String userId, String passWord){
        MixEnvelop envelop = new MixEnvelop();
        String url = "/users/changePassWord";
        Map<String, Object> params = new HashMap<>();
        params.put("user_id",userId);
@ -240,11 +240,11 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyVO> findByCode(String id) throws IOException {
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findByCode(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Company.FindCompanyById, params);
        Envelop<IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyVO, IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -253,11 +253,11 @@ public class CompanyService extends BaseService {
     * @param id
     * @return
     */
    public Envelop<IotCompanyCertificateVO> delCompanyCert(String id) throws IOException {
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> delCompanyCert(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Company.DelCompanyCert, params);
        Envelop<IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -267,11 +267,11 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyVO> findByBusinessLicense(String businessLicense) throws IOException {
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findByBusinessLicense(String businessLicense) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("businessLicense", businessLicense);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Company.FindByBusinessLicense, params);
        Envelop<IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyVO, IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -281,11 +281,11 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyVO> delCompany(String id) throws IOException {
    public MixEnvelop<IotCompanyVO, IotCompanyVO> delCompany(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Company.DelCompany, params);
        Envelop<IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyVO, IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -295,11 +295,11 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyVO> updCompany(String jsonData) throws IOException {
    public MixEnvelop<IotCompanyVO, IotCompanyVO> updCompany(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Company.UpdCompany, params);
        Envelop<IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyVO, IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -312,14 +312,14 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyCertificateVO> findCompanyCertPage(String name,Integer page,Integer size,String companyId) throws IOException{
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertPage(String name, Integer page, Integer size, String companyId) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("name", name);
        params.put("companyId", companyId);
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Company.FindCompanyCertPage, params);
        Envelop<IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -329,11 +329,11 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyCertificateVO> findCompanyCertById(String id) throws IOException {
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertById(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Company.FindCompanyCertById, params);
        Envelop<IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -343,11 +343,11 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyCertificateVO> findCompanyCertByCompanyId(String companyId) throws IOException {
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertByCompanyId(String companyId) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("companyId", companyId);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Company.FindCompanyCertByCompanyId, params);
        Envelop<IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -357,11 +357,11 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyCertificateVO> addCompanyCert(String jsonData) throws IOException {
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> addCompanyCert(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Company.AddCompanyCert, params);
        Envelop<IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
}

+ 20 - 20
app/app-iot-server/src/main/java/com/yihu/iot/service/device/DeviceOrderService.java

@ -4,7 +4,7 @@ import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceOrderVO;
import com.yihu.jw.restmodel.iot.device.IotOrderPurchaseVO;
import com.yihu.jw.restmodel.iot.device.IotOrderVO;
@ -26,11 +26,11 @@ public class DeviceOrderService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotOrderVO> create(String jsonData) throws IOException {
    public MixEnvelop<IotOrderVO, IotOrderVO> create(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.DeviceOrder.CreateOrder, params);
        Envelop<IotOrderVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotOrderVO, IotOrderVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -40,11 +40,11 @@ public class DeviceOrderService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceOrderVO>  findByCode(String id) throws IOException {
    public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> findByCode(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.DeviceOrder.FindById, params);
        Envelop<IotDeviceOrderVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -57,14 +57,14 @@ public class DeviceOrderService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceOrderVO> findPage(String name,String type,Integer page,Integer size) throws IOException{
    public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> findPage(String name, String type, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("name", name);
        params.put("type", type);
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.DeviceOrder.FindPage, params);
        Envelop<IotDeviceOrderVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -74,11 +74,11 @@ public class DeviceOrderService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceOrderVO> delOrder(String id) throws IOException {
    public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> delOrder(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.DeviceOrder.DelOrder, params);
        Envelop<IotDeviceOrderVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -88,11 +88,11 @@ public class DeviceOrderService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotOrderPurchaseVO> delPurchase(String id) throws IOException {
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> delPurchase(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.DeviceOrder.DelPurchase, params);
        Envelop<IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -102,11 +102,11 @@ public class DeviceOrderService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotOrderVO> updOrder(String jsonData) throws IOException {
    public MixEnvelop<IotOrderVO, IotOrderVO> updOrder(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.DeviceOrder.UpdOrder, params);
        Envelop<IotOrderVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotOrderVO, IotOrderVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -118,13 +118,13 @@ public class DeviceOrderService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotOrderPurchaseVO> findPurcharsePage(String orderId,Integer page,Integer size) throws IOException{
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findPurcharsePage(String orderId, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("orderId", orderId);
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.DeviceOrder.FindPurcharsePage, params);
        Envelop<IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -133,11 +133,11 @@ public class DeviceOrderService extends BaseService {
     * @param id
     * @return
     */
    public Envelop<IotOrderPurchaseVO> findPurcharseById(String id) throws IOException {
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findPurcharseById(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.DeviceOrder.FindPurcharseById, params);
        Envelop<IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -151,8 +151,8 @@ public class DeviceOrderService extends BaseService {
     * @param size
     * @return
     */
    public Envelop<IotOrderPurchaseVO> findQualityPage(String qualityStatus,
            String orderNo,String startTime,String endTime,Integer page,Integer size) throws IOException {
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findQualityPage(String qualityStatus,
                                                          String orderNo, String startTime, String endTime, Integer page, Integer size) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("qualityStatus", qualityStatus);
        params.put("orderNo", orderNo);
@ -161,7 +161,7 @@ public class DeviceOrderService extends BaseService {
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.DeviceOrder.FindQualityPage, params);
        Envelop<IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(), Envelop.class);
        MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(), MixEnvelop.class);
        return envelop;
    }

+ 29 - 29
app/app-iot-server/src/main/java/com/yihu/iot/service/device/DeviceService.java

@ -11,8 +11,8 @@ import com.yihu.iot.util.excel.AExcelReader;
import com.yihu.iot.util.excel.reader.IotDeviceImportVOReader;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.iot.common.ExistVO;
import com.yihu.jw.restmodel.iot.common.UploadVO;
import com.yihu.jw.restmodel.iot.device.IotDeviceImportRecordVO;
@ -48,11 +48,11 @@ public class DeviceService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceVO> create(String jsonData) throws IOException {
    public MixEnvelop<IotDeviceVO, IotDeviceVO> create(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Device.CreateDevice, params);
        Envelop<IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceVO, IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -62,11 +62,11 @@ public class DeviceService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceVO> findByCode(String id)throws IOException{
    public MixEnvelop<IotDeviceVO, IotDeviceVO> findByCode(String id)throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Device.GetDeviceById, params);
        Envelop<IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceVO, IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -76,11 +76,11 @@ public class DeviceService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<ExistVO> isSnExist(String sn) throws IOException {
    public MixEnvelop<ExistVO, ExistVO> isSnExist(String sn) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("sn", sn);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Device.IsSnExist, params);
        Envelop<ExistVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<ExistVO, ExistVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -90,11 +90,11 @@ public class DeviceService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<ExistVO> isSimExist(String sim) throws IOException {
    public MixEnvelop<ExistVO, ExistVO> isSimExist(String sim) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("sim", sim);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Device.IsSimExist, params);
        Envelop<ExistVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<ExistVO, ExistVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -104,12 +104,12 @@ public class DeviceService extends BaseService {
     * @param id
     * @return
     */
    public BaseEnvelop updSim(String sim,String id) throws IOException{
    public Envelop updSim(String sim, String id) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("sim", sim);
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Device.UpdSim, params);
        BaseEnvelop envelop = objectMapper.readValue(response.getBody(),BaseEnvelop.class);
        Envelop envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        return envelop;
    }
@ -118,11 +118,11 @@ public class DeviceService extends BaseService {
     * @param id
     * @return
     */
    public Envelop<IotDeviceVO> delDevice(String id) throws IOException{
    public MixEnvelop<IotDeviceVO, IotDeviceVO> delDevice(String id) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Device.DelDevice, params);
        Envelop<IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceVO, IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -131,11 +131,11 @@ public class DeviceService extends BaseService {
     * @param jsonData
     * @return
     */
    public BaseEnvelop updDevice(String jsonData) throws IOException{
    public Envelop updDevice(String jsonData) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Device.UpdDevice, params);
        BaseEnvelop envelop = objectMapper.readValue(response.getBody(),BaseEnvelop.class);
        Envelop envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        return envelop;
    }
@ -150,8 +150,8 @@ public class DeviceService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceVO> findProductPageByCompanyId(String sn,String hospital,String orderId,
                String purcharseId,Integer isBinding,Integer page,Integer size) throws IOException{
    public MixEnvelop<IotDeviceVO, IotDeviceVO> findProductPageByCompanyId(String sn, String hospital, String orderId,
                                                              String purcharseId, Integer isBinding, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("sn", sn);
        params.put("hospital", hospital);
@ -161,7 +161,7 @@ public class DeviceService extends BaseService {
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Device.QueryDevicePage, params);
        Envelop<IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceVO, IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -170,8 +170,8 @@ public class DeviceService extends BaseService {
     * @param purcharseId
     * @return
     */
    public Envelop<ExistVO> isImportDevice(String purcharseId) throws IOException {
        Envelop<ExistVO> envelop = objectMapper.readValue(isImporting(purcharseId),Envelop.class);
    public MixEnvelop<ExistVO, ExistVO> isImportDevice(String purcharseId) throws IOException {
        MixEnvelop<ExistVO, ExistVO> envelop = objectMapper.readValue(isImporting(purcharseId),MixEnvelop.class);
        return envelop;
    }
@ -194,15 +194,15 @@ public class DeviceService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceImportRecordVO> uploadStream(MultipartFile file,String purcharseId,HttpServletRequest request) throws Exception {
    public MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> uploadStream(MultipartFile file, String purcharseId, HttpServletRequest request) throws Exception {
        String res = isImporting(purcharseId);
        JSONObject json = JSON.parseObject(res);
        if(json.getInteger("status")==200){
            if(json.getJSONObject("obj").getInteger("isExist")==1){
                return Envelop.getError("已存在导入中的数据,请等待上次数据处理完后在导入");
                return MixEnvelop.getError("已存在导入中的数据,请等待上次数据处理完后在导入");
            }
        }else {
            return Envelop.getError("查询是否在导入中失败");
            return MixEnvelop.getError("查询是否在导入中失败");
        }
        //文件上传
@ -211,7 +211,7 @@ public class DeviceService extends BaseService {
        //得到文件类型
        String fileType = fullName.substring(fullName.lastIndexOf(".") + 1).toLowerCase();
        if(!"xls".equals(fileType)){
            return Envelop.getError("文件格式不正确");
            return MixEnvelop.getError("文件格式不正确");
        }
        String fileName = fullName.substring(0, fullName.lastIndexOf("."));
@ -226,7 +226,7 @@ public class DeviceService extends BaseService {
        }else {
            UploadVO uploadVO = fileUploadService.request(request,file.getInputStream(),fullName);
            if(uploadVO==null){
                return Envelop.getError("文件上传失败");
                return MixEnvelop.getError("文件上传失败");
            }
            params.put("url", uploadVO.getFullUri());
        }
@ -240,7 +240,7 @@ public class DeviceService extends BaseService {
        params.put("fileName", fileName);
        String ret = HttpHelper.postBody(iotUrl + ServiceApi.Device.ImportDevice,JSONObject.toJSONString(params));
        Envelop<IotDeviceImportRecordVO> envelop = objectMapper.readValue(ret,Envelop.class);
        MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> envelop = objectMapper.readValue(ret,MixEnvelop.class);
        return envelop;
    }
@ -252,13 +252,13 @@ public class DeviceService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceImportRecordVO> queryImportRecordPage(String purcharseId,Integer page,Integer size) throws IOException{
    public MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> queryImportRecordPage(String purcharseId, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("purcharseId", purcharseId);
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Device.QueryImportRecordPage, params);
        Envelop<IotDeviceImportRecordVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }

+ 14 - 14
app/app-iot-server/src/main/java/com/yihu/iot/service/device/IotDeviceQualityService.java

@ -4,7 +4,7 @@ import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceQualityInspectionPlanVO;
import org.springframework.stereotype.Service;
@ -23,11 +23,11 @@ public class IotDeviceQualityService extends BaseService {
     * @param jsonData
     * @return
     */
    public Envelop<IotDeviceQualityInspectionPlanVO> create(String jsonData) throws IOException {
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> create(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Quality.AddQualityPlan, params);
        Envelop<IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -36,11 +36,11 @@ public class IotDeviceQualityService extends BaseService {
     * @param id
     * @return
     */
    public Envelop<IotDeviceQualityInspectionPlanVO> findByCode(String id) throws IOException {
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> findByCode(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Quality.FindById, params);
        Envelop<IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -52,8 +52,8 @@ public class IotDeviceQualityService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(String purcharseId,String orderNo,
            String startTime,String endTime,Integer page,Integer size) throws IOException{
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(String purcharseId, String orderNo,
                                                                             String startTime, String endTime, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("purcharseId", purcharseId);
        params.put("orderNo", orderNo);
@ -62,7 +62,7 @@ public class IotDeviceQualityService extends BaseService {
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Quality.QueryQualityPlanPage, params);
        Envelop<IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -72,11 +72,11 @@ public class IotDeviceQualityService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceQualityInspectionPlanVO> delQualityPlan(String id) throws IOException {
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> delQualityPlan(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Quality.DelQualityPlan, params);
        Envelop<IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -87,12 +87,12 @@ public class IotDeviceQualityService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceQualityInspectionPlanVO> completeQualityPlan(String actualTime,String id) throws IOException {
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completeQualityPlan(String actualTime, String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("actualTime", actualTime);
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Quality.CompleteQualityPlan, params);
        Envelop<IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -103,12 +103,12 @@ public class IotDeviceQualityService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(String actualTime,String purchaseId) throws IOException {
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(String actualTime, String purchaseId) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("actualTime", actualTime);
        params.put("purchaseId", purchaseId);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Quality.CompletePlanByPurchaseId, params);
        Envelop<IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }

+ 18 - 18
app/app-iot-server/src/main/java/com/yihu/iot/service/product/ProductService.java

@ -7,7 +7,7 @@ import com.yihu.iot.model.ehr.MStdDataSet;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.product.IotMaintenanceUnitVO;
import com.yihu.jw.restmodel.iot.product.IotProductBaseInfoVO;
import com.yihu.jw.restmodel.iot.product.IotProductVO;
@ -37,9 +37,9 @@ public class ProductService extends BaseService {
     * 测量数据(ehr标准规范管理-平台标准-标准数据集)
     * @return
     */
    public Envelop<MStdDataSet> data_sets(Integer page, Integer size, String name){
    public MixEnvelop<MStdDataSet, MStdDataSet> data_sets(Integer page, Integer size, String name){
        String url = "/std/data_sets";
        Envelop<MStdDataSet> envelop = new Envelop<MStdDataSet>();
        MixEnvelop<MStdDataSet, MStdDataSet> envelop = new MixEnvelop<>();
        Map<String, Object> params = new HashMap<>();
        String filters = "reference="+reference+";";
        if(StringUtils.isNotBlank(name)){
@ -53,7 +53,7 @@ public class ProductService extends BaseService {
            HttpResponse response = HttpHelper.get(profileInnerUrl + url, params);
            ObjectResult result =  objectMapper.readValue(response.getBody(),ObjectResult.class);
            if(result.isSuccessFlg()){
                envelop = objectMapper.readValue(response.getBody(),Envelop.class);
                envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
                envelop.setStatus(200);
            }else {
                envelop.setStatus(-1);
@ -77,7 +77,7 @@ public class ProductService extends BaseService {
     * @param size
     * @return
     */
    public Envelop<IotProductBaseInfoVO> findCompanyPage(String name,String classify,String companyId,Integer page,Integer size) throws IOException{
    public MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> findCompanyPage(String name, String classify, String companyId, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("name", name);
        params.put("classify", classify);
@ -85,7 +85,7 @@ public class ProductService extends BaseService {
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Product.FindProductPage, params);
        Envelop<IotProductBaseInfoVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -98,14 +98,14 @@ public class ProductService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotProductBaseInfoVO> findProductPageByCompanyId(String name,String companyId,Integer page, Integer size) throws IOException{
    public MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> findProductPageByCompanyId(String name, String companyId, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("name", name);
        params.put("page", page);
        params.put("companyId", companyId);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Product.FindProductPageByCompanyId, params);
        Envelop<IotProductBaseInfoVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -115,11 +115,11 @@ public class ProductService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotProductVO> addProduct(String jsonData) throws IOException {
    public MixEnvelop<IotProductVO, IotProductVO> addProduct(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Product.AddProduct, params);
        Envelop<IotProductVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotProductVO, IotProductVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -129,11 +129,11 @@ public class ProductService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotProductVO> findByCode(String id) throws IOException {
    public MixEnvelop<IotProductVO, IotProductVO> findByCode(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Product.FindProductById, params);
        Envelop<IotProductVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotProductVO, IotProductVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -143,11 +143,11 @@ public class ProductService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotMaintenanceUnitVO> maintenanceUnitById(String productId) throws IOException {
    public MixEnvelop<IotMaintenanceUnitVO, IotMaintenanceUnitVO> maintenanceUnitById(String productId) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("productId", productId);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Product.MaintenanceUnitById, params);
        Envelop<IotMaintenanceUnitVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotMaintenanceUnitVO, IotMaintenanceUnitVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -159,11 +159,11 @@ public class ProductService extends BaseService {
     */
    @PostMapping(value = IotRequestMapping.Product.delProduct)
    @ApiOperation(value = "删除产品", notes = "删除产品")
    public Envelop<IotProductVO> delCompany(String id) throws IOException {
    public MixEnvelop<IotProductVO, IotProductVO> delCompany(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Product.DelProduct, params);
        Envelop<IotProductVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotProductVO, IotProductVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -173,11 +173,11 @@ public class ProductService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotProductVO> updCompany(String jsonData) throws IOException {
    public MixEnvelop<IotProductVO, IotProductVO> updCompany(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Product.UpdProduct, params);
        Envelop<IotProductVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotProductVO, IotProductVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }

+ 6 - 6
app/app-iot-server/src/main/java/com/yihu/iot/service/third/wlyy/MonitoringHealthService.java

@ -8,7 +8,7 @@ import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import io.swagger.annotations.ApiOperation;
import iot.device.LocationDataVO;
import org.apache.commons.lang.StringUtils;
@ -44,9 +44,9 @@ public class MonitoringHealthService extends BaseService {
     * @param diseaseCondition
     * @return
     */
    public Envelop<LocationDataVO> findDeviceLocations(Integer diseaseCondition, Integer page, Integer size, String type) throws IOException {
        Envelop<LocationDataVO> envelop = new Envelop<>();
        Envelop<LocationDataVO> envelopTmp = null;
    public MixEnvelop<LocationDataVO, LocationDataVO> findDeviceLocations(Integer diseaseCondition, Integer page, Integer size, String type) throws IOException {
        MixEnvelop<LocationDataVO, LocationDataVO> envelop = new MixEnvelop<>();
        MixEnvelop<LocationDataVO, LocationDataVO> envelopTmp = null;
        JSONArray jsonArray = new JSONArray();
        Integer total = 0;
        if(StringUtils.isNotBlank(type)){
@ -71,7 +71,7 @@ public class MonitoringHealthService extends BaseService {
                    Map<String, Object> params = new HashMap<>();
                    params.put("jsonData", jsonObject.toString());
                    HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.PatientDevice.findLocationByIdCard, params);
                    envelopTmp = objectMapper.readValue(response.getBody(),Envelop.class);
                    envelopTmp = objectMapper.readValue(response.getBody(),MixEnvelop.class);
                    envelop.getDetailModelList().addAll(envelopTmp.getDetailModelList());
                }
            }
@ -94,7 +94,7 @@ public class MonitoringHealthService extends BaseService {
            Map<String, Object> params = new HashMap<>();
            params.put("jsonData", jsonObject.toString());
            HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.PatientDevice.findLocationByIdCard, params);
            envelop = objectMapper.readValue(response.getBody(),Envelop.class);
            envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
            return envelop;
        }
    }

+ 5 - 0
app/public-health-server/pom.xml

@ -122,6 +122,11 @@
            <artifactId>fastdfs-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu</groupId>
            <artifactId>swagger-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
    </dependencies>
    <build>

+ 15 - 15
app/public-health-server/src/main/java/com/yihu/health/controller/archives/ArchivesController.java

@ -4,7 +4,7 @@ package com.yihu.health.controller.archives;
import com.yihu.health.service.archives.ArchivesService;
import com.yihu.jw.restmodel.archives.PatientArchivesInfoVO;
import com.yihu.jw.restmodel.archives.PatientArchivesVO;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.archives.PatientArchivesMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -25,59 +25,59 @@ public class ArchivesController {
    @GetMapping(value = PatientArchivesMapping.Archives.findPatientArchives)
    @ApiOperation(value = "查询健康信息列表")
    public Envelop<PatientArchivesVO> findPatientArchives(@ApiParam(name = "name", value = "姓名(模糊匹配)")
    public MixEnvelop<PatientArchivesVO, PatientArchivesVO> findPatientArchives(@ApiParam(name = "name", value = "姓名(模糊匹配)")
                                                          @RequestParam(value = "name", required = false)String name,
                                                          @ApiParam(name = "status", value = "档案状态")
                                                             @ApiParam(name = "status", value = "档案状态")
                                                          @RequestParam(value = "status", required = false)String status,
                                                          @ApiParam(name = "cancelReseanType", value = "注销状态")
                                                             @ApiParam(name = "cancelReseanType", value = "注销状态")
                                                          @RequestParam(value = "cancelReseanType", required = false)String cancelReseanType,
                                                          @ApiParam(name = "page", value = "分页") @RequestParam(value = "page", required = false)Integer page,
                                                          @ApiParam(name = "size", value = "每一页大小")@RequestParam(value = "size", required = false )Integer size){
                                                             @ApiParam(name = "page", value = "分页") @RequestParam(value = "page", required = false)Integer page,
                                                             @ApiParam(name = "size", value = "每一页大小")@RequestParam(value = "size", required = false )Integer size){
        try {
            return archivesService.queryPatientArchivesPage(page,size,status, cancelReseanType ,name);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = PatientArchivesMapping.Archives.findPatientArchivesInfos)
    @ApiOperation(value = "查询健康信息详情列表")
    public Envelop<PatientArchivesInfoVO> queryPatientArchivesInfoPage(@ApiParam(name = "code", value = "档案编号")
    public MixEnvelop<PatientArchivesInfoVO, PatientArchivesInfoVO> queryPatientArchivesInfoPage(@ApiParam(name = "code", value = "档案编号")
                                                                       @RequestParam(value = "code", required = false)String code){
        try {
            return archivesService.queryPatientArchivesInfoPage(code);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = PatientArchivesMapping.Archives.createPatientArchives)
    @ApiOperation(value = "创建健康信息详情列表")
    public Envelop<Boolean> createPatientArchives(@ApiParam(name = "patientArchives", value = "建档基本信息Json")
    public MixEnvelop<Boolean, Boolean> createPatientArchives(@ApiParam(name = "patientArchives", value = "建档基本信息Json")
                                                  @RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                  @ApiParam(name = "list", value = "建档详情Json")
                                                     @ApiParam(name = "list", value = "建档详情Json")
                                                  @RequestParam(value = "list", required = true)String list){
        try {
            return archivesService.createPatientArchives(patientArchives,list);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PutMapping(value = PatientArchivesMapping.Archives.updatePatientArchives)
    @ApiOperation(value = "更新健康信息详情列表")
    public Envelop<Boolean> updatePatientArchives(@ApiParam(name = "patientArchives", value = "建档基本信息Json")
    public MixEnvelop<Boolean, Boolean> updatePatientArchives(@ApiParam(name = "patientArchives", value = "建档基本信息Json")
                                                  @RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                  @ApiParam(name = "list", value = "建档详情")
                                                     @ApiParam(name = "list", value = "建档详情")
                                                  @RequestParam(value = "list", required = true)String list){
        try {
            return archivesService.updatePatientArchives(patientArchives,list);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
}

+ 9 - 9
app/public-health-server/src/main/java/com/yihu/health/service/archives/ArchivesService.java

@ -6,7 +6,7 @@ import com.yihu.health.util.http.HttpHelper;
import com.yihu.health.util.http.HttpResponse;
import com.yihu.jw.restmodel.archives.PatientArchivesInfoVO;
import com.yihu.jw.restmodel.archives.PatientArchivesVO;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import org.springframework.stereotype.Service;
import java.text.ParseException;
@ -27,7 +27,7 @@ public class ArchivesService extends BaseService {
     * @return
     * @throws ParseException
     */
    public Envelop<PatientArchivesVO> queryPatientArchivesPage(Integer page, Integer size, String status, String cancelReseanType , String name) throws Exception {
    public MixEnvelop<PatientArchivesVO, PatientArchivesVO> queryPatientArchivesPage(Integer page, Integer size, String status, String cancelReseanType , String name) throws Exception {
        Map<String, Object> params = new HashMap<>();
        params.put("page", page);
        params.put("size", size);
@ -35,7 +35,7 @@ public class ArchivesService extends BaseService {
        params.put("cancelReseanType", cancelReseanType);
        params.put("name", name);
        HttpResponse response = HttpHelper.get(archivesInnerUrl + ServiceApi.Archives.findPatientArchives, params);
        Envelop<PatientArchivesVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<PatientArchivesVO, PatientArchivesVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -44,31 +44,31 @@ public class ArchivesService extends BaseService {
     * @return
     * @throws ParseException
     */
    public Envelop<PatientArchivesInfoVO> queryPatientArchivesInfoPage(String code) throws Exception {
    public MixEnvelop<PatientArchivesInfoVO, PatientArchivesInfoVO> queryPatientArchivesInfoPage(String code) throws Exception {
        Map<String, Object> params = new HashMap<>();
        params.put("page", code);
        HttpResponse response = HttpHelper.get(archivesInnerUrl + ServiceApi.Archives.findPatientArchivesInfos, params);
        Envelop<PatientArchivesInfoVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<PatientArchivesInfoVO, PatientArchivesInfoVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
    public Envelop<Boolean> createPatientArchives(String patientArchives,String list)throws Exception {
    public MixEnvelop<Boolean, Boolean> createPatientArchives(String patientArchives, String list)throws Exception {
        Map<String, Object> params = new HashMap<>();
        params.put("patientArchives", patientArchives);
        params.put("list", list);
        HttpResponse response = HttpHelper.get(archivesInnerUrl + ServiceApi.Archives.createPatientArchives, params);
        Envelop<Boolean> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<Boolean, Boolean> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
    public  Envelop<Boolean> updatePatientArchives(String patientArchives,String list)throws Exception {
    public MixEnvelop<Boolean, Boolean> updatePatientArchives(String patientArchives, String list)throws Exception {
        Map<String, Object> params = new HashMap<>();
        params.put("patientArchives", patientArchives);
        params.put("list", list);
        HttpResponse response = HttpHelper.get(archivesInnerUrl + ServiceApi.Archives.createPatientArchives, params);
        Envelop<Boolean> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<Boolean, Boolean> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }

+ 2 - 2
app/public-health-server/src/main/java/com/yihu/health/service/dictionary/SystemDictService.java

@ -5,7 +5,7 @@ import com.yihu.health.service.common.BaseService;
import com.yihu.health.util.http.HttpHelper;
import com.yihu.health.util.http.HttpResponse;
import com.yihu.jw.restmodel.archives.dict.SystemDictVO;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import org.springframework.stereotype.Service;
import java.util.HashMap;
@ -28,7 +28,7 @@ public class SystemDictService extends BaseService{
        Map<String, Object> params = new HashMap<>();
        params.put("filters", "id="+filters);
        HttpResponse response = HttpHelper.get(profileInnerUrl+ ServiceApi.SystemDict.dictionariesWithEntry, params);
        Envelop<SystemDictVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<SystemDictVO, SystemDictVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop.getDetailModelList();
    }

+ 5 - 9
common/common-entity/src/main/java/com/yihu/jw/entity/base/module/ModuleFunctionDO.java

@ -9,16 +9,12 @@ import javax.persistence.*;
 */
@Entity
@Table(name = "base_module_function")
public class ModuleFunctionDO extends UuidIdentityEntity implements java.io.Serializable {
public class ModuleFunctionDO extends UuidIdentityEntity {
	private String functionId;//关联 base_function    code
	private String moduleId;//关联 base_module  code
	// Constructors
	/** default constructor */
	public ModuleFunctionDO() {
	}
	//关联 base_function   ic
	private String functionId;
	//关联 base_module   id
	private String moduleId;
	@Column(name = "function_id", length = 100)
	public String getFunctionId() {

+ 11 - 11
common/common-fegin/src/main/java/com/yihu/jw/fegin/archives/ArchivesFeign.java

@ -4,7 +4,7 @@ import com.yihu.jw.fegin.fallbackfactory.archives.ArchivesFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.archives.PatientArchivesInfoVO;
import com.yihu.jw.restmodel.archives.PatientArchivesVO;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.archives.PatientArchivesMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;
@ -20,20 +20,20 @@ import org.springframework.web.bind.annotation.*;
public interface ArchivesFeign {
    @GetMapping(value = PatientArchivesMapping.Archives.findPatientArchives)
    public Envelop<PatientArchivesVO> findPatientArchives(@RequestParam(value = "name", required = false)String name,
                                                          @RequestParam(value = "status", required = false)String status,
                                                          @RequestParam(value = "cancelReseanType", required = false)String cancelReseanType,
                                                          @RequestParam(value = "page", required = false)Integer page,
                                                         @RequestParam(value = "size", required = false )Integer size);
    public MixEnvelop<PatientArchivesVO, PatientArchivesVO> findPatientArchives(@RequestParam(value = "name", required = false)String name,
                                                             @RequestParam(value = "status", required = false)String status,
                                                             @RequestParam(value = "cancelReseanType", required = false)String cancelReseanType,
                                                             @RequestParam(value = "page", required = false)Integer page,
                                                             @RequestParam(value = "size", required = false )Integer size);
    @GetMapping(value = PatientArchivesMapping.Archives.findPatientArchivesInfos)
    public Envelop<PatientArchivesInfoVO> queryPatientArchivesInfoPage(@RequestParam(value = "code", required = false)String code);
    public MixEnvelop<PatientArchivesInfoVO, PatientArchivesInfoVO> queryPatientArchivesInfoPage(@RequestParam(value = "code", required = false)String code);
    @PostMapping(value = PatientArchivesMapping.Archives.createPatientArchives)
    public Envelop<Boolean> createPatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                  @RequestParam(value = "list", required = true)String list);
    public MixEnvelop<Boolean, Boolean> createPatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                     @RequestParam(value = "list", required = true)String list);
    @PutMapping(value = PatientArchivesMapping.Archives.updatePatientArchives)
    public Envelop<Boolean> updatePatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                  @RequestParam(value = "list", required = true)String list);
    public MixEnvelop<Boolean, Boolean> updatePatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                     @RequestParam(value = "list", required = true)String list);
}

+ 48 - 48
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/FunctionFeign.java

@ -1,48 +1,48 @@
package com.yihu.jw.fegin.base.base;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.base.FunctionFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.rm.base.BaseRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = FunctionFeignFallbackFactory.class
)
@RequestMapping(value = BaseRequestMapping.api_base_common)
public interface FunctionFeign {
    @RequestMapping(value = BaseRequestMapping.Function.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop create(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseRequestMapping.Function.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
    Envelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseRequestMapping.Function.api_delete,method = RequestMethod.DELETE)
    Envelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.Function.api_getById)
    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseRequestMapping.Function.api_getList, method = RequestMethod.GET)
    Envelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
            @RequestParam(value = "size", required = false) int size,
            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.Function.api_getListNoPage)
    Envelop getListNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.Function.api_getChildren)
    Envelop getChildren(@PathVariable(value="id") String id) throws JiWeiException;
}
//package com.yihu.jw.fegin.base.base;
//
//import com.yihu.jw.exception.business.JiWeiException;
//import com.yihu.jw.fegin.fallbackfactory.base.base.FunctionFeignFallbackFactory;
//import com.yihu.jw.restmodel.CommonContants;
//import com.yihu.jw.restmodel.web.MixEnvelop;
//import com.yihu.jw.rm.base.BaseRequestMapping;
//import org.springframework.cloud.netflix.feign.FeignClient;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.*;
//
//
//@FeignClient(
//        name = CommonContants.svr_base // name值是eurika的实例名字
//        ,fallbackFactory  = FunctionFeignFallbackFactory.class
//)
//@RequestMapping(value = BaseRequestMapping.api_base_common)
//public interface FunctionFeign {
//
//    @RequestMapping(value = BaseRequestMapping.Function.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
//    MixEnvelop create(@RequestBody String jsonData) throws JiWeiException;
//
//    @RequestMapping(value =  BaseRequestMapping.Function.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
//    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
//
//    @RequestMapping(value =  BaseRequestMapping.Function.api_delete,method = RequestMethod.DELETE)
//    MixEnvelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.Function.api_getById)
//    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
//
//    @RequestMapping(value = BaseRequestMapping.Function.api_getList, method = RequestMethod.GET)
//    MixEnvelop getList(
//            @RequestParam(value = "fields", required = false) String fields,
//            @RequestParam(value = "filters", required = false) String filters,
//            @RequestParam(value = "sorts", required = false) String sorts,
//            @RequestParam(value = "size", required = false) int size,
//            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.Function.api_getListNoPage)
//    MixEnvelop getListNoPage(
//            @RequestParam(value = "fields", required = false) String fields,
//            @RequestParam(value = "filters", required = false) String filters,
//            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.Function.api_getChildren)
//    MixEnvelop getChildren(@PathVariable(value="id") String id) throws JiWeiException;
//}

+ 54 - 54
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/ModuleFeign.java

@ -1,54 +1,54 @@
package com.yihu.jw.fegin.base.base;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.base.ModuleFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.rm.base.BaseRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = ModuleFeignFallbackFactory.class
)
@RequestMapping(value = BaseRequestMapping.api_base_common)
public interface ModuleFeign {
    @PostMapping(value = BaseRequestMapping.Module.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop create(@RequestBody String jsonData) throws JiWeiException;
    @PutMapping(value =  BaseRequestMapping.Module.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop update(@RequestBody String jsonData) throws JiWeiException;
    @DeleteMapping(value =BaseRequestMapping.Module.api_delete)
    Envelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.Module.api_getById)
    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseRequestMapping.Module.api_getList, method = RequestMethod.GET)
    Envelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
            @RequestParam(value = "size", required = false) int size,
            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.Module.api_getListNoPage)
    Envelop getListNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.Module.api_getChildren)
    Envelop getChildren(@PathVariable(value = "id") String id) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.ModuleFun.api_getExistFun)
    Envelop getExistFunc(@PathVariable(value = "id") String id) throws JiWeiException;
    @PutMapping(value =  BaseRequestMapping.ModuleFun.api_changeFun,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop changeFun(@RequestBody String jsonData) throws JiWeiException;
}
//package com.yihu.jw.fegin.base.base;
//
//import com.yihu.jw.exception.business.JiWeiException;
//import com.yihu.jw.fegin.fallbackfactory.base.base.ModuleFeignFallbackFactory;
//import com.yihu.jw.restmodel.CommonContants;
//import com.yihu.jw.restmodel.web.MixEnvelop;
//import com.yihu.jw.rm.base.BaseRequestMapping;
//import org.springframework.cloud.netflix.feign.FeignClient;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.*;
//
//
//@FeignClient(
//        name = CommonContants.svr_base // name值是eurika的实例名字
//        ,fallbackFactory  = ModuleFeignFallbackFactory.class
//)
//@RequestMapping(value = BaseRequestMapping.api_base_common)
//public interface ModuleFeign {
//
//    @PostMapping(value = BaseRequestMapping.Module.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
//    MixEnvelop create(@RequestBody String jsonData) throws JiWeiException;
//
//    @PutMapping(value =  BaseRequestMapping.Module.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
//    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
//
//    @DeleteMapping(value =BaseRequestMapping.Module.api_delete)
//    MixEnvelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.Module.api_getById)
//    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
//
//    @RequestMapping(value = BaseRequestMapping.Module.api_getList, method = RequestMethod.GET)
//    MixEnvelop getList(
//            @RequestParam(value = "fields", required = false) String fields,
//            @RequestParam(value = "filters", required = false) String filters,
//            @RequestParam(value = "sorts", required = false) String sorts,
//            @RequestParam(value = "size", required = false) int size,
//            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.Module.api_getListNoPage)
//    MixEnvelop getListNoPage(
//            @RequestParam(value = "fields", required = false) String fields,
//            @RequestParam(value = "filters", required = false) String filters,
//            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.Module.api_getChildren)
//    MixEnvelop getChildren(@PathVariable(value = "id") String id) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.ModuleFun.api_getExistFun)
//    MixEnvelop getExistFunc(@PathVariable(value = "id") String id) throws JiWeiException;
//
//    @PutMapping(value =  BaseRequestMapping.ModuleFun.api_changeFun,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
//    MixEnvelop changeFun(@RequestBody String jsonData) throws JiWeiException;
//}

+ 26 - 26
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SaasFeign.java

@ -1,26 +1,26 @@
package com.yihu.jw.fegin.base.base;
import com.yihu.jw.fegin.fallbackfactory.base.base.SaasFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.rm.base.BaseRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = SaasFeignFallbackFactory.class
)
@RequestMapping(value = BaseRequestMapping.api_base_common)
public interface SaasFeign {
    @GetMapping(value = BaseRequestMapping.Saas.api_getSaassNoPage)
    Envelop getList(@RequestParam(value = "fields",required = false)String fields,@RequestParam(value = "filters",required = false) String filters,@RequestParam(value = "sorts",required = false) String sorts);
    @GetMapping(value = BaseRequestMapping.Saas.api_getById, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop findByCode(@RequestParam(value = "id", required = true) String id);
}
//package com.yihu.jw.fegin.base.base;
//
//import com.yihu.jw.fegin.fallbackfactory.base.base.SaasFeignFallbackFactory;
//import com.yihu.jw.restmodel.CommonContants;
//import com.yihu.jw.restmodel.web.MixEnvelop;
//import com.yihu.jw.rm.base.BaseRequestMapping;
//import org.springframework.cloud.netflix.feign.FeignClient;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//
//
//@FeignClient(
//        name = CommonContants.svr_base // name值是eurika的实例名字
//        ,fallbackFactory  = SaasFeignFallbackFactory.class
//)
//@RequestMapping(value = BaseRequestMapping.api_base_common)
//public interface SaasFeign {
//
//    @GetMapping(value = BaseRequestMapping.Saas.api_getSaassNoPage)
//    MixEnvelop getList(@RequestParam(value = "fields",required = false)String fields, @RequestParam(value = "filters",required = false) String filters, @RequestParam(value = "sorts",required = false) String sorts);
//
//    @GetMapping(value = BaseRequestMapping.Saas.api_getById, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
//    MixEnvelop findByCode(@RequestParam(value = "id", required = true) String id);
//}

+ 45 - 45
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SystemDictFeign.java

@ -1,45 +1,45 @@
package com.yihu.jw.fegin.base.base;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.base.SystemDictFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.rm.base.BaseRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = SystemDictFeignFallbackFactory.class
)
@RequestMapping(value = BaseRequestMapping.api_base_common)
public interface SystemDictFeign {
    @RequestMapping(value = BaseRequestMapping.SystemDict.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop create(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseRequestMapping.SystemDict.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
    Envelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseRequestMapping.SystemDict.api_delete,method = RequestMethod.DELETE)
    Envelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.SystemDict.api_getById)
    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseRequestMapping.SystemDict.api_getList, method = RequestMethod.GET)
    Envelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
            @RequestParam(value = "size", required = false) int size,
            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.SystemDict.api_getListNoPage)
    Envelop getListNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
}
//package com.yihu.jw.fegin.base.base;
//
//import com.yihu.jw.exception.business.JiWeiException;
//import com.yihu.jw.fegin.fallbackfactory.base.base.SystemDictFeignFallbackFactory;
//import com.yihu.jw.restmodel.CommonContants;
//import com.yihu.jw.restmodel.web.MixEnvelop;
//import com.yihu.jw.rm.base.BaseRequestMapping;
//import org.springframework.cloud.netflix.feign.FeignClient;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.*;
//
//
//@FeignClient(
//        name = CommonContants.svr_base // name值是eurika的实例名字
//        ,fallbackFactory  = SystemDictFeignFallbackFactory.class
//)
//@RequestMapping(value = BaseRequestMapping.api_base_common)
//public interface SystemDictFeign {
//
//    @RequestMapping(value = BaseRequestMapping.SystemDict.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
//    MixEnvelop create(@RequestBody String jsonData) throws JiWeiException;
//
//    @RequestMapping(value =  BaseRequestMapping.SystemDict.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
//    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
//
//    @RequestMapping(value =  BaseRequestMapping.SystemDict.api_delete,method = RequestMethod.DELETE)
//    MixEnvelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.SystemDict.api_getById)
//    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
//
//    @RequestMapping(value = BaseRequestMapping.SystemDict.api_getList, method = RequestMethod.GET)
//    MixEnvelop getList(
//            @RequestParam(value = "fields", required = false) String fields,
//            @RequestParam(value = "filters", required = false) String filters,
//            @RequestParam(value = "sorts", required = false) String sorts,
//            @RequestParam(value = "size", required = false) int size,
//            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.SystemDict.api_getListNoPage)
//    MixEnvelop getListNoPage(
//            @RequestParam(value = "fields", required = false) String fields,
//            @RequestParam(value = "filters", required = false) String filters,
//            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
//}

+ 48 - 48
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SystemDictListFeign.java

@ -1,48 +1,48 @@
package com.yihu.jw.fegin.base.base;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.base.SystemDictListFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.rm.base.BaseRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = SystemDictListFeignFallbackFactory.class
)
@RequestMapping(value = BaseRequestMapping.api_base_common)
public interface SystemDictListFeign {
    @RequestMapping(value = BaseRequestMapping.SystemDictList.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop create(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseRequestMapping.SystemDictList.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
    Envelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseRequestMapping.SystemDictList.api_delete,method = RequestMethod.DELETE)
    Envelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.SystemDictList.api_getById)
    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseRequestMapping.SystemDictList.api_getList, method = RequestMethod.GET)
    Envelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
            @RequestParam(value = "size", required = false) int size,
            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.SystemDictList.api_getListNoPage)
    Envelop getListNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.SystemDictList.api_getChildren)
    Envelop getChildren(@PathVariable(value = "id") String id) throws JiWeiException;
}
//package com.yihu.jw.fegin.base.base;
//
//import com.yihu.jw.exception.business.JiWeiException;
//import com.yihu.jw.fegin.fallbackfactory.base.base.SystemDictListFeignFallbackFactory;
//import com.yihu.jw.restmodel.CommonContants;
//import com.yihu.jw.restmodel.web.MixEnvelop;
//import com.yihu.jw.rm.base.BaseRequestMapping;
//import org.springframework.cloud.netflix.feign.FeignClient;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.*;
//
//
//@FeignClient(
//        name = CommonContants.svr_base // name值是eurika的实例名字
//        ,fallbackFactory  = SystemDictListFeignFallbackFactory.class
//)
//@RequestMapping(value = BaseRequestMapping.api_base_common)
//public interface SystemDictListFeign {
//
//    @RequestMapping(value = BaseRequestMapping.SystemDictList.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
//    MixEnvelop create(@RequestBody String jsonData) throws JiWeiException;
//
//    @RequestMapping(value =  BaseRequestMapping.SystemDictList.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
//    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
//
//    @RequestMapping(value =  BaseRequestMapping.SystemDictList.api_delete,method = RequestMethod.DELETE)
//    MixEnvelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.SystemDictList.api_getById)
//    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
//
//    @RequestMapping(value = BaseRequestMapping.SystemDictList.api_getList, method = RequestMethod.GET)
//    MixEnvelop getList(
//            @RequestParam(value = "fields", required = false) String fields,
//            @RequestParam(value = "filters", required = false) String filters,
//            @RequestParam(value = "sorts", required = false) String sorts,
//            @RequestParam(value = "size", required = false) int size,
//            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.SystemDictList.api_getListNoPage)
//    MixEnvelop getListNoPage(
//            @RequestParam(value = "fields", required = false) String fields,
//            @RequestParam(value = "filters", required = false) String filters,
//            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.SystemDictList.api_getChildren)
//    MixEnvelop getChildren(@PathVariable(value = "id") String id) throws JiWeiException;
//}

+ 8 - 8
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/login/LoginFeign.java

@ -2,8 +2,8 @@ package com.yihu.jw.fegin.base.login;
import com.yihu.jw.fegin.fallbackfactory.base.base.LoginFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.rm.base.BaseLoginRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -22,10 +22,10 @@ import org.springframework.web.bind.annotation.RequestParam;
public interface LoginFeign {
    @PostMapping(value = BaseLoginRequestMapping.BaseLoginAccount.api_checkoutInfo, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    BaseEnvelop checkoutInfo(@RequestParam(value = "ssc", required = true) String ssc,@RequestParam(value = "idcard", required = true) String idcard);
    Envelop checkoutInfo(@RequestParam(value = "ssc", required = true) String ssc, @RequestParam(value = "idcard", required = true) String idcard);
    @PostMapping(value = BaseLoginRequestMapping.BaseLoginAccount.api_accountSub, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop register(
    MixEnvelop register(
            @RequestParam(value = "mobilePhone", required = true) String mobilePhone,
            @RequestParam(value = "saasId", required = true) String saasId,
            @RequestParam(value = "type", required = true) int type,
@ -37,8 +37,8 @@ public interface LoginFeign {
    @PostMapping(value = BaseLoginRequestMapping.BaseLoginAccount.api_login, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop login(@RequestParam(value = "mobilePhone", required = false) String mobilePhone,
                           @RequestParam(value = "password", required = false) String password,
                           @RequestParam(value = "saasId", required = true) String saasId,
                           @RequestParam(value = "captcha", required = false) String captcha);
    MixEnvelop login(@RequestParam(value = "mobilePhone", required = false) String mobilePhone,
                     @RequestParam(value = "password", required = false) String password,
                     @RequestParam(value = "saasId", required = true) String saasId,
                     @RequestParam(value = "captcha", required = false) String captcha);
}

+ 4 - 4
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/sms/RegisterSmsFeign.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.base.sms;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.rm.base.BaseSmsRequestMapping;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.netflix.feign.FeignClient;
@ -21,8 +21,8 @@ import java.io.IOException;
@RequestMapping(value = BaseSmsRequestMapping.api_common)
public interface RegisterSmsFeign {
    @PostMapping(value = BaseSmsRequestMapping.Sms.api_sms_send, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    BaseEnvelop send(@ApiParam(name = "mobile", value = "手机号码", required = true) @RequestParam(value = "mobile", required = true) String mobile,
                     @ApiParam(name = "type", value = "短信验证码类型", required = true) @RequestParam(value = "type", required = true) int type,
                     @ApiParam(name = "saasId", value = "saasId", required = true) @RequestParam(value = "saasId", required = true) String saasId) throws IOException ;
    Envelop send(@ApiParam(name = "mobile", value = "手机号码", required = true) @RequestParam(value = "mobile", required = true) String mobile,
                 @ApiParam(name = "type", value = "短信验证码类型", required = true) @RequestParam(value = "type", required = true) int type,
                 @ApiParam(name = "saasId", value = "saasId", required = true) @RequestParam(value = "saasId", required = true) String saasId) throws IOException ;
    }

+ 14 - 14
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/BaseMenuFeign.java

@ -3,7 +3,7 @@ package com.yihu.jw.fegin.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.user.BaseMenuFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.BaseUserRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -19,31 +19,31 @@ import org.springframework.web.bind.annotation.*;
public interface BaseMenuFeign {
    
    @RequestMapping(value = BaseUserRequestMapping.BaseMenu.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop create(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop create(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseUserRequestMapping.BaseMenu.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
    Envelop update(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseUserRequestMapping.BaseMenu.api_delete,method = RequestMethod.DELETE)
    Envelop delete(@PathVariable(value = "id") String id) throws JiWeiException;
    MixEnvelop delete(@PathVariable(value = "id") String id) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseMenu.api_getOne)
    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseMenu.api_getList, method = RequestMethod.GET)
    Envelop getList(@RequestParam(value = "fields", required = false) String fields,
                    @RequestParam(value = "filters", required = false) String filters,
                    @RequestParam(value = "sorts", required = false) String sorts,
                    @RequestParam(value = "size", required = false) int size,
                    @RequestParam(value = "page", required = false) int page) throws JiWeiException;
    MixEnvelop getList(@RequestParam(value = "fields", required = false) String fields,
                       @RequestParam(value = "filters", required = false) String filters,
                       @RequestParam(value = "sorts", required = false) String sorts,
                       @RequestParam(value = "size", required = false) int size,
                       @RequestParam(value = "page", required = false) int page) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseMenu.api_getListNoPage)
    Envelop getListNoPage(@RequestParam(value = "fields", required = false) String fields,
                          @RequestParam(value = "filters", required = false) String filters,
                          @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    MixEnvelop getListNoPage(@RequestParam(value = "fields", required = false) String fields,
                             @RequestParam(value = "filters", required = false) String filters,
                             @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseMenu.api_getchildren)
    Envelop getChildren(@RequestParam(value = "saasId", required = true) String saasId, @RequestParam(value = "parentId", required = true) String parentId) throws JiWeiException;
    MixEnvelop getChildren(@RequestParam(value = "saasId", required = true) String saasId, @RequestParam(value = "parentId", required = true) String parentId) throws JiWeiException;

+ 12 - 12
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/BaseRoleFeign.java

@ -3,7 +3,7 @@ package com.yihu.jw.fegin.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.user.BaseRoleFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.BaseUserRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -20,19 +20,19 @@ import org.springframework.web.bind.annotation.*;
public interface BaseRoleFeign {
    @RequestMapping(value = BaseUserRequestMapping.BaseRole.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST)
    Envelop create(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop create(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRole.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.PUT)
    Envelop update(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRole.api_delete, method = RequestMethod.DELETE)
    Envelop delete(@PathVariable(value = "id") String id) throws JiWeiException;
    MixEnvelop delete(@PathVariable(value = "id") String id) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseRole.api_getById)
    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRole.api_getListPage, method = RequestMethod.GET)
    Envelop getList(
    MixEnvelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -40,24 +40,24 @@ public interface BaseRoleFeign {
            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseRole.api_getlistNoPage)
    Envelop getListNoPage(
    MixEnvelop getListNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRoleMenu.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST)
    Envelop createRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop createRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRoleMenu.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST)
    Envelop updateRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop updateRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRoleMenu.api_delete, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST)
    Envelop deleteRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop deleteRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRoleMenu.api_getListNoPage, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST)
    Envelop getMenuList(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop getMenuList(@RequestBody String jsonData) throws JiWeiException;
    @PostMapping(value = BaseUserRequestMapping.BaseRole.api_getRoleByPhoneAndSaasId, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop getPhoneAndSaasId(@RequestParam(value = "phone", required = true) String phone, @RequestParam(value = "saasId", required = true) String saasId);
    MixEnvelop getPhoneAndSaasId(@RequestParam(value = "phone", required = true) String phone, @RequestParam(value = "saasId", required = true) String saasId);
}

+ 12 - 12
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/EmployFeign.java

@ -3,7 +3,7 @@ package com.yihu.jw.fegin.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.user.EmployeeFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.BaseUserRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -20,19 +20,19 @@ import org.springframework.web.bind.annotation.*;
public interface EmployFeign {
    @RequestMapping(value = BaseUserRequestMapping.BaseEmploy.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop create(@RequestBody String jsonData);
    MixEnvelop create(@RequestBody String jsonData);
    @RequestMapping(value =  BaseUserRequestMapping.BaseEmploy.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
    Envelop update(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseUserRequestMapping.BaseEmploy.api_delete,method = RequestMethod.DELETE)
    Envelop delete(@PathVariable (value = "id") String id) throws JiWeiException;
    MixEnvelop delete(@PathVariable (value = "id") String id) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseEmploy.api_getById)
    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseEmploy.api_getListBySaasId, method = RequestMethod.GET)
    Envelop getList(
    MixEnvelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -40,24 +40,24 @@ public interface EmployFeign {
            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseEmploy.api_getListNoPage)
    Envelop getListNoPage(
    MixEnvelop getListNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseEmployRole.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop createEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop createEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseEmployRole.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop updateEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop updateEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseEmployRole.api_delete,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop deleteEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop deleteEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseEmployRole.api_getListNoPage,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop getRoleList(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop getRoleList(@RequestBody String jsonData) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseEmploy.api_getByPhone)
    Envelop getEmployeeByPhoneAndSaasId(@RequestParam(value = "phone", required = true) String phone,@RequestParam(value = "saasId", required = true) String saasId);
    MixEnvelop getEmployeeByPhoneAndSaasId(@RequestParam(value = "phone", required = true) String phone, @RequestParam(value = "saasId", required = true) String saasId);
}

+ 2 - 2
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/AccessTokenFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.fegin.fallbackfactory.base.wx.AccessTokenFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
@ -20,6 +20,6 @@ import org.springframework.web.bind.annotation.RequestParam;
public interface AccessTokenFeign {
    @RequestMapping(value = WechatRequestMapping.WxAccessToken.api_get, method = RequestMethod.GET)
    Envelop getWxAccessToken(@RequestParam(value = "wechatId") String wechatId) ;
    MixEnvelop getWxAccessToken(@RequestParam(value = "wechatId") String wechatId) ;
}

+ 7 - 7
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/GraphicMessageFeign.java

@ -3,7 +3,7 @@ package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.wx.GraphicMessageFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;;
import com.yihu.jw.restmodel.web.MixEnvelop;;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -23,19 +23,19 @@ import org.springframework.web.bind.annotation.RequestParam;
public interface GraphicMessageFeign {
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_create, method = RequestMethod.POST,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop createWxGraphicMessage( @RequestBody String jsonData) throws JiWeiException;
    MixEnvelop createWxGraphicMessage(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_update,method = RequestMethod.PUT,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop updateWxGraphicMessage( @RequestBody String jsonData) throws JiWeiException;
    MixEnvelop updateWxGraphicMessage(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_delete,method = RequestMethod.DELETE)
    Envelop deleteWxGraphicMessage(@RequestParam(value = "ids") String ids,@RequestParam(value = "userId") String userId,@RequestParam(value = "userName") String userName) throws JiWeiException;
    MixEnvelop deleteWxGraphicMessage(@RequestParam(value = "ids") String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_getById,method = RequestMethod.GET)
    Envelop findById(@RequestParam(value = "id") String id) throws JiWeiException;
    MixEnvelop findById(@RequestParam(value = "id") String id) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_getWxGraphicMessages,method = RequestMethod.GET)
    Envelop getWxGraphicMessages(
    MixEnvelop getWxGraphicMessages(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -43,7 +43,7 @@ public interface GraphicMessageFeign {
            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_getWxGraphicMessageNoPage,method = RequestMethod.GET)
    Envelop getWxGraphicMessageNoPage(
    MixEnvelop getWxGraphicMessageNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;

+ 7 - 7
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatFeign.java

@ -3,7 +3,7 @@ package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.wx.WechatFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -21,20 +21,20 @@ import org.springframework.web.bind.annotation.RequestParam;
public interface WechatFeign {
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_create, method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop createWechat( @RequestBody String jsonData) throws JiWeiException;
    MixEnvelop createWechat(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_update, method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop updateWechat(String jsonData) throws JiWeiException;
    MixEnvelop updateWechat(String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_delete,method = RequestMethod.DELETE)
    Envelop deleteWechat(@RequestParam(value = "ids") String ids,@RequestParam(value = "userId") String userId,@RequestParam(value = "userName") String userName) throws JiWeiException;
    MixEnvelop deleteWechat(@RequestParam(value = "ids") String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_getById,method = RequestMethod.GET)
    Envelop findById(@RequestParam(value = "id") String id) throws JiWeiException;
    MixEnvelop findById(@RequestParam(value = "id") String id) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_getWechats ,method = RequestMethod.GET)
    Envelop getWechats(@RequestParam(value = "fields" ,required = false)String fields, @RequestParam(value = "filters",required = false) String filters, @RequestParam(value = "sorts" ,required = false)String sorts, @RequestParam(value = "size" ,required = false) int size,@RequestParam(value = "page" ,required = false)int page) throws JiWeiException;
    MixEnvelop getWechats(@RequestParam(value = "fields" ,required = false)String fields, @RequestParam(value = "filters",required = false) String filters, @RequestParam(value = "sorts" ,required = false)String sorts, @RequestParam(value = "size" ,required = false) int size, @RequestParam(value = "page" ,required = false)int page) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_getWechatNoPage,method = RequestMethod.GET )
    Envelop getWechatNoPage(@RequestParam(value = "fields")String fields,@RequestParam(value = "filters") String filters,@RequestParam(value = "sorts") String sorts) throws JiWeiException;
    MixEnvelop getWechatNoPage(@RequestParam(value = "fields")String fields, @RequestParam(value = "filters") String filters, @RequestParam(value = "sorts") String sorts) throws JiWeiException;
}

+ 10 - 10
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatMenuFeign.java

@ -3,7 +3,7 @@ package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.wx.WechatMenuFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -20,25 +20,25 @@ import org.springframework.web.bind.annotation.*;
public interface WechatMenuFeign {
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_create,method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop createWxMenu( @RequestBody String jsonData) throws JiWeiException;
    MixEnvelop createWxMenu(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_update,method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop updateWxMenu( @RequestBody String jsonData) throws JiWeiException;
    MixEnvelop updateWxMenu(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_delete,method = RequestMethod.DELETE)
    Envelop deleteWxMenu(@RequestParam(value="ids")String ids,@RequestParam(value = "userId") String userId,@RequestParam(value = "userName") String userName) throws JiWeiException;
    MixEnvelop deleteWxMenu(@RequestParam(value="ids")String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_getById,method = RequestMethod.GET)
    Envelop findById(@RequestParam(value="id")String id) throws JiWeiException;
    MixEnvelop findById(@RequestParam(value="id")String id) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_getWxMenuNoPage,method = RequestMethod.GET)
    Envelop getWxMenuNoPage(
    MixEnvelop getWxMenuNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_getWxMenus,method = RequestMethod.GET)
    Envelop getWxMenus(
    MixEnvelop getWxMenus(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -46,11 +46,11 @@ public interface WechatMenuFeign {
            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_createMenu ,method = RequestMethod.GET)
    Envelop createWechatMenu(@RequestParam(value = "wechatId", required = true)String wechatId);
    MixEnvelop createWechatMenu(@RequestParam(value = "wechatId", required = true)String wechatId);
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_getParentMenu,method = RequestMethod.GET)
    Envelop getParentMenu(@PathVariable(value = "wechatId", required = true) String wechatId) throws JiWeiException;
    MixEnvelop getParentMenu(@PathVariable(value = "wechatId", required = true) String wechatId) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_getChildMenus,method = RequestMethod.GET)
    Envelop getChildMenus(@PathVariable(value = "parentId", required = true) String parentId) throws JiWeiException;
    MixEnvelop getChildMenus(@PathVariable(value = "parentId", required = true) String parentId) throws JiWeiException;
}

+ 8 - 8
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatTemplateFeign.java

@ -3,7 +3,7 @@ package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.wx.WechatTemplateFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -20,25 +20,25 @@ import org.springframework.web.bind.annotation.*;
public interface WechatTemplateFeign {
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_create ,method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop createWxTemplate(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop createWxTemplate(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_update ,method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop updateWxTemplate(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop updateWxTemplate(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_delete ,method = RequestMethod.DELETE)
    Envelop deleteWxTemplate( @RequestParam(value = "ids", required = true) String ids,@RequestParam(value = "userId") String userId,@RequestParam(value = "userName") String userName) throws JiWeiException;
    MixEnvelop deleteWxTemplate(@RequestParam(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_getById ,method = RequestMethod.GET)
    Envelop findById( @RequestParam(value = "id", required = true) String id) throws JiWeiException;
    MixEnvelop findById(@RequestParam(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_getWxTemplatesNoPage ,method = RequestMethod.GET)
    Envelop getWechatNoPage(
    MixEnvelop getWechatNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_getWxTemplates, method = RequestMethod.GET)
    Envelop getWechats(
    MixEnvelop getWechats(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -47,7 +47,7 @@ public interface WechatTemplateFeign {
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_sendTemplateMessage ,method = RequestMethod.GET)
    @ResponseBody
    Envelop sendTemplateMessage(
    MixEnvelop sendTemplateMessage(
            @RequestParam(value="openid") String openid,
            @RequestParam(value="templateId") String templateId,
            @RequestParam(value="url",required = false) String url,

+ 11 - 11
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/archives/ArchivesFallbackFactory.java

@ -3,7 +3,7 @@ package com.yihu.jw.fegin.fallbackfactory.archives;
import com.yihu.jw.fegin.archives.ArchivesFeign;
import com.yihu.jw.restmodel.archives.PatientArchivesInfoVO;
import com.yihu.jw.restmodel.archives.PatientArchivesVO;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -22,11 +22,11 @@ public class ArchivesFallbackFactory implements FallbackFactory<ArchivesFeign> {
    public ArchivesFeign create(Throwable e){
        return new ArchivesFeign() {
            @Override
            public Envelop<PatientArchivesVO> findPatientArchives(@RequestParam(value = "name", required = false)String name,
                                                                  @RequestParam(value = "status", required = false)String status,
                                                                  @RequestParam(value = "cancelReseanType", required = false)String cancelReseanType,
                                                                  @RequestParam(value = "page", required = false)Integer page,
                                                                  @RequestParam(value = "size", required = false )Integer size){
            public MixEnvelop<PatientArchivesVO> findPatientArchives(@RequestParam(value = "name", required = false)String name,
                                                                     @RequestParam(value = "status", required = false)String status,
                                                                     @RequestParam(value = "cancelReseanType", required = false)String cancelReseanType,
                                                                     @RequestParam(value = "page", required = false)Integer page,
                                                                     @RequestParam(value = "size", required = false )Integer size){
                tracer.getCurrentSpan().logEvent("查找档案列表失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("name:" + name);
                tracer.getCurrentSpan().logEvent("status:" + status);
@ -36,15 +36,15 @@ public class ArchivesFallbackFactory implements FallbackFactory<ArchivesFeign> {
                return null;
            }
            @Override
            public Envelop<PatientArchivesInfoVO> queryPatientArchivesInfoPage(@RequestParam(value = "code", required = false)String code){
            public MixEnvelop<PatientArchivesInfoVO> queryPatientArchivesInfoPage(@RequestParam(value = "code", required = false)String code){
                tracer.getCurrentSpan().logEvent("查找档案详情接口失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("code:" + code);
                return null;
            }
            @Override
            public Envelop<Boolean> createPatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                          @RequestParam(value = "list", required = true)String list){
            public MixEnvelop<Boolean> createPatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                             @RequestParam(value = "list", required = true)String list){
                tracer.getCurrentSpan().logEvent("创建失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("patientArchives:" + patientArchives);
                tracer.getCurrentSpan().logEvent("list:" + list);
@ -52,8 +52,8 @@ public class ArchivesFallbackFactory implements FallbackFactory<ArchivesFeign> {
            }
            @Override
            public Envelop<Boolean> updatePatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                          @RequestParam(value = "list", required = true)String list){
            public MixEnvelop<Boolean> updatePatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                             @RequestParam(value = "list", required = true)String list){
                tracer.getCurrentSpan().logEvent("更新档案失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("patientArchives:" + patientArchives);
                tracer.getCurrentSpan().logEvent("list:" + list);

+ 8 - 8
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/FunctionFeignFallbackFactory.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.fallbackfactory.base.base;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.base.FunctionFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -22,35 +22,35 @@ public class FunctionFeignFallbackFactory implements FallbackFactory<FunctionFei
    public FunctionFeign create(Throwable e) {
        return new FunctionFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop create(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建功能失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop update(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop update(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新功能失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop delete(@PathVariable String codes, @RequestParam String userCode, @RequestParam String userName) throws JiWeiException {
            public MixEnvelop delete(@PathVariable String codes, @RequestParam String userCode, @RequestParam String userName) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除功能失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("codes:"+codes);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop findById(String code) throws JiWeiException {
            public MixEnvelop findById(String code) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找功能失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("code:"+code);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
            public MixEnvelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找功能失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filterStr);
@ -61,7 +61,7 @@ public class FunctionFeignFallbackFactory implements FallbackFactory<FunctionFei
            }
            @Override
            public Envelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
            public MixEnvelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找功能列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
@ -70,7 +70,7 @@ public class FunctionFeignFallbackFactory implements FallbackFactory<FunctionFei
            }
            @Override
            public Envelop getChildren(String code) throws JiWeiException {
            public MixEnvelop getChildren(String code) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找功能子项失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("code:" + code);
                throw new JiWeiException(e);

+ 9 - 9
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/LoginFeignFallbackFactory.java

@ -1,9 +1,9 @@
package com.yihu.jw.fegin.fallbackfactory.base.base;
import com.yihu.jw.fegin.base.login.LoginFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelopStatus;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.status.EnvelopStatus;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -28,9 +28,9 @@ public class LoginFeignFallbackFactory implements FallbackFactory<LoginFeign> {
             * @return
             */
            @Override
            public BaseEnvelop checkoutInfo(String ssc,String idcard) {
            public Envelop checkoutInfo(String ssc, String idcard) {
                tracer.getCurrentSpan().logEvent("校验医保卡、身份证、手机号接口错误:原因:"+e.getMessage());
                return Envelop.getError(e.getMessage(), BaseEnvelopStatus.system_error.getCode());
                return MixEnvelop.getError(e.getMessage(), EnvelopStatus.system_error.value);
            }
            /**
@ -46,9 +46,9 @@ public class LoginFeignFallbackFactory implements FallbackFactory<LoginFeign> {
             * @return
             */
            @Override
            public Envelop register(String mobilePhone, String saasId, int type, String captcha, String name, String password, String idcard, String ssc) {
            public MixEnvelop register(String mobilePhone, String saasId, int type, String captcha, String name, String password, String idcard, String ssc) {
                tracer.getCurrentSpan().logEvent("注册账号接口错误:原因:"+e.getMessage());
                return Envelop.getError(e.getMessage(),BaseEnvelopStatus.system_error.getCode());
                return MixEnvelop.getError(e.getMessage(), EnvelopStatus.system_error.value);
            }
            /**
@ -60,9 +60,9 @@ public class LoginFeignFallbackFactory implements FallbackFactory<LoginFeign> {
             * @return
             */
            @Override
            public Envelop login(String mobilePhone, String password, String saasId, String captcha) {
            public MixEnvelop login(String mobilePhone, String password, String saasId, String captcha) {
                tracer.getCurrentSpan().logEvent("登录账号接口错误:原因:"+e.getMessage());
                return Envelop.getError(e.getMessage(),BaseEnvelopStatus.system_error.getCode());
                return MixEnvelop.getError(e.getMessage(), EnvelopStatus.system_error.value);
            }
        };
    }

+ 10 - 10
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/ModuleFeignFallbackFactory.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.fallbackfactory.base.base;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.base.ModuleFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -22,35 +22,35 @@ public class ModuleFeignFallbackFactory implements FallbackFactory<ModuleFeign>
    public ModuleFeign create(Throwable e) {
        return new ModuleFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop create(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建模块失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop update(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop update(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新模块失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop delete(@PathVariable String codes, @RequestParam String userCode, @RequestParam String userName) throws JiWeiException {
            public MixEnvelop delete(@PathVariable String codes, @RequestParam String userCode, @RequestParam String userName) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除模块失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("codes:"+codes);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop findById(String id) throws JiWeiException {
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找模块失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
            public MixEnvelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找模块失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filterStr);
@ -61,7 +61,7 @@ public class ModuleFeignFallbackFactory implements FallbackFactory<ModuleFeign>
            }
            @Override
            public Envelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
            public MixEnvelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找模块列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
@ -70,21 +70,21 @@ public class ModuleFeignFallbackFactory implements FallbackFactory<ModuleFeign>
            }
            @Override
            public Envelop getChildren(String code) throws JiWeiException {
            public MixEnvelop getChildren(String code) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找模块子项失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("code:" + code);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getExistFunc(@PathVariable(value = "code") String code) throws JiWeiException {
            public MixEnvelop getExistFunc(@PathVariable(value = "code") String code) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找模块已关联的功能失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("code:" + code);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop changeFun(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop changeFun(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新已有模块功能失败:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                throw new JiWeiException(e);

+ 3 - 3
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SaasFeignFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.base.base;
import com.yihu.jw.fegin.base.base.SaasFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
@ -13,12 +13,12 @@ public class SaasFeignFallbackFactory implements FallbackFactory<SaasFeign> {
    public SaasFeign create(Throwable throwable) {
        return  new SaasFeign() {
            @Override
            public Envelop getList(@RequestParam(value = "fields") String fields, @RequestParam(value = "filters") String filters, @RequestParam(value = "sorts") String sorts) {
            public MixEnvelop getList(@RequestParam(value = "fields") String fields, @RequestParam(value = "filters") String filters, @RequestParam(value = "sorts") String sorts) {
                return null;
            }
            @Override
            public Envelop findByCode(@RequestParam(value = "id") String id) {
            public MixEnvelop findByCode(@RequestParam(value = "id") String id) {
                return null;
            }
        };

+ 7 - 7
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SystemDictFeignFallbackFactory.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.fallbackfactory.base.base;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.base.SystemDictFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -21,35 +21,35 @@ public class SystemDictFeignFallbackFactory implements FallbackFactory<SystemDic
    public SystemDictFeign create(Throwable e) {
        return new SystemDictFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop create(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建系統字典失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop update(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop update(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新系統字典失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop delete(@PathVariable String codes, @RequestParam String userCode, @RequestParam String userName) throws JiWeiException {
            public MixEnvelop delete(@PathVariable String codes, @RequestParam String userCode, @RequestParam String userName) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除系統字典失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("codes:"+codes);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop findById(String code) throws JiWeiException {
            public MixEnvelop findById(String code) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找系統字典失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("code:"+code);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
            public MixEnvelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找系統字典失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filterStr);
@ -60,7 +60,7 @@ public class SystemDictFeignFallbackFactory implements FallbackFactory<SystemDic
            }
            @Override
            public Envelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
            public MixEnvelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找系統字典列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);

+ 8 - 8
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SystemDictListFeignFallbackFactory.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.fallbackfactory.base.base;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.base.SystemDictListFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -21,35 +21,35 @@ public class SystemDictListFeignFallbackFactory implements FallbackFactory<Syste
    public SystemDictListFeign create(Throwable e) {
        return new SystemDictListFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop create(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建系統字典集合失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop update(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop update(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新系統字典集合失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop delete(@PathVariable String codes, @RequestParam String userCode, @RequestParam String userName) throws JiWeiException {
            public MixEnvelop delete(@PathVariable String codes, @RequestParam String userCode, @RequestParam String userName) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除系統字典集合失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("codes:"+codes);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop findById(String code) throws JiWeiException {
            public MixEnvelop findById(String code) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找系統字典集合失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("code:"+code);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
            public MixEnvelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找系統字典集合失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filterStr);
@ -60,7 +60,7 @@ public class SystemDictListFeignFallbackFactory implements FallbackFactory<Syste
            }
            @Override
            public Envelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
            public MixEnvelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找系統字典集合列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
@ -69,7 +69,7 @@ public class SystemDictListFeignFallbackFactory implements FallbackFactory<Syste
            }
            @Override
            public Envelop getChildren(String code) throws JiWeiException {
            public MixEnvelop getChildren(String code) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找系統字典子项失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("code:" + code);
                throw new JiWeiException(e);

+ 8 - 8
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/BaseMenuFeignFallbackFactory.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.fallbackfactory.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.user.BaseMenuFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -23,35 +23,35 @@ public class BaseMenuFeignFallbackFactory implements FallbackFactory<BaseMenuFei
    public BaseMenuFeign create(Throwable e) {
        return new BaseMenuFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop create(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop update(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop update(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop delete(@PathVariable String id) throws JiWeiException {
            public MixEnvelop delete(@PathVariable String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop findById(String id) throws JiWeiException {
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找单个菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
            public MixEnvelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filterStr);
@ -62,7 +62,7 @@ public class BaseMenuFeignFallbackFactory implements FallbackFactory<BaseMenuFei
            }
            @Override
            public Envelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
            public MixEnvelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找菜单列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
@ -71,7 +71,7 @@ public class BaseMenuFeignFallbackFactory implements FallbackFactory<BaseMenuFei
            }
            @Override
            public Envelop getChildren(String saasId, String parentId) throws JiWeiException {
            public MixEnvelop getChildren(String saasId, String parentId) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找子菜单列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("filters:" + saasId);
                tracer.getCurrentSpan().logEvent("sorts:" + parentId);

+ 12 - 12
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/BaseRoleFeignFallbackFactory.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.fallbackfactory.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.user.BaseRoleFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -23,35 +23,35 @@ public class BaseRoleFeignFallbackFactory implements FallbackFactory<BaseRoleFei
    public BaseRoleFeign create(Throwable e) {
        return new BaseRoleFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop create(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop update(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop update(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop delete(@PathVariable String id) throws JiWeiException {
            public MixEnvelop delete(@PathVariable String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop findById(String id) throws JiWeiException {
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找单个角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
            public MixEnvelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找角色列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filterStr);
@ -62,7 +62,7 @@ public class BaseRoleFeignFallbackFactory implements FallbackFactory<BaseRoleFei
            }
            @Override
            public Envelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
            public MixEnvelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("不分页查找角色列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
@ -71,35 +71,35 @@ public class BaseRoleFeignFallbackFactory implements FallbackFactory<BaseRoleFei
            }
            @Override
            public Envelop createRoleMenus(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop createRoleMenus(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建角色菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop updateRoleMenus(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop updateRoleMenus(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("修改角色菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop deleteRoleMenus(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop deleteRoleMenus(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除角色菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getMenuList(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop getMenuList(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("获取角色菜单列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getPhoneAndSaasId(String phone, String saasId) {
            public MixEnvelop getPhoneAndSaasId(String phone, String saasId) {
                return null;
            }

+ 12 - 12
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/EmployeeFeignFallbackFactory.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.fallbackfactory.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.user.EmployFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -22,35 +22,35 @@ public class EmployeeFeignFallbackFactory  implements FallbackFactory<EmployFeig
    public EmployFeign create(Throwable e) {
        return new EmployFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData){
            public MixEnvelop create(@RequestBody String jsonData){
                tracer.getCurrentSpan().logEvent("创建用户失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                return null;
            }
            @Override
            public Envelop update(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop update(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新用户失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop delete(@PathVariable String id) throws JiWeiException {
            public MixEnvelop delete(@PathVariable String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除用户失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop findById(String id) throws JiWeiException {
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找单个用户失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
            public MixEnvelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找用户失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filterStr);
@ -61,7 +61,7 @@ public class EmployeeFeignFallbackFactory  implements FallbackFactory<EmployFeig
            }
            @Override
            public Envelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
            public MixEnvelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("不分页查找用户列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
@ -70,35 +70,35 @@ public class EmployeeFeignFallbackFactory  implements FallbackFactory<EmployFeig
            }
            @Override
            public Envelop createEmployRoles(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop createEmployRoles(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("新增用户角色列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop updateEmployRoles(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop updateEmployRoles(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("修改用户角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop deleteEmployRoles(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop deleteEmployRoles(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除用户角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getRoleList(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop getRoleList(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("获取用户角色列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getEmployeeByPhoneAndSaasId(String phone, String saasId){
            public MixEnvelop getEmployeeByPhoneAndSaasId(String phone, String saasId){
                return null;
            }
        };

+ 2 - 2
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/AccessTokenFeignFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.base.wx;
import com.yihu.jw.fegin.base.wx.AccessTokenFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
@ -15,7 +15,7 @@ public class AccessTokenFeignFallbackFactory implements FallbackFactory<AccessTo
    public AccessTokenFeign create(Throwable throwable) {
        return new AccessTokenFeign() {
            @Override
            public Envelop getWxAccessToken(@RequestParam(value = "wechatCode") String wechatCode) {
            public MixEnvelop getWxAccessToken(@RequestParam(value = "wechatCode") String wechatCode) {
                return null;
            }
        };

+ 7 - 7
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/GraphicMessageFeignFallbackFactory.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.fallbackfactory.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.wx.GraphicMessageFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -22,21 +22,21 @@ public class GraphicMessageFeignFallbackFactory implements FallbackFactory<Graph
    public GraphicMessageFeign create(Throwable e) {
        return new GraphicMessageFeign() {
            @Override
            public Envelop createWxGraphicMessage(@RequestParam(value = "jsonData") String jsonData) throws JiWeiException {
            public MixEnvelop createWxGraphicMessage(@RequestParam(value = "jsonData") String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建微信图文消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop updateWxGraphicMessage(@RequestParam(value = "jsonData") String jsonData) throws JiWeiException {
            public MixEnvelop updateWxGraphicMessage(@RequestParam(value = "jsonData") String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新微信图文消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop deleteWxGraphicMessage(String codes,String userCode,String userName) throws JiWeiException {
            public MixEnvelop deleteWxGraphicMessage(String codes, String userCode, String userName) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("codes:"+codes);
                throw new JiWeiException(e);
@ -44,14 +44,14 @@ public class GraphicMessageFeignFallbackFactory implements FallbackFactory<Graph
            }
            @Override
            public Envelop findById(String id) throws JiWeiException {
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("根据code查找微信图文消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getWxGraphicMessages(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts, @RequestParam(value = "size", required = false) int size, @RequestParam(value = "page", required = false) int page) throws JiWeiException {
            public MixEnvelop getWxGraphicMessages(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts, @RequestParam(value = "size", required = false) int size, @RequestParam(value = "page", required = false) int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找微信图文消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
@ -62,7 +62,7 @@ public class GraphicMessageFeignFallbackFactory implements FallbackFactory<Graph
            }
            @Override
            public Envelop getWxGraphicMessageNoPage(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException {
            public MixEnvelop getWxGraphicMessageNoPage(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找微信图文消息列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);

+ 7 - 7
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatFeignFallbackFactory.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.fallbackfactory.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.wx.WechatFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -19,31 +19,31 @@ public class WechatFeignFallbackFactory implements FallbackFactory<WechatFeign>
    public WechatFeign create(Throwable e) {
        return new WechatFeign() {
            public Envelop createWechat(String jsonData) throws JiWeiException {
            public MixEnvelop createWechat(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            public Envelop updateWechat(String jsonData) throws JiWeiException {
            public MixEnvelop updateWechat(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            public Envelop deleteWechat(String codes,String userCode,String userName) throws JiWeiException {
            public MixEnvelop deleteWechat(String codes, String userCode, String userName) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("codes:"+codes);
                throw new JiWeiException(e);
            }
            public Envelop findById(String id) throws JiWeiException {
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            public Envelop getWechats(String fields, String filters, String sorts, int size, int page) throws JiWeiException {
            public MixEnvelop getWechats(String fields, String filters, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
@ -53,7 +53,7 @@ public class WechatFeignFallbackFactory implements FallbackFactory<WechatFeign>
                throw new JiWeiException(e);
            }
            public Envelop getWechatNoPage(String fields, String filters, String sorts) throws JiWeiException {
            public MixEnvelop getWechatNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找微信配置列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);

+ 10 - 10
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatMenuFeignFallbackFactory.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.fallbackfactory.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.wx.WechatMenuFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -22,21 +22,21 @@ public class WechatMenuFeignFallbackFactory implements FallbackFactory<WechatMen
    public WechatMenuFeign create(Throwable e) {
        return new WechatMenuFeign() {
            @Override
            public Envelop createWxMenu(String jsonData) throws JiWeiException {
            public MixEnvelop createWxMenu(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建微信菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop updateWxMenu(String jsonData) throws JiWeiException {
            public MixEnvelop updateWxMenu(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新微信菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop deleteWxMenu(String codes,String userCode,String userName) throws JiWeiException {
            public MixEnvelop deleteWxMenu(String codes, String userCode, String userName) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除微信菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("codes:"+codes);
                tracer.getCurrentSpan().logEvent("操作人userCode:"+userCode);
@ -45,14 +45,14 @@ public class WechatMenuFeignFallbackFactory implements FallbackFactory<WechatMen
            @Override
            public Envelop findById(String id) throws JiWeiException {
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找微信菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getWxMenuNoPage(String fields, String filters, String sorts) throws JiWeiException {
            public MixEnvelop getWxMenuNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找微信菜单列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
@ -62,26 +62,26 @@ public class WechatMenuFeignFallbackFactory implements FallbackFactory<WechatMen
            @Override
            public Envelop createWechatMenu(String wechatCode) {
            public MixEnvelop createWechatMenu(String wechatCode) {
                return null;
            }
            @Override
            public Envelop getParentMenu(@PathVariable String wechatCode) throws JiWeiException {
            public MixEnvelop getParentMenu(@PathVariable String wechatCode) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("根据微信code查找父菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("wechatCode:"+wechatCode);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getChildMenus(@PathVariable(value = "parentCode", required = true) String parentCode) throws JiWeiException {
            public MixEnvelop getChildMenus(@PathVariable(value = "parentCode", required = true) String parentCode) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("根据父级菜单code查找子菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("parentCode:"+parentCode);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getWxMenus(String fields, String filters, String sorts, int size, int page) throws JiWeiException {
            public MixEnvelop getWxMenus(String fields, String filters, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找微信菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);

+ 8 - 8
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatTemplateFeignFallbackFactory.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.fallbackfactory.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.wx.WechatTemplateFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -21,40 +21,40 @@ public class WechatTemplateFeignFallbackFactory implements FallbackFactory<Wecha
    public WechatTemplateFeign create(Throwable e) {
        return new WechatTemplateFeign() {
            @Override
            public Envelop createWxTemplate(String jsonData) throws JiWeiException {
            public MixEnvelop createWxTemplate(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建微信模板消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop updateWxTemplate(String jsonData) throws JiWeiException {
            public MixEnvelop updateWxTemplate(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新微信模板消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop deleteWxTemplate(String codes,String userCode,String userName) throws JiWeiException {
            public MixEnvelop deleteWxTemplate(String codes, String userCode, String userName) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除微信模板消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("codes:"+codes);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop findById(String id) throws JiWeiException {
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("根据code查找微信模板消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop sendTemplateMessage(String openid, String templateCode, String url, String appid, String pagepath, String data) {
            public MixEnvelop sendTemplateMessage(String openid, String templateCode, String url, String appid, String pagepath, String data) {
                return null;
            }
            @Override
            public Envelop getWechatNoPage(String fields, String filters, String sorts) throws JiWeiException {
            public MixEnvelop getWechatNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找微信模板消息列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
@ -63,7 +63,7 @@ public class WechatTemplateFeignFallbackFactory implements FallbackFactory<Wecha
            }
            @Override
            public Envelop getWechats(String fields, String filters, String sorts, int size, int page) throws JiWeiException {
            public MixEnvelop getWechats(String fields, String filters, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找微信模板消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);

+ 5 - 5
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/common/IotFileUploadFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.common;
import com.yihu.jw.fegin.iot.common.IotFileUploadFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.common.UploadVO;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -24,25 +24,25 @@ public class IotFileUploadFallbackFactory implements FallbackFactory<IotFileUplo
    public IotFileUploadFeign create(Throwable e) {
        return new IotFileUploadFeign() {
            @Override
            public Envelop<UploadVO> uploadImg(@RequestParam(value = "file", required = true) MultipartFile file) {
            public MixEnvelop<UploadVO> uploadImg(@RequestParam(value = "file", required = true) MultipartFile file) {
                tracer.getCurrentSpan().logEvent("文件流上传图片失败:原因:" + e.getMessage());
                return null;
            }
            @Override
            public Envelop<UploadVO> uploadAttachment(@RequestParam(value = "file", required = true) MultipartFile file) {
            public MixEnvelop<UploadVO> uploadAttachment(@RequestParam(value = "file", required = true) MultipartFile file) {
                tracer.getCurrentSpan().logEvent("文件流上传附件失败:原因:" + e.getMessage());
                return null;
            }
            @Override
            public Envelop<UploadVO> uploadStream(@RequestParam(value = "file", required = true) MultipartFile file) {
            public MixEnvelop<UploadVO> uploadStream(@RequestParam(value = "file", required = true) MultipartFile file) {
                tracer.getCurrentSpan().logEvent("文件流上传文件失败:原因:" + e.getMessage());
                return null;
            }
            @Override
            public Envelop<UploadVO> uploadImages(@RequestBody String jsonData) {
            public MixEnvelop<UploadVO> uploadImages(@RequestBody String jsonData) {
                tracer.getCurrentSpan().logEvent("base64上传图片失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;

+ 2 - 2
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/common/IotSystemDictFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.common;
import com.yihu.jw.fegin.iot.common.IotSystemDictFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.dict.IotSystemDictVO;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -22,7 +22,7 @@ public class IotSystemDictFallbackFactory implements FallbackFactory<IotSystemDi
    public IotSystemDictFeign create(Throwable e) {
        return new IotSystemDictFeign() {
            @Override
            public Envelop<IotSystemDictVO> getList(@RequestParam(value = "dictName", required = true) String dictName) throws Exception {
            public MixEnvelop<IotSystemDictVO> getList(@RequestParam(value = "dictName", required = true) String dictName) throws Exception {
                tracer.getCurrentSpan().logEvent("获取字典失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("dictName:" + dictName);
                return null;

+ 16 - 16
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/company/IotCompanyFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.company;
import com.yihu.jw.fegin.iot.company.IotCompanyFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.company.IotCompanyCertificateVO;
import com.yihu.jw.restmodel.iot.company.IotCompanyVO;
import feign.hystrix.FallbackFactory;
@ -24,11 +24,11 @@ public class IotCompanyFallbackFactory implements FallbackFactory<IotCompanyFeig
        return new IotCompanyFeign() {
            @Override
            public Envelop<IotCompanyVO> findCompanyPage(@RequestParam(value = "name", required = false) String name,
                                                         @RequestParam(value = "status", required = false) String status,
                                                         @RequestParam(value = "type", required = false) String type,
                                                         @RequestParam(value = "page", required = false) Integer page,
                                                         @RequestParam(value = "size", required = false) Integer size){
            public MixEnvelop<IotCompanyVO> findCompanyPage(@RequestParam(value = "name", required = false) String name,
                                                            @RequestParam(value = "status", required = false) String status,
                                                            @RequestParam(value = "type", required = false) String type,
                                                            @RequestParam(value = "page", required = false) Integer page,
                                                            @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("分页查找企业失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("name:" + name);
                tracer.getCurrentSpan().logEvent("status:" + status);
@ -39,42 +39,42 @@ public class IotCompanyFallbackFactory implements FallbackFactory<IotCompanyFeig
            }
            @Override
            public Envelop<IotCompanyVO> addCompany(@RequestParam(value = "jsonData", required = true)String jsonData) {
            public MixEnvelop<IotCompanyVO> addCompany(@RequestParam(value = "jsonData", required = true)String jsonData) {
                tracer.getCurrentSpan().logEvent("创建企业失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop<IotCompanyVO> findByCode(@RequestParam(value = "id", required = true) String id) {
            public MixEnvelop<IotCompanyVO> findByCode(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("根据id查找企业失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public Envelop<IotCompanyVO> findByBusinessLicense(@RequestParam(value = "businessLicense", required = true) String businessLicense) {
            public MixEnvelop<IotCompanyVO> findByBusinessLicense(@RequestParam(value = "businessLicense", required = true) String businessLicense) {
                tracer.getCurrentSpan().logEvent("根据营业执照号查找企业失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("businessLicense:" + businessLicense);
                return null;
            }
            @Override
            public Envelop<IotCompanyVO> delCompany(@RequestParam(value = "id", required = true) String id) {
            public MixEnvelop<IotCompanyVO> delCompany(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("删除企业失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public Envelop<IotCompanyVO> updCompany(@RequestParam(value = "jsonData", required = true)String jsonData) {
            public MixEnvelop<IotCompanyVO> updCompany(@RequestParam(value = "jsonData", required = true)String jsonData) {
                tracer.getCurrentSpan().logEvent("修改企业信息失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop<IotCompanyCertificateVO> findCompanyCertPage
            public MixEnvelop<IotCompanyCertificateVO> findCompanyCertPage
                    (@RequestParam(value = "name", required = false) String name,
                     @RequestParam(value = "companyId", required = false) String companyId,
                     @RequestParam(value = "page", required = false) Integer page,
@ -88,28 +88,28 @@ public class IotCompanyFallbackFactory implements FallbackFactory<IotCompanyFeig
            }
            @Override
            public Envelop<IotCompanyCertificateVO> findCompanyCertById(@RequestParam(value = "id", required = true) String id) {
            public MixEnvelop<IotCompanyCertificateVO> findCompanyCertById(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("根据id查找企业证书失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public Envelop<IotCompanyCertificateVO> findCompanyCertByCompanyId(@RequestParam(value = "companyId", required = true) String companyId) {
            public MixEnvelop<IotCompanyCertificateVO> findCompanyCertByCompanyId(@RequestParam(value = "companyId", required = true) String companyId) {
                tracer.getCurrentSpan().logEvent("根据企业id查找企业证书失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("companyId:" + companyId);
                return null;
            }
            @Override
            public Envelop<IotCompanyCertificateVO> addCompanyCert(@RequestParam(value = "jsonData", required = true)String jsonData) {
            public MixEnvelop<IotCompanyCertificateVO> addCompanyCert(@RequestParam(value = "jsonData", required = true)String jsonData) {
                tracer.getCurrentSpan().logEvent("创建企业证书失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop<IotCompanyCertificateVO> delCompanyCert(@RequestParam(value = "id", required = true)String id) {
            public MixEnvelop<IotCompanyCertificateVO> delCompanyCert(@RequestParam(value = "id", required = true)String id) {
                tracer.getCurrentSpan().logEvent("删除企业证书失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;

+ 4 - 4
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataInputFeignFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.data_input;
import com.yihu.jw.fegin.iot.data_input.DataInputFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -18,21 +18,21 @@ public class DataInputFeignFallbackFactory implements FallbackFactory<DataInputF
    public DataInputFeign create(Throwable e) {
        return new DataInputFeign() {
            @Override
            public Envelop bindUser(@RequestBody String jsonData) {
            public MixEnvelop bindUser(@RequestBody String jsonData) {
                tracer.getCurrentSpan().logEvent("设备注册绑定失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop uploadData(@RequestBody String jsonData) {
            public MixEnvelop uploadData(@RequestBody String jsonData) {
                tracer.getCurrentSpan().logEvent("体征数据上传失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop uploadWeRunData(String jsonData) {
            public MixEnvelop uploadWeRunData(String jsonData) {
                tracer.getCurrentSpan().logEvent("微信运动数据上传失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;

+ 11 - 12
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataSearchFeignFallbackFactory.java

@ -1,12 +1,11 @@
package com.yihu.jw.fegin.fallbackfactory.iot.data_input;
import com.yihu.jw.fegin.iot.data_input.DataSearchFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
@Component
public class DataSearchFeignFallbackFactory implements FallbackFactory<DataSearchFeign> {
@ -19,70 +18,70 @@ public class DataSearchFeignFallbackFactory implements FallbackFactory<DataSearc
        return new DataSearchFeign() {
            @Override
            public Envelop getOne(String jsonData) {
            public MixEnvelop getOne(String jsonData) {
                tracer.getCurrentSpan().logEvent("根据id获取单条数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop getList(String jsonData ) {
            public MixEnvelop getList(String jsonData ) {
                tracer.getCurrentSpan().logEvent("获取多条数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop getListPage(String jsonData ) {
            public MixEnvelop getListPage(String jsonData ) {
                tracer.getCurrentSpan().logEvent("获取数据分页列表失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop getRecent5ByTypeAndTime(String jsonData ) {
            public MixEnvelop getRecent5ByTypeAndTime(String jsonData ) {
                tracer.getCurrentSpan().logEvent("获取最近5条记录数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop getAbnormalTimesAWeek(String jsonData ) {
            public MixEnvelop getAbnormalTimesAWeek(String jsonData ) {
                tracer.getCurrentSpan().logEvent("获取最近体征数据异常次数失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop getRecent1ByCodeAndDel(String jsonData ) {
            public MixEnvelop getRecent1ByCodeAndDel(String jsonData ) {
                tracer.getCurrentSpan().logEvent("根据居民code和删除标识获取最近一次体征数据:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop getListByCodeAndDel(String jsonData ) {
            public MixEnvelop getListByCodeAndDel(String jsonData ) {
                tracer.getCurrentSpan().logEvent("根据居民code和删除标识获取所有体征数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop delete(String jsonData) {
            public MixEnvelop delete(String jsonData) {
                tracer.getCurrentSpan().logEvent("根据居民rid删除用户体征数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop update(String jsonData) {
            public MixEnvelop update(String jsonData) {
                tracer.getCurrentSpan().logEvent("根据rid修改用户体征数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop getWeRunDataListById(String jsonData) {
            public MixEnvelop getWeRunDataListById(String jsonData) {
                tracer.getCurrentSpan().logEvent("根据用户code用户微信运动数据列表数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;

+ 2 - 2
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataStandardConvertFeignFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.data_input;
import com.yihu.jw.fegin.iot.data_input.DataStandardConvertFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -17,7 +17,7 @@ public class DataStandardConvertFeignFallbackFactory implements FallbackFactory<
    public DataStandardConvertFeign create(Throwable throwable) {
        return new DataStandardConvertFeign() {
            @Override
            public Envelop convert(String jsonData) {
            public MixEnvelop convert(String jsonData) {
                tracer.getCurrentSpan().logEvent("标准转换失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;

+ 22 - 22
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceFallbackFactory.java

@ -1,8 +1,8 @@
package com.yihu.jw.fegin.fallbackfactory.iot.device;
import com.yihu.jw.fegin.iot.device.IotDeviceFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.iot.common.ExistVO;
import com.yihu.jw.restmodel.iot.device.IotDeviceImportRecordVO;
import com.yihu.jw.restmodel.iot.device.IotDeviceVO;
@ -28,14 +28,14 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
        return new IotDeviceFeign() {
            @Override
            public Envelop<IotDeviceVO> create(@RequestParam(value = "jsonData", required = true) String jsonData) {
            public MixEnvelop<IotDeviceVO> create(@RequestParam(value = "jsonData", required = true) String jsonData) {
                tracer.getCurrentSpan().logEvent("创建设备失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop<IotDeviceVO> findByCode(@RequestParam(value = "id", required = true) String id
            public MixEnvelop<IotDeviceVO> findByCode(@RequestParam(value = "id", required = true) String id
            ) {
                tracer.getCurrentSpan().logEvent("根据id查找设备失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
@ -43,7 +43,7 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
            }
            @Override
            public Envelop<IotDeviceVO> delDevice(@RequestParam(value = "id", required = true) String id
            public MixEnvelop<IotDeviceVO> delDevice(@RequestParam(value = "id", required = true) String id
            ) {
                tracer.getCurrentSpan().logEvent("删除设备失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
@ -51,14 +51,14 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
            }
            @Override
            public BaseEnvelop updDevice(@RequestParam String jsonData) {
            public Envelop updDevice(@RequestParam String jsonData) {
                tracer.getCurrentSpan().logEvent("修改设备失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop<ExistVO> isSnExist(@RequestParam(value = "sn", required = true) String sn
            public MixEnvelop<ExistVO> isSnExist(@RequestParam(value = "sn", required = true) String sn
            ) {
                tracer.getCurrentSpan().logEvent("sn码是否存在失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("sn:" + sn);
@ -66,7 +66,7 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
            }
            @Override
            public Envelop<ExistVO> isSimExist(@RequestParam(value = "sim", required = true) String sim
            public MixEnvelop<ExistVO> isSimExist(@RequestParam(value = "sim", required = true) String sim
            ) {
                tracer.getCurrentSpan().logEvent("sim卡号是否存在失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("sim:" + sim);
@ -74,8 +74,8 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
            }
            @Override
            public BaseEnvelop updSim(@RequestParam(value = "sim", required = true) String sim,
                                      @RequestParam(value = "id", required = true) String id) {
            public Envelop updSim(@RequestParam(value = "sim", required = true) String sim,
                                  @RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("修改sim卡号失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("sim:" + sim);
                tracer.getCurrentSpan().logEvent("id:" + id);
@ -83,13 +83,13 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
            }
            @Override
            public Envelop<IotDeviceVO> findProductPageByCompanyId(@RequestParam(value = "sn", required = false) String sn,
                                                                   @RequestParam(value = "hospital", required = false) String hospital,
                                                                   @RequestParam(value = "orderId", required = false) String orderId,
                                                                   @RequestParam(value = "purcharseId", required = false) String purcharseId,
                                                                   @RequestParam(value = "isBinding", required = false) Integer isBinding,
                                                                   @RequestParam(value = "page", required = false) Integer page,
                                                                   @RequestParam(value = "size", required = false) Integer size){
            public MixEnvelop<IotDeviceVO> findProductPageByCompanyId(@RequestParam(value = "sn", required = false) String sn,
                                                                      @RequestParam(value = "hospital", required = false) String hospital,
                                                                      @RequestParam(value = "orderId", required = false) String orderId,
                                                                      @RequestParam(value = "purcharseId", required = false) String purcharseId,
                                                                      @RequestParam(value = "isBinding", required = false) Integer isBinding,
                                                                      @RequestParam(value = "page", required = false) Integer page,
                                                                      @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("分页查找设备失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("sn:" + sn);
                tracer.getCurrentSpan().logEvent("hospital:" + hospital);
@ -102,7 +102,7 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
            }
            @Override
            public Envelop<ExistVO> isImportDevice(@ApiParam(name = "purcharseId", value = "purcharseId")
            public MixEnvelop<ExistVO> isImportDevice(@ApiParam(name = "purcharseId", value = "purcharseId")
                                                   @RequestParam(value = "purcharseId", required = true) String purcharseId) {
                tracer.getCurrentSpan().logEvent("是否正在导入设备数据失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("purcharseId:" + purcharseId);
@ -110,16 +110,16 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
            }
            @Override
            public Envelop<IotDeviceImportRecordVO> uploadStream(@RequestBody String jsonData) {
            public MixEnvelop<IotDeviceImportRecordVO> uploadStream(@RequestBody String jsonData) {
                tracer.getCurrentSpan().logEvent("设备导入失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop<IotDeviceImportRecordVO> queryImportRecordPage(@RequestParam(value = "purcharseId", required = true) String purcharseId,
                                                                               @RequestParam(value = "page", required = false) Integer page,
                                                                               @RequestParam(value = "size", required = false) Integer size){
            public MixEnvelop<IotDeviceImportRecordVO> queryImportRecordPage(@RequestParam(value = "purcharseId", required = true) String purcharseId,
                                                                             @RequestParam(value = "page", required = false) Integer page,
                                                                             @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("分页查找导入记录失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("purcharseId:" + purcharseId);
                tracer.getCurrentSpan().logEvent("page:" + page);

+ 15 - 15
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceOrderFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.device;
import com.yihu.jw.fegin.iot.device.IotDeviceOrderFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceOrderVO;
import com.yihu.jw.restmodel.iot.device.IotOrderPurchaseVO;
import com.yihu.jw.restmodel.iot.device.IotOrderVO;
@ -25,14 +25,14 @@ public class IotDeviceOrderFallbackFactory implements FallbackFactory<IotDeviceO
        return new IotDeviceOrderFeign() {
            @Override
            public Envelop<IotOrderVO> create(@RequestParam(value = "jsonData", required = true) String jsonData) {
            public MixEnvelop<IotOrderVO> create(@RequestParam(value = "jsonData", required = true) String jsonData) {
                tracer.getCurrentSpan().logEvent("创建设备订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop<IotDeviceOrderVO>  findByCode(@RequestParam(value = "id", required = true) String id
            public MixEnvelop<IotDeviceOrderVO> findByCode(@RequestParam(value = "id", required = true) String id
            ) {
                tracer.getCurrentSpan().logEvent("根据id查找设备订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
@ -40,10 +40,10 @@ public class IotDeviceOrderFallbackFactory implements FallbackFactory<IotDeviceO
            }
            @Override
            public Envelop<IotDeviceOrderVO> findPage(@RequestParam(value = "name", required = false) String name,
                                                      @RequestParam(value = "type", required = false) String type,
                                                      @RequestParam(value = "page", required = false) Integer page,
                                                      @RequestParam(value = "size", required = false) Integer size){
            public MixEnvelop<IotDeviceOrderVO> findPage(@RequestParam(value = "name", required = false) String name,
                                                         @RequestParam(value = "type", required = false) String type,
                                                         @RequestParam(value = "page", required = false) Integer page,
                                                         @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("分页查找设备订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("name:" + name);
                tracer.getCurrentSpan().logEvent("type:" + type);
@ -53,30 +53,30 @@ public class IotDeviceOrderFallbackFactory implements FallbackFactory<IotDeviceO
            }
            @Override
            public Envelop<IotDeviceOrderVO> delOrder(@RequestParam(value = "id", required = true) String id) {
            public MixEnvelop<IotDeviceOrderVO> delOrder(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("删除订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public Envelop<IotOrderPurchaseVO> delPurchase(@RequestParam(value = "id", required = true) String id) {
            public MixEnvelop<IotOrderPurchaseVO> delPurchase(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("删除采购订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public Envelop<IotOrderVO> updOrder(@RequestParam(value = "jsonData", required = false)String jsonData) {
            public MixEnvelop<IotOrderVO> updOrder(@RequestParam(value = "jsonData", required = false)String jsonData) {
                tracer.getCurrentSpan().logEvent("修改订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop<IotOrderPurchaseVO> findPurcharsePage(@RequestParam(value = "orderId", required = true) String orderId,
                                                                 @RequestParam(value = "page", required = false) Integer page,
                                                                 @RequestParam(value = "size", required = false) Integer size){
            public MixEnvelop<IotOrderPurchaseVO> findPurcharsePage(@RequestParam(value = "orderId", required = true) String orderId,
                                                                    @RequestParam(value = "page", required = false) Integer page,
                                                                    @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("分页查找采购清单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("orderId:" + orderId);
                tracer.getCurrentSpan().logEvent("page:" + page);
@ -85,14 +85,14 @@ public class IotDeviceOrderFallbackFactory implements FallbackFactory<IotDeviceO
            }
            @Override
            public Envelop<IotOrderPurchaseVO>  findPurcharseById(@RequestParam(value = "id", required = true) String id) {
            public MixEnvelop<IotOrderPurchaseVO> findPurcharseById(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("根据id查找采购订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public Envelop<IotOrderPurchaseVO> findQualityPage(
            public MixEnvelop<IotOrderPurchaseVO> findQualityPage(
                    @RequestParam(value = "qualityStatus", required = false) String qualityStatus,
                    @RequestParam(value = "orderNo", required = false) String orderNo,
                    @RequestParam(value = "startTime", required = false) String startTime,

+ 7 - 7
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceQualityFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.device;
import com.yihu.jw.fegin.iot.device.IotDeviceQualityFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceQualityInspectionPlanVO;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -22,14 +22,14 @@ public class IotDeviceQualityFallbackFactory implements FallbackFactory<IotDevic
        return new IotDeviceQualityFeign() {
            @Override
            public Envelop<IotDeviceQualityInspectionPlanVO> create(@RequestParam(value = "jsonData", required = true) String jsonData) {
            public MixEnvelop<IotDeviceQualityInspectionPlanVO> create(@RequestParam(value = "jsonData", required = true) String jsonData) {
                tracer.getCurrentSpan().logEvent("创建质检计划失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop<IotDeviceQualityInspectionPlanVO> findByCode(@RequestParam(value = "id", required = true) String id
            public MixEnvelop<IotDeviceQualityInspectionPlanVO> findByCode(@RequestParam(value = "id", required = true) String id
            ) {
                tracer.getCurrentSpan().logEvent("查找质检计划失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
@ -37,7 +37,7 @@ public class IotDeviceQualityFallbackFactory implements FallbackFactory<IotDevic
            }
            @Override
            public Envelop<IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(
            public MixEnvelop<IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(
                    @RequestParam(value = "purcharseId", required = false) String purcharseId,
                    @RequestParam(value = "orderNo", required = false) String orderNo,
                    @RequestParam(value = "startTime", required = false) String startTime,
@ -55,7 +55,7 @@ public class IotDeviceQualityFallbackFactory implements FallbackFactory<IotDevic
            }
            @Override
            public Envelop<IotDeviceQualityInspectionPlanVO> delQualityPlan(
            public MixEnvelop<IotDeviceQualityInspectionPlanVO> delQualityPlan(
                    @RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("删除质检计划失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
@ -63,7 +63,7 @@ public class IotDeviceQualityFallbackFactory implements FallbackFactory<IotDevic
            }
            @Override
            public Envelop<IotDeviceQualityInspectionPlanVO> completeQualityPlan(
            public MixEnvelop<IotDeviceQualityInspectionPlanVO> completeQualityPlan(
                        @RequestParam(value = "actualTime", required = true) String actualTime,
                        @RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("完成质检计划失败:原因:" + e.getMessage());
@ -73,7 +73,7 @@ public class IotDeviceQualityFallbackFactory implements FallbackFactory<IotDevic
            }
            @Override
            public Envelop<IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(
            public MixEnvelop<IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(
                    @RequestParam(value = "actualTime", required = true) String actualTime,
                    @RequestParam(value = "purchaseId", required = true) String purchaseId) {
                tracer.getCurrentSpan().logEvent("完成质检计划(按采购id)失败:原因:" + e.getMessage());

+ 10 - 10
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotPatientDeviceFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.device;
import com.yihu.jw.fegin.iot.device.IotPatientDeviceFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceVO;
import com.yihu.jw.restmodel.iot.device.IotPatientDeviceVO;
import feign.hystrix.FallbackFactory;
@ -25,7 +25,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
        return new IotPatientDeviceFeign() {
            @Override
            public Envelop<IotPatientDeviceVO> create(
            public MixEnvelop<IotPatientDeviceVO> create(
                    @RequestParam String jsonData) {
                tracer.getCurrentSpan().logEvent("设备绑定失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
@ -33,7 +33,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<IotPatientDeviceVO> findByDeviceSnAndUserType(
            public MixEnvelop<IotPatientDeviceVO> findByDeviceSnAndUserType(
                    @RequestParam(value = "deviceSn",required = true) String deviceSn,
                    @RequestParam(value = "userType",required = true) String userType) {
                tracer.getCurrentSpan().logEvent("按sn码和按键号查找失败:原因:" + e.getMessage());
@ -43,7 +43,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<IotPatientDeviceVO> findByPatient(
            public MixEnvelop<IotPatientDeviceVO> findByPatient(
                    @RequestParam(value = "patient",required = true) String patient) {
                tracer.getCurrentSpan().logEvent("按居民code查找失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("patient:" + patient);
@ -51,7 +51,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<IotPatientDeviceVO> findByPatientAndDeviceSn(
            public MixEnvelop<IotPatientDeviceVO> findByPatientAndDeviceSn(
                    @RequestParam(value = "patient",required = true) String patient,
                    @RequestParam(value = "deviceSn",required = true) String deviceSn) {
                tracer.getCurrentSpan().logEvent("按居民和sn码查找失败:原因:" + e.getMessage());
@ -61,7 +61,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<IotDeviceVO> findListByPatient(
            public MixEnvelop<IotDeviceVO> findListByPatient(
                    @RequestParam(value = "patient", required = true) String patient,
                    @RequestParam(value = "page", required = true) Integer page,
                    @RequestParam(value = "pagesize", required = true) Integer pagesize){
@ -73,7 +73,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<IotPatientDeviceVO> findByDeviceSnAndCategoryCode(
            public MixEnvelop<IotPatientDeviceVO> findByDeviceSnAndCategoryCode(
                    @RequestParam(value = "categoryCode",required = true) String categoryCode,
                    @RequestParam(value = "deviceSn",required = true) String deviceSn) {
                tracer.getCurrentSpan().logEvent("按sn码和设备类型查找失败:原因:" + e.getMessage());
@ -83,7 +83,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<IotPatientDeviceVO> findByDeviceSnAndCategoryCodeAndUserType(
            public MixEnvelop<IotPatientDeviceVO> findByDeviceSnAndCategoryCodeAndUserType(
                    @RequestParam(value = "deviceSn",required = true) String deviceSn,
                    @RequestParam(value = "categoryCode",required = true) String categoryCode,
                    @RequestParam(value = "userType",required = true) String userType) {
@ -95,7 +95,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<IotPatientDeviceVO> updatePatientDevice(
            public MixEnvelop<IotPatientDeviceVO> updatePatientDevice(
                    @RequestParam(value = "patient",required = true) String patient,
                    @RequestParam(value = "deviceSN",required = true) String deviceSN,
                    @RequestParam(value = "newDeviceSN",required = true) String newDeviceSN,
@ -111,7 +111,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<LocationDataVO> findDeviceLocationsByIdCard(
            public MixEnvelop<LocationDataVO> findDeviceLocationsByIdCard(
                    @RequestParam(value = "jsonData",required = true) String jsonData) {
                tracer.getCurrentSpan().logEvent("查询设备地址失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);

+ 8 - 8
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/product/IotProductFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.product;
import com.yihu.jw.fegin.iot.product.IotProductFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.product.IotMaintenanceUnitVO;
import com.yihu.jw.restmodel.iot.product.IotProductBaseInfoVO;
import com.yihu.jw.restmodel.iot.product.IotProductVO;
@ -25,7 +25,7 @@ public class IotProductFallbackFactory implements FallbackFactory<IotProductFeig
        return new IotProductFeign() {
            @Override
            public Envelop<IotProductBaseInfoVO> findCompanyPage(
            public MixEnvelop<IotProductBaseInfoVO> findCompanyPage(
                    @RequestParam(value = "name", required = false) String name,
                    @RequestParam(value = "classify", required = false) String classify,
                    @RequestParam(value = "companyId", required = false) String companyId,
@ -41,7 +41,7 @@ public class IotProductFallbackFactory implements FallbackFactory<IotProductFeig
            }
            @Override
            public Envelop<IotProductBaseInfoVO> findProductPageByCompanyId(
            public MixEnvelop<IotProductBaseInfoVO> findProductPageByCompanyId(
                    @RequestParam(value = "name", required = false) String name,
                    @RequestParam(value = "companyId", required = true) String companyId,
                    @RequestParam(value = "page", required = false) Integer page,
@ -55,7 +55,7 @@ public class IotProductFallbackFactory implements FallbackFactory<IotProductFeig
            }
            @Override
            public Envelop<IotProductVO> addProduct(@RequestParam(value = "jsonData", required = false)String jsonData) {
            public MixEnvelop<IotProductVO> addProduct(@RequestParam(value = "jsonData", required = false)String jsonData) {
                tracer.getCurrentSpan().logEvent("创建产品失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
@ -63,28 +63,28 @@ public class IotProductFallbackFactory implements FallbackFactory<IotProductFeig
            @Override
            public Envelop<IotProductVO> findByCode(@RequestParam(value = "id", required = true) String id) {
            public MixEnvelop<IotProductVO> findByCode(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("根据id查找产品失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public Envelop<IotMaintenanceUnitVO> getList(@RequestParam(value = "productId", required = true) String productId){
            public MixEnvelop<IotMaintenanceUnitVO> getList(@RequestParam(value = "productId", required = true) String productId){
                tracer.getCurrentSpan().logEvent("获取维护单位失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("productId:" + productId);
                return null;
            }
            @Override
            public Envelop<IotProductVO> delCompany(@RequestParam(value = "id", required = true) String id) {
            public MixEnvelop<IotProductVO> delCompany(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("删除产品失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public Envelop<IotProductVO> updCompany(@RequestParam(value = "jsonData", required = false)String jsonData) {
            public MixEnvelop<IotProductVO> updCompany(@RequestParam(value = "jsonData", required = false)String jsonData) {
                tracer.getCurrentSpan().logEvent("修改产品信息失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;

+ 7 - 7
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementFeignFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.agreement;
import com.yihu.jw.fegin.wlyy.agreement.WlyyAgreementFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
@ -17,32 +17,32 @@ public class WlyyAgreementFeignFallbackFactory implements FallbackFactory<WlyyAg
    public WlyyAgreementFeign create(Throwable throwable) {
        return new WlyyAgreementFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData) {
            public MixEnvelop create(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public Envelop update(@RequestBody String jsonData) {
            public MixEnvelop update(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public Envelop delete(@RequestParam(value = "code") String code) {
            public MixEnvelop delete(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public Envelop findByCode(@RequestParam(value = "code") String code) {
            public MixEnvelop findByCode(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public Envelop queryPage(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts, @RequestParam(value = "size", required = false) int size, @RequestParam(value = "page", required = false) int page) {
            public MixEnvelop queryPage(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts, @RequestParam(value = "size", required = false) int size, @RequestParam(value = "page", required = false) int page) {
                return null;
            }
            @Override
            public Envelop getList(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) {
            public MixEnvelop getList(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) {
                return null;
            }
        };

+ 7 - 7
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementKpiFeignFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.agreement;
import com.yihu.jw.fegin.wlyy.agreement.WlyyAgreementKpiFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
@ -15,32 +15,32 @@ public class WlyyAgreementKpiFeignFallbackFactory implements FallbackFactory<Wly
    public WlyyAgreementKpiFeign create(Throwable throwable) {
        return new WlyyAgreementKpiFeign() {
            @Override
            public Envelop create(String jsonData) {
            public MixEnvelop create(String jsonData) {
                return null;
            }
            @Override
            public Envelop update(String jsonData) {
            public MixEnvelop update(String jsonData) {
                return null;
            }
            @Override
            public Envelop delete(String code) {
            public MixEnvelop delete(String code) {
                return null;
            }
            @Override
            public Envelop findByCode(String code) {
            public MixEnvelop findByCode(String code) {
                return null;
            }
            @Override
            public Envelop queryPage(String fields, String filters, String sorts, int size, int page) {
            public MixEnvelop queryPage(String fields, String filters, String sorts, int size, int page) {
                return null;
            }
            @Override
            public Envelop getList(String fields, String filters, String sorts) {
            public MixEnvelop getList(String fields, String filters, String sorts) {
                return null;
            }
        };

+ 5 - 5
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementKpiLogFeignFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.agreement;
import com.yihu.jw.fegin.wlyy.agreement.WlyyAgreementKpiLogFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
@ -15,22 +15,22 @@ public class WlyyAgreementKpiLogFeignFallbackFactory implements FallbackFactory<
    public WlyyAgreementKpiLogFeign create(Throwable throwable) {
        return new WlyyAgreementKpiLogFeign() {
            @Override
            public Envelop create(String jsonData) {
            public MixEnvelop create(String jsonData) {
                return null;
            }
            @Override
            public Envelop findByCode(String code) {
            public MixEnvelop findByCode(String code) {
                return null;
            }
            @Override
            public Envelop queryPage(String fields, String filters, String sorts, int size, int page) {
            public MixEnvelop queryPage(String fields, String filters, String sorts, int size, int page) {
                return null;
            }
            @Override
            public Envelop getList(String fields, String filters, String sorts) {
            public MixEnvelop getList(String fields, String filters, String sorts) {
                return null;
            }
        };

+ 6 - 6
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyySignFamilyFeignFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.agreement;
import com.yihu.jw.fegin.wlyy.agreement.WlyySignFamilyFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
@ -17,27 +17,27 @@ public class WlyySignFamilyFeignFallbackFactory implements FallbackFactory<WlyyS
    public WlyySignFamilyFeign create(Throwable throwable) {
        return new WlyySignFamilyFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData) {
            public MixEnvelop create(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public Envelop update(@RequestBody String jsonData) {
            public MixEnvelop update(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public Envelop findByCode(@RequestParam(value = "code") String code) {
            public MixEnvelop findByCode(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public Envelop queryPage(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts, @RequestParam(value = "size", required = false) int size, @RequestParam(value = "page", required = false) int page) {
            public MixEnvelop queryPage(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts, @RequestParam(value = "size", required = false) int size, @RequestParam(value = "page", required = false) int page) {
                return null;
            }
            @Override
            public Envelop getList(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) {
            public MixEnvelop getList(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) {
                return null;
            }
        };

+ 9 - 9
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/patient/AdvertisementFeignFallbackFactory.java

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.patient;
import com.yihu.jw.fegin.wlyy.patient.AdvertisementFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
@ -18,42 +18,42 @@ public class AdvertisementFeignFallbackFactory implements FallbackFactory<Advert
    public AdvertisementFeign create(Throwable throwable) {
        return new AdvertisementFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData) {
            public MixEnvelop create(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public Envelop update(@RequestBody String jsonData) {
            public MixEnvelop update(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public Envelop delete(@RequestParam(value = "code") String code) {
            public MixEnvelop delete(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public Envelop findByCode(@RequestParam(value = "code") String code) {
            public MixEnvelop findByCode(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public Envelop queryPage(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts, @RequestParam(value = "size", required = false) int size, @RequestParam(value = "page", required = false) int page) {
            public MixEnvelop queryPage(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts, @RequestParam(value = "size", required = false) int size, @RequestParam(value = "page", required = false) int page) {
                return null;
            }
            @Override
            public Envelop getList(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) {
            public MixEnvelop getList(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) {
                return null;
            }
            @Override
            public Envelop getListByPatientCode(@RequestParam(value = "patientCode") String patientCode) {
            public MixEnvelop getListByPatientCode(@RequestParam(value = "patientCode") String patientCode) {
                return null;
            }
            @Override
            public Envelop getListByIp(@RequestParam(value = "ipAddress") String ipAddress) {
            public MixEnvelop getListByIp(@RequestParam(value = "ipAddress") String ipAddress) {
                return null;
            }

+ 5 - 5
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/common/IotFileUploadFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.iot.common;
import com.yihu.jw.fegin.fallbackfactory.iot.common.IotFileUploadFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.common.UploadVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
@ -23,16 +23,16 @@ import org.springframework.web.multipart.MultipartFile;
public interface IotFileUploadFeign {
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream_img)
    public Envelop<UploadVO> uploadImg(@RequestParam(value = "file", required = true) MultipartFile file);
    public MixEnvelop<UploadVO> uploadImg(@RequestParam(value = "file", required = true) MultipartFile file);
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream_attachment)
    public Envelop<UploadVO> uploadAttachment(@RequestParam(value = "file", required = true) MultipartFile file);
    public MixEnvelop<UploadVO> uploadAttachment(@RequestParam(value = "file", required = true) MultipartFile file);
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream)
    public Envelop<UploadVO> uploadStream(@RequestParam(value = "file", required = true) MultipartFile file);
    public MixEnvelop<UploadVO> uploadStream(@RequestParam(value = "file", required = true) MultipartFile file);
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_string)
    public Envelop<UploadVO> uploadImages(@RequestBody String jsonData) throws Exception;
    public MixEnvelop<UploadVO> uploadImages(@RequestBody String jsonData) throws Exception;
}

+ 2 - 2
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/common/IotSystemDictFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.iot.common;
import com.yihu.jw.fegin.fallbackfactory.iot.common.IotSystemDictFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.dict.IotSystemDictVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
@ -22,6 +22,6 @@ public interface IotSystemDictFeign {
    @GetMapping(value = IotRequestMapping.System.findDictByCode)
    public Envelop<IotSystemDictVO> getList(@RequestParam(value = "dictName", required = true) String dictName) throws Exception ;
    public MixEnvelop<IotSystemDictVO> getList(@RequestParam(value = "dictName", required = true) String dictName) throws Exception ;
}

+ 12 - 12
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/company/IotCompanyFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.iot.company;
import com.yihu.jw.fegin.fallbackfactory.iot.company.IotCompanyFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.company.IotCompanyCertificateVO;
import com.yihu.jw.restmodel.iot.company.IotCompanyVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
@ -24,7 +24,7 @@ public interface IotCompanyFeign {
    @GetMapping(value = IotRequestMapping.Company.findCompanyPage)
    public Envelop<IotCompanyVO> findCompanyPage(
    public MixEnvelop<IotCompanyVO> findCompanyPage(
                                       @RequestParam(value = "name", required = false) String name,
                                       @RequestParam(value = "status", required = false) String status,
                                       @RequestParam(value = "type", required = false) String type,
@ -32,36 +32,36 @@ public interface IotCompanyFeign {
                                       @RequestParam(value = "size", required = false) Integer size);
    @PostMapping(value = IotRequestMapping.Company.addCompany)
    public Envelop<IotCompanyVO> addCompany(@RequestParam(value = "jsonData", required = true)String jsonData);
    public MixEnvelop<IotCompanyVO> addCompany(@RequestParam(value = "jsonData", required = true)String jsonData);
    @GetMapping(value = IotRequestMapping.Company.findCompanyById)
    public Envelop<IotCompanyVO> findByCode(@RequestParam(value = "id", required = true) String id);
    public MixEnvelop<IotCompanyVO> findByCode(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.Company.findByBusinessLicense)
    public Envelop<IotCompanyVO> findByBusinessLicense(@RequestParam(value = "businessLicense", required = true) String businessLicense);
    public MixEnvelop<IotCompanyVO> findByBusinessLicense(@RequestParam(value = "businessLicense", required = true) String businessLicense);
    @PostMapping(value = IotRequestMapping.Company.delCompany)
    public Envelop<IotCompanyVO> delCompany(@RequestParam(value = "id", required = true) String id);
    public MixEnvelop<IotCompanyVO> delCompany(@RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.Company.updCompany)
    public Envelop<IotCompanyVO> updCompany(@RequestParam(value = "jsonData", required = true)String jsonData);
    public MixEnvelop<IotCompanyVO> updCompany(@RequestParam(value = "jsonData", required = true)String jsonData);
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertPage)
    public Envelop<IotCompanyCertificateVO> findCompanyCertPage
    public MixEnvelop<IotCompanyCertificateVO> findCompanyCertPage
            (@RequestParam(value = "name", required = false) String name,
             @RequestParam(value = "companyId", required = false) String companyId,
             @RequestParam(value = "page", required = false) Integer page,
             @RequestParam(value = "size", required = false) Integer size);
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertById)
    public Envelop<IotCompanyCertificateVO> findCompanyCertById(@RequestParam(value = "id", required = true) String id);
    public MixEnvelop<IotCompanyCertificateVO> findCompanyCertById(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertByCompanyId)
    public Envelop<IotCompanyCertificateVO> findCompanyCertByCompanyId(@RequestParam(value = "companyId", required = true) String companyId);
    public MixEnvelop<IotCompanyCertificateVO> findCompanyCertByCompanyId(@RequestParam(value = "companyId", required = true) String companyId);
    @PostMapping(value = IotRequestMapping.Company.addCompanyCert)
    public Envelop<IotCompanyCertificateVO> addCompanyCert(@RequestParam(value = "jsonData", required = true)String jsonData);
    public MixEnvelop<IotCompanyCertificateVO> addCompanyCert(@RequestParam(value = "jsonData", required = true)String jsonData);
    @PostMapping(value = IotRequestMapping.Company.delCompanyCert)
    public Envelop<IotCompanyCertificateVO> delCompanyCert(@RequestParam(value = "id", required = true)String id);
    public MixEnvelop<IotCompanyCertificateVO> delCompanyCert(@RequestParam(value = "id", required = true)String id);
}

+ 4 - 4
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataInputFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.iot.data_input;
import com.yihu.jw.fegin.fallbackfactory.iot.data_input.DataInputFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.DataRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -18,12 +18,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
public interface DataInputFeign {
    @PostMapping(value = DataRequestMapping.DataInput.api_user_bind, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop bindUser(@RequestBody String jsonData);
    MixEnvelop bindUser(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataInput.api_data_input, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop uploadData(@RequestBody String jsonData);
    MixEnvelop uploadData(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataInput.api_weRunData_input, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop uploadWeRunData(@RequestBody String jsonData);
    MixEnvelop uploadWeRunData(@RequestBody String jsonData);
}

+ 11 - 11
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataSearchFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.iot.data_input;
import com.yihu.jw.fegin.fallbackfactory.iot.data_input.DataSearchFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.DataRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -18,33 +18,33 @@ import org.springframework.web.bind.annotation.RequestMapping;
public interface DataSearchFeign {
    @PostMapping(value = DataRequestMapping.DataSearch.api_data_search_one, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public Envelop getOne(@RequestBody String jsonData);
    public MixEnvelop getOne(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_search_list, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public Envelop getList( @RequestBody String jsonData);
    public MixEnvelop getList(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_search_list_page, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public Envelop getListPage( @RequestBody String jsonData);
    public MixEnvelop getListPage(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_search_recent5, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public Envelop getRecent5ByTypeAndTime( @RequestBody String jsonData);
    public MixEnvelop getRecent5ByTypeAndTime(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_abnormal_times_a_week, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public Envelop getAbnormalTimesAWeek(@RequestBody String jsonData);
    public MixEnvelop getAbnormalTimesAWeek(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_search_recent1, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public Envelop getRecent1ByCodeAndDel(@RequestBody String jsonData);
    public MixEnvelop getRecent1ByCodeAndDel(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_search_list_code_del, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public Envelop getListByCodeAndDel( @RequestBody String jsonData);
    public MixEnvelop getListByCodeAndDel(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_delete, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public Envelop delete( @RequestBody String jsonData);
    public MixEnvelop delete(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public Envelop update( @RequestBody String jsonData);
    public MixEnvelop update(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_search_werun_datas, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public Envelop getWeRunDataListById( @RequestBody String jsonData);
    public MixEnvelop getWeRunDataListById(@RequestBody String jsonData);
}

+ 2 - 2
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataStandardConvertFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.iot.data_input;
import com.yihu.jw.fegin.fallbackfactory.iot.data_input.DataStandardConvertFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.DataRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -18,5 +18,5 @@ import org.springframework.web.bind.annotation.RequestMapping;
public interface DataStandardConvertFeign {
    @PostMapping(value = DataRequestMapping.DataStandardConvert.api_convert, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop convert(@RequestBody String jsonData);
    MixEnvelop convert(@RequestBody String jsonData);
}

+ 14 - 14
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceFeign.java

@ -2,8 +2,8 @@ package com.yihu.jw.fegin.iot.device;
import com.yihu.jw.fegin.fallbackfactory.iot.device.IotDeviceFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.iot.common.ExistVO;
import com.yihu.jw.restmodel.iot.device.IotDeviceImportRecordVO;
import com.yihu.jw.restmodel.iot.device.IotDeviceVO;
@ -22,23 +22,23 @@ import org.springframework.web.bind.annotation.*;
public interface IotDeviceFeign{
    @PostMapping(value = IotRequestMapping.Device.api_create)
    Envelop<IotDeviceVO> create(@RequestParam(value = "jsonData", required = true) String jsonData);
    MixEnvelop<IotDeviceVO> create(@RequestParam(value = "jsonData", required = true) String jsonData);
    @GetMapping(value = IotRequestMapping.Device.api_getById)
    Envelop<IotDeviceVO> findByCode(@RequestParam(value = "id", required = true) String id);
    MixEnvelop<IotDeviceVO> findByCode(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.Device.isSnExist)
    Envelop<ExistVO> isSnExist(@RequestParam(value = "sn", required = true) String sn);
    MixEnvelop<ExistVO> isSnExist(@RequestParam(value = "sn", required = true) String sn);
    @GetMapping(value = IotRequestMapping.Device.isSimExist)
    Envelop<ExistVO> isSimExist(@RequestParam(value = "sim", required = true) String sim);
    MixEnvelop<ExistVO> isSimExist(@RequestParam(value = "sim", required = true) String sim);
    @PostMapping(value = IotRequestMapping.Device.updSim)
    BaseEnvelop updSim(@RequestParam(value = "sim", required = true) String sim,
                             @RequestParam(value = "id", required = true) String id);
    Envelop updSim(@RequestParam(value = "sim", required = true) String sim,
                   @RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.Device.api_queryPage)
    Envelop<IotDeviceVO> findProductPageByCompanyId(
    MixEnvelop<IotDeviceVO> findProductPageByCompanyId(
            @RequestParam(value = "sn", required = false) String sn,
            @RequestParam(value = "hospital", required = false) String hospital,
            @RequestParam(value = "orderId", required = false) String orderId,
@ -48,20 +48,20 @@ public interface IotDeviceFeign{
            @RequestParam(value = "size", required = false) Integer size);
    @GetMapping(value = IotRequestMapping.Device.isImportDevice)
    Envelop<ExistVO> isImportDevice(@RequestParam(value = "purcharseId", required = true) String purcharseId);
    MixEnvelop<ExistVO> isImportDevice(@RequestParam(value = "purcharseId", required = true) String purcharseId);
    @PostMapping(value = IotRequestMapping.Device.importDevice)
    Envelop<IotDeviceImportRecordVO> uploadStream(@RequestBody String jsonData);
    MixEnvelop<IotDeviceImportRecordVO> uploadStream(@RequestBody String jsonData);
    @GetMapping(value = IotRequestMapping.Device.queryImportRecordPage)
    Envelop<IotDeviceImportRecordVO> queryImportRecordPage(
    MixEnvelop<IotDeviceImportRecordVO> queryImportRecordPage(
           @RequestParam(value = "purcharseId", required = true) String purcharseId,
           @RequestParam(value = "page", required = false) Integer page,
           @RequestParam(value = "size", required = false) Integer size);
    @PostMapping(value = IotRequestMapping.Device.api_delete)
    Envelop<IotDeviceVO> delDevice(@RequestParam(value = "id", required = true) String id);
    MixEnvelop<IotDeviceVO> delDevice(@RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.Device.api_update)
    BaseEnvelop updDevice(@RequestParam(value = "jsonData", required = true) String jsonData);
    Envelop updDevice(@RequestParam(value = "jsonData", required = true) String jsonData);
}

+ 10 - 10
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceOrderFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.iot.device;
import com.yihu.jw.fegin.fallbackfactory.iot.device.IotDeviceOrderFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceOrderVO;
import com.yihu.jw.restmodel.iot.device.IotOrderPurchaseVO;
import com.yihu.jw.restmodel.iot.device.IotOrderVO;
@ -24,38 +24,38 @@ import org.springframework.web.bind.annotation.RequestParam;
public interface IotDeviceOrderFeign {
    @PostMapping(value = IotRequestMapping.DeviceOrder.createOrder)
    Envelop<IotOrderVO> create(@RequestParam(value = "jsonData", required = true) String jsonData);
    MixEnvelop<IotOrderVO> create(@RequestParam(value = "jsonData", required = true) String jsonData);
    @GetMapping(value = IotRequestMapping.DeviceOrder.findById)
    Envelop<IotDeviceOrderVO> findByCode(@RequestParam(value = "id", required = true) String id);
    MixEnvelop<IotDeviceOrderVO> findByCode(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.DeviceOrder.findPage)
    Envelop<IotDeviceOrderVO> findPage(
    MixEnvelop<IotDeviceOrderVO> findPage(
            @RequestParam(value = "name", required = false) String name,
            @RequestParam(value = "type", required = false) String type,
            @RequestParam(value = "page", required = false) Integer page,
            @RequestParam(value = "size", required = false) Integer size);
    @PostMapping(value = IotRequestMapping.DeviceOrder.delOrder)
    Envelop<IotDeviceOrderVO> delOrder(@RequestParam(value = "id", required = true) String id);
    MixEnvelop<IotDeviceOrderVO> delOrder(@RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.DeviceOrder.delPurchase)
    Envelop<IotOrderPurchaseVO> delPurchase(@RequestParam(value = "id", required = true) String id);
    MixEnvelop<IotOrderPurchaseVO> delPurchase(@RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.DeviceOrder.updOrder)
    Envelop<IotOrderVO> updOrder(@RequestParam(value = "jsonData", required = false)String jsonData);
    MixEnvelop<IotOrderVO> updOrder(@RequestParam(value = "jsonData", required = false)String jsonData);
    @GetMapping(value = IotRequestMapping.DeviceOrder.findPurcharsePage)
    Envelop<IotOrderPurchaseVO> findPurcharsePage(
    MixEnvelop<IotOrderPurchaseVO> findPurcharsePage(
            @RequestParam(value = "orderId", required = true) String orderId,
            @RequestParam(value = "page", required = false) Integer page,
            @RequestParam(value = "size", required = false) Integer size);
    @GetMapping(value = IotRequestMapping.DeviceOrder.findPurcharseById)
    Envelop<IotOrderPurchaseVO>  findPurcharseById(@RequestParam(value = "id", required = true) String id);
    MixEnvelop<IotOrderPurchaseVO> findPurcharseById(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.DeviceOrder.findQualityPage)
    Envelop<IotOrderPurchaseVO> findQualityPage(
    MixEnvelop<IotOrderPurchaseVO> findQualityPage(
            @RequestParam(value = "qualityStatus", required = false) String qualityStatus,
            @RequestParam(value = "orderNo", required = false) String orderNo,
            @RequestParam(value = "startTime", required = false) String startTime,

+ 7 - 7
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceQualityFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.iot.device;
import com.yihu.jw.fegin.fallbackfactory.iot.device.IotDeviceQualityFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceQualityInspectionPlanVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
@ -22,13 +22,13 @@ import org.springframework.web.bind.annotation.RequestParam;
public interface IotDeviceQualityFeign{
    @PostMapping(value = IotRequestMapping.DeviceQuality.addQualityPlan)
    Envelop<IotDeviceQualityInspectionPlanVO> create(@RequestParam(value = "jsonData", required = true) String jsonData);
    MixEnvelop<IotDeviceQualityInspectionPlanVO> create(@RequestParam(value = "jsonData", required = true) String jsonData);
    @GetMapping(value = IotRequestMapping.DeviceQuality.findById)
    Envelop<IotDeviceQualityInspectionPlanVO> findByCode(@RequestParam(value = "id", required = true) String id);
    MixEnvelop<IotDeviceQualityInspectionPlanVO> findByCode(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.DeviceQuality.queryQualityPlanPage)
    Envelop<IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(
    MixEnvelop<IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(
           @RequestParam(value = "purcharseId", required = false) String purcharseId,
           @RequestParam(value = "orderNo", required = false) String orderNo,
           @RequestParam(value = "startTime", required = false) String startTime,
@ -37,16 +37,16 @@ public interface IotDeviceQualityFeign{
           @RequestParam(value = "size", required = false) Integer size);
    @PostMapping(value = IotRequestMapping.DeviceQuality.delQualityPlan)
    Envelop<IotDeviceQualityInspectionPlanVO> delQualityPlan(@RequestParam(value = "id", required = true) String id);
    MixEnvelop<IotDeviceQualityInspectionPlanVO> delQualityPlan(@RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.DeviceQuality.completeQualityPlan)
    Envelop<IotDeviceQualityInspectionPlanVO> completeQualityPlan(
    MixEnvelop<IotDeviceQualityInspectionPlanVO> completeQualityPlan(
        @RequestParam(value = "actualTime", required = true) String actualTime,
        @RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.DeviceQuality.completePlanByPurchaseId)
    Envelop<IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(
    MixEnvelop<IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(
            @RequestParam(value = "actualTime", required = true) String actualTime,
            @RequestParam(value = "purchaseId", required = true) String purchaseId);
}

+ 10 - 10
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotPatientDeviceFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.iot.device;
import com.yihu.jw.fegin.fallbackfactory.iot.device.IotPatientDeviceFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceVO;
import com.yihu.jw.restmodel.iot.device.IotPatientDeviceVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
@ -24,41 +24,41 @@ import org.springframework.web.bind.annotation.RequestParam;
public interface IotPatientDeviceFeign{
    @PostMapping(value = IotRequestMapping.PatientDevice.addPatientDevice)
    Envelop<IotPatientDeviceVO> create(@RequestParam(value = "jsonData", required = true) String jsonData);
    MixEnvelop<IotPatientDeviceVO> create(@RequestParam(value = "jsonData", required = true) String jsonData);
    @GetMapping(value = IotRequestMapping.PatientDevice.findByDeviceSnAndUserType)
    Envelop<IotPatientDeviceVO> findByDeviceSnAndUserType(
    MixEnvelop<IotPatientDeviceVO> findByDeviceSnAndUserType(
            @RequestParam(value = "deviceSn",required = true) String deviceSn,
            @RequestParam(value = "userType",required = true) String userType);
    @GetMapping(value = IotRequestMapping.PatientDevice.findByPatient)
    Envelop<IotPatientDeviceVO> findByPatient(
    MixEnvelop<IotPatientDeviceVO> findByPatient(
            @RequestParam(value = "patient",required = true) String patient);
    @GetMapping(value = IotRequestMapping.PatientDevice.findByPatientAndDeviceSn)
    Envelop<IotPatientDeviceVO> findByPatientAndDeviceSn(
    MixEnvelop<IotPatientDeviceVO> findByPatientAndDeviceSn(
            @RequestParam(value = "patient",required = true) String patient,
            @RequestParam(value = "deviceSn",required = true) String deviceSn);
    @GetMapping(value = IotRequestMapping.PatientDevice.findListByPatient)
    Envelop<IotDeviceVO> findListByPatient(
    MixEnvelop<IotDeviceVO> findListByPatient(
            @RequestParam(value = "patient", required = true) String patient,
            @RequestParam(value = "page", required = true) Integer page,
            @RequestParam(value = "pagesize", required = true) Integer pagesize);
    @GetMapping(value = IotRequestMapping.PatientDevice.findByDeviceSnAndCategoryCode)
    Envelop<IotPatientDeviceVO> findByDeviceSnAndCategoryCode(
    MixEnvelop<IotPatientDeviceVO> findByDeviceSnAndCategoryCode(
            @RequestParam(value = "categoryCode",required = true) String categoryCode,
            @RequestParam(value = "deviceSn",required = true) String deviceSn);
    @GetMapping(value = IotRequestMapping.PatientDevice.findByDeviceSnAndCategoryCodeAndUserType)
    Envelop<IotPatientDeviceVO> findByDeviceSnAndCategoryCodeAndUserType(
    MixEnvelop<IotPatientDeviceVO> findByDeviceSnAndCategoryCodeAndUserType(
            @RequestParam(value = "deviceSn",required = true) String deviceSn,
            @RequestParam(value = "categoryCode",required = true) String categoryCode,
           @RequestParam(value = "userType",required = true) String userType);
    @PostMapping(value = IotRequestMapping.PatientDevice.updatePatientDevice)
    Envelop<IotPatientDeviceVO> updatePatientDevice(
    MixEnvelop<IotPatientDeviceVO> updatePatientDevice(
            @RequestParam(value = "patient",required = true) String patient,
            @RequestParam(value = "deviceSN",required = true) String deviceSN,
            @RequestParam(value = "newDeviceSN",required = true) String newDeviceSN,
@ -66,5 +66,5 @@ public interface IotPatientDeviceFeign{
            @RequestParam(value = "sim",required = true) String sim);
    @GetMapping(value = IotRequestMapping.PatientDevice.findLocationByIdCard)
    public Envelop<LocationDataVO> findDeviceLocationsByIdCard(@RequestParam(value = "jsonData",required = true) String jsonData);
    public MixEnvelop<LocationDataVO> findDeviceLocationsByIdCard(@RequestParam(value = "jsonData",required = true) String jsonData);
}

+ 8 - 8
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/product/IotProductFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.iot.product;
import com.yihu.jw.fegin.fallbackfactory.iot.product.IotProductFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.product.IotMaintenanceUnitVO;
import com.yihu.jw.restmodel.iot.product.IotProductBaseInfoVO;
import com.yihu.jw.restmodel.iot.product.IotProductVO;
@ -24,7 +24,7 @@ import org.springframework.web.bind.annotation.RequestParam;
public interface IotProductFeign{
    @GetMapping(value = IotRequestMapping.Product.findProductPage)
    public Envelop<IotProductBaseInfoVO> findCompanyPage(
    public MixEnvelop<IotProductBaseInfoVO> findCompanyPage(
            @RequestParam(value = "name", required = false) String name,
            @RequestParam(value = "classify", required = false) String classify,
            @RequestParam(value = "companyId", required = false) String companyId,
@ -32,26 +32,26 @@ public interface IotProductFeign{
            @RequestParam(value = "size", required = false) Integer size);
    @GetMapping(value = IotRequestMapping.Product.findProductPageByCompanyId)
    public Envelop<IotProductBaseInfoVO> findProductPageByCompanyId(
    public MixEnvelop<IotProductBaseInfoVO> findProductPageByCompanyId(
            @RequestParam(value = "name", required = false) String name,
            @RequestParam(value = "companyId", required = true) String companyId,
            @RequestParam(value = "page", required = false) Integer page,
            @RequestParam(value = "size", required = false) Integer size);
    @PostMapping(value = IotRequestMapping.Product.addProduct)
    public Envelop<IotProductVO> addProduct(@RequestParam(value = "jsonData", required = false)String jsonData);
    public MixEnvelop<IotProductVO> addProduct(@RequestParam(value = "jsonData", required = false)String jsonData);
    @GetMapping(value = IotRequestMapping.Product.findProductById)
    public Envelop<IotProductVO> findByCode(@RequestParam(value = "id", required = true) String id);
    public MixEnvelop<IotProductVO> findByCode(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.Product.maintenanceUnitById)
    public Envelop<IotMaintenanceUnitVO> getList(@RequestParam(value = "productId", required = true) String productId);
    public MixEnvelop<IotMaintenanceUnitVO> getList(@RequestParam(value = "productId", required = true) String productId);
    @PostMapping(value = IotRequestMapping.Product.delProduct)
    public Envelop<IotProductVO> delCompany(@RequestParam(value = "id", required = true) String id);
    public MixEnvelop<IotProductVO> delCompany(@RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.Product.updProduct)
    public Envelop<IotProductVO> updCompany(@RequestParam(value = "jsonData", required = false)String jsonData);
    public MixEnvelop<IotProductVO> updCompany(@RequestParam(value = "jsonData", required = false)String jsonData);
}

+ 7 - 7
common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyyAgreementFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -17,19 +17,19 @@ import org.springframework.web.bind.annotation.*;
public interface WlyyAgreementFeign {
    @PostMapping(value = WlyyRequestMapping.Agreement.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop create(@RequestBody String jsonData);
    MixEnvelop create(@RequestBody String jsonData);
    @PutMapping(value = WlyyRequestMapping.Agreement.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop update(@RequestBody String jsonData);
    MixEnvelop update(@RequestBody String jsonData);
    @DeleteMapping(value = WlyyRequestMapping.Agreement.api_delete)
    Envelop delete( @RequestParam(value = "id") String id);
    MixEnvelop delete(@RequestParam(value = "id") String id);
    @RequestMapping(value= WlyyRequestMapping.Agreement.api_getById,method = RequestMethod.GET)
    Envelop findByCode( @RequestParam(value = "id" ) String id);
    MixEnvelop findByCode(@RequestParam(value = "id" ) String id);
    @RequestMapping(value = WlyyRequestMapping.Agreement.api_queryPage, method = RequestMethod.GET)
    Envelop queryPage(
    MixEnvelop queryPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -37,7 +37,7 @@ public interface WlyyAgreementFeign {
            @RequestParam(value = "page", required = false) int page);
    @GetMapping(value = WlyyRequestMapping.Agreement.api_getList)
    Envelop getList(
    MixEnvelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts);

+ 7 - 7
common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementKpiFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyyAgreementKpiFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -17,19 +17,19 @@ import org.springframework.web.bind.annotation.*;
public interface WlyyAgreementKpiFeign {
    @PostMapping(value = WlyyRequestMapping.AgreementKpi.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop create(@RequestBody String jsonData);
    MixEnvelop create(@RequestBody String jsonData);
    @PutMapping(value = WlyyRequestMapping.AgreementKpi.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop update(@RequestBody String jsonData);
    MixEnvelop update(@RequestBody String jsonData);
    @DeleteMapping(value = WlyyRequestMapping.AgreementKpi.api_delete)
    Envelop delete(@RequestParam(value = "id" ) String id);
    MixEnvelop delete(@RequestParam(value = "id" ) String id);
    @GetMapping(value = WlyyRequestMapping.AgreementKpi.api_getById)
    Envelop findByCode(@RequestParam(value = "id" ) String id);
    MixEnvelop findByCode(@RequestParam(value = "id" ) String id);
    @RequestMapping(value = WlyyRequestMapping.AgreementKpi.api_queryPage, method = RequestMethod.GET)
    Envelop queryPage(
    MixEnvelop queryPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -37,7 +37,7 @@ public interface WlyyAgreementKpiFeign {
            @RequestParam(value = "page", required = false) int page);
    @GetMapping(value = WlyyRequestMapping.AgreementKpi.api_getList)
    Envelop getList(
    MixEnvelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts);

+ 5 - 5
common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementKpiLogFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyyAgreementKpiLogFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;
@ -16,13 +16,13 @@ import org.springframework.web.bind.annotation.*;
public interface WlyyAgreementKpiLogFeign {
    @PostMapping(value = WlyyRequestMapping.AgreementKpiLog.api_create)
    Envelop create(@RequestBody String jsonData);
    MixEnvelop create(@RequestBody String jsonData);
    @GetMapping(value = WlyyRequestMapping.AgreementKpiLog.api_getById)
    Envelop findByCode(@RequestParam(value = "id")String id);
    MixEnvelop findByCode(@RequestParam(value = "id")String id);
    @RequestMapping(value = WlyyRequestMapping.AgreementKpiLog.api_queryPage, method = RequestMethod.GET)
    Envelop queryPage(
    MixEnvelop queryPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -30,7 +30,7 @@ public interface WlyyAgreementKpiLogFeign {
            @RequestParam(value = "page", required = false) int page);
    @GetMapping(value = WlyyRequestMapping.AgreementKpiLog.api_getList)
    Envelop getList(
    MixEnvelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts);

+ 6 - 6
common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyySignFamilyFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyySignFamilyFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -17,16 +17,16 @@ import org.springframework.web.bind.annotation.*;
public interface WlyySignFamilyFeign {
    @PostMapping(value = WlyyRequestMapping.SignFamily.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop create(@RequestBody String jsonData);
    MixEnvelop create(@RequestBody String jsonData);
    @PutMapping(value = WlyyRequestMapping.SignFamily.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop update(@RequestBody String jsonData);
    MixEnvelop update(@RequestBody String jsonData);
    @RequestMapping(value= WlyyRequestMapping.SignFamily.api_getById,method = RequestMethod.GET)
    Envelop findByCode(@RequestParam(value = "id") String id);
    MixEnvelop findByCode(@RequestParam(value = "id") String id);
    @RequestMapping(value = WlyyRequestMapping.SignFamily.api_queryPage, method = RequestMethod.GET)
    Envelop queryPage(
    MixEnvelop queryPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -34,7 +34,7 @@ public interface WlyySignFamilyFeign {
            @RequestParam(value = "page", required = false) int page);
    @GetMapping(value = WlyyRequestMapping.SignFamily.api_getList)
    Envelop getList(
    MixEnvelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts);

+ 9 - 9
common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/patient/AdvertisementFeign.java

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.wlyy.patient;
import com.yihu.jw.fegin.fallbackfactory.wlyy.patient.AdvertisementFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
@ -19,19 +19,19 @@ import org.springframework.web.bind.annotation.*;
public interface AdvertisementFeign {
    @PostMapping(value = WlyyRequestMapping.Advertisement.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop create(@RequestBody String jsonData);
    MixEnvelop create(@RequestBody String jsonData);
    @PutMapping(value = WlyyRequestMapping.Advertisement.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop update(@RequestBody String jsonData);
    MixEnvelop update(@RequestBody String jsonData);
    @DeleteMapping(value = WlyyRequestMapping.Advertisement.api_delete)
    Envelop delete( @RequestParam(value = "id") String id);
    MixEnvelop delete(@RequestParam(value = "id") String id);
    @RequestMapping(value= WlyyRequestMapping.Advertisement.api_getById,method = RequestMethod.GET)
    Envelop findByCode( @RequestParam(value = "id" ) String id);
    MixEnvelop findByCode(@RequestParam(value = "id" ) String id);
    @RequestMapping(value = WlyyRequestMapping.Advertisement.api_queryPage, method = RequestMethod.GET)
    Envelop queryPage(
    MixEnvelop queryPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -39,15 +39,15 @@ public interface AdvertisementFeign {
            @RequestParam(value = "page", required = false) int page);
    @GetMapping(value = WlyyRequestMapping.Advertisement.api_getList)
    Envelop getList(
    MixEnvelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts);
    @GetMapping(value= WlyyRequestMapping.Advertisement.api_getListByPatientId)
    Envelop getListByPatientCode(@RequestParam(value="patientId")String patientId);
    MixEnvelop getListByPatientCode(@RequestParam(value="patientId")String patientId);
    @GetMapping(value= WlyyRequestMapping.Advertisement.api_getListByIp)
    Envelop getListByIp(@RequestParam(value="ipAddress") String ipAddress);
    MixEnvelop getListByIp(@RequestParam(value="ipAddress") String ipAddress);
}

+ 12 - 76
common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java

@ -35,6 +35,13 @@ public class BaseRequestMapping {
        public static final String PREFIX  = "/module";
    }
    /**
     * 功能
     */
    public static class Function extends Basic {
        public static final String PREFIX  = "/function";
    }
    /**
     * 主题
     */
@ -50,29 +57,11 @@ public class BaseRequestMapping {
        public static final String PREFIX  = "/system_dict";
    }
    //功能模块常量
    public static class Function{
        public static final String message_success_create="function create success";
        public static final String message_success_update="function update success";
        public static final String message_success_find="function find success";
        public static final String message_success_find_functions="functions find success";
        public static final String message_success_delete="function delete success";
        public static final String message_success_assign_function=" assign function create success";
        public static final String message_success_find_functions_module="moduleFunctions find success";
        public static final String message_fail_name_exist="function name exist";
        public static final String message_fail_name_is_null="function is null";
        public static final String message_fail_id_is_null="id is null";
        public static final String message_fail_id_no_exist=" no exist";
        public static final String api_create="/function";
        public static final String api_update="/function";
        public static final String api_delete="/function/{ids}";
        public static final String api_getById="/function/{id}";
        public static final String api_getListNoPage="/function/listNoPage";
        public static final String api_getList="/function/list";
        public static final String api_assignFunction="/assignFunction";
        public static final String api_getModuleFunctions="/api_getModuleFunctions";
        public static final String api_getChildren="/function/children/{id}";
    /**
     * 系统字典项
     */
    public static class SystemDictEntry extends Basic {
        public static final String PREFIX  = "/system_dict_entry";
    }
    public static class ModuleFun{
@ -82,57 +71,4 @@ public class BaseRequestMapping {
        public static final String funIds_is_null="funIds is null";
    }
    //SystemDictList常量
    public static class SystemDictList{
        public static final String message_success_create="SystemDictList create success";
        public static final String message_success_update="SystemDictList update success";
        public static final String message_success_find="SystemDictList find success";
        public static final String message_success_find_saass="SystemDictList find success";
        public static final String message_success_delete="SystemDictList delete success";
        public static final String message_fail_name_exist="SystemDictList name exist";
        public static final String message_fail_name_is_null="name is null";
        public static final String message_fail_id_is_null="id is null";
        public static final String message_fail_id_no_exist="id no exist";
        public static final String api_create="/systemDictList";
        public static final String api_update="/systemDictList";
        public static final String api_delete="/systemDictList";
        public static final String api_getById="/systemDictList/getById";
        public static final String api_getList="/systemDictList/list";
        public static final String api_getListNoPage="/systemDictList/listNoPage";
        public static final String api_getChildren="/systemDictList/children/{id}";
    }
/*
    //d行政人员模块
    public static class Employee{
        public static final String message_success_create="employee create success";
        public static final String message_success_update="employee update success";
        public static final String message_success_find="employee find success";
        public static final String message_success_find_saass="employee find success";
        public static final String message_success_delete="employee delete success";
        public static final String message_fail_name_exist="employee name exist";
        public static final String message_fail_name_is_null="name is null";
        public static final String message_fail_id_is_null="id is null";
        public static final String message_fail_id_no_exist="id no exist";
        public static final String api_create="/employee";
        public static final String api_update="/employee";
        public static final String api_delete="/employee";
        public static final String api_getById="/getById";
        public static final String api_getEmployee="/getEmployee";
        public static final String api_getEmployeeByAccount="/getEmployeeByAccount";
        public static final String api_getEmployeeNoPage="/getEmployeeNoPage";
    }*/
}

+ 0 - 203
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/EnvelopRestController.java

@ -1,203 +0,0 @@
package com.yihu.jw.restmodel.common;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.exception.ApiException;
import com.yihu.jw.exception.code.ExceptionCode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.StringUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.beans.PropertyDescriptor;
import java.io.IOException;
import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.*;
/**
 * REST风格控控制器基类。此控制器用于对API进行校验,并处理平台根层级的业务,如API参数校验,错误及返回码设定等。
 * <p>
 * 根层级的校验,如果是正确的,直接返回HTTP代码200,若出错,则会将HTTP返回代码设置为1X或2X,并在HTTP响应体中包含响应的信息。
 * HTTP响应体格式为JSON。
 * + 成功:会根据各业务逻辑自行决定要返回的数据,各业务模块的返回结构不同。
 * + 失败:{"code":"错误代码", "message":"错误原因"}
 *
 * @author zhiyong
 * @author Sand
 */
public class EnvelopRestController {
    private Logger logger = LoggerFactory.getLogger(EnvelopRestController.class);
    @Value("${spring.profiles}")
    private String profile;
    protected final static String ResourceCount = "X-Total-Count";
    protected final static String ResourceLink = "Link";
    protected void error(Exception e) {
        logger.error(e.getMessage());
        if (!"prod".equals(profile)) {
            e.printStackTrace();
        }
    }
    /**
     * 返回一个信封对象。信封对象的返回场景参见 Envelop.
     *
     * @param modelList
     * @param totalCount
     * @return
     */
    protected Envelop getResult(List modelList, int totalCount) {
        Envelop envelop = new Envelop();
        envelop.setDetailModelList(modelList);
        envelop.setTotalCount(totalCount);
        return envelop;
    }
    //Json转实体类
    public <T> T toEntity(String json, Class<T> entityCls) {
        try {
            ObjectMapper objectMapper = new ObjectMapper();
            objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
            T entity = objectMapper.readValue(json, entityCls);
            return entity;
        } catch (IOException ex) {
            throw new ApiException("Unable to parse json, " + ex.getMessage(), ExceptionCode.common_error_params_code);
        }
    }
    /**
     * 将实体集合转换为模型集合。
     *
     * @param <T>
     * @param sources
     * @param targets
     * @param targetCls
     * @param properties @return
     */
    public <T> List<T> convertToModels(Collection sources, List<T> targets, Class<T> targetCls, String properties) {
        if (sources == null) {
            return null;
        }
        Iterator iterator = sources.iterator();
        while (iterator.hasNext()) {
            Object source = iterator.next();
            T target = (T) BeanUtils.instantiate(targetCls);
            BeanUtils.copyProperties(source, target, propertyDiffer(StringUtils.isEmpty(properties) ? null : properties.split(","), targetCls));
            targets.add(target);
        }
        return targets;
    }
    /**
     * 将实体集合转换为模型集合。
     * @param sources
     * @param targets
     * @param targetCls
     * @param <T>
     * @return
     */
    public <T> List<T> convertToModels(Collection sources, List<T> targets, Class<T> targetCls){
        sources.forEach(one -> {
            T target = (T) BeanUtils.instantiate(targetCls);
            BeanUtils.copyProperties(one, target);
            targets.add(target);
        });
        return targets;
    }
    /**
     * 将实体转换为模型。
     *
     * @param source
     * @param targetCls
     * @param properties
     * @param <T>
     * @return
     */
    public <T> T convertToModel(Object source, Class<T> targetCls, String... properties) {
        if (source == null) {
            return null;
        }
        T target = BeanUtils.instantiate(targetCls);
        BeanUtils.copyProperties(source, target, propertyDiffer(properties, targetCls));
        return target;
    }
    /**
     * 计算不在类中的属性。
     *
     * @return
     */
    protected String[] propertyDiffer(String[] properties, Class targetCls) {
        if (properties == null || properties.length == 0) return null;
        PropertyDescriptor[] targetPds = BeanUtils.getPropertyDescriptors(targetCls);
        List<String> propertiesList = Arrays.asList(properties);
        List<String> arrayList = new ArrayList<>();
        for (PropertyDescriptor targetPd : targetPds) {
            Method writeMethod = targetPd.getWriteMethod();
            if (writeMethod != null && !propertiesList.contains(targetPd.getName())) {
                arrayList.add(targetPd.getName());
            }
        }
        return arrayList.toArray(new String[arrayList.size()]);
    }
    /**
     * 客户端调用REST接口时,若返回的是分页结果,则需要在响应头中添加资源的总数量及其他资源的分页导航。
     * EHR平台使用响应头中的 X-Total-Count 字段记录资源的总数量,link header作为其他资源的分页导航。
     *
     * @return
     */
    public void pagedResponse(
            HttpServletRequest request,
            HttpServletResponse response,
            Long resourceCount, Integer currentPage, Integer pageSize) {
        if (request == null || response == null) return;
        response.setHeader(ResourceCount, Long.toString(resourceCount));
        if (resourceCount == 0) return;
        if (currentPage == null) currentPage = new Integer(PageArg.DefaultPage);
        if (pageSize == null) pageSize = new Integer(PageArg.DefaultSize);
        String baseUri = "<" + request.getRequestURL().append("?").toString() + request.getQueryString() + ">";
        long firstPage = currentPage == 1 ? -1 : 1;
        long prevPage = currentPage == 1 ? -1 : currentPage - 1;
        long lastPage = resourceCount % pageSize == 0 ? resourceCount / pageSize : resourceCount / pageSize + 1;
        long nextPage = currentPage == lastPage ? -1 : currentPage + 1;
        lastPage = currentPage == lastPage ? -1 : lastPage;
        Map<String, String> map = new HashMap<>();
        if (firstPage != -1)
            map.put("rel='first',", baseUri.replaceAll("page=\\d+", "page=" + Long.toString(firstPage)));
        if (prevPage != -1) map.put("rel='prev',", baseUri.replaceAll("page=\\d+", "page=" + Long.toString(prevPage)));
        if (nextPage != -1) map.put("rel='next',", baseUri.replaceAll("page=\\d+", "page=" + Long.toString(nextPage)));
        if (lastPage != -1) map.put("rel='last',", baseUri.replaceAll("page=\\d+", "page=" + Long.toString(lastPage)));
        response.setHeader(ResourceLink, linkMap(map));
    }
    private String linkMap(Map<String, String> map) {
        StringBuffer links = new StringBuffer("");
        for (String key : map.keySet()) {
            links.append(map.get(key)).append("; ").append(key);
        }
        return links.toString();
    }
}

+ 0 - 14
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/PageArg.java

@ -1,14 +0,0 @@
package com.yihu.jw.restmodel.common;
/**
 * @author Sand
 * @version 1.0
 * @created 2016.02.14 17:47
 */
public class PageArg {
    public static final Integer DefaultPage = 1;
    public static final Integer DefaultSize = 15;
    public static final String DefaultPageS = "1";
    public static final String DefaultSizeS = "15";
}

+ 13 - 13
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/base/BaseEnvelop.java

@ -1,24 +1,24 @@
package com.yihu.jw.restmodel.common.base;
package com.yihu.jw.restmodel.web;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yihu.jw.restmodel.web.status.EnvelopStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
 * Created by chenweida on 2018/1/16.
 * 快速集成 {@link com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint}
 */
@JsonInclude(JsonInclude.Include.ALWAYS)
@ApiModel(description = "基础实体")
public class BaseEnvelop {
public class Envelop implements Serializable {
    @ApiModelProperty("信息")
    protected String message;
    @ApiModelProperty("状态(200成功,-1是失败)")
    protected Integer status = BaseEnvelopStatus.success.getCode();
    public BaseEnvelop() {
    }
    protected Integer status = EnvelopStatus.success.value;
    public Integer getStatus() {
        return status;
@ -36,22 +36,22 @@ public class BaseEnvelop {
        this.message = message;
    }
    public static BaseEnvelop getSuccess(String message) {
        BaseEnvelop envelop = new BaseEnvelop();
    public static Envelop getSuccess(String message) {
        Envelop envelop = new Envelop();
        envelop.setMessage(message);
        envelop.setStatus(200);
        return envelop;
    }
    public static BaseEnvelop getError(String message, int errorCode) {
        BaseEnvelop envelop = new BaseEnvelop();
    public static Envelop getError(String message, int errorCode) {
        Envelop envelop = new Envelop();
        envelop.setMessage(message);
        envelop.setStatus(errorCode);
        return envelop;
    }
    public static BaseEnvelop getError(String message) {
        BaseEnvelop envelop = new BaseEnvelop();
    public static Envelop getError(String message) {
        Envelop envelop = new Envelop();
        envelop.setMessage(message);
        envelop.setStatus(-1);
        return envelop;

+ 5 - 7
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/EnvelopList.java

@ -1,11 +1,10 @@
package com.yihu.jw.restmodel.common;
package com.yihu.jw.restmodel.web;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
@ -19,16 +18,15 @@ import java.util.List;
 * 信封对象的返回场景:
 * - API使用者确实无法访问返回头,即一些语言库无法处理HTTP的响应消息,这时候需要以这种形式提供返回值。
 * - API需要支持交叉域请求(通过JSONP)。
 *
 * 快速集成 {@link com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint}
 * @author llh
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@ApiModel(value = "ListResult", description = "获取实体列表返回定义")
public class EnvelopList<T> extends BaseEnvelop implements Serializable {
public class ListEnvelop<T> extends Envelop {
    @ApiModelProperty("列表内容")
    private List<T> detailModelList;
    private List<T> detailModelList = new ArrayList<>(0);
    public List<T> getDetailModelList() {
        return detailModelList;

+ 55 - 54
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/Envelop.java

@ -1,11 +1,11 @@
package com.yihu.jw.restmodel.common;
package com.yihu.jw.restmodel.web;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
@ -19,19 +19,20 @@ import java.util.List;
 * 信封对象的返回场景:
 * - API使用者确实无法访问返回头,即一些语言库无法处理HTTP的响应消息,这时候需要以这种形式提供返回值。
 * - API需要支持交叉域请求(通过JSONP)。
 *
 * - 快速集成 {@link com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint}
 * @author llh
 */
@JsonInclude(JsonInclude.Include.ALWAYS)
@ApiModel(value = "ListResult", description = "通用的实体")
public class Envelop<T> extends BaseEnvelop implements Serializable {
public class MixEnvelop<T, J> extends Envelop {
    private static final long serialVersionUID = 2076324875575488461L;
    @ApiModelProperty("每页大小 默认10")
    private int pageSize = 10;
    @ApiModelProperty("当前页")
    private int currPage;
    private int currPage = 1;
    @ApiModelProperty("每页大小 默认10")
    private int pageSize = 10;
    @ApiModelProperty("总共多少页")
    private int totalPage;
@ -40,33 +41,17 @@ public class Envelop<T> extends BaseEnvelop implements Serializable {
    private int totalCount;
    @ApiModelProperty("列表内容")
    private List<T> detailModelList;
    private List<T> detailModelList = new ArrayList<>(0);
    @ApiModelProperty("内容")
    private T obj;
    public T getObj() {
        return obj;
    }
    public void setObj(T obj) {
        this.obj = obj;
    }
    public int getTotalCount() {
        return totalCount;
    }
    private J obj = (J)new HashMap<>(0);
    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }
    public List<T> getDetailModelList() {
        return detailModelList;
    public int getCurrPage() {
        return currPage;
    }
    public void setDetailModelList(List<T> detailModelList) {
        this.detailModelList = detailModelList;
    public void setCurrPage(int currPage) {
        this.currPage = currPage;
    }
    public int getPageSize() {
@ -77,14 +62,6 @@ public class Envelop<T> extends BaseEnvelop implements Serializable {
        this.pageSize = pageSize;
    }
    public int getCurrPage() {
        return currPage;
    }
    public void setCurrPage(int currPage) {
        this.currPage = currPage;
    }
    public int getTotalPage() {
        if (totalCount % pageSize == 0) {
            totalPage = totalCount / pageSize;
@ -98,23 +75,47 @@ public class Envelop<T> extends BaseEnvelop implements Serializable {
        this.totalPage = totalPage;
    }
    public static Envelop getSuccess(String message) {
        Envelop envelop = new Envelop();
    public int getTotalCount() {
        return totalCount;
    }
    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }
    public List<T> getDetailModelList() {
        return detailModelList;
    }
    public void setDetailModelList(List<T> detailModelList) {
        this.detailModelList = detailModelList;
    }
    public J getObj() {
        return obj;
    }
    public void setObj(J obj) {
        this.obj = obj;
    }
    public static MixEnvelop getSuccess(String message) {
        MixEnvelop envelop = new MixEnvelop();
        envelop.setMessage(message);
        envelop.setStatus(200);
        return envelop;
    }
    public static Envelop getSuccess(String message, Object obj) {
        Envelop envelop = new Envelop();
    public static MixEnvelop getSuccess(String message, Object obj) {
        MixEnvelop envelop = new MixEnvelop();
        envelop.setMessage(message);
        envelop.setObj(obj);
        envelop.setStatus(200);
        return envelop;
    }
    public static Envelop getSuccess(String message, Object obj,Integer total) {
        Envelop envelop = new Envelop();
    public static MixEnvelop getSuccess(String message, Object obj, Integer total) {
        MixEnvelop envelop = new MixEnvelop();
        envelop.setMessage(message);
        envelop.setObj(obj);
        envelop.setTotalCount(total);
@ -122,8 +123,8 @@ public class Envelop<T> extends BaseEnvelop implements Serializable {
        return envelop;
    }
    public static Envelop getSuccessListWithPage(String message, List detailModelList, int page, int size, Long count) {
        Envelop envelop = new Envelop();
    public static MixEnvelop getSuccessListWithPage(String message, List detailModelList, int page, int size, Long count) {
        MixEnvelop envelop = new MixEnvelop();
        envelop.setMessage(message);
        envelop.setPageSize(size);
        envelop.setDetailModelList(detailModelList);
@ -133,30 +134,30 @@ public class Envelop<T> extends BaseEnvelop implements Serializable {
        return envelop;
    }
    public static Envelop getError(String message, int errorCode) {
        Envelop envelop = new Envelop();
    public static MixEnvelop getError(String message, int errorCode) {
        MixEnvelop envelop = new MixEnvelop();
        envelop.setMessage(message);
        envelop.setStatus(errorCode);
        return envelop;
    }
    public static Envelop getError(String message) {
        Envelop envelop = new Envelop();
    public static MixEnvelop getError(String message) {
        MixEnvelop envelop = new MixEnvelop();
        envelop.setMessage(message);
        envelop.setStatus(-1);
        return envelop;
    }
    public static Envelop getSuccessList(String message, List objList) {
        Envelop envelop = new Envelop();
    public static MixEnvelop getSuccessList(String message, List objList) {
        MixEnvelop envelop = new MixEnvelop();
        envelop.setMessage(message);
        envelop.setDetailModelList(objList);
        envelop.setStatus(200);
        return envelop;
    }
    public static Envelop getSuccessList(String message, List objList,Integer total) {
        Envelop envelop = new Envelop();
    public static MixEnvelop getSuccessList(String message, List objList, Integer total) {
        MixEnvelop envelop = new MixEnvelop();
        envelop.setMessage(message);
        envelop.setDetailModelList(objList);
        envelop.setTotalCount(total);

+ 7 - 8
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/EnvelopObj.java

@ -1,11 +1,10 @@
package com.yihu.jw.restmodel.common;
package com.yihu.jw.restmodel.web;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.HashMap;
/**
 * 信封对象,封装REST接口的返回值内容。包括:
@ -18,21 +17,21 @@ import java.io.Serializable;
 * 信封对象的返回场景:
 * - API使用者确实无法访问返回头,即一些语言库无法处理HTTP的响应消息,这时候需要以这种形式提供返回值。
 * - API需要支持交叉域请求(通过JSONP)。
 *
 * 快速集成 {@link com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint}
 * @author llh
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@ApiModel(description = "获取单个实体信息返回")
public class EnvelopObj<T> extends BaseEnvelop implements Serializable {
public class ObjEnvelop<J> extends Envelop {
    @ApiModelProperty("内容")
    private T obj;
    private J obj = (J)new HashMap<>(0);
    public T getObj() {
    public J getObj() {
        return obj;
    }
    public void setObj(T obj) {
    public void setObj(J obj) {
        this.obj = obj;
    }
}

+ 37 - 39
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/EnvelopPage.java

@ -1,11 +1,11 @@
package com.yihu.jw.restmodel.common;
package com.yihu.jw.restmodel.web;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
@ -19,21 +19,21 @@ import java.util.List;
 * 信封对象的返回场景:
 * - API使用者确实无法访问返回头,即一些语言库无法处理HTTP的响应消息,这时候需要以这种形式提供返回值。
 * - API需要支持交叉域请求(通过JSONP)。
 *
 * 快速集成 {@link com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint}
 * @author llh
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@ApiModel(value = "PageResult<T>", description = "分页查询返回")
public class EnvelopPage<T> extends BaseEnvelop implements Serializable {
@ApiModel(value = "EnvelopPage<T>", description = "分页查询返回")
public class PageEnvelop<T> extends Envelop implements Serializable {
    private static final long serialVersionUID = 2076324875575488461L;
    @ApiModelProperty("当前页")
    private int currPage = 1;
    @ApiModelProperty("每页大小 默认10")
    private int pageSize = 10;
    @ApiModelProperty("当前页")
    private int currPage;
    @ApiModelProperty("总共多少页")
    private int totalPage;
@ -41,26 +41,16 @@ public class EnvelopPage<T> extends BaseEnvelop implements Serializable {
    private int totalCount;
    @ApiModelProperty("所有满足条件的实体")
    private List<T> detailModelList;
    public int getTotalCount() {
        return totalCount;
    }
    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }
    private List<T> detailModelList = new ArrayList<>(0);
    public List<T> getDetailModelList() {
        return detailModelList;
    public int getCurrPage() {
        return currPage;
    }
    public void setDetailModelList(List<T> detailModelList) {
        this.detailModelList = detailModelList;
    public void setCurrPage(int currPage) {
        this.currPage = currPage;
    }
    public int getPageSize() {
        return pageSize;
    }
@ -69,14 +59,6 @@ public class EnvelopPage<T> extends BaseEnvelop implements Serializable {
        this.pageSize = pageSize;
    }
    public int getCurrPage() {
        return currPage;
    }
    public void setCurrPage(int currPage) {
        this.currPage = currPage;
    }
    public int getTotalPage() {
        if (totalCount % pageSize == 0) {
            totalPage = totalCount / pageSize;
@ -90,14 +72,30 @@ public class EnvelopPage<T> extends BaseEnvelop implements Serializable {
        this.totalPage = totalPage;
    }
    public static EnvelopPage getSuccess(String message) {
        EnvelopPage envelop = new EnvelopPage();
    public int getTotalCount() {
        return totalCount;
    }
    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }
    public List<T> getDetailModelList() {
        return detailModelList;
    }
    public void setDetailModelList(List<T> detailModelList) {
        this.detailModelList = detailModelList;
    }
    public static PageEnvelop getSuccess(String message) {
        PageEnvelop envelop = new PageEnvelop();
        envelop.setMessage(message);
        return envelop;
    }
    public static EnvelopPage getSuccessListWithPage(String message, List detailModelList, int page, int size, Long count) {
        EnvelopPage envelop = new EnvelopPage();
    public static PageEnvelop getSuccessListWithPage(String message, List detailModelList, int page, int size, Long count) {
        PageEnvelop envelop = new PageEnvelop();
        envelop.setMessage(message);
        envelop.setPageSize(size);
        envelop.setDetailModelList(detailModelList);
@ -106,14 +104,14 @@ public class EnvelopPage<T> extends BaseEnvelop implements Serializable {
        return envelop;
    }
    public static EnvelopPage getError(String message, int errorCode) {
        EnvelopPage envelop = new EnvelopPage();
    public static PageEnvelop getError(String message, int errorCode) {
        PageEnvelop envelop = new PageEnvelop();
        envelop.setMessage(message);
        return envelop;
    }
    public static EnvelopPage getSuccessList(String message, List objList) {
        EnvelopPage envelop = new EnvelopPage();
    public static PageEnvelop getSuccessList(String message, List objList) {
        PageEnvelop envelop = new PageEnvelop();
        envelop.setMessage(message);
        envelop.setDetailModelList(objList);
        return envelop;

+ 97 - 34
common/common-web/src/main/java/com/yihu/jw/web/endpoint/EnvelopRestEndpoint.java

@ -1,18 +1,34 @@
package com.yihu.jw.web.endpoint;
package com.yihu.jw.restmodel.web.endpoint;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.web.model.*;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.Envelop;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.beans.PropertyDescriptor;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.*;
/**
 * Created by progr1mmer on 2018/8/15.
 * REST风格控控制器基类。此控制器用于对API进行校验,并处理平台根层级的业务,如API参数校验,错误及返回码设定等。
 * <p>
 * 根层级的校验,如果是正确的,直接返回HTTP代码200,若出错,则会将HTTP返回代码设置为1X或2X,并在HTTP响应体中包含响应的信息。
 * HTTP响应体格式为JSON。
 * + 成功:会根据各业务逻辑自行决定要返回的数据,各业务模块的返回结构不同。
 * + 失败:{"code":"错误代码", "message":"错误原因"}
 *
 * @author zhiyong
 * @author Sand
 */
public abstract class EnvelopRestEndpoint {
@ -25,8 +41,8 @@ public abstract class EnvelopRestEndpoint {
    protected Envelop success(String desc, int code) {
        Envelop envelop = new Envelop();
        envelop.setDesc(desc);
        envelop.setCode(code);
        envelop.setMessage(desc);
        envelop.setStatus(code);
        return envelop;
    }
@ -39,11 +55,11 @@ public abstract class EnvelopRestEndpoint {
    }
    protected <J> ObjEnvelop<J> success(J data, String desc, int code){
        ObjEnvelop<J> objEnvelop = new ObjEnvelop<>();
        objEnvelop.setDesc(desc);
        objEnvelop.setCode(code);
        objEnvelop.setData(data);
        return objEnvelop;
        ObjEnvelop<J> envelop = new ObjEnvelop<>();
        envelop.setMessage(desc);
        envelop.setStatus(code);
        envelop.setObj(data);
        return envelop;
    }
    protected <T> ListEnvelop<T> success(List<T> contents){
@ -55,11 +71,11 @@ public abstract class EnvelopRestEndpoint {
    }
    protected <T> ListEnvelop<T> success(List<T> contents, String desc, int code){
        ListEnvelop<T> listEnvelop = new ListEnvelop<>();
        listEnvelop.setDesc(desc);
        listEnvelop.setCode(code);
        listEnvelop.setContents(contents);
        return listEnvelop;
        ListEnvelop<T> envelop = new ListEnvelop<>();
        envelop.setMessage(desc);
        envelop.setStatus(code);
        envelop.setDetailModelList(contents);
        return envelop;
    }
    protected <T> PageEnvelop success(List<T> contents, int totalCount, int currPage, int pageSize) {
@ -71,14 +87,14 @@ public abstract class EnvelopRestEndpoint {
    }
    protected <T> PageEnvelop success(List<T> contents, String desc, int code, int totalCount, int currPage, int pageSize) {
        PageEnvelop<T> pageEnvelop = new PageEnvelop();
        pageEnvelop.setDesc(desc);
        pageEnvelop.setCode(code);
        pageEnvelop.setCurrPage(currPage);
        pageEnvelop.setPageSize(pageSize);
        pageEnvelop.setTotalCount(totalCount);
        pageEnvelop.setContents(contents);
        return pageEnvelop;
        PageEnvelop<T> envelop = new PageEnvelop();
        envelop.setMessage(desc);
        envelop.setStatus(code);
        envelop.setCurrPage(currPage);
        envelop.setPageSize(pageSize);
        envelop.setTotalCount(totalCount);
        envelop.setDetailModelList(contents);
        return envelop;
    }
    protected <T, J> MixEnvelop success(List<T> contents, J obj) {
@ -94,15 +110,15 @@ public abstract class EnvelopRestEndpoint {
    }
    protected <T, J> MixEnvelop success(List<T> contents, J data, String desc, int code, int totalCount, int currPage, int pageSize) {
        MixEnvelop<T, J> mixEnvelop = new MixEnvelop();
        mixEnvelop.setDesc(desc);
        mixEnvelop.setCode(code);
        mixEnvelop.setCurrPage(currPage);
        mixEnvelop.setPageSize(pageSize);
        mixEnvelop.setTotalCount(totalCount);
        mixEnvelop.setContents(contents);
        mixEnvelop.setData(data);
        return mixEnvelop;
        MixEnvelop<T, J> envelop = new MixEnvelop();
        envelop.setMessage(desc);
        envelop.setStatus(code);
        envelop.setCurrPage(currPage);
        envelop.setPageSize(pageSize);
        envelop.setTotalCount(totalCount);
        envelop.setDetailModelList(contents);
        envelop.setObj(data);
        return envelop;
    }
    protected Envelop failed(String desc) {
@ -111,8 +127,8 @@ public abstract class EnvelopRestEndpoint {
    protected Envelop failed(String desc, int code) {
        Envelop envelop = new Envelop();
        envelop.setDesc(desc);
        envelop.setCode(code);
        envelop.setMessage(desc);
        envelop.setStatus(code);
        return envelop;
    }
@ -181,4 +197,51 @@ public abstract class EnvelopRestEndpoint {
        return buffer.toString();
    }
    /**
     * 客户端调用REST接口时,若返回的是分页结果,则需要在响应头中添加资源的总数量及其他资源的分页导航。
     * EHR平台使用响应头中的 X-Total-Count 字段记录资源的总数量,link header作为其他资源的分页导航。
     *
     * @return
     */
    @Deprecated
    public void pagedResponse(
            HttpServletRequest request,
            HttpServletResponse response,
            Long resourceCount, Integer currentPage, Integer pageSize) {
        if (request == null || response == null) return;
        response.setHeader("X-Total-Count", Long.toString(resourceCount));
        if (resourceCount == 0) return;
        if (currentPage == null) currentPage = new Integer(1);
        if (pageSize == null) pageSize = new Integer(15);
        String baseUri = "<" + request.getRequestURL().append("?").toString() + request.getQueryString() + ">";
        long firstPage = currentPage == 1 ? -1 : 1;
        long prevPage = currentPage == 1 ? -1 : currentPage - 1;
        long lastPage = resourceCount % pageSize == 0 ? resourceCount / pageSize : resourceCount / pageSize + 1;
        long nextPage = currentPage == lastPage ? -1 : currentPage + 1;
        lastPage = currentPage == lastPage ? -1 : lastPage;
        Map<String, String> map = new HashMap<>();
        if (firstPage != -1)
            map.put("rel='first',", baseUri.replaceAll("page=\\d+", "page=" + Long.toString(firstPage)));
        if (prevPage != -1) map.put("rel='prev',", baseUri.replaceAll("page=\\d+", "page=" + Long.toString(prevPage)));
        if (nextPage != -1) map.put("rel='next',", baseUri.replaceAll("page=\\d+", "page=" + Long.toString(nextPage)));
        if (lastPage != -1) map.put("rel='last',", baseUri.replaceAll("page=\\d+", "page=" + Long.toString(lastPage)));
        response.setHeader("Link", linkMap(map));
    }
    private String linkMap(Map<String, String> map) {
        StringBuffer links = new StringBuffer("");
        for (String key : map.keySet()) {
            links.append(map.get(key)).append("; ").append(key);
        }
        return links.toString();
    }
}

+ 8 - 22
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/base/BaseEnvelopStatus.java

@ -1,11 +1,12 @@
package com.yihu.jw.restmodel.common.base;
package com.yihu.jw.restmodel.web.status;
/**
 * Created by chenweida on 2018/5/8 0008.
 */
public enum BaseEnvelopStatus {
public enum EnvelopStatus {
    success("请求成功", 200),
    system_error("系统错误",-10000),
    system_error("系统错误", -10000),
    //------------------登陆 权限相关 start ------------------
    status_10100("账号不存在", 10100),
    status_10101("密码错误", 10101),
@ -16,27 +17,12 @@ public enum BaseEnvelopStatus {
    status_10106("账号已存在", 10106),;
    //------------------登陆 权限相关 end ------------------
    BaseEnvelopStatus(String name, Integer code) {
        this.name = name;
        this.code = code;
    }
    public String name;
    public Integer value;
    private String name;
    private Integer code;
    public String getName() {
        return name;
    }
    public void setName(String name) {
    EnvelopStatus(String name, Integer value) {
        this.name = name;
        this.value = value;
    }
    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }
}

+ 4 - 0
common/common-web/pom.xml

@ -45,6 +45,10 @@
            <groupId>io.swagger</groupId>
            <artifactId>swagger-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model</artifactId>
        </dependency>
    </dependencies>
</project>

+ 13 - 13
common/common-web/src/main/java/com/yihu/jw/web/handler/GlobalExceptionHandler.java

@ -1,7 +1,7 @@
package com.yihu.jw.web.handler;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.web.exception.ApiException;
import com.yihu.jw.web.model.Envelop;
import feign.FeignException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -34,25 +34,25 @@ public class GlobalExceptionHandler {
    public Envelop handle(HttpServletResponse response, Exception e) throws IOException {
        Envelop envelop = new Envelop();
        if (e instanceof NoHandlerFoundException) { //404
            envelop.setDesc(e.getMessage());
            envelop.setCode(HttpStatus.NOT_FOUND.value());
            envelop.setMessage(e.getMessage());
            envelop.setStatus(HttpStatus.NOT_FOUND.value());
        } else if (e instanceof HttpRequestMethodNotSupportedException){ //请求方法有误
            envelop.setDesc(e.getMessage());
            envelop.setCode(HttpStatus.METHOD_NOT_ALLOWED.value());
            envelop.setMessage(e.getMessage());
            envelop.setStatus(HttpStatus.METHOD_NOT_ALLOWED.value());
        } else if (e instanceof MissingServletRequestParameterException) { //参数有误
            envelop.setDesc(e.getMessage());
            envelop.setCode(HttpStatus.BAD_REQUEST.value());
            envelop.setMessage(e.getMessage());
            envelop.setStatus(HttpStatus.BAD_REQUEST.value());
        } else if (e instanceof FeignException) { //执行Feign失败的时候默认当前服务做为网关执行请求的时候,从上游服务器接收到无效的响应
            envelop.setDesc("Execute Feign: " + e.getMessage());
            envelop.setCode(HttpStatus.BAD_GATEWAY.value());
            envelop.setMessage("Execute Feign: " + e.getMessage());
            envelop.setStatus(HttpStatus.BAD_GATEWAY.value());
        } else if (e instanceof ApiException) { //业务逻辑异常
            ApiException apiException = (ApiException) e;
            envelop.setDesc(apiException.getErrorDesc());
            envelop.setCode(apiException.getErrorCode());
            envelop.setMessage(apiException.getErrorDesc());
            envelop.setStatus(apiException.getErrorCode());
            return envelop; //此异常不进行日志记录
        } else {
            envelop.setDesc(e.getMessage());
            envelop.setCode(HttpStatus.INTERNAL_SERVER_ERROR.value());
            envelop.setMessage(e.getMessage());
            envelop.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
        }
        logger.error(e.getMessage(), e);
        return envelop;

+ 0 - 38
common/common-web/src/main/java/com/yihu/jw/web/model/Envelop.java

@ -1,38 +0,0 @@
package com.yihu.jw.web.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
 * Created by chenweida on 2018/1/16.
 */
@JsonInclude(JsonInclude.Include.ALWAYS)
@ApiModel(description = "基础实体")
public class Envelop implements Serializable {
    protected static final long serialVersionUID = -67188388306700736L;
    @ApiModelProperty("信息")
    protected String desc;
    @ApiModelProperty("状态(200成功,-1是失败)")
    protected int code;
    public String getDesc() {
        return desc;
    }
    public void setDesc(String desc) {
        this.desc = desc;
    }
    public int getCode() {
        return code;
    }
    public void setCode(int code) {
        this.code = code;
    }
}

+ 0 - 20
common/common-web/src/main/java/com/yihu/jw/web/model/ListEnvelop.java

@ -1,20 +0,0 @@
package com.yihu.jw.web.model;
import java.util.ArrayList;
import java.util.List;
/**
 * Created by progr1mmer on 2018/8/15.
 */
public class ListEnvelop<T> extends Envelop {
    private List<T> contents = new ArrayList<>(0);
    public List<T> getContents() {
        return contents;
    }
    public void setContents(List<T> contents) {
        this.contents = contents;
    }
}

+ 0 - 101
common/common-web/src/main/java/com/yihu/jw/web/model/MixEnvelop.java

@ -1,101 +0,0 @@
package com.yihu.jw.web.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
 * 信封对象,封装REST接口的返回值内容。包括:
 * - 页码
 * - 页大小
 * - 错误消息
 * - 错误代码
 * - 对象模型
 * <p>
 * 信封对象的返回场景:
 * - API使用者确实无法访问返回头,即一些语言库无法处理HTTP的响应消息,这时候需要以这种形式提供返回值。
 * - API需要支持交叉域请求(通过JSONP)。
 *
 * @author llh
 */
@JsonInclude(JsonInclude.Include.ALWAYS)
@ApiModel(value = "MixEnvelop", description = "通用的实体")
public class MixEnvelop<T, J> extends Envelop {
    @ApiModelProperty("当前页")
    private int currPage = 1;
    @ApiModelProperty("每页大小 默认10")
    private int pageSize = 15;
    @ApiModelProperty("总共多少页")
    private int totalPage;
    @ApiModelProperty("总共多少数据")
    private int totalCount;
    @ApiModelProperty("列表内容")
    private List<T> contents = new ArrayList<>(0);
    @ApiModelProperty("内容")
    private J data = (J) new HashMap<>(0);
    public int getCurrPage() {
        return currPage;
    }
    public void setCurrPage(int currPage) {
        this.currPage = currPage;
    }
    public int getPageSize() {
        return pageSize;
    }
    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
    public int getTotalPage() {
        if (totalCount % pageSize == 0) {
            totalPage = totalCount / pageSize;
        } else {
            totalPage = totalCount / pageSize + 1;
        }
        return totalPage;
    }
    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }
    public int getTotalCount() {
        return totalCount;
    }
    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }
    public List<T> getContents() {
        return contents;
    }
    public void setContents(List<T> contents) {
        this.contents = contents;
    }
    public J getData() {
        return data;
    }
    public void setData(J data) {
        this.data = data;
    }
}

+ 0 - 19
common/common-web/src/main/java/com/yihu/jw/web/model/ObjEnvelop.java

@ -1,19 +0,0 @@
package com.yihu.jw.web.model;
import java.util.HashMap;
/**
 * Created by progr1mmer on 2018/8/15.
 */
public class ObjEnvelop<J> extends Envelop {
    private J data = (J) new HashMap<>(0);
    public J getData() {
        return data;
    }
    public void setData(J data) {
        this.data = data;
    }
}

+ 0 - 0
common/common-web/src/main/java/com/yihu/jw/web/model/PageEnvelop.java


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott