Commit b3d54b39c83b9055d3e7f195a304aede0259d966
1 parent
8bde3e6c
油量表查询条件修改
Showing
1 changed file
with
14 additions
and
10 deletions
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
| ... | ... | @@ -1016,18 +1016,21 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 1016 | 1016 | if(nbbm.trim()!=""){ |
| 1017 | 1017 | stringList.add(nbbm); |
| 1018 | 1018 | List<Object[]> objectLists=repository.checkNbmmNum(rq, gsbm, fgsbm, xlbm,nbbm); |
| 1019 | - int cs=Integer.parseInt(objectLists.get(0)[1].toString()); | |
| 1020 | - if(sxtj.equals("1")){ | |
| 1021 | - if(cs==1){ | |
| 1019 | + if(objectLists.size()>0){ | |
| 1020 | + int cs=Integer.parseInt(objectLists.get(0)[1].toString()); | |
| 1021 | + if(sxtj.equals("1")){ | |
| 1022 | + if(cs==1){ | |
| 1023 | + listYlb=repository.listYlb(rq, gsbm, fgsbm, xlbm, stringList); | |
| 1024 | + } | |
| 1025 | + }else if(sxtj.equals("2")){ | |
| 1026 | + if(cs>1){ | |
| 1027 | + listYlb=repository.listYlb(rq, gsbm, fgsbm, xlbm, stringList); | |
| 1028 | + } | |
| 1029 | + }else{ | |
| 1022 | 1030 | listYlb=repository.listYlb(rq, gsbm, fgsbm, xlbm, stringList); |
| 1023 | 1031 | } |
| 1024 | 1032 | } |
| 1025 | 1033 | |
| 1026 | - if(sxtj.equals("2")){ | |
| 1027 | - if(cs>1){ | |
| 1028 | - listYlb=repository.listYlb(rq, gsbm, fgsbm, xlbm, stringList); | |
| 1029 | - } | |
| 1030 | - } | |
| 1031 | 1034 | }else{ |
| 1032 | 1035 | //全部 |
| 1033 | 1036 | if(sxtj.equals("0")){ |
| ... | ... | @@ -1248,17 +1251,18 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 1248 | 1251 | if(zlc>0){ |
| 1249 | 1252 | long l=0l; |
| 1250 | 1253 | double ylxs=0.0; |
| 1251 | - if(i==iterator2.size()){ | |
| 1254 | + if(i==iterator2.size()-1){ | |
| 1252 | 1255 | ylxs=czyl; |
| 1253 | 1256 | }else{ |
| 1254 | 1257 | l=Math.round(nextJzyl); |
| 1255 | 1258 | ylxs=l*100/100; |
| 1256 | 1259 | } |
| 1257 | -// nextJzyl = Arith.add(nextJzyl,Arith.sub(nextJzyl,ylxs)); | |
| 1258 | 1260 | yh=Arith.add(yh, Arith.sub(ylxs,nextJzyl)); |
| 1259 | 1261 | t.setYh(yh); |
| 1260 | 1262 | t.setJzyl(ylxs); |
| 1261 | 1263 | nextJzyl=ylxs; |
| 1264 | + | |
| 1265 | + | |
| 1262 | 1266 | }else{ |
| 1263 | 1267 | t.setYh(yh); |
| 1264 | 1268 | t.setJzyl(nextJzyl); | ... | ... |