Commit ee77160f by zhangkb

修改填充基础项报表接口

parent d08a82bc
......@@ -22,8 +22,8 @@ public class IndicatorReportCtrl {
@ApiOperation(value = "整合指标本期同期报表数据", notes = "整合指标本期同期报表数据")
@PostMapping(value = "/dealReportOne")
public String dealReportOne(@RequestParam String code) {
indicatorsReportService.dealReportOne(code);
public String dealReportOne(@RequestParam String code,@RequestParam Integer date) {
indicatorsReportService.dealReportOne(code,date);
return "考核指标本期同期报表数据开始整合...";
}
......
......@@ -46,14 +46,14 @@ public interface DriveIndCalResultDefMapper extends BaseMapper<DriveIndCalResult
public DriveIndCalResultDef findByCompareIdAndCompareObjAndIndIdAndDate(
@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> findByCompareIdAndDate(@Param("compareId")String compareId,
@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);
......
......@@ -174,9 +174,9 @@ public class IndicatorsReportService {
//整合指标本期同期指标报表数据
@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<>();
for(DriveIndCalResultDef calData : calDatas) {
//判断是否存在
......
......@@ -143,8 +143,8 @@
from drive_ind_cal_result_def
where
score is not null and
code = #{code}
order by date desc
code = #{code} and
date = #{date}
</select>
<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