Browse Source

跟新相关bug

wangzhinan 3 years ago
parent
commit
7f6311a0f2

+ 1 - 1
common/common-web/src/main/resources/logback-spring.xml

@ -5,7 +5,7 @@
    <springProperty scope="context" name="appName" source="spring.application.name" />
	<property name="log_home" value="/Users/Mewtwo/ideaSpace/log/wlyy-logs/${appName}" />
    <property name="max_history" value="30"/>
    <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/a4endpoint/MedicineDeviceEndpoint.java

@ -808,7 +808,7 @@ public class MedicineDeviceEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseRequestMapping.BaseDevice.getDeviceOrderInfoPage)
    @ApiOperation(value = "设备信息--取药信息")
    public Envelop getDeviceInfo(
            @ApiParam(name = "deviceId", value = "设备Id", required = true)
            @ApiParam(name = "deviceId", value = "设备Id", required = false)
            @RequestParam(value = "deviceId", required = false) String deviceId,
            @ApiParam(name = "startTime", value = "开始时间", required = false)
            @RequestParam(value = "startTime", required = false) String startTime,

+ 5 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/service/a3service/MedicineServive.java

@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
@ -107,7 +108,7 @@ public class MedicineServive {
        String param = "";
        if (StringUtils.isNoneBlank(devId)) {
            param += "?devId=" + devId;
            param += "?devid=" + devId;
        }
        if (StringUtils.isNoneBlank(temperature)) {
            object.put("temperature",temperature);
@ -118,7 +119,8 @@ public class MedicineServive {
        object.put("temperatureControl",temperatureControl);
        object.put("humidityControl",humidityControl);
        object.put("heat",heat);
        param+="&type=SetTemperatureAndHumidity&mess="+object.toJSONString()+"";
        param+="&type=SetTemperatureAndHumidity&mess="+ URLEncoder.encode(object.toString())+"";
        System.out.print("socketUrl+param"+socketUrl+param);
        String res = httpClientUtil.get(socketUrl+param,"utf-8");
        System.out.println(res);
        /* if (StringUtils.isNoneBlank(res)){
@ -140,7 +142,7 @@ public class MedicineServive {
        JSONObject object = new JSONObject();
        String param = "";
        if (StringUtils.isNoneBlank(devId)) {
            param = "?devId=" + devId;
            param = "?devid=" + devId;
        }
        param +="&type="+type+"&mess="+message+"";
        String res = httpClientUtil.get(socketUrl+param,"utf-8");

+ 16 - 7
svr/svr-base/src/main/java/com/yihu/jw/base/service/a3service/MedicineWarrayService.java

@ -76,6 +76,7 @@ public class MedicineWarrayService extends BaseJpaService<Mediicinewarray, Medii
                map.put("logTime",null);
                map.put("type",null);
            }
            maps.put("networkMap",map);
        }
        String countSql = " select " +
                "     COUNT(DISTINCT (d.id)) as count " +
@ -348,7 +349,7 @@ public class MedicineWarrayService extends BaseJpaService<Mediicinewarray, Medii
                    " AND t.log_time <= '" + endTime + "'";
        }
        sql = sql + conditionSql;
        sql = sql + conditionSql +" order by t.log_time desc ";
        List<Map<String,Object>> list=null;
        list = hibenateUtils.createSQLQuery(sql,page,size);
@ -402,7 +403,6 @@ public class MedicineWarrayService extends BaseJpaService<Mediicinewarray, Medii
                "    t.duration as duration,\n" +
                "    t.exceed as exceed,\n" +
                "    t.humidity as humidity,\n" +
                "    sum(t.other_couont+t.plus_couont+t.ship_couont) as total,"+
                "    t.other_couont as otherCouont,\n" +
                "    t.plus_couont as plusCouont,\n" +
                "    t.ship_couont as shipCouont,\n" +
@ -438,7 +438,7 @@ public class MedicineWarrayService extends BaseJpaService<Mediicinewarray, Medii
                    " AND t.log_time <= '" + endTime + "'";
        }
        sql = sql + conditionSql;
        sql = sql + conditionSql+" order by t.log_time desc ";
        List<Map<String,Object>> list=null;
        list = hibenateUtils.createSQLQuery(sql,page,size);
@ -452,9 +452,6 @@ public class MedicineWarrayService extends BaseJpaService<Mediicinewarray, Medii
                conditionSql;
        Logger.getAnonymousLogger().info("finalCountSql="+countSql);
        int count = jdbcTemplate.queryForObject(countSql,Integer.class);
        for (Map<String,Object> map:list){
        }
        result.put("count", count);
        result.put("msg", JavaBeanUtils.getInstance().mapListJson(list));
        return result;
@ -798,8 +795,16 @@ public class MedicineWarrayService extends BaseJpaService<Mediicinewarray, Medii
            Float temperatureLow = Float.parseFloat(mediicinedevice.getWarningTemperatureLow());
            if (mediicinedevice.getTemperaturecontrol().equalsIgnoreCase("1")){
                if(temperature!=null&&(temperature>temperatureHeight||temperature<temperatureLow)){
                    type="温度异常";
                    if (StringUtils.isEmpty(type)){
                        type += "温度异常";
                    }else {
                        type +="温度异常";
                    }
                }else {
                    type+="温度正常";
                }
            }else {
                type+="温度正常";
            }
        }else {
@ -816,7 +821,11 @@ public class MedicineWarrayService extends BaseJpaService<Mediicinewarray, Medii
                    }else {
                        type +="/湿度异常";
                    }
                }else {
                    type+="/湿度正常";
                }
            }else {
                type+="/湿度正常";
            }
        }else {
            type+="/湿度正常";