Commit 3678d3feeb8130bc769559b4de650b925fdae9db
1 parent
35068d05
mcy
Showing
15 changed files
with
1156 additions
and
632 deletions
src/main/java/com/bsth/controller/forms/ExportController.java
| @@ -203,7 +203,7 @@ public class ExportController { | @@ -203,7 +203,7 @@ public class ExportController { | ||
| 203 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 203 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| 204 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 204 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 205 | ReportUtils ee = new ReportUtils(); | 205 | ReportUtils ee = new ReportUtils(); |
| 206 | - List<Vehicleloading> vehicleloading = formsService.vehicleloading(map.get("line").toString(), | 206 | + List<Vehicleloading> vehicleloading = formsService.vehicleloading(/*map.get("gsdmVehic").toString(),map.get("fgsdmVehic").toString(),*/map.get("line").toString(), |
| 207 | map.get("date").toString()); | 207 | map.get("date").toString()); |
| 208 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 208 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 209 | int i = 1; | 209 | int i = 1; |
src/main/java/com/bsth/controller/forms/MCY_FormsController.java
| @@ -26,93 +26,90 @@ import com.bsth.service.realcontrol.ScheduleRealInfoService; | @@ -26,93 +26,90 @@ import com.bsth.service.realcontrol.ScheduleRealInfoService; | ||
| 26 | @RestController | 26 | @RestController |
| 27 | @RequestMapping("mcy_forms") | 27 | @RequestMapping("mcy_forms") |
| 28 | public class MCY_FormsController { | 28 | public class MCY_FormsController { |
| 29 | - | 29 | + |
| 30 | @Autowired | 30 | @Autowired |
| 31 | FormsService formsService; | 31 | FormsService formsService; |
| 32 | - | 32 | + |
| 33 | @Autowired | 33 | @Autowired |
| 34 | ScheduleRealInfoService scheduleRealInfoService; | 34 | ScheduleRealInfoService scheduleRealInfoService; |
| 35 | - | ||
| 36 | - //行车路单日报表 | ||
| 37 | - @RequestMapping(value = "/waybillday",method = RequestMethod.POST) | ||
| 38 | - public List<Waybillday> waybillday(@RequestParam Map<String, Object> map){ | ||
| 39 | - | ||
| 40 | - | ||
| 41 | -// scheduleRealInfoService.findKMBC(jName, clZbh, lpName, date) | 35 | + |
| 36 | + // 行车路单日报表 | ||
| 37 | + | ||
| 38 | + @RequestMapping(value = "/waybillday", method = RequestMethod.POST) | ||
| 39 | + public List<Waybillday> waybillday(@RequestParam Map<String, Object> map) { | ||
| 40 | + | ||
| 41 | + // scheduleRealInfoService.findKMBC(jName, clZbh, lpName, date) | ||
| 42 | return formsService.waybillday(map); | 42 | return formsService.waybillday(map); |
| 43 | } | 43 | } |
| 44 | - | ||
| 45 | - //线路客流量报表 | ||
| 46 | - @RequestMapping(value = "/linepasswengerflow",method = RequestMethod.POST) | ||
| 47 | - public List<Linepasswengerflow> linepasswengerflow(@RequestParam Map<String, Object> map){ | ||
| 48 | - | 44 | + |
| 45 | + // 线路客流量报表 | ||
| 46 | + | ||
| 47 | + @RequestMapping(value = "/linepasswengerflow", method = RequestMethod.POST) | ||
| 48 | + public List<Linepasswengerflow> linepasswengerflow(@RequestParam Map<String, Object> map) { | ||
| 49 | + | ||
| 49 | return formsService.linepasswengerflow(map); | 50 | return formsService.linepasswengerflow(map); |
| 50 | } | 51 | } |
| 51 | - | ||
| 52 | - | ||
| 53 | - | ||
| 54 | - //班次车辆人员月报表 | ||
| 55 | - @RequestMapping(value = "/shiftuehiclemanth",method = RequestMethod.POST) | ||
| 56 | - public List<Shiftuehiclemanth> shiftuehiclemanth(@RequestParam Map<String, Object> map){ | ||
| 57 | - | 52 | + |
| 53 | + // 班次车辆人员月报表 | ||
| 54 | + @RequestMapping(value = "/shiftuehiclemanth", method = RequestMethod.POST) | ||
| 55 | + public List<Shiftuehiclemanth> shiftuehiclemanth(@RequestParam Map<String, Object> map) { | ||
| 56 | + | ||
| 58 | return formsService.shiftuehiclemanth(map); | 57 | return formsService.shiftuehiclemanth(map); |
| 59 | } | 58 | } |
| 60 | - | ||
| 61 | - | ||
| 62 | - //班次车辆人员日统计 | ||
| 63 | - @RequestMapping(value = "/shifday",method = RequestMethod.POST) | ||
| 64 | - public List<Shifday> shifday(@RequestParam Map<String, Object> map){ | ||
| 65 | - | 59 | + |
| 60 | + // 班次车辆人员日统计 | ||
| 61 | + @RequestMapping(value = "/shifday", method = RequestMethod.POST) | ||
| 62 | + public List<Shifday> shifday(@RequestParam Map<String, Object> map) { | ||
| 63 | + | ||
| 66 | return formsService.shifday(map); | 64 | return formsService.shifday(map); |
| 67 | } | 65 | } |
| 68 | - | ||
| 69 | - //换人换车情况统计表 | ||
| 70 | - @RequestMapping(value = "/changetochange",method = RequestMethod.POST) | ||
| 71 | - public List<Changetochange> changetochange(@RequestParam Map<String, Object> map){ | ||
| 72 | - | 66 | + |
| 67 | + // 换人换车情况统计表 | ||
| 68 | + @RequestMapping(value = "/changetochange", method = RequestMethod.POST) | ||
| 69 | + public List<Changetochange> changetochange(@RequestParam Map<String, Object> map) { | ||
| 70 | + | ||
| 73 | return formsService.changetochange(map); | 71 | return formsService.changetochange(map); |
| 74 | } | 72 | } |
| 75 | - | ||
| 76 | - //路单数据 | ||
| 77 | - @RequestMapping(value = "/singledata",method = RequestMethod.POST) | ||
| 78 | - public List<Singledata> singledata(@RequestParam Map<String, Object> map){ | ||
| 79 | - | 73 | + |
| 74 | + // 路单数据 | ||
| 75 | + @RequestMapping(value = "/singledata", method = RequestMethod.POST) | ||
| 76 | + public List<Singledata> singledata(@RequestParam Map<String, Object> map) { | ||
| 77 | + | ||
| 80 | return formsService.singledata(map); | 78 | return formsService.singledata(map); |
| 81 | - } | ||
| 82 | - | ||
| 83 | - //车辆加注 | ||
| 84 | - @RequestMapping(value = "/vehicleloading",method = RequestMethod.POST) | ||
| 85 | - public List<Vehicleloading> vehicleloading(@RequestParam String line ,@RequestParam String data){ | ||
| 86 | - return formsService.vehicleloading(line,data); | ||
| 87 | } | 79 | } |
| 88 | - | ||
| 89 | - | ||
| 90 | - //运营服务阶段报表 | ||
| 91 | - @RequestMapping(value = "/operationservice",method = RequestMethod.POST) | ||
| 92 | - public List<Operationservice> operationservice(@RequestParam Map<String, Object> map){ | ||
| 93 | - | 80 | + |
| 81 | + // 车辆加注 | ||
| 82 | + @RequestMapping(value = "/vehicleloading", method = RequestMethod.POST) | ||
| 83 | + public List<Vehicleloading> vehicleloading(/*@RequestParam String gsdmVehic, @RequestParam String fgsdmVehic,*/ | ||
| 84 | + @RequestParam String line, @RequestParam String data) { | ||
| 85 | + return formsService.vehicleloading(/*gsdmVehic, fgsdmVehic, */line, data); | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + // 运营服务阶段报表 | ||
| 89 | + @RequestMapping(value = "/operationservice", method = RequestMethod.POST) | ||
| 90 | + public List<Operationservice> operationservice(@RequestParam Map<String, Object> map) { | ||
| 91 | + | ||
| 94 | return formsService.operationservice(map); | 92 | return formsService.operationservice(map); |
| 95 | } | 93 | } |
| 96 | - | ||
| 97 | - //营运线路出车率统计表 | ||
| 98 | - @RequestMapping(value = "/turnoutrate",method = RequestMethod.POST) | ||
| 99 | - public List<Turnoutrate> turnoutrate(@RequestParam Map<String, Object> map){ | ||
| 100 | - | ||
| 101 | - return formsService.turnoutrate(map); | ||
| 102 | - } | ||
| 103 | - | ||
| 104 | - //班次执行率统计表 | ||
| 105 | - @RequestMapping(value = "/executionrate",method = RequestMethod.POST) | ||
| 106 | - public List<Executionrate> executionrate(@RequestParam Map<String, Object> map){ | ||
| 107 | - | ||
| 108 | - return formsService.executionrate(map); | ||
| 109 | - } | ||
| 110 | - | ||
| 111 | - | ||
| 112 | - //营运线路名称统计表 | ||
| 113 | - @RequestMapping(value = "/allline",method = RequestMethod.POST) | ||
| 114 | - public List<Allline> allline(@RequestParam Map<String, Object> map){ | ||
| 115 | - | ||
| 116 | - return formsService.allline(map); | 94 | + |
| 95 | + // 营运线路出车率统计表 | ||
| 96 | + @RequestMapping(value = "/turnoutrate", method = RequestMethod.POST) | ||
| 97 | + public List<Turnoutrate> turnoutrate(@RequestParam Map<String, Object> map) { | ||
| 98 | + | ||
| 99 | + return formsService.turnoutrate(map); | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + // 班次执行率统计表 | ||
| 103 | + @RequestMapping(value = "/executionrate", method = RequestMethod.POST) | ||
| 104 | + public List<Executionrate> executionrate(@RequestParam Map<String, Object> map) { | ||
| 105 | + | ||
| 106 | + return formsService.executionrate(map); | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + // 营运线路名称统计表 | ||
| 110 | + @RequestMapping(value = "/allline", method = RequestMethod.POST) | ||
| 111 | + public List<Allline> allline(@RequestParam Map<String, Object> map) { | ||
| 112 | + | ||
| 113 | + return formsService.allline(map); | ||
| 117 | } | 114 | } |
| 118 | } | 115 | } |
src/main/java/com/bsth/service/forms/FormsService.java
| @@ -30,7 +30,7 @@ public interface FormsService { | @@ -30,7 +30,7 @@ public interface FormsService { | ||
| 30 | 30 | ||
| 31 | public List<Singledata> singledata(Map<String, Object> map); | 31 | public List<Singledata> singledata(Map<String, Object> map); |
| 32 | 32 | ||
| 33 | - public List<Vehicleloading> vehicleloading(String line,String data); | 33 | + public List<Vehicleloading> vehicleloading(/*String gsdmVehic,String fgsdmVehic,*/String line,String data); |
| 34 | 34 | ||
| 35 | public List<Operationservice> operationservice(Map<String, Object> map); | 35 | public List<Operationservice> operationservice(Map<String, Object> map); |
| 36 | 36 |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| @@ -47,14 +47,17 @@ public class FormsServiceImpl implements FormsService { | @@ -47,14 +47,17 @@ public class FormsServiceImpl implements FormsService { | ||
| 47 | // 行车路单日报表 | 47 | // 行车路单日报表 |
| 48 | @Override | 48 | @Override |
| 49 | public List<Waybillday> waybillday(Map<String, Object> map) { | 49 | public List<Waybillday> waybillday(Map<String, Object> map) { |
| 50 | - List list1 = new ArrayList<>();// | ||
| 51 | - String sql ="select x.schedule_date,x.j_gh,x.cl_zbh,z.JZL,z.YH,z.personnel_name " | ||
| 52 | - + "from bsth_c_s_sp_info_real x INNER join " | ||
| 53 | - + "( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH,c.personnel_name from" | 50 | + List list1 = new ArrayList<>();// |
| 51 | + String sql ="select x.schedule_date,x.j_gh,x.cl_zbh,z.JZL,z.YH,z.personnel_name,x.gs_bm,x.gs_name,x.fgs_bm,x.fgs_name " | ||
| 52 | + + " from bsth_c_s_sp_info_real x INNER join " | ||
| 53 | + + " ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH,c.personnel_name from" | ||
| 54 | + " bsth_c_ylb y LEFT JOIN bsth_c_personnel c ON c.job_code=y.JSY " | 54 | + " bsth_c_ylb y LEFT JOIN bsth_c_personnel c ON c.job_code=y.JSY " |
| 55 | - + "where to_days(y.RQ)=to_days('"+map.get("date").toString() + "') and y.XLBM= '"+ map.get("line").toString()+"' GROUP BY y.NBBM) " | ||
| 56 | - + "z on x.cl_zbh=z.nbbm where to_days( x.schedule_date)=to_days('"+map.get("date").toString()+"') " | ||
| 57 | - + "and x.xl_bm='"+map.get("line").toString()+"' GROUP BY x.cl_zbh,j_gh"; | 55 | + + " where to_days(y.RQ)=to_days('"+map.get("date").toString() + "') and y.XLBM= '"+ map.get("line").toString()+"' GROUP BY y.NBBM) " |
| 56 | + + " z on x.cl_zbh=z.nbbm where to_days( x.schedule_date)=to_days('"+map.get("date").toString()+"') " | ||
| 57 | + + " and x.xl_bm='"+map.get("line").toString()+"'" | ||
| 58 | + + " and x.gs_bm='"+map.get("gsdmWaybillday").toString()+"'" | ||
| 59 | + + " and x.fgs_bm='"+map.get("fgsdmWaybillday").toString() | ||
| 60 | + + "' GROUP BY x.cl_zbh,j_gh"; | ||
| 58 | List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() { | 61 | List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() { |
| 59 | @Override | 62 | @Override |
| 60 | public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException { | 63 | public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException { |
| @@ -83,10 +86,14 @@ public class FormsServiceImpl implements FormsService { | @@ -83,10 +86,14 @@ public class FormsServiceImpl implements FormsService { | ||
| 83 | // 线路客流量报表 | 86 | // 线路客流量报表 |
| 84 | @Override | 87 | @Override |
| 85 | public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map) { | 88 | public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map) { |
| 86 | - String sql = " SELECT s.station_name,l.name,l.create_date from bsth_c_stationroute s " | ||
| 87 | - + " LEFT JOIN bsth_c_line l on s.line_code=l.line_code " | 89 | + String sql = " SELECT s.station_name,l.name,l.create_date,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name" |
| 90 | + + " from bsth_c_stationroute s " | ||
| 91 | + + " LEFT JOIN bsth_c_line l on s.line_code=l.line_code " | ||
| 92 | + + " LEFT JOIN bsth_c_s_sp_info_real r on r.xl_bm=l.line_code" | ||
| 88 | + " where to_days(l.create_date)=to_days('"+map.get("date").toString() + "') " | 93 | + " where to_days(l.create_date)=to_days('"+map.get("date").toString() + "') " |
| 89 | + " and l.line_code=" + map.get("line").toString() | 94 | + " and l.line_code=" + map.get("line").toString() |
| 95 | + /*+ " and r.gs_bm='"+map.get("gsdmLine").toString()+"'" | ||
| 96 | + + " and r.fgs_bm='"+map.get("fgsdmLine").toString()+"'"*/ | ||
| 90 | + " GROUP BY s.station_name "; | 97 | + " GROUP BY s.station_name "; |
| 91 | 98 | ||
| 92 | List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() { | 99 | List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() { |
| @@ -109,12 +116,16 @@ public class FormsServiceImpl implements FormsService { | @@ -109,12 +116,16 @@ public class FormsServiceImpl implements FormsService { | ||
| 109 | @Override | 116 | @Override |
| 110 | public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) { | 117 | public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) { |
| 111 | List list1 = new ArrayList<>();// | 118 | List list1 = new ArrayList<>();// |
| 112 | - String sql = "select r.j_name,r.schedule_date_str,r.update_date,r.cl_zbh " + " from bsth_c_s_sp_info_real r " | 119 | + String sql = "select r.j_name,r.schedule_date_str,r.update_date,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " |
| 120 | + + " from bsth_c_s_sp_info_real r " | ||
| 113 | + " LEFT JOIN bsth_c_s_ttinfo_detail d on r.lp_name=d.lp " | 121 | + " LEFT JOIN bsth_c_s_ttinfo_detail d on r.lp_name=d.lp " |
| 114 | + " LEFT JOIN bsth_c_line_information l on l.line=r.lp_name " | 122 | + " LEFT JOIN bsth_c_line_information l on l.line=r.lp_name " |
| 115 | + " where to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') " | 123 | + " where to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') " |
| 116 | - + " and to_days('" + map.get("endDate").toString() + "') " + " and r.xl_bm='" | ||
| 117 | - + map.get("line").toString() + "' " + " GROUP BY r.j_name" + " ORDER BY r.j_name"; | 124 | + + " and to_days('" + map.get("endDate").toString() + "') " |
| 125 | + + " and r.xl_bm='"+ map.get("line").toString() + "'" | ||
| 126 | + /* + " and r.gs_bm='"+map.get("gsdmManth").toString()+"'" | ||
| 127 | + + " and r.fgs_bm='"+map.get("fgsdmManth").toString()+"'"*/ | ||
| 128 | + + " GROUP BY r.j_name" + " ORDER BY r.j_name"; | ||
| 118 | startDate = map.get("startDate").toString(); | 129 | startDate = map.get("startDate").toString(); |
| 119 | endDate = map.get("endDate").toString(); | 130 | endDate = map.get("endDate").toString(); |
| 120 | List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() { | 131 | List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() { |
| @@ -128,6 +139,7 @@ public class FormsServiceImpl implements FormsService { | @@ -128,6 +139,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 128 | 139 | ||
| 129 | maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate, | 140 | maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate, |
| 130 | endDate); | 141 | endDate); |
| 142 | + | ||
| 131 | shif.setJhlc(maps.get("jhlc").toString()); | 143 | shif.setJhlc(maps.get("jhlc").toString()); |
| 132 | shif.setEmptMileage(maps.get("ksgl").toString()); | 144 | shif.setEmptMileage(maps.get("ksgl").toString()); |
| 133 | shif.setRemMileage(maps.get("remMileage").toString()); | 145 | shif.setRemMileage(maps.get("remMileage").toString()); |
| @@ -148,9 +160,14 @@ public class FormsServiceImpl implements FormsService { | @@ -148,9 +160,14 @@ public class FormsServiceImpl implements FormsService { | ||
| 148 | // 班次车辆人员日统计 | 160 | // 班次车辆人员日统计 |
| 149 | @Override | 161 | @Override |
| 150 | public List<Shifday> shifday(Map<String, Object> map) { | 162 | public List<Shifday> shifday(Map<String, Object> map) { |
| 151 | - String sql = " select r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.schedule_date,r.cl_zbh,r.j_gh " | ||
| 152 | - + " FROM bsth_c_s_sp_info_real r " + " where to_days(r.schedule_date)=to_days('" | ||
| 153 | - + map.get("date").toString() + "') and r.xl_bm=" + map.get("line").toString() + " GROUP BY r.j_name "; | 163 | + String sql = " select r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.schedule_date," |
| 164 | + + " r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | ||
| 165 | + + " FROM bsth_c_s_sp_info_real r " | ||
| 166 | + + " where to_days(r.schedule_date)=to_days('" | ||
| 167 | + + map.get("date").toString() + "') and r.xl_bm=" + map.get("line").toString() | ||
| 168 | + /*+ " and r.gs_bm='"+map.get("gsdmShif").toString()+"'" | ||
| 169 | + + " and r.fgs_bm='"+map.get("fgsdmShif").toString()+"'"*/ | ||
| 170 | + + " GROUP BY r.j_name "; | ||
| 154 | 171 | ||
| 155 | List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { | 172 | List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { |
| 156 | 173 | ||
| @@ -166,14 +183,14 @@ public class FormsServiceImpl implements FormsService { | @@ -166,14 +183,14 @@ public class FormsServiceImpl implements FormsService { | ||
| 166 | map = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), | 183 | map = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), |
| 167 | arg0.getString("schedule_date")); | 184 | arg0.getString("schedule_date")); |
| 168 | shifday.setJhlc(map.get("jhlc").toString());// 计划里程 | 185 | shifday.setJhlc(map.get("jhlc").toString());// 计划里程 |
| 169 | - // shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程 | 186 | + //shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程 |
| 170 | shifday.setYygl(map.get("yygl").toString());// 营运里程 | 187 | shifday.setYygl(map.get("yygl").toString());// 营运里程 |
| 171 | shifday.setEmptMileage(map.get("ksgl").toString());// 空驶里程 | 188 | shifday.setEmptMileage(map.get("ksgl").toString());// 空驶里程 |
| 172 | shifday.setRemMileage(map.get("remMileage").toString());// 抽减里程 | 189 | shifday.setRemMileage(map.get("remMileage").toString());// 抽减里程 |
| 173 | shifday.setAddMileage(map.get("addMileage").toString());// 增加里程 | 190 | shifday.setAddMileage(map.get("addMileage").toString());// 增加里程 |
| 174 | shifday.setTotalm(map.get("realMileage").toString());// 总里程 | 191 | shifday.setTotalm(map.get("realMileage").toString());// 总里程 |
| 175 | shifday.setJhbc(map.get("jhbc").toString());// 计划班次 | 192 | shifday.setJhbc(map.get("jhbc").toString());// 计划班次 |
| 176 | - // shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次 | 193 | + //shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次 |
| 177 | shifday.setCjbc(map.get("cjbc").toString());// 抽减班次 | 194 | shifday.setCjbc(map.get("cjbc").toString());// 抽减班次 |
| 178 | shifday.setLjbc(map.get("ljbc").toString());// 增加班次 | 195 | shifday.setLjbc(map.get("ljbc").toString());// 增加班次 |
| 179 | shifday.setSjbc(map.get("sjbc").toString());// 实际班次 | 196 | shifday.setSjbc(map.get("sjbc").toString());// 实际班次 |
| @@ -249,30 +266,52 @@ public class FormsServiceImpl implements FormsService { | @@ -249,30 +266,52 @@ public class FormsServiceImpl implements FormsService { | ||
| 249 | // 路单数据 | 266 | // 路单数据 |
| 250 | @Override | 267 | @Override |
| 251 | public List<Singledata> singledata(Map<String, Object> map) { | 268 | public List<Singledata> singledata(Map<String, Object> map) { |
| 269 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 270 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); | ||
| 271 | + Date d = null; | ||
| 272 | + Date d1 = null; | ||
| 273 | + try { | ||
| 274 | + d = sdf.parse(map.get("startDate").toString()); | ||
| 275 | + d1 = sdf.parse(map.get("endDate").toString()); | ||
| 276 | + } catch (ParseException e) { | ||
| 252 | 277 | ||
| 253 | - String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y" | ||
| 254 | - + " where y.RQ BETWEEN '" + map.get("startDate").toString() + "'" + " and '" | ||
| 255 | - + map.get("endDate").toString() + "'" + " and y.XLBM='" + map.get("line").toString() + "'" | ||
| 256 | - + " GROUP BY y.NBBM "; | 278 | + e.printStackTrace(); |
| 279 | + } | ||
| 280 | + String rq2 = sdf1.format(d); | ||
| 281 | + String rq3 = sdf1.format(d1); | ||
| 257 | 282 | ||
| 283 | + rq = rq2 + "-" + rq3; | ||
| 284 | + | ||
| 285 | + String sql = " SELECT r.schedule_date_str,r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | ||
| 286 | + + " FROM bsth_c_ylb y LEFT JOIN bsth_c_s_sp_info_real r on r.cl_zbh=y.NBBM" | ||
| 287 | + + " where r.schedule_date_str BETWEEN '" + map.get("startDate").toString() + "'" | ||
| 288 | + + " and '"+ map.get("endDate").toString() + "'" + " and r.xl_bm='" | ||
| 289 | + + map.get("line").toString() + "'" | ||
| 290 | + /* + " and r.gs_bm='"+map.get("gsdmSing").toString()+"'" | ||
| 291 | + + " and r.fgs_bm='"+map.get("fgsdmSing").toString()+"'"*/ | ||
| 292 | + + " GROUP BY y.NBBM "; | ||
| 293 | + | ||
| 294 | + startDate = map.get("startDate").toString(); | ||
| 295 | + endDate = map.get("endDate").toString(); | ||
| 258 | List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | 296 | List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 259 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 260 | - | 297 | + //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| 261 | @Override | 298 | @Override |
| 262 | public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { | 299 | public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 263 | Singledata sin = new Singledata(); | 300 | Singledata sin = new Singledata(); |
| 264 | - sin.setrQ(sdf.format(arg0.getDate("rq"))); | ||
| 265 | - sin.setgS(arg0.getString("SSGSDM").toString()); | ||
| 266 | - sin.setxL(arg0.getString("XLBM").toString()); | ||
| 267 | - sin.setClzbh(arg0.getString("NBBM").toString()); | ||
| 268 | - sin.setJsy(arg0.getString("JSY").toString()); | 301 | + sin.setrQ(rq); |
| 302 | + sin.setgS(arg0.getString("gs_name").toString()); | ||
| 303 | + sin.setxL(arg0.getString("xl_bm").toString()); | ||
| 304 | + sin.setClzbh(arg0.getString("cl_zbh").toString()); | ||
| 305 | + sin.setJsy(arg0.getString("j_gh").toString()); | ||
| 306 | + sin.setjName(arg0.getString("j_name").toString()); | ||
| 269 | sin.setHyl(arg0.getString("YH").toString()); | 307 | sin.setHyl(arg0.getString("YH").toString()); |
| 270 | sin.setJzl(arg0.getString("JZL").toString()); | 308 | sin.setJzl(arg0.getString("JZL").toString()); |
| 271 | // sin.setJzl(arg0.getString(""));//非营业性用油 | 309 | // sin.setJzl(arg0.getString(""));//非营业性用油 |
| 272 | sin.setJhjl(arg0.getString("JZL")); | 310 | sin.setJhjl(arg0.getString("JZL")); |
| 273 | Map<String, Object> maps = new HashMap<>(); | 311 | Map<String, Object> maps = new HashMap<>(); |
| 274 | - maps = scheduleRealInfoService.findKMBC2(sin.getJsy(), sin.getClzbh(), sin.getrQ()); | ||
| 275 | - sin.setjName(maps.get("j_name") == null ? "" : maps.get("j_name").toString()); | 312 | + maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate, |
| 313 | + endDate); | ||
| 314 | + //sin.setjName(maps.get("j_name") == null ? "" : maps.get("j_name").toString()); | ||
| 276 | sin.setSgh(maps.get("s_gh") == null ? "" : maps.get("s_gh").toString()); | 315 | sin.setSgh(maps.get("s_gh") == null ? "" : maps.get("s_gh").toString()); |
| 277 | sin.setsName(maps.get("s_name") == null ? "" : maps.get("s_name").toString()); | 316 | sin.setsName(maps.get("s_name") == null ? "" : maps.get("s_name").toString()); |
| 278 | sin.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | 317 | sin.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); |
| @@ -289,10 +328,16 @@ public class FormsServiceImpl implements FormsService { | @@ -289,10 +328,16 @@ public class FormsServiceImpl implements FormsService { | ||
| 289 | @Override | 328 | @Override |
| 290 | public List<Operationservice> operationservice(Map<String, Object> map) { | 329 | public List<Operationservice> operationservice(Map<String, Object> map) { |
| 291 | 330 | ||
| 292 | - String sql = " SELECT y.RQ,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y" + " where y.RQ BETWEEN '" | ||
| 293 | - + map.get("startDate").toString() + "'" + " and '" + map.get("endDate").toString() + "'" | ||
| 294 | - + " and y.XLBM='" + map.get("line").toString() + "'" + " GROUP BY y.NBBM "; | ||
| 295 | - | 331 | + String sql = " SELECT r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " |
| 332 | + + " FROM bsth_c_ylb y LEFT JOIN bsth_c_s_sp_info_real r on r.cl_zbh=y.NBBM" | ||
| 333 | + + " where r.schedule_date_str BETWEEN '"+ map.get("startDate").toString() | ||
| 334 | + + "'" + " and '" + map.get("endDate").toString() + "'" | ||
| 335 | + + " and r.xl_bm='" + map.get("line").toString() + "'" | ||
| 336 | + /* + " and r.gs_bm='"+map.get("gsdmOperat").toString()+"'" | ||
| 337 | + + " and r.fgs_bm='"+map.get("fgsdmOperat").toString()+"'"*/ | ||
| 338 | + + " GROUP BY r.cl_zbh "; | ||
| 339 | + startDate = map.get("startDate").toString(); | ||
| 340 | + endDate = map.get("endDate").toString(); | ||
| 296 | List<Operationservice> list = jdbcTemplate.query(sql, new RowMapper<Operationservice>() { | 341 | List<Operationservice> list = jdbcTemplate.query(sql, new RowMapper<Operationservice>() { |
| 297 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 342 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| 298 | 343 | ||
| @@ -300,11 +345,12 @@ public class FormsServiceImpl implements FormsService { | @@ -300,11 +345,12 @@ public class FormsServiceImpl implements FormsService { | ||
| 300 | public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException { | 345 | public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 301 | Singledata sin = new Singledata(); | 346 | Singledata sin = new Singledata(); |
| 302 | Operationservice op = new Operationservice(); | 347 | Operationservice op = new Operationservice(); |
| 303 | - op.setXlName(arg0.getString("XLBM").toString()); | 348 | + op.setXlName(arg0.getString("xl_name").toString()); |
| 304 | op.setJzl(arg0.getString("JZL").toString()); | 349 | op.setJzl(arg0.getString("JZL").toString()); |
| 305 | op.setXhl(arg0.getString("YH").toString()); | 350 | op.setXhl(arg0.getString("YH").toString()); |
| 306 | Map<String, Object> maps = new HashMap<>(); | 351 | Map<String, Object> maps = new HashMap<>(); |
| 307 | - maps = scheduleRealInfoService.findKMBC2(sin.getJsy(), sin.getClzbh(), sin.getrQ()); | 352 | + maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate, |
| 353 | + endDate); | ||
| 308 | op.setXsgl(maps.get("yygl").toString() == null ? "" : maps.get("yygl").toString()); | 354 | op.setXsgl(maps.get("yygl").toString() == null ? "" : maps.get("yygl").toString()); |
| 309 | op.setEmptMileage(maps.get("ksgl").toString() == null ? "" : maps.get("ksgl").toString()); | 355 | op.setEmptMileage(maps.get("ksgl").toString() == null ? "" : maps.get("ksgl").toString()); |
| 310 | op.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString()); | 356 | op.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString()); |
| @@ -316,26 +362,30 @@ public class FormsServiceImpl implements FormsService { | @@ -316,26 +362,30 @@ public class FormsServiceImpl implements FormsService { | ||
| 316 | 362 | ||
| 317 | // 车辆加注 | 363 | // 车辆加注 |
| 318 | @Override | 364 | @Override |
| 319 | - public List<Vehicleloading> vehicleloading(String line, String data) { | 365 | + public List<Vehicleloading> vehicleloading(/*String gsdmVehic,String fgsdmVehic,*/String line, String date) { |
| 320 | 366 | ||
| 321 | - String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y " | ||
| 322 | - + " where to_days(y.RQ)=to_days('" + data + "')" + " and y.XLBM='" + line + "' " | ||
| 323 | - + " GROUP BY y.NBBM "; | 367 | + String sql = " SELECT r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " |
| 368 | + + " FROM bsth_c_ylb y LEFT JOIN bsth_c_s_sp_info_real r on r.cl_zbh=y.NBBM " | ||
| 369 | + + " where to_days(r.schedule_date_str)=to_days('" + date + "')" | ||
| 370 | + + " and r.xl_bm='" + line + "' " | ||
| 371 | + /* + " and r.gs_bm='"+gsdmVehic +"'" | ||
| 372 | + + " and r.fgs_bm='"+fgsdmVehic +"'"*/ | ||
| 373 | + + " GROUP BY r.cl_zbh "; | ||
| 324 | 374 | ||
| 325 | List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() { | 375 | List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() { |
| 326 | @Override | 376 | @Override |
| 327 | public Vehicleloading mapRow(ResultSet arg0, int arg1) throws SQLException { | 377 | public Vehicleloading mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 328 | Vehicleloading ve = new Vehicleloading(); | 378 | Vehicleloading ve = new Vehicleloading(); |
| 329 | - ve.setrQ(arg0.getString("RQ").toString()); | ||
| 330 | - ve.setgS(arg0.getString("SSDM").toString()); | ||
| 331 | - ve.setxL(arg0.getString("XLBM").toString()); | ||
| 332 | - ve.setClzbh(arg0.getString("NBBM").toString()); | 379 | + ve.setrQ(arg0.getString("schedule_date_str").toString()); |
| 380 | + ve.setgS(arg0.getString("gs_name").toString()); | ||
| 381 | + ve.setxL(arg0.getString("xl_bm").toString()); | ||
| 382 | + ve.setClzbh(arg0.getString("cl_zbh").toString()); | ||
| 333 | ve.setHyl(arg0.getString("YH").toString()); | 383 | ve.setHyl(arg0.getString("YH").toString()); |
| 334 | ve.setJzl(arg0.getString("JZL").toString()); | 384 | ve.setJzl(arg0.getString("JZL").toString()); |
| 335 | // ve.setLs(arg0.getString("").toString());//尿素 | 385 | // ve.setLs(arg0.getString("").toString());//尿素 |
| 336 | Map<String, Object> maps = new HashMap<>(); | 386 | Map<String, Object> maps = new HashMap<>(); |
| 337 | - maps = scheduleRealInfoService.findKMBC2(arg0.getString("JSY"), arg0.getString("NBBM"), | ||
| 338 | - arg0.getString("RQ")); | 387 | + maps = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), |
| 388 | + arg0.getString("schedule_date_str")); | ||
| 339 | ve.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | 389 | ve.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); |
| 340 | ve.setJhbc(maps.get("jhbc").toString() == null ? "" : maps.get("jhbc").toString());// 计划班次 | 390 | ve.setJhbc(maps.get("jhbc").toString() == null ? "" : maps.get("jhbc").toString());// 计划班次 |
| 341 | ve.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString());// 实际班次 | 391 | ve.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString());// 实际班次 |
| @@ -367,13 +417,15 @@ public class FormsServiceImpl implements FormsService { | @@ -367,13 +417,15 @@ public class FormsServiceImpl implements FormsService { | ||
| 367 | 417 | ||
| 368 | String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,b.warrant_car from " | 418 | String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,b.warrant_car from " |
| 369 | + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" | 419 | + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" |
| 370 | - + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | ||
| 371 | - + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | ||
| 372 | - + map.get("line").toString() + "' AND gs_bm is not null" | 420 | + + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"+ map.get("startDate").toString() + "' " |
| 421 | + + " and '" + map.get("endDate").toString() + "' and xl_bm='"+ map.get("line").toString() + "' " | ||
| 422 | + + " AND gs_bm is not null " | ||
| 423 | + /*+ " and gs_bm='"+ map.get("gsdmTurn").toString() + "'" | ||
| 424 | + + " and fgs_bm='"+ map.get("fgsdmTurn").toString() + "'"*/ | ||
| 373 | + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | 425 | + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" |
| 374 | - + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl,t.warrant_car " | ||
| 375 | - + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | ||
| 376 | - + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | 426 | + + " SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl,t.warrant_car " |
| 427 | + + " from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | ||
| 428 | + + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | ||
| 377 | + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | 429 | + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() |
| 378 | + "' AND gs_bm is not null " | 430 | + "' AND gs_bm is not null " |
| 379 | + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | 431 | + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " |
src/main/resources/static/pages/forms/statement/allline.html
| 1 | <style type="text/css"> | 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 | - text-align: center;} | ||
| 15 | - | ||
| 16 | - .table > tbody + tbody { | ||
| 17 | - border-top: 1px solid; } | ||
| 18 | - .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{ text-align: center; } | ||
| 19 | -.table-checkable tr > th:first-child, .table-checkable tr > td:first-child { | ||
| 20 | - text-align: center; | ||
| 21 | - max-width: initial; | ||
| 22 | - min-width: 40px; | ||
| 23 | - padding-left: 0; | ||
| 24 | - padding-right: 0; | 2 | +.table-bordered { |
| 3 | + border: 1px solid; | ||
| 25 | } | 4 | } |
| 26 | 5 | ||
| 6 | +.table-bordered>thead>tr>th, .table-bordered>thead>tr>td, | ||
| 7 | + .table-bordered>tbody>tr>th, .table-bordered>tbody>tr>td, | ||
| 8 | + .table-bordered>tfoot>tr>th, .table-bordered>tfoot>tr>td { | ||
| 9 | + border: 1px solid; | ||
| 10 | +} | ||
| 11 | + | ||
| 12 | +.table-bordered>thead>tr>th, .table-bordered>thead>tr>td { | ||
| 13 | + border-bottom-width: 2px; | ||
| 14 | + text-align: center; | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +.table>tbody+tbody { | ||
| 18 | + border-top: 1px solid; | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, | ||
| 22 | + .table>thead>tr>td, .table>thead>tr>th { | ||
| 23 | + text-align: center; | ||
| 24 | +} | ||
| 25 | + | ||
| 26 | +.table-checkable tr>th:first-child, .table-checkable tr>td:first-child { | ||
| 27 | + text-align: center; | ||
| 28 | + max-width: initial; | ||
| 29 | + min-width: 40px; | ||
| 30 | + padding-left: 0; | ||
| 31 | + padding-right: 0; | ||
| 32 | +} | ||
| 27 | </style> | 33 | </style> |
| 28 | 34 | ||
| 29 | <div class="page-head"> | 35 | <div class="page-head"> |
| @@ -37,51 +43,64 @@ | @@ -37,51 +43,64 @@ | ||
| 37 | <div class="portlet light porttlet-fit bordered"> | 43 | <div class="portlet light porttlet-fit bordered"> |
| 38 | <div class="portlet-title"> | 44 | <div class="portlet-title"> |
| 39 | <form class="form-inline" action="" method="post"> | 45 | <form class="form-inline" action="" method="post"> |
| 40 | - <div style="display: inline-block;"> | ||
| 41 | - <span class="item-label" style="width: 80px;">线路: </span> | ||
| 42 | - <select class="form-control" name="line" id="line" style="width: 120px;"></select> | ||
| 43 | - </div> | ||
| 44 | - <div style="display: inline-block;margin-left: 15px;"> | ||
| 45 | - <span class="item-label" style="width: 80px;">开始时间: </span> | ||
| 46 | - <input class="form-control" type="text" id="startDate" style="width: 120px;"/> | ||
| 47 | - </div> | ||
| 48 | - <div style="display: inline-block;margin-left: 15px;"> | ||
| 49 | - <span class="item-label" style="width: 80px;">结束时间: </span> | ||
| 50 | - <input class="form-control" type="text" id="endDate" style="width: 120px;"/> | ||
| 51 | - </div> | ||
| 52 | - <div class="form-group"> | ||
| 53 | - <input class="btn btn-default" type="button" id="query" value="筛选"/> | ||
| 54 | - <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 55 | - </div> | 46 | + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_allline"> |
| 47 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 48 | + <select class="form-control" name="company" id="gsdmAllline" style="width: 140px;"></select> | ||
| 49 | + </div> | ||
| 50 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_allline"> | ||
| 51 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 52 | + <select class="form-control" name="subCompany" id="fgsdmAllline" style="width: 140px;"></select> | ||
| 53 | + </div> | ||
| 54 | + <div style="display: inline-block;"> | ||
| 55 | + <span class="item-label" style="width: 80px;">线路: </span> <select | ||
| 56 | + class="form-control" name="line" id="line" style="width: 120px;"></select> | ||
| 57 | + </div> | ||
| 58 | + <div style="display: inline-block; margin-left: 15px;"> | ||
| 59 | + <span class="item-label" style="width: 80px;">开始时间: </span> <input | ||
| 60 | + class="form-control" type="text" id="startDate" | ||
| 61 | + style="width: 120px;" /> | ||
| 62 | + </div> | ||
| 63 | + <div style="display: inline-block; margin-left: 15px;"> | ||
| 64 | + <span class="item-label" style="width: 80px;">结束时间: </span> <input | ||
| 65 | + class="form-control" type="text" id="endDate" | ||
| 66 | + style="width: 120px;" /> | ||
| 67 | + </div> | ||
| 68 | + <div class="form-group"> | ||
| 69 | + <input class="btn btn-default" type="button" id="query" value="筛选" /> | ||
| 70 | + <input class="btn btn-default" type="button" id="export" | ||
| 71 | + value="导出" /> | ||
| 72 | + </div> | ||
| 56 | </form> | 73 | </form> |
| 57 | </div> | 74 | </div> |
| 58 | <div class="portlet-body"> | 75 | <div class="portlet-body"> |
| 59 | - <div class="table-container" style="margin-top: 20px;overflow:auto;min-width: 1000px"> | ||
| 60 | - <table class="table table-bordered table-hover table-checkable" id="forms1"> | 76 | + <div class="table-container" |
| 77 | + style="margin-top: 20px; overflow: auto; min-width: 1000px"> | ||
| 78 | + <table class="table table-bordered table-hover table-checkable" | ||
| 79 | + id="forms1"> | ||
| 61 | <thead> | 80 | <thead> |
| 62 | <tr> | 81 | <tr> |
| 63 | <th colspan="15">营运线路名称统计表</th> | 82 | <th colspan="15">营运线路名称统计表</th> |
| 64 | </tr> | 83 | </tr> |
| 65 | <tr> | 84 | <tr> |
| 66 | - <td rowspan="2" style=" padding-top: 20px;">日期</td> | ||
| 67 | - <td rowspan="2" style=" padding-top: 20px;">公司</td> | ||
| 68 | - <td rowspan="2" style=" padding-top: 20px;">直属公司</td> | ||
| 69 | - <td rowspan="2" style=" padding-top: 20px;">线路名称</td> | 85 | + <td rowspan="2" style="padding-top: 20px;">日期</td> |
| 86 | + <td rowspan="2" style="padding-top: 20px;">公司</td> | ||
| 87 | + <td rowspan="2" style="padding-top: 20px;">直属公司</td> | ||
| 88 | + <td rowspan="2" style="padding-top: 20px;">线路名称</td> | ||
| 70 | <td colspan="2">出车数</td> | 89 | <td colspan="2">出车数</td> |
| 71 | - <td rowspan="2" >出车率</td> | ||
| 72 | - <td colspan="2" >班次数</td> | ||
| 73 | - <td rowspan="2" style=" padding-top: 20px;">班次执行率</td> | ||
| 74 | - <td rowspan="2" style=" padding-top: 20px;">说明</td> | 90 | + <td rowspan="2">出车率</td> |
| 91 | + <td colspan="2">班次数</td> | ||
| 92 | + <td rowspan="2" style="padding-top: 20px;">班次执行率</td> | ||
| 93 | + <td rowspan="2" style="padding-top: 20px;">说明</td> | ||
| 75 | </tr> | 94 | </tr> |
| 76 | <tr> | 95 | <tr> |
| 77 | <td>计划</td> | 96 | <td>计划</td> |
| 78 | <td>实际</td> | 97 | <td>实际</td> |
| 79 | - <td>计划</td> | 98 | + <td>计划</td> |
| 80 | <td>实际</td> | 99 | <td>实际</td> |
| 81 | </tr> | 100 | </tr> |
| 82 | </thead> | 101 | </thead> |
| 83 | <tbody id="tbody"> | 102 | <tbody id="tbody"> |
| 84 | - | 103 | + |
| 85 | </tbody> | 104 | </tbody> |
| 86 | <tr> | 105 | <tr> |
| 87 | <td colspan="1">分类汇总</td> | 106 | <td colspan="1">分类汇总</td> |
| @@ -104,96 +123,180 @@ | @@ -104,96 +123,180 @@ | ||
| 104 | </div> | 123 | </div> |
| 105 | 124 | ||
| 106 | <script> | 125 | <script> |
| 107 | - $(function(){ | 126 | + $(function() { |
| 108 | // 关闭左侧栏 | 127 | // 关闭左侧栏 |
| 109 | if (!$('body').hasClass('page-sidebar-closed')) | 128 | if (!$('body').hasClass('page-sidebar-closed')) |
| 110 | $('.menu-toggler.sidebar-toggler').click(); | 129 | $('.menu-toggler.sidebar-toggler').click(); |
| 111 | - | 130 | + |
| 112 | $("#startDate,#endDate").datetimepicker({ | 131 | $("#startDate,#endDate").datetimepicker({ |
| 113 | format : 'YYYY-MM-DD', | 132 | format : 'YYYY-MM-DD', |
| 114 | locale : 'zh-cn' | 133 | locale : 'zh-cn' |
| 115 | }); | 134 | }); |
| 116 | - | ||
| 117 | - $.get('/basic/lineCode2Name',function(result){ | ||
| 118 | - var data=[]; | ||
| 119 | - | ||
| 120 | - for(var code in result){ | ||
| 121 | - data.push({id: code, text: result[code]}); | 135 | + |
| 136 | + var obj = []; | ||
| 137 | + $.get('/user/companyData', function(result) { | ||
| 138 | + obj = result; | ||
| 139 | + var options = ''; | ||
| 140 | + for (var i = 0; i < obj.length; i++) { | ||
| 141 | + options += '<option value="'+obj[i].companyCode+'">' | ||
| 142 | + + obj[i].companyName + '</option>'; | ||
| 122 | } | 143 | } |
| 123 | - initPinYinSelect2('#line',data,''); | ||
| 124 | - | ||
| 125 | - }) | ||
| 126 | 144 | ||
| 127 | - var line; | ||
| 128 | - var startDate; | ||
| 129 | - var endDate; | ||
| 130 | - $("#query").on("click",function(){ | ||
| 131 | - | ||
| 132 | - line = $("#line").val(); | ||
| 133 | - startDate1=$("#startDate").val(); | ||
| 134 | - endDate1=$("#endDate").val(); | ||
| 135 | - | ||
| 136 | - if(startDate1!=''&&endDate1!=''){ | ||
| 137 | - $post('/mcy_forms/allline',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ | ||
| 138 | - // 把数据填充到模版中 | ||
| 139 | - var tbodyHtml = template('allline',{list:result}); | ||
| 140 | - // 把渲染好的模版html文本追加到表格中 | ||
| 141 | - $('#tbody').html(tbodyHtml); | ||
| 142 | - line = $("#line").val(); | ||
| 143 | - startDate = $("#startDate").val(); | ||
| 144 | - endDate = $("#endDate").val(); | ||
| 145 | - $("#sDate").text(startDate); | ||
| 146 | - $("#eDate").text(endDate); | ||
| 147 | - | ||
| 148 | - var total_jh = 0; | ||
| 149 | - var total_sj = 0,total_ccl = 0,total_bcjh = 0; | ||
| 150 | - var total_bcjh = 0,total_bcsj = 0,total_bczxl = 0; | ||
| 151 | - var total_gs=0; | ||
| 152 | - var total_zhgs=0; | ||
| 153 | - $.each(result, function(i, obj) { | ||
| 154 | - total_gs +=Number(obj.gsgs); | ||
| 155 | - total_zhgs +=Number(obj.fgsgs); | ||
| 156 | - total_jh = Number(obj.cchjh)+Number(total_jh); | ||
| 157 | - total_sj = Number(obj.cchsj)+Number(total_sj); | ||
| 158 | - | ||
| 159 | - total_ccl =(Number(total_sj)/Number(total_jh))*100; | ||
| 160 | - total_bcjh = Number(obj.bcjh)+Number(total_bcjh); | ||
| 161 | - total_bcsj = Number(obj.bcsj)+Number(total_bcsj); | ||
| 162 | - total_bczxl = (Number(total_bcsj)/Number(total_bcjh))*100; | ||
| 163 | - | ||
| 164 | - }); | ||
| 165 | - $("#total_gs").text(total_gs); | ||
| 166 | - $("#total_zhgs").text(total_zhgs); | ||
| 167 | - $("#total_jh").text(total_jh); | ||
| 168 | - $("#total_sj").text(total_sj); | ||
| 169 | - $("#total_ccl").text(total_ccl.toFixed(2)+'%'); | ||
| 170 | - $("#total_bcjh").text(total_bcjh); | ||
| 171 | - $("#total_bcsj").text(total_bcsj); | ||
| 172 | - $("#total_bczxl").text(total_bczxl.toFixed(2)+'%'); | ||
| 173 | - | ||
| 174 | - var temp = {}; | ||
| 175 | - var today_account = 0; | ||
| 176 | - | ||
| 177 | - temp["line"] = $("#line").text(); | ||
| 178 | - $.each(result, function(i, obj) { | ||
| 179 | - if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){ | ||
| 180 | - today_account++; | ||
| 181 | - } | ||
| 182 | - obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | ||
| 183 | - }); | ||
| 184 | - | ||
| 185 | - }) | ||
| 186 | - | ||
| 187 | - }else{ | ||
| 188 | - alert("请选择时间范围!"); | ||
| 189 | - } | ||
| 190 | - }); | ||
| 191 | - | ||
| 192 | - $("#export").on("click",function(){ | ||
| 193 | - $post('/mcy_export/alllineExport',{line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){ | ||
| 194 | - window.open("/downloadFile/download?fileName=营运线路名称统计表"+moment(startDate).format("YYYYMMDD")); | 145 | + if (obj.length == 0) { |
| 146 | + $("#gsdmDiv_allline").css('display', 'none'); | ||
| 147 | + $('#fgsdmDiv_allline').css('display', 'none'); | ||
| 148 | + } else if (obj.length == 1) { | ||
| 149 | + $("#gsdmDiv_allline").css('display', 'none'); | ||
| 150 | + if (obj[0].children.length == 1 || obj[0].children.length == 0) | ||
| 151 | + $('#fgsdmDiv_allline').css('display', 'none'); | ||
| 152 | + } | ||
| 153 | + $('#gsdmAllline').html(options); | ||
| 154 | + updateCompany(); | ||
| 195 | }); | 155 | }); |
| 196 | - }); | 156 | + |
| 157 | + $("#gsdmAllline").on("change", updateCompany); | ||
| 158 | + function updateCompany() { | ||
| 159 | + var company = $('#gsdmAllline').val(); | ||
| 160 | + var options = ''; | ||
| 161 | + for (var i = 0; i < obj.length; i++) { | ||
| 162 | + if (obj[i].companyCode == company) { | ||
| 163 | + var children = obj[i].children; | ||
| 164 | + for (var j = 0; j < children.length; j++) { | ||
| 165 | + options += '<option value="'+children[j].code+'">' | ||
| 166 | + + children[j].name + '</option>'; | ||
| 167 | + } | ||
| 168 | + } | ||
| 169 | + } | ||
| 170 | + $('#fgsdmAllline').html(options); | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + $.get('/basic/lineCode2Name', function(result) { | ||
| 174 | + var data = []; | ||
| 175 | + | ||
| 176 | + for ( var code in result) { | ||
| 177 | + data.push({ | ||
| 178 | + id : code, | ||
| 179 | + text : result[code] | ||
| 180 | + }); | ||
| 181 | + } | ||
| 182 | + initPinYinSelect2('#line', data, ''); | ||
| 183 | + | ||
| 184 | + }) | ||
| 185 | + | ||
| 186 | + var line; | ||
| 187 | + var startDate; | ||
| 188 | + var endDate; | ||
| 189 | + $("#query") | ||
| 190 | + .on( | ||
| 191 | + "click", | ||
| 192 | + function() { | ||
| 193 | + | ||
| 194 | + line = $("#line").val(); | ||
| 195 | + startDate1 = $("#startDate").val(); | ||
| 196 | + endDate1 = $("#endDate").val(); | ||
| 197 | + | ||
| 198 | + if (startDate1 != '' && endDate1 != '') { | ||
| 199 | + $post( | ||
| 200 | + '/mcy_forms/allline', | ||
| 201 | + { | ||
| 202 | + line : line, | ||
| 203 | + startDate : $("#startDate").val(), | ||
| 204 | + endDate : $("#endDate").val(), | ||
| 205 | + type : 'query' | ||
| 206 | + }, | ||
| 207 | + function(result) { | ||
| 208 | + // 把数据填充到模版中 | ||
| 209 | + var tbodyHtml = template('allline', | ||
| 210 | + { | ||
| 211 | + list : result | ||
| 212 | + }); | ||
| 213 | + // 把渲染好的模版html文本追加到表格中 | ||
| 214 | + $('#tbody').html(tbodyHtml); | ||
| 215 | + line = $("#line").val(); | ||
| 216 | + startDate = $("#startDate").val(); | ||
| 217 | + endDate = $("#endDate").val(); | ||
| 218 | + $("#sDate").text(startDate); | ||
| 219 | + $("#eDate").text(endDate); | ||
| 220 | + | ||
| 221 | + var total_jh = 0; | ||
| 222 | + var total_sj = 0, total_ccl = 0, total_bcjh = 0; | ||
| 223 | + var total_bcjh = 0, total_bcsj = 0, total_bczxl = 0; | ||
| 224 | + var total_gs = 0; | ||
| 225 | + var total_zhgs = 0; | ||
| 226 | + $ | ||
| 227 | + .each( | ||
| 228 | + result, | ||
| 229 | + function(i, obj) { | ||
| 230 | + total_gs += Number(obj.gsgs); | ||
| 231 | + total_zhgs += Number(obj.fgsgs); | ||
| 232 | + total_jh = Number(obj.cchjh) | ||
| 233 | + + Number(total_jh); | ||
| 234 | + total_sj = Number(obj.cchsj) | ||
| 235 | + + Number(total_sj); | ||
| 236 | + | ||
| 237 | + total_ccl = (Number(total_sj) / Number(total_jh)) * 100; | ||
| 238 | + total_bcjh = Number(obj.bcjh) | ||
| 239 | + + Number(total_bcjh); | ||
| 240 | + total_bcsj = Number(obj.bcsj) | ||
| 241 | + + Number(total_bcsj); | ||
| 242 | + total_bczxl = (Number(total_bcsj) / Number(total_bcjh)) * 100; | ||
| 243 | + | ||
| 244 | + }); | ||
| 245 | + $("#total_gs").text(total_gs); | ||
| 246 | + $("#total_zhgs").text(total_zhgs); | ||
| 247 | + $("#total_jh").text(total_jh); | ||
| 248 | + $("#total_sj").text(total_sj); | ||
| 249 | + $("#total_ccl").text( | ||
| 250 | + total_ccl.toFixed(2) + '%'); | ||
| 251 | + $("#total_bcjh").text(total_bcjh); | ||
| 252 | + $("#total_bcsj").text(total_bcsj); | ||
| 253 | + $("#total_bczxl").text( | ||
| 254 | + total_bczxl.toFixed(2) | ||
| 255 | + + '%'); | ||
| 256 | + | ||
| 257 | + var temp = {}; | ||
| 258 | + var today_account = 0; | ||
| 259 | + | ||
| 260 | + temp["line"] = $("#line").text(); | ||
| 261 | + $ | ||
| 262 | + .each( | ||
| 263 | + result, | ||
| 264 | + function(i, obj) { | ||
| 265 | + if (moment( | ||
| 266 | + obj.schedule_date_str) | ||
| 267 | + .format( | ||
| 268 | + "YYYY-MM-DD") == moment( | ||
| 269 | + obj.startDate) | ||
| 270 | + .format( | ||
| 271 | + "YYYY-MM-DD")) { | ||
| 272 | + today_account++; | ||
| 273 | + } | ||
| 274 | + obj.updateDate = moment( | ||
| 275 | + obj.startDate) | ||
| 276 | + .format( | ||
| 277 | + "YYYY-MM-DD HH:mm:ss"); | ||
| 278 | + }); | ||
| 279 | + | ||
| 280 | + }) | ||
| 281 | + | ||
| 282 | + } else { | ||
| 283 | + alert("请选择时间范围!"); | ||
| 284 | + } | ||
| 285 | + }); | ||
| 286 | + | ||
| 287 | + $("#export").on( | ||
| 288 | + "click", | ||
| 289 | + function() { | ||
| 290 | + $post('/mcy_export/alllineExport', { | ||
| 291 | + line : line, | ||
| 292 | + startDate : startDate, | ||
| 293 | + endDate : endDate, | ||
| 294 | + type : 'export' | ||
| 295 | + }, function(result) { | ||
| 296 | + window.open("/downloadFile/download?fileName=营运线路名称统计表" | ||
| 297 | + + moment(startDate).format("YYYYMMDD")); | ||
| 298 | + }); | ||
| 299 | + }); | ||
| 197 | }); | 300 | }); |
| 198 | </script> | 301 | </script> |
| 199 | <script type="text/html" id="allline"> | 302 | <script type="text/html" id="allline"> |
src/main/resources/static/pages/forms/statement/changetochange.html
| 1 | <style type="text/css"> | 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 | - text-align: center;} | ||
| 15 | - | ||
| 16 | - .table > tbody + tbody { | ||
| 17 | - border-top: 1px solid; } | ||
| 18 | - .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{ text-align: center; } | ||
| 19 | -.table-checkable tr > th:first-child, .table-checkable tr > td:first-child { | ||
| 20 | - text-align: center; | ||
| 21 | - max-width: initial; | ||
| 22 | - min-width: 40px; | ||
| 23 | - padding-left: 0; | ||
| 24 | - padding-right: 0; | 2 | +.table-bordered { |
| 3 | + border: 1px solid; | ||
| 25 | } | 4 | } |
| 26 | 5 | ||
| 6 | +.table-bordered>thead>tr>th, .table-bordered>thead>tr>td, | ||
| 7 | + .table-bordered>tbody>tr>th, .table-bordered>tbody>tr>td, | ||
| 8 | + .table-bordered>tfoot>tr>th, .table-bordered>tfoot>tr>td { | ||
| 9 | + border: 1px solid; | ||
| 10 | +} | ||
| 11 | + | ||
| 12 | +.table-bordered>thead>tr>th, .table-bordered>thead>tr>td { | ||
| 13 | + border-bottom-width: 2px; | ||
| 14 | + text-align: center; | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +.table>tbody+tbody { | ||
| 18 | + border-top: 1px solid; | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, | ||
| 22 | + .table>thead>tr>td, .table>thead>tr>th { | ||
| 23 | + text-align: center; | ||
| 24 | +} | ||
| 25 | + | ||
| 26 | +.table-checkable tr>th:first-child, .table-checkable tr>td:first-child { | ||
| 27 | + text-align: center; | ||
| 28 | + max-width: initial; | ||
| 29 | + min-width: 40px; | ||
| 30 | + padding-left: 0; | ||
| 31 | + padding-right: 0; | ||
| 32 | +} | ||
| 27 | </style> | 33 | </style> |
| 28 | 34 | ||
| 29 | <div class="page-head"> | 35 | <div class="page-head"> |
| @@ -37,58 +43,71 @@ | @@ -37,58 +43,71 @@ | ||
| 37 | <div class="portlet light porttlet-fit bordered"> | 43 | <div class="portlet light porttlet-fit bordered"> |
| 38 | <div class="portlet-title"> | 44 | <div class="portlet-title"> |
| 39 | <form class="form-inline" action="" method="post"> | 45 | <form class="form-inline" action="" method="post"> |
| 40 | - <div style="display: inline-block;"> | 46 | + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_change"> |
| 47 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 48 | + <select class="form-control" name="company" id="gsdmChange" style="width: 140px;"></select> | ||
| 49 | + </div> | ||
| 50 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_change"> | ||
| 51 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 52 | + <select class="form-control" name="subCompany" id="fgsdmChange" style="width: 140px;"></select> | ||
| 53 | + </div> | ||
| 54 | + <div style="display: inline-block;"> | ||
| 41 | <span class="item-label" style="width: 80px;">线路: </span> | 55 | <span class="item-label" style="width: 80px;">线路: </span> |
| 42 | - <select class="form-control" name="line" id="line" style="width: 120px;"></select> | ||
| 43 | - </div> | ||
| 44 | - <div style="display: inline-block;margin-left: 15px;"> | ||
| 45 | - <span class="item-label" style="width: 80px;">开始时间: </span> | ||
| 46 | - <input class="form-control" type="text" id="startDate" style="width: 120px;"/> | 56 | + <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| 47 | </div> | 57 | </div> |
| 48 | - <div style="display: inline-block;margin-left: 15px;"> | ||
| 49 | - <span class="item-label" style="width: 80px;">结束时间: </span> | ||
| 50 | - <input class="form-control" type="text" id="endDate" style="width: 120px;"/> | ||
| 51 | - </div> | ||
| 52 | - <div style="display: inline-block;"> | ||
| 53 | - <span class="item-label" style="width: 120px;">类型: </span> | ||
| 54 | - <select class="form-control" id="sel"> | ||
| 55 | - <option value="">请选择</option> | ||
| 56 | - <option value="1">换人</option> | ||
| 57 | - <option value="2">换车</option> | 58 | + <div style="display: inline-block; margin-left: 15px;"> |
| 59 | + <span class="item-label" style="width: 80px;">开始时间: </span> <input | ||
| 60 | + class="form-control" type="text" id="startDate" | ||
| 61 | + style="width: 120px;" /> | ||
| 62 | + </div> | ||
| 63 | + <div style="display: inline-block; margin-left: 15px;"> | ||
| 64 | + <span class="item-label" style="width: 80px;">结束时间: </span> <input | ||
| 65 | + class="form-control" type="text" id="endDate" | ||
| 66 | + style="width: 120px;" /> | ||
| 67 | + </div> | ||
| 68 | + <div style="display: inline-block;"> | ||
| 69 | + <span class="item-label" style="width: 120px;">类型: </span> <select | ||
| 70 | + class="form-control" id="sel"> | ||
| 71 | + <option value="">请选择</option> | ||
| 72 | + <option value="1">换人</option> | ||
| 73 | + <option value="2">换车</option> | ||
| 58 | </select> | 74 | </select> |
| 59 | </div> | 75 | </div> |
| 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="导出"/> | ||
| 63 | - </div> | 76 | + <div class="form-group"> |
| 77 | + <input class="btn btn-default" type="button" id="query" value="筛选" /> | ||
| 78 | + <input class="btn btn-default" type="button" id="export" | ||
| 79 | + value="导出" /> | ||
| 80 | + </div> | ||
| 64 | </form> | 81 | </form> |
| 65 | </div> | 82 | </div> |
| 66 | <div class="portlet-body"> | 83 | <div class="portlet-body"> |
| 67 | - <div class="table-container" style="margin-top: 20px;overflow:auto;min-width: 1000px"> | ||
| 68 | - <table class="table table-bordered table-hover table-checkable" id="forms"> | 84 | + <div class="table-container" |
| 85 | + style="margin-top: 20px; overflow: auto; min-width: 1000px"> | ||
| 86 | + <table class="table table-bordered table-hover table-checkable" | ||
| 87 | + id="forms"> | ||
| 69 | <thead> | 88 | <thead> |
| 70 | <tr> | 89 | <tr> |
| 71 | <th colspan="15">换人换车情况统计表</th> | 90 | <th colspan="15">换人换车情况统计表</th> |
| 72 | </tr> | 91 | </tr> |
| 73 | <tr> | 92 | <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> | 93 | + <td rowspan="3" style="padding-top: 50px;">日期</td> |
| 94 | + <td rowspan="3" style="padding-top: 50px;">公司</td> | ||
| 95 | + <td rowspan="3" style="padding-top: 50px;">分公司</td> | ||
| 96 | + <td rowspan="3" style="padding-top: 50px;">线路</td> | ||
| 97 | + <td rowspan="3" style="padding-top: 50px;">路牌</td> | ||
| 98 | + <td rowspan="3" style="padding-top: 50px;">发生时间</td> | ||
| 99 | + <td rowspan="3" style="padding-top: 50px;">修改时间</td> | ||
| 81 | <td colspan="2">配车</td> | 100 | <td colspan="2">配车</td> |
| 82 | <td colspan="4">人员</td> | 101 | <td colspan="4">人员</td> |
| 83 | - <td rowspan="3" style=" padding-top: 50px;">原因</td> | ||
| 84 | - <td rowspan="3" style=" padding-top: 50px;">修改人</td> | 102 | + <td rowspan="3" style="padding-top: 50px;">原因</td> |
| 103 | + <td rowspan="3" style="padding-top: 50px;">修改人</td> | ||
| 85 | </tr> | 104 | </tr> |
| 86 | <tr> | 105 | <tr> |
| 87 | <td>计划</td> | 106 | <td>计划</td> |
| 88 | <td>实际</td> | 107 | <td>实际</td> |
| 89 | <td colspan="2">计划</td> | 108 | <td colspan="2">计划</td> |
| 90 | <td colspan="2">实际</td> | 109 | <td colspan="2">实际</td> |
| 91 | - | 110 | + |
| 92 | </tr> | 111 | </tr> |
| 93 | <tr> | 112 | <tr> |
| 94 | <td>车号</td> | 113 | <td>车号</td> |
| @@ -100,7 +119,7 @@ | @@ -100,7 +119,7 @@ | ||
| 100 | </tr> | 119 | </tr> |
| 101 | </thead> | 120 | </thead> |
| 102 | <tbody> | 121 | <tbody> |
| 103 | - | 122 | + |
| 104 | </tbody> | 123 | </tbody> |
| 105 | </table> | 124 | </table> |
| 106 | </div> | 125 | </div> |
| @@ -110,94 +129,121 @@ | @@ -110,94 +129,121 @@ | ||
| 110 | </div> | 129 | </div> |
| 111 | 130 | ||
| 112 | <script> | 131 | <script> |
| 113 | - $(function(){ | 132 | + $(function() { |
| 114 | // 关闭左侧栏 | 133 | // 关闭左侧栏 |
| 115 | if (!$('body').hasClass('page-sidebar-closed')) | 134 | if (!$('body').hasClass('page-sidebar-closed')) |
| 116 | $('.menu-toggler.sidebar-toggler').click(); | 135 | $('.menu-toggler.sidebar-toggler').click(); |
| 117 | - | 136 | + |
| 118 | $("#startDate,#endDate").datetimepicker({ | 137 | $("#startDate,#endDate").datetimepicker({ |
| 119 | format : 'YYYY-MM-DD', | 138 | format : 'YYYY-MM-DD', |
| 120 | locale : 'zh-cn' | 139 | locale : 'zh-cn' |
| 121 | }); | 140 | }); |
| 141 | + | ||
| 122 | 142 | ||
| 123 | - $('#line').select2({ | ||
| 124 | - ajax: { | ||
| 125 | - url: '/realSchedule/findLine', | ||
| 126 | - type: 'post', | ||
| 127 | - dataType: 'json', | ||
| 128 | - delay: 150, | ||
| 129 | - data: function(params){ | ||
| 130 | - return{line: params.term}; | ||
| 131 | - }, | ||
| 132 | - processResults: function (data) { | ||
| 133 | - return { | ||
| 134 | - results: data | ||
| 135 | - }; | ||
| 136 | - }, | ||
| 137 | - cache: true | ||
| 138 | - }, | ||
| 139 | - templateResult: function(repo){ | ||
| 140 | - if (repo.loading) return repo.text; | ||
| 141 | - var h = '<span>'+repo.text+'</span>'; | ||
| 142 | - return h; | ||
| 143 | - }, | ||
| 144 | - escapeMarkup: function (markup) { return markup; }, | ||
| 145 | - minimumInputLength: 1, | ||
| 146 | - templateSelection: function(repo){ | ||
| 147 | - return repo.text; | ||
| 148 | - }, | ||
| 149 | - language: { | ||
| 150 | - noResults: function(){ | ||
| 151 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 152 | - }, | ||
| 153 | - inputTooShort : function(e) { | ||
| 154 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 155 | - }, | ||
| 156 | - searching : function() { | ||
| 157 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 158 | - } | ||
| 159 | - } | ||
| 160 | - }); | ||
| 161 | - var line; | ||
| 162 | - var startDate; | ||
| 163 | - var endDate; | ||
| 164 | - $("#query").on("click",function(){ | ||
| 165 | - line = $("#line").val(); | ||
| 166 | - sel = $("#sel").val(); | ||
| 167 | - var startDate1=$("#startDate").val(); | ||
| 168 | - var endDate1=$("#endDate").val(); | 143 | + var obj = []; |
| 144 | + $.get('/user/companyData', function(result){ | ||
| 145 | + obj = result; | ||
| 146 | + var options = ''; | ||
| 147 | + for(var i = 0; i < obj.length; i++){ | ||
| 148 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 149 | + } | ||
| 150 | + if(obj.length ==0){ | ||
| 151 | + $("#gsdmDiv_change").css('display','none'); | ||
| 152 | + $('#fgsdmDiv_change').css('display','none'); | ||
| 153 | + }else if(obj.length ==1){ | ||
| 154 | + $("#gsdmDiv_change").css('display','none'); | ||
| 155 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 156 | + $('#fgsdmDiv_change').css('display','none'); | ||
| 157 | + } | ||
| 158 | + $('#gsdmChange').html(options); | ||
| 159 | + updateCompany(); | ||
| 160 | + }); | ||
| 161 | + | ||
| 162 | + $("#gsdmChange").on("change",updateCompany); | ||
| 163 | + function updateCompany(){ | ||
| 164 | + var company = $('#gsdmChange').val(); | ||
| 165 | + var options = ''; | ||
| 166 | + for(var i = 0; i < obj.length; i++){ | ||
| 167 | + if(obj[i].companyCode == company){ | ||
| 168 | + var children = obj[i].children; | ||
| 169 | + for(var j = 0; j < children.length; j++){ | ||
| 170 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 171 | + } | ||
| 172 | + } | ||
| 173 | + } | ||
| 174 | + $('#fgsdmChange').html(options); | ||
| 175 | + } | ||
| 176 | + | ||
| 177 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 178 | + var data=[]; | ||
| 169 | 179 | ||
| 170 | - if(startDate1!=''&&endDate1!=''){ | ||
| 171 | - $post('/mcy_forms/changetochange',{sel:sel,line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ | ||
| 172 | - startDate = $("#startDate").val(); | ||
| 173 | - endDate = $("#endDate").val(); | ||
| 174 | - $("#sDate").text(startDate); | ||
| 175 | - $("#eDate").text(endDate); | ||
| 176 | - var temp = {}; | ||
| 177 | - var today_account = 0; | ||
| 178 | - temp["line"] = $("#line").text(); | ||
| 179 | - $.each(result, function(i, obj) { | ||
| 180 | - if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){ | ||
| 181 | - today_account++; | ||
| 182 | - } | ||
| 183 | - obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | ||
| 184 | - }); | ||
| 185 | - // 把数据填充到模版中 | ||
| 186 | - var tbodyHtml = template('changetochange',{list:result}); | ||
| 187 | - // 把渲染好的模版html文本追加到表格中 | ||
| 188 | - $('#forms tbody').html(tbodyHtml); | ||
| 189 | - }) | 180 | + for(var code in result){ |
| 181 | + data.push({id: code, text: result[code]}); | ||
| 182 | + } | ||
| 183 | + initPinYinSelect2('#line',data,''); | ||
| 184 | + | ||
| 185 | + }) | ||
| 190 | 186 | ||
| 191 | - }else{ | ||
| 192 | - alert("请选择时间范围!"); | ||
| 193 | - } | ||
| 194 | - }); | ||
| 195 | - | ||
| 196 | - $("#export").on("click",function(){ | ||
| 197 | - $post('/mcy_export/changetochangeExport',{startDate:startDate,endDate:endDate,type:'export'},function(result){ | ||
| 198 | - window.open("/downloadFile/download?fileName=换人换车情况日统计"+moment(startDate).format("YYYYMMDD")); | ||
| 199 | - }); | ||
| 200 | - }); | 187 | + var line; |
| 188 | + var startDate; | ||
| 189 | + var endDate; | ||
| 190 | + $("#query").on( | ||
| 191 | + "click", | ||
| 192 | + function() { | ||
| 193 | + line = $("#line").val(); | ||
| 194 | + sel = $("#sel").val(); | ||
| 195 | + var startDate1 = $("#startDate").val(); | ||
| 196 | + var endDate1 = $("#endDate").val(); | ||
| 197 | + | ||
| 198 | + if (startDate1 != '' && endDate1 != '') { | ||
| 199 | + $post('/mcy_forms/changetochange', { | ||
| 200 | + sel : sel, | ||
| 201 | + line : line, | ||
| 202 | + startDate : $("#startDate").val(), | ||
| 203 | + endDate : $("#endDate").val(), | ||
| 204 | + type : 'query' | ||
| 205 | + }, function(result) { | ||
| 206 | + startDate = $("#startDate").val(); | ||
| 207 | + endDate = $("#endDate").val(); | ||
| 208 | + $("#sDate").text(startDate); | ||
| 209 | + $("#eDate").text(endDate); | ||
| 210 | + var temp = {}; | ||
| 211 | + var today_account = 0; | ||
| 212 | + temp["line"] = $("#line").text(); | ||
| 213 | + $.each(result, function(i, obj) { | ||
| 214 | + if (moment(obj.schedule_date_str).format( | ||
| 215 | + "YYYY-MM-DD") == moment(obj.startDate) | ||
| 216 | + .format("YYYY-MM-DD")) { | ||
| 217 | + today_account++; | ||
| 218 | + } | ||
| 219 | + obj.updateDate = moment(obj.startDate).format( | ||
| 220 | + "YYYY-MM-DD HH:mm:ss"); | ||
| 221 | + }); | ||
| 222 | + // 把数据填充到模版中 | ||
| 223 | + var tbodyHtml = template('changetochange', { | ||
| 224 | + list : result | ||
| 225 | + }); | ||
| 226 | + // 把渲染好的模版html文本追加到表格中 | ||
| 227 | + $('#forms tbody').html(tbodyHtml); | ||
| 228 | + }) | ||
| 229 | + | ||
| 230 | + } else { | ||
| 231 | + alert("请选择时间范围!"); | ||
| 232 | + } | ||
| 233 | + }); | ||
| 234 | + | ||
| 235 | + $("#export").on( | ||
| 236 | + "click", | ||
| 237 | + function() { | ||
| 238 | + $post('/mcy_export/changetochangeExport', { | ||
| 239 | + startDate : startDate, | ||
| 240 | + endDate : endDate, | ||
| 241 | + type : 'export' | ||
| 242 | + }, function(result) { | ||
| 243 | + window.open("/downloadFile/download?fileName=换人换车情况日统计" | ||
| 244 | + + moment(startDate).format("YYYYMMDD")); | ||
| 245 | + }); | ||
| 246 | + }); | ||
| 201 | }); | 247 | }); |
| 202 | </script> | 248 | </script> |
| 203 | <script type="text/html" id="changetochange"> | 249 | <script type="text/html" id="changetochange"> |
src/main/resources/static/pages/forms/statement/executionrate.html
| @@ -37,6 +37,14 @@ | @@ -37,6 +37,14 @@ | ||
| 37 | <div class="portlet light porttlet-fit bordered"> | 37 | <div class="portlet light porttlet-fit bordered"> |
| 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; margin-left: 33px;" id="gsdmDiv_ececut"> | ||
| 41 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 42 | + <select class="form-control" name="company" id="gsdmEcecut" style="width: 140px;"></select> | ||
| 43 | + </div> | ||
| 44 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_ececut"> | ||
| 45 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 46 | + <select class="form-control" name="subCompany" id="fgsdmEcecut" style="width: 140px;"></select> | ||
| 47 | + </div> | ||
| 40 | <div style="display: inline-block;"> | 48 | <div style="display: inline-block;"> |
| 41 | <span class="item-label" style="width: 80px;">线路: </span> | 49 | <span class="item-label" style="width: 80px;">线路: </span> |
| 42 | <select class="form-control" name="line" id="line" style="width: 120px;"></select> | 50 | <select class="form-control" name="line" id="line" style="width: 120px;"></select> |
| @@ -114,6 +122,42 @@ | @@ -114,6 +122,42 @@ | ||
| 114 | locale : 'zh-cn' | 122 | locale : 'zh-cn' |
| 115 | }); | 123 | }); |
| 116 | 124 | ||
| 125 | + | ||
| 126 | + var obj = []; | ||
| 127 | + $.get('/user/companyData', function(result){ | ||
| 128 | + obj = result; | ||
| 129 | + var options = ''; | ||
| 130 | + for(var i = 0; i < obj.length; i++){ | ||
| 131 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + if(obj.length ==0){ | ||
| 135 | + $("#gsdmDiv_ececut").css('display','none'); | ||
| 136 | + $('#fgsdmDiv_ececut').css('display','none'); | ||
| 137 | + }else if(obj.length ==1){ | ||
| 138 | + $("#gsdmDiv_ececut").css('display','none'); | ||
| 139 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 140 | + $('#fgsdmDiv_ececut').css('display','none'); | ||
| 141 | + } | ||
| 142 | + $('#gsdmEcecut').html(options); | ||
| 143 | + updateCompany(); | ||
| 144 | + }); | ||
| 145 | + | ||
| 146 | + $("#gsdmEcecut").on("change",updateCompany); | ||
| 147 | + function updateCompany(){ | ||
| 148 | + var company = $('#gsdmEcecut').val(); | ||
| 149 | + var options = ''; | ||
| 150 | + for(var i = 0; i < obj.length; i++){ | ||
| 151 | + if(obj[i].companyCode == company){ | ||
| 152 | + var children = obj[i].children; | ||
| 153 | + for(var j = 0; j < children.length; j++){ | ||
| 154 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 155 | + } | ||
| 156 | + } | ||
| 157 | + } | ||
| 158 | + $('#fgsdmEcecut').html(options); | ||
| 159 | + } | ||
| 160 | + | ||
| 117 | $.get('/basic/lineCode2Name',function(result){ | 161 | $.get('/basic/lineCode2Name',function(result){ |
| 118 | var data=[]; | 162 | var data=[]; |
| 119 | 163 |
src/main/resources/static/pages/forms/statement/linepassengerflow.html
| @@ -27,6 +27,14 @@ | @@ -27,6 +27,14 @@ | ||
| 27 | <div class="portlet light porttlet-fit bordered"> | 27 | <div class="portlet light porttlet-fit bordered"> |
| 28 | <div class="portlet-title"> | 28 | <div class="portlet-title"> |
| 29 | <form class="form-inline" action=""> | 29 | <form class="form-inline" action=""> |
| 30 | + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_line"> | ||
| 31 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 32 | + <select class="form-control" name="company" id="gsdmLine" style="width: 140px;"></select> | ||
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_line"> | ||
| 35 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 36 | + <select class="form-control" name="subCompany" id="fgsdmLine" style="width: 140px;"></select> | ||
| 37 | + </div> --> | ||
| 30 | <div style="display: inline-block;"> | 38 | <div style="display: inline-block;"> |
| 31 | <span class="item-label" style="width: 80px;">线路: </span> | 39 | <span class="item-label" style="width: 80px;">线路: </span> |
| 32 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 40 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| @@ -74,6 +82,43 @@ | @@ -74,6 +82,43 @@ | ||
| 74 | locale : 'zh-cn' | 82 | locale : 'zh-cn' |
| 75 | }); | 83 | }); |
| 76 | 84 | ||
| 85 | + var obj = []; | ||
| 86 | + $.get('/user/companyData', function(result){ | ||
| 87 | + obj = result; | ||
| 88 | + var options = ''; | ||
| 89 | + for(var i = 0; i < obj.length; i++){ | ||
| 90 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + if(obj.length ==0){ | ||
| 94 | + $("#gsdmDiv_line").css('display','none'); | ||
| 95 | + $('#fgsdmDiv_line').css('display','none'); | ||
| 96 | + }else if(obj.length ==1){ | ||
| 97 | + $("#gsdmDiv_line").css('display','none'); | ||
| 98 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 99 | + $('#fgsdmDiv_line').css('display','none'); | ||
| 100 | + } | ||
| 101 | + $('#gsdmLine').html(options); | ||
| 102 | + updateCompany(); | ||
| 103 | + }); | ||
| 104 | + | ||
| 105 | + $("#gsdmLine").on("change",updateCompany); | ||
| 106 | + function updateCompany(){ | ||
| 107 | + var company = $('#gsdmLine').val(); | ||
| 108 | + var options = ''; | ||
| 109 | + for(var i = 0; i < obj.length; i++){ | ||
| 110 | + if(obj[i].companyCode == company){ | ||
| 111 | + var children = obj[i].children; | ||
| 112 | + for(var j = 0; j < children.length; j++){ | ||
| 113 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 114 | + } | ||
| 115 | + } | ||
| 116 | + } | ||
| 117 | + $('#fgsdmLine').html(options); | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + | ||
| 121 | + | ||
| 77 | $.get('/basic/lineCode2Name',function(result){ | 122 | $.get('/basic/lineCode2Name',function(result){ |
| 78 | var data=[]; | 123 | var data=[]; |
| 79 | 124 | ||
| @@ -85,10 +130,17 @@ | @@ -85,10 +130,17 @@ | ||
| 85 | 130 | ||
| 86 | }) | 131 | }) |
| 87 | 132 | ||
| 133 | + | ||
| 134 | + var line; | ||
| 135 | + var date; | ||
| 136 | + var gsdmLine; | ||
| 137 | + var fgsdmLine; | ||
| 88 | $("#query").on("click",function(){ | 138 | $("#query").on("click",function(){ |
| 89 | var line = $("#line").val(); | 139 | var line = $("#line").val(); |
| 90 | var date = $("#date").val(); | 140 | var date = $("#date").val(); |
| 91 | - $post('/mcy_forms/linepasswengerflow',{line:line,date:date},function(result){ | 141 | + var gsdmLine = $("#gsdmLine").val(); |
| 142 | + var fgsdmLine = $("#fgsdmLine").val(); | ||
| 143 | + $post('/mcy_forms/linepasswengerflow',{/* gsdmLine:gsdmLine,fgsdmLine:fgsdmLine, */line:line,date:date,type:'query'},function(result){ | ||
| 92 | $.each(result, function(i, obj) { | 144 | $.each(result, function(i, obj) { |
| 93 | obj.requestType = reqCodeMap[obj.requestType]; | 145 | obj.requestType = reqCodeMap[obj.requestType]; |
| 94 | }); | 146 | }); |
src/main/resources/static/pages/forms/statement/operationservice.html
| 1 | <style type="text/css"> | 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 | - text-align: center; } | ||
| 15 | - | ||
| 16 | - .table > tbody + tbody { | ||
| 17 | - border-top: 1px solid; } | 2 | +.table-bordered { |
| 3 | + border: 1px solid; | ||
| 4 | +} | ||
| 5 | + | ||
| 6 | +.table-bordered>thead>tr>th, .table-bordered>thead>tr>td, | ||
| 7 | + .table-bordered>tbody>tr>th, .table-bordered>tbody>tr>td, | ||
| 8 | + .table-bordered>tfoot>tr>th, .table-bordered>tfoot>tr>td { | ||
| 9 | + border: 1px solid; | ||
| 10 | +} | ||
| 11 | + | ||
| 12 | +.table-bordered>thead>tr>th, .table-bordered>thead>tr>td { | ||
| 13 | + border-bottom-width: 2px; | ||
| 14 | + text-align: center; | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +.table>tbody+tbody { | ||
| 18 | + border-top: 1px solid; | ||
| 19 | +} | ||
| 18 | </style> | 20 | </style> |
| 19 | 21 | ||
| 20 | <div class="page-head"> | 22 | <div class="page-head"> |
| @@ -22,54 +24,53 @@ | @@ -22,54 +24,53 @@ | ||
| 22 | <h1>运营服务阶段报表</h1> | 24 | <h1>运营服务阶段报表</h1> |
| 23 | </div> | 25 | </div> |
| 24 | </div> | 26 | </div> |
| 25 | - | ||
| 26 | -<div class="row"> | ||
| 27 | - <div class="col-md-12"> | ||
| 28 | - <div class="portlet light porttlet-fit bordered"> | ||
| 29 | - <div class="portlet-title"> | ||
| 30 | - <form class="form-inline" action=""> | ||
| 31 | - <!-- <div style="display: inline-block;"> | ||
| 32 | - <span class="item-label" style="width: 120px;">公司: </span> | ||
| 33 | - <select class="form-control"> | ||
| 34 | - <option value="normal">请选择</option> | ||
| 35 | - <option value="22">金高公司</option> | ||
| 36 | - <option value="05">杨高公司</option> | ||
| 37 | - <option value="26">南汇公司</option> | ||
| 38 | - <option value="55">上南公司</option> | ||
| 39 | - <option value="77">闵行公司</option> | ||
| 40 | - </select> | ||
| 41 | - <select class="form-control"> | ||
| 42 | - <option value="22">金高公司</option> | ||
| 43 | - <option value="05">杨高公司</option> | ||
| 44 | - <option value="26">南汇公司</option> | ||
| 45 | - <option value="55">上南公司</option> | ||
| 46 | - <option value="77">闵行公司</option> | ||
| 47 | - </select> | ||
| 48 | - </div> --> | ||
| 49 | - <div style="display: inline-block;"> | ||
| 50 | - <span class="item-label" style="width: 80px;">线路: </span> | ||
| 51 | - <select class="form-control" name="line" id="line" style="width: 136px;"></select> | ||
| 52 | - </div> | ||
| 53 | - <div style="display: inline-block;margin-left: 15px;"> | ||
| 54 | - <span class="item-label" style="width: 80px;">开始时间: </span> | ||
| 55 | - <input class="form-control" type="text" id="startDate" style="width: 120px;"/> | ||
| 56 | - </div> | ||
| 57 | - <div style="display: inline-block;margin-left: 15px;"> | ||
| 58 | - <span class="item-label" style="width: 80px;">结束时间: </span> | ||
| 59 | - <input class="form-control" type="text" id="endDate" style="width: 120px;"/> | ||
| 60 | - </div> | ||
| 61 | - <div style="display: inline-block;margin-left: 15px"> | ||
| 62 | - <span class="item-label" style="width: 150px;">统计: </span> | ||
| 63 | - </div> | ||
| 64 | - <div class="form-group"> | ||
| 65 | - <input class="btn btn-default" type="button" id="query" value="筛选"/> | ||
| 66 | - <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 67 | - </div> | ||
| 68 | - </form> | ||
| 69 | - </div> | ||
| 70 | - <div class="portlet-body"> | ||
| 71 | - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | ||
| 72 | - <table class="table table-bordered table-hover table-checkable" id="forms"> | 27 | + |
| 28 | +<div class="row"> | ||
| 29 | + <div class="col-md-12"> | ||
| 30 | + <div class="portlet light porttlet-fit bordered"> | ||
| 31 | + <div class="portlet-title"> | ||
| 32 | + <form class="form-inline" action="" method="post"> | ||
| 33 | + <!--<div style="display: inline-block; margin-left: 33px;" | ||
| 34 | + id="gsdmDiv_operat"> | ||
| 35 | + <span class="item-label" style="width: 80px;">公司: </span> <select | ||
| 36 | + class="form-control" name="company" id="gsdmOperat" | ||
| 37 | + style="width: 140px;"></select> | ||
| 38 | + </div> | ||
| 39 | + <div style="display: inline-block; margin-left: 24px;" | ||
| 40 | + id="fgsdmDiv_operat"> | ||
| 41 | + <span class="item-label" style="width: 80px;">分公司: </span> <select | ||
| 42 | + class="form-control" name="subCompany" id="fgsdmOperat" | ||
| 43 | + style="width: 140px;"></select> | ||
| 44 | + </div> --> | ||
| 45 | + <div style="display: inline-block;"> | ||
| 46 | + <span class="item-label" style="width: 80px;">线路: </span> <select | ||
| 47 | + class="form-control" name="line" id="line" style="width: 180px;"></select> | ||
| 48 | + </div> | ||
| 49 | + <div style="display: inline-block; margin-left: 15px;"> | ||
| 50 | + <span class="item-label" style="width: 80px;">开始时间: </span> <input | ||
| 51 | + class="form-control" type="text" id="startDate" | ||
| 52 | + style="width: 120px;" /> | ||
| 53 | + </div> | ||
| 54 | + <div style="display: inline-block; margin-left: 15px;"> | ||
| 55 | + <span class="item-label" style="width: 80px;">结束时间: </span> <input | ||
| 56 | + class="form-control" type="text" id="endDate" | ||
| 57 | + style="width: 120px;" /> | ||
| 58 | + </div> | ||
| 59 | + <div style="display: inline-block; margin-left: 15px"> | ||
| 60 | + <span class="item-label" style="width: 150px;">统计: </span> | ||
| 61 | + </div> | ||
| 62 | + <div class="form-group"> | ||
| 63 | + <input class="btn btn-default" type="button" id="query" value="筛选" /> | ||
| 64 | + <input class="btn btn-default" type="button" id="export" | ||
| 65 | + value="导出" /> | ||
| 66 | + </div> | ||
| 67 | + </form> | ||
| 68 | + </div> | ||
| 69 | + <div class="portlet-body"> | ||
| 70 | + <div class="table-container" | ||
| 71 | + style="margin-top: 10px; overflow: auto; min-width: 906px"> | ||
| 72 | + <table class="table table-bordered table-hover table-checkable" | ||
| 73 | + id="forms"> | ||
| 73 | <thead> | 74 | <thead> |
| 74 | <tr> | 75 | <tr> |
| 75 | <th>序号</th> | 76 | <th>序号</th> |
| @@ -82,102 +83,133 @@ | @@ -82,102 +83,133 @@ | ||
| 82 | </tr> | 83 | </tr> |
| 83 | </thead> | 84 | </thead> |
| 84 | <tbody> | 85 | <tbody> |
| 85 | - | 86 | + |
| 86 | </tbody> | 87 | </tbody> |
| 87 | </table> | 88 | </table> |
| 88 | - </div> | ||
| 89 | - </div> | ||
| 90 | - </div> | ||
| 91 | - </div> | ||
| 92 | -</div> | ||
| 93 | - | ||
| 94 | -<script> | ||
| 95 | - $(function(){ | ||
| 96 | - // 关闭左侧栏 | ||
| 97 | - if (!$('body').hasClass('page-sidebar-closed')) | 89 | + </div> |
| 90 | + </div> | ||
| 91 | + </div> | ||
| 92 | + </div> | ||
| 93 | +</div> | ||
| 94 | + | ||
| 95 | +<script> | ||
| 96 | + $(function() { | ||
| 97 | + // 关闭左侧栏 | ||
| 98 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 98 | $('.menu-toggler.sidebar-toggler').click(); | 99 | $('.menu-toggler.sidebar-toggler').click(); |
| 99 | - | ||
| 100 | - $("#startDate,#endDate").datetimepicker({ | ||
| 101 | - format : 'YYYY-MM-DD', | ||
| 102 | - locale : 'zh-cn' | 100 | + |
| 101 | + $("#startDate,#endDate").datetimepicker({ | ||
| 102 | + format : 'YYYY-MM-DD', | ||
| 103 | + locale : 'zh-cn' | ||
| 103 | }); | 104 | }); |
| 104 | - | ||
| 105 | - | ||
| 106 | - $.get('/basic/lineCode2Name',function(result){ | ||
| 107 | - var data=[]; | ||
| 108 | - | ||
| 109 | - for(var code in result){ | ||
| 110 | - data.push({id: code, text: result[code]}); | 105 | + |
| 106 | + $.get('/basic/lineCode2Name', function(result) { | ||
| 107 | + var data = []; | ||
| 108 | + | ||
| 109 | + for ( var code in result) { | ||
| 110 | + data.push({ | ||
| 111 | + id : code, | ||
| 112 | + text : result[code] | ||
| 113 | + }); | ||
| 111 | } | 114 | } |
| 112 | console.log(data); | 115 | console.log(data); |
| 113 | - initPinYinSelect2('#line',data,''); | ||
| 114 | - | 116 | + initPinYinSelect2('#line', data, ''); |
| 117 | + | ||
| 115 | }) | 118 | }) |
| 116 | - | ||
| 117 | - $('#lpName').select2({ | ||
| 118 | - ajax: { | ||
| 119 | - url: '/realSchedule/findLpName', | ||
| 120 | - type: 'post', | ||
| 121 | - dataType: 'json', | ||
| 122 | - delay: 150, | ||
| 123 | - data: function(params){ | ||
| 124 | - return{lpName: params.term}; | ||
| 125 | - }, | ||
| 126 | - processResults: function (data) { | ||
| 127 | - return { | ||
| 128 | - results: data | ||
| 129 | - }; | ||
| 130 | - }, | ||
| 131 | - cache: true | ||
| 132 | - }, | ||
| 133 | - templateResult: function(repo){ | ||
| 134 | - if (repo.loading) return repo.text; | ||
| 135 | - var h = '<span>'+repo.text+'</span>'; | ||
| 136 | - return h; | ||
| 137 | - }, | ||
| 138 | - escapeMarkup: function (markup) { return markup; }, | ||
| 139 | - minimumInputLength: 1, | ||
| 140 | - templateSelection: function(repo){ | ||
| 141 | - return repo.text; | ||
| 142 | - }, | ||
| 143 | - language: { | ||
| 144 | - noResults: function(){ | ||
| 145 | - return '<span style="color:red;font-size: 12px;">没有搜索到路牌!</span>'; | ||
| 146 | - }, | ||
| 147 | - inputTooShort : function(e) { | ||
| 148 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入路牌搜索路牌</span>'; | ||
| 149 | - }, | ||
| 150 | - searching : function() { | ||
| 151 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索路牌...</span>'; | ||
| 152 | - } | ||
| 153 | - } | ||
| 154 | - }); | ||
| 155 | - $("#query").on("click",function(){ | ||
| 156 | - var line = $("#line").val(); | ||
| 157 | - var startDate = $("#startDate").val(); | ||
| 158 | - var endDate = $("#endDate").val(); | ||
| 159 | - var lpName = $("#lpName").val(); | ||
| 160 | - $post("/mcy_forms/operationservice",{line:line,startDate:startDate,endDate:endDate ,lpName:lpName},function(result){ | ||
| 161 | - $("#sDate").text(startDate); | ||
| 162 | - $("#eDate").text(endDate); | ||
| 163 | - var temp = {}; | ||
| 164 | - var today_account = 0; | ||
| 165 | - temp["line"] = $("#line").text(); | ||
| 166 | - $.each(result, function(i, obj) { | ||
| 167 | - if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){ | ||
| 168 | - today_account++; | ||
| 169 | - } | ||
| 170 | - obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | ||
| 171 | - }); | ||
| 172 | - console.log(result); | ||
| 173 | - var operationservice = template('operationservice',{list:result}); | ||
| 174 | - // 把渲染好的模版html文本追加到表格中 | ||
| 175 | - $('#forms tbody').html(operationservice); | ||
| 176 | - | ||
| 177 | - }); | ||
| 178 | - }); | ||
| 179 | - }); | ||
| 180 | -</script> | 119 | + |
| 120 | + var obj = []; | ||
| 121 | + $.get('/user/companyData', function(result) { | ||
| 122 | + obj = result; | ||
| 123 | + var options = ''; | ||
| 124 | + for (var i = 0; i < obj.length; i++) { | ||
| 125 | + options += '<option value="'+obj[i].companyCode+'">' | ||
| 126 | + + obj[i].companyName + '</option>'; | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + if (obj.length == 0) { | ||
| 130 | + $("#gsdmDiv_operat").css('display', 'none'); | ||
| 131 | + $('#fgsdmDiv_operat').css('display', 'none'); | ||
| 132 | + } else if (obj.length == 1) { | ||
| 133 | + $("#gsdmDiv_operat").css('display', 'none'); | ||
| 134 | + if (obj[0].children.length == 1 || obj[0].children.length == 0) | ||
| 135 | + $('#fgsdmDiv_operat').css('display', 'none'); | ||
| 136 | + } | ||
| 137 | + $('#gsdmOperat').html(options); | ||
| 138 | + updateCompany(); | ||
| 139 | + }); | ||
| 140 | + | ||
| 141 | + $("#gsdmOperat").on("change", updateCompany); | ||
| 142 | + function updateCompany() { | ||
| 143 | + var company = $('#gsdmOperat').val(); | ||
| 144 | + var options = ''; | ||
| 145 | + for (var i = 0; i < obj.length; i++) { | ||
| 146 | + if (obj[i].companyCode == company) { | ||
| 147 | + var children = obj[i].children; | ||
| 148 | + for (var j = 0; j < children.length; j++) { | ||
| 149 | + options += '<option value="'+children[j].code+'">' | ||
| 150 | + + children[j].name + '</option>'; | ||
| 151 | + } | ||
| 152 | + } | ||
| 153 | + } | ||
| 154 | + $('#fgsdmOperat').html(options); | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + $.get('/basic/lineCode2Name', function(result) { | ||
| 158 | + var data = []; | ||
| 159 | + | ||
| 160 | + for ( var code in result) { | ||
| 161 | + data.push({ | ||
| 162 | + id : code, | ||
| 163 | + text : result[code] | ||
| 164 | + }); | ||
| 165 | + } | ||
| 166 | + initPinYinSelect2('#line', data, ''); | ||
| 167 | + | ||
| 168 | + }) | ||
| 169 | + | ||
| 170 | + $("#query").on( | ||
| 171 | + "click", | ||
| 172 | + function() { | ||
| 173 | + var line = $("#line").val(); | ||
| 174 | + var startDate = $("#startDate").val(); | ||
| 175 | + var endDate = $("#endDate").val(); | ||
| 176 | + var lpName = $("#lpName").val(); | ||
| 177 | + /* var gsdmOperat = $("#gsdmOperat").val(); | ||
| 178 | + var fgsdmOperat = $("#fgsdmOperat").val(); */ | ||
| 179 | + $post("/mcy_forms/operationservice", { | ||
| 180 | + /* gsdmOperat : gsdmOperat, | ||
| 181 | + fgsdmOperat : fgsdmOperat, */ | ||
| 182 | + line : line, | ||
| 183 | + startDate : startDate, | ||
| 184 | + endDate : endDate, | ||
| 185 | + lpName : lpName, | ||
| 186 | + type:'query' | ||
| 187 | + }, function(result) { | ||
| 188 | + $("#sDate").text(startDate); | ||
| 189 | + $("#eDate").text(endDate); | ||
| 190 | + var temp = {}; | ||
| 191 | + var today_account = 0; | ||
| 192 | + temp["line"] = $("#line").text(); | ||
| 193 | + $.each(result, function(i, obj) { | ||
| 194 | + if (moment(obj.schedule_date_str).format( | ||
| 195 | + "YYYY-MM-DD") == moment(obj.startDate) | ||
| 196 | + .format("YYYY-MM-DD")) { | ||
| 197 | + today_account++; | ||
| 198 | + } | ||
| 199 | + obj.updateDate = moment(obj.startDate).format( | ||
| 200 | + "YYYY-MM-DD HH:mm:ss"); | ||
| 201 | + }); | ||
| 202 | + console.log(result); | ||
| 203 | + var operationservice = template('operationservice', { | ||
| 204 | + list : result | ||
| 205 | + }); | ||
| 206 | + // 把渲染好的模版html文本追加到表格中 | ||
| 207 | + $('#forms tbody').html(operationservice); | ||
| 208 | + | ||
| 209 | + }); | ||
| 210 | + }); | ||
| 211 | + }); | ||
| 212 | +</script> | ||
| 181 | <script type="text/html" id="operationservice"> | 213 | <script type="text/html" id="operationservice"> |
| 182 | {{each list as obj i}} | 214 | {{each list as obj i}} |
| 183 | <tr> | 215 | <tr> |
| @@ -192,7 +224,7 @@ | @@ -192,7 +224,7 @@ | ||
| 192 | {{/each}} | 224 | {{/each}} |
| 193 | {{if list.length == 0}} | 225 | {{if list.length == 0}} |
| 194 | <tr> | 226 | <tr> |
| 195 | - <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td> | 227 | + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> |
| 196 | </tr> | 228 | </tr> |
| 197 | {{/if}} | 229 | {{/if}} |
| 198 | </script> | 230 | </script> |
src/main/resources/static/pages/forms/statement/shifday.html
| @@ -28,6 +28,14 @@ | @@ -28,6 +28,14 @@ | ||
| 28 | <div class="portlet light porttlet-fit bordered"> | 28 | <div class="portlet light porttlet-fit bordered"> |
| 29 | <div class="portlet-title"> | 29 | <div class="portlet-title"> |
| 30 | <form class="form-inline" action="" method="post"> | 30 | <form class="form-inline" action="" method="post"> |
| 31 | + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_shif"> | ||
| 32 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 33 | + <select class="form-control" name="company" id="gsdmShif" style="width: 140px;"></select> | ||
| 34 | + </div> | ||
| 35 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_shif"> | ||
| 36 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 37 | + <select class="form-control" name="subCompany" id="fgsdmShif" style="width: 140px;"></select> | ||
| 38 | + </div> --> | ||
| 31 | <div style="display: inline-block;"> | 39 | <div style="display: inline-block;"> |
| 32 | <span class="item-label" style="width: 80px;">线路: </span> | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| 33 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 41 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| @@ -97,6 +105,41 @@ $(function(){ | @@ -97,6 +105,41 @@ $(function(){ | ||
| 97 | locale : 'zh-cn' | 105 | locale : 'zh-cn' |
| 98 | }); | 106 | }); |
| 99 | 107 | ||
| 108 | + var obj = []; | ||
| 109 | + $.get('/user/companyData', function(result){ | ||
| 110 | + obj = result; | ||
| 111 | + var options = ''; | ||
| 112 | + for(var i = 0; i < obj.length; i++){ | ||
| 113 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + if(obj.length ==0){ | ||
| 117 | + $("#gsdmDiv_shif").css('display','none'); | ||
| 118 | + $('#fgsdmDiv_shif').css('display','none'); | ||
| 119 | + }else if(obj.length ==1){ | ||
| 120 | + $("#gsdmDiv_shif").css('display','none'); | ||
| 121 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 122 | + $('#fgsdmDiv_shif').css('display','none'); | ||
| 123 | + } | ||
| 124 | + $('#gsdmShif').html(options); | ||
| 125 | + updateCompany(); | ||
| 126 | + }); | ||
| 127 | + | ||
| 128 | + $("#gsdmShif").on("change",updateCompany); | ||
| 129 | + function updateCompany(){ | ||
| 130 | + var company = $('#gsdmShif').val(); | ||
| 131 | + var options = ''; | ||
| 132 | + for(var i = 0; i < obj.length; i++){ | ||
| 133 | + if(obj[i].companyCode == company){ | ||
| 134 | + var children = obj[i].children; | ||
| 135 | + for(var j = 0; j < children.length; j++){ | ||
| 136 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 137 | + } | ||
| 138 | + } | ||
| 139 | + } | ||
| 140 | + $('#fgsdmShif').html(options); | ||
| 141 | + } | ||
| 142 | + | ||
| 100 | 143 | ||
| 101 | $.get('/basic/lineCode2Name',function(result){ | 144 | $.get('/basic/lineCode2Name',function(result){ |
| 102 | var data=[]; | 145 | var data=[]; |
| @@ -112,7 +155,9 @@ $(function(){ | @@ -112,7 +155,9 @@ $(function(){ | ||
| 112 | $("#query").on("click",function(){ | 155 | $("#query").on("click",function(){ |
| 113 | var line = $("#line").val(); | 156 | var line = $("#line").val(); |
| 114 | var date = $("#date").val(); | 157 | var date = $("#date").val(); |
| 115 | - $post('/mcy_forms/shifday',{line:line,date:date},function(result){ | 158 | + /* var gsdmShif = $("#gsdmShif").val(); |
| 159 | + var fgsdmShif = $("#fgsdmShif").val(); */ | ||
| 160 | + $post('/mcy_forms/shifday',{/* gsdmShif:gsdmShif,fgsdmShif:fgsdmShif, */line:line,date:date},function(result){ | ||
| 116 | $.each(result, function(i, obj) { | 161 | $.each(result, function(i, obj) { |
| 117 | obj.requestType = reqCodeMap[obj.requestType]; | 162 | obj.requestType = reqCodeMap[obj.requestType]; |
| 118 | }); | 163 | }); |
src/main/resources/static/pages/forms/statement/shiftuehiclemanth.html
| @@ -27,7 +27,15 @@ | @@ -27,7 +27,15 @@ | ||
| 27 | <div class="col-md-12"> | 27 | <div class="col-md-12"> |
| 28 | <div class="portlet light porttlet-fit bordered"> | 28 | <div class="portlet light porttlet-fit bordered"> |
| 29 | <div class="portlet-title"> | 29 | <div class="portlet-title"> |
| 30 | - <form class="form-inline" action=""> | 30 | + <form class="form-inline" action=""> |
| 31 | + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_manth"> | ||
| 32 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 33 | + <select class="form-control" name="company" id="gsdmManth" style="width: 140px;"></select> | ||
| 34 | + </div> | ||
| 35 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_manth"> | ||
| 36 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 37 | + <select class="form-control" name="subCompany" id="fgsdmManth" style="width: 140px;"></select> | ||
| 38 | + </div> --> | ||
| 31 | <div style="display: inline-block;"> | 39 | <div style="display: inline-block;"> |
| 32 | <span class="item-label" style="width: 80px;">线路: </span> | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| 33 | <select class="form-control" name="line" id="line" style="width: 136px;"></select> | 41 | <select class="form-control" name="line" id="line" style="width: 136px;"></select> |
| @@ -87,6 +95,41 @@ | @@ -87,6 +95,41 @@ | ||
| 87 | locale : 'zh-cn' | 95 | locale : 'zh-cn' |
| 88 | }); | 96 | }); |
| 89 | 97 | ||
| 98 | + var obj = []; | ||
| 99 | + $.get('/user/companyData', function(result){ | ||
| 100 | + obj = result; | ||
| 101 | + var options = ''; | ||
| 102 | + for(var i = 0; i < obj.length; i++){ | ||
| 103 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + if(obj.length ==0){ | ||
| 107 | + $("#gsdmDiv_manth").css('display','none'); | ||
| 108 | + $('#fgsdmDiv_manth').css('display','none'); | ||
| 109 | + }else if(obj.length ==1){ | ||
| 110 | + $("#gsdmDiv_manth").css('display','none'); | ||
| 111 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 112 | + $('#fgsdmDiv_manth').css('display','none'); | ||
| 113 | + } | ||
| 114 | + $('#gsdmManth').html(options); | ||
| 115 | + updateCompany(); | ||
| 116 | + }); | ||
| 117 | + | ||
| 118 | + $("#gsdmManth").on("change",updateCompany); | ||
| 119 | + function updateCompany(){ | ||
| 120 | + var company = $('#gsdmManth').val(); | ||
| 121 | + var options = ''; | ||
| 122 | + for(var i = 0; i < obj.length; i++){ | ||
| 123 | + if(obj[i].companyCode == company){ | ||
| 124 | + var children = obj[i].children; | ||
| 125 | + for(var j = 0; j < children.length; j++){ | ||
| 126 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 127 | + } | ||
| 128 | + } | ||
| 129 | + } | ||
| 130 | + $('#fgsdmManth').html(options); | ||
| 131 | + } | ||
| 132 | + | ||
| 90 | 133 | ||
| 91 | $.get('/basic/lineCode2Name',function(result){ | 134 | $.get('/basic/lineCode2Name',function(result){ |
| 92 | var data=[]; | 135 | var data=[]; |
| @@ -141,7 +184,9 @@ | @@ -141,7 +184,9 @@ | ||
| 141 | var startDate = $("#startDate").val(); | 184 | var startDate = $("#startDate").val(); |
| 142 | var endDate = $("#endDate").val(); | 185 | var endDate = $("#endDate").val(); |
| 143 | var lpName = $("#lpName").val(); | 186 | var lpName = $("#lpName").val(); |
| 144 | - $post("/mcy_forms/shiftuehiclemanth",{line:line,startDate:startDate,endDate:endDate ,lpName:lpName},function(result){ | 187 | + /* var gsdmManth= $("#gsdmManth").val(); |
| 188 | + var fgsdmManth= $("#fgsdmManth").val(); */ | ||
| 189 | + $post("/mcy_forms/shiftuehiclemanth",{/* gsdmManth:gsdmManth,fgsdmManth:fgsdmManth, */line:line,startDate:startDate,endDate:endDate ,lpName:lpName},function(result){ | ||
| 145 | $("#sDate").text(startDate); | 190 | $("#sDate").text(startDate); |
| 146 | $("#eDate").text(endDate); | 191 | $("#eDate").text(endDate); |
| 147 | var temp = {}; | 192 | var temp = {}; |
src/main/resources/static/pages/forms/statement/singledata.html
| @@ -28,6 +28,14 @@ | @@ -28,6 +28,14 @@ | ||
| 28 | <div class="portlet light porttlet-fit bordered"> | 28 | <div class="portlet light porttlet-fit bordered"> |
| 29 | <div class="portlet-title"> | 29 | <div class="portlet-title"> |
| 30 | <form class="form-inline" action=""> | 30 | <form class="form-inline" action=""> |
| 31 | + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_sing"> | ||
| 32 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 33 | + <select class="form-control" name="company" id="gsdmSing" style="width: 140px;"></select> | ||
| 34 | + </div> | ||
| 35 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_sing"> | ||
| 36 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 37 | + <select class="form-control" name="subCompany" id="fgsdmSing" style="width: 140px;"></select> | ||
| 38 | + </div> --> | ||
| 31 | <div style="display: inline-block;"> | 39 | <div style="display: inline-block;"> |
| 32 | <span class="item-label" style="width: 80px;">线路: </span> | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| 33 | <select class="form-control" name="line" id="line" style="width: 136px;"></select> | 41 | <select class="form-control" name="line" id="line" style="width: 136px;"></select> |
| @@ -92,6 +100,41 @@ | @@ -92,6 +100,41 @@ | ||
| 92 | locale : 'zh-cn' | 100 | locale : 'zh-cn' |
| 93 | }); | 101 | }); |
| 94 | 102 | ||
| 103 | + var obj = []; | ||
| 104 | + $.get('/user/companyData', function(result){ | ||
| 105 | + obj = result; | ||
| 106 | + var options = ''; | ||
| 107 | + for(var i = 0; i < obj.length; i++){ | ||
| 108 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + if(obj.length ==0){ | ||
| 112 | + $("#gsdmDiv_sing").css('display','none'); | ||
| 113 | + $('#fgsdmDiv_sing').css('display','none'); | ||
| 114 | + }else if(obj.length ==1){ | ||
| 115 | + $("#gsdmDiv_sing").css('display','none'); | ||
| 116 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 117 | + $('#fgsdmDiv_sing').css('display','none'); | ||
| 118 | + } | ||
| 119 | + $('#gsdmSing').html(options); | ||
| 120 | + updateCompany(); | ||
| 121 | + }); | ||
| 122 | + | ||
| 123 | + $("#gsdmSing").on("change",updateCompany); | ||
| 124 | + function updateCompany(){ | ||
| 125 | + var company = $('#gsdmSing').val(); | ||
| 126 | + var options = ''; | ||
| 127 | + for(var i = 0; i < obj.length; i++){ | ||
| 128 | + if(obj[i].companyCode == company){ | ||
| 129 | + var children = obj[i].children; | ||
| 130 | + for(var j = 0; j < children.length; j++){ | ||
| 131 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 132 | + } | ||
| 133 | + } | ||
| 134 | + } | ||
| 135 | + $('#fgsdmSing').html(options); | ||
| 136 | + } | ||
| 137 | + | ||
| 95 | 138 | ||
| 96 | $.get('/basic/lineCode2Name',function(result){ | 139 | $.get('/basic/lineCode2Name',function(result){ |
| 97 | var data=[]; | 140 | var data=[]; |
| @@ -104,50 +147,15 @@ | @@ -104,50 +147,15 @@ | ||
| 104 | 147 | ||
| 105 | }) | 148 | }) |
| 106 | 149 | ||
| 107 | - $('#lpName').select2({ | ||
| 108 | - ajax: { | ||
| 109 | - url: '/realSchedule/findLpName', | ||
| 110 | - type: 'post', | ||
| 111 | - dataType: 'json', | ||
| 112 | - delay: 150, | ||
| 113 | - data: function(params){ | ||
| 114 | - return{lpName: params.term}; | ||
| 115 | - }, | ||
| 116 | - processResults: function (data) { | ||
| 117 | - return { | ||
| 118 | - results: data | ||
| 119 | - }; | ||
| 120 | - }, | ||
| 121 | - cache: true | ||
| 122 | - }, | ||
| 123 | - templateResult: function(repo){ | ||
| 124 | - if (repo.loading) return repo.text; | ||
| 125 | - var h = '<span>'+repo.text+'</span>'; | ||
| 126 | - return h; | ||
| 127 | - }, | ||
| 128 | - escapeMarkup: function (markup) { return markup; }, | ||
| 129 | - minimumInputLength: 1, | ||
| 130 | - templateSelection: function(repo){ | ||
| 131 | - return repo.text; | ||
| 132 | - }, | ||
| 133 | - language: { | ||
| 134 | - noResults: function(){ | ||
| 135 | - return '<span style="color:red;font-size: 12px;">没有搜索到路牌!</span>'; | ||
| 136 | - }, | ||
| 137 | - inputTooShort : function(e) { | ||
| 138 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入路牌搜索路牌</span>'; | ||
| 139 | - }, | ||
| 140 | - searching : function() { | ||
| 141 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索路牌...</span>'; | ||
| 142 | - } | ||
| 143 | - } | ||
| 144 | - }); | 150 | + |
| 145 | $("#query").on("click",function(){ | 151 | $("#query").on("click",function(){ |
| 146 | var line = $("#line").val(); | 152 | var line = $("#line").val(); |
| 147 | var startDate = $("#startDate").val(); | 153 | var startDate = $("#startDate").val(); |
| 148 | var endDate = $("#endDate").val(); | 154 | var endDate = $("#endDate").val(); |
| 149 | var lpName = $("#lpName").val(); | 155 | var lpName = $("#lpName").val(); |
| 150 | - $post("/mcy_forms/singledata",{line:line,startDate:startDate,endDate:endDate ,lpName:lpName},function(result){ | 156 | + /* var gsdmSing = $("#gsdmSing").val(); |
| 157 | + var fgsdmSing = $("#fgsdmSing").val(); */ | ||
| 158 | + $post("/mcy_forms/singledata",{/* gsdmSing:gsdmSing,fgsdmSing:fgsdmSing, */line:line,startDate:startDate,endDate:endDate ,lpName:lpName},function(result){ | ||
| 151 | $("#sDate").text(startDate); | 159 | $("#sDate").text(startDate); |
| 152 | $("#eDate").text(endDate); | 160 | $("#eDate").text(endDate); |
| 153 | var temp = {}; | 161 | var temp = {}; |
src/main/resources/static/pages/forms/statement/turnoutrate.html
| @@ -37,6 +37,14 @@ | @@ -37,6 +37,14 @@ | ||
| 37 | <div class="portlet light porttlet-fit bordered"> | 37 | <div class="portlet light porttlet-fit bordered"> |
| 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; margin-left: 33px;" id="gsdmDiv_turn"> | ||
| 41 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 42 | + <select class="form-control" name="company" id="gsdmTurn" style="width: 140px;"></select> | ||
| 43 | + </div> | ||
| 44 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_turn"> | ||
| 45 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 46 | + <select class="form-control" name="subCompany" id="fgsdmTurn" style="width: 140px;"></select> | ||
| 47 | + </div> --> | ||
| 40 | <div style="display: inline-block;"> | 48 | <div style="display: inline-block;"> |
| 41 | <span class="item-label" style="width: 80px;">线路: </span> | 49 | <span class="item-label" style="width: 80px;">线路: </span> |
| 42 | <select class="form-control" name="line" id="line" style="width: 120px;"></select> | 50 | <select class="form-control" name="line" id="line" style="width: 120px;"></select> |
| @@ -116,6 +124,42 @@ | @@ -116,6 +124,42 @@ | ||
| 116 | locale : 'zh-cn' | 124 | locale : 'zh-cn' |
| 117 | }); | 125 | }); |
| 118 | 126 | ||
| 127 | + var obj = []; | ||
| 128 | + $.get('/user/companyData', function(result){ | ||
| 129 | + obj = result; | ||
| 130 | + var options = ''; | ||
| 131 | + for(var i = 0; i < obj.length; i++){ | ||
| 132 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 133 | + } | ||
| 134 | + | ||
| 135 | + if(obj.length ==0){ | ||
| 136 | + $("#gsdmDiv_turn").css('display','none'); | ||
| 137 | + $('#fgsdmDiv_turn').css('display','none'); | ||
| 138 | + }else if(obj.length ==1){ | ||
| 139 | + $("#gsdmDiv_turn").css('display','none'); | ||
| 140 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 141 | + $('#fgsdmDiv_turn').css('display','none'); | ||
| 142 | + } | ||
| 143 | + $('#gsdmTurn').html(options); | ||
| 144 | + updateCompany(); | ||
| 145 | + }); | ||
| 146 | + | ||
| 147 | + $("#gsdmTurn").on("change",updateCompany); | ||
| 148 | + function updateCompany(){ | ||
| 149 | + var company = $('#gsdmTurn').val(); | ||
| 150 | + var options = ''; | ||
| 151 | + for(var i = 0; i < obj.length; i++){ | ||
| 152 | + if(obj[i].companyCode == company){ | ||
| 153 | + var children = obj[i].children; | ||
| 154 | + for(var j = 0; j < children.length; j++){ | ||
| 155 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 156 | + } | ||
| 157 | + } | ||
| 158 | + } | ||
| 159 | + $('#fgsdmTurn').html(options); | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + | ||
| 119 | $.get('/basic/lineCode2Name',function(result){ | 163 | $.get('/basic/lineCode2Name',function(result){ |
| 120 | var data=[]; | 164 | var data=[]; |
| 121 | 165 | ||
| @@ -129,14 +173,17 @@ | @@ -129,14 +173,17 @@ | ||
| 129 | var line; | 173 | var line; |
| 130 | var startDate; | 174 | var startDate; |
| 131 | var endDate; | 175 | var endDate; |
| 176 | + var gsdmTurn; | ||
| 177 | + var fgsdmTurn; | ||
| 132 | $("#query").on("click",function(){ | 178 | $("#query").on("click",function(){ |
| 133 | 179 | ||
| 134 | line = $("#line").val(); | 180 | line = $("#line").val(); |
| 135 | startDate1=$("#startDate").val(); | 181 | startDate1=$("#startDate").val(); |
| 136 | endDate1=$("#endDate").val(); | 182 | endDate1=$("#endDate").val(); |
| 137 | - | 183 | + gsdmTurn=$("#gsdmTurn").val(); |
| 184 | + fgsdmTurn=$("#fgsdmTurn").val(); | ||
| 138 | if(startDate1!=''&&endDate1!=''){ | 185 | if(startDate1!=''&&endDate1!=''){ |
| 139 | - $post('/mcy_forms/turnoutrate',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ | 186 | + $post('/mcy_forms/turnoutrate',{/* gsdmTurn:gsdmTurn,fgsdmTurn:fgsdmTurn, */line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ |
| 140 | // 把数据填充到模版中 | 187 | // 把数据填充到模版中 |
| 141 | var tbodyHtml = template('turnoutrate',{list:result}); | 188 | var tbodyHtml = template('turnoutrate',{list:result}); |
| 142 | // 把渲染好的模版html文本追加到表格中 | 189 | // 把渲染好的模版html文本追加到表格中 |
src/main/resources/static/pages/forms/statement/vehicleloading.html
| @@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
| 19 | 19 | ||
| 20 | <div class="page-head"> | 20 | <div class="page-head"> |
| 21 | <div class="page-title"> | 21 | <div class="page-title"> |
| 22 | - <h1>车辆加注</h1> | 22 | + <h1>车辆加注/消耗量</h1> |
| 23 | </div> | 23 | </div> |
| 24 | </div> | 24 | </div> |
| 25 | 25 | ||
| @@ -28,6 +28,14 @@ | @@ -28,6 +28,14 @@ | ||
| 28 | <div class="portlet light porttlet-fit bordered"> | 28 | <div class="portlet light porttlet-fit bordered"> |
| 29 | <div class="portlet-title"> | 29 | <div class="portlet-title"> |
| 30 | <form class="form-inline" action="" method="post"> | 30 | <form class="form-inline" action="" method="post"> |
| 31 | + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_vehic"> | ||
| 32 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 33 | + <select class="form-control" name="company" id="gsdmVehic" style="width: 140px;"></select> | ||
| 34 | + </div> | ||
| 35 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_vehic"> | ||
| 36 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 37 | + <select class="form-control" name="subCompany" id="fgsdmVehic" style="width: 140px;"></select> | ||
| 38 | + </div> --> | ||
| 31 | <div style="display: inline-block;"> | 39 | <div style="display: inline-block;"> |
| 32 | <span class="item-label" style="width: 80px;">线路: </span> | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| 33 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 41 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| @@ -82,7 +90,40 @@ | @@ -82,7 +90,40 @@ | ||
| 82 | locale : 'zh-cn' | 90 | locale : 'zh-cn' |
| 83 | }); | 91 | }); |
| 84 | 92 | ||
| 85 | - | 93 | + $.get('/user/companyData', function(result){ |
| 94 | + obj = result; | ||
| 95 | + var options = ''; | ||
| 96 | + for(var i = 0; i < obj.length; i++){ | ||
| 97 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + if(obj.length ==0){ | ||
| 101 | + $("#gsdmDiv_vehic").css('display','none'); | ||
| 102 | + $('#fgsdmDiv_vehic').css('display','none'); | ||
| 103 | + }else if(obj.length ==1){ | ||
| 104 | + $("#gsdmDiv_vehic").css('display','none'); | ||
| 105 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 106 | + $('#fgsdmDiv_vehic').css('display','none'); | ||
| 107 | + } | ||
| 108 | + $('#gsdmVehic').html(options); | ||
| 109 | + updateCompany(); | ||
| 110 | + }); | ||
| 111 | + | ||
| 112 | + $("#gsdmVehic").on("change",updateCompany); | ||
| 113 | + function updateCompany(){ | ||
| 114 | + var company = $('#gsdmVehic').val(); | ||
| 115 | + var options = ''; | ||
| 116 | + for(var i = 0; i < obj.length; i++){ | ||
| 117 | + if(obj[i].companyCode == company){ | ||
| 118 | + var children = obj[i].children; | ||
| 119 | + for(var j = 0; j < children.length; j++){ | ||
| 120 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 121 | + } | ||
| 122 | + } | ||
| 123 | + } | ||
| 124 | + $('#fgsdmVehic').html(options); | ||
| 125 | + } | ||
| 126 | + | ||
| 86 | $.get('/basic/lineCode2Name',function(result){ | 127 | $.get('/basic/lineCode2Name',function(result){ |
| 87 | var data=[]; | 128 | var data=[]; |
| 88 | 129 | ||
| @@ -94,50 +135,13 @@ | @@ -94,50 +135,13 @@ | ||
| 94 | 135 | ||
| 95 | }) | 136 | }) |
| 96 | 137 | ||
| 97 | - | ||
| 98 | - $('#lpName').select2({ | ||
| 99 | - ajax: { | ||
| 100 | - url: '/realSchedule/findLpName', | ||
| 101 | - type: 'post', | ||
| 102 | - dataType: 'json', | ||
| 103 | - delay: 150, | ||
| 104 | - data: function(params){ | ||
| 105 | - return{lpName: params.term}; | ||
| 106 | - }, | ||
| 107 | - processResults: function (data) { | ||
| 108 | - return { | ||
| 109 | - results: data | ||
| 110 | - }; | ||
| 111 | - }, | ||
| 112 | - cache: true | ||
| 113 | - }, | ||
| 114 | - templateResult: function(repo){ | ||
| 115 | - if (repo.loading) return repo.text; | ||
| 116 | - var h = '<span>'+repo.text+'</span>'; | ||
| 117 | - return h; | ||
| 118 | - }, | ||
| 119 | - escapeMarkup: function (markup) { return markup; }, | ||
| 120 | - minimumInputLength: 1, | ||
| 121 | - templateSelection: function(repo){ | ||
| 122 | - return repo.text; | ||
| 123 | - }, | ||
| 124 | - language: { | ||
| 125 | - noResults: function(){ | ||
| 126 | - return '<span style="color:red;font-size: 12px;">没有搜索到路牌!</span>'; | ||
| 127 | - }, | ||
| 128 | - inputTooShort : function(e) { | ||
| 129 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入路牌搜索路牌</span>'; | ||
| 130 | - }, | ||
| 131 | - searching : function() { | ||
| 132 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索路牌...</span>'; | ||
| 133 | - } | ||
| 134 | - } | ||
| 135 | - }); | 138 | + |
| 136 | $("#query").on("click",function(){ | 139 | $("#query").on("click",function(){ |
| 137 | var line = $("#line").val(); | 140 | var line = $("#line").val(); |
| 138 | var date = $("#date").val(); | 141 | var date = $("#date").val(); |
| 139 | - $(".hidden").removeClass("hidden"); | ||
| 140 | - $post("/mcy_forms/vehicleloading",{line:line,data:date},function(result){ | 142 | + /* var gsdmVehic = $("#gsdmVehic").val(); |
| 143 | + var fgsdmVehic = $("#fgsdmVehic").val(); */ | ||
| 144 | + $post('/mcy_forms/vehicleloading',{line:line,data:date},function(result){ | ||
| 141 | // 把数据填充到模版中 | 145 | // 把数据填充到模版中 |
| 142 | var tbodyHtml = template('vehicleloading',{list:result}); | 146 | var tbodyHtml = template('vehicleloading',{list:result}); |
| 143 | // 把渲染好的模版html文本追加到表格中 | 147 | // 把渲染好的模版html文本追加到表格中 |
src/main/resources/static/pages/forms/statement/waybillday.html
| @@ -28,6 +28,14 @@ | @@ -28,6 +28,14 @@ | ||
| 28 | <div class="portlet light porttlet-fit bordered"> | 28 | <div class="portlet light porttlet-fit bordered"> |
| 29 | <div class="portlet-title"> | 29 | <div class="portlet-title"> |
| 30 | <form class="form-inline" action="" method="post"> | 30 | <form class="form-inline" action="" method="post"> |
| 31 | + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_waybillday"> | ||
| 32 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 33 | + <select class="form-control" name="company" id="gsdmWaybillday" style="width: 140px;"></select> | ||
| 34 | + </div> | ||
| 35 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_waybillday"> | ||
| 36 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 37 | + <select class="form-control" name="subCompany" id="fgsdmWaybillday" style="width: 140px;"></select> | ||
| 38 | + </div> | ||
| 31 | <div style="display: inline-block;"> | 39 | <div style="display: inline-block;"> |
| 32 | <span class="item-label" style="width: 80px;">线路: </span> | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| 33 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 41 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| @@ -79,6 +87,42 @@ | @@ -79,6 +87,42 @@ | ||
| 79 | locale : 'zh-cn' | 87 | locale : 'zh-cn' |
| 80 | }); | 88 | }); |
| 81 | 89 | ||
| 90 | + var obj = []; | ||
| 91 | + $.get('/user/companyData', function(result){ | ||
| 92 | + obj = result; | ||
| 93 | + var options = ''; | ||
| 94 | + for(var i = 0; i < obj.length; i++){ | ||
| 95 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + if(obj.length ==0){ | ||
| 99 | + $("#gsdmDiv_waybillday").css('display','none'); | ||
| 100 | + $('#fgsdmDiv_waybillday').css('display','none'); | ||
| 101 | + }else if(obj.length ==1){ | ||
| 102 | + $("#gsdmDiv_waybillday").css('display','none'); | ||
| 103 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 104 | + $('#fgsdmDiv_waybillday').css('display','none'); | ||
| 105 | + } | ||
| 106 | + $('#gsdmWaybillday').html(options); | ||
| 107 | + updateCompany(); | ||
| 108 | + }); | ||
| 109 | + | ||
| 110 | + $("#gsdmWaybillday").on("change",updateCompany); | ||
| 111 | + function updateCompany(){ | ||
| 112 | + var company = $('#gsdmWaybillday').val(); | ||
| 113 | + var options = ''; | ||
| 114 | + for(var i = 0; i < obj.length; i++){ | ||
| 115 | + if(obj[i].companyCode == company){ | ||
| 116 | + var children = obj[i].children; | ||
| 117 | + for(var j = 0; j < children.length; j++){ | ||
| 118 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 119 | + } | ||
| 120 | + } | ||
| 121 | + } | ||
| 122 | + $('#fgsdmWaybillday').html(options); | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + | ||
| 82 | $.get('/basic/lineCode2Name',function(result){ | 126 | $.get('/basic/lineCode2Name',function(result){ |
| 83 | var data=[]; | 127 | var data=[]; |
| 84 | 128 | ||
| @@ -91,10 +135,15 @@ | @@ -91,10 +135,15 @@ | ||
| 91 | }) | 135 | }) |
| 92 | var line; | 136 | var line; |
| 93 | var date; | 137 | var date; |
| 138 | + var gsdmWaybillday; | ||
| 139 | + var fgsdmWaybillday; | ||
| 94 | $("#query").on("click",function(){ | 140 | $("#query").on("click",function(){ |
| 95 | line = $("#line").val(); | 141 | line = $("#line").val(); |
| 96 | date = $("#date").val(); | 142 | date = $("#date").val(); |
| 97 | - $post('/mcy_forms/waybillday',{line:line,date:$("#date").val(),type:'query'},function(result){ | 143 | + gsdmWaybillday=$("#gsdmWaybillday").val(); |
| 144 | + fgsdmWaybillday = $("#fgsdmWaybillday").val(); | ||
| 145 | + | ||
| 146 | + $post('/mcy_forms/waybillday',{gsdmWaybillday:gsdmWaybillday,fgsdmWaybillday:fgsdmWaybillday,line:line,date:$("#date").val(),type:'query'},function(result){ | ||
| 98 | $.each(result, function(i, obj) { | 147 | $.each(result, function(i, obj) { |
| 99 | obj.requestType = reqCodeMap[obj.requestType]; | 148 | obj.requestType = reqCodeMap[obj.requestType]; |
| 100 | }); | 149 | }); |