Browse Source

Merge branch 'dev' of shikejing/wlyy2.0 into dev

shikejing 4 years ago
parent
commit
1d2c260583

File diff suppressed because it is too large
+ 23 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/util/TransforSqlUtl.java


+ 19 - 16
svr/svr-iot/src/main/java/com/yihu/iot/service/device/WlyyDeviceService.java

@ -4,6 +4,7 @@ package com.yihu.iot.service.device;
import com.yihu.iot.service.common.OrgUserService;
import com.yihu.iot.service.useragent.UserAgent;
import com.yihu.jw.entity.util.AesEncryptUtils;
import com.yihu.jw.entity.util.TransforSqlUtl;
import com.yihu.jw.restmodel.iot.device.DeviceHealthIndexVO;
import com.yihu.jw.restmodel.iot.device.WlyyDeviceVO;
import com.yihu.jw.restmodel.iot.device.WlyyHealthStandardVO;
@ -80,29 +81,31 @@ public class WlyyDeviceService {
        sql += " order by id desc ";
        Long count = Long.valueOf(jdbcTemplate.queryForList(sql).size());
        sql += "limit " + (page - 1) * pageSize + "," + pageSize;
        sql = TransforSqlUtl.deviceAll(sql);
        List<WlyyDeviceVO> deviceVOList = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(WlyyDeviceVO.class));
        deviceVOList.forEach(one->{
            one.setLinkman(AesEncryptUtils.decrypt(one.getLinkman()));
            one.setTel(AesEncryptUtils.decrypt(one.getTel()));
            one.setRepresentative(AesEncryptUtils.decrypt(one.getRepresentative()));
            one.setApplicantName(AesEncryptUtils.decrypt(one.getApplicantName()));
            one.setApplicantTel(AesEncryptUtils.decrypt(one.getApplicantTel()));
            one.setApplicantIdentity(AesEncryptUtils.decrypt(one.getApplicantIdentity()));
        });
//        deviceVOList.forEach(one->{
//            one.setLinkman(AesEncryptUtils.decrypt(one.getLinkman()));
//            one.setTel(AesEncryptUtils.decrypt(one.getTel()));
//            one.setRepresentative(AesEncryptUtils.decrypt(one.getRepresentative()));
//            one.setApplicantName(AesEncryptUtils.decrypt(one.getApplicantName()));
//            one.setApplicantTel(AesEncryptUtils.decrypt(one.getApplicantTel()));
//            one.setApplicantIdentity(AesEncryptUtils.decrypt(one.getApplicantIdentity()));
//        });
        return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Common.message_success_find, deviceVOList, page, pageSize, count);
    }
    public MixEnvelop<WlyyDeviceVO,WlyyDeviceVO> findById(Long id){
        String sql = "select * from device.wlyy_devices where id = "+id;
        sql = TransforSqlUtl.deviceAll(sql);
        List<WlyyDeviceVO> deviceVOList = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(WlyyDeviceVO.class));
        deviceVOList.forEach(one->{
            one.setLinkman(AesEncryptUtils.decrypt(one.getLinkman()));
            one.setTel(AesEncryptUtils.decrypt(one.getTel()));
            one.setRepresentative(AesEncryptUtils.decrypt(one.getRepresentative()));
            one.setApplicantName(AesEncryptUtils.decrypt(one.getApplicantName()));
            one.setApplicantTel(AesEncryptUtils.decrypt(one.getApplicantTel()));
            one.setApplicantIdentity(AesEncryptUtils.decrypt(one.getApplicantIdentity()));
        });
//        deviceVOList.forEach(one->{
//            one.setLinkman(AesEncryptUtils.decrypt(one.getLinkman()));
//            one.setTel(AesEncryptUtils.decrypt(one.getTel()));
//            one.setRepresentative(AesEncryptUtils.decrypt(one.getRepresentative()));
//            one.setApplicantName(AesEncryptUtils.decrypt(one.getApplicantName()));
//            one.setApplicantTel(AesEncryptUtils.decrypt(one.getApplicantTel()));
//            one.setApplicantIdentity(AesEncryptUtils.decrypt(one.getApplicantIdentity()));
//        });
        return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find,deviceVOList.get(0));
    }

+ 2 - 0
svr/svr-statistics/src/main/java/com/yihu/wlyy/statistics/etl/convert/wlyy/UseDeviceTypeConvert.java

@ -2,6 +2,7 @@ package com.yihu.wlyy.statistics.etl.convert.wlyy;
import com.yihu.jw.entity.base.statistics.DimensionQuotaDO;
import com.yihu.jw.entity.util.TransforSqlUtl;
import com.yihu.wlyy.statistics.etl.convert.Convert;
import com.yihu.wlyy.statistics.vo.DataModel;
import org.springframework.jdbc.core.JdbcTemplate;
@ -55,6 +56,7 @@ public class UseDeviceTypeConvert implements Convert {
    public Map<String,Object> getTeam(DataModel dataModel,JdbcTemplate jdbcTemplate){
        String deviceCode =  dataModel.getHealthProblem();
        String sql = " select * from device.wlyy_devices d where d.device_code ='"+deviceCode+"' and is_grant=1";
        sql = TransforSqlUtl.deviceAll(sql);
        List<Map<String,Object>> result = jdbcTemplate.queryForList(sql);
        if(result.size()>0){
            return result.get(0);