Commit b3d54b39c83b9055d3e7f195a304aede0259d966

Authored by 廖磊
1 parent 8bde3e6c

油量表查询条件修改

src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
@@ -1016,18 +1016,21 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS @@ -1016,18 +1016,21 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS
1016 if(nbbm.trim()!=""){ 1016 if(nbbm.trim()!=""){
1017 stringList.add(nbbm); 1017 stringList.add(nbbm);
1018 List<Object[]> objectLists=repository.checkNbmmNum(rq, gsbm, fgsbm, xlbm,nbbm); 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 listYlb=repository.listYlb(rq, gsbm, fgsbm, xlbm, stringList); 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 }else{ 1034 }else{
1032 //全部 1035 //全部
1033 if(sxtj.equals("0")){ 1036 if(sxtj.equals("0")){
@@ -1248,17 +1251,18 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -1248,17 +1251,18 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1248 if(zlc>0){ 1251 if(zlc>0){
1249 long l=0l; 1252 long l=0l;
1250 double ylxs=0.0; 1253 double ylxs=0.0;
1251 - if(i==iterator2.size()){ 1254 + if(i==iterator2.size()-1){
1252 ylxs=czyl; 1255 ylxs=czyl;
1253 }else{ 1256 }else{
1254 l=Math.round(nextJzyl); 1257 l=Math.round(nextJzyl);
1255 ylxs=l*100/100; 1258 ylxs=l*100/100;
1256 } 1259 }
1257 -// nextJzyl = Arith.add(nextJzyl,Arith.sub(nextJzyl,ylxs));  
1258 yh=Arith.add(yh, Arith.sub(ylxs,nextJzyl)); 1260 yh=Arith.add(yh, Arith.sub(ylxs,nextJzyl));
1259 t.setYh(yh); 1261 t.setYh(yh);
1260 t.setJzyl(ylxs); 1262 t.setJzyl(ylxs);
1261 nextJzyl=ylxs; 1263 nextJzyl=ylxs;
  1264 +
  1265 +
1262 }else{ 1266 }else{
1263 t.setYh(yh); 1267 t.setYh(yh);
1264 t.setJzyl(nextJzyl); 1268 t.setJzyl(nextJzyl);