Commit 9bb7fd0c by zhangkb

添加考核指标结果获取接口

parent 8d43a2b2
......@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.keymobile.indicators.model.entity.indicators.CompareUnitDef;
import com.keymobile.indicators.model.entity.indicators.DriveIndCalResultDef;
import com.keymobile.indicators.service.hytobacco.CompareUnitCalLogService;
import com.keymobile.indicators.service.hytobacco.DriveIndCalResultService;
......@@ -45,4 +46,11 @@ public class DriveIndCalResultCtrl {
@RequestParam(defaultValue = "0") int page,@RequestParam(defaultValue = "10") int rows){
return compUnitCalLogService.findPageByCompareId(compareId, page, rows);
}
@ApiOperation(value = "根据对标单元id和年份获取对标指标结果", notes = "根据对标单元id和年份获取对标指标结果")
@PostMapping(value = "/findByCompareIdAndDate")
public List<DriveIndCalResultDef> findByCompareIdAndDate(@RequestParam String compareId,
@RequestParam Integer date){
return driveIndCalResultService.findByCompareIdAndDate(compareId, date);
}
}
......@@ -49,4 +49,7 @@ public interface DriveIndCalResultDefMapper extends BaseMapper<DriveIndCalResult
@Param("indId") String indId,@Param("date") int date);
public List<DriveIndCalResultDef> findByIndIdAndDateAndCompareObjIn(Map<String,Object> param);
public List<DriveIndCalResultDef> findByCompareIdAndDate(@Param("compareId")String compareId,
@Param("date")Integer date);
}
......@@ -51,6 +51,10 @@ public class DriveIndCalResultService {
return driveIndCalResultDefMapper.findByCompareIdAndCompareObjAndIndIdAndDate(compareId, compareObj, indId, date);
}
public List<DriveIndCalResultDef> findByCompareIdAndDate(String compareId,Integer date){
return driveIndCalResultDefMapper.findByCompareIdAndDate(compareId, date);
}
public void calculateComp(String compareId,String compareObjsString,String driveIndIdsString,
int date) {
String[] compareObjs = compareObjsString.split(";");
......
......@@ -129,4 +129,12 @@
</foreach>
order by rank asc
</select>
<select id="findByCompareIdAndDate" resultType="com.keymobile.indicators.model.entity.indicators.DriveIndCalResultDef" >
select *
from drive_ind_cal_result_def
where
compare_id = #{compareId} and
date = #{date}
</select>
</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