Browse Source

解决冲突

LiTaohong 7 years ago
parent
commit
205599b192
28 changed files with 276 additions and 113 deletions
  1. 9 0
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/constant/ServiceApi.java
  2. 3 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/company/IotCompanyController.java
  3. 4 2
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/product/IotProductController.java
  4. 30 5
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/third/wlyy/MonitoringHealthPlatformController.java
  5. 3 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/company/CompanyService.java
  6. 2 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/product/ProductService.java
  7. 53 3
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/third/wlyy/MonitoringHealthService.java
  8. 28 8
      common/common-entity/src/main/java/com/yihu/jw/iot/company/IotCompanyCertificateDO.java
  9. 12 12
      common/common-entity/src/main/java/com/yihu/jw/iot/product/IotProductBaseInfoDO.java
  10. 27 7
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/company/IotCompanyCertificateVO.java
  11. 12 12
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/product/IotProductBaseInfoVO.java
  12. 3 1
      svr/svr-iot/src/main/java/com/yihu/iot/controller/company/IotCompanyController.java
  13. 2 2
      svr/svr-iot/src/main/java/com/yihu/iot/controller/device/IotPatientDeviceController.java
  14. 17 13
      svr/svr-iot/src/main/java/com/yihu/iot/controller/product/IotProductController.java
  15. 9 2
      svr/svr-iot/src/main/java/com/yihu/iot/service/company/IotCompanyCertificateService.java
  16. 4 0
      svr/svr-iot/src/main/java/com/yihu/iot/service/device/IotPatientDeviceService.java
  17. 2 2
      svr/svr-iot/src/main/java/com/yihu/iot/service/product/IotProductBaseInfoService.java
  18. 2 2
      svr/svr-iot/src/main/resources/application.yml
  19. 3 1
      web-gateway/src/main/java/com/yihu/jw/controller/iot/company/IotCompanyController.java
  20. 11 1
      web-gateway/src/main/java/com/yihu/jw/controller/iot/device/IotPatientDeviceController.java
  21. 12 9
      web-gateway/src/main/java/com/yihu/jw/controller/iot/product/IotProductController.java
  22. 2 0
      web-gateway/src/main/java/com/yihu/jw/feign/fallbackfactory/iot/company/IotCompanyFallbackFactory.java
  23. 4 7
      web-gateway/src/main/java/com/yihu/jw/feign/fallbackfactory/iot/device/IotDeviceQualityFallbackFactory.java
  24. 13 21
      web-gateway/src/main/java/com/yihu/jw/feign/fallbackfactory/iot/device/IotPatientDeviceFallbackFactory.java
  25. 2 0
      web-gateway/src/main/java/com/yihu/jw/feign/fallbackfactory/iot/product/IotProductFallbackFactory.java
  26. 1 0
      web-gateway/src/main/java/com/yihu/jw/feign/iot/company/IotCompanyFeign.java
  27. 5 0
      web-gateway/src/main/java/com/yihu/jw/feign/iot/device/IotPatientDeviceFeign.java
  28. 1 0
      web-gateway/src/main/java/com/yihu/jw/feign/iot/product/IotProductFeign.java

+ 9 - 0
app/app-iot-server/src/main/java/com/yihu/ehr/iot/constant/ServiceApi.java

@ -102,4 +102,13 @@ public class ServiceApi {
        }
    }
    public static class PatientDevice{
        public static final String Base = "wg/patientDevice/";
        public static final String findLocationByIdCard = Base + "findLocationByIdCard";
        public PatientDevice(){
        }
    }
}

+ 3 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/company/IotCompanyController.java

