Forráskód Böngészése

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

LAPTOP-KB9HII50\70708 1 éve
szülő
commit
a9acafec8e
29 módosított fájl, 1272 hozzáadás és 422 törlés
  1. 17 5
      business/base-service/src/main/java/com/yihu/jw/article/service/BaseMenuManageService.java
  2. 2 1
      business/base-service/src/main/java/com/yihu/jw/contant/CommonContant.java
  3. 2 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionExpressageService.java
  4. 11 0
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotDeviceDO.java
  5. 123 3
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotPatientDeviceDO.java
  6. 7 6
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/product/IotProductBaseInfoPropertyDO.java
  7. 4 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/iot/IotRequestMapping.java
  8. 56 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/device/IotPatientDeviceVO.java
  9. 49 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/device/WlyyDeviceVO.java
  10. 48 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/device/WlyyPatientDeviceVO.java
  11. 116 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/patient/PatientInfoVO.java
  12. 70 5
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/product/IotProductBaseInfoPropertyVO.java
  13. 7 2
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/AesEncryptUtils.java
  14. 2 1
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java
  15. 2 2
      svr/svr-cloud-care/pom.xml
  16. 2 2
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/article/ArticleDictEndpoint.java
  17. 2 2
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java
  18. 30 8
      svr/svr-iot/src/main/java/com/yihu/iot/controller/device/IotDeviceController.java
  19. 58 17
      svr/svr-iot/src/main/java/com/yihu/iot/controller/device/IotPatientDeviceController.java
  20. 28 5
      svr/svr-iot/src/main/java/com/yihu/iot/controller/device/WlyyDeviceController.java
  21. 13 3
      svr/svr-iot/src/main/java/com/yihu/iot/controller/product/IotProductController.java
  22. 2 1
      svr/svr-iot/src/main/java/com/yihu/iot/dao/device/IotDeviceDao.java
  23. 3 1
      svr/svr-iot/src/main/java/com/yihu/iot/dao/product/IotProductBaseInfoDao.java
  24. 4 0
      svr/svr-iot/src/main/java/com/yihu/iot/dao/product/IotProductBaseInfoPropertyDao.java
  25. 153 101
      svr/svr-iot/src/main/java/com/yihu/iot/service/device/IotDeviceService.java
  26. 308 213
      svr/svr-iot/src/main/java/com/yihu/iot/service/device/IotPatientDeviceService.java
  27. 116 35
      svr/svr-iot/src/main/java/com/yihu/iot/service/device/WlyyDeviceService.java
  28. 33 7
      svr/svr-iot/src/main/java/com/yihu/iot/service/product/IotProductBaseInfoPropertyService.java
  29. 4 1
      svr/svr-iot/src/main/java/com/yihu/iot/service/product/IotProductBaseInfoService.java

+ 17 - 5
business/base-service/src/main/java/com/yihu/jw/article/service/BaseMenuManageService.java

