Commit eaa0dfe3a4c67031f15da213bab7e34569340d6e
Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing
12 changed files
with
166 additions
and
76 deletions
src/main/java/com/bsth/entity/oil/Ylxxb.java
| ... | ... | @@ -35,11 +35,11 @@ public class Ylxxb { |
| 35 | 35 | private Date xgrq; |
| 36 | 36 | private String xgr; |
| 37 | 37 | private String fromgsdm; |
| 38 | - private int nylx; | |
| 38 | + private Integer nylx; | |
| 39 | 39 | @Transient |
| 40 | 40 | private String ldgh; |
| 41 | 41 | //0为接口数据,1为手工输入 |
| 42 | - private int jylx=0; | |
| 42 | + private Integer jylx=0; | |
| 43 | 43 | @Transient |
| 44 | 44 | private String gsname; |
| 45 | 45 | @Transient | ... | ... |
src/main/java/com/bsth/repository/oil/YlxxbRepository.java
| ... | ... | @@ -27,4 +27,12 @@ public interface YlxxbRepository extends BaseRepository<Ylxxb, Integer>{ |
| 27 | 27 | @Query(value="SELECT * FROM bsth_c_ylxxb where to_days(?1)=to_days(yyrq) and nbbm =?2 and jylx=1",nativeQuery=true) |
| 28 | 28 | List<Ylxxb> obtainYlxx2(String rq,String nbbm); |
| 29 | 29 | |
| 30 | + @Transactional | |
| 31 | + @Modifying | |
| 32 | + @Query(value="select * from bsth_c_ylxxb s where s.nbbm = ?1 and " | |
| 33 | + + "to_days(s.yyrq) = to_days(?2)",nativeQuery=true) | |
| 34 | + List<Ylxxb> queryListYlxxb(String clZbh,String date); | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 30 | 38 | } | ... | ... |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| ... | ... | @@ -39,12 +39,12 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI |
| 39 | 39 | + " s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 group by clZbh,jGh,jName") |
| 40 | 40 | List<Map<String, Object>> dailyInfo(String line,String date); |
| 41 | 41 | |
| 42 | - @Query(value="select t.car_code,d.sender,d.txt_content,d.timestamp,0 as xlbm from (" | |
| 43 | - + " select equipment_code,car_code from bsth_c_cars where id in(" | |
| 42 | + @Query(value="select t.inside_code,d.sender,d.txt_content,d.timestamp,0 as xlbm from (" | |
| 43 | + + " select equipment_code,inside_code from bsth_c_cars where id in(" | |
| 44 | 44 | + " select cl from bsth_c_s_ccinfo where xl in ( " |
| 45 | 45 | + " select id from bsth_c_line where line_code=?1 ))) t" |
| 46 | 46 | + " left join bsth_v_directive_60 d on t.equipment_code=d.device_id " |
| 47 | - + " where d.timestamp >=?2 and d.timestamp <=?3 and t.car_code like %?4% ",nativeQuery=true) | |
| 47 | + + " where d.timestamp >=?2 and d.timestamp <=?3 and t.inside_code like %?4% ",nativeQuery=true) | |
| 48 | 48 | List<Object[]> historyMessage(String line,long d,long t,String code); |
| 49 | 49 | |
| 50 | 50 | @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,count(*) as cs " |
| ... | ... | @@ -74,7 +74,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI |
| 74 | 74 | @Query(value="select count(jName) from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 and sflj != 0") |
| 75 | 75 | int findLjbc(String jName,String clZbh,String lpName); |
| 76 | 76 | |
| 77 | - @Query(value="SELECT c.company,r.request_code,FROM_UNIXTIME(r.timestamp/1000,'%Y-%m-%d %T'),c.inside_code FROM bsth_v_report_80 r LEFT JOIN bsth_c_cars c ON c.equipment_code = r.device_id where FROM_UNIXTIME(r.timestamp/1000,'%Y-%m-%d') = ?2 and r.line_id = ?1 and c.inside_code = ?3",nativeQuery=true) | |
| 77 | + @Query(value="SELECT c.company,r.request_code,FROM_UNIXTIME(r.timestamp/1000,'%Y-%m-%d %T'),c.inside_code FROM bsth_v_report_80 r LEFT JOIN bsth_c_cars c ON c.equipment_code = r.device_id where FROM_UNIXTIME(r.timestamp/1000,'%Y-%m-%d') = ?2 and r.line_id = ?1 and c.inside_code like %?3%",nativeQuery=true) | |
| 78 | 78 | List<Object[]> account(String line,String date,String code); |
| 79 | 79 | |
| 80 | 80 | @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDate >= str_to_date(?2,'%Y-%m-%d') " | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -15,6 +15,7 @@ import com.bsth.data.schedule.ScheduleComparator; |
| 15 | 15 | import com.bsth.entity.Cars; |
| 16 | 16 | import com.bsth.entity.Line; |
| 17 | 17 | import com.bsth.entity.Personnel; |
| 18 | +import com.bsth.entity.oil.Ylxxb; | |
| 18 | 19 | import com.bsth.entity.realcontrol.ChildTaskPlan; |
| 19 | 20 | import com.bsth.entity.realcontrol.LineConfig; |
| 20 | 21 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| ... | ... | @@ -25,6 +26,7 @@ import com.bsth.entity.schedule.GuideboardInfo; |
| 25 | 26 | import com.bsth.entity.sys.DutyEmployee; |
| 26 | 27 | import com.bsth.entity.sys.SysUser; |
| 27 | 28 | import com.bsth.repository.LineRepository; |
| 29 | +import com.bsth.repository.oil.YlxxbRepository; | |
| 28 | 30 | import com.bsth.repository.realcontrol.ChildTaskPlanRepository; |
| 29 | 31 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 30 | 32 | import com.bsth.repository.realcontrol.SvgAttributeRepository; |
| ... | ... | @@ -99,6 +101,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 99 | 101 | |
| 100 | 102 | @Autowired |
| 101 | 103 | DutyEmployeeService dutyEmployeeService; |
| 104 | + | |
| 105 | + @Autowired | |
| 106 | + YlxxbRepository ylxxbRepository; | |
| 102 | 107 | |
| 103 | 108 | Logger logger = LoggerFactory.getLogger(this.getClass()); |
| 104 | 109 | |
| ... | ... | @@ -502,6 +507,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 502 | 507 | |
| 503 | 508 | map = new HashMap<String, Object>(); |
| 504 | 509 | try { |
| 510 | + scheduleRealInfo.setjName(scheduleRealInfo.getjGh()+scheduleRealInfo.getjName()); | |
| 511 | + scheduleRealInfo.setsName(scheduleRealInfo.getsGh()+scheduleRealInfo.getsName()); | |
| 505 | 512 | map = rru.getMapValue(scheduleRealInfo); |
| 506 | 513 | String zdsj = scheduleRealInfo.getZdsj(); |
| 507 | 514 | String zdsjActual = scheduleRealInfo.getZdsjActual(); |
| ... | ... | @@ -2433,6 +2440,25 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2433 | 2440 | try { |
| 2434 | 2441 | scheduleRealInfo.setBcs(xyz); |
| 2435 | 2442 | xyz++; |
| 2443 | + Set<ChildTaskPlan> cs = scheduleRealInfo.getcTasks(); | |
| 2444 | + Double sjlc=0.0; | |
| 2445 | + if(!cs.isEmpty()){ | |
| 2446 | + Iterator<ChildTaskPlan> it = cs.iterator(); | |
| 2447 | + while(it.hasNext()){ | |
| 2448 | + ChildTaskPlan c = it.next(); | |
| 2449 | + if(!c.isDestroy()){ | |
| 2450 | + sjlc += c.getMileage()==null?0:c.getMileage(); | |
| 2451 | + } | |
| 2452 | + | |
| 2453 | + } | |
| 2454 | + }else{ | |
| 2455 | + if(scheduleRealInfo.getStatus() != -1){ | |
| 2456 | + sjlc =scheduleRealInfo.getJhlc(); | |
| 2457 | + } | |
| 2458 | + } | |
| 2459 | + scheduleRealInfo.setjName(scheduleRealInfo.getjGh()+scheduleRealInfo.getjName()); | |
| 2460 | + scheduleRealInfo.setsName(scheduleRealInfo.getsGh()+scheduleRealInfo.getsName()); | |
| 2461 | + scheduleRealInfo.setSjlc(format.format(sjlc)); | |
| 2436 | 2462 | map = rru.getMapValue(scheduleRealInfo); |
| 2437 | 2463 | String zdsj = scheduleRealInfo.getZdsj(); |
| 2438 | 2464 | String zdsjActual = scheduleRealInfo.getZdsjActual(); |
| ... | ... | @@ -2457,8 +2483,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2457 | 2483 | } |
| 2458 | 2484 | } |
| 2459 | 2485 | |
| 2486 | + | |
| 2487 | + List<Ylxxb> listYlxxb=ylxxbRepository.queryListYlxxb( clZbh, date); | |
| 2488 | + Double jzl=0.0; | |
| 2489 | + for(int t=0;t<listYlxxb.size();t++){ | |
| 2490 | + Ylxxb y=listYlxxb.get(t); | |
| 2491 | + jzl += y.getJzl(); | |
| 2492 | + } | |
| 2493 | + | |
| 2460 | 2494 | //计算里程和班次数,并放入Map里 |
| 2461 | 2495 | map = new HashMap<String, Object>(); |
| 2496 | + map.put("jzl", jzl); | |
| 2462 | 2497 | map.put("jhlc", format.format(jhlc+jcclc)); |
| 2463 | 2498 | map.put("yygljh", format.format(jhlc)); |
| 2464 | 2499 | map.put("ssgl", format.format(remMileage)); |
| ... | ... | @@ -2632,7 +2667,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2632 | 2667 | while(it.hasNext()){ |
| 2633 | 2668 | ChildTaskPlan c = it.next(); |
| 2634 | 2669 | if(c.getRemarks()!=null && c.getRemarks().length()>0){ |
| 2635 | - remarks += c.getRemarks(); | |
| 2670 | + if(remarks.indexOf(c.getRemarks())==-1){ | |
| 2671 | + remarks += c.getRemarks(); | |
| 2672 | + } | |
| 2636 | 2673 | } |
| 2637 | 2674 | |
| 2638 | 2675 | if(!c.isDestroy()){ |
| ... | ... | @@ -2664,7 +2701,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2664 | 2701 | String xlbm=s.getXlBm(); |
| 2665 | 2702 | String fcrq=s.getScheduleDateStr(); |
| 2666 | 2703 | |
| 2667 | - | |
| 2704 | + List<Ylxxb> listYlxxb=ylxxbRepository.queryListYlxxb( s.getClZbh(), fcrq); | |
| 2705 | + Double jzl=0.0; | |
| 2706 | + for(int t=0;t<listYlxxb.size();t++){ | |
| 2707 | + Ylxxb y=listYlxxb.get(t); | |
| 2708 | + jzl += y.getJzl(); | |
| 2709 | + } | |
| 2710 | + map.put("jzl", jzl); | |
| 2668 | 2711 | map.put("xlName", s.getXlName()); |
| 2669 | 2712 | map.put("clZbh", s.getClZbh()); |
| 2670 | 2713 | map.put("fcsjActual", s.getFcsjActual()); | ... | ... |
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
| ... | ... | @@ -280,7 +280,7 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im |
| 280 | 280 | FcInfo fcInfo = new FcInfo(ttdid_str, bctype, fcsj, xldir, isfb); |
| 281 | 281 | |
| 282 | 282 | if (StringUtils.isNotEmpty(fzdname)) |
| 283 | - headarrays[c + 1] = fzdname; | |
| 283 | + headarrays[c] = fzdname; | |
| 284 | 284 | fcInfos.add(fcInfo); |
| 285 | 285 | |
| 286 | 286 | ... | ... |
src/main/resources/static/pages/forms/mould/waybill_qingpu.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| ... | ... | @@ -158,31 +158,31 @@ |
| 158 | 158 | <td colspan="40"> </td> |
| 159 | 159 | </tr> --> |
| 160 | 160 | <tr> |
| 161 | - <td colspan="2">班序</td> | |
| 161 | + <td colspan="2">路牌</td> | |
| 162 | 162 | <td colspan="2">车号</td> |
| 163 | 163 | <td>司早</td> |
| 164 | 164 | <td>售早</td> |
| 165 | 165 | <td>司晚</td> |
| 166 | 166 | <td>售晚</td> |
| 167 | - <td colspan="2">班序</td> | |
| 167 | + <td colspan="2">路牌</td> | |
| 168 | 168 | <td colspan="2">车号</td> |
| 169 | 169 | <td>司早</td> |
| 170 | 170 | <td>售早</td> |
| 171 | 171 | <td>司晚</td> |
| 172 | 172 | <td>售晚</td> |
| 173 | - <td colspan="2">班序</td> | |
| 173 | + <td colspan="2">路牌</td> | |
| 174 | 174 | <td colspan="2">车号</td> |
| 175 | 175 | <td>司早</td> |
| 176 | 176 | <td>售早</td> |
| 177 | 177 | <td>司晚</td> |
| 178 | 178 | <td>售晚</td> |
| 179 | - <td colspan="2">班序</td> | |
| 179 | + <td colspan="2">路牌</td> | |
| 180 | 180 | <td colspan="2">车号</td> |
| 181 | 181 | <td>司早</td> |
| 182 | 182 | <td>售早</td> |
| 183 | 183 | <td>司晚</td> |
| 184 | 184 | <td>售晚</td> |
| 185 | - <td colspan="2">班序</td> | |
| 185 | + <td colspan="2">路牌</td> | |
| 186 | 186 | <td colspan="2">车号</td> |
| 187 | 187 | <td>司早</td> |
| 188 | 188 | <td>售早</td> | ... | ... |
src/main/resources/static/pages/forms/statement/waybill.html
| ... | ... | @@ -307,8 +307,8 @@ |
| 307 | 307 | {{each list as obj i}} |
| 308 | 308 | <tr> |
| 309 | 309 | <td>{{i+1}}</td> |
| 310 | - <td>{{obj.jName}}</td> | |
| 311 | - <td>{{obj.sName}}</td> | |
| 310 | + <td>{{obj.jGh}}{{obj.jName}}</td> | |
| 311 | + <td>{{obj.sGh}}{{obj.sName}}</td> | |
| 312 | 312 | <td> </td> |
| 313 | 313 | <td>{{obj.qdzName}}</td> |
| 314 | 314 | <td>{{obj.zdzName}}</td> | ... | ... |
src/main/resources/static/pages/forms/statement/waybillQp.html
| ... | ... | @@ -252,7 +252,7 @@ |
| 252 | 252 | </tr> |
| 253 | 253 | <tr> |
| 254 | 254 | <td colspan="2">出场存油 升</td> |
| 255 | - <td colspan="3">加注油量 升</td> | |
| 255 | + <td colspan="3">加注油量 {{map.jzl}}升</td> | |
| 256 | 256 | <td colspan="2">进场存油 升</td> |
| 257 | 257 | <td colspan="4">加注机油 升</td> |
| 258 | 258 | <td colspan="5">本日耗油 升</td> |
| ... | ... | @@ -298,8 +298,8 @@ |
| 298 | 298 | <tr> |
| 299 | 299 | <td>{{i+1}}</td> |
| 300 | 300 | <td>{{obj.lpName}}</td> |
| 301 | - <td>{{obj.jName}}</td> | |
| 302 | - <td>{{obj.sName}}</td> | |
| 301 | + <td>{{obj.jGh}}{{obj.jName}}</td> | |
| 302 | + <td>{{obj.sGh}}{{obj.sName}}</td> | |
| 303 | 303 | <td> </td> |
| 304 | 304 | <td>{{obj.qdzName}}</td> |
| 305 | 305 | <td>{{obj.zdzName}}</td> |
| ... | ... | @@ -350,8 +350,8 @@ |
| 350 | 350 | <td>{{map.ljgl}}</td> |
| 351 | 351 | <td colspan="2">损失班次</td> |
| 352 | 352 | <td colspan="1">{{map.ssbc}}</td> |
| 353 | - <td colspan="3">运送公里</td> | |
| 354 | - <td colspan="2">{{map.ysgl}}</td> | |
| 353 | + <td colspan="3"></td> | |
| 354 | + <td colspan="2"></td> | |
| 355 | 355 | </tr> |
| 356 | 356 | <tr> |
| 357 | 357 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail.html
| ... | ... | @@ -229,9 +229,12 @@ |
| 229 | 229 | <input type="text" class="form-control" name="fcsj" |
| 230 | 230 | ng-model="ctrl.TimeTableDetailForSave.fcsj" |
| 231 | 231 | ng-pattern="ctrl.time_regex" |
| 232 | - /> | |
| 232 | + required /> | |
| 233 | 233 | </div> |
| 234 | 234 | <!-- 隐藏块,显示验证信息 --> |
| 235 | + <div class="alert alert-danger well-sm" ng-show="myForm.fcsj.$error.required"> | |
| 236 | + 发车时间必须填写 | |
| 237 | + </div> | |
| 235 | 238 | <div class="alert alert-danger well-sm" ng-show="myForm.fcsj.$error.pattern"> |
| 236 | 239 | 时间格式错误,应该是格式hh:mm,如:06:39 |
| 237 | 240 | </div> |
| ... | ... | @@ -289,7 +292,7 @@ |
| 289 | 292 | dsparams="{{ {type: 'dic', param: 'ScheduleType' } | json }}" |
| 290 | 293 | iterobjname="item" |
| 291 | 294 | iterobjexp="item.name" |
| 292 | - searchph="请选择营运状态..." | |
| 295 | + searchph="请选择班次类型..." | |
| 293 | 296 | searchexp="this.name" |
| 294 | 297 | required |
| 295 | 298 | > | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail2.html
| ... | ... | @@ -39,106 +39,123 @@ |
| 39 | 39 | <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> |
| 40 | 40 | <div class="form-body"> |
| 41 | 41 | |
| 42 | - <div class="form-group has-success has-feedback"> | |
| 42 | + <div class="form-group"> | |
| 43 | 43 | <label class="col-md-3 control-label">方向:</label> |
| 44 | - <div class="col-md-7"> | |
| 44 | + <div class="col-md-5"> | |
| 45 | 45 | <sa-Radiogroup model="ctrl.TimeTableDetailForSave.xlDir" dicgroup="LineTrend" name="xlDir"></sa-Radiogroup> |
| 46 | 46 | </div> |
| 47 | 47 | |
| 48 | 48 | </div> |
| 49 | 49 | <div class="form-group"> |
| 50 | 50 | <label class="col-md-3 control-label">起点站:</label> |
| 51 | - <div class="col-md-7"> | |
| 52 | - <sa-Select3 model="ctrl.TimeTableDetailForSave" | |
| 53 | - name="qdz" | |
| 54 | - placeholder="请输拼音..." | |
| 55 | - dcvalue="{{ctrl.TimeTableDetailForSave.qdz.id}}" | |
| 51 | + <div class="col-md-5"> | |
| 52 | + <sa-Select5 name="qdz" | |
| 53 | + model="ctrl.TimeTableDetailForSave" | |
| 54 | + cmaps="{'qdz.id' : 'stationid'}" | |
| 56 | 55 | dcname="qdz.id" |
| 57 | 56 | icname="stationid" |
| 58 | - icnames="stationname" | |
| 59 | - datatype="zd" | |
| 60 | - dataassociate="true" | |
| 61 | - dataparam="{{ {'xlid': ctrl.xlid, 'xldir': ctrl.TimeTableDetailForSave.xlDir} | json }}" | |
| 62 | - mlp="true" | |
| 63 | - > | |
| 64 | - </sa-Select3> | |
| 57 | + dsparams="{{ {type: 'ajax', param:{'xlid': ctrl.xlid, 'xldir': ctrl.TimeTableDetailForSave.xlDir}, atype:'zd' } | json }}" | |
| 58 | + iterobjname="item" | |
| 59 | + iterobjexp="item.stationname" | |
| 60 | + searchph="请输拼音..." | |
| 61 | + searchexp="this.stationname" | |
| 62 | + required > | |
| 63 | + </sa-Select5> | |
| 65 | 64 | </div> |
| 66 | 65 | </div> |
| 67 | 66 | <div class="form-group"> |
| 68 | 67 | <label class="col-md-3 control-label">终点站:</label> |
| 69 | - <div class="col-md-7"> | |
| 70 | - <sa-Select3 model="ctrl.TimeTableDetailForSave" | |
| 71 | - name="zdz" | |
| 72 | - placeholder="请输拼音..." | |
| 73 | - dcvalue="{{ctrl.TimeTableDetailForSave.zdz.id}}" | |
| 68 | + <div class="col-md-5"> | |
| 69 | + <sa-Select5 name="zdz" | |
| 70 | + model="ctrl.TimeTableDetailForSave" | |
| 71 | + cmaps="{'zdz.id' : 'stationid'}" | |
| 74 | 72 | dcname="zdz.id" |
| 75 | 73 | icname="stationid" |
| 76 | - icnames="stationname" | |
| 77 | - datatype="zd" | |
| 78 | - dataassociate="true" | |
| 79 | - dataparam="{{ {'xlid': ctrl.xlid, 'xldir': ctrl.TimeTableDetailForSave.xlDir} | json }}" | |
| 80 | - mlp="true" | |
| 81 | - > | |
| 82 | - </sa-Select3> | |
| 74 | + dsparams="{{ {type: 'ajax', param:{'xlid': ctrl.xlid, 'xldir': ctrl.TimeTableDetailForSave.xlDir}, atype:'zd' } | json }}" | |
| 75 | + iterobjname="item" | |
| 76 | + iterobjexp="item.stationname" | |
| 77 | + searchph="请输拼音..." | |
| 78 | + searchexp="this.stationname" | |
| 79 | + required > | |
| 80 | + </sa-Select5> | |
| 83 | 81 | </div> |
| 84 | 82 | </div> |
| 85 | 83 | <div class="form-group"> |
| 86 | 84 | <label class="col-md-3 control-label">停车场:</label> |
| 87 | - <div class="col-md-7"> | |
| 88 | - <sa-Select3 model="ctrl.TimeTableDetailForSave" | |
| 89 | - name="tcc" | |
| 90 | - placeholder="请输拼音..." | |
| 91 | - dcvalue="{{ctrl.TimeTableDetailForSave.tcc.id}}" | |
| 85 | + <div class="col-md-5"> | |
| 86 | + <sa-Select5 name="tcc" | |
| 87 | + model="ctrl.TimeTableDetailForSave" | |
| 88 | + cmaps="{'tcc.id': 'id'}" | |
| 92 | 89 | dcname="tcc.id" |
| 93 | 90 | icname="id" |
| 94 | - icnames="parkName" | |
| 95 | - datatype="tcc" | |
| 96 | - mlp="true" | |
| 97 | - > | |
| 98 | - </sa-Select3> | |
| 91 | + dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'tcc' } | json }}" | |
| 92 | + iterobjname="item" | |
| 93 | + iterobjexp="item.parkName" | |
| 94 | + searchph="请输拼音..." | |
| 95 | + searchexp="this.parkName" | |
| 96 | + required > | |
| 97 | + </sa-Select5> | |
| 99 | 98 | </div> |
| 100 | 99 | </div> |
| 101 | 100 | |
| 102 | - <div class="form-group has-success has-feedback"> | |
| 101 | + <div class="form-group"> | |
| 103 | 102 | <label class="col-md-3 control-label">发车时间:</label> |
| 104 | - <div class="col-md-7"> | |
| 105 | - <input type="text" class="form-control" | |
| 103 | + <div class="col-md-5"> | |
| 104 | + <input type="text" class="form-control" name="fcsj" | |
| 106 | 105 | ng-model="ctrl.TimeTableDetailForSave.fcsj" |
| 106 | + ng-pattern="ctrl.time_regex" | |
| 107 | 107 | /> |
| 108 | 108 | </div> |
| 109 | + <!-- 隐藏块,显示验证信息 --> | |
| 110 | + <div class="alert alert-danger well-sm" ng-show="myForm.fcsj.$error.pattern"> | |
| 111 | + 时间格式错误,应该是格式hh:mm,如:06:39 | |
| 112 | + </div> | |
| 109 | 113 | |
| 110 | 114 | </div> |
| 111 | 115 | <div class="form-group"> |
| 112 | 116 | <label class="col-md-3 control-label">计划里程:</label> |
| 113 | - <div class="col-md-7"> | |
| 114 | - <input type="text" class="form-control" | |
| 117 | + <div class="col-md-5"> | |
| 118 | + <input type="text" class="form-control" name="jhlc" | |
| 115 | 119 | ng-model="ctrl.TimeTableDetailForSave.jhlc" |
| 120 | + ng-pattern="ctrl.float_regex" | |
| 116 | 121 | /> |
| 117 | 122 | </div> |
| 123 | + <!-- 隐藏块,显示验证信息 --> | |
| 124 | + <div class="alert alert-danger well-sm" ng-show="myForm.jhlc.$error.pattern"> | |
| 125 | + 输入数字 | |
| 126 | + </div> | |
| 118 | 127 | |
| 119 | 128 | </div> |
| 120 | 129 | <div class="form-group"> |
| 121 | 130 | <label class="col-md-3 control-label">班次历时:</label> |
| 122 | - <div class="col-md-7"> | |
| 123 | - <input type="text" class="form-control" | |
| 131 | + <div class="col-md-5"> | |
| 132 | + <input type="text" class="form-control" name="bcsj" | |
| 124 | 133 | ng-model="ctrl.TimeTableDetailForSave.bcsj" |
| 134 | + ng-pattern="ctrl.number_regex" | |
| 125 | 135 | /> |
| 126 | 136 | </div> |
| 137 | + <!-- 隐藏块,显示验证信息 --> | |
| 138 | + <div class="alert alert-danger well-sm" ng-show="myForm.bcsj.$error.pattern"> | |
| 139 | + 输入整数 | |
| 140 | + </div> | |
| 127 | 141 | |
| 128 | 142 | </div> |
| 129 | - <div class="form-group has-success has-feedback"> | |
| 143 | + <div class="form-group"> | |
| 130 | 144 | <label class="col-md-3 control-label">班次类型:</label> |
| 131 | - <div class="col-md-7"> | |
| 132 | - <sa-Select3 model="ctrl.TimeTableDetailForSave" | |
| 133 | - name="bcType" | |
| 134 | - placeholder="请选择班次类型..." | |
| 135 | - dcvalue="{{ctrl.TimeTableDetailForSave.bcType}}" | |
| 145 | + <div class="col-md-5"> | |
| 146 | + <sa-Select5 name="bcType" | |
| 147 | + model="ctrl.TimeTableDetailForSave" | |
| 148 | + cmaps="{'bcType': 'code'}" | |
| 136 | 149 | dcname="bcType" |
| 137 | 150 | icname="code" |
| 138 | - icnames="name" | |
| 139 | - datatype="ScheduleType" | |
| 140 | - > | |
| 141 | - </sa-Select3> | |
| 151 | + dsparams="{{ {type: 'dic', param: 'ScheduleType' } | json }}" | |
| 152 | + iterobjname="item" | |
| 153 | + iterobjexp="item.name" | |
| 154 | + searchph="请选择班次类型..." | |
| 155 | + searchexp="this.name" | |
| 156 | + required | |
| 157 | + > | |
| 158 | + </sa-Select5> | |
| 142 | 159 | </div> |
| 143 | 160 | |
| 144 | 161 | </div> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js
| ... | ... | @@ -283,6 +283,16 @@ angular.module('ScheduleApp').controller( |
| 283 | 283 | if (id) { |
| 284 | 284 | TTInfoDetail.get({id: id}, function(value) { |
| 285 | 285 | self.TimeTableDetailForSave = value; |
| 286 | + if (!self.TimeTableDetailForSave.qdz) { | |
| 287 | + self.TimeTableDetailForSave.qdz = {}; | |
| 288 | + } | |
| 289 | + if (!self.TimeTableDetailForSave.zdz) { | |
| 290 | + self.TimeTableDetailForSave.zdz = {}; | |
| 291 | + } | |
| 292 | + if (!self.TimeTableDetailForSave.tcc) { | |
| 293 | + self.TimeTableDetailForSave.tcc = {}; | |
| 294 | + } | |
| 295 | + | |
| 286 | 296 | self.title2 = |
| 287 | 297 | self.xlname + "(" + self.ttname + ")" + "时刻表明细信息" + |
| 288 | 298 | "->路牌" + self.TimeTableDetailForSave.lp.lpName + |
| ... | ... | @@ -299,6 +309,8 @@ angular.module('ScheduleApp').controller( |
| 299 | 309 | // delete $stateParams.id; |
| 300 | 310 | //} |
| 301 | 311 | |
| 312 | + // TODO: | |
| 313 | + | |
| 302 | 314 | if (self.TimeTableDetailForSave.tcc && !self.TimeTableDetailForSave.tcc.id) |
| 303 | 315 | delete self.TimeTableDetailForSave.tcc; |
| 304 | 316 | if (self.TimeTableDetailForSave.qdz && !self.TimeTableDetailForSave.qdz.id) |
| ... | ... | @@ -344,6 +356,13 @@ angular.module('ScheduleApp').controller( |
| 344 | 356 | var self = this; |
| 345 | 357 | var TTInfoDetail = service.getQueryClass(); |
| 346 | 358 | |
| 359 | + // 时间正则表达式(格式hh:mm,如:06:39) | |
| 360 | + self.time_regex = /^(([0-1]\d)|(2[0-4])):[0-5]\d$/; | |
| 361 | + // 整数 | |
| 362 | + self.number_regex = /^-?\d+$/; | |
| 363 | + // 小数 | |
| 364 | + self.float_regex = /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/; | |
| 365 | + | |
| 347 | 366 | // 欲保存的busInfo信息,绑定 |
| 348 | 367 | self.TimeTableDetailForSave = new TTInfoDetail; |
| 349 | 368 | self.TimeTableDetailForSave.tcc = {}; | ... | ... |