81c652f7 张雷

禅道BUG修改

1 个父辈 6e01484c
...@@ -713,16 +713,23 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { ...@@ -713,16 +713,23 @@ 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 = "";
720 if("hour".equals(statisticsParam.getStatics())){ 723 if(statisticsParam.getStatics()!=null){
721 time = DateUtils.date2Str(new Date(Long.parseLong(map1.get("time").toString()) * 1000), datetimeFormat); 724 if("hour".equals(statisticsParam.getStatics())){
722 }else if("day".equals(statisticsParam.getStatics())){ 725 time = DateUtils.date2Str(new Date(Long.parseLong(map1.get("time").toString()) * 1000), datetimeFormat);
723 time = map1.get("time").toString(); 726 }else if("day".equals(statisticsParam.getStatics())){
724 }else if("month".equals(statisticsParam.getStatics())){ 727 time = map1.get("time").toString();
725 time = map1.get("time").toString(); 728 }else if("month".equals(statisticsParam.getStatics())){
729 time = map1.get("time").toString();
730 }else{
731 time = DateUtils.date2Str(new Date(Long.parseLong(map1.get("time").toString()) * 1000), datetimeFormat);
732 }
726 }else{ 733 }else{
727 time = DateUtils.date2Str(new Date(Long.parseLong(map1.get("time").toString()) * 1000), datetimeFormat); 734 time = DateUtils.date2Str(new Date(Long.parseLong(map1.get("time").toString()) * 1000), datetimeFormat);
728 } 735 }
...@@ -945,9 +952,15 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { ...@@ -945,9 +952,15 @@ 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){
948 zdh = Double.parseDouble(map.get("zdh").toString()); 955 if(map.get("zdh")!=null){
949 rjdh = Double.parseDouble(map.get("rjdh").toString()); 956 zdh = Double.parseDouble(map.get("zdh").toString());
950 dsdh = Double.parseDouble(map.get("dsdh").toString()); 957 }
958 if(map.get("rjdh")!=null){
959 rjdh = Double.parseDouble(map.get("rjdh").toString());
960 }
961 if(map.get("dsdh")!=null){
962 dsdh = Double.parseDouble(map.get("dsdh").toString());
963 }
951 } 964 }
952 resMap.put("zdh", zdh); 965 resMap.put("zdh", zdh);
953 resMap.put("rjdh", rjdh); 966 resMap.put("rjdh", rjdh);
...@@ -964,7 +977,9 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { ...@@ -964,7 +977,9 @@ 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());
967 dsdhTb = Double.parseDouble(df.format(100*(dsdh - dsdhTb)/dsdhTb)); 980 if(dsdhTb > 0.0){
981 dsdhTb = Double.parseDouble(df.format(100*(dsdh - dsdhTb)/dsdhTb));
982 }
968 } 983 }
969 } 984 }
970 resMap.put("zdh_tb", zdhTb); 985 resMap.put("zdh_tb", zdhTb);
...@@ -982,7 +997,9 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { ...@@ -982,7 +997,9 @@ 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());
985 dsdhHb = Double.parseDouble(df.format(100*(dsdh - dsdhHb)/dsdhHb)); 1000 if(dsdhHb > 0.0){
1001 dsdhHb = Double.parseDouble(df.format(100*(dsdh - dsdhHb)/dsdhHb));
1002 }
986 } 1003 }
987 } 1004 }
988 resMap.put("zdh_hb", zdhHb); 1005 resMap.put("zdh_hb", zdhHb);
......
...@@ -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);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!