Commit 06490394282534db7a3237240084b2adf9f1b5ef
Merge branch 'minhang' of 192.168.168.201:panzhaov5/bsth_control into minhang
Showing
19 changed files
with
2580 additions
and
1721 deletions
Too many changes to show.
To preserve performance only 19 of 56 files are displayed.
src/main/java/com/bsth/controller/report/ReportController.java
| @@ -48,5 +48,25 @@ public class ReportController { | @@ -48,5 +48,25 @@ public class ReportController { | ||
| 48 | @RequestParam String code) { | 48 | @RequestParam String code) { |
| 49 | return service.historyMessageCount(line, date, code); | 49 | return service.historyMessageCount(line, date, code); |
| 50 | } | 50 | } |
| 51 | + | ||
| 52 | + @RequestMapping(value = "/tbodyTime1", method = RequestMethod.GET) | ||
| 53 | + public Map<String, Object> tbodyTime1(@RequestParam String line,@RequestParam String date) { | ||
| 54 | + return service.tbodyTime1(line, date); | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + @RequestMapping(value = "/tbodyTime2", method = RequestMethod.GET) | ||
| 58 | + public Map<String, Object> tbodyTime2(@RequestParam String line,@RequestParam String date) { | ||
| 59 | + return service.tbodyTime2(line, date); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + @RequestMapping(value = "/tbodyTime3", method = RequestMethod.GET) | ||
| 63 | + public List<Map<String, Object>> tbodyTime3(@RequestParam String line,@RequestParam String date) { | ||
| 64 | + return service.tbodyTime3(line, date); | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + @RequestMapping(value = "/tbodyTime5", method = RequestMethod.GET) | ||
| 68 | + public List<Map<String, Object>> tbodyTime5(@RequestParam String line,@RequestParam String date) { | ||
| 69 | + return service.tbodyTime5(line, date); | ||
| 70 | + } | ||
| 51 | 71 | ||
| 52 | } | 72 | } |
src/main/java/com/bsth/controller/sys/UserController.java
| @@ -73,9 +73,13 @@ public class UserController extends BaseController<SysUser, Integer> { | @@ -73,9 +73,13 @@ public class UserController extends BaseController<SysUser, Integer> { | ||
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | //解密RSA | 75 | //解密RSA |
| 76 | - userName = RSAUtils.decryptBase64(userName); | ||
| 77 | - password = RSAUtils.decryptBase64(password); | ||
| 78 | - | 76 | + try { |
| 77 | + userName = RSAUtils.decryptBase64(userName); | ||
| 78 | + password = RSAUtils.decryptBase64(password); | ||
| 79 | + } catch (RuntimeException e) { | ||
| 80 | + return put(rs, "msg", "decrypt RSA fail!可能页面已过期,尝试刷新页面。"); | ||
| 81 | + } | ||
| 82 | + | ||
| 79 | SysUser user = sysUserService.findByUserName(userName); | 83 | SysUser user = sysUserService.findByUserName(userName); |
| 80 | if (null == user) | 84 | if (null == user) |
| 81 | return put(rs, "msg", "不存在的用户"); | 85 | return put(rs, "msg", "不存在的用户"); |
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| @@ -472,7 +472,6 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -472,7 +472,6 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 472 | } | 472 | } |
| 473 | 473 | ||
| 474 | public void put(ScheduleRealInfo sch) { | 474 | public void put(ScheduleRealInfo sch) { |
| 475 | - | ||
| 476 | schAttrCalculator | 475 | schAttrCalculator |
| 477 | .calcRealDate(sch) | 476 | .calcRealDate(sch) |
| 478 | .calcAllTimeByFcsj(sch); | 477 | .calcAllTimeByFcsj(sch); |
src/main/java/com/bsth/data/schedule/SchAttrCalculator.java
| 1 | package com.bsth.data.schedule; | 1 | package com.bsth.data.schedule; |
| 2 | 2 | ||
| 3 | -import java.text.ParseException; | ||
| 4 | -import java.util.ArrayList; | ||
| 5 | -import java.util.Collections; | ||
| 6 | -import java.util.List; | ||
| 7 | - | 3 | +import com.bsth.data.LineConfigData; |
| 4 | +import com.bsth.entity.realcontrol.LineConfig; | ||
| 5 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 8 | import org.joda.time.format.DateTimeFormat; | 6 | import org.joda.time.format.DateTimeFormat; |
| 9 | import org.joda.time.format.DateTimeFormatter; | 7 | import org.joda.time.format.DateTimeFormatter; |
| 10 | import org.slf4j.Logger; | 8 | import org.slf4j.Logger; |
| @@ -12,9 +10,10 @@ import org.slf4j.LoggerFactory; | @@ -12,9 +10,10 @@ import org.slf4j.LoggerFactory; | ||
| 12 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 13 | import org.springframework.stereotype.Component; | 11 | import org.springframework.stereotype.Component; |
| 14 | 12 | ||
| 15 | -import com.bsth.data.LineConfigData; | ||
| 16 | -import com.bsth.entity.realcontrol.LineConfig; | ||
| 17 | -import com.bsth.entity.realcontrol.ScheduleRealInfo; | 13 | +import java.text.ParseException; |
| 14 | +import java.util.ArrayList; | ||
| 15 | +import java.util.Collections; | ||
| 16 | +import java.util.List; | ||
| 18 | 17 | ||
| 19 | /** | 18 | /** |
| 20 | * | 19 | * |
| @@ -49,11 +48,30 @@ public class SchAttrCalculator { | @@ -49,11 +48,30 @@ public class SchAttrCalculator { | ||
| 49 | if (null == sch.getFcsjT()) | 48 | if (null == sch.getFcsjT()) |
| 50 | calcFcsjTime(sch); | 49 | calcFcsjTime(sch); |
| 51 | 50 | ||
| 52 | - | 51 | + //計發時間 |
| 53 | if(sch.getFcsj().compareTo(conf.getStartOpt()) < 0){ | 52 | if(sch.getFcsj().compareTo(conf.getStartOpt()) < 0){ |
| 54 | sch.setFcsjAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr()+sch.getFcsj()) + DAY_TIME); | 53 | sch.setFcsjAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr()+sch.getFcsj()) + DAY_TIME); |
| 55 | } | 54 | } |
| 56 | - | 55 | + |
| 56 | + //待發時間 | ||
| 57 | + if(sch.getDfsj().compareTo(conf.getStartOpt()) < 0){ | ||
| 58 | + sch.setDfsjAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr()+sch.getDfsj()) + DAY_TIME); | ||
| 59 | + } | ||
| 60 | + else | ||
| 61 | + sch.setDfsjAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr()+sch.getDfsj())); | ||
| 62 | + | ||
| 63 | + //實發時間 | ||
| 64 | + if(sch.getFcsjActual() != null && | ||
| 65 | + sch.getFcsjActual().compareTo(conf.getStartOpt()) < 0){ | ||
| 66 | + sch.setFcsjActualAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr()+sch.getFcsjActual()) + DAY_TIME); | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + //實際終點時間 | ||
| 70 | + if(sch.getZdsjActual() != null && | ||
| 71 | + sch.getZdsjActual().compareTo(conf.getStartOpt()) < 0){ | ||
| 72 | + sch.setZdsjActualAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr()+sch.getZdsjActual()) + DAY_TIME); | ||
| 73 | + } | ||
| 74 | + | ||
| 57 | sch.setRealExecDate(fmtyyyyMMdd.print(sch.getFcsjT())); | 75 | sch.setRealExecDate(fmtyyyyMMdd.print(sch.getFcsjT())); |
| 58 | } catch (Exception e) { | 76 | } catch (Exception e) { |
| 59 | logger.error("", e); | 77 | logger.error("", e); |
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
| @@ -373,7 +373,10 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -373,7 +373,10 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 373 | if(t.getJcsx()==1){ | 373 | if(t.getJcsx()==1){ |
| 374 | Double jcyl=t.getCzyl(); | 374 | Double jcyl=t.getCzyl(); |
| 375 | zyl=jcyl+jzl-yl; | 375 | zyl=jcyl+jzl-yl; |
| 376 | - Double yh=Double.parseDouble(df.format(zyl*(t.getZlc()/zlc))); | 376 | + Double yh=0.0; |
| 377 | + if(zlc>0&&t.getZlc()>0){ | ||
| 378 | + yh=Double.parseDouble(df.format(zyl*(t.getZlc()/zlc))); | ||
| 379 | + } | ||
| 377 | t.setYh(yh); | 380 | t.setYh(yh); |
| 378 | nextJzyl=t.getJzl()+t.getCzyl()-yh; | 381 | nextJzyl=t.getJzl()+t.getCzyl()-yh; |
| 379 | t.setJzyl(Double.parseDouble(df.format(nextJzyl))); | 382 | t.setJzyl(Double.parseDouble(df.format(nextJzyl))); |
src/main/java/com/bsth/service/realcontrol/impl/RealMapServiceImpl.java
| @@ -40,7 +40,7 @@ public class RealMapServiceImpl implements RealMapService { | @@ -40,7 +40,7 @@ public class RealMapServiceImpl implements RealMapService { | ||
| 40 | } | 40 | } |
| 41 | inStr = " (" + inStr.substring(1) + ")"; | 41 | inStr = " (" + inStr.substring(1) + ")"; |
| 42 | 42 | ||
| 43 | - String sql = "select R.LINE_CODE,R.STATION_NAME,R.STATION_CODE,R.STATION_MARK,R.DIRECTIONS,R.DISTANCES,R.TO_TIME, R.VERSIONS,S.G_LONX,S.G_LATY,S.RADIUS,S.SHAPES_TYPE,ST_AsText(S.G_POLYGON_GRID) as G_POLYGON_GRID, R.STATION_ROUTE_CODE from bsth_c_stationroute r inner join bsth_c_station s on r.station=s.id where r.line_code in "+inStr+" and r.destroy=0"; | 43 | + String sql = "select r.LINE_CODE,r.STATION_NAME,r.STATION_CODE,r.STATION_MARK,r.DIRECTIONS,r.DISTANCES,r.TO_TIME, r.VERSIONS,s.G_LONX,s.G_LATY,s.RADIUS,s.SHAPES_TYPE,ST_AsText(s.G_POLYGON_GRID) as G_POLYGON_GRID, r.STATION_ROUTE_CODE from bsth_c_stationroute r inner join bsth_c_station s on r.station=s.id where r.line_code in "+inStr+" and r.destroy=0"; |
| 44 | 44 | ||
| 45 | List<StationSpatialData> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper(StationSpatialData.class)); | 45 | List<StationSpatialData> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper(StationSpatialData.class)); |
| 46 | rs.put("status", ResponseCode.SUCCESS); | 46 | rs.put("status", ResponseCode.SUCCESS); |
| @@ -59,7 +59,7 @@ public class RealMapServiceImpl implements RealMapService { | @@ -59,7 +59,7 @@ public class RealMapServiceImpl implements RealMapService { | ||
| 59 | Map<String, Object> rs = new HashMap(); | 59 | Map<String, Object> rs = new HashMap(); |
| 60 | 60 | ||
| 61 | try { | 61 | try { |
| 62 | - String sql = "select ID, AREA,PARK_CODE,PARK_NAME,ST_AsText(G_PARK_POINT) as G_PARK_POINT,G_CENTER_POINT,RADIUS,SHAPES_TYPE from bsth_c_car_park WHERE destroy=0"; | 62 | + String sql = "select ID, AREA,PARK_CODE,PARK_NAME,ST_AsText(G_PARK_POINT) as G_PARK_POINT,G_CENTER_POINT,RADIUS,SHAPES_TYPE from bsth_c_car_park WHERE destroy=0 and shapes_type='d'"; |
| 63 | 63 | ||
| 64 | List<CarPark> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper(CarPark.class)); | 64 | List<CarPark> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper(CarPark.class)); |
| 65 | rs.put("status", ResponseCode.SUCCESS); | 65 | rs.put("status", ResponseCode.SUCCESS); |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -1145,7 +1145,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1145,7 +1145,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1145 | || scheduleRealInfo.getBcType().equals("venting")){ | 1145 | || scheduleRealInfo.getBcType().equals("venting")){ |
| 1146 | ksgl += tempJhlc; | 1146 | ksgl += tempJhlc; |
| 1147 | }else{ | 1147 | }else{ |
| 1148 | - yygl += tempJhlc; | 1148 | + if(scheduleRealInfo.getStatus() != -1){ |
| 1149 | + yygl += tempJhlc; | ||
| 1150 | + } | ||
| 1149 | } | 1151 | } |
| 1150 | }else{ | 1152 | }else{ |
| 1151 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | 1153 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); |
| @@ -1154,7 +1156,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1154,7 +1156,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1154 | if(childTaskPlan.getMileageType().equals("empty")){ | 1156 | if(childTaskPlan.getMileageType().equals("empty")){ |
| 1155 | ksgl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | 1157 | ksgl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); |
| 1156 | }else{ | 1158 | }else{ |
| 1157 | - yygl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | 1159 | + if(childTaskPlan.isDestroy()){ |
| 1160 | + remMileage += tempJhlc; | ||
| 1161 | + cjbc++; | ||
| 1162 | + }else{ | ||
| 1163 | + yygl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | ||
| 1164 | + } | ||
| 1158 | } | 1165 | } |
| 1159 | } | 1166 | } |
| 1160 | } | 1167 | } |
src/main/java/com/bsth/service/report/ReportService.java
| @@ -18,4 +18,12 @@ public interface ReportService { | @@ -18,4 +18,12 @@ public interface ReportService { | ||
| 18 | List<Map<String, String>> sreachZd(String line,int zdlx,String zd); | 18 | List<Map<String, String>> sreachZd(String line,int zdlx,String zd); |
| 19 | 19 | ||
| 20 | List<Object[]> historyMessageCount(String line, String date, String code); | 20 | List<Object[]> historyMessageCount(String line, String date, String code); |
| 21 | + | ||
| 22 | + Map<String, Object> tbodyTime1(String line ,String date); | ||
| 23 | + | ||
| 24 | + Map<String, Object> tbodyTime2(String line ,String date); | ||
| 25 | + | ||
| 26 | + List<Map<String, Object>> tbodyTime3(String line ,String date); | ||
| 27 | + List<Map<String, Object>> tbodyTime5(String line ,String date); | ||
| 28 | + | ||
| 21 | } | 29 | } |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| @@ -3,6 +3,7 @@ import java.sql.Connection; | @@ -3,6 +3,7 @@ import java.sql.Connection; | ||
| 3 | import java.sql.PreparedStatement; | 3 | import java.sql.PreparedStatement; |
| 4 | import java.sql.ResultSet; | 4 | import java.sql.ResultSet; |
| 5 | import java.sql.SQLException; | 5 | import java.sql.SQLException; |
| 6 | +import java.text.DecimalFormat; | ||
| 6 | import java.text.ParseException; | 7 | import java.text.ParseException; |
| 7 | import java.text.SimpleDateFormat; | 8 | import java.text.SimpleDateFormat; |
| 8 | import java.util.ArrayList; | 9 | import java.util.ArrayList; |
| @@ -16,12 +17,15 @@ import org.slf4j.Logger; | @@ -16,12 +17,15 @@ import org.slf4j.Logger; | ||
| 16 | import org.slf4j.LoggerFactory; | 17 | import org.slf4j.LoggerFactory; |
| 17 | import org.springframework.beans.factory.annotation.Autowired; | 18 | import org.springframework.beans.factory.annotation.Autowired; |
| 18 | import org.springframework.jdbc.core.JdbcTemplate; | 19 | import org.springframework.jdbc.core.JdbcTemplate; |
| 20 | +import org.springframework.jdbc.core.RowMapper; | ||
| 19 | import org.springframework.stereotype.Service; | 21 | import org.springframework.stereotype.Service; |
| 20 | 22 | ||
| 21 | import com.bsth.data.BasicData; | 23 | import com.bsth.data.BasicData; |
| 22 | import com.bsth.entity.StationRoute; | 24 | import com.bsth.entity.StationRoute; |
| 23 | import com.bsth.entity.excep.ArrivalInfo; | 25 | import com.bsth.entity.excep.ArrivalInfo; |
| 26 | +import com.bsth.entity.oil.Ylb; | ||
| 24 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 27 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 28 | +import com.bsth.entity.schedule.SchedulePlanInfo; | ||
| 25 | import com.bsth.repository.StationRouteRepository; | 29 | import com.bsth.repository.StationRouteRepository; |
| 26 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | 30 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 27 | import com.bsth.service.report.ReportService; | 31 | import com.bsth.service.report.ReportService; |
| @@ -252,5 +256,515 @@ public class ReportServiceImpl implements ReportService{ | @@ -252,5 +256,515 @@ public class ReportServiceImpl implements ReportService{ | ||
| 252 | List<Object[]> list = scheduleRealInfoRepository.historyMessageCount(line, date, code); | 256 | List<Object[]> list = scheduleRealInfoRepository.historyMessageCount(line, date, code); |
| 253 | return list; | 257 | return list; |
| 254 | } | 258 | } |
| 259 | + @Override | ||
| 260 | + public Map<String, Object> tbodyTime1(String line, String date) { | ||
| 261 | + DecimalFormat df = new DecimalFormat("#0.00"); | ||
| 262 | + // TODO Auto-generated method stub | ||
| 263 | + //查询配车 | ||
| 264 | + String sqlPc=" SELECT cl_zbh FROM bsth_c_s_sp_info " | ||
| 265 | + +" where DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' " | ||
| 266 | + + " and xl_bm='"+line+"' and bc_type='normal' " | ||
| 267 | + + " group by cl_zbh "; | ||
| 268 | + Map<String, Object> map=new HashMap<String,Object>(); | ||
| 269 | + List<Map<String, Object>> listPc= jdbcTemplate.query(sqlPc, | ||
| 270 | + new RowMapper<Map<String, Object>>(){ | ||
| 271 | + @Override | ||
| 272 | + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 273 | + Map<String, Object> m=new HashMap<String,Object>(); | ||
| 274 | + m.put("zbh", rs.getString("cl_zbh")); | ||
| 275 | + return m; | ||
| 276 | + } | ||
| 277 | + }); | ||
| 278 | + //配车 | ||
| 279 | + int pcs=listPc.size(); | ||
| 280 | + | ||
| 281 | + | ||
| 282 | + String sqlPlan="select jhlc, bc_type ,fcsj from bsth_c_s_sp_info " | ||
| 283 | + + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"'"; | ||
| 284 | + | ||
| 285 | + //班次 | ||
| 286 | + int zgf_0 = 6*60+31,zgf_1 = 8*60+30,wgf_0 = 16*60+1,wgf_1 = 18*60; | ||
| 287 | + int qcBc=0,qjBc=0,zqcBc=0,zqjBc=0,wqcBc=0,wqjBc=0; | ||
| 288 | + double zlc = 0 , yylc = 0,kslc=0; | ||
| 289 | + //查询班次 | ||
| 290 | + List<Map<String, Object>> listPlan= jdbcTemplate.query(sqlPlan, | ||
| 291 | + new RowMapper<Map<String, Object>>(){ | ||
| 292 | + @Override | ||
| 293 | + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 294 | + Map<String, Object> m2=new HashMap<String,Object>(); | ||
| 295 | + m2.put("jhlc", rs.getDouble("jhlc")); | ||
| 296 | + m2.put("bcType", rs.getString("bc_type")); | ||
| 297 | + m2.put("fcsj", rs.getString("fcsj")); | ||
| 298 | + return m2; | ||
| 299 | + } | ||
| 300 | + }); | ||
| 301 | + | ||
| 302 | + for (int i = 0; i < listPlan.size(); i++) { | ||
| 303 | + Map<String, Object> m=listPlan.get(i); | ||
| 304 | + double jhlc=Double.parseDouble(m.get("jhlc").toString()); | ||
| 305 | + String bcType=m.get("bcType").toString(); | ||
| 306 | + String fcsjs[]=m.get("fcsj").toString().split(":"); | ||
| 307 | + | ||
| 308 | + zlc +=jhlc; | ||
| 309 | + if(bcType.equals("normal")){ | ||
| 310 | + qcBc ++; | ||
| 311 | + if((Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) > zgf_0 | ||
| 312 | + && (Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) < zgf_1){ | ||
| 313 | + zqcBc++; | ||
| 314 | + }else if((Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) > wgf_0 | ||
| 315 | + && (Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) < wgf_1){ | ||
| 316 | + wqcBc++; | ||
| 317 | + } | ||
| 318 | + yylc +=jhlc; | ||
| 319 | + }else if(bcType.equals("region")){ | ||
| 320 | + qjBc++; | ||
| 321 | + if((Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) > zgf_0 | ||
| 322 | + && (Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) < zgf_1){ | ||
| 323 | + zqjBc++; | ||
| 324 | + }else if((Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) > wgf_0 | ||
| 325 | + && (Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) < wgf_1){ | ||
| 326 | + wqjBc++; | ||
| 327 | + } | ||
| 328 | + | ||
| 329 | + yylc+=jhlc; | ||
| 330 | + }else{ | ||
| 331 | + kslc+=jhlc; | ||
| 332 | + } | ||
| 333 | + } | ||
| 334 | + | ||
| 335 | + map.put("pcs", pcs); | ||
| 336 | + map.put("qcbc", qcBc); | ||
| 337 | + map.put("qjbc", qjBc); | ||
| 338 | + map.put("zqcbc", zqcBc); | ||
| 339 | + map.put("zqjbc", zqjBc); | ||
| 340 | + map.put("wqcbc", wqcBc); | ||
| 341 | + map.put("wqjbc", wqjBc); | ||
| 342 | + map.put("zlc", df.format( zlc)); | ||
| 343 | + map.put("yylc", df.format(yylc)); | ||
| 344 | + map.put("kslc",df.format( kslc)); | ||
| 345 | + //查询里程 | ||
| 346 | + return map; | ||
| 347 | + } | ||
| 348 | + @Override | ||
| 349 | + public Map<String, Object> tbodyTime2(String line, String date) { | ||
| 350 | + DecimalFormat df = new DecimalFormat("#0.00"); | ||
| 351 | + // TODO Auto-generated method stub | ||
| 352 | + //查询配车 | ||
| 353 | + String sqlPc=" SELECT sum(bcsj) as yysj ,sum(jhlc) as yygl FROM bsth_c_s_sp_info " | ||
| 354 | + +" where DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' " | ||
| 355 | + + " and xl_bm='"+line+"' and bc_type in ('normal' ,'region' )"; | ||
| 356 | + Map<String, Object> map=new HashMap<String,Object>(); | ||
| 357 | + List<Map<String, Object>> list= jdbcTemplate.query(sqlPc, | ||
| 358 | + new RowMapper<Map<String, Object>>(){ | ||
| 359 | + @Override | ||
| 360 | + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 361 | + Map<String, Object> m=new HashMap<String,Object>(); | ||
| 362 | + m.put("yysj", rs.getInt("yysj")); | ||
| 363 | + m.put("yygl", rs.getString("yygl")==null?"0":rs.getString("yygl")); | ||
| 364 | + return m; | ||
| 365 | + } | ||
| 366 | + }); | ||
| 367 | + int yysj=0 ; | ||
| 368 | + double yycs=0 ,yygl=0; | ||
| 369 | + if(list.size()>0){ | ||
| 370 | + Map<String, Object> m=list.get(0); | ||
| 371 | + yysj=Integer.parseInt((m.get("yysj").toString())); | ||
| 372 | + yygl=Double.parseDouble(m.get("yygl").toString()); | ||
| 373 | + } | ||
| 374 | + if(yysj>0){ | ||
| 375 | + yycs =yygl/(yysj*1.0/60); | ||
| 376 | + } | ||
| 377 | + int hh=yysj/60; | ||
| 378 | + int mm=yysj%60; | ||
| 379 | + | ||
| 380 | + map.put("yysj", hh+":"+mm); | ||
| 381 | + map.put("yycs", df.format(yycs)+"公里/小时"); | ||
| 382 | +// map.put(key, value) | ||
| 383 | + return map; | ||
| 384 | + } | ||
| 255 | 385 | ||
| 386 | + public static void main(String[] args) { | ||
| 387 | + System.out.println(609360/60); | ||
| 388 | + System.out.println(609360%60); | ||
| 389 | + } | ||
| 390 | + @Override | ||
| 391 | + public List<Map<String, Object>> tbodyTime3(String line, String date) { | ||
| 392 | + // TODO Auto-generated method stub | ||
| 393 | + List<Map<String, Object>> list=new ArrayList<Map<String,Object>>(); | ||
| 394 | + String sqlZd=" select qdz_name, count(cl_zbh) as cls , 'zqc' as lx from bsth_c_s_sp_info where " | ||
| 395 | + + " DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"' and bc_type='normal' " | ||
| 396 | + + " and fcsj>'06:31' and fcsj<'08:00' group by qdz_name union " | ||
| 397 | + + " select qdz_name, count(cl_zbh) as cls , 'wqc' as lx from bsth_c_s_sp_info " | ||
| 398 | + + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"' " | ||
| 399 | + + " and bc_type='normal' and fcsj>'16:01' and fcsj<'18:00' group by qdz_name union " | ||
| 400 | + + " select qdz_name, count(cl_zbh) as cls , 'zqj' as lx from bsth_c_s_sp_info " | ||
| 401 | + + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"' " | ||
| 402 | + + " and bc_type='region' and fcsj>'06:31' and fcsj<'08:00' group by qdz_name union " | ||
| 403 | + + " select qdz_name, count(cl_zbh) as cls , 'wqj' as lx from bsth_c_s_sp_info " | ||
| 404 | + + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"' " | ||
| 405 | + + " and bc_type='region' and fcsj>'16:01' and fcsj<'18:00'group by qdz_name"; | ||
| 406 | + | ||
| 407 | + List<Map<String, Object>> lists= jdbcTemplate.query(sqlZd, | ||
| 408 | + new RowMapper<Map<String, Object>>(){ | ||
| 409 | + @Override | ||
| 410 | + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 411 | + Map<String, Object> m=new HashMap<String,Object>(); | ||
| 412 | + m.put("zdm", rs.getString("qdz_name")); | ||
| 413 | + m.put("cls", rs.getString("cls")); | ||
| 414 | + m.put("lx", rs.getString("lx")); | ||
| 415 | + return m; | ||
| 416 | + } | ||
| 417 | + }); | ||
| 418 | + int a=0; | ||
| 419 | + int b=0; | ||
| 420 | + int c=0; | ||
| 421 | + int d=0; | ||
| 422 | + for(int i=0;i<lists.size();i++){ | ||
| 423 | + boolean fage=true; | ||
| 424 | + Map<String, Object> newMap= new HashMap<String, Object>(); | ||
| 425 | + list.add(newMap); | ||
| 426 | + Map<String, Object> maps=lists.get(i); | ||
| 427 | + if(maps.get("lx").equals("zqc")){ | ||
| 428 | + list.get(a).put("zqcZm", maps.get("zdm")); | ||
| 429 | + list.get(a).put("zqcCls", maps.get("cls")); | ||
| 430 | + a++; | ||
| 431 | + fage=false; | ||
| 432 | + }else if(maps.get("lx").equals("wqc")){ | ||
| 433 | + list.get(b).put("wqcZm", maps.get("zdm")); | ||
| 434 | + list.get(b).put("wqcCls", maps.get("cls")); | ||
| 435 | + b++; | ||
| 436 | + fage=false; | ||
| 437 | + }else if(maps.get("lx").equals("zqj")){ | ||
| 438 | + list.get(c).put("zqjZm", maps.get("zdm")); | ||
| 439 | + list.get(c).put("zqjCls", maps.get("cls")); | ||
| 440 | + c++; | ||
| 441 | + fage=false; | ||
| 442 | + }else if(maps.get("lx").equals("wqj")){ | ||
| 443 | + list.get(d).put("wqjZm", maps.get("zdm")); | ||
| 444 | + list.get(d).put("wqjCls", maps.get("cls")); | ||
| 445 | + d++; | ||
| 446 | + fage=false; | ||
| 447 | + } | ||
| 448 | + if(fage){ | ||
| 449 | + break; | ||
| 450 | + } | ||
| 451 | + } | ||
| 452 | + boolean status=true; | ||
| 453 | + while (status) { | ||
| 454 | + for (int i = 0; i < list.size(); i++) { | ||
| 455 | + if(list.get(i).isEmpty()){ | ||
| 456 | + list.remove(i); | ||
| 457 | + status=true; | ||
| 458 | + }else{ | ||
| 459 | + status=false; | ||
| 460 | + } | ||
| 461 | + } | ||
| 462 | + | ||
| 463 | + } | ||
| 464 | + return list; | ||
| 465 | + } | ||
| 466 | + @Override | ||
| 467 | + public List<Map<String, Object>> tbodyTime5(String line, String date) { | ||
| 468 | + // TODO Auto-generated method stub | ||
| 469 | + String sql="select min(fcsj) as fcsj,'lx0' as lx from bsth_c_s_sp_info where " | ||
| 470 | + + " DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"'" | ||
| 471 | + + " and bc_type='out' and xl_dir=0 union " | ||
| 472 | + + " select min(fcsj) as fcsj,'lx1' as lx from bsth_c_s_sp_info where " | ||
| 473 | + + " DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"'" | ||
| 474 | + + " and bc_type='out' and xl_dir=1"; | ||
| 475 | + List<Map<String, Object>> lists= jdbcTemplate.query(sql, | ||
| 476 | + new RowMapper<Map<String, Object>>(){ | ||
| 477 | + @Override | ||
| 478 | + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 479 | + Map<String, Object> m=new HashMap<String,Object>(); | ||
| 480 | + m.put("lx", rs.getString("lx")); | ||
| 481 | + m.put("fcsj", rs.getString("fcsj")); | ||
| 482 | + return m; | ||
| 483 | + } | ||
| 484 | + }); | ||
| 485 | + | ||
| 486 | + String sqlList="select * from bsth_c_s_sp_info where " | ||
| 487 | + + "DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"'" | ||
| 488 | + + " and bc_type='normal' order by fcsj"; | ||
| 489 | + List<SchedulePlanInfo> list= jdbcTemplate.query(sqlList, | ||
| 490 | + new RowMapper<SchedulePlanInfo>(){ | ||
| 491 | + @Override | ||
| 492 | + public SchedulePlanInfo mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 493 | + SchedulePlanInfo m=new SchedulePlanInfo(); | ||
| 494 | + m.setBcsj(rs.getInt("bcsj")); | ||
| 495 | + m.setXlDir(rs.getString("xl_dir")); | ||
| 496 | + m.setFcsj(rs.getString("fcsj")); | ||
| 497 | + return m; | ||
| 498 | + } | ||
| 499 | + }); | ||
| 500 | + //上下行最早发车时间 (用于与夜班线 跨零点的班次进行比较) | ||
| 501 | + String lx0=""; | ||
| 502 | + String lx1=""; | ||
| 503 | + for (int x = 0; x < lists.size(); x++) { | ||
| 504 | + if(lists.get(x).get("lx").equals("lx0")){ | ||
| 505 | + lx0=lists.get(x).get("fcsj").toString(); | ||
| 506 | + }else{ | ||
| 507 | + lx1=lists.get(x).get("fcsj").toString(); | ||
| 508 | + } | ||
| 509 | + } | ||
| 510 | + | ||
| 511 | + String[] lx0sj = lx0.split(":"); | ||
| 512 | + int sxFc=Integer.parseInt(lx0sj[0])*60+Integer.parseInt(lx0sj[1]); | ||
| 513 | + String[] lx1sj = lx1.split(":"); | ||
| 514 | + int xxFc=Integer.parseInt(lx1sj[0])*60+Integer.parseInt(lx1sj[1]); | ||
| 515 | + //班次 | ||
| 516 | + int sj_0 = 6*60+31,sj_1 = 8*60+30,sj_2 = 16*60+1,sj_3 = 18*60; | ||
| 517 | + | ||
| 518 | + //顺序 出场--早高峰---中午---晚高峰---进场 | ||
| 519 | + //实驶时间时间(分),0为上行,1为下行 | ||
| 520 | + int ccsj0=0,ccsj1=0,zgf0=0,zgf1=0,zw0=0,zw1=0,wgf0=0,wgf1=0,jcsj0=0,jcsj1=0; | ||
| 521 | + | ||
| 522 | + //记录上一个发车时间(方便记录间距) | ||
| 523 | + int cfc0=0,cfc1=0,zfc0=0,zfc1=0,zwfc0=0,zwfc1=0,wfc0=0,wfc1=0,jcfc0Z=0,jcfc1Z=0,jcfc0W=0,jcfc1W=0; | ||
| 524 | + //车距 (发车时间的间距) i--MIN a--MAX | ||
| 525 | + int iC=999,aC=-1,iZg=999,aZg=-1,iZw=999,aZw=-1,iWg=999,aWg=-1,iJcZ=999,aJcZ=-1,iJcW=999,aJcW=-1; | ||
| 526 | + int iC1=999,aC1=-1,iZg1=999,aZg1=-1,iZw1=999,aZw1=-1,iWg1=999,aWg1=-1,iJc1Z=999,aJc1Z=-1,iJc1W=999,aJc1W=-1; | ||
| 527 | +// List<ScheduleRealInfo> list = scheduleRealInfoRepository.scheduleByDateAndLine(line, date); | ||
| 528 | + for(int i=0;i<list.size();i++){ | ||
| 529 | + SchedulePlanInfo t=list.get(i); | ||
| 530 | + String xlDir=t.getXlDir(); | ||
| 531 | + int bcsj=t.getBcsj(); | ||
| 532 | + String fcsj=t.getFcsj(); | ||
| 533 | + String[] fcsjs=fcsj.split(":"); | ||
| 534 | + int fcsjNum=Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1]); | ||
| 535 | + | ||
| 536 | + if(xlDir.equals("0")){ | ||
| 537 | + if(fcsjNum>=sxFc && fcsjNum<sj_0){ | ||
| 538 | + ccsj0 +=bcsj; | ||
| 539 | + if(aC<0){ | ||
| 540 | + cfc0 =fcsjNum; | ||
| 541 | + aC=0; | ||
| 542 | + }else{ | ||
| 543 | + if(fcsjNum-cfc0<iC){ | ||
| 544 | + iC=fcsjNum-cfc0; | ||
| 545 | + } | ||
| 546 | + if(fcsjNum-cfc0>aC){ | ||
| 547 | + aC=fcsjNum-cfc0; | ||
| 548 | + } | ||
| 549 | + | ||
| 550 | + cfc0=fcsjNum; | ||
| 551 | + } | ||
| 552 | + | ||
| 553 | + }else if(fcsjNum>=sj_0 && fcsjNum<=sj_1){ | ||
| 554 | + zgf0 +=bcsj; | ||
| 555 | + if(aZg<0){ | ||
| 556 | + zfc0 =fcsjNum; | ||
| 557 | + aZg=0; | ||
| 558 | + }else{ | ||
| 559 | + if(fcsjNum-zfc0<iZg){ | ||
| 560 | + iZg=fcsjNum-zfc0; | ||
| 561 | + } | ||
| 562 | + | ||
| 563 | + if(fcsjNum-zfc0>aZg){ | ||
| 564 | + aZg=fcsjNum-zfc0; | ||
| 565 | + } | ||
| 566 | + | ||
| 567 | + zfc0=fcsjNum; | ||
| 568 | + } | ||
| 569 | + }else if(fcsjNum>sj_1 && fcsjNum<sj_2){ | ||
| 570 | + zw0 +=bcsj; | ||
| 571 | + if(aZw<0){ | ||
| 572 | + zwfc0 =fcsjNum; | ||
| 573 | + aZw=0; | ||
| 574 | + }else{ | ||
| 575 | + if(fcsjNum-zwfc0<iZw){ | ||
| 576 | + iZw=fcsjNum-zwfc0; | ||
| 577 | + } | ||
| 578 | + if(fcsjNum-zwfc0>aZw){ | ||
| 579 | + aZw=fcsjNum-zwfc0; | ||
| 580 | + } | ||
| 581 | + zwfc0=fcsjNum; | ||
| 582 | + } | ||
| 583 | + | ||
| 584 | + }else if(fcsjNum>=sj_2 && fcsjNum<=sj_3){ | ||
| 585 | + wgf0 +=bcsj; | ||
| 586 | + if(aWg<0){ | ||
| 587 | + wfc0=fcsjNum; | ||
| 588 | + aWg=0; | ||
| 589 | + }else{ | ||
| 590 | + if(fcsjNum-wfc0<iWg){ | ||
| 591 | + iWg=fcsjNum-wfc0; | ||
| 592 | + } | ||
| 593 | + if(fcsjNum-wfc0>aWg){ | ||
| 594 | + aWg=fcsjNum-wfc0; | ||
| 595 | + } | ||
| 596 | + wfc0=fcsjNum; | ||
| 597 | + } | ||
| 598 | + }else if(fcsjNum>sj_3){ | ||
| 599 | + jcsj0 +=bcsj; | ||
| 600 | + if(aJcW<0){ | ||
| 601 | + jcfc0W=fcsjNum; | ||
| 602 | + aJcW=0; | ||
| 603 | + }else{ | ||
| 604 | + if(fcsjNum-jcfc0W<iJcW){ | ||
| 605 | + iJcW=fcsjNum-jcfc0W; | ||
| 606 | + } | ||
| 607 | + if(fcsjNum-jcfc0W>aJcW){ | ||
| 608 | + aJcW=fcsjNum-jcfc0W; | ||
| 609 | + } | ||
| 610 | + jcfc0W=fcsjNum; | ||
| 611 | + } | ||
| 612 | + }else if(fcsjNum<sxFc){ | ||
| 613 | + jcsj0 +=bcsj; | ||
| 614 | + if(aJcZ<0){ | ||
| 615 | + jcfc0Z=fcsjNum; | ||
| 616 | + aJcZ=0; | ||
| 617 | + }else{ | ||
| 618 | + if(fcsjNum-jcfc0Z<iJcZ){ | ||
| 619 | + iJcZ=fcsjNum-jcfc0Z; | ||
| 620 | + } | ||
| 621 | + if(fcsjNum-jcfc0Z>aJcZ){ | ||
| 622 | + aJcZ=fcsjNum-jcfc0Z; | ||
| 623 | + } | ||
| 624 | + jcfc0Z=fcsjNum; | ||
| 625 | + } | ||
| 626 | + } | ||
| 627 | + | ||
| 628 | + | ||
| 629 | + }else{ | ||
| 630 | + if(fcsjNum>=xxFc && fcsjNum<sj_0){ | ||
| 631 | + ccsj1 +=bcsj; | ||
| 632 | + if(aC1<0){ | ||
| 633 | + cfc1=fcsjNum; | ||
| 634 | + aC1=0; | ||
| 635 | + }else{ | ||
| 636 | + if(fcsjNum-cfc1<iC1){ | ||
| 637 | + iC1=fcsjNum-cfc1; | ||
| 638 | + } | ||
| 639 | + if(fcsjNum-cfc1>aC1){ | ||
| 640 | + aC1=fcsjNum-cfc1; | ||
| 641 | + } | ||
| 642 | + cfc1=fcsjNum; | ||
| 643 | + } | ||
| 644 | + }else if(fcsjNum>=sj_0 && fcsjNum<=sj_1){ | ||
| 645 | + zgf1 +=bcsj; | ||
| 646 | + if(aZg1<0){ | ||
| 647 | + zfc1=fcsjNum; | ||
| 648 | + aZg1=0; | ||
| 649 | + }else{ | ||
| 650 | + if(fcsjNum-zfc1<iZg1){ | ||
| 651 | + iZg1=fcsjNum-zfc1; | ||
| 652 | + } | ||
| 653 | + if(fcsjNum-zfc1>aZg1){ | ||
| 654 | + aZg1=fcsjNum-zfc1; | ||
| 655 | + } | ||
| 656 | + | ||
| 657 | + zfc1=fcsjNum; | ||
| 658 | + } | ||
| 659 | + }else if(fcsjNum>sj_1 && fcsjNum<sj_2){ | ||
| 660 | + zw1 +=bcsj; | ||
| 661 | + if(aZw1<0){ | ||
| 662 | + zwfc1=fcsjNum; | ||
| 663 | + aZw1=0; | ||
| 664 | + }else{ | ||
| 665 | + if(fcsjNum-zwfc1<iZw1){ | ||
| 666 | + iZw1=fcsjNum-zwfc1; | ||
| 667 | + } | ||
| 668 | + if(fcsjNum-zwfc1>aZw1){ | ||
| 669 | + aZw1=fcsjNum-zwfc1; | ||
| 670 | + } | ||
| 671 | + zwfc1=fcsjNum; | ||
| 672 | + } | ||
| 673 | + }else if(fcsjNum>=sj_2 && fcsjNum<=sj_3){ | ||
| 674 | + wgf1 +=bcsj; | ||
| 675 | + if(aWg1<0){ | ||
| 676 | + wfc1=fcsjNum; | ||
| 677 | + aWg1=0; | ||
| 678 | + }else{ | ||
| 679 | + if(fcsjNum-wfc1<iWg1){ | ||
| 680 | + iWg1=fcsjNum-wfc1; | ||
| 681 | + } | ||
| 682 | + if(fcsjNum-wfc1<aWg1){ | ||
| 683 | + aWg1=fcsjNum-wfc1; | ||
| 684 | + } | ||
| 685 | + wfc1=fcsjNum; | ||
| 686 | + } | ||
| 687 | + }else if(fcsjNum>sj_3){ | ||
| 688 | + jcsj1 +=bcsj; | ||
| 689 | + if(aJc1W<0){ | ||
| 690 | + jcfc1W=fcsjNum; | ||
| 691 | + aJc1W=0; | ||
| 692 | + }else{ | ||
| 693 | + if(fcsjNum-jcfc1W<iJc1W){ | ||
| 694 | + aJc1W=fcsjNum-jcfc1W; | ||
| 695 | + } | ||
| 696 | + if(fcsjNum-jcfc1W>aJc1W){ | ||
| 697 | + aJc1W=fcsjNum-jcfc1W; | ||
| 698 | + } | ||
| 699 | + | ||
| 700 | + jcfc1W=fcsjNum; | ||
| 701 | + } | ||
| 702 | + }else if(fcsjNum<xxFc){ | ||
| 703 | + jcsj1 +=bcsj; | ||
| 704 | + if(aJc1Z<0){ | ||
| 705 | + jcfc1Z=fcsjNum; | ||
| 706 | + aJc1Z=0; | ||
| 707 | + }else{ | ||
| 708 | + if(fcsjNum-jcfc1Z<iJc1Z){ | ||
| 709 | + aJc1Z=fcsjNum-jcfc1Z; | ||
| 710 | + } | ||
| 711 | + if(fcsjNum-jcfc1Z>aJc1Z){ | ||
| 712 | + aJc1Z=fcsjNum-jcfc1Z; | ||
| 713 | + } | ||
| 714 | + | ||
| 715 | + jcfc1Z=fcsjNum; | ||
| 716 | + } | ||
| 717 | + } | ||
| 718 | + } | ||
| 719 | + | ||
| 720 | + } | ||
| 721 | + | ||
| 722 | + | ||
| 723 | + List<Map<String, Object>> newList=new ArrayList<Map<String,Object>>(); | ||
| 724 | + Map<String, Object> newmap1=new HashMap<String,Object>(); | ||
| 725 | + Map<String, Object> newmap2=new HashMap<String,Object>(); | ||
| 726 | + Map<String, Object> newmap3=new HashMap<String,Object>(); | ||
| 727 | + Map<String, Object> newmap4=new HashMap<String,Object>(); | ||
| 728 | + Map<String, Object> newmap5=new HashMap<String,Object>(); | ||
| 729 | + newmap1.put("sjd", "(首)——6:30"); | ||
| 730 | + newmap1.put("sxsj", ccsj0); | ||
| 731 | + newmap1.put("xxsj", ccsj1); | ||
| 732 | + newmap1.put("fqsj", ccsj0+ccsj1); | ||
| 733 | + newmap1.put("cj", (iC-iC1>0?iC1:iC)+"——"+(aC-aC1>0?aC:aC1)); | ||
| 734 | + | ||
| 735 | + newmap2.put("sjd", "6:31——8:30"); | ||
| 736 | + newmap2.put("sxsj", zgf0); | ||
| 737 | + newmap2.put("xxsj", zgf1); | ||
| 738 | + newmap2.put("fqsj", zgf1+zgf0); | ||
| 739 | + newmap2.put("cj", (iZg-iZg1>0?iZg1:iZg)+"——"+(aZg-aZg1>0?aZg:aZg1)); | ||
| 740 | + | ||
| 741 | + newmap3.put("sjd", "8:30——16:00"); | ||
| 742 | + newmap3.put("sxsj", zw0); | ||
| 743 | + newmap3.put("xxsj", zw1); | ||
| 744 | + newmap3.put("fqsj", zw0+zw1); | ||
| 745 | + newmap3.put("cj", (iZw-iZw1>0?iZw1:iZw)+"——"+(aZw-aZw1>0?aZw:aZw1)); | ||
| 746 | + | ||
| 747 | + newmap4.put("sjd", "16:01——18:00"); | ||
| 748 | + newmap4.put("sxsj", wgf0); | ||
| 749 | + newmap4.put("xxsj", wgf1); | ||
| 750 | + newmap4.put("fqsj", wgf0+wgf1); | ||
| 751 | + newmap4.put("cj", (iWg-iWg1>0?iWg1:iWg)+"——"+(aWg-aWg1>0?aWg:aWg1)); | ||
| 752 | + | ||
| 753 | + newmap5.put("sjd", "18:00——(末)"); | ||
| 754 | + newmap5.put("sxsj", jcsj0); | ||
| 755 | + newmap5.put("xxsj", jcsj1); | ||
| 756 | + newmap5.put("fqsj", jcsj0+jcsj1); | ||
| 757 | + int min0=iJcZ-iJcW>0?iJcW:iJcZ; | ||
| 758 | + int max0=aJcZ-aJcW>0?aJcZ:aJcW; | ||
| 759 | + int min1=iJc1Z-iJc1W>0?iJc1W:iJc1Z; | ||
| 760 | + int max1=aJc1Z-aJc1W>0?aJc1Z:aJc1W; | ||
| 761 | + newmap5.put("cj", (min0-min1>0?min1:min0)+"——"+(max0-max1>0?max0:max1)); | ||
| 762 | + | ||
| 763 | + newList.add(newmap1); | ||
| 764 | + newList.add(newmap2); | ||
| 765 | + newList.add(newmap3); | ||
| 766 | + newList.add(newmap4); | ||
| 767 | + newList.add(newmap5); | ||
| 768 | + return newList; | ||
| 769 | + } | ||
| 256 | } | 770 | } |
src/main/resources/application-dev.properties
| @@ -8,7 +8,7 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | @@ -8,7 +8,7 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | ||
| 8 | spring.jpa.database= MYSQL | 8 | spring.jpa.database= MYSQL |
| 9 | spring.jpa.show-sql= false | 9 | spring.jpa.show-sql= false |
| 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver | 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 11 | -spring.datasource.url= jdbc:mysql://192.168.168.201/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 11 | +spring.datasource.url= jdbc:mysql://192.168.168.201/mh_control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 12 | spring.datasource.username= root | 12 | spring.datasource.username= root |
| 13 | spring.datasource.password= 123456 | 13 | spring.datasource.password= 123456 |
| 14 | #DATASOURCE | 14 | #DATASOURCE |
src/main/resources/static/pages/forms/statement/changetochange.html
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | 28 | ||
| 29 | <div class="page-head"> | 29 | <div class="page-head"> |
| 30 | <div class="page-title"> | 30 | <div class="page-title"> |
| 31 | - <h1>换人换车情况统计表</h1> | 31 | + <h1>鎹汉鎹㈣溅鎯呭喌缁熻琛</h1> |
| 32 | </div> | 32 | </div> |
| 33 | </div> | 33 | </div> |
| 34 | 34 | ||
| @@ -38,28 +38,28 @@ | @@ -38,28 +38,28 @@ | ||
| 38 | <div class="portlet-title"> | 38 | <div class="portlet-title"> |
| 39 | <form class="form-inline" action="" method="post"> | 39 | <form class="form-inline" action="" method="post"> |
| 40 | <div style="display: inline-block;"> | 40 | <div style="display: inline-block;"> |
| 41 | - <span class="item-label" style="width: 80px;">线路: </span> | 41 | + <span class="item-label" style="width: 80px;">绾胯矾: </span> |
| 42 | <select class="form-control" name="line" id="line" style="width: 120px;"></select> | 42 | <select class="form-control" name="line" id="line" style="width: 120px;"></select> |
| 43 | </div> | 43 | </div> |
| 44 | <div style="display: inline-block;margin-left: 15px;"> | 44 | <div style="display: inline-block;margin-left: 15px;"> |
| 45 | - <span class="item-label" style="width: 80px;">开始时间: </span> | 45 | + <span class="item-label" style="width: 80px;">寮濮嬫椂闂: </span> |
| 46 | <input class="form-control" type="text" id="startDate" style="width: 120px;"/> | 46 | <input class="form-control" type="text" id="startDate" style="width: 120px;"/> |
| 47 | </div> | 47 | </div> |
| 48 | <div style="display: inline-block;margin-left: 15px;"> | 48 | <div style="display: inline-block;margin-left: 15px;"> |
| 49 | - <span class="item-label" style="width: 80px;">结束时间: </span> | 49 | + <span class="item-label" style="width: 80px;">缁撴潫鏃堕棿: </span> |
| 50 | <input class="form-control" type="text" id="endDate" style="width: 120px;"/> | 50 | <input class="form-control" type="text" id="endDate" style="width: 120px;"/> |
| 51 | </div> | 51 | </div> |
| 52 | <div style="display: inline-block;"> | 52 | <div style="display: inline-block;"> |
| 53 | - <span class="item-label" style="width: 120px;">类型: </span> | 53 | + <span class="item-label" style="width: 120px;">绫诲瀷: </span> |
| 54 | <select class="form-control" id="sel"> | 54 | <select class="form-control" id="sel"> |
| 55 | - <option value="">请选择</option> | ||
| 56 | - <option value="1">换人</option> | ||
| 57 | - <option value="2">换车</option> | 55 | + <option value="">璇烽夋嫨</option> |
| 56 | + <option value="1">鎹汉</option> | ||
| 57 | + <option value="2">鎹㈣溅</option> | ||
| 58 | </select> | 58 | </select> |
| 59 | </div> | 59 | </div> |
| 60 | <div class="form-group"> | 60 | <div class="form-group"> |
| 61 | - <input class="btn btn-default" type="button" id="query" value="筛选"/> | ||
| 62 | - <input class="btn btn-default" type="button" id="export" value="导出"/> | 61 | + <input class="btn btn-default" type="button" id="query" value="绛涢"/> |
| 62 | + <input class="btn btn-default" type="button" id="export" value="瀵煎嚭"/> | ||
| 63 | </div> | 63 | </div> |
| 64 | </form> | 64 | </form> |
| 65 | </div> | 65 | </div> |
| @@ -68,35 +68,35 @@ | @@ -68,35 +68,35 @@ | ||
| 68 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 68 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 69 | <thead> | 69 | <thead> |
| 70 | <tr> | 70 | <tr> |
| 71 | - <th colspan="15">换人换车情况统计表</th> | 71 | + <th colspan="15">鎹汉鎹㈣溅鎯呭喌缁熻琛</th> |
| 72 | </tr> | 72 | </tr> |
| 73 | <tr> | 73 | <tr> |
| 74 | - <td rowspan="3" style=" padding-top: 50px;">日期</td> | ||
| 75 | - <td rowspan="3" style=" padding-top: 50px;">公司</td> | ||
| 76 | - <td rowspan="3" style=" padding-top: 50px;">分公司</td> | ||
| 77 | - <td rowspan="3" style=" padding-top: 50px;">线路</td> | ||
| 78 | - <td rowspan="3" style=" padding-top: 50px;">路牌</td> | ||
| 79 | - <td rowspan="3" style=" padding-top: 50px;">发生时间</td> | ||
| 80 | - <td rowspan="3" style=" padding-top: 50px;">修改时间</td> | ||
| 81 | - <td colspan="2">配车</td> | ||
| 82 | - <td colspan="4">人员</td> | ||
| 83 | - <td rowspan="3" style=" padding-top: 50px;">原因</td> | ||
| 84 | - <td rowspan="3" style=" padding-top: 50px;">修改人</td> | 74 | + <td rowspan="3" style=" padding-top: 50px;">鏃ユ湡</td> |
| 75 | + <td rowspan="3" style=" padding-top: 50px;">鍏徃</td> | ||
| 76 | + <td rowspan="3" style=" padding-top: 50px;">鍒嗗叕鍙</td> | ||
| 77 | + <td rowspan="3" style=" padding-top: 50px;">绾胯矾</td> | ||
| 78 | + <td rowspan="3" style=" padding-top: 50px;">璺墝</td> | ||
| 79 | + <td rowspan="3" style=" padding-top: 50px;">鍙戠敓鏃堕棿</td> | ||
| 80 | + <td rowspan="3" style=" padding-top: 50px;">淇敼鏃堕棿</td> | ||
| 81 | + <td colspan="2">閰嶈溅</td> | ||
| 82 | + <td colspan="4">浜哄憳</td> | ||
| 83 | + <td rowspan="3" style=" padding-top: 50px;">鍘熷洜</td> | ||
| 84 | + <td rowspan="3" style=" padding-top: 50px;">淇敼浜</td> | ||
| 85 | </tr> | 85 | </tr> |
| 86 | <tr> | 86 | <tr> |
| 87 | - <td>计划</td> | ||
| 88 | - <td>实际</td> | ||
| 89 | - <td colspan="2">计划</td> | ||
| 90 | - <td colspan="2">实际</td> | 87 | + <td>璁″垝</td> |
| 88 | + <td>瀹為檯</td> | ||
| 89 | + <td colspan="2">璁″垝</td> | ||
| 90 | + <td colspan="2">瀹為檯</td> | ||
| 91 | 91 | ||
| 92 | </tr> | 92 | </tr> |
| 93 | <tr> | 93 | <tr> |
| 94 | - <td>车号</td> | ||
| 95 | - <td>车号</td> | ||
| 96 | - <td>工号</td> | ||
| 97 | - <td>人员</td> | ||
| 98 | - <td>工号</td> | ||
| 99 | - <td>人员</td> | 94 | + <td>杞﹀彿</td> |
| 95 | + <td>杞﹀彿</td> | ||
| 96 | + <td>宸ュ彿</td> | ||
| 97 | + <td>浜哄憳</td> | ||
| 98 | + <td>宸ュ彿</td> | ||
| 99 | + <td>浜哄憳</td> | ||
| 100 | </tr> | 100 | </tr> |
| 101 | </thead> | 101 | </thead> |
| 102 | <tbody> | 102 | <tbody> |
| @@ -111,7 +111,7 @@ | @@ -111,7 +111,7 @@ | ||
| 111 | 111 | ||
| 112 | <script> | 112 | <script> |
| 113 | $(function(){ | 113 | $(function(){ |
| 114 | - // 关闭左侧栏 | 114 | + // 鍏抽棴宸︿晶鏍 |
| 115 | if (!$('body').hasClass('page-sidebar-closed')) | 115 | if (!$('body').hasClass('page-sidebar-closed')) |
| 116 | $('.menu-toggler.sidebar-toggler').click(); | 116 | $('.menu-toggler.sidebar-toggler').click(); |
| 117 | 117 | ||
| @@ -148,13 +148,13 @@ | @@ -148,13 +148,13 @@ | ||
| 148 | }, | 148 | }, |
| 149 | language: { | 149 | language: { |
| 150 | noResults: function(){ | 150 | noResults: function(){ |
| 151 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | 151 | + return '<span style="color:red;font-size: 12px;">娌℃湁鎼滅储鍒扮嚎璺紒</span>'; |
| 152 | }, | 152 | }, |
| 153 | inputTooShort : function(e) { | 153 | inputTooShort : function(e) { |
| 154 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | 154 | + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 杈撳叆绾胯矾鎼滅储绾胯矾</span>'; |
| 155 | }, | 155 | }, |
| 156 | searching : function() { | 156 | searching : function() { |
| 157 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | 157 | + return '<span style="color:gray;font-size: 12px;"> 姝e湪鎼滅储绾胯矾...</span>'; |
| 158 | } | 158 | } |
| 159 | } | 159 | } |
| 160 | }); | 160 | }); |
| @@ -182,20 +182,20 @@ | @@ -182,20 +182,20 @@ | ||
| 182 | } | 182 | } |
| 183 | obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | 183 | obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); |
| 184 | }); | 184 | }); |
| 185 | - // 把数据填充到模版中 | 185 | + // 鎶婃暟鎹~鍏呭埌妯$増涓 |
| 186 | var tbodyHtml = template('changetochange',{list:result}); | 186 | var tbodyHtml = template('changetochange',{list:result}); |
| 187 | - // 把渲染好的模版html文本追加到表格中 | 187 | + // 鎶婃覆鏌撳ソ鐨勬ā鐗坔tml鏂囨湰杩藉姞鍒拌〃鏍间腑 |
| 188 | $('#forms tbody').html(tbodyHtml); | 188 | $('#forms tbody').html(tbodyHtml); |
| 189 | }) | 189 | }) |
| 190 | 190 | ||
| 191 | }else{ | 191 | }else{ |
| 192 | - alert("请选择时间范围!"); | 192 | + alert("璇烽夋嫨鏃堕棿鑼冨洿!"); |
| 193 | } | 193 | } |
| 194 | }); | 194 | }); |
| 195 | 195 | ||
| 196 | $("#export").on("click",function(){ | 196 | $("#export").on("click",function(){ |
| 197 | $post('/mcy_export/changetochangeExport',{startDate:startDate,endDate:endDate,type:'export'},function(result){ | 197 | $post('/mcy_export/changetochangeExport',{startDate:startDate,endDate:endDate,type:'export'},function(result){ |
| 198 | - window.open("/downloadFile/download?fileName=换人换车情况日统计"+moment(startDate).format("YYYYMMDD")); | 198 | + window.open("/downloadFile/download?fileName=鎹汉鎹㈣溅鎯呭喌鏃ョ粺璁"+moment(startDate).format("YYYYMMDD")); |
| 199 | }); | 199 | }); |
| 200 | }); | 200 | }); |
| 201 | }); | 201 | }); |
| @@ -222,7 +222,7 @@ | @@ -222,7 +222,7 @@ | ||
| 222 | {{/each}} | 222 | {{/each}} |
| 223 | {{if list.length == 0}} | 223 | {{if list.length == 0}} |
| 224 | <tr> | 224 | <tr> |
| 225 | - <td colspan="15"><h6 class="muted">没有找到相关数据</h6></td> | 225 | + <td colspan="15"><h6 class="muted">娌℃湁鎵惧埌鐩稿叧鏁版嵁</h6></td> |
| 226 | </tr> | 226 | </tr> |
| 227 | {{/if}} | 227 | {{/if}} |
| 228 | </script> | 228 | </script> |
src/main/resources/static/pages/oil/list.html
| 1 | <div class="page-head"> | 1 | <div class="page-head"> |
| 2 | - <div class="page-title"> | ||
| 3 | - <h1>进出场存油量</h1> | ||
| 4 | - </div> | 2 | + <div class="page-title"> |
| 3 | + <h1>进出场存油量</h1> | ||
| 4 | + </div> | ||
| 5 | </div> | 5 | </div> |
| 6 | 6 | ||
| 7 | <ul class="page-breadcrumb breadcrumb"> | 7 | <ul class="page-breadcrumb breadcrumb"> |
| 8 | - <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li> | ||
| 9 | - <li><span class="active">用油管理</span> <i class="fa fa-circle"></i></li> | ||
| 10 | - <li><span class="active">进出场存油量</span></li> | 8 | + <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li> |
| 9 | + <li><span class="active">用油管理</span> <i class="fa fa-circle"></i></li> | ||
| 10 | + <li><span class="active">进出场存油量</span></li> | ||
| 11 | </ul> | 11 | </ul> |
| 12 | 12 | ||
| 13 | -<div class="row"> | ||
| 14 | - <div class="col-md-12"> | ||
| 15 | - <!-- Begin: life time stats --> | ||
| 16 | - <div class="portlet light portlet-fit portlet-datatable bordered"> | ||
| 17 | - <div class="portlet-title"> | ||
| 18 | - <div class="caption"> | ||
| 19 | - <i class="fa fa-fire-extinguisher"></i> <span | ||
| 20 | - class="caption-subject font-dark sbold uppercase">进出场存油量表</span> | ||
| 21 | - </div> | ||
| 22 | - <div class="actions"> | ||
| 23 | - <a class="btn btn-circle blue" href="add.html" data-pjax><i class="fa fa-plus"></i> 添加</a> | ||
| 24 | -<!-- <button type="button" class="btn btn-circle blue" id="removeButton"><i class="fa fa-trash-o"></i> 删除</button> --> | ||
| 25 | - <button type="button" class="btn btn-circle blue" id="sortButton"><i class="fa fa-minus-square"></i> 拆分/保存</button> | ||
| 26 | - <!-- <button type="button" class="btn btn-circle red" disabled="disabled" id="removeButton"><i class="fa fa-trash"></i> 删除用户</button> --> | ||
| 27 | - <div class="btn-group"> | ||
| 28 | - <a class="btn red btn-outline btn-circle" href="javascript:;" | ||
| 29 | - data-toggle="dropdown"> <i class="fa fa-share"></i> <span | ||
| 30 | - class="hidden-xs"> 系统工具 </span> <i class="fa fa-angle-down"></i> | ||
| 31 | - </a> | ||
| 32 | - <ul class="dropdown-menu pull-right" id="datatable_ajax_tools"> | ||
| 33 | - <li><a href="javascript:;" data-action="0" | ||
| 34 | - class="tool-action" id="obtain"> <i class="fa fa-hourglass-half"></i> 获取加/存油信息 | ||
| 35 | - </a></li> | ||
| 36 | - <li><a href="javascript:;" data-action="1" | ||
| 37 | - class="tool-action" id="outAndIn"> <i class="fa fa-pencil"></i> 油耗计算(进场=出场) | ||
| 38 | - </a></li> | ||
| 39 | - <li><a href="javascript:;" id="checkYl" data-action="3" | ||
| 40 | - class="tool-action"> <i class="fa fa-gg-circle"></i> | ||
| 41 | - 核对加注量(有加油无里程) | ||
| 42 | - </a></li> | ||
| 43 | - <li class="divider"></li> | ||
| 44 | - <li><a href="javascript:;" data-action="3" | ||
| 45 | - class="tool-action" id="export"> <i class="fa fa-file-excel-o"></i> | ||
| 46 | - 导出Excel | ||
| 47 | - </a></li> | ||
| 48 | - </ul> | ||
| 49 | - </div> | ||
| 50 | - </div> | ||
| 51 | - </div> | ||
| 52 | - <div class="portlet-body"> | ||
| 53 | - <div class="table-container" style="margin-top: 10px"> | ||
| 54 | - <table | ||
| 55 | - class="table table-striped table-bordered table-hover table-checkable" | ||
| 56 | - id="datatable_ylb"> | ||
| 57 | - <thead> | ||
| 58 | - <tr role="row" class="filter"> | ||
| 59 | - <td colspan="3"> | ||
| 60 | - <!-- 公司: | ||
| 61 | - <select name="ssgsdm" id="ssgsdm"> | ||
| 62 | - <option value="">请选择...</option> | ||
| 63 | - <option value="1">可用</option> | ||
| 64 | - <option value="0">禁用</option> | ||
| 65 | - </select> --> | 13 | +<div class="row" id="ll_oil_list"> |
| 14 | + <div class="col-md-12"> | ||
| 15 | + <!-- Begin: life time stats --> | ||
| 16 | + <div class="portlet light portlet-fit portlet-datatable bordered"> | ||
| 17 | + <div class="portlet-title"> | ||
| 18 | + <div class="caption"> | ||
| 19 | + <i class="fa fa-fire-extinguisher"></i> <span | ||
| 20 | + class="caption-subject font-dark sbold uppercase">进出场存油量表</span> | ||
| 21 | + </div> | ||
| 22 | + <div class="actions"> | ||
| 23 | + <a class="btn btn-circle blue" href="add.html" data-pjax><i class="fa fa-plus"></i> 添加</a> | ||
| 24 | + <!-- <button type="button" class="btn btn-circle blue" id="removeButton"><i class="fa fa-trash-o"></i> 删除</button> --> | ||
| 25 | + <button type="button" class="btn btn-circle blue" id="sortButton"><i class="fa fa-minus-square"></i> | ||
| 26 | + 拆分/保存 | ||
| 27 | + </button> | ||
| 28 | + <!-- <button type="button" class="btn btn-circle red" disabled="disabled" id="removeButton"><i class="fa fa-trash"></i> 删除用户</button> --> | ||
| 29 | + <div class="btn-group"> | ||
| 30 | + <a class="btn red btn-outline btn-circle" href="javascript:;" | ||
| 31 | + data-toggle="dropdown"> <i class="fa fa-share"></i> <span | ||
| 32 | + class="hidden-xs"> 系统工具 </span> <i class="fa fa-angle-down"></i> | ||
| 33 | + </a> | ||
| 34 | + <ul class="dropdown-menu pull-right" id="datatable_ajax_tools"> | ||
| 35 | + <li><a href="javascript:;" data-action="0" | ||
| 36 | + class="tool-action" id="obtain"> <i class="fa fa-hourglass-half"></i> 获取加/存油信息 | ||
| 37 | + </a></li> | ||
| 38 | + <li><a href="javascript:;" data-action="1" | ||
| 39 | + class="tool-action" id="outAndIn"> <i class="fa fa-pencil"></i> 油耗计算(进场=出场) | ||
| 40 | + </a></li> | ||
| 41 | + <li><a href="javascript:;" id="checkYl" data-action="3" | ||
| 42 | + class="tool-action"> <i class="fa fa-gg-circle"></i> | ||
| 43 | + 核对加注量(有加油无里程) | ||
| 44 | + </a></li> | ||
| 45 | + <li class="divider"></li> | ||
| 46 | + <li><a href="javascript:;" data-action="3" | ||
| 47 | + class="tool-action" id="export"> <i class="fa fa-file-excel-o"></i> | ||
| 48 | + 导出Excel | ||
| 49 | + </a></li> | ||
| 50 | + </ul> | ||
| 51 | + </div> | ||
| 52 | + </div> | ||
| 53 | + </div> | ||
| 54 | + <div class="portlet-body"> | ||
| 55 | + <div class="table-container" style="margin-top: 10px"> | ||
| 56 | + <table | ||
| 57 | + class="table table-striped table-bordered table-hover table-checkable" | ||
| 58 | + id="datatable_ylb"> | ||
| 59 | + <thead> | ||
| 60 | + <tr role="row" class="filter"> | ||
| 61 | + <td colspan="3"> | ||
| 62 | + <!-- 公司: | ||
| 63 | + <select name="ssgsdm" id="ssgsdm"> | ||
| 64 | + <option value="">请选择...</option> | ||
| 65 | + <option value="1">可用</option> | ||
| 66 | + <option value="0">禁用</option> | ||
| 67 | + </select> --> | ||
| 66 | </td> | 68 | </td> |
| 67 | - <td > | ||
| 68 | -<!-- <select name="fgsdm"> --> | ||
| 69 | -<!-- <option value="">请选择...</option> --> | ||
| 70 | -<!-- <option value="1">可用</option> --> | ||
| 71 | -<!-- <option value="0">禁用</option> --> | ||
| 72 | -<!-- </select> --> | ||
| 73 | - | ||
| 74 | - 日期: | ||
| 75 | - </td> | ||
| 76 | - <td colspan="2"> | ||
| 77 | - <input type="text" style="width: 80px" name="rq" id="rq"/> | ||
| 78 | - </td> | ||
| 79 | - <td colspan="2"> | ||
| 80 | - 线路: | ||
| 81 | - </td> | ||
| 82 | - <td colspan="3"> | ||
| 83 | - <select class="form-control" name="xlbm_eq" id="xlbm" style="width: 120px;"></select> | ||
| 84 | - | ||
| 85 | - </td> | ||
| 86 | - <td colspan="2"> | ||
| 87 | - 内部编码: | ||
| 88 | - </td> | ||
| 89 | - <td colspan="3"> | ||
| 90 | - <select class="form-control" name="nbbm_eq" id="nbbm" style="width: 120px;" ></select> | ||
| 91 | - </td> | ||
| 92 | - <td colspan="4"> | ||
| 93 | - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" > | ||
| 94 | - <i class="fa fa-search"></i> 搜索</button> | ||
| 95 | - | ||
| 96 | - <button class="btn btn-sm red btn-outline filter-cancel"> | ||
| 97 | - <i class="fa fa-times"></i> 重置</button> | ||
| 98 | - | ||
| 99 | - </td> | ||
| 100 | - </tr> | ||
| 101 | - <tr role="row" class="heading"> | ||
| 102 | - <th width="2%">#</th> | ||
| 103 | - <th width="8%">日期</th> | ||
| 104 | - <th width="5%">公司</th> | ||
| 105 | - <th width="8%">线路</th> | ||
| 106 | - <th width="5%">自编号</th> | ||
| 107 | - <th width="6%">驾驶员</th> | ||
| 108 | - <th width="4%">加油量</th> | ||
| 109 | - <th width="5%">出场公里</th> | ||
| 110 | - <th width="4%">进场公里</th> | ||
| 111 | - <th width="4%">出场存油</th> | ||
| 112 | - <th width="4%">进场存油</th> | ||
| 113 | - <th width="5%">油耗</th> | ||
| 114 | - <th width="5%">燃油类型</th> | ||
| 115 | - <th width="4%">尿素</th> | ||
| 116 | - <th width="5%">耗损原因</th> | ||
| 117 | - <th width="5%">耗损油量</th> | ||
| 118 | - <th width="5%">当日总里程</th> | ||
| 119 | - <th width="5%">数据类型</th> | ||
| 120 | - <th width="5%">百公里油耗</th> | ||
| 121 | -<!-- <th width="5%">操作</th> --> | ||
| 122 | - </tr> | ||
| 123 | - </thead> | ||
| 124 | - <tbody></tbody> | ||
| 125 | - </table> | ||
| 126 | - <div style="text-align: right;"> | ||
| 127 | - <ul id="pagination" class="pagination"></ul> | ||
| 128 | - </div> | ||
| 129 | - </div> | ||
| 130 | - </div> | ||
| 131 | - </div> | ||
| 132 | - </div> | 69 | + <td> |
| 70 | + <!-- <select name="fgsdm"> --> | ||
| 71 | + <!-- <option value="">请选择...</option> --> | ||
| 72 | + <!-- <option value="1">可用</option> --> | ||
| 73 | + <!-- <option value="0">禁用</option> --> | ||
| 74 | + <!-- </select> --> | ||
| 75 | + | ||
| 76 | + 日期: | ||
| 77 | + </td> | ||
| 78 | + <td colspan="2"> | ||
| 79 | + <input type="text" style="width: 80px" name="rq" id="rq"/> | ||
| 80 | + </td> | ||
| 81 | + <td colspan="2"> | ||
| 82 | + 线路: | ||
| 83 | + </td> | ||
| 84 | + <td colspan="3"> | ||
| 85 | + <select class="form-control" name="xlbm_eq" id="xlbm" style="width: 120px;"></select> | ||
| 86 | + | ||
| 87 | + </td> | ||
| 88 | + <td colspan="2"> | ||
| 89 | + 内部编码: | ||
| 90 | + </td> | ||
| 91 | + <td colspan="3"> | ||
| 92 | + <select class="form-control" name="nbbm_eq" id="nbbm" style="width: 120px;"></select> | ||
| 93 | + </td> | ||
| 94 | + <td colspan="4"> | ||
| 95 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom"> | ||
| 96 | + <i class="fa fa-search"></i> 搜索 | ||
| 97 | + </button> | ||
| 98 | + | ||
| 99 | + <button class="btn btn-sm red btn-outline filter-cancel"> | ||
| 100 | + <i class="fa fa-times"></i> 重置 | ||
| 101 | + </button> | ||
| 102 | + | ||
| 103 | + </td> | ||
| 104 | + </tr> | ||
| 105 | + <tr role="row" class="heading"> | ||
| 106 | + <th width="2%">#</th> | ||
| 107 | + <th width="8%">日期</th> | ||
| 108 | + <th width="5%">公司</th> | ||
| 109 | + <th width="8%">线路</th> | ||
| 110 | + <th width="5%">自编号</th> | ||
| 111 | + <th width="6%">驾驶员</th> | ||
| 112 | + <th width="4%">加油量</th> | ||
| 113 | + <th width="5%">出场公里</th> | ||
| 114 | + <th width="4%">进场公里</th> | ||
| 115 | + <th width="4%">出场存油</th> | ||
| 116 | + <th width="4%">进场存油</th> | ||
| 117 | + <th width="5%">油耗</th> | ||
| 118 | + <th width="5%">燃油类型</th> | ||
| 119 | + <th width="4%">尿素</th> | ||
| 120 | + <th width="5%">耗损原因</th> | ||
| 121 | + <th width="5%">耗损油量</th> | ||
| 122 | + <th width="5%">当日总里程</th> | ||
| 123 | + <th width="5%">数据类型</th> | ||
| 124 | + <th width="5%">百公里油耗</th> | ||
| 125 | + <!-- <th width="5%">操作</th> --> | ||
| 126 | + </tr> | ||
| 127 | + </thead> | ||
| 128 | + <tbody></tbody> | ||
| 129 | + </table> | ||
| 130 | + <div style="text-align: right;"> | ||
| 131 | + <ul id="pagination" class="pagination"></ul> | ||
| 132 | + </div> | ||
| 133 | + </div> | ||
| 134 | + </div> | ||
| 135 | + </div> | ||
| 136 | + </div> | ||
| 133 | </div> | 137 | </div> |
| 134 | 138 | ||
| 135 | <script id="ylb_list_temp" type="text/html"> | 139 | <script id="ylb_list_temp" type="text/html"> |
| 136 | -{{each list as obj i}} | ||
| 137 | -<tr> | ||
| 138 | - <td style="vertical-align: middle;"> | ||
| 139 | - <input type="radio" name="id" class="group-checkable icheck" data-id="{{obj.id}}"> | ||
| 140 | - </td> | ||
| 141 | - | ||
| 142 | - <td> | ||
| 143 | -{{obj.rq}} | ||
| 144 | - </td> | ||
| 145 | - <td> | ||
| 146 | - {{obj.gsname}} | ||
| 147 | - </td> | ||
| 148 | - <td> | ||
| 149 | - {{obj.xlname}} | ||
| 150 | - </td> | ||
| 151 | - <td> | ||
| 152 | - {{obj.nbbm}} | ||
| 153 | - </td> | ||
| 154 | - <td> | ||
| 155 | - {{obj.jsy}} | ||
| 156 | - </td> | ||
| 157 | - <td> | ||
| 158 | - {{obj.jzl}} | ||
| 159 | - </td> | ||
| 160 | - <td> | ||
| 161 | - {{obj.czlc}} | ||
| 162 | - </td> | ||
| 163 | - <td> | ||
| 164 | - {{obj.jzlc}} | ||
| 165 | - </td> | ||
| 166 | - <td> | ||
| 167 | - {{obj.czyl}} | ||
| 168 | - </td> | ||
| 169 | - <td> | ||
| 170 | -<a href="javascript:startOptJzylLink('jzyl{{obj.id}}')" id="jzyl{{obj.id}}" > | ||
| 171 | - {{obj.jzyl}} | ||
| 172 | -</a> | ||
| 173 | - </td> | ||
| 174 | - <td> | ||
| 175 | - {{obj.yh}} | ||
| 176 | - </td> | ||
| 177 | - <td> | ||
| 178 | - {{obj.rylx}} | ||
| 179 | - </td> | ||
| 180 | - <td> | ||
| 181 | - {{obj.ns}} | ||
| 182 | - </td> | ||
| 183 | - <td> | ||
| 184 | - {{obj.shyy}} | ||
| 185 | - </td> | ||
| 186 | - <td> | ||
| 187 | - {{obj.sh}} | ||
| 188 | - </td> | ||
| 189 | - <td> | ||
| 190 | - {{obj.zlc}} | ||
| 191 | - </td> | ||
| 192 | - <td> | ||
| 193 | - {{obj.yhlx}} | ||
| 194 | - </td> | ||
| 195 | - <td> | ||
| 196 | - {{obj.bglyh}} | ||
| 197 | - </td> | ||
| 198 | - <td> | ||
| 199 | - <!--<a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>--> | ||
| 200 | - </td> | ||
| 201 | -</tr> | ||
| 202 | -{{/each}} | ||
| 203 | -{{if list.length == 0}} | ||
| 204 | -<tr> | ||
| 205 | - <td colspan=20><h6 class="muted">没有找到相关数据</h6></td> | ||
| 206 | -</tr> | ||
| 207 | -{{/if}} | 140 | + {{each list as obj i}} |
| 141 | + <tr> | ||
| 142 | + <td style="vertical-align: middle;"> | ||
| 143 | + <input type="radio" name="id" class="group-checkable icheck" data-id="{{obj.id}}"> | ||
| 144 | + </td> | ||
| 145 | + | ||
| 146 | + <td> | ||
| 147 | + {{obj.rq}} | ||
| 148 | + </td> | ||
| 149 | + <td> | ||
| 150 | + {{obj.gsname}} | ||
| 151 | + </td> | ||
| 152 | + <td> | ||
| 153 | + {{obj.xlname}} | ||
| 154 | + </td> | ||
| 155 | + <td> | ||
| 156 | + {{obj.nbbm}} | ||
| 157 | + </td> | ||
| 158 | + <td> | ||
| 159 | + {{obj.jsy}} | ||
| 160 | + </td> | ||
| 161 | + <td> | ||
| 162 | + {{obj.jzl}} | ||
| 163 | + </td> | ||
| 164 | + <td> | ||
| 165 | + {{obj.czlc}} | ||
| 166 | + </td> | ||
| 167 | + <td> | ||
| 168 | + {{obj.jzlc}} | ||
| 169 | + </td> | ||
| 170 | + <td> | ||
| 171 | + {{obj.czyl}} | ||
| 172 | + </td> | ||
| 173 | + <td> | ||
| 174 | + <a data-id="{{obj.id}}" href="javascript:;" class="in_carpark_jzyl"> | ||
| 175 | + {{obj.jzyl}} | ||
| 176 | + </a> | ||
| 177 | + </td> | ||
| 178 | + <td> | ||
| 179 | + {{obj.yh}} | ||
| 180 | + </td> | ||
| 181 | + <td> | ||
| 182 | + {{obj.rylx}} | ||
| 183 | + </td> | ||
| 184 | + <td> | ||
| 185 | + {{obj.ns}} | ||
| 186 | + </td> | ||
| 187 | + <td> | ||
| 188 | + {{obj.shyy}} | ||
| 189 | + </td> | ||
| 190 | + <td> | ||
| 191 | + {{obj.sh}} | ||
| 192 | + </td> | ||
| 193 | + <td> | ||
| 194 | + {{obj.zlc}} | ||
| 195 | + </td> | ||
| 196 | + <td> | ||
| 197 | + {{obj.yhlx}} | ||
| 198 | + </td> | ||
| 199 | + <td> | ||
| 200 | + {{obj.bglyh}} | ||
| 201 | + </td> | ||
| 202 | + <td> | ||
| 203 | + <!--<a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>--> | ||
| 204 | + </td> | ||
| 205 | + </tr> | ||
| 206 | + {{/each}} | ||
| 207 | + {{if list.length == 0}} | ||
| 208 | + <tr> | ||
| 209 | + <td colspan=20><h6 class="muted">没有找到相关数据</h6></td> | ||
| 210 | + </tr> | ||
| 211 | + {{/if}} | ||
| 208 | </script> | 212 | </script> |
| 209 | 213 | ||
| 210 | <script> | 214 | <script> |
| 211 | -$(function(){ | ||
| 212 | - $("#checkYl").on('click',function(){ | ||
| 213 | - console.log("核对加注量"); | ||
| 214 | - if($("#rq").val()!=""){ | ||
| 215 | - var cells = $('tr.filter')[0].cells | ||
| 216 | - ,params = {} | ||
| 217 | - ,name; | ||
| 218 | - $.each(cells, function(i, cell){ | ||
| 219 | - var items = $('input,select', cell); | ||
| 220 | - for(var j = 0, item; item = items[j++];){ | ||
| 221 | - name = $(item).attr('name'); | ||
| 222 | - if(name){ | ||
| 223 | - params[name] = $(item).val(); | ||
| 224 | - } | ||
| 225 | - } | ||
| 226 | - }); | ||
| 227 | - $get('/ylb/checkYl', params, function(){ | ||
| 228 | - jsDoQuery(null,true); | ||
| 229 | - }); | ||
| 230 | - }else{ | ||
| 231 | - layer.msg('请选择日期.'); | ||
| 232 | - } | ||
| 233 | - }) | ||
| 234 | - | ||
| 235 | - //进场等于出场 | ||
| 236 | - $("#outAndIn").on('click',function(){ | ||
| 237 | - console.log("进场油量等于出场油量"); | ||
| 238 | - if($("#rq").val()!=""){ | ||
| 239 | - var cells = $('tr.filter')[0].cells | ||
| 240 | - ,params = {} | ||
| 241 | - ,name; | ||
| 242 | - $.each(cells, function(i, cell){ | ||
| 243 | - var items = $('input,select', cell); | ||
| 244 | - for(var j = 0, item; item = items[j++];){ | ||
| 245 | - name = $(item).attr('name'); | ||
| 246 | - if(name){ | ||
| 247 | - params[name] = $(item).val(); | ||
| 248 | - } | ||
| 249 | - } | ||
| 250 | - }); | ||
| 251 | - $get('/ylb/outAndIn', params, function(){ | ||
| 252 | - jsDoQuery(null,true); | ||
| 253 | - }); | ||
| 254 | - }else{ | ||
| 255 | - layer.msg('请选择日期.'); | ||
| 256 | - } | ||
| 257 | - }) | ||
| 258 | - //拆分 | ||
| 259 | - $("#sortButton").on('click',function(){ | ||
| 260 | - console.log("拆分油量"); | ||
| 261 | - if($("#rq").val()!=""){ | ||
| 262 | - var id = $('input.icheck:checked').data('id'); | ||
| 263 | - if(typeof(id)=='undefined'){ | ||
| 264 | - layer.msg("请选择一行进行拆分"); | ||
| 265 | - }else{ | ||
| 266 | - //获取输入的进场存油 | ||
| 267 | - var jzyl=$("#jzyl"+id).html(); | ||
| 268 | - var params = {}; | ||
| 269 | - params['jzyl']=jzyl; | ||
| 270 | - params['id']=id; | ||
| 271 | - $get('/ylb/sort', params, function(){ | ||
| 272 | - jsDoQuery(null,true); | ||
| 273 | - }); | ||
| 274 | - | ||
| 275 | - } | ||
| 276 | - }else{ | ||
| 277 | - layer.msg('请选择日期.'); | ||
| 278 | - } | ||
| 279 | - }) | ||
| 280 | - //获取加存信息 | ||
| 281 | - $("#obtain").on('click', function(){ | ||
| 282 | - console.log("获取加存"); | ||
| 283 | - if($("#rq").val()!=""){ | ||
| 284 | - var cells = $('tr.filter')[0].cells | ||
| 285 | - ,params = {} | ||
| 286 | - ,name; | ||
| 287 | - $.each(cells, function(i, cell){ | ||
| 288 | - var items = $('input,select', cell); | ||
| 289 | - for(var j = 0, item; item = items[j++];){ | ||
| 290 | - name = $(item).attr('name'); | ||
| 291 | - if(name){ | ||
| 292 | - params[name] = $(item).val(); | ||
| 293 | - } | ||
| 294 | - } | ||
| 295 | - }); | ||
| 296 | - $get('/ylb/obtain', params, function(){ | ||
| 297 | - jsDoQuery(params,true); | ||
| 298 | - }); | ||
| 299 | - }else{ | ||
| 300 | - layer.msg('请选择日期.'); | ||
| 301 | - } | ||
| 302 | - | ||
| 303 | - }) | ||
| 304 | - $("#rq").datetimepicker({ | ||
| 305 | - format : 'YYYY-MM-DD', | ||
| 306 | - locale : 'zh-cn' | ||
| 307 | - }); | ||
| 308 | - | ||
| 309 | - if($("#rq").val()!=""){ | ||
| 310 | - jsDoQuery(null,true); | ||
| 311 | - } | ||
| 312 | - var page = 0, initPagination; | ||
| 313 | - var icheckOptions = { | ||
| 314 | - radioClass: 'iradio_square-blue icheck', | ||
| 315 | - increaseArea: '20%' | ||
| 316 | - } | ||
| 317 | - | ||
| 318 | - //重置 | ||
| 319 | - $('tr.filter .filter-cancel').on('click', function(){ | ||
| 320 | - $('tr.filter input, select').val('').change(); | ||
| 321 | - }); | ||
| 322 | - | ||
| 323 | - //提交 | ||
| 324 | - $('tr.filter .filter-submit').on('click', function(){ | ||
| 325 | - if($("#rq").val()!=""){ | ||
| 326 | - var cells = $('tr.filter')[0].cells | ||
| 327 | - ,params = {} | ||
| 328 | - ,name; | ||
| 329 | - $.each(cells, function(i, cell){ | ||
| 330 | - var items = $('input,select', cell); | ||
| 331 | - for(var j = 0, item; item = items[j++];){ | ||
| 332 | - name = $(item).attr('name'); | ||
| 333 | - if(name){ | ||
| 334 | - params[name] = $(item).val(); | ||
| 335 | - } | ||
| 336 | - } | ||
| 337 | - }); | ||
| 338 | - page = 0; | ||
| 339 | - jsDoQuery(params, true); | ||
| 340 | - }else{ | ||
| 341 | - layer.msg('请选择日期.'); | ||
| 342 | - } | ||
| 343 | - }); | ||
| 344 | - | ||
| 345 | - /* | ||
| 346 | - * 获取数据 p: 要提交的参数, pagination: 是否重新分页 | ||
| 347 | - */ | ||
| 348 | - function jsDoQuery(p, pagination){ | ||
| 349 | - var params = {}; | ||
| 350 | - if(p) | ||
| 351 | - params = p; | ||
| 352 | - //更新时间排序 | ||
| 353 | - console.log(params); | ||
| 354 | - params['order'] = 'nbbm'; | ||
| 355 | - params['page'] = page; | ||
| 356 | - params['rq']=$("#rq").val(); | ||
| 357 | - var i = layer.load(2); | ||
| 358 | - console.log(params); | ||
| 359 | - $get('/ylb' ,params, function(data){ | ||
| 360 | - $.each(data.content, function(i, obj) { | ||
| 361 | - obj.rq = moment(obj.rq).format("YYYY-MM-DD"); | 215 | + $(function () { |
| 216 | + //var id = 15; | ||
| 217 | + //$('.in_carpark_jzyl[data-id='+id+']', '#ll_oil_list') | ||
| 218 | + | ||
| 219 | + $("#checkYl").on('click', function () { | ||
| 220 | + console.log("核对加注量"); | ||
| 221 | + if ($("#rq").val() != "") { | ||
| 222 | + var cells = $('tr.filter')[0].cells | ||
| 223 | + , params = {} | ||
| 224 | + , name; | ||
| 225 | + $.each(cells, function (i, cell) { | ||
| 226 | + var items = $('input,select', cell); | ||
| 227 | + for (var j = 0, item; item = items[j++];) { | ||
| 228 | + name = $(item).attr('name'); | ||
| 229 | + if (name) { | ||
| 230 | + params[name] = $(item).val(); | ||
| 231 | + } | ||
| 232 | + } | ||
| 233 | + }); | ||
| 234 | + $get('/ylb/checkYl', params, function () { | ||
| 235 | + jsDoQuery(null, true); | ||
| 236 | + }); | ||
| 237 | + } else { | ||
| 238 | + layer.msg('请选择日期.'); | ||
| 239 | + } | ||
| 240 | + }) | ||
| 241 | + | ||
| 242 | + //进场等于出场 | ||
| 243 | + $("#outAndIn").on('click', function () { | ||
| 244 | + console.log("进场油量等于出场油量"); | ||
| 245 | + if ($("#rq").val() != "") { | ||
| 246 | + var cells = $('tr.filter')[0].cells | ||
| 247 | + , params = {} | ||
| 248 | + , name; | ||
| 249 | + $.each(cells, function (i, cell) { | ||
| 250 | + var items = $('input,select', cell); | ||
| 251 | + for (var j = 0, item; item = items[j++];) { | ||
| 252 | + name = $(item).attr('name'); | ||
| 253 | + if (name) { | ||
| 254 | + params[name] = $(item).val(); | ||
| 255 | + } | ||
| 256 | + } | ||
| 257 | + }); | ||
| 258 | + $get('/ylb/outAndIn', params, function () { | ||
| 259 | + jsDoQuery(null, true); | ||
| 260 | + }); | ||
| 261 | + } else { | ||
| 262 | + layer.msg('请选择日期.'); | ||
| 263 | + } | ||
| 264 | + }) | ||
| 265 | + //拆分 | ||
| 266 | + $("#sortButton").on('click', function () { | ||
| 267 | + if ($("#rq").val() != "") { | ||
| 268 | + var id = $('input.icheck:checked').data('id'); | ||
| 269 | + | ||
| 270 | + if (typeof(id) == 'undefined') { | ||
| 271 | + layer.msg("请选择一行进行拆分"); | ||
| 272 | + } else { | ||
| 273 | + //获取输入的进场存油 | ||
| 274 | + var jzyl = $('.in_carpark_jzyl[data-id='+id+']', '#ll_oil_list').html(); | ||
| 275 | + // $("#jzyl" + id).html(); | ||
| 276 | + console.log(jzyl); | ||
| 277 | + var params = {}; | ||
| 278 | + params['jzyl'] = jzyl; | ||
| 279 | + params['id'] = id; | ||
| 280 | + $get('/ylb/sort', params, function () { | ||
| 281 | + jsDoQuery(null, true); | ||
| 282 | + }); | ||
| 283 | + | ||
| 284 | + } | ||
| 285 | + } else { | ||
| 286 | + layer.msg('请选择日期.'); | ||
| 287 | + } | ||
| 288 | + }) | ||
| 289 | + //获取加存信息 | ||
| 290 | + $("#obtain").on('click', function () { | ||
| 291 | + console.log("获取加存"); | ||
| 292 | + if ($("#rq").val() != "") { | ||
| 293 | + var cells = $('tr.filter')[0].cells | ||
| 294 | + , params = {} | ||
| 295 | + , name; | ||
| 296 | + $.each(cells, function (i, cell) { | ||
| 297 | + var items = $('input,select', cell); | ||
| 298 | + for (var j = 0, item; item = items[j++];) { | ||
| 299 | + name = $(item).attr('name'); | ||
| 300 | + if (name) { | ||
| 301 | + params[name] = $(item).val(); | ||
| 302 | + } | ||
| 303 | + } | ||
| 304 | + }); | ||
| 305 | + $get('/ylb/obtain', params, function () { | ||
| 306 | + jsDoQuery(params, true); | ||
| 307 | + }); | ||
| 308 | + } else { | ||
| 309 | + layer.msg('请选择日期.'); | ||
| 310 | + } | ||
| 311 | + | ||
| 312 | + }) | ||
| 313 | + $("#rq").datetimepicker({ | ||
| 314 | + format: 'YYYY-MM-DD', | ||
| 315 | + locale: 'zh-cn' | ||
| 316 | + }); | ||
| 317 | + | ||
| 318 | + if ($("#rq").val() != "") { | ||
| 319 | + jsDoQuery(null, true); | ||
| 320 | + } | ||
| 321 | + var page = 0, initPagination; | ||
| 322 | + var icheckOptions = { | ||
| 323 | + radioClass: 'iradio_square-blue icheck', | ||
| 324 | + increaseArea: '20%' | ||
| 325 | + } | ||
| 326 | + | ||
| 327 | + //重置 | ||
| 328 | + $('tr.filter .filter-cancel').on('click', function () { | ||
| 329 | + $('tr.filter input, select').val('').change(); | ||
| 330 | + }); | ||
| 331 | + | ||
| 332 | + //提交 | ||
| 333 | + $('tr.filter .filter-submit').on('click', function () { | ||
| 334 | + if ($("#rq").val() != "") { | ||
| 335 | + var cells = $('tr.filter')[0].cells | ||
| 336 | + , params = {} | ||
| 337 | + , name; | ||
| 338 | + $.each(cells, function (i, cell) { | ||
| 339 | + var items = $('input,select', cell); | ||
| 340 | + for (var j = 0, item; item = items[j++];) { | ||
| 341 | + name = $(item).attr('name'); | ||
| 342 | + if (name) { | ||
| 343 | + params[name] = $(item).val(); | ||
| 344 | + } | ||
| 345 | + } | ||
| 346 | + }); | ||
| 347 | + page = 0; | ||
| 348 | + jsDoQuery(params, true); | ||
| 349 | + } else { | ||
| 350 | + layer.msg('请选择日期.'); | ||
| 351 | + } | ||
| 352 | + }); | ||
| 353 | + | ||
| 354 | + /* | ||
| 355 | + * 获取数据 p: 要提交的参数, pagination: 是否重新分页 | ||
| 356 | + */ | ||
| 357 | + function jsDoQuery(p, pagination) { | ||
| 358 | + var params = {}; | ||
| 359 | + if (p) | ||
| 360 | + params = p; | ||
| 361 | + //更新时间排序 | ||
| 362 | + params['order'] = 'nbbm'; | ||
| 363 | + params['page'] = page; | ||
| 364 | + params['rq'] = $("#rq").val(); | ||
| 365 | + var i = layer.load(2); | ||
| 366 | + $get('/ylb', params, function (data) { | ||
| 367 | + $.each(data.content, function (i, obj) { | ||
| 368 | + obj.rq = moment(obj.rq).format("YYYY-MM-DD"); | ||
| 369 | + }); | ||
| 370 | + var bodyHtm = template('ylb_list_temp', {list: data.content}); | ||
| 371 | + | ||
| 372 | + $('#datatable_ylb tbody').html(bodyHtm) | ||
| 373 | + .find('.icheck').iCheck(icheckOptions) | ||
| 374 | + .on('ifChanged', iCheckChange); | ||
| 375 | + if (pagination && data.content.length > 0) { | ||
| 376 | + //重新分页 | ||
| 377 | + initPagination = true; | ||
| 378 | + showPagination(data); | ||
| 379 | + } | ||
| 380 | + layer.close(i); | ||
| 381 | + | ||
| 382 | + startOptJzylLink($('#ll_oil_list .in_carpark_jzyl')); | ||
| 383 | + }); | ||
| 384 | + } | ||
| 385 | + | ||
| 386 | + //改变状态 | ||
| 387 | + function startOptJzylLink(es) { | ||
| 388 | + es.editable({ | ||
| 389 | + type: 'text', | ||
| 390 | + placement: 'right', | ||
| 391 | + width: 100, | ||
| 392 | + display: false, | ||
| 393 | + validate: function (value) { | ||
| 394 | + if (!value) | ||
| 395 | + return '值不能为空!'; | ||
| 396 | + if (isNaN(value)) | ||
| 397 | + return '只能为数字!'; | ||
| 398 | + if (value < 0) | ||
| 399 | + return '值不能小于0!'; | ||
| 400 | + }, | ||
| 401 | + inputclass: 'form-control input-medium input-edtable-sm' | ||
| 402 | + }) | ||
| 403 | + .on('save', function (e, params) { | ||
| 404 | + $(this).text(params.newValue); | ||
| 405 | + }); | ||
| 406 | + } | ||
| 407 | + | ||
| 408 | + function iCheckChange() { | ||
| 409 | + var tr = $(this).parents('tr'); | ||
| 410 | + if (this.checked) | ||
| 411 | + tr.addClass('row-active'); | ||
| 412 | + else | ||
| 413 | + tr.removeClass('row-active'); | ||
| 414 | + | ||
| 415 | + /* if($('#datatable_resource input.icheck:checked').length == 1) | ||
| 416 | + $('#removeButton').removeAttr('disabled'); | ||
| 417 | + else | ||
| 418 | + $('#removeButton').attr('disabled', 'disabled'); */ | ||
| 419 | + } | ||
| 420 | + | ||
| 421 | + function showPagination(data) { | ||
| 422 | + //分页 | ||
| 423 | + $('#pagination').jqPaginator({ | ||
| 424 | + totalPages: data.totalPages, | ||
| 425 | + visiblePages: 6, | ||
| 426 | + currentPage: page + 1, | ||
| 427 | + first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>', | ||
| 428 | + prev: '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>', | ||
| 429 | + next: '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>', | ||
| 430 | + last: '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>', | ||
| 431 | + page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>', | ||
| 432 | + onPageChange: function (num, type) { | ||
| 433 | + if (initPagination) { | ||
| 434 | + initPagination = false; | ||
| 435 | + return; | ||
| 436 | + } | ||
| 437 | + | ||
| 438 | + var cells = $('tr.filter')[0].cells | ||
| 439 | + , params = {} | ||
| 440 | + , name; | ||
| 441 | + $.each(cells, function (i, cell) { | ||
| 442 | + var items = $('input,select', cell); | ||
| 443 | + for (var j = 0, item; item = items[j++];) { | ||
| 444 | + name = $(item).attr('name'); | ||
| 445 | + if (name) { | ||
| 446 | + params[name] = $(item).val(); | ||
| 447 | + } | ||
| 448 | + } | ||
| 449 | + }); | ||
| 450 | + page = num - 1; | ||
| 451 | + jsDoQuery(params, true); | ||
| 452 | + } | ||
| 453 | + }); | ||
| 454 | + } | ||
| 455 | + | ||
| 456 | + | ||
| 457 | + //删除 | ||
| 458 | + $('#removeButton').on('click', function () { | ||
| 459 | + if ($(this).attr('disabled')) | ||
| 460 | + return; | ||
| 461 | + | ||
| 462 | + var id = $('input.icheck:checked').data('id'); | ||
| 463 | + removeConfirm('确定要删除选中的数据?', '/resource/' + id, function () { | ||
| 464 | + $('tr.filter .filter-submit').click(); | ||
| 362 | }); | 465 | }); |
| 363 | - var bodyHtm = template('ylb_list_temp', {list: data.content}); | 466 | + }); |
| 467 | + | ||
| 468 | + //搜索线路 | ||
| 469 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 470 | + var data=[]; | ||
| 364 | 471 | ||
| 365 | - $('#datatable_ylb tbody').html(bodyHtm) | ||
| 366 | - .find('.icheck').iCheck(icheckOptions) | ||
| 367 | - .on('ifChanged', iCheckChange); | ||
| 368 | - if(pagination && data.content.length > 0){ | ||
| 369 | - //重新分页 | ||
| 370 | - initPagination = true; | ||
| 371 | - showPagination(data); | 472 | + for(var code in result){ |
| 473 | + data.push({id: code, text: result[code]}); | ||
| 372 | } | 474 | } |
| 373 | - layer.close(i); | ||
| 374 | - }); | ||
| 375 | - } | ||
| 376 | - | ||
| 377 | - function iCheckChange(){ | ||
| 378 | - var tr = $(this).parents('tr'); | ||
| 379 | - if(this.checked) | ||
| 380 | - tr.addClass('row-active'); | ||
| 381 | - else | ||
| 382 | - tr.removeClass('row-active'); | ||
| 383 | - | ||
| 384 | - /* if($('#datatable_resource input.icheck:checked').length == 1) | ||
| 385 | - $('#removeButton').removeAttr('disabled'); | ||
| 386 | - else | ||
| 387 | - $('#removeButton').attr('disabled', 'disabled'); */ | ||
| 388 | - } | ||
| 389 | - | ||
| 390 | - function showPagination(data){ | ||
| 391 | - //分页 | ||
| 392 | - $('#pagination').jqPaginator({ | ||
| 393 | - totalPages: data.totalPages, | ||
| 394 | - visiblePages: 6, | ||
| 395 | - currentPage: page + 1, | ||
| 396 | - first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>', | ||
| 397 | - prev: '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>', | ||
| 398 | - next: '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>', | ||
| 399 | - last: '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>', | ||
| 400 | - page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>', | ||
| 401 | - onPageChange: function (num, type) { | ||
| 402 | - if(initPagination){ | ||
| 403 | - initPagination = false; | ||
| 404 | - return; | ||
| 405 | - } | ||
| 406 | - | ||
| 407 | - var cells = $('tr.filter')[0].cells | ||
| 408 | - ,params = {} | ||
| 409 | - ,name; | ||
| 410 | - $.each(cells, function(i, cell){ | ||
| 411 | - var items = $('input,select', cell); | ||
| 412 | - for(var j = 0, item; item = items[j++];){ | ||
| 413 | - name = $(item).attr('name'); | ||
| 414 | - if(name){ | ||
| 415 | - params[name] = $(item).val(); | ||
| 416 | - } | ||
| 417 | - } | ||
| 418 | - }); | ||
| 419 | - page = num - 1; | ||
| 420 | - jsDoQuery(params, true); | ||
| 421 | - } | ||
| 422 | - }); | ||
| 423 | - } | ||
| 424 | - | ||
| 425 | - | ||
| 426 | - //删除 | ||
| 427 | - $('#removeButton').on('click', function(){ | ||
| 428 | - if($(this).attr('disabled')) | ||
| 429 | - return; | ||
| 430 | - | ||
| 431 | - var id = $('input.icheck:checked').data('id'); | ||
| 432 | - removeConfirm('确定要删除选中的数据?', '/resource/' + id ,function(){ | ||
| 433 | - $('tr.filter .filter-submit').click(); | ||
| 434 | - }); | ||
| 435 | - }); | ||
| 436 | - | ||
| 437 | - //搜索线路 | ||
| 438 | - $('#xlbm').select2({ | ||
| 439 | - placeholder: '搜索线路...', | ||
| 440 | - ajax: { | ||
| 441 | - url: '/realSchedule/findLine', | ||
| 442 | - type: 'post', | ||
| 443 | - dataType: 'json', | ||
| 444 | - delay: 150, | ||
| 445 | - data: function(params){ | ||
| 446 | - return{line: params.term}; | ||
| 447 | - }, | ||
| 448 | - processResults: function (data) { | ||
| 449 | - return { | ||
| 450 | - results: data | ||
| 451 | - }; | ||
| 452 | - }, | ||
| 453 | - cache: true | ||
| 454 | - }, | ||
| 455 | - templateResult: function(repo){ | ||
| 456 | - if (repo.loading) return repo.text; | ||
| 457 | - var h = '<span>'+repo.text+'</span>'; | ||
| 458 | - return h; | ||
| 459 | - }, | ||
| 460 | - escapeMarkup: function (markup) { return markup; }, | ||
| 461 | - minimumInputLength: 1, | ||
| 462 | - templateSelection: function(repo){ | ||
| 463 | - return repo.text; | ||
| 464 | - }, | ||
| 465 | - language: { | ||
| 466 | - noResults: function(){ | ||
| 467 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 468 | - }, | ||
| 469 | - inputTooShort : function(e) { | ||
| 470 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 471 | - }, | ||
| 472 | - searching : function() { | ||
| 473 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 474 | - } | ||
| 475 | - } | ||
| 476 | - }); | ||
| 477 | - | ||
| 478 | - $('#nbbm').select2({ | ||
| 479 | - placeholder: '搜索车辆...', | ||
| 480 | - ajax: { | ||
| 481 | - url: '/realSchedule/sreachVehic', | ||
| 482 | - dataType: 'json', | ||
| 483 | - delay: 150, | ||
| 484 | - data: function(params){ | ||
| 485 | - return{nbbm: params.term}; | ||
| 486 | - }, | ||
| 487 | - processResults: function (data) { | ||
| 488 | - return { | ||
| 489 | - results: data | ||
| 490 | - }; | ||
| 491 | - }, | ||
| 492 | - cache: true | ||
| 493 | - }, | ||
| 494 | - templateResult: function(repo){ | ||
| 495 | - if (repo.loading) return repo.text; | ||
| 496 | - var h = '<span>'+repo.text+'</span>'; | ||
| 497 | - h += (repo.lineName?' <span class="select2-desc">'+repo.lineName+'</span>':''); | ||
| 498 | - return h; | ||
| 499 | - }, | ||
| 500 | - escapeMarkup: function (markup) { return markup; }, | ||
| 501 | - minimumInputLength: 1, | ||
| 502 | - templateSelection: function(repo){ | ||
| 503 | - return repo.text; | ||
| 504 | - }, | ||
| 505 | - language: { | ||
| 506 | - noResults: function(){ | ||
| 507 | - return '<span style="color:red;font-size: 12px;">没有搜索到车辆!</span>'; | ||
| 508 | - }, | ||
| 509 | - inputTooShort : function(e) { | ||
| 510 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入自编号搜索车辆</span>'; | ||
| 511 | - }, | ||
| 512 | - searching : function() { | ||
| 513 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索车辆...</span>'; | ||
| 514 | - } | ||
| 515 | - } | ||
| 516 | - }) | ||
| 517 | - | ||
| 518 | - | 475 | + console.log(data); |
| 476 | + initPinYinSelect2('#xlbm',data,''); | ||
| 477 | + | ||
| 478 | + }) | ||
| 479 | + | ||
| 480 | + $('#nbbm').select2({ | ||
| 481 | + placeholder: '搜索车辆...', | ||
| 482 | + ajax: { | ||
| 483 | + url: '/realSchedule/sreachVehic', | ||
| 484 | + dataType: 'json', | ||
| 485 | + delay: 150, | ||
| 486 | + data: function (params) { | ||
| 487 | + return {nbbm: params.term}; | ||
| 488 | + }, | ||
| 489 | + processResults: function (data) { | ||
| 490 | + return { | ||
| 491 | + results: data | ||
| 492 | + }; | ||
| 493 | + }, | ||
| 494 | + cache: true | ||
| 495 | + }, | ||
| 496 | + templateResult: function (repo) { | ||
| 497 | + if (repo.loading) return repo.text; | ||
| 498 | + var h = '<span>' + repo.text + '</span>'; | ||
| 499 | + h += (repo.lineName ? ' <span class="select2-desc">' + repo.lineName + '</span>' : ''); | ||
| 500 | + return h; | ||
| 501 | + }, | ||
| 502 | + escapeMarkup: function (markup) { | ||
| 503 | + return markup; | ||
| 504 | + }, | ||
| 505 | + minimumInputLength: 1, | ||
| 506 | + templateSelection: function (repo) { | ||
| 507 | + return repo.text; | ||
| 508 | + }, | ||
| 509 | + language: { | ||
| 510 | + noResults: function () { | ||
| 511 | + return '<span style="color:red;font-size: 12px;">没有搜索到车辆!</span>'; | ||
| 512 | + }, | ||
| 513 | + inputTooShort: function (e) { | ||
| 514 | + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入自编号搜索车辆</span>'; | ||
| 515 | + }, | ||
| 516 | + searching: function () { | ||
| 517 | + return '<span style="color:gray;font-size: 12px;"> 正在搜索车辆...</span>'; | ||
| 518 | + } | ||
| 519 | + } | ||
| 520 | + }) | ||
| 521 | + | ||
| 522 | + | ||
| 519 | //导出 | 523 | //导出 |
| 520 | - | ||
| 521 | - $("#export").on("click",function(){ | ||
| 522 | - if($("#rq").val()!=""){ | ||
| 523 | - var cells = $('tr.filter')[0].cells | ||
| 524 | - ,params = {} | ||
| 525 | - ,name; | ||
| 526 | - $.each(cells, function(i, cell){ | ||
| 527 | - var items = $('input,select', cell); | ||
| 528 | - for(var j = 0, item; item = items[j++];){ | ||
| 529 | - name = $(item).attr('name'); | ||
| 530 | - if(name){ | ||
| 531 | - params[name] = $(item).val(); | ||
| 532 | - } | ||
| 533 | - } | ||
| 534 | - }); | ||
| 535 | - console.log(params); | ||
| 536 | - $post('/ylb/listExport',params,function(result){ | ||
| 537 | - console.log(result); | ||
| 538 | - window.open("/downloadFile/download?fileName=进出场存油量"+moment($("#rq").val()).format("YYYYMMDD")); | ||
| 539 | - }); | ||
| 540 | - }else{ | ||
| 541 | - layer.msg('请选择日期.'); | ||
| 542 | - } | ||
| 543 | - }); | ||
| 544 | - | ||
| 545 | -}); | ||
| 546 | -//改变状态 | ||
| 547 | -function startOptJzylLink(id){ | ||
| 548 | - $('#'+id).editable({ | ||
| 549 | - type: 'text', | ||
| 550 | - placement: 'right', | ||
| 551 | - width:100, | ||
| 552 | - display: false, | ||
| 553 | - validate: function(value){ | ||
| 554 | - if(!value) | ||
| 555 | - return '值不能为空!'; | ||
| 556 | - if(isNaN(value)) | ||
| 557 | - return '只能为数字!'; | ||
| 558 | - if(value<0) | ||
| 559 | - return '值不能小于0!'; | ||
| 560 | - }, | ||
| 561 | - inputclass: 'form-control input-medium input-edtable-sm' | ||
| 562 | - }) | ||
| 563 | - .on('save', function(e, params) { | ||
| 564 | - $('#'+id).text(params.newValue); | ||
| 565 | - }); | ||
| 566 | - | ||
| 567 | - | ||
| 568 | - | ||
| 569 | -} | 524 | + |
| 525 | + $("#export").on("click", function () { | ||
| 526 | + if ($("#rq").val() != "") { | ||
| 527 | + var cells = $('tr.filter')[0].cells | ||
| 528 | + , params = {} | ||
| 529 | + , name; | ||
| 530 | + $.each(cells, function (i, cell) { | ||
| 531 | + var items = $('input,select', cell); | ||
| 532 | + for (var j = 0, item; item = items[j++];) { | ||
| 533 | + name = $(item).attr('name'); | ||
| 534 | + if (name) { | ||
| 535 | + params[name] = $(item).val(); | ||
| 536 | + } | ||
| 537 | + } | ||
| 538 | + }); | ||
| 539 | + console.log(params); | ||
| 540 | + $post('/ylb/listExport', params, function (result) { | ||
| 541 | + console.log(result); | ||
| 542 | + window.open("/downloadFile/download?fileName=进出场存油量" + moment($("#rq").val()).format("YYYYMMDD")); | ||
| 543 | + }); | ||
| 544 | + } else { | ||
| 545 | + layer.msg('请选择日期.'); | ||
| 546 | + } | ||
| 547 | + }); | ||
| 548 | + | ||
| 549 | + }); | ||
| 570 | </script> | 550 | </script> |
| 571 | \ No newline at end of file | 551 | \ No newline at end of file |
src/main/resources/static/pages/report/timetable/timetable.html
0 → 100644
| 1 | +<style type="text/css"> | ||
| 2 | + .table-bordered { | ||
| 3 | + border: 1px solid; } | ||
| 4 | + .table-bordered > thead > tr > th, | ||
| 5 | + .table-bordered > thead > tr > td, | ||
| 6 | + .table-bordered > tbody > tr > th, | ||
| 7 | + .table-bordered > tbody > tr > td, | ||
| 8 | + .table-bordered > tfoot > tr > th, | ||
| 9 | + .table-bordered > tfoot > tr > td { | ||
| 10 | + border: 1px solid; } | ||
| 11 | + .table-bordered > thead > tr > th, | ||
| 12 | + .table-bordered > thead > tr > td { | ||
| 13 | + border-bottom-width: 2px; } | ||
| 14 | + | ||
| 15 | + .table > tbody + tbody { | ||
| 16 | + border-top: 1px solid; } | ||
| 17 | +</style> | ||
| 18 | + | ||
| 19 | +<div class="page-head"> | ||
| 20 | + <div class="page-title"> | ||
| 21 | + <h1>行车时刻表统计表</h1> | ||
| 22 | + </div> | ||
| 23 | +</div> | ||
| 24 | + | ||
| 25 | +<div class="row"> | ||
| 26 | + <div class="col-md-12"> | ||
| 27 | + <div class="portlet light porttlet-fit bordered"> | ||
| 28 | + <div class="portlet-title"> | ||
| 29 | + <form class="form-inline" action=""> | ||
| 30 | + <div style="display: inline-block;"> | ||
| 31 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 32 | + <select class="form-control" name="line" id="line" style="width: 180px;"></select> | ||
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 35 | + <span class="item-label" style="width: 80px;">时间: </span> | ||
| 36 | + <input class="form-control" type="text" id="date" style="width: 180px;"/> | ||
| 37 | + </div> | ||
| 38 | + <div class="form-group"> | ||
| 39 | + <input class="btn btn-default" type="button" id="query" value="查询"/> | ||
| 40 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 41 | + </div> | ||
| 42 | + </form> | ||
| 43 | + </div> | ||
| 44 | + <div class="portlet-body"> | ||
| 45 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | ||
| 46 | + <label id="xlxq"></label> | ||
| 47 | + <table class="table table-bordered table-hover table-checkable" style="margin-bottom:5p" id="formsTime1"> | ||
| 48 | + <thead> | ||
| 49 | + <tr> | ||
| 50 | + <th colspan="10">行车时刻表统计表</th> | ||
| 51 | + </tr> | ||
| 52 | + <tr> | ||
| 53 | + <td align="center">配车</td> | ||
| 54 | + <td colspan="6" align="center">全日班次</td> | ||
| 55 | + <td colspan="3" align="center">计划里程</td> | ||
| 56 | + </tr> | ||
| 57 | + <tr> | ||
| 58 | + <td rowspan="2" style="text-align:center;vertical-align:middle;">合计</td> | ||
| 59 | + <td rowspan="2" style="text-align:center;vertical-align:middle;">全程 班次</td> | ||
| 60 | + <td rowspan="2" style="text-align:center;vertical-align:middle;">区间 班次</td> | ||
| 61 | + <td colspan="2" align="center">6:31-8:30</td> | ||
| 62 | + <td colspan="2" align="center">16:01-18:00</td> | ||
| 63 | + <td rowspan="2" style="text-align:center;vertical-align:middle;">总里程</td> | ||
| 64 | + <td rowspan="2" style="text-align:center;vertical-align:middle;">营业里程</td> | ||
| 65 | + <td rowspan="2" style="text-align:center;vertical-align:middle;">空驶里程</td> | ||
| 66 | + </tr> | ||
| 67 | + <tr> | ||
| 68 | + <td >全程</td> | ||
| 69 | + <td >区间</td> | ||
| 70 | + <td >全程</td> | ||
| 71 | + <td >区间</td> | ||
| 72 | + </tr> | ||
| 73 | + </thead> | ||
| 74 | + | ||
| 75 | + <tbody class="tbody_time_1"> | ||
| 76 | + | ||
| 77 | + </tbody> | ||
| 78 | + </table> | ||
| 79 | + | ||
| 80 | + <div class="portlet-body"> | ||
| 81 | + <div class="row"> | ||
| 82 | + <div class="col-md-4" id="divTime2"> | ||
| 83 | + <table class="table table-bordered table-hover table-checkable pre-scrollable" id="formsTime2"> | ||
| 84 | + <tr> | ||
| 85 | + <td colspan="2"> 营运车时 (计划班次的营运时间/公里)</td> | ||
| 86 | + </tr> | ||
| 87 | + <tr> | ||
| 88 | + <td colspan="2">营业里程/营运时间(小时)</td> | ||
| 89 | + | ||
| 90 | + </tr> | ||
| 91 | + <tr> | ||
| 92 | + <td align="center" width="50%"> | ||
| 93 | + 营运时间(时:分) | ||
| 94 | + </td> | ||
| 95 | + <td align="center"> | ||
| 96 | + 营运车速 | ||
| 97 | + </td> | ||
| 98 | + </tr> | ||
| 99 | + <tbody class="tbody_time_2"> | ||
| 100 | + | ||
| 101 | + </tbody> | ||
| 102 | + </table> | ||
| 103 | + | ||
| 104 | + </div> | ||
| 105 | + | ||
| 106 | + <div class="col-md-8" id="divTime3" > | ||
| 107 | + <table class="table table-bordered table-checkable" id="formsTime3"> | ||
| 108 | + <tr> | ||
| 109 | + <td colspan="8">站点配车</td> | ||
| 110 | + </tr> | ||
| 111 | + <tr> | ||
| 112 | + <td colspan="4" align="center">6:31—8:30</td> | ||
| 113 | + <td colspan="4" align="center">16:01—18:00</td> | ||
| 114 | + </tr> | ||
| 115 | + <tr> | ||
| 116 | + <td width="18%">全程站名</td> | ||
| 117 | + <td>配车</td> | ||
| 118 | + <td width="18%">区间站名</td> | ||
| 119 | + <td>配车</td> | ||
| 120 | + <td width="18%">全程站名</td> | ||
| 121 | + <td>配车</td> | ||
| 122 | + <td width="18%">区间站名</td> | ||
| 123 | + <td>配车</td> | ||
| 124 | + </tr> | ||
| 125 | + <tbody class="tbody_time_3"> | ||
| 126 | + | ||
| 127 | + </tbody> | ||
| 128 | + </table> | ||
| 129 | + </div> | ||
| 130 | + | ||
| 131 | + </div> | ||
| 132 | + </div> | ||
| 133 | + <div class="portlet-body"> | ||
| 134 | + <div class="row"> | ||
| 135 | + <div class="col-md-6" > | ||
| 136 | + <table class="table table-bordered table-checkable"> | ||
| 137 | + <tr> | ||
| 138 | + <td colspan="6">调度形式</td> | ||
| 139 | + </tr> | ||
| 140 | + <tr> | ||
| 141 | + <td colspan="3" align="center">上行向()站</td> | ||
| 142 | + <td colspan="3" align="center">下行向()站</td> | ||
| 143 | + </tr> | ||
| 144 | + <tr> | ||
| 145 | + <td>起讫站</td> | ||
| 146 | + <td>起讫时间</td> | ||
| 147 | + <td>班次</td> | ||
| 148 | + <td>起讫站</td> | ||
| 149 | + <td>起讫时间</td> | ||
| 150 | + <td>班次</td> | ||
| 151 | + </tr> | ||
| 152 | + <tbody class="tbody_time_4"> | ||
| 153 | + | ||
| 154 | + </tbody> | ||
| 155 | + </table> | ||
| 156 | + </div> | ||
| 157 | + <div class="col-md-6" > | ||
| 158 | + <table class="table table-bordered table-checkable" id="formsTime5"> | ||
| 159 | + <tr> | ||
| 160 | + <td colspan="5">全日分组行驶时间(区间除外)</td> | ||
| 161 | + </tr> | ||
| 162 | + <tr> | ||
| 163 | + <td width="25%" rowspan="2" style="text-align:center;vertical-align:middle;w">分组 时间</td> | ||
| 164 | + <td width="30%" colspan="2" style="text-align:center;vertical-align:middle;">实驶(分)</td> | ||
| 165 | + <td width="20%" rowspan="2" style="text-align:center;vertical-align:middle;">分圈 时间</td> | ||
| 166 | + <td width="25%" rowspan="2" style="text-align:center;vertical-align:middle;">车距</td> | ||
| 167 | + </tr> | ||
| 168 | + <tr> | ||
| 169 | + <td>上行</td> | ||
| 170 | + <td>下行</td> | ||
| 171 | + </tr> | ||
| 172 | + <tbody class="tbody_time_5"> | ||
| 173 | + | ||
| 174 | + </tbody> | ||
| 175 | + </table> | ||
| 176 | + </div> | ||
| 177 | + </div> | ||
| 178 | + </div> | ||
| 179 | + </div> | ||
| 180 | + </div> | ||
| 181 | + </div> | ||
| 182 | + </div> | ||
| 183 | +</div> | ||
| 184 | + | ||
| 185 | +<script> | ||
| 186 | + $(function(){ | ||
| 187 | + // 关闭左侧栏 | ||
| 188 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 189 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 190 | + | ||
| 191 | + $("#date").datetimepicker({ | ||
| 192 | + format : 'YYYY-MM-DD', | ||
| 193 | + locale : 'zh-cn' | ||
| 194 | + }); | ||
| 195 | + | ||
| 196 | + | ||
| 197 | + | ||
| 198 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 199 | + var data=[]; | ||
| 200 | + | ||
| 201 | + for(var code in result){ | ||
| 202 | + data.push({id: code, text: result[code]}); | ||
| 203 | + } | ||
| 204 | + initPinYinSelect2('#line',data,''); | ||
| 205 | + | ||
| 206 | + }) | ||
| 207 | + //查询 | ||
| 208 | + $("#query").on('click',function(){ | ||
| 209 | + var line = $("#line").val(); | ||
| 210 | + var xlName = $("#select2-line-container").html(); | ||
| 211 | + var date = $("#date").val(); | ||
| 212 | + if(date==null|| date==""){ | ||
| 213 | + layer.msg('请选择日期.'); | ||
| 214 | + }else if(line==null || line ==""){ | ||
| 215 | + layer.msg('请选择线路.'); | ||
| 216 | + }else{ | ||
| 217 | + $get('/report/tbodyTime1',{line:line,date:date},function(result){ | ||
| 218 | + var tbodyTime1 = template('tbodyTime1',{result}); | ||
| 219 | + $('#formsTime1 .tbody_time_1').html(tbodyTime1); | ||
| 220 | + }); | ||
| 221 | + $.get('/report/tbodyTime2',{line:line,date:date},function(result){ | ||
| 222 | + var tbodyTime2 = template('tbodyTime2',{result}); | ||
| 223 | + $('#formsTime2 .tbody_time_2').html(tbodyTime2); | ||
| 224 | + }); | ||
| 225 | + $.get('/report/tbodyTime3',{line:line,date:date},function(result){ | ||
| 226 | + | ||
| 227 | + var tbodyTime3 = template('tbodyTime3',{list:result}); | ||
| 228 | + $('#formsTime3 .tbody_time_3').html(tbodyTime3); | ||
| 229 | + var divTime3 = window.document.getElementById('formsTime3'); | ||
| 230 | + var divTime2 = window.document.getElementById('formsTime2'); | ||
| 231 | + console.log(divTime3.offsetHeight); | ||
| 232 | + divTime2.style.height=divTime3.offsetHeight+"px"; | ||
| 233 | + });/* | ||
| 234 | + $.get('/report/tbodyTime4',{line:line,date:date},function(result){ | ||
| 235 | + var scheduleDaily_3 = template('scheduleDaily_3',{list:result}); | ||
| 236 | + $('#forms .scheduleDaily_3').html(scheduleDaily_3); | ||
| 237 | + });*/ | ||
| 238 | + $.get('/report/tbodyTime5',{line:line,date:date},function(result){ | ||
| 239 | + var tbodyTime5 = template('tbodyTime5',{list:result}); | ||
| 240 | + $('#formsTime5 .tbody_time_5').html(tbodyTime5); | ||
| 241 | + }); | ||
| 242 | + } | ||
| 243 | + | ||
| 244 | + | ||
| 245 | + }); | ||
| 246 | + }); | ||
| 247 | +</script> | ||
| 248 | +<script type="text/html" id="tbodyTime1"> | ||
| 249 | + <tr> | ||
| 250 | + <td>{{result.pcs}}</td> | ||
| 251 | + <td>{{result.qcbc}}</td> | ||
| 252 | + <td>{{result.qjbc}}</td> | ||
| 253 | + <td>{{result.zqcbc}}</td> | ||
| 254 | + <td>{{result.zqjbc}}</td> | ||
| 255 | + <td>{{result.wqcbc}}</td> | ||
| 256 | + <td>{{result.wqjbc}}</td> | ||
| 257 | + <td>{{result.zlc}}</td> | ||
| 258 | + <td>{{result.yylc}}</td> | ||
| 259 | + <td>{{result.kslc}}</td> | ||
| 260 | + </tr> | ||
| 261 | +</script> | ||
| 262 | + | ||
| 263 | +<script type="text/html" id="tbodyTime2"> | ||
| 264 | + <tr> | ||
| 265 | + <td align="center">{{result.yysj}}</td> | ||
| 266 | + <td align="center">{{result.yycs}}</td> | ||
| 267 | + </tr> | ||
| 268 | +</script> | ||
| 269 | + | ||
| 270 | +<script type="text/html" id="tbodyTime3"> | ||
| 271 | +{{each list as result i}} | ||
| 272 | + <tr> | ||
| 273 | + <td align="center">{{result.zqcZm}}</td> | ||
| 274 | + <td align="center">{{result.zqcCls}}</td> | ||
| 275 | + <td align="center">{{result.zqjZm}}</td> | ||
| 276 | + <td align="center">{{result.zqjCls}}</td> | ||
| 277 | + <td align="center">{{result.wqcZm}}</td> | ||
| 278 | + <td align="center">{{result.wqcCls}}</td> | ||
| 279 | + <td align="center">{{result.wqjZm}}</td> | ||
| 280 | + <td align="center">{{result.wqjCls}}</td> | ||
| 281 | + </tr> | ||
| 282 | +{{/each}} | ||
| 283 | +{{if list.length == 0}} | ||
| 284 | + <tr> | ||
| 285 | + <td colspan="8"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 286 | + </tr> | ||
| 287 | + {{/if}} | ||
| 288 | +</script> | ||
| 289 | + | ||
| 290 | + | ||
| 291 | +<script type="text/html" id="tbodyTime5"> | ||
| 292 | +{{each list as result i}} | ||
| 293 | + <tr> | ||
| 294 | + <td align="center">{{result.sjd}}</td> | ||
| 295 | + <td align="center">{{result.sxsj}}</td> | ||
| 296 | + <td align="center">{{result.xxsj}}</td> | ||
| 297 | + <td align="center">{{result.fqsj}}</td> | ||
| 298 | + <td align="center">{{result.cj}}</td> | ||
| 299 | + </tr> | ||
| 300 | +{{/each}} | ||
| 301 | +{{if list.length == 0}} | ||
| 302 | + <tr> | ||
| 303 | + <td colspan="5"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 304 | + </tr> | ||
| 305 | + {{/if}} | ||
| 306 | +</script> |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/module.js
| 1 | -// 车辆基础信息维护 service controller等写在一起 | ||
| 2 | - | ||
| 3 | -angular.module('ScheduleApp').factory('BusInfoManageService', ['BusInfoManageService_g', function(service) { | ||
| 4 | - | ||
| 5 | - /** 当前的查询条件信息 */ | ||
| 6 | - var currentSearchCondition = { | ||
| 7 | - "carCode_like" : "", | ||
| 8 | - "insideCode_like" : "", | ||
| 9 | - "equipmentCode_like" : "", | ||
| 10 | - "carPlate_like" : "" | ||
| 11 | - }; | ||
| 12 | - | ||
| 13 | - /** 当前第几页 */ | ||
| 14 | - var currentPageNo = 1; | ||
| 15 | - return { | ||
| 16 | - /** | ||
| 17 | - * 获取查询条件信息, | ||
| 18 | - * 用于给controller用来和页面数据绑定。 | ||
| 19 | - */ | ||
| 20 | - getSearchCondition: function() { | ||
| 21 | - return currentSearchCondition; | ||
| 22 | - }, | ||
| 23 | - /** | ||
| 24 | - * 重置查询条件信息。 | ||
| 25 | - */ | ||
| 26 | - resetSearchCondition: function() { | ||
| 27 | - var key; | ||
| 28 | - for (key in currentSearchCondition) { | ||
| 29 | - currentSearchCondition[key] = undefined; | ||
| 30 | - } | ||
| 31 | - currentPageNo = 1; | ||
| 32 | - }, | ||
| 33 | - /** | ||
| 34 | - * 设置当前页码。 | ||
| 35 | - * @param cpn 从1开始,后台是从0开始的 | ||
| 36 | - */ | ||
| 37 | - setCurrentPageNo: function(cpn) { | ||
| 38 | - currentPageNo = cpn; | ||
| 39 | - }, | ||
| 40 | - /** | ||
| 41 | - * 组装查询参数,返回一个promise查询结果。 | ||
| 42 | - * @param params 查询参数 | ||
| 43 | - * @return 返回一个 promise | ||
| 44 | - */ | ||
| 45 | - getPage: function() { | ||
| 46 | - var params = currentSearchCondition; // 查询条件 | ||
| 47 | - params.page = currentPageNo - 1; // 服务端页码从0开始 | ||
| 48 | - return service.rest.list(params).$promise; | ||
| 49 | - }, | ||
| 50 | - /** | ||
| 51 | - * 获取明细信息。 | ||
| 52 | - * @param id 车辆id | ||
| 53 | - * @return 返回一个 promise | ||
| 54 | - */ | ||
| 55 | - getDetail: function(id) { | ||
| 56 | - var params = {id: id}; | ||
| 57 | - return service.rest.get(params).$promise; | ||
| 58 | - }, | ||
| 59 | - /** | ||
| 60 | - * 保存信息。 | ||
| 61 | - * @param obj 车辆详细信息 | ||
| 62 | - * @return 返回一个 promise | ||
| 63 | - */ | ||
| 64 | - saveDetail: function(obj) { | ||
| 65 | - return service.rest.save(obj).$promise; | ||
| 66 | - }, | ||
| 67 | - /** | ||
| 68 | - * 数据导出。 | ||
| 69 | - * @returns {*|Function|promise|n} | ||
| 70 | - */ | ||
| 71 | - dataExport: function() { | ||
| 72 | - return service.dataTools.dataExport().$promise; | ||
| 73 | - } | ||
| 74 | - }; | ||
| 75 | -}]); | ||
| 76 | - | ||
| 77 | -angular.module('ScheduleApp').controller('BusInfoManageCtrl', [ | ||
| 78 | - 'BusInfoManageService','$state', '$uibModal', 'FileDownload_g', | ||
| 79 | - function(busInfoManageService, $state, $uibModal, fileDownload) { | ||
| 80 | - var self = this; | ||
| 81 | - | ||
| 82 | - // 切换到form状态 | ||
| 83 | - self.goForm = function() { | ||
| 84 | - //alert("切换"); | ||
| 85 | - $state.go("busInfoManage_form"); | ||
| 86 | - }; | ||
| 87 | - | ||
| 88 | - // 导入excel | ||
| 89 | - self.importData = function() { | ||
| 90 | - // large方式弹出模态对话框 | ||
| 91 | - var modalInstance = $uibModal.open({ | ||
| 92 | - templateUrl: '/pages/scheduleApp/module/basicInfo/busInfoManage/dataImport.html', | ||
| 93 | - size: "lg", | ||
| 94 | - animation: true, | ||
| 95 | - backdrop: 'static', | ||
| 96 | - resolve: { | ||
| 97 | - // 可以传值给controller | ||
| 98 | - }, | ||
| 99 | - windowClass: 'center-modal', | ||
| 100 | - controller: "BusInfoManageToolsCtrl", | ||
| 101 | - controllerAs: "ctrl", | ||
| 102 | - bindToController: true | ||
| 103 | - }); | ||
| 104 | - modalInstance.result.then( | ||
| 105 | - function() { | ||
| 106 | - console.log("dataImport.html打开"); | ||
| 107 | - }, | ||
| 108 | - function() { | ||
| 109 | - console.log("dataImport.html消失"); | ||
| 110 | - } | ||
| 111 | - ); | ||
| 112 | - }; | ||
| 113 | - | ||
| 114 | - // 导出excel | ||
| 115 | - self.exportData = function() { | ||
| 116 | - busInfoManageService.dataExport().then( | ||
| 117 | - function(result) { | ||
| 118 | - fileDownload.downloadFile(result.data, "application/octet-stream", "车辆基础信息.xls"); | ||
| 119 | - }, | ||
| 120 | - function(result) { | ||
| 121 | - console.log("exportData failed:" + result); | ||
| 122 | - } | ||
| 123 | - ); | ||
| 124 | - }; | ||
| 125 | - }]); | ||
| 126 | - | ||
| 127 | -angular.module('ScheduleApp').controller('BusInfoManageToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | ||
| 128 | - var self = this; | ||
| 129 | - self.data = "TODO"; | ||
| 130 | - | ||
| 131 | - // 关闭窗口 | ||
| 132 | - self.close = function() { | ||
| 133 | - $modalInstance.dismiss("cancel"); | ||
| 134 | - }; | ||
| 135 | - | ||
| 136 | - self.clearInputFile = function() { | ||
| 137 | - angular.element("input[type='file']").val(null); | ||
| 138 | - }; | ||
| 139 | - | ||
| 140 | - // 上传文件组件 | ||
| 141 | - self.uploader = new FileUploader({ | ||
| 142 | - url: "/cars/dataImport", | ||
| 143 | - filters: [] // 用于过滤文件,比如只允许导入excel | ||
| 144 | - }); | ||
| 145 | - self.uploader.onAfterAddingFile = function(fileItem) | ||
| 146 | - { | ||
| 147 | - console.info('onAfterAddingFile', fileItem); | ||
| 148 | - console.log(self.uploader.queue.length); | ||
| 149 | - if (self.uploader.queue.length > 1) | ||
| 150 | - self.uploader.removeFromQueue(0); | ||
| 151 | - }; | ||
| 152 | - self.uploader.onSuccessItem = function(fileItem, response, status, headers) | ||
| 153 | - { | ||
| 154 | - console.info('onSuccessItem', fileItem, response, status, headers); | ||
| 155 | - }; | ||
| 156 | - self.uploader.onErrorItem = function(fileItem, response, status, headers) | ||
| 157 | - { | ||
| 158 | - console.info('onErrorItem', fileItem, response, status, headers); | ||
| 159 | - }; | ||
| 160 | - | ||
| 161 | -}]); | ||
| 162 | - | ||
| 163 | - | ||
| 164 | -angular.module('ScheduleApp').controller('BusInfoManageListCtrl', ['BusInfoManageService','$scope', function(busInfoManageService, $scope) { | ||
| 165 | - var self = this; | ||
| 166 | - self.pageInfo = { | ||
| 167 | - totalItems : 0, | ||
| 168 | - currentPage : 1, | ||
| 169 | - infos: [] | ||
| 170 | - }; | ||
| 171 | - | ||
| 172 | - // 初始创建的时候,获取一次列表数据 | ||
| 173 | - busInfoManageService.getPage().then( | ||
| 174 | - function(result) { | ||
| 175 | - self.pageInfo.totalItems = result.totalElements; | ||
| 176 | - self.pageInfo.currentPage = result.number + 1; | ||
| 177 | - self.pageInfo.infos = result.content; | ||
| 178 | - busInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 179 | - }, | ||
| 180 | - function(result) { | ||
| 181 | - alert("出错啦!"); | ||
| 182 | - } | ||
| 183 | - ); | ||
| 184 | - | ||
| 185 | - //$scope.$watch("ctrl.pageInfo.currentPage", function() { | ||
| 186 | - // alert("dfdfdf"); | ||
| 187 | - //}); | ||
| 188 | - | ||
| 189 | - // 翻页的时候调用 | ||
| 190 | - self.pageChanaged = function() { | ||
| 191 | - busInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); | ||
| 192 | - busInfoManageService.getPage().then( | ||
| 193 | - function(result) { | ||
| 194 | - self.pageInfo.totalItems = result.totalElements; | ||
| 195 | - self.pageInfo.currentPage = result.number + 1; | ||
| 196 | - self.pageInfo.infos = result.content; | ||
| 197 | - busInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 198 | - }, | ||
| 199 | - function(result) { | ||
| 200 | - alert("出错啦!"); | ||
| 201 | - } | ||
| 202 | - ); | ||
| 203 | - }; | ||
| 204 | - // 获取查询条件数据 | ||
| 205 | - self.searchCondition = function() { | ||
| 206 | - return busInfoManageService.getSearchCondition(); | ||
| 207 | - }; | ||
| 208 | - // 重置查询条件 | ||
| 209 | - self.resetSearchCondition = function() { | ||
| 210 | - busInfoManageService.resetSearchCondition(); | ||
| 211 | - self.pageInfo.currentPage = 1; | ||
| 212 | - self.pageChanaged(); | ||
| 213 | - }; | ||
| 214 | -}]); | ||
| 215 | - | ||
| 216 | -angular.module('ScheduleApp').controller('BusInfoManageFormCtrl', ['BusInfoManageService', '$stateParams', '$state', function(busInfoManageService, $stateParams, $state) { | ||
| 217 | - var self = this; | ||
| 218 | - | ||
| 219 | - // 报废日期 日期控件开关 | ||
| 220 | - self.scrapDateOpen = false; | ||
| 221 | - self.scrapDate_open = function() { | ||
| 222 | - self.scrapDateOpen = true; | ||
| 223 | - }; | ||
| 224 | - | ||
| 225 | - // 启用日期 日期控件开关 | ||
| 226 | - self.openDateOpen = false; | ||
| 227 | - self.openDate_open = function() { | ||
| 228 | - self.openDateOpen = true; | ||
| 229 | - }; | ||
| 230 | - // 取消日期 日期控件开关 | ||
| 231 | - self.closeDateOpen = false; | ||
| 232 | - self.closeDate_open = function() { | ||
| 233 | - self.closeDateOpen = true; | ||
| 234 | - }; | ||
| 235 | - | ||
| 236 | - // 欲保存的busInfo信息,绑定 | ||
| 237 | - self.busInfoForSave = {}; | ||
| 238 | - | ||
| 239 | - // 获取传过来的id,有的话就是修改,获取一遍数据 | ||
| 240 | - var id = $stateParams.id; | ||
| 241 | - if (id) { | ||
| 242 | - self.busInfoForSave.id = id; | ||
| 243 | - busInfoManageService.getDetail(id).then( | ||
| 244 | - function(result) { | ||
| 245 | - var key; | ||
| 246 | - for (key in result) { | ||
| 247 | - self.busInfoForSave[key] = result[key]; | ||
| 248 | - } | ||
| 249 | - }, | ||
| 250 | - function(result) { | ||
| 251 | - alert("出错啦!"); | ||
| 252 | - } | ||
| 253 | - ); | ||
| 254 | - } | ||
| 255 | - | ||
| 256 | - // 提交方法 | ||
| 257 | - self.submit = function() { | ||
| 258 | - console.log(self.busInfoForSave); | ||
| 259 | - //if (self.busInfoForSave) { | ||
| 260 | - // delete $stateParams.id; | ||
| 261 | - //} | ||
| 262 | - busInfoManageService.saveDetail(self.busInfoForSave).then( | ||
| 263 | - function(result) { | ||
| 264 | - // TODO:弹出框方式以后改 | ||
| 265 | - if (result.status == 'SUCCESS') { | ||
| 266 | - alert("保存成功!"); | ||
| 267 | - $state.go("busInfoManage"); | ||
| 268 | - } else { | ||
| 269 | - alert("保存异常!"); | ||
| 270 | - } | ||
| 271 | - }, | ||
| 272 | - function(result) { | ||
| 273 | - // TODO:弹出框方式以后改 | ||
| 274 | - alert("出错啦!"); | ||
| 275 | - } | ||
| 276 | - ); | ||
| 277 | - }; | ||
| 278 | - | ||
| 279 | -}]); | ||
| 280 | - | ||
| 281 | -angular.module('ScheduleApp').controller('BusInfoManageDetailCtrl', ['BusInfoManageService', '$stateParams', function(busInfoManageService, $stateParams) { | ||
| 282 | - var self = this; | ||
| 283 | - self.title = ""; | ||
| 284 | - self.busInfoForDetail = {}; | ||
| 285 | - self.busInfoForDetail.id = $stateParams.id; | ||
| 286 | - | ||
| 287 | - // 当转向到此页面时,就获取明细信息并绑定 | ||
| 288 | - busInfoManageService.getDetail($stateParams.id).then( | ||
| 289 | - function(result) { | ||
| 290 | - var key; | ||
| 291 | - for (key in result) { | ||
| 292 | - self.busInfoForDetail[key] = result[key]; | ||
| 293 | - } | ||
| 294 | - | ||
| 295 | - self.title = "车辆 " + self.busInfoForDetail.insideCode + " 详细信息"; | ||
| 296 | - }, | ||
| 297 | - function(result) { | ||
| 298 | - // TODO:弹出框方式以后改 | ||
| 299 | - alert("出错啦!"); | ||
| 300 | - } | ||
| 301 | - ); | 1 | +// 车辆基础信息维护 service controller等写在一起 |
| 2 | + | ||
| 3 | +angular.module('ScheduleApp').factory('BusInfoManageService', ['BusInfoManageService_g', function(service) { | ||
| 4 | + | ||
| 5 | + /** 当前的查询条件信息 */ | ||
| 6 | + var currentSearchCondition = { | ||
| 7 | + "carCode_like" : "", | ||
| 8 | + "insideCode_like" : "", | ||
| 9 | + "equipmentCode_like" : "", | ||
| 10 | + "carPlate_like" : "" | ||
| 11 | + }; | ||
| 12 | + | ||
| 13 | + /** 当前第几页 */ | ||
| 14 | + var currentPageNo = 1; | ||
| 15 | + return { | ||
| 16 | + /** | ||
| 17 | + * 获取查询条件信息, | ||
| 18 | + * 用于给controller用来和页面数据绑定。 | ||
| 19 | + */ | ||
| 20 | + getSearchCondition: function() { | ||
| 21 | + return currentSearchCondition; | ||
| 22 | + }, | ||
| 23 | + /** | ||
| 24 | + * 重置查询条件信息。 | ||
| 25 | + */ | ||
| 26 | + resetSearchCondition: function() { | ||
| 27 | + var key; | ||
| 28 | + for (key in currentSearchCondition) { | ||
| 29 | + currentSearchCondition[key] = undefined; | ||
| 30 | + } | ||
| 31 | + currentPageNo = 1; | ||
| 32 | + }, | ||
| 33 | + /** | ||
| 34 | + * 设置当前页码。 | ||
| 35 | + * @param cpn 从1开始,后台是从0开始的 | ||
| 36 | + */ | ||
| 37 | + setCurrentPageNo: function(cpn) { | ||
| 38 | + currentPageNo = cpn; | ||
| 39 | + }, | ||
| 40 | + /** | ||
| 41 | + * 组装查询参数,返回一个promise查询结果。 | ||
| 42 | + * @param params 查询参数 | ||
| 43 | + * @return 返回一个 promise | ||
| 44 | + */ | ||
| 45 | + getPage: function() { | ||
| 46 | + var params = currentSearchCondition; // 查询条件 | ||
| 47 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | ||
| 48 | + return service.rest.list(params).$promise; | ||
| 49 | + }, | ||
| 50 | + /** | ||
| 51 | + * 获取明细信息。 | ||
| 52 | + * @param id 车辆id | ||
| 53 | + * @return 返回一个 promise | ||
| 54 | + */ | ||
| 55 | + getDetail: function(id) { | ||
| 56 | + var params = {id: id}; | ||
| 57 | + return service.rest.get(params).$promise; | ||
| 58 | + }, | ||
| 59 | + /** | ||
| 60 | + * 保存信息。 | ||
| 61 | + * @param obj 车辆详细信息 | ||
| 62 | + * @return 返回一个 promise | ||
| 63 | + */ | ||
| 64 | + saveDetail: function(obj) { | ||
| 65 | + return service.rest.save(obj).$promise; | ||
| 66 | + }, | ||
| 67 | + /** | ||
| 68 | + * 数据导出。 | ||
| 69 | + * @returns {*|Function|promise|n} | ||
| 70 | + */ | ||
| 71 | + dataExport: function() { | ||
| 72 | + return service.dataTools.dataExport().$promise; | ||
| 73 | + } | ||
| 74 | + }; | ||
| 75 | +}]); | ||
| 76 | + | ||
| 77 | +angular.module('ScheduleApp').controller('BusInfoManageCtrl', [ | ||
| 78 | + 'BusInfoManageService','$state', '$uibModal', 'FileDownload_g', | ||
| 79 | + function(busInfoManageService, $state, $uibModal, fileDownload) { | ||
| 80 | + var self = this; | ||
| 81 | + | ||
| 82 | + // 切换到form状态 | ||
| 83 | + self.goForm = function() { | ||
| 84 | + //alert("切换"); | ||
| 85 | + $state.go("busInfoManage_form"); | ||
| 86 | + }; | ||
| 87 | + | ||
| 88 | + // 导入excel | ||
| 89 | + self.importData = function() { | ||
| 90 | + // large方式弹出模态对话框 | ||
| 91 | + var modalInstance = $uibModal.open({ | ||
| 92 | + templateUrl: '/pages/scheduleApp/module/basicInfo/busInfoManage/dataImport.html', | ||
| 93 | + size: "lg", | ||
| 94 | + animation: true, | ||
| 95 | + backdrop: 'static', | ||
| 96 | + resolve: { | ||
| 97 | + // 可以传值给controller | ||
| 98 | + }, | ||
| 99 | + windowClass: 'center-modal', | ||
| 100 | + controller: "BusInfoManageToolsCtrl", | ||
| 101 | + controllerAs: "ctrl", | ||
| 102 | + bindToController: true | ||
| 103 | + }); | ||
| 104 | + modalInstance.result.then( | ||
| 105 | + function() { | ||
| 106 | + console.log("dataImport.html打开"); | ||
| 107 | + }, | ||
| 108 | + function() { | ||
| 109 | + console.log("dataImport.html消失"); | ||
| 110 | + } | ||
| 111 | + ); | ||
| 112 | + }; | ||
| 113 | + | ||
| 114 | + // 导出excel | ||
| 115 | + self.exportData = function() { | ||
| 116 | + busInfoManageService.dataExport().then( | ||
| 117 | + function(result) { | ||
| 118 | + fileDownload.downloadFile(result.data, "application/octet-stream", "车辆基础信息.xls"); | ||
| 119 | + }, | ||
| 120 | + function(result) { | ||
| 121 | + console.log("exportData failed:" + result); | ||
| 122 | + } | ||
| 123 | + ); | ||
| 124 | + }; | ||
| 125 | + }]); | ||
| 126 | + | ||
| 127 | +angular.module('ScheduleApp').controller('BusInfoManageToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | ||
| 128 | + var self = this; | ||
| 129 | + self.data = "TODO"; | ||
| 130 | + | ||
| 131 | + // 关闭窗口 | ||
| 132 | + self.close = function() { | ||
| 133 | + $modalInstance.dismiss("cancel"); | ||
| 134 | + }; | ||
| 135 | + | ||
| 136 | + self.clearInputFile = function() { | ||
| 137 | + angular.element("input[type='file']").val(null); | ||
| 138 | + }; | ||
| 139 | + | ||
| 140 | + // 上传文件组件 | ||
| 141 | + self.uploader = new FileUploader({ | ||
| 142 | + url: "/cars/dataImport", | ||
| 143 | + filters: [] // 用于过滤文件,比如只允许导入excel | ||
| 144 | + }); | ||
| 145 | + self.uploader.onAfterAddingFile = function(fileItem) | ||
| 146 | + { | ||
| 147 | + console.info('onAfterAddingFile', fileItem); | ||
| 148 | + console.log(self.uploader.queue.length); | ||
| 149 | + if (self.uploader.queue.length > 1) | ||
| 150 | + self.uploader.removeFromQueue(0); | ||
| 151 | + }; | ||
| 152 | + self.uploader.onSuccessItem = function(fileItem, response, status, headers) | ||
| 153 | + { | ||
| 154 | + console.info('onSuccessItem', fileItem, response, status, headers); | ||
| 155 | + }; | ||
| 156 | + self.uploader.onErrorItem = function(fileItem, response, status, headers) | ||
| 157 | + { | ||
| 158 | + console.info('onErrorItem', fileItem, response, status, headers); | ||
| 159 | + }; | ||
| 160 | + | ||
| 161 | +}]); | ||
| 162 | + | ||
| 163 | + | ||
| 164 | +angular.module('ScheduleApp').controller('BusInfoManageListCtrl', ['BusInfoManageService','$scope', function(busInfoManageService, $scope) { | ||
| 165 | + var self = this; | ||
| 166 | + self.pageInfo = { | ||
| 167 | + totalItems : 0, | ||
| 168 | + currentPage : 1, | ||
| 169 | + infos: [] | ||
| 170 | + }; | ||
| 171 | + | ||
| 172 | + // 初始创建的时候,获取一次列表数据 | ||
| 173 | + busInfoManageService.getPage().then( | ||
| 174 | + function(result) { | ||
| 175 | + self.pageInfo.totalItems = result.totalElements; | ||
| 176 | + self.pageInfo.currentPage = result.number + 1; | ||
| 177 | + self.pageInfo.infos = result.content; | ||
| 178 | + busInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 179 | + }, | ||
| 180 | + function(result) { | ||
| 181 | + alert("出错啦!"); | ||
| 182 | + } | ||
| 183 | + ); | ||
| 184 | + | ||
| 185 | + //$scope.$watch("ctrl.pageInfo.currentPage", function() { | ||
| 186 | + // alert("dfdfdf"); | ||
| 187 | + //}); | ||
| 188 | + | ||
| 189 | + // 翻页的时候调用 | ||
| 190 | + self.pageChanaged = function() { | ||
| 191 | + busInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); | ||
| 192 | + busInfoManageService.getPage().then( | ||
| 193 | + function(result) { | ||
| 194 | + self.pageInfo.totalItems = result.totalElements; | ||
| 195 | + self.pageInfo.currentPage = result.number + 1; | ||
| 196 | + self.pageInfo.infos = result.content; | ||
| 197 | + busInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 198 | + }, | ||
| 199 | + function(result) { | ||
| 200 | + alert("出错啦!"); | ||
| 201 | + } | ||
| 202 | + ); | ||
| 203 | + }; | ||
| 204 | + // 获取查询条件数据 | ||
| 205 | + self.searchCondition = function() { | ||
| 206 | + return busInfoManageService.getSearchCondition(); | ||
| 207 | + }; | ||
| 208 | + // 重置查询条件 | ||
| 209 | + self.resetSearchCondition = function() { | ||
| 210 | + busInfoManageService.resetSearchCondition(); | ||
| 211 | + self.pageInfo.currentPage = 1; | ||
| 212 | + self.pageChanaged(); | ||
| 213 | + }; | ||
| 214 | +}]); | ||
| 215 | + | ||
| 216 | +angular.module('ScheduleApp').controller('BusInfoManageFormCtrl', ['BusInfoManageService', '$stateParams', '$state', function(busInfoManageService, $stateParams, $state) { | ||
| 217 | + var self = this; | ||
| 218 | + | ||
| 219 | + // 报废日期 日期控件开关 | ||
| 220 | + self.scrapDateOpen = false; | ||
| 221 | + self.scrapDate_open = function() { | ||
| 222 | + self.scrapDateOpen = true; | ||
| 223 | + }; | ||
| 224 | + | ||
| 225 | + // 启用日期 日期控件开关 | ||
| 226 | + self.openDateOpen = false; | ||
| 227 | + self.openDate_open = function() { | ||
| 228 | + self.openDateOpen = true; | ||
| 229 | + }; | ||
| 230 | + // 取消日期 日期控件开关 | ||
| 231 | + self.closeDateOpen = false; | ||
| 232 | + self.closeDate_open = function() { | ||
| 233 | + self.closeDateOpen = true; | ||
| 234 | + }; | ||
| 235 | + | ||
| 236 | + // 欲保存的busInfo信息,绑定 | ||
| 237 | + self.busInfoForSave = {}; | ||
| 238 | + | ||
| 239 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | ||
| 240 | + var id = $stateParams.id; | ||
| 241 | + if (id) { | ||
| 242 | + self.busInfoForSave.id = id; | ||
| 243 | + busInfoManageService.getDetail(id).then( | ||
| 244 | + function(result) { | ||
| 245 | + var key; | ||
| 246 | + for (key in result) { | ||
| 247 | + self.busInfoForSave[key] = result[key]; | ||
| 248 | + } | ||
| 249 | + }, | ||
| 250 | + function(result) { | ||
| 251 | + alert("出错啦!"); | ||
| 252 | + } | ||
| 253 | + ); | ||
| 254 | + } | ||
| 255 | + | ||
| 256 | + // 提交方法 | ||
| 257 | + self.submit = function() { | ||
| 258 | + console.log(self.busInfoForSave); | ||
| 259 | + //if (self.busInfoForSave) { | ||
| 260 | + // delete $stateParams.id; | ||
| 261 | + //} | ||
| 262 | + busInfoManageService.saveDetail(self.busInfoForSave).then( | ||
| 263 | + function(result) { | ||
| 264 | + // TODO:弹出框方式以后改 | ||
| 265 | + if (result.status == 'SUCCESS') { | ||
| 266 | + alert("保存成功!"); | ||
| 267 | + $state.go("busInfoManage"); | ||
| 268 | + } else { | ||
| 269 | + alert("保存异常!"); | ||
| 270 | + } | ||
| 271 | + }, | ||
| 272 | + function(result) { | ||
| 273 | + // TODO:弹出框方式以后改 | ||
| 274 | + alert("出错啦!"); | ||
| 275 | + } | ||
| 276 | + ); | ||
| 277 | + }; | ||
| 278 | + | ||
| 279 | +}]); | ||
| 280 | + | ||
| 281 | +angular.module('ScheduleApp').controller('BusInfoManageDetailCtrl', ['BusInfoManageService', '$stateParams', function(busInfoManageService, $stateParams) { | ||
| 282 | + var self = this; | ||
| 283 | + self.title = ""; | ||
| 284 | + self.busInfoForDetail = {}; | ||
| 285 | + self.busInfoForDetail.id = $stateParams.id; | ||
| 286 | + | ||
| 287 | + // 当转向到此页面时,就获取明细信息并绑定 | ||
| 288 | + busInfoManageService.getDetail($stateParams.id).then( | ||
| 289 | + function(result) { | ||
| 290 | + var key; | ||
| 291 | + for (key in result) { | ||
| 292 | + self.busInfoForDetail[key] = result[key]; | ||
| 293 | + } | ||
| 294 | + | ||
| 295 | + self.title = "车辆 " + self.busInfoForDetail.insideCode + " 详细信息"; | ||
| 296 | + }, | ||
| 297 | + function(result) { | ||
| 298 | + // TODO:弹出框方式以后改 | ||
| 299 | + alert("出错啦!"); | ||
| 300 | + } | ||
| 301 | + ); | ||
| 302 | }]); | 302 | }]); |
| 303 | \ No newline at end of file | 303 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/route.js
| 1 | -// ui route 配置 | ||
| 2 | - | ||
| 3 | -/** 车辆基础信息模块配置route */ | ||
| 4 | -ScheduleApp.config([ | ||
| 5 | - '$stateProvider', | ||
| 6 | - '$urlRouterProvider', | ||
| 7 | - function($stateProvider, $urlRouterProvider) { | ||
| 8 | - // 默认路由 | ||
| 9 | - //$urlRouterProvider.otherwise('/busConfig.html'); | ||
| 10 | - | ||
| 11 | - $stateProvider | ||
| 12 | - .state("busInfoManage", { // index页面 | ||
| 13 | - url: '/busInfoManage', | ||
| 14 | - views: { | ||
| 15 | - "": { | ||
| 16 | - templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/index.html' | ||
| 17 | - }, | ||
| 18 | - "busInfoManage_list@busInfoManage": { | ||
| 19 | - templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/list.html' | ||
| 20 | - } | ||
| 21 | - }, | ||
| 22 | - | ||
| 23 | - resolve: { | ||
| 24 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 25 | - return $ocLazyLoad.load({ | ||
| 26 | - name: 'busInfoManage_module', | ||
| 27 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 28 | - files: [ | ||
| 29 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 30 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 31 | - "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | ||
| 32 | - "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | ||
| 33 | - ] | ||
| 34 | - }); | ||
| 35 | - }] | ||
| 36 | - } | ||
| 37 | - }) | ||
| 38 | - .state("busInfoManage_form", { // 添加车辆form | ||
| 39 | - url: '/busInfoManage_form', | ||
| 40 | - views: { | ||
| 41 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/form.html'} | ||
| 42 | - }, | ||
| 43 | - resolve: { | ||
| 44 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 45 | - return $ocLazyLoad.load({ | ||
| 46 | - name: 'busInfoManage_form_module', | ||
| 47 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 48 | - files: [ | ||
| 49 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 50 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 51 | - "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | ||
| 52 | - ] | ||
| 53 | - }); | ||
| 54 | - }] | ||
| 55 | - } | ||
| 56 | - }) | ||
| 57 | - .state("busInfoManage_edit", { // 修改车辆form | ||
| 58 | - url: '/busInfoManage_edit/:id', | ||
| 59 | - views: { | ||
| 60 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/edit.html'} | ||
| 61 | - }, | ||
| 62 | - resolve: { | ||
| 63 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 64 | - return $ocLazyLoad.load({ | ||
| 65 | - name: 'busInfoManage_edit_module', | ||
| 66 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 67 | - files: [ | ||
| 68 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 69 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 70 | - "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | ||
| 71 | - ] | ||
| 72 | - }); | ||
| 73 | - }] | ||
| 74 | - } | ||
| 75 | - }) | ||
| 76 | - .state("busInfoManage_detail", { // 车辆详细信息 | ||
| 77 | - url: '/busInfoManage_detail/:id', | ||
| 78 | - views: { | ||
| 79 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/detail.html'} | ||
| 80 | - }, | ||
| 81 | - resolve: { | ||
| 82 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 83 | - return $ocLazyLoad.load({ | ||
| 84 | - name: 'busInfoManage_detail_module', | ||
| 85 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 86 | - files: [ | ||
| 87 | - "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | ||
| 88 | - ] | ||
| 89 | - }); | ||
| 90 | - }] | ||
| 91 | - } | ||
| 92 | - }) | ||
| 93 | - } | 1 | +// ui route 配置 |
| 2 | + | ||
| 3 | +/** 车辆基础信息模块配置route */ | ||
| 4 | +ScheduleApp.config([ | ||
| 5 | + '$stateProvider', | ||
| 6 | + '$urlRouterProvider', | ||
| 7 | + function($stateProvider, $urlRouterProvider) { | ||
| 8 | + // 默认路由 | ||
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | ||
| 10 | + | ||
| 11 | + $stateProvider | ||
| 12 | + .state("busInfoManage", { // index页面 | ||
| 13 | + url: '/busInfoManage', | ||
| 14 | + views: { | ||
| 15 | + "": { | ||
| 16 | + templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/index.html' | ||
| 17 | + }, | ||
| 18 | + "busInfoManage_list@busInfoManage": { | ||
| 19 | + templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/list.html' | ||
| 20 | + } | ||
| 21 | + }, | ||
| 22 | + | ||
| 23 | + resolve: { | ||
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 25 | + return $ocLazyLoad.load({ | ||
| 26 | + name: 'busInfoManage_module', | ||
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 28 | + files: [ | ||
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 31 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | ||
| 32 | + "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | ||
| 33 | + ] | ||
| 34 | + }); | ||
| 35 | + }] | ||
| 36 | + } | ||
| 37 | + }) | ||
| 38 | + .state("busInfoManage_form", { // 添加车辆form | ||
| 39 | + url: '/busInfoManage_form', | ||
| 40 | + views: { | ||
| 41 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/form.html'} | ||
| 42 | + }, | ||
| 43 | + resolve: { | ||
| 44 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 45 | + return $ocLazyLoad.load({ | ||
| 46 | + name: 'busInfoManage_form_module', | ||
| 47 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 48 | + files: [ | ||
| 49 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 50 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 51 | + "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | ||
| 52 | + ] | ||
| 53 | + }); | ||
| 54 | + }] | ||
| 55 | + } | ||
| 56 | + }) | ||
| 57 | + .state("busInfoManage_edit", { // 修改车辆form | ||
| 58 | + url: '/busInfoManage_edit/:id', | ||
| 59 | + views: { | ||
| 60 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/edit.html'} | ||
| 61 | + }, | ||
| 62 | + resolve: { | ||
| 63 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 64 | + return $ocLazyLoad.load({ | ||
| 65 | + name: 'busInfoManage_edit_module', | ||
| 66 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 67 | + files: [ | ||
| 68 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 69 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 70 | + "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | ||
| 71 | + ] | ||
| 72 | + }); | ||
| 73 | + }] | ||
| 74 | + } | ||
| 75 | + }) | ||
| 76 | + .state("busInfoManage_detail", { // 车辆详细信息 | ||
| 77 | + url: '/busInfoManage_detail/:id', | ||
| 78 | + views: { | ||
| 79 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/detail.html'} | ||
| 80 | + }, | ||
| 81 | + resolve: { | ||
| 82 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 83 | + return $ocLazyLoad.load({ | ||
| 84 | + name: 'busInfoManage_detail_module', | ||
| 85 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 86 | + files: [ | ||
| 87 | + "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | ||
| 88 | + ] | ||
| 89 | + }); | ||
| 90 | + }] | ||
| 91 | + } | ||
| 92 | + }) | ||
| 93 | + } | ||
| 94 | ]); | 94 | ]); |
| 95 | \ No newline at end of file | 95 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js
| 1 | -// 设备信息维护 service controller 等写在一起 | ||
| 2 | - | ||
| 3 | -angular.module('ScheduleApp').factory('DeviceInfoManageService', ['DeviceInfoManageService_g', function(service) { | ||
| 4 | - /** 当前的查询条件信息 */ | ||
| 5 | - var currentSearchCondition = {}; | ||
| 6 | - | ||
| 7 | - /** 当前第几页 */ | ||
| 8 | - var currentPageNo = 1; | ||
| 9 | - | ||
| 10 | - return { | ||
| 11 | - /** | ||
| 12 | - * 获取查询条件信息, | ||
| 13 | - * 用于给controller用来和页面数据绑定。 | ||
| 14 | - */ | ||
| 15 | - getSearchCondition: function() { | ||
| 16 | - return currentSearchCondition; | ||
| 17 | - }, | ||
| 18 | - /** | ||
| 19 | - * 重置查询条件信息。 | ||
| 20 | - */ | ||
| 21 | - resetSearchCondition: function() { | ||
| 22 | - var key; | ||
| 23 | - for (key in currentSearchCondition) { | ||
| 24 | - currentSearchCondition[key] = ""; | ||
| 25 | - } | ||
| 26 | - }, | ||
| 27 | - /** | ||
| 28 | - * 设置当前页码。 | ||
| 29 | - * @param cpn 从1开始,后台是从0开始的 | ||
| 30 | - */ | ||
| 31 | - setCurrentPageNo: function(cpn) { | ||
| 32 | - currentPageNo = cpn; | ||
| 33 | - }, | ||
| 34 | - /** | ||
| 35 | - * 组装查询参数,返回一个promise查询结果。 | ||
| 36 | - * @param params 查询参数 | ||
| 37 | - * @return 返回一个 promise | ||
| 38 | - */ | ||
| 39 | - getPage: function() { | ||
| 40 | - var params = currentSearchCondition; // 查询条件 | ||
| 41 | - params.page = currentPageNo - 1; // 服务端页码从0开始 | ||
| 42 | - return service.list(params).$promise; | ||
| 43 | - }, | ||
| 44 | - /** | ||
| 45 | - * 获取明细信息。 | ||
| 46 | - * @param id 车辆id | ||
| 47 | - * @return 返回一个 promise | ||
| 48 | - */ | ||
| 49 | - getDetail: function(id) { | ||
| 50 | - var params = {id: id}; | ||
| 51 | - return service.get(params).$promise; | ||
| 52 | - }, | ||
| 53 | - /** | ||
| 54 | - * 保存信息。 | ||
| 55 | - * @param obj 车辆详细信息 | ||
| 56 | - * @return 返回一个 promise | ||
| 57 | - */ | ||
| 58 | - saveDetail: function(obj) { | ||
| 59 | - return service.save(obj).$promise; | ||
| 60 | - }, | ||
| 61 | - /** | ||
| 62 | - * 删除信息。 | ||
| 63 | - * @param id 主键id | ||
| 64 | - * @returns {*|Function|promise|n} | ||
| 65 | - */ | ||
| 66 | - deleteDetail: function(id) { | ||
| 67 | - return service.delete({id: id}).$promise; | ||
| 68 | - } | ||
| 69 | - }; | ||
| 70 | - | ||
| 71 | -}]); | ||
| 72 | - | ||
| 73 | -angular.module('ScheduleApp').controller('DeviceInfoManageCtrl', ['DeviceInfoManageService', '$state', function(deviceInfoManageService, $state) { | ||
| 74 | - var self = this; | ||
| 75 | - | ||
| 76 | - // 切换到form状态 | ||
| 77 | - self.goForm = function() { | ||
| 78 | - //alert("切换"); | ||
| 79 | - $state.go("deviceInfoManage_form"); | ||
| 80 | - } | ||
| 81 | - | ||
| 82 | - | ||
| 83 | -}]); | ||
| 84 | - | ||
| 85 | -angular.module('ScheduleApp').controller('DeviceInfoManageListCtrl', ['DeviceInfoManageService', function(deviceInfoManageService) { | ||
| 86 | - var self = this; | ||
| 87 | - self.pageInfo = { | ||
| 88 | - totalItems : 0, | ||
| 89 | - currentPage : 1, | ||
| 90 | - infos: [] | ||
| 91 | - }; | ||
| 92 | - | ||
| 93 | - // 初始创建的时候,获取一次列表数据 | ||
| 94 | - deviceInfoManageService.getPage().then( | ||
| 95 | - function(result) { | ||
| 96 | - self.pageInfo.totalItems = result.totalElements; | ||
| 97 | - self.pageInfo.currentPage = result.number + 1; | ||
| 98 | - self.pageInfo.infos = result.content; | ||
| 99 | - deviceInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 100 | - }, | ||
| 101 | - function(result) { | ||
| 102 | - alert("出错啦!"); | ||
| 103 | - } | ||
| 104 | - ); | ||
| 105 | - | ||
| 106 | - // 翻页的时候调用 | ||
| 107 | - self.pageChanaged = function() { | ||
| 108 | - deviceInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); | ||
| 109 | - deviceInfoManageService.getPage().then( | ||
| 110 | - function(result) { | ||
| 111 | - self.pageInfo.totalItems = result.totalElements; | ||
| 112 | - self.pageInfo.currentPage = result.number + 1; | ||
| 113 | - self.pageInfo.infos = result.content; | ||
| 114 | - deviceInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 115 | - }, | ||
| 116 | - function(result) { | ||
| 117 | - alert("出错啦!"); | ||
| 118 | - } | ||
| 119 | - ); | ||
| 120 | - }; | ||
| 121 | - // 获取查询条件数据 | ||
| 122 | - self.searchCondition = function() { | ||
| 123 | - return deviceInfoManageService.getSearchCondition(); | ||
| 124 | - }; | ||
| 125 | - // 重置查询条件 | ||
| 126 | - self.resetSearchCondition = function() { | ||
| 127 | - deviceInfoManageService.resetSearchCondition(); | ||
| 128 | - self.pageInfo.currentPage = 1; | ||
| 129 | - self.pageChanaged(); | ||
| 130 | - }; | ||
| 131 | - | ||
| 132 | - // 作废/撤销 | ||
| 133 | - self.toggleCde = function(id) { | ||
| 134 | - // TODO: | ||
| 135 | - deviceInfoManageService.deleteDetail(id).then( | ||
| 136 | - function(result) { | ||
| 137 | - if (result.message) { // 暂时这样做,之后全局拦截 | ||
| 138 | - alert("失败:" + result.message); | ||
| 139 | - } else { | ||
| 140 | - alert("成功!"); | ||
| 141 | - | ||
| 142 | - deviceInfoManageService.getPage().then( | ||
| 143 | - function(result) { | ||
| 144 | - self.pageInfo.totalItems = result.totalElements; | ||
| 145 | - self.pageInfo.currentPage = result.number + 1; | ||
| 146 | - self.pageInfo.infos = result.content; | ||
| 147 | - deviceInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 148 | - }, | ||
| 149 | - function(result) { | ||
| 150 | - alert("出错啦!"); | ||
| 151 | - } | ||
| 152 | - ); | ||
| 153 | - } | ||
| 154 | - | ||
| 155 | - }, | ||
| 156 | - function(result) { | ||
| 157 | - alert("出错啦!" + result); | ||
| 158 | - } | ||
| 159 | - ); | ||
| 160 | - }; | ||
| 161 | - | ||
| 162 | -}]); | ||
| 163 | - | ||
| 164 | -angular.module('ScheduleApp').controller('DeviceInfoManageFormCtrl', ['DeviceInfoManageService', '$stateParams', '$state', function(deviceInfoManageService, $stateParams, $state) { | ||
| 165 | - var self = this; | ||
| 166 | - | ||
| 167 | - // 启用日期 日期控件开关 | ||
| 168 | - self.qyrqOpen = false; | ||
| 169 | - self.qyrq_open = function() { | ||
| 170 | - self.qyrqOpen = true; | ||
| 171 | - }; | ||
| 172 | - | ||
| 173 | - // 欲保存的busInfo信息,绑定 | ||
| 174 | - self.deviceInfoForSave = {}; | ||
| 175 | - | ||
| 176 | - // 获取传过来的id,有的话就是修改,获取一遍数据 | ||
| 177 | - var id = $stateParams.id; | ||
| 178 | - if (id) { | ||
| 179 | - self.deviceInfoForSave.id = id; | ||
| 180 | - deviceInfoManageService.getDetail(id).then( | ||
| 181 | - function(result) { | ||
| 182 | - var key; | ||
| 183 | - for (key in result) { | ||
| 184 | - self.deviceInfoForSave[key] = result[key]; | ||
| 185 | - } | ||
| 186 | - // 填写所有的 select 控件选中框数据 | ||
| 187 | - // 公司字典 | ||
| 188 | - if (self.deviceInfoForSave.gsName) { | ||
| 189 | - angular.forEach(self.gses, function(data) { | ||
| 190 | - if (self.deviceInfoForSave.gsName == data.gsmc) { | ||
| 191 | - self.deviceInfoForSave.gs_selected = data; | ||
| 192 | - } | ||
| 193 | - }); | ||
| 194 | - } | ||
| 195 | - }, | ||
| 196 | - function(result) { | ||
| 197 | - alert("出错啦!"); | ||
| 198 | - } | ||
| 199 | - ); | ||
| 200 | - } | ||
| 201 | - | ||
| 202 | - // 提交方法 | ||
| 203 | - self.submit = function() { | ||
| 204 | - console.log(self.deviceInfoForSave); | ||
| 205 | - deviceInfoManageService.saveDetail(self.deviceInfoForSave).then( | ||
| 206 | - function(result) { | ||
| 207 | - // TODO:弹出框方式以后改 | ||
| 208 | - if (result.status == 'SUCCESS') { | ||
| 209 | - alert("保存成功!"); | ||
| 210 | - $state.go("deviceInfoManage"); | ||
| 211 | - } else { | ||
| 212 | - alert("保存异常!"); | ||
| 213 | - } | ||
| 214 | - }, | ||
| 215 | - function(result) { | ||
| 216 | - // TODO:弹出框方式以后改 | ||
| 217 | - alert("出错啦!"); | ||
| 218 | - } | ||
| 219 | - ); | ||
| 220 | - }; | ||
| 221 | - | ||
| 222 | -}]); | ||
| 223 | - | ||
| 224 | -angular.module('ScheduleApp').controller('DeviceInfoManageDetailCtrl', ['DeviceInfoManageService', '$stateParams', function(deviceInfoManageService, $stateParams) { | ||
| 225 | - var self = this; | ||
| 226 | - self.title = ""; | ||
| 227 | - self.deviceInfoForDetail = {}; | ||
| 228 | - self.deviceInfoForDetail.id = $stateParams.id; | ||
| 229 | - | ||
| 230 | - // 当转向到此页面时,就获取明细信息并绑定 | ||
| 231 | - deviceInfoManageService.getDetail($stateParams.id).then( | ||
| 232 | - function(result) { | ||
| 233 | - var key; | ||
| 234 | - for (key in result) { | ||
| 235 | - self.deviceInfoForDetail[key] = result[key]; | ||
| 236 | - } | ||
| 237 | - | ||
| 238 | - self.title = "车辆 " + self.deviceInfoForDetail.clZbh + "设备信息"; | ||
| 239 | - }, | ||
| 240 | - function(result) { | ||
| 241 | - // TODO:弹出框方式以后改 | ||
| 242 | - alert("出错啦!"); | ||
| 243 | - } | ||
| 244 | - ); | 1 | +// 设备信息维护 service controller 等写在一起 |
| 2 | + | ||
| 3 | +angular.module('ScheduleApp').factory('DeviceInfoManageService', ['DeviceInfoManageService_g', function(service) { | ||
| 4 | + /** 当前的查询条件信息 */ | ||
| 5 | + var currentSearchCondition = {}; | ||
| 6 | + | ||
| 7 | + /** 当前第几页 */ | ||
| 8 | + var currentPageNo = 1; | ||
| 9 | + | ||
| 10 | + return { | ||
| 11 | + /** | ||
| 12 | + * 获取查询条件信息, | ||
| 13 | + * 用于给controller用来和页面数据绑定。 | ||
| 14 | + */ | ||
| 15 | + getSearchCondition: function() { | ||
| 16 | + return currentSearchCondition; | ||
| 17 | + }, | ||
| 18 | + /** | ||
| 19 | + * 重置查询条件信息。 | ||
| 20 | + */ | ||
| 21 | + resetSearchCondition: function() { | ||
| 22 | + var key; | ||
| 23 | + for (key in currentSearchCondition) { | ||
| 24 | + currentSearchCondition[key] = ""; | ||
| 25 | + } | ||
| 26 | + }, | ||
| 27 | + /** | ||
| 28 | + * 设置当前页码。 | ||
| 29 | + * @param cpn 从1开始,后台是从0开始的 | ||
| 30 | + */ | ||
| 31 | + setCurrentPageNo: function(cpn) { | ||
| 32 | + currentPageNo = cpn; | ||
| 33 | + }, | ||
| 34 | + /** | ||
| 35 | + * 组装查询参数,返回一个promise查询结果。 | ||
| 36 | + * @param params 查询参数 | ||
| 37 | + * @return 返回一个 promise | ||
| 38 | + */ | ||
| 39 | + getPage: function() { | ||
| 40 | + var params = currentSearchCondition; // 查询条件 | ||
| 41 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | ||
| 42 | + return service.list(params).$promise; | ||
| 43 | + }, | ||
| 44 | + /** | ||
| 45 | + * 获取明细信息。 | ||
| 46 | + * @param id 车辆id | ||
| 47 | + * @return 返回一个 promise | ||
| 48 | + */ | ||
| 49 | + getDetail: function(id) { | ||
| 50 | + var params = {id: id}; | ||
| 51 | + return service.get(params).$promise; | ||
| 52 | + }, | ||
| 53 | + /** | ||
| 54 | + * 保存信息。 | ||
| 55 | + * @param obj 车辆详细信息 | ||
| 56 | + * @return 返回一个 promise | ||
| 57 | + */ | ||
| 58 | + saveDetail: function(obj) { | ||
| 59 | + return service.save(obj).$promise; | ||
| 60 | + }, | ||
| 61 | + /** | ||
| 62 | + * 删除信息。 | ||
| 63 | + * @param id 主键id | ||
| 64 | + * @returns {*|Function|promise|n} | ||
| 65 | + */ | ||
| 66 | + deleteDetail: function(id) { | ||
| 67 | + return service.delete({id: id}).$promise; | ||
| 68 | + } | ||
| 69 | + }; | ||
| 70 | + | ||
| 71 | +}]); | ||
| 72 | + | ||
| 73 | +angular.module('ScheduleApp').controller('DeviceInfoManageCtrl', ['DeviceInfoManageService', '$state', function(deviceInfoManageService, $state) { | ||
| 74 | + var self = this; | ||
| 75 | + | ||
| 76 | + // 切换到form状态 | ||
| 77 | + self.goForm = function() { | ||
| 78 | + //alert("切换"); | ||
| 79 | + $state.go("deviceInfoManage_form"); | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + | ||
| 83 | +}]); | ||
| 84 | + | ||
| 85 | +angular.module('ScheduleApp').controller('DeviceInfoManageListCtrl', ['DeviceInfoManageService', function(deviceInfoManageService) { | ||
| 86 | + var self = this; | ||
| 87 | + self.pageInfo = { | ||
| 88 | + totalItems : 0, | ||
| 89 | + currentPage : 1, | ||
| 90 | + infos: [] | ||
| 91 | + }; | ||
| 92 | + | ||
| 93 | + // 初始创建的时候,获取一次列表数据 | ||
| 94 | + deviceInfoManageService.getPage().then( | ||
| 95 | + function(result) { | ||
| 96 | + self.pageInfo.totalItems = result.totalElements; | ||
| 97 | + self.pageInfo.currentPage = result.number + 1; | ||
| 98 | + self.pageInfo.infos = result.content; | ||
| 99 | + deviceInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 100 | + }, | ||
| 101 | + function(result) { | ||
| 102 | + alert("出错啦!"); | ||
| 103 | + } | ||
| 104 | + ); | ||
| 105 | + | ||
| 106 | + // 翻页的时候调用 | ||
| 107 | + self.pageChanaged = function() { | ||
| 108 | + deviceInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); | ||
| 109 | + deviceInfoManageService.getPage().then( | ||
| 110 | + function(result) { | ||
| 111 | + self.pageInfo.totalItems = result.totalElements; | ||
| 112 | + self.pageInfo.currentPage = result.number + 1; | ||
| 113 | + self.pageInfo.infos = result.content; | ||
| 114 | + deviceInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 115 | + }, | ||
| 116 | + function(result) { | ||
| 117 | + alert("出错啦!"); | ||
| 118 | + } | ||
| 119 | + ); | ||
| 120 | + }; | ||
| 121 | + // 获取查询条件数据 | ||
| 122 | + self.searchCondition = function() { | ||
| 123 | + return deviceInfoManageService.getSearchCondition(); | ||
| 124 | + }; | ||
| 125 | + // 重置查询条件 | ||
| 126 | + self.resetSearchCondition = function() { | ||
| 127 | + deviceInfoManageService.resetSearchCondition(); | ||
| 128 | + self.pageInfo.currentPage = 1; | ||
| 129 | + self.pageChanaged(); | ||
| 130 | + }; | ||
| 131 | + | ||
| 132 | + // 作废/撤销 | ||
| 133 | + self.toggleCde = function(id) { | ||
| 134 | + // TODO: | ||
| 135 | + deviceInfoManageService.deleteDetail(id).then( | ||
| 136 | + function(result) { | ||
| 137 | + if (result.message) { // 暂时这样做,之后全局拦截 | ||
| 138 | + alert("失败:" + result.message); | ||
| 139 | + } else { | ||
| 140 | + alert("成功!"); | ||
| 141 | + | ||
| 142 | + deviceInfoManageService.getPage().then( | ||
| 143 | + function(result) { | ||
| 144 | + self.pageInfo.totalItems = result.totalElements; | ||
| 145 | + self.pageInfo.currentPage = result.number + 1; | ||
| 146 | + self.pageInfo.infos = result.content; | ||
| 147 | + deviceInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 148 | + }, | ||
| 149 | + function(result) { | ||
| 150 | + alert("出错啦!"); | ||
| 151 | + } | ||
| 152 | + ); | ||
| 153 | + } | ||
| 154 | + | ||
| 155 | + }, | ||
| 156 | + function(result) { | ||
| 157 | + alert("出错啦!" + result); | ||
| 158 | + } | ||
| 159 | + ); | ||
| 160 | + }; | ||
| 161 | + | ||
| 162 | +}]); | ||
| 163 | + | ||
| 164 | +angular.module('ScheduleApp').controller('DeviceInfoManageFormCtrl', ['DeviceInfoManageService', '$stateParams', '$state', function(deviceInfoManageService, $stateParams, $state) { | ||
| 165 | + var self = this; | ||
| 166 | + | ||
| 167 | + // 启用日期 日期控件开关 | ||
| 168 | + self.qyrqOpen = false; | ||
| 169 | + self.qyrq_open = function() { | ||
| 170 | + self.qyrqOpen = true; | ||
| 171 | + }; | ||
| 172 | + | ||
| 173 | + // 欲保存的busInfo信息,绑定 | ||
| 174 | + self.deviceInfoForSave = {}; | ||
| 175 | + | ||
| 176 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | ||
| 177 | + var id = $stateParams.id; | ||
| 178 | + if (id) { | ||
| 179 | + self.deviceInfoForSave.id = id; | ||
| 180 | + deviceInfoManageService.getDetail(id).then( | ||
| 181 | + function(result) { | ||
| 182 | + var key; | ||
| 183 | + for (key in result) { | ||
| 184 | + self.deviceInfoForSave[key] = result[key]; | ||
| 185 | + } | ||
| 186 | + // 填写所有的 select 控件选中框数据 | ||
| 187 | + // 公司字典 | ||
| 188 | + if (self.deviceInfoForSave.gsName) { | ||
| 189 | + angular.forEach(self.gses, function(data) { | ||
| 190 | + if (self.deviceInfoForSave.gsName == data.gsmc) { | ||
| 191 | + self.deviceInfoForSave.gs_selected = data; | ||
| 192 | + } | ||
| 193 | + }); | ||
| 194 | + } | ||
| 195 | + }, | ||
| 196 | + function(result) { | ||
| 197 | + alert("出错啦!"); | ||
| 198 | + } | ||
| 199 | + ); | ||
| 200 | + } | ||
| 201 | + | ||
| 202 | + // 提交方法 | ||
| 203 | + self.submit = function() { | ||
| 204 | + console.log(self.deviceInfoForSave); | ||
| 205 | + deviceInfoManageService.saveDetail(self.deviceInfoForSave).then( | ||
| 206 | + function(result) { | ||
| 207 | + // TODO:弹出框方式以后改 | ||
| 208 | + if (result.status == 'SUCCESS') { | ||
| 209 | + alert("保存成功!"); | ||
| 210 | + $state.go("deviceInfoManage"); | ||
| 211 | + } else { | ||
| 212 | + alert("保存异常!"); | ||
| 213 | + } | ||
| 214 | + }, | ||
| 215 | + function(result) { | ||
| 216 | + // TODO:弹出框方式以后改 | ||
| 217 | + alert("出错啦!"); | ||
| 218 | + } | ||
| 219 | + ); | ||
| 220 | + }; | ||
| 221 | + | ||
| 222 | +}]); | ||
| 223 | + | ||
| 224 | +angular.module('ScheduleApp').controller('DeviceInfoManageDetailCtrl', ['DeviceInfoManageService', '$stateParams', function(deviceInfoManageService, $stateParams) { | ||
| 225 | + var self = this; | ||
| 226 | + self.title = ""; | ||
| 227 | + self.deviceInfoForDetail = {}; | ||
| 228 | + self.deviceInfoForDetail.id = $stateParams.id; | ||
| 229 | + | ||
| 230 | + // 当转向到此页面时,就获取明细信息并绑定 | ||
| 231 | + deviceInfoManageService.getDetail($stateParams.id).then( | ||
| 232 | + function(result) { | ||
| 233 | + var key; | ||
| 234 | + for (key in result) { | ||
| 235 | + self.deviceInfoForDetail[key] = result[key]; | ||
| 236 | + } | ||
| 237 | + | ||
| 238 | + self.title = "车辆 " + self.deviceInfoForDetail.clZbh + "设备信息"; | ||
| 239 | + }, | ||
| 240 | + function(result) { | ||
| 241 | + // TODO:弹出框方式以后改 | ||
| 242 | + alert("出错啦!"); | ||
| 243 | + } | ||
| 244 | + ); | ||
| 245 | }]); | 245 | }]); |
| 246 | \ No newline at end of file | 246 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/route.js
| 1 | -// ui route 配置 | ||
| 2 | - | ||
| 3 | -/** 车辆设备信息模块配置route */ | ||
| 4 | -ScheduleApp.config([ | ||
| 5 | - '$stateProvider', | ||
| 6 | - '$urlRouterProvider', | ||
| 7 | - function($stateProvider, $urlRouterProvider) { | ||
| 8 | - // 默认路由 | ||
| 9 | - //$urlRouterProvider.otherwise('/busConfig.html'); | ||
| 10 | - | ||
| 11 | - $stateProvider | ||
| 12 | - .state("deviceInfoManage", { // index页面 | ||
| 13 | - url: '/deviceInfoManage', | ||
| 14 | - views: { | ||
| 15 | - "": { | ||
| 16 | - templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/index.html' | ||
| 17 | - }, | ||
| 18 | - "deviceInfoManage_list@deviceInfoManage": { | ||
| 19 | - templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/list.html' | ||
| 20 | - } | ||
| 21 | - }, | ||
| 22 | - | ||
| 23 | - resolve: { | ||
| 24 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 25 | - return $ocLazyLoad.load({ | ||
| 26 | - name: 'deviceInfoManage_module', | ||
| 27 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 28 | - files: [ | ||
| 29 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 30 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 31 | - "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | ||
| 32 | - ] | ||
| 33 | - }); | ||
| 34 | - }] | ||
| 35 | - } | ||
| 36 | - }) | ||
| 37 | - .state("deviceInfoManage_form", { // 添加设备信息form | ||
| 38 | - url: '/deviceInfoManage_form', | ||
| 39 | - views: { | ||
| 40 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/form.html'} | ||
| 41 | - }, | ||
| 42 | - resolve: { | ||
| 43 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 44 | - return $ocLazyLoad.load({ | ||
| 45 | - name: 'deviceInfoManage_form_module', | ||
| 46 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 47 | - files: [ | ||
| 48 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 49 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 50 | - "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | ||
| 51 | - ] | ||
| 52 | - }); | ||
| 53 | - }] | ||
| 54 | - } | ||
| 55 | - }) | ||
| 56 | - .state("deviceInfoManage_edit", { // 修改设备信息form | ||
| 57 | - url: '/deviceInfoManage_edit/:id', | ||
| 58 | - views: { | ||
| 59 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/edit.html'} | ||
| 60 | - }, | ||
| 61 | - resolve: { | ||
| 62 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 63 | - return $ocLazyLoad.load({ | ||
| 64 | - name: 'deviceInfoManage_edit_module', | ||
| 65 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 66 | - files: [ | ||
| 67 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 68 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 69 | - "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | ||
| 70 | - ] | ||
| 71 | - }); | ||
| 72 | - }] | ||
| 73 | - } | ||
| 74 | - }) | ||
| 75 | - .state("deviceInfoManage_detail", { // 详细信息页面 | ||
| 76 | - url: '/deviceInfoManage_detail/:id', | ||
| 77 | - views: { | ||
| 78 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/detail.html'} | ||
| 79 | - }, | ||
| 80 | - resolve: { | ||
| 81 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 82 | - return $ocLazyLoad.load({ | ||
| 83 | - name: 'deviceInfoManage_detail_module', | ||
| 84 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 85 | - files: [ | ||
| 86 | - "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | ||
| 87 | - ] | ||
| 88 | - }); | ||
| 89 | - }] | ||
| 90 | - } | ||
| 91 | - }) | ||
| 92 | - | ||
| 93 | - } | 1 | +// ui route 配置 |
| 2 | + | ||
| 3 | +/** 车辆设备信息模块配置route */ | ||
| 4 | +ScheduleApp.config([ | ||
| 5 | + '$stateProvider', | ||
| 6 | + '$urlRouterProvider', | ||
| 7 | + function($stateProvider, $urlRouterProvider) { | ||
| 8 | + // 默认路由 | ||
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | ||
| 10 | + | ||
| 11 | + $stateProvider | ||
| 12 | + .state("deviceInfoManage", { // index页面 | ||
| 13 | + url: '/deviceInfoManage', | ||
| 14 | + views: { | ||
| 15 | + "": { | ||
| 16 | + templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/index.html' | ||
| 17 | + }, | ||
| 18 | + "deviceInfoManage_list@deviceInfoManage": { | ||
| 19 | + templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/list.html' | ||
| 20 | + } | ||
| 21 | + }, | ||
| 22 | + | ||
| 23 | + resolve: { | ||
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 25 | + return $ocLazyLoad.load({ | ||
| 26 | + name: 'deviceInfoManage_module', | ||
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 28 | + files: [ | ||
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 31 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | ||
| 32 | + ] | ||
| 33 | + }); | ||
| 34 | + }] | ||
| 35 | + } | ||
| 36 | + }) | ||
| 37 | + .state("deviceInfoManage_form", { // 添加设备信息form | ||
| 38 | + url: '/deviceInfoManage_form', | ||
| 39 | + views: { | ||
| 40 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/form.html'} | ||
| 41 | + }, | ||
| 42 | + resolve: { | ||
| 43 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 44 | + return $ocLazyLoad.load({ | ||
| 45 | + name: 'deviceInfoManage_form_module', | ||
| 46 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 47 | + files: [ | ||
| 48 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 49 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 50 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | ||
| 51 | + ] | ||
| 52 | + }); | ||
| 53 | + }] | ||
| 54 | + } | ||
| 55 | + }) | ||
| 56 | + .state("deviceInfoManage_edit", { // 修改设备信息form | ||
| 57 | + url: '/deviceInfoManage_edit/:id', | ||
| 58 | + views: { | ||
| 59 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/edit.html'} | ||
| 60 | + }, | ||
| 61 | + resolve: { | ||
| 62 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 63 | + return $ocLazyLoad.load({ | ||
| 64 | + name: 'deviceInfoManage_edit_module', | ||
| 65 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 66 | + files: [ | ||
| 67 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 68 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 69 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | ||
| 70 | + ] | ||
| 71 | + }); | ||
| 72 | + }] | ||
| 73 | + } | ||
| 74 | + }) | ||
| 75 | + .state("deviceInfoManage_detail", { // 详细信息页面 | ||
| 76 | + url: '/deviceInfoManage_detail/:id', | ||
| 77 | + views: { | ||
| 78 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/detail.html'} | ||
| 79 | + }, | ||
| 80 | + resolve: { | ||
| 81 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 82 | + return $ocLazyLoad.load({ | ||
| 83 | + name: 'deviceInfoManage_detail_module', | ||
| 84 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 85 | + files: [ | ||
| 86 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | ||
| 87 | + ] | ||
| 88 | + }); | ||
| 89 | + }] | ||
| 90 | + } | ||
| 91 | + }) | ||
| 92 | + | ||
| 93 | + } | ||
| 94 | ]); | 94 | ]); |
| 95 | \ No newline at end of file | 95 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js
| 1 | -// 人员信息管理 service controller等写在一起 | ||
| 2 | - | ||
| 3 | -angular.module('ScheduleApp').factory('EmployeeInfoManageService', ['EmployeeInfoManageService_g', function(service) { | ||
| 4 | - | ||
| 5 | - /** 当前的查询条件信息 */ | ||
| 6 | - var currentSearchCondition = { | ||
| 7 | - //"carCode_like" : "", | ||
| 8 | - //"insideCode_like" : "", | ||
| 9 | - //"equipmentCode_like" : "", | ||
| 10 | - //"carPlate_like" : "" | ||
| 11 | - }; | ||
| 12 | - | ||
| 13 | - /** 当前第几页 */ | ||
| 14 | - var currentPageNo = 1; | ||
| 15 | - | ||
| 16 | - return { | ||
| 17 | - /** | ||
| 18 | - * 获取查询条件信息, | ||
| 19 | - * 用于给controller用来和页面数据绑定。 | ||
| 20 | - */ | ||
| 21 | - getSearchCondition: function() { | ||
| 22 | - return currentSearchCondition; | ||
| 23 | - }, | ||
| 24 | - /** | ||
| 25 | - * 重置查询条件信息。 | ||
| 26 | - */ | ||
| 27 | - resetSearchCondition: function() { | ||
| 28 | - var key; | ||
| 29 | - for (key in currentSearchCondition) { | ||
| 30 | - currentSearchCondition[key] = undefined; | ||
| 31 | - } | ||
| 32 | - currentPageNo = 1; | ||
| 33 | - }, | ||
| 34 | - /** | ||
| 35 | - * 设置当前页码。 | ||
| 36 | - * @param cpn 从1开始,后台是从0开始的 | ||
| 37 | - */ | ||
| 38 | - setCurrentPageNo: function(cpn) { | ||
| 39 | - currentPageNo = cpn; | ||
| 40 | - }, | ||
| 41 | - /** | ||
| 42 | - * 组装查询参数,返回一个promise查询结果。 | ||
| 43 | - * @param params 查询参数 | ||
| 44 | - * @return 返回一个 promise | ||
| 45 | - */ | ||
| 46 | - getPage: function() { | ||
| 47 | - var params = currentSearchCondition; // 查询条件 | ||
| 48 | - params.page = currentPageNo - 1; // 服务端页码从0开始 | ||
| 49 | - return service.rest.list(params).$promise; | ||
| 50 | - }, | ||
| 51 | - /** | ||
| 52 | - * 获取明细信息。 | ||
| 53 | - * @param id 车辆id | ||
| 54 | - * @return 返回一个 promise | ||
| 55 | - */ | ||
| 56 | - getDetail: function(id) { | ||
| 57 | - var params = {id: id}; | ||
| 58 | - return service.rest.get(params).$promise; | ||
| 59 | - }, | ||
| 60 | - /** | ||
| 61 | - * 保存信息。 | ||
| 62 | - * @param obj 车辆详细信息 | ||
| 63 | - * @return 返回一个 promise | ||
| 64 | - */ | ||
| 65 | - saveDetail: function(obj) { | ||
| 66 | - return service.rest.save(obj).$promise; | ||
| 67 | - }, | ||
| 68 | - /** | ||
| 69 | - * 数据导出。 | ||
| 70 | - * @returns {*|Function|promise|n} | ||
| 71 | - */ | ||
| 72 | - dataExport: function() { | ||
| 73 | - return service.dataTools.dataExport().$promise; | ||
| 74 | - } | ||
| 75 | - } | ||
| 76 | - | ||
| 77 | -}]); | ||
| 78 | - | ||
| 79 | -angular.module('ScheduleApp').controller('EmployeeInfoManageCtrl', [ | ||
| 80 | - 'EmployeeInfoManageService', '$state', '$uibModal', 'FileDownload_g', | ||
| 81 | - function(employeeInfoManageService, $state, $uibModal, fileDownload) { | ||
| 82 | - var self = this; | ||
| 83 | - | ||
| 84 | - // 切换到form状态 | ||
| 85 | - self.goForm = function() { | ||
| 86 | - //alert("切换"); | ||
| 87 | - $state.go("employeeInfoManage_form"); | ||
| 88 | - } | ||
| 89 | - | ||
| 90 | - // 导入excel | ||
| 91 | - self.importData = function() { | ||
| 92 | - // large方式弹出模态对话框 | ||
| 93 | - var modalInstance = $uibModal.open({ | ||
| 94 | - templateUrl: '/pages/scheduleApp/module/basicInfo/employeeInfoManage/dataImport.html', | ||
| 95 | - size: "lg", | ||
| 96 | - animation: true, | ||
| 97 | - backdrop: 'static', | ||
| 98 | - resolve: { | ||
| 99 | - // 可以传值给controller | ||
| 100 | - }, | ||
| 101 | - windowClass: 'center-modal', | ||
| 102 | - controller: "EmployInfoManageToolsCtrl", | ||
| 103 | - controllerAs: "ctrl", | ||
| 104 | - bindToController: true | ||
| 105 | - }); | ||
| 106 | - modalInstance.result.then( | ||
| 107 | - function() { | ||
| 108 | - console.log("dataImport.html打开"); | ||
| 109 | - }, | ||
| 110 | - function() { | ||
| 111 | - console.log("dataImport.html消失"); | ||
| 112 | - } | ||
| 113 | - ); | ||
| 114 | - }; | ||
| 115 | - | ||
| 116 | - // 导出excel | ||
| 117 | - self.exportData = function() { | ||
| 118 | - employeeInfoManageService.dataExport().then( | ||
| 119 | - function(result) { | ||
| 120 | - fileDownload.downloadFile(result.data, "application/octet-stream", "人员基础信息.xls"); | ||
| 121 | - }, | ||
| 122 | - function(result) { | ||
| 123 | - console.log("exportData failed:" + result); | ||
| 124 | - } | ||
| 125 | - ); | ||
| 126 | - }; | ||
| 127 | - }]); | ||
| 128 | - | ||
| 129 | -angular.module('ScheduleApp').controller('EmployInfoManageToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | ||
| 130 | - var self = this; | ||
| 131 | - | ||
| 132 | - // 关闭窗口 | ||
| 133 | - self.close = function() { | ||
| 134 | - $modalInstance.dismiss("cancel"); | ||
| 135 | - }; | ||
| 136 | - | ||
| 137 | - self.clearInputFile = function() { | ||
| 138 | - angular.element("input[type='file']").val(null); | ||
| 139 | - }; | ||
| 140 | - | ||
| 141 | - // 上传文件组件 | ||
| 142 | - self.uploader = new FileUploader({ | ||
| 143 | - url: "/personnel/dataImport", | ||
| 144 | - filters: [] // 用于过滤文件,比如只允许导入excel | ||
| 145 | - }); | ||
| 146 | - self.uploader.onAfterAddingFile = function(fileItem) | ||
| 147 | - { | ||
| 148 | - console.info('onAfterAddingFile', fileItem); | ||
| 149 | - console.log(self.uploader.queue.length); | ||
| 150 | - if (self.uploader.queue.length > 1) | ||
| 151 | - self.uploader.removeFromQueue(0); | ||
| 152 | - }; | ||
| 153 | - self.uploader.onSuccessItem = function(fileItem, response, status, headers) | ||
| 154 | - { | ||
| 155 | - console.info('onSuccessItem', fileItem, response, status, headers); | ||
| 156 | - }; | ||
| 157 | - self.uploader.onErrorItem = function(fileItem, response, status, headers) | ||
| 158 | - { | ||
| 159 | - console.info('onErrorItem', fileItem, response, status, headers); | ||
| 160 | - }; | ||
| 161 | - | ||
| 162 | -}]); | ||
| 163 | - | ||
| 164 | -angular.module('ScheduleApp').controller('EmployeeInfoManageListCtrl', ['EmployeeInfoManageService', function(employeeInfoManageService) { | ||
| 165 | - var self = this; | ||
| 166 | - self.pageInfo = { | ||
| 167 | - totalItems : 0, | ||
| 168 | - currentPage : 1, | ||
| 169 | - infos: [] | ||
| 170 | - }; | ||
| 171 | - | ||
| 172 | - // 初始创建的时候,获取一次列表数据 | ||
| 173 | - employeeInfoManageService.getPage().then( | ||
| 174 | - function(result) { | ||
| 175 | - self.pageInfo.totalItems = result.totalElements; | ||
| 176 | - self.pageInfo.currentPage = result.number + 1; | ||
| 177 | - self.pageInfo.infos = result.content; | ||
| 178 | - employeeInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 179 | - }, | ||
| 180 | - function(result) { | ||
| 181 | - alert("出错啦!"); | ||
| 182 | - } | ||
| 183 | - ); | ||
| 184 | - | ||
| 185 | - //$scope.$watch("ctrl.pageInfo.currentPage", function() { | ||
| 186 | - // alert("dfdfdf"); | ||
| 187 | - //}); | ||
| 188 | - | ||
| 189 | - // 翻页的时候调用 | ||
| 190 | - self.pageChanaged = function() { | ||
| 191 | - employeeInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); | ||
| 192 | - employeeInfoManageService.getPage().then( | ||
| 193 | - function(result) { | ||
| 194 | - self.pageInfo.totalItems = result.totalElements; | ||
| 195 | - self.pageInfo.currentPage = result.number + 1; | ||
| 196 | - self.pageInfo.infos = result.content; | ||
| 197 | - employeeInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 198 | - }, | ||
| 199 | - function(result) { | ||
| 200 | - alert("出错啦!"); | ||
| 201 | - } | ||
| 202 | - ); | ||
| 203 | - }; | ||
| 204 | - // 获取查询条件数据 | ||
| 205 | - self.searchCondition = function() { | ||
| 206 | - return employeeInfoManageService.getSearchCondition(); | ||
| 207 | - }; | ||
| 208 | - // 重置查询条件 | ||
| 209 | - self.resetSearchCondition = function() { | ||
| 210 | - employeeInfoManageService.resetSearchCondition(); | ||
| 211 | - self.pageInfo.currentPage = 1; | ||
| 212 | - self.pageChanaged(); | ||
| 213 | - }; | ||
| 214 | -}]); | ||
| 215 | - | ||
| 216 | -angular.module('ScheduleApp').controller('EmployeeInfoManageFormCtrl', ['EmployeeInfoManageService', '$stateParams', '$state', function(employeeInfoManageService, $stateParams, $state) { | ||
| 217 | - var self = this; | ||
| 218 | - | ||
| 219 | - // 欲保存的busInfo信息,绑定 | ||
| 220 | - self.employeeInfoForSave = {}; | ||
| 221 | - | ||
| 222 | - // 获取传过来的id,有的话就是修改,获取一遍数据 | ||
| 223 | - var id = $stateParams.id; | ||
| 224 | - if (id) { | ||
| 225 | - self.employeeInfoForSave.id = id; | ||
| 226 | - employeeInfoManageService.getDetail(id).then( | ||
| 227 | - function(result) { | ||
| 228 | - var key; | ||
| 229 | - for (key in result) { | ||
| 230 | - self.employeeInfoForSave[key] = result[key]; | ||
| 231 | - } | ||
| 232 | - }, | ||
| 233 | - function(result) { | ||
| 234 | - alert("出错啦!"); | ||
| 235 | - } | ||
| 236 | - ); | ||
| 237 | - } | ||
| 238 | - | ||
| 239 | - // 提交方法 | ||
| 240 | - self.submit = function() { | ||
| 241 | - console.log(self.employeeInfoForSave); | ||
| 242 | - employeeInfoManageService.saveDetail(self.employeeInfoForSave).then( | ||
| 243 | - function(result) { | ||
| 244 | - // TODO:弹出框方式以后改 | ||
| 245 | - if (result.status == 'SUCCESS') { | ||
| 246 | - alert("保存成功!"); | ||
| 247 | - $state.go("employeeInfoManage"); | ||
| 248 | - } else { | ||
| 249 | - alert("保存异常!"); | ||
| 250 | - } | ||
| 251 | - }, | ||
| 252 | - function(result) { | ||
| 253 | - // TODO:弹出框方式以后改 | ||
| 254 | - alert("出错啦!"); | ||
| 255 | - } | ||
| 256 | - ); | ||
| 257 | - }; | ||
| 258 | - | ||
| 259 | - | ||
| 260 | -}]); | ||
| 261 | - | ||
| 262 | -angular.module('ScheduleApp').controller('EmployeeInfoManageDetailCtrl', ['EmployeeInfoManageService', '$stateParams', function(employeeInfoManageService, $stateParams) { | ||
| 263 | - var self = this; | ||
| 264 | - self.title = ""; | ||
| 265 | - self.employeeInfoForDetail = {}; | ||
| 266 | - self.employeeInfoForDetail.id = $stateParams.id; | ||
| 267 | - | ||
| 268 | - // 当转向到此页面时,就获取明细信息并绑定 | ||
| 269 | - employeeInfoManageService.getDetail($stateParams.id).then( | ||
| 270 | - function(result) { | ||
| 271 | - var key; | ||
| 272 | - for (key in result) { | ||
| 273 | - self.employeeInfoForDetail[key] = result[key]; | ||
| 274 | - } | ||
| 275 | - | ||
| 276 | - self.title = "员工 " + self.employeeInfoForDetail.personnelName + " 详细信息"; | ||
| 277 | - }, | ||
| 278 | - function(result) { | ||
| 279 | - // TODO:弹出框方式以后改 | ||
| 280 | - alert("出错啦!"); | ||
| 281 | - } | ||
| 282 | - ); | ||
| 283 | -}]); | ||
| 284 | - | 1 | +// 人员信息管理 service controller等写在一起 |
| 2 | + | ||
| 3 | +angular.module('ScheduleApp').factory('EmployeeInfoManageService', ['EmployeeInfoManageService_g', function(service) { | ||
| 4 | + | ||
| 5 | + /** 当前的查询条件信息 */ | ||
| 6 | + var currentSearchCondition = { | ||
| 7 | + //"carCode_like" : "", | ||
| 8 | + //"insideCode_like" : "", | ||
| 9 | + //"equipmentCode_like" : "", | ||
| 10 | + //"carPlate_like" : "" | ||
| 11 | + }; | ||
| 12 | + | ||
| 13 | + /** 当前第几页 */ | ||
| 14 | + var currentPageNo = 1; | ||
| 15 | + | ||
| 16 | + return { | ||
| 17 | + /** | ||
| 18 | + * 获取查询条件信息, | ||
| 19 | + * 用于给controller用来和页面数据绑定。 | ||
| 20 | + */ | ||
| 21 | + getSearchCondition: function() { | ||
| 22 | + return currentSearchCondition; | ||
| 23 | + }, | ||
| 24 | + /** | ||
| 25 | + * 重置查询条件信息。 | ||
| 26 | + */ | ||
| 27 | + resetSearchCondition: function() { | ||
| 28 | + var key; | ||
| 29 | + for (key in currentSearchCondition) { | ||
| 30 | + currentSearchCondition[key] = undefined; | ||
| 31 | + } | ||
| 32 | + currentPageNo = 1; | ||
| 33 | + }, | ||
| 34 | + /** | ||
| 35 | + * 设置当前页码。 | ||
| 36 | + * @param cpn 从1开始,后台是从0开始的 | ||
| 37 | + */ | ||
| 38 | + setCurrentPageNo: function(cpn) { | ||
| 39 | + currentPageNo = cpn; | ||
| 40 | + }, | ||
| 41 | + /** | ||
| 42 | + * 组装查询参数,返回一个promise查询结果。 | ||
| 43 | + * @param params 查询参数 | ||
| 44 | + * @return 返回一个 promise | ||
| 45 | + */ | ||
| 46 | + getPage: function() { | ||
| 47 | + var params = currentSearchCondition; // 查询条件 | ||
| 48 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | ||
| 49 | + return service.rest.list(params).$promise; | ||
| 50 | + }, | ||
| 51 | + /** | ||
| 52 | + * 获取明细信息。 | ||
| 53 | + * @param id 车辆id | ||
| 54 | + * @return 返回一个 promise | ||
| 55 | + */ | ||
| 56 | + getDetail: function(id) { | ||
| 57 | + var params = {id: id}; | ||
| 58 | + return service.rest.get(params).$promise; | ||
| 59 | + }, | ||
| 60 | + /** | ||
| 61 | + * 保存信息。 | ||
| 62 | + * @param obj 车辆详细信息 | ||
| 63 | + * @return 返回一个 promise | ||
| 64 | + */ | ||
| 65 | + saveDetail: function(obj) { | ||
| 66 | + return service.rest.save(obj).$promise; | ||
| 67 | + }, | ||
| 68 | + /** | ||
| 69 | + * 数据导出。 | ||
| 70 | + * @returns {*|Function|promise|n} | ||
| 71 | + */ | ||
| 72 | + dataExport: function() { | ||
| 73 | + return service.dataTools.dataExport().$promise; | ||
| 74 | + } | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | +}]); | ||
| 78 | + | ||
| 79 | +angular.module('ScheduleApp').controller('EmployeeInfoManageCtrl', [ | ||
| 80 | + 'EmployeeInfoManageService', '$state', '$uibModal', 'FileDownload_g', | ||
| 81 | + function(employeeInfoManageService, $state, $uibModal, fileDownload) { | ||
| 82 | + var self = this; | ||
| 83 | + | ||
| 84 | + // 切换到form状态 | ||
| 85 | + self.goForm = function() { | ||
| 86 | + //alert("切换"); | ||
| 87 | + $state.go("employeeInfoManage_form"); | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + // 导入excel | ||
| 91 | + self.importData = function() { | ||
| 92 | + // large方式弹出模态对话框 | ||
| 93 | + var modalInstance = $uibModal.open({ | ||
| 94 | + templateUrl: '/pages/scheduleApp/module/basicInfo/employeeInfoManage/dataImport.html', | ||
| 95 | + size: "lg", | ||
| 96 | + animation: true, | ||
| 97 | + backdrop: 'static', | ||
| 98 | + resolve: { | ||
| 99 | + // 可以传值给controller | ||
| 100 | + }, | ||
| 101 | + windowClass: 'center-modal', | ||
| 102 | + controller: "EmployInfoManageToolsCtrl", | ||
| 103 | + controllerAs: "ctrl", | ||
| 104 | + bindToController: true | ||
| 105 | + }); | ||
| 106 | + modalInstance.result.then( | ||
| 107 | + function() { | ||
| 108 | + console.log("dataImport.html打开"); | ||
| 109 | + }, | ||
| 110 | + function() { | ||
| 111 | + console.log("dataImport.html消失"); | ||
| 112 | + } | ||
| 113 | + ); | ||
| 114 | + }; | ||
| 115 | + | ||
| 116 | + // 导出excel | ||
| 117 | + self.exportData = function() { | ||
| 118 | + employeeInfoManageService.dataExport().then( | ||
| 119 | + function(result) { | ||
| 120 | + fileDownload.downloadFile(result.data, "application/octet-stream", "人员基础信息.xls"); | ||
| 121 | + }, | ||
| 122 | + function(result) { | ||
| 123 | + console.log("exportData failed:" + result); | ||
| 124 | + } | ||
| 125 | + ); | ||
| 126 | + }; | ||
| 127 | + }]); | ||
| 128 | + | ||
| 129 | +angular.module('ScheduleApp').controller('EmployInfoManageToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | ||
| 130 | + var self = this; | ||
| 131 | + | ||
| 132 | + // 关闭窗口 | ||
| 133 | + self.close = function() { | ||
| 134 | + $modalInstance.dismiss("cancel"); | ||
| 135 | + }; | ||
| 136 | + | ||
| 137 | + self.clearInputFile = function() { | ||
| 138 | + angular.element("input[type='file']").val(null); | ||
| 139 | + }; | ||
| 140 | + | ||
| 141 | + // 上传文件组件 | ||
| 142 | + self.uploader = new FileUploader({ | ||
| 143 | + url: "/personnel/dataImport", | ||
| 144 | + filters: [] // 用于过滤文件,比如只允许导入excel | ||
| 145 | + }); | ||
| 146 | + self.uploader.onAfterAddingFile = function(fileItem) | ||
| 147 | + { | ||
| 148 | + console.info('onAfterAddingFile', fileItem); | ||
| 149 | + console.log(self.uploader.queue.length); | ||
| 150 | + if (self.uploader.queue.length > 1) | ||
| 151 | + self.uploader.removeFromQueue(0); | ||
| 152 | + }; | ||
| 153 | + self.uploader.onSuccessItem = function(fileItem, response, status, headers) | ||
| 154 | + { | ||
| 155 | + console.info('onSuccessItem', fileItem, response, status, headers); | ||
| 156 | + }; | ||
| 157 | + self.uploader.onErrorItem = function(fileItem, response, status, headers) | ||
| 158 | + { | ||
| 159 | + console.info('onErrorItem', fileItem, response, status, headers); | ||
| 160 | + }; | ||
| 161 | + | ||
| 162 | +}]); | ||
| 163 | + | ||
| 164 | +angular.module('ScheduleApp').controller('EmployeeInfoManageListCtrl', ['EmployeeInfoManageService', function(employeeInfoManageService) { | ||
| 165 | + var self = this; | ||
| 166 | + self.pageInfo = { | ||
| 167 | + totalItems : 0, | ||
| 168 | + currentPage : 1, | ||
| 169 | + infos: [] | ||
| 170 | + }; | ||
| 171 | + | ||
| 172 | + // 初始创建的时候,获取一次列表数据 | ||
| 173 | + employeeInfoManageService.getPage().then( | ||
| 174 | + function(result) { | ||
| 175 | + self.pageInfo.totalItems = result.totalElements; | ||
| 176 | + self.pageInfo.currentPage = result.number + 1; | ||
| 177 | + self.pageInfo.infos = result.content; | ||
| 178 | + employeeInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 179 | + }, | ||
| 180 | + function(result) { | ||
| 181 | + alert("出错啦!"); | ||
| 182 | + } | ||
| 183 | + ); | ||
| 184 | + | ||
| 185 | + //$scope.$watch("ctrl.pageInfo.currentPage", function() { | ||
| 186 | + // alert("dfdfdf"); | ||
| 187 | + //}); | ||
| 188 | + | ||
| 189 | + // 翻页的时候调用 | ||
| 190 | + self.pageChanaged = function() { | ||
| 191 | + employeeInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); | ||
| 192 | + employeeInfoManageService.getPage().then( | ||
| 193 | + function(result) { | ||
| 194 | + self.pageInfo.totalItems = result.totalElements; | ||
| 195 | + self.pageInfo.currentPage = result.number + 1; | ||
| 196 | + self.pageInfo.infos = result.content; | ||
| 197 | + employeeInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 198 | + }, | ||
| 199 | + function(result) { | ||
| 200 | + alert("出错啦!"); | ||
| 201 | + } | ||
| 202 | + ); | ||
| 203 | + }; | ||
| 204 | + // 获取查询条件数据 | ||
| 205 | + self.searchCondition = function() { | ||
| 206 | + return employeeInfoManageService.getSearchCondition(); | ||
| 207 | + }; | ||
| 208 | + // 重置查询条件 | ||
| 209 | + self.resetSearchCondition = function() { | ||
| 210 | + employeeInfoManageService.resetSearchCondition(); | ||
| 211 | + self.pageInfo.currentPage = 1; | ||
| 212 | + self.pageChanaged(); | ||
| 213 | + }; | ||
| 214 | +}]); | ||
| 215 | + | ||
| 216 | +angular.module('ScheduleApp').controller('EmployeeInfoManageFormCtrl', ['EmployeeInfoManageService', '$stateParams', '$state', function(employeeInfoManageService, $stateParams, $state) { | ||
| 217 | + var self = this; | ||
| 218 | + | ||
| 219 | + // 欲保存的busInfo信息,绑定 | ||
| 220 | + self.employeeInfoForSave = {}; | ||
| 221 | + | ||
| 222 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | ||
| 223 | + var id = $stateParams.id; | ||
| 224 | + if (id) { | ||
| 225 | + self.employeeInfoForSave.id = id; | ||
| 226 | + employeeInfoManageService.getDetail(id).then( | ||
| 227 | + function(result) { | ||
| 228 | + var key; | ||
| 229 | + for (key in result) { | ||
| 230 | + self.employeeInfoForSave[key] = result[key]; | ||
| 231 | + } | ||
| 232 | + }, | ||
| 233 | + function(result) { | ||
| 234 | + alert("出错啦!"); | ||
| 235 | + } | ||
| 236 | + ); | ||
| 237 | + } | ||
| 238 | + | ||
| 239 | + // 提交方法 | ||
| 240 | + self.submit = function() { | ||
| 241 | + console.log(self.employeeInfoForSave); | ||
| 242 | + employeeInfoManageService.saveDetail(self.employeeInfoForSave).then( | ||
| 243 | + function(result) { | ||
| 244 | + // TODO:弹出框方式以后改 | ||
| 245 | + if (result.status == 'SUCCESS') { | ||
| 246 | + alert("保存成功!"); | ||
| 247 | + $state.go("employeeInfoManage"); | ||
| 248 | + } else { | ||
| 249 | + alert("保存异常!"); | ||
| 250 | + } | ||
| 251 | + }, | ||
| 252 | + function(result) { | ||
| 253 | + // TODO:弹出框方式以后改 | ||
| 254 | + alert("出错啦!"); | ||
| 255 | + } | ||
| 256 | + ); | ||
| 257 | + }; | ||
| 258 | + | ||
| 259 | + | ||
| 260 | +}]); | ||
| 261 | + | ||
| 262 | +angular.module('ScheduleApp').controller('EmployeeInfoManageDetailCtrl', ['EmployeeInfoManageService', '$stateParams', function(employeeInfoManageService, $stateParams) { | ||
| 263 | + var self = this; | ||
| 264 | + self.title = ""; | ||
| 265 | + self.employeeInfoForDetail = {}; | ||
| 266 | + self.employeeInfoForDetail.id = $stateParams.id; | ||
| 267 | + | ||
| 268 | + // 当转向到此页面时,就获取明细信息并绑定 | ||
| 269 | + employeeInfoManageService.getDetail($stateParams.id).then( | ||
| 270 | + function(result) { | ||
| 271 | + var key; | ||
| 272 | + for (key in result) { | ||
| 273 | + self.employeeInfoForDetail[key] = result[key]; | ||
| 274 | + } | ||
| 275 | + | ||
| 276 | + self.title = "员工 " + self.employeeInfoForDetail.personnelName + " 详细信息"; | ||
| 277 | + }, | ||
| 278 | + function(result) { | ||
| 279 | + // TODO:弹出框方式以后改 | ||
| 280 | + alert("出错啦!"); | ||
| 281 | + } | ||
| 282 | + ); | ||
| 283 | +}]); | ||
| 284 | + |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/route.js
| 1 | -// ui route 配置 | ||
| 2 | - | ||
| 3 | -/** 人员基础信息模块配置route */ | ||
| 4 | -ScheduleApp.config([ | ||
| 5 | - '$stateProvider', | ||
| 6 | - '$urlRouterProvider', | ||
| 7 | - function($stateProvider, $urlRouterProvider) { | ||
| 8 | - // 默认路由 | ||
| 9 | - //$urlRouterProvider.otherwise('/busConfig.html'); | ||
| 10 | - | ||
| 11 | - $stateProvider | ||
| 12 | - .state("employeeInfoManage", { // index页面 | ||
| 13 | - url: '/employeeInfoManage', | ||
| 14 | - views: { | ||
| 15 | - "": { | ||
| 16 | - templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/index.html' | ||
| 17 | - }, | ||
| 18 | - "employeeInfoManage_list@employeeInfoManage": { | ||
| 19 | - templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html' | ||
| 20 | - } | ||
| 21 | - }, | ||
| 22 | - | ||
| 23 | - resolve: { | ||
| 24 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 25 | - return $ocLazyLoad.load({ | ||
| 26 | - name: 'employeeInfoManage_module', | ||
| 27 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 28 | - files: [ | ||
| 29 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 30 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 31 | - "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | ||
| 32 | - "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | ||
| 33 | - ] | ||
| 34 | - }); | ||
| 35 | - }] | ||
| 36 | - } | ||
| 37 | - }) | ||
| 38 | - .state("employeeInfoManage_form", { // 添加人员信息form | ||
| 39 | - url: '/employeeInfoManage_form', | ||
| 40 | - views: { | ||
| 41 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html'} | ||
| 42 | - }, | ||
| 43 | - resolve: { | ||
| 44 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 45 | - return $ocLazyLoad.load({ | ||
| 46 | - name: 'employeeInfoManage_form_module', | ||
| 47 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 48 | - files: [ | ||
| 49 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 50 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 51 | - "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | ||
| 52 | - ] | ||
| 53 | - }); | ||
| 54 | - }] | ||
| 55 | - } | ||
| 56 | - }) | ||
| 57 | - .state("employeeInfoManage_edit", { // 修改人员信息form | ||
| 58 | - url: '/employeeInfoManage_edit/:id', | ||
| 59 | - views: { | ||
| 60 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html'} | ||
| 61 | - }, | ||
| 62 | - resolve: { | ||
| 63 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 64 | - return $ocLazyLoad.load({ | ||
| 65 | - name: 'employeeInfoManage_edit_module', | ||
| 66 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 67 | - files: [ | ||
| 68 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 69 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 70 | - "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | ||
| 71 | - ] | ||
| 72 | - }); | ||
| 73 | - }] | ||
| 74 | - } | ||
| 75 | - }) | ||
| 76 | - .state("employeeInfoManage_detail", { // 详细信息页面 | ||
| 77 | - url: '/employeeInfoManage_detail/:id', | ||
| 78 | - views: { | ||
| 79 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/detail.html'} | ||
| 80 | - }, | ||
| 81 | - resolve: { | ||
| 82 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 83 | - return $ocLazyLoad.load({ | ||
| 84 | - name: 'employeeInfoManage_detail_module', | ||
| 85 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 86 | - files: [ | ||
| 87 | - "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | ||
| 88 | - ] | ||
| 89 | - }); | ||
| 90 | - }] | ||
| 91 | - } | ||
| 92 | - }) | ||
| 93 | - | 1 | +// ui route 配置 |
| 2 | + | ||
| 3 | +/** 人员基础信息模块配置route */ | ||
| 4 | +ScheduleApp.config([ | ||
| 5 | + '$stateProvider', | ||
| 6 | + '$urlRouterProvider', | ||
| 7 | + function($stateProvider, $urlRouterProvider) { | ||
| 8 | + // 默认路由 | ||
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | ||
| 10 | + | ||
| 11 | + $stateProvider | ||
| 12 | + .state("employeeInfoManage", { // index页面 | ||
| 13 | + url: '/employeeInfoManage', | ||
| 14 | + views: { | ||
| 15 | + "": { | ||
| 16 | + templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/index.html' | ||
| 17 | + }, | ||
| 18 | + "employeeInfoManage_list@employeeInfoManage": { | ||
| 19 | + templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html' | ||
| 20 | + } | ||
| 21 | + }, | ||
| 22 | + | ||
| 23 | + resolve: { | ||
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 25 | + return $ocLazyLoad.load({ | ||
| 26 | + name: 'employeeInfoManage_module', | ||
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 28 | + files: [ | ||
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 31 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | ||
| 32 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | ||
| 33 | + ] | ||
| 34 | + }); | ||
| 35 | + }] | ||
| 36 | + } | ||
| 37 | + }) | ||
| 38 | + .state("employeeInfoManage_form", { // 添加人员信息form | ||
| 39 | + url: '/employeeInfoManage_form', | ||
| 40 | + views: { | ||
| 41 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html'} | ||
| 42 | + }, | ||
| 43 | + resolve: { | ||
| 44 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 45 | + return $ocLazyLoad.load({ | ||
| 46 | + name: 'employeeInfoManage_form_module', | ||
| 47 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 48 | + files: [ | ||
| 49 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 50 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 51 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | ||
| 52 | + ] | ||
| 53 | + }); | ||
| 54 | + }] | ||
| 55 | + } | ||
| 56 | + }) | ||
| 57 | + .state("employeeInfoManage_edit", { // 修改人员信息form | ||
| 58 | + url: '/employeeInfoManage_edit/:id', | ||
| 59 | + views: { | ||
| 60 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html'} | ||
| 61 | + }, | ||
| 62 | + resolve: { | ||
| 63 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 64 | + return $ocLazyLoad.load({ | ||
| 65 | + name: 'employeeInfoManage_edit_module', | ||
| 66 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 67 | + files: [ | ||
| 68 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 69 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 70 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | ||
| 71 | + ] | ||
| 72 | + }); | ||
| 73 | + }] | ||
| 74 | + } | ||
| 75 | + }) | ||
| 76 | + .state("employeeInfoManage_detail", { // 详细信息页面 | ||
| 77 | + url: '/employeeInfoManage_detail/:id', | ||
| 78 | + views: { | ||
| 79 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/detail.html'} | ||
| 80 | + }, | ||
| 81 | + resolve: { | ||
| 82 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 83 | + return $ocLazyLoad.load({ | ||
| 84 | + name: 'employeeInfoManage_detail_module', | ||
| 85 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 86 | + files: [ | ||
| 87 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | ||
| 88 | + ] | ||
| 89 | + }); | ||
| 90 | + }] | ||
| 91 | + } | ||
| 92 | + }) | ||
| 93 | + | ||
| 94 | }]); | 94 | }]); |
| 95 | \ No newline at end of file | 95 | \ No newline at end of file |