Commit 19d2ac06725e604645b05409f165acf838de45ba
1 parent
942ba0ad
行车路单区分油电
路单油量查询加线路条件 电量导入加字段 电量清分修改 调度指令报表修改
Showing
22 changed files
with
745 additions
and
131 deletions
src/main/java/com/bsth/controller/schedule/PeopleCarPlanController.java
| @@ -59,4 +59,15 @@ public class PeopleCarPlanController { | @@ -59,4 +59,15 @@ public class PeopleCarPlanController { | ||
| 59 | return peopleCarPlanService.commandState(map); | 59 | return peopleCarPlanService.commandState(map); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | + @RequestMapping(value="/commandByLineList", method = RequestMethod.GET) | ||
| 63 | + public List<Map<String,Object>> commandByLineList(@RequestParam Map<String, Object> map){ | ||
| 64 | + return peopleCarPlanService.commandByLineList(map); | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + @RequestMapping(value="/commandByJghList", method = RequestMethod.GET) | ||
| 68 | + public List<Map<String,Object>> commandByJghList(@RequestParam Map<String, Object> map){ | ||
| 69 | + return peopleCarPlanService.commandByJghList(map); | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + | ||
| 62 | } | 73 | } |
src/main/java/com/bsth/entity/oil/Jdl.java
| @@ -22,6 +22,7 @@ public class Jdl { | @@ -22,6 +22,7 @@ public class Jdl { | ||
| 22 | private String fgsBm; | 22 | private String fgsBm; |
| 23 | private String fgsName; | 23 | private String fgsName; |
| 24 | private String nbbm; | 24 | private String nbbm; |
| 25 | + private String jsy; | ||
| 25 | private Double jdl = 0.0; | 26 | private Double jdl = 0.0; |
| 26 | private String jdz; | 27 | private String jdz; |
| 27 | private String remarks; | 28 | private String remarks; |
| @@ -95,5 +96,13 @@ public class Jdl { | @@ -95,5 +96,13 @@ public class Jdl { | ||
| 95 | public void setCreaterDate(Date createrDate) { | 96 | public void setCreaterDate(Date createrDate) { |
| 96 | this.createrDate = createrDate; | 97 | this.createrDate = createrDate; |
| 97 | } | 98 | } |
| 99 | + public String getJsy() { | ||
| 100 | + return jsy; | ||
| 101 | + } | ||
| 102 | + public void setJsy(String jsy) { | ||
| 103 | + this.jsy = jsy; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + | ||
| 98 | 107 | ||
| 99 | } | 108 | } |
src/main/java/com/bsth/repository/oil/DlbRepository.java
| @@ -93,5 +93,6 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | @@ -93,5 +93,6 @@ 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 | - | 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) |
| 97 | + List<Dlb> queryListDlb(String rq,String nbbm,String jgh,String xlbm); | ||
| 97 | } | 98 | } |
src/main/java/com/bsth/repository/oil/JdlRepository.java
| @@ -17,22 +17,25 @@ public interface JdlRepository extends BaseRepository<Jdl, Integer>{ | @@ -17,22 +17,25 @@ public interface JdlRepository extends BaseRepository<Jdl, Integer>{ | ||
| 17 | @Transactional | 17 | @Transactional |
| 18 | @Modifying | 18 | @Modifying |
| 19 | @Query(value="INSERT INTO bsth_c_jdl("+ | 19 | @Query(value="INSERT INTO bsth_c_jdl("+ |
| 20 | - "gs_bm, gs_name, fgs_bm, fgs_name, rq, nbbm, jdl, jdz, remarks, creater_date)" + | 20 | + "gs_bm, gs_name, fgs_bm, fgs_name, rq, nbbm, jdl, jdz, remarks, creater_date,jsy)" + |
| 21 | " VALUES(" + | 21 | " VALUES(" + |
| 22 | - "?1,?2,?3,?4,str_to_date(?5,'%Y-%m-%d'),?6,?7,?8,?9,str_to_date(?10,'%Y-%m-%d %H:%i:%s'))", nativeQuery=true) | ||
| 23 | - void insertData(String gsbm, String gsName, String fgsbm, String fgsName, String rq, String nbbm, String jdl, String jdz, String remarks, String createrDate); | 22 | + "?1,?2,?3,?4,str_to_date(?5,'%Y-%m-%d'),?6,?7,?8,?9,str_to_date(?10,'%Y-%m-%d %H:%i:%s'),?11)", nativeQuery=true) |
| 23 | + void insertData(String gsbm, String gsName, String fgsbm, String fgsName, String rq, String nbbm, String jdl, String jdz, String remarks, String createrDate,String jsy); | ||
| 24 | 24 | ||
| 25 | - @Query(value="SELECT * FROM bsth_c_jdl where gs_bm = ?1 and fgs_bm = ?2 and rq = ?3 and nbbm like %?4%",nativeQuery=true) | ||
| 26 | - List<Jdl> query(String gsbm, String fgsbm, String rq, String nbbm); | 25 | + @Query(value="SELECT * FROM bsth_c_jdl where gs_bm = ?1 and fgs_bm = ?2 and rq = ?3 and nbbm like %?4% and jsy like %?5%" ,nativeQuery=true) |
| 26 | + List<Jdl> query(String gsbm, String fgsbm, String rq, String nbbm,String jsy); | ||
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | @Query(value="SELECT * FROM bsth_c_jdl where rq = ?",nativeQuery=true) | 29 | @Query(value="SELECT * FROM bsth_c_jdl where rq = ?",nativeQuery=true) |
| 30 | List<Jdl> JdlList( String rq); | 30 | List<Jdl> JdlList( String rq); |
| 31 | 31 | ||
| 32 | - @Query(value="SELECT jdl FROM bsth_c_jdl where gs_bm = ?1 and fgs_bm = ?2 and rq = ?3 and nbbm = ?4 and jdz = ?5",nativeQuery=true) | ||
| 33 | - List<Double> queryBySame(String gsbm, String fgsbm, String rq, String nbbm, String jdz); | 32 | + @Query(value="SELECT jdl FROM bsth_c_jdl where gs_bm = ?1 and fgs_bm = ?2 and rq = ?3 and nbbm = ?4 and jsy = ?5 ",nativeQuery=true) |
| 33 | + List<Double> queryBySame(String gsbm, String fgsbm, String rq, String nbbm, String jsy); | ||
| 34 | 34 | ||
| 35 | - @Query(value="UPDATE bsth_c_jdl set jdl = ?1 where gs_bm = ?2 and fgs_bm = ?3 and rq = ?4 and nbbm = ?5 and jdz = ?6",nativeQuery=true) | ||
| 36 | - void UpdateJdl(String jdl, String gsbm, String fgsbm, String rq, String nbbm, String jdz); | 35 | + |
| 36 | + @Transactional | ||
| 37 | + @Modifying | ||
| 38 | + @Query(value="UPDATE bsth_c_jdl set jdl = ?1 where gs_bm = ?2 and fgs_bm = ?3 and rq = ?4 and nbbm = ?5 and jsy = ?6",nativeQuery=true) | ||
| 39 | + void UpdateJdl(String jdl, String gsbm, String fgsbm, String rq, String nbbm, String jsy); | ||
| 37 | 40 | ||
| 38 | } | 41 | } |
src/main/java/com/bsth/repository/oil/YlbRepository.java
| @@ -62,8 +62,8 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -62,8 +62,8 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 62 | List<Ylb> obtainYl_eq(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); | 62 | List<Ylb> obtainYl_eq(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); |
| 63 | 63 | ||
| 64 | 64 | ||
| 65 | - @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and nbbm =?2 and jsy=?3 ",nativeQuery=true) | ||
| 66 | - List<Ylb> queryListYlb(String rq,String nbbm,String jgh); | 65 | + @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) |
| 66 | + List<Ylb> queryListYlb(String rq,String nbbm,String jgh,String xlbm); | ||
| 67 | 67 | ||
| 68 | @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) | 68 | @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) |
| 69 | List<Ylb> checkYlb(String rq,String nbbm,String jgh,String xlbm,String px); | 69 | List<Ylb> checkYlb(String rq,String nbbm,String jgh,String xlbm,String px); |
| @@ -97,8 +97,6 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -97,8 +97,6 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 97 | * @param xlbm | 97 | * @param xlbm |
| 98 | * @return | 98 | * @return |
| 99 | */ | 99 | */ |
| 100 | - @Transactional | ||
| 101 | - @Modifying | ||
| 102 | @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 " | 100 | @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 " |
| 103 | + " ssgsdm like %?2% " | 101 | + " ssgsdm like %?2% " |
| 104 | + " and fgsdm like %?3%" | 102 | + " and fgsdm like %?3%" |
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java
| @@ -158,7 +158,8 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -158,7 +158,8 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 158 | //手动导入没有驾驶员工号 | 158 | //手动导入没有驾驶员工号 |
| 159 | for (int i = 0; i < jdlList.size(); i++) { | 159 | for (int i = 0; i < jdlList.size(); i++) { |
| 160 | Jdl jdl=jdlList.get(i); | 160 | Jdl jdl=jdlList.get(i); |
| 161 | - if(map.get("clZbh").toString().equals(jdl.getNbbm()) ){ | 161 | + if(map.get("clZbh").toString().equals(jdl.getNbbm()) |
| 162 | + &&map.get("jGh").toString().equals(jdl.getJsy())){ | ||
| 162 | jzl+=jdl.getJdl(); | 163 | jzl+=jdl.getJdl(); |
| 163 | } | 164 | } |
| 164 | } | 165 | } |
| @@ -295,10 +296,11 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -295,10 +296,11 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 295 | t.setCzcd(0.0); | 296 | t.setCzcd(0.0); |
| 296 | } | 297 | } |
| 297 | 298 | ||
| 298 | - //手动导入没有驾驶员工号 | 299 | + // |
| 299 | for (int i = 0; i < jdlList.size(); i++) { | 300 | for (int i = 0; i < jdlList.size(); i++) { |
| 300 | Jdl jdl=jdlList.get(i); | 301 | Jdl jdl=jdlList.get(i); |
| 301 | - if(map.get("clZbh").toString().equals(jdl.getNbbm()) ){ | 302 | + if(map.get("clZbh").toString().equals(jdl.getNbbm()) |
| 303 | + &&map.get("jGh").toString().equals(jdl.getJsy())){ | ||
| 302 | jzl+=jdl.getJdl(); | 304 | jzl+=jdl.getJdl(); |
| 303 | } | 305 | } |
| 304 | } | 306 | } |
| @@ -314,10 +316,10 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -314,10 +316,10 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 314 | } | 316 | } |
| 315 | 317 | ||
| 316 | t.setCdl(jzl); | 318 | t.setCdl(jzl); |
| 317 | - if(type.equals("add")){ | 319 | +// if(type.equals("add")){ |
| 318 | t.setHd(jzl); | 320 | t.setHd(jzl); |
| 319 | t.setJzcd(t.getCzcd()); | 321 | t.setJzcd(t.getCzcd()); |
| 320 | - } | 322 | +// } |
| 321 | 323 | ||
| 322 | t.setNbbm(map.get("clZbh").toString()); | 324 | t.setNbbm(map.get("clZbh").toString()); |
| 323 | t.setJsy(map.get("jGh")==null?"":map.get("jGh").toString()); | 325 | t.setJsy(map.get("jGh")==null?"":map.get("jGh").toString()); |
src/main/java/com/bsth/service/oil/impl/JdlServiceImpl.java
| @@ -59,11 +59,11 @@ public class JdlServiceImpl extends BaseServiceImpl<Jdl, Integer> implements Jdl | @@ -59,11 +59,11 @@ public class JdlServiceImpl extends BaseServiceImpl<Jdl, Integer> implements Jdl | ||
| 59 | text += ","; | 59 | text += ","; |
| 60 | continue; | 60 | continue; |
| 61 | } | 61 | } |
| 62 | - text += cell.getStringCellValue() + ","; | 62 | + text += String.valueOf(cell) + ","; |
| 63 | } | 63 | } |
| 64 | String[] split = (text+";").split(","); | 64 | String[] split = (text+";").split(","); |
| 65 | String str = ""; | 65 | String str = ""; |
| 66 | - for(int j = 0; j < split.length && j < 5; j++){ | 66 | + for(int j = 0; j < split.length && j < 6; j++){ |
| 67 | str += split[j]; | 67 | str += split[j]; |
| 68 | } | 68 | } |
| 69 | if(str.trim().length() == 0) | 69 | if(str.trim().length() == 0) |
| @@ -73,23 +73,24 @@ public class JdlServiceImpl extends BaseServiceImpl<Jdl, Integer> implements Jdl | @@ -73,23 +73,24 @@ public class JdlServiceImpl extends BaseServiceImpl<Jdl, Integer> implements Jdl | ||
| 73 | for(int i = 0; i < textList.size(); i++){ | 73 | for(int i = 0; i < textList.size(); i++){ |
| 74 | String text = textList.get(i); | 74 | String text = textList.get(i); |
| 75 | String[] split = text.split(","); | 75 | String[] split = text.split(","); |
| 76 | - String rq = split[0]; | ||
| 77 | - String nbbm = split[1]; | ||
| 78 | - double jdl = Double.valueOf(split[2].trim().length()!=0?split[2]:"0"); | ||
| 79 | - String jdz = split[3]; | ||
| 80 | - String remarks = split[4]; | 76 | + String rq = split[0].trim(); |
| 77 | + String nbbm = split[1].trim(); | ||
| 78 | + String jsy= split[2].trim(); | ||
| 79 | + double jdl = Double.valueOf(split[3].trim().length()!=0?split[3]:"0"); | ||
| 80 | + String jdz = split[4].trim(); | ||
| 81 | + String remarks = split[5].trim(); | ||
| 81 | if(rq.trim().length() == 0){ | 82 | if(rq.trim().length() == 0){ |
| 82 | rq = sdf.format(new Date()); | 83 | rq = sdf.format(new Date()); |
| 83 | } | 84 | } |
| 84 | 85 | ||
| 85 | - List<Double> jdl_ = repository.queryBySame(gsbm, fgsbm, rq, nbbm, jdz); | 86 | + List<Double> jdl_ = repository.queryBySame(gsbm, fgsbm, rq, nbbm, jsy); |
| 86 | 87 | ||
| 87 | if(jdl_.size() == 0){ | 88 | if(jdl_.size() == 0){ |
| 88 | repository.insertData(gsbm, gsName, fgsbm, fgsName, rq, nbbm, | 89 | repository.insertData(gsbm, gsName, fgsbm, fgsName, rq, nbbm, |
| 89 | - df.format(jdl), jdz, remarks, sd.format(new Date())); | 90 | + df.format(jdl), jdz, remarks, sd.format(new Date()),jsy); |
| 90 | }else{ | 91 | }else{ |
| 91 | - jdl += jdl_.get(0); | ||
| 92 | - repository.UpdateJdl(df.format(jdl), gsbm, fgsbm, rq, nbbm, jdz); | 92 | +// jdl += jdl_.get(0); |
| 93 | + repository.UpdateJdl(df.format(jdl), gsbm, fgsbm, rq, nbbm, jsy); | ||
| 93 | } | 94 | } |
| 94 | } | 95 | } |
| 95 | wb.close(); | 96 | wb.close(); |
| @@ -111,8 +112,9 @@ public class JdlServiceImpl extends BaseServiceImpl<Jdl, Integer> implements Jdl | @@ -111,8 +112,9 @@ public class JdlServiceImpl extends BaseServiceImpl<Jdl, Integer> implements Jdl | ||
| 111 | String fgsbm = map.get("fgsbm").toString(); | 112 | String fgsbm = map.get("fgsbm").toString(); |
| 112 | String rq = map.get("rq").toString(); | 113 | String rq = map.get("rq").toString(); |
| 113 | String nbbm = map.get("nbbm").toString(); | 114 | String nbbm = map.get("nbbm").toString(); |
| 115 | + String jsy =map.get("jsy").toString(); | ||
| 114 | Integer page = Integer.valueOf(map.containsKey("page")?map.get("page").toString():"0"); | 116 | Integer page = Integer.valueOf(map.containsKey("page")?map.get("page").toString():"0"); |
| 115 | - List<Jdl> query = repository.query(gsbm, fgsbm, rq, nbbm); | 117 | + List<Jdl> query = repository.query(gsbm, fgsbm, rq, nbbm,jsy); |
| 116 | 118 | ||
| 117 | if(!map.containsKey("type")){ | 119 | if(!map.containsKey("type")){ |
| 118 | 120 |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -24,6 +24,7 @@ import com.bsth.data.utils.CustomStringUtils; | @@ -24,6 +24,7 @@ import com.bsth.data.utils.CustomStringUtils; | ||
| 24 | import com.bsth.entity.Cars; | 24 | import com.bsth.entity.Cars; |
| 25 | import com.bsth.entity.Line; | 25 | import com.bsth.entity.Line; |
| 26 | import com.bsth.entity.Personnel; | 26 | import com.bsth.entity.Personnel; |
| 27 | +import com.bsth.entity.oil.Dlb; | ||
| 27 | import com.bsth.entity.oil.Ylb; | 28 | import com.bsth.entity.oil.Ylb; |
| 28 | import com.bsth.entity.oil.Ylxxb; | 29 | import com.bsth.entity.oil.Ylxxb; |
| 29 | import com.bsth.entity.realcontrol.ChildTaskPlan; | 30 | import com.bsth.entity.realcontrol.ChildTaskPlan; |
| @@ -37,6 +38,7 @@ import com.bsth.entity.schedule.SchedulePlanInfo; | @@ -37,6 +38,7 @@ import com.bsth.entity.schedule.SchedulePlanInfo; | ||
| 37 | import com.bsth.entity.sys.DutyEmployee; | 38 | import com.bsth.entity.sys.DutyEmployee; |
| 38 | import com.bsth.entity.sys.SysUser; | 39 | import com.bsth.entity.sys.SysUser; |
| 39 | import com.bsth.repository.LineRepository; | 40 | import com.bsth.repository.LineRepository; |
| 41 | +import com.bsth.repository.oil.DlbRepository; | ||
| 40 | import com.bsth.repository.oil.YlbRepository; | 42 | import com.bsth.repository.oil.YlbRepository; |
| 41 | import com.bsth.repository.oil.YlxxbRepository; | 43 | import com.bsth.repository.oil.YlxxbRepository; |
| 42 | import com.bsth.repository.realcontrol.ChildTaskPlanRepository; | 44 | import com.bsth.repository.realcontrol.ChildTaskPlanRepository; |
| @@ -133,6 +135,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -133,6 +135,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 133 | 135 | ||
| 134 | @Autowired | 136 | @Autowired |
| 135 | YlbRepository ylbRepository; | 137 | YlbRepository ylbRepository; |
| 138 | + | ||
| 139 | + @Autowired | ||
| 140 | + DlbRepository dlbRepository; | ||
| 136 | 141 | ||
| 137 | @Autowired | 142 | @Autowired |
| 138 | ReportService reposrService; | 143 | ReportService reposrService; |
| @@ -903,13 +908,18 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -903,13 +908,18 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 903 | e.printStackTrace(); | 908 | e.printStackTrace(); |
| 904 | } | 909 | } |
| 905 | } | 910 | } |
| 906 | - | 911 | + String xls=""; |
| 912 | + if(map.get("type").toString().equals("0")){ | ||
| 913 | + xls="waybill_minhang.xls"; | ||
| 914 | + }else{ | ||
| 915 | + xls="waybill_minhang_dl.xls"; | ||
| 916 | + } | ||
| 907 | 917 | ||
| 908 | 918 | ||
| 909 | String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | 919 | String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; |
| 910 | 920 | ||
| 911 | list.add(listMap.iterator()); | 921 | list.add(listMap.iterator()); |
| 912 | - ee.excelReplace(list, new Object[]{scheduleRealInfos.get(0),map}, path + "mould/waybill_minhang.xls", | 922 | + ee.excelReplace(list, new Object[]{scheduleRealInfos.get(0),map}, path + "mould/"+xls, |
| 913 | path + "export/" + date + "-" + jName + "-" + clZbh + "-" + lpName + "-行车路单.xls"); | 923 | path + "export/" + date + "-" + jName + "-" + clZbh + "-" + lpName + "-行车路单.xls"); |
| 914 | return scheduleRealInfos; | 924 | return scheduleRealInfos; |
| 915 | } | 925 | } |
| @@ -3573,27 +3583,42 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3573,27 +3583,42 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3573 | ScheduleRealInfo s = scheduleRealInfoRepository.scheduleById(id); | 3583 | ScheduleRealInfo s = scheduleRealInfoRepository.scheduleById(id); |
| 3574 | String xlbm = s.getXlBm(); | 3584 | String xlbm = s.getXlBm(); |
| 3575 | String fcrq = s.getScheduleDateStr(); | 3585 | String fcrq = s.getScheduleDateStr(); |
| 3576 | - List<Ylxxb> listYlxxb = ylxxbRepository.queryListYlxxb(s.getClZbh(), fcrq); | ||
| 3577 | - Double jzl = 0.0; | ||
| 3578 | - for (int t = 0; t < listYlxxb.size(); t++) { | ||
| 3579 | - Ylxxb y = listYlxxb.get(t); | ||
| 3580 | - jzl = Arith.add(jzl, y.getJzl()); | ||
| 3581 | - } | ||
| 3582 | 3586 | ||
| 3583 | - List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh()); | 3587 | + int type=0; |
| 3584 | Double ccyl = 0.0; | 3588 | Double ccyl = 0.0; |
| 3585 | Double jcyl = 0.0; | 3589 | Double jcyl = 0.0; |
| 3586 | Double yh = 0.0; | 3590 | Double yh = 0.0; |
| 3587 | - for (int i = 0; i < listYlb.size(); i++) { | ||
| 3588 | - Ylb y = listYlb.get(i); | ||
| 3589 | - ccyl=Arith.add(ccyl, y.getCzyl()); | ||
| 3590 | - jcyl=Arith.add(jcyl, y.getJzyl()); | ||
| 3591 | - yh =Arith.add(yh ,y.getYh()); | 3591 | + Double jzl = 0.0; |
| 3592 | + List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(),xlbm); | ||
| 3593 | + List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(),xlbm); | ||
| 3594 | + if(listYlb.size()>0){ | ||
| 3595 | + type=0; | ||
| 3596 | + for (int i = 0; i < listYlb.size(); i++) { | ||
| 3597 | + Ylb y = listYlb.get(i); | ||
| 3598 | + ccyl=Arith.add(ccyl, y.getCzyl()); | ||
| 3599 | + jcyl=Arith.add(jcyl, y.getJzyl()); | ||
| 3600 | + yh =Arith.add(yh ,y.getYh()); | ||
| 3601 | + jzl =Arith.add(jzl, y.getJzl()); | ||
| 3602 | + } | ||
| 3603 | + }else{ | ||
| 3604 | + type=1; | ||
| 3605 | + for (int i = 0; i < listDlb.size(); i++) { | ||
| 3606 | + Dlb d=listDlb.get(i); | ||
| 3607 | + ccyl=Arith.add(ccyl, d.getCzcd()); | ||
| 3608 | + jcyl=Arith.add(jcyl, d.getJzcd()); | ||
| 3609 | + yh =Arith.add(yh ,d.getHd()); | ||
| 3610 | + jzl =Arith.add(jzl, d.getCdl()); | ||
| 3611 | + } | ||
| 3592 | } | 3612 | } |
| 3613 | + | ||
| 3614 | + | ||
| 3615 | + | ||
| 3593 | map.put("jzl", jzl); | 3616 | map.put("jzl", jzl); |
| 3594 | map.put("yh", yh); | 3617 | map.put("yh", yh); |
| 3595 | map.put("ccyl", ccyl); | 3618 | map.put("ccyl", ccyl); |
| 3596 | map.put("jcyl", jcyl); | 3619 | map.put("jcyl", jcyl); |
| 3620 | + map.put("type", type); | ||
| 3621 | + | ||
| 3597 | map.put("xlName", s.getXlName()); | 3622 | map.put("xlName", s.getXlName()); |
| 3598 | map.put("clZbh", s.getClZbh()); | 3623 | map.put("clZbh", s.getClZbh()); |
| 3599 | map.put("plate", BasicData.nbbmCompanyPlateMap.get(s.getClZbh())); | 3624 | map.put("plate", BasicData.nbbmCompanyPlateMap.get(s.getClZbh())); |
| @@ -3861,7 +3886,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3861,7 +3886,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3861 | } | 3886 | } |
| 3862 | 3887 | ||
| 3863 | dataList2.add(tempMap); | 3888 | dataList2.add(tempMap); |
| 3864 | - | 3889 | +/* |
| 3865 | size = 0; | 3890 | size = 0; |
| 3866 | tempMap = new HashMap<String, Object>(); | 3891 | tempMap = new HashMap<String, Object>(); |
| 3867 | for (ScheduleRealInfo schedule : list3) { | 3892 | for (ScheduleRealInfo schedule : list3) { |
| @@ -3907,8 +3932,97 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3907,8 +3932,97 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3907 | tempMap.put("remarks" + size, ""); | 3932 | tempMap.put("remarks" + size, ""); |
| 3908 | } | 3933 | } |
| 3909 | } | 3934 | } |
| 3935 | +*/ | ||
| 3936 | + | ||
| 3937 | + size = 0; | ||
| 3938 | + tempMap = new HashMap<String, Object>(); | ||
| 3939 | + for (ScheduleRealInfo schedule : list3) { | ||
| 3940 | + int x=size%3; | ||
| 3941 | + if(x==0 && size>0){ | ||
| 3942 | + dataList3.add(tempMap); | ||
| 3943 | + tempMap = new HashMap<String, Object>(); | ||
| 3944 | + } | ||
| 3945 | + tempMap.put("lpName" + x, schedule.getLpName()); | ||
| 3946 | + tempMap.put("qdzName" + x, schedule.getQdzName()); | ||
| 3947 | + tempMap.put("zdsj" + x, schedule.getZdsj()); | ||
| 3948 | + String zdsjActual=schedule.getZdsjActual() != null ? schedule.getZdsjActual() : ""; | ||
| 3949 | + tempMap.put("zdsjActual" + x, zdsjActual); | ||
| 3950 | + | ||
| 3951 | + String zdsjk=""; | ||
| 3952 | + String zdsjm=""; | ||
| 3953 | + if(!zdsjActual.equals("")){ | ||
| 3954 | + String[] zdsj_s=schedule.getZdsj().split(":"); | ||
| 3955 | + String[] zdsjActual_s=zdsjActual.split(":"); | ||
| 3956 | + Long zdsj_=Long.parseLong(zdsj_s[0])*60+Long.parseLong(zdsj_s[1]); | ||
| 3957 | + Long zdsjActual_=Long.parseLong(zdsjActual_s[0])*60+Long.parseLong(zdsjActual_s[1]); | ||
| 3958 | + if((zdsj_-zdsjActual_)>0){ | ||
| 3959 | + zdsjm =String.valueOf(zdsj_-zdsjActual_); | ||
| 3960 | + }else{ | ||
| 3961 | + zdsjk =String.valueOf(zdsj_-zdsjActual_); | ||
| 3962 | + } | ||
| 3963 | + } | ||
| 3964 | + tempMap.put("zdsjk" + x, zdsjk); | ||
| 3965 | + tempMap.put("zdsjm" + x, zdsjm); | ||
| 3966 | + tempMap.put("fcsj" + x, schedule.getFcsj()); | ||
| 3967 | + String fcsjActural=schedule.getFcsjActual() != null ? schedule.getFcsjActual() : ""; | ||
| 3968 | + String bcType=schedule.getBcType()!=null?schedule.getBcType():""; | ||
| 3969 | + String fcsjActuralstr=""; | ||
| 3970 | + if(bcType.equals("in")){ | ||
| 3971 | + fcsjActuralstr=fcsjActural+"(进)"; | ||
| 3972 | + } | ||
| 3973 | + if(bcType.equals("out")){ | ||
| 3974 | + fcsjActuralstr=fcsjActural+"(出)"; | ||
| 3975 | + } | ||
| 3976 | + tempMap.put("fcsjActual" + x, fcsjActuralstr); | ||
| 3977 | + String fcsjk=""; | ||
| 3978 | + String fcsjm=""; | ||
| 3979 | + if(!fcsjActural.equals("")){ | ||
| 3980 | + String[] zdsj_s=schedule.getFcsj().split(":"); | ||
| 3981 | + String[] fcsjActural_s=fcsjActural.split(":"); | ||
| 3982 | + Long zdsj_=Long.parseLong(zdsj_s[0])*60+Long.parseLong(zdsj_s[1]); | ||
| 3983 | + Long fcsjActural_=Long.parseLong(fcsjActural_s[0])*60+Long.parseLong(fcsjActural_s[1]); | ||
| 3984 | + if((zdsj_-fcsjActural_)>0){ | ||
| 3985 | + fcsjm =String.valueOf(zdsj_-fcsjActural_); | ||
| 3986 | + }else{ | ||
| 3987 | + fcsjk =String.valueOf(zdsj_-fcsjActural_); | ||
| 3988 | + } | ||
| 3989 | + } | ||
| 3990 | + tempMap.put("fcsjk" + x, fcsjk); | ||
| 3991 | + tempMap.put("fcsjm" + x, fcsjm); | ||
| 3992 | + tempMap.put("remarks" + x, schedule.getRemarks() != null ? schedule.getRemarks() : ""); | ||
| 3910 | 3993 | ||
| 3911 | - dataList3.add(tempMap); | 3994 | + size++; |
| 3995 | + } | ||
| 3996 | + if(tempMap.get("lpName0")!=null){ | ||
| 3997 | + if(tempMap.get("lpName1")==null){ | ||
| 3998 | + tempMap.put("lpName1" , ""); | ||
| 3999 | + tempMap.put("qdzName1" , ""); | ||
| 4000 | + tempMap.put("zdsj1" , ""); | ||
| 4001 | + tempMap.put("zdsjActual1", ""); | ||
| 4002 | + tempMap.put("zdsjk1", ""); | ||
| 4003 | + tempMap.put("zdsjm1", ""); | ||
| 4004 | + tempMap.put("fcsj1", ""); | ||
| 4005 | + tempMap.put("fcsjActual1", ""); | ||
| 4006 | + tempMap.put("fcsjk1", ""); | ||
| 4007 | + tempMap.put("fcsjm1", ""); | ||
| 4008 | + tempMap.put("remarks1", ""); | ||
| 4009 | + } | ||
| 4010 | + if(tempMap.get("lpName2")==null){ | ||
| 4011 | + tempMap.put("lpName2", ""); | ||
| 4012 | + tempMap.put("qdzName2", ""); | ||
| 4013 | + tempMap.put("zdsj2", ""); | ||
| 4014 | + tempMap.put("zdsjActual2", ""); | ||
| 4015 | + tempMap.put("zdsjk2", ""); | ||
| 4016 | + tempMap.put("zdsjm2", ""); | ||
| 4017 | + tempMap.put("fcsj2", ""); | ||
| 4018 | + tempMap.put("fcsjActual2", ""); | ||
| 4019 | + tempMap.put("fcsjk2", ""); | ||
| 4020 | + tempMap.put("fcsjm2", ""); | ||
| 4021 | + tempMap.put("remarks2", ""); | ||
| 4022 | + } | ||
| 4023 | + dataList3.add(tempMap); | ||
| 4024 | + } | ||
| 4025 | + | ||
| 3912 | 4026 | ||
| 3913 | if (type.equals("export")) { | 4027 | if (type.equals("export")) { |
| 3914 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | 4028 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| @@ -4008,7 +4122,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -4008,7 +4122,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 4008 | String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | 4122 | String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; |
| 4009 | 4123 | ||
| 4010 | list.add(listMap.iterator()); | 4124 | list.add(listMap.iterator()); |
| 4011 | - ee.excelReplace(list, new Object[]{map}, path + "mould/waybill_minhang.xls", | 4125 | + String xls=""; |
| 4126 | + if(map.get("type").toString().equals("0")){ | ||
| 4127 | + xls="waybill_minhang.xls"; | ||
| 4128 | + }else{ | ||
| 4129 | + xls="waybill_minhang_dl.xls"; | ||
| 4130 | + } | ||
| 4131 | + ee.excelReplace(list, new Object[]{map}, path + "mould/"+xls, | ||
| 4012 | path + "export/" + date + "-" + jName + "-" + clZbh + "-" + lpName + "-行车路单.xls"); | 4132 | path + "export/" + date + "-" + jName + "-" + clZbh + "-" + lpName + "-行车路单.xls"); |
| 4013 | // return scheduleRealInfos; | 4133 | // return scheduleRealInfos; |
| 4014 | } | 4134 | } |
src/main/java/com/bsth/service/schedule/PeopleCarPlanService.java
| @@ -20,4 +20,6 @@ public interface PeopleCarPlanService { | @@ -20,4 +20,6 @@ public interface PeopleCarPlanService { | ||
| 20 | List<Map<String, Object>> firstAndLastBus_sum(Map<String, Object> map); | 20 | List<Map<String, Object>> firstAndLastBus_sum(Map<String, Object> map); |
| 21 | 21 | ||
| 22 | List<Map<String, Object>> commandState(Map<String, Object> map); | 22 | List<Map<String, Object>> commandState(Map<String, Object> map); |
| 23 | + List<Map<String, Object>> commandByLineList(Map<String, Object> map); | ||
| 24 | + List<Map<String, Object>> commandByJghList(Map<String, Object> map); | ||
| 23 | } | 25 | } |
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
| @@ -22,6 +22,7 @@ import org.springframework.jdbc.core.JdbcTemplate; | @@ -22,6 +22,7 @@ import org.springframework.jdbc.core.JdbcTemplate; | ||
| 22 | import org.springframework.jdbc.core.RowMapper; | 22 | import org.springframework.jdbc.core.RowMapper; |
| 23 | import org.springframework.stereotype.Service; | 23 | import org.springframework.stereotype.Service; |
| 24 | 24 | ||
| 25 | +import com.bsth.data.BasicData; | ||
| 25 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 26 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 26 | import com.bsth.entity.schedule.SchedulePlanInfo; | 27 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 27 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | 28 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| @@ -1687,7 +1688,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1687,7 +1688,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1687 | return resList; | 1688 | return resList; |
| 1688 | } | 1689 | } |
| 1689 | 1690 | ||
| 1690 | - @Override | 1691 | + /*@Override |
| 1691 | public List<Map<String, Object>> commandState(Map<String, Object> map) { | 1692 | public List<Map<String, Object>> commandState(Map<String, Object> map) { |
| 1692 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 1693 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 1693 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); | 1694 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); |
| @@ -1869,15 +1870,15 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1869,15 +1870,15 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1869 | 1870 | ||
| 1870 | return resList; | 1871 | return resList; |
| 1871 | } | 1872 | } |
| 1872 | - | ||
| 1873 | - /*@Override | 1873 | +*/ |
| 1874 | + @Override | ||
| 1874 | public List<Map<String, Object>> commandState(Map<String, Object> map) { | 1875 | public List<Map<String, Object>> commandState(Map<String, Object> map) { |
| 1875 | // TODO Auto-generated method stub | 1876 | // TODO Auto-generated method stub |
| 1876 | String company = map.get("company").toString(); | 1877 | String company = map.get("company").toString(); |
| 1877 | String subCompany = map.get("subCompany").toString(); | 1878 | String subCompany = map.get("subCompany").toString(); |
| 1878 | - String line = map.get("line").toString(); | 1879 | + String line = map.get("line").toString().trim(); |
| 1879 | String date = map.get("date").toString(); | 1880 | String date = map.get("date").toString(); |
| 1880 | - String code = map.get("code").toString(); | 1881 | +// String code = map.get("code").toString(); |
| 1881 | String type = map.get("type").toString(); | 1882 | String type = map.get("type").toString(); |
| 1882 | 1883 | ||
| 1883 | String sql_="select * from bsth_c_s_sp_info_real " | 1884 | String sql_="select * from bsth_c_s_sp_info_real " |
| @@ -1889,7 +1890,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1889,7 +1890,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1889 | } | 1890 | } |
| 1890 | 1891 | ||
| 1891 | 1892 | ||
| 1892 | - String sql="SELECT r.id,r.schedule_date_str,r.xl_name,r.cl_zbh,r.j_gh,r.j_name," | 1893 | + String sql="SELECT r.id,r.schedule_date_str,r.xl_name,r.xl_bm,r.cl_zbh,r.j_gh,r.j_name," |
| 1893 | + " r.fcsj,d. TIMESTAMP,d.reply46,d.reply47,d.reply46time,d.reply47time," | 1894 | + " r.fcsj,d. TIMESTAMP,d.reply46,d.reply47,d.reply46time,d.reply47time," |
| 1894 | + " r.gs_name,r.fgs_name,CONCAT(r.xl_bm,'_',r.id) as line_sch FROM ("+sql_+") " | 1895 | + " r.gs_name,r.fgs_name,CONCAT(r.xl_bm,'_',r.id) as line_sch FROM ("+sql_+") " |
| 1895 | + " AS r LEFT JOIN bsth_v_directive_60 AS d ON r.id = d.sch AND d.is_dispatch = 1" | 1896 | + " AS r LEFT JOIN bsth_v_directive_60 AS d ON r.id = d.sch AND d.is_dispatch = 1" |
| @@ -1903,6 +1904,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1903,6 +1904,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1903 | map.put("id", rs.getString("id")); | 1904 | map.put("id", rs.getString("id")); |
| 1904 | map.put("date", rs.getString("schedule_date_str")); | 1905 | map.put("date", rs.getString("schedule_date_str")); |
| 1905 | map.put("line", rs.getString("xl_name")); | 1906 | map.put("line", rs.getString("xl_name")); |
| 1907 | + map.put("xlbm", rs.getString("xl_bm")); | ||
| 1906 | map.put("clZbh", rs.getString("cl_zbh")); | 1908 | map.put("clZbh", rs.getString("cl_zbh")); |
| 1907 | map.put("jGh", rs.getString("j_gh")); | 1909 | map.put("jGh", rs.getString("j_gh")); |
| 1908 | map.put("jName", rs.getString("j_name")); | 1910 | map.put("jName", rs.getString("j_name")); |
| @@ -1910,15 +1912,356 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1910,15 +1912,356 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1910 | map.put("timestamp", rs.getString("timestamp")); | 1912 | map.put("timestamp", rs.getString("timestamp")); |
| 1911 | map.put("reply46", rs.getString("reply46")); | 1913 | map.put("reply46", rs.getString("reply46")); |
| 1912 | map.put("reply47", rs.getString("reply47")); | 1914 | map.put("reply47", rs.getString("reply47")); |
| 1913 | - map.put("reply46time", rs.getString("reply46time")); | ||
| 1914 | - map.put("reply47time", rs.getString("reply47time")); | 1915 | + map.put("reply46time", rs.getObject("reply46time")); |
| 1916 | + map.put("reply47time", rs.getObject("reply47time")); | ||
| 1915 | map.put("company", rs.getObject("gs_name")); | 1917 | map.put("company", rs.getObject("gs_name")); |
| 1916 | map.put("subCompany", rs.getObject("fgs_name")); | 1918 | map.put("subCompany", rs.getObject("fgs_name")); |
| 1917 | map.put("lineSch", rs.getString("line_sch")); | 1919 | map.put("lineSch", rs.getString("line_sch")); |
| 1918 | return map; | 1920 | return map; |
| 1919 | } | 1921 | } |
| 1920 | }); | 1922 | }); |
| 1921 | - return null; | ||
| 1922 | - }*/ | 1923 | + List<Map<String, Object>> list_=new ArrayList<Map<String,Object>>(); |
| 1924 | + int jhs = 0,sjs=0,wqr=0; | ||
| 1925 | + Map<String, Object> m_; | ||
| 1926 | + for (int i = 0; i < list.size(); i++) { | ||
| 1927 | + | ||
| 1928 | + Map<String, Object> m=list.get(i); | ||
| 1929 | + if(i==0){ | ||
| 1930 | + jhs ++ ; | ||
| 1931 | + if(m.get("reply46time")==null) | ||
| 1932 | + wqr++; | ||
| 1933 | + | ||
| 1934 | + if(!(m.get("reply46time")==null)) | ||
| 1935 | + sjs++; | ||
| 1936 | + }else{ | ||
| 1937 | + if(m.get("line").toString().equals(list.get(i-1).get("line").toString())){ | ||
| 1938 | + if(!(m.get("lineSch").toString().equals(list.get(i-1).get("lineSch").toString()))){ | ||
| 1939 | + jhs ++ ; | ||
| 1940 | + if(m.get("reply47time")==null) | ||
| 1941 | + wqr++; | ||
| 1942 | + | ||
| 1943 | + if(!(m.get("reply46time")==null)) | ||
| 1944 | + sjs++; | ||
| 1945 | + } | ||
| 1946 | + if(i==list.size()-1){ | ||
| 1947 | + m_=new HashMap<String, Object>(); | ||
| 1948 | + m_.put("company", list.get(i).get("company")); | ||
| 1949 | + m_.put("subCompany", list.get(i).get("subCompany")); | ||
| 1950 | + m_.put("date", date); | ||
| 1951 | + m_.put("line", list.get(i).get("line")); | ||
| 1952 | + m_.put("xlbm", list.get(i).get("xlbm")); | ||
| 1953 | + // m_.put("clZbh", list.get(i).get("clZbh")); | ||
| 1954 | + // m_.put("jsy", list.get(i).get("jGh")+"/"+ list.get(i-1).get("jName")); | ||
| 1955 | + m_.put("jhf", jhs); | ||
| 1956 | + m_.put("sjf", sjs); | ||
| 1957 | + m_.put("wqr", wqr); | ||
| 1958 | + list_.add(m_); | ||
| 1959 | + } | ||
| 1960 | + }else{ | ||
| 1961 | + m_=new HashMap<String, Object>(); | ||
| 1962 | + m_.put("company", list.get(i-1).get("company")); | ||
| 1963 | + m_.put("subCompany", list.get(i-1).get("subCompany")); | ||
| 1964 | + m_.put("date", date); | ||
| 1965 | + m_.put("line", list.get(i-1).get("line")); | ||
| 1966 | + m_.put("xlbm", list.get(i-1).get("xlbm")); | ||
| 1967 | +// m_.put("clZbh", list.get(i-1).get("clZbh")); | ||
| 1968 | +// m_.put("jsy", list.get(i-1).get("jGh")+"/"+ list.get(i).get("jName")); | ||
| 1969 | + m_.put("jhf", jhs); | ||
| 1970 | + m_.put("sjf", sjs); | ||
| 1971 | + m_.put("wqr", wqr); | ||
| 1972 | + list_.add(m_); | ||
| 1973 | + | ||
| 1974 | + jhs =0;sjs=0;wqr=0; | ||
| 1975 | + | ||
| 1976 | + jhs ++ ; | ||
| 1977 | + if(m.get("reply46time")==null) | ||
| 1978 | + wqr++; | ||
| 1979 | + | ||
| 1980 | + if(!(m.get("reply46time")==null)) | ||
| 1981 | + sjs++; | ||
| 1982 | + | ||
| 1983 | + if(i==list.size()-1){ | ||
| 1984 | + m_=new HashMap<String, Object>(); | ||
| 1985 | + m_.put("company", list.get(i).get("company")); | ||
| 1986 | + m_.put("subCompany", list.get(i).get("subCompany")); | ||
| 1987 | + m_.put("date", date); | ||
| 1988 | + m_.put("line", list.get(i).get("line")); | ||
| 1989 | + m_.put("xlbm", list.get(i).get("xlbm")); | ||
| 1990 | +// m_.put("clZbh", list.get(i).get("clZbh")); | ||
| 1991 | +// m_.put("jsy", list.get(i).get("jGh")+"/"+ list.get(i).get("jName")); | ||
| 1992 | + m_.put("jhf", jhs); | ||
| 1993 | + m_.put("sjf", sjs); | ||
| 1994 | + m_.put("wqr", wqr); | ||
| 1995 | + list_.add(m_); | ||
| 1996 | + } | ||
| 1997 | + } | ||
| 1998 | + } | ||
| 1999 | + } | ||
| 2000 | + | ||
| 2001 | + if(type.equals("export")){ | ||
| 2002 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 2003 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 2004 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 2005 | + Map<String,Object> m = new HashMap<String, Object>(); | ||
| 2006 | + ReportUtils ee = new ReportUtils(); | ||
| 2007 | + try { | ||
| 2008 | + listI.add(list_.iterator()); | ||
| 2009 | + String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; | ||
| 2010 | + ee.excelReplace(listI, new Object[] { m }, path+"mould/commandState.xls", | ||
| 2011 | + path+"export/指令状态分析" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | ||
| 2012 | + } catch (Exception e) { | ||
| 2013 | + // TODO: handle exception | ||
| 2014 | + e.printStackTrace(); | ||
| 2015 | + } | ||
| 2016 | + } | ||
| 2017 | + return list_; | ||
| 2018 | + } | ||
| 2019 | + | ||
| 2020 | + @Override | ||
| 2021 | + public List<Map<String, Object>> commandByLineList(Map<String, Object> map) { | ||
| 2022 | + // TODO Auto-generated method stub | ||
| 2023 | + | ||
| 2024 | + String line = map.get("line").toString().trim(); | ||
| 2025 | + String date = map.get("date").toString(); | ||
| 2026 | +// String code = map.get("code").toString(); | ||
| 2027 | + String type = map.get("type").toString(); | ||
| 2028 | + | ||
| 2029 | + String sql_="select * from bsth_c_s_sp_info_real " | ||
| 2030 | + + " WHERE schedule_date_str = '"+date+"' and xl_bm = '"+line+"'"; | ||
| 2031 | + | ||
| 2032 | + | ||
| 2033 | + String sql="SELECT r.id,r.schedule_date_str,r.xl_name,r.xl_bm,r.cl_zbh,r.j_gh,r.j_name," | ||
| 2034 | + + " r.fcsj,d. TIMESTAMP,d.reply46,d.reply47,d.reply46time,d.reply47time," | ||
| 2035 | + + " r.gs_name,r.fgs_name,CONCAT(r.j_gh,'_',r.id) as gh_sch FROM ("+sql_+") " | ||
| 2036 | + + " AS r LEFT JOIN bsth_v_directive_60 AS d ON r.id = d.sch AND d.is_dispatch = 1" | ||
| 2037 | + + " order by r.j_gh,r.cl_zbh,r.id,d.timestamp desc "; | ||
| 2038 | + | ||
| 2039 | + | ||
| 2040 | + List<Map<String, Object>> list = jdbcTemplate.query(sql, | ||
| 2041 | + new RowMapper<Map<String, Object>>(){ | ||
| 2042 | + @Override | ||
| 2043 | + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 2044 | + Map<String, Object> map = new HashMap<String, Object>(); | ||
| 2045 | + map.put("id", rs.getString("id")); | ||
| 2046 | + map.put("date", rs.getString("schedule_date_str")); | ||
| 2047 | + map.put("line", rs.getString("xl_name")); | ||
| 2048 | + map.put("xlbm", rs.getString("xl_bm")); | ||
| 2049 | + map.put("clZbh", rs.getString("cl_zbh")); | ||
| 2050 | + map.put("jGh", rs.getString("j_gh")); | ||
| 2051 | + map.put("jName", rs.getString("j_name")); | ||
| 2052 | + map.put("fcsj", rs.getString("fcsj")); | ||
| 2053 | + map.put("timestamp", rs.getString("timestamp")); | ||
| 2054 | + map.put("reply46", rs.getString("reply46")); | ||
| 2055 | + map.put("reply47", rs.getString("reply47")); | ||
| 2056 | + map.put("reply46time", rs.getObject("reply46time")); | ||
| 2057 | + map.put("reply47time", rs.getObject("reply47time")); | ||
| 2058 | + map.put("company", rs.getObject("gs_name")); | ||
| 2059 | + map.put("subCompany", rs.getObject("fgs_name")); | ||
| 2060 | + map.put("ghSch", rs.getString("gh_sch")); | ||
| 2061 | + return map; | ||
| 2062 | + } | ||
| 2063 | + }); | ||
| 2064 | + | ||
| 2065 | + List<Map<String, Object>> list_=new ArrayList<Map<String,Object>>(); | ||
| 2066 | + int jhs = 0,sjs=0,wqr=0; | ||
| 2067 | + Map<String, Object> m_; | ||
| 2068 | + for (int i = 0; i < list.size(); i++) { | ||
| 2069 | + | ||
| 2070 | + Map<String, Object> m=list.get(i); | ||
| 2071 | + if(i==0){ | ||
| 2072 | + jhs ++ ; | ||
| 2073 | + if(m.get("reply46time")==null) | ||
| 2074 | + wqr++; | ||
| 2075 | + | ||
| 2076 | + if(!(m.get("reply46time")==null)) | ||
| 2077 | + sjs++; | ||
| 2078 | + }else{ | ||
| 2079 | + if(m.get("jGh").toString().equals(list.get(i-1).get("jGh").toString()) | ||
| 2080 | + && m.get("clZbh").toString().equals(list.get(i-1).get("clZbh").toString())){ | ||
| 2081 | + if(!(m.get("ghSch").toString().equals(list.get(i-1).get("ghSch").toString()))){ | ||
| 2082 | + jhs ++ ; | ||
| 2083 | + if(m.get("reply47time")==null) | ||
| 2084 | + wqr++; | ||
| 2085 | + | ||
| 2086 | + if(!(m.get("reply46time")==null)) | ||
| 2087 | + sjs++; | ||
| 2088 | + } | ||
| 2089 | + if(i==list.size()-1){ | ||
| 2090 | + m_=new HashMap<String, Object>(); | ||
| 2091 | + m_.put("company", list.get(i).get("company")); | ||
| 2092 | + m_.put("subCompany", list.get(i).get("subCompany")); | ||
| 2093 | + m_.put("date", date); | ||
| 2094 | + m_.put("line", list.get(i).get("line")); | ||
| 2095 | + m_.put("xlbm", list.get(i).get("xlbm")); | ||
| 2096 | + m_.put("clZbh", list.get(i).get("clZbh")); | ||
| 2097 | + m_.put("jGh", list.get(i).get("jGh")); | ||
| 2098 | + m_.put("jsy", list.get(i).get("jGh")+"/"+ list.get(i).get("jName")); | ||
| 2099 | + m_.put("jhf", jhs); | ||
| 2100 | + m_.put("sjf", sjs); | ||
| 2101 | + m_.put("wqr", wqr); | ||
| 2102 | + list_.add(m_); | ||
| 2103 | + } | ||
| 2104 | + }else{ | ||
| 2105 | + m_=new HashMap<String, Object>(); | ||
| 2106 | + m_.put("company", list.get(i-1).get("company")); | ||
| 2107 | + m_.put("subCompany", list.get(i-1).get("subCompany")); | ||
| 2108 | + m_.put("date", date); | ||
| 2109 | + m_.put("line", list.get(i-1).get("line")); | ||
| 2110 | + m_.put("xlbm", list.get(i-1).get("xlbm")); | ||
| 2111 | + m_.put("clZbh", list.get(i-1).get("clZbh")); | ||
| 2112 | + m_.put("jGh", list.get(i).get("jGh")); | ||
| 2113 | + m_.put("jsy", list.get(i-1).get("jGh")+"/"+ list.get(i-1).get("jName")); | ||
| 2114 | + m_.put("jhf", jhs); | ||
| 2115 | + m_.put("sjf", sjs); | ||
| 2116 | + m_.put("wqr", wqr); | ||
| 2117 | + list_.add(m_); | ||
| 2118 | + | ||
| 2119 | + jhs =0;sjs=0;wqr=0; | ||
| 2120 | + | ||
| 2121 | + jhs ++ ; | ||
| 2122 | + if(m.get("reply46time")==null) | ||
| 2123 | + wqr++; | ||
| 2124 | + | ||
| 2125 | + if(!(m.get("reply46time")==null)) | ||
| 2126 | + sjs++; | ||
| 2127 | + | ||
| 2128 | + if(i==list.size()-1){ | ||
| 2129 | + m_=new HashMap<String, Object>(); | ||
| 2130 | + m_.put("company", list.get(i).get("company")); | ||
| 2131 | + m_.put("subCompany", list.get(i).get("subCompany")); | ||
| 2132 | + m_.put("date", date); | ||
| 2133 | + m_.put("line", list.get(i).get("line")); | ||
| 2134 | + m_.put("xlbm", list.get(i).get("xlbm")); | ||
| 2135 | + m_.put("clZbh", list.get(i).get("clZbh")); | ||
| 2136 | + m_.put("jGh", list.get(i).get("jGh")); | ||
| 2137 | + m_.put("jsy", list.get(i).get("jGh")+"/"+ list.get(i).get("jName")); | ||
| 2138 | + m_.put("jhf", jhs); | ||
| 2139 | + m_.put("sjf", sjs); | ||
| 2140 | + m_.put("wqr", wqr); | ||
| 2141 | + list_.add(m_); | ||
| 2142 | + } | ||
| 2143 | + } | ||
| 2144 | + } | ||
| 2145 | + } | ||
| 2146 | + | ||
| 2147 | + | ||
| 2148 | + if(type.equals("export")){ | ||
| 2149 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 2150 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 2151 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 2152 | + Map<String,Object> m = new HashMap<String, Object>(); | ||
| 2153 | + m.put("xlmc", BasicData.lineId2CodeMap.get(line)); | ||
| 2154 | + ReportUtils ee = new ReportUtils(); | ||
| 2155 | + try { | ||
| 2156 | + listI.add(list_.iterator()); | ||
| 2157 | + String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; | ||
| 2158 | + ee.excelReplace(listI, new Object[] { m }, path+"mould/commandState1.xls", | ||
| 2159 | + path+"export/线路指令状态分析" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | ||
| 2160 | + } catch (Exception e) { | ||
| 2161 | + // TODO: handle exception | ||
| 2162 | + e.printStackTrace(); | ||
| 2163 | + } | ||
| 2164 | + } | ||
| 2165 | + return list_; | ||
| 2166 | + | ||
| 2167 | + } | ||
| 2168 | + | ||
| 2169 | + @Override | ||
| 2170 | + public List<Map<String, Object>> commandByJghList(Map<String, Object> map) { | ||
| 2171 | + // TODO Auto-generated method stub | ||
| 2172 | + | ||
| 2173 | + String line = map.get("line").toString().trim(); | ||
| 2174 | + String date = map.get("date").toString(); | ||
| 2175 | + String jgh = map.get("jgh").toString(); | ||
| 2176 | +// String code = map.get("code").toString(); | ||
| 2177 | + String type = map.get("type").toString(); | ||
| 2178 | + | ||
| 2179 | + String sql_="select * from bsth_c_s_sp_info_real " | ||
| 2180 | + + " WHERE schedule_date_str = '"+date+"' and j_gh = '"+jgh+"'"; | ||
| 2181 | + | ||
| 2182 | + if(!line.equals("")){ | ||
| 2183 | + sql_ +=" and xl_bm = '"+line+"'"; | ||
| 2184 | + } | ||
| 2185 | + | ||
| 2186 | + | ||
| 2187 | + String sql="SELECT r.id,r.schedule_date_str,r.fcsj,r.xl_name,r.xl_bm,r.cl_zbh,r.j_gh,r.j_name," | ||
| 2188 | + + " r.fcsj,d. TIMESTAMP,d.reply46,d.reply47,d.reply46time,d.reply47time," | ||
| 2189 | + + " r.gs_name,r.fgs_name FROM ("+sql_+") " | ||
| 2190 | + + " AS r LEFT JOIN bsth_v_directive_60 AS d ON r.id = d.sch AND d.is_dispatch = 1" | ||
| 2191 | + + " order by r.fcsj,r.cl_zbh desc "; | ||
| 2192 | + | ||
| 2193 | + | ||
| 2194 | + List<Map<String, Object>> list = jdbcTemplate.query(sql, | ||
| 2195 | + new RowMapper<Map<String, Object>>(){ | ||
| 2196 | + @Override | ||
| 2197 | + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 2198 | + Map<String, Object> map = new HashMap<String, Object>(); | ||
| 2199 | + map.put("id", rs.getString("id")); | ||
| 2200 | + map.put("date", rs.getString("schedule_date_str")); | ||
| 2201 | + map.put("fcsj", rs.getString("fcsj")); | ||
| 2202 | + map.put("line", rs.getString("xl_name")); | ||
| 2203 | + map.put("xlbm", rs.getString("xl_bm")); | ||
| 2204 | + map.put("clZbh", rs.getString("cl_zbh")); | ||
| 2205 | + map.put("jGh", rs.getString("j_gh")); | ||
| 2206 | + map.put("jName", rs.getString("j_name")); | ||
| 2207 | + map.put("fcsj", rs.getString("fcsj")); | ||
| 2208 | + map.put("timestamp", rs.getString("timestamp")); | ||
| 2209 | + map.put("reply46", rs.getString("reply46")); | ||
| 2210 | + map.put("reply47", rs.getString("reply47")); | ||
| 2211 | + map.put("reply46time", rs.getObject("reply46time")); | ||
| 2212 | + map.put("reply47time", rs.getObject("reply47time")); | ||
| 2213 | + map.put("company", rs.getObject("gs_name")); | ||
| 2214 | + map.put("subCompany", rs.getObject("fgs_name")); | ||
| 2215 | + return map; | ||
| 2216 | + } | ||
| 2217 | + }); | ||
| 2218 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
| 2219 | + List<Map<String, Object>> list_=new ArrayList<Map<String,Object>>(); | ||
| 2220 | + Map<String, Object> m_; | ||
| 2221 | + for (int i = 0; i < list.size(); i++) { | ||
| 2222 | + Map<String, Object> m=list.get(i); | ||
| 2223 | + m_=new HashMap<String, Object>(); | ||
| 2224 | + m_.put("company", m.get("company")); | ||
| 2225 | + m_.put("subCompany",m.get("subCompany")); | ||
| 2226 | + m_.put("date", date); | ||
| 2227 | + m_.put("line",m.get("line")); | ||
| 2228 | + m_.put("clZbh", m.get("clZbh")); | ||
| 2229 | + m_.put("jsy", m.get("jGh")+"/"+ m.get("jName")); | ||
| 2230 | + m_.put("jfsj", m.get("fcsj")); | ||
| 2231 | + if(m.get("timestamp") != null){ | ||
| 2232 | + m_.put("time", sdf.format(new Date(Long.valueOf(m.get("timestamp").toString())))); | ||
| 2233 | + } else | ||
| 2234 | + m_.put("time", "/"); | ||
| 2235 | + | ||
| 2236 | + if(m.get("reply46time") != null) | ||
| 2237 | + m_.put("time46", sdf.format(new Date(Long.valueOf(m.get("reply46time").toString())))); | ||
| 2238 | + else | ||
| 2239 | + m_.put("time46", "/"); | ||
| 2240 | + | ||
| 2241 | + if(m.get("reply47time") != null) | ||
| 2242 | + m_.put("time47", sdf.format(new Date(Long.valueOf(m.get("reply47time").toString())))); | ||
| 2243 | + else | ||
| 2244 | + m_.put("time47", "/"); | ||
| 2245 | + list_.add(m_); | ||
| 2246 | + } | ||
| 2247 | + | ||
| 2248 | + if(type.equals("export")){ | ||
| 2249 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 2250 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 2251 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 2252 | + Map<String,Object> m = new HashMap<String, Object>(); | ||
| 2253 | + ReportUtils ee = new ReportUtils(); | ||
| 2254 | + try { | ||
| 2255 | + listI.add(list_.iterator()); | ||
| 2256 | + String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; | ||
| 2257 | + ee.excelReplace(listI, new Object[] { m }, path+"mould/commandState2.xls", | ||
| 2258 | + path+"export/指令状态明细" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | ||
| 2259 | + } catch (Exception e) { | ||
| 2260 | + // TODO: handle exception | ||
| 2261 | + e.printStackTrace(); | ||
| 2262 | + } | ||
| 2263 | + } | ||
| 2264 | + return list_; | ||
| 2265 | + } | ||
| 1923 | 2266 | ||
| 1924 | } | 2267 | } |
src/main/resources/static/pages/electricity/jdl/list.html
| @@ -54,7 +54,9 @@ | @@ -54,7 +54,9 @@ | ||
| 54 | <td>内部编码:</td> | 54 | <td>内部编码:</td> |
| 55 | <td> | 55 | <td> |
| 56 | <select class="form-control" name="nbbm" id="nbbm" style="width: 120px;"></select> | 56 | <select class="form-control" name="nbbm" id="nbbm" style="width: 120px;"></select> |
| 57 | - </td> | 57 | + </td> |
| 58 | + <td>驾驶员:</td> | ||
| 59 | + <td><input type="text" style="width: 80px" name="jsy" id="jsy"/></td> | ||
| 58 | <td width="20%"> | 60 | <td width="20%"> |
| 59 | <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right:0px"> | 61 | <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right:0px"> |
| 60 | <i class="fa fa-search"></i> 搜索 | 62 | <i class="fa fa-search"></i> 搜索 |
| @@ -70,7 +72,8 @@ | @@ -70,7 +72,8 @@ | ||
| 70 | <tr role="row" class="heading"> | 72 | <tr role="row" class="heading"> |
| 71 | <th>#</th> | 73 | <th>#</th> |
| 72 | <th>日期</th> | 74 | <th>日期</th> |
| 73 | - <th colspan="2">内部编码</th> | 75 | + <th colspan="2">内部编码</th> |
| 76 | + <th colspan="2">驾驶员</th> | ||
| 74 | <th colspan="2">充电量</th> | 77 | <th colspan="2">充电量</th> |
| 75 | <th colspan="2">充电站</th> | 78 | <th colspan="2">充电站</th> |
| 76 | <th colspan="2">备注</th> | 79 | <th colspan="2">备注</th> |
| @@ -378,7 +381,8 @@ | @@ -378,7 +381,8 @@ | ||
| 378 | {{i + 1}} | 381 | {{i + 1}} |
| 379 | </td> | 382 | </td> |
| 380 | <td>{{obj.rq}}</td> | 383 | <td>{{obj.rq}}</td> |
| 381 | - <td colspan="2">{{obj.nbbm}}</td> | 384 | + <td colspan="2">{{obj.nbbm}}</td> |
| 385 | + <td colspan="2">{{obj.jsy}}</td> | ||
| 382 | <td colspan="2">{{obj.jdl}}</td> | 386 | <td colspan="2">{{obj.jdl}}</td> |
| 383 | <td colspan="2">{{obj.jdz}}</td> | 387 | <td colspan="2">{{obj.jdz}}</td> |
| 384 | <td>{{obj.remarks}}</td> | 388 | <td>{{obj.remarks}}</td> |
src/main/resources/static/pages/electricity/list/list.html
| @@ -419,7 +419,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -419,7 +419,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 419 | }) | 419 | }) |
| 420 | //获取加存信息 | 420 | //获取加存信息 |
| 421 | $("#obtain").on('click', function () { | 421 | $("#obtain").on('click', function () { |
| 422 | - console.log("获取加存"); | ||
| 423 | if ($("#rq").val() != "") { | 422 | if ($("#rq").val() != "") { |
| 424 | var params =getParamsList(); | 423 | var params =getParamsList(); |
| 425 | 424 |
src/main/resources/static/pages/forms/export/import_Jdl.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/commandState.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/commandState1.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/commandState2.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/export_Jdl.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/waybill_minhang_dl.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/commandState.html
| @@ -35,16 +35,17 @@ | @@ -35,16 +35,17 @@ | ||
| 35 | <span class="item-label" style="width: 80px;">分公司: </span> | 35 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 36 | <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select> | 36 | <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select> |
| 37 | </div> | 37 | </div> |
| 38 | + <div style="margin-top: 10px" ></div> | ||
| 38 | <div style="display: inline-block; margin-left: 15px;"> | 39 | <div style="display: inline-block; margin-left: 15px;"> |
| 39 | <span class="item-label" style="width: 80px;">线路: </span> | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| 40 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 41 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| 41 | </div> | 42 | </div> |
| 42 | - <div style="margin-top: 10px" /> | 43 | + |
| 43 | <div style="display: inline-block;margin-left: 15px;"> | 44 | <div style="display: inline-block;margin-left: 15px;"> |
| 44 | - <span class="item-label" style="width: 80px;">时间: </span> | 45 | + <span class="item-label" style="width: 80px;"> 时间: </span> |
| 45 | <input class="form-control" type="text" id="date" style="width: 180px;"/> | 46 | <input class="form-control" type="text" id="date" style="width: 180px;"/> |
| 46 | </div> | 47 | </div> |
| 47 | - <div style="display: inline-block;margin-left: 8px"> | 48 | + <div style="display:none;margin-left: 8px"> |
| 48 | <span class="item-label" style="width: 140px;">内部编码: </span> | 49 | <span class="item-label" style="width: 140px;">内部编码: </span> |
| 49 | <select class="form-control" name="code" id="code" style="width: 180px;"></select> | 50 | <select class="form-control" name="code" id="code" style="width: 180px;"></select> |
| 50 | </div> | 51 | </div> |
| @@ -63,8 +64,6 @@ | @@ -63,8 +64,6 @@ | ||
| 63 | <th>公司</th> | 64 | <th>公司</th> |
| 64 | <th>分公司</th> | 65 | <th>分公司</th> |
| 65 | <th>线路</th> | 66 | <th>线路</th> |
| 66 | - <th>车辆</th> | ||
| 67 | - <th>人员</th> | ||
| 68 | <th>应发</th> | 67 | <th>应发</th> |
| 69 | <th>实发</th> | 68 | <th>实发</th> |
| 70 | <th>未确认</th> | 69 | <th>未确认</th> |
| @@ -76,7 +75,7 @@ | @@ -76,7 +75,7 @@ | ||
| 76 | </table> | 75 | </table> |
| 77 | <div id="box"> </div> | 76 | <div id="box"> </div> |
| 78 | <div id="works_hidden" class="hidden"> | 77 | <div id="works_hidden" class="hidden"> |
| 79 | - <span class="item-label" style="width: 80px;margin-left: 20px;">明细: </span> | 78 | + <!-- <span class="item-label" style="width: 80px;margin-left: 20px;">明细: </span> |
| 80 | <span class="item-label" style="width: 80px;margin-left: 60px;">日期 </span> | 79 | <span class="item-label" style="width: 80px;margin-left: 60px;">日期 </span> |
| 81 | <span class="item-label" style="width: 80px;" id="date1"></span> | 80 | <span class="item-label" style="width: 80px;" id="date1"></span> |
| 82 | <span class="item-label" style="width: 80px;margin-left: 60px;">公司 </span> | 81 | <span class="item-label" style="width: 80px;margin-left: 60px;">公司 </span> |
| @@ -89,19 +88,21 @@ | @@ -89,19 +88,21 @@ | ||
| 89 | <span class="item-label" style="width: 80px;" id="clZbh1"></span> | 88 | <span class="item-label" style="width: 80px;" id="clZbh1"></span> |
| 90 | <span class="item-label" style="width: 80px;margin-left: 60px;">人员 </span> | 89 | <span class="item-label" style="width: 80px;margin-left: 60px;">人员 </span> |
| 91 | <span class="item-label" style="width: 80px;" id="jsy1"></span> | 90 | <span class="item-label" style="width: 80px;" id="jsy1"></span> |
| 92 | - <span class="item-label" style="width: 80px;margin-left: 60px;"></span> | 91 | + <span class="item-label" style="width: 80px;margin-left: 60px;"></span> --> |
| 93 | <input class="btn btn-default" type="button" id="export1" value="导出当前明细"/> | 92 | <input class="btn btn-default" type="button" id="export1" value="导出当前明细"/> |
| 94 | </div> | 93 | </div> |
| 95 | <table class="table table-bordered table-hover table-checkable" id="works"> | 94 | <table class="table table-bordered table-hover table-checkable" id="works"> |
| 96 | <thead> | 95 | <thead> |
| 97 | <tr class="hidden"> | 96 | <tr class="hidden"> |
| 97 | + <th>公司</th> | ||
| 98 | + <th>分公司</th> | ||
| 98 | <th>日期</th> | 99 | <th>日期</th> |
| 99 | <th>线路</th> | 100 | <th>线路</th> |
| 100 | <th>车辆</th> | 101 | <th>车辆</th> |
| 101 | - <th>计划发车时间</th> | ||
| 102 | - <th>发送时间</th> | ||
| 103 | - <th>收到时间</th> | ||
| 104 | - <th>确认时间</th> | 102 | + <th>人员</th> |
| 103 | + <th>应发</th> | ||
| 104 | + <th>实发</th> | ||
| 105 | + <th>未确认</th> | ||
| 105 | </tr> | 106 | </tr> |
| 106 | </thead> | 107 | </thead> |
| 107 | <tbody> | 108 | <tbody> |
| @@ -183,6 +184,7 @@ | @@ -183,6 +184,7 @@ | ||
| 183 | var tempData = {}; | 184 | var tempData = {}; |
| 184 | $.get('/report/lineList',function(xlList){ | 185 | $.get('/report/lineList',function(xlList){ |
| 185 | var data = []; | 186 | var data = []; |
| 187 | + data.push({id: " ", text: "全部线路"}); | ||
| 186 | $.get('/user/companyData', function(result){ | 188 | $.get('/user/companyData', function(result){ |
| 187 | for(var i = 0; i < result.length; i++){ | 189 | for(var i = 0; i < result.length; i++){ |
| 188 | var companyCode = result[i].companyCode; | 190 | var companyCode = result[i].companyCode; |
| @@ -265,6 +267,7 @@ | @@ -265,6 +267,7 @@ | ||
| 265 | var company = $("#company").val(); | 267 | var company = $("#company").val(); |
| 266 | var subCompany = $("#subCompany").val(); | 268 | var subCompany = $("#subCompany").val(); |
| 267 | function jsDoQuery(pagination){ | 269 | function jsDoQuery(pagination){ |
| 270 | + $("#export").removeAttr("disabled"); | ||
| 268 | if($("#date").val() == null || $("#date").val().trim().length == 0){ | 271 | if($("#date").val() == null || $("#date").val().trim().length == 0){ |
| 269 | layer.msg("请选择时间!"); | 272 | layer.msg("请选择时间!"); |
| 270 | return; | 273 | return; |
| @@ -287,29 +290,61 @@ | @@ -287,29 +290,61 @@ | ||
| 287 | $get('/pcpc/commandState', params, function(result){ | 290 | $get('/pcpc/commandState', params, function(result){ |
| 288 | // 把数据填充到模版中 | 291 | // 把数据填充到模版中 |
| 289 | var tbodyHtml = template('list_commandState',{list:result}); | 292 | var tbodyHtml = template('list_commandState',{list:result}); |
| 290 | - list = result; | ||
| 291 | // 把渲染好的模版html文本追加到表格中 | 293 | // 把渲染好的模版html文本追加到表格中 |
| 292 | $('#forms tbody').html(tbodyHtml); | 294 | $('#forms tbody').html(tbodyHtml); |
| 293 | 295 | ||
| 294 | - if(result.length == 0){ | ||
| 295 | - $('#export').attr('disabled', "true"); | ||
| 296 | - } else { | ||
| 297 | - $("#export").removeAttr("disabled"); | ||
| 298 | - } | ||
| 299 | - | ||
| 300 | - $("#works_hidden").removeClass("hidden"); | ||
| 301 | - $("#works .hidden").removeClass("hidden"); | ||
| 302 | - $("#works_hidden").addClass("hidden"); | ||
| 303 | - $("#works").addClass("hidden"); | 296 | + $('.btn-command').on('click', openCommandByLine); |
| 304 | 297 | ||
| 305 | }); | 298 | }); |
| 306 | } | 299 | } |
| 300 | + | ||
| 301 | + var xlbm=""; | ||
| 302 | + function openCommandByLine(){ | ||
| 303 | + var id = $(this).data('id'); | ||
| 304 | + date = $("#date").val(); | ||
| 305 | + xlbm=id; | ||
| 306 | + var params = {}; | ||
| 307 | + params['line'] = id; | ||
| 308 | + params['date'] = date; | ||
| 309 | + params['type'] = "query"; | ||
| 310 | + $("#works .hidden").removeClass("hidden"); | ||
| 311 | + $("#works_hidden").removeClass("hidden"); | ||
| 312 | + $get('/pcpc/commandByLineList',params,function(result){ | ||
| 313 | + var commandByLine = template('list_workList',{list:result}); | ||
| 314 | + $('#works tbody').html(commandByLine); | ||
| 315 | + | ||
| 316 | + $('.btn-command-line').on('click', openCommand); | ||
| 317 | + $("html,body").animate({scrollTop:$("#works").offset().top},1000); | ||
| 318 | + }); | ||
| 319 | + } | ||
| 320 | + | ||
| 321 | + function openCommand(){ | ||
| 322 | + var id = $(this).data('id'); | ||
| 323 | + date = $("#date").val(); | ||
| 324 | + var params = {}; | ||
| 325 | + params['jgh'] = id; | ||
| 326 | + params['date'] = date; | ||
| 327 | + params['line'] =xlbm; | ||
| 328 | + $.get('/pages/forms/statement/commandStateByLine.html', function (content) { | ||
| 329 | + layer.open({ | ||
| 330 | + type: 1, | ||
| 331 | + area: ['800px', '600px'], | ||
| 332 | + content: content, | ||
| 333 | + title: '指令状态分析', | ||
| 334 | + shift: 5, | ||
| 335 | + scrollbar: false, | ||
| 336 | + success: function () { | ||
| 337 | + $('#commandByLineList').trigger('init', params); | ||
| 338 | + } | ||
| 339 | + }); | ||
| 340 | + }); | ||
| 341 | + } | ||
| 342 | + | ||
| 307 | 343 | ||
| 308 | $("#export").on("click",function(){ | 344 | $("#export").on("click",function(){ |
| 309 | var params = {}; | 345 | var params = {}; |
| 310 | params['line'] = line; | 346 | params['line'] = line; |
| 311 | params['date'] = date; | 347 | params['date'] = date; |
| 312 | - params['code'] = code; | ||
| 313 | params['type'] = "export"; | 348 | params['type'] = "export"; |
| 314 | params['company'] = company; | 349 | params['company'] = company; |
| 315 | params['subCompany'] = subCompany; | 350 | params['subCompany'] = subCompany; |
| @@ -318,45 +353,16 @@ | @@ -318,45 +353,16 @@ | ||
| 318 | }); | 353 | }); |
| 319 | }); | 354 | }); |
| 320 | 355 | ||
| 321 | - var jsy = ""; | ||
| 322 | - $("#forms tbody").on("click","a",function(){ | ||
| 323 | - jsy = $(this).html(); | ||
| 324 | - $.each(list, function(i, g){ | ||
| 325 | - if(jsy == g.jsy){ | ||
| 326 | - $("#date1").html(g.date); | ||
| 327 | - $("#line1").html(g.line); | ||
| 328 | - $("#clZbh1").html(g.clZbh); | ||
| 329 | - $("#jsy1").html(g.jsy); | ||
| 330 | - $("#company2").html(g.company); | ||
| 331 | - $("subCompany2").html(g.subCompany); | ||
| 332 | - $("#works_hidden").removeClass("hidden"); | ||
| 333 | - $("#works").removeClass("hidden"); | ||
| 334 | - // 把数据填充到模版中 | ||
| 335 | - var tbodyHtml = template('list_workList',{list:g.workList}); | ||
| 336 | - // 把渲染好的模版html文本追加到表格中 | ||
| 337 | - $('#works tbody').html(tbodyHtml); | ||
| 338 | - } | ||
| 339 | - }); | ||
| 340 | - | ||
| 341 | - $("html,body").animate({scrollTop:$("#box").offset().top},1000); | ||
| 342 | - | ||
| 343 | - }); | ||
| 344 | - | ||
| 345 | $("#export1").on("click",function(){ | 356 | $("#export1").on("click",function(){ |
| 346 | var params = {}; | 357 | var params = {}; |
| 347 | - params['jsy'] = jsy; | ||
| 348 | - params['line'] = line; | 358 | + params['line'] = xlbm; |
| 349 | params['date'] = date; | 359 | params['date'] = date; |
| 350 | - params['code'] = code; | ||
| 351 | - params['type'] = "export1"; | ||
| 352 | - params['company'] = company; | ||
| 353 | - params['subCompany'] = subCompany; | ||
| 354 | - $get('/pcpc/commandState', params, function(result){ | ||
| 355 | - window.open("/downloadFile/download?fileName=指令状态明细"+moment(date).format("YYYYMMDD")); | 360 | + params['type'] = "export"; |
| 361 | + $get('/pcpc/commandByLineList', params, function(result){ | ||
| 362 | + window.open("/downloadFile/download?fileName=线路指令状态分析"+moment(date).format("YYYYMMDD")); | ||
| 356 | }); | 363 | }); |
| 357 | }); | 364 | }); |
| 358 | 365 | ||
| 359 | - | ||
| 360 | }); | 366 | }); |
| 361 | 367 | ||
| 362 | 368 | ||
| @@ -367,9 +373,10 @@ | @@ -367,9 +373,10 @@ | ||
| 367 | <td>{{obj.date}}</td> | 373 | <td>{{obj.date}}</td> |
| 368 | <td>{{obj.company}}</td> | 374 | <td>{{obj.company}}</td> |
| 369 | <td>{{obj.subCompany}}</td> | 375 | <td>{{obj.subCompany}}</td> |
| 370 | - <td>{{obj.line}}</td> | ||
| 371 | - <td>{{obj.clZbh}}</td> | ||
| 372 | - <td><a id="jsy">{{obj.jsy}}</a></td> | 376 | + <td> |
| 377 | + <button type="button" class="btn btn-sm blue btn-command" | ||
| 378 | + data-id="{{obj.xlbm}}">{{obj.line}}</button> | ||
| 379 | + | ||
| 373 | <td>{{obj.jhf}}</td> | 380 | <td>{{obj.jhf}}</td> |
| 374 | <td>{{obj.sjf}}</td> | 381 | <td>{{obj.sjf}}</td> |
| 375 | <td>{{obj.wqr}}</td> | 382 | <td>{{obj.wqr}}</td> |
| @@ -377,7 +384,7 @@ | @@ -377,7 +384,7 @@ | ||
| 377 | {{/each}} | 384 | {{/each}} |
| 378 | {{if list.length == 0}} | 385 | {{if list.length == 0}} |
| 379 | <tr> | 386 | <tr> |
| 380 | - <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td> | 387 | + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> |
| 381 | </tr> | 388 | </tr> |
| 382 | {{/if}} | 389 | {{/if}} |
| 383 | </script> | 390 | </script> |
| @@ -385,18 +392,23 @@ | @@ -385,18 +392,23 @@ | ||
| 385 | <script type="text/html" id="list_workList"> | 392 | <script type="text/html" id="list_workList"> |
| 386 | {{each list as obj i}} | 393 | {{each list as obj i}} |
| 387 | <tr> | 394 | <tr> |
| 388 | - <td>{{obj.date}}</td> | ||
| 389 | - <td>{{obj.line}}</td> | ||
| 390 | - <td>{{obj.clZbh}}</td> | ||
| 391 | - <td>{{obj.fcsj}}</td> | ||
| 392 | - <td>{{obj.time}}</td> | ||
| 393 | - <td>{{obj.time46}}</td> | ||
| 394 | - <td>{{obj.time47}}</td> | 395 | + <td>{{obj.company}}</td> |
| 396 | + <td>{{obj.subCompany}}</td> | ||
| 397 | + <td>{{obj.date}}</td> | ||
| 398 | + <td>{{obj.line}}</td> | ||
| 399 | + <td>{{obj.clZbh}}</td> | ||
| 400 | + <td> | ||
| 401 | + <button type="button" class="btn btn-sm blue btn-command-line" | ||
| 402 | + data-id="{{obj.jGh}}">{{obj.jsy}}</button> | ||
| 403 | + </td> | ||
| 404 | + <td>{{obj.jhf}}</td> | ||
| 405 | + <td>{{obj.sjf}}</td> | ||
| 406 | + <td>{{obj.wqr}}</td> | ||
| 395 | </tr> | 407 | </tr> |
| 396 | {{/each}} | 408 | {{/each}} |
| 397 | {{if list.length == 0}} | 409 | {{if list.length == 0}} |
| 398 | <tr> | 410 | <tr> |
| 399 | - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> | 411 | + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td> |
| 400 | </tr> | 412 | </tr> |
| 401 | {{/if}} | 413 | {{/if}} |
| 402 | </script> | 414 | </script> |
| 403 | \ No newline at end of file | 415 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/commandStateByLine.html
0 → 100644
| 1 | +<style type="text/css"> | ||
| 2 | + .table-bordered { | ||
| 3 | + border: 1px solid; } | ||
| 4 | + .table-bordered > thead > tr > th, | ||
| 5 | + .table-bordered > thead > tr > td, | ||
| 6 | + .table-bordered > tbody > tr > th, | ||
| 7 | + .table-bordered > tbody > tr > td, | ||
| 8 | + .table-bordered > tfoot > tr > th, | ||
| 9 | + .table-bordered > tfoot > tr > td { | ||
| 10 | + border: 1px solid; } | ||
| 11 | + .table-bordered > thead > tr > th, | ||
| 12 | + .table-bordered > thead > tr > td { | ||
| 13 | + border-bottom-width: 2px; } | ||
| 14 | + | ||
| 15 | + .table > tbody + tbody { | ||
| 16 | + border-top: 1px solid; } | ||
| 17 | +</style> | ||
| 18 | + | ||
| 19 | +<div class="page-head"> | ||
| 20 | + <div class="page-title" style="margin-left: 20px"> | ||
| 21 | + <button id="exportList">数据导出</button> | ||
| 22 | + </div> | ||
| 23 | +</div> | ||
| 24 | + | ||
| 25 | +<div class="row" id="commandByLineList"> | ||
| 26 | + <div class="col-md-12"> | ||
| 27 | + <div class="portlet light porttlet-fit bordered"> | ||
| 28 | + <div class="portlet-body"> | ||
| 29 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 600px"> | ||
| 30 | + <table class="table table-bordered table-hover table-checkable" id="forms_1"> | ||
| 31 | + <thead> | ||
| 32 | + <tr> | ||
| 33 | + <td>公司</td> | ||
| 34 | + <td>分公司</td> | ||
| 35 | + <td>日期</td> | ||
| 36 | + <td>线路</td> | ||
| 37 | + <td>车辆</td> | ||
| 38 | + <td>人员</td> | ||
| 39 | + <td>计划发车时间</td> | ||
| 40 | + <td>发送时间</td> | ||
| 41 | + <td>收到时间</td> | ||
| 42 | + <td>确认时间</td> | ||
| 43 | + </tr> | ||
| 44 | + </thead> | ||
| 45 | + | ||
| 46 | + <tbody> | ||
| 47 | + | ||
| 48 | + </tbody> | ||
| 49 | + </table> | ||
| 50 | + </div> | ||
| 51 | + </div> | ||
| 52 | + </div> | ||
| 53 | + </div> | ||
| 54 | +</div> | ||
| 55 | + | ||
| 56 | +<script> | ||
| 57 | + $(function(){ | ||
| 58 | + // 关闭左侧栏 | ||
| 59 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 60 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 61 | + var params_; | ||
| 62 | + $("#commandByLineList").on('init', function (e, params) { | ||
| 63 | + params['type']='export'; | ||
| 64 | + params_=params; | ||
| 65 | + console.log(params.date); | ||
| 66 | + $get('/pcpc/commandByJghList',params,function(result){ | ||
| 67 | + var commandByLine = template('commandByLine',{list:result}); | ||
| 68 | + $('#forms_1 tbody').html(commandByLine); | ||
| 69 | + }); | ||
| 70 | + }) | ||
| 71 | + $("#exportList").on('click',function(){ | ||
| 72 | + $get('/pcpc/commandByLineList', params_, function(result){ | ||
| 73 | + window.open("/downloadFile/download?fileName=指令状态明细"+moment(params_.date).format("YYYYMMDD")); | ||
| 74 | + }); | ||
| 75 | + }); | ||
| 76 | + | ||
| 77 | + | ||
| 78 | + }); | ||
| 79 | +</script> | ||
| 80 | +<script type="text/html" id="commandByLine"> | ||
| 81 | + {{each list as obj i}} | ||
| 82 | + <tr> | ||
| 83 | + <td>{{obj.company}}</td> | ||
| 84 | + <td>{{obj.subCompany}}</td> | ||
| 85 | + <td>{{obj.date}}</td> | ||
| 86 | + <td>{{obj.line}}</td> | ||
| 87 | + <td>{{obj.clZbh}}</td> | ||
| 88 | + <td>{{obj.jsy}}</td> | ||
| 89 | + <td>{{obj.jfsj}}</td> | ||
| 90 | + <td>{{obj.time}}</td> | ||
| 91 | + <td>{{obj.time46}}</td> | ||
| 92 | + <td>{{obj.time47}}</td> | ||
| 93 | + </tr> | ||
| 94 | + {{/each}} | ||
| 95 | + {{if list.length == 0}} | ||
| 96 | + <tr> | ||
| 97 | + <td colspan="10"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 98 | + </tr> | ||
| 99 | + {{/if}} | ||
| 100 | +</script> | ||
| 0 | \ No newline at end of file | 101 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/waybill.html
| @@ -417,11 +417,20 @@ | @@ -417,11 +417,20 @@ | ||
| 417 | <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}}({{plate}}) 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派:{{dbdp}} 日期:{{scheduleDate}}</td> | 417 | <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}}({{plate}}) 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派:{{dbdp}} 日期:{{scheduleDate}}</td> |
| 418 | </tr> | 418 | </tr> |
| 419 | <tr> | 419 | <tr> |
| 420 | + {{if type==0}} | ||
| 420 | <td colspan="2">出场存油 {{ccyl}}升</td> | 421 | <td colspan="2">出场存油 {{ccyl}}升</td> |
| 421 | <td colspan="2">加注量 {{jzl}}升</td> | 422 | <td colspan="2">加注量 {{jzl}}升</td> |
| 422 | <td colspan="2">进场存油 {{jcyl}}升</td> | 423 | <td colspan="2">进场存油 {{jcyl}}升</td> |
| 423 | <td colspan="4">加注机油 升</td> | 424 | <td colspan="4">加注机油 升</td> |
| 424 | <td colspan="4">本日耗油 {{yh}}升</td> | 425 | <td colspan="4">本日耗油 {{yh}}升</td> |
| 426 | + {{/if}} | ||
| 427 | + {{if type==1}} | ||
| 428 | + <td colspan="2">出场存电 {{ccyl}}%</td> | ||
| 429 | + <td colspan="2">充电量 {{jzl}}度</td> | ||
| 430 | + <td colspan="2">进场存电 {{jcyl}}%</td> | ||
| 431 | + <td colspan="4">加注机油 升</td> | ||
| 432 | + <td colspan="4">本日耗电 {{yh}}度</td> | ||
| 433 | + {{/if}} | ||
| 425 | </tr> | 434 | </tr> |
| 426 | <tr> | 435 | <tr> |
| 427 | <td rowspan="2">调度章</td> | 436 | <td rowspan="2">调度章</td> |
src/main/resources/static/pages/report/sheet/sheetList.html
| @@ -242,7 +242,6 @@ | @@ -242,7 +242,6 @@ | ||
| 242 | } | 242 | } |
| 243 | function openSheetList(){ | 243 | function openSheetList(){ |
| 244 | var id = $(this).data('id'); | 244 | var id = $(this).data('id'); |
| 245 | - console.log(id); | ||
| 246 | $.get('/pages/report/sheet/list.html', function (content) { | 245 | $.get('/pages/report/sheet/list.html', function (content) { |
| 247 | layer.open({ | 246 | layer.open({ |
| 248 | type: 1, | 247 | type: 1, |