Commit b8003da34e70e4410cec68da6875aa2569281522

Authored by 潘钊
2 parents 9daf4a0e c8001113

Merge branch 'pudong' of http://222.66.0.204:8090/panzhaov5/bsth_control into pudong

src/main/java/com/bsth/controller/oil/YlbController.java
@@ -210,7 +210,7 @@ public class YlbController extends BaseController<Ylb, Integer>{ @@ -210,7 +210,7 @@ public class YlbController extends BaseController<Ylb, Integer>{
210 return maps; 210 return maps;
211 } 211 }
212 @RequestMapping(value="/oilListMonth") 212 @RequestMapping(value="/oilListMonth")
213 - public List<Ylb> oilListMonth(@RequestParam Map<String, Object> map){ 213 + public List<Map<String, Object>> oilListMonth(@RequestParam Map<String, Object> map){
214 return yblService.oilListMonth(map); 214 return yblService.oilListMonth(map);
215 } 215 }
216 216
src/main/java/com/bsth/repository/oil/YlbRepository.java
@@ -52,7 +52,11 @@ public interface YlbRepository extends BaseRepository&lt;Ylb, Integer&gt;{ @@ -52,7 +52,11 @@ public interface YlbRepository extends BaseRepository&lt;Ylb, Integer&gt;{
52 + " order by nbbm , rq desc,jcsx desc",nativeQuery=true) 52 + " order by nbbm , rq desc,jcsx desc",nativeQuery=true)
53 List<Ylb> listByRqJcsx(String rq,String gsbm,String fgsbm,String xlbm,String nbbm); 53 List<Ylb> listByRqJcsx(String rq,String gsbm,String fgsbm,String xlbm,String nbbm);
54 54
55 - 55 + @Query(value="select * from bsth_c_ylb where rq>=?1 "
  56 + + " and rq<= ?2 and ssgsdm =?3"
  57 + + " and fgsdm =?4 and xlbm like %?5% "
  58 + + " order by nbbm , rq desc,jcsx desc",nativeQuery=true)
  59 + List<Ylb> listByMonthJcsx(String rq,String rq2,String gsbm,String fgsbm,String xlbm);
