Commit 3e32144b8d894fad9a9de6a446aa8fec3de1ab74

Authored by 廖磊
1 parent cfedcce3

油,电总计修改

审计报表修改
工作汇总修改
加油人员不符修改
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java
... ... @@ -442,11 +442,24 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS
442 442 if(lcMap.get(cl)==null){
443 443 lcMap.put(cl, lc);
444 444 }else{
445   - Double lc_=lcMap.get(cl);
  445 + double lc_=lcMap.get(cl);
446 446 lcMap.remove(cl);
447 447 lcMap.put(cl, Arith.add(lc, lc_));
448 448 }
449 449 }
  450 +
  451 + Map<String, Double> shMap=new HashMap<String,Double>();
  452 + for (int i = 0; i < dlList.size(); i++) {
  453 + Dlb dlb=dlList.get(i);
  454 + String cl=dlb.getNbbm();
  455 + if(shMap.get(cl)==null){
  456 + shMap.put(cl, dlb.getSh());
  457 + }else{
  458 + double sh=shMap.get(cl);
  459 + shMap.remove(cl);
  460 + shMap.put(cl, Arith.add(sh, dlb.getSh()));
  461 + }
  462 + }
450 463 List<Jdl> jdlList=jdlRepository.JdlList(rq);
451 464 String sxtj=map2.get("sxtj").toString();
452 465 if(sxtj.equals("0")){
... ... @@ -503,7 +516,7 @@ public class DlbServiceImpl extends BaseServiceImpl&lt;Dlb,Integer&gt; implements DlbS
503 516 //车辆总里程
504 517 double zlc =lcMap.get(map_.get("clZbh").toString());
505 518 //车辆总加电量
506   - Double zjzl = 0.0;
  519 + double zjzl = 0.0;
507 520 for (int j = 0; j < ylxxList.size(); j++) {
508 521 Ylxxb ylxxb = ylxxList.get(j);
509 522 if (map_.get("clZbh").toString().equals(ylxxb.getNbbm())
... ... @@ -519,7 +532,13 @@ public class DlbServiceImpl extends BaseServiceImpl&lt;Dlb,Integer&gt; implements DlbS
519 532 zjzl = Arith.add(zjzl,jdl.getJdl());
520 533 }
521 534 }
522   -
  535 + double clsh=0.0;
  536 + if(shMap.get(map_.get("clZbh").toString())==null){
  537 + clsh=0.0;
  538 + }else{
  539 + clsh=shMap.get(map_.get("clZbh").toString());
  540 + }
  541 + zjzl =Arith.sub(zjzl, clsh);
523 542 Double nextJzyl = 0.0;
524 543 for (int i = 0; i < listpb.size(); i++) {
525 544 Map<String, Object> map = listpb.get(i);
... ... @@ -630,6 +649,7 @@ public class DlbServiceImpl extends BaseServiceImpl&lt;Dlb,Integer&gt; implements DlbS
630 649 updateList.add(t);
631 650 }
632 651 }
  652 + t.setCdl(Arith.add(t.getCdl(), t.getSh()));
633 653 newMap.put("status", ResponseCode.SUCCESS);
634 654 }
635 655 }
... ...
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
... ... @@ -404,7 +404,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
404 404 Ylxxb ylxxb = ylxxList.get(i);
405 405 if (map.get("clZbh").toString().equals(ylxxb.getNbbm())
406 406 && map.get("jGh").toString().equals(ylxxb.getJsy())
407   - && ylxxb.getJylx()==1) {
  407 + && ylxxb.getJylx()>0) {
408 408 if(ylxxb.getJzl()>0){
409 409 fage2=true;
410 410 }
... ... @@ -418,7 +418,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
418 418 Ylxxb ylxxb = ylxxList.get(j);
419 419 if (map.get("clZbh").toString().equals(ylxxb.getNbbm())
420 420 && map.get("jGh").toString().equals(ylxxb.getJsy())
421   - && ylxxb.getJylx()==1) {
  421 + && ylxxb.getJylx()>0) {
422 422 jzl =Arith.add(jzl, ylxxb.getJzl());
423 423 }
424 424 }
... ... @@ -1165,7 +1165,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1165 1165 Integer id =jsonObject.getInteger("id");
1166 1166 String nbbm =jsonObject.getString("nbbm");
1167 1167 String rq=jsonObject.getString("rq");
1168   - double yh = Arith.sub(Arith.add(czyl, jzl), jzyl);
  1168 + double yh = Arith.sub(Arith.add(czyl, jzl), Arith.add(jzyl, sh));