@ -360,6 +360,18 @@ public class BaseMenuManageService {
                menuOld.setUpdateTime(new Date());
                menuOld.setIsDel("1");
                menuDO = baseMenuDictDao.save(menuOld);
                List<KnowledgeArticleDictDO> knowledgeArticleDictDOS = knowledgeArticleDictDao.findByCategory(menuDO.getId());
                for (KnowledgeArticleDictDO articleDictDO:knowledgeArticleDictDOS){
                    if (!menuDO.getParentId().equalsIgnoreCase("0")){
                        articleDictDO.setCategoryFirst(menuDO.getParentId());
                        BaseMenuDictDO menuDictDO =baseMenuDictDao.findOne(menuDO.getParentId());
                        articleDictDO.setCategoryFirstName(menuDictDO.getName());
                        articleDictDO.setCategorySecondName(menuDO.getName());
                    }else {
                        articleDictDO.setCategoryFirstName(menuDO.getName());
                    }
                    knowledgeArticleDictDao.save(articleDictDO);
                }
            }
        }else {
            if (!"0".equalsIgnoreCase(menuDO.getParentId())){
@ -764,11 +776,11 @@ public class BaseMenuManageService {
        }
        List<KnowledgeArticleDictDO> listnew = new ArrayList<>();
        BeanUtils.copyProperties(listnew,list);
        if(!"1".equals(isContent)){
        /*if(!"1".equals(isContent)){
            for (KnowledgeArticleDictDO dictDO:list){
                dictDO.setContent(null);
            }
        }
        }*/
        MixEnvelop mixEnvelop = new MixEnvelop();
        mixEnvelop.setTotalCount(count);
@ -955,7 +967,7 @@ public class BaseMenuManageService {
                "\tkad.category_second_name as categorySecondName \n" +
                "FROM\n" +
                "\twlyy_knowledge_article_user kau\n" +
                "LEFT JOIN wlyy_knowledge_article_dict kad ON kad.id = kau.relation_code\n" +
                "LEFT JOIN wlyy_knowledge_article_dict kad ON kad.id = kau.relation_code and kad.del=1 \n" +
                "WHERE\n" +
                "\tkau.user_code = '"+userCode+"' AND kad.category_second IN(SELECT md.id from base_menu_dict md where md.status=1 and md.is_del= 1) AND kad.category_first IN(SELECT md.parent_id from base_menu_dict md where md.status=1 and md.is_del= 1) ";
        String condition = "";
@ -974,7 +986,7 @@ public class BaseMenuManageService {
        if (flag==5){
            condition+=" and kau.is_read = "+status;
        }
        condition += "  GROUP BY kad.category_first ";
        condition += "  GROUP BY kad.category_first,kad.category_second ";
        List<Map<String,Object>> mapList = jdbcTemplate.queryForList(sql+condition);
        return mapList;
    }
@ -1007,7 +1019,7 @@ public class BaseMenuManageService {
                "\tkad.source as source \n" +
                "FROM\n" +
                "\twlyy_knowledge_article_user kau\n" +
                "LEFT JOIN wlyy_knowledge_article_dict kad ON kad.id = kau.relation_code  \n" +
                "LEFT JOIN wlyy_knowledge_article_dict kad ON kad.id = kau.relation_code and kad.del=1 \n" +
                "WHERE\n" +
                "\tkau.user_code = '"+userCode+"' AND kad.category_second IN(SELECT md.id from base_menu_dict md where md.status=1 and md.is_del= 1) AND kad.category_first IN(SELECT md.parent_id from base_menu_dict md where md.status=1 and md.is_del= 1)  ";
        String condition = "";

+ 2 - 1
business/base-service/src/main/java/com/yihu/jw/contant/CommonContant.java

@ -48,5 +48,6 @@ public class CommonContant {
    /**
     * 文章审核员
     */
    public static final String DR_ARTICLEREVIEWER = "articleReviewer";
    public static final String DR_ARTICLEREVIEWER = "admin";
  /*  public static final String DR_ARTICLEREVIEWER = "articleReviewer";*/
}

+ 2 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionExpressageService.java

@ -582,7 +582,8 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
            for (WlyyPrescriptionExpressageLogDO pushlog: pushSFLogs) {
                //判断是否有已收件的路由节点
                if("80".equals(pushlog.getOpCode())||"8000".equals(pushlog.getOpCode())||"130".equals(pushlog.getOpCode())){
                if("80".equals(pushlog.getOpCode())||"8000".equals(pushlog.getOpCode())||"130".equals(pushlog.getOpCode())
                        ||"44".equals(pushlog.getOpCode())){
                    isContainEndRoutInfo = true;
                }

+ 11 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotDeviceDO.java

@ -101,6 +101,17 @@ public class IotDeviceDO extends UuidIdentityEntity implements Serializable {
    private String updateUser;
    private String updateUserName;
    @Column(name = "device_unique_code")
    private String deviceUniqueCode;//设备唯一码'
    public String getDeviceUniqueCode() {
        return deviceUniqueCode;
    }
    public void setDeviceUniqueCode(String deviceUniqueCode) {
        this.deviceUniqueCode = deviceUniqueCode;
    }
    public enum DeviceStatus {
        normal("正常", "1"),
        scrap("报废", "2"),

+ 123 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotPatientDeviceDO.java

@ -62,17 +62,137 @@ public class IotPatientDeviceDO extends UuidIdentityEntityWithOperator implement
    private String damageImages;//申请维修附件图片,多个用逗号隔开
    @Column(name = "repair_description")
    private String repairDescription;//维修说明
    @Column(name = "property_name")
    private Integer propertyName; //设备通用名称
    private String propertyName; //设备通用名称
    @Column(name = "property_combination")
    private String propertyCombination;  //组合访视
    @Column(name = "property_use")
    private String propertyUse;//用途
    @Column(name = "property_network")
    private String propertyNetwork;//网络传输
    @Column(name = "property_location")
    private String propertyLocation;//投放位置
    @Column(name = "address")
    private String  address;//居民地址
    @Column(name = "receive_org_code")
    private String  receiveOrgCode;//领用机构code
    @Column(name = "receive_org_name")
    private String  receiveOrgName;//领用机构名称
    @Column(name = "receive_org_contact_name")
    private String  receiveOrgContactName;//领用机构联系人
    @Column(name = "receive_org_contact_tel")
    private String  receiveOrgContactTel;//领用机构电话
    @Column(name = "receive_org_address")
    private String  receiveOrgAddress;//领用机构电话
    @Column(name = "iot_iccid")
    private String  iotIccid;//物联网卡ICCID
    @Column(name = "iot_imsi")
    private String  iotImsi;//物联网卡IMSI
    @Column(name = "device_unique_code")
    private String  deviceUniqueCode;//设备唯一码
    @Column(name = "product_id")
    private String productId;//产品id
    @Column(name = "product_name")
    private String productName;//产品名称
    public String getProductName() {
        return productName;
    }
    public void setProductName(String productName) {
        this.productName = productName;
    }
    public String getProductId() {
        return productId;
    }
    public void setProductId(String productId) {
        this.productId = productId;
    }
    public String getDeviceUniqueCode() {
        return deviceUniqueCode;
    }
    public void setDeviceUniqueCode(String deviceUniqueCode) {
        this.deviceUniqueCode = deviceUniqueCode;
    }
    public String getIotIccid() {
        return iotIccid;
    }
    public void setIotIccid(String iotIccid) {
        this.iotIccid = iotIccid;
    }
    public String getIotImsi() {
        return iotImsi;
    }
    public void setIotImsi(String iotImsi) {
        this.iotImsi = iotImsi;
    }
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    public String getReceiveOrgCode() {
        return receiveOrgCode;
    }
    public void setReceiveOrgCode(String receiveOrgCode) {
        this.receiveOrgCode = receiveOrgCode;
    }
    public String getReceiveOrgName() {
        return receiveOrgName;
    }
    public void setReceiveOrgName(String receiveOrgName) {
        this.receiveOrgName = receiveOrgName;
    }
    public String getReceiveOrgContactName() {
        return receiveOrgContactName;
    }
    public void setReceiveOrgContactName(String receiveOrgContactName) {
        this.receiveOrgContactName = receiveOrgContactName;
    }
    public String getReceiveOrgContactTel() {
        return receiveOrgContactTel;
    }
    public void setReceiveOrgContactTel(String receiveOrgContactTel) {
        this.receiveOrgContactTel = receiveOrgContactTel;
    }
    public String getReceiveOrgAddress() {
        return receiveOrgAddress;
    }
    public void setReceiveOrgAddress(String receiveOrgAddress) {
        this.receiveOrgAddress = receiveOrgAddress;
    }
    public String getSaasId() {
        return saasId;
@ -253,11 +373,11 @@ public class IotPatientDeviceDO extends UuidIdentityEntityWithOperator implement
        this.repairDescription = repairDescription;
    }
    public Integer getPropertyName() {
    public String getPropertyName() {
        return propertyName;
    }
    public void setPropertyName(Integer propertyName) {
    public void setPropertyName(String propertyName) {
        this.propertyName = propertyName;
    }

+ 7 - 6
common/common-entity/src/main/java/com/yihu/jw/entity/iot/product/IotProductBaseInfoPropertyDO.java

@ -16,14 +16,15 @@ import java.io.Serializable;
@Entity
@Table(name = "iot_product_base_info_property")
public class IotProductBaseInfoPropertyDO extends UuidIdentityEntityWithOperator implements Serializable {
    @Column(name = "product_id")
    private String productId;
    @Column(name = "name")
    private String name;
    @Column(name = "combination")
    private String combination;
    @Column(name = "use")
    private String use;
    @Column(name = "device_use")
    private String deviceUse;
    @Column(name = "network")
    private String network;
    @Column(name = "location")
@ -55,12 +56,12 @@ public class IotProductBaseInfoPropertyDO extends UuidIdentityEntityWithOperator
        this.combination = combination;
    }
    public String getUse() {
        return use;
    public String getDeviceUse() {
        return deviceUse;
    }
    public void setUse(String use) {
        this.use = use;
    public void setDeviceUse(String deviceUse) {
        this.deviceUse = deviceUse;
    }
    public String getNetwork() {

+ 4 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/iot/IotRequestMapping.java

@ -212,6 +212,9 @@ public class IotRequestMapping {
        public static final String getOverhaulListByPatientDeviceId = "getOverhaulListByPatientDeviceId";
        public static final String delOverhaulByPatientDeviceId = "delOverhaulByPatientDeviceId";
        public static final String updateOverhaulStatusById = "updateOverhaulStatusById";
        //居民信息
        public static final String findPatientInfo = "findPatientInfo";
    }
@ -246,6 +249,7 @@ public class IotRequestMapping {
        public static final String api_queryPage = "queryDevicePage";
        public static final String api_getList = "getDeviceList";
        public static final String api_findByDeviceSn = "findByDeviceSn";
        public static final String findFreeDevice = "findFreeDevice";//根据产品id获取一个空闲设备
        //设备库存
        public static final String getDeviceInventoryList = "getDeviceInventoryList";

+ 56 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/device/IotPatientDeviceVO.java

@ -5,6 +5,7 @@ import com.yihu.jw.restmodel.iot.common.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.Column;
import java.io.Serializable;
/**
@ -67,6 +68,7 @@ public class IotPatientDeviceVO extends BaseVO implements Serializable {
    private String sim;
    @ApiModelProperty("领用协议,多个用逗号隔开")
    private String imgs;
    @ApiModelProperty("设备通用名")
    private String propertyName;
    @ApiModelProperty("组合方式")
@ -78,6 +80,60 @@ public class IotPatientDeviceVO extends BaseVO implements Serializable {
    @ApiModelProperty("投放位置")
    private String propertyLocation;
    @ApiModelProperty("物联网卡ICCID")
    private String  iotIccid;
    @ApiModelProperty("物联网卡IMSI")
    private String  iotImsi;
    @ApiModelProperty("设备唯一码")
    private String  deviceUniqueCode;
    @ApiModelProperty(name = "product_id")
    private String productId;//产品id
    @ApiModelProperty(name = "product_name")
    private String productName;//产品名称
    public String getProductName() {
        return productName;
    }
    public void setProductName(String productName) {
        this.productName = productName;
    }
    public String getProductId() {
        return productId;
    }
    public void setProductId(String productId) {
        this.productId = productId;
    }
    public String getDeviceUniqueCode() {
        return deviceUniqueCode;
    }
    public void setDeviceUniqueCode(String deviceUniqueCode) {
        this.deviceUniqueCode = deviceUniqueCode;
    }
    public String getIotImsi() {
        return iotImsi;
    }
    public void setIotImsi(String iotImsi) {
        this.iotImsi = iotImsi;
    }
    public String getIotIccid() {
        return iotIccid;
    }
    public void setIotIccid(String iotIccid) {
        this.iotIccid = iotIccid;
    }
    public String getPatient() {
        return patient;
    }

+ 49 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/device/WlyyDeviceVO.java

@ -2,6 +2,7 @@ package com.yihu.jw.restmodel.iot.device;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
@ -44,6 +45,14 @@ public class WlyyDeviceVO {
    private String neighborhoodCommitteeCode;//居委会code
    private String neighborhoodCommitteeName;//居委会name
    //补充字段
    private String propertyName;//设备通用名
    private String propertyCombination;//组合方式
    private String propertyUse;//用途
    private String propertyNetwork;//网络传输
    private String propertyLocation;//投放位置
    /** default constructor */
    public WlyyDeviceVO() {
    }
@ -70,6 +79,46 @@ public class WlyyDeviceVO {
        this.applicantMail = applicantMail;
    }
    public String getPropertyName() {
        return propertyName;
    }
    public void setPropertyName(String propertyName) {
        this.propertyName = propertyName;
    }
    public String getPropertyCombination() {
        return propertyCombination;
    }
    public void setPropertyCombination(String propertyCombination) {
        this.propertyCombination = propertyCombination;
    }
    public String getPropertyUse() {
        return propertyUse;
    }
    public void setPropertyUse(String propertyUse) {
        this.propertyUse = propertyUse;
    }
    public String getPropertyNetwork() {
        return propertyNetwork;
    }
    public void setPropertyNetwork(String propertyNetwork) {
        this.propertyNetwork = propertyNetwork;
    }
    public String getPropertyLocation() {
        return propertyLocation;
    }
    public void setPropertyLocation(String propertyLocation) {
        this.propertyLocation = propertyLocation;
    }
    public Long getId() {
        return id;
    }

+ 48 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/device/WlyyPatientDeviceVO.java

@ -1,6 +1,7 @@
package com.yihu.jw.restmodel.iot.device;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
@ -31,6 +32,13 @@ public class WlyyPatientDeviceVO {
	private String iccid;//设备物联卡iccid
	private String imsi;//设备物联卡imsi
	private String manufacturer;//厂家名称
	private String propertyName;//设备通用名
	private String propertyCombination;//组合方式
	private String propertyUse;//用途
	private String propertyNetwork;//网络传输
	private String propertyLocation;//投放位置
	
	public Integer getId() {
		return id;
@ -200,4 +208,44 @@ public class WlyyPatientDeviceVO {
	public void setManufacturer(String manufacturer) {
		this.manufacturer = manufacturer;
	}
	public String getPropertyName() {
		return propertyName;
	}
	public void setPropertyName(String propertyName) {
		this.propertyName = propertyName;
	}
	public String getPropertyCombination() {
		return propertyCombination;
	}
	public void setPropertyCombination(String propertyCombination) {
		this.propertyCombination = propertyCombination;
	}
	public String getPropertyUse() {
		return propertyUse;
	}
	public void setPropertyUse(String propertyUse) {
		this.propertyUse = propertyUse;
	}
	public String getPropertyNetwork() {
		return propertyNetwork;
	}
	public void setPropertyNetwork(String propertyNetwork) {
		this.propertyNetwork = propertyNetwork;
	}
	public String getPropertyLocation() {
		return propertyLocation;
	}
	public void setPropertyLocation(String propertyLocation) {
		this.propertyLocation = propertyLocation;
	}
}

+ 116 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/patient/PatientInfoVO.java

@ -0,0 +1,116 @@
package com.yihu.jw.restmodel.iot.patient;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yihu.jw.restmodel.iot.common.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
 * 居民信息
 */
@JsonInclude(JsonInclude.Include.ALWAYS)
@ApiModel(value = "居民信息", description = "居民信息")
public class PatientInfoVO extends BaseVO implements Serializable {
    @ApiModelProperty("居民code")
    private String patient;
    @ApiModelProperty("居民姓名")
    private String patientName;
    @ApiModelProperty("居民身份证")
    private String idcard;
    @ApiModelProperty("家庭地址")
    private String address;
    @ApiModelProperty("居民联系方式")
    private String tel;
    @ApiModelProperty("签约医生code")
    private String doctor;
    @ApiModelProperty("签约医生code")
    private String doctorName;
    @ApiModelProperty("签约社区code")
    private String hospital;
    @ApiModelProperty("签约社区code")
    private String hospitalName;
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    public String getPatientName() {
        return patientName;
    }
    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    public String getTel() {
        return tel;
    }
    public void setTel(String tel) {
        this.tel = tel;
    }
    public String getDoctor() {
        return doctor;
    }
    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }
    public String getDoctorName() {
        return doctorName;
    }
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }
    public String getHospital() {
        return hospital;
    }
    public void setHospital(String hospital) {
        this.hospital = hospital;
    }
    public String getHospitalName() {
        return hospitalName;
    }
    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }
}

+ 70 - 5
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/product/IotProductBaseInfoPropertyVO.java

@ -17,21 +17,86 @@ import java.io.Serializable;
@JsonInclude(JsonInclude.Include.ALWAYS)
@ApiModel(description = "产品属性表")
public class IotProductBaseInfoPropertyVO extends BaseVO implements Serializable {
    @ApiModelProperty("id")
    private String id;
    @ApiModelProperty("产品id")
    private String productId;
    @ApiModelProperty("设备通用名")
    private String name;
    private String nameCode;
    @ApiModelProperty("组合方式")
    private String combination;
    private String combinationCode;
    @ApiModelProperty("用途")
    private String use;
    private String deviceUse;
    private String deviceUseCode;
    @ApiModelProperty("网络传输")
    private String network;
    private String networkCode;
    @ApiModelProperty("投放位置")
    private String location;
    private String locationCode;
    @ApiModelProperty("数据采集字典")
    private String dictionaries;
    public String getNameCode() {
        return nameCode;
    }
    public void setNameCode(String nameCode) {
        this.nameCode = nameCode;
    }
    public String getCombinationCode() {
        return combinationCode;
    }
    public void setCombinationCode(String combinationCode) {
        this.combinationCode = combinationCode;
    }
    public String getDeviceUseCode() {
        return deviceUseCode;
    }
    public void setDeviceUseCode(String deviceUseCode) {
        this.deviceUseCode = deviceUseCode;
    }
    public String getNetworkCode() {
        return networkCode;
    }
    public void setNetworkCode(String networkCode) {
        this.networkCode = networkCode;
    }
    public String getLocationCode() {
        return locationCode;
    }
    public void setLocationCode(String locationCode) {
        this.locationCode = locationCode;
    }
    @Override
    public String getId() {
        return id;
    }
    @Override
    public void setId(String id) {
        this.id = id;
    }
    public String getProductId() {
        return productId;
    }
@ -56,12 +121,12 @@ public class IotProductBaseInfoPropertyVO extends BaseVO implements Serializable
        this.combination = combination;
    }
    public String getUse() {
        return use;
    public String getDeviceUse() {
        return deviceUse;
    }
    public void setUse(String use) {
        this.use = use;
    public void setDeviceUse(String deviceUse) {
        this.deviceUse = deviceUse;
    }
    public String getNetwork() {

+ 7 - 2
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/AesEncryptUtils.java

@ -67,12 +67,17 @@ public class AesEncryptUtils {
        map.put("idcard","350322198812052545");
        map.put("price","1");
        map.put("type","1");*/
        String content = "{\"idcard\":\"350322198812052545\",\"price\":\"1\",\"type\":\"1\"}";
        System.out.println("加密前:" + content);
 
        String encrypt = encrypt(content, KEY);
        System.out.println("加密后:" + encrypt);
 
        /**
         * WibZYHSxGPdkw8z37G/kyZLO6PwBxDzQBbTZig+m/gBTsvLSoVgp2fgf4fUgenTMfTxbZMbGfrQI969ZpS2Esg==
         */
        String decrypt = decrypt(encrypt, KEY);
        System.out.println("解密后:" + decrypt);
    }

+ 2 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -623,8 +623,9 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
            token = parameters.get("token");
        }
        String userAgent = request.getHeader("userAgent");
        logger.info("userAgent=="+userAgent+"");
        if (!StringUtils.isEmpty(userAgent)) {
            userAgent = request.getHeader("User-Agent");
            userAgent = request.getHeader("userAgent");
            JSONObject json = JSON.parseObject(userAgent);
            String uuid = json.getString("uid");
            String loginType = parameters.get("login_type");

+ 2 - 2
svr/svr-cloud-care/pom.xml

@ -11,7 +11,7 @@
    </parent>
    <groupId>com.yihu.jw</groupId>
    <artifactId>svr-cloud-care-test</artifactId>
    <artifactId>svr-cloud-care</artifactId>
    <packaging>jar</packaging>
    <version>${parent.version}</version>
@ -294,7 +294,7 @@
    </dependencies>
    <build>
        <finalName>svr-cloud-care-test</finalName>
        <finalName>svr-cloud-care</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>

+ 2 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/article/ArticleDictEndpoint.java

@ -70,13 +70,13 @@ public class ArticleDictEndpoint extends EnvelopRestEndpoint {
			}
			if (queryAll){
				if(StringUtils.isBlank(filters)){
					filters=filters+"del=1";
					filters="del=1";
				}else{
					filters=filters+";del=1";
				}
			}else {
				if(StringUtils.isBlank(filters)){
					filters=filters+"del=1"+";createUser="+userId+"";
					filters="del=1"+";createUser="+userId+"";
				}else{
					filters=filters+";del=1"+";createUser="+userId+"";
				}

+ 2 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -1115,11 +1115,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                     @ApiParam(name = "withWork", value = "传1带排班,其他不带")
                                     @RequestParam(value = "withWork", required = false) String withWork,
                                     @ApiParam(name = "patient", value = "患者code")
                                     @RequestParam(value = "patient", required = false) String patient) {
                                     @RequestParam(value = "patient", required = false) String patient) throws Exception {
        try {
            return success(prescriptionService.findDoctorInfo(doctor,idcard, withWork, patient));
        } catch (Exception e) {
            return failedObjEnvelopException(e);
            throw new Exception(e.getMessage());
        }
    }

+ 30 - 8
svr/svr-iot/src/main/java/com/yihu/iot/controller/device/IotDeviceController.java

@ -273,19 +273,23 @@ public class IotDeviceController extends EnvelopRestEndpoint {
    @GetMapping(value = IotRequestMapping.Device.api_findByDeviceSn)
    @ApiOperation(value = "根据sn查找设备", notes = "根据sn查找设备")
    public MixEnvelop<IotDeviceVO, IotDeviceVO> findByDeviceSn(@ApiParam(name = "deviceSn", value = "设备sn码")
                                                           @RequestParam(value = "deviceSn", required = true) String deviceSn,
                                                               @ApiParam(name = "productId", value = "产品id")
                                                               @RequestParam(value = "productId", required = false) String productId,
                                                               @ApiParam(name = "hospital", value = "单位")
                                                                   @RequestParam(value = "hospital", required = false) String hospital
    public MixEnvelop<IotDeviceVO, IotDeviceVO> findByDeviceSn(
            @ApiParam(name = "deviceSn", value = "设备sn码") @RequestParam(value = "deviceSn", required = false) String deviceSn,
            @ApiParam(name = "productId", value = "产品id") @RequestParam(value = "productId", required = false) String productId,
            @ApiParam(name = "hospital", value = "单位") @RequestParam(value = "hospital", required = false) String hospital,
            @ApiParam(name = "deviceUniqueCode", value = "设备唯一码") @RequestParam(value = "deviceUniqueCode", required = false) String deviceUniqueCode
    ) {
        try {
            IotDeviceDO iotDeviceDO;
            IotDeviceDO iotDeviceDO =null;
            if(StringUtils.isNotEmpty(hospital)){
                iotDeviceDO = iotDeviceService.findDeviceBySn(deviceSn,productId,hospital);
            }else{
                iotDeviceDO = iotDeviceService.findByDeviceSn(deviceSn);
                if (StringUtils.isNotBlank(deviceSn)){
                    iotDeviceDO = iotDeviceService.findByDeviceSn(deviceSn);
                }
                if (StringUtils.isNotBlank(deviceUniqueCode)){
                    iotDeviceDO = iotDeviceService.findByDeviceUniqueCode(deviceUniqueCode);
                }
            }
            IotDeviceVO iotDeviceVO = convertToModel(iotDeviceDO,IotDeviceVO.class);
            return MixEnvelop.getSuccess(IotRequestMapping.Device.message_success_find, iotDeviceVO);
@ -295,6 +299,24 @@ public class IotDeviceController extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = IotRequestMapping.Device.findFreeDevice)
    @ApiOperation(value = "根据sn查找设备", notes = "根据sn查找设备")
    public MixEnvelop<IotDeviceVO, IotDeviceVO> findFreeDevice(
            @ApiParam(name = "productId", value = "产品id") @RequestParam(value = "productId", required = false) String productId,
            @ApiParam(name = "deviceSn", value = "设备sn码") @RequestParam(value = "deviceSn", required = false) String deviceSn
    ) {
        try {
            IotDeviceDO iotDeviceDO = iotDeviceService.findFreeDevice(productId,deviceSn);
            IotDeviceVO iotDeviceVO = convertToModel(iotDeviceDO,IotDeviceVO.class);
            return MixEnvelop.getSuccess(IotRequestMapping.Device.message_success_find, iotDeviceVO);
        } catch (Exception e) {
            e.printStackTrace();
            return MixEnvelop.getError("查询失败");
        }
    }
    /*@PostMapping(value = IotRequestMapping.Device.uploadDeviceInfo)
    @ApiOperation(value = "导入设备sn码相关信息", notes = "导入设备sn码相关信息")
    public MixEnvelop<IotDeviceImportVO, IotDeviceImportVO> uploadStream(@ApiParam(value = "文件", required = true)

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

@ -1,8 +1,14 @@
package com.yihu.iot.controller.device;
import com.alibaba.fastjson.JSON;
import com.yihu.iot.service.device.IotPatientDeviceService;
import com.yihu.iot.service.label.FigureLabelSerachService;
import com.yihu.jw.entity.iot.device.IotDeviceDO;
import com.yihu.jw.entity.iot.device.IotPatientDeviceDO;
import com.yihu.jw.restmodel.iot.patient.PatientInfoVO;
import com.yihu.jw.restmodel.iot.product.IotProductBaseInfoPropertyVO;
import com.yihu.jw.restmodel.iot.product.IotProductBaseInfoVO;
import com.yihu.jw.restmodel.iot.product.IotProductVO;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.restmodel.iot.device.IotDeviceVO;
@ -12,6 +18,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import iot.device.LocationDataVO;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.web.bind.annotation.*;
@ -291,6 +298,10 @@ public class IotPatientDeviceController extends EnvelopRestEndpoint {
        }
    }
    /**
     * 设备发放
     * svr-iot/patientDevice/createPatientDevice
     */
    @PostMapping(value = IotRequestMapping.PatientDevice.createPatientDevice)
    @ApiOperation(value = "设备发放", notes = "设备发放")
    public MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> createPatientDevice(@ApiParam(name = "jsonData", value = "", defaultValue = "")
@ -306,6 +317,10 @@ public class IotPatientDeviceController extends EnvelopRestEndpoint {
        }
    }
    @PostMapping(value = IotRequestMapping.PatientDevice.delPatientDevice)
    @ApiOperation(value = "设备回收", notes = "设备回收")
    public MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> delPatientDevice(@ApiParam(name = "id", value = "居民设备id", defaultValue = "")
@ -408,27 +423,32 @@ public class IotPatientDeviceController extends EnvelopRestEndpoint {
        }
    }
    /**
     * 表单的list
     */
    @GetMapping(value = IotRequestMapping.PatientDevice.getPatientDeviceList)
    @ApiOperation(value = "获取居民设备发放和回收列表", notes = "获取居民设备发放和回收列表")
    public MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> getDelPatientDeviceList(
            @ApiParam(name = "hospitalName", value = "机构名称", defaultValue = "")
            @RequestParam(value = "hospitalName", required = false) String hospitalName,
            @ApiParam(name = "deviceSn", value = "sn码", defaultValue = "")
            @RequestParam(value = "deviceSn", required = false) String deviceSn,
            @ApiParam(name = "deviceName", value = "设备名称", defaultValue = "")
            @RequestParam(value = "deviceName", required = false) String deviceName,
            @ApiParam(name = "categoryCode", value = "设备类型标识")
            @RequestParam(value = "categoryCode", required = false) String categoryCode,
            @ApiParam(name = "patientName", value = "居民姓名")
            @RequestParam(value = "patientName", required = false) String patientName,
            @ApiParam(name = "isDel", value = "是否是设备回收列表(1是 0否,设备发放列表)")
            @RequestParam(value = "isDel", required = false) Integer isDel,
            @ApiParam(name = "page", value = "第几页", defaultValue = "1")
            @RequestParam(value = "page", required = false) Integer page,
            @ApiParam(name = "pageSize", value = "每页记录数")
            @RequestParam(value = "pageSize", required = false) Integer pageSize) {
            @ApiParam(name = "hospitalName", value = "机构名称", defaultValue = "") @RequestParam(value = "hospitalName", required = false) String hospitalName,
            @ApiParam(name = "deviceSn", value = "sn码", defaultValue = "") @RequestParam(value = "deviceSn", required = false) String deviceSn,
            @ApiParam(name = "deviceName", value = "设备名称", defaultValue = "") @RequestParam(value = "deviceName", required = false) String deviceName,
            @ApiParam(name = "categoryCode", value = "设备类型标识") @RequestParam(value = "categoryCode", required = false) String categoryCode,
            @ApiParam(name = "patientName", value = "居民姓名") @RequestParam(value = "patientName", required = false) String patientName,
            @ApiParam(name = "isDel", value = "是否是设备回收列表(1是 0否,设备发放列表)") @RequestParam(value = "isDel", required = false) Integer isDel,
            //补充查询
            @ApiParam(name = "propertyName", value = "设备通用名") @RequestParam(value = "propertyName", required = false) String propertyName,
            @ApiParam(name = "propertyCombination", value = "组合方式") @RequestParam(value = "propertyCombination", required = false) String propertyCombination,
            @ApiParam(name = "propertyUse", value = "用途") @RequestParam(value = "propertyUse", required = false) String propertyUse,
            @ApiParam(name = "propertyNetwork", value = "网络传输") @RequestParam(value = "propertyNetwork", required = false) String propertyNetwork,
            @ApiParam(name = "propertyLocation", value = "投放位置") @RequestParam(value = "propertyLocation", required = false) String propertyLocation,
            @ApiParam(name = "deviceStatus", value = "设备状态") @RequestParam(value = "deviceStatus", required = false) String deviceStatus,
            @ApiParam(name = "page", value = "第几页", defaultValue = "1") @RequestParam(value = "page", required = false) Integer page,
            @ApiParam(name = "pageSize", value = "每页记录数") @RequestParam(value = "pageSize", required = false) Integer pageSize
    ) {
        try {
            return iotPatientDeviceService.getPatientDeviceList(deviceSn, deviceName, categoryCode, patientName,hospitalName, isDel, page, pageSize);
            return iotPatientDeviceService.getPatientDeviceList(deviceSn, deviceName, categoryCode, patientName,hospitalName, isDel, page, pageSize,
                    propertyName,propertyCombination,propertyUse,propertyNetwork,propertyLocation,deviceStatus);
        } catch (Exception e) {
            e.printStackTrace();
            return MixEnvelop.getError("查询失败");
@ -447,4 +467,25 @@ public class IotPatientDeviceController extends EnvelopRestEndpoint {
            return MixEnvelop.getError("删除失败");
        }
    }
    /**
     * 获取居民信息
     * PatientInfoVO
     */
    @GetMapping(value = IotRequestMapping.PatientDevice.findPatientInfo)
    @ApiOperation(value = "获取居民信息", notes = "获取居民信息")
    public MixEnvelop<PatientInfoVO, PatientInfoVO> findPatientInfo(
            @ApiParam(name = "key", value = "身份证电话姓名") @RequestParam(value = "key", required = false) String key
    ) {
        try {
            List<PatientInfoVO> list = iotPatientDeviceService.findPatientInfo(key);
            return MixEnvelop.getSuccess(IotRequestMapping.Device.message_success_find, list);
        } catch (Exception e) {
            e.printStackTrace();
            return MixEnvelop.getError("查询失败");
        }
    }
}

+ 28 - 5
svr/svr-iot/src/main/java/com/yihu/iot/controller/device/WlyyDeviceController.java

@ -43,7 +43,14 @@ public class WlyyDeviceController extends BaseController {
            @RequestParam(value = "orgName",required = false)String orgName,
            @RequestParam(value = "linkman",required = false) String linkman,
            @RequestParam(value = "page",required = false)Integer page,
            @RequestParam(value = "size",required = false)Integer size){
            @RequestParam(value = "size",required = false)Integer size,
            //补充查询
            @ApiParam(name = "propertyName", value = "设备通用名") @RequestParam(value = "propertyName", required = false) String propertyName,
            @ApiParam(name = "propertyCombination", value = "组合方式") @RequestParam(value = "propertyCombination", required = false) String propertyCombination,
            @ApiParam(name = "propertyUse", value = "用途") @RequestParam(value = "propertyUse", required = false) String propertyUse,
            @ApiParam(name = "propertyNetwork", value = "网络传输") @RequestParam(value = "propertyNetwork", required = false) String propertyNetwork,
            @ApiParam(name = "propertyLocation", value = "投放位置") @RequestParam(value = "propertyLocation", required = false) String propertyLocation
            ){
        try {
            if(page==null){
                page =1;
@ -51,7 +58,11 @@ public class WlyyDeviceController extends BaseController {
            if(size==null){
                size = 10;
            }
            return wlyyDeviceService.searchDeviceList(deviceName, deviceCode, orgName, linkman, page, size);
            return wlyyDeviceService.searchDeviceList(
                    deviceName, deviceCode, orgName, linkman, page, size,
                    propertyName,propertyCombination,propertyUse,propertyNetwork,propertyLocation
            );
        }catch (Exception e){
            e.printStackTrace();
            return MixEnvelop.getError("查询失败");
@ -85,7 +96,6 @@ public class WlyyDeviceController extends BaseController {
            @RequestParam(value = "page",required = false) Integer page,
            @RequestParam(value = "size",required = false) Integer size){
        try{
            Page<DeviceHealthIndexVO> deviceHealthIndexes = wlyyDeviceService.searchList(deviceSn,date, idcard, userName, indexType,page, size,indexTypeMin1, indexTypeMax1, indexTypeMin2,indexTypeMax2,doctorName);
            return write(200,"操作成功",page,size,deviceHealthIndexes);
        }catch (Exception ex){
@ -103,12 +113,25 @@ public class WlyyDeviceController extends BaseController {
            @RequestParam(value = "userName",required = false) String userName,
            @RequestParam(value = "doctorName",required = false) String doctorName,
            @RequestParam(value = "hospitalName",required = false) String hospitalName,
            //补充查询
            @ApiParam(name = "propertyName", value = "设备通用名") @RequestParam(value = "propertyName", required = false) String propertyName,
            @ApiParam(name = "propertyCombination", value = "组合方式") @RequestParam(value = "propertyCombination", required = false) String propertyCombination,
            @ApiParam(name = "propertyUse", value = "用途") @RequestParam(value = "propertyUse", required = false) String propertyUse,
            @ApiParam(name = "propertyNetwork", value = "网络传输") @RequestParam(value = "propertyNetwork", required = false) String propertyNetwork,
            @ApiParam(name = "propertyLocation", value = "投放位置") @RequestParam(value = "propertyLocation", required = false) String propertyLocation,
            @RequestParam(value = "page") Integer page,
            @RequestParam(value = "size") Integer size) {
        try {
            String hospitalCode = "";
            List<WlyyPatientDeviceVO> patientDevices = wlyyDeviceService.searchListNew(deviceName, categoryCode, deviceSn, userName, doctorName, hospitalName, hospitalCode, page, size);
            Long totalcount = wlyyDeviceService.getCountSearchListNew(deviceName, categoryCode, deviceSn, userName, doctorName, hospitalName, hospitalCode);
            //详情
            List<WlyyPatientDeviceVO> patientDevices = wlyyDeviceService.searchListNew(
                    deviceName, categoryCode, deviceSn, userName, doctorName, hospitalName, hospitalCode, page, size,
                    propertyName,propertyCombination,propertyUse,propertyNetwork,propertyLocation);
            //数量
            Long totalcount = wlyyDeviceService.getCountSearchListNew(
                    deviceName, categoryCode, deviceSn, userName, doctorName, hospitalName, hospitalCode,
                    propertyName,propertyCombination,propertyUse,propertyNetwork,propertyLocation);
            return write(200, "操作成功", page, size, totalcount, patientDevices);
        } catch (Exception ex) {
            error(ex);

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

@ -1,5 +1,6 @@
package com.yihu.iot.controller.product;
import com.alibaba.fastjson.JSON;
import com.yihu.iot.service.device.IotDeviceInventoryWarningService;
import com.yihu.iot.service.dict.IotSystemDictService;
import com.yihu.iot.service.product.IotProductBaseInfoPropertyService;
@ -236,6 +237,9 @@ public class IotProductController extends EnvelopRestEndpoint {
        return iotProductBaseInfoService.findAll();
    }
    @ApiOperation(value = "增加产品属性")
    @PostMapping(value = IotRequestMapping.Product.addProductProperty)
    public MixEnvelop<IotProductBaseInfoPropertyVO, IotProductBaseInfoPropertyVO> addProductProperty(@ApiParam(name = "jsonData", value = "添加产品属性json", defaultValue = "[]")
@ -252,7 +256,8 @@ public class IotProductController extends EnvelopRestEndpoint {
        }
    }
    @ApiOperation(value = "修改产品熟悉 通过id")
    @ApiOperation(value = "修改产品属性 通过id")
    @PostMapping(value = IotRequestMapping.Product.updateProductProperty)
    public MixEnvelop<IotProductBaseInfoPropertyVO, IotProductBaseInfoPropertyVO> updateProductProperty(@ApiParam(name = "jsonData", value = "添加产品属性json", defaultValue = "[]") @RequestParam(value = "jsonData", required = true)String jsonData){
        try {
@ -264,9 +269,10 @@ public class IotProductController extends EnvelopRestEndpoint {
        }
    }
    @ApiOperation(value = "修改产品熟悉 通过id")
    @ApiOperation(value = "查找产品属性 通过id")
    @PostMapping(value = IotRequestMapping.Product.findProductProperty)
    public MixEnvelop<IotProductBaseInfoPropertyVO, IotProductBaseInfoPropertyVO> findProductProperty(@ApiParam(name = "productId", value = "产品id") @RequestParam(value = "productId", required = true) String productId){
    public MixEnvelop<IotProductBaseInfoPropertyVO, IotProductBaseInfoPropertyVO> findProductProperty(
            @ApiParam(name = "productId", value = "产品id") @RequestParam(value = "productId", required = true) String productId){
        try {
            IotProductBaseInfoPropertyVO vo = iotProductBaseInfoPropertyService.findProductPropertyByProductId(productId);
            return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find, vo);
@ -276,4 +282,8 @@ public class IotProductController extends EnvelopRestEndpoint {
        }
    }
}

+ 2 - 1
svr/svr-iot/src/main/java/com/yihu/iot/dao/device/IotDeviceDao.java

@ -52,5 +52,6 @@ public interface IotDeviceDao extends PagingAndSortingRepository<IotDeviceDO, St
    @Query("update IotDeviceDO w set w.del = ?2 where w.id = ?1 ")
    void updateDelById(String id, int del);
    @Query("from IotDeviceDO w where w.deviceUniqueCode =?1 and w.del=1")
    IotDeviceDO findByDeviceUniqueCode(String deviceUniqueCode);
}

+ 3 - 1
svr/svr-iot/src/main/java/com/yihu/iot/dao/product/IotProductBaseInfoDao.java

@ -2,6 +2,7 @@ package com.yihu.iot.dao.product;
import com.yihu.jw.entity.iot.product.IotProductBaseInfoDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
@ -22,6 +23,7 @@ public interface IotProductBaseInfoDao extends PagingAndSortingRepository<IotPro
    @Query("from IotProductBaseInfoDO w where w.name =?1 and w.del = 1")
    IotProductBaseInfoDO findByName(String name);
    @Modifying
    @Query("UPDATE IotProductBaseInfoDO SET property = ?2  WHERE id = ?1")
    boolean updateProperty(String productId, String property);
    int updateProperty(String productId, String property);
}

+ 4 - 0
svr/svr-iot/src/main/java/com/yihu/iot/dao/product/IotProductBaseInfoPropertyDao.java

@ -2,6 +2,7 @@ package com.yihu.iot.dao.product;
import com.yihu.jw.entity.iot.product.IotProductBaseInfoPropertyDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
@ -16,4 +17,7 @@ public interface IotProductBaseInfoPropertyDao extends PagingAndSortingRepositor
    @Query("FROM IotProductBaseInfoPropertyDO d WHERE  d.productId = ?1 ")
    IotProductBaseInfoPropertyDO findProductPropertyByProductId(String productId);
    @Modifying
    @Query("delete from IotProductBaseInfoPropertyDO  where productId=?1  ")
    void deleteByProductId(String productId);
}

+ 153 - 101
svr/svr-iot/src/main/java/com/yihu/iot/service/device/IotDeviceService.java

@ -45,7 +45,7 @@ import java.util.Map;
 * @author yeshijie on 2017/12/8.
 */
@Service
public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
public class IotDeviceService extends BaseJpaService<IotDeviceDO, IotDeviceDao> {
    @Autowired
    private IotDeviceDao iotDeviceDao;
@ -82,13 +82,14 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
    /**
     * 新增
     *
     * @param iotDevice
     * @return
     */
    @Transactional
    public IotDeviceDO create(IotDeviceDO iotDevice) {
        if(iotDevice.getPurchaseId()!=null){
        if (iotDevice.getPurchaseId() != null) {
            IotOrderPurchaseDO purchaseDO = iotOrderPurchaseDao.findById(iotDevice.getPurchaseId());
            iotDevice.setName(purchaseDO.getDeviceName());
            iotDevice.setOrderNo(purchaseDO.getOrderNo());
@ -103,14 +104,14 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
            //获取质检信息
            IotDeviceQualityInspectionPlanDO planDO = iotDeviceQualityInspectionPlanDao.findLastByPurchaseId(iotDevice.getPurchaseId());
            if(planDO!=null){
            if (planDO != null) {
                iotDevice.setNextQualityTime(planDO.getPlanTime());//下次质检时间
            }
            //计算是否已经完成订单
            Integer num = iotDeviceDao.countByPurchaseId(iotDevice.getPurchaseId());//订单已经采购的数量
            Integer purchaseNum = iotOrderPurchaseDao.sumByOrderId(purchaseDO.getOrderId());//订单需采购的数量
            if((num+1)>=purchaseNum){
            if ((num + 1) >= purchaseNum) {
                //采购订单已经完成
                IotDeviceOrderDO iotDeviceOrderDO = iotDeviceOrderDao.findById(purchaseDO.getOrderId());
                iotDeviceOrderDO.setOrderStatus(IotDeviceOrderDO.DeviceOrderStatus.completed.getValue());
@ -126,6 +127,7 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
    /**
     * 按id查找
     *
     * @param id
     * @return
     */
@ -135,16 +137,17 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
    /**
     * 删除设备
     *
     * @param id
     * @return
     */
    public int delDevice(String id){
    public int delDevice(String id) {
        int re = 1;
        IotDeviceDO deviceDO = iotDeviceDao.findById(id);
        List<IotPatientDeviceDO> patientDeviceDOList = iotPatientDeviceDao.findByDeviceId(id);
        if(patientDeviceDOList!=null&&patientDeviceDOList.size()>0){
        if (patientDeviceDOList != null && patientDeviceDOList.size() > 0) {
            re = -1;
        }else {
        } else {
            deviceDO.setDel(0);
            iotDeviceDao.save(deviceDO);
        }
@ -153,10 +156,11 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
    /**
     * 修改设备
     *
     * @param deviceVO
     * @return
     */
    public Envelop updDevice(IotDeviceVO deviceVO){
    public Envelop updDevice(IotDeviceVO deviceVO) {
        IotDeviceDO deviceDO = iotDeviceDao.findById(deviceVO.getId());
        deviceDO.setSimNo(deviceVO.getSimNo());
        deviceDO.setDeviceSn(deviceVO.getDeviceSn());
@ -168,6 +172,7 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
    /**
     * 按sim卡号查找
     *
     * @param simNo
     * @return
     */
@ -177,11 +182,12 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
    /**
     * 修改sim卡号
     *
     * @param sim
     * @param id
     */
    public Envelop updSim(String sim, String id){
        if(findBySimNo(sim)!=null){
    public Envelop updSim(String sim, String id) {
        if (findBySimNo(sim) != null) {
            return Envelop.getError("sim卡号已存在");
        }
@ -199,15 +205,17 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
    /**
     * 设备注册及绑定
     *
     * @param iotDeviceDO
     */
    @Transactional
    public void bindUser(List<IotDeviceDO> iotDeviceDO){
    public void bindUser(List<IotDeviceDO> iotDeviceDO) {
        this.batchInsert(iotDeviceDO);
    }
    /**
     * 查询
     *
     * @param sn
     * @param hospital
     * @param orderId
@ -219,56 +227,56 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
     * @param size
     * @return
     */
    public MixEnvelop<IotDeviceVO, IotDeviceVO> queryPage(String sn, String hospital, String hospitalName,String orderId, String purcharseId, String productId, String name, String categoryCode, String manufacturerId, Integer page, Integer size) throws Exception{
    public MixEnvelop<IotDeviceVO, IotDeviceVO> queryPage(String sn, String hospital, String hospitalName, String orderId, String purcharseId, String productId, String name, String categoryCode, String manufacturerId, Integer page, Integer size) throws Exception {
        StringBuffer sql = new StringBuffer("SELECT DISTINCT c.* from iot_device c  WHERE c.del=1 ");
        StringBuffer sqlCount = new StringBuffer("SELECT COUNT(DISTINCT c.id) count from iot_device c  WHERE c.del=1 ");
        List<Object> args = new ArrayList<>();
        if(StringUtils.isNotBlank(orderId)){
        if (StringUtils.isNotBlank(orderId)) {
            sql.append(" and c.order_id = ? ");
            sqlCount.append(" and c.order_id = '").append(orderId).append("'");
            args.add(orderId);
        }
        if(StringUtils.isNotBlank(purcharseId)){
        if (StringUtils.isNotBlank(purcharseId)) {
            sql.append(" and c.purchase_id = ? ");
            sqlCount.append(" and c.purchase_id = '").append(purcharseId).append("'");
            args.add(purcharseId);
        }
        if(StringUtils.isNotBlank(hospital)){
        if (StringUtils.isNotBlank(hospital)) {
            sql.append(" and c.hospital = ? ");
            sqlCount.append(" and c.hospital = '").append(hospital).append("'");
            args.add(hospital);
        }
        if(StringUtils.isNotBlank(sn)){
            sn = "%"+sn+"%";
        if (StringUtils.isNotBlank(sn)) {
            sn = "%" + sn + "%";
            sql.append(" and (c.device_sn like ? or c.sim_no like ?)");
            sqlCount.append(" and (c.device_sn like '").append(sn).append("' or c.sim_no like '").append(sn).append("')");
            args.add(sn);
            args.add(sn);
        }
        if(StringUtils.isNotBlank(productId)){
        if (StringUtils.isNotBlank(productId)) {
            sql.append(" and c.product_id = ? ");
            sqlCount.append(" and c.product_id = '").append(productId).append("'");
            args.add(productId);
        }
        if(StringUtils.isNotBlank(name)){
            name = "%"+name+"%";
        if (StringUtils.isNotBlank(name)) {
            name = "%" + name + "%";
            sql.append(" and c.name like ?");
            sqlCount.append(" and c.name like '").append(name).append("'");
            args.add(name);
        }
        if(StringUtils.isNotBlank(categoryCode)){
        if (StringUtils.isNotBlank(categoryCode)) {
            sql.append(" and c.category_code = ? ");
            sqlCount.append(" and c.category_code = '").append(categoryCode).append("'");
            args.add(categoryCode);
        }
        if(StringUtils.isNotBlank(manufacturerId)){
        if (StringUtils.isNotBlank(manufacturerId)) {
            sql.append(" and c.manufacturer_id = ? ");
            sqlCount.append(" and c.manufacturer_id = '").append(manufacturerId).append("'");
            args.add(manufacturerId);
        }
        if(StringUtils.isNotBlank(hospitalName)){
            hospitalName = "%"+hospitalName+"%";
        if (StringUtils.isNotBlank(hospitalName)) {
            hospitalName = "%" + hospitalName + "%";
            sql.append(" and c.hospital_name like ?");
            sqlCount.append(" and c.hospital_name like '").append(hospitalName).append("'");
            args.add(hospitalName);
@ -276,25 +284,25 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
        //数据权限过滤
        List<String> orgList = orgUserService.getUserOrgById(userAgent.getUID());
        if(!orgList.contains(userAgent.commonHospital)){
        if (!orgList.contains(userAgent.commonHospital)) {
            sql.append(" and c.hospital in (").append(orgUserService.getUserOrg(orgList)).append(")");
            sqlCount.append(" and c.hospital in (").append(orgUserService.getUserOrg(orgList)).append(")");
        }
        sql.append("order by c.update_time desc limit ").append((page-1)*size).append(",").append(size);
        sql.append("order by c.update_time desc limit ").append((page - 1) * size).append(",").append(size);
        List<IotDeviceDO> list = jdbcTempalte.query(sql.toString(),args.toArray(),new BeanPropertyRowMapper(IotDeviceDO.class));
        List<Map<String,Object>> countList = jdbcTempalte.queryForList(sqlCount.toString());
        List<IotDeviceDO> list = jdbcTempalte.query(sql.toString(), args.toArray(), new BeanPropertyRowMapper(IotDeviceDO.class));
        List<Map<String, Object>> countList = jdbcTempalte.queryForList(sqlCount.toString());
        long count = Long.valueOf(countList.get(0).get("count").toString());
        //DO转VO
        List<IotDeviceVO> iotDeviceVOList = convertToModels(list,new ArrayList<>(list.size()),IotDeviceVO.class);
        iotDeviceVOList.forEach(one->{
        List<IotDeviceVO> iotDeviceVOList = convertToModels(list, new ArrayList<>(list.size()), IotDeviceVO.class);
        iotDeviceVOList.forEach(one -> {
            String deviceSn = one.getDeviceSn();
            List<IotPatientDeviceDO>  deviceDOList = iotPatientDeviceDao.findByDeviceSn(deviceSn);
            if(deviceDOList!=null&&deviceDOList.size()>0){
            List<IotPatientDeviceDO> deviceDOList = iotPatientDeviceDao.findByDeviceSn(deviceSn);
            if (deviceDOList != null && deviceDOList.size() > 0) {
                one.setIsBinding(1);
            }else {
            } else {
                one.setIsBinding(2);
            }
            one.setCreateUserName(AesEncryptUtils.decrypt(one.getCreateUserName()));
@ -302,11 +310,12 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
        });
        translateDictForList(iotDeviceVOList);
        return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Company.message_success_find_functions,iotDeviceVOList, page, size,count);
        return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Company.message_success_find_functions, iotDeviceVOList, page, size, count);
    }
    /**
     * 是否绑定查询
     *
     * @param sn
     * @param hospital
     * @param orderId
@ -316,97 +325,97 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
     * @param size
     * @return
     */
    public MixEnvelop<IotDeviceVO, IotDeviceVO> queryPage(String sn, String hospital, String orderId, String purcharseId, Integer isBinding, Integer page, Integer size){
    public MixEnvelop<IotDeviceVO, IotDeviceVO> queryPage(String sn, String hospital, String orderId, String purcharseId, Integer isBinding, Integer page, Integer size) {
        StringBuffer sql = new StringBuffer("SELECT DISTINCT c.* from iot_device c left join iot_patient_device t on t.del = 1 AND c.device_sn = t.device_sn  WHERE c.del=1 ");
        StringBuffer sqlCount = new StringBuffer("SELECT COUNT(DISTINCT c.id) count from iot_device c left join iot_patient_device t on t.del = 1 AND c.device_sn = t.device_sn  WHERE c.del=1 ");
        List<Object> args = new ArrayList<>();
        if(StringUtils.isNotBlank(orderId)){
        if (StringUtils.isNotBlank(orderId)) {
            sql.append(" and c.order_id = ? ");
            sqlCount.append(" and c.order_id = '").append(orderId).append("'");
            args.add(orderId);
        }
        if(StringUtils.isNotBlank(purcharseId)){
        if (StringUtils.isNotBlank(purcharseId)) {
            sql.append(" and c.purchase_id = ? ");
            sqlCount.append(" and c.purchase_id = '").append(purcharseId).append("'");
            args.add(purcharseId);
        }
        if(StringUtils.isNotBlank(hospital)){
        if (StringUtils.isNotBlank(hospital)) {
            sql.append(" and c.hospital = ? ");
            sqlCount.append(" and c.hospital = '").append(hospital).append("'");
            args.add(hospital);
        }
        if(StringUtils.isNotBlank(sn)){
        if (StringUtils.isNotBlank(sn)) {
            sql.append(" and (c.device_sn like ? or c.name like ?)");
            sqlCount.append(" and (c.device_sn like '").append(sn).append("' or c.name like '").append(sn).append("')");
            args.add(sn);
            args.add(sn);
        }
        if(isBinding==1){
        if (isBinding == 1) {
            sql.append(" and t.id is not null ");
            sqlCount.append("  and t.id is not null ");
        }else {
        } else {
            sql.append(" and t.id is null ");
            sqlCount.append("  and t.id is null ");
        }
        //数据权限过滤
        List<String> orgList = orgUserService.getUserOrgById(userAgent.getUID());
        if(!orgList.contains(userAgent.commonHospital)){
        if (!orgList.contains(userAgent.commonHospital)) {
            sql.append(" and c.hospital in (?) ");
            sqlCount.append(" and c.hospital in (").append(orgUserService.getUserOrg(orgList)).append(")");
            args.add(orgUserService.getUserOrg(orgList));
        }
        sql.append("order by c.update_time desc limit ").append((page-1)*size).append(",").append(size);
        sql.append("order by c.update_time desc limit ").append((page - 1) * size).append(",").append(size);
        List<IotDeviceDO> list = jdbcTempalte.query(sql.toString(),args.toArray(),new BeanPropertyRowMapper(IotDeviceDO.class));
        List<Map<String,Object>> countList = jdbcTempalte.queryForList(sqlCount.toString());
        List<IotDeviceDO> list = jdbcTempalte.query(sql.toString(), args.toArray(), new BeanPropertyRowMapper(IotDeviceDO.class));
        List<Map<String, Object>> countList = jdbcTempalte.queryForList(sqlCount.toString());
        long count = Long.valueOf(countList.get(0).get("count").toString());
        //DO转VO
        List<IotDeviceVO> iotDeviceVOList = convertToModels(list,new ArrayList<>(list.size()),IotDeviceVO.class);
        iotDeviceVOList.forEach(one->{
        List<IotDeviceVO> iotDeviceVOList = convertToModels(list, new ArrayList<>(list.size()), IotDeviceVO.class);
        iotDeviceVOList.forEach(one -> {
            one.setIsBinding(isBinding);
            one.setCreateUserName(AesEncryptUtils.decrypt(one.getCreateUserName()));
            one.setUpdateUserName(AesEncryptUtils.decrypt(one.getUpdateUserName()));
        });
        translateDictForList(iotDeviceVOList);
        return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Common.message_success_find_functions,iotDeviceVOList, page, size,count);
        return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Common.message_success_find_functions, iotDeviceVOList, page, size, count);
    }
    /**
     *
     * @return
     */
    public MixEnvelop<IotDeviceVO, IotDeviceVO> findDevice(Integer page, Integer size) {
        String sql ="SELECT DISTINCT c.* from iot_device c left join iot_patient_device t on t.del = 1 AND c.device_sn = t.device_sn  WHERE c.del=1 ";
        String sql = "SELECT DISTINCT c.* from iot_device c left join iot_patient_device t on t.del = 1 AND c.device_sn = t.device_sn  WHERE c.del=1 ";
        //数据权限过滤
        List<String> orgList = orgUserService.getUserOrgById(userAgent.getUID());
        if(!orgList.contains(userAgent.commonHospital)){
            sql += " and c.hospital in ("+orgUserService.getUserOrg(orgList)+")";
        if (!orgList.contains(userAgent.commonHospital)) {
            sql += " and c.hospital in (" + orgUserService.getUserOrg(orgList) + ")";
        }
        sql += " GROUP BY c.`name`";
        List<IotDeviceDO> list = jdbcTempalte.query(sql,new BeanPropertyRowMapper(IotDeviceDO.class));
        for (int i=0;i<list.size();i++){
        List<IotDeviceDO> list = jdbcTempalte.query(sql, new BeanPropertyRowMapper(IotDeviceDO.class));
        for (int i = 0; i < list.size(); i++) {
            list.get(i).setCreateUserName(AesEncryptUtils.decrypt(list.get(i).getCreateUserName()));
            list.get(i).setUpdateUserName(AesEncryptUtils.decrypt(list.get(i).getUpdateUserName()));
        }
        //DO转VO
        List<IotDeviceVO> iotDeviceVOList = convertToModels(list,new ArrayList<>(list.size()),IotDeviceVO.class);
        List<IotDeviceVO> iotDeviceVOList = convertToModels(list, new ArrayList<>(list.size()), IotDeviceVO.class);
        translateDictForList(iotDeviceVOList);
        long count = list.size();
        return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Common.message_success_find_functions,iotDeviceVOList, page, size,count);
        return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Common.message_success_find_functions, iotDeviceVOList, page, size, count);
    }
    /**
     * 根据设备序列号判断设备是否存在
     *
     * @param deviceSn
     * @return
     */
@ -416,6 +425,7 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
    /**
     * 根据设备序列号查找设备
     *
     * @param deviceSn
     * @return
     */
@ -423,26 +433,39 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
        return iotDeviceDao.findByDeviceSn(deviceSn);
    }
    /**
     * 根据设备唯一码查找设备
     *
     * @param deviceUniqueCode
     * @return
     */
    public IotDeviceDO findByDeviceUniqueCode(String deviceUniqueCode) {
        return iotDeviceDao.findByDeviceUniqueCode(deviceUniqueCode);
    }
    /**
     * 根据设备序列号查找设备
     *
     * @param deviceSn
     * @param productId
     * @param hospital
     * @return
     */
    public IotDeviceDO findDeviceBySn(String deviceSn,String productId,String hospital){
        String sql ="SELECT c.* from iot_device c  WHERE c.del=1 ";
        if(StringUtils.isNotEmpty(deviceSn)){
            sql += " and c.device_sn = '"+deviceSn+"'";
    public IotDeviceDO findDeviceBySn(String deviceSn, String productId, String hospital) {
        String sql = "SELECT c.* from iot_device c  WHERE c.del=1 ";
        if (StringUtils.isNotEmpty(deviceSn)) {
            sql += " and c.device_sn = '" + deviceSn + "'";
        }
        if(StringUtils.isNotEmpty(productId)){
            sql += " and c.product_id = '"+productId+"'";
        if (StringUtils.isNotEmpty(productId)) {
            sql += " and c.product_id = '" + productId + "'";
        }
        if(StringUtils.isNotEmpty(hospital)){
            sql += " and c.hospital = '"+hospital+"'";
        if (StringUtils.isNotEmpty(hospital)) {
            sql += " and c.hospital = '" + hospital + "'";
        }
        List<IotDeviceDO> list = jdbcTempalte.query(sql,new BeanPropertyRowMapper(IotDeviceDO.class));
        if(list.size()>0){
        List<IotDeviceDO> list = jdbcTempalte.query(sql, new BeanPropertyRowMapper(IotDeviceDO.class));
        if (list.size() > 0) {
            list.get(0).setCreateUserName(AesEncryptUtils.decrypt(list.get(0).getCreateUserName()));
            list.get(0).setUpdateUserName(AesEncryptUtils.decrypt(list.get(0).getUpdateUserName()));
            return list.get(0);
@ -453,7 +476,7 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
    /**
     * 设备导入
     */
    public IotDeviceImportRecordVO importDevice(String fileUrl, String fileName, String purcharseId, List<IotDeviceImportVO> importVOList){
    public IotDeviceImportRecordVO importDevice(String fileUrl, String fileName, String purcharseId, List<IotDeviceImportVO> importVOList) {
        IotDeviceImportRecordDO recordDO = new IotDeviceImportRecordDO();
        IotOrderPurchaseDO purchaseDO = iotOrderPurchaseDao.findById(purcharseId);
        recordDO.setDel(1);
@ -465,57 +488,61 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
        recordDO.setStatus(IotDeviceImportRecordDO.DeviceImportRecordStatus.create.getValue());
        iotDeviceImportRecordDao.save(recordDO);
        IotDeviceImportRecordVO vo = convertToModel(recordDO,IotDeviceImportRecordVO.class);
        IotDeviceImportRecordVO vo = convertToModel(recordDO, IotDeviceImportRecordVO.class);
        //批量导入 异步操作
        importRecordService.importDevice(purchaseDO,importVOList,recordDO);
        importRecordService.importDevice(purchaseDO, importVOList, recordDO);
        return vo;
    };
    }
    ;
    /**
     * 分页查找导入记录
     *
     * @param page
     * @param size
     * @param purcharseId
     * @return
     */
    public MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> queryImportRecordPage(Integer page, Integer size, String purcharseId){
    public MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> queryImportRecordPage(Integer page, Integer size, String purcharseId) {
        StringBuffer sql = new StringBuffer("SELECT c.* from iot_device_import_record c  WHERE c.del=1 ");
        StringBuffer sqlCount = new StringBuffer("SELECT COUNT(c.id) count from iot_device_import_record c WHERE c.del=1 ");
        List<Object> args = new ArrayList<>();
        if(StringUtils.isNotBlank(purcharseId)){
        if (StringUtils.isNotBlank(purcharseId)) {
            sql.append(" and c.purchase_id=? ");
            sqlCount.append(" and c.purchase_id='").append(purcharseId).append("' ");
            args.add(purcharseId);
        }
        sql.append("order by c.update_time desc limit ").append((page-1)*size).append(",").append(size);
        sql.append("order by c.update_time desc limit ").append((page - 1) * size).append(",").append(size);
        List<IotDeviceImportRecordDO> list = jdbcTempalte.query(sql.toString(),args.toArray(),new BeanPropertyRowMapper(IotDeviceImportRecordDO.class));
        List<Map<String,Object>> countList = jdbcTempalte.queryForList(sqlCount.toString());
        List<IotDeviceImportRecordDO> list = jdbcTempalte.query(sql.toString(), args.toArray(), new BeanPropertyRowMapper(IotDeviceImportRecordDO.class));
        List<Map<String, Object>> countList = jdbcTempalte.queryForList(sqlCount.toString());
        long count = Long.valueOf(countList.get(0).get("count").toString());
        //DO转VO
        List<IotDeviceImportRecordVO> importRecordVOList = convertToModels(list,new ArrayList<>(list.size()),IotDeviceImportRecordVO.class);
        List<IotDeviceImportRecordVO> importRecordVOList = convertToModels(list, new ArrayList<>(list.size()), IotDeviceImportRecordVO.class);
        return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Common.message_success_find_functions,importRecordVOList, page, size,count);
        return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Common.message_success_find_functions, importRecordVOList, page, size, count);
    }
    /**
     * 字典翻译
     *
     * @param iotDeviceVOList
     */
    public void translateDictForList(List<IotDeviceVO> iotDeviceVOList){
        if(iotDeviceVOList.size()>0){
    public void translateDictForList(List<IotDeviceVO> iotDeviceVOList) {
        if (iotDeviceVOList.size() > 0) {
            //字典翻译
            Map<String,String> deviceBindingMap = iotSystemDictService.findByDictName("DEVICE_BINDING");
            Map<String,String> deviceSourceMap = iotSystemDictService.findByDictName("DEVICE_SOURCE");
            iotDeviceVOList.forEach(infoVO->{
                if(infoVO.getIsBinding()!=null){
            Map<String, String> deviceBindingMap = iotSystemDictService.findByDictName("DEVICE_BINDING");
            Map<String, String> deviceSourceMap = iotSystemDictService.findByDictName("DEVICE_SOURCE");
            iotDeviceVOList.forEach(infoVO -> {
                if (infoVO.getIsBinding() != null) {
                    infoVO.setIsBindingName(deviceBindingMap.get(infoVO.getIsBinding().toString()));
                }
                if(StringUtils.isNotBlank(infoVO.getDeviceSource())){
                if (StringUtils.isNotBlank(infoVO.getDeviceSource())) {
                    infoVO.setDeviceSourceName(deviceSourceMap.get(infoVO.getDeviceSource()));
                }
            });
@ -524,50 +551,51 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
    /**
     * 字典翻译
     *
     * @param iotDeviceVO
     */
    public void translateDictForOne(IotDeviceVO iotDeviceVO){
        if(iotDeviceVO!=null){
    public void translateDictForOne(IotDeviceVO iotDeviceVO) {
        if (iotDeviceVO != null) {
            //字典翻译
            Map<String,String> deviceBindingMap = iotSystemDictService.findByDictName("DEVICE_BINDING");
            Map<String,String> deviceSourceMap = iotSystemDictService.findByDictName("DEVICE_SOURCE");
            Map<String,String> qualityStatusMap = iotSystemDictService.findByDictName("QUALITY_STATUS");
            Map<String, String> deviceBindingMap = iotSystemDictService.findByDictName("DEVICE_BINDING");
            Map<String, String> deviceSourceMap = iotSystemDictService.findByDictName("DEVICE_SOURCE");
            Map<String, String> qualityStatusMap = iotSystemDictService.findByDictName("QUALITY_STATUS");
            List<IotPatientDeviceDO>  deviceDOList = iotPatientDeviceDao.findByDeviceSn(iotDeviceVO.getDeviceSn());
            if(deviceDOList!=null&&deviceDOList.size()>0){
            List<IotPatientDeviceDO> deviceDOList = iotPatientDeviceDao.findByDeviceSn(iotDeviceVO.getDeviceSn());
            if (deviceDOList != null && deviceDOList.size() > 0) {
                iotDeviceVO.setIsBinding(1);
            }else {
            } else {
                iotDeviceVO.setIsBinding(2);
            }
            iotDeviceVO.setIsBindingName(deviceBindingMap.get(iotDeviceVO.getIsBinding().toString()));
            if(StringUtils.isNotBlank(iotDeviceVO.getDeviceSource())){
            if (StringUtils.isNotBlank(iotDeviceVO.getDeviceSource())) {
                iotDeviceVO.setDeviceSourceName(deviceSourceMap.get(iotDeviceVO.getDeviceSource()));
            }
            //获取质检信息
            IotDeviceQualityInspectionPlanDO planDO = iotDeviceQualityInspectionPlanDao.findByDeviceId(iotDeviceVO.getId());
            if(planDO!=null){
            if (planDO != null) {
                iotDeviceVO.setQualityStatus(qualityStatusMap.get(planDO.getStatus()));//质检状态
            }else if(StringUtils.isNotBlank(iotDeviceVO.getPurchaseId())){
            } else if (StringUtils.isNotBlank(iotDeviceVO.getPurchaseId())) {
                IotOrderPurchaseDO purchaseDO = iotOrderPurchaseDao.findById(iotDeviceVO.getPurchaseId());
                if(purchaseDO!=null&&StringUtils.isNotBlank(purchaseDO.getQualityStatus())){
                if (purchaseDO != null && StringUtils.isNotBlank(purchaseDO.getQualityStatus())) {
                    iotDeviceVO.setQualityStatus(qualityStatusMap.get(purchaseDO.getQualityStatus()));//质检状态
                }
            }
            //数据来源
            if(StringUtils.isNotBlank(iotDeviceVO.getPurchaseId())){
            if (StringUtils.isNotBlank(iotDeviceVO.getPurchaseId())) {
                List<IotProductDataTransmissionDO> dataTransmissionDOList = iotProductDataTransmissionDao.findByProductId(iotDeviceVO.getProductId());
                if(dataTransmissionDOList!=null){
                if (dataTransmissionDOList != null) {
                    List<IotProductDataTransmissionVO> dataTransmissionVOList =
                            convertToModels(dataTransmissionDOList,new ArrayList<>(dataTransmissionDOList.size()),IotProductDataTransmissionVO.class);
                            convertToModels(dataTransmissionDOList, new ArrayList<>(dataTransmissionDOList.size()), IotProductDataTransmissionVO.class);
                    iotDeviceVO.setDataTransmissionVOList(dataTransmissionVOList);
                }
            }
            //关联居民
            List<IotPatientDeviceDO> patientDeviceDOList = iotPatientDeviceDao.findByDeviceSn(iotDeviceVO.getDeviceSn());
            if(patientDeviceDOList!=null){
            if (patientDeviceDOList != null) {
                List<IotPatientDeviceVO> patientDeviceVOList =
                        convertToModels(patientDeviceDOList,new ArrayList<>(patientDeviceDOList.size()),IotPatientDeviceVO.class);
                        convertToModels(patientDeviceDOList, new ArrayList<>(patientDeviceDOList.size()), IotPatientDeviceVO.class);
                iotDeviceVO.setPatientDeviceVOList(patientDeviceVOList);
            }
        }
@ -613,4 +641,28 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> {
            inputStream.close();
        }
    }
    /**
     * 获取一个空闲设备
     *
     * @param productId
     * @return
     */
    public IotDeviceDO findFreeDevice(String productId,String deviceSn) {
        String sql = "SELECT c.* from iot_device c  WHERE c.del=1 ";
        if (StringUtils.isNotEmpty(productId)) {
            sql += " and c.product_id = '" + productId + "'";
        }
        if (StringUtils.isNotEmpty(deviceSn)) {
            sql += " and c.device_sn = '" + deviceSn + "'";
        }
        sql += " AND c.is_grant='0' AND c.`status`='1' ";
        List<IotDeviceDO> list = jdbcTempalte.query(sql, new BeanPropertyRowMapper(IotDeviceDO.class));
        if (list.size() > 0) {
            list.get(0).setCreateUserName(AesEncryptUtils.decrypt(list.get(0).getCreateUserName()));
            list.get(0).setUpdateUserName(AesEncryptUtils.decrypt(list.get(0).getUpdateUserName()));
            return list.get(0);
        }
        return null;
    }
}

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 308 - 213
svr/svr-iot/src/main/java/com/yihu/iot/service/device/IotPatientDeviceService.java


+ 116 - 35
svr/svr-iot/src/main/java/com/yihu/iot/service/device/WlyyDeviceService.java

@ -57,28 +57,62 @@ public class WlyyDeviceService {
    @Autowired
    private OrgUserService orgUserService;
    public MixEnvelop<WlyyDeviceVO,WlyyDeviceVO> searchDeviceList(String deviceName,String deviceCode,String orgName,String linkman,Integer page,Integer pageSize){
        String sql = "select * from device.wlyy_devices where 1=1 ";
    public MixEnvelop<WlyyDeviceVO,WlyyDeviceVO> searchDeviceList(
            String deviceName,String deviceCode,String orgName,String linkman,Integer page,Integer pageSize,
            String propertyName, String propertyCombination, String propertyUse, String propertyNetwork, String propertyLocation)
    {
        //补充查询
        String sql = "SELECT\n" +
                "	a.* ,\n" +
                "	c.`name` propertyName,\n" +
                "	c.`combination` propertyCombination,\n" +
                "	c.`device_use` propertyUse,\n" +
                "	c.`network` propertyNetwork,\n" +
                "	c.`location` propertyLocation \n" +
                "FROM\n" +
                "	device.wlyy_devices a\n" +
                "	INNER JOIN xmiot.iot_device b ON a.device_code = b.device_sn\n" +
                "	INNER JOIN xmiot.iot_product_base_info_property c ON c.id = b.product_id \n" +
                "WHERE\n" +
                "	1 = 1";
        if(!StringUtils.isEmpty(orgName)){
            sql +=" and org_name like '%"+orgName+"%' ";
            sql +=" and a.org_name like '%"+orgName+"%' ";
        }
        if(!StringUtils.isEmpty(deviceCode)){
            sql +=" and device_code = '"+deviceCode+"' ";
            sql +=" and a.device_code = '"+deviceCode+"' ";
        }
        if(!StringUtils.isEmpty(deviceName)){
            sql +=" and device_name like '%"+deviceName+"%' ";
            sql +=" and a.device_name like '%"+deviceName+"%' ";
        }
        if(!StringUtils.isEmpty(linkman)){
            sql +=" and AES_DECRYPT(from_base64(linkmam),'jkzl2021ZJXL*#%a') like '%"+linkman+"%' ";//AES_DECRYPT(from_base64(d.patient_name),'jkzl2021ZJXL*#%a')
            sql +=" and AES_DECRYPT(from_base64(a.linkman),'jkzl2021ZJXL*#%a') like '%"+linkman+"%' ";//AES_DECRYPT(from_base64(d.patient_name),'jkzl2021ZJXL*#%a')
        }
        /**
         * 通用查询 补充字段
         */
        if (StringUtils.isNotBlank(propertyName)) {
            sql += " and c.name like '%" + propertyName + "%' ";
        }
        if (StringUtils.isNotBlank(propertyCombination)) {
            sql += " and c.combination like '%" + propertyCombination + "%' ";
        }
        if (StringUtils.isNotBlank(propertyUse)) {
            sql += " and c.`device_use` like '%" + propertyUse + "%' ";
        }
        if (StringUtils.isNotBlank(propertyNetwork)) {
            sql += " and c.network like '%" + propertyNetwork + "%' ";
        }
        if (StringUtils.isNotBlank(propertyLocation)) {
            sql += " and c.location like '%" + propertyLocation + "%' ";
        }
        //数据权限过滤
        List<String> orgList = orgUserService.getUserOrgById(userAgent.getUID());
        if(!orgList.contains(userAgent.commonHospital)){
            sql += " and grant_org_code in ("+orgUserService.getUserOrg(orgList)+") ";
            sql += " and a.grant_org_code in ("+orgUserService.getUserOrg(orgList)+") ";
        }
        sql += " order by id desc ";
        sql += " order by a.id desc ";
        Long count = Long.valueOf(jdbcTemplate.queryForList(sql).size());
        sql += "limit " + (page - 1) * pageSize + "," + pageSize;
        sql = TransforSqlUtl.deviceAll(sql);
@ -287,35 +321,60 @@ public class WlyyDeviceService {
        return json;
    }
    public List<WlyyPatientDeviceVO> searchListNew(String deviceName,
                                                   String categoryCode,
                                                   String deviceSn,
                                                   String userName,
                                                   String doctorName,
                                                   String hospitalName,
                                                   String hospitalCode,
                                                   Integer page, Integer pageSize) throws Exception{
    public List<WlyyPatientDeviceVO> searchListNew(
            String deviceName, String categoryCode, String deviceSn, String userName, String doctorName,
            String hospitalName, String hospitalCode, Integer page, Integer pageSize,
            String propertyName,String propertyCombination,String propertyUse,String propertyNetwork,String propertyLocation)
     throws Exception{
        List<WlyyPatientDeviceVO> list = new ArrayList<>();
        String sql = "SELECT d.id as id,d.device_id as deviceId,d.user as user,p.name as userName,d.category_code as categoryCode,d.device_name as deviceName," +
                "d.device_sn as deviceSn,d.sim as sim,d.user_type as userType,p.mobile," +
                "CONCAT(LEFT (p.idcard,6),'**********',RIGHT (p.idcard,2)) userIdcard,d.czrq as czrq,s.doctor,s.doctor_name doctorName " +
                "FROM wlyy.wlyy_patient_device d left join wlyy.wlyy_sign_family s on d.`user` = s. patient and s.`status`>0,wlyy.wlyy_patient p " +
                "WHERE d.`user`=p.CODE ";
                " d.device_sn as deviceSn,d.sim as sim,d.user_type as userType,p.mobile," +
                " CONCAT(LEFT (p.idcard,6),'**********',RIGHT (p.idcard,2)) userIdcard,d.czrq as czrq,s.doctor,s.doctor_name doctorName, " +
                "(SELECT q.`dict_value` FROM `iot-base`.wlyy_hospital_sys_dict q WHERE q.dict_name='Device_common_name' AND q.`dict_code`=a.`name` )\"propertyName\",\n" +
                "(SELECT q.`dict_value` FROM `iot-base`.wlyy_hospital_sys_dict q WHERE q.dict_name='Combination_method' AND q.`dict_code`=a.`combination` )\"propertyCombination\",\n" +
                "(SELECT q.`dict_value` FROM `iot-base`.wlyy_hospital_sys_dict q WHERE q.dict_name='device_use' AND q.`dict_code`=a.`device_use` )\"propertyUse\",\n" +
                "(SELECT q.`dict_value` FROM `iot-base`.wlyy_hospital_sys_dict q WHERE q.dict_name='Network_transmission' AND q.`dict_code`=a.`network` )\"propertyNetwork\",\n" +
                "(SELECT q.`dict_value` FROM `iot-base`.wlyy_hospital_sys_dict q WHERE q.dict_name='Drop_location' AND q.`dict_code`=a.`location` )\"propertyLocation\" " +
                " FROM wlyy.wlyy_patient_device d " +
                " INNER JOIN wlyy.wlyy_patient p ON d.`user`=p.CODE " +
                " LEFT JOIN wlyy.wlyy_sign_family s on d.`user` = s. patient and s.`status`>0 " +
                " LEFT JOIN xmiot.iot_device b ON b.device_sn=d.device_sn\n" +
                " LEFT JOIN xmiot.iot_product_base_info_property a ON a.product_id =b.product_id " +
                " WHERE 1=1 ";
        if(StringUtils.isNotBlank(userName)){
            sql = sql + "AND p.name like '%"+userName+"%' ";
            sql = sql + " AND p.name like '%"+userName+"%' ";
        }
        if(StringUtils.isNotBlank(deviceSn)){
            sql = sql + "AND d.device_sn like '%"+deviceSn+"%' ";
            sql = sql + " AND d.device_sn like '%"+deviceSn+"%' ";
        }
        if(StringUtils.isNotBlank(categoryCode)){
            sql = sql + "AND d.category_code like '%"+categoryCode+"%' ";
            sql = sql + " AND d.category_code like '%"+categoryCode+"%' ";
        }
        if(StringUtils.isNotBlank(deviceName)){
            sql = sql + "AND d.device_name like '%"+deviceName+"%' ";
            sql = sql + " AND d.device_name like '%"+deviceName+"%' ";
        }
        /**
         * 通用查询 补充字段
         */
        if(StringUtils.isNotBlank(propertyName)){
            sql += " and a.name like '%" + propertyName + "%' ";
        }
        if(StringUtils.isNotBlank(propertyCombination)){
            sql += " and a.combination like '%" + propertyCombination + "%' ";
        }
        if(StringUtils.isNotBlank(propertyUse)){
            sql += " and a.`device_use` like '%" + propertyUse + "%' ";
        }
        if(StringUtils.isNotBlank(propertyNetwork)){
            sql += " and a.network like '%" + propertyNetwork + "%' ";
        }
        if(StringUtils.isNotBlank(propertyLocation)){
            sql += " and a.location like '%" + propertyLocation + "%' ";
        }
        //数据权限过滤
@ -330,28 +389,50 @@ public class WlyyDeviceService {
        return list ;
    }
    public Long getCountSearchListNew(String deviceName, String categoryCode, String deviceSn, String userName, String doctorName, String hospitalName,String hospitalCode) {
    public Long getCountSearchListNew(
            String deviceName, String categoryCode, String deviceSn, String userName, String doctorName, String hospitalName,String hospitalCode,
            String propertyName,String propertyCombination,String propertyUse,String propertyNetwork,String propertyLocation)
    {
        String sql  = "SELECT count(d.id) " +
                "FROM " +
                " wlyy.wlyy_patient_device d left join wlyy.wlyy_sign_family s on d.`user` = s. patient and s.`status`>0," +
                " wlyy.wlyy_patient p " +
                "WHERE " +
                " d.`user`=p.CODE ";
                " FROM  wlyy.wlyy_patient_device d " +
                " LEFT JOIN wlyy.wlyy_patient p on d.`user`=p.CODE " +
                " LEFT JOIN wlyy.wlyy_sign_family s on d.`user` = s. patient and s.`status`>0 " +
                " LEFT JOIN xmiot.iot_device b ON b.device_sn=d.device_sn\n" +
                " LEFT JOIN xmiot.iot_product_base_info_property a ON a.product_id =b.product_id " +
                " WHERE 1=1 " ;
        if(StringUtils.isNotBlank(userName)){
            sql = sql + "AND p.name like '%"+doctorName+"%' ";
            sql = sql + " AND p.name like '%"+doctorName+"%' ";
        }
        if(StringUtils.isNotBlank(deviceSn)){
            sql = sql + "AND d.device_sn like '%"+deviceSn+"%' ";
            sql = sql + " AND d.device_sn like '%"+deviceSn+"%' ";
        }
        if(StringUtils.isNotBlank(categoryCode)){
            sql = sql + "AND d.category_code like '%"+categoryCode+"%' ";
            sql = sql + " AND d.category_code like '%"+categoryCode+"%' ";
        }
        if(StringUtils.isNotBlank(deviceName)){
            sql = sql + "AND d.device_name like '%"+deviceName+"%' ";
            sql = sql + " AND d.device_name like '%"+deviceName+"%' ";
        }
        /**
         * 通用查询 补充字段
         */
        if(StringUtils.isNotBlank(propertyName)){
            sql += " and a.name like '%" + propertyName + "%' ";
        }
        if(StringUtils.isNotBlank(propertyCombination)){
            sql += " and a.combination like '%" + propertyCombination + "%' ";
        }
        if(StringUtils.isNotBlank(propertyUse)){
            sql += " and a.`device_use` like '%" + propertyUse + "%' ";
        }
        if(StringUtils.isNotBlank(propertyNetwork)){
            sql += " and a.network like '%" + propertyNetwork + "%' ";
        }
        if(StringUtils.isNotBlank(propertyLocation)){
            sql += " and a.location like '%" + propertyLocation + "%' ";
        }
        //数据权限过滤

+ 33 - 7
svr/svr-iot/src/main/java/com/yihu/iot/service/product/IotProductBaseInfoPropertyService.java

@ -1,20 +1,19 @@
package com.yihu.iot.service.product;
import com.yihu.iot.dao.product.IotProductBaseInfoDao;
import com.yihu.iot.dao.product.IotProductBaseInfoPropertyDao;
import com.yihu.jw.entity.iot.product.IotProductBaseInfoDO;
import com.yihu.jw.entity.iot.product.IotProductBaseInfoPropertyDO;
import com.yihu.jw.restmodel.iot.device.WlyyPatientDeviceVO;
import com.yihu.jw.restmodel.iot.product.IotProductBaseInfoPropertyVO;
import com.yihu.jw.restmodel.iot.product.IotProductBaseInfoVO;
import com.yihu.jw.restmodel.iot.product.IotProductVO;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.IotRequestMapping;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import static cn.hutool.core.util.ObjectUtil.hasEmpty;
import java.util.List;
/**
 * 类描述:
@ -53,6 +52,7 @@ public class IotProductBaseInfoPropertyService extends BaseJpaService<IotProduct
     */
    public MixEnvelop<IotProductBaseInfoPropertyVO, IotProductBaseInfoPropertyVO> update(IotProductBaseInfoPropertyVO iotProductBaseInfoPropertyVO) {
        IotProductBaseInfoPropertyDO iotProductBaseInfoPropertyDO = convertToModel(iotProductBaseInfoPropertyVO, IotProductBaseInfoPropertyDO.class);
        iotProductBaseInfoPropertyDao.deleteByProductId(iotProductBaseInfoPropertyVO.getProductId());
        iotProductBaseInfoPropertyDao.save(iotProductBaseInfoPropertyDO);
        return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_update);
    }
@ -80,7 +80,33 @@ public class IotProductBaseInfoPropertyService extends BaseJpaService<IotProduct
     * @date 2023/5/5 16:47
     */
    public IotProductBaseInfoPropertyVO findProductPropertyByProductId(String productId) {
        IotProductBaseInfoPropertyDO res = iotProductBaseInfoPropertyDao.findProductPropertyByProductId(productId);
        return convertToModel(res, IotProductBaseInfoPropertyVO.class);
        String sql="SELECT\n" +
                "a.id,\n" +
                "a.product_id \"productId\",\n" +
                "a.`name` \"nameCode\",\n" +
                "(SELECT q.`dict_value` FROM `iot-base`.wlyy_hospital_sys_dict q WHERE q.dict_name='Device_common_name' AND q.`dict_code`=a.`name` ) \"name\", \n" +
                "a.`combination` \"combinationCode\",\n" +
                "(SELECT q.`dict_value` FROM `iot-base`.wlyy_hospital_sys_dict q WHERE q.dict_name='Combination_method' AND q.`dict_code`=a.`combination` )\"combination\", \n" +
                "a.`device_use` \"deviceUseCode\",\n" +
                "(SELECT q.`dict_value` FROM `iot-base`.wlyy_hospital_sys_dict q WHERE q.dict_name='device_use' AND q.`dict_code`=a.`device_use` )\"deviceUse\", \n" +
                "a.`network` \"networkCode\",\n" +
                "(SELECT q.`dict_value` FROM `iot-base`.wlyy_hospital_sys_dict q WHERE q.dict_name='Network_transmission' AND q.`dict_code`=a.`network` )\"network\", \n" +
                "a.`location` \"locationCode\",\n" +
                "(SELECT q.`dict_value` FROM `iot-base`.wlyy_hospital_sys_dict q WHERE q.dict_name='Drop_location' AND q.`dict_code`=a.`location` )\"location\",\n" +
                "a.dictionaries\n" +
                "FROM\n" +
                "	iot_product_base_info_property a" +
                " where 1=1 ";
        if (StringUtils.isNotBlank(productId)){
            sql += " and a.product_id='"+productId+"'";
        }
        List<IotProductBaseInfoPropertyVO> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(IotProductBaseInfoPropertyVO.class));
        if (list.isEmpty()){
            return null;
        }else {
            return list.get(0);
        }
    }
}

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

@ -10,6 +10,7 @@ import com.yihu.jw.entity.iot.product.*;
import com.yihu.jw.restmodel.iot.product.*;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.IotRequestMapping;
import com.yihu.jw.util.common.StringUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang.StringUtils;
@ -434,7 +435,9 @@ public class IotProductBaseInfoService extends BaseJpaService<IotProductBaseInfo
     * @author cx
     * @date 2023/5/5 16:12
     */
    public boolean updateProperty(String productId,String property) {
    public int updateProperty(String productId,String property) {
       return iotProductBaseInfoDao.updateProperty(productId, property);
    }
}