56 60
57 /** 61 /**
58 * 当天YLB信息 62 * 当天YLB信息
src/main/java/com/bsth/service/oil/YlbService.java
@@ -19,7 +19,7 @@ public interface YlbService extends BaseService&lt;Ylb, Integer&gt;{ @@ -19,7 +19,7 @@ public interface YlbService extends BaseService&lt;Ylb, Integer&gt;{
19 19
20 Map<String, Object> sumYlb(Map<String, Object> map); 20 Map<String, Object> sumYlb(Map<String, Object> map);
21 String checkJsy(Map<String, Object> map); 21 String checkJsy(Map<String, Object> map);
22 - List<Ylb> oilListMonth(Map<String, Object> map); 22 + List<Map<String, Object>> oilListMonth(Map<String, Object> map);
23 List<Ylb> listYlb(Map<String, Object> map); 23 List<Ylb> listYlb(Map<String, Object> map);
24 StringBuffer checkNbmmNum(String rq, String gsbm,String fgsbm,String xlbm,String nbbm,int lx); 24 StringBuffer checkNbmmNum(String rq, String gsbm,String fgsbm,String xlbm,String nbbm,int lx);
25 25
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
@@ -832,7 +832,10 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -832,7 +832,10 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
832 832
833 833
834 @Override 834 @Override
835 - public List<Ylb> oilListMonth(Map<String, Object> map) { 835 + public List<Map<String, Object>> oilListMonth(Map<String, Object> map) {
  836 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  837 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  838 +
836 String type=map.get("type").toString(); 839 String type=map.get("type").toString();
837 String date=map.get("date").toString().trim(); 840 String date=map.get("date").toString().trim();
838 String gsdm=map.get("gsdm").toString(); 841 String gsdm=map.get("gsdm").toString();
@@ -840,7 +843,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -840,7 +843,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
840 String date2=date.substring(0, 8)+"01"; 843 String date2=date.substring(0, 8)+"01";
841 String lineStr=""; 844 String lineStr="";
842 String line =map.get("line").toString().trim(); 845 String line =map.get("line").toString().trim();
843 - if(line !=null && !line.equals("")){ 846 + /*if(line !=null && !line.equals("")){
844 lineStr =" and xlbm= '"+ line +"'"; 847 lineStr =" and xlbm= '"+ line +"'";
845 }else{ 848 }else{
846 lineStr =" and ssgsdm='"+gsdm+"' and fgsdm ='"+fgsdm+"' "; 849 lineStr =" and ssgsdm='"+gsdm+"' and fgsdm ='"+fgsdm+"' ";
@@ -868,23 +871,86 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -868,23 +871,86 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
868 s.setJzyl(rs.getDouble("jzyl")); 871 s.setJzyl(rs.getDouble("jzyl"));
869 return s; 872 return s;
870 } 873 }
871 - }); 874 + }); */
872 875
873 - if(type != null && type.equals("export")){  
874 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),  
875 - sdfSimple = new SimpleDateFormat("yyyyMMdd");  
876 -  
877 - List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();  
878 - for(Ylb ylb : list){  
879 - Map<String, Object> m = new HashMap<String, Object>();  
880 - m.put("nbbm", ylb.getNbbm()!=null?ylb.getNbbm():"");  
881 - m.put("rq", ylb.getRq()!=null?sdfMonth.format(ylb.getRq()):"");  
882 - m.put("jzyl", ylb.getJzyl()!=null?ylb.getJzyl():"");  
883 - mapList.add(m); 876 + double qtyy=0.0;//其他用油
  877 + double cdyy=0.0;//车队用油
  878 + double byyy=0.0;//保养用油
  879 + double cjxx=0.0;//车间小修
  880 + double cjgb=0.0;//车间高保
  881 + double fyyyhj=0.0;//非营运用油合计
  882 + List<Ylb> listYlb=repository.listByMonthJcsx(date2, date, gsdm, fgsdm, line);
  883 +
  884 + Map<String, Object> ms=new HashMap<String,Object>();
  885 + List<Ylb> list=new ArrayList<Ylb>();
  886 + for (int i = 0; i < listYlb.size(); i++) {
  887 + Ylb t=listYlb.get(i);
  888 + fyyyhj =Arith.add(fyyyhj, t.getSh());
  889 + if(t.getShyy()==null){
  890 + qtyy=Arith.add(qtyy, t.getSh());
  891 + }else{
  892 + if(t.getShyy().equals("6")){
  893 + cdyy=Arith.add(cdyy, t.getSh());
  894 + }else if(t.getShyy().equals("2")){
  895 + byyy=Arith.add(byyy, t.getSh());
  896 + }else if(t.getShyy().equals("7")){
  897 + cjxx=Arith.add(cjxx, t.getSh());
  898 + }else if(t.getShyy().equals("8")){
  899 + cjgb=Arith.add(cjgb, t.getSh());
  900 + }else{
  901 + qtyy=Arith.add(qtyy, t.getSh());
  902 + }
  903 + }
  904 + if(ms.get(t.getNbbm())==null){
  905 + ms.put(t.getNbbm(), t.getNbbm());
  906 + list.add(t);
884 } 907 }
  908 + }
  909 +
  910 + List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
  911 + int size = 0;
  912 + Map<String, Object> m_ = new HashMap<String, Object>();
  913 + double ycyhj=0.0;
  914 + for(Ylb ylb : list){
  915 + ycyhj=Arith.add(ycyhj, ylb.getJzyl());
  916 + int x=size%3;
  917 + if(x==0 && size>0){
  918 + mapList.add(m_);
  919 + m_ = new HashMap<String, Object>();
  920 + }
  921 + size++;
  922 + m_.put("xh"+x, size);
  923 + m_.put("nbbm"+x, ylb.getNbbm()!=null?ylb.getNbbm():"");
  924 + m_.put("rq"+x, ylb.getRq()!=null?sdfMonth.format(ylb.getRq()):"");
  925 + m_.put("jzyl"+x, ylb.getJzyl()!=null?ylb.getJzyl():"");
885 926
  927 + }
  928 + if(m_.get("nbbm0")!=null){
  929 + if(m_.get("nbbm1")==null){
  930 + m_.put("xh1", "");
  931 + m_.put("nbbm1" , "");
  932 + m_.put("rq1" , "");
  933 + m_.put("jzyl1" , "");
  934 + }
  935 + if(m_.get("nbbm2")==null){
  936 + m_.put("xh2", "");
  937 + m_.put("nbbm2" , "");
  938 + m_.put("rq2" , "");
  939 + m_.put("jzyl2" , "");
  940 + }
  941 + mapList.add(m_);
  942 + }
  943 +
  944 + if(type != null && type.equals("export")){
886 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 945 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
887 Map<String, Object> m = new HashMap<String, Object>(); 946 Map<String, Object> m = new HashMap<String, Object>();
  947 + m.put("ycyhj", ycyhj);
  948 + m.put("qtyy", qtyy);
  949 + m.put("cdyy", cdyy);
  950 + m.put("byyy", byyy);
  951 + m.put("cjxx", cjxx);
  952 + m.put("cjgb", cjgb);
  953 + m.put("fyyyhj", fyyyhj);
888 ReportUtils ee = new ReportUtils(); 954 ReportUtils ee = new ReportUtils();
889 try { 955 try {
890 listI.add(mapList.iterator()); 956 listI.add(mapList.iterator());
@@ -895,9 +961,15 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -895,9 +961,15 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
895 // TODO: handle exception 961 // TODO: handle exception
896 e.printStackTrace(); 962 e.printStackTrace();
897 } 963 }
  964 + }else{
  965 + m_=new HashMap<String,Object>();
  966 + m_.put("xh0", "99");
  967 + m_.put("nbbm0", "存油合计:"+ycyhj +" 非营运用油: 其他用油:"+qtyy +",车队:"+cdyy+",保养用油:"+byyy
  968 + +",车间(小修):"+cjxx+",车间(高保):"+cjgb+",非营运用油合计:"+fyyyhj);
  969 + mapList.add(m_);
898 } 970 }
899 971
900 - return list; 972 + return mapList;
901 } 973 }
902 974
903 @Override 975 @Override
@@ -1478,7 +1550,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -1478,7 +1550,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1478 } 1550 }
1479 1551
1480 } 1552 }
1481 - 1553 + String nbbmStr="";
1482 List<Ylb> list=new ArrayList<Ylb>(); 1554 List<Ylb> list=new ArrayList<Ylb>();
1483 /* 1555 /*
1484 * 第一步 修改车辆里程 和加注量 1556 * 第一步 修改车辆里程 和加注量
@@ -1592,6 +1664,9 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -1592,6 +1664,9 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1592 t.setLp(maps.get("lpName")==null?"":maps.get("lpName").toString()); 1664 t.setLp(maps.get("lpName")==null?"":maps.get("lpName").toString());
1593 if(!(t.getSsgsdm().equals("") || t.getFgsdm().equals(""))){ 1665 if(!(t.getSsgsdm().equals("") || t.getFgsdm().equals(""))){
1594 if(type.equals("add")){ 1666 if(type.equals("add")){
  1667 + if(nbbmStr.indexOf(t.getNbbm())<0){
  1668 + nbbmStr +=t.getNbbm()+",";
  1669 + }
1595 t.setCreatetime(new Date()); 1670 t.setCreatetime(new Date());
1596 }else{ 1671 }else{
1597 t.setUpdatetime(new Date()); 1672 t.setUpdatetime(new Date());
@@ -1603,10 +1678,92 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -1603,10 +1678,92 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1603 1678
1604 for (int i = 0; i < ylbList_del.size(); i++) { 1679 for (int i = 0; i < ylbList_del.size(); i++) {
1605 Ylb y=ylbList_del.get(i); 1680 Ylb y=ylbList_del.get(i);
  1681 + if(nbbmStr.indexOf(y.getNbbm())<0){
  1682 + nbbmStr +=y.getNbbm()+",";
  1683 + }
1606 repository.delete(y.getId()); 1684 repository.delete(y.getId());
1607 } 1685 }
  1686 +
  1687 + //重新计算删除了的或者新增了的车的车的油耗信息(考虑车辆可能跨线路,从分公司赛选计算)
  1688 + double czyl=0.0;
  1689 + List<Ylb> iterator2=this.listOrderBy(date,gsdm,fgsdm,line,"","nbbm,jcsx");
  1690 + String[] nbbms=nbbmStr.split(",");
  1691 + for (int i = 0; i < nbbms.length; i++) {
  1692 + String clzbm=nbbms[i];
  1693 + // 得到一天总的加油和里程(根据车,时间)
  1694 + List<Object[]> sumList = repository.sumLcYl(clzbm, sdf.parse(date),"",gsdm,fgsdm);
  1695 + // 保存总的加油量
  1696 + Double jzl = 0.0;
  1697 + // 保存总的里程
  1698 + Double zlc = 0.0;
  1699 + for (int j = 0; j < sumList.size(); j++) {
  1700 + jzl = Arith.add(jzl, Double.valueOf(sumList.get(j)[0].toString()));
  1701 + zlc = Arith.add(zlc, Double.valueOf(sumList.get(j)[1].toString()));
  1702 + }
  1703 + // 保留两位小数
  1704 + DecimalFormat df = new DecimalFormat("#.00");
  1705 + Double zyl = 0.0;
  1706 + Double nextJzyl = 0.0;
  1707 + for (int j = 0; j < iterator2.size(); j++) {
  1708 + Ylb t = iterator2.get(j);
  1709 + if(t.getNbbm().equals(clzbm)){
  1710 + if (t.getJcsx() == 1) {
  1711 + // 进场等于出场的操作 既 最后进场存油量等于第一次的出场存油量
  1712 + czyl = t.getCzyl();
  1713 + zyl =jzl;
  1714 + Double yh=0.0;
  1715 + if(zlc>0 ){
  1716 + yh = Double.parseDouble(df.format(zyl * (t.getZlc() / zlc)));
  1717 + }
  1718 + nextJzyl =Arith.sub( Arith.add(t.getJzl(), t.getCzyl()),yh);
  1719 + //把进场油量的小数和整数分别取出
  1720 + if(zlc>0 && t.getZlc()>0){
  1721 + long l=Math.round(nextJzyl);
  1722 + double ylxs=l*100/100;
  1723 + yh=Arith.add(yh, Arith.sub(nextJzyl,ylxs));
  1724 + t.setYh(yh);
  1725 + t.setJzyl(ylxs);
  1726 + nextJzyl=ylxs;
  1727 + }else{
  1728 + t.setYh(yh);
  1729 + t.setJzyl(nextJzyl);
  1730 + }
  1731 + } else {
  1732 + t.setCzyl(nextJzyl);
  1733 + Double yh=0.0;
  1734 + if(zlc>0){
  1735 + yh= Double.parseDouble(df.format(zyl * (t.getZlc() / zlc)));
  1736 + }
  1737 + nextJzyl =Arith.sub( Arith.add(t.getJzl(),nextJzyl),yh);
  1738 + if(zlc>0 && t.getZlc()>0){
  1739 + long l=0l;
  1740 + double ylxs=0.0;
  1741 + if(j==iterator2.size()-1){
  1742 + ylxs=czyl;
  1743 + }else{
  1744 + if(iterator2.get(j+1).getNbbm().equals(t.getNbbm())){
  1745 + l=Math.round(nextJzyl);
  1746 + ylxs=l*100/100;
  1747 + }else{
  1748 + ylxs=czyl;
  1749 + }
  1750 +
  1751 + }
  1752 + yh=Arith.add(yh, Arith.sub(nextJzyl,ylxs));
  1753 + t.setYh(yh);
  1754 + t.setJzyl(ylxs);
  1755 + nextJzyl=ylxs;
  1756 + }else{
  1757 + t.setYh(yh);
  1758 + t.setJzyl(nextJzyl);
  1759 + }
  1760 + }
  1761 + repository.save(t);
  1762 + }
  1763 + }
  1764 + }
  1765 +
1608 //重新统计油车数据结束 1766 //重新统计油车数据结束
1609 -  
1610 1767
1611 1768
1612 //重新获取电耗数据开始 1769 //重新获取电耗数据开始
src/main/resources/static/pages/base/geo_data_edit/main.html
1 -<!DOCTYPE html>  
2 -<html lang="zh-cn">  
3 -  
4 -<head>  
5 - <meta charset="UTF-8">  
6 - <link rel="stylesheet" href="/assets/plugins/uk3.0/uikit.min.css"/>  
7 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" />  
8 - <!-- flatpickr -->  
9 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.css">  
10 - <!-- tooltip css-->  
11 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/qtip/jquery.qtip.min.css" />  
12 - <link rel="stylesheet" href="/real_control_v2/css/pace.css" />  
13 - <style>  
14 - /* ^_^ baidu map hide logo */  
15 - .anchorBL, .anchorBL, .amap-logo, .amap-copyright {  
16 - display: none;  
17 - }  
18 -  
19 - html,body{  
20 - height: 100%;  
21 - }  
22 - .ct_page{  
23 - padding: 0;  
24 - height: 100%;  
25 - }  
26 -  
27 - div#map_wrap{  
28 - height: 100%;  
29 - }  
30 -  
31 - .main_left_panel{  
32 - position: absolute;  
33 - z-index: 999;  
34 - height: calc(100% - 20px);  
35 - width: 300px;  
36 - background: #fffffff5;  
37 - top: 7px;  
38 - left: 5px;  
39 - box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);  
40 - }  
41 - .main_lt_search_panel{  
42 - position: absolute;  
43 - z-index: 99;  
44 - top: 10px;  
45 - left: 330px;  
46 - background: #fffffff5;  
47 - box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);  
48 - }  
49 - .main_rt_tools_panel{  
50 - position: absolute;  
51 - z-index: 99;  
52 - top: 7px;  
53 - right: 7px;  
54 - background: #ffffff;  
55 - box-shadow: -5px 4px 15px rgba(90, 90, 90, 0.48);  
56 - padding: 0 12px;  
57 - text-align: center;  
58 - border-radius: 7px;  
59 - height: 28px;  
60 - }  
61 -  
62 - .main_rt_tools_panel>._icon{  
63 - margin: 0 9px;  
64 - }  
65 - .search_input{  
66 - width: 250px;  
67 - height: 42px;  
68 - }  
69 -  
70 - .search_input::placeholder{  
71 - color: grey;  
72 - font-size: 12px;  
73 - }  
74 - </style>  
75 -</head>  
76 -  
77 -<body>  
78 -<div class="ct_page" >  
79 - <div id="map_wrap">  
80 - </div>  
81 - <div class="main_left_panel">  
82 - <div class="_line_info">  
83 -  
84 - </div>  
85 - </div>  
86 - <div class="main_lt_search_panel">  
87 - <div class="uk-inline">  
88 - <span class="uk-form-icon uk-form-icon-flip" uk-icon="icon: search"></span>  
89 - <input class="uk-input search_input" placeholder="搜索地图位置" type="text">  
90 - </div>  
91 - </div>  
92 - <div class="main_rt_tools_panel">  
93 - <a uk-icon="icon: info;ratio: .9" class="_icon"></a>  
94 - <a uk-icon="icon: expand;ratio: .9" class="_icon"></a>  
95 - </div>  
96 -</div>  
97 -<!-- 百度 -->  
98 -<script src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script>  
99 -<script src="/metronic_v4.5.4/plugins/jquery.min.js"></script>  
100 -<script src="/assets/plugins/uk3.0/uikit.min.js"></script>  
101 -<script src="/assets/plugins/uk3.0/uikit-icons.min.js"></script>  
102 -<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" ></script>  
103 -<!-- EventProxy -->  
104 -<script src="/assets/js/eventproxy.js"></script>  
105 -<!-- art-template 模版引擎 -->  
106 -<script src="/assets/plugins/template.js"></script>  
107 -<script src="/real_control_v2/assets/plugins/moment/moment.min.js"></script>  
108 -<!-- jquery.serializejson JSON序列化插件 -->  
109 -<script src="/assets/plugins/jquery.serializejson.js" merge="plugins"></script>  
110 -<!-- flatpickr -->  
111 -<script src="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.js" ></script>  
112 -<script src="/real_control_v2/assets/plugins/flatpickr/l10n/zh.js" ></script>  
113 -<!-- qtip -->  
114 -<script src="/real_control_v2/assets/plugins/qtip/jquery.qtip.min.js" ></script>  
115 -<script>  
116 - top.document.title = "绘制线路";  
117 - // 关闭左侧栏  
118 - if (!top.$('body').hasClass('page-sidebar-closed')) {top.$('.menu-toggler.sidebar-toggler').click();}  
119 -  
120 - //初始化地图  
121 - if(!window.BMap){  
122 - alert('地图没有加载成功,请确认是否能正常连接外网!!');  
123 - }  
124 - var gb_map_consts = {  
125 - mapContainer: '#map_wrap',  
126 - center_point: {  
127 - lng: 121.544336,  
128 - lat: 31.221315  
129 - }  
130 - };  
131 -  
132 - map = new BMap.Map($(gb_map_consts.mapContainer)[0]);  
133 - //map.setMapStyle({style:'dark'});  
134 - //中心点和缩放级别  
135 - map.centerAndZoom(new BMap.Point(gb_map_consts.center_point.lng, gb_map_consts.center_point.lat), 13);  
136 - map.enableScrollWheelZoom();  
137 -</script>  
138 -</body> 1 +<!DOCTYPE html>
  2 +<html lang="zh-cn">
  3 +
  4 +<head>
  5 + <meta charset="UTF-8">
  6 + <link rel="stylesheet" href="/assets/plugins/uk3.0/uikit.min.css"/>
  7 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" />
  8 + <!-- flatpickr -->
  9 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.css">
  10 + <!-- tooltip css-->
  11 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/qtip/jquery.qtip.min.css" />
  12 + <link rel="stylesheet" href="/real_control_v2/css/pace.css" />
  13 + <style>
  14 + /* ^_^ baidu map hide logo */
  15 + .anchorBL, .anchorBL, .amap-logo, .amap-copyright {
  16 + display: none;
  17 + }
  18 +
  19 + html,body{
  20 + height: 100%;
  21 + }
  22 + .ct_page{
  23 + padding: 0;
  24 + height: 100%;
  25 + }
  26 +
  27 + div#map_wrap{
  28 + height: 100%;
  29 + }
  30 +
  31 + .main_left_panel{
  32 + position: absolute;
  33 + z-index: 999;
  34 + height: calc(100% - 20px);
  35 + width: 300px;
  36 + background: #fffffff5;
  37 + top: 7px;
  38 + left: 5px;
  39 + box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);
  40 + }
  41 + .main_lt_search_panel{
  42 + position: absolute;
  43 + z-index: 99;
  44 + top: 10px;
  45 + left: 330px;
  46 + background: #fffffff5;
  47 + box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);
  48 + }
  49 + .main_rt_tools_panel{
  50 + position: absolute;
  51 + z-index: 99;
  52 + top: 7px;
  53 + right: 7px;
  54 + background: #ffffff;
  55 + box-shadow: -5px 4px 15px rgba(90, 90, 90, 0.48);
  56 + padding: 0 12px;
  57 + text-align: center;
  58 + border-radius: 7px;
  59 + height: 28px;
  60 + }
  61 +
  62 + .main_rt_tools_panel>._icon{
  63 + margin: 0 9px;
  64 + }
  65 + .search_input{
  66 + width: 250px;
  67 + height: 42px;
  68 + }
  69 +
  70 + .search_input::placeholder{
  71 + color: grey;
  72 + font-size: 12px;
  73 + }
  74 + </style>
  75 +</head>
  76 +
  77 +<body>
  78 +<div class="ct_page" >
  79 + <div id="map_wrap">
  80 + </div>
  81 + <div class="main_left_panel">
  82 + <div class="_line_info">
  83 +
  84 + </div>
  85 + </div>
  86 + <div class="main_lt_search_panel">
  87 + <div class="uk-inline">
  88 + <span class="uk-form-icon uk-form-icon-flip" uk-icon="icon: search"></span>
  89 + <input class="uk-input search_input" placeholder="搜索地图位置" type="text">
  90 + </div>
  91 + </div>
  92 + <div class="main_rt_tools_panel">
  93 + <a uk-icon="icon: info;ratio: .9" class="_icon"></a>
  94 + <a uk-icon="icon: expand;ratio: .9" class="_icon"></a>
  95 + </div>
  96 +</div>
  97 +<!-- 百度 -->
  98 +<script src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script>
  99 +<script src="/metronic_v4.5.4/plugins/jquery.min.js"></script>
  100 +<script src="/assets/plugins/uk3.0/uikit.min.js"></script>
  101 +<script src="/assets/plugins/uk3.0/uikit-icons.min.js"></script>
  102 +<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" ></script>
  103 +<!-- EventProxy -->
  104 +<script src="/assets/js/eventproxy.js"></script>
  105 +<!-- art-template 模版引擎 -->
  106 +<script src="/assets/plugins/template.js"></script>
  107 +<script src="/real_control_v2/assets/plugins/moment/moment.min.js"></script>
  108 +<!-- jquery.serializejson JSON序列化插件 -->
  109 +<script src="/assets/plugins/jquery.serializejson.js" merge="plugins"></script>
  110 +<!-- flatpickr -->
  111 +<script src="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.js" ></script>
  112 +<script src="/real_control_v2/assets/plugins/flatpickr/l10n/zh.js" ></script>
  113 +<!-- qtip -->
  114 +<script src="/real_control_v2/assets/plugins/qtip/jquery.qtip.min.js" ></script>
  115 +<script>
  116 + top.document.title = "绘制线路";
  117 + // 关闭左侧栏
  118 + if (!top.$('body').hasClass('page-sidebar-closed')) {top.$('.menu-toggler.sidebar-toggler').click();}
  119 +
  120 + //初始化地图
  121 + if(!window.BMap){
  122 + alert('地图没有加载成功,请确认是否能正常连接外网!!');
  123 + }
  124 + var gb_map_consts = {
  125 + mapContainer: '#map_wrap',
  126 + center_point: {
  127 + lng: 121.544336,
  128 + lat: 31.221315
  129 + }
  130 + };
  131 +
  132 + map = new BMap.Map($(gb_map_consts.mapContainer)[0]);
  133 + //map.setMapStyle({style:'dark'});
  134 + //中心点和缩放级别
  135 + map.centerAndZoom(new BMap.Point(gb_map_consts.center_point.lng, gb_map_consts.center_point.lat), 13);
  136 + map.enableScrollWheelZoom();
  137 +</script>
  138 +</body>
