Commit cda7cc4252a6c33f2f41574385b288893500c8a2
Merge branch 'minhang' of http://192.168.168.201:8888/panzhaov5/bsth_control into minhang
Showing
21 changed files
with
416 additions
and
133 deletions
src/main/java/com/bsth/entity/mcy_forms/Shifday.java
| ... | ... | @@ -34,7 +34,36 @@ public class Shifday { |
| 34 | 34 | |
| 35 | 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 | 67 | public String getJhlc() { |
| 39 | 68 | return jhlc; |
| 40 | 69 | } | ... | ... |
src/main/java/com/bsth/entity/mcy_forms/Shiftuehiclemanth.java
| ... | ... | @@ -20,7 +20,24 @@ public class Shiftuehiclemanth { |
| 20 | 20 | |
| 21 | 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 | 41 | public String getCjbc() { |
| 25 | 42 | return cjbc; |
| 26 | 43 | } | ... | ... |
src/main/java/com/bsth/entity/mcy_forms/Vehicleloading.java
| ... | ... | @@ -24,6 +24,26 @@ public class Vehicleloading { |
| 24 | 24 | |
| 25 | 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 | 47 | public String getLs() { |
| 28 | 48 | return ls; |
| 29 | 49 | } | ... | ... |
src/main/java/com/bsth/entity/mcy_forms/Waybillday.java
| ... | ... | @@ -20,9 +20,29 @@ public class Waybillday { |
| 20 | 20 | |
| 21 | 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 | 39 | private String yl;//用油 |
| 24 | 40 | |
| 25 | 41 | private String nbbm;//机油 |
| 42 | + | |
| 43 | + private String jgh;//员工号 | |
| 44 | + | |
| 45 | + private String rq;//日期 | |
| 26 | 46 | |
| 27 | 47 | public String getCarPlate() { |
| 28 | 48 | return carPlate; | ... | ... |
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
| ... | ... | @@ -163,7 +163,7 @@ public class ScheduleRealInfo { |
| 163 | 163 | private String qdzArrDatesj; |
| 164 | 164 | |
| 165 | 165 | /** 子任务 */ |
| 166 | - @OneToMany(fetch = FetchType.LAZY/*, cascade = CascadeType.ALL*/) | |
| 166 | + @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) | |
| 167 | 167 | private Set<ChildTaskPlan> cTasks = new HashSet<>(); |
| 168 | 168 | |
| 169 | 169 | /** 关联的公司名称 */ | ... | ... |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| ... | ... | @@ -121,4 +121,5 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI |
| 121 | 121 | |
| 122 | 122 | @Query(value="select s from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 GROUP BY xlBm ORDER BY xlBm") |
| 123 | 123 | List<ScheduleRealInfo> setDDRBGroup(String date); |
| 124 | + | |
| 124 | 125 | } | ... | ... |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| ... | ... | @@ -64,16 +64,22 @@ public class FormsServiceImpl implements FormsService { |
| 64 | 64 | // System.out.println(arg0.getObject("yl")); |
| 65 | 65 | // wbd.setYl(arg0.getString("yl")); |
| 66 | 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 | 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 | 83 | return list; |
| 78 | 84 | } |
| 79 | 85 | |
| ... | ... | @@ -102,6 +108,9 @@ public class FormsServiceImpl implements FormsService { |
| 102 | 108 | return lin; |
| 103 | 109 | } |
| 104 | 110 | }); |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 105 | 114 | return list; |
| 106 | 115 | } |
| 107 | 116 | |
| ... | ... | @@ -111,12 +120,13 @@ public class FormsServiceImpl implements FormsService { |
| 111 | 120 | |
| 112 | 121 | @Override |
| 113 | 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 | 124 | + " from bsth_c_s_sp_info_real r " |
| 116 | 125 | + " where to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') " |
| 117 | 126 | + " and to_days('" + map.get("endDate").toString() + "') " |
| 118 | 127 | + " and r.xl_bm='"+ map.get("line").toString() + "'" |
| 119 | 128 | + " AND r.gs_bm is not null" |
| 129 | + + " and r.bc_type not in('in','out')" | |
| 120 | 130 | /* + " and r.gs_bm='"+map.get("gsdmManth").toString()+"'" |
| 121 | 131 | + " and r.fgs_bm='"+map.get("fgsdmManth").toString()+"'"*/ |
| 122 | 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 | 140 | public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 131 | 141 | Shiftuehiclemanth shif = new Shiftuehiclemanth(); |
| 132 | 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 | 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 | 166 | return list; |
| 154 | 167 | } |
| 155 | 168 | |
| ... | ... | @@ -157,10 +170,11 @@ public class FormsServiceImpl implements FormsService { |
| 157 | 170 | @Override |
| 158 | 171 | public List<Shifday> shifday(Map<String, Object> map) { |
| 159 | 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 | 174 | + " FROM bsth_c_s_sp_info_real r " |
| 162 | 175 | + " where to_days(r.schedule_date)=to_days('" |
| 163 | 176 | + map.get("date").toString() + "') and r.xl_bm=" + map.get("line").toString() |
| 177 | + + " and r.bc_type not in('in','out')" | |
| 164 | 178 | /*+ " and r.gs_bm='"+map.get("gsdmShif").toString()+"'" |
| 165 | 179 | + " and r.fgs_bm='"+map.get("fgsdmShif").toString()+"'"*/ |
| 166 | 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 | 189 | shifday.setsName(arg0.getString("s_name") == null ? "" : arg0.getString("s_name").toString()); |
| 176 | 190 | shifday.setLpName(arg0.getString("r.lp_name").toString()); |
| 177 | 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 | 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 | 220 | return list; |
| 198 | 221 | } |
| 199 | 222 | |
| ... | ... | @@ -240,20 +263,20 @@ public class FormsServiceImpl implements FormsService { |
| 240 | 263 | Changetochange chan = new Changetochange(); |
| 241 | 264 | |
| 242 | 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 | 280 | return chan; |
| 258 | 281 | } |
| 259 | 282 | }); |
| ... | ... | @@ -279,7 +302,7 @@ public class FormsServiceImpl implements FormsService { |
| 279 | 302 | |
| 280 | 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 | 306 | + " FROM bsth_c_s_sp_info_real r " |
| 284 | 307 | + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " |
| 285 | 308 | + " where y.RQ BETWEEN '" + map.get("startDate").toString() + "' and '"+ map.get("endDate").toString() + "'" |
| ... | ... | @@ -309,19 +332,23 @@ public class FormsServiceImpl implements FormsService { |
| 309 | 332 | sin.setJzl(arg0.getString("JZL")); |
| 310 | 333 | // sin.setJzl(arg0.getString(""));//非营业性用油 |
| 311 | 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 | 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 | 352 | return list; |
| 326 | 353 | } |
| 327 | 354 | |
| ... | ... | @@ -329,7 +356,7 @@ public class FormsServiceImpl implements FormsService { |
| 329 | 356 | @Override |
| 330 | 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 | 360 | + " FROM bsth_c_s_sp_info_real r " |
| 334 | 361 | // + "LEFT JOIN bsth_c_s_sp_info_real r on r.cl_zbh=y.NBBM" |
| 335 | 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 | 365 | + " where r.schedule_date_str BETWEEN '"+ map.get("startDate").toString() |
| 339 | 366 | + "'" + " and '" + map.get("endDate").toString() + "'" |
| 340 | 367 | + " and r.xl_bm='" + map.get("line").toString() + "'" |
| 368 | + + " and r.bc_type not in('in','out')" | |
| 341 | 369 | /* + " and r.gs_bm='"+map.get("gsdmOperat").toString()+"'" |
| 342 | 370 | + " and r.fgs_bm='"+map.get("fgsdmOperat").toString()+"'"*/ |
| 343 | 371 | + " AND r.gs_bm is not null" |
| ... | ... | @@ -373,11 +401,12 @@ public class FormsServiceImpl implements FormsService { |
| 373 | 401 | return list; |
| 374 | 402 | } |
| 375 | 403 | |
| 404 | + | |
| 376 | 405 | // 车辆加注 |
| 377 | 406 | @Override |
| 378 | 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 | 410 | + " FROM bsth_c_s_sp_info_real r " |
| 382 | 411 | + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " |
| 383 | 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 | 414 | + " where to_days(r.schedule_date_str)=to_days('" + date + "')" |
| 386 | 415 | + " and r.xl_bm='" + line + "' " |
| 387 | 416 | + " AND r.gs_bm is not null" |
| 417 | + + " and r.bc_type not in('in','out')" | |
| 388 | 418 | /* + " and r.gs_bm='"+gsdmVehic +"'" |
| 389 | 419 | + " and r.fgs_bm='"+fgsdmVehic +"'"*/ |
| 390 | 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 | 432 | ve.setHyl(arg0.getString("YH")); |
| 403 | 433 | ve.setJzl(arg0.getString("JZL")); |
| 404 | 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 | 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 | 450 | return list; |
| 415 | 451 | } |
| 416 | 452 | |
| ... | ... | @@ -434,20 +470,22 @@ public class FormsServiceImpl implements FormsService { |
| 434 | 470 | |
| 435 | 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 | 475 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"+ map.get("startDate").toString() + "' " |
| 440 | 476 | + " and '" + map.get("endDate").toString() + "' and xl_bm='"+ map.get("line").toString() + "' " |
| 441 | 477 | + " AND gs_bm is not null " |
| 478 | + + " AND bc_type NOT IN ('in', 'out')" | |
| 442 | 479 | /*+ " and gs_bm='"+ map.get("gsdmTurn").toString() + "'" |
| 443 | 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 | 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 | 484 | + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" |
| 448 | 485 | + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() |
| 449 | 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 | 489 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; |
| 452 | 490 | List<Turnoutrate> list = jdbcTemplate.query(sql, new RowMapper<Turnoutrate>() { |
| 453 | 491 | |
| ... | ... | @@ -480,6 +518,7 @@ public class FormsServiceImpl implements FormsService { |
| 480 | 518 | |
| 481 | 519 | }); |
| 482 | 520 | |
| 521 | + | |
| 483 | 522 | return list; |
| 484 | 523 | } |
| 485 | 524 | |
| ... | ... | @@ -503,20 +542,20 @@ public class FormsServiceImpl implements FormsService { |
| 503 | 542 | |
| 504 | 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 | 547 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" |
| 509 | 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 | 550 | /*+ " and gs_bm='"+ map.get("gsdmEcecut").toString() + "'" |
| 512 | 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 | 555 | + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" |
| 517 | 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 | 559 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; |
| 521 | 560 | List<Executionrate> list = jdbcTemplate.query(sql, new RowMapper<Executionrate>() { |
| 522 | 561 | |
| ... | ... | @@ -570,22 +609,27 @@ public class FormsServiceImpl implements FormsService { |
| 570 | 609 | String rq2 = sdf1.format(d); |
| 571 | 610 | String rq3 = sdf1.format(d1); |
| 572 | 611 | |
| 612 | + | |
| 613 | + | |
| 573 | 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 | 618 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" |
| 578 | 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 | 621 | /*+ " and gs_bm='"+ map.get("gsdmAllline").toString() + "'" |
| 581 | 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 | 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 | 633 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; |
| 590 | 634 | List<Allline> list = jdbcTemplate.query(sql, new RowMapper<Allline>() { |
| 591 | 635 | |
| ... | ... | @@ -610,14 +654,19 @@ public class FormsServiceImpl implements FormsService { |
| 610 | 654 | tu.setBcjh(arg0.getString("jbc").toString()); |
| 611 | 655 | tu.setBcsj(arg0.getString("sbc").toString()); |
| 612 | 656 | tu.setBbzxl(result2 + "%");// 班次执行率 |
| 657 | + | |
| 613 | 658 | // tu.setSm(arg0.getString("xl_name").toString()); |
| 614 | 659 | tu.setGsgs(arg0.getString("gslsbm").toString()); |
| 615 | 660 | tu.setFgsgs(arg0.getString("fgsbm").toString()); |
| 616 | 661 | return tu; |
| 617 | 662 | } |
| 618 | 663 | |
| 664 | + | |
| 619 | 665 | }); |
| 666 | + | |
| 620 | 667 | |
| 668 | + | |
| 669 | + | |
| 621 | 670 | return list; |
| 622 | 671 | } |
| 623 | -} | |
| 624 | 672 | \ No newline at end of file |
| 673 | +} | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ChildTaskPlanServiceImpl.java
| 1 | 1 | package com.bsth.service.realcontrol.impl; |
| 2 | 2 | |
| 3 | -import java.util.Map; | |
| 4 | - | |
| 5 | -import javax.transaction.Transactional; | |
| 6 | - | |
| 7 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | -import org.springframework.stereotype.Service; | |
| 9 | - | |
| 10 | 3 | import com.bsth.data.BasicData; |
| 11 | 4 | import com.bsth.data.match.Arrival2Schedule; |
| 12 | 5 | import com.bsth.data.schedule.DayOfSchedule; |
| 13 | 6 | import com.bsth.entity.realcontrol.ChildTaskPlan; |
| 14 | 7 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 15 | 8 | import com.bsth.repository.realcontrol.ChildTaskPlanRepository; |
| 9 | +import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | |
| 16 | 10 | import com.bsth.service.impl.BaseServiceImpl; |
| 17 | 11 | import com.bsth.service.realcontrol.ChildTaskPlanService; |
| 12 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 13 | +import org.springframework.jdbc.core.JdbcTemplate; | |
| 14 | +import org.springframework.stereotype.Service; | |
| 15 | + | |
| 16 | +import javax.transaction.Transactional; | |
| 17 | +import java.util.Map; | |
| 18 | 18 | |
| 19 | 19 | @Service |
| 20 | 20 | public class ChildTaskPlanServiceImpl extends BaseServiceImpl<ChildTaskPlan, Long> implements ChildTaskPlanService{ |
| 21 | 21 | |
| 22 | 22 | /*@Autowired |
| 23 | 23 | ScheduleRealInfoServiceImpl scheduleRealInfoService;*/ |
| 24 | + | |
| 25 | + @Autowired | |
| 26 | + ScheduleRealInfoRepository scheduleRealInfoRepository; | |
| 24 | 27 | |
| 25 | 28 | @Autowired |
| 26 | 29 | ChildTaskPlanRepository childTaskPlanRepository; |
| ... | ... | @@ -30,6 +33,9 @@ public class ChildTaskPlanServiceImpl extends BaseServiceImpl<ChildTaskPlan, Lon |
| 30 | 33 | |
| 31 | 34 | @Autowired |
| 32 | 35 | Arrival2Schedule arrival2Schedule; |
| 36 | + | |
| 37 | + @Autowired | |
| 38 | + JdbcTemplate jdbcTemplate; | |
| 33 | 39 | |
| 34 | 40 | @Transactional |
| 35 | 41 | @Override |
| ... | ... | @@ -62,10 +68,13 @@ public class ChildTaskPlanServiceImpl extends BaseServiceImpl<ChildTaskPlan, Lon |
| 62 | 68 | //解除和主任务关联 |
| 63 | 69 | ScheduleRealInfo sch = dayOfSchedule.get(cPlan.getSchedule().getId()); |
| 64 | 70 | sch.getcTasks().remove(cPlan); |
| 71 | + //删除关联表数据 | |
| 72 | + jdbcTemplate.execute("delete from bsth_c_s_sp_info_real_c_tasks where bsth_c_s_sp_info_real="+sch.getId()+" and c_tasks="+cPlan.getId()); | |
| 73 | + | |
| 65 | 74 | //删除子任务 |
| 66 | 75 | rs = super.delete(id); |
| 67 | 76 | dayOfSchedule.save(sch); |
| 68 | - | |
| 77 | + | |
| 69 | 78 | rs.put("t", sch); |
| 70 | 79 | return rs; |
| 71 | 80 | } | ... | ... |
src/main/resources/static/pages/forms/statement/operationservice.html
src/main/resources/static/pages/forms/statement/shifday.html
src/main/resources/static/pages/forms/statement/shiftuehiclemanth.html
src/main/resources/static/pages/forms/statement/singledata.html
| ... | ... | @@ -142,7 +142,6 @@ |
| 142 | 142 | for(var code in result){ |
| 143 | 143 | data.push({id: code, text: result[code]}); |
| 144 | 144 | } |
| 145 | - console.log(data); | |
| 146 | 145 | initPinYinSelect2('#line',data,''); |
| 147 | 146 | |
| 148 | 147 | }) |
| ... | ... | @@ -167,7 +166,6 @@ |
| 167 | 166 | } |
| 168 | 167 | obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); |
| 169 | 168 | }); |
| 170 | - console.log(result); | |
| 171 | 169 | var singledata = template('singledata',{list:result}); |
| 172 | 170 | // 把渲染好的模版html文本追加到表格中 |
| 173 | 171 | $('#forms tbody').html(singledata); | ... | ... |
src/main/resources/static/pages/forms/statement/vehicleloading.html
src/main/resources/static/pages/forms/statement/waybillday.html
src/main/resources/static/real_control_v2/css/ct_table.css
src/main/resources/static/real_control_v2/css/line_schedule.css
| ... | ... | @@ -943,4 +943,73 @@ input.i-cbox[type=checkbox]{ |
| 943 | 943 | |
| 944 | 944 | .fixed_legend .tl-qrlb::before{ |
| 945 | 945 | font-size: 12px; |
| 946 | +} | |
| 947 | + | |
| 948 | +.schedule-body .ct_table dl.dl-last-sch{ | |
| 949 | + height: 55px; | |
| 950 | +} | |
| 951 | + | |
| 952 | +.schedule-body .ct_table dl.dl-last-sch dd{ | |
| 953 | + line-height: 55px; | |
| 954 | +} | |
| 955 | + | |
| 956 | +.schedule-body .ct_table dl.dl-last-sch dd.fcsjActualCell{ | |
| 957 | + line-height: 28px; | |
| 958 | +} | |
| 959 | + | |
| 960 | +dd.fcsjActualCell div.last-sch-sunken{ | |
| 961 | + height: 25px; | |
| 962 | + line-height: 25px; | |
| 963 | + margin: 0; | |
| 964 | + background: #fff; | |
| 965 | + /*border-top: 1px solid #eeeeee;*/ | |
| 966 | +} | |
| 967 | + | |
| 968 | +dd.fcsjActualCell div.last-sch-sunken span._badge{ | |
| 969 | + font-size: 12px; | |
| 970 | + border-radius: 0 7px 7px 0; | |
| 971 | + padding-left: 0; | |
| 972 | + width: 29px; | |
| 973 | + display: inline-block; | |
| 974 | + height: 18px; | |
| 975 | + line-height: 18px; | |
| 976 | + box-shadow: 2px 0px 2px 0 rgba(0,0,0,0.16), 2px 0px 4px 0 rgba(0,0,0,0.12); | |
| 977 | + vertical-align: top; | |
| 978 | + margin-right: 3px; | |
| 979 | + margin-top: 3px; | |
| 980 | + margin-left: -7px; | |
| 981 | + text-indent: 2px; | |
| 982 | + border-left: 0; | |
| 983 | + transform: scale(.9); | |
| 984 | + color: grey; | |
| 985 | +} | |
| 986 | + | |
| 987 | +.relevance-active dd.fcsjActualCell div.last-sch-sunken{ | |
| 988 | + background: #f1efef; | |
| 989 | +} | |
| 990 | + | |
| 991 | +.intimity.relevance-active dd.fcsjActualCell div.last-sch-sunken{ | |
| 992 | + background: #76a6c7 !important; | |
| 993 | + border-top: 1px solid #f7f8f8 !important; | |
| 994 | + color: #f8f8f8; | |
| 995 | +} | |
| 996 | + | |
| 997 | +.intimity.relevance-active dd.fcsjActualCell div.last-sch-sunken span._badge{ | |
| 998 | + background: #76a6c7 ; | |
| 999 | + color: #ffffff ; | |
| 1000 | +} | |
| 1001 | + | |
| 1002 | +.drag-active dd.fcsjActualCell div.last-sch-sunken{ | |
| 1003 | + background: #cef9e3 !important; | |
| 1004 | + border-top: 1px solid #d9e6e0 !important; | |
| 1005 | +} | |
| 1006 | + | |
| 1007 | +.drag-active dd.fcsjActualCell div.last-sch-sunken span._badge{ | |
| 1008 | + color: #6e6969; | |
| 1009 | + background: #cef9e3; | |
| 1010 | +} | |
| 1011 | + | |
| 1012 | +.ct_table>.ct_table_body dl.dl-last-sch:hover div.last-sch-sunken, | |
| 1013 | +.ct_table>.ct_table_body dl.dl-last-sch.context-menu-active div.last-sch-sunken{ | |
| 1014 | + background: #f5fbff; | |
| 946 | 1015 | } |
| 947 | 1016 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lj_zrw.html
src/main/resources/static/real_control_v2/fragments/line_schedule/sch_table.html
| ... | ... | @@ -7,10 +7,9 @@ |
| 7 | 7 | {{else}} |
| 8 | 8 | 下行/{{line.endStationName}} |
| 9 | 9 | {{/if}} |
| 10 | - <i class="uk-icon-question-circle" ></i> | |
| 10 | + <i class="uk-icon-question-circle"></i> | |
| 11 | 11 | <div class="fixed_legend"> |
| 12 | 12 | <div> |
| 13 | - <!--<i class="uk-icon-angle-right" ></i>--> | |
| 14 | 13 | <span class="tl-xxfc">消息发出</span> |
| 15 | 14 | <span class="tl-xxsd">消息收到</span> |
| 16 | 15 | <span class="tl-xxrd">消息阅读</span> |
| ... | ... | @@ -54,7 +53,7 @@ |
| 54 | 53 | </div> |
| 55 | 54 | <div class="ct_table_body"> |
| 56 | 55 | {{each list as sch i}} |
| 57 | - <dl data-id="{{sch.id}}" > | |
| 56 | + <dl data-id="{{sch.id}}"> | |
| 58 | 57 | <dd class="seq_no">{{i + 1}}</dd> |
| 59 | 58 | <dd class="lpName"><a>{{sch.lpName}}</a></dd> |
| 60 | 59 | <dd data-nbbm="{{sch.clZbh}}" |
| ... | ... | @@ -81,7 +80,9 @@ |
| 81 | 80 | <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span> |
| 82 | 81 | {{/if}} |
| 83 | 82 | </dd> |
| 84 | - <dd data-sort-val={{sch.dfsjT}} dbclick dbclick-type="dfsj" dbclick-val="{{sch.dfsj}}">{{sch.dfsj}}</dd> | |
| 83 | + <dd data-sort-val={{sch.dfsjT}} dbclick dbclick-type="dfsj" dbclick-val="{{sch.dfsj}}"> | |
| 84 | + {{sch.dfsj}} | |
| 85 | + </dd> | |
| 85 | 86 | <dd class=" |
| 86 | 87 | {{if sch.status==-1}} |
| 87 | 88 | tl-qrlb |
| ... | ... | @@ -91,11 +92,12 @@ |
| 91 | 92 | tl-zzzx |
| 92 | 93 | {{else if sch.status == 0 && sch.late}} |
| 93 | 94 | tl-wd |
| 94 | - {{/if}} fcsjActualCell" > | |
| 95 | + {{/if}} fcsjActualCell"> | |
| 95 | 96 | {{sch.fcsjActual}}<span class="fcsj-diff">{{sch.fcsj_diff}}</span> |
| 96 | 97 | </dd> |
| 97 | 98 | <dd data-uk-observe> |
| 98 | - <span title="{{sch.remarks}}" data-uk-tooltip="{pos:'top-left'}" >{{sch.remarks}}</span> | |
| 99 | + <span title="{{sch.remarks}}" | |
| 100 | + data-uk-tooltip="{pos:'top-left'}">{{sch.remarks}}</span> | |
| 99 | 101 | </dd> |
| 100 | 102 | </dl> |
| 101 | 103 | {{/each}} |
| ... | ... | @@ -128,7 +130,7 @@ |
| 128 | 130 | </script> |
| 129 | 131 | |
| 130 | 132 | <script id="line-schedule-sfsj-temp" type="text/html"> |
| 131 | - <dd class=" | |
| 133 | + <dd class=" | |
| 132 | 134 | {{if status==-1}} |
| 133 | 135 | tl-qrlb |
| 134 | 136 | {{else if status==2}} |
| ... | ... | @@ -138,8 +140,8 @@ |
| 138 | 140 | {{else if status == 0 && late}} |
| 139 | 141 | tl-wd |
| 140 | 142 | {{/if}} fcsjActualCell"> |
| 141 | - {{fcsjActual}}<span class="fcsj-diff">{{fcsj_diff}}</span> | |
| 142 | - </dd> | |
| 143 | + {{fcsjActual}}<span class="fcsj-diff">{{fcsj_diff}}</span> | |
| 144 | + </dd> | |
| 143 | 145 | </script> |
| 144 | 146 | |
| 145 | 147 | <script id="line-schedule-nbbm-temp" type="text/html"> |
| ... | ... | @@ -162,4 +164,10 @@ |
| 162 | 164 | <li><span>终点站:</span>{{zdzName}}</li> |
| 163 | 165 | </ul> |
| 164 | 166 | </script> |
| 167 | + | |
| 168 | + <script id="last-sch-sunken-temp" type="text/html"> | |
| 169 | + <div class="last-sch-sunken"> | |
| 170 | + <span class="_badge">终点</span>{{zdsj}}/{{zdsjActual}} | |
| 171 | + </div> | |
| 172 | + </script> | |
| 165 | 173 | </div> | ... | ... |
src/main/resources/static/real_control_v2/js/line_schedule/legend.js
| ... | ... | @@ -2,14 +2,16 @@ |
| 2 | 2 | |
| 3 | 3 | var gb_sch_legend = (function () { |
| 4 | 4 | |
| 5 | + var locaKey = 'sch_legend_flag'; | |
| 6 | + var storage = window.localStorage; | |
| 5 | 7 | |
| 6 | 8 | var animationend = 'webkitAnimationEnd animationend'; |
| 7 | - var initLegend = function () { | |
| 9 | + var initLegend = function (cont) { | |
| 8 | 10 | //双击展开 |
| 9 | - $('.schedule-wrap i.uk-icon-question-circle').dblclick(openLegend); | |
| 11 | + $('.schedule-wrap i.uk-icon-question-circle', cont).dblclick(openLegend); | |
| 10 | 12 | |
| 11 | 13 | //关闭事件 |
| 12 | - $('.schedule-wrap .fixed_legend_close').on('click', function () { | |
| 14 | + $('.schedule-wrap .fixed_legend_close', cont).on('click', function () { | |
| 13 | 15 | //隐藏 fixed_legend |
| 14 | 16 | $('.schedule-wrap .fixed_legend').each(function () { |
| 15 | 17 | var anim = 'uk-animation-slide-top uk-animation-reverse'; |
| ... | ... | @@ -26,7 +28,14 @@ var gb_sch_legend = (function () { |
| 26 | 28 | $(this).hide().parents('.header-title').find('.uk-icon-question-circle').show(); |
| 27 | 29 | } |
| 28 | 30 | }); |
| 31 | + | |
| 32 | + //记录状态 | |
| 33 | + storage.setItem(locaKey, 0); | |
| 29 | 34 | }); |
| 35 | + | |
| 36 | + var flag=storage.getItem(locaKey); | |
| 37 | + if(flag && flag==1) | |
| 38 | + openLegend(); | |
| 30 | 39 | }; |
| 31 | 40 | |
| 32 | 41 | |
| ... | ... | @@ -47,6 +56,9 @@ var gb_sch_legend = (function () { |
| 47 | 56 | } |
| 48 | 57 | }); |
| 49 | 58 | $('.schedule-wrap .fixed_legend').css('display', 'inline-block'); |
| 59 | + | |
| 60 | + //记录状态 | |
| 61 | + storage.setItem(locaKey, 1); | |
| 50 | 62 | }; |
| 51 | 63 | |
| 52 | 64 | return { | ... | ... |
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
| ... | ... | @@ -56,6 +56,11 @@ var gb_schedule_table = (function () { |
| 56 | 56 | |
| 57 | 57 | $('.schedule-wrap .card-panel:eq(' + upDown + ')', this).html(htmlStr); |
| 58 | 58 | } |
| 59 | + | |
| 60 | + //标记车辆最后一个班次 | |
| 61 | + markerLastByLine(lineCode); | |
| 62 | + //初始化图例相关,dbclick 不能代理事件 | |
| 63 | + gb_sch_legend.init(this); | |
| 59 | 64 | }); |
| 60 | 65 | var content = $('.line_schedule .ct_table_wrap'); |
| 61 | 66 | //fixed table head |
| ... | ... | @@ -67,9 +72,6 @@ var gb_schedule_table = (function () { |
| 67 | 72 | //点击实发,show detail |
| 68 | 73 | fcsjActualCellQtip(); |
| 69 | 74 | cb && cb(); |
| 70 | - | |
| 71 | - //图例相关 | |
| 72 | - gb_sch_legend.init(); | |
| 73 | 75 | }); |
| 74 | 76 | }; |
| 75 | 77 | |
| ... | ... | @@ -159,6 +161,11 @@ var gb_schedule_table = (function () { |
| 159 | 161 | }); |
| 160 | 162 | $('.schedule-wrap .card-panel:eq(' + upDown + ')', tabCont).html(htmlStr); |
| 161 | 163 | } |
| 164 | + //图例相关 | |
| 165 | + gb_sch_legend.init(tabCont); | |
| 166 | + //标记末班 | |
| 167 | + markerLastByLine(sch.xlBm); | |
| 168 | + //计算应发未发 | |
| 162 | 169 | calc_yfwf_num(sch.xlBm); |
| 163 | 170 | //重新固定表头 |
| 164 | 171 | gb_ct_table.fixedHead($('.line_schedule .ct_table_wrap')); |
| ... | ... | @@ -217,6 +224,10 @@ var gb_schedule_table = (function () { |
| 217 | 224 | $(dds[8]).html('<span title="' + sch.remarks + '" data-uk-tooltip="{pos:\'top-left\'}">' + sch.remarks + '</span>'); |
| 218 | 225 | else |
| 219 | 226 | $(dds[8]).html(''); |
| 227 | + | |
| 228 | + //班次是车辆的最后一班 | |
| 229 | + if(dl.hasClass('dl-last-sch')) | |
| 230 | + markerLastSch([sch]); | |
| 220 | 231 | }; |
| 221 | 232 | |
| 222 | 233 | //拖拽选中... |
| ... | ... | @@ -265,12 +276,14 @@ var gb_schedule_table = (function () { |
| 265 | 276 | return item.clZbh == sch.clZbh; |
| 266 | 277 | }).sort(schedule_sort), |
| 267 | 278 | nextSch, tempDL; |
| 279 | + | |
| 280 | + getDl(sch).addClass('intimity'); | |
| 268 | 281 | $.each(schArr, function (i) { |
| 269 | 282 | tempDL = $('dl[data-id=' + this.id + ']', contWrap); |
| 270 | 283 | tempDL.addClass('relevance-active'); |
| 271 | 284 | if (i < schArr.length - 1 && this.id == id) { |
| 272 | 285 | nextSch = schArr[i + 1]; |
| 273 | - tempDL.addClass('intimity'); | |
| 286 | + //tempDL.addClass('intimity'); | |
| 274 | 287 | } |
| 275 | 288 | }); |
| 276 | 289 | |
| ... | ... | @@ -309,7 +322,7 @@ var gb_schedule_table = (function () { |
| 309 | 322 | }); |
| 310 | 323 | |
| 311 | 324 | var scroToDl = function (sch) { |
| 312 | - var dl = $('dl[data-id=' + sch.id + ']', $('.line_schedule[data-id=' + sch.xlBm + ']')), | |
| 325 | + var dl = getDl(sch), | |
| 313 | 326 | cont = dl.parents('.ct_table_wrap'), |
| 314 | 327 | diff = cont.height() / 2; |
| 315 | 328 | cont.animate({ |
| ... | ... | @@ -319,6 +332,10 @@ var gb_schedule_table = (function () { |
| 319 | 332 | return dl; |
| 320 | 333 | }; |
| 321 | 334 | |
| 335 | + var getDl = function (sch) { | |
| 336 | + return $('dl[data-id=' + sch.id + ']', $('.line_schedule[data-id=' + sch.xlBm + ']')); | |
| 337 | + }; | |
| 338 | + | |
| 322 | 339 | var reset_drag_active_all = function (dd) { |
| 323 | 340 | $(dd).parents('.schedule-wrap').find('dl.drag-active').removeClass('drag-active'); |
| 324 | 341 | reset_relevance_active(dd); |
| ... | ... | @@ -355,6 +372,42 @@ var gb_schedule_table = (function () { |
| 355 | 372 | $('#badge_yfwf_num_' + lineCode).text(yfwf_num); |
| 356 | 373 | }; |
| 357 | 374 | |
| 375 | + //标记终点时间 -线路 | |
| 376 | + var markerLastByLine = function (lineCode) { | |
| 377 | + var data = gb_common.groupBy(gb_common.get_vals(line2Schedule[lineCode]).filter(schDestroyFilter), 'clZbh'); | |
| 378 | + | |
| 379 | + var array, lastSch, dl; | |
| 380 | + for (var nbbm in data) { | |
| 381 | + array = data[nbbm].sort(schedule_sort); | |
| 382 | + markerLastSch(array); | |
| 383 | + } | |
| 384 | + }; | |
| 385 | + | |
| 386 | + //标记终点时间 -车辆 | |
| 387 | + var markerLastByNbbm = function (lineCode, nbbm) { | |
| 388 | + var array = gb_common.get_vals(line2Schedule[lineCode]).filter(function (a) { | |
| 389 | + return a.clZbh == nbbm && a.status != -1; | |
| 390 | + }).sort(schedule_sort); | |
| 391 | + | |
| 392 | + markerLastSch(array); | |
| 393 | + }; | |
| 394 | + | |
| 395 | + var markerLastSch = function (array) { | |
| 396 | + var lastSch = array[array.length - 1]; | |
| 397 | + | |
| 398 | + if (!lastSch.jhlc) | |
| 399 | + return; | |
| 400 | + | |
| 401 | + var dl = getDl(lastSch); | |
| 402 | + dl.addClass('dl-last-sch'); | |
| 403 | + | |
| 404 | + $('dd.fcsjActualCell', dl).append(temps['last-sch-sunken-temp'](lastSch)); | |
| 405 | + } | |
| 406 | + | |
| 407 | + var schDestroyFilter = function (a) { | |
| 408 | + return a.status != -1; | |
| 409 | + } | |
| 410 | + | |
| 358 | 411 | return { |
| 359 | 412 | show: show, |
| 360 | 413 | findScheduleByLine: findScheduleByLine, | ... | ... |
src/main/resources/static/real_control_v2/js/main.js
| ... | ... | @@ -196,8 +196,8 @@ var open_modal = function(pageUrl, data, opt) { |
| 196 | 196 | function showUpdateDescription() { |
| 197 | 197 | //更新说明 |
| 198 | 198 | var updateDescription={ |
| 199 | - date: '2016-12-11', | |
| 200 | - text: '<h5>1、电子路单单击“实发”时,tootip内的人员显示工号。</h5><h5>2、修复某些情况下,班次被操作后 点击“实发” 无法显示tootip的情况。</h5><h5>3、获取GPS数据失败时,页面会弹出提示,并等待7秒后尝试再次获取。</h5>' | |
| 199 | + date: '2016-12-15', | |
| 200 | + text: '<h5>1、双击电子路单title右侧 ? 号图标,可将图例固定在上发。</h5><h5>2、每辆车最后一个班次,实发栏会显示计划和实际终点时间。</h5><h5>3、修复了子任务添加1分钟后再删除,弹出完整性约束校验失败 的问题。</h5>' | |
| 201 | 201 | }; |
| 202 | 202 | |
| 203 | 203 | var storage = window.localStorage | ... | ... |