Commit 8b03a412 by zhangkb

添加根据考核目录类型和code获取考核目录list

parent 291245f3
...@@ -106,4 +106,11 @@ public class IndCatalogCtrl { ...@@ -106,4 +106,11 @@ public class IndCatalogCtrl {
public List<DriveIndCatalog> getByDriveCatalogIdList(@RequestParam List<Integer> catalogIds){ public List<DriveIndCatalog> getByDriveCatalogIdList(@RequestParam List<Integer> catalogIds){
return driveIndCatalogService.getByCatalogIdList(catalogIds); return driveIndCatalogService.getByCatalogIdList(catalogIds);
} }
@ApiOperation(value = "根据考核指标目录类型和code获取考核目录list", notes = "根据考核指标目录类型和code获取考核目录list")
@PostMapping(value = "/getByCatalogTypeAndCode")
public List<DriveIndCatalog> getByCatalogTypeAndCode(@RequestParam String catalogType,
@RequestParam List<String> codes){
return driveIndCatalogService.getByCatalogTypeAndCode(catalogType, codes);
}
} }
...@@ -22,4 +22,6 @@ public interface DriveIndCatalogMapper extends BaseMapper<DriveIndCatalog>{ ...@@ -22,4 +22,6 @@ public interface DriveIndCatalogMapper extends BaseMapper<DriveIndCatalog>{
public List<DriveIndCatalog> findFirstVaildCatalog(Map<String,Object> params); public List<DriveIndCatalog> findFirstVaildCatalog(Map<String,Object> params);
public List<DriveIndCatalog> findByCatalogIdIn(@Param("ids") List<Integer> ids); public List<DriveIndCatalog> findByCatalogIdIn(@Param("ids") List<Integer> ids);
public List<DriveIndCatalog> findByCatalogTypeAndCode(Map<String,Object> params);
} }
...@@ -108,4 +108,11 @@ public class DriveIndCatalogService { ...@@ -108,4 +108,11 @@ public class DriveIndCatalogService {
public List<DriveIndCatalog> getByCatalogIdList(List<Integer> catalogIds){ public List<DriveIndCatalog> getByCatalogIdList(List<Integer> catalogIds){
return driveIndCatalogMapper.findByCatalogIdIn(catalogIds); return driveIndCatalogMapper.findByCatalogIdIn(catalogIds);
} }
public List<DriveIndCatalog> getByCatalogTypeAndCode(String type,List<String> codes){
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("type", type);
paramMap.put("codes", codes);
return driveIndCatalogMapper.findByCatalogTypeAndCode(paramMap);
}
} }
...@@ -58,4 +58,15 @@ ...@@ -58,4 +58,15 @@
#{id} #{id}
</foreach> </foreach>
</select> </select>
<select id="findByCatalogTypeAndCode" parameterType="map" resultType="com.keymobile.indicators.model.entity.indicators.DriveIndCatalog" >
select *
from drive_ind_catalog
where
catalog_type=#{type} and
code in
<foreach item="id" collection="codes" open="(" close=")" separator=",">
#{id}
</foreach>
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment