禅道BUG修改
正在显示
2 个修改的文件
包含
20 行增加
和
3 行删除
... | @@ -713,10 +713,14 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { | ... | @@ -713,10 +713,14 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { |
713 | list1 = factoryInfoService.queryFactoryInfos(statisticsParam.getDepartId(),fields, | 713 | list1 = factoryInfoService.queryFactoryInfos(statisticsParam.getDepartId(),fields, |
714 | statisticsParam.getStartDate(),statisticsParam.getEndDate(),"1"); | 714 | statisticsParam.getStartDate(),statisticsParam.getEndDate(),"1"); |
715 | } | 715 | } |
716 | }else{ | ||
717 | list1 = factoryInfoService.queryFactoryInfos(statisticsParam.getDepartId(),fields, | ||
718 | statisticsParam.getStartDate(),statisticsParam.getEndDate(),"1"); | ||
716 | } | 719 | } |
717 | if (!CollectionUtils.isEmpty(list1)) { | 720 | if (!CollectionUtils.isEmpty(list1)) { |
718 | for (Map<String, Object> map1 : list1) { | 721 | for (Map<String, Object> map1 : list1) { |
719 | String time = ""; | 722 | String time = ""; |
723 | if(statisticsParam.getStatics()!=null){ | ||
720 | if("hour".equals(statisticsParam.getStatics())){ | 724 | if("hour".equals(statisticsParam.getStatics())){ |
721 | time = DateUtils.date2Str(new Date(Long.parseLong(map1.get("time").toString()) * 1000), datetimeFormat); | 725 | time = DateUtils.date2Str(new Date(Long.parseLong(map1.get("time").toString()) * 1000), datetimeFormat); |
722 | }else if("day".equals(statisticsParam.getStatics())){ | 726 | }else if("day".equals(statisticsParam.getStatics())){ |
... | @@ -726,6 +730,9 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { | ... | @@ -726,6 +730,9 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { |
726 | }else{ | 730 | }else{ |
727 | time = DateUtils.date2Str(new Date(Long.parseLong(map1.get("time").toString()) * 1000), datetimeFormat); | 731 | time = DateUtils.date2Str(new Date(Long.parseLong(map1.get("time").toString()) * 1000), datetimeFormat); |
728 | } | 732 | } |
733 | }else{ | ||
734 | time = DateUtils.date2Str(new Date(Long.parseLong(map1.get("time").toString()) * 1000), datetimeFormat); | ||
735 | } | ||
729 | xlist.add(time); | 736 | xlist.add(time); |
730 | String jscod; | 737 | String jscod; |
731 | if (!StringUtils.isEmpty(jscod = fieldsMap.get("JSCOD"))) { | 738 | if (!StringUtils.isEmpty(jscod = fieldsMap.get("JSCOD"))) { |
... | @@ -945,10 +952,16 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { | ... | @@ -945,10 +952,16 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { |
945 | String dataView2119hb = ReportViewUtil.buildView(ReportConstant.view2119, ReportConstant.fieldClsl, statisticsParam.getDepartId(), startDateHb, endDateHb); | 952 | String dataView2119hb = ReportViewUtil.buildView(ReportConstant.view2119, ReportConstant.fieldClsl, statisticsParam.getDepartId(), startDateHb, endDateHb); |
946 | Map<String, Object> map = factoryCenterMapper.getDhData(startDate, endDate, statisticsParam.getDepartId(), dataView3a24, dataView2119); | 953 | Map<String, Object> map = factoryCenterMapper.getDhData(startDate, endDate, statisticsParam.getDepartId(), dataView3a24, dataView2119); |
947 | if(map!=null){ | 954 | if(map!=null){ |
955 | if(map.get("zdh")!=null){ | ||
948 | zdh = Double.parseDouble(map.get("zdh").toString()); | 956 | zdh = Double.parseDouble(map.get("zdh").toString()); |
957 | } | ||
958 | if(map.get("rjdh")!=null){ | ||
949 | rjdh = Double.parseDouble(map.get("rjdh").toString()); | 959 | rjdh = Double.parseDouble(map.get("rjdh").toString()); |
960 | } | ||
961 | if(map.get("dsdh")!=null){ | ||
950 | dsdh = Double.parseDouble(map.get("dsdh").toString()); | 962 | dsdh = Double.parseDouble(map.get("dsdh").toString()); |
951 | } | 963 | } |
964 | } | ||
952 | resMap.put("zdh", zdh); | 965 | resMap.put("zdh", zdh); |
953 | resMap.put("rjdh", rjdh); | 966 | resMap.put("rjdh", rjdh); |
954 | resMap.put("dsdh", dsdh); | 967 | resMap.put("dsdh", dsdh); |
... | @@ -964,9 +977,11 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { | ... | @@ -964,9 +977,11 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { |
964 | } | 977 | } |
965 | if(maptb.get("dsdh")!=null){ | 978 | if(maptb.get("dsdh")!=null){ |
966 | dsdhTb = Double.parseDouble(maptb.get("dsdh").toString()); | 979 | dsdhTb = Double.parseDouble(maptb.get("dsdh").toString()); |
980 | if(dsdhTb > 0.0){ | ||
967 | dsdhTb = Double.parseDouble(df.format(100*(dsdh - dsdhTb)/dsdhTb)); | 981 | dsdhTb = Double.parseDouble(df.format(100*(dsdh - dsdhTb)/dsdhTb)); |
968 | } | 982 | } |
969 | } | 983 | } |
984 | } | ||
970 | resMap.put("zdh_tb", zdhTb); | 985 | resMap.put("zdh_tb", zdhTb); |
971 | resMap.put("rjdh_tb", rjdhTb); | 986 | resMap.put("rjdh_tb", rjdhTb); |
972 | resMap.put("dsdh_tb", dsdhTb); | 987 | resMap.put("dsdh_tb", dsdhTb); |
... | @@ -982,9 +997,11 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { | ... | @@ -982,9 +997,11 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { |
982 | } | 997 | } |
983 | if(maphb.get("dsdh")!=null){ | 998 | if(maphb.get("dsdh")!=null){ |
984 | dsdhHb = Double.parseDouble(maphb.get("dsdh").toString()); | 999 | dsdhHb = Double.parseDouble(maphb.get("dsdh").toString()); |
1000 | if(dsdhHb > 0.0){ | ||
985 | dsdhHb = Double.parseDouble(df.format(100*(dsdh - dsdhHb)/dsdhHb)); | 1001 | dsdhHb = Double.parseDouble(df.format(100*(dsdh - dsdhHb)/dsdhHb)); |
986 | } | 1002 | } |
987 | } | 1003 | } |
1004 | } | ||
988 | resMap.put("zdh_hb", zdhHb); | 1005 | resMap.put("zdh_hb", zdhHb); |
989 | resMap.put("rjdh_hb", rjdhHb); | 1006 | resMap.put("rjdh_hb", rjdhHb); |
990 | resMap.put("dsdh_hb", dsdhHb); | 1007 | resMap.put("dsdh_hb", dsdhHb); | ... | ... |
... | @@ -146,10 +146,10 @@ public class ShiroConfig { | ... | @@ -146,10 +146,10 @@ public class ShiroConfig { |
146 | filterChainDefinitionMap.put("/jmReport/**", "anon"); | 146 | filterChainDefinitionMap.put("/jmReport/**", "anon"); |
147 | filterChainDefinitionMap.put("/v1/operate/**", "anon"); | 147 | filterChainDefinitionMap.put("/v1/operate/**", "anon"); |
148 | // filterChainDefinitionMap.put("/equipment/importExcel", "anon"); | 148 | // filterChainDefinitionMap.put("/equipment/importExcel", "anon"); |
149 | // filterChainDefinitionMap.put("/v1/factoryCenter/getHourWaterData", "anon"); | ||
149 | 150 | ||
150 | //哈工大报表填报数据 | 151 | filterChainDefinitionMap.put("/harbinTechnology/fillReport/**", "anon"); |
151 | filterChainDefinitionMap.put("/harbinTechnology/fillReport/**", "anon"); //哈工大报表填报数据 | 152 | // filterChainDefinitionMap.put("/v1/factoryCenter/queryMonitoringData", "anon"); |
152 | //filterChainDefinitionMap.put("/screendata/**", "anon"); | ||
153 | 153 | ||
154 | // 添加自己的过滤器并且取名为jwt | 154 | // 添加自己的过滤器并且取名为jwt |
155 | Map<String, Filter> filterMap = new HashMap<String, Filter>(1); | 155 | Map<String, Filter> filterMap = new HashMap<String, Filter>(1); | ... | ... |
-
请 注册 或 登录 后发表评论