139 </html> 139 </html>
140 \ No newline at end of file 140 \ No newline at end of file
src/main/resources/static/pages/forms/mould/oilListMonth.xls
No preview for this file type
src/main/resources/static/pages/oil/list_ph.html
@@ -58,6 +58,11 @@ @@ -58,6 +58,11 @@
58 <li><a href="javascript:;" data-action="3" class="tool-action" 58 <li><a href="javascript:;" data-action="3" class="tool-action"
59 id="export"> <i class="fa fa-file-excel-o"></i> 导出Excel 59 id="export"> <i class="fa fa-file-excel-o"></i> 导出Excel
60 </a></li> 60 </a></li>
  61 +
  62 +<!-- <li class="divider"></li> -->
  63 +<!-- <li><a href="javascript:;" data-action="3" class="tool-action" -->
  64 +<!-- id="cxtj"> <i class="fa fa-file-excel-o"></i> 导出Excel -->
  65 +<!-- </a></li> -->
61 </ul> 66 </ul>
62 </div> 67 </div>
63 </div> 68 </div>
@@ -214,6 +219,9 @@ @@ -214,6 +219,9 @@
214 <button type="button" class="btn btn-circle saveButton" > 219 <button type="button" class="btn btn-circle saveButton" >
215 <i class="fa fa-check-circle"></i> 保存 220 <i class="fa fa-check-circle"></i> 保存
216 </button> 221 </button>
  222 + <button type="button" class="btn btn-circle saveButton" >
  223 + <i class="fa fa-check-circle"></i> 保存
  224 + </button>
