Преглед на файлове

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

wangjun преди 4 години
родител
ревизия
8c92de6dd9

+ 7 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/util/AesEncryptUtils.java

@ -23,6 +23,13 @@ public class AesEncryptUtils {
    private static final String ALGORITHMSTR = "AES/ECB/PKCS5Padding";
    //AES_DECRYPT(from_base64(d.patient_name),'jkzl2021ZJXL*#%a')
    public static String jiamiMysql(String str){
        return encrypt(str,KEY);
    }
    public static String jiemiMysql(String str){
        return decrypt(str,KEY);
    }
    public static String decryptMysql(String name,String alias){

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

@ -260,7 +260,7 @@ public class IotPatientDeviceService extends BaseJpaService<IotPatientDeviceDO,
     * @return
     */
    public List<LocationDataVO> findAllDeviceLocations() throws IOException {
        String sql ="select id,idcard idCard,category_code categoryCode,device_sn deviceSn,location,device_time deviceTime,disease_condition diseaseCondition,\n" +
        String sql ="select id,AES_DECRYPT(from_base64(idcard),'jkzl2021ZJXL*#%a') idCard,category_code categoryCode,device_sn deviceSn,location,device_time deviceTime,disease_condition diseaseCondition,\n" +
                "create_time createTime,device_name equimentName from device.wlyy_patient_device_location where del=0 ";
        List<Map<String,Object>> result = jdbcTemplate.queryForList(sql);
        List<LocationDataVO> locationDataVOList = new ArrayList<>();

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

@ -96,7 +96,7 @@ public class MonitorPlatformService  {
            total = json.getInteger("total");
            JSONArray list = json.getJSONArray("list");
            for(int i=0;i<list.size();i++){
                String sql ="select id, idcard idCard,category_code categoryCode,device_sn deviceSn,location,device_time deviceTime,disease_condition diseaseCondition,\n" +
                String sql ="select id, AES_DECRYPT(from_base64(idcard),'jkzl2021ZJXL*#%a') idCard,category_code categoryCode,device_sn deviceSn,location,device_time deviceTime,disease_condition diseaseCondition,\n" +
                        "create_time createTime,device_name equimentName from device.wlyy_patient_device_location where del=0 and  device_sn='"+list.getString(i)+"'";
                List<Map<String,Object>> result = jdbcTemplate.queryForList(sql.toString());
                List<LocationDataVO> locationDataVOList = new ArrayList<>();
@ -159,7 +159,7 @@ public class MonitorPlatformService  {
                        envelop.getDetailModelList().addAll(euipmentList);
                    }
                }
                StringBuffer sql = new StringBuffer("select id,idcard idCard,category_code categoryCode,device_sn deviceSn,location,device_time deviceTime,disease_condition diseaseCondition,\n" +
                StringBuffer sql = new StringBuffer("select id,AES_DECRYPT(from_base64(idcard),'jkzl2021ZJXL*#%a') idCard,category_code categoryCode,device_sn deviceSn,location,device_time deviceTime,disease_condition diseaseCondition,\n" +
                        "create_time createTime,device_name equimentName\n" +
                        "from device.wlyy_patient_device_location  ");
                StringBuffer sqlCounts = new StringBuffer("select count(*) from device.wlyy_patient_device_location ");
@ -1759,7 +1759,7 @@ public class MonitorPlatformService  {
                    location.put("lon", Double.valueOf(json.get("lng")));
                    String insertSql = "INSERT INTO device.wlyy_patient_device_location(patient,idcard,disease_condition,device_sn,\n" +
                            "device_name,category_code,device_time,create_time,location)\n" +
                            "VALUES('" + map.get("code").toString() + "','" + map.get("idcard").toString() + "','" + map.get("disease_condition").toString() + "','" + map.get("device_sn").toString() + "','" + map.get("device_name") + "',\n" +
                            "VALUES('" + map.get("code").toString() + "','" + AesEncryptUtils.jiamiMysql(map.get("idcard").toString()) + "','" + map.get("disease_condition").toString() + "','" + map.get("device_sn").toString() + "','" + map.get("device_name") + "',\n" +
                            "'" + map.get("category_code").toString() + "','" + map.get("create_time") + "','" + map.get("create_time").toString() + "','" + location.toJSONString() + "')\n";
                    jdbcTemplate.execute(insertSql);
                }