修复后台设备检索
This commit is contained in:
parent
7e16f91777
commit
9e8bf4e25f
|
|
@ -210,4 +210,13 @@ public class SurvDictDeviceCateController extends JeecgController<SurvDictDevice
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "06. 列表查询", notes = "")
|
||||||
|
@ApiOperationSupport(order = 1)
|
||||||
|
@GetMapping(value = "/getDeviceCateList")
|
||||||
|
public Result<List<SurvDictDeviceCate>> getDeviceCateList() {
|
||||||
|
List<SurvDictDeviceCate> list = fDictDeviceCateService.getDistinctDeployType();
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,6 @@ import java.util.List;
|
||||||
public interface SurvDictDeviceCateMapper extends BaseMapper<SurvDictDeviceCate> {
|
public interface SurvDictDeviceCateMapper extends BaseMapper<SurvDictDeviceCate> {
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
List<SurvDictDeviceCate> listAll(SurvDictDeviceCate survDictDeviceCate);
|
List<SurvDictDeviceCate> listAll(SurvDictDeviceCate survDictDeviceCate);
|
||||||
|
|
||||||
|
List<SurvDictDeviceCate> getDistinctDeployType();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,9 @@
|
||||||
<if test="query.stationCode!=null and query.stationCode!=''">
|
<if test="query.stationCode!=null and query.stationCode!=''">
|
||||||
and STATION_CODE = #{query.stationCode}
|
and STATION_CODE = #{query.stationCode}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="query.deployType!=null and query.deployType!=''">
|
||||||
|
and DEPLOY_TYPE = #{query.deployType}
|
||||||
|
</if>
|
||||||
<if test="query.deviceCode!=null and query.deviceCode!=''">
|
<if test="query.deviceCode!=null and query.deviceCode!=''">
|
||||||
and DEVICE_CODE = #{query.deviceCode}
|
and DEVICE_CODE = #{query.deviceCode}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,14 @@
|
||||||
from surv_dict_device_cate
|
from surv_dict_device_cate
|
||||||
ORDER BY CONVERT(CATE_NAME USING gbk) ASC
|
ORDER BY CONVERT(CATE_NAME USING gbk) ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getDistinctDeployType" resultMap="FDictDeviceCateMap">
|
||||||
|
SELECT * FROM (
|
||||||
|
SELECT
|
||||||
|
*,
|
||||||
|
ROW_NUMBER() OVER (PARTITION BY DEPLOY_TYPE ORDER BY DEPLOY_TYPE) as rn
|
||||||
|
FROM surv_dict_device_cate where DEPLOY_TYPE <> ''
|
||||||
|
) temp
|
||||||
|
WHERE rn = 1;
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -14,4 +14,6 @@ import java.util.List;
|
||||||
public interface SurvDictDeviceCateService extends IService<SurvDictDeviceCate> {
|
public interface SurvDictDeviceCateService extends IService<SurvDictDeviceCate> {
|
||||||
|
|
||||||
List<SurvDictDeviceCate> listAll(SurvDictDeviceCate survDictDeviceCate);
|
List<SurvDictDeviceCate> listAll(SurvDictDeviceCate survDictDeviceCate);
|
||||||
|
|
||||||
|
List<SurvDictDeviceCate> getDistinctDeployType();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,7 @@ import org.jeecg.modules.appmana.mapper.SurvDictDeviceCateMapper;
|
||||||
import org.jeecg.modules.appmana.service.SurvDictDeviceCateService;
|
import org.jeecg.modules.appmana.service.SurvDictDeviceCateService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 设备种类字典
|
* @Description: 设备种类字典
|
||||||
|
|
@ -41,4 +38,9 @@ public class SurvDictDeviceCateServiceImpl extends ServiceImpl<SurvDictDeviceCat
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SurvDictDeviceCate> getDistinctDeployType() {
|
||||||
|
return baseMapper.getDistinctDeployType();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue