|
@@ -27,7 +27,6 @@ import com.hb.proj.model.Workload;
|
|
|
import com.hb.proj.model.Wpg;
|
|
|
import com.hb.proj.model.WpgCorrect;
|
|
|
import com.hb.proj.utils.JsonOutUtils;
|
|
|
-import com.hb.proj.utils.RptMonthUtil;
|
|
|
import com.hb.proj.utils.RptOuter;
|
|
|
import com.hb.xframework.util.DateUtil;
|
|
|
import com.hb.xframework.util.MapUtils;
|
|
@@ -47,21 +46,21 @@ public class HomeRptController {
|
|
|
|
|
|
/**
|
|
|
* 首页工作量统计表
|
|
|
+ * 2022.5.26 增加月份条件,统计截至到指定月份
|
|
|
* @param request
|
|
|
* @param response
|
|
|
*/
|
|
|
@RequestMapping("/workloadRpt")
|
|
|
- public void workloadRpt(String year,HttpServletRequest request,HttpServletResponse response){
|
|
|
+ public void workloadRpt(String year,Integer month,HttpServletRequest request,HttpServletResponse response){
|
|
|
Calendar ca=Calendar.getInstance();
|
|
|
- String nowYear=String.valueOf(ca.get(Calendar.YEAR));
|
|
|
- if(StringUtils.isEmpty(year)){
|
|
|
- year=nowYear;
|
|
|
+ if(month==null||month.intValue()<1||month.intValue()>12){
|
|
|
+ month=ca.get(Calendar.MONTH)+1; //默认自然月当月
|
|
|
}
|
|
|
- int nowMonth=12;
|
|
|
- if(year.equals(nowYear)){ //统计的是今年 就足月的月份
|
|
|
- nowMonth=RptMonthUtil.getFullMonthNum(ca);
|
|
|
+ if(StringUtils.isEmpty(year)){
|
|
|
+ year=String.valueOf(ca.get(Calendar.YEAR));
|
|
|
}
|
|
|
- String endMonth=String.format("%02d",nowMonth);
|
|
|
+
|
|
|
+ String endMonth=String.format("%02d",month);
|
|
|
|
|
|
String preyear=String.valueOf(Integer.parseInt(year)-1);
|
|
|
List<Map<String,Object>> mths=new ArrayList<Map<String,Object>>(12);
|