Commit 7821e6c0401d5d23e5fe614f80342af6b9886db2
Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
# Conflicts: # src/main/resources/static/real_control_v2/mapmonitor/fragments/map_config.html # src/main/resources/static/real_control_v2/mapmonitor/fragments/map_infowindow.html
Showing
16 changed files
with
524 additions
and
275 deletions
src/main/java/com/bsth/controller/forms/ExportController.java
| @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod; | @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod; | ||
| 13 | import org.springframework.web.bind.annotation.RequestParam; | 13 | import org.springframework.web.bind.annotation.RequestParam; |
| 14 | import org.springframework.web.bind.annotation.RestController; | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | 15 | ||
| 16 | +import com.bsth.entity.mcy_forms.Changetochange; | ||
| 16 | import com.bsth.entity.mcy_forms.Linepasswengerflow; | 17 | import com.bsth.entity.mcy_forms.Linepasswengerflow; |
| 17 | import com.bsth.entity.mcy_forms.Operationservice; | 18 | import com.bsth.entity.mcy_forms.Operationservice; |
| 18 | import com.bsth.entity.mcy_forms.Shifday; | 19 | import com.bsth.entity.mcy_forms.Shifday; |
| @@ -274,7 +275,48 @@ public class ExportController { | @@ -274,7 +275,48 @@ public class ExportController { | ||
| 274 | return resList; | 275 | return resList; |
| 275 | } | 276 | } |
| 276 | 277 | ||
| 277 | - | 278 | + |
| 279 | + //换人换车情况日统计 | ||
| 280 | + @RequestMapping(value = "/changetochangeExport",method = RequestMethod.POST) | ||
| 281 | + public List<Map<String, Object>> changetochangeExport(@RequestParam Map<String, Object> map){ | ||
| 282 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 283 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 284 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 285 | + ReportUtils ee = new ReportUtils(); | ||
| 286 | + List<Changetochange> changetochange = formsService.changetochange(map); | ||
| 287 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 288 | + for(Changetochange l : changetochange){ | ||
| 289 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 290 | + m.put("rq",l.getRq()); | ||
| 291 | + m.put("gs",l.getGs()); | ||
| 292 | + m.put("fgs",l.getFgs()); | ||
| 293 | + m.put("xl",l.getXl()); | ||
| 294 | + m.put("lp",l.getLp()); | ||
| 295 | + m.put("fssj",l.getFssj()); | ||
| 296 | + m.put("xgsj",l.getXgsj()); | ||
| 297 | + m.put("pcch",l.getPcch()); | ||
| 298 | + m.put("pcry",l.getPcry()); | ||
| 299 | + m.put("jhch",l.getJhch()); | ||
| 300 | + m.put("jhgh",l.getJhgh()); | ||
| 301 | + m.put("sjch",l.getSjch()); | ||
| 302 | + m.put("sjgh",l.getSjgh()); | ||
| 303 | + m.put("yy",l.getYy()); | ||
| 304 | + m.put("xgr",l.getXgr()); | ||
| 305 | + resList.add(m); | ||
| 306 | + } | ||
| 307 | + | ||
| 308 | + try { | ||
| 309 | + listI.add(resList.iterator()); | ||
| 310 | + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 311 | + ee.excelReplace(listI, new Object[] { map }, path+"mould\\changetochange.xls", | ||
| 312 | + path+"export\\换人换车情况日统计" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 313 | + } catch (Exception e) { | ||
| 314 | + e.printStackTrace(); | ||
| 315 | + } | ||
| 316 | + return resList; | ||
| 317 | + } | ||
| 318 | + | ||
| 319 | + | ||
| 278 | 320 | ||
| 279 | 321 | ||
| 280 | 322 |
src/main/java/com/bsth/controller/oil/YlbController.java
| @@ -49,8 +49,7 @@ public class YlbController extends BaseController<Ylb, Integer>{ | @@ -49,8 +49,7 @@ public class YlbController extends BaseController<Ylb, Integer>{ | ||
| 49 | */ | 49 | */ |
| 50 | @RequestMapping(value = "/obtain",method = RequestMethod.GET) | 50 | @RequestMapping(value = "/obtain",method = RequestMethod.GET) |
| 51 | public Map<String, Object> obtain(@RequestParam Map<String, Object> map){ | 51 | public Map<String, Object> obtain(@RequestParam Map<String, Object> map){ |
| 52 | - String rq=map.get("rq").toString(); | ||
| 53 | - Map<String, Object> list=yblService.obtain(rq); | 52 | + Map<String, Object> list=yblService.obtain(map); |
| 54 | System.out.println(); | 53 | System.out.println(); |
| 55 | return list; | 54 | return list; |
| 56 | } | 55 | } |
src/main/java/com/bsth/entity/mcy_forms/Changetochange.java
| 1 | package com.bsth.entity.mcy_forms; | 1 | package com.bsth.entity.mcy_forms; |
| 2 | 2 | ||
| 3 | +import java.util.Date; | ||
| 4 | + | ||
| 5 | +import javax.persistence.Entity; | ||
| 6 | +import javax.persistence.GeneratedValue; | ||
| 7 | +import javax.persistence.Id; | ||
| 8 | +import javax.persistence.Table; | ||
| 9 | + | ||
| 10 | +@Entity | ||
| 11 | +@Table(name = "bsth_c_chtoch") | ||
| 3 | public class Changetochange { | 12 | public class Changetochange { |
| 13 | + @Id | ||
| 14 | + @GeneratedValue | ||
| 15 | + private Integer id; | ||
| 16 | + | ||
| 17 | + private String rq;//日期 | ||
| 18 | + | ||
| 19 | + private String gs;//公司 | ||
| 20 | + | ||
| 21 | + private String fgs;//分公司 | ||
| 22 | + | ||
| 23 | + private String xl;//线路 | ||
| 24 | + | ||
| 25 | + private String lp;//路牌 | ||
| 26 | + | ||
| 27 | + private String fssj;//发生时间 | ||
| 28 | + | ||
| 29 | + private String xgsj;//修改时间 | ||
| 30 | + | ||
| 31 | + private String pcch;//配车车号 | ||
| 32 | + | ||
| 33 | + private String pcry;//配车人员 | ||
| 34 | + | ||
| 35 | + private String jhch;//计划车号 | ||
| 36 | + | ||
| 37 | + private String jhgh;//计划工号 | ||
| 38 | + | ||
| 39 | + private String sjch;//实际车号 | ||
| 40 | + | ||
| 41 | + private String sjgh;//实际工号 | ||
| 42 | + | ||
| 43 | + private String yy;//原因 | ||
| 44 | + | ||
| 45 | + private String xgr;//修改人 | ||
| 46 | + | ||
| 47 | + | ||
| 48 | + public Integer getId() { | ||
| 49 | + return id; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public void setId(Integer id) { | ||
| 53 | + this.id = id; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public String getRq() { | ||
| 57 | + return rq; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + public void setRq(String rq) { | ||
| 61 | + this.rq = rq; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + public String getGs() { | ||
| 65 | + return gs; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + public void setGs(String gs) { | ||
| 69 | + this.gs = gs; | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + public String getFgs() { | ||
| 73 | + return fgs; | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + public void setFgs(String fgs) { | ||
| 77 | + this.fgs = fgs; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + public String getXl() { | ||
| 81 | + return xl; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public void setXl(String xl) { | ||
| 85 | + this.xl = xl; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + public String getLp() { | ||
| 89 | + return lp; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public void setLp(String lp) { | ||
| 93 | + this.lp = lp; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public String getFssj() { | ||
| 97 | + return fssj; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public void setFssj(String fssj) { | ||
| 101 | + this.fssj = fssj; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public String getXgsj() { | ||
| 105 | + return xgsj; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + public void setXgsj(String xgsj) { | ||
| 109 | + this.xgsj = xgsj; | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + public String getPcch() { | ||
| 113 | + return pcch; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + public void setPcch(String pcch) { | ||
| 117 | + this.pcch = pcch; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public String getPcry() { | ||
| 121 | + return pcry; | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + public void setPcry(String pcry) { | ||
| 125 | + this.pcry = pcry; | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + | ||
| 129 | + public String getJhch() { | ||
| 130 | + return jhch; | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + public void setJhch(String jhch) { | ||
| 134 | + this.jhch = jhch; | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + public String getJhgh() { | ||
| 138 | + return jhgh; | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + public void setJhgh(String jhgh) { | ||
| 142 | + this.jhgh = jhgh; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + public String getSjch() { | ||
| 146 | + return sjch; | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + public void setSjch(String sjch) { | ||
| 150 | + this.sjch = sjch; | ||
| 151 | + } | ||
| 152 | + | ||
| 153 | + public String getSjgh() { | ||
| 154 | + return sjgh; | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + public void setSjgh(String sjgh) { | ||
| 158 | + this.sjgh = sjgh; | ||
| 159 | + } | ||
| 160 | + | ||
| 161 | + public String getYy() { | ||
| 162 | + return yy; | ||
| 163 | + } | ||
| 164 | + | ||
| 165 | + public void setYy(String yy) { | ||
| 166 | + this.yy = yy; | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + public String getXgr() { | ||
| 170 | + return xgr; | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + public void setXgr(String xgr) { | ||
| 174 | + this.xgr = xgr; | ||
| 175 | + } | ||
| 176 | + | ||
| 4 | 177 | ||
| 5 | 178 | ||
| 6 | } | 179 | } |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| @@ -100,10 +100,10 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | @@ -100,10 +100,10 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | ||
| 100 | void deleteByLineCodeAndDate(String xlBm, String schDate); | 100 | void deleteByLineCodeAndDate(String xlBm, String schDate); |
| 101 | 101 | ||
| 102 | //去掉了 xlBm is not null | 102 | //去掉了 xlBm is not null |
| 103 | - @Query(value="select s from ScheduleRealInfo s where (s.xlBm = ?1 or s.xlBm is not null) and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2") | 103 | + @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2") |
| 104 | List<ScheduleRealInfo> scheduleByDateAndLine(String line,String date); | 104 | List<ScheduleRealInfo> scheduleByDateAndLine(String line,String date); |
| 105 | 105 | ||
| 106 | - @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh) from ScheduleRealInfo s where (s.xlBm = ?1 or s.xlBm is not null) and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY xlBm,clZbh,jGh,scheduleDate,jGh ORDER BY xlBm,clZbh") | 106 | + @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh) from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY xlBm,clZbh,jGh,scheduleDate,jGh ORDER BY xlBm,clZbh") |
| 107 | List<Map<String,Object>> yesterdayDataList(String line,String date); | 107 | List<Map<String,Object>> yesterdayDataList(String line,String date); |
| 108 | 108 | ||
| 109 | @Query(value="select s from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 ORDER BY xlBm,lpName,clZbh,xlDir") | 109 | @Query(value="select s from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 ORDER BY xlBm,lpName,clZbh,xlDir") |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| @@ -3,8 +3,10 @@ package com.bsth.service.forms.impl; | @@ -3,8 +3,10 @@ package com.bsth.service.forms.impl; | ||
| 3 | import java.sql.ResultSet; | 3 | import java.sql.ResultSet; |
| 4 | import java.sql.SQLException; | 4 | import java.sql.SQLException; |
| 5 | import java.text.DecimalFormat; | 5 | import java.text.DecimalFormat; |
| 6 | +import java.text.ParseException; | ||
| 6 | import java.text.SimpleDateFormat; | 7 | import java.text.SimpleDateFormat; |
| 7 | import java.util.ArrayList; | 8 | import java.util.ArrayList; |
| 9 | +import java.util.Date; | ||
| 8 | import java.util.HashMap; | 10 | import java.util.HashMap; |
| 9 | import java.util.Iterator; | 11 | import java.util.Iterator; |
| 10 | import java.util.List; | 12 | import java.util.List; |
| @@ -226,11 +228,66 @@ public class FormsServiceImpl implements FormsService{ | @@ -226,11 +228,66 @@ public class FormsServiceImpl implements FormsService{ | ||
| 226 | } | 228 | } |
| 227 | 229 | ||
| 228 | //换人换车情况日统计 | 230 | //换人换车情况日统计 |
| 229 | - @Override | ||
| 230 | - public List<Changetochange> changetochange(Map<String, Object> map) { | ||
| 231 | - | ||
| 232 | - return null; | ||
| 233 | - } | 231 | + String rq; |
| 232 | + @Override | ||
| 233 | + public List<Changetochange> changetochange(Map<String, Object> map) { | ||
| 234 | + | ||
| 235 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd") ; | ||
| 236 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日") ; | ||
| 237 | + Date d = null ; | ||
| 238 | + Date d1 = null ; | ||
| 239 | + try { | ||
| 240 | + d = sdf.parse(map.get("startDate").toString()); | ||
| 241 | + d1 = sdf.parse(map.get("endDate").toString()); | ||
| 242 | + } catch (ParseException e) { | ||
| 243 | + | ||
| 244 | + e.printStackTrace(); | ||
| 245 | + } | ||
| 246 | + String rq2=sdf1.format(d); | ||
| 247 | + String rq3=sdf1.format(d1); | ||
| 248 | + | ||
| 249 | + rq=rq2+"-"+ rq3; | ||
| 250 | + | ||
| 251 | + String sql=" select c.*,l.line_code from bsth_c_chtoch c LEFT JOIN bsth_c_line l on c.xl=l.name WHERE 1=1 "; | ||
| 252 | + if(!map.get("startDate").toString().equals(" ")&&!map.get("endDate").toString().equals(" ")){ | ||
| 253 | + sql+= "and DATE_FORMAT( c.rq,'%Y-%m-%d') BETWEEN '"+map.get("startDate").toString()+"' and '"+map.get("endDate").toString()+"'"; | ||
| 254 | + } | ||
| 255 | + if(!map.get("line").equals("")){ | ||
| 256 | + sql+="and line_code='"+map.get("line")+"'"; | ||
| 257 | + } | ||
| 258 | + if(map.get("sel").equals("2")){ | ||
| 259 | + sql+=" and c.pcch!=c.pcry"; | ||
| 260 | + }else if(map.get("sel").equals("1")){ | ||
| 261 | + sql+=" and c.jhgh!=c.sjgh"; | ||
| 262 | + } | ||
| 263 | + | ||
| 264 | + | ||
| 265 | + List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() { | ||
| 266 | + | ||
| 267 | + @Override | ||
| 268 | + public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 269 | + Changetochange chan= new Changetochange(); | ||
| 270 | + | ||
| 271 | + chan.setRq(rq); | ||
| 272 | + chan.setGs(arg0.getString("gs").toString()); | ||
| 273 | + chan.setFgs(arg0.getString("fgs").toString()); | ||
| 274 | + chan.setXl(arg0.getString("xl").toString()); | ||
| 275 | + chan.setLp(arg0.getString("lp").toString()); | ||
| 276 | + chan.setFssj(arg0.getString("fssj").toString()); | ||
| 277 | + chan.setXgsj(arg0.getString("xgsj").toString()); | ||
| 278 | + chan.setPcch(arg0.getString("pcch").toString()); | ||
| 279 | + chan.setPcry(arg0.getString("pcry").toString()); | ||
| 280 | + chan.setJhch(arg0.getString("jhch").toString()); | ||
| 281 | + chan.setJhgh(arg0.getString("jhgh").toString()); | ||
| 282 | + chan.setSjch(arg0.getString("sjch").toString()); | ||
| 283 | + chan.setSjgh(arg0.getString("sjgh").toString()); | ||
| 284 | + chan.setYy(arg0.getString("yy").toString()); | ||
| 285 | + chan.setXgr(arg0.getString("xgr").toString()); | ||
| 286 | + return chan; | ||
| 287 | + } | ||
| 288 | + }); | ||
| 289 | + return list; | ||
| 290 | + } | ||
| 234 | 291 | ||
| 235 | 292 | ||
| 236 | //路单数据 | 293 | //路单数据 |
src/main/java/com/bsth/service/oil/YlbService.java
| @@ -7,7 +7,7 @@ import com.bsth.entity.oil.Ylb; | @@ -7,7 +7,7 @@ import com.bsth.entity.oil.Ylb; | ||
| 7 | import com.bsth.service.BaseService; | 7 | import com.bsth.service.BaseService; |
| 8 | 8 | ||
| 9 | public interface YlbService extends BaseService<Ylb, Integer>{ | 9 | public interface YlbService extends BaseService<Ylb, Integer>{ |
| 10 | - Map<String, Object> obtain(String rq); | 10 | + Map<String, Object> obtain(Map<String, Object> map); |
| 11 | String obtainDsq(); | 11 | String obtainDsq(); |
| 12 | Map<String, Object> sort(Map<String, Object> map); | 12 | Map<String, Object> sort(Map<String, Object> map); |
| 13 | 13 |
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
| @@ -85,7 +85,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -85,7 +85,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 85 | //前一天所有车辆最后进场班次信息 | 85 | //前一天所有车辆最后进场班次信息 |
| 86 | List<Ylb> ylListBe=repository.obtainYlbefore(rq); | 86 | List<Ylb> ylListBe=repository.obtainYlbefore(rq); |
| 87 | //从排班表中计算出行驶的总里程 | 87 | //从排班表中计算出行驶的总里程 |
| 88 | - List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList("1024",rq); | 88 | + List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList("",rq); |
| 89 | 89 | ||
| 90 | for(int x=0;x<listpb.size();x++){ | 90 | for(int x=0;x<listpb.size();x++){ |
| 91 | 91 | ||
| @@ -151,7 +151,13 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -151,7 +151,13 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 151 | */ | 151 | */ |
| 152 | @Transactional | 152 | @Transactional |
| 153 | @Override | 153 | @Override |
| 154 | - public Map<String, Object> obtain(String rq) { | 154 | + public Map<String, Object> obtain(Map<String, Object> map2) { |
| 155 | + String rq=map2.get("rq").toString(); | ||
| 156 | + String line=""; | ||
| 157 | + if(map2.get("xlbm_eq")!=null){ | ||
| 158 | + line=map2.get("xlbm_eq").toString(); | ||
| 159 | + } | ||
| 160 | + | ||
| 155 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); | 161 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); |
| 156 | //保留两位小数 | 162 | //保留两位小数 |
| 157 | DecimalFormat df = new DecimalFormat("#.00"); | 163 | DecimalFormat df = new DecimalFormat("#.00"); |
| @@ -164,7 +170,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -164,7 +170,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 164 | //前一天所有车辆最后进场班次信息 | 170 | //前一天所有车辆最后进场班次信息 |
| 165 | List<Ylb> ylListBe=repository.obtainYlbefore(rq); | 171 | List<Ylb> ylListBe=repository.obtainYlbefore(rq); |
| 166 | //从排班表中计算出行驶的总里程 | 172 | //从排班表中计算出行驶的总里程 |
| 167 | - List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList("1024",rq); | 173 | + List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList(line,rq); |
| 168 | 174 | ||
| 169 | for(int x=0;x<listpb.size();x++){ | 175 | for(int x=0;x<listpb.size();x++){ |
| 170 | 176 |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -1129,8 +1129,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1129,8 +1129,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1129 | addMileage += tempJhlc; | 1129 | addMileage += tempJhlc; |
| 1130 | ljbc++; | 1130 | ljbc++; |
| 1131 | }else{ | 1131 | }else{ |
| 1132 | + if(scheduleRealInfo.getBcType().equals("normal")){ | ||
| 1133 | + jhbc++; | ||
| 1134 | + } | ||
| 1132 | jhlc += tempJhlc; | 1135 | jhlc += tempJhlc; |
| 1133 | - jhbc++; | ||
| 1134 | if(scheduleRealInfo.getStatus() == -1){ | 1136 | if(scheduleRealInfo.getStatus() == -1){ |
| 1135 | remMileage += tempJhlc; | 1137 | remMileage += tempJhlc; |
| 1136 | cjbc++; | 1138 | cjbc++; |
| @@ -1516,7 +1518,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1516,7 +1518,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1516 | if(scheduleRealInfo.getXlBm().equals(yesterdayDataList.get(i).get("xlBm")) && scheduleRealInfo.getClZbh().equals(yesterdayDataList.get(i).get("clZbh")) | 1518 | if(scheduleRealInfo.getXlBm().equals(yesterdayDataList.get(i).get("xlBm")) && scheduleRealInfo.getClZbh().equals(yesterdayDataList.get(i).get("clZbh")) |
| 1517 | && scheduleRealInfo.getjGh().equals(yesterdayDataList.get(i).get("jGh"))){ | 1519 | && scheduleRealInfo.getjGh().equals(yesterdayDataList.get(i).get("jGh"))){ |
| 1518 | //根据线路代码获取公司 | 1520 | //根据线路代码获取公司 |
| 1519 | - Line li = lineRepository.findByLineCode(line); | 1521 | + Line li = lineRepository.findByLineCode(scheduleRealInfo.getXlBm()); |
| 1520 | yesterdayDataList.get(i).put("company", li.getCompany()); | 1522 | yesterdayDataList.get(i).put("company", li.getCompany()); |
| 1521 | //计算总公里 | 1523 | //计算总公里 |
| 1522 | Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks(); | 1524 | Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks(); |
src/main/resources/application-dev.properties
| @@ -8,7 +8,7 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | @@ -8,7 +8,7 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | ||
| 8 | spring.jpa.database= MYSQL | 8 | spring.jpa.database= MYSQL |
| 9 | spring.jpa.show-sql= false | 9 | spring.jpa.show-sql= false |
| 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver | 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 11 | -spring.datasource.url= jdbc:mysql://192.168.168.201/mh_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 11 | +spring.datasource.url= jdbc:mysql://192.168.168.201:3306/mh_control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 12 | spring.datasource.username= root | 12 | spring.datasource.username= root |
| 13 | spring.datasource.password= 123456 | 13 | spring.datasource.password= 123456 |
| 14 | #DATASOURCE | 14 | #DATASOURCE |
src/main/resources/static/pages/forms/mould/changetochange.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/changetochange.html
| @@ -10,63 +10,98 @@ | @@ -10,63 +10,98 @@ | ||
| 10 | border: 1px solid; } | 10 | border: 1px solid; } |
| 11 | .table-bordered > thead > tr > th, | 11 | .table-bordered > thead > tr > th, |
| 12 | .table-bordered > thead > tr > td { | 12 | .table-bordered > thead > tr > td { |
| 13 | - border-bottom-width: 2px; } | 13 | + border-bottom-width: 2px; |
| 14 | + text-align: center;} | ||
| 14 | 15 | ||
| 15 | .table > tbody + tbody { | 16 | .table > tbody + tbody { |
| 16 | border-top: 1px solid; } | 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; | ||
| 25 | +} | ||
| 26 | + | ||
| 17 | </style> | 27 | </style> |
| 18 | 28 | ||
| 19 | <div class="page-head"> | 29 | <div class="page-head"> |
| 20 | <div class="page-title"> | 30 | <div class="page-title"> |
| 21 | - <h1>鎹汉鎹㈣溅鎯呭喌缁熻琛</h1> | 31 | + <h1>换人换车情况统计表</h1> |
| 22 | </div> | 32 | </div> |
| 23 | </div> | 33 | </div> |
| 24 | 34 | ||
| 25 | <div class="row"> | 35 | <div class="row"> |
| 26 | <div class="col-md-12"> | 36 | <div class="col-md-12"> |
| 27 | <div class="portlet light porttlet-fit bordered"> | 37 | <div class="portlet light porttlet-fit bordered"> |
| 38 | + <div class="portlet-title"> | ||
| 39 | + <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 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 | + </select> | ||
| 59 | + </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> | ||
| 64 | + </form> | ||
| 65 | + </div> | ||
| 28 | <div class="portlet-body"> | 66 | <div class="portlet-body"> |
| 29 | - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | 67 | + <div class="table-container" style="margin-top: 20px;overflow:auto;min-width: 1000px"> |
| 30 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 68 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 31 | <thead> | 69 | <thead> |
| 32 | <tr> | 70 | <tr> |
| 33 | - <th colspan="13">鎹汉鎹㈣溅鎯呭喌缁熻琛</th> | 71 | + <th colspan="15">换人换车情况统计表</th> |
| 34 | </tr> | 72 | </tr> |
| 35 | - <!-- <tr> | ||
| 36 | - <td colspan="12">杞﹂槦 绔 <span id="sDate"></span>鑷<span id="eDate"></span></td> | ||
| 37 | - </tr> --> | ||
| 38 | <tr> | 73 | <tr> |
| 39 | - <td rowspan="3">鏃ユ湡</td> | ||
| 40 | - <td rowspan="3">鍏徃</td> | ||
| 41 | - <td rowspan="3">鍒嗗叕鍙</td> | ||
| 42 | - <td rowspan="3">绾胯矾</td> | ||
| 43 | - <td rowspan="3">璺墝</td> | ||
| 44 | - <td rowspan="3">鍙戠敓鏃堕棿</td> | ||
| 45 | - <td rowspan="3">淇敼鏃堕棿</td> | ||
| 46 | - <td colspan="3">閰嶈溅</td> | ||
| 47 | - <td colspan="3">浜哄憳</td> | ||
| 48 | - <td rowspan="3">鍘熷洜</td> | ||
| 49 | - <td rowspan="3">淇敼浜</td> | 74 | + <td rowspan="3" style=" padding-top: 50px;">日期</td> |
| 75 | + <td rowspan="3" style=" padding-top: 50px;">公司</td> | ||
| 76 | + <td rowspan="3" style=" padding-top: 50px;">分公司</td> | ||
| 77 | + <td rowspan="3" style=" padding-top: 50px;">线路</td> | ||
| 78 | + <td rowspan="3" style=" padding-top: 50px;">路牌</td> | ||
| 79 | + <td rowspan="3" style=" padding-top: 50px;">发生时间</td> | ||
| 80 | + <td rowspan="3" style=" padding-top: 50px;">修改时间</td> | ||
| 81 | + <td colspan="2">配车</td> | ||
| 82 | + <td colspan="4">人员</td> | ||
| 83 | + <td rowspan="3" style=" padding-top: 50px;">原因</td> | ||
| 84 | + <td rowspan="3" style=" padding-top: 50px;">修改人</td> | ||
| 50 | </tr> | 85 | </tr> |
| 51 | <tr> | 86 | <tr> |
| 52 | - <td>璁″垝</td> | ||
| 53 | - <td>瀹為檯</td> | ||
| 54 | - <td>璁″垝</td> | ||
| 55 | - <td>瀹為檯</td> | 87 | + <td>计划</td> |
| 88 | + <td>实际</td> | ||
| 89 | + <td colspan="2">计划</td> | ||
| 90 | + <td colspan="2">实际</td> | ||
| 91 | + | ||
| 56 | </tr> | 92 | </tr> |
| 57 | <tr> | 93 | <tr> |
| 58 | - <td>璁″垝</td> | ||
| 59 | - <td>瀹為檯</td> | ||
| 60 | - <td>璁″垝</td> | ||
| 61 | - <td>瀹為檯</td> | 94 | + <td>车号</td> |
| 95 | + <td>车号</td> | ||
| 96 | + <td>工号</td> | ||
| 97 | + <td>人员</td> | ||
| 98 | + <td>工号</td> | ||
| 99 | + <td>人员</td> | ||
| 62 | </tr> | 100 | </tr> |
| 63 | </thead> | 101 | </thead> |
| 64 | - <tbody class="list_correctForm"> | 102 | + <tbody> |
| 65 | 103 | ||
| 66 | </tbody> | 104 | </tbody> |
| 67 | - <tbody class="list_correctForm_statistics"> | ||
| 68 | - | ||
| 69 | - </tbody> | ||
| 70 | </table> | 105 | </table> |
| 71 | </div> | 106 | </div> |
| 72 | </div> | 107 | </div> |
| @@ -76,7 +111,7 @@ | @@ -76,7 +111,7 @@ | ||
| 76 | 111 | ||
| 77 | <script> | 112 | <script> |
| 78 | $(function(){ | 113 | $(function(){ |
| 79 | - // 鍏抽棴宸︿晶鏍 | 114 | + // 关闭左侧栏 |
| 80 | if (!$('body').hasClass('page-sidebar-closed')) | 115 | if (!$('body').hasClass('page-sidebar-closed')) |
| 81 | $('.menu-toggler.sidebar-toggler').click(); | 116 | $('.menu-toggler.sidebar-toggler').click(); |
| 82 | 117 | ||
| @@ -113,162 +148,81 @@ | @@ -113,162 +148,81 @@ | ||
| 113 | }, | 148 | }, |
| 114 | language: { | 149 | language: { |
| 115 | noResults: function(){ | 150 | noResults: function(){ |
| 116 | - return '<span style="color:red;font-size: 12px;">娌℃湁鎼滅储鍒扮嚎璺紒</span>'; | ||
| 117 | - }, | ||
| 118 | - inputTooShort : function(e) { | ||
| 119 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 杈撳叆绾胯矾鎼滅储绾胯矾</span>'; | ||
| 120 | - }, | ||
| 121 | - searching : function() { | ||
| 122 | - return '<span style="color:gray;font-size: 12px;"> 姝e湪鎼滅储绾胯矾...</span>'; | ||
| 123 | - } | ||
| 124 | - } | ||
| 125 | - }); | ||
| 126 | - $('#lpName').select2({ | ||
| 127 | - ajax: { | ||
| 128 | - url: '/realSchedule/findLpName', | ||
| 129 | - type: 'post', | ||
| 130 | - dataType: 'json', | ||
| 131 | - delay: 150, | ||
| 132 | - data: function(params){ | ||
| 133 | - return{lpName: params.term}; | ||
| 134 | - }, | ||
| 135 | - processResults: function (data) { | ||
| 136 | - return { | ||
| 137 | - results: data | ||
| 138 | - }; | ||
| 139 | - }, | ||
| 140 | - cache: true | ||
| 141 | - }, | ||
| 142 | - templateResult: function(repo){ | ||
| 143 | - if (repo.loading) return repo.text; | ||
| 144 | - var h = '<span>'+repo.text+'</span>'; | ||
| 145 | - return h; | ||
| 146 | - }, | ||
| 147 | - escapeMarkup: function (markup) { return markup; }, | ||
| 148 | - minimumInputLength: 1, | ||
| 149 | - templateSelection: function(repo){ | ||
| 150 | - return repo.text; | ||
| 151 | - }, | ||
| 152 | - language: { | ||
| 153 | - noResults: function(){ | ||
| 154 | - return '<span style="color:red;font-size: 12px;">娌℃湁鎼滅储鍒拌矾鐗岋紒</span>'; | 151 | + return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; |
| 155 | }, | 152 | }, |
| 156 | inputTooShort : function(e) { | 153 | inputTooShort : function(e) { |
| 157 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 杈撳叆璺墝鎼滅储璺墝</span>'; | 154 | + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; |
| 158 | }, | 155 | }, |
| 159 | searching : function() { | 156 | searching : function() { |
| 160 | - return '<span style="color:gray;font-size: 12px;"> 姝e湪鎼滅储璺墝...</span>'; | 157 | + return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; |
| 161 | } | 158 | } |
| 162 | } | 159 | } |
| 163 | }); | 160 | }); |
| 164 | - $('#code').select2({ | ||
| 165 | - ajax: { | ||
| 166 | - url: '/realSchedule/sreachVehic', | ||
| 167 | - dataType: 'json', | ||
| 168 | - delay: 150, | ||
| 169 | - data: function(params){ | ||
| 170 | - return{nbbm: params.term}; | ||
| 171 | - }, | ||
| 172 | - processResults: function (data) { | ||
| 173 | - return { | ||
| 174 | - results: data | ||
| 175 | - }; | ||
| 176 | - }, | ||
| 177 | - cache: true | ||
| 178 | - }, | ||
| 179 | - templateResult: function(repo){ | ||
| 180 | - if (repo.loading) return repo.text; | ||
| 181 | - var h = '<span>'+repo.text+'</span>'; | ||
| 182 | - h += (repo.lineName?' <span class="select2-desc">'+repo.lineName+'</span>':''); | ||
| 183 | - return h; | ||
| 184 | - }, | ||
| 185 | - escapeMarkup: function (markup) { return markup; }, | ||
| 186 | - minimumInputLength: 1, | ||
| 187 | - templateSelection: function(repo){ | ||
| 188 | - return repo.text; | ||
| 189 | - }, | ||
| 190 | - language: { | ||
| 191 | - noResults: function(){ | ||
| 192 | - return '<span style="color:red;font-size: 12px;">娌℃湁鎼滅储鍒拌溅杈嗭紒</span>'; | ||
| 193 | - }, | ||
| 194 | - inputTooShort : function(e) { | ||
| 195 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 杈撳叆鑷紪鍙锋悳绱㈣溅杈</span>'; | ||
| 196 | - }, | ||
| 197 | - searching : function() { | ||
| 198 | - return '<span style="color:gray;font-size: 12px;"> 姝e湪鎼滅储杞﹁締...</span>'; | ||
| 199 | - } | ||
| 200 | - } | ||
| 201 | - }); | ||
| 202 | - | 161 | + var line; |
| 162 | + var startDate; | ||
| 163 | + var endDate; | ||
| 203 | $("#query").on("click",function(){ | 164 | $("#query").on("click",function(){ |
| 204 | - var line = $("#line").val(); | ||
| 205 | - var startDate = $("#startDate").val(); | ||
| 206 | - var endDate = $("#endDate").val(); | ||
| 207 | - var lpName = $("#lpName").val(); | ||
| 208 | - var code = $("#code").val(); | ||
| 209 | - $post("/realSchedule/correctForm",{line:line,startDate:startDate,endDate:endDate,lpName:lpName,code:code},function(result){ | ||
| 210 | - $("#sDate").text(startDate); | ||
| 211 | - $("#eDate").text(endDate); | ||
| 212 | - var temp = {}; | ||
| 213 | - var today_account = 0; | ||
| 214 | - temp["line"] = $("#line").text() ; | ||
| 215 | - temp["totalAdjustment"] = result.length; | ||
| 216 | - | ||
| 217 | - $.each(result, function(i, obj) { | ||
| 218 | - if(moment(obj.scheduleDate).format("YYYY-MM-DD") == moment(obj.updateDate).format("YYYY-MM-DD")){ | ||
| 219 | - today_account++; | ||
| 220 | - } | ||
| 221 | - obj.updateDate = moment(obj.updateDate).format("YYYY-MM-DD HH:mm:ss"); | ||
| 222 | - }); | ||
| 223 | - | ||
| 224 | - temp["todayAdjustment"] = today_account; | ||
| 225 | - temp["beforeAdjustment"] = result.length-today_account; | ||
| 226 | - temp["historyAdjustment"] = 0; | ||
| 227 | - | ||
| 228 | - var list_correctForm = template('list_correctForm',{list:result}); | ||
| 229 | - // 鎶婃覆鏌撳ソ鐨勬ā鐗坔tml鏂囨湰杩藉姞鍒拌〃鏍间腑 | ||
| 230 | - $('#forms .list_correctForm').html(list_correctForm); | ||
| 231 | - | ||
| 232 | - var list_correctForm_statistics = template('list_correctForm_statistics',temp); | ||
| 233 | - $('#forms .list_correctForm_statistics').html(list_correctForm_statistics); | ||
| 234 | - }); | 165 | + line = $("#line").val(); |
| 166 | + sel = $("#sel").val(); | ||
| 167 | + var startDate1=$("#startDate").val(); | ||
| 168 | + var endDate1=$("#endDate").val(); | ||
| 169 | + | ||
| 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 | + }) | ||
| 190 | + | ||
| 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")); | ||
| 235 | }); | 199 | }); |
| 236 | }); | 200 | }); |
| 201 | + }); | ||
| 237 | </script> | 202 | </script> |
| 238 | -<script type="text/html" id="list_correctForm"> | 203 | +<script type="text/html" id="changetochange"> |
| 239 | {{each list as obj i}} | 204 | {{each list as obj i}} |
| 240 | <tr> | 205 | <tr> |
| 241 | - <td>{{obj.xlName}}</td> | ||
| 242 | - <td>{{obj.lpName}}</td> | ||
| 243 | - <td>{{obj.clZbh}}</td> | ||
| 244 | - <td>{{obj.jName}}</td> | ||
| 245 | - <td>{{obj.sName}}</td> | ||
| 246 | - <td>{{obj.fcsj}}</td> | ||
| 247 | - <td>{{obj.fcsjActual}}</td> | ||
| 248 | - <td>{{obj.zdsj}}</td> | ||
| 249 | - <td>{{obj.zdsjActual}}</td> | ||
| 250 | - <td>{{obj.updateBy}}</td> | ||
| 251 | - <td>{{obj.updateDate}}</td> | ||
| 252 | - <td>{{obj.remarks}}</td> | 206 | + <td>{{obj.rq}}</td> |
| 207 | + <td>{{obj.gs}}</td> | ||
| 208 | + <td>{{obj.fgs}}</td> | ||
| 209 | + <td>{{obj.xl}}</td> | ||
| 210 | + <td>{{obj.lp}}</td> | ||
| 211 | + <td>{{obj.fssj}}</td> | ||
| 212 | + <td>{{obj.xgsj}}</td> | ||
| 213 | + <td>{{obj.pcch}}</td> | ||
| 214 | + <td>{{obj.pcry}}</td> | ||
| 215 | + <td>{{obj.jhgh}}</td> | ||
| 216 | + <td>{{obj.jhch}}</td> | ||
| 217 | + <td>{{obj.sjgh}}</td> | ||
| 218 | + <td>{{obj.sjch}}</td> | ||
| 219 | + <td>{{obj.yy}}</td> | ||
| 220 | + <td>{{obj.xgr}}</td> | ||
| 253 | </tr> | 221 | </tr> |
| 254 | {{/each}} | 222 | {{/each}} |
| 255 | {{if list.length == 0}} | 223 | {{if list.length == 0}} |
| 256 | <tr> | 224 | <tr> |
| 257 | - <td colspan="12"><h6 class="muted">娌℃湁鎵惧埌鐩稿叧鏁版嵁</h6></td> | 225 | + <td colspan="15"><h6 class="muted">没有找到相关数据</h6></td> |
| 258 | </tr> | 226 | </tr> |
| 259 | {{/if}} | 227 | {{/if}} |
| 260 | </script> | 228 | </script> |
| 261 | -<script type="text/html" id="list_correctForm_statistics"> | ||
| 262 | - <tr> | ||
| 263 | - <td colspan="2">绾胯矾:</td> | ||
| 264 | - <td>{{line}}</td> | ||
| 265 | - <td>璋冩暣鎬绘暟</td> | ||
| 266 | - <td>{{totalAdjustment}}</td> | ||
| 267 | - <td>浜嬪厛璋冩暣</td> | ||
| 268 | - <td>{{beforeAdjustment}}</td> | ||
| 269 | - <td>褰撴棩璋冩暣</td> | ||
| 270 | - <td>{{todayAdjustment}}</td> | ||
| 271 | - <td>鍘嗗彶璋冩暣</td> | ||
| 272 | - <td colspan="2">{{historyAdjustment}}</td> | ||
| 273 | - </tr> | ||
| 274 | -</script> | ||
| 275 | \ No newline at end of file | 229 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/statisticsDaily .html
| @@ -203,7 +203,7 @@ | @@ -203,7 +203,7 @@ | ||
| 203 | }); | 203 | }); |
| 204 | $("#query").on("click",function(){ | 204 | $("#query").on("click",function(){ |
| 205 | var line = $("#line").val(); | 205 | var line = $("#line").val(); |
| 206 | - var xlName = $("#line").text(); | 206 | + var xlName = $("#select2-line-container").html(); |
| 207 | var date = $("#date").val(); | 207 | var date = $("#date").val(); |
| 208 | $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName},function(result){ | 208 | $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName},function(result){ |
| 209 | // 把数据填充到模版中 | 209 | // 把数据填充到模版中 |
src/main/resources/static/pages/oil/list.html
| @@ -294,8 +294,7 @@ $(function(){ | @@ -294,8 +294,7 @@ $(function(){ | ||
| 294 | } | 294 | } |
| 295 | }); | 295 | }); |
| 296 | $get('/ylb/obtain', params, function(){ | 296 | $get('/ylb/obtain', params, function(){ |
| 297 | - console.log("----------------------"); | ||
| 298 | - jsDoQuery(null,true); | 297 | + jsDoQuery(params,true); |
| 299 | }); | 298 | }); |
| 300 | }else{ | 299 | }else{ |
| 301 | layer.msg('请选择日期.'); | 300 | layer.msg('请选择日期.'); |
src/main/resources/static/real_control_v2/mapmonitor/fragments/map_config.html
| @@ -4,8 +4,8 @@ | @@ -4,8 +4,8 @@ | ||
| 4 | <div class="uk-form-row"> | 4 | <div class="uk-form-row"> |
| 5 | <span class="uk-form-label">图层</span> | 5 | <span class="uk-form-label">图层</span> |
| 6 | <div class="uk-form-controls"> | 6 | <div class="uk-form-controls"> |
| 7 | - <label><input type="radio" value="baidu" name="map_type" {{if map_type=='baidu'}}checked{{/if}}> 百度</label> | ||
| 8 | - <label><input type="radio" value="gaode" name="map_type" {{if map_type=='gaode'}}checked{{/if}}> 高德</label> | 7 | + <label><input type="radio" name="map_type" {{if map_type=='baidu'}}checked{{/if}}> 百度</label> |
| 8 | + <label><input type="radio" name="map_type" {{if map_type=='gaode'}}checked{{/if}}> 高德</label> | ||
| 9 | <label><input type="checkbox" name="map_type" {{if traffic}}checked{{/if}}> 实时路况</label> | 9 | <label><input type="checkbox" name="map_type" {{if traffic}}checked{{/if}}> 实时路况</label> |
| 10 | </div> | 10 | </div> |
| 11 | </div> | 11 | </div> |
| @@ -42,21 +42,21 @@ | @@ -42,21 +42,21 @@ | ||
| 42 | <div class="color_block"> | 42 | <div class="color_block"> |
| 43 | 上行 | 43 | 上行 |
| 44 | <div class="sp-placeholder"> | 44 | <div class="sp-placeholder"> |
| 45 | - <div class="sp-placeholder-color" data-name="carIcon.color.up" style="background: {{carIcon.color.up}}"></div> | 45 | + <div class="sp-placeholder-color" style="background: {{carIcon.color.up}}"></div> |
| 46 | </div> | 46 | </div> |
| 47 | </div> | 47 | </div> |
| 48 | 48 | ||
| 49 | <div class="color_block"> | 49 | <div class="color_block"> |
| 50 | 下行 | 50 | 下行 |
| 51 | <div class="sp-placeholder"> | 51 | <div class="sp-placeholder"> |
| 52 | - <div class="sp-placeholder-color" data-name="carIcon.color.down" style="background: {{carIcon.color.down}}"></div> | 52 | + <div class="sp-placeholder-color" style="background: {{carIcon.color.down}}"></div> |
| 53 | </div> | 53 | </div> |
| 54 | </div> | 54 | </div> |
| 55 | 55 | ||
| 56 | <div class="color_block"> | 56 | <div class="color_block"> |
| 57 | 非营运 | 57 | 非营运 |
| 58 | <div class="sp-placeholder"> | 58 | <div class="sp-placeholder"> |
| 59 | - <div class="sp-placeholder-color" data-name="carIcon.color.nonOperation" style="background: {{carIcon.color.nonOperation}}"></div> | 59 | + <div class="sp-placeholder-color" style="background: {{carIcon.color.nonOperation}}"></div> |
| 60 | </div> | 60 | </div> |
| 61 | </div> | 61 | </div> |
| 62 | </div> | 62 | </div> |
| @@ -68,14 +68,14 @@ | @@ -68,14 +68,14 @@ | ||
| 68 | <div class="color_block"> | 68 | <div class="color_block"> |
| 69 | 上行 | 69 | 上行 |
| 70 | <div class="sp-placeholder"> | 70 | <div class="sp-placeholder"> |
| 71 | - <div class="sp-placeholder-color" data-name="section.color.up" style="background: {{section.color.up}}"></div> | 71 | + <div class="sp-placeholder-color" style="background: {{section.color.up}}"></div> |
| 72 | </div> | 72 | </div> |
| 73 | </div> | 73 | </div> |
| 74 | 74 | ||
| 75 | <div class="color_block"> | 75 | <div class="color_block"> |
| 76 | 下行 | 76 | 下行 |
| 77 | <div class="sp-placeholder"> | 77 | <div class="sp-placeholder"> |
| 78 | - <div class="sp-placeholder-color" data-name="section.color.down" style="background: {{section.color.down}}"></div> | 78 | + <div class="sp-placeholder-color" style="background: {{section.color.down}}"></div> |
| 79 | </div> | 79 | </div> |
| 80 | </div> | 80 | </div> |
| 81 | </div> | 81 | </div> |
src/main/resources/static/real_control_v2/mapmonitor/fragments/map_infowindow.html
| 1 | <div> | 1 | <div> |
| 2 | <script id="map-win-gps-detail-temp" type="text/html"> | 2 | <script id="map-win-gps-detail-temp" type="text/html"> |
| 3 | <div class="gps_info_win"> | 3 | <div class="gps_info_win"> |
| 4 | - <h4>{{nbbm}}</h4> | ||
| 5 | - <h5> | ||
| 6 | - {{lineName}} | ||
| 7 | - ({{if stationName!=null}} | 4 | + <h5 style="color:#0E6AF9;"> |
| 5 | + {{if stationName!=null}} | ||
| 8 | {{stationName}} | 6 | {{stationName}} |
| 9 | {{else}} | 7 | {{else}} |
| 10 | 未知站点 | 8 | 未知站点 |
| 11 | - {{/if}}) | 9 | + {{/if}} |
| 12 | </h5> | 10 | </h5> |
| 11 | + <h4 style="margin: 5px 0 5px 0;"> | ||
| 12 | + <span style="color: #0E6AF9;">{{nbbm}}</span> | ||
| 13 | + </h4> | ||
| 14 | + <p> | ||
| 15 | + 营运状态:{{if state==0}}营运{{else}}非营运{{/if}} | ||
| 16 | + </p> | ||
| 17 | + <p> | ||
| 18 | + 走向:{{if upDown==0}}上行{{else if upDown==1}}下行{{else}}未知走向{{/if}} | ||
| 19 | + </p> | ||
| 13 | <p>速度:{{speed}}</p> | 20 | <p>速度:{{speed}}</p> |
| 14 | - <p>角度:{{direction}}</p> | ||
| 15 | <p>经度:{{lon}}</p> | 21 | <p>经度:{{lon}}</p> |
| 16 | <p>纬度:{{lat}}</p> | 22 | <p>纬度:{{lat}}</p> |
| 17 | 23 | ||
| 18 | - <p class="date-str">{{dateStr}}</p> | 24 | + <!--<p style="color: gray;">{{fromNow}} 更新</p>--> |
| 19 | <hr> | 25 | <hr> |
| 20 | - {{if expectStopTime!=null}} | ||
| 21 | - <a href="javascript:;" style="color: #07D;margin-right: 20px;">预计 {{expectStopTime}} 分钟到达终点</a> | ||
| 22 | - {{/if}} | ||
| 23 | - <a href="javascript:;" style="float: right;">轨迹回放</a> | 26 | + <p> |
| 27 | + {{if currSch!=null}} | ||
| 28 | + 路牌:{{currSch.lpName}} | ||
| 29 | + {{/if}} | ||
| 30 | + </p> | ||
| 31 | + <p class="banci-info"> | ||
| 32 | + {{if currSch!=null}}开往 {{currSch.zdzName}}{{/if}} | ||
| 33 | + </p> | ||
| 34 | + <p class="banci-info"> | ||
| 35 | + {{if nextSch!=null}} | ||
| 36 | + 下一班{{nextSch.qdzName}} {{nextSch.fcsj}} 发车 | ||
| 37 | + {{/if}} | ||
| 38 | + </p> | ||
| 39 | + <a href="javascript:lineGroup.toPlayBack('{{nbbm}}', '{{lineId}}')" class="link_to_pback" | ||
| 40 | + style="color:#006600;font-size:12px;">轨迹回放</a> | ||
| 24 | </div> | 41 | </div> |
| 25 | </script> | 42 | </script> |
| 26 | </div> | 43 | </div> |
src/main/resources/static/real_control_v2/mapmonitor/js/gps_tree.js
| 1 | -var gb_map_gps_tree = (function () { | ||
| 2 | - | ||
| 3 | - | ||
| 4 | - var treeObj; | ||
| 5 | - | ||
| 6 | - var jstreeChanged = function (e, node, event) { | ||
| 7 | - gb_map_overlay_mge.refresh(); | ||
| 8 | - }; | ||
| 9 | - | ||
| 10 | - var init = function (cb) { | ||
| 11 | - //设备树 | ||
| 12 | - var treeData = gb_common.get_device_tree_data(); | ||
| 13 | - treeObj = $('.real_right_gps_panel .gps_tree_list') | ||
| 14 | - //节点初始化完成 | ||
| 15 | - .on('ready.jstree', function () { | ||
| 16 | - treeObj.jstree(true).open_all(); | ||
| 17 | - //删掉tree node a标签的 href值(避免鼠标悬停浏览器出现状态条) | ||
| 18 | - $('.gps_tree_list .jstree-container-ul a.jstree-anchor').removeAttr('href'); | ||
| 19 | - }) | ||
| 20 | - //state插件 状态恢复完成 | ||
| 21 | - .on('state_ready.jstree', function () { | ||
| 22 | - //绑定checkbox状态切换事件 | ||
| 23 | - treeObj.on('check_node.jstree uncheck_node.jstree', jstreeChanged); | ||
| 24 | - cb && cb(); | ||
| 25 | - }) | ||
| 26 | - .on('activate_node.jstree', function (e, n) { | ||
| 27 | - var node = n.node; | ||
| 28 | - if(node.a_attr && node.a_attr.type=='device'){ | ||
| 29 | - var device = node.a_attr.device; | ||
| 30 | - gb_map_overlay_mge._focus(device); | ||
| 31 | - } | ||
| 32 | - }) | ||
| 33 | - .jstree({ | ||
| 34 | - 'core': { | ||
| 35 | - 'data': treeData | ||
| 36 | - }, | ||
| 37 | - 'checkbox': { | ||
| 38 | - 'keep_selected_style': false, | ||
| 39 | - 'whole_node': false, | ||
| 40 | - 'tie_selection': false | ||
| 41 | - }, | ||
| 42 | - 'contextmenu': { | ||
| 43 | - 'items': { | ||
| 44 | - '轨迹回放': { | ||
| 45 | - 'label': '轨迹回放', | ||
| 46 | - 'action': function (data) { | ||
| 47 | - console.log('action', data); | ||
| 48 | - } | ||
| 49 | - }, | ||
| 50 | - '发送指令': { | ||
| 51 | - 'label': '发送指令', | ||
| 52 | - 'action': function (data) { | ||
| 53 | - console.log('action', data); | ||
| 54 | - } | ||
| 55 | - } | ||
| 56 | - } | ||
| 57 | - }, | ||
| 58 | - 'plugins': ['checkbox', 'contextmenu', 'state'] | ||
| 59 | - }); | ||
| 60 | - }; | ||
| 61 | - | ||
| 62 | - return { | ||
| 63 | - init: init, | ||
| 64 | - getChecked: function () { | ||
| 65 | - return treeObj.jstree(true).get_checked(true); | ||
| 66 | - } | ||
| 67 | - }; | 1 | +var gb_map_gps_tree = (function () { |
| 2 | + | ||
| 3 | + | ||
| 4 | + var treeObj; | ||
| 5 | + | ||
| 6 | + var jstreeChanged = function (e, node, event) { | ||
| 7 | + gb_map_overlay_mge.refresh(); | ||
| 8 | + }; | ||
| 9 | + | ||
| 10 | + var init = function (cb) { | ||
| 11 | + //设备树 | ||
| 12 | + var treeData = gb_common.get_device_tree_data(); | ||
| 13 | + treeObj = $('.real_right_gps_panel .gps_tree_list') | ||
| 14 | + //节点初始化完成 | ||
| 15 | + .on('ready.jstree', function () { | ||
| 16 | + treeObj.jstree(true).open_all(); | ||
| 17 | + //删掉tree node a标签的 href值(避免鼠标悬停浏览器出现状态条) | ||
| 18 | + $('.gps_tree_list .jstree-container-ul a.jstree-anchor').removeAttr('href'); | ||
| 19 | + }) | ||
| 20 | + //state插件 状态恢复完成 | ||
| 21 | + .on('state_ready.jstree', function () { | ||
| 22 | + //绑定checkbox状态切换事件 | ||
| 23 | + treeObj.on('check_node.jstree uncheck_node.jstree', jstreeChanged); | ||
| 24 | + cb && cb(); | ||
| 25 | + }) | ||
| 26 | + .on('activate_node.jstree', function (e, n) { | ||
| 27 | + var node = n.node; | ||
| 28 | + if(node.a_attr && node.a_attr.type=='device'){ | ||
| 29 | + var device = node.a_attr.device; | ||
| 30 | + gb_map_overlay_mge._focus(device); | ||
| 31 | + } | ||
| 32 | + }) | ||
| 33 | + .jstree({ | ||
| 34 | + 'core': { | ||
| 35 | + 'data': treeData | ||
| 36 | + }, | ||
| 37 | + 'checkbox': { | ||
| 38 | + 'keep_selected_style': false, | ||
| 39 | + 'whole_node': false, | ||
| 40 | + 'tie_selection': false | ||
| 41 | + }, | ||
| 42 | + 'contextmenu': { | ||
| 43 | + 'items': { | ||
| 44 | + '轨迹回放': { | ||
| 45 | + 'label': '轨迹回放', | ||
| 46 | + 'action': function (data) { | ||
| 47 | + console.log('action', data); | ||
| 48 | + } | ||
| 49 | + }, | ||
| 50 | + '发送指令': { | ||
| 51 | + 'label': '发送指令', | ||
| 52 | + 'action': function (data) { | ||
| 53 | + console.log('action', data); | ||
| 54 | + } | ||
| 55 | + } | ||
| 56 | + } | ||
| 57 | + }, | ||
| 58 | + 'plugins': ['checkbox', 'contextmenu', 'state'] | ||
| 59 | + }); | ||
| 60 | + }; | ||
| 61 | + | ||
| 62 | + return { | ||
| 63 | + init: init, | ||
| 64 | + getChecked: function () { | ||
| 65 | + return treeObj.jstree(true).get_checked(true); | ||
| 66 | + } | ||
| 67 | + }; | ||
| 68 | })(); | 68 | })(); |
| 69 | \ No newline at end of file | 69 | \ No newline at end of file |