Commit a06b5e4a authored by zhuxiang's avatar zhuxiang
Browse files

优化

parent 2f590157
...@@ -48,8 +48,14 @@ public class ReportDataInfoServiceImpl extends ServiceImpl<ReportDataInfoDao, Re ...@@ -48,8 +48,14 @@ public class ReportDataInfoServiceImpl extends ServiceImpl<ReportDataInfoDao, Re
// 获取当前日期 // 获取当前日期
LocalDate now = LocalDate.now(); LocalDate now = LocalDate.now();
// 获取当前月份(1 到 12) // 获取当前月份(1 到 12)
int currentMonth = now.getMonthValue() - 1; int year = now.getYear();
int currentMonth = now.getMonthValue();
if (currentMonth == 1) {
year = year - 1;
currentMonth = 12;
}
reportDataInfoDTO.setMonth(currentMonth); reportDataInfoDTO.setMonth(currentMonth);
reportDataInfoDTO.setYear(year);
return baseMapper.queryList(reportDataInfoDTO); return baseMapper.queryList(reportDataInfoDTO);
} }
...@@ -88,13 +94,12 @@ public class ReportDataInfoServiceImpl extends ServiceImpl<ReportDataInfoDao, Re ...@@ -88,13 +94,12 @@ public class ReportDataInfoServiceImpl extends ServiceImpl<ReportDataInfoDao, Re
//财务绩效 //财务绩效
score = row.getJSONObject(4); score = row.getJSONObject(4);
totalScore = score.getString("v"); totalScore = score.getString("v");
}else if (reportDataInfoEntity.getUserId().equals("1829057630693335045")) { } else if (reportDataInfoEntity.getUserId().equals("1829057630693335045")) {
//张萌 //张萌
score = row.getJSONObject(8); score = row.getJSONObject(8);
totalScore = score.getString("v"); totalScore = score.getString("v");
} } else if (reportDataInfoEntity.getUserId().equals("1829057630693335043")
else if (reportDataInfoEntity.getUserId().equals("1829057630693335043") || reportDataInfoEntity.getUserId().equals("1942780351184125954")) {
||reportDataInfoEntity.getUserId().equals("1942780351184125954")) {
//人事部 //人事部
score = row.getJSONObject(9); score = row.getJSONObject(9);
totalScore = score.getString("v"); totalScore = score.getString("v");
...@@ -301,12 +306,12 @@ public class ReportDataInfoServiceImpl extends ServiceImpl<ReportDataInfoDao, Re ...@@ -301,12 +306,12 @@ public class ReportDataInfoServiceImpl extends ServiceImpl<ReportDataInfoDao, Re
//财务绩效 //财务绩效
score = row.getJSONObject(4); score = row.getJSONObject(4);
totalScore = score.getString("v"); totalScore = score.getString("v");
}else if (reportDataInfoEntity.getUserId().equals("1829057630693335045")) { } else if (reportDataInfoEntity.getUserId().equals("1829057630693335045")) {
//张萌 //张萌
score = row.getJSONObject(8); score = row.getJSONObject(8);
totalScore = score.getString("v"); totalScore = score.getString("v");
}else if (reportDataInfoEntity.getUserId().equals("1829057630693335043") } else if (reportDataInfoEntity.getUserId().equals("1829057630693335043")
||reportDataInfoEntity.getUserId().equals("1942780351184125954")) { || reportDataInfoEntity.getUserId().equals("1942780351184125954")) {
//人事部 //人事部
score = row.getJSONObject(9); score = row.getJSONObject(9);
totalScore = score.getString("v"); totalScore = score.getString("v");
......
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
<if test="month != null and month != ''"> <if test="month != null and month != ''">
and r.month = #{month} and r.month = #{month}
</if> </if>
<if test="year != null and year != ''">
and r.year = #{year}
</if>
</where> </where>
</select> </select>
</mapper> </mapper>
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