Commit 50206784032ceaaee88bdac26e30ffdd45ed135f
Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing
19 changed files
with
439 additions
and
83 deletions
src/main/java/com/bsth/entity/schedule/rule/RerunRule.java
| ... | ... | @@ -73,10 +73,21 @@ public class RerunRule extends BEntity { |
| 73 | 73 | /** 车辆配置 */ |
| 74 | 74 | @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY) |
| 75 | 75 | private CarConfigInfo useCarConfig; |
| 76 | + | |
| 77 | + private Integer cl; // 冗余字段(车辆id) | |
| 78 | + private String clZbh; // 冗余字段(车辆自编号) | |
| 79 | + | |
| 76 | 80 | /** 人员配置 */ |
| 77 | 81 | @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY) |
| 78 | 82 | private EmployeeConfigInfo useEmployeeConfig; |
| 79 | 83 | |
| 84 | + private Integer j; // 冗余字段(驾驶员Id) | |
| 85 | + private String jGh; // 冗余字段(驾驶员工号) | |
| 86 | + private String jName; // 冗余字段(驾驶员姓名) | |
| 87 | + private Integer s; // 冗余字段(售票员Id) | |
| 88 | + private String sGh; // 冗余字段(售票员工号) | |
| 89 | + private String sName; // 冗余字段(售票员姓名) | |
| 90 | + | |
| 80 | 91 | /** 是否删除(标记) */ |
| 81 | 92 | @Column(nullable = false) |
| 82 | 93 | private Boolean isCancel = false; |
| ... | ... | @@ -176,4 +187,68 @@ public class RerunRule extends BEntity { |
| 176 | 187 | public void setRerunTtinfodetailFcsjs(String rerunTtinfodetailFcsjs) { |
| 177 | 188 | this.rerunTtinfodetailFcsjs = rerunTtinfodetailFcsjs; |
| 178 | 189 | } |
| 190 | + | |
| 191 | + public Integer getCl() { | |
| 192 | + return cl; | |
| 193 | + } | |
| 194 | + | |
| 195 | + public void setCl(Integer cl) { | |
| 196 | + this.cl = cl; | |
| 197 | + } | |
| 198 | + | |
| 199 | + public String getClZbh() { | |
| 200 | + return clZbh; | |
| 201 | + } | |
| 202 | + | |
| 203 | + public void setClZbh(String clZbh) { | |
| 204 | + this.clZbh = clZbh; | |
| 205 | + } | |
| 206 | + | |
| 207 | + public Integer getJ() { | |
| 208 | + return j; | |
| 209 | + } | |
| 210 | + | |
| 211 | + public void setJ(Integer j) { | |
| 212 | + this.j = j; | |
| 213 | + } | |
| 214 | + | |
| 215 | + public String getjGh() { | |
| 216 | + return jGh; | |
| 217 | + } | |
| 218 | + | |
| 219 | + public void setjGh(String jGh) { | |
| 220 | + this.jGh = jGh; | |
| 221 | + } | |
| 222 | + | |
| 223 | + public String getjName() { | |
| 224 | + return jName; | |
| 225 | + } | |
| 226 | + | |
| 227 | + public void setjName(String jName) { | |
| 228 | + this.jName = jName; | |
| 229 | + } | |
| 230 | + | |
| 231 | + public Integer getS() { | |
| 232 | + return s; | |
| 233 | + } | |
| 234 | + | |
| 235 | + public void setS(Integer s) { | |
| 236 | + this.s = s; | |
| 237 | + } | |
| 238 | + | |
| 239 | + public String getsGh() { | |
| 240 | + return sGh; | |
| 241 | + } | |
| 242 | + | |
| 243 | + public void setsGh(String sGh) { | |
| 244 | + this.sGh = sGh; | |
| 245 | + } | |
| 246 | + | |
| 247 | + public String getsName() { | |
| 248 | + return sName; | |
| 249 | + } | |
| 250 | + | |
| 251 | + public void setsName(String sName) { | |
| 252 | + this.sName = sName; | |
| 253 | + } | |
| 179 | 254 | } | ... | ... |
src/main/java/com/bsth/repository/oil/YlbRepository.java
| ... | ... | @@ -27,6 +27,29 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ |
| 27 | 27 | + " xlbm like %?4% and nbbm like %?5% ",nativeQuery=true) |
| 28 | 28 | List<Ylb> obtainYlbefore(String rq,String gsbm,String fgsbm,String xlbm,String nbbm); |
| 29 | 29 | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * 获取当天日期前的最大的日期中最大进出顺序的数据 | |
| 33 | + * | |
| 34 | + */ | |
| 35 | + @Transactional | |
| 36 | + @Modifying | |
| 37 | + @Query(value="select y.* from (select max(d.id) as id ,d.nbbm from (" | |
| 38 | + + " select b.rq,b.nbbm,max(b.jcsx) as jcsx from (" | |
| 39 | + + " select max(t.rq) as rq ,t.nbbm from bsth_c_ylb t " | |
| 40 | + + " where to_days(t.rq)< to_days(?1) " | |
| 41 | + + " and t.ssgsdm like %?2% and t.fgsdm like %?3% " | |
| 42 | + + " and t.xlbm like %?4% and t.nbbm like %?5% group by nbbm ) a " | |
| 43 | + + " left join bsth_c_ylb b on a.rq=b.rq and a.nbbm=b.nbbm " | |
| 44 | + + " where b.ssgsdm like %?2% and b.fgsdm like %?3% and " | |
| 45 | + + " b.xlbm like %?4% and b.nbbm like %?5% group by b.rq,b.nbbm) c" | |
| 46 | + + " left join bsth_c_ylb d on c.rq=d.rq and c.nbbm=d.nbbm and c.jcsx=d.jcsx " | |
| 47 | + + " where d.ssgsdm like %?2% and d.fgsdm like %?3% and d.xlbm like %?4% " | |
| 48 | + + " and d.nbbm like %?5% group by d.nbbm) x left join " | |
| 49 | + + " bsth_c_ylb y on x.id=y.id where y.ssgsdm like %?2% and y.fgsdm like %?3% " | |
| 50 | + + " and y.xlbm like %?4% and y.nbbm like %?5%",nativeQuery=true) | |
| 51 | + List<Ylb> listMaxRqJcsx(String rq,String gsbm,String fgsbm,String xlbm,String nbbm); | |
| 52 | + | |
| 30 | 53 | /** |
| 31 | 54 | * 当天YLB信息 |
| 32 | 55 | * @param rq | ... | ... |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| ... | ... | @@ -164,8 +164,8 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI |
| 164 | 164 | List<ScheduleRealInfo> scheduleByDateAndLineYbb(String line,String date,String date2); |
| 165 | 165 | |
| 166 | 166 | |
| 167 | - @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,min(s.fcsj) as fcsj ) from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% GROUP BY xlBm,clZbh,jGh,scheduleDate,jGh ORDER BY clZbh,fcsj") | |
| 168 | - List<Map<String,Object>> yesterdayDataList(String line,String date,String gsbm,String fgsbm); | |
| 167 | + @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,min(s.fcsj) as fcsj ) from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% and s.clZbh like %?5% GROUP BY xlBm,clZbh,jGh,scheduleDate,jGh ORDER BY clZbh,fcsj") | |
| 168 | + List<Map<String,Object>> yesterdayDataList(String line,String date,String gsbm,String fgsbm,String nbbm); | |
| 169 | 169 | |
| 170 | 170 | @Query(value="select s from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 ORDER BY xlBm,lpName,clZbh,xlDir") |
| 171 | 171 | List<ScheduleRealInfo> setLD(String date); | ... | ... |
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
| ... | ... | @@ -276,17 +276,22 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw |
| 276 | 276 | // TODO Auto-generated method stub |
| 277 | 277 | String rq=map.get("rq").toString(); |
| 278 | 278 | String nbbm=map.get("nbbh").toString(); |
| 279 | + String gsdm=map.get("gsdm_like").toString(); | |
| 280 | + | |
| 281 | + String fgsdm=map.get("fgsdm_like").toString(); | |
| 279 | 282 | String sql="SELECT a.gsdm as gsdm,a.fgsdm as fgsdm,a.nbbm as nbbm," |
| 280 | 283 | + "b.jyggh as jyggh,b.jzl as jzl ,b.stationid as stationid,b.jsy as jsy," |
| 281 | 284 | + "b.nylx as nylx,b.yj as yj,b.bz as bz,b.id as id ,c.jsy as ldgh FROM bsth_c_cwjy a "+ |
| 282 | 285 | " left join (" |
| 283 | 286 | + " select * from bsth_c_ylxxb b " |
| 284 | - + "where to_days(b.yyrq)=to_days('"+rq+"') and jylx=1) b " + | |
| 287 | + + "where to_days(b.yyrq)=to_days('"+rq+"') and jylx=1 " | |
| 288 | + + " and gsdm = '"+gsdm+"') b " + | |
| 285 | 289 | " on a.nbbm=b.nbbm " |
| 286 | 290 | + "left join (select nbbm,group_concat(jsy) as jsy " |
| 287 | - + "from bsth_c_ylb where to_days(rq)= to_days('"+rq+"' ) group by nbbm "+ | |
| 291 | + + "from bsth_c_ylb where to_days(rq)= to_days('"+rq+"' ) " | |
| 292 | + + " and ssgsdm='"+gsdm+"' and fgsdm ='"+fgsdm+"' group by nbbm "+ | |
| 288 | 293 | " ) c on a.nbbm=c.nbbm " |
| 289 | - + "where a.nbbm like '%"+nbbm+"%'"; | |
| 294 | + + "where a.nbbm like '%"+nbbm+"%' and a.gsdm='"+gsdm+"' and a.fgsdm ='"+fgsdm+"'"; | |
| 290 | 295 | |
| 291 | 296 | List<Ylxxb> yList= jdbcTemplate.query(sql, |
| 292 | 297 | new RowMapper<Ylxxb>(){ | ... | ... |
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
| ... | ... | @@ -102,7 +102,8 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 102 | 102 | //当天YLXXB信息 |
| 103 | 103 | // List<Ylxxb> ylxxList=ylxxbRepository.obtainYlxx(rq); |
| 104 | 104 | //前一天所有车辆最后进场班次信息 |
| 105 | - List<Ylb> ylListBe=repository.obtainYlbefore(rq,"","","",""); | |
| 105 | +// List<Ylb> ylListBe=repository.obtainYlbefore(rq,"","","",""); | |
| 106 | + List<Ylb> ylListBe=repository.listMaxRqJcsx(rq, "", "", "", ""); | |
| 106 | 107 | List<Cyl> clyList=cylRepository.obtainCyl("",""); |
| 107 | 108 | //从排班表中计算出行驶的总里程 |
| 108 | 109 | List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList("", rq, "", "", "", ""); |
| ... | ... | @@ -240,7 +241,8 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 240 | 241 | // 当天YLXXB信息 |
| 241 | 242 | List<Ylxxb> ylxxList = ylxxbRepository.obtainYlxx(rq, 0,gsbm); |
| 242 | 243 | // 前一天所有车辆最后进场班次信息 |
| 243 | - List<Ylb> ylListBe = repository.obtainYlbefore(rq, gsbm, fgsbm, line, nbbm); | |
| 244 | +// List<Ylb> ylListBe = repository.obtainYlbefore(rq, gsbm, fgsbm, line, nbbm); | |
| 245 | + List<Ylb> ylListBe =repository.listMaxRqJcsx(rq, gsbm, fgsbm, line, nbbm); | |
| 244 | 246 | List<Cyl> clyList = cylRepository.obtainCyl(nbbm,gsbm); |
| 245 | 247 | // 从排班表中计算出行驶的总里程 |
| 246 | 248 | List<Map<String, Object>> listpb = scheduleRealInfoService.yesterdayDataList(line, rq, gsbm, fgsbm, "", nbbm); |
| ... | ... | @@ -325,7 +327,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 325 | 327 | t.setNbbm(map.get("clZbh").toString()); |
| 326 | 328 | t.setJsy(map.get("jGh") == null ? "" : map.get("jGh").toString()); |
| 327 | 329 | t.setZlc(map.get("totalKilometers") == null ? 0.0 |
| 328 | - : Double.parseDouble(df.format(Double.parseDouble(map.get("totalKilometers").toString())))); | |
| 330 | + : Double.parseDouble(map.get("totalKilometers").toString())); | |
| 329 | 331 | t.setXlbm(map.get("xlBm") == null ? "" : map.get("xlBm").toString()); |
| 330 | 332 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); |
| 331 | 333 | t.setSsgsdm(map.get("company") == null ? "" : map.get("company").toString()); |
| ... | ... | @@ -451,13 +453,21 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 451 | 453 | nextJzyl =Arith.sub( Arith.add(Arith.sub(t.getJzl(),t.getSh()), t.getCzyl()),yh); |
| 452 | 454 | //把进场油量的小数和整数分别取出 |
| 453 | 455 | // int ylxs=(int) nextJzyl; 10.6--11 10.3--10 |
| 454 | - long l=Math.round(nextJzyl); | |
| 455 | - double ylxs=l*100/100; | |
| 456 | -// nextJzyl = Arith.add(nextJzyl,Arith.sub(nextJzyl,ylxs)); | |
| 457 | - yh=Arith.add(yh, Arith.sub(ylxs,nextJzyl)); | |
| 458 | - t.setYh(yh); | |
| 459 | - t.setJzyl(ylxs); | |
| 460 | - nextJzyl=ylxs; | |
| 456 | + if(zlc>0){ | |
| 457 | + long l=Math.round(nextJzyl); | |
| 458 | + double ylxs=l*100/100; | |
| 459 | +// nextJzyl = Arith.add(nextJzyl,Arith.sub(nextJzyl,ylxs)); | |
| 460 | + yh=Arith.add(yh, Arith.sub(ylxs,nextJzyl)); | |
| 461 | + t.setYh(yh); | |
| 462 | + t.setJzyl(ylxs); | |
| 463 | + nextJzyl=ylxs; | |
| 464 | + }else{ | |
| 465 | + t.setYh(yh); | |
| 466 | + t.setJzyl(nextJzyl); | |
| 467 | + } | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 461 | 471 | } else { |
| 462 | 472 | t.setCzyl(nextJzyl); |
| 463 | 473 | Double yh=0.0; |
| ... | ... | @@ -465,16 +475,21 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 465 | 475 | yh= Double.parseDouble(df.format(zyl * (t.getZlc() / zlc))); |
| 466 | 476 | } |
| 467 | 477 | nextJzyl =Arith.sub( Arith.add(Arith.sub(t.getJzl(),t.getSh()),nextJzyl),yh); |
| 468 | - long l=Math.round(nextJzyl); | |
| 469 | - double ylxs=l*100/100; | |
| 470 | -// nextJzyl = Arith.add(nextJzyl,Arith.sub(nextJzyl,ylxs)); | |
| 471 | - yh=Arith.add(yh, Arith.sub(ylxs,nextJzyl)); | |
| 472 | - t.setYh(yh); | |
| 473 | - t.setJzyl(ylxs); | |
| 474 | - nextJzyl= ylxs; | |
| 478 | + if(zlc>0){ | |
| 479 | + long l=Math.round(nextJzyl); | |
| 480 | + double ylxs=l*100/100; | |
| 481 | +// nextJzyl = Arith.add(nextJzyl,Arith.sub(nextJzyl,ylxs)); | |
| 482 | + yh=Arith.add(yh, Arith.sub(ylxs,nextJzyl)); | |
| 483 | + t.setYh(yh); | |
| 484 | + t.setJzyl(ylxs); | |
| 485 | + nextJzyl=ylxs; | |
| 486 | + }else{ | |
| 487 | + t.setYh(yh); | |
| 488 | + t.setJzyl(nextJzyl); | |
| 489 | + } | |
| 475 | 490 | } |
| 476 | 491 | repository.save(t); |
| 477 | - for (int z = 0; z < cylList.size(); z++) { | |
| 492 | + /*for (int z = 0; z < cylList.size(); z++) { | |
| 478 | 493 | Cyl cyl = cylList.get(z); |
| 479 | 494 | if (t.getNbbm().equals(cyl.getNbbm())) { |
| 480 | 495 | cyl.setCyl(t.getJzyl()); |
| ... | ... | @@ -482,7 +497,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 482 | 497 | break; |
| 483 | 498 | } |
| 484 | 499 | cylRepository.save(cyl); |
| 485 | - } | |
| 500 | + }*/ | |
| 486 | 501 | } |
| 487 | 502 | map2.put("status", ResponseCode.SUCCESS); |
| 488 | 503 | } |
| ... | ... | @@ -687,7 +702,8 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 687 | 702 | if(map.get("nbbm_eq")!=null){ |
| 688 | 703 | nbbm=map.get("nbbm_eq").toString(); |
| 689 | 704 | } |
| 690 | - List<Ylb> ylListBe=repository.obtainYlbefore(rq, gsbm, "", xlbm, nbbm); | |
| 705 | +// List<Ylb> ylListBe=repository.obtainYlbefore(rq, gsbm, "", xlbm, nbbm); | |
| 706 | + List<Ylb> ylListBe=repository.listMaxRqJcsx(rq, gsbm, fgsbm, xlbm, nbbm); | |
| 691 | 707 | List<Cyl> cylList=cylRepository.obtainCyl(nbbm, gsbm); |
| 692 | 708 | List<Ylb> ylbList=repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm"); |
| 693 | 709 | List<Ylxxb> ylxxbList=ylxxbRepository.obtainYlxx(rq,0,gsbm); |
| ... | ... | @@ -751,11 +767,11 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 751 | 767 | t.setYh(0.0); |
| 752 | 768 | if(!(t.getSsgsdm().equals("") || t.getFgsdm().equals(""))){ |
| 753 | 769 | repository.save(t); |
| 754 | - if(null!=cyl){ | |
| 770 | + /*if(null!=cyl){ | |
| 755 | 771 | cyl.setCyl(Arith.add(t.getJzl(), t.getCzyl())); |
| 756 | 772 | cyl.setUpdatetime(y1.getYyrq()); |
| 757 | 773 | cylRepository.save(cyl); |
| 758 | - } | |
| 774 | + }*/ | |
| 759 | 775 | } |
| 760 | 776 | } |
| 761 | 777 | } |
| ... | ... | @@ -1048,7 +1064,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 1048 | 1064 | t.setRylx(rylx); |
| 1049 | 1065 | t.setId(jsonObject.getInteger("id"));*/ |
| 1050 | 1066 | repository.ylbUpdate(id, czyl, jzyl, yh, sh, shyy, ns, rylx,yhlx); |
| 1051 | - for (int z = 0; z < cylList.size(); z++) { | |
| 1067 | + /*for (int z = 0; z < cylList.size(); z++) { | |
| 1052 | 1068 | Cyl cyl = cylList.get(z); |
| 1053 | 1069 | if (nbbm.equals(cyl.getNbbm())) { |
| 1054 | 1070 | cyl.setCyl(jzyl); |
| ... | ... | @@ -1056,7 +1072,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 1056 | 1072 | break; |
| 1057 | 1073 | } |
| 1058 | 1074 | cylRepository.save(cyl); |
| 1059 | - } | |
| 1075 | + }*/ | |
| 1060 | 1076 | } |
| 1061 | 1077 | // List<Map<String, Object>> list=(List<Map<String, Object>>) map.get("ylbList"); |
| 1062 | 1078 | |
| ... | ... | @@ -1139,13 +1155,18 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 1139 | 1155 | yh = Double.parseDouble(df.format(zyl * (t.getZlc() / zlc))); |
| 1140 | 1156 | } |
| 1141 | 1157 | nextJzyl =Arith.sub(Arith.add(t.getJzl(), t.getCzyl()), Arith.add(yh, t.getSh())); |
| 1142 | - long l=Math.round(nextJzyl); | |
| 1143 | - double ylxs=l*100/100; | |
| 1144 | -// nextJzyl = Arith.add(nextJzyl,Arith.sub(nextJzyl,ylxs)); | |
| 1145 | - yh=Arith.add(yh, Arith.sub(ylxs,nextJzyl)); | |
| 1146 | - t.setJzyl(ylxs); | |
| 1147 | - t.setYh(yh); | |
| 1148 | - nextJzyl=ylxs; | |
| 1158 | + if(zlc>0){ | |
| 1159 | + long l=Math.round(nextJzyl); | |
| 1160 | + double ylxs=l*100/100; | |
| 1161 | +// nextJzyl = Arith.add(nextJzyl,Arith.sub(nextJzyl,ylxs)); | |
| 1162 | + yh=Arith.add(yh, Arith.sub(ylxs,nextJzyl)); | |
| 1163 | + t.setYh(yh); | |
| 1164 | + t.setJzyl(ylxs); | |
| 1165 | + nextJzyl=ylxs; | |
| 1166 | + }else{ | |
| 1167 | + t.setYh(yh); | |
| 1168 | + t.setJzyl(nextJzyl); | |
| 1169 | + } | |
| 1149 | 1170 | } else { |
| 1150 | 1171 | if(t.getId()==id){ |
| 1151 | 1172 | t.setSh(sh); |
| ... | ... | @@ -1157,16 +1178,21 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 1157 | 1178 | yh= Double.parseDouble(df.format(zyl * (t.getZlc() / zlc))); |
| 1158 | 1179 | } |
| 1159 | 1180 | nextJzyl = Arith.sub(Arith.add(t.getJzl(), nextJzyl), Arith.add(yh, t.getSh())); |
| 1160 | - long l=Math.round(nextJzyl); | |
| 1161 | - double ylxs=l*100/100; | |
| 1162 | -// nextJzyl = Arith.add(nextJzyl,Arith.sub(nextJzyl,ylxs)); | |
| 1163 | - yh=Arith.add(yh, Arith.sub(ylxs,nextJzyl)); | |
| 1164 | - t.setJzyl(ylxs); | |
| 1165 | - t.setYh(yh); | |
| 1166 | - nextJzyl=ylxs; | |
| 1181 | + if(zlc>0){ | |
| 1182 | + long l=Math.round(nextJzyl); | |
| 1183 | + double ylxs=l*100/100; | |
| 1184 | +// nextJzyl = Arith.add(nextJzyl,Arith.sub(nextJzyl,ylxs)); | |
| 1185 | + yh=Arith.add(yh, Arith.sub(ylxs,nextJzyl)); | |
| 1186 | + t.setYh(yh); | |
| 1187 | + t.setJzyl(ylxs); | |
| 1188 | + nextJzyl=ylxs; | |
| 1189 | + }else{ | |
| 1190 | + t.setYh(yh); | |
| 1191 | + t.setJzyl(nextJzyl); | |
| 1192 | + } | |
| 1167 | 1193 | } |
| 1168 | 1194 | repository.save(t); |
| 1169 | - for (int z = 0; z < cylList.size(); z++) { | |
| 1195 | + /*for (int z = 0; z < cylList.size(); z++) { | |
| 1170 | 1196 | Cyl cyl = cylList.get(z); |
| 1171 | 1197 | if (t.getNbbm().equals(cyl.getNbbm())) { |
| 1172 | 1198 | cyl.setCyl(t.getJzyl()); |
| ... | ... | @@ -1174,7 +1200,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 1174 | 1200 | break; |
| 1175 | 1201 | } |
| 1176 | 1202 | cylRepository.save(cyl); |
| 1177 | - } | |
| 1203 | + }*/ | |
| 1178 | 1204 | } |
| 1179 | 1205 | newMap.put("status", ResponseCode.SUCCESS); |
| 1180 | 1206 | } | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -2728,12 +2728,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2728 | 2728 | // String date = sdfMonth.format(org.apache.commons.lang.time.DateUtils.addDays(new Date(), -1)); |
| 2729 | 2729 | // String date = "2016-09-20"; |
| 2730 | 2730 | // System.out.println("shijian1:"+new Date()); |
| 2731 | - List<Map<String, Object>> yesterdayDataList = scheduleRealInfoRepository.yesterdayDataList(line, date,gsbm,fgsbm); | |
| 2731 | + List<Map<String, Object>> yesterdayDataList = scheduleRealInfoRepository.yesterdayDataList(line, date,gsbm,fgsbm,nbbm); | |
| 2732 | 2732 | // System.out.println("shijian2:"+new Date()); |
| 2733 | 2733 | // List<ScheduleRealInfo> list = scheduleRealInfoRepository.scheduleByDateAndLine(line, date); |
| 2734 | 2734 | List<ScheduleRealInfo> lists = scheduleRealInfoRepository.queryListWaybill3(jGh, nbbm, date,gsbm,fgsbm); |
| 2735 | 2735 | // System.out.println("shijian3:"+new Date()); |
| 2736 | 2736 | for (int x = 0; x < yesterdayDataList.size(); x++) { |
| 2737 | + | |
| 2737 | 2738 | String jName = yesterdayDataList.get(x).get("jGh").toString(); |
| 2738 | 2739 | String clZbh = yesterdayDataList.get(x).get("clZbh").toString(); |
| 2739 | 2740 | ... | ... |
src/main/java/com/bsth/service/schedule/impl/SchedulePlanServiceImpl.java
| ... | ... | @@ -12,6 +12,7 @@ import com.bsth.service.schedule.exception.ScheduleException; |
| 12 | 12 | import com.bsth.service.schedule.rules.ScheduleRuleService; |
| 13 | 13 | import com.bsth.service.schedule.rules.plan.PlanCalcuParam_input; |
| 14 | 14 | import com.bsth.service.schedule.rules.plan.PlanResult; |
| 15 | +import com.bsth.service.schedule.rules.rerun.RerunRule_input; | |
| 15 | 16 | import com.bsth.service.schedule.rules.shiftloop.ScheduleCalcuParam_input; |
| 16 | 17 | import com.bsth.service.schedule.rules.shiftloop.ScheduleResults_output; |
| 17 | 18 | import com.bsth.service.schedule.rules.shiftloop.ScheduleRule_input; |
| ... | ... | @@ -101,7 +102,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im |
| 101 | 102 | // 执行完毕销毁,有日志的也要关闭 |
| 102 | 103 | session.dispose(); |
| 103 | 104 | |
| 104 | - logger.info("循环规则输出={}", scheduleResults_output.showGuideboardDesc1()); | |
| 105 | +// logger.info("循环规则输出={}", scheduleResults_output.showGuideboardDesc1()); | |
| 105 | 106 | |
| 106 | 107 | return scheduleResults_output; |
| 107 | 108 | } |
| ... | ... | @@ -258,6 +259,8 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im |
| 258 | 259 | PlanResult planResult = SchedulePlanWithOutRerun(schedulePlan); |
| 259 | 260 | |
| 260 | 261 | // TODO 3、确定套跑规则 |
| 262 | + List<RerunRule_input> rerunRule_inputs = scheduleRuleService.findRerunrule(schedulePlan.getXl().getId()); | |
| 263 | + logger.info("套跑数量 {} 组", rerunRule_inputs.size()); | |
| 261 | 264 | |
| 262 | 265 | // 4、保存数据(jdbcTemplate 批量插入) |
| 263 | 266 | Date start4 = new Date(); | ... | ... |
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
| ... | ... | @@ -98,10 +98,10 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im |
| 98 | 98 | public List<Map<String, Object>> findZdAndTcc(int lineid, int xldir) { |
| 99 | 99 | String sql = "select * from " + |
| 100 | 100 | "(" + |
| 101 | - "select station_code as zcode, station_name as zname from bsth_c_stationroute " + | |
| 101 | + "select station_code as zcode, station_name as zname, concat(station_name, '(站点)') as aname from bsth_c_stationroute " + | |
| 102 | 102 | "where destroy = 0 and line = ? and directions = ? " + |
| 103 | 103 | "union all " + |
| 104 | - "select park_code as zcode, park_name as zname from bsth_c_car_park " + | |
| 104 | + "select park_code as zcode, park_name as zname, concat(park_name, '(停车场)') as aname from bsth_c_car_park " + | |
| 105 | 105 | "where destroy = 0 " + |
| 106 | 106 | ") a "; |
| 107 | 107 | ... | ... |
src/main/java/com/bsth/service/schedule/rules/ScheduleRuleService.java
| ... | ... | @@ -3,6 +3,7 @@ package com.bsth.service.schedule.rules; |
| 3 | 3 | import com.bsth.entity.schedule.SchedulePlan; |
| 4 | 4 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 5 | 5 | import com.bsth.entity.schedule.temp.SchedulePlanRuleResult; |
| 6 | +import com.bsth.service.schedule.rules.rerun.RerunRule_input; | |
| 6 | 7 | |
| 7 | 8 | import java.util.Date; |
| 8 | 9 | import java.util.List; |
| ... | ... | @@ -42,5 +43,13 @@ public interface ScheduleRuleService { |
| 42 | 43 | * @param dateto 结束日期 |
| 43 | 44 | */ |
| 44 | 45 | void deelteSchedulePlanInfo(Integer xlid, Date datefrom, Date dateto); |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 查找线路的套跑规则,并封装成规则输入对象。 | |
| 49 | + * @param xlid | |
| 50 | + * @return | |
| 51 | + */ | |
| 52 | + List<RerunRule_input> findRerunrule(Integer xlid); | |
| 53 | + | |
| 45 | 54 | } |
| 46 | 55 | ... | ... |
src/main/java/com/bsth/service/schedule/rules/ScheduleRuleServiceImpl.java
| ... | ... | @@ -3,13 +3,11 @@ package com.bsth.service.schedule.rules; |
| 3 | 3 | import com.bsth.entity.schedule.SchedulePlan; |
| 4 | 4 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 5 | 5 | import com.bsth.entity.schedule.temp.SchedulePlanRuleResult; |
| 6 | +import com.bsth.service.schedule.rules.rerun.RerunRule_input; | |
| 6 | 7 | import org.slf4j.Logger; |
| 7 | 8 | import org.slf4j.LoggerFactory; |
| 8 | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| 9 | -import org.springframework.jdbc.core.BatchPreparedStatementSetter; | |
| 10 | -import org.springframework.jdbc.core.JdbcTemplate; | |
| 11 | -import org.springframework.jdbc.core.PreparedStatementCreator; | |
| 12 | -import org.springframework.jdbc.core.RowMapper; | |
| 10 | +import org.springframework.jdbc.core.*; | |
| 13 | 11 | import org.springframework.jdbc.support.GeneratedKeyHolder; |
| 14 | 12 | import org.springframework.jdbc.support.KeyHolder; |
| 15 | 13 | import org.springframework.stereotype.Service; |
| ... | ... | @@ -37,6 +35,75 @@ public class ScheduleRuleServiceImpl implements ScheduleRuleService { |
| 37 | 35 | private JdbcTemplate jdbcTemplate; |
| 38 | 36 | |
| 39 | 37 | @Override |
| 38 | + public List<RerunRule_input> findRerunrule(Integer xlid) { | |
| 39 | + String sql = "select " + | |
| 40 | + "rerun_type as type " + | |
| 41 | + ", rerun_xl as m_xl " + | |
| 42 | + ", rerun_ttinfo as m_ttinfo " + | |
| 43 | + ", rerun_lp as m_lp " + | |
| 44 | + ", rerun_ttinfodetail_fcsjs as m_fcsjs " + | |
| 45 | + ", use_xl as s_dylp_xl " + | |
| 46 | + ", use_lp as s_dylp_lp " + | |
| 47 | + ", cl as s_dybc_cl " + | |
| 48 | + ", cl_zbh as s_dybc_clzbh " + | |
| 49 | + ", j as s_dybc_j " + | |
| 50 | + ", j_gh as s_dybc_jgh " + | |
| 51 | + ", j_name as s_dybc_jname " + | |
| 52 | + ", s as s_dybc_s " + | |
| 53 | + ", s_gh as s_dybc_sgh " + | |
| 54 | + ", s_name as s_dybc_sname " + | |
| 55 | + "from bsth_c_s_rerun_rule " + | |
| 56 | + "where rerun_xl = ? "; | |
| 57 | + | |
| 58 | + final List<RerunRule_input> rerunRule_inputs = new ArrayList<>(); | |
| 59 | + | |
| 60 | + jdbcTemplate.query(sql, new Object[]{xlid}, new RowCallbackHandler() { | |
| 61 | + @Override | |
| 62 | + public void processRow(ResultSet resultSet) throws SQLException { | |
| 63 | + // 发车时间 | |
| 64 | + String[] fcsjs = resultSet.getString("m_fcsjs").split(","); | |
| 65 | + for (String fcsj: fcsjs) { | |
| 66 | + RerunRule_input rerunRule_input = new RerunRule_input(); | |
| 67 | + rerunRule_input.setXl(String.valueOf(resultSet.getInt("m_xl"))); | |
| 68 | + rerunRule_input.setTtinfo(String.valueOf(resultSet.getLong("m_ttinfo"))); | |
| 69 | + rerunRule_input.setLp(String.valueOf(resultSet.getLong("m_lp"))); | |
| 70 | + rerunRule_input.setFcsj(fcsj); | |
| 71 | + | |
| 72 | + rerunRule_input.setType(resultSet.getString("type")); | |
| 73 | + // 对应班次类型 | |
| 74 | + if ("dybc".equals(resultSet.getString("type"))) { | |
| 75 | + rerunRule_input.setS_xl(String.valueOf(resultSet.getInt("s_dylp_xl"))); | |
| 76 | + rerunRule_input.setS_lp(String.valueOf(resultSet.getLong("s_dylp_lp"))); | |
| 77 | + } else if ("dylp".equals(resultSet.getString("type"))) { | |
| 78 | + rerunRule_input.setCl(resultSet.getInt("s_dybc_cl")); | |
| 79 | + rerunRule_input.setZbh(resultSet.getString("s_dybc_clzbh")); | |
| 80 | + rerunRule_input.setJ(resultSet.getInt("s_dybc_j")); | |
| 81 | + rerunRule_input.setJgh(resultSet.getString("s_dybc_jgh")); | |
| 82 | + rerunRule_input.setJname(resultSet.getString("s_dybc_jname")); | |
| 83 | + rerunRule_input.setS(resultSet.getInt("s_dybc_s")); | |
| 84 | + rerunRule_input.setSgh(resultSet.getString("s_dybc_sgh")); | |
| 85 | + rerunRule_input.setSname(resultSet.getString("s_dybc_sname")); | |
| 86 | + } | |
| 87 | + | |
| 88 | + rerunRule_inputs.add(rerunRule_input); | |
| 89 | + } | |
| 90 | + | |
| 91 | + } | |
| 92 | + }); | |
| 93 | + | |
| 94 | + return rerunRule_inputs; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public void test() { | |
| 98 | + jdbcTemplate.query("", new RowCallbackHandler() { | |
| 99 | + @Override | |
| 100 | + public void processRow(ResultSet resultSet) throws SQLException { | |
| 101 | + | |
| 102 | + } | |
| 103 | + }); | |
| 104 | + } | |
| 105 | + | |
| 106 | + @Override | |
| 40 | 107 | public List<SchedulePlanRuleResult> findLastByXl(String xlid, Date from) { |
| 41 | 108 | String sql = "select * from bsth_c_s_sp_rule_rst a " + |
| 42 | 109 | "where exists (select 1 from " + | ... | ... |
src/main/java/com/bsth/service/schedule/rules/rerun/RerunRule_input.java
0 → 100644
| 1 | +package com.bsth.service.schedule.rules.rerun; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * Created by xu on 17/4/26. | |
| 5 | + */ | |
| 6 | +public class RerunRule_input { | |
| 7 | + private String xl; // 主线路Id | |
| 8 | + private String ttinfo; // 时刻表Id | |
| 9 | + private String lp; // 路牌 | |
| 10 | + private String fcsj; // 发车时间 | |
| 11 | + | |
| 12 | + private String type; // 套跑类型(dylp-对应路牌, dybc-对应班车) | |
| 13 | + private String s_xl; // 对应路牌,线路Id | |
| 14 | + private String s_lp; // 对应路牌,路牌Id | |
| 15 | + | |
| 16 | + private Integer cl; // 对应班车,车辆Id | |
| 17 | + private String zbh; // 对应班车,车辆自编号 | |
| 18 | + private Integer j; // 对应班车,驾驶员Id | |
| 19 | + private String jgh; // 对应班车,驾驶员工号 | |
| 20 | + private String jname; // 对应班车,驾驶员姓名 | |
| 21 | + private Integer s; // 对应班车,售票员Id | |
| 22 | + private String sgh; // 对应班车,售票员工号 | |
| 23 | + private String sname; // 对应班车,售票员姓名 | |
| 24 | + | |
| 25 | + public String getXl() { | |
| 26 | + return xl; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void setXl(String xl) { | |
| 30 | + this.xl = xl; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public String getTtinfo() { | |
| 34 | + return ttinfo; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public void setTtinfo(String ttinfo) { | |
| 38 | + this.ttinfo = ttinfo; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public String getLp() { | |
| 42 | + return lp; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public void setLp(String lp) { | |
| 46 | + this.lp = lp; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public String getFcsj() { | |
| 50 | + return fcsj; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public void setFcsj(String fcsj) { | |
| 54 | + this.fcsj = fcsj; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public String getType() { | |
| 58 | + return type; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public void setType(String type) { | |
| 62 | + this.type = type; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public String getS_xl() { | |
| 66 | + return s_xl; | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setS_xl(String s_xl) { | |
| 70 | + this.s_xl = s_xl; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public String getS_lp() { | |
| 74 | + return s_lp; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public void setS_lp(String s_lp) { | |
| 78 | + this.s_lp = s_lp; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public Integer getCl() { | |
| 82 | + return cl; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public void setCl(Integer cl) { | |
| 86 | + this.cl = cl; | |
| 87 | + } | |
| 88 | + | |
| 89 | + public String getZbh() { | |
| 90 | + return zbh; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public void setZbh(String zbh) { | |
| 94 | + this.zbh = zbh; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public Integer getJ() { | |
| 98 | + return j; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public void setJ(Integer j) { | |
| 102 | + this.j = j; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public String getJgh() { | |
| 106 | + return jgh; | |
| 107 | + } | |
| 108 | + | |
| 109 | + public void setJgh(String jgh) { | |
| 110 | + this.jgh = jgh; | |
| 111 | + } | |
| 112 | + | |
| 113 | + public String getJname() { | |
| 114 | + return jname; | |
| 115 | + } | |
| 116 | + | |
| 117 | + public void setJname(String jname) { | |
| 118 | + this.jname = jname; | |
| 119 | + } | |
| 120 | + | |
| 121 | + public Integer getS() { | |
| 122 | + return s; | |
| 123 | + } | |
| 124 | + | |
| 125 | + public void setS(Integer s) { | |
| 126 | + this.s = s; | |
| 127 | + } | |
| 128 | + | |
| 129 | + public String getSgh() { | |
| 130 | + return sgh; | |
| 131 | + } | |
| 132 | + | |
| 133 | + public void setSgh(String sgh) { | |
| 134 | + this.sgh = sgh; | |
| 135 | + } | |
| 136 | + | |
| 137 | + public String getSname() { | |
| 138 | + return sname; | |
| 139 | + } | |
| 140 | + | |
| 141 | + public void setSname(String sname) { | |
| 142 | + this.sname = sname; | |
| 143 | + } | |
| 144 | +} | ... | ... |
src/main/resources/application-dev.properties
| ... | ... | @@ -6,7 +6,7 @@ spring.jpa.hibernate.ddl-auto= update |
| 6 | 6 | spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy |
| 7 | 7 | #DATABASE |
| 8 | 8 | spring.jpa.database= MYSQL |
| 9 | -spring.jpa.show-sql= true | |
| 9 | +spring.jpa.show-sql= false | |
| 10 | 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 11 | 11 | spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 12 | 12 | spring.datasource.username= root | ... | ... |
src/main/resources/rules/shiftloop_fb_2.drl
| ... | ... | @@ -76,7 +76,7 @@ rule "calcu_days_1_" |
| 76 | 76 | |
| 77 | 77 | insert(cdrp); |
| 78 | 78 | |
| 79 | - log.info("总共需要排班的天数 sdays={} ruleId={} from={} to={}", (p2.getDays() + 1), $ruleId, $fromDate, $toDate); | |
| 79 | +// log.info("总共需要排班的天数 sdays={} ruleId={} from={} to={}", (p2.getDays() + 1), $ruleId, $fromDate, $toDate); | |
| 80 | 80 | |
| 81 | 81 | end |
| 82 | 82 | |
| ... | ... | @@ -108,7 +108,7 @@ rule "calcu_days_2_" |
| 108 | 108 | |
| 109 | 109 | insert(cdrp); |
| 110 | 110 | |
| 111 | - log.info("总共需要排班的天数 sdays={} ruleId={} from={} to={}", (p2.getDays() + 1), $ruleId, $qyrq, $toDate); | |
| 111 | +// log.info("总共需要排班的天数 sdays={} ruleId={} from={} to={}", (p2.getDays() + 1), $ruleId, $qyrq, $toDate); | |
| 112 | 112 | |
| 113 | 113 | end |
| 114 | 114 | |
| ... | ... | @@ -169,7 +169,7 @@ rule "calcu_days_1_with_result" |
| 169 | 169 | ) |
| 170 | 170 | then |
| 171 | 171 | // 修正排班数据 |
| 172 | - log.info("准备修正 ruleId={} historyDate={}", $ruleId, $scheduleDate); | |
| 172 | +// log.info("准备修正 ruleId={} historyDate={}", $ruleId, $scheduleDate); | |
| 173 | 173 | |
| 174 | 174 | $cdrp.setCalcu_index_lp(Integer.valueOf($self.getGidindex())); |
| 175 | 175 | $cdrp.setCalcu_index_ry(Integer.valueOf($self.getEcindex())); |
| ... | ... | @@ -211,8 +211,8 @@ rule "Calcu_loop1_1_" // 路牌在时刻表中存在,就翻 |
| 211 | 211 | $cdrp.setCalcu_index_ry(($ryindex + 1) % $ryrangesize); |
| 212 | 212 | $cdrp.setCalcu_start_date_1($csd1.plusDays(1)); |
| 213 | 213 | |
| 214 | - log.info("Calcu_loop1_1_ ruleId={}, calcu_index_lp/ry={}/{}", | |
| 215 | - $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry()); | |
| 214 | +// log.info("Calcu_loop1_1_ ruleId={}, calcu_index_lp/ry={}/{}", | |
| 215 | +// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry()); | |
| 216 | 216 | |
| 217 | 217 | update($cdrp); |
| 218 | 218 | end |
| ... | ... | @@ -233,8 +233,8 @@ rule "Calcu_loop1_2_" // 路牌在时刻表中不存在,就不翻 |
| 233 | 233 | then |
| 234 | 234 | $cdrp.setCalcu_start_date_1($csd1.plusDays(1)); |
| 235 | 235 | |
| 236 | - log.info("Calcu_loop1_2_ ruleId={}, calcu_index_lp/ry={}/{}", | |
| 237 | - $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry()); | |
| 236 | +// log.info("Calcu_loop1_2_ ruleId={}, calcu_index_lp/ry={}/{}", | |
| 237 | +// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry()); | |
| 238 | 238 | |
| 239 | 239 | update($cdrp); |
| 240 | 240 | end |
| ... | ... | @@ -304,8 +304,8 @@ rule "Calcu_loop2_1_" // 路牌在时刻表中存在,就翻 |
| 304 | 304 | scheduleResult.getSchedulePlanRuleResults().add(schedulePlanRuleResult); |
| 305 | 305 | |
| 306 | 306 | |
| 307 | - log.info("Calcu_loop2_1_ ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}", | |
| 308 | - $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2); | |
| 307 | +// log.info("Calcu_loop2_1_ ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}", | |
| 308 | +// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2); | |
| 309 | 309 | |
| 310 | 310 | update($cdrp); |
| 311 | 311 | end |
| ... | ... | @@ -359,8 +359,8 @@ rule "Calcu_loop2_2_" // 路牌在时刻表中不存在,就不翻 |
| 359 | 359 | // |
| 360 | 360 | // scheduleResult.getSchedulePlanRuleResults().add(schedulePlanRuleResult); |
| 361 | 361 | |
| 362 | - log.info("Calcu_loop2_2_ ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}", | |
| 363 | - $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2); | |
| 362 | +// log.info("Calcu_loop2_2_ ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}", | |
| 363 | +// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2); | |
| 364 | 364 | |
| 365 | 365 | update($cdrp); |
| 366 | 366 | end | ... | ... |
src/main/resources/rules/ttinfo.drl
| ... | ... | @@ -82,7 +82,7 @@ rule "calcu_days" |
| 82 | 82 | cdr.setCalcu_end_date(($toDate)); |
| 83 | 83 | cdr.setXlId($xlId); |
| 84 | 84 | |
| 85 | - log.info("总共需要计算的天数 calcu_days={} 之后的计算从第1天开始 ", p.getDays() + 1); | |
| 85 | +// log.info("总共需要计算的天数 calcu_days={} 之后的计算从第1天开始 ", p.getDays() + 1); | |
| 86 | 86 | |
| 87 | 87 | insert(cdr); // 插入fact数据,进入下一个阶段 |
| 88 | 88 | end |
| ... | ... | @@ -107,7 +107,7 @@ rule "calcu_ttinfo_enable" |
| 107 | 107 | cter.setTtInfo_input_list($ttInfo_input_list); |
| 108 | 108 | cter.setCalcu_date($calcu_date); |
| 109 | 109 | |
| 110 | - log.info("启用的时刻表:xlId={} 时刻表个数={}", $xlId, $ttInfo_input_list.size()); | |
| 110 | +// log.info("启用的时刻表:xlId={} 时刻表个数={}", $xlId, $ttInfo_input_list.size()); | |
| 111 | 111 | |
| 112 | 112 | insert (cter); |
| 113 | 113 | |
| ... | ... | @@ -130,7 +130,7 @@ rule "calcu_ttinfo_special_day" // 特殊日期匹配 |
| 130 | 130 | $calcu_days_result.setCalcu_date(new_calcu_date); |
| 131 | 131 | $calcu_days_result.setCalcu_weekday(new_calcu_date.getDayOfWeek()); |
| 132 | 132 | |
| 133 | - log.info("启用特殊日期时刻表:xlId={} 时刻表个数={} 特殊日期={}", $xlId, $ttinfolist.size(), $calcu_date); | |
| 133 | +// log.info("启用特殊日期时刻表:xlId={} 时刻表个数={} 特殊日期={}", $xlId, $ttinfolist.size(), $calcu_date); | |
| 134 | 134 | |
| 135 | 135 | // $ttinfolist按时间倒排序,result输出 |
| 136 | 136 | Collections.sort($ttinfolist); |
| ... | ... | @@ -161,7 +161,7 @@ rule "calcu_ttinfo_normal_day" // 平日匹配 |
| 161 | 161 | $calcu_days_result.setCalcu_date(new_calcu_date); |
| 162 | 162 | $calcu_days_result.setCalcu_weekday(new_calcu_date.getDayOfWeek()); |
| 163 | 163 | |
| 164 | - log.info("启用常规日期时刻表:xlId={} 时刻表个数={} 常规日期={} 星期几={} 路牌size={}", $xlId, $ttinfolist.size(), $calcu_date, $calcu_weekday, $lpInfoResults.size()); | |
| 164 | +// log.info("启用常规日期时刻表:xlId={} 时刻表个数={} 常规日期={} 星期几={} 路牌size={}", $xlId, $ttinfolist.size(), $calcu_date, $calcu_weekday, $lpInfoResults.size()); | |
| 165 | 165 | |
| 166 | 166 | // $ttinfolist按时间倒排序,result输出 |
| 167 | 167 | Collections.sort($ttinfolist); |
| ... | ... | @@ -192,7 +192,7 @@ rule "calcu_ttinfo_other_day" // 都没有的情况下,匹配 |
| 192 | 192 | $calcu_days_result.setCalcu_date(new_calcu_date); |
| 193 | 193 | $calcu_days_result.setCalcu_weekday(new_calcu_date.getDayOfWeek()); |
| 194 | 194 | |
| 195 | - log.info("启用默认日期时刻表:xlId={} 时刻表个数={} 常规日期={} 星期几={}", $xlId, $ttinfolist.size(), $calcu_date, $calcu_weekday); | |
| 195 | +// log.info("启用默认日期时刻表:xlId={} 时刻表个数={} 常规日期={} 星期几={}", $xlId, $ttinfolist.size(), $calcu_date, $calcu_weekday); | |
| 196 | 196 | |
| 197 | 197 | // $ttinfolist按时间倒排序,result输出 |
| 198 | 198 | Collections.sort($ttinfolist); | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/edit.html
| ... | ... | @@ -181,7 +181,7 @@ |
| 181 | 181 | <div class="col-md-3"> |
| 182 | 182 | <sa-Select5 name="useCarConfig" |
| 183 | 183 | model="ctrl.rerunManageForSave" |
| 184 | - cmaps="{'useCarConfig.id' : 'id'}" | |
| 184 | + cmaps="{'useCarConfig.id' : 'id', 'cl': 'cl.id', 'clZbh': 'cl.insideCode'}" | |
| 185 | 185 | dcname="useCarConfig.id" |
| 186 | 186 | icname="id" |
| 187 | 187 | dsparams="{{ {type: 'ajax', param:{'type': 'all', 'isCancel_eq': false}, atype:'cci2' } | json }}" |
| ... | ... | @@ -203,7 +203,7 @@ |
| 203 | 203 | <div class="col-md-5"> |
| 204 | 204 | <sa-Select5 name="useEmployeeConfig" |
| 205 | 205 | model="ctrl.rerunManageForSave" |
| 206 | - cmaps="{'useEmployeeConfig.id' : 'id'}" | |
| 206 | + cmaps="{'useEmployeeConfig.id' : 'id', 'j': 'jsy.id', 'jGh': 'jsy.jobCode', 'jName': 'jsy.personnelName', 's': 'spy.id', 'sGh': 'spy.jobCode', 'sName': 'spy.personnelName'}" | |
| 207 | 207 | dcname="useEmployeeConfig.id" |
| 208 | 208 | icname="id" |
| 209 | 209 | dsparams="{{ {type: 'ajax', param:{'type': 'all', 'isCancel_eq': false}, atype:'eci3' } | json }}" | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/form.html
| ... | ... | @@ -181,7 +181,7 @@ |
| 181 | 181 | <div class="col-md-3"> |
| 182 | 182 | <sa-Select5 name="useCarConfig" |
| 183 | 183 | model="ctrl.rerunManageForSave" |
| 184 | - cmaps="{'useCarConfig.id' : 'id'}" | |
| 184 | + cmaps="{'useCarConfig.id' : 'id', 'cl': 'cl.id', 'clZbh': 'cl.insideCode'}" | |
| 185 | 185 | dcname="useCarConfig.id" |
| 186 | 186 | icname="id" |
| 187 | 187 | dsparams="{{ {type: 'ajax', param:{'type': 'all', 'isCancel_eq': false}, atype:'cci2' } | json }}" |
| ... | ... | @@ -203,7 +203,7 @@ |
| 203 | 203 | <div class="col-md-5"> |
| 204 | 204 | <sa-Select5 name="useEmployeeConfig" |
| 205 | 205 | model="ctrl.rerunManageForSave" |
| 206 | - cmaps="{'useEmployeeConfig.id' : 'id'}" | |
| 206 | + cmaps="{'useEmployeeConfig.id' : 'id', 'j': 'jsy.id', 'jGh': 'jsy.jobCode', 'jName': 'jsy.personnelName', 's': 'spy.id', 'sGh': 'spy.jobCode', 'sName': 'spy.personnelName'}" | |
| 207 | 207 | dcname="useEmployeeConfig.id" |
| 208 | 208 | icname="id" |
| 209 | 209 | dsparams="{{ {type: 'ajax', param:{'type': 'all', 'isCancel_eq': false}, atype:'eci3' } | json }}" | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail.html
| ... | ... | @@ -95,9 +95,9 @@ |
| 95 | 95 | icname="zcode" |
| 96 | 96 | dsparams="{{ {type: 'ajax', param:{'lineid': ctrl.TimeTableDetailForSave.xl.id, 'xldir': ctrl.TimeTableDetailForSave.xlDir}, atype:'zd_tcc' } | json }}" |
| 97 | 97 | iterobjname="item" |
| 98 | - iterobjexp="item.zname" | |
| 98 | + iterobjexp="item.aname" | |
| 99 | 99 | searchph="请输拼音..." |
| 100 | - searchexp="this.zname" | |
| 100 | + searchexp="this.aname" | |
| 101 | 101 | required > |
| 102 | 102 | </sa-Select5> |
| 103 | 103 | </div> |
| ... | ... | @@ -116,9 +116,9 @@ |
| 116 | 116 | icname="zcode" |
| 117 | 117 | dsparams="{{ {type: 'ajax', param:{'lineid': ctrl.TimeTableDetailForSave.xl.id, 'xldir': ctrl.TimeTableDetailForSave.xlDir}, atype:'zd_tcc' } | json }}" |
| 118 | 118 | iterobjname="item" |
| 119 | - iterobjexp="item.zname" | |
| 119 | + iterobjexp="item.aname" | |
| 120 | 120 | searchph="请输拼音..." |
| 121 | - searchexp="this.zname" | |
| 121 | + searchexp="this.aname" | |
| 122 | 122 | required > |
| 123 | 123 | </sa-Select5> |
| 124 | 124 | </div> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail2.html
| ... | ... | @@ -76,9 +76,9 @@ |
| 76 | 76 | icname="zcode" |
| 77 | 77 | dsparams="{{ {type: 'ajax', param:{'lineid': ctrl.xlid, 'xldir': ctrl.tt.xlDir}, atype:'zd_tcc' } | json }}" |
| 78 | 78 | iterobjname="item" |
| 79 | - iterobjexp="item.zname" | |
| 79 | + iterobjexp="item.aname" | |
| 80 | 80 | searchph="请输拼音..." |
| 81 | - searchexp="this.zname" | |
| 81 | + searchexp="this.aname" | |
| 82 | 82 | required > |
| 83 | 83 | </sa-Select5> |
| 84 | 84 | </div> |
| ... | ... | @@ -93,9 +93,9 @@ |
| 93 | 93 | icname="zcode" |
| 94 | 94 | dsparams="{{ {type: 'ajax', param:{'lineid': ctrl.xlid, 'xldir': ctrl.tt.xlDir}, atype:'zd_tcc' } | json }}" |
| 95 | 95 | iterobjname="item" |
| 96 | - iterobjexp="item.zname" | |
| 96 | + iterobjexp="item.aname" | |
| 97 | 97 | searchph="请输拼音..." |
| 98 | - searchexp="this.zname" | |
| 98 | + searchexp="this.aname" | |
| 99 | 99 | required > |
| 100 | 100 | </sa-Select5> |
| 101 | 101 | </div> | ... | ... |