@ -108,6 +108,8 @@ public class IotCompanyController extends BaseController {
    public Envelop<IotCompanyCertificateVO> findCompanyCertPage
            (@ApiParam(name = "name", value = "证书名称", defaultValue = "")
             @RequestParam(value = "name", required = false) String name,
             @ApiParam(name = "companyId", value = "企业id", defaultValue = "")
             @RequestParam(value = "companyId", required = false) String companyId,
             @ApiParam(name = "page", value = "第几页", defaultValue = "")
             @RequestParam(value = "page", required = false) Integer page,
             @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
@ -119,7 +121,7 @@ public class IotCompanyController extends BaseController {
            if(size == null){
                size = 10;
            }
            return companyService.findCompanyCertPage(name,page,size);
            return companyService.findCompanyCertPage(name,page,size,companyId);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());

+ 4 - 2
app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/product/IotProductController.java

@ -55,6 +55,8 @@ public class IotProductController extends BaseController {
            @RequestParam(value = "name", required = false) String name,
            @ApiParam(name = "classify", value = "产品分类", defaultValue = "")
            @RequestParam(value = "classify", required = false) String classify,
            @ApiParam(name = "companyId", value = "企业id", defaultValue = "")
            @RequestParam(value = "companyId", required = false) String companyId,
            @ApiParam(name = "page", value = "第几页", defaultValue = "")
            @RequestParam(value = "page", required = false) Integer page,
            @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
@ -66,7 +68,7 @@ public class IotProductController extends BaseController {
            if(size == null){
                size = 10;
            }
            return productService.findCompanyPage(name,classify,page,size);
            return productService.findCompanyPage(name,classify,companyId,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
@ -124,7 +126,7 @@ public class IotProductController extends BaseController {
    @GetMapping(value = IotRequestMapping.Product.maintenanceUnitById)
    @ApiOperation(value = "根据id查找产品", notes = "根据id查找产品")
    @ApiOperation(value = "根据id查找产品的维护单位", notes = "根据id查找产品的维护单位")
    public Envelop<IotMaintenanceUnitVO> maintenanceUnitById(@ApiParam(name = "productId", value = "productId")
                                            @RequestParam(value = "productId", required = true) String productId) {
        try {

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

@ -2,15 +2,16 @@ package com.yihu.ehr.iot.controller.third.wlyy;
import com.yihu.ehr.iot.controller.common.BaseController;
import com.yihu.ehr.iot.service.third.wlyy.MonitoringHealthService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.device.LocationDataVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * 远程监测健康平台-访问wlyy
@ -33,7 +34,29 @@ public class MonitoringHealthPlatformController extends BaseController{
            e.printStackTrace();
            return error(-1,"查询失败");
        }
    }
    @GetMapping(value = IotRequestMapping.PatientDevice.findLocationByIdCard)
    @ApiOperation(value = "根据idCard查询设备地址", notes = "根据idCard查询设备地址")
    public Envelop<List<LocationDataVO>> findDeviceLocationsByIdCard(
            @ApiParam(name = "diseaseCondition", value = "病情:0绿标,1黄标,2红标,-1没有标注的居民", defaultValue = "")
            @RequestParam(value = "diseaseCondition",required = false) Integer diseaseCondition,
            @ApiParam(name="page",value="第几页(默认第一页)",defaultValue = "1")
            @RequestParam(value="page",required = false) Integer page,
            @ApiParam(name="pageSize",value="每页几行(默认10条记录)",defaultValue = "10")
            @RequestParam(value="pageSize",required = false) Integer pageSize) {
        try {
            if(page==null){
                page = 1;
            }
            if(pageSize==null){
                pageSize = 10;
            }
            return monitoringHealthService.findDeviceLocations(diseaseCondition,page,pageSize);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
        }
    }
    @RequestMapping(value = "/chronicDiseaseCount",method = RequestMethod.GET)
@ -155,12 +178,14 @@ public class MonitoringHealthPlatformController extends BaseController{
                                               @RequestParam(value = "type", required = true) Integer type,
                                               @ApiParam(name = "gi_type", value = "就餐类型0全部", defaultValue = "1")
                                               @RequestParam(value = "gi_type", required = false) Integer gi_type,
                                               @ApiParam(name="time",value="时间(一周,一月,半年)",defaultValue = "")
                                               @RequestParam(value="time",required = true) String time,
                                               @ApiParam(name = "begin", value = "开始时间", defaultValue = "2017-05-22")
                                               @RequestParam(value = "begin", required = true) String begin,
                                               @ApiParam(name = "end", value = "结束时间", defaultValue = "2018-06-02")
                                               @RequestParam(value = "end", required = true) String end) {
        try {
            return monitoringHealthService.getHealthIndexChartByPatient(patient,type,gi_type,begin,end);
            return monitoringHealthService.getHealthIndexChartByPatient(patient,type,gi_type,begin,end,time);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1,"查询失败");

+ 3 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/company/CompanyService.java

@ -304,14 +304,16 @@ public class CompanyService extends BaseService {
    /**
     * 分页获取企业证书
     * @param name
     * @param companyId
     * @param page
     * @param size
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyCertificateVO> findCompanyCertPage(String name,Integer page,Integer size) throws IOException{
    public Envelop<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);

+ 2 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/product/ProductService.java

@ -75,10 +75,11 @@ public class ProductService extends BaseService {
     * @param size
     * @return
     */
    public Envelop<IotProductBaseInfoVO> findCompanyPage(String name,String classify,Integer page,Integer size) throws IOException{
    public Envelop<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);
        params.put("companyId", companyId);
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Product.FindProductPage, params);

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

@ -1,10 +1,15 @@
package com.yihu.ehr.iot.service.third.wlyy;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.ehr.iot.constant.ServiceApi;
import com.yihu.ehr.iot.service.common.BaseService;
import com.yihu.ehr.iot.util.http.HttpHelper;
import com.yihu.ehr.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.device.LocationDataVO;
import com.yihu.jw.util.date.DateUtil;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -14,7 +19,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
@ -30,6 +37,34 @@ public class MonitoringHealthService extends BaseService{
    private String appid;
    @Value("${third.wlyy.appsecret}")
    private String appSecret;
    public static Map<String,String> tokenMap = new HashMap<>();
    /**
     * 获取位置信息
     * @param diseaseCondition
     * @return
     */
    public Envelop<List<LocationDataVO>> findDeviceLocations(Integer diseaseCondition,Integer page,Integer size) throws IOException {
        JSONArray jsonArray = new JSONArray();
        if(diseaseCondition!=null){
            JSONObject json = new JSONObject();
            json.put("andOr","and");
            json.put("field","diseaseCondition");
            json.put("condition","=");
            json.put("value",diseaseCondition);
            jsonArray.add(json);
        }
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("filter",jsonArray);
        jsonObject.put("page",page);
        jsonObject.put("size",size);
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonObject.toString());
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.PatientDevice.findLocationByIdCard, params);
        Envelop<List<LocationDataVO>> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        return envelop;
    }
    /**
@ -48,7 +83,18 @@ public class MonitoringHealthService extends BaseService{
     * @return
     * @throws IOException
     */
    private String getAccessToken(){
    private synchronized String getAccessToken(){
        String token = "";
        if(tokenMap.get("token")!=null){
            token = tokenMap.get("token");
            String time = tokenMap.get("time");
            Date start = DateUtil.strToDate(time);
            long m = (System.currentTimeMillis()-start.getTime())/1000;
            long overTime = 15*6*60;//1.5小时
            if(m<overTime){
                return token;
            }
        }
        Map<String, Object> params = new HashMap<>();
        params.put("appid", appid);
        params.put("appSecret", appSecret);
@ -56,7 +102,10 @@ public class MonitoringHealthService extends BaseService{
        HttpResponse response = HttpHelper.post(wlyyUrl + url, params);
        JSONObject jsonObject = JSON.parseObject(response.getBody());
        if(jsonObject.getInteger("status")==10000){
            return jsonObject.getJSONObject("result").getString("accesstoken");
            String accesstoken = jsonObject.getJSONObject("result").getString("accesstoken");
            tokenMap.put("token",accesstoken);
            tokenMap.put("time",DateUtil.getStringDate());
            return accesstoken;
        }
        return null;
    }
@ -174,11 +223,12 @@ public class MonitoringHealthService extends BaseService{
     * @param end
     * @return
     */
    public String getHealthIndexChartByPatient(String patient,Integer type, Integer gi_type,String begin,String end) {
    public String getHealthIndexChartByPatient(String patient, Integer type, Integer gi_type, String begin, String end,String time) {
        String url = "/wlyygc/iot_monitoring/chart";
        Map<String, Object> params = new HashMap<>();
        params.put("patient",patient);
        params.put("type",type);
        params.put("time",time);
        params.put("begin",begin);
        params.put("end",end);
        params.put("gi_type",gi_type);

+ 28 - 8
common/common-entity/src/main/java/com/yihu/jw/iot/company/IotCompanyCertificateDO.java

@ -27,12 +27,16 @@ public class IotCompanyCertificateDO extends IdEntityWithOperation implements Se
    private String manufacturerId;//生产厂家id
    @Column(name = "manufacturer_business_license")
    private String manufacturerBusinessLicense;//生产厂家营业执照号
    @Column(name = "launch_company_name")
    private String launchCompanyName;//发起企业名称
    @Column(name = "launch_company_id")
    private String launchCompanyId;//发起企业id
    @Column(name = "launch_company_business_license")
    private String launchCompanyBusinessLicense;//发起企业营业执照号
    @Column(name = "company_name")
    private String companyName;//发起企业名称
    private String companyName;//归属企业名称
    @Column(name = "company_id")
    private String companyId;//发起企业id
    @Column(name = "company_business_license")
    private String companyBusinessLicense;//发起企业营业执照号
    private String companyId;//归属企业id
    @Column(name = "start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date startTime;//有效期开始时间
@ -100,12 +104,28 @@ public class IotCompanyCertificateDO extends IdEntityWithOperation implements Se
        this.companyId = companyId;
    }
    public String getCompanyBusinessLicense() {
        return companyBusinessLicense;
    public String getLaunchCompanyName() {
        return launchCompanyName;
    }
    public void setCompanyBusinessLicense(String companyBusinessLicense) {
        this.companyBusinessLicense = companyBusinessLicense;
    public void setLaunchCompanyName(String launchCompanyName) {
        this.launchCompanyName = launchCompanyName;
    }
    public String getLaunchCompanyId() {
        return launchCompanyId;
    }
    public void setLaunchCompanyId(String launchCompanyId) {
        this.launchCompanyId = launchCompanyId;
    }
    public String getLaunchCompanyBusinessLicense() {
        return launchCompanyBusinessLicense;
    }
    public void setLaunchCompanyBusinessLicense(String launchCompanyBusinessLicense) {
        this.launchCompanyBusinessLicense = launchCompanyBusinessLicense;
    }
    public Date getStartTime() {

+ 12 - 12
common/common-entity/src/main/java/com/yihu/jw/iot/product/IotProductBaseInfoDO.java

@ -26,10 +26,10 @@ public class IotProductBaseInfoDO extends IdEntityWithOperation implements Seria
    private String supplierName;//厂商名称
    @Column(name = "supplier_id")
    private String supplierId;//厂商id
    @Column(name = "agent_name")
    private String agentName;//代理商名称
    @Column(name = "agent_id")
    private String agentId;//代理商id
    @Column(name = "company_name")
    private String companyName;//企业名称
    @Column(name = "company_id")
    private String companyId;//企业id
    @Column(name = "type")
    private String type;//产品类型
    @Column(name = "product_subclass")
@ -103,20 +103,20 @@ public class IotProductBaseInfoDO extends IdEntityWithOperation implements Seria
        this.supplierId = supplierId;
    }
    public String getAgentName() {
        return agentName;
    public String getCompanyName() {
        return companyName;
    }
    public void setAgentName(String agentName) {
        this.agentName = agentName;
    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }
    public String getAgentId() {
        return agentId;
    public String getCompanyId() {
        return companyId;
    }
    public void setAgentId(String agentId) {
        this.agentId = agentId;
    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }
    public String getType() {

+ 27 - 7
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/company/IotCompanyCertificateVO.java

@ -25,11 +25,15 @@ public class IotCompanyCertificateVO extends BaseVO implements Serializable {
    @ApiModelProperty("生产厂家营业执照号")
    private String manufacturerBusinessLicense;
    @ApiModelProperty("发起企业名称")
    private String companyName;
    private String launchCompanyName;
    @ApiModelProperty("发起企业id")
    private String companyId;
    private String launchCompanyId;
    @ApiModelProperty("发起企业营业执照号")
    private String companyBusinessLicense;
    private String launchCompanyBusinessLicense;
    @ApiModelProperty("归属企业名称")
    private String companyName;
    @ApiModelProperty("归属企业id")
    private String companyId;
    @ApiModelProperty("有效期开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
    private String startTime;
@ -87,12 +91,28 @@ public class IotCompanyCertificateVO extends BaseVO implements Serializable {
        this.companyId = companyId;
    }
    public String getCompanyBusinessLicense() {
        return companyBusinessLicense;
    public String getLaunchCompanyName() {
        return launchCompanyName;
    }
    public void setLaunchCompanyName(String launchCompanyName) {
        this.launchCompanyName = launchCompanyName;
    }
    public String getLaunchCompanyId() {
        return launchCompanyId;
    }
    public void setLaunchCompanyId(String launchCompanyId) {
        this.launchCompanyId = launchCompanyId;
    }
    public String getLaunchCompanyBusinessLicense() {
        return launchCompanyBusinessLicense;
    }
    public void setCompanyBusinessLicense(String companyBusinessLicense) {
        this.companyBusinessLicense = companyBusinessLicense;
    public void setLaunchCompanyBusinessLicense(String launchCompanyBusinessLicense) {
        this.launchCompanyBusinessLicense = launchCompanyBusinessLicense;
    }
    public String getStartTime() {

+ 12 - 12
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/product/IotProductBaseInfoVO.java

@ -25,10 +25,10 @@ public class IotProductBaseInfoVO extends BaseVO implements Serializable {
    private String supplierName;
    @ApiModelProperty("厂商id")
    private String supplierId;
    @ApiModelProperty("代理商名称")
    private String agentName;
    @ApiModelProperty("代理商id")
    private String agentId;
    @ApiModelProperty("企业名称")
    private String companyName;
    @ApiModelProperty("企业id")
    private String companyId;
    @ApiModelProperty("产品类型")
    private String type;
    @ApiModelProperty("产品类型名称")
@ -102,20 +102,20 @@ public class IotProductBaseInfoVO extends BaseVO implements Serializable {
        this.supplierId = supplierId;
    }
    public String getAgentName() {
        return agentName;
    public String getCompanyName() {
        return companyName;
    }
    public void setAgentName(String agentName) {
        this.agentName = agentName;
    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }
    public String getAgentId() {
        return agentId;
    public String getCompanyId() {
        return companyId;
    }
    public void setAgentId(String agentId) {
        this.agentId = agentId;
    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }
    public String getType() {

+ 3 - 1
svr/svr-iot/src/main/java/com/yihu/iot/controller/company/IotCompanyController.java

@ -139,6 +139,8 @@ public class IotCompanyController extends EnvelopRestController {
    public Envelop<IotCompanyCertificateVO> findCompanyCertPage
            (@ApiParam(name = "name", value = "证书名称", defaultValue = "")
             @RequestParam(value = "name", required = false) String name,
             @ApiParam(name = "companyId", value = "企业id", defaultValue = "")
             @RequestParam(value = "companyId", required = false) String companyId,
             @ApiParam(name = "page", value = "第几页", defaultValue = "")
             @RequestParam(value = "page", required = false) Integer page,
             @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
@ -150,7 +152,7 @@ public class IotCompanyController extends EnvelopRestController {
            if(size == null){
                size = 10;
            }
            return iotCompanyCertificateService.queryPage(page,size,name);
            return iotCompanyCertificateService.queryPage(page,size,name,companyId);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());

+ 2 - 2
svr/svr-iot/src/main/java/com/yihu/iot/controller/device/IotPatientDeviceController.java

@ -195,7 +195,7 @@ public class IotPatientDeviceController extends EnvelopRestController{
        }
    }
    @PostMapping(value = IotRequestMapping.PatientDevice.findLocationByIdCard)
    @GetMapping(value = IotRequestMapping.PatientDevice.findLocationByIdCard)
    @ApiOperation(value = "根据idCard查询设备地址", notes = "根据idCard查询设备地址")
    public Envelop<List<LocationDataVO>> findDeviceLocationsByIdCard(@ApiParam(name = "jsonData", value = "jsonData", defaultValue = "")
                                                                     @RequestParam(value = "jsonData",required = true) String jsonData) {
@ -208,7 +208,7 @@ public class IotPatientDeviceController extends EnvelopRestController{
        }
    }
    @PostMapping(value = IotRequestMapping.PatientDevice.findLocationBySn)
    @GetMapping(value = IotRequestMapping.PatientDevice.findLocationBySn)
    @ApiOperation(value = "根据sn码查询设备地址", notes = "根据sn码查询设备地址")
    public Envelop<List<LocationDataVO>> findDeviceLocationsBySn(@ApiParam(name = "jsonData", value = "jsonData", defaultValue = "")
                                                                     @RequestParam(value = "jsonData",required = true) String jsonData) {

+ 17 - 13
svr/svr-iot/src/main/java/com/yihu/iot/controller/product/IotProductController.java

@ -35,15 +35,18 @@ public class IotProductController extends EnvelopRestController {
    @GetMapping(value = IotRequestMapping.Product.findProductPage)
    @ApiOperation(value = "分页查找产品", notes = "分页查找产品")
    public Envelop<IotProductBaseInfoVO> findCompanyPage(@ApiParam(name = "name", value = "注册证号或产品名称", defaultValue = "")
                                                 @RequestParam(value = "name", required = false) String name,
                                                         @ApiParam(name = "classify", value = "产品分类", defaultValue = "")
                                                 @RequestParam(value = "classify", required = false) String classify,
                                                         @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                 @RequestParam(value = "page", required = false) Integer page,
                                                         @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                 @RequestParam(value = "size", required = false) Integer size){
    @ApiOperation(value = "分页查1找产品", notes = "分页查找产品")
    public Envelop<IotProductBaseInfoVO> findCompanyPage(
            @ApiParam(name = "name", value = "注册证号或产品名称", defaultValue = "")
            @RequestParam(value = "name", required = false) String name,
            @ApiParam(name = "classify", value = "产品分类", defaultValue = "")
            @RequestParam(value = "classify", required = false) String classify,
            @ApiParam(name = "companyId", value = "企业id", defaultValue = "")
            @RequestParam(value = "companyId", required = false) String companyId,
            @ApiParam(name = "page", value = "第几页", defaultValue = "")
            @RequestParam(value = "page", required = false) Integer page,
            @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
            @RequestParam(value = "size", required = false) Integer size){
        try {
            if(page == null|| page < 0){
                page = 1;
@ -52,18 +55,19 @@ public class IotProductController extends EnvelopRestController {
                size = 10;
            }
            String filters = "";
            String semicolon = "";
            String semicolon = "del=1;";
            if(StringUtils.isNotBlank(name)){
                filters = "name?"+name+" g1;registerCertificate?"+name+" g1";
                semicolon = ";";
            }
            if(StringUtils.isNotBlank(companyId)){
                filters += semicolon +"companyId="+companyId;
                semicolon = ";";
            }
            if(StringUtils.isNotBlank(classify)){
                filters += semicolon +"productClassify="+classify;
                semicolon = ";";
            }
            if(StringUtils.isBlank(filters)){
                filters+= semicolon + "del=1";
            }
            String sorts = "-updateTime";
            //得到list数据
            List<IotProductBaseInfoDO> list = iotProductBaseInfoService.search(null, filters, sorts, page, size);

+ 9 - 2
svr/svr-iot/src/main/java/com/yihu/iot/service/company/IotCompanyCertificateService.java

@ -51,9 +51,13 @@ public class IotCompanyCertificateService extends BaseJpaService<IotCompanyCerti
     * @return
     * @throws ParseException
     */
    public Envelop<IotCompanyCertificateVO> queryPage(Integer page, Integer size,String name) throws ParseException {
    public Envelop<IotCompanyCertificateVO> queryPage(Integer page, Integer size,String name,String companyId) throws ParseException {
        String filters = "";
        String semicolon = "";
        if(StringUtils.isNotBlank(companyId)){
            filters = "companyId="+companyId;
            semicolon = ";";
        }
        if(StringUtils.isNotBlank(name)){
            filters = "name?"+name;
            semicolon = ";";
@ -83,11 +87,14 @@ public class IotCompanyCertificateService extends BaseJpaService<IotCompanyCerti
            //修改
            IotCompanyCertificateDO old = iotCompanyCertificateDao.findById(iotCompanyCertificateDO.getId());
            old.setManufacturerBusinessLicense(iotCompanyCertificateDO.getManufacturerBusinessLicense());
            old.setName(iotCompanyCertificateDO.getName());
            old.setManufacturerName(iotCompanyCertificateDO.getManufacturerName());
            old.setManufacturerId(iotCompanyCertificateDO.getManufacturerId());
            old.setCompanyName(iotCompanyCertificateDO.getCompanyName());
            old.setCompanyId(iotCompanyCertificateDO.getCompanyId());
            old.setCompanyBusinessLicense(iotCompanyCertificateDO.getCompanyBusinessLicense());
            old.setLaunchCompanyBusinessLicense(iotCompanyCertificateDO.getLaunchCompanyBusinessLicense());
            old.setLaunchCompanyId(iotCompanyCertificateDO.getLaunchCompanyId());
            old.setLaunchCompanyName(iotCompanyCertificateDO.getLaunchCompanyName());
            old.setStartTime(iotCompanyCertificateDO.getStartTime());
            old.setEndTime(iotCompanyCertificateDO.getEndTime());
            old.setCertificateOfAuthorizationImg(iotCompanyCertificateDO.getCertificateOfAuthorizationImg());

+ 4 - 0
svr/svr-iot/src/main/java/com/yihu/iot/service/device/IotPatientDeviceService.java

@ -67,6 +67,10 @@ public class IotPatientDeviceService extends BaseJpaService<IotPatientDeviceDO,I
            dataDTO.setDeviceSn(deviceVO.getDeviceSn());
            dataDTO.setIdCard(deviceVO.getIdcard());
            dataDTO.setDiseaseCondition(deviceVO.getDiseaseCondition());
            if(dataDTO.getDiseaseCondition()==null){
                //未定标的居民设置成-1
                dataDTO.setDiseaseCondition(-1);
            }
            Map<String, String> json = LatitudeUtils.getGeocoderLatitude(deviceVO.getAddress().replace("G.", "").replace("(糖友网)", "").replace("(高友网)", ""));
            if (json == null) {

+ 2 - 2
svr/svr-iot/src/main/java/com/yihu/iot/service/product/IotProductBaseInfoService.java

@ -81,8 +81,8 @@ public class IotProductBaseInfoService extends BaseJpaService<IotProductBaseInfo
        if("2".equals(baseInfoDO.getProductClassify())){
            //代理产品
            IotMaintenanceUnitVO vo2 = new IotMaintenanceUnitVO();
            vo2.setMaintenanceUnitId(baseInfoDO.getAgentId());
            vo2.setMaintenanceUnitName(baseInfoDO.getAgentName());
            vo2.setMaintenanceUnitId(baseInfoDO.getCompanyId());
            vo2.setMaintenanceUnitName(baseInfoDO.getCompanyName());
            voList.add(vo2);
        }
        return voList;

+ 2 - 2
svr/svr-iot/src/main/resources/application.yml

@ -29,14 +29,14 @@ spring:
  data:
    elasticsearch: #ElasticsearchProperties
      cluster-name: jkzl #默认即为elasticsearch  集群名
      cluster-nodes: 172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
      cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
      local: false #是否本地连接
      properties: # Additional properties used to configure the client.
        enable: true
  # JEST (Elasticsearch HTTP client) (JestProperties)
  elasticsearch:
    jest:
      uris: http://172.19.103.68:9200
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200
#      uris: http://172.19.103.68:9200
      connection-timeout: 60000 # Connection timeout in milliseconds.
      multi-threaded: true # Enable connection requests from multiple execution threads.

+ 3 - 1
web-gateway/src/main/java/com/yihu/jw/controller/iot/company/IotCompanyController.java

@ -99,11 +99,13 @@ public class IotCompanyController extends EnvelopRestController {
    public Envelop<IotCompanyCertificateVO> findCompanyCertPage
            (@ApiParam(name = "name", value = "证书名称", defaultValue = "")
             @RequestParam(value = "name", required = false) String name,
             @ApiParam(name = "companyId", value = "企业id", defaultValue = "")
             @RequestParam(value = "companyId", required = false) String companyId,
             @ApiParam(name = "page", value = "第几页", defaultValue = "")
             @RequestParam(value = "page", required = false) Integer page,
             @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
             @RequestParam(value = "size", required = false) Integer size){
        return iotCompanyFeign.findCompanyCertPage(name,page,size);
        return iotCompanyFeign.findCompanyCertPage(name,companyId,page,size);
    }
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertById)

+ 11 - 1
web-gateway/src/main/java/com/yihu/jw/controller/iot/device/IotPatientDeviceController.java

@ -6,6 +6,7 @@ import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.EnvelopRestController;
import com.yihu.jw.restmodel.iot.device.IotDeviceVO;
import com.yihu.jw.restmodel.iot.device.IotPatientDeviceVO;
import com.yihu.jw.restmodel.iot.device.LocationDataVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -13,6 +14,8 @@ import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * @author yeshijie on 2018/2/8.
 */
@ -27,7 +30,7 @@ public class IotPatientDeviceController extends EnvelopRestController{
    @PostMapping(value = IotRequestMapping.PatientDevice.addPatientDevice)
    @ApiOperation(value = "设备绑定", notes = "设备绑定")
    public Envelop<IotPatientDeviceVO> create(@ApiParam(name = "json_data", value = "", defaultValue = "")
    public Envelop<IotPatientDeviceVO> create(@ApiParam(name = "jsonData", value = "", defaultValue = "")
                                       @RequestParam String jsonData) {
        return iotPatientDeviceFeign.create(jsonData);
    }
@ -111,4 +114,11 @@ public class IotPatientDeviceController extends EnvelopRestController{
        return iotPatientDeviceFeign.updatePatientDevice(patient, deviceSN, newDeviceSN, userType, sim);
    }
    @GetMapping(value = IotRequestMapping.PatientDevice.findLocationByIdCard)
    @ApiOperation(value = "根据idCard查询设备地址", notes = "根据idCard查询设备地址")
    public Envelop<List<LocationDataVO>> findDeviceLocationsByIdCard(@ApiParam(name = "jsonData", value = "jsonData", defaultValue = "")
                                                                     @RequestParam(value = "jsonData",required = true) String jsonData) {
        return iotPatientDeviceFeign.findDeviceLocationsByIdCard(jsonData);
    }
}

+ 12 - 9
web-gateway/src/main/java/com/yihu/jw/controller/iot/product/IotProductController.java

@ -28,15 +28,18 @@ public class IotProductController extends EnvelopRestController {
    @GetMapping(value = IotRequestMapping.Product.findProductPage)
    @ApiOperation(value = "分页查找产品", notes = "分页查找产品")
    public Envelop<IotProductBaseInfoVO> findCompanyPage(@ApiParam(name = "name", value = "注册证号或产品名称", defaultValue = "")
                                                 @RequestParam(value = "name", required = false) String name,
                                                         @ApiParam(name = "classify", value = "产品分类", defaultValue = "")
                                                 @RequestParam(value = "classify", required = false) String classify,
                                                         @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                 @RequestParam(value = "page", required = false) Integer page,
                                                         @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                 @RequestParam(value = "size", required = false) Integer size){
        return iotProductFeign.findCompanyPage(name,classify,page,size);
    public Envelop<IotProductBaseInfoVO> findCompanyPage(
            @ApiParam(name = "name", value = "注册证号或产品名称", defaultValue = "")
            @RequestParam(value = "name", required = false) String name,
            @ApiParam(name = "classify", value = "产品分类", defaultValue = "")
            @RequestParam(value = "classify", required = false) String classify,
            @ApiParam(name = "companyId", value = "企业id", defaultValue = "")
            @RequestParam(value = "companyId", required = false) String companyId,
            @ApiParam(name = "page", value = "第几页", defaultValue = "")
            @RequestParam(value = "page", required = false) Integer page,
            @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
            @RequestParam(value = "size", required = false) Integer size){
        return iotProductFeign.findCompanyPage(name,classify,companyId,page,size);
    }
    @GetMapping(value = IotRequestMapping.Product.findProductPageByCompanyId)

+ 2 - 0
web-gateway/src/main/java/com/yihu/jw/feign/fallbackfactory/iot/company/IotCompanyFallbackFactory.java

@ -76,10 +76,12 @@ public class IotCompanyFallbackFactory implements FallbackFactory<IotCompanyFeig
            @Override
            public Envelop<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){
                tracer.getCurrentSpan().logEvent("分页获取企业证书失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("name:" + name);
                tracer.getCurrentSpan().logEvent("companyId:" + companyId);
                tracer.getCurrentSpan().logEvent("page:" + page);
                tracer.getCurrentSpan().logEvent("size:" + size);
                return null;

+ 4 - 7
web-gateway/src/main/java/com/yihu/jw/feign/fallbackfactory/iot/device/IotDeviceQualityFallbackFactory.java

@ -4,7 +4,6 @@ import com.yihu.jw.feign.iot.device.IotDeviceQualityFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceQualityInspectionPlanVO;
import feign.hystrix.FallbackFactory;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
@ -23,16 +22,14 @@ public class IotDeviceQualityFallbackFactory implements FallbackFactory<IotDevic
        return new IotDeviceQualityFeign() {
            @Override
            public Envelop<IotDeviceQualityInspectionPlanVO> create(@ApiParam(name = "jsonData", value = "", defaultValue = "")
                                                                    @RequestParam(value = "jsonData", required = true) String jsonData) {
            public Envelop<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(@ApiParam(name = "id", value = "id")
                                                                        @RequestParam(value = "id", required = true) String id
            public Envelop<IotDeviceQualityInspectionPlanVO> findByCode(@RequestParam(value = "id", required = true) String id
            ) {
                tracer.getCurrentSpan().logEvent("查找质检计划失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
@ -53,8 +50,8 @@ public class IotDeviceQualityFallbackFactory implements FallbackFactory<IotDevic
            }
            @Override
            public Envelop<IotDeviceQualityInspectionPlanVO> delQualityPlan(@ApiParam(name = "id", value = "id")
                                                                        @RequestParam(value = "id", required = true) String id) {
            public Envelop<IotDeviceQualityInspectionPlanVO> delQualityPlan(
                    @RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("删除质检计划失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;

+ 13 - 21
web-gateway/src/main/java/com/yihu/jw/feign/fallbackfactory/iot/device/IotPatientDeviceFallbackFactory.java

@ -4,13 +4,15 @@ import com.yihu.jw.feign.iot.device.IotPatientDeviceFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceVO;
import com.yihu.jw.restmodel.iot.device.IotPatientDeviceVO;
import com.yihu.jw.restmodel.iot.device.LocationDataVO;
import feign.hystrix.FallbackFactory;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
 * @author yeshijie on 2018/2/8.
 */
@ -25,8 +27,8 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
        return new IotPatientDeviceFeign() {
            @Override
            public Envelop<IotPatientDeviceVO> create(@ApiParam(name = "json_data", value = "", defaultValue = "")
                                                      @RequestParam String jsonData) {
            public Envelop<IotPatientDeviceVO> create(
                    @RequestParam String jsonData) {
                tracer.getCurrentSpan().logEvent("设备绑定失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
@ -34,9 +36,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            @Override
            public Envelop<IotPatientDeviceVO> findByDeviceSnAndUserType(
                    @ApiParam(name = "deviceSn", value = "sn码", defaultValue = "")
                    @RequestParam(value = "deviceSn",required = true) String deviceSn,
                    @ApiParam(name = "userType", value = "按键号", defaultValue = "")
                    @RequestParam(value = "userType",required = true) String userType) {
                tracer.getCurrentSpan().logEvent("按sn码和按键号查找失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("deviceSn:" + deviceSn);
@ -46,7 +46,6 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            @Override
            public Envelop<IotPatientDeviceVO> findByPatient(
                    @ApiParam(name = "patient", value = "居民code", defaultValue = "")
                    @RequestParam(value = "patient",required = true) String patient) {
                tracer.getCurrentSpan().logEvent("按居民code查找失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("patient:" + patient);
@ -55,9 +54,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            @Override
            public Envelop<IotPatientDeviceVO> findByPatientAndDeviceSn(
                    @ApiParam(name = "patient", value = "居民code", defaultValue = "")
                    @RequestParam(value = "patient",required = true) String patient,
                    @ApiParam(name = "deviceSn", value = "sn码", defaultValue = "")
                    @RequestParam(value = "deviceSn",required = true) String deviceSn) {
                tracer.getCurrentSpan().logEvent("按居民和sn码查找失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("patient:" + patient);
@ -67,11 +64,8 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            @Override
            public Envelop<IotDeviceVO> findListByPatient(
                    @ApiParam(name = "patient", value = "居民code", defaultValue = "")
                    @RequestParam(value = "patient", required = true) String patient,
                    @ApiParam(name = "page", value = "第几页", defaultValue = "")
                    @RequestParam(value = "page", required = true) Integer page,
                    @ApiParam(name = "pagesize", value = "页面大小", defaultValue = "")
                    @RequestParam(value = "pagesize", required = true) Integer pagesize){
                tracer.getCurrentSpan().logEvent("按居民分页查找失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("patient:" + patient);
@ -82,9 +76,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            @Override
            public Envelop<IotPatientDeviceVO> findByDeviceSnAndCategoryCode(
                    @ApiParam(name = "categoryCode", value = "设备类型", defaultValue = "")
                    @RequestParam(value = "categoryCode",required = true) String categoryCode,
                    @ApiParam(name = "deviceSn", value = "sn码", defaultValue = "")
                    @RequestParam(value = "deviceSn",required = true) String deviceSn) {
                tracer.getCurrentSpan().logEvent("按sn码和设备类型查找失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("categoryCode:" + categoryCode);
@ -94,11 +86,8 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            @Override
            public Envelop<IotPatientDeviceVO> findByDeviceSnAndCategoryCodeAndUserType(
                    @ApiParam(name = "deviceSn", value = "sn码", defaultValue = "")
                    @RequestParam(value = "deviceSn",required = true) String deviceSn,
                    @ApiParam(name = "categoryCode", value = "设备类型", defaultValue = "")
                    @RequestParam(value = "categoryCode",required = true) String categoryCode,
                    @ApiParam(name = "userType", value = "按键号", defaultValue = "")
                    @RequestParam(value = "userType",required = true) String userType) {
                tracer.getCurrentSpan().logEvent("按sn码,设备类型及按键号查找失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("categoryCode:" + categoryCode);
@ -109,15 +98,10 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            @Override
            public Envelop<IotPatientDeviceVO> updatePatientDevice(
                    @ApiParam(name = "patient", value = "sn码", defaultValue = "")
                    @RequestParam(value = "patient",required = true) String patient,
                    @ApiParam(name = "deviceSN", value = "设备类型", defaultValue = "")
                    @RequestParam(value = "deviceSN",required = true) String deviceSN,
                    @ApiParam(name = "newDeviceSN", value = "设备类型", defaultValue = "")
                    @RequestParam(value = "newDeviceSN",required = true) String newDeviceSN,
                    @ApiParam(name = "userType", value = "sn码", defaultValue = "")
                    @RequestParam(value = "userType",required = true) String userType,
                    @ApiParam(name = "sim", value = "按键号", defaultValue = "")
                    @RequestParam(value = "sim",required = true) String sim) {
                tracer.getCurrentSpan().logEvent("更换患者绑定的血糖仪失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("patient:" + patient);
@ -128,6 +112,14 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
                return null;
            }
            @Override
            public Envelop<List<LocationDataVO>> findDeviceLocationsByIdCard(
                    @RequestParam(value = "jsonData",required = true) String jsonData) {
                tracer.getCurrentSpan().logEvent("查询设备地址失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
        };
    }

+ 2 - 0
web-gateway/src/main/java/com/yihu/jw/feign/fallbackfactory/iot/product/IotProductFallbackFactory.java

@ -28,11 +28,13 @@ public class IotProductFallbackFactory implements FallbackFactory<IotProductFeig
            public Envelop<IotProductBaseInfoVO> findCompanyPage(
                    @RequestParam(value = "name", required = false) String name,
                    @RequestParam(value = "classify", required = false) String classify,
                    @RequestParam(value = "companyId", required = false) String companyId,
                    @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("classify:" + classify);
                tracer.getCurrentSpan().logEvent("companyId:" + companyId);
                tracer.getCurrentSpan().logEvent("page:" + page);
                tracer.getCurrentSpan().logEvent("size:" + size);
                return null;

+ 1 - 0
web-gateway/src/main/java/com/yihu/jw/feign/iot/company/IotCompanyFeign.java

@ -49,6 +49,7 @@ public interface IotCompanyFeign {
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertPage)
    public Envelop<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);

+ 5 - 0
web-gateway/src/main/java/com/yihu/jw/feign/iot/device/IotPatientDeviceFeign.java

@ -5,6 +5,7 @@ import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceVO;
import com.yihu.jw.restmodel.iot.device.IotPatientDeviceVO;
import com.yihu.jw.restmodel.iot.device.LocationDataVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@ -12,6 +13,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
 * @author yeshijie on 2018/2/8.
 */
@ -64,4 +67,6 @@ public interface IotPatientDeviceFeign{
            @RequestParam(value = "userType",required = true) String userType,
            @RequestParam(value = "sim",required = true) String sim);
    @GetMapping(value = IotRequestMapping.PatientDevice.findLocationByIdCard)
    public Envelop<List<LocationDataVO>> findDeviceLocationsByIdCard(@RequestParam(value = "jsonData",required = true) String jsonData);
}

+ 1 - 0
web-gateway/src/main/java/com/yihu/jw/feign/iot/product/IotProductFeign.java

@ -27,6 +27,7 @@ public interface IotProductFeign{
    public Envelop<IotProductBaseInfoVO> findCompanyPage(
            @RequestParam(value = "name", required = false) String name,
            @RequestParam(value = "classify", required = false) String classify,
            @RequestParam(value = "companyId", required = false) String companyId,
            @RequestParam(value = "page", required = false) Integer page,
            @RequestParam(value = "size", required = false) Integer size);