Commit b5963449b049eed5bbda9d4a13618dc8699628db

Authored by 廖磊
1 parent e466ea40

嘉定统计日报导出修改

src/main/java/com/bsth/service/jdtest/impl/JdtestServiceImpl.java
@@ -66,7 +66,7 @@ public class JdtestServiceImpl implements JdtestService { @@ -66,7 +66,7 @@ public class JdtestServiceImpl implements JdtestService {
66 + " GROUP_CONCAT(p.`name`) as linename from (select nbbm,xlbm,linename from bsth_c_ylb " 66 + " GROUP_CONCAT(p.`name`) as linename from (select nbbm,xlbm,linename from bsth_c_ylb "
67 + " where rq='"+rq+"' and ssgsdm='"+gsdm+"' and fgsdm='"+fgsdm+"' group by nbbm,xlbm,linename) o " 67 + " where rq='"+rq+"' and ssgsdm='"+gsdm+"' and fgsdm='"+fgsdm+"' group by nbbm,xlbm,linename) o "
68 + " LEFT JOIN bsth_c_line p on o.xlbm=p.line_code group by o.nbbm ) v on u.nbbm=v.nbbm) c " 68 + " LEFT JOIN bsth_c_line p on o.xlbm=p.line_code group by o.nbbm ) v on u.nbbm=v.nbbm) c "
69 - + " on a.nbbm=c.nbbm where 1=1"; 69 + + " on a.nbbm=c.nbbm where 1=1 ";
70 if(!nbbm.equals("")){ 70 if(!nbbm.equals("")){
71 sql +=" and a.nbbm like '%"+nbbm+"%'"; 71 sql +=" and a.nbbm like '%"+nbbm+"%'";
72 } 72 }
@@ -76,6 +76,7 @@ public class JdtestServiceImpl implements JdtestService { @@ -76,6 +76,7 @@ public class JdtestServiceImpl implements JdtestService {
76 if(type){ 76 if(type){
77 sql +=" and c.xlbm is not null"; 77 sql +=" and c.xlbm is not null";
78 } 78 }
  79 + sql +=" order by xlname desc";
79 80
80 List<Ylxxb> yList= jdbcTemplate.query(sql, 81 List<Ylxxb> yList= jdbcTemplate.query(sql,
81 new RowMapper<Ylxxb>(){ 82 new RowMapper<Ylxxb>(){
@@ -144,6 +145,16 @@ public class JdtestServiceImpl implements JdtestService { @@ -144,6 +145,16 @@ public class JdtestServiceImpl implements JdtestService {
144 List<ScheduleRealInfo> sList; 145 List<ScheduleRealInfo> sList;
145 List<ScheduleRealInfo> jList; 146 List<ScheduleRealInfo> jList;
146 List<ScheduleRealInfo> lists=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(map.get("line").toString(), map.get("date").toString()); 147 List<ScheduleRealInfo> lists=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(map.get("line").toString(), map.get("date").toString());
  148 + double jzyl_z=0.0;
  149 + double czyl_z=0.0;
  150 + double jzl_z=0.0;
  151 + double yh_z=0.0;
  152 + int jhbc_z=0;
  153 + double jhlc_z=0.0;
  154 + int sjbc_z=0;
  155 + double sjzlc_z=0.0;
  156 + double kszlc_z=0.0;
  157 + double zlc_z=0.0;
147 for(int i=0;i<list.size();i++){ 158 for(int i=0;i<list.size();i++){
148 sList =new ArrayList<ScheduleRealInfo>(); 159 sList =new ArrayList<ScheduleRealInfo>();
149 jList =new ArrayList<ScheduleRealInfo>(); 160 jList =new ArrayList<ScheduleRealInfo>();
@@ -169,9 +180,13 @@ public class JdtestServiceImpl implements JdtestService { @@ -169,9 +180,13 @@ public class JdtestServiceImpl implements JdtestService {
169 } 180 }
170 } 181 }
171 m.put("jzyl",jzyl); 182 m.put("jzyl",jzyl);
  183 + jzyl_z=Arith.add(jzyl, jzyl_z);
172 m.put("czyl", czyl); 184 m.put("czyl", czyl);
  185 + czyl_z=Arith.add(czyl, czyl_z);
173 m.put("jzl", jzl); 186 m.put("jzl", jzl);
  187 + jzl_z=Arith.add(jzl, jzl_z);
174 m.put("yh", yh); 188 m.put("yh", yh);
  189 + yh_z=Arith.add(yh, yh_z);
175 m.put("rylx", rylx); 190 m.put("rylx", rylx);
176 m.put("dh", ""); 191 m.put("dh", "");
177 for (int j = 0; j < lists.size(); j++) { 192 for (int j = 0; j < lists.size(); j++) {
@@ -195,19 +210,20 @@ public class JdtestServiceImpl implements JdtestService { @@ -195,19 +210,20 @@ public class JdtestServiceImpl implements JdtestService {
195 m.put("jName", jList.get(0).getjName()); 210 m.put("jName", jList.get(0).getjName());
196 211
197 int jhbc=culateMileageService.culateJhbc(jList, ""); 212 int jhbc=culateMileageService.culateJhbc(jList, "");
  213 + jhbc_z=jhbc+jhbc_z;
198 double jhlc=culateMileageService.culateJhgl(jList); 214 double jhlc=culateMileageService.culateJhgl(jList);
199 - 215 + jhlc_z=Arith.add(jhlc, jhlc_z);
200 int sjbc=culateMileageService.culateSjbc(sList, "")+culateMileageService.culateLjbc(sList, ""); 216 int sjbc=culateMileageService.culateSjbc(sList, "")+culateMileageService.culateLjbc(sList, "");
201 double ljgl=culateMileageService.culateLjgl(sList); 217 double ljgl=culateMileageService.culateLjgl(sList);
202 double sjgl=culateMileageService.culateSjgl(sList); 218 double sjgl=culateMileageService.culateSjgl(sList);
203 double sjzlc=Arith.add(ljgl, sjgl); 219 double sjzlc=Arith.add(ljgl, sjgl);
204 - 220 + sjzlc_z=Arith.add(sjzlc, sjzlc_z);
205 double ksgl=culateMileageService.culateKsgl(sList); 221 double ksgl=culateMileageService.culateKsgl(sList);
206 double jccgl=culateMileageService.culateJccgl(sList); 222 double jccgl=culateMileageService.culateJccgl(sList);
207 double kszlc=Arith.add(ksgl, jccgl); 223 double kszlc=Arith.add(ksgl, jccgl);
208 - 224 + kszlc_z=Arith.add(kszlc, kszlc_z);
209 double zlc=Arith.add(sjzlc, kszlc); 225 double zlc=Arith.add(sjzlc, kszlc);
210 - 226 + zlc_z=Arith.add(zlc, zlc_z);
211 m.put("jhbc", jhbc); 227 m.put("jhbc", jhbc);
212 m.put("jhlc", jhlc); 228 m.put("jhlc", jhlc);
213 m.put("sjbc", sjbc); 229 m.put("sjbc", sjbc);
@@ -216,6 +232,24 @@ public class JdtestServiceImpl implements JdtestService { @@ -216,6 +232,24 @@ public class JdtestServiceImpl implements JdtestService {
216 m.put("zlc", zlc); 232 m.put("zlc", zlc);
217 233
218 } 234 }
  235 + Map<String, Object> mmp=new HashMap<>();
  236 + mmp.put("lp", "合计");
  237 + mmp.put("jGh", "");
  238 + mmp.put("clZbh", "");
  239 + mmp.put("jName", "");
  240 + mmp.put("jhbc", jhbc_z);
  241 + mmp.put("jhlc", jhlc_z);
  242 + mmp.put("sjbc", sjbc_z);
  243 + mmp.put("sjzlc", sjzlc_z);
  244 + mmp.put("kszlc",kszlc_z);
  245 + mmp.put("zlc", zlc_z);
  246 + mmp.put("jzyl",jzyl_z);
  247 + mmp.put("czyl",czyl_z);
  248 + mmp.put("jzl", jzl_z);
  249 + mmp.put("yh", yh_z);
  250 + mmp.put("rylx", "");
  251 + mmp.put("dh","");
  252 + list.add(mmp);
219 return list; 253 return list;
220 } 254 }
221 } 255 }
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
@@ -421,7 +421,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -421,7 +421,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
421 + " GROUP_CONCAT(p.`name`) as linename from (select nbbm,xlbm,linename from bsth_c_ylb " 421 + " GROUP_CONCAT(p.`name`) as linename from (select nbbm,xlbm,linename from bsth_c_ylb "
422 + " where rq='"+rq+"' and ssgsdm='"+gsdm+"' and fgsdm='"+fgsdm+"' group by nbbm,xlbm,linename) o " 422 + " where rq='"+rq+"' and ssgsdm='"+gsdm+"' and fgsdm='"+fgsdm+"' group by nbbm,xlbm,linename) o "
423 + " LEFT JOIN bsth_c_line p on o.xlbm=p.line_code group by o.nbbm ) v on u.nbbm=v.nbbm) c " 423 + " LEFT JOIN bsth_c_line p on o.xlbm=p.line_code group by o.nbbm ) v on u.nbbm=v.nbbm) c "
424 - + " on a.nbbm=c.nbbm where 1=1"; 424 + + " on a.nbbm=c.nbbm where 1=1 ";
425 if(!nbbm.equals("")){ 425 if(!nbbm.equals("")){
426 sql +=" and a.nbbm like '%"+nbbm+"%'"; 426 sql +=" and a.nbbm like '%"+nbbm+"%'";
427 } 427 }
@@ -431,7 +431,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -431,7 +431,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
431 if(type){ 431 if(type){
432 sql +=" and c.xlbm is not null"; 432 sql +=" and c.xlbm is not null";
433 } 433 }
434 - 434 + sql +=" order by xlname desc";
435 List<Ylxxb> yList= jdbcTemplate.query(sql, 435 List<Ylxxb> yList= jdbcTemplate.query(sql,
436 new RowMapper<Ylxxb>(){ 436 new RowMapper<Ylxxb>(){
437 @Override 437 @Override
src/main/resources/static/pages/forms/statement/jd_daily.html
@@ -255,7 +255,7 @@ @@ -255,7 +255,7 @@
255 {{/each}} 255 {{/each}}
256 {{if list.length == 0}} 256 {{if list.length == 0}}
257 <tr> 257 <tr>
258 - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> 258 + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td>
259 </tr> 259 </tr>
260 {{/if}} 260 {{/if}}
261 </script> 261 </script>
262 \ No newline at end of file 262 \ No newline at end of file
src/main/resources/static/pages/oil/add.html
@@ -116,7 +116,9 @@ @@ -116,7 +116,9 @@
116 <div class="col-md-4"> 116 <div class="col-md-4">
117 <select name="rylx" class="form-control"> 117 <select name="rylx" class="form-control">
118 <option value='0'>0号柴油</option> 118 <option value='0'>0号柴油</option>
119 - <option value='1'>负10号柴油</option> 119 + <option value='1'>负10号柴油</option>
  120 + <option value='2'>B5-0号柴油</option>
  121 + <option value='3'>B5-负10号柴油</option>
120 </select> 122 </select>
121 </div> 123 </div>
122 </div> 124 </div>
src/main/resources/static/pages/oil/jyglList.html
@@ -191,9 +191,9 @@ $(function(){ @@ -191,9 +191,9 @@ $(function(){
191 map['id']=id; 191 map['id']=id;
192 map['jsy']=jsy; 192 map['jsy']=jsy;
193 map['jzl']=jzl; 193 map['jzl']=jzl;
194 - map['stationid']=stationid;  
195 - map['nylx']=nylx;  
196 - map['jyggh']=jyggh; 194 +// map['stationid']=stationid;
  195 +// map['nylx']=nylx;
  196 +// map['jyggh']=jyggh;
197 map['bz']=bz; 197 map['bz']=bz;
198 ylArray.push(map); 198 ylArray.push(map);
199 }) 199 })