|
@@ -318,7 +318,7 @@ public class ContrastController {
|
|
public AjaxResult addBenchmarkZj(HttpServletRequest request,Tablepar tablepar, String wpId, String year, String month, String zjs) {
|
|
public AjaxResult addBenchmarkZj(HttpServletRequest request,Tablepar tablepar, String wpId, String year, String month, String zjs) {
|
|
|
|
|
|
List<BenchMarkVo> vos=null;
|
|
List<BenchMarkVo> vos=null;
|
|
- // List<BenchMarkVo> vos =contrastWtService.benchmarkWtList(wpId,wtId,beginDate, endDate);
|
|
|
|
|
|
+ // List<BenchMarkVo> vos =contrastWtService.benchmarkWtList(wpId,wtId,beginDate, endDate);
|
|
|
|
|
|
contrastZjService.addBenchmarkZj(request, wpId, year, month, zjs);
|
|
contrastZjService.addBenchmarkZj(request, wpId, year, month, zjs);
|
|
|
|
|
|
@@ -330,15 +330,6 @@ public class ContrastController {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- Map<String, ConditionVo> ctmap = null;
|
|
|
|
- if (null != request.getSession().getAttribute("bmwtvos")) {
|
|
|
|
- ctmap = (Map<String, ConditionVo>) request.getSession().getAttribute("bmwtvos");
|
|
|
|
- }else
|
|
|
|
- {
|
|
|
|
- ctmap=new HashMap<>();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- Map<String,Object> map=new HashMap<>();
|
|
|
|
if (vos != null && !vos.isEmpty()) {
|
|
if (vos != null && !vos.isEmpty()) {
|
|
BenchmarkUtil bu = new BenchmarkUtil();
|
|
BenchmarkUtil bu = new BenchmarkUtil();
|
|
vos = bu.getBenchMarkOrder(vos);
|
|
vos = bu.getBenchMarkOrder(vos);
|
|
@@ -347,8 +338,6 @@ public class ContrastController {
|
|
{
|
|
{
|
|
vos = bu.getBenchMarkOrder(vos,tablepar);
|
|
vos = bu.getBenchMarkOrder(vos,tablepar);
|
|
}
|
|
}
|
|
- map.put("list",vos);//每次添加,前台需要把新返回的记录,追加到前台seesion对象中
|
|
|
|
- map.put("key",ctmap);//每次添加,前台需要把新返回的记录,追加到前台seesion对象中
|
|
|
|
return AjaxResult.successData(AjaxStatus.success.code, vos);
|
|
return AjaxResult.successData(AjaxStatus.success.code, vos);
|
|
} else {
|
|
} else {
|
|
return AjaxResult.successData(AjaxStatus.emptyresultset.code, vos);
|
|
return AjaxResult.successData(AjaxStatus.emptyresultset.code, vos);
|
|
@@ -393,23 +382,26 @@ public class ContrastController {
|
|
**/
|
|
**/
|
|
@PostMapping("/benchmarkZjWtList")
|
|
@PostMapping("/benchmarkZjWtList")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- public AjaxResult benchmarkZjWtList(HttpServletRequest request,Tablepar tablepar, ConditionVo ct) {
|
|
|
|
|
|
+ public AjaxResult benchmarkZjWtList(HttpServletRequest request,Tablepar tablepar, String cid) {
|
|
List<BenchMarkVo> vos=new ArrayList<>();
|
|
List<BenchMarkVo> vos=new ArrayList<>();
|
|
-// Map<String, List<ConditionVo>> ctmap = null;
|
|
|
|
-// if (null != request.getSession().getAttribute("bmwtvos")) {
|
|
|
|
-// ctmap = (Map<String, List<ConditionVo>>) request.getSession().getAttribute("bmwtvos");
|
|
|
|
-// } else {
|
|
|
|
-// ctmap = new HashMap<String, List<ConditionVo>>();
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
- if (StringUtils.notEmp(ct) ) {
|
|
|
|
|
|
+ Map<String, List<ConditionVo>> ctmap = null;
|
|
|
|
+ if (null != request.getSession().getAttribute("bmwtvos")) {
|
|
|
|
+ ctmap = (Map<String, List<ConditionVo>>) request.getSession().getAttribute("bmwtvos");
|
|
|
|
+ } else {
|
|
|
|
+ ctmap = new HashMap<String, List<ConditionVo>>();
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ if (StringUtils.notEmp(cid) && ctmap.containsKey(cid)) {
|
|
|
|
+ List<ConditionVo> ctvos = ctmap.get(cid);
|
|
Map<String, BenchMarkVo> bmmap = new HashMap<String, BenchMarkVo>();
|
|
Map<String, BenchMarkVo> bmmap = new HashMap<String, BenchMarkVo>();
|
|
- String wpId = ct.getWpId();
|
|
|
|
- String beginDate = DateUtils.format(ct.getBeginDate());
|
|
|
|
- String endDate =DateUtils.format(ct.getEndDate());
|
|
|
|
|
|
+ for (ConditionVo ct : ctvos) {
|
|
|
|
|
|
- bmmap=contrastWtService.benchmarkZjInWtList(wpId,null,beginDate,endDate);
|
|
|
|
|
|
+ String wpId = ct.getWpId();
|
|
|
|
+ String beginDate = DateUtils.format(ct.getBeginDate());
|
|
|
|
+ String endDate =DateUtils.format(ct.getEndDate());
|
|
|
|
+
|
|
|
|
+ bmmap=contrastWtService.benchmarkZjInWtList(wpId,null,beginDate,endDate);
|
|
|
|
+ }
|
|
|
|
|
|
Set<Map.Entry<String, BenchMarkVo>> set = bmmap.entrySet();
|
|
Set<Map.Entry<String, BenchMarkVo>> set = bmmap.entrySet();
|
|
for (Iterator<Map.Entry<String, BenchMarkVo>> it = set.iterator(); it.hasNext();) {
|
|
for (Iterator<Map.Entry<String, BenchMarkVo>> it = set.iterator(); it.hasNext();) {
|