Commit 81ddfc23ee046cd33c5424abdf64155272bf0b9d

Authored by 廖磊
1 parent 0dc559e3

统计日报 统计数据和实时数据合并查询

src/main/java/com/bsth/service/calc/impl/CalcWaybillServiceImpl.java
... ... @@ -989,6 +989,12 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer
989 989 m.put("djg_m", c.getDjgz());
990 990 m.put("djg_a", c.getDjgw());
991 991 m.put("djg_time", c.getDjgsj());
  992 + double jl = Arith.sub(Arith.add(m.get("jhlc"), m.get("ljgl")), m.get("ssgl"));
  993 + if (jl == Double.parseDouble(m.get("sjgl").toString())) {
  994 + m.put("zt", 0);
  995 + } else {
  996 + m.put("zt", 1);
  997 + }
992 998 mapList.add(m);
993 999 }
994 1000  
... ... @@ -999,110 +1005,126 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer
999 1005 List<Map<String, Object>> mapListHj = new ArrayList<Map<String, Object>>();
1000 1006  
1001 1007 if(mapList.size()>0){
1002   - for ( int i=0;i<tjlist.size();i++) {
1003   - Map<String, Object> tjMap =tjlist.get(i);
1004   - boolean fage=true;
1005   - for(int j=0;j<mapList.size();j++){
1006   - Map<String, Object> lsMap=mapList.get(j);
1007   - if(lsMap.get("xlBm").toString().equals(tjMap.get("xlBm").toString())){
1008   - Map<String, Object> hjMap=new HashMap<String,Object>();
1009   - hjMap.put("xlBm", tjMap.get("xlBm"));
1010   - hjMap.put("xlName", tjMap.get("xlName"));
1011   - hjMap.put("jhzlc", Arith.add(lsMap.get("jhzlc"), tjMap.get("jhzlc")));
1012   - hjMap.put("jhlc", Arith.add(lsMap.get("jhlc"), tjMap.get("jhlc")));
1013   - hjMap.put("jcclc",Arith.add(lsMap.get("jcclc"), tjMap.get("jcclc")));
1014   - hjMap.put("sjzgl",Arith.add(lsMap.get("sjzgl"), tjMap.get("sjzgl")));
1015   - hjMap.put("sjgl", Arith.add(lsMap.get("sjgl"), tjMap.get("sjgl")));
1016   - hjMap.put("sjksgl", Arith.add(lsMap.get("sjksgl"), tjMap.get("sjksgl")));
1017   - hjMap.put("ssgl", Arith.add(lsMap.get("ssgl"), tjMap.get("ssgl")));
1018   - hjMap.put("ssbc", Integer.parseInt(lsMap.get("ssbc").toString())+Integer.parseInt(tjMap.get("ssbc").toString()));
1019   - hjMap.put("ssgl_lz", Arith.add(lsMap.get("ssgl_lz"), tjMap.get("ssgl_lz")));
1020   - hjMap.put("ssgl_dm", Arith.add(lsMap.get("ssgl_dm"), tjMap.get("ssgl_dm")));
1021   - hjMap.put("ssgl_gz", Arith.add(lsMap.get("ssgl_gz"), tjMap.get("ssgl_gz")));
1022   - hjMap.put("ssgl_jf", Arith.add(lsMap.get("ssgl_jf"), tjMap.get("ssgl_jf")));
1023   - hjMap.put("ssgl_zs", Arith.add(lsMap.get("ssgl_zs"), tjMap.get("ssgl_zs")));
1024   - hjMap.put("ssgl_qr", Arith.add(lsMap.get("ssgl_qr"), tjMap.get("ssgl_qr")));
1025   - hjMap.put("ssgl_qc", Arith.add(lsMap.get("ssgl_qc"), tjMap.get("ssgl_qc")));
1026   - hjMap.put("ssgl_kx", Arith.add(lsMap.get("ssgl_kx"), tjMap.get("ssgl_kx")));
1027   - hjMap.put("ssgl_qh", Arith.add(lsMap.get("ssgl_qh"), tjMap.get("ssgl_qh")));
1028   - hjMap.put("ssgl_yw", Arith.add(lsMap.get("ssgl_yw"), tjMap.get("ssgl_yw")));
1029   - hjMap.put("ssgl_other", Arith.add(lsMap.get("ssgl_other"), tjMap.get("ssgl_other")));
1030   - hjMap.put("ljgl", Arith.add(lsMap.get("ljgl"), tjMap.get("ljgl")));
1031   - hjMap.put("jhbc", Integer.parseInt(lsMap.get("jhbc").toString())+ Integer.parseInt(tjMap.get("jhbc").toString()));
1032   - hjMap.put("jhbc_m", Integer.parseInt(lsMap.get("jhbc_m").toString())+Integer.parseInt(tjMap.get("jhbc_m").toString()));
1033   - hjMap.put("jhbc_a", Integer.parseInt(lsMap.get("jhbc_a").toString())+ Integer.parseInt(tjMap.get("jhbc_a").toString()));
1034   - hjMap.put("sjbc", Integer.parseInt(lsMap.get("sjbc").toString())+ Integer.parseInt(tjMap.get("sjbc").toString()));
1035   - hjMap.put("sjbc_m",Integer.parseInt(lsMap.get("sjbc_m").toString())+ Integer.parseInt(tjMap.get("sjbc_m").toString()));
1036   - hjMap.put("sjbc_a", Integer.parseInt(lsMap.get("sjbc_a").toString())+ Integer.parseInt(tjMap.get("sjbc_a").toString()));
1037   - hjMap.put("ljbc", Integer.parseInt(lsMap.get("ljbc").toString())+ Integer.parseInt(tjMap.get("ljbc").toString()));
1038   - hjMap.put("ljbc_m", Integer.parseInt(lsMap.get("ljbc_m").toString())+ Integer.parseInt(tjMap.get("ljbc_m").toString()));
1039   - hjMap.put("ljbc_a", Integer.parseInt(lsMap.get("ljbc_a").toString())+Integer.parseInt( tjMap.get("ljbc_a").toString()));
1040   - hjMap.put("fzbc", Integer.parseInt(lsMap.get("fzbc").toString())+ Integer.parseInt(tjMap.get("fzbc").toString()));
1041   - hjMap.put("fzbc_m",Integer.parseInt(lsMap.get("fzbc_m").toString())+ Integer.parseInt(tjMap.get("fzbc_m").toString()));
1042   - hjMap.put("fzbc_a",Integer.parseInt(lsMap.get("fzbc_a").toString())+ Integer.parseInt(tjMap.get("fzbc_a").toString()));
1043   - hjMap.put("dtbc", Integer.parseInt(lsMap.get("dtbc").toString())+ Integer.parseInt(tjMap.get("dtbc").toString()));
1044   - hjMap.put("dtbc_m", Integer.parseInt(lsMap.get("dtbc_m").toString())+ Integer.parseInt(tjMap.get("dtbc_m").toString()));
1045   - hjMap.put("dtbc_a", Integer.parseInt(lsMap.get("dtbc_a").toString())+ Integer.parseInt(tjMap.get("dtbc_a").toString()));
1046   - hjMap.put("djg", Integer.parseInt(lsMap.get("djg").toString())+ Integer.parseInt(tjMap.get("djg").toString()));
1047   - hjMap.put("djg_m", Integer.parseInt(lsMap.get("djg_m").toString())+ Integer.parseInt(tjMap.get("djg_m").toString()));
1048   - hjMap.put("djg_a", Integer.parseInt(lsMap.get("djg_a").toString())+ Integer.parseInt(tjMap.get("djg_a").toString()));
1049   - if(Arith.add(lsMap.get("djg_time"),0)>Arith.add(tjMap.get("djg_time"), 0)){
1050   - hjMap.put("djg_time", lsMap.get("djg_time"));
1051   - }else{
1052   - hjMap.put("djg_time",tjMap.get("djg_time"));
  1008 + if(tjlist.size()>0){
  1009 + for ( int i=0;i<tjlist.size();i++) {
  1010 + Map<String, Object> tjMap =tjlist.get(i);
  1011 + boolean fage=true;
  1012 + for(int j=0;j<mapList.size();j++){
  1013 + Map<String, Object> lsMap=mapList.get(j);
  1014 + if(lsMap.get("xlBm").toString().equals(tjMap.get("xlBm").toString())){
  1015 + Map<String, Object> hjMap=new HashMap<String,Object>();
  1016 + hjMap.put("xlBm", tjMap.get("xlBm"));
  1017 + hjMap.put("xlName", tjMap.get("xlName"));
  1018 + hjMap.put("jhzlc", Arith.add(lsMap.get("jhzlc"), tjMap.get("jhzlc")));
  1019 + hjMap.put("jhlc", Arith.add(lsMap.get("jhlc"), tjMap.get("jhlc")));
  1020 + hjMap.put("jcclc",Arith.add(lsMap.get("jcclc"), tjMap.get("jcclc")));
  1021 + hjMap.put("sjzgl",Arith.add(lsMap.get("sjzgl"), tjMap.get("sjzgl")));
  1022 + hjMap.put("sjgl", Arith.add(lsMap.get("sjgl"), tjMap.get("sjgl")));
  1023 + hjMap.put("sjksgl", Arith.add(lsMap.get("sjksgl"), tjMap.get("sjksgl")));
  1024 + hjMap.put("ssgl", Arith.add(lsMap.get("ssgl"), tjMap.get("ssgl")));
  1025 + hjMap.put("ssbc", Integer.parseInt(lsMap.get("ssbc").toString())+Integer.parseInt(tjMap.get("ssbc").toString()));
  1026 + hjMap.put("ssgl_lz", Arith.add(lsMap.get("ssgl_lz"), tjMap.get("ssgl_lz")));
  1027 + hjMap.put("ssgl_dm", Arith.add(lsMap.get("ssgl_dm"), tjMap.get("ssgl_dm")));
  1028 + hjMap.put("ssgl_gz", Arith.add(lsMap.get("ssgl_gz"), tjMap.get("ssgl_gz")));
  1029 + hjMap.put("ssgl_jf", Arith.add(lsMap.get("ssgl_jf"), tjMap.get("ssgl_jf")));
  1030 + hjMap.put("ssgl_zs", Arith.add(lsMap.get("ssgl_zs"), tjMap.get("ssgl_zs")));
  1031 + hjMap.put("ssgl_qr", Arith.add(lsMap.get("ssgl_qr"), tjMap.get("ssgl_qr")));
  1032 + hjMap.put("ssgl_qc", Arith.add(lsMap.get("ssgl_qc"), tjMap.get("ssgl_qc")));
  1033 + hjMap.put("ssgl_kx", Arith.add(lsMap.get("ssgl_kx"), tjMap.get("ssgl_kx")));
  1034 + hjMap.put("ssgl_qh", Arith.add(lsMap.get("ssgl_qh"), tjMap.get("ssgl_qh")));
  1035 + hjMap.put("ssgl_yw", Arith.add(lsMap.get("ssgl_yw"), tjMap.get("ssgl_yw")));
  1036 + hjMap.put("ssgl_other", Arith.add(lsMap.get("ssgl_other"), tjMap.get("ssgl_other")));
  1037 + hjMap.put("ljgl", Arith.add(lsMap.get("ljgl"), tjMap.get("ljgl")));
  1038 + hjMap.put("jhbc", Integer.parseInt(lsMap.get("jhbc").toString())+ Integer.parseInt(tjMap.get("jhbc").toString()));
  1039 + hjMap.put("jhbc_m", Integer.parseInt(lsMap.get("jhbc_m").toString())+Integer.parseInt(tjMap.get("jhbc_m").toString()));
  1040 + hjMap.put("jhbc_a", Integer.parseInt(lsMap.get("jhbc_a").toString())+ Integer.parseInt(tjMap.get("jhbc_a").toString()));
  1041 + hjMap.put("sjbc", Integer.parseInt(lsMap.get("sjbc").toString())+ Integer.parseInt(tjMap.get("sjbc").toString()));
  1042 + hjMap.put("sjbc_m",Integer.parseInt(lsMap.get("sjbc_m").toString())+ Integer.parseInt(tjMap.get("sjbc_m").toString()));
  1043 + hjMap.put("sjbc_a", Integer.parseInt(lsMap.get("sjbc_a").toString())+ Integer.parseInt(tjMap.get("sjbc_a").toString()));
  1044 + hjMap.put("ljbc", Integer.parseInt(lsMap.get("ljbc").toString())+ Integer.parseInt(tjMap.get("ljbc").toString()));
  1045 + hjMap.put("ljbc_m", Integer.parseInt(lsMap.get("ljbc_m").toString())+ Integer.parseInt(tjMap.get("ljbc_m").toString()));
  1046 + hjMap.put("ljbc_a", Integer.parseInt(lsMap.get("ljbc_a").toString())+Integer.parseInt( tjMap.get("ljbc_a").toString()));
  1047 + hjMap.put("fzbc", Integer.parseInt(lsMap.get("fzbc").toString())+ Integer.parseInt(tjMap.get("fzbc").toString()));
  1048 + hjMap.put("fzbc_m",Integer.parseInt(lsMap.get("fzbc_m").toString())+ Integer.parseInt(tjMap.get("fzbc_m").toString()));
  1049 + hjMap.put("fzbc_a",Integer.parseInt(lsMap.get("fzbc_a").toString())+ Integer.parseInt(tjMap.get("fzbc_a").toString()));
  1050 + hjMap.put("dtbc", Integer.parseInt(lsMap.get("dtbc").toString())+ Integer.parseInt(tjMap.get("dtbc").toString()));
  1051 + hjMap.put("dtbc_m", Integer.parseInt(lsMap.get("dtbc_m").toString())+ Integer.parseInt(tjMap.get("dtbc_m").toString()));
  1052 + hjMap.put("dtbc_a", Integer.parseInt(lsMap.get("dtbc_a").toString())+ Integer.parseInt(tjMap.get("dtbc_a").toString()));
  1053 + hjMap.put("djg", Integer.parseInt(lsMap.get("djg").toString())+ Integer.parseInt(tjMap.get("djg").toString()));
  1054 + hjMap.put("djg_m", Integer.parseInt(lsMap.get("djg_m").toString())+ Integer.parseInt(tjMap.get("djg_m").toString()));
  1055 + hjMap.put("djg_a", Integer.parseInt(lsMap.get("djg_a").toString())+ Integer.parseInt(tjMap.get("djg_a").toString()));
  1056 + if(Arith.add(lsMap.get("djg_time"),0)>Arith.add(tjMap.get("djg_time"), 0)){
  1057 + hjMap.put("djg_time", lsMap.get("djg_time"));
  1058 + }else{
  1059 + hjMap.put("djg_time",tjMap.get("djg_time"));
  1060 + }
  1061 +
  1062 + double jl = Arith.sub(Arith.add(hjMap.get("jhlc"), hjMap.get("ljgl")), hjMap.get("ssgl"));
  1063 + if (jl == Double.parseDouble(hjMap.get("sjgl").toString())) {
  1064 + hjMap.put("zt", 0);
  1065 + } else {
  1066 + hjMap.put("zt", 1);
  1067 + }
  1068 + mapListHj.add(hjMap);
  1069 + fage=false;
1053 1070 }
1054   - mapListHj.add(hjMap);
1055   - fage=false;
  1071 + }
  1072 +
  1073 + if(fage){
  1074 + Map<String, Object> m = new HashMap<String, Object>();
  1075 + m.put("xlBm", tjMap.get("xlBm"));
  1076 + m.put("xlName", tjMap.get("xlName"));
  1077 + m.put("jhzlc", tjMap.get("jhzlc"));
  1078 + m.put("jhlc", tjMap.get("jhlc"));
  1079 + m.put("jcclc", tjMap.get("jcclc"));
  1080 + m.put("sjzgl",tjMap.get("sjzgl"));
  1081 + m.put("sjgl", tjMap.get("sjgl"));
  1082 + m.put("sjksgl", tjMap.get("sjksgl"));
  1083 + m.put("ssgl", tjMap.get("ssgl"));
  1084 + m.put("ssbc", tjMap.get("ssbc"));
  1085 + m.put("ssgl_lz", tjMap.get("ssgl_lz"));
  1086 + m.put("ssgl_dm", tjMap.get("ssgl_dm"));
  1087 + m.put("ssgl_gz", tjMap.get("ssgl_gz"));
  1088 + m.put("ssgl_jf", tjMap.get("ssgl_jf"));
  1089 + m.put("ssgl_zs", tjMap.get("ssgl_zs"));
  1090 + m.put("ssgl_qr", tjMap.get("ssgl_qr"));
  1091 + m.put("ssgl_qc", tjMap.get("ssgl_qc"));
  1092 + m.put("ssgl_kx", tjMap.get("ssgl_kx"));
  1093 + m.put("ssgl_qh", tjMap.get("ssgl_qh"));
  1094 + m.put("ssgl_yw", tjMap.get("ssgl_yw"));
  1095 + m.put("ssgl_other", tjMap.get("ssgl_other"));
  1096 + m.put("ljgl", tjMap.get("ljgl"));
  1097 + m.put("jhbc", tjMap.get("jhbc"));
  1098 + m.put("jhbc_m", tjMap.get("jhbc_m"));
  1099 + m.put("jhbc_a", tjMap.get("jhbc_a"));
  1100 + m.put("sjbc", tjMap.get("sjbc"));
  1101 + m.put("sjbc_m",tjMap.get("sjbc_m"));
  1102 + m.put("sjbc_a", tjMap.get("sjbc_a"));
  1103 + m.put("ljbc", tjMap.get("ljbc"));
  1104 + m.put("ljbc_m", tjMap.get("ljbc_m"));
  1105 + m.put("ljbc_a",tjMap.get("ljbc_a"));
  1106 + m.put("fzbc", tjMap.get("fzbc"));
  1107 + m.put("fzbc_m", tjMap.get("fzbc_m"));
  1108 + m.put("fzbc_a",tjMap.get("fzbc_a"));
  1109 + m.put("dtbc", tjMap.get("dtbc"));
  1110 + m.put("dtbc_m", tjMap.get("dtbc_m"));
  1111 + m.put("dtbc_a", tjMap.get("dtbc_a"));
  1112 + m.put("djg", tjMap.get("djg"));
  1113 + m.put("djg_m", tjMap.get("djg_m"));
  1114 + m.put("djg_a", tjMap.get("djg_a"));
  1115 + m.put("djg_time", tjMap.get("djg_time"));
  1116 + double jl = Arith.sub(Arith.add(m.get("jhlc"), m.get("ljgl")), m.get("ssgl"));
  1117 + if (jl == Double.parseDouble(m.get("sjgl").toString())) {
  1118 + m.put("zt", 0);
  1119 + } else {
  1120 + m.put("zt", 1);
  1121 + }
  1122 + mapListHj.add(m);
1056 1123 }
1057 1124 }
1058   -
1059   - if(fage){
1060   - Map<String, Object> m = new HashMap<String, Object>();
1061   - m.put("xlBm", tjMap.get("xlBm"));
1062   - m.put("xlName", tjMap.get("xlName"));
1063   - m.put("jhzlc", tjMap.get("jhzlc"));
1064   - m.put("jhlc", tjMap.get("jhlc"));
1065   - m.put("jcclc", tjMap.get("jcclc"));
1066   - m.put("sjzgl",tjMap.get("sjzgl"));
1067   - m.put("sjgl", tjMap.get("sjgl"));
1068   - m.put("sjksgl", tjMap.get("sjksgl"));
1069   - m.put("ssgl", tjMap.get("ssgl"));
1070   - m.put("ssbc", tjMap.get("ssbc"));
1071   - m.put("ssgl_lz", tjMap.get("ssgl_lz"));
1072   - m.put("ssgl_dm", tjMap.get("ssgl_dm"));
1073   - m.put("ssgl_gz", tjMap.get("ssgl_gz"));
1074   - m.put("ssgl_jf", tjMap.get("ssgl_jf"));
1075   - m.put("ssgl_zs", tjMap.get("ssgl_zs"));
1076   - m.put("ssgl_qr", tjMap.get("ssgl_qr"));
1077   - m.put("ssgl_qc", tjMap.get("ssgl_qc"));
1078   - m.put("ssgl_kx", tjMap.get("ssgl_kx"));
1079   - m.put("ssgl_qh", tjMap.get("ssgl_qh"));
1080   - m.put("ssgl_yw", tjMap.get("ssgl_yw"));
1081   - m.put("ssgl_other", tjMap.get("ssgl_other"));
1082   - m.put("ljgl", tjMap.get("ljgl"));
1083   - m.put("jhbc", tjMap.get("jhbc"));
1084   - m.put("jhbc_m", tjMap.get("jhbc_m"));
1085   - m.put("jhbc_a", tjMap.get("jhbc_a"));
1086   - m.put("sjbc", tjMap.get("sjbc"));
1087   - m.put("sjbc_m",tjMap.get("sjbc_m"));
1088   - m.put("sjbc_a", tjMap.get("sjbc_a"));
1089   - m.put("ljbc", tjMap.get("ljbc"));
1090   - m.put("ljbc_m", tjMap.get("ljbc_m"));
1091   - m.put("ljbc_a",tjMap.get("ljbc_a"));
1092   - m.put("fzbc", tjMap.get("fzbc"));
1093   - m.put("fzbc_m", tjMap.get("fzbc_m"));
1094   - m.put("fzbc_a",tjMap.get("fzbc_a"));
1095   - m.put("dtbc", tjMap.get("dtbc"));
1096   - m.put("dtbc_m", tjMap.get("dtbc_m"));
1097   - m.put("dtbc_a", tjMap.get("dtbc_a"));
1098   - m.put("djg", tjMap.get("djg"));
1099   - m.put("djg_m", tjMap.get("djg_m"));
1100   - m.put("djg_a", tjMap.get("djg_a"));
1101   - m.put("djg_time", tjMap.get("djg_time"));
1102   - mapListHj.add(m);
1103   - }
  1125 + }else{
  1126 + mapListHj.addAll(mapList);
1104 1127 }
1105   -
1106 1128 }else{
1107 1129 for (int i=0;i<tjlist.size();i++) {
1108 1130 Map<String, Object> tjMap =tjlist.get(i);
... ... @@ -1148,6 +1170,12 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
1148 1170 m.put("djg_m", tjMap.get("djg_m"));
1149 1171 m.put("djg_a", tjMap.get("djg_a"));
1150 1172 m.put("djg_time", tjMap.get("djg_time"));
  1173 + double jl = Arith.sub(Arith.add(m.get("jhlc"), m.get("ljgl")), m.get("ssgl"));
  1174 + if (jl == Double.parseDouble(m.get("sjgl").toString())) {
  1175 + m.put("zt", 0);
  1176 + } else {
  1177 + m.put("zt", 1);
  1178 + }
1151 1179 mapListHj.add(m);
1152 1180  
1153 1181 }
... ...
src/main/resources/static/pages/forms/statement/statisticsDaily.html
... ... @@ -277,8 +277,12 @@
277 277 if(line=="请选择"){
278 278 line="";
279 279 }
  280 + var time1 = Date.parse(new Date(date));
  281 + var time2 = Date.parse(new Date(date2));
280 282 if(date==null || date =="" ||date2==null || date2 ==""){
281 283 layer.msg('请选择时间段.');
  284 + }else if(time2<time1){
  285 + layer.msg('结束日期不能小于开始日期.');
282 286 }else{
283 287 $("#tjrq").html(date+"至"+date2);
284 288 var params = {};
... ...