Commit 25f3363e58c822a6b288860436bb927272eff727
Committed by
娄高锋
1 parent
dcdeceff
油量、电量表中添加线路字段
新增路单数据表 按线路查询 修改了油量、电量查询中的日期查询条件
Showing
23 changed files
with
874 additions
and
65 deletions
src/main/java/com/bsth/controller/oil/DlbController.java
| @@ -152,7 +152,11 @@ public class DlbController extends BaseController<Dlb, Integer>{ | @@ -152,7 +152,11 @@ public class DlbController extends BaseController<Dlb, Integer>{ | ||
| 152 | m.put("rq", y.getRq()); | 152 | m.put("rq", y.getRq()); |
| 153 | m.put("gsname",y.getGsname() ); | 153 | m.put("gsname",y.getGsname() ); |
| 154 | m.put("fgsname", y.getFgsname()); | 154 | m.put("fgsname", y.getFgsname()); |
| 155 | - m.put("xlname", y.getXlname()); | 155 | + if(y.getLinename()==null){ |
| 156 | + m.put("xlname", y.getXlname()==null?"":y.getXlname()); | ||
| 157 | + }else{ | ||
| 158 | + m.put("xlname", y.getLinename()); | ||
| 159 | + } | ||
| 156 | m.put("nbbm", y.getNbbm()); | 160 | m.put("nbbm", y.getNbbm()); |
| 157 | m.put("jsy", y.getJsy()); | 161 | m.put("jsy", y.getJsy()); |
| 158 | m.put("name", y.getName()); | 162 | m.put("name", y.getName()); |
src/main/java/com/bsth/controller/oil/YlbController.java
| @@ -255,7 +255,11 @@ public class YlbController extends BaseController<Ylb, Integer>{ | @@ -255,7 +255,11 @@ public class YlbController extends BaseController<Ylb, Integer>{ | ||
| 255 | m.put("rq", sdfMonth.format(y.getRq())); | 255 | m.put("rq", sdfMonth.format(y.getRq())); |
| 256 | m.put("gsname",y.getGsname() ); | 256 | m.put("gsname",y.getGsname() ); |
| 257 | m.put("fgsname", y.getFgsname()); | 257 | m.put("fgsname", y.getFgsname()); |
| 258 | - m.put("xlname", y.getXlname()==null?"":y.getXlname()); | 258 | + if(y.getLinename()==null){ |
| 259 | + m.put("xlname", y.getXlname()==null?"":y.getXlname()); | ||
| 260 | + }else{ | ||
| 261 | + m.put("xlname", y.getLinename()); | ||
| 262 | + } | ||
| 259 | m.put("nbbm", y.getNbbm()); | 263 | m.put("nbbm", y.getNbbm()); |
| 260 | m.put("jsy", y.getJsy()); | 264 | m.put("jsy", y.getJsy()); |
| 261 | m.put("name", y.getName()); | 265 | m.put("name", y.getName()); |
src/main/java/com/bsth/controller/report/ReportController.java
| @@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject; | @@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject; | ||
| 19 | import com.bsth.data.BasicData; | 19 | import com.bsth.data.BasicData; |
| 20 | import com.bsth.entity.StationRoute; | 20 | import com.bsth.entity.StationRoute; |
| 21 | import com.bsth.entity.excep.ArrivalInfo; | 21 | import com.bsth.entity.excep.ArrivalInfo; |
| 22 | +import com.bsth.entity.mcy_forms.Singledata; | ||
| 22 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 23 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 23 | import com.bsth.service.report.ReportService; | 24 | import com.bsth.service.report.ReportService; |
| 24 | import com.bsth.util.ReportUtils; | 25 | import com.bsth.util.ReportUtils; |
| @@ -357,10 +358,17 @@ public class ReportController { | @@ -357,10 +358,17 @@ public class ReportController { | ||
| 357 | 358 | ||
| 358 | return lMap; | 359 | return lMap; |
| 359 | } | 360 | } |
| 360 | - | ||
| 361 | - | ||
| 362 | @RequestMapping(value="/online") | 361 | @RequestMapping(value="/online") |
| 363 | public Map<String, Object> online(@RequestParam Map<String, Object> map){ | 362 | public Map<String, Object> online(@RequestParam Map<String, Object> map){ |
| 364 | return service.online(map); | 363 | return service.online(map); |
| 365 | } | 364 | } |
| 365 | + | ||
| 366 | + | ||
| 367 | + | ||
| 368 | + @RequestMapping(value = "/singledatatj", method = RequestMethod.GET) | ||
| 369 | + public List<Singledata> singledatatj(@RequestParam Map<String, Object> map) { | ||
| 370 | + | ||
| 371 | + return service.singledatatj(map); | ||
| 372 | + } | ||
| 373 | + | ||
| 366 | } | 374 | } |
src/main/java/com/bsth/data/BasicData.java
| @@ -55,6 +55,7 @@ public class BasicData { | @@ -55,6 +55,7 @@ public class BasicData { | ||
| 55 | //线路编码和名称对照 | 55 | //线路编码和名称对照 |
| 56 | public static Map<String, String> lineCode2NameMap; | 56 | public static Map<String, String> lineCode2NameMap; |
| 57 | 57 | ||
| 58 | + public static Map<String, String> lineCodeAllNameMap; | ||
| 58 | //停车场 | 59 | //停车场 |
| 59 | public static List<String> parkCodeList; | 60 | public static List<String> parkCodeList; |
| 60 | 61 | ||
| @@ -315,6 +316,14 @@ public class BasicData { | @@ -315,6 +316,14 @@ public class BasicData { | ||
| 315 | lineId2ShangHaiCodeMap = id2SHcode; | 316 | lineId2ShangHaiCodeMap = id2SHcode; |
| 316 | lineCode2ShangHaiCodeMap = code2SHcode; | 317 | lineCode2ShangHaiCodeMap = code2SHcode; |
| 317 | stationName2YgcNumber = tempStationName2YgcNumber; | 318 | stationName2YgcNumber = tempStationName2YgcNumber; |
| 319 | + | ||
| 320 | + Map<String, String> code2nameAll = new HashMap<>(); | ||
| 321 | + Iterator<Line> iteratorAll = lineRepository.findAll().iterator(); | ||
| 322 | + while (iteratorAll.hasNext()) { | ||
| 323 | + line = iteratorAll.next(); | ||
| 324 | + code2nameAll.put(line.getLineCode(), line.getName()); | ||
| 325 | + } | ||
| 326 | + lineCodeAllNameMap=code2nameAll; | ||
| 318 | } | 327 | } |
| 319 | 328 | ||
| 320 | /** | 329 | /** |
src/main/java/com/bsth/entity/oil/Dlb.java
| @@ -22,6 +22,7 @@ public class Dlb { | @@ -22,6 +22,7 @@ public class Dlb { | ||
| 22 | @DateTimeFormat(pattern="yyyy-MM-dd") | 22 | @DateTimeFormat(pattern="yyyy-MM-dd") |
| 23 | private Date rq; | 23 | private Date rq; |
| 24 | private String xlbm; | 24 | private String xlbm; |
| 25 | + private String linename; | ||
| 25 | private String ssgsdm; | 26 | private String ssgsdm; |
| 26 | private String fgsdm; | 27 | private String fgsdm; |
| 27 | private String nbbm; | 28 | private String nbbm; |
| @@ -102,6 +103,14 @@ public class Dlb { | @@ -102,6 +103,14 @@ public class Dlb { | ||
| 102 | this.xlbm = xlbm; | 103 | this.xlbm = xlbm; |
| 103 | } | 104 | } |
| 104 | 105 | ||
| 106 | + public String getLinename() { | ||
| 107 | + return linename; | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + public void setLinename(String linename) { | ||
| 111 | + this.linename = linename; | ||
| 112 | + } | ||
| 113 | + | ||
| 105 | public String getSsgsdm() { | 114 | public String getSsgsdm() { |
| 106 | return ssgsdm; | 115 | return ssgsdm; |
| 107 | } | 116 | } |
| @@ -348,7 +357,7 @@ public class Dlb { | @@ -348,7 +357,7 @@ public class Dlb { | ||
| 348 | } | 357 | } |
| 349 | 358 | ||
| 350 | public String getXlname() { | 359 | public String getXlname() { |
| 351 | - return BasicData.lineCode2NameMap.get(this.xlbm); | 360 | + return BasicData.lineCodeAllNameMap.get(this.xlbm); |
| 352 | } | 361 | } |
| 353 | 362 | ||
| 354 | public void setXlname(String xlname) { | 363 | public void setXlname(String xlname) { |
src/main/java/com/bsth/entity/oil/Ylb.java
| @@ -22,6 +22,7 @@ public class Ylb { | @@ -22,6 +22,7 @@ public class Ylb { | ||
| 22 | @DateTimeFormat(pattern="yyyy-MM-dd") | 22 | @DateTimeFormat(pattern="yyyy-MM-dd") |
| 23 | private Date rq; | 23 | private Date rq; |
| 24 | private String xlbm; | 24 | private String xlbm; |
| 25 | + private String linename; | ||
| 25 | private String ssgsdm; | 26 | private String ssgsdm; |
| 26 | private String fgsdm; | 27 | private String fgsdm; |
| 27 | private String nbbm; | 28 | private String nbbm; |
| @@ -95,6 +96,15 @@ public class Ylb { | @@ -95,6 +96,15 @@ public class Ylb { | ||
| 95 | public void setXlbm(String xlbm) { | 96 | public void setXlbm(String xlbm) { |
| 96 | this.xlbm = xlbm; | 97 | this.xlbm = xlbm; |
| 97 | } | 98 | } |
| 99 | + | ||
| 100 | + public String getLinename() { | ||
| 101 | + return linename; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public void setLinename(String linename) { | ||
| 105 | + this.linename = linename; | ||
| 106 | + } | ||
| 107 | + | ||
| 98 | public String getSsgsdm() { | 108 | public String getSsgsdm() { |
| 99 | return ssgsdm; | 109 | return ssgsdm; |
| 100 | } | 110 | } |
| @@ -292,7 +302,7 @@ public class Ylb { | @@ -292,7 +302,7 @@ public class Ylb { | ||
| 292 | } | 302 | } |
| 293 | 303 | ||
| 294 | public String getXlname() { | 304 | public String getXlname() { |
| 295 | - return BasicData.lineCode2NameMap.get(this.xlbm); | 305 | + return BasicData.lineCodeAllNameMap.get(this.xlbm); |
| 296 | } | 306 | } |
| 297 | 307 | ||
| 298 | public void setXlname(String xlname) { | 308 | public void setXlname(String xlname) { |
src/main/java/com/bsth/repository/LineRepository.java
| @@ -51,6 +51,8 @@ public interface LineRepository extends BaseRepository<Line, Integer> { | @@ -51,6 +51,8 @@ public interface LineRepository extends BaseRepository<Line, Integer> { | ||
| 51 | @Query("SELECT L FROM Line L where L.destroy=0 and L.remove !=1") | 51 | @Query("SELECT L FROM Line L where L.destroy=0 and L.remove !=1") |
| 52 | List<Line> findAllService(); | 52 | List<Line> findAllService(); |
| 53 | 53 | ||
| 54 | + @Query("SELECT L FROM Line L") | ||
| 55 | + List<Line> findAll(); | ||
| 54 | 56 | ||
| 55 | @Modifying | 57 | @Modifying |
| 56 | @Query(value = "UPDATE Line l set l.name=?1 , l.company=?2, l.brancheCompany=?3, " | 58 | @Query(value = "UPDATE Line l set l.name=?1 , l.company=?2, l.brancheCompany=?3, " |
src/main/java/com/bsth/repository/oil/CwjyRepository.java
| @@ -22,8 +22,8 @@ public interface CwjyRepository extends BaseRepository<Cwjy, Integer>{ | @@ -22,8 +22,8 @@ public interface CwjyRepository extends BaseRepository<Cwjy, Integer>{ | ||
| 22 | */ | 22 | */ |
| 23 | @Query(value="SELECT a.gsdm as gsdm,a.nbbm as nbbm,b.jsy as jsy,b.jzl as jzl ,b.stationid as stationid," | 23 | @Query(value="SELECT a.gsdm as gsdm,a.nbbm as nbbm,b.jsy as jsy,b.jzl as jzl ,b.stationid as stationid," |
| 24 | + "b.nylx as nylx,b.yj as yj,b.bz as bz,c.jsy as ldgh FROM bsth_c_cwjy a "+ | 24 | + "b.nylx as nylx,b.yj as yj,b.bz as bz,c.jsy as ldgh FROM bsth_c_cwjy a "+ |
| 25 | - " left join ( select * from bsth_c_ylxxb b where to_days(b.yyrq)=to_days(?1) and jylx=1) b " + | ||
| 26 | - " on a.nbbm=b.nbbm left join (select nbbm,group_concat(jsy) as jsy from bsth_c_ylb where to_days(rq)= to_days(?1 ) group by nbbm "+ | 25 | + " left join ( select * from bsth_c_ylxxb b where b.yyrq=?1 and jylx=1) b " + |
| 26 | + " on a.nbbm=b.nbbm left join (select nbbm,group_concat(jsy) as jsy from bsth_c_ylb where rq= ?1 group by nbbm "+ | ||
| 27 | " ) c on a.nbbm=c.nbbm where a.nbbm like %?2% ",nativeQuery=true) | 27 | " ) c on a.nbbm=c.nbbm where a.nbbm like %?2% ",nativeQuery=true) |
| 28 | List<Object[]> obtainCwjycl(String rq,String nbbm); | 28 | List<Object[]> obtainCwjycl(String rq,String nbbm); |
| 29 | 29 |
src/main/java/com/bsth/repository/oil/DlbRepository.java
| @@ -28,13 +28,13 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | @@ -28,13 +28,13 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | ||
| 28 | * @param rq | 28 | * @param rq |
| 29 | * @return | 29 | * @return |
| 30 | */ | 30 | */ |
| 31 | - @Query(value="SELECT * FROM bsth_c_dlb where to_days(?1)=to_days(rq) and ssgsdm like %?2% " | 31 | + @Query(value="SELECT * FROM bsth_c_dlb where rq=?1 and ssgsdm like %?2% " |
| 32 | + " and fgsdm like %?3%" | 32 | + " and fgsdm like %?3%" |
| 33 | + " and xlbm like %?4% and nbbm like %?5% order by ?6 asc",nativeQuery=true) | 33 | + " and xlbm like %?4% and nbbm like %?5% order by ?6 asc",nativeQuery=true) |
| 34 | List<Dlb> obtainDl(String rq,String gsbm,String fgsdm,String xlbm,String nbbm,String px); | 34 | List<Dlb> obtainDl(String rq,String gsbm,String fgsdm,String xlbm,String nbbm,String px); |
| 35 | 35 | ||
| 36 | @Query(value="select s from Dlb s " | 36 | @Query(value="select s from Dlb s " |
| 37 | - + " where to_days(?1)=to_days(s.rq) " | 37 | + + " where to_days(s.rq)=to_days(?1) " |
| 38 | + " and s.ssgsdm like %?2% " | 38 | + " and s.ssgsdm like %?2% " |
| 39 | + " and s.fgsdm like %?3%" | 39 | + " and s.fgsdm like %?3%" |
| 40 | + " and s.xlbm like %?4% " | 40 | + " and s.xlbm like %?4% " |
| @@ -49,14 +49,14 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | @@ -49,14 +49,14 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | ||
| 49 | * @param xlbm | 49 | * @param xlbm |
| 50 | * @return | 50 | * @return |
| 51 | */ | 51 | */ |
| 52 | - @Query(value="select nbbm,count(nbbm) from bsth_c_dlb where to_days(?1)=to_days(rq) and " | 52 | + @Query(value="select nbbm,count(nbbm) from bsth_c_dlb where rq=?1 and " |
| 53 | + " ssgsdm like %?2% " | 53 | + " ssgsdm like %?2% " |
| 54 | + " and fgsdm like %?3%" | 54 | + " and fgsdm like %?3%" |
| 55 | + " and xlbm like %?4% and nbbm like %?5% " | 55 | + " and xlbm like %?4% and nbbm like %?5% " |
| 56 | + " group by nbbm,rq,ssgsdm,fgsdm",nativeQuery=true) | 56 | + " group by nbbm,rq,ssgsdm,fgsdm",nativeQuery=true) |
| 57 | List<Object[]> checkNbmmNum(String rq, String gsbm,String fgsbm,String xlbm,String nbbm); | 57 | List<Object[]> checkNbmmNum(String rq, String gsbm,String fgsbm,String xlbm,String nbbm); |
| 58 | 58 | ||
| 59 | - @Query(value="select nbbm,sum(cdl*100) as cdl ,sum(zlc*100) as zlc from bsth_c_dlb where to_days(?1)=to_days(rq) and " | 59 | + @Query(value="select nbbm,sum(cdl*100) as cdl ,sum(zlc*100) as zlc from bsth_c_dlb where rq= ?1 and " |
| 60 | + " ssgsdm like %?2% " | 60 | + " ssgsdm like %?2% " |
| 61 | + " and fgsdm like %?3%" | 61 | + " and fgsdm like %?3%" |
| 62 | + " and xlbm like %?4% and nbbm like %?5% " | 62 | + " and xlbm like %?4% and nbbm like %?5% " |
| @@ -66,7 +66,7 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | @@ -66,7 +66,7 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | ||
| 66 | 66 | ||
| 67 | 67 | ||
| 68 | @Query(value="select cdl,hd,sh from Dlb s " | 68 | @Query(value="select cdl,hd,sh from Dlb s " |
| 69 | - + " where to_days(?1)=to_days(s.rq) " | 69 | + + " where to_days(s.rq)=to_days(?1) " |
| 70 | + " and s.ssgsdm like %?2% " | 70 | + " and s.ssgsdm like %?2% " |
| 71 | + " and s.fgsdm like %?3%" | 71 | + " and s.fgsdm like %?3%" |
| 72 | + " and s.xlbm like %?4% " | 72 | + " and s.xlbm like %?4% " |
| @@ -74,7 +74,7 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | @@ -74,7 +74,7 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | ||
| 74 | List<Object[]> sumDlb(String rq, String gsbm,String fgsbm,String xlbm,List<String> listNbbm); | 74 | List<Object[]> sumDlb(String rq, String gsbm,String fgsbm,String xlbm,List<String> listNbbm); |
| 75 | 75 | ||
| 76 | @Query(value="select ifnull(cdl,0),ifnull(hd,0),ifnull(sh,0) from bsth_c_dlb " | 76 | @Query(value="select ifnull(cdl,0),ifnull(hd,0),ifnull(sh,0) from bsth_c_dlb " |
| 77 | - + " where to_days(?1)=to_days(rq) " | 77 | + + " where rq=?1 " |
| 78 | + " and ssgsdm like %?2% " | 78 | + " and ssgsdm like %?2% " |
| 79 | + " and fgsdm like %?3%" | 79 | + " and fgsdm like %?3%" |
| 80 | + " and xlbm like %?4% " | 80 | + " and xlbm like %?4% " |
| @@ -93,10 +93,10 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | @@ -93,10 +93,10 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | ||
| 93 | " WHERE id = ?1", nativeQuery=true) | 93 | " WHERE id = ?1", nativeQuery=true) |
| 94 | public void dlbUpdate(Integer id,double czcd,double jzcd,double hd, double sh,String shyy,int yhlx); | 94 | public void dlbUpdate(Integer id,double czcd,double jzcd,double hd, double sh,String shyy,int yhlx); |
| 95 | 95 | ||
| 96 | - @Query(value="SELECT * FROM bsth_c_dlb where to_days(?1)=to_days(rq) and nbbm =?2 and jsy=?3 and xlbm=?4",nativeQuery=true) | 96 | + @Query(value="SELECT * FROM bsth_c_dlb where rq=?1 and nbbm =?2 and jsy=?3 and xlbm=?4",nativeQuery=true) |
| 97 | List<Dlb> queryListDlb(String rq,String nbbm,String jgh,String xlbm); | 97 | List<Dlb> queryListDlb(String rq,String nbbm,String jgh,String xlbm); |
| 98 | 98 | ||
| 99 | - @Query(value="SELECT * FROM bsth_c_dlb where to_days(?1)=to_days(rq) and xlbm=?2",nativeQuery=true) | 99 | + @Query(value="SELECT * FROM bsth_c_dlb where rq=?1 and xlbm=?2",nativeQuery=true) |
| 100 | List<Dlb> queryDlbByRqXlbm(String rq, String xlbm); | 100 | List<Dlb> queryDlbByRqXlbm(String rq, String xlbm); |
| 101 | 101 | ||
| 102 | } | 102 | } |
src/main/java/com/bsth/repository/oil/LsylbRepository.java
| @@ -22,7 +22,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | @@ -22,7 +22,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | ||
| 22 | * @param xlbm | 22 | * @param xlbm |
| 23 | * @return | 23 | * @return |
| 24 | */ | 24 | */ |
| 25 | - @Query(value="select nbbm,count(nbbm) from bsth_ls_ylb where to_days(?1)=to_days(rq) and " | 25 | + @Query(value="select nbbm,count(nbbm) from bsth_ls_ylb where rq=?1 and " |
| 26 | + " ssgsdm like %?2% " | 26 | + " ssgsdm like %?2% " |
| 27 | + " and fgsdm like %?3%" | 27 | + " and fgsdm like %?3%" |
| 28 | + " and xlbm like %?4% and nbbm like %?5% and nylx= ?6 " | 28 | + " and xlbm like %?4% and nbbm like %?5% and nylx= ?6 " |
| @@ -30,7 +30,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | @@ -30,7 +30,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | ||
| 30 | List<Object[]> checkNbmmNum(String rq, String gsbm,String fgsbm,String xlbm,String nbbm,int nylx); | 30 | List<Object[]> checkNbmmNum(String rq, String gsbm,String fgsbm,String xlbm,String nbbm,int nylx); |
| 31 | 31 | ||
| 32 | @Query(value="select s from Lsylb s " | 32 | @Query(value="select s from Lsylb s " |
| 33 | - + " where to_days(?1)=to_days(s.rq) " | 33 | + + " where to_days(s.rq)=to_days(?1) " |
| 34 | + " and s.ssgsdm =?2 " | 34 | + " and s.ssgsdm =?2 " |
| 35 | + " and s.fgsdm =?3 " | 35 | + " and s.fgsdm =?3 " |
| 36 | + " and s.xlbm like %?4% " | 36 | + " and s.xlbm like %?4% " |
| @@ -38,7 +38,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | @@ -38,7 +38,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | ||
| 38 | + " and s.nbbm in ?6 order by nbbm,jhsj") | 38 | + " and s.nbbm in ?6 order by nbbm,jhsj") |
| 39 | List<Lsylb> listYlb(String rq, String gsbm,String fgsbm,String xlbm,int nylx,List<String> listNbbm); | 39 | List<Lsylb> listYlb(String rq, String gsbm,String fgsbm,String xlbm,int nylx,List<String> listNbbm); |
| 40 | 40 | ||
| 41 | - @Query(value="select nbbm,sum(jzl*100) as jzl ,sum(zlc*100) as zlc from bsth_ls_ylb where to_days(?1)=to_days(rq) and " | 41 | + @Query(value="select nbbm,sum(jzl*100) as jzl ,sum(zlc*100) as zlc from bsth_ls_ylb where rq=?1 and " |
| 42 | + " ssgsdm like %?2% " | 42 | + " ssgsdm like %?2% " |
| 43 | + " and fgsdm like %?3%" | 43 | + " and fgsdm like %?3%" |
| 44 | + " and xlbm like %?4% and nbbm like %?5% and nylx =?6 " | 44 | + " and xlbm like %?4% and nbbm like %?5% and nylx =?6 " |
| @@ -47,7 +47,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | @@ -47,7 +47,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | ||
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | @Query(value="select ifnull(jzl,0),ifnull(yh,0),ifnull(sh,0) from bsth_ls_ylb " | 49 | @Query(value="select ifnull(jzl,0),ifnull(yh,0),ifnull(sh,0) from bsth_ls_ylb " |
| 50 | - + " where to_days(?1)=to_days(rq) " | 50 | + + " where rq=?1 " |
| 51 | + " and ssgsdm like %?2% " | 51 | + " and ssgsdm like %?2% " |
| 52 | + " and fgsdm like %?3%" | 52 | + " and fgsdm like %?3%" |
| 53 | + " and xlbm like %?4% " | 53 | + " and xlbm like %?4% " |
| @@ -57,7 +57,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | @@ -57,7 +57,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | ||
| 57 | 57 | ||
| 58 | 58 | ||
| 59 | @Query(value="select jzl,yh,sh from Lsylb s " | 59 | @Query(value="select jzl,yh,sh from Lsylb s " |
| 60 | - + " where to_days(?1)=to_days(s.rq) " | 60 | + + " where to_days(s.rq)=to_days(?1) " |
| 61 | + " and s.ssgsdm like %?2% " | 61 | + " and s.ssgsdm like %?2% " |
| 62 | + " and s.fgsdm like %?3%" | 62 | + " and s.fgsdm like %?3%" |
| 63 | + " and s.xlbm like %?4% " | 63 | + " and s.xlbm like %?4% " |
src/main/java/com/bsth/repository/oil/YlbRepository.java
| @@ -33,7 +33,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -33,7 +33,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 33 | @Query(value="select y.* from (select max(d.id) as id ,d.nbbm from (" | 33 | @Query(value="select y.* from (select max(d.id) as id ,d.nbbm from (" |
| 34 | + " select b.rq,b.nbbm,max(b.jcsx) as jcsx from (" | 34 | + " select b.rq,b.nbbm,max(b.jcsx) as jcsx from (" |
| 35 | + " select max(t.rq) as rq ,t.nbbm from bsth_c_ylb t " | 35 | + " select max(t.rq) as rq ,t.nbbm from bsth_c_ylb t " |
| 36 | - + " where to_days(t.rq)< to_days(?1) " | 36 | + + " where t.rq< ?1 " |
| 37 | + " and t.ssgsdm like %?2% and t.fgsdm like %?3% " | 37 | + " and t.ssgsdm like %?2% and t.fgsdm like %?3% " |
| 38 | + " and t.xlbm like %?4% and t.nbbm like %?5% group by nbbm ) a " | 38 | + " and t.xlbm like %?4% and t.nbbm like %?5% group by nbbm ) a " |
| 39 | + " left join bsth_c_ylb b on a.rq=b.rq and a.nbbm=b.nbbm " | 39 | + " left join bsth_c_ylb b on a.rq=b.rq and a.nbbm=b.nbbm " |
| @@ -63,29 +63,29 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -63,29 +63,29 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 63 | * @param rq | 63 | * @param rq |
| 64 | * @return | 64 | * @return |
| 65 | */ | 65 | */ |
| 66 | - @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and ssgsdm like %?2% " | 66 | + @Query(value="SELECT * FROM bsth_c_ylb where rq=?1 and ssgsdm like %?2% " |
| 67 | + " and fgsdm like %?3%" | 67 | + " and fgsdm like %?3%" |
| 68 | + " and xlbm like %?4% and nbbm like %?5% order by ?6 asc ",nativeQuery=true) | 68 | + " and xlbm like %?4% and nbbm like %?5% order by ?6 asc ",nativeQuery=true) |
| 69 | List<Ylb> obtainYl(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); | 69 | List<Ylb> obtainYl(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); |
| 70 | 70 | ||
| 71 | - @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and ssgsdm like %?2% " | 71 | + @Query(value="SELECT * FROM bsth_c_ylb where rq=?1 and ssgsdm like %?2% " |
| 72 | + " and fgsdm like %?3%" | 72 | + " and fgsdm like %?3%" |
| 73 | + " and xlbm = ?4 and nbbm like %?5% order by ?6 asc ",nativeQuery=true) | 73 | + " and xlbm = ?4 and nbbm like %?5% order by ?6 asc ",nativeQuery=true) |
| 74 | List<Ylb> obtainYlEq(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); | 74 | List<Ylb> obtainYlEq(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); |
| 75 | 75 | ||
| 76 | - @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and ssgsdm like %?2% " | 76 | + @Query(value="SELECT * FROM bsth_c_ylb where rq=?1 and ssgsdm like %?2% " |
| 77 | + " and fgsdm like %?3%" | 77 | + " and fgsdm like %?3%" |
| 78 | + " and xlbm = ?4 and nbbm like %?5% order by ?6 asc ",nativeQuery=true) | 78 | + " and xlbm = ?4 and nbbm like %?5% order by ?6 asc ",nativeQuery=true) |
| 79 | List<Ylb> obtainYl_eq(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); | 79 | List<Ylb> obtainYl_eq(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); |
| 80 | 80 | ||
| 81 | 81 | ||
| 82 | - @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and nbbm =?2 and jsy=?3 and xlbm=?4",nativeQuery=true) | 82 | + @Query(value="SELECT * FROM bsth_c_ylb where rq=?1 and nbbm =?2 and jsy=?3 and xlbm=?4",nativeQuery=true) |
| 83 | List<Ylb> queryListYlb(String rq,String nbbm,String jgh,String xlbm); | 83 | List<Ylb> queryListYlb(String rq,String nbbm,String jgh,String xlbm); |
| 84 | 84 | ||
| 85 | - @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and xlbm=?2",nativeQuery=true) | 85 | + @Query(value="SELECT * FROM bsth_c_ylb where rq=?1 and xlbm=?2",nativeQuery=true) |
| 86 | List<Ylb> queryYlbByRqXlbm(String rq,String xlbm); | 86 | List<Ylb> queryYlbByRqXlbm(String rq,String xlbm); |
| 87 | 87 | ||
| 88 | - @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and nbbm =?2 and jsy=?3 and xlbm=?4 order by ?5 asc",nativeQuery=true) | 88 | + @Query(value="SELECT * FROM bsth_c_ylb where rq=?1 and nbbm =?2 and jsy=?3 and xlbm=?4 order by ?5 asc",nativeQuery=true) |
| 89 | List<Ylb> checkYlb(String rq,String nbbm,String jgh,String xlbm,String px); | 89 | List<Ylb> checkYlb(String rq,String nbbm,String jgh,String xlbm,String px); |
| 90 | /** | 90 | /** |
| 91 | * 查询当天总的加注量和总里程 | 91 | * 查询当天总的加注量和总里程 |
| @@ -102,7 +102,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -102,7 +102,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 102 | * @param xlbm | 102 | * @param xlbm |
| 103 | * @return | 103 | * @return |
| 104 | */ | 104 | */ |
| 105 | - @Query(value="select nbbm,count(nbbm) from bsth_c_ylb where to_days(?1)=to_days(rq) and " | 105 | + @Query(value="select nbbm,count(nbbm) from bsth_c_ylb where rq=?1 and " |
| 106 | + " ssgsdm like %?2% " | 106 | + " ssgsdm like %?2% " |
| 107 | + " and fgsdm like %?3%" | 107 | + " and fgsdm like %?3%" |
| 108 | + " and xlbm like %?4% and nbbm like %?5% " | 108 | + " and xlbm like %?4% and nbbm like %?5% " |
| @@ -117,7 +117,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -117,7 +117,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 117 | * @param xlbm | 117 | * @param xlbm |
| 118 | * @return | 118 | * @return |
| 119 | */ | 119 | */ |
| 120 | - @Query(value="select nbbm,sum(jzl*100) as jzl ,sum(zlc*100) as zlc from bsth_c_ylb where to_days(?1)=to_days(rq) and " | 120 | + @Query(value="select nbbm,sum(jzl*100) as jzl ,sum(zlc*100) as zlc from bsth_c_ylb where rq=?1 and " |
| 121 | + " ssgsdm like %?2% " | 121 | + " ssgsdm like %?2% " |
| 122 | + " and fgsdm like %?3%" | 122 | + " and fgsdm like %?3%" |
| 123 | + " and xlbm like %?4% and nbbm like %?5% " | 123 | + " and xlbm like %?4% and nbbm like %?5% " |
| @@ -126,7 +126,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -126,7 +126,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 126 | 126 | ||
| 127 | 127 | ||
| 128 | @Query(value="select jzl,yh,sh from Ylb s " | 128 | @Query(value="select jzl,yh,sh from Ylb s " |
| 129 | - + " where to_days(?1)=to_days(s.rq) " | 129 | + + " where to_days(s.rq)=to_days(?1) " |
| 130 | + " and s.ssgsdm like %?2% " | 130 | + " and s.ssgsdm like %?2% " |
| 131 | + " and s.fgsdm like %?3%" | 131 | + " and s.fgsdm like %?3%" |
| 132 | + " and s.xlbm like %?4% " | 132 | + " and s.xlbm like %?4% " |
| @@ -134,7 +134,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -134,7 +134,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 134 | List<Object[]> sumYlb(String rq, String gsbm,String fgsbm,String xlbm,List<String> listNbbm); | 134 | List<Object[]> sumYlb(String rq, String gsbm,String fgsbm,String xlbm,List<String> listNbbm); |
| 135 | 135 | ||
| 136 | @Query(value="select ifnull(jzl,0),ifnull(yh,0),ifnull(sh,0) from bsth_c_ylb " | 136 | @Query(value="select ifnull(jzl,0),ifnull(yh,0),ifnull(sh,0) from bsth_c_ylb " |
| 137 | - + " where to_days(?1)=to_days(rq) " | 137 | + + " where rq=?1 " |
| 138 | + " and ssgsdm like %?2% " | 138 | + " and ssgsdm like %?2% " |
| 139 | + " and fgsdm like %?3%" | 139 | + " and fgsdm like %?3%" |
| 140 | + " and xlbm like %?4% " | 140 | + " and xlbm like %?4% " |
| @@ -144,7 +144,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -144,7 +144,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 144 | 144 | ||
| 145 | 145 | ||
| 146 | @Query(value="select s from Ylb s " | 146 | @Query(value="select s from Ylb s " |
| 147 | - + " where to_days(?1)=to_days(s.rq) " | 147 | + + " where to_days(s.rq)=to_days(?1) " |
| 148 | + " and s.ssgsdm =?2 " | 148 | + " and s.ssgsdm =?2 " |
| 149 | + " and s.fgsdm =?3 " | 149 | + " and s.fgsdm =?3 " |
| 150 | + " and s.xlbm like %?4% " | 150 | + " and s.xlbm like %?4% " |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| @@ -1729,7 +1729,7 @@ public class FormsServiceImpl implements FormsService { | @@ -1729,7 +1729,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 1729 | startDate = map.get("startDate").toString(); | 1729 | startDate = map.get("startDate").toString(); |
| 1730 | 1730 | ||
| 1731 | String sql="select r.s_gh,r.s_name, " | 1731 | String sql="select r.s_gh,r.s_name, " |
| 1732 | - + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm" | 1732 | + + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm,xl_name" |
| 1733 | + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+startDate+"'"; | 1733 | + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+startDate+"'"; |
| 1734 | if(!xlbm.equals("")){ | 1734 | if(!xlbm.equals("")){ |
| 1735 | sql += " and r.xl_bm = '"+xlbm+"'"; | 1735 | sql += " and r.xl_bm = '"+xlbm+"'"; |
| @@ -1741,7 +1741,7 @@ public class FormsServiceImpl implements FormsService { | @@ -1741,7 +1741,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 1741 | sql += " and r.fgs_bm='"+fgsdm+"'"; | 1741 | sql += " and r.fgs_bm='"+fgsdm+"'"; |
| 1742 | } | 1742 | } |
| 1743 | sql += " group by r.s_gh,r.s_name," | 1743 | sql += " group by r.s_gh,r.s_name," |
| 1744 | - + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | 1744 | + + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm,xl_name order by r.xl_bm,r.cl_zbh"; |
| 1745 | 1745 | ||
| 1746 | List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | 1746 | List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 1747 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 1747 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| @@ -1755,6 +1755,7 @@ public class FormsServiceImpl implements FormsService { | @@ -1755,6 +1755,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 1755 | sin.setjName(arg0.getString("j_name")); | 1755 | sin.setjName(arg0.getString("j_name")); |
| 1756 | sin.setSgh(arg0.getString("s_gh")); | 1756 | sin.setSgh(arg0.getString("s_gh")); |
| 1757 | sin.setsName(arg0.getString("s_name")); | 1757 | sin.setsName(arg0.getString("s_name")); |
| 1758 | + sin.setXlmc(arg0.getString("xl_name")); | ||
| 1758 | sin.setgS(BasicData.businessFgsCodeNameMap.get(arg0.getString("fgs_bm")+"_"+arg0.getString("gs_bm"))); | 1759 | sin.setgS(BasicData.businessFgsCodeNameMap.get(arg0.getString("fgs_bm")+"_"+arg0.getString("gs_bm"))); |
| 1759 | 1760 | ||
| 1760 | return sin; | 1761 | return sin; |
| @@ -1772,7 +1773,7 @@ public class FormsServiceImpl implements FormsService { | @@ -1772,7 +1773,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 1772 | String clzbh=sin.getClzbh(); | 1773 | String clzbh=sin.getClzbh(); |
| 1773 | String xl=sin.getxL(); | 1774 | String xl=sin.getxL(); |
| 1774 | String spy=sin.getSgh(); | 1775 | String spy=sin.getSgh(); |
| 1775 | - sin.setxL(BasicData.lineCode2NameMap.get(xl)); | 1776 | + sin.setxL(sin.getXlmc()); |
| 1776 | for (int j = 0; j < listReal.size(); j++) { | 1777 | for (int j = 0; j < listReal.size(); j++) { |
| 1777 | ScheduleRealInfo s=listReal.get(j); | 1778 | ScheduleRealInfo s=listReal.get(j); |
| 1778 | if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh) | 1779 | if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh) |
| @@ -1917,7 +1918,12 @@ public class FormsServiceImpl implements FormsService { | @@ -1917,7 +1918,12 @@ public class FormsServiceImpl implements FormsService { | ||
| 1917 | sin.setEmptMileage(String.valueOf(zksgl)); | 1918 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 1918 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | 1919 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 1919 | sin.setxL(y.getXlbm()); | 1920 | sin.setxL(y.getXlbm()); |
| 1920 | - sin.setXlmc(BasicData.lineCode2NameMap.get(y.getXlbm())); | 1921 | + if(y.getLinename()==null){ |
| 1922 | + sin.setXlmc(y.getXlname()); | ||
| 1923 | + }else{ | ||
| 1924 | + sin.setXlmc(y.getLinename()); | ||
| 1925 | + } | ||
| 1926 | + | ||
| 1921 | sin.setClzbh(clzbh); | 1927 | sin.setClzbh(clzbh); |
| 1922 | sin.setJsy(jsy); | 1928 | sin.setJsy(jsy); |
| 1923 | sin.setrQ(startDate); | 1929 | sin.setrQ(startDate); |
| @@ -1999,8 +2005,11 @@ public class FormsServiceImpl implements FormsService { | @@ -1999,8 +2005,11 @@ public class FormsServiceImpl implements FormsService { | ||
| 1999 | sin.setEmptMileage(String.valueOf(zksgl)); | 2005 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 2000 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | 2006 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 2001 | sin.setxL(y.getXlbm()); | 2007 | sin.setxL(y.getXlbm()); |
| 2002 | - sin.setXlmc(BasicData.lineCode2NameMap.get(y.getXlbm())); | ||
| 2003 | - sin.setClzbh(clzbh); | 2008 | + if(y.getLinename()==null){ |
| 2009 | + sin.setXlmc(y.getXlname()); | ||
| 2010 | + }else{ | ||
| 2011 | + sin.setXlmc(y.getLinename()); | ||
| 2012 | + } sin.setClzbh(clzbh); | ||
| 2004 | sin.setJsy(jsy); | 2013 | sin.setJsy(jsy); |
| 2005 | sin.setrQ(startDate); | 2014 | sin.setrQ(startDate); |
| 2006 | if(newList.size()>0){ | 2015 | if(newList.size()>0){ |
| @@ -2024,7 +2033,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2024,7 +2033,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2024 | list.addAll(listD); | 2033 | list.addAll(listD); |
| 2025 | }else{ | 2034 | }else{ |
| 2026 | String sql="select r.s_gh,r.s_name, " | 2035 | String sql="select r.s_gh,r.s_name, " |
| 2027 | - + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm" | 2036 | + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm,r.xl_name" |
| 2028 | + " from bsth_c_s_sp_info_real r where " | 2037 | + " from bsth_c_s_sp_info_real r where " |
| 2029 | + " r.schedule_date_str = '"+startDate+"'" | 2038 | + " r.schedule_date_str = '"+startDate+"'" |
| 2030 | + " and r.s_gh !='' and r.s_gh is not null "; | 2039 | + " and r.s_gh !='' and r.s_gh is not null "; |
| @@ -2038,7 +2047,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2038,7 +2047,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2038 | sql += " and r.fgs_bm='"+fgsdm+"'"; | 2047 | sql += " and r.fgs_bm='"+fgsdm+"'"; |
| 2039 | } | 2048 | } |
| 2040 | sql += " group by r.s_gh,r.s_name," | 2049 | sql += " group by r.s_gh,r.s_name," |
| 2041 | - + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | 2050 | + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm,r.xl_name order by r.xl_bm,r.cl_zbh"; |
| 2042 | 2051 | ||
| 2043 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | 2052 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 2044 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 2053 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| @@ -2050,6 +2059,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2050,6 +2059,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2050 | sin.setClzbh(arg0.getString("cl_zbh")); | 2059 | sin.setClzbh(arg0.getString("cl_zbh")); |
| 2051 | sin.setSgh(arg0.getString("s_gh")); | 2060 | sin.setSgh(arg0.getString("s_gh")); |
| 2052 | sin.setsName(arg0.getString("s_name")); | 2061 | sin.setsName(arg0.getString("s_name")); |
| 2062 | + sin.setXlmc(arg0.getString("xl_name")); | ||
| 2053 | return sin; | 2063 | return sin; |
| 2054 | } | 2064 | } |
| 2055 | }); | 2065 | }); |
| @@ -2059,6 +2069,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2059,6 +2069,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2059 | String jsy=sin.getSgh(); | 2069 | String jsy=sin.getSgh(); |
| 2060 | String line=sin.getxL(); | 2070 | String line=sin.getxL(); |
| 2061 | String clzbh=sin.getClzbh(); | 2071 | String clzbh=sin.getClzbh(); |
| 2072 | + String xl_name=sin.getXlmc(); | ||
| 2062 | List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); | 2073 | List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); |
| 2063 | List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); | 2074 | List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); |
| 2064 | 2075 | ||
| @@ -2091,7 +2102,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2091,7 +2102,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2091 | 2102 | ||
| 2092 | sin.setEmptMileage(String.valueOf(zksgl)); | 2103 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 2093 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | 2104 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 2094 | - sin.setXlmc(BasicData.lineCode2NameMap.get(line)); | 2105 | + sin.setXlmc(xl_name); |
| 2095 | sin.setClzbh(clzbh); | 2106 | sin.setClzbh(clzbh); |
| 2096 | sin.setJsy(""); | 2107 | sin.setJsy(""); |
| 2097 | sin.setjName(""); | 2108 | sin.setjName(""); |
| @@ -2197,8 +2208,11 @@ public class FormsServiceImpl implements FormsService { | @@ -2197,8 +2208,11 @@ public class FormsServiceImpl implements FormsService { | ||
| 2197 | sin.setEmptMileage(String.valueOf(zksgl)); | 2208 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 2198 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | 2209 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 2199 | sin.setxL(y.getXlbm()); | 2210 | sin.setxL(y.getXlbm()); |
| 2200 | - sin.setXlmc(BasicData.lineCode2NameMap.get(y.getXlbm())); | ||
| 2201 | - sin.setClzbh(clzbh); | 2211 | + if(y.getLinename()==null){ |
| 2212 | + sin.setXlmc(y.getXlname()); | ||
| 2213 | + }else{ | ||
| 2214 | + sin.setXlmc(y.getLinename()); | ||
| 2215 | + } sin.setClzbh(clzbh); | ||
| 2202 | sin.setJsy(jsy); | 2216 | sin.setJsy(jsy); |
| 2203 | sin.setrQ(startDate); | 2217 | sin.setrQ(startDate); |
| 2204 | if(newList.size()>0){ | 2218 | if(newList.size()>0){ |
| @@ -2279,7 +2293,11 @@ public class FormsServiceImpl implements FormsService { | @@ -2279,7 +2293,11 @@ public class FormsServiceImpl implements FormsService { | ||
| 2279 | sin.setEmptMileage(String.valueOf(zksgl)); | 2293 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 2280 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | 2294 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 2281 | sin.setxL(y.getXlbm()); | 2295 | sin.setxL(y.getXlbm()); |
| 2282 | - sin.setXlmc(BasicData.lineCode2NameMap.get(y.getXlbm())); | 2296 | + if(y.getLinename()==null){ |
| 2297 | + sin.setXlmc(y.getXlname()); | ||
| 2298 | + }else{ | ||
| 2299 | + sin.setXlmc(y.getLinename()); | ||
| 2300 | + } | ||
| 2283 | sin.setClzbh(clzbh); | 2301 | sin.setClzbh(clzbh); |
| 2284 | sin.setJsy(jsy); | 2302 | sin.setJsy(jsy); |
| 2285 | sin.setrQ(startDate); | 2303 | sin.setrQ(startDate); |
| @@ -2304,7 +2322,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2304,7 +2322,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2304 | list.addAll(listD); | 2322 | list.addAll(listD); |
| 2305 | }else{ | 2323 | }else{ |
| 2306 | String sql="select r.s_gh,r.s_name, " | 2324 | String sql="select r.s_gh,r.s_name, " |
| 2307 | - + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm" | 2325 | + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm,r.xl_name" |
| 2308 | + " from bsth_c_s_sp_info_real r where " | 2326 | + " from bsth_c_s_sp_info_real r where " |
| 2309 | + " r.schedule_date_str = '"+startDate+"'" | 2327 | + " r.schedule_date_str = '"+startDate+"'" |
| 2310 | + " and r.s_gh !='' and r.s_gh is not null "; | 2328 | + " and r.s_gh !='' and r.s_gh is not null "; |
| @@ -2318,7 +2336,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2318,7 +2336,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2318 | sql += " and r.fgs_bm='"+fgsdm+"'"; | 2336 | sql += " and r.fgs_bm='"+fgsdm+"'"; |
| 2319 | } | 2337 | } |
| 2320 | sql += " group by r.s_gh,r.s_name," | 2338 | sql += " group by r.s_gh,r.s_name," |
| 2321 | - + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | 2339 | + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm,xl_name order by r.xl_bm,r.cl_zbh"; |
| 2322 | 2340 | ||
| 2323 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | 2341 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 2324 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 2342 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| @@ -2330,6 +2348,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2330,6 +2348,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2330 | sin.setClzbh(arg0.getString("cl_zbh")); | 2348 | sin.setClzbh(arg0.getString("cl_zbh")); |
| 2331 | sin.setSgh(arg0.getString("s_gh")); | 2349 | sin.setSgh(arg0.getString("s_gh")); |
| 2332 | sin.setsName(arg0.getString("s_name")); | 2350 | sin.setsName(arg0.getString("s_name")); |
| 2351 | + sin.setXlmc(arg0.getString("xl_name")); | ||
| 2333 | return sin; | 2352 | return sin; |
| 2334 | } | 2353 | } |
| 2335 | }); | 2354 | }); |
| @@ -2339,6 +2358,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2339,6 +2358,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2339 | String jsy=sin.getSgh(); | 2358 | String jsy=sin.getSgh(); |
| 2340 | String line=sin.getxL(); | 2359 | String line=sin.getxL(); |
| 2341 | String clzbh=sin.getClzbh(); | 2360 | String clzbh=sin.getClzbh(); |
| 2361 | + String xl_name=sin.getXlmc(); | ||
| 2342 | List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); | 2362 | List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); |
| 2343 | List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); | 2363 | List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); |
| 2344 | 2364 | ||
| @@ -2372,7 +2392,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2372,7 +2392,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2372 | 2392 | ||
| 2373 | sin.setEmptMileage(String.valueOf(zksgl)); | 2393 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 2374 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | 2394 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 2375 | - sin.setXlmc(BasicData.lineCode2NameMap.get(line)); | 2395 | + sin.setXlmc(xl_name); |
| 2376 | sin.setClzbh(clzbh); | 2396 | sin.setClzbh(clzbh); |
| 2377 | sin.setJsy(""); | 2397 | sin.setJsy(""); |
| 2378 | sin.setjName(""); | 2398 | sin.setjName(""); |
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
| @@ -328,7 +328,7 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw | @@ -328,7 +328,7 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw | ||
| 328 | } | 328 | } |
| 329 | 329 | ||
| 330 | String sql_ylb="SELECT nbbm,group_concat(jsy) AS jsy FROM bsth_c_ylb WHERE " | 330 | String sql_ylb="SELECT nbbm,group_concat(jsy) AS jsy FROM bsth_c_ylb WHERE " |
| 331 | - + " to_days(rq) = to_days('"+rq+"') AND ssgsdm = '"+gsdm+"' AND " | 331 | + + " rq = '"+rq+"' AND ssgsdm = '"+gsdm+"' AND " |
| 332 | + " fgsdm = '"+fgsdm+"' GROUP BY nbbm"; | 332 | + " fgsdm = '"+fgsdm+"' GROUP BY nbbm"; |
| 333 | 333 | ||
| 334 | List<Map<String, String>> ylbList= jdbcTemplate.query(sql_ylb, | 334 | List<Map<String, String>> ylbList= jdbcTemplate.query(sql_ylb, |
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java
| @@ -197,6 +197,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -197,6 +197,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 197 | t.setJsy(map.get("jGh")==null?"":map.get("jGh").toString()); | 197 | t.setJsy(map.get("jGh")==null?"":map.get("jGh").toString()); |
| 198 | t.setZlc(map.get("totalKilometers")==null?0.0:Double.parseDouble(df.format(Double.parseDouble(map.get("totalKilometers").toString())))); | 198 | t.setZlc(map.get("totalKilometers")==null?0.0:Double.parseDouble(df.format(Double.parseDouble(map.get("totalKilometers").toString())))); |
| 199 | t.setXlbm(map.get("xlBm")==null?"":map.get("xlBm").toString()); | 199 | t.setXlbm(map.get("xlBm")==null?"":map.get("xlBm").toString()); |
| 200 | + t.setLinename(map.get("lineName")==null?"":map.get("lineName").toString()); | ||
| 200 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); | 201 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); |
| 201 | t.setSsgsdm(map.get("company")==null?"":map.get("company").toString()); | 202 | t.setSsgsdm(map.get("company")==null?"":map.get("company").toString()); |
| 202 | t.setFgsdm(map.get("bCompany")==null?"":map.get("bCompany").toString()); | 203 | t.setFgsdm(map.get("bCompany")==null?"":map.get("bCompany").toString()); |
| @@ -464,6 +465,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -464,6 +465,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 464 | t.setZlc(map.get("totalKilometers") == null ? 0.0 | 465 | t.setZlc(map.get("totalKilometers") == null ? 0.0 |
| 465 | : Double.parseDouble(map.get("totalKilometers").toString())); | 466 | : Double.parseDouble(map.get("totalKilometers").toString())); |
| 466 | t.setXlbm(map.get("xlBm") == null ? "" : map.get("xlBm").toString()); | 467 | t.setXlbm(map.get("xlBm") == null ? "" : map.get("xlBm").toString()); |
| 468 | + t.setLinename(map.get("lineName")==null?"":map.get("lineName").toString()); | ||
| 467 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); | 469 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); |
| 468 | t.setSsgsdm(map.get("company") == null ? "" : map.get("company").toString()); | 470 | t.setSsgsdm(map.get("company") == null ? "" : map.get("company").toString()); |
| 469 | t.setFgsdm(map.get("bCompany") == null ? "" : map.get("bCompany").toString()); | 471 | t.setFgsdm(map.get("bCompany") == null ? "" : map.get("bCompany").toString()); |
| @@ -884,7 +886,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -884,7 +886,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 884 | String px) { | 886 | String px) { |
| 885 | // TODO Auto-generated method stub | 887 | // TODO Auto-generated method stub |
| 886 | String sql="SELECT * FROM bsth_c_dlb " | 888 | String sql="SELECT * FROM bsth_c_dlb " |
| 887 | - + " where to_days('"+rq+"')=to_days(rq) and ssgsdm like '%"+gsdm+"%' " | 889 | + + " where rq='"+rq+"' and ssgsdm like '%"+gsdm+"%' " |
| 888 | + " and fgsdm like '%"+fgsdm+"%'"; | 890 | + " and fgsdm like '%"+fgsdm+"%'"; |
| 889 | if(xlbm.equals("")){ | 891 | if(xlbm.equals("")){ |
| 890 | sql+= " and xlbm like '%"+xlbm+"%' "; | 892 | sql+= " and xlbm like '%"+xlbm+"%' "; |
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
| @@ -194,6 +194,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -194,6 +194,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 194 | t.setJsy(map.get("jGh")==null?"":map.get("jGh").toString()); | 194 | t.setJsy(map.get("jGh")==null?"":map.get("jGh").toString()); |
| 195 | t.setZlc(map.get("totalKilometers")==null?0.0:Double.parseDouble(map.get("totalKilometers").toString())); | 195 | t.setZlc(map.get("totalKilometers")==null?0.0:Double.parseDouble(map.get("totalKilometers").toString())); |
| 196 | t.setXlbm(map.get("xlBm")==null?"":map.get("xlBm").toString()); | 196 | t.setXlbm(map.get("xlBm")==null?"":map.get("xlBm").toString()); |
| 197 | + t.setLinename(map.get("lineName")==null?"":map.get("lineName").toString()); | ||
| 197 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); | 198 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); |
| 198 | t.setSsgsdm(map.get("company")==null?"":map.get("company").toString()); | 199 | t.setSsgsdm(map.get("company")==null?"":map.get("company").toString()); |
| 199 | t.setFgsdm(map.get("bCompany")==null?"":map.get("bCompany").toString()); | 200 | t.setFgsdm(map.get("bCompany")==null?"":map.get("bCompany").toString()); |
| @@ -492,6 +493,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -492,6 +493,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 492 | t.setZlc(map.get("totalKilometers") == null ? 0.0 | 493 | t.setZlc(map.get("totalKilometers") == null ? 0.0 |
| 493 | : Double.parseDouble(map.get("totalKilometers").toString())); | 494 | : Double.parseDouble(map.get("totalKilometers").toString())); |
| 494 | t.setXlbm(map.get("xlBm") == null ? "" : map.get("xlBm").toString()); | 495 | t.setXlbm(map.get("xlBm") == null ? "" : map.get("xlBm").toString()); |
| 496 | + t.setLinename(map.get("lineName")==null?"":map.get("lineName").toString()); | ||
| 495 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); | 497 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); |
| 496 | t.setSsgsdm(map.get("company") == null ? "" : map.get("company").toString()); | 498 | t.setSsgsdm(map.get("company") == null ? "" : map.get("company").toString()); |
| 497 | t.setFgsdm(map.get("bCompany") == null ? "" : map.get("bCompany").toString()); | 499 | t.setFgsdm(map.get("bCompany") == null ? "" : map.get("bCompany").toString()); |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -3265,6 +3265,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3265,6 +3265,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3265 | * 对计划发车时间相同的班次进行排序 out最前 in最后 | 3265 | * 对计划发车时间相同的班次进行排序 out最前 in最后 |
| 3266 | */ | 3266 | */ |
| 3267 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); | 3267 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| 3268 | + SimpleDateFormat sdfnyr =new SimpleDateFormat("yyyy-MM-dd"); | ||
| 3268 | String minfcsj = "02:00"; | 3269 | String minfcsj = "02:00"; |
| 3269 | List<Line> lineList = lineRepository.findLineByCode(line); | 3270 | List<Line> lineList = lineRepository.findLineByCode(line); |
| 3270 | if (lineList.size() > 0) { | 3271 | if (lineList.size() > 0) { |
| @@ -3293,9 +3294,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3293,9 +3294,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3293 | Calendar calendar = new GregorianCalendar(); | 3294 | Calendar calendar = new GregorianCalendar(); |
| 3294 | calendar.setTime(s.getScheduleDate()); | 3295 | calendar.setTime(s.getScheduleDate()); |
| 3295 | calendar.add(calendar.DATE, 1); | 3296 | calendar.add(calendar.DATE, 1); |
| 3296 | - s.setScheduleDate(calendar.getTime()); | 3297 | + Date date_sch= calendar.getTime(); |
| 3297 | try { | 3298 | try { |
| 3298 | - fscjT = sdf.parse(sdf.format(s.getScheduleDate()) + " " + s.getFcsj()).getTime(); | 3299 | + fscjT = sdf.parse(sdfnyr.format(date_sch) + " " + s.getFcsj()).getTime(); |
| 3299 | } catch (ParseException e) { | 3300 | } catch (ParseException e) { |
| 3300 | // TODO Auto-generated catch block | 3301 | // TODO Auto-generated catch block |
| 3301 | e.printStackTrace(); | 3302 | e.printStackTrace(); |
| @@ -3307,15 +3308,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3307,15 +3308,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3307 | } catch (ParseException e) { | 3308 | } catch (ParseException e) { |
| 3308 | // TODO Auto-generated catch block | 3309 | // TODO Auto-generated catch block |
| 3309 | e.printStackTrace(); | 3310 | e.printStackTrace(); |
| 3310 | - } | ||
| 3311 | - ; | 3311 | + }; |
| 3312 | } | 3312 | } |
| 3313 | s.setFcsjT(fscjT); | 3313 | s.setFcsjT(fscjT); |
| 3314 | } | 3314 | } |
| 3315 | List<ScheduleRealInfo> listInfo2=new ArrayList<ScheduleRealInfo>(); | 3315 | List<ScheduleRealInfo> listInfo2=new ArrayList<ScheduleRealInfo>(); |
| 3316 | listInfo2.addAll(listInfo); | 3316 | listInfo2.addAll(listInfo); |
| 3317 | Collections.sort(listInfo, new compareLpFcsjType()); | 3317 | Collections.sort(listInfo, new compareLpFcsjType()); |
| 3318 | - System.out.println(listInfo); | ||
| 3319 | Collections.sort(listInfo2,new compareDirLpFcsjType()); | 3318 | Collections.sort(listInfo2,new compareDirLpFcsjType()); |
| 3320 | for (int i = 0; i < listInfo.size(); i++) { | 3319 | for (int i = 0; i < listInfo.size(); i++) { |
| 3321 | ScheduleRealInfo t = listInfo.get(i); | 3320 | ScheduleRealInfo t = listInfo.get(i); |
| @@ -3454,6 +3453,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3454,6 +3453,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3454 | * 对计划发车时间相同的班次进行排序 out最前 in最后 | 3453 | * 对计划发车时间相同的班次进行排序 out最前 in最后 |
| 3455 | */ | 3454 | */ |
| 3456 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); | 3455 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| 3456 | + SimpleDateFormat sdfnyr = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 3457 | + | ||
| 3457 | String minfcsj = "02:00"; | 3458 | String minfcsj = "02:00"; |
| 3458 | List<Line> lineList = lineRepository.findLineByCode(line); | 3459 | List<Line> lineList = lineRepository.findLineByCode(line); |
| 3459 | if (lineList.size() > 0) { | 3460 | if (lineList.size() > 0) { |
| @@ -3482,9 +3483,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3482,9 +3483,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3482 | Calendar calendar = new GregorianCalendar(); | 3483 | Calendar calendar = new GregorianCalendar(); |
| 3483 | calendar.setTime(s.getScheduleDate()); | 3484 | calendar.setTime(s.getScheduleDate()); |
| 3484 | calendar.add(calendar.DATE, 1); | 3485 | calendar.add(calendar.DATE, 1); |
| 3485 | - s.setScheduleDate(calendar.getTime()); | 3486 | + Date date_sch=calendar.getTime(); |
| 3486 | try { | 3487 | try { |
| 3487 | - fscjT = sdf.parse(sdf.format(s.getScheduleDate()) + " " + s.getFcsj()).getTime(); | 3488 | + fscjT = sdf.parse(sdfnyr.format(date_sch) + " " + s.getFcsj()).getTime(); |
| 3488 | } catch (ParseException e) { | 3489 | } catch (ParseException e) { |
| 3489 | // TODO Auto-generated catch block | 3490 | // TODO Auto-generated catch block |
| 3490 | e.printStackTrace(); | 3491 | e.printStackTrace(); |
| @@ -3773,6 +3774,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3773,6 +3774,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3773 | boolean fage = true; | 3774 | boolean fage = true; |
| 3774 | String company = ""; | 3775 | String company = ""; |
| 3775 | String bCompany = ""; | 3776 | String bCompany = ""; |
| 3777 | + String lineName=""; | ||
| 3776 | List<ScheduleRealInfo> listS = new ArrayList<ScheduleRealInfo>(); | 3778 | List<ScheduleRealInfo> listS = new ArrayList<ScheduleRealInfo>(); |
| 3777 | for (ScheduleRealInfo scheduleRealInfo : lists) { | 3779 | for (ScheduleRealInfo scheduleRealInfo : lists) { |
| 3778 | if (scheduleRealInfo.getjGh().equals(jName) | 3780 | if (scheduleRealInfo.getjGh().equals(jName) |
| @@ -3783,6 +3785,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3783,6 +3785,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3783 | //根据线路代码获取公司 | 3785 | //根据线路代码获取公司 |
| 3784 | company = scheduleRealInfo.getGsBm(); | 3786 | company = scheduleRealInfo.getGsBm(); |
| 3785 | bCompany = scheduleRealInfo.getFgsBm(); | 3787 | bCompany = scheduleRealInfo.getFgsBm(); |
| 3788 | + lineName = scheduleRealInfo.getXlName(); | ||
| 3786 | fage = false; | 3789 | fage = false; |
| 3787 | } | 3790 | } |
| 3788 | Set<ChildTaskPlan> cts = scheduleRealInfo.getcTasks(); | 3791 | Set<ChildTaskPlan> cts = scheduleRealInfo.getcTasks(); |
| @@ -3797,6 +3800,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3797,6 +3800,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3797 | } | 3800 | } |
| 3798 | yesterdayDataList.get(x).put("company", company); | 3801 | yesterdayDataList.get(x).put("company", company); |
| 3799 | yesterdayDataList.get(x).put("bCompany", bCompany); | 3802 | yesterdayDataList.get(x).put("bCompany", bCompany); |
| 3803 | + yesterdayDataList.get(x).put("lineName", lineName); | ||
| 3800 | Double ljgl = culateMieageService.culateLjgl(listS); | 3804 | Double ljgl = culateMieageService.culateLjgl(listS); |
| 3801 | Double sjgl = culateMieageService.culateSjgl(listS); | 3805 | Double sjgl = culateMieageService.culateSjgl(listS); |
| 3802 | Double ksgl = culateMieageService.culateKsgl(listS); | 3806 | Double ksgl = culateMieageService.culateKsgl(listS); |
src/main/java/com/bsth/service/report/ReportService.java
| @@ -5,6 +5,7 @@ import java.util.Map; | @@ -5,6 +5,7 @@ import java.util.Map; | ||
| 5 | 5 | ||
| 6 | import com.bsth.entity.StationRoute; | 6 | import com.bsth.entity.StationRoute; |
| 7 | import com.bsth.entity.excep.ArrivalInfo; | 7 | import com.bsth.entity.excep.ArrivalInfo; |
| 8 | +import com.bsth.entity.mcy_forms.Singledata; | ||
| 8 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 9 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 9 | 10 | ||
| 10 | 11 | ||
| @@ -56,4 +57,6 @@ public interface ReportService { | @@ -56,4 +57,6 @@ public interface ReportService { | ||
| 56 | List<Map<String, Object>> countDjg(Map<String, Object> map); | 57 | List<Map<String, Object>> countDjg(Map<String, Object> map); |
| 57 | 58 | ||
| 58 | Map<String, Object> online(Map<String, Object> map); | 59 | Map<String, Object> online(Map<String, Object> map); |
| 60 | + | ||
| 61 | + List<Singledata> singledatatj(Map<String, Object> map); | ||
| 59 | } | 62 | } |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| @@ -6,6 +6,7 @@ import com.bsth.entity.Personnel; | @@ -6,6 +6,7 @@ import com.bsth.entity.Personnel; | ||
| 6 | import com.bsth.entity.StationRoute; | 6 | import com.bsth.entity.StationRoute; |
| 7 | import com.bsth.entity.excep.ArrivalInfo; | 7 | import com.bsth.entity.excep.ArrivalInfo; |
| 8 | import com.bsth.entity.mcy_forms.Daily; | 8 | import com.bsth.entity.mcy_forms.Daily; |
| 9 | +import com.bsth.entity.mcy_forms.Singledata; | ||
| 9 | import com.bsth.entity.oil.Dlb; | 10 | import com.bsth.entity.oil.Dlb; |
| 10 | import com.bsth.entity.oil.Ylb; | 11 | import com.bsth.entity.oil.Ylb; |
| 11 | import com.bsth.entity.realcontrol.ChildTaskPlan; | 12 | import com.bsth.entity.realcontrol.ChildTaskPlan; |
| @@ -52,6 +53,9 @@ public class ReportServiceImpl implements ReportService{ | @@ -52,6 +53,9 @@ public class ReportServiceImpl implements ReportService{ | ||
| 52 | 53 | ||
| 53 | private Logger logger = LoggerFactory.getLogger(this.getClass()); | 54 | private Logger logger = LoggerFactory.getLogger(this.getClass()); |
| 54 | 55 | ||
| 56 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 57 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 58 | + | ||
| 55 | @Autowired | 59 | @Autowired |
| 56 | JdbcTemplate jdbcTemplate; | 60 | JdbcTemplate jdbcTemplate; |
| 57 | 61 | ||
| @@ -65,7 +69,10 @@ public class ReportServiceImpl implements ReportService{ | @@ -65,7 +69,10 @@ public class ReportServiceImpl implements ReportService{ | ||
| 65 | LineRepository lineRepository; | 69 | LineRepository lineRepository; |
| 66 | @Autowired | 70 | @Autowired |
| 67 | StationRouteRepository stationRouteRepository; | 71 | StationRouteRepository stationRouteRepository; |
| 68 | - | 72 | + @Autowired |
| 73 | + CulateMileageService culateMileageService; | ||
| 74 | + | ||
| 75 | + | ||
| 69 | @Override | 76 | @Override |
| 70 | public List<ScheduleRealInfo> queryListBczx(String line, String date,String clzbh) { | 77 | public List<ScheduleRealInfo> queryListBczx(String line, String date,String clzbh) { |
| 71 | // TODO Auto-generated method stub | 78 | // TODO Auto-generated method stub |
| @@ -3549,6 +3556,393 @@ public class ReportServiceImpl implements ReportService{ | @@ -3549,6 +3556,393 @@ public class ReportServiceImpl implements ReportService{ | ||
| 3549 | } | 3556 | } |
| 3550 | return list; | 3557 | return list; |
| 3551 | } | 3558 | } |
| 3559 | + @Override | ||
| 3560 | + public List<Singledata> singledatatj(Map<String, Object> map) { | ||
| 3561 | + String sfyy=""; | ||
| 3562 | + if(map.get("sfyy")!=null){ | ||
| 3563 | + sfyy=map.get("sfyy").toString(); | ||
| 3564 | + } | ||
| 3565 | + String gsdm=""; | ||
| 3566 | + if(map.get("gsdmSing")!=null){ | ||
| 3567 | + gsdm=map.get("gsdmSing").toString(); | ||
| 3568 | + } | ||
| 3569 | + String fgsdm=""; | ||
| 3570 | + if(map.get("fgsdmSing")!=null){ | ||
| 3571 | + fgsdm=map.get("fgsdmSing").toString(); | ||
| 3572 | + } | ||
| 3573 | + String type=""; | ||
| 3574 | + if(map.get("type")!=null){ | ||
| 3575 | + type=map.get("type").toString(); | ||
| 3576 | + } | ||
| 3577 | + String tjtype=map.get("tjtype").toString(); | ||
| 3578 | + String xlbm=map.get("line").toString().trim(); | ||
| 3579 | + String startDate = map.get("startDate").toString(); | ||
| 3580 | + String endDate = map.get("endDate").toString(); | ||
| 3581 | + | ||
| 3582 | + List<ScheduleRealInfo> listReal=new ArrayList<ScheduleRealInfo>(); | ||
| 3583 | + if(xlbm.equals("")){ | ||
| 3584 | + listReal=scheduleRealInfoRepository.scheduleByDateAndLineTj(xlbm, startDate, endDate, gsdm, fgsdm); | ||
| 3585 | + }else{ | ||
| 3586 | + listReal=scheduleRealInfoRepository.scheduleByDateAndLineTj2(xlbm, startDate, endDate); | ||
| 3587 | + } | ||
| 3588 | + List<Singledata> list=new ArrayList<Singledata>(); | ||
| 3589 | + List<Singledata> list_=new ArrayList<Singledata>(); | ||
| 3590 | + if(tjtype.equals("jsy")){ | ||
| 3591 | + //油统计 | ||
| 3592 | + String sql="select r.j_gh, r.xl_bm,r.cl_zbh,r.fgs_bm" | ||
| 3593 | + + " from bsth_c_s_sp_info_real r where " | ||
| 3594 | + + " r.schedule_date_str >= '"+startDate+"'" | ||
| 3595 | + + " and r.schedule_date_str<='"+endDate+"'"; | ||
| 3596 | + if(xlbm.length() != 0){ | ||
| 3597 | + sql += " and r.xl_bm = '"+xlbm+"'"; | ||
| 3598 | + } | ||
| 3599 | + if(gsdm.length() != 0){ | ||
| 3600 | + sql += " and r.gs_bm ='"+gsdm+"'"; | ||
| 3601 | + } | ||
| 3602 | + if(fgsdm.length() != 0){ | ||
| 3603 | + sql += " and r.fgs_bm ='"+fgsdm+"'"; | ||
| 3604 | + } | ||
| 3605 | + sql += " group by r.j_gh,r.xl_bm,r.cl_zbh order by r.xl_bm,r.cl_zbh"; | ||
| 3606 | + | ||
| 3607 | + list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | ||
| 3608 | + @Override | ||
| 3609 | + public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 3610 | + Singledata sin = new Singledata(); | ||
| 3611 | + sin.setxL(arg0.getString("xl_bm")); | ||
| 3612 | + sin.setJsy(arg0.getString("j_gh")); | ||
| 3613 | + sin.setClzbh(arg0.getString("cl_zbh")); | ||
| 3614 | + sin.setgS(arg0.getString("fgs_bm")); | ||
| 3615 | + return sin; | ||
| 3616 | + } | ||
| 3617 | + }); | ||
| 3618 | + | ||
| 3619 | + | ||
| 3620 | + String linesql=""; | ||
| 3621 | + if(!xlbm.equals("")){ | ||
| 3622 | + linesql +=" and xlbm ='"+xlbm+"' "; | ||
| 3623 | + } | ||
| 3624 | + if(!gsdm.equals("")){ | ||
| 3625 | + linesql +=" and ssgsdm ='"+gsdm+"' "; | ||
| 3626 | + } | ||
| 3627 | + if(!fgsdm.equals("")){ | ||
| 3628 | + linesql +=" and fgsdm ='"+fgsdm+"' "; | ||
| 3629 | + } | ||
| 3630 | + /*String nysql="SELECT id,xlbm,nbbm,jsy,jzl as jzl,yh as yh,sh as sh,fgsdm FROM bsth_c_ylb" | ||
| 3631 | + + " WHERE rq >= '"+startDate+"' and rq <='"+endDate+"'" | ||
| 3632 | + + linesql | ||
| 3633 | + + " union" | ||
| 3634 | + + " SELECT id,xlbm,nbbm,jsy,cdl as jzl,hd as yh,sh as sh,fgsdm FROM bsth_c_dlb" | ||
| 3635 | + + " WHERE rq = '"+startDate+"' and rq <='"+endDate+"'" | ||
| 3636 | + + linesql;*/ | ||
| 3637 | + | ||
| 3638 | + String nysql="SELECT 'yh' as type,xlbm,nbbm,jsy,sum(jzl*1000)/1000 as jzl," | ||
| 3639 | + + " sum(yh*1000)/1000 as yh," | ||
| 3640 | + + " sum(sh*1000)/1000 as sh FROM " | ||
| 3641 | + + "bsth_c_ylb where rq>='"+startDate+"' " | ||
| 3642 | + + " and rq <='"+endDate+"' " +linesql | ||
| 3643 | + + " group by xlbm ,nbbm,jsy " | ||
| 3644 | + + " union SELECT 'dh' as type,xlbm,nbbm,jsy, " | ||
| 3645 | + + " sum(cdl*1000)/1000 as jzl,sum(hd*1000)/1000 as yh," | ||
| 3646 | + + " sum(sh * 1000) / 1000 AS sh" | ||
| 3647 | + + " FROM bsth_c_dlb where rq>='"+startDate+"' " | ||
| 3648 | + + " and rq <='"+endDate+"'" +linesql | ||
| 3649 | + + " group by xlbm ,nbbm,jsy" ; | ||
| 3650 | + | ||
| 3651 | + List<Singledata> listNy = jdbcTemplate.query(nysql, new RowMapper<Singledata>() { | ||
| 3652 | + @Override | ||
| 3653 | + public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 3654 | + Singledata sin = new Singledata(); | ||
| 3655 | + sin.setxL(arg0.getString("xlbm")); | ||
| 3656 | + sin.setJsy(arg0.getString("jsy")); | ||
| 3657 | + sin.setClzbh(arg0.getString("nbbm")); | ||
| 3658 | + sin.setJzl(arg0.getString("jzl")); | ||
| 3659 | + sin.setHyl(arg0.getString("yh")); | ||
| 3660 | + sin.setUnyyyl(arg0.getString("sh")); | ||
| 3661 | + return sin; | ||
| 3662 | + } | ||
| 3663 | + }); | ||
| 3664 | + //统计油,电表中手动添加的或者有加注没里程的数据 | ||
| 3665 | + for (int i = 0; i < listNy.size(); i++) { | ||
| 3666 | + Singledata sin_=listNy.get(i); | ||
| 3667 | + String jsy=sin_.getJsy(); | ||
| 3668 | + String line=sin_.getxL(); | ||
| 3669 | + String clzbh=sin_.getClzbh(); | ||
| 3670 | + boolean fages=true; | ||
| 3671 | + for (int j = 0; j < list.size(); j++) { | ||
| 3672 | + Singledata sin=list.get(j); | ||
| 3673 | + String jsy_=sin.getJsy(); | ||
| 3674 | + String line_=sin.getxL(); | ||
| 3675 | + String clzbh_=sin.getClzbh(); | ||
| 3676 | + if(jsy.equals(jsy_) | ||
| 3677 | + &&line.equals(line_) | ||
| 3678 | + &&clzbh.equals(clzbh_)){ | ||
| 3679 | + fages=false; | ||
| 3680 | + } | ||
| 3681 | + } | ||
| 3682 | + if(fages){ | ||
| 3683 | + Singledata s=new Singledata(); | ||
| 3684 | + s.setJsy(jsy); | ||
| 3685 | + s.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); | ||
| 3686 | + s.setClzbh(clzbh); | ||
| 3687 | + s.setSgh(""); | ||
| 3688 | + s.setsName(""); | ||
| 3689 | + s.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); | ||
| 3690 | + s.setxL(line); | ||
| 3691 | + s.setXlmc(BasicData.lineCodeAllNameMap.get(line)); | ||
| 3692 | + s.setJzl(sin_.getJzl()); | ||
| 3693 | + s.setHyl(sin_.getHyl()); | ||
| 3694 | + s.setUnyyyl(sin_.getUnyyyl()); | ||
| 3695 | + s.setJhlc("0.0"); | ||
| 3696 | + s.setEmptMileage("0.0"); | ||
| 3697 | + s.setJhjl("0.0"); | ||
| 3698 | + if(startDate.equals(endDate)) | ||
| 3699 | + s.setrQ(startDate); | ||
| 3700 | + else | ||
| 3701 | + s.setrQ(startDate+"-"+endDate); | ||
| 3702 | + | ||
| 3703 | + list_.add(s); | ||
| 3704 | + } | ||
| 3705 | + } | ||
| 3706 | + for (int i= 0; i < list.size(); i++) { | ||
| 3707 | + Singledata sin=list.get(i); | ||
| 3708 | + String jsy=sin.getJsy(); | ||
| 3709 | + String line=sin.getxL(); | ||
| 3710 | + String clzbh=sin.getClzbh(); | ||
| 3711 | + double jzl=0.0; | ||
| 3712 | + double yh=0.0; | ||
| 3713 | + double sh=0.0; | ||
| 3714 | + for (int j = 0; j < listNy.size(); j++) { | ||
| 3715 | + Singledata y=listNy.get(j); | ||
| 3716 | + if(y.getJsy().equals(jsy) | ||
| 3717 | + &&y.getClzbh().equals(clzbh) | ||
| 3718 | + &&y.getxL().equals(line)){ | ||
| 3719 | + jzl=Arith.add(jzl, y.getJzl()); | ||
| 3720 | + yh=Arith.add(yh, y.getHyl()); | ||
| 3721 | + sh=Arith.add(sh, y.getUnyyyl()); | ||
| 3722 | + } | ||
| 3723 | + } | ||
| 3724 | + sin.setHyl(String.valueOf(yh)); | ||
| 3725 | + sin.setJzl(String.valueOf(jzl)); | ||
| 3726 | + sin.setUnyyyl(String.valueOf(sh)); | ||
| 3727 | + | ||
| 3728 | + List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); | ||
| 3729 | + List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); | ||
| 3730 | + for (int j = 0; j < listReal.size(); j++) { | ||
| 3731 | + ScheduleRealInfo s=listReal.get(j); | ||
| 3732 | + if(s.getjGh().equals(jsy) | ||
| 3733 | + && s.getClZbh().equals(clzbh) | ||
| 3734 | + &&s.getXlBm().equals(line)){ | ||
| 3735 | + newList.add(s); | ||
| 3736 | + Set<ChildTaskPlan> cts = s.getcTasks(); | ||
| 3737 | + if(cts != null && cts.size() > 0){ | ||
| 3738 | + newList_.add(s); | ||
| 3739 | + }else{ | ||
| 3740 | + if(s.getZdsjActual()!=null && s.getFcsjActual()!=null){ | ||
| 3741 | + newList_.add(s); | ||
| 3742 | + } | ||
| 3743 | + } | ||
| 3744 | + } | ||
| 3745 | + } | ||
| 3746 | + double jhgl=culateMileageService.culateJhgl(newList); | ||
| 3747 | + double jhjcc=culateMileageService.culateJhJccgl(newList); | ||
| 3748 | + double yygl=culateMileageService.culateSjgl(newList_); | ||
| 3749 | + double ljgl=culateMileageService.culateLjgl(newList_); | ||
| 3750 | + double ksgl=culateMileageService.culateKsgl(newList_); | ||
| 3751 | + double jcgl=culateMileageService.culateJccgl(newList_); | ||
| 3752 | + | ||
| 3753 | + double zyygl=Arith.add(yygl, ljgl); | ||
| 3754 | + double zksgl=Arith.add(ksgl, jcgl); | ||
| 3755 | + sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl))); | ||
| 3756 | + sin.setEmptMileage(String.valueOf(zksgl)); | ||
| 3757 | + sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | ||
| 3758 | + if(newList.size()>0){ | ||
| 3759 | + sin.setXlmc(newList.get(0).getXlName()); | ||
| 3760 | + sin.setjName(newList.get(0).getjName()); | ||
| 3761 | + }else{ | ||
| 3762 | + sin.setXlmc(BasicData.lineCodeAllNameMap.get(line)); | ||
| 3763 | + sin.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); | ||
| 3764 | + | ||
| 3765 | + } | ||
| 3766 | + if(startDate.equals(endDate)) | ||
| 3767 | + sin.setrQ(startDate); | ||
| 3768 | + else | ||
| 3769 | + sin.setrQ(startDate+"-"+endDate); | ||
| 3770 | +// sin.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); | ||
| 3771 | + sin.setSgh(""); | ||
| 3772 | + sin.setsName(""); | ||
| 3773 | + sin.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); | ||
| 3774 | + list_.add(sin); | ||
| 3775 | + | ||
| 3776 | + } | ||
| 3777 | + }else{ | ||
| 3778 | + String sql="select r.s_gh,r.s_name, " | ||
| 3779 | + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm" | ||
| 3780 | + + " from bsth_c_s_sp_info_real r where " | ||
| 3781 | + + " r.schedule_date_str >= '"+startDate+"'" | ||
| 3782 | + + " schedule_date_str <='"+endDate+"'" | ||
| 3783 | + + " and r.s_gh !='' and r.s_gh is not null "; | ||
| 3784 | + if(!xlbm.equals("")){ | ||
| 3785 | + sql += " and r.xl_bm = '"+xlbm+"'"; | ||
| 3786 | + } | ||
| 3787 | + if(!gsdm.equals("")){ | ||
| 3788 | + sql += " and r.gs_bm = '"+gsdm+"'"; | ||
| 3789 | + } | ||
| 3790 | + if(!fgsdm.equals("")){ | ||
| 3791 | + sql += " and r.fgs_bm = '"+fgsdm+"'"; | ||
| 3792 | + } | ||
| 3793 | + sql += " group by r.s_gh,r.s_name," | ||
| 3794 | + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | ||
| 3795 | + | ||
| 3796 | + list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | ||
| 3797 | + //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 3798 | + @Override | ||
| 3799 | + public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 3800 | + Singledata sin = new Singledata(); | ||
| 3801 | +// sin.setrQ(startDate); | ||
| 3802 | + sin.setxL(arg0.getString("xl_bm")); | ||
| 3803 | + sin.setClzbh(arg0.getString("cl_zbh")); | ||
| 3804 | + sin.setSgh(arg0.getString("s_gh")); | ||
| 3805 | + sin.setsName(arg0.getString("s_name")); | ||
| 3806 | + sin.setgS(arg0.getString("fgs_bm")); | ||
| 3807 | + return sin; | ||
| 3808 | + } | ||
| 3809 | + }); | ||
| 3810 | + | ||
| 3811 | + String spy=""; | ||
| 3812 | + if(map.get("map")!=null){ | ||
| 3813 | + spy=map.get("spy").toString(); | ||
| 3814 | + } | ||
| 3815 | + for (int i = 0; i < list.size(); i++) { | ||
| 3816 | + Singledata sin=list.get(i); | ||
| 3817 | + sin.setrQ(startDate+"-"+endDate); | ||
| 3818 | + String jsy=sin.getSgh(); | ||
| 3819 | + String line=sin.getxL(); | ||
| 3820 | + String clzbh=sin.getClzbh(); | ||
| 3821 | + List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); | ||
| 3822 | + List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); | ||
| 3823 | + | ||
| 3824 | + for (int j = 0; j < listReal.size(); j++) { | ||
| 3825 | + ScheduleRealInfo s=listReal.get(j); | ||
| 3826 | + if(s.getsGh().equals(jsy) && s.getClZbh().equals(clzbh) | ||
| 3827 | + &&s.getXlBm().equals(line)){ | ||
| 3828 | + newList.add(s); | ||
| 3829 | + Set<ChildTaskPlan> cts = s.getcTasks(); | ||
| 3830 | + if(cts != null && cts.size() > 0){ | ||
| 3831 | + newList_.add(s); | ||
| 3832 | + }else{ | ||
| 3833 | + if(s.getZdsjActual()!=null && s.getFcsjActual()!=null){ | ||
| 3834 | + newList_.add(s); | ||
| 3835 | + } | ||
| 3836 | + } | ||
| 3837 | + } | ||
| 3838 | + } | ||
| 3839 | + double jhgl=culateMileageService.culateJhgl(newList);; | ||
| 3840 | + double jhjcc=culateMileageService.culateJhJccgl(newList); | ||
| 3841 | + double yygl=0.0; | ||
| 3842 | + double ljgl=0.0; | ||
| 3843 | + double zksgl=0.0; | ||
| 3844 | + if(spy.equals("zrw")){ | ||
| 3845 | + yygl=culateMileageService.culateSjgl_spy(newList_); | ||
| 3846 | + ljgl=culateMileageService.culateLjgl_spy(newList_); | ||
| 3847 | + zksgl=culateMileageService.culateSjfyylc_spy(newList_); | ||
| 3848 | + }else{ | ||
| 3849 | + yygl=culateMileageService.culateSjgl(newList_); | ||
| 3850 | + ljgl=culateMileageService.culateLjgl(newList_); | ||
| 3851 | + double ksgl=culateMileageService.culateKsgl(newList_); | ||
| 3852 | + double jcgl=culateMileageService.culateJccgl(newList_); | ||
| 3853 | + zksgl=Arith.add(ksgl, jcgl); | ||
| 3854 | + } | ||
| 3855 | + double zyygl=Arith.add(yygl, ljgl); | ||
| 3856 | + sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl))); | ||
| 3857 | + sin.setEmptMileage(String.valueOf(zksgl)); | ||
| 3858 | + sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | ||
| 3859 | + if(newList.size()>0) | ||
| 3860 | + sin.setXlmc(newList.get(0).getXlName()); | ||
| 3861 | + else | ||
| 3862 | + sin.setXlmc(BasicData.lineCodeAllNameMap.get(line)); | ||
| 3863 | + sin.setClzbh(clzbh); | ||
| 3864 | + sin.setJsy(""); | ||
| 3865 | + sin.setjName(""); | ||
| 3866 | + sin.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); | ||
| 3867 | + sin.setHyl(""); | ||
| 3868 | + sin.setJzl(""); | ||
| 3869 | + sin.setUnyyyl(""); | ||
| 3870 | + list_.add(sin); | ||
| 3871 | + } | ||
| 3872 | + } | ||
| 3873 | + | ||
| 3874 | + /*Map<String, Boolean> lineNature = lineService.lineNature(); | ||
| 3875 | + List<Singledata> resList = new ArrayList<Singledata>(); | ||
| 3876 | + for(Singledata s : list_){ | ||
| 3877 | + String xlBm = s.getxL(); | ||
| 3878 | + if(sfyy.length() != 0){ | ||
| 3879 | + if(sfyy.equals("0")){ | ||
| 3880 | + resList.add(s); | ||
| 3881 | + } else if(sfyy.equals("1")){ | ||
| 3882 | + if(lineNature.containsKey(xlBm) && lineNature.get(xlBm)){ | ||
| 3883 | + resList.add(s); | ||
| 3884 | + } | ||
| 3885 | + } else { | ||
| 3886 | + if(lineNature.containsKey(xlBm) && !lineNature.get(xlBm)){ | ||
| 3887 | + resList.add(s); | ||
| 3888 | + } | ||
| 3889 | + } | ||
| 3890 | + } else { | ||
| 3891 | + resList.add(s); | ||
| 3892 | + } | ||
| 3893 | + }*/ | ||
| 3894 | + | ||
| 3895 | + | ||
| 3896 | + if (type.equals("export")) { | ||
| 3897 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 3898 | + ReportUtils ee = new ReportUtils(); | ||
| 3899 | + | ||
| 3900 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 3901 | + int i = 1; | ||
| 3902 | + for (Singledata l : list_) { | ||
| 3903 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 3904 | + m.put("i", i); | ||
| 3905 | + m.put("rQ", l.getrQ()); | ||
| 3906 | + m.put("gS", l.getgS()); | ||
| 3907 | + m.put("xL", l.getXlmc()); | ||
| 3908 | + m.put("clzbh", l.getClzbh()); | ||
| 3909 | + m.put("jsy", l.getJsy()); | ||
| 3910 | + m.put("jName", l.getjName()); | ||
| 3911 | + m.put("sgh", l.getSgh()); | ||
| 3912 | + m.put("sName", l.getsName()); | ||
| 3913 | + m.put("jhlc", l.getJhlc()); | ||
| 3914 | + m.put("emptMileage", l.getEmptMileage()); | ||
| 3915 | + m.put("hyl", l.getHyl()); | ||
| 3916 | + m.put("jzl", l.getJzl()); | ||
| 3917 | + m.put("unyyyl", l.getUnyyyl()); | ||
| 3918 | + m.put("jhjl", l.getJhjl()); | ||
| 3919 | + resList.add(m); | ||
| 3920 | + | ||
| 3921 | + i++; | ||
| 3922 | + } | ||
| 3923 | + | ||
| 3924 | + listI.add(resList.iterator()); | ||
| 3925 | + try { | ||
| 3926 | + String exportDate=""; | ||
| 3927 | + if(startDate.equals(endDate)){ | ||
| 3928 | + exportDate =sdfSimple.format(sdfMonth.parse(startDate)) ; | ||
| 3929 | + }else{ | ||
| 3930 | + exportDate =sdfSimple.format(sdfMonth.parse(startDate))+"-"+sdfSimple.format(sdfMonth.parse(endDate)) ; | ||
| 3931 | + } | ||
| 3932 | + String lineName = ""; | ||
| 3933 | + if(map.containsKey("lineName")) | ||
| 3934 | + lineName = map.get("lineName").toString(); | ||
| 3935 | + | ||
| 3936 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ||
| 3937 | + ee.excelReplace(listI, new Object[] { map }, path + "mould/singledata.xls", | ||
| 3938 | + path + "export/" +exportDate | ||
| 3939 | + + "-" + lineName + "-路单统计.xls"); | ||
| 3940 | + } catch (ParseException e) { | ||
| 3941 | + e.printStackTrace(); | ||
| 3942 | + } | ||
| 3943 | + } | ||
| 3944 | + return list_; | ||
| 3945 | + } | ||
| 3552 | 3946 | ||
| 3553 | 3947 | ||
| 3554 | } | 3948 | } |
src/main/resources/static/index.html
| @@ -632,6 +632,7 @@ | @@ -632,6 +632,7 @@ | ||
| 632 | data-exclude=1></script> | 632 | data-exclude=1></script> |
| 633 | <!-- echarts4 误删 --> | 633 | <!-- echarts4 误删 --> |
| 634 | <script src="/metronic_v4.5.4/plugins/echarts4/echarts.min.js"></script> | 634 | <script src="/metronic_v4.5.4/plugins/echarts4/echarts.min.js"></script> |
| 635 | +<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" merge="plugins"></script> | ||
| 635 | 636 | ||
| 636 | </body> | 637 | </body> |
| 637 | </html> | 638 | </html> |
| 638 | \ No newline at end of file | 639 | \ No newline at end of file |
src/main/resources/static/pages/electricity/list/list.html
| @@ -183,7 +183,11 @@ | @@ -183,7 +183,11 @@ | ||
| 183 | {{obj.gsname}} | 183 | {{obj.gsname}} |
| 184 | </td> | 184 | </td> |
| 185 | <td> | 185 | <td> |
| 186 | - {{obj.xlname}} | 186 | + {{if obj.linename=='' || obj.linename==null}} |
| 187 | + {{obj.xlname}} | ||
| 188 | + {{else}} | ||
| 189 | + {{obj.linename}} | ||
| 190 | + {{/if}} | ||
| 187 | </td> | 191 | </td> |
| 188 | <td> | 192 | <td> |
| 189 | <lable data-id="{{obj.id}}" class="in_carpark_nbbm">{{obj.nbbm}}</lable> | 193 | <lable data-id="{{obj.id}}" class="in_carpark_nbbm">{{obj.nbbm}}</lable> |
| @@ -194,7 +198,11 @@ | @@ -194,7 +198,11 @@ | ||
| 194 | <input data-id="{{obj.id}}" style=" width:100%" type="text" class="in_carpark_jsy" ></input> | 198 | <input data-id="{{obj.id}}" style=" width:100%" type="text" class="in_carpark_jsy" ></input> |
| 195 | <button class="btn btn-sm blue btn-jsyUpdate" style=" width:100%" data-id="{{obj.id}}">填写工号</button> | 199 | <button class="btn btn-sm blue btn-jsyUpdate" style=" width:100%" data-id="{{obj.id}}">填写工号</button> |
| 196 | {{else}} | 200 | {{else}} |
| 197 | - {{obj.jsy}}/{{obj.name}} | 201 | + {{if obj.jname=='' || obj.jname==null}} |
| 202 | + {{obj.jsy}}/{{obj.name}} | ||
| 203 | + {{else}} | ||
| 204 | + {{obj.jsy}}/{{obj.jname}} | ||
| 205 | + {{/if}} | ||
| 198 | {{/if}} | 206 | {{/if}} |
| 199 | </td> | 207 | </td> |
| 200 | <td> | 208 | <td> |
src/main/resources/static/pages/mforms/singledatas/singledata_date.html
0 → 100644
| 1 | +<style type="text/css"> | ||
| 2 | + .table-bordered { | ||
| 3 | + border: 1px solid; } | ||
| 4 | + .table-bordered > thead > tr > th, | ||
| 5 | + .table-bordered > thead > tr > td, | ||
| 6 | + .table-bordered > tbody > tr > th, | ||
| 7 | + .table-bordered > tbody > tr > td, | ||
| 8 | + .table-bordered > tfoot > tr > th, | ||
| 9 | + .table-bordered > tfoot > tr > td { | ||
| 10 | + border: 1px solid; } | ||
| 11 | + .table-bordered > thead > tr > th, | ||
| 12 | + .table-bordered > thead > tr > td { | ||
| 13 | + border-bottom-width: 2px; | ||
| 14 | + text-align: center; } | ||
| 15 | + | ||
| 16 | + .table > tbody + tbody { | ||
| 17 | + border-top: 1px solid; } | ||
| 18 | +</style> | ||
| 19 | + | ||
| 20 | +<div class="page-head"> | ||
| 21 | + <div class="page-title"> | ||
| 22 | + <h1>路单统计</h1> | ||
| 23 | + </div> | ||
| 24 | +</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; margin-left: 33px;" id="gsdmDiv_sing"> | ||
| 32 | + <span class="item-label" style="width: 140px;"> | ||
| 33 | + | ||
| 34 | + 公司: </span> | ||
| 35 | + <select class="form-control" name="company" id="gsdmSing" style="width: 140px;"></select> | ||
| 36 | + </div> | ||
| 37 | + <div style="display: inline-block; margin-left: 10px;" id="fgsdmDiv_sing"> | ||
| 38 | + <span class="item-label" style="width: 140px;"> 分公司: </span> | ||
| 39 | + <select class="form-control" name="subCompany" id="fgsdmSing" style="width: 140px;"></select> | ||
| 40 | + </div> | ||
| 41 | + <div style="display: inline-block; margin-left: 15px;"> | ||
| 42 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 43 | + <select class="form-control" name="line" id="line" style="width: 140px;"></select> | ||
| 44 | + </div> | ||
| 45 | + <div style="margin-top: 10px"></div> | ||
| 46 | + | ||
| 47 | + <div style="display: inline-block;margin-left: 33px;"> | ||
| 48 | + <span class="item-label" style="width: 140px;">开始时间: </span> | ||
| 49 | + <input class="form-control" type="text" id="startDate" style="width: 140px;"/> | ||
| 50 | + </div> | ||
| 51 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 52 | + <span class="item-label" style="width: 140px;">结束时间: </span> | ||
| 53 | + <input class="form-control" type="text" id="endDate" style="width: 140px;"/> | ||
| 54 | + </div> | ||
| 55 | + | ||
| 56 | + <div style="display: inline-block;margin-left: 15px"> | ||
| 57 | + <span class="item-label" style="width: 150px;">统计: </span> | ||
| 58 | + <select class="form-control" name="tjtype" id="tjtype" style="width: 140px;"> | ||
| 59 | + <option value="jsy">驾驶员</option> | ||
| 60 | + <option value="spy">售票员</option> | ||
| 61 | + </select> | ||
| 62 | + | ||
| 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"> | ||
| 73 | + <thead> | ||
| 74 | + <tr> | ||
| 75 | + <th>序号</th> | ||
| 76 | + <th>日期</th> | ||
| 77 | + <th>所属公司</th> | ||
| 78 | + <th>线路</th> | ||
| 79 | + <th>车号</th> | ||
| 80 | + <th>司机职号</th> | ||
| 81 | + <th>司机姓名</th> | ||
| 82 | + <th>售票员职号</th> | ||
| 83 | + <th>售票员姓名</th> | ||
| 84 | + <th>行驶里程(包括空放)</th> | ||
| 85 | + <th>空驶里程</th> | ||
| 86 | + <th>耗油量</th> | ||
| 87 | + <th>加注量</th> | ||
| 88 | + <th>非营业用油</th> | ||
| 89 | + <th>计划公里</th> | ||
| 90 | + </tr> | ||
| 91 | + </thead> | ||
| 92 | + <tbody> | ||
| 93 | + | ||
| 94 | + </tbody> | ||
| 95 | + </table> | ||
| 96 | + </div> | ||
| 97 | + </div> | ||
| 98 | + </div> | ||
| 99 | + </div> | ||
| 100 | +</div> | ||
| 101 | + | ||
| 102 | +<script> | ||
| 103 | + $(function(){ | ||
| 104 | + // 关闭左侧栏 | ||
| 105 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 106 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 107 | + | ||
| 108 | + $("#startDate,#endDate").datetimepicker({ | ||
| 109 | + format : 'YYYY-MM-DD', | ||
| 110 | + locale : 'zh-cn' | ||
| 111 | + }); | ||
| 112 | + var d = new Date(); | ||
| 113 | + var year = d.getFullYear(); | ||
| 114 | + var month = d.getMonth() + 1; | ||
| 115 | + var day = d.getDate(); | ||
| 116 | + if(month < 10) | ||
| 117 | + month = "0" + month; | ||
| 118 | + if(day < 10) | ||
| 119 | + day = "0" + day; | ||
| 120 | + $("#startDate").val(year + "-" + month + "-" + day); | ||
| 121 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 122 | + | ||
| 123 | + | ||
| 124 | + var fage=false; | ||
| 125 | + var xlList; | ||
| 126 | + var obj = []; | ||
| 127 | + | ||
| 128 | + $.get('/report/lineList',function(result){ | ||
| 129 | + xlList=result; | ||
| 130 | + $.get('/user/companyData', function(result){ | ||
| 131 | + obj = result; | ||
| 132 | + var options = ''; | ||
| 133 | + for(var i = 0; i < obj.length; i++){ | ||
| 134 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + if(obj.length ==0){ | ||
| 138 | + $("#gsdmDiv_sing").css('display','none'); | ||
| 139 | + }else if(obj.length ==1){ | ||
| 140 | + $("#gsdmDiv_sing").css('display','none'); | ||
| 141 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 142 | + $('#fgsdmDiv_sing').css('display','none'); | ||
| 143 | + } | ||
| 144 | + $('#gsdmSing').html(options); | ||
| 145 | + updateCompany(); | ||
| 146 | + }); | ||
| 147 | + }) | ||
| 148 | + $("#gsdmSing").on("change",updateCompany); | ||
| 149 | + function updateCompany(){ | ||
| 150 | + var company = $('#gsdmSing').val(); | ||
| 151 | + var options =''; | ||
| 152 | +// var options = '<option value="">全部分公司</option>'; | ||
| 153 | + for(var i = 0; i < obj.length; i++){ | ||
| 154 | + if(obj[i].companyCode == company){ | ||
| 155 | + var children = obj[i].children; | ||
| 156 | + for(var j = 0; j < children.length; j++){ | ||
| 157 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 158 | + } | ||
| 159 | + } | ||
| 160 | + } | ||
| 161 | + $('#fgsdmSing').html(options); | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + var tempData = {}; | ||
| 165 | + $.get('/report/lineList',function(xlList){ | ||
| 166 | + var data = []; | ||
| 167 | + data.push({id: " ", text: "全部线路"}); | ||
| 168 | + $.get('/user/companyData', function(result){ | ||
| 169 | + for(var i = 0; i < result.length; i++){ | ||
| 170 | + var companyCode = result[i].companyCode; | ||
| 171 | + var children = result[i].children; | ||
| 172 | + for(var j = 0; j < children.length; j++){ | ||
| 173 | + var code = children[j].code; | ||
| 174 | + for(var k=0;k < xlList.length;k++ ){ | ||
| 175 | + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){ | ||
| 176 | + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]}); | ||
| 177 | + tempData[xlList[k]["xlbm"]] = companyCode+":"+code; | ||
| 178 | + } | ||
| 179 | + } | ||
| 180 | + } | ||
| 181 | + } | ||
| 182 | + initPinYinSelect2('#line',data,''); | ||
| 183 | + | ||
| 184 | + }); | ||
| 185 | + }); | ||
| 186 | + | ||
| 187 | + $("#line").on("change", function(){ | ||
| 188 | + if($("#line").val() == " "){ | ||
| 189 | + $("#gsdmSing").attr("disabled", false); | ||
| 190 | + $("#fgsdmSing").attr("disabled", false); | ||
| 191 | + } else { | ||
| 192 | + var temp = tempData[$("#line").val()].split(":"); | ||
| 193 | + $("#gsdmSing").val(temp[0]); | ||
| 194 | + updateCompany(); | ||
| 195 | + $("#fgsdmSing").val(temp[1]); | ||
| 196 | +// $("#fgsdmSing").val(""); | ||
| 197 | + $("#gsdmSing").attr("disabled", true); | ||
| 198 | + $("#fgsdmSing").attr("disabled", true); | ||
| 199 | + } | ||
| 200 | + }); | ||
| 201 | + | ||
| 202 | + | ||
| 203 | + $("#query").on("click",function(){ | ||
| 204 | + if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){ | ||
| 205 | + layer.msg("请选择时间!"); | ||
| 206 | + return; | ||
| 207 | + } | ||
| 208 | + var i = layer.load(2); | ||
| 209 | + var params = {}; | ||
| 210 | + params['sfyy'] = $("#sfyy").val(); | ||
| 211 | + params['gsdmSing'] = $("#gsdmSing").val(); | ||
| 212 | + params['fgsdmSing'] = $("#fgsdmSing").val(); | ||
| 213 | + params['line'] = $("#line").val(); | ||
| 214 | + params['startDate'] = $("#startDate").val(); | ||
| 215 | + params['endDate'] = $("#endDate").val(); | ||
| 216 | + params['lpName'] = $("#lpName").val(); | ||
| 217 | + params['tjtype'] = $("#tjtype").val(); | ||
| 218 | + params['spy'] = "zrw"; | ||
| 219 | + | ||
| 220 | + $get("/report/singledatatj",params,function(result){ | ||
| 221 | + layer.close(i); | ||
| 222 | + var singledata = template('singledata',{list:result}); | ||
| 223 | + // 把渲染好的模版html文本追加到表格中 | ||
| 224 | + $('#forms tbody').html(singledata); | ||
| 225 | + | ||
| 226 | + }); | ||
| 227 | + | ||
| 228 | + }); | ||
| 229 | + | ||
| 230 | + $("#export").on("click",function(){ | ||
| 231 | + var params = {}; | ||
| 232 | + params['sfyy'] = $("#sfyy").val(); | ||
| 233 | + params['gsdmSing'] = $("#gsdmSing").val(); | ||
| 234 | + params['fgsdmSing'] = $("#fgsdmSing").val(); | ||
| 235 | + params['line'] = $("#line").val(); | ||
| 236 | + params['startDate'] = $("#startDate").val(); | ||
| 237 | + params['endDate'] = $("#endDate").val(); | ||
| 238 | + params['lpName'] = $("#lpName").val(); | ||
| 239 | + params['tjtype'] = $("#tjtype").val(); | ||
| 240 | + params['spy'] = "zrw"; | ||
| 241 | + var lineName = $('#line option:selected').text(); | ||
| 242 | + if(lineName == "全部线路") | ||
| 243 | + lineName = $('#fgsdmSing option:selected').text(); | ||
| 244 | + | ||
| 245 | + params['lineName'] =lineName; | ||
| 246 | + params['type'] ='export'; | ||
| 247 | + var i = layer.load(2); | ||
| 248 | + $get('/report/singledatatj',params,function(result){ | ||
| 249 | + var exportDate=""; | ||
| 250 | + if( $("#startDate").val()==$("#endDate").val()){ | ||
| 251 | + exportDate=moment($("#startDate").val()).format("YYYYMMDD"); | ||
| 252 | + }else{ | ||
| 253 | + exportDate=moment($("#startDate").val()).format("YYYYMMDD") | ||
| 254 | + +"-"+moment($("#endDate").val()).format("YYYYMMDD"); | ||
| 255 | + | ||
| 256 | + } | ||
| 257 | + console.log("exportDate:"+exportDate); | ||
| 258 | + window.open("/downloadFile/download?fileName=" | ||
| 259 | + +exportDate | ||
| 260 | + +"-"+lineName+"-路单统计"); | ||
| 261 | + layer.close(i); | ||
| 262 | + }); | ||
| 263 | + | ||
| 264 | + }); | ||
| 265 | + }); | ||
| 266 | +</script> | ||
| 267 | +<script type="text/html" id="singledata"> | ||
| 268 | + {{each list as obj i}} | ||
| 269 | + <tr> | ||
| 270 | + <td>{{i+1}}</td> | ||
| 271 | + <td>{{obj.rQ}}</td> | ||
| 272 | + <td>{{obj.gS}}</td> | ||
| 273 | + <td>{{obj.xlmc}}</td> | ||
| 274 | + <td>{{obj.clzbh}}</td> | ||
| 275 | + <td>{{obj.jsy}}</td> | ||
| 276 | + <td>{{obj.jName}}</td> | ||
| 277 | + <td>{{obj.sgh}}</td> | ||
| 278 | + <td>{{obj.sName}}</td> | ||
| 279 | + <td>{{obj.jhlc}}</td> | ||
| 280 | + <td>{{obj.emptMileage}}</td> | ||
| 281 | + <td>{{obj.hyl}}</td> | ||
| 282 | + <td>{{obj.jzl}}</td> | ||
| 283 | + <td>{{obj.unyyyl}}</td> | ||
| 284 | + <td>{{obj.jhjl}}</td> | ||
| 285 | + </tr> | ||
| 286 | + {{/each}} | ||
| 287 | + {{if list.length == 0}} | ||
| 288 | + <tr> | ||
| 289 | + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 290 | + </tr> | ||
| 291 | + {{/if}} | ||
| 292 | +</script> | ||
| 293 | +<script type="text/html" id="singledata2"> | ||
| 294 | + {{each list as obj i}} | ||
| 295 | + <tr> | ||
| 296 | + <td>{{i+1}}</td> | ||
| 297 | + <td>{{obj.rQ}}</td> | ||
| 298 | + <td>{{obj.gS}}</td> | ||
| 299 | + <td>{{obj.xlmc}}</td> | ||
| 300 | + <td>{{obj.clzbh}}</td> | ||
| 301 | + <td></td> | ||
| 302 | + <td></td> | ||
| 303 | + <td>{{obj.sgh}}</td> | ||
| 304 | + <td>{{obj.sName}}</td> | ||
| 305 | + <td>{{obj.jhlc}}</td> | ||
| 306 | + <td>{{obj.emptMileage}}</td> | ||
| 307 | + <td></td> | ||
| 308 | + <td></td> | ||
| 309 | + <td></td> | ||
| 310 | + <td>{{obj.jhjl}}</td> | ||
| 311 | + </tr> | ||
| 312 | + {{/each}} | ||
| 313 | + {{if list.length == 0}} | ||
| 314 | + <tr> | ||
| 315 | + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 316 | + </tr> | ||
| 317 | + {{/if}} | ||
| 318 | +</script> |
src/main/resources/static/pages/oil/list_ph.html
| @@ -242,7 +242,12 @@ | @@ -242,7 +242,12 @@ | ||
| 242 | {{obj.fgsname}} | 242 | {{obj.fgsname}} |
| 243 | </td> | 243 | </td> |
| 244 | <td width="8%"> | 244 | <td width="8%"> |
| 245 | - {{obj.xlname}} | 245 | + {{if obj.linename=='' || obj.linename==null}} |
| 246 | + {{obj.xlname}} | ||
| 247 | + {{else}} | ||
| 248 | + {{obj.linename}} | ||
| 249 | + {{/if}} | ||
| 250 | + | ||
| 246 | </td> | 251 | </td> |
| 247 | <td width="5%"> | 252 | <td width="5%"> |
| 248 | <lable data-id="{{obj.id}}" class="in_carpark_nbbm">{{obj.nbbm}}</lable> | 253 | <lable data-id="{{obj.id}}" class="in_carpark_nbbm">{{obj.nbbm}}</lable> |
| @@ -253,7 +258,11 @@ | @@ -253,7 +258,11 @@ | ||
| 253 | <input data-id="{{obj.id}}" style=" width:100%" type="text" class="in_carpark_jsy" ></input> | 258 | <input data-id="{{obj.id}}" style=" width:100%" type="text" class="in_carpark_jsy" ></input> |
| 254 | <button class="btn btn-sm blue btn-jsyUpdate" style=" width:100%" data-id="{{obj.id}}">填写工号</button> | 259 | <button class="btn btn-sm blue btn-jsyUpdate" style=" width:100%" data-id="{{obj.id}}">填写工号</button> |
| 255 | {{else}} | 260 | {{else}} |
| 256 | - {{obj.jsy}}/{{obj.name}} | 261 | + {{if obj.jname=='' || obj.jname==null}} |
| 262 | + {{obj.jsy}}/{{obj.name}} | ||
| 263 | + {{else}} | ||
| 264 | + {{obj.jsy}}/{{obj.jname}} | ||
| 265 | + {{/if}} | ||
| 257 | {{/if}} | 266 | {{/if}} |
| 258 | 267 | ||
| 259 | </td> | 268 | </td> |
src/main/resources/static/real_control_v2/fragments/north/nav/history_sch/editor.html
| @@ -374,7 +374,7 @@ | @@ -374,7 +374,7 @@ | ||
| 374 | $('[name=bcType]', f).trigger('change'); | 374 | $('[name=bcType]', f).trigger('change'); |
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | - | 377 | + |
| 378 | function initScheduleTypeChange(f, cb) { | 378 | function initScheduleTypeChange(f, cb) { |
| 379 | (function (f, cb) { | 379 | (function (f, cb) { |
| 380 | $('[name=bcType]', f).on('change', function () { | 380 | $('[name=bcType]', f).on('change', function () { |
| @@ -396,7 +396,8 @@ | @@ -396,7 +396,8 @@ | ||
| 396 | var time, mileage; | 396 | var time, mileage; |
| 397 | switch (bcType_e.val()) { | 397 | switch (bcType_e.val()) { |
| 398 | case 'out': | 398 | case 'out': |
| 399 | - qdz.html(park_opts).val(information.carPark); | 399 | + if (gb_sch && gb_sch.qdzCode) qdz.html(park_opts).val(gb_sch.qdzCode); |
| 400 | + else qdz.html(park_opts).val(information.carPark); | ||
| 400 | zdz.html(opts); | 401 | zdz.html(opts); |
| 401 | //出场结束时间 | 402 | //出场结束时间 |
| 402 | time = updown == 0 ? information.upOutTimer : information.downOutTimer; | 403 | time = updown == 0 ? information.upOutTimer : information.downOutTimer; |
| @@ -404,7 +405,8 @@ | @@ -404,7 +405,8 @@ | ||
| 404 | break; | 405 | break; |
| 405 | case 'in': | 406 | case 'in': |
| 406 | qdz.html(opts); | 407 | qdz.html(opts); |
| 407 | - zdz.html(park_opts).val(information.carPark); | 408 | + if (gb_sch && gb_sch.zdzCode) zdz.html(park_opts).val(gb_sch.zdzCode); |
| 409 | + else zdz.html(park_opts).val(information.carPark); | ||
| 408 | //进场结束时间 | 410 | //进场结束时间 |
| 409 | time = updown == 0 ? information.upInTimer : information.downInTimer; | 411 | time = updown == 0 ? information.upInTimer : information.downInTimer; |
| 410 | mileage = updown == 0 ? information.upInMileage : information.downInMileage; | 412 | mileage = updown == 0 ? information.upInMileage : information.downInMileage; |