217 </div> 225 </div>
218 </div> 226 </div>
219 227
@@ -963,6 +971,17 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep @@ -963,6 +971,17 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
963 971
964 } 972 }
965 // } 973 // }
  974 +
  975 +// $("#cxtj").on("click", function () {
  976 +// if ($("#rq").val() != "") {
  977 +// // var params=getParamsList();
  978 +// $post('/ylb/updateHistory', {date:'2017-10-01',line:'10845',gsdm:'55',fgsdm:'3'}, function (result) {
  979 +// window.open("/downloadFile/download?fileName="+$("#rq").val()+"进出场存油量" );
  980 +// });
  981 +// } else {
  982 +// layer.msg('请选择日期.');
  983 +// }
  984 +// });
966 985
967 //导出 986 //导出
968 987
src/main/resources/static/pages/report/oil/oilListMonth.html
@@ -69,15 +69,6 @@ @@ -69,15 +69,6 @@
69 <td>日期</td> 69 <td>日期</td>
70 <td>存油</td> 70 <td>存油</td>
71 71
72 - <td>序号</td>  
73 - <td>车号</td>  
74 - <td>日期</td>  
75 - <td>存油</td>  
76 -  
77 - <td>序号</td>  
78 - <td>车号</td>  
79 - <td>日期</td>  
80 - <td>存油</td>  
81 </tr> 72 </tr>
82 </thead> 73 </thead>
83 74
@@ -139,10 +130,8 @@ @@ -139,10 +130,8 @@
139 var xlList; 130 var xlList;
140 $.get('/report/lineList',function(result){ 131 $.get('/report/lineList',function(result){
141 xlList=result; 132 xlList=result;
142 -  
143 $.get('/user/companyData', function(result){ 133 $.get('/user/companyData', function(result){
144 obj = result; 134 obj = result;
145 - console.log(obj);  
146 var options = ''; 135 var options = '';
147 for(var i = 0; i < obj.length; i++){ 136 for(var i = 0; i < obj.length; i++){
148 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; 137 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
@@ -226,9 +215,6 @@ @@ -226,9 +215,6 @@
226 var gsdm = $("#gsdm").val(); 215 var gsdm = $("#gsdm").val();
227 var fgsdm = $("#fgsdm").val(); 216 var fgsdm = $("#fgsdm").val();
228 $get('/ylb/oilListMonth',{line:line,date:date,gsdm:gsdm,fgsdm,fgsdm,type:'query'},function(result){ 217 $get('/ylb/oilListMonth',{line:line,date:date,gsdm:gsdm,fgsdm,fgsdm,type:'query'},function(result){
229 -// $.each(result, function(i, obj) {  
230 -// obj.rq = moment(obj.rq).format("DD");  
231 -// });  
232 var oilListMonth = template('oilListMonth',{list:result}); 218 var oilListMonth = template('oilListMonth',{list:result});
233 $('#forms tbody').html(oilListMonth); 219 $('#forms tbody').html(oilListMonth);
234 }); 220 });
@@ -252,16 +238,29 @@ @@ -252,16 +238,29 @@
252 </script> 238 </script>
253 <script type="text/html" id="oilListMonth"> 239 <script type="text/html" id="oilListMonth">
254 {{each list as obj i}} 240 {{each list as obj i}}
255 - {{if i%5 == 0}} 241 +
256 <tr> 242 <tr>
257 - {{/if}}  
258 - <td>{{i+1}}</td>  
259 - <td>{{obj.nbbm}}</td>  
260 - <td>{{obj.rq}}</td>  
261 - <td>{{obj.jzyl}}</td>  
262 - {{if (i+1)%5 == 0}} 243 + {{if obj.xh0==99}}
  244 + <td colspan="12">
  245 + {{obj.nbbm0}}
  246 + </td>
  247 + {{else}}
  248 + <td>{{obj.xh0}}</td>
  249 + <td>{{obj.nbbm0}}</td>
  250 + <td>{{obj.rq0}}</td>
  251 + <td>{{obj.jzyl0}}</td>
  252 + <td>{{obj.xh1}}</td>
  253 + <td>{{obj.nbbm1}}</td>
  254 + <td>{{obj.rq1}}</td>
  255 + <td>{{obj.jzyl1}}</td>
  256 + <td>{{obj.xh2}}</td>
  257 + <td>{{obj.nbbm2}}</td>
  258 + <td>{{obj.rq2}}</td>
  259 + <td>{{obj.jzyl2}}</td>
  260 + {{/if}}
  261 +
263 </tr> 262 </tr>
264 - {{/if}} 263 +
265 {{/each}} 264 {{/each}}
266 {{if list.length == 0}} 265 {{if list.length == 0}}
267 <tr> 266 <tr>