Commit d40f83dd51e9319b153d47bf3050b8082c3ed3fd
1 parent
ff764763
mvy
Showing
11 changed files
with
233 additions
and
104 deletions
src/main/java/com/bsth/entity/mcy_forms/Shifday.java
| @@ -34,7 +34,36 @@ public class Shifday { | @@ -34,7 +34,36 @@ public class Shifday { | ||
| 34 | 34 | ||
| 35 | private String sjbc;//实际班次 | 35 | private String sjbc;//实际班次 |
| 36 | 36 | ||
| 37 | + private String jgh; | ||
| 37 | 38 | ||
| 39 | + private String zbh; | ||
| 40 | + | ||
| 41 | + private String rq; | ||
| 42 | + | ||
| 43 | + public String getRq() { | ||
| 44 | + return rq; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + public void setRq(String rq) { | ||
| 48 | + this.rq = rq; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + public String getJgh() { | ||
| 52 | + return jgh; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + public void setJgh(String jgh) { | ||
| 56 | + this.jgh = jgh; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + public String getZbh() { | ||
| 60 | + return zbh; | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + public void setZbh(String zbh) { | ||
| 64 | + this.zbh = zbh; | ||
| 65 | + } | ||
| 66 | + | ||
| 38 | public String getJhlc() { | 67 | public String getJhlc() { |
| 39 | return jhlc; | 68 | return jhlc; |
| 40 | } | 69 | } |
src/main/java/com/bsth/entity/mcy_forms/Shiftuehiclemanth.java
| @@ -20,7 +20,24 @@ public class Shiftuehiclemanth { | @@ -20,7 +20,24 @@ public class Shiftuehiclemanth { | ||
| 20 | 20 | ||
| 21 | private String sjbc;//实际班次 | 21 | private String sjbc;//实际班次 |
| 22 | 22 | ||
| 23 | - | 23 | + private String jgh; |
| 24 | + private String zbh; | ||
| 25 | + public String getJgh() { | ||
| 26 | + return jgh; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + public void setJgh(String jgh) { | ||
| 30 | + this.jgh = jgh; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + public String getZbh() { | ||
| 34 | + return zbh; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + public void setZbh(String zbh) { | ||
| 38 | + this.zbh = zbh; | ||
| 39 | + } | ||
| 40 | + | ||
| 24 | public String getCjbc() { | 41 | public String getCjbc() { |
| 25 | return cjbc; | 42 | return cjbc; |
| 26 | } | 43 | } |
src/main/java/com/bsth/entity/mcy_forms/Vehicleloading.java
| @@ -24,6 +24,26 @@ public class Vehicleloading { | @@ -24,6 +24,26 @@ public class Vehicleloading { | ||
| 24 | 24 | ||
| 25 | private String sjbc;//实际班次 | 25 | private String sjbc;//实际班次 |
| 26 | 26 | ||
| 27 | + private String jgh;//驾驶员工号 | ||
| 28 | + | ||
| 29 | + private String zbh;//车辆自编号 | ||
| 30 | + | ||
| 31 | + public String getJgh() { | ||
| 32 | + return jgh; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + public void setJgh(String jgh) { | ||
| 36 | + this.jgh = jgh; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + public String getZbh() { | ||
| 40 | + return zbh; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + public void setZbh(String zbh) { | ||
| 44 | + this.zbh = zbh; | ||
| 45 | + } | ||
| 46 | + | ||
| 27 | public String getLs() { | 47 | public String getLs() { |
| 28 | return ls; | 48 | return ls; |
| 29 | } | 49 | } |
src/main/java/com/bsth/entity/mcy_forms/Waybillday.java
| @@ -20,9 +20,29 @@ public class Waybillday { | @@ -20,9 +20,29 @@ public class Waybillday { | ||
| 20 | 20 | ||
| 21 | private String zlc;//里程 | 21 | private String zlc;//里程 |
| 22 | 22 | ||
| 23 | + public String getJgh() { | ||
| 24 | + return jgh; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + public void setJgh(String jgh) { | ||
| 28 | + this.jgh = jgh; | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + public String getRq() { | ||
| 32 | + return rq; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + public void setRq(String rq) { | ||
| 36 | + this.rq = rq; | ||
| 37 | + } | ||
| 38 | + | ||
| 23 | private String yl;//用油 | 39 | private String yl;//用油 |
| 24 | 40 | ||
| 25 | private String nbbm;//机油 | 41 | private String nbbm;//机油 |
| 42 | + | ||
| 43 | + private String jgh;//员工号 | ||
| 44 | + | ||
| 45 | + private String rq;//日期 | ||
| 26 | 46 | ||
| 27 | public String getCarPlate() { | 47 | public String getCarPlate() { |
| 28 | return carPlate; | 48 | return carPlate; |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| @@ -64,16 +64,22 @@ public class FormsServiceImpl implements FormsService { | @@ -64,16 +64,22 @@ public class FormsServiceImpl implements FormsService { | ||
| 64 | // System.out.println(arg0.getObject("yl")); | 64 | // System.out.println(arg0.getObject("yl")); |
| 65 | // wbd.setYl(arg0.getString("yl")); | 65 | // wbd.setYl(arg0.getString("yl")); |
| 66 | // wbd.setNbbm(arg0.getString("nbbm")); | 66 | // wbd.setNbbm(arg0.getString("nbbm")); |
| 67 | - Map<String, Object> maps = new HashMap<>(); | ||
| 68 | - maps = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), | ||
| 69 | - arg0.getString("schedule_date")); | ||
| 70 | - wbd.setJzl1(maps.get("ksgl").toString()); | ||
| 71 | - wbd.setZlc(maps.get("realMileage").toString()); | ||
| 72 | - | 67 | + wbd.setRq(arg0.getString("schedule_date")); |
| 68 | + wbd.setJgh(arg0.getString("j_gh")); | ||
| 73 | return wbd; | 69 | return wbd; |
| 74 | 70 | ||
| 75 | } | 71 | } |
| 76 | }); | 72 | }); |
| 73 | + | ||
| 74 | + for(int i=0;i<list.size();i++){ | ||
| 75 | + Waybillday w=list.get(i); | ||
| 76 | + Map<String, Object> maps = new HashMap<>(); | ||
| 77 | + maps = scheduleRealInfoService.findKMBC2(w.getJgh(), w.getCarPlate(), | ||
| 78 | + w.getRq()); | ||
| 79 | + w.setJzl1(maps.get("ksgl").toString()); | ||
| 80 | + w.setZlc(maps.get("realMileage").toString()); | ||
| 81 | + | ||
| 82 | + } | ||
| 77 | return list; | 83 | return list; |
| 78 | } | 84 | } |
| 79 | 85 | ||
| @@ -102,6 +108,9 @@ public class FormsServiceImpl implements FormsService { | @@ -102,6 +108,9 @@ public class FormsServiceImpl implements FormsService { | ||
| 102 | return lin; | 108 | return lin; |
| 103 | } | 109 | } |
| 104 | }); | 110 | }); |
| 111 | + | ||
| 112 | + | ||
| 113 | + | ||
| 105 | return list; | 114 | return list; |
| 106 | } | 115 | } |
| 107 | 116 | ||
| @@ -111,12 +120,13 @@ public class FormsServiceImpl implements FormsService { | @@ -111,12 +120,13 @@ public class FormsServiceImpl implements FormsService { | ||
| 111 | 120 | ||
| 112 | @Override | 121 | @Override |
| 113 | public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) { | 122 | public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) { |
| 114 | - String sql = "select r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 123 | + String sql = "select r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type " |
| 115 | + " from bsth_c_s_sp_info_real r " | 124 | + " from bsth_c_s_sp_info_real r " |
| 116 | + " where to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') " | 125 | + " where to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') " |
| 117 | + " and to_days('" + map.get("endDate").toString() + "') " | 126 | + " and to_days('" + map.get("endDate").toString() + "') " |
| 118 | + " and r.xl_bm='"+ map.get("line").toString() + "'" | 127 | + " and r.xl_bm='"+ map.get("line").toString() + "'" |
| 119 | + " AND r.gs_bm is not null" | 128 | + " AND r.gs_bm is not null" |
| 129 | + + " and r.bc_type not in('in','out')" | ||
| 120 | /* + " and r.gs_bm='"+map.get("gsdmManth").toString()+"'" | 130 | /* + " and r.gs_bm='"+map.get("gsdmManth").toString()+"'" |
| 121 | + " and r.fgs_bm='"+map.get("fgsdmManth").toString()+"'"*/ | 131 | + " and r.fgs_bm='"+map.get("fgsdmManth").toString()+"'"*/ |
| 122 | + " GROUP BY r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name" | 132 | + " GROUP BY r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name" |
| @@ -130,26 +140,29 @@ public class FormsServiceImpl implements FormsService { | @@ -130,26 +140,29 @@ public class FormsServiceImpl implements FormsService { | ||
| 130 | public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { | 140 | public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 131 | Shiftuehiclemanth shif = new Shiftuehiclemanth(); | 141 | Shiftuehiclemanth shif = new Shiftuehiclemanth(); |
| 132 | shif.setjName(arg0.getString("j_name")); | 142 | shif.setjName(arg0.getString("j_name")); |
| 133 | - | ||
| 134 | - Map<String, Object> maps = new HashMap<>(); | ||
| 135 | - | ||
| 136 | - maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate, | ||
| 137 | - endDate); | ||
| 138 | - | ||
| 139 | - shif.setJhlc(maps.get("jhlc").toString()); | ||
| 140 | - shif.setEmptMileage(maps.get("ksgl").toString()); | ||
| 141 | - shif.setRemMileage(maps.get("remMileage").toString()); | ||
| 142 | - shif.setAddMileage(maps.get("addMileage").toString()); | ||
| 143 | - shif.setTotalm(maps.get("realMileage").toString()); | ||
| 144 | - shif.setCjbc(maps.get("cjbc").toString()); | ||
| 145 | - shif.setLjbc(maps.get("ljbc").toString()); | ||
| 146 | - shif.setSjbc(maps.get("sjbc").toString()); | ||
| 147 | - | 143 | + shif.setJgh(arg0.getString("j_gh")); |
| 144 | + shif.setZbh(arg0.getString("cl_zbh")); | ||
| 148 | return shif; | 145 | return shif; |
| 149 | - | ||
| 150 | } | 146 | } |
| 151 | }); | 147 | }); |
| 148 | + | ||
| 149 | + for(int i=0;i<list.size();i++){ | ||
| 150 | + Shiftuehiclemanth s=list.get(i); | ||
| 151 | + Map<String, Object> maps = new HashMap<>(); | ||
| 152 | + | ||
| 153 | + maps = scheduleRealInfoService.findKMBC1(s.getjName(),s.getZbh(), startDate, | ||
| 154 | + endDate); | ||
| 155 | + | ||
| 156 | + s.setJhlc(maps.get("jhlc").toString()); | ||
| 157 | + s.setEmptMileage(maps.get("ksgl").toString()); | ||
| 158 | + s.setRemMileage(maps.get("remMileage").toString()); | ||
| 159 | + s.setAddMileage(maps.get("addMileage").toString()); | ||
| 160 | + s.setTotalm(maps.get("realMileage").toString()); | ||
| 161 | + s.setCjbc(maps.get("cjbc").toString()); | ||
| 162 | + s.setLjbc(maps.get("ljbc").toString()); | ||
| 163 | + s.setSjbc(maps.get("sjbc").toString()); | ||
| 152 | 164 | ||
| 165 | + } | ||
| 153 | return list; | 166 | return list; |
| 154 | } | 167 | } |
| 155 | 168 | ||
| @@ -157,10 +170,11 @@ public class FormsServiceImpl implements FormsService { | @@ -157,10 +170,11 @@ public class FormsServiceImpl implements FormsService { | ||
| 157 | @Override | 170 | @Override |
| 158 | public List<Shifday> shifday(Map<String, Object> map) { | 171 | public List<Shifday> shifday(Map<String, Object> map) { |
| 159 | String sql = " select r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm," | 172 | String sql = " select r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm," |
| 160 | - + " r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 173 | + + " r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type " |
| 161 | + " FROM bsth_c_s_sp_info_real r " | 174 | + " FROM bsth_c_s_sp_info_real r " |
| 162 | + " where to_days(r.schedule_date)=to_days('" | 175 | + " where to_days(r.schedule_date)=to_days('" |
| 163 | + map.get("date").toString() + "') and r.xl_bm=" + map.get("line").toString() | 176 | + map.get("date").toString() + "') and r.xl_bm=" + map.get("line").toString() |
| 177 | + + " and r.bc_type not in('in','out')" | ||
| 164 | /*+ " and r.gs_bm='"+map.get("gsdmShif").toString()+"'" | 178 | /*+ " and r.gs_bm='"+map.get("gsdmShif").toString()+"'" |
| 165 | + " and r.fgs_bm='"+map.get("fgsdmShif").toString()+"'"*/ | 179 | + " and r.fgs_bm='"+map.get("fgsdmShif").toString()+"'"*/ |
| 166 | + " GROUP BY r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 180 | + " GROUP BY r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " |
| @@ -175,25 +189,34 @@ public class FormsServiceImpl implements FormsService { | @@ -175,25 +189,34 @@ public class FormsServiceImpl implements FormsService { | ||
| 175 | shifday.setsName(arg0.getString("s_name") == null ? "" : arg0.getString("s_name").toString()); | 189 | shifday.setsName(arg0.getString("s_name") == null ? "" : arg0.getString("s_name").toString()); |
| 176 | shifday.setLpName(arg0.getString("r.lp_name").toString()); | 190 | shifday.setLpName(arg0.getString("r.lp_name").toString()); |
| 177 | shifday.setCarPlate(arg0.getString("cl_zbh").toString()); | 191 | shifday.setCarPlate(arg0.getString("cl_zbh").toString()); |
| 178 | - | ||
| 179 | - Map<String, Object> map = new HashMap<>(); | ||
| 180 | - map = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), | ||
| 181 | - arg0.getString("schedule_date")); | ||
| 182 | - shifday.setJhlc(map.get("jhlc").toString());// 计划里程 | ||
| 183 | - //shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程 | ||
| 184 | - shifday.setYygl(map.get("yygl").toString());// 营运里程 | ||
| 185 | - shifday.setEmptMileage(map.get("ksgl").toString());// 空驶里程 | ||
| 186 | - shifday.setRemMileage(map.get("remMileage").toString());// 抽减里程 | ||
| 187 | - shifday.setAddMileage(map.get("addMileage").toString());// 增加里程 | ||
| 188 | - shifday.setTotalm(map.get("realMileage").toString());// 总里程 | ||
| 189 | - shifday.setJhbc(map.get("jhbc").toString());// 计划班次 | ||
| 190 | - //shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次 | ||
| 191 | - shifday.setCjbc(map.get("cjbc").toString());// 抽减班次 | ||
| 192 | - shifday.setLjbc(map.get("ljbc").toString());// 增加班次 | ||
| 193 | - shifday.setSjbc(map.get("sjbc").toString());// 实际班次 | 192 | + shifday.setJgh(arg0.getString("j_gh")); |
| 193 | + shifday.setZbh(arg0.getString("cl_zbh")); | ||
| 194 | + shifday.setRq(arg0.getString("schedule_date")); | ||
| 194 | return shifday; | 195 | return shifday; |
| 195 | } | 196 | } |
| 197 | + | ||
| 196 | }); | 198 | }); |
| 199 | + | ||
| 200 | + for(int i=0;i<list.size();i++){ | ||
| 201 | + Shifday shi=list.get(i); | ||
| 202 | + Map<String, Object> maps = new HashMap<>(); | ||
| 203 | + maps = scheduleRealInfoService.findKMBC2(shi.getJgh(), shi.getCarPlate(), | ||
| 204 | + shi.getRq()); | ||
| 205 | + shi.setJhlc(maps.get("jhlc").toString());// 计划里程 | ||
| 206 | + //shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程 | ||
| 207 | + shi.setYygl(maps.get("yygl").toString());// 营运里程 | ||
| 208 | + shi.setEmptMileage(maps.get("ksgl").toString());// 空驶里程 | ||
| 209 | + shi.setRemMileage(maps.get("remMileage").toString());// 抽减里程 | ||
| 210 | + shi.setAddMileage(maps.get("addMileage").toString());// 增加里程 | ||
| 211 | + shi.setTotalm(maps.get("realMileage").toString());// 总里程 | ||
| 212 | + shi.setJhbc(maps.get("jhbc").toString());// 计划班次 | ||
| 213 | + //shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次 | ||
| 214 | + shi.setCjbc(maps.get("cjbc").toString());// 抽减班次 | ||
| 215 | + shi.setLjbc(maps.get("ljbc").toString());// 增加班次 | ||
| 216 | + shi.setSjbc(maps.get("sjbc").toString());// 实际班次 | ||
| 217 | + | ||
| 218 | + } | ||
| 219 | + | ||
| 197 | return list; | 220 | return list; |
| 198 | } | 221 | } |
| 199 | 222 | ||
| @@ -240,20 +263,20 @@ public class FormsServiceImpl implements FormsService { | @@ -240,20 +263,20 @@ public class FormsServiceImpl implements FormsService { | ||
| 240 | Changetochange chan = new Changetochange(); | 263 | Changetochange chan = new Changetochange(); |
| 241 | 264 | ||
| 242 | chan.setRq(rq); | 265 | chan.setRq(rq); |
| 243 | - chan.setGs(arg0.getString("gs").toString()); | ||
| 244 | - chan.setFgs(arg0.getString("fgs").toString()); | ||
| 245 | - chan.setXl(arg0.getString("xl").toString()); | ||
| 246 | - chan.setLp(arg0.getString("lp").toString()); | ||
| 247 | - chan.setFssj(arg0.getString("fssj").toString()); | ||
| 248 | - chan.setXgsj(arg0.getString("xgsj").toString()); | ||
| 249 | - chan.setPcch(arg0.getString("pcch").toString()); | ||
| 250 | - chan.setPcry(arg0.getString("pcry").toString()); | ||
| 251 | - chan.setJhch(arg0.getString("jhch").toString()); | ||
| 252 | - chan.setJhgh(arg0.getString("jhgh").toString()); | ||
| 253 | - chan.setSjch(arg0.getString("sjch").toString()); | ||
| 254 | - chan.setSjgh(arg0.getString("sjgh").toString()); | ||
| 255 | - chan.setYy(arg0.getString("yy").toString()); | ||
| 256 | - chan.setXgr(arg0.getString("xgr").toString()); | 266 | + chan.setGs(arg0.getString("gs")); |
| 267 | + chan.setFgs(arg0.getString("fgs")); | ||
| 268 | + chan.setXl(arg0.getString("xl")); | ||
| 269 | + chan.setLp(arg0.getString("lp")); | ||
| 270 | + chan.setFssj(arg0.getString("fssj")); | ||
| 271 | + chan.setXgsj(arg0.getString("xgsj")); | ||
| 272 | + chan.setPcch(arg0.getString("pcch")); | ||
| 273 | + chan.setPcry(arg0.getString("pcry")); | ||
| 274 | + chan.setJhch(arg0.getString("jhch")); | ||
| 275 | + chan.setJhgh(arg0.getString("jhgh")); | ||
| 276 | + chan.setSjch(arg0.getString("sjch")); | ||
| 277 | + chan.setSjgh(arg0.getString("sjgh")); | ||
| 278 | + chan.setYy(arg0.getString("yy")); | ||
| 279 | + chan.setXgr(arg0.getString("xgr")); | ||
| 257 | return chan; | 280 | return chan; |
| 258 | } | 281 | } |
| 259 | }); | 282 | }); |
| @@ -279,7 +302,7 @@ public class FormsServiceImpl implements FormsService { | @@ -279,7 +302,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 279 | 302 | ||
| 280 | rq = rq2 + "-" + rq3; | 303 | rq = rq2 + "-" + rq3; |
| 281 | 304 | ||
| 282 | - String sql = " SELECT r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 305 | + String sql = " SELECT r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " |
| 283 | + " FROM bsth_c_s_sp_info_real r " | 306 | + " FROM bsth_c_s_sp_info_real r " |
| 284 | + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " | 307 | + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " |
| 285 | + " where y.RQ BETWEEN '" + map.get("startDate").toString() + "' and '"+ map.get("endDate").toString() + "'" | 308 | + " where y.RQ BETWEEN '" + map.get("startDate").toString() + "' and '"+ map.get("endDate").toString() + "'" |
| @@ -309,19 +332,23 @@ public class FormsServiceImpl implements FormsService { | @@ -309,19 +332,23 @@ public class FormsServiceImpl implements FormsService { | ||
| 309 | sin.setJzl(arg0.getString("JZL")); | 332 | sin.setJzl(arg0.getString("JZL")); |
| 310 | // sin.setJzl(arg0.getString(""));//非营业性用油 | 333 | // sin.setJzl(arg0.getString(""));//非营业性用油 |
| 311 | sin.setJhjl(arg0.getString("JZL")); | 334 | sin.setJhjl(arg0.getString("JZL")); |
| 312 | - Map<String, Object> maps = new HashMap<>(); | ||
| 313 | - maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate, | ||
| 314 | - endDate); | ||
| 315 | - //sin.setjName(maps.get("j_name") == null ? "" : maps.get("j_name").toString()); | ||
| 316 | - sin.setSgh(maps.get("s_gh") == null ? "" : maps.get("s_gh").toString()); | ||
| 317 | - sin.setsName(maps.get("s_name") == null ? "" : maps.get("s_name").toString()); | ||
| 318 | - sin.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | ||
| 319 | - sin.setEmptMileage(maps.get("ksgl") == null ? "" : maps.get("ksgl").toString()); | ||
| 320 | - sin.setJhjl(maps.get("jhlc") == null ? "" : maps.get("jhlc").toString()); | ||
| 321 | - | 335 | + |
| 322 | return sin; | 336 | return sin; |
| 323 | } | 337 | } |
| 324 | }); | 338 | }); |
| 339 | + for(int i=0;i<list.size();i++){ | ||
| 340 | + Singledata si=list.get(i); | ||
| 341 | + Map<String, Object> maps = new HashMap<>(); | ||
| 342 | + maps = scheduleRealInfoService.findKMBC1(si.getjName(),si.getClzbh(), startDate, | ||
| 343 | + endDate); | ||
| 344 | + //sin.setjName(maps.get("j_name") == null ? "" : maps.get("j_name").toString()); | ||
| 345 | + si.setSgh(maps.get("s_gh") == null ? "" : maps.get("s_gh").toString()); | ||
| 346 | + si.setsName(maps.get("s_name") == null ? "" : maps.get("s_name").toString()); | ||
| 347 | + si.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | ||
| 348 | + si.setEmptMileage(maps.get("ksgl") == null ? "" : maps.get("ksgl").toString()); | ||
| 349 | + si.setJhjl(maps.get("jhlc") == null ? "" : maps.get("jhlc").toString()); | ||
| 350 | + | ||
| 351 | + } | ||
| 325 | return list; | 352 | return list; |
| 326 | } | 353 | } |
| 327 | 354 | ||
| @@ -329,7 +356,7 @@ public class FormsServiceImpl implements FormsService { | @@ -329,7 +356,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 329 | @Override | 356 | @Override |
| 330 | public List<Operationservice> operationservice(Map<String, Object> map) { | 357 | public List<Operationservice> operationservice(Map<String, Object> map) { |
| 331 | 358 | ||
| 332 | - String sql = " SELECT r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 359 | + String sql = " SELECT r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type " |
| 333 | + " FROM bsth_c_s_sp_info_real r " | 360 | + " FROM bsth_c_s_sp_info_real r " |
| 334 | // + "LEFT JOIN bsth_c_s_sp_info_real r on r.cl_zbh=y.NBBM" | 361 | // + "LEFT JOIN bsth_c_s_sp_info_real r on r.cl_zbh=y.NBBM" |
| 335 | + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " | 362 | + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " |
| @@ -338,6 +365,7 @@ public class FormsServiceImpl implements FormsService { | @@ -338,6 +365,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 338 | + " where r.schedule_date_str BETWEEN '"+ map.get("startDate").toString() | 365 | + " where r.schedule_date_str BETWEEN '"+ map.get("startDate").toString() |
| 339 | + "'" + " and '" + map.get("endDate").toString() + "'" | 366 | + "'" + " and '" + map.get("endDate").toString() + "'" |
| 340 | + " and r.xl_bm='" + map.get("line").toString() + "'" | 367 | + " and r.xl_bm='" + map.get("line").toString() + "'" |
| 368 | + + " and r.bc_type not in('in','out')" | ||
| 341 | /* + " and r.gs_bm='"+map.get("gsdmOperat").toString()+"'" | 369 | /* + " and r.gs_bm='"+map.get("gsdmOperat").toString()+"'" |
| 342 | + " and r.fgs_bm='"+map.get("fgsdmOperat").toString()+"'"*/ | 370 | + " and r.fgs_bm='"+map.get("fgsdmOperat").toString()+"'"*/ |
| 343 | + " AND r.gs_bm is not null" | 371 | + " AND r.gs_bm is not null" |
| @@ -373,11 +401,12 @@ public class FormsServiceImpl implements FormsService { | @@ -373,11 +401,12 @@ public class FormsServiceImpl implements FormsService { | ||
| 373 | return list; | 401 | return list; |
| 374 | } | 402 | } |
| 375 | 403 | ||
| 404 | + | ||
| 376 | // 车辆加注 | 405 | // 车辆加注 |
| 377 | @Override | 406 | @Override |
| 378 | public List<Vehicleloading> vehicleloading(/*String gsdmVehic,String fgsdmVehic,*/String line, String date) { | 407 | public List<Vehicleloading> vehicleloading(/*String gsdmVehic,String fgsdmVehic,*/String line, String date) { |
| 379 | 408 | ||
| 380 | - String sql = " SELECT r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 409 | + String sql = " SELECT r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type " |
| 381 | + " FROM bsth_c_s_sp_info_real r " | 410 | + " FROM bsth_c_s_sp_info_real r " |
| 382 | + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " | 411 | + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " |
| 383 | + " where to_days(y.RQ)=to_days('" + date + "') and y.XLBM= '" + line + "' GROUP BY y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH) y " | 412 | + " where to_days(y.RQ)=to_days('" + date + "') and y.XLBM= '" + line + "' GROUP BY y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH) y " |
| @@ -385,6 +414,7 @@ public class FormsServiceImpl implements FormsService { | @@ -385,6 +414,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 385 | + " where to_days(r.schedule_date_str)=to_days('" + date + "')" | 414 | + " where to_days(r.schedule_date_str)=to_days('" + date + "')" |
| 386 | + " and r.xl_bm='" + line + "' " | 415 | + " and r.xl_bm='" + line + "' " |
| 387 | + " AND r.gs_bm is not null" | 416 | + " AND r.gs_bm is not null" |
| 417 | + + " and r.bc_type not in('in','out')" | ||
| 388 | /* + " and r.gs_bm='"+gsdmVehic +"'" | 418 | /* + " and r.gs_bm='"+gsdmVehic +"'" |
| 389 | + " and r.fgs_bm='"+fgsdmVehic +"'"*/ | 419 | + " and r.fgs_bm='"+fgsdmVehic +"'"*/ |
| 390 | + " GROUP BY r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "; | 420 | + " GROUP BY r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "; |
| @@ -402,15 +432,21 @@ public class FormsServiceImpl implements FormsService { | @@ -402,15 +432,21 @@ public class FormsServiceImpl implements FormsService { | ||
| 402 | ve.setHyl(arg0.getString("YH")); | 432 | ve.setHyl(arg0.getString("YH")); |
| 403 | ve.setJzl(arg0.getString("JZL")); | 433 | ve.setJzl(arg0.getString("JZL")); |
| 404 | // ve.setLs(arg0.getString("").toString());//尿素 | 434 | // ve.setLs(arg0.getString("").toString());//尿素 |
| 405 | - Map<String, Object> maps = new HashMap<>(); | ||
| 406 | - maps = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), | ||
| 407 | - arg0.getString("schedule_date_str")); | ||
| 408 | - ve.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | ||
| 409 | - ve.setJhbc(maps.get("jhbc").toString() == null ? "" : maps.get("jhbc").toString());// 计划班次 | ||
| 410 | - ve.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString());// 实际班次 | 435 | + ve.setJgh(arg0.getString("j_gh").toString()); |
| 411 | return ve; | 436 | return ve; |
| 412 | } | 437 | } |
| 413 | }); | 438 | }); |
| 439 | + | ||
| 440 | + for(int i=0;i<list.size();i++){ | ||
| 441 | + Vehicleloading v=list.get(i); | ||
| 442 | + Map<String, Object> maps = new HashMap<>(); | ||
| 443 | + maps = scheduleRealInfoService.findKMBC2(v.getJgh(), line, | ||
| 444 | + date); | ||
| 445 | + v.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | ||
| 446 | + v.setJhbc(maps.get("jhbc").toString() == null ? "" : maps.get("jhbc").toString());// 计划班次 | ||
| 447 | + v.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString());// 实际班次 | ||
| 448 | + } | ||
| 449 | + | ||
| 414 | return list; | 450 | return list; |
| 415 | } | 451 | } |
| 416 | 452 | ||
| @@ -434,20 +470,22 @@ public class FormsServiceImpl implements FormsService { | @@ -434,20 +470,22 @@ public class FormsServiceImpl implements FormsService { | ||
| 434 | 470 | ||
| 435 | rq = rq2 + "-" + rq3; | 471 | rq = rq2 + "-" + rq3; |
| 436 | 472 | ||
| 437 | - String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,b.warrant_car from " | ||
| 438 | - + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" | 473 | + String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,b.warrant_car,a.bc_type from " |
| 474 | + + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type" | ||
| 439 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"+ map.get("startDate").toString() + "' " | 475 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"+ map.get("startDate").toString() + "' " |
| 440 | + " and '" + map.get("endDate").toString() + "' and xl_bm='"+ map.get("line").toString() + "' " | 476 | + " and '" + map.get("endDate").toString() + "' and xl_bm='"+ map.get("line").toString() + "' " |
| 441 | + " AND gs_bm is not null " | 477 | + " AND gs_bm is not null " |
| 478 | + + " AND bc_type NOT IN ('in', 'out')" | ||
| 442 | /*+ " and gs_bm='"+ map.get("gsdmTurn").toString() + "'" | 479 | /*+ " and gs_bm='"+ map.get("gsdmTurn").toString() + "'" |
| 443 | + " and fgs_bm='"+ map.get("fgsdmTurn").toString() + "'"*/ | 480 | + " and fgs_bm='"+ map.get("fgsdmTurn").toString() + "'"*/ |
| 444 | - + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | 481 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type ) a left JOIN (" |
| 445 | + " SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl,t.warrant_car " | 482 | + " SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl,t.warrant_car " |
| 446 | - + " from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | 483 | + + " from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl,bc_type from bsth_c_s_sp_info_real " |
| 447 | + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | 484 | + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" |
| 448 | + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | 485 | + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() |
| 449 | + "' AND gs_bm is not null " | 486 | + "' AND gs_bm is not null " |
| 450 | - + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | 487 | + + " AND bc_type NOT IN ('in', 'out')" |
| 488 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type) b ON t.company=b.gs_bm) b on " | ||
| 451 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | 489 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; |
| 452 | List<Turnoutrate> list = jdbcTemplate.query(sql, new RowMapper<Turnoutrate>() { | 490 | List<Turnoutrate> list = jdbcTemplate.query(sql, new RowMapper<Turnoutrate>() { |
| 453 | 491 | ||
| @@ -480,6 +518,7 @@ public class FormsServiceImpl implements FormsService { | @@ -480,6 +518,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 480 | 518 | ||
| 481 | }); | 519 | }); |
| 482 | 520 | ||
| 521 | + | ||
| 483 | return list; | 522 | return list; |
| 484 | } | 523 | } |
| 485 | 524 | ||
| @@ -503,20 +542,20 @@ public class FormsServiceImpl implements FormsService { | @@ -503,20 +542,20 @@ public class FormsServiceImpl implements FormsService { | ||
| 503 | 542 | ||
| 504 | rq = rq2 + "-" + rq3; | 543 | rq = rq2 + "-" + rq3; |
| 505 | 544 | ||
| 506 | - String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm from " | ||
| 507 | - + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" | 545 | + String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,a.bc_type from " |
| 546 | + + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type" | ||
| 508 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | 547 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" |
| 509 | + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | 548 | + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" |
| 510 | - + map.get("line").toString() + "' AND gs_bm is not null" | 549 | + + map.get("line").toString() + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out')" |
| 511 | /*+ " and gs_bm='"+ map.get("gsdmEcecut").toString() + "'" | 550 | /*+ " and gs_bm='"+ map.get("gsdmEcecut").toString() + "'" |
| 512 | + " and fgs_bm='"+ map.get("fgsdmEcecut").toString() + "'"*/ | 551 | + " and fgs_bm='"+ map.get("fgsdmEcecut").toString() + "'"*/ |
| 513 | - + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | ||
| 514 | - + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " | ||
| 515 | - + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | 552 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type ) a left JOIN (" |
| 553 | + + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " | ||
| 554 | + + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl,bc_type from bsth_c_s_sp_info_real " | ||
| 516 | + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | 555 | + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" |
| 517 | + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | 556 | + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() |
| 518 | - + "' AND gs_bm is not null " | ||
| 519 | - + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | 557 | + + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out') " |
| 558 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type) b ON t.company=b.gs_bm) b on " | ||
| 520 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | 559 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; |
| 521 | List<Executionrate> list = jdbcTemplate.query(sql, new RowMapper<Executionrate>() { | 560 | List<Executionrate> list = jdbcTemplate.query(sql, new RowMapper<Executionrate>() { |
| 522 | 561 | ||
| @@ -570,22 +609,27 @@ public class FormsServiceImpl implements FormsService { | @@ -570,22 +609,27 @@ public class FormsServiceImpl implements FormsService { | ||
| 570 | String rq2 = sdf1.format(d); | 609 | String rq2 = sdf1.format(d); |
| 571 | String rq3 = sdf1.format(d1); | 610 | String rq3 = sdf1.format(d1); |
| 572 | 611 | ||
| 612 | + | ||
| 613 | + | ||
| 573 | rq = rq2 + "-" + rq3; | 614 | rq = rq2 + "-" + rq3; |
| 574 | 615 | ||
| 575 | - String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm from " | ||
| 576 | - + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" | 616 | + String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,a.bc_type from " |
| 617 | + + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type" | ||
| 577 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | 618 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" |
| 578 | + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | 619 | + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" |
| 579 | - + map.get("line").toString() + "' AND gs_bm is not null" | 620 | + + map.get("line").toString() + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out') " |
| 580 | /*+ " and gs_bm='"+ map.get("gsdmAllline").toString() + "'" | 621 | /*+ " and gs_bm='"+ map.get("gsdmAllline").toString() + "'" |
| 581 | + " and fgs_bm='"+ map.get("fgsdmAllline").toString() + "'"*/ | 622 | + " and fgs_bm='"+ map.get("fgsdmAllline").toString() + "'"*/ |
| 582 | - + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | ||
| 583 | - + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " | ||
| 584 | - + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | 623 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type ) a left JOIN (" |
| 624 | + + "SELECT COUNT(*" | ||
| 625 | + + ") as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b." | ||
| 626 | + + "xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " | ||
| 627 | + + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl,bc_type from bsth_c_s_sp_info_real " | ||
| 585 | + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | 628 | + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" |
| 586 | - + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | ||
| 587 | - + "' AND gs_bm is not null " | ||
| 588 | - + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | 629 | + + map.get("endDate").toString() + "' and xl_bm='" + map.get |
| 630 | + ("line").toString() | ||
| 631 | + + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out')" | ||
| 632 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type) b ON t.company=b.gs_bm) b on " | ||
| 589 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | 633 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; |
| 590 | List<Allline> list = jdbcTemplate.query(sql, new RowMapper<Allline>() { | 634 | List<Allline> list = jdbcTemplate.query(sql, new RowMapper<Allline>() { |
| 591 | 635 | ||
| @@ -610,14 +654,19 @@ public class FormsServiceImpl implements FormsService { | @@ -610,14 +654,19 @@ public class FormsServiceImpl implements FormsService { | ||
| 610 | tu.setBcjh(arg0.getString("jbc").toString()); | 654 | tu.setBcjh(arg0.getString("jbc").toString()); |
| 611 | tu.setBcsj(arg0.getString("sbc").toString()); | 655 | tu.setBcsj(arg0.getString("sbc").toString()); |
| 612 | tu.setBbzxl(result2 + "%");// 班次执行率 | 656 | tu.setBbzxl(result2 + "%");// 班次执行率 |
| 657 | + | ||
| 613 | // tu.setSm(arg0.getString("xl_name").toString()); | 658 | // tu.setSm(arg0.getString("xl_name").toString()); |
| 614 | tu.setGsgs(arg0.getString("gslsbm").toString()); | 659 | tu.setGsgs(arg0.getString("gslsbm").toString()); |
| 615 | tu.setFgsgs(arg0.getString("fgsbm").toString()); | 660 | tu.setFgsgs(arg0.getString("fgsbm").toString()); |
| 616 | return tu; | 661 | return tu; |
| 617 | } | 662 | } |
| 618 | 663 | ||
| 664 | + | ||
| 619 | }); | 665 | }); |
| 666 | + | ||
| 620 | 667 | ||
| 668 | + | ||
| 669 | + | ||
| 621 | return list; | 670 | return list; |
| 622 | } | 671 | } |
| 623 | -} | ||
| 624 | \ No newline at end of file | 672 | \ No newline at end of file |
| 673 | +} |
src/main/resources/static/pages/forms/statement/operationservice.html
src/main/resources/static/pages/forms/statement/shifday.html
| @@ -147,7 +147,6 @@ $(function(){ | @@ -147,7 +147,6 @@ $(function(){ | ||
| 147 | for(var code in result){ | 147 | for(var code in result){ |
| 148 | data.push({id: code, text: result[code]}); | 148 | data.push({id: code, text: result[code]}); |
| 149 | } | 149 | } |
| 150 | - console.log(data); | ||
| 151 | initPinYinSelect2('#line',data,''); | 150 | initPinYinSelect2('#line',data,''); |
| 152 | 151 | ||
| 153 | }) | 152 | }) |
src/main/resources/static/pages/forms/statement/shiftuehiclemanth.html
| @@ -137,7 +137,6 @@ | @@ -137,7 +137,6 @@ | ||
| 137 | for(var code in result){ | 137 | for(var code in result){ |
| 138 | data.push({id: code, text: result[code]}); | 138 | data.push({id: code, text: result[code]}); |
| 139 | } | 139 | } |
| 140 | - console.log(data); | ||
| 141 | initPinYinSelect2('#line',data,''); | 140 | initPinYinSelect2('#line',data,''); |
| 142 | 141 | ||
| 143 | }) | 142 | }) |
src/main/resources/static/pages/forms/statement/singledata.html
| @@ -142,7 +142,6 @@ | @@ -142,7 +142,6 @@ | ||
| 142 | for(var code in result){ | 142 | for(var code in result){ |
| 143 | data.push({id: code, text: result[code]}); | 143 | data.push({id: code, text: result[code]}); |
| 144 | } | 144 | } |
| 145 | - console.log(data); | ||
| 146 | initPinYinSelect2('#line',data,''); | 145 | initPinYinSelect2('#line',data,''); |
| 147 | 146 | ||
| 148 | }) | 147 | }) |
| @@ -167,7 +166,6 @@ | @@ -167,7 +166,6 @@ | ||
| 167 | } | 166 | } |
| 168 | obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | 167 | obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); |
| 169 | }); | 168 | }); |
| 170 | - console.log(result); | ||
| 171 | var singledata = template('singledata',{list:result}); | 169 | var singledata = template('singledata',{list:result}); |
| 172 | // 把渲染好的模版html文本追加到表格中 | 170 | // 把渲染好的模版html文本追加到表格中 |
| 173 | $('#forms tbody').html(singledata); | 171 | $('#forms tbody').html(singledata); |
src/main/resources/static/pages/forms/statement/vehicleloading.html
| @@ -130,7 +130,6 @@ | @@ -130,7 +130,6 @@ | ||
| 130 | for(var code in result){ | 130 | for(var code in result){ |
| 131 | data.push({id: code, text: result[code]}); | 131 | data.push({id: code, text: result[code]}); |
| 132 | } | 132 | } |
| 133 | - console.log(data); | ||
| 134 | initPinYinSelect2('#line',data,''); | 133 | initPinYinSelect2('#line',data,''); |
| 135 | 134 | ||
| 136 | }) | 135 | }) |
src/main/resources/static/pages/forms/statement/waybillday.html
| @@ -129,7 +129,6 @@ | @@ -129,7 +129,6 @@ | ||
| 129 | for(var code in result){ | 129 | for(var code in result){ |
| 130 | data.push({id: code, text: result[code]}); | 130 | data.push({id: code, text: result[code]}); |
| 131 | } | 131 | } |
| 132 | - console.log(data); | ||
| 133 | initPinYinSelect2('#line',data,''); | 132 | initPinYinSelect2('#line',data,''); |
| 134 | 133 | ||
| 135 | }) | 134 | }) |