@ -19,8 +19,8 @@ public interface DeviceInstallMapper extends BaseMapper<DeviceInstallEntity> {
*保存设备信息
*保存设备信息
*@paramdeviceInstallEntity
*@paramdeviceInstallEntity
*/
*/
@Insert("insert into device_install(device_addr,device_name,device_type,data_com,ratio,baudrate,brand,model,building_id,building_name,installer,install_date,is_use) values ("+
@Insert("insert into device_install(device_addr,device_name,device_type,data_com,ratio,baudrate,brand,model,building_id,building_name,installer,install_date,is_use,parity) values ("+
@ -130,13 +130,13 @@ public interface HistoryDataPreMapper extends BaseMapper<HistoryDataPre> {
@Select("<script>"+
@Select("<script>"+
"SELECT "+
"SELECT "+
" <choose>"+
" <choose>"+
" <when test='type == \"1\"'>"+
" <when test='type == \"2\"'>"+
" isnull(t.water_value_pre, 0) as cur_yes_data, "+
" isnull(t.water_value_pre, 0) as cur_yes_data, "+
" isnull(t1.water_value, 0) as yes_data, "+
" isnull(t1.water_value, 0) as yes_data, "+
" isnull(t1.water_value_pre, 0) as pre_yes_data, "+
" isnull(t1.water_value_pre, 0) as pre_yes_data, "+
" CASE WHEN t1.water_value_pre > 0 THEN CONVERT(decimal(18, 2), ABS(isnull(t1.water_value_pre, 0) - isnull(t1.water_value, 0)) / t1.water_value_pre * 100) ELSE '0' END as error_data"+
" CASE WHEN t1.water_value_pre > 0 THEN CONVERT(decimal(18, 2), ABS(isnull(t1.water_value_pre, 0) - isnull(t1.water_value, 0)) / t1.water_value_pre * 100) ELSE '0' END as error_data"+
" </when>"+
" </when>"+
" <when test='type == \"2\"'>"+
" <when test='type == \"1\"'>"+
" isnull(t.elect_value_pre, 0) as cur_yes_data, "+
" isnull(t.elect_value_pre, 0) as cur_yes_data, "+
" isnull(t1.elect_value, 0) as yes_data, "+
" isnull(t1.elect_value, 0) as yes_data, "+
" isnull(t1.elect_value_pre, 0) as pre_yes_data, "+
" isnull(t1.elect_value_pre, 0) as pre_yes_data, "+
@ -189,22 +189,22 @@ public interface HistoryDataPreMapper extends BaseMapper<HistoryDataPre> {