Commit 5e533241 by zhangkb

修改批量新增和修改报表3数据接口返回值

parent a1207e3f
......@@ -14,7 +14,7 @@ public interface ReportThreeMapper extends BaseMapper<IndicatorsReportThree>{
public IndicatorsReportThree getByParam(@Param("compareObj")String compareObj,
@Param("date")Integer date,@Param("type")String type);
public void batchSave(@Param("datas")List<IndicatorsReportThree> datas);
public List<IndicatorsReportThree> batchSave(@Param("datas")List<IndicatorsReportThree> datas);
public void batchUpdate(@Param("datas")List<IndicatorsReportThree> datas);
public List<IndicatorsReportThree> batchUpdate(@Param("datas")List<IndicatorsReportThree> datas);
}
......@@ -59,9 +59,10 @@ public class IndicatorsReportService {
return reportTwoData.getId();
}
public void batchSaveOrUpdateReportThree(List<IndicatorsReportThree> reportThreeDatas) {
public List<IndicatorsReportThree> batchSaveOrUpdateReportThree(List<IndicatorsReportThree> reportThreeDatas) {
List<IndicatorsReportThree> addList = new ArrayList<>();
List<IndicatorsReportThree> updateList = new ArrayList<>();
List<IndicatorsReportThree> result = new ArrayList<>();
for(IndicatorsReportThree reportThreeData : reportThreeDatas) {
if(reportThreeData.getId()==null) {
addList.add(reportThreeData);
......@@ -70,11 +71,14 @@ public class IndicatorsReportService {
}
}
if(!addList.isEmpty()) {
reportThreeMapper.batchSave(addList);
addList = reportThreeMapper.batchSave(addList);
}
if(!updateList.isEmpty()) {
reportThreeMapper.batchUpdate(updateList);
updateList = reportThreeMapper.batchUpdate(updateList);
}
result.addAll(addList);
result.addAll(updateList);
return result;
}
public void batchSaveOrUpdateReportTwo(List<IndicatorsReportTwo> reportTwoDatas) {
......@@ -208,6 +212,7 @@ public class IndicatorsReportService {
//加入list中
dataList.add(indReportData);
}
dataList = this.batchSaveOrUpdateReportThree(dataList);
}
//算提升前三末三指标个数
if(!improveValue.isEmpty()) {
......
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