1169 1169 if(yh<0){
1170 1170 yh=0.0;
1171 1171 }
... ...
src/main/java/com/bsth/service/oil/impl/YlxxbServiceImpl.java
... ... @@ -181,11 +181,15 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements
181 181 jsonObject=jsonArray.getJSONObject(x);
182 182 Integer id =jsonObject.getInteger("id");
183 183 String jsy =jsonObject.getString("jsy");
184   - Ylxxb ylxxb=repository.findOne(id);
185   - if(!ylxxb.getJsy().equals(jsy)){
186   - ylxxb.setJsy(jsy);
187   - ylxxb.setJylx(3);
188   - repository.save(ylxxb);
  184 + String lsjsy =jsonObject.getString("lsjsy");
  185 + String ldgh =jsonObject.getString("ldgh");
  186 + if(!lsjsy.equals(jsy)){
  187 + if(ldgh.indexOf(jsy)>-1){
  188 + Ylxxb ylxxb=repository.findOne(id);
  189 + ylxxb.setJsy(jsy);
  190 + ylxxb.setJylx(3);
  191 + repository.save(ylxxb);
  192 + }
189 193 }
190 194 }
191 195 newMap.put("status", ResponseCode.SUCCESS);
... ...
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
... ... @@ -945,34 +945,39 @@ public class CulateMileageServiceImpl implements CulateMileageService{
945 945 ScheduleRealInfo t=lists.get(i);
946 946 if(!isInOut(t)){
947 947 if(!t.isSflj()){
948   - Set<ChildTaskPlan> childTaskPlans = t.getcTasks();
949   - if(childTaskPlans.isEmpty()){
950   - if(!t.isDestroy()){
951   - if( Math.abs(t.getJhlc()-t.getJhlcOrig())>0){
952   - jhwlc =Arith.add(jhwlc, t.getJhlcOrig());
953   - }else{
954   - jhnlc =Arith.add(jhnlc, t.getJhlc());
  948 + if(t.isCcService()){
  949 + jhwlc =Arith.add(jhwlc, t.getJhlc());
  950 + }else{
  951 + Set<ChildTaskPlan> childTaskPlans = t.getcTasks();
  952 + if(childTaskPlans.isEmpty()){
  953 + if(!t.isDestroy()){
  954 + if( Math.abs(t.getJhlc()-t.getJhlcOrig())>0){
  955 + jhwlc =Arith.add(jhwlc, t.getJhlc());
  956 + }else{
  957 + jhnlc =Arith.add(jhnlc, t.getJhlc());
  958 + }
955 959 }
  960 + }else{
  961 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  962 + double zrwlc=0.0;
  963 + boolean fage=false;
  964 + while (it.hasNext()) {
  965 + ChildTaskPlan childTaskPlan = it.next();
  966 + if(childTaskPlan.getMileageType().equals("service")
  967 + && childTaskPlan.getCcId()==null){
  968 + if (childTaskPlan.isDestroy()) {
  969 + fage=true;
  970 + }else{
  971 + zrwlc =Arith.add(zrwlc, childTaskPlan.getMileage());
  972 + }
  973 + }
  974 + }
  975 + if(fage){
  976 + jhwlc =Arith.add(jhwlc, zrwlc);
  977 + }else{
  978 + jhnlc =Arith.add(jhnlc, zrwlc);
  979 + }
956 980 }
957   - }else{
958   - Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
959   - double zrwlc=0.0;
960   - boolean fage=false;
961   - while (it.hasNext()) {
962   - ChildTaskPlan childTaskPlan = it.next();
963   - if(childTaskPlan.getMileageType().equals("service")){
964   - if (childTaskPlan.isDestroy()) {
965   - fage=true;
966   - }else{
967   - zrwlc =Arith.add(zrwlc, childTaskPlan.getMileage());
968   - }
969   - }
970   - }
971   - if(fage){
972   - jhwlc =Arith.add(jhwlc, zrwlc);
973   - }else{
974   - jhnlc =Arith.add(jhnlc, zrwlc);
975   - }
976 981 }
977 982 }
978 983 }
... ... @@ -994,35 +999,41 @@ public class CulateMileageServiceImpl implements CulateMileageService{
994 999 ScheduleRealInfo t=lists.get(i);
995 1000 if(t.getBcType().equals("in") || t.getBcType().equals("out")){
996 1001 if(!t.isSflj()){
997   - Set<ChildTaskPlan> childTaskPlans = t.getcTasks();
998   - if(childTaskPlans.isEmpty()){
999   - if(!t.isDestroy()){
1000   - if( Math.abs(t.getJhlc()-t.getJhlcOrig())>0){
1001   - jhwlc =Arith.add(jhwlc, t.getJhlcOrig());
1002   - }else{
1003   - jhnlc =Arith.add(jhnlc, t.getJhlc());
1004   - }
1005   - }
  1002 + if(t.isCcService()){
  1003 + jhwlc =Arith.add(jhwlc, t.getJhlc());
1006 1004 }else{
1007   - Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
1008   - double zrwlc=0.0;
1009   - boolean fage=false;
1010   - while (it.hasNext()) {
1011   - ChildTaskPlan childTaskPlan = it.next();
1012   - if(childTaskPlan.getMileageType().equals("empty")){
1013   - if (childTaskPlan.isDestroy()) {
1014   - fage=true;
1015   - }else{
1016   - zrwlc =Arith.add(zrwlc, childTaskPlan.getMileage());
1017   - }
1018   - }
1019   - }
1020   - if(fage){
1021   - jhwlc =Arith.add(jhwlc, zrwlc);
1022   - }else{
1023   - jhnlc =Arith.add(jhnlc, zrwlc);
1024   - }
1025   - }
  1005 + Set<ChildTaskPlan> childTaskPlans = t.getcTasks();
  1006 + if(childTaskPlans.isEmpty()){
  1007 + if(!t.isDestroy()){
  1008 + if( Math.abs(t.getJhlc()-t.getJhlcOrig())>0){
  1009 + jhwlc =Arith.add(jhwlc, t.getJhlc());
  1010 + }else{
  1011 + jhnlc =Arith.add(jhnlc, t.getJhlc());
  1012 + }
  1013 + }
  1014 + }else{
  1015 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  1016 + double zrwlc=0.0;
  1017 + boolean fage=false;
  1018 + while (it.hasNext()) {
  1019 + ChildTaskPlan childTaskPlan = it.next();
  1020 + if(childTaskPlan.getMileageType().equals("empty")
  1021 + && childTaskPlan.getCcId()==null){
  1022 + if (childTaskPlan.isDestroy()) {
  1023 + fage=true;
  1024 + }else{
  1025 + zrwlc =Arith.add(zrwlc, childTaskPlan.getMileage());
  1026 + }
  1027 + }
  1028 + }
  1029 + if(fage){
  1030 + jhwlc =Arith.add(jhwlc, zrwlc);
  1031 + }else{
  1032 + jhnlc =Arith.add(jhnlc, zrwlc);
  1033 + }
  1034 + }
  1035 + }
  1036 +
1026 1037 }
1027 1038 }
1028 1039 }
... ... @@ -1049,15 +1060,6 @@ public class CulateMileageServiceImpl implements CulateMileageService{
1049 1060 }
1050 1061  
1051 1062 }
1052   - /*else{
1053   - //临加进出场子任务 待统计
1054   - Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
1055   - double zrwlc=0.0;
1056   - boolean fage=false;
1057   - while (it.hasNext()) {
1058   - ChildTaskPlan childTaskPlan = it.next();
1059   - }
1060   - }*/
1061 1063 }
1062 1064  
1063 1065 if(t.getBcType().equals("ldks")){
... ... @@ -1068,15 +1070,6 @@ public class CulateMileageServiceImpl implements CulateMileageService{
1068 1070 }
1069 1071  
1070 1072 }
1071   - /*else{
1072   - //临加进出场子任务 待统计
1073   - Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
1074   - double zrwlc=0.0;
1075   - boolean fage=false;
1076   - while (it.hasNext()) {
1077   - ChildTaskPlan childTaskPlan = it.next();
1078   - }
1079   - }*/
1080 1073 }
1081 1074 if(!isInOut(t)){
1082 1075 Set<ChildTaskPlan> childTaskPlans = t.getcTasks();
... ... @@ -1096,9 +1089,6 @@ public class CulateMileageServiceImpl implements CulateMileageService{
1096 1089 if(childTaskPlan.getType2().equals("2")||childTaskPlan.getType2().equals("3")){
1097 1090 ljjcc =Arith.add(ljjcc, childTaskPlan.getMileage());
1098 1091 }
1099   - if(childTaskPlan.getType2().equals("1")){
1100   - ljkfks =Arith.add(ljkfks, childTaskPlan.getMileage());
1101   - }
1102 1092 }
1103 1093 }
1104 1094 }
... ... @@ -1116,29 +1106,39 @@ public class CulateMileageServiceImpl implements CulateMileageService{
1116 1106  
1117 1107 @Override
1118 1108 public double culateSsMile(List<ScheduleRealInfo> lists) {
1119   - double zlblc =0.0;
1120   - for (int i = 0; i < lists.size(); i++) {
1121   - ScheduleRealInfo scheduleRealInfo=lists.get(i);
1122   - if (!isInOut(scheduleRealInfo)) {
1123   - Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
1124   - if(childTaskPlans.isEmpty()){
1125   - if(scheduleRealInfo.isDestroy()){
1126   - zlblc=Arith.add(zlblc,scheduleRealInfo.getJhlcOrig()==null?0:scheduleRealInfo.getJhlcOrig());
  1109 + // TODO Auto-generated method stub
  1110 + double zlblc =0.0;
  1111 + for (int i = 0; i < lists.size(); i++) {
  1112 + ScheduleRealInfo scheduleRealInfo=lists.get(i);
  1113 + if (!isInOut(scheduleRealInfo)) {
  1114 + Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
  1115 + if(childTaskPlans.isEmpty()){
  1116 + if(scheduleRealInfo.isDestroy()){
  1117 + zlblc=Arith.add(zlblc,scheduleRealInfo.getJhlcOrig()==null?0:scheduleRealInfo.getJhlcOrig());
  1118 + }else{
  1119 + double jhlc=scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc();
  1120 + double jhlcOrig=scheduleRealInfo.getJhlcOrig()==null?0:scheduleRealInfo.getJhlcOrig();
  1121 + double cjlc=Arith.sub(jhlcOrig,jhlc);
  1122 + if(cjlc>0){
  1123 + zlblc=Arith.add(zlblc, cjlc);
  1124 + }
  1125 + }
  1126 + }else{
  1127 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  1128 + while (it.hasNext()) {
  1129 + ChildTaskPlan childTaskPlan = it.next();
  1130 + if(childTaskPlan.getCcId()==null){
  1131 + if(childTaskPlan.getMileageType().equals("service")){
  1132 + if (childTaskPlan.isDestroy()) {
  1133 + zlblc=Arith.add(zlblc,childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage());
  1134 + }
  1135 + }
  1136 + }
  1137 + }
  1138 + }
1127 1139 }
1128   - }else{
1129   - Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
1130   - while (it.hasNext()) {
1131   - ChildTaskPlan childTaskPlan = it.next();
1132   - if(childTaskPlan.getMileageType().equals("service")){
1133   - if (childTaskPlan.isDestroy()) {
1134   - zlblc=Arith.add(zlblc,childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage());
1135   - }
1136   - }
1137   - }
1138 1140 }
1139   - }
1140   - }
1141   - return zlblc;
  1141 + return zlblc;
1142 1142 }
1143 1143  
1144 1144 @Override
... ... @@ -1153,28 +1153,34 @@ public class CulateMileageServiceImpl implements CulateMileageService{
1153 1153 //有子任务
1154 1154 if (cts != null && cts.size() > 0) {
1155 1155 for(ChildTaskPlan c : cts){
1156   - if(item.equals("其他")){
1157   - if(c.isDestroy() &&
1158   - ((c.getDestroyReason()==null?"": c.getDestroyReason()).equals(item)||
1159   - (c.getDestroyReason()==null?"": c.getDestroyReason()).equals("")))
1160   - sum = Arith.add(sum, c.getMileage());
1161   - }else{
1162   - if(c.isDestroy() && (c.getDestroyReason()==null?"": c.getDestroyReason()).equals(item))
1163   - sum = Arith.add(sum, c.getMileage());
  1156 + if(c.getCcId()==null){
  1157 + if(item.equals("其他")){
  1158 + if(c.isDestroy() &&
  1159 + ((c.getDestroyReason()==null?"": c.getDestroyReason()).equals(item)||
  1160 + (c.getDestroyReason()==null?"": c.getDestroyReason()).equals("")))
  1161 + sum = Arith.add(sum, c.getMileage());
  1162 + }else{
  1163 + if(c.isDestroy() && (c.getDestroyReason()==null?"": c.getDestroyReason()).equals(item))
  1164 + sum = Arith.add(sum, c.getMileage());
  1165 + }
1164 1166 }
1165   -
1166 1167 }
1167 1168 }
1168 1169 else if(isInOut(sch))
1169 1170 continue;
1170 1171 //主任务烂班
1171   - else if(sch.getStatus() == -1){
  1172 + else if(sch.getStatus() == -1 && !sch.isCcService()){
1172 1173 if(sch.getAdjustExps().equals(item) ||
1173 1174 (StringUtils.isEmpty(sch.getAdjustExps()) && item.equals("其他"))){
1174 1175 sum = Arith.add(sum, sch.getJhlcOrig());
1175 1176 }
1176 1177 }
1177   -
  1178 + else if(item.equals("其他")){
  1179 + double diff = Arith.sub(sch.getJhlcOrig(), sch.getJhlc());
  1180 + if(diff > 0){
  1181 + sum = Arith.add(sum, diff);
  1182 + }
  1183 + }
1178 1184 }
1179 1185 return sum;
1180 1186 }
... ... @@ -1223,20 +1229,22 @@ public class CulateMileageServiceImpl implements CulateMileageService{
1223 1229 double kfks=0.0;
1224 1230 for (int i = 0; i < lists.size(); i++) {
1225 1231 ScheduleRealInfo t=lists.get(i);
1226   - if(t.getBcType().equals("ldks")){
1227   - Set<ChildTaskPlan> childTaskPlans = t.getcTasks();
1228   - if(childTaskPlans.isEmpty()){
1229   - if(!t.isDestroy()){
1230   - kfks=Arith.add(kfks,t.getJhlcOrig()==null?0:t.getJhlcOrig());
  1232 + if(!t.isSflj()){
  1233 + if(t.getBcType().equals("ldks")){
  1234 + Set<ChildTaskPlan> childTaskPlans = t.getcTasks();
  1235 + if(childTaskPlans.isEmpty()){
  1236 + if(!t.isDestroy()){
  1237 + kfks=Arith.add(kfks,t.getJhlcOrig()==null?0:t.getJhlcOrig());
  1238 + }
  1239 + }else{
  1240 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  1241 + while (it.hasNext()) {
  1242 + ChildTaskPlan childTaskPlan = it.next();
  1243 + if (!childTaskPlan.isDestroy()) {
  1244 + kfks=Arith.add(kfks,childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage());
  1245 + }
  1246 + }
1231 1247 }
1232   - }else{
1233   - Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
1234   - while (it.hasNext()) {
1235   - ChildTaskPlan childTaskPlan = it.next();
1236   - if (!childTaskPlan.isDestroy()) {
1237   - kfks=Arith.add(kfks,childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage());
1238   - }
1239   - }
1240 1248 }
1241 1249 }
1242 1250 }
... ...
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
... ... @@ -1715,7 +1715,7 @@ public class ReportServiceImpl implements ReportService{
1715 1715 newMap.put("nr", adjustExps);
1716 1716 newMap.put("lp", scheduleRealInfo.getLpName());
1717 1717 newMap.put("nbbm", scheduleRealInfo.getClZbh());
1718   - newMap.put("jgh", scheduleRealInfo.getjGh());
  1718 + newMap.put("jgh", scheduleRealInfo.getjGh()+scheduleRealInfo.getjName()+"/"+scheduleRealInfo.getsGh()+scheduleRealInfo.getsName());
1719 1719 newMap.put("dz", scheduleRealInfo.getQdzName());
1720 1720 newMap.put("sj", scheduleRealInfo.getFcsj());
1721 1721 newMap.put("lbbc", 1);
... ... @@ -1747,12 +1747,12 @@ public class ReportServiceImpl implements ReportService{
1747 1747 newMap.put("nr", adjustExps);
1748 1748 newMap.put("lp", scheduleRealInfo.getLpName());
1749 1749 newMap.put("nbbm", scheduleRealInfo.getClZbh());
1750   - newMap.put("jgh", scheduleRealInfo.getjGh());
  1750 + newMap.put("jgh", scheduleRealInfo.getjGh()+scheduleRealInfo.getjName()+"/"+scheduleRealInfo.getsGh()+scheduleRealInfo.getsName());
1751 1751 newMap.put("dz", scheduleRealInfo.getQdzName());
1752 1752 newMap.put("sj", scheduleRealInfo.getFcsj());
1753 1753 newMap.put("lbbc", 1);
1754 1754 newMap.put("lblc", zlblc);
1755   - newMap.put("jyqp", scheduleRealInfo.getRealMileage());
  1755 + newMap.put("jyqp", scheduleRealInfo.getRemarks());
1756 1756 list.add(newMap);
1757 1757 } else {
1758 1758 while (it.hasNext()) {
... ... @@ -1770,7 +1770,7 @@ public class ReportServiceImpl implements ReportService{
1770 1770 newMap.put("nr", destroyReason);
1771 1771 newMap.put("lp", scheduleRealInfo.getLpName());
1772 1772 newMap.put("nbbm", scheduleRealInfo.getClZbh());
1773   - newMap.put("jgh", scheduleRealInfo.getjGh());
  1773 + newMap.put("jgh", scheduleRealInfo.getjGh()+scheduleRealInfo.getjName()+"/"+scheduleRealInfo.getsGh()+scheduleRealInfo.getsName());
1774 1774 newMap.put("dz", childTaskPlan.getStartStationName());
1775 1775 newMap.put("sj", childTaskPlan.getStartDate());
1776 1776 newMap.put("gzf", " ");
... ... @@ -2620,6 +2620,16 @@ public class ReportServiceImpl implements ReportService{
2620 2620 double zlc=Arith.add(Arith.add(Arith.add(zrwjcc, ljlc),
2621 2621 Arith.add(zjcclc, zyylc)),kfks);
2622 2622 map.put("zlc", zlc);
  2623 +
  2624 + //备用
  2625 + double ljgl= culateService.culateLjgl(lists);
  2626 + double sjyygl= culateService.culateSjgl(lists);
  2627 + double zyygl= Arith.add(sjyygl,ljgl);
  2628 +
  2629 + double sjjccgl=culateService.culateJccgl(lists);
  2630 + double sjksgl=culateService.culateKsgl(lists);
  2631 + double zksgl=Arith.add(sjjccgl, sjksgl);
  2632 + map.put("sjzgl", Arith.add(zyygl, zksgl));
2623 2633 }
2624 2634 return map;
2625 2635 }
... ...
src/main/resources/static/pages/electricity/list/list.html
... ... @@ -212,7 +212,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
212 212 <lable style="float:left">%<lable>
213 213 </td>
214 214 <td>
215   -<input data-id="{{obj.id}}" href="javascript:;" class="in_carpark_hd"
  215 +<input data-id="{{obj.id}}" href="javascript:;" class="in_carpark_hd" readOnly="true"
216 216 type="text" value=" {{obj.hd}}" style=" width:45px;float:left"
217 217 onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
218 218 onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')" />
... ... @@ -393,29 +393,6 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
393 393  
394 394 }
395 395  
396   - /* var id = $('input.icheck:checked').data('id');
397   -
398   - if (typeof(id) == 'undefined') {
399   - layer.msg("请选择一行进行拆分");
400   - } else {
401   - //获取输入的进场存油
402   - var jzyl = $('.in_carpark_jzcd[data-id='+id+']', '#dl_oil_list').html();
403   - var sh = $('.in_carpark_shyl[data-id='+id+']', '#dl_oil_list').html();
404   - var shyy = $('.in_carpark_shyy[data-id='+id+']', '#dl_oil_list').val();
405   - // $("#jzyl" + id).html();
406   - var params = {};
407   - params['jzyl'] = jzyl;
408   - params['sh'] =sh;
409   - params['shyy']=shyy;
410   - params['id'] = id;
411   - var i = layer.load(2);
412   - $get('/ylb/sort', params, function () {
413   - layer.close(i);
414   - var params1 =getParamsList();
415   - jsDoQuery(params1, true);
416   - });
417   -
418   - } */
419 396 } else {
420 397 layer.msg('请选择日期.');
421 398 }
... ... @@ -512,18 +489,6 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
512 489 updateCompany();
513 490 });
514 491 })
515   - /* function setFgsqx(gs){
516   - var company =gs
517   - var options = '';
518   - for(var i = 0; i < obj.length; i++){
519   - if(obj[i].companyCode == company){
520   - var children = obj[i].children;
521   - for(var j = 0; j < children.length; j++){
522   - gsqxdm +=company+""+children[j].code+",";
523   - }
524   - }
525   - }
526   - } */
527 492 $("#ylbListGsdmId").on("change",updateCompany);
528 493 function updateCompany(){
529 494 var company = $('#ylbListGsdmId').val();
... ... @@ -553,24 +518,6 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
553 518 params['page'] = page;
554 519 params['rq'] = $("#rq").val();
555 520  
556   - /* var ylbGsdm=$("#ylbListGsdmId").val();
557   - var ylbFgsdm=$("#ylbListFgsdmId").val();
558   - if(ylbGsdm==''|| ylbGsdm==null){
559   - params['concat(ssgsdm,fgsdm)_in']=gsqxdm;
560   - }else{
561   - if(ylbFgsdm==''||ylbFgsdm==null){
562   - var fgsqx1='';
563   - for(var i = 0; i < obj.length; i++){
564   - if(obj[i].companyCode == ylbGsdm){
565   - var children = obj[i].children;
566   - for(var j = 0; j < children.length; j++){
567   - fgsqx1 +=children[j].code+",";
568   - }
569   - }
570   - }
571   - params['fgsdm_in']=fgsqx1;
572   - }
573   - } */
574 521  
575 522 var l = layer.load(2);
576 523 $get('/dlb/dlbList', params, function (data) {
... ... @@ -580,24 +527,80 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
580 527 });
581 528 var bodyHtm = template('dlb_list_temp', {list:data});
582 529 $('#datatable_dlb tbody').html(bodyHtm);
583   - /* $('#datatable_dlb tbody').html(bodyHtm)
584   - .find('.icheck').iCheck(icheckOptions)
585   - .on('ifChanged', iCheckChange);
586   - if (pagination && data.content.length > 0) {
587   - //重新分页
588   - initPagination = true;
589   - showPagination(data);
590   - } */
591 530 layer.close(l);
592 531 $get('/dlb/sumYlb',params,function(returns){
593 532 $("#sumJzl").html(returns.jzl);
594 533 $("#sumYh").html(returns.yh);
595 534 $("#sumSh").html(returns.sh);
596 535 });
597   -// startOptJzylLink($('#dl_oil_list .in_carpark_jzcd'));
598   -// startOptShylLink($('#dl_oil_list .in_carpark_shyl'));
  536 +
  537 + $('input').on('input propertychange',function(){
  538 + var id=$(this).data('id');
  539 + var cdl =$('.in_carpark_cdl[data-id='+id+']', '#dl_oil_list').html();
  540 + if(cdl=="" || cdl ==null){
  541 + cdl=0;
  542 + }
  543 + var sh = $('.in_carpark_shyl[data-id='+id+']', '#dl_oil_list').val();
  544 + if(sh=="" || sh==null){
  545 + sh=0;
  546 + }
  547 +
  548 + var sub=numSubtr(cdl*1000,sh*1000);
  549 + var subValue=0;
  550 + if(sub/1000>=0){
  551 + subValue=sub/1000;
  552 + }
  553 + $('.in_carpark_hd[data-id='+id+']', '#dl_oil_list').val(subValue);
  554 +
  555 + });
599 556 });
600 557 }
  558 +
  559 + //页面计算防止精度丢失
  560 + var accAdd = function (a, b) {
  561 + var c, d, e;
  562 + try {
  563 + c = a.toString().split(".")[1].length;
  564 + } catch (f) {
  565 + c = 0;
  566 + }
  567 + try {
  568 + d = b.toString().split(".")[1].length;
  569 + } catch (f) {
  570 + d = 0;
  571 + }
  572 + return e = Math.pow(10, Math.max(c, d)), (mul(a, e) + mul(b, e)) / e;
  573 + };
  574 +
  575 + var numSubtr = function (a, b) {
  576 + var c, d, e;
  577 + try {
  578 + c = a.toString().split(".")[1].length;
  579 + } catch (f) {
  580 + c = 0;
  581 + }
  582 + try {
  583 + d = b.toString().split(".")[1].length;
  584 + } catch (f) {
  585 + d = 0;
  586 + }
  587 + return e = Math.pow(10, Math.max(c, d)), (a * e - b * e) / e;
  588 + };
  589 +
  590 + function mul(a, b) {
  591 + var c = 0,
  592 + d = a.toString(),
  593 + e = b.toString();
  594 + try {
  595 + c += d.split(".")[1].length;
  596 + } catch (f) {
  597 + }
  598 + try {
  599 + c += e.split(".")[1].length;
  600 + } catch (f) {
  601 + }
  602 + return Number(d.replace(".", "")) * Number(e.replace(".", "")) / Math.pow(10, c);
  603 + }
601 604  
602 605 //改变状态
603 606 function startOptJzylLink(es) {
... ... @@ -735,13 +738,6 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
735 738 initPinYinSelect2('#xlbm',data,'');
736 739 fage=true;
737 740 }
738   -// $("#ylbListGsdmId").on("change",initNbbm);
739   -// $("#ylbListFgsdmId").on("change",initNbbm);
740   -// $("#xlbm").on("change",initNbbm);
741   -// function initNbbm(){
742   -// var gsbm=$('#ylbListGsdmId').val(),
743   -// var fgsbm=$('#ylbListFgsdmId').val(),
744   -// var xlbm=$('#xlbm').val();
745 741 $("#xlbm").on("change",initCl);
746 742 function initCl(){
747 743 $('#nbbm').select2({
... ...
src/main/resources/static/pages/forms/mould/lbStatuAnaly.xls
No preview for this file type
src/main/resources/static/pages/oil/checkJyryList.html
... ... @@ -130,6 +130,7 @@
130 130 <select class="form-control in_carpark_jsy" name="jsy" id="jsy{{obj.id}}" data-id="{{obj.id}}">
131 131 <option selected="selected" value="{{obj.jsy}}">{{obj.jsy}}<option>
132 132 </select>
  133 + <lable data-id="{{obj.id}}" style="display: none" class="in_carpark_ls_jsy">{{obj.jsy}}</lable>
133 134 </td>
134 135 <td>
135 136 {{obj.jzl}}
... ... @@ -138,7 +139,9 @@
138 139 <td>{{obj.nylx}}</td>
139 140 <td>{{obj.jyggh}}</td>
140 141 <td></td>
141   - <td>{{obj.ldgh}}</td>
  142 + <td>
  143 + <lable data-id="{{obj.id}}" class="in_carpark_ldgh">{{obj.ldgh}}</lable>
  144 + </td>
142 145 <td>
143 146 {{obj.bz}}
144 147 </td>
... ... @@ -162,8 +165,13 @@ $(function(){
162 165 var map = {};
163 166 var id=$(this).data('id');
164 167 var jsy=$('.in_carpark_jsy[data-id='+id+']', '#ll_jyry_list').val();
  168 + var lsjsy=$('.in_carpark_ls_jsy[data-id='+id+']', '#ll_jyry_list').html();
  169 + var ldgh=$('.in_carpark_ldgh[data-id='+id+']', '#ll_jyry_list').html();
  170 +
165 171 map['id']=id;
166 172 map['jsy']=jsy;
  173 + map['lsjsy']=lsjsy;
  174 + map['ldgh']=ldgh;
167 175 ylArray.push(map);
168 176 })
169 177 var params = {};
... ...
src/main/resources/static/pages/oil/list_ph.html
... ... @@ -859,6 +859,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
859 859 })
860 860 var params = {};
861 861 params['ids']=JSON.stringify(idArray);
  862 + console.log(idArray);
862 863 if (x==0) {
863 864 layer.msg("请选择要删除的数据");
864 865 }else{
... ... @@ -970,9 +971,11 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
970 971 //全选 全不选
971 972 $("#selectAll").on("click", function () {
972 973 if ($(this).is(":checked")) {
973   - $("[name=id]:checkbox").prop("checked", true);
  974 +// $("[name=id]:checkbox").prop("checked", true);
  975 + $("input[name='id']").attr('checked', true)
974 976 } else {
975   - $("[name=id]:checkbox").prop("checked", false);
  977 +// $("[name=id]:checkbox").prop("checked", false);
  978 + $("input[name='id']").attr('checked', false);
976 979 }
977 980 });
978 981  
... ...
src/main/resources/static/pages/report/countMileage/countLine/company/countLineMileage.html
... ... @@ -112,7 +112,7 @@
112 112 </tr>
113 113  
114 114 </thead>
115   - <tbody class="countLine">
  115 + <tbody class="countLineNb">
116 116  
117 117 </tbody>
118 118 </table>
... ... @@ -270,7 +270,7 @@
270 270 // 把数据填充到模版中
271 271 var tbodyHtml = template('countLineList',{list:result});
272 272 // 把渲染好的模版html文本追加到表格中
273   - $('#forms .countLine').html(tbodyHtml);
  273 + $('#forms .countLineNb').html(tbodyHtml);
274 274  
275 275 if(result.length == 0)
276 276 $("#export").attr('disabled',"true");
... ...
src/main/resources/static/pages/report/countMileage/countLine/countLineMileage.html
... ... @@ -111,7 +111,7 @@
111 111 </tr>
112 112  
113 113 </thead>
114   - <tbody class="countLine">
  114 + <tbody class="countLineSj">
115 115  
116 116 </tbody>
117 117 </table>
... ... @@ -269,7 +269,7 @@
269 269 // 把数据填充到模版中
270 270 var tbodyHtml = template('countLineList',{list:result});
271 271 // 把渲染好的模版html文本追加到表格中
272   - $('#forms .countLine').html(tbodyHtml);
  272 + $('#forms .countLineSj').html(tbodyHtml);
273 273  
274 274 if(result.length == 0)
275 275 $("#export").attr('disabled',"true");
... ...