Explorar o código

Merge branch 'sudve' of suhaiwen/wlyy2.0 into dev

叶仕杰 %!s(int64=5) %!d(string=hai) anos
pai
achega
106a9b389f

+ 9 - 8
common/common-entity/src/main/java/com/yihu/jw/entity/iot/company/IotCompanyDO.java

@ -74,7 +74,7 @@ public class IotCompanyDO extends UuidIdentityEntityWithOperator implements Seri
    @Column(name = "audit_name")
    private String auditName;//审核人姓名
    @Transient
//    private List<IotCompanyAppDO> appList;//应用实体
    private List<IotCompanyAppDO> appList;//应用实体
    public String getSaasId() {
        return saasId;
@ -285,11 +285,12 @@ public class IotCompanyDO extends UuidIdentityEntityWithOperator implements Seri
        this.auditName = auditName;
    }
//    public List<IotCompanyAppDO> getAppList() {
//        return appList;
//    }
//
//    public void setAppList(List<IotCompanyAppDO> appList) {
//        this.appList = appList;
//    }
    @Transient
    public List<IotCompanyAppDO> getAppList() {
        return appList;
    }
    public void setAppList(List<IotCompanyAppDO> appList) {
        this.appList = appList;
    }
}

+ 11 - 3
svr/svr-iot/src/main/java/com/yihu/iot/service/company/IotCompanyService.java

@ -198,9 +198,17 @@ public class IotCompanyService extends BaseJpaService<IotCompanyDO,IotCompanyDao
        sql.append("order by c.update_time desc limit ").append((page-1)*size).append(",").append(size);
        List<IotCompanyDO> list = jdbcTempalte.query(sql.toString(),args.toArray(),new BeanPropertyRowMapper(IotCompanyDO.class));
        list.forEach(one->{
            findType(one);
        });
        if(accountType.equalsIgnoreCase("1")){
            //得到list数据
            list.forEach(one->{
                findType(one);
            });
        }
        if(accountType.equalsIgnoreCase("0")){
            list.forEach(one->{
                findAppType(one);
            });
        }
        List<Map<String,Object>> countList = jdbcTempalte.queryForList(sqlCount.toString());
        long count = Long.valueOf(countList.get(0).get("count").toString());

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

@ -8,6 +8,7 @@ import com.yihu.jw.restmodel.iot.product.*;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang.StringUtils;
import org.omg.CORBA.BAD_CONTEXT;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -146,9 +147,37 @@ public class IotProductBaseInfoService extends BaseJpaService<IotProductBaseInfo
        //基础信息
        String productId = baseInfoDO.getId();
        IotProductBaseInfoDO baseInfoDOOld = iotProductBaseInfoDao.findById(productId);
        baseInfoDO.setDel(1);
        baseInfoDO.setSaasId(baseInfoDOOld.getSaasId());
        iotProductBaseInfoDao.save(baseInfoDO);
        baseInfoDOOld.setParentId(baseInfoDO.getParentId());
        baseInfoDOOld.setProductClassify(baseInfoDO.getProductClassify());
        baseInfoDOOld.setSupplierName(baseInfoDO.getSupplierName());
        baseInfoDOOld.setSupplierId(baseInfoDO.getSupplierId());
        baseInfoDOOld.setCompanyName(baseInfoDO.getCompanyName());
        baseInfoDOOld.setCompanyId(baseInfoDO.getCompanyId());
        baseInfoDOOld.setProductSubclass(baseInfoDO.getProductSubclass());
        baseInfoDOOld.setInstrumentClassify(baseInfoDO.getInstrumentClassify());
        baseInfoDOOld.setRegisterCertificate(baseInfoDO.getRegisterCertificate());
        baseInfoDOOld.setRegisterCertificateImg(baseInfoDO.getRegisterCertificateImg());
        baseInfoDOOld.setStartTime(baseInfoDO.getStartTime());
        baseInfoDOOld.setEndTime(baseInfoDO.getEndTime());
        baseInfoDOOld.setName(baseInfoDO.getName());
        baseInfoDOOld.setAlias(baseInfoDO.getAlias());
        baseInfoDOOld.setBrandName(baseInfoDO.getBrandName());
        baseInfoDOOld.setOriginPlace(baseInfoDO.getOriginPlace());
        baseInfoDOOld.setOriginType(baseInfoDO.getOriginType());
        baseInfoDOOld.setIsColdChain(baseInfoDO.getIsColdChain());
        baseInfoDOOld.setCertificateId(baseInfoDO.getCertificateId());
        baseInfoDOOld.setCertificateName(baseInfoDO.getCertificateName());
        baseInfoDOOld.setType(baseInfoDO.getType());
        baseInfoDOOld.setDel(0);
        baseInfoDOOld.setRegisterName(baseInfoDO.getRegisterName());
        baseInfoDOOld.setSpec(baseInfoDO.getSpec());
        baseInfoDOOld.setUnit(baseInfoDO.getUnit());
        baseInfoDOOld.setPurchasePrice(baseInfoDO.getPurchasePrice());
        baseInfoDOOld.setRetailPrice(baseInfoDO.getRetailPrice());
        baseInfoDOOld.setCategoryCode(baseInfoDO.getCategoryCode());
        baseInfoDOOld.setSaasId(getCode());
        baseInfoDOOld.setId(baseInfoDO.getId());
        iotProductBaseInfoDao.save(baseInfoDOOld);
        //扩展信息
        IotProductExtendInfoDO extendInfoDOOld = iotProductExtendInfoDao.findByProductId(productId);
        extendInfoDOOld.setContraindication(extendInfoDO.getContraindication());
@ -158,6 +187,9 @@ public class IotProductBaseInfoService extends BaseJpaService<IotProductBaseInfo
        extendInfoDOOld.setStandard(extendInfoDO.getStandard());
        extendInfoDOOld.setUseRange(extendInfoDO.getUseRange());
        extendInfoDOOld.setVersion(extendInfoDO.getVersion());
        extendInfoDOOld.setAgencyName(extendInfoDO.getAgencyName());
        extendInfoDOOld.setCompanyName(extendInfoDO.getCompanyName());
        extendInfoDOOld.setRatifyDate(extendInfoDO.getRatifyDate());
        iotProductExtendInfoDao.save(extendInfoDOOld);
        //附件
        List<IotProductAttachmentDO> attachmentDOOldList = iotProductAttachmentDao.findByProductId(productId);

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

@ -100,16 +100,16 @@ fastDFS:
spring:
  profiles: jwtest
  datasource:
    url: jdbc:mysql://172.19.103.77:3306/xmiot?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: root
    password: 123456
    url: jdbc:mysql://172.26.0.104/xmiot?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: ssgg
    password: ssgg@jkzl2019
  elasticsearch:
    cluster-name: jkzl #默认即为elasticsearch  集群名
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    jest:
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200
  wlyy:
    url: http://www.xmtyw.cn/wlyy/
    url: http://ehr.yihu.com/wlyy/
fast-dfs:
  tracker-server: 172.19.103.54:22122 #服务器地址
fastDFS: