Commit ee77160f by zhangkb

修改填充基础项报表接口

parent d08a82bc
...@@ -22,8 +22,8 @@ public class IndicatorReportCtrl { ...@@ -22,8 +22,8 @@ public class IndicatorReportCtrl {
@ApiOperation(value = "整合指标本期同期报表数据", notes = "整合指标本期同期报表数据") @ApiOperation(value = "整合指标本期同期报表数据", notes = "整合指标本期同期报表数据")
@PostMapping(value = "/dealReportOne") @PostMapping(value = "/dealReportOne")
public String dealReportOne(@RequestParam String code) { public String dealReportOne(@RequestParam String code,@RequestParam Integer date) {
indicatorsReportService.dealReportOne(code); indicatorsReportService.dealReportOne(code,date);
return "考核指标本期同期报表数据开始整合..."; return "考核指标本期同期报表数据开始整合...";
} }
......
...@@ -46,14 +46,14 @@ public interface DriveIndCalResultDefMapper extends BaseMapper<DriveIndCalResult ...@@ -46,14 +46,14 @@ public interface DriveIndCalResultDefMapper extends BaseMapper<DriveIndCalResult
public DriveIndCalResultDef findByCompareIdAndCompareObjAndIndIdAndDate( public DriveIndCalResultDef findByCompareIdAndCompareObjAndIndIdAndDate(
@Param("compareId") String compareId,@Param("compareObj") String compareObj, @Param("compareId") String compareId,@Param("compareObj") String compareObj,
@Param("indId") String indId,@Param("date") int date); @Param("indId") String indId,@Param("date") Integer date);
public List<DriveIndCalResultDef> findByIndIdAndDateAndCompareObjIn(Map<String,Object> param); public List<DriveIndCalResultDef> findByIndIdAndDateAndCompareObjIn(Map<String,Object> param);
public List<DriveIndCalResultDef> findByCompareIdAndDate(@Param("compareId")String compareId, public List<DriveIndCalResultDef> findByCompareIdAndDate(@Param("compareId")String compareId,
@Param("date")Integer date); @Param("date")Integer date);
public List<DriveIndCalResultDef> findReportData(@Param("code")String code); public List<DriveIndCalResultDef> findReportData(@Param("code")String code,@Param("date") Integer date);
//批量保存 //批量保存
public void batchSave(@Param("datas")List<DriveIndCalResultDef> datas); public void batchSave(@Param("datas")List<DriveIndCalResultDef> datas);
......
...@@ -174,9 +174,9 @@ public class IndicatorsReportService { ...@@ -174,9 +174,9 @@ public class IndicatorsReportService {
//整合指标本期同期指标报表数据 //整合指标本期同期指标报表数据
@Async @Async
public String dealReportOne(String code) { public String dealReportOne(String code,Integer date) {
//获取所有考核指标结果 //获取所有考核指标结果
List<DriveIndCalResultDef> calDatas = driveIndCalResultDefMapper.findReportData(code); List<DriveIndCalResultDef> calDatas = driveIndCalResultDefMapper.findReportData(code,date);
List<IndicatorsReportOne> datas = new ArrayList<>(); List<IndicatorsReportOne> datas = new ArrayList<>();
for(DriveIndCalResultDef calData : calDatas) { for(DriveIndCalResultDef calData : calDatas) {
//判断是否存在 //判断是否存在
......
...@@ -143,8 +143,8 @@ ...@@ -143,8 +143,8 @@
from drive_ind_cal_result_def from drive_ind_cal_result_def
where where
score is not null and score is not null and
code = #{code} code = #{code} and
order by date desc date = #{date}
</select> </select>
<insert id="batchSave" parameterType="java.util.List"> <insert id="batchSave" parameterType="java.util.List">
......
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