liubing 4 роки тому
батько
коміт
0f6dcdd238

+ 17 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/iot/equipment/IotEquipmentDetailDO.java

@ -2,6 +2,7 @@ package com.yihu.jw.entity.iot.equipment;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@ -11,67 +12,83 @@ public class IotEquipmentDetailDO extends UuidIdentityEntityWithOperator {
    /*
     *设备名称
     */
    @Column(name = "device_name")
    private String deviceName;
    /*
     *设备型号
     */
    @Column(name = "device_model")
    private String deviceModel;
    /*
     *设备编码
     */
    @Column(name = "device_code")
    private String deviceCode;
    /*
     *品牌
     */
    @Column(name = "manufacturer_code")
    private String manufacturerCode;
    /*
     *厂商名称
     */
    @Column(name = "manufacturer")
    private String manufacturer;
    /*
     *厂商地址
     */
    @Column(name = "address")
    private String address;
    /*
     *代表人
     */
    @Column(name = "representative")
    private String representative;
    /*
     *申请人
     */
    @Column(name = "applicant_name")
    private String applicantName;
    /*
     *申请人电话
     */
    @Column(name = "applicant_tel")
    private String applicantTel;
    /*
     *'所属居委会编码
     */
    @Column(name = "neighborhood_committee_code")
    private String neighborhoodCommitteeCode;
    /*
     *所属居委会名称
     */
    @Column(name = "neighborhood_committee_name")
    private String neighborhoodCommitteeName;
    /*
     *地址
     */
    @Column(name = "local_add")
    private String localAdd;
    /*
     *所属区域code
     */
    @Column(name = "belong_are_code")
    private String belongAreCode;
    /*
     *所属区域
     */
    @Column(name = "belong_are")
    private String belongAre;
    /*
     *经度
     */
    @Column(name = "longitude")
    private String longitude;
    /*
     *纬度
     */
    @Column(name = "latitude")
    private String latitude;

+ 27 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/config/MultipartConfig.java

@ -0,0 +1,27 @@
package com.yihu.jw.base.config;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.MultipartConfigElement;
import java.io.*;
/**
 * Created by liub on 2020/9/8.
 */
@Configuration
public class MultipartConfig {
    @Bean
    MultipartConfigElement multipartConfigElement() {
        MultipartConfigFactory factory = new MultipartConfigFactory();
        File tmpFile = new File("/data/apps/temp");
        if (!tmpFile.exists()) {
            tmpFile.mkdirs();
        }
        factory.setLocation("/data/apps/temp");
        return factory.createMultipartConfig();
    }
}

+ 1 - 0
svr/svr-iot/src/main/java/com/yihu/iot/controller/monitorPlatform/MonitorPlatformController.java

@ -665,6 +665,7 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
        return success( iotEqtDetailService.getHosptital(name, code, town,city));
    }
    @GetMapping(value = IotRequestMapping.Common.getNameAndCode)
    @ApiOperation(value = "查询idcard")
    public Envelop getByIdCard(

+ 3 - 1
svr/svr-iot/src/main/java/com/yihu/iot/service/monitorPlatform/MonitorPlatformService.java

@ -969,7 +969,9 @@ public class MonitorPlatformService  {
        try {
            IotEquipmentDetailDO iotEquipmentDetailDO= iotEquipmentDetailDao.findByDeviceCode(deviceSn);
            JSONObject obj = (JSONObject)JSONObject.toJSON(iotEquipmentDetailDO);
            obj.put("deviceSn",iotEquipmentDetailDO.getDeviceCode());
            if(iotEquipmentDetailDO!=null){
                obj.put("deviceSn",iotEquipmentDetailDO.getDeviceCode());
            }
            return obj;
        }catch (Exception e){
            e.printStackTrace();

+ 1 - 1
svr/svr-iot/src/main/resources/bootstrap.yml

@ -1,6 +1,6 @@
spring:
  application:
    name:  svr-iot-lb
    name:  svr-iot
  cloud:
    config:
      failFast: true