Commit c77d6508151aa8b2a49d00526980639333e0d73b
1 parent
b1782d6a
青浦行车路单修改
Showing
4 changed files
with
159 additions
and
16 deletions
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| ... | ... | @@ -483,6 +483,11 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, |
| 483 | 483 | public Map<String, Object> MapById(@RequestParam("id") Long id){ |
| 484 | 484 | return scheduleRealInfoService.MapById(id); |
| 485 | 485 | } |
| 486 | + | |
| 487 | + @RequestMapping(value="/MapByIdQp",method = RequestMethod.GET) | |
| 488 | + public Map<String, Object> MapByIdQp(@RequestParam("id") Long id){ | |
| 489 | + return scheduleRealInfoService.MapByIdQp(id); | |
| 490 | + } | |
| 486 | 491 | |
| 487 | 492 | /** |
| 488 | 493 | * @Title: scheduleDaily | ... | ... |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| ... | ... | @@ -144,6 +144,8 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L |
| 144 | 144 | Map<String,Object> historySave(ScheduleRealInfo sch); |
| 145 | 145 | |
| 146 | 146 | Map<String, Object> MapById(Long id) ; |
| 147 | + Map<String, Object> MapByIdQp(Long id) ; | |
| 148 | + | |
| 147 | 149 | |
| 148 | 150 | Map<String,Object> svgAttr(String jsonStr); |
| 149 | 151 | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -3732,22 +3732,23 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 3732 | 3732 | } |
| 3733 | 3733 | |
| 3734 | 3734 | //计算里程和班次数,并放入Map里 |
| 3735 | - map = new HashMap<String, Object>(); | |
| 3735 | + map = findKMBCQp(clZbh, date, line); | |
| 3736 | 3736 | map.put("jzl", jzl); |
| 3737 | - map.put("jhlc", format.format(jhlc + jcclc)); | |
| 3738 | - map.put("yygljh", format.format(jhlc)); | |
| 3739 | - map.put("ssgl", format.format(remMileage)); | |
| 3740 | - map.put("ksgl", format.format(ksgl)); | |
| 3741 | - map.put("yyglsj", format.format(yygl)); | |
| 3742 | - map.put("jhbc", jhbc); | |
| 3743 | - map.put("jcclc", jcclc); | |
| 3744 | - | |
| 3745 | - map.put("ljgl", format.format(addMileage)); | |
| 3746 | - map.put("ssbc", cjbc); | |
| 3747 | - map.put("ysgl", format.format(yygl)); | |
| 3748 | - map.put("sjbc", jhbc - cjbc + ljbc); | |
| 3749 | - map.put("zgl", format.format(yygl + ksgl + jcclc)); | |
| 3750 | - map.put("ljbc", ljbc); | |
| 3737 | +// map.put("jhlc", format.format(jhlc + jcclc)); | |
| 3738 | +// map.put("yygljh", format.format(jhlc)); | |
| 3739 | +// map.put("ssgl", format.format(remMileage)); | |
| 3740 | +// map.put("ksgl", format.format(ksgl)); | |
| 3741 | +// map.put("yyglsj", format.format(yygl)); | |
| 3742 | +// map.put("jhbc", jhbc); | |
| 3743 | +// map.put("jcclc", jcclc); | |
| 3744 | +// | |
| 3745 | +// map.put("ljgl", format.format(addMileage)); | |
| 3746 | +// map.put("ssbc", cjbc); | |
| 3747 | +// map.put("ysgl", format.format(yygl)); | |
| 3748 | +// map.put("sjbc", jhbc - cjbc + ljbc); | |
| 3749 | +// map.put("zgl", format.format(yygl + ksgl + jcclc)); | |
| 3750 | +// map.put("ljbc", ljbc); | |
| 3751 | + | |
| 3751 | 3752 | String zdp = "", zwdp = "", wdp = ""; |
| 3752 | 3753 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| 3753 | 3754 | List<DutyEmployee> listDtuy = dutyEmployeeService.getDutyEmployee(line, date + "00:00", date + "23:59"); |
| ... | ... | @@ -4006,6 +4007,141 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 4006 | 4007 | map.put("dbdp", dbdp); |
| 4007 | 4008 | return map; |
| 4008 | 4009 | } |
| 4010 | + | |
| 4011 | + @Override | |
| 4012 | + public Map<String, Object> MapByIdQp(Long id) { | |
| 4013 | + // TODO Auto-generated method stub | |
| 4014 | + Map<String, Object> map = new HashMap<String, Object>(); | |
| 4015 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); | |
| 4016 | + ScheduleRealInfo s = scheduleRealInfoRepository.scheduleById(id); | |
| 4017 | + String xlbm = s.getXlBm(); | |
| 4018 | + String fcrq = s.getScheduleDateStr(); | |
| 4019 | + | |
| 4020 | + int type=0; | |
| 4021 | + Double ccyl = 0.0; | |
| 4022 | + Double jcyl = 0.0; | |
| 4023 | + Double yh = 0.0; | |
| 4024 | + Double jzl = 0.0; | |
| 4025 | + Double zlc=0.0; | |
| 4026 | +// List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(),xlbm); | |
| 4027 | +// List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(),xlbm); | |
| 4028 | +// if(listYlb.size()>0){ | |
| 4029 | +// type=0; | |
| 4030 | +// for (int i = 0; i < listYlb.size(); i++) { | |
| 4031 | +// Ylb y = listYlb.get(i); | |
| 4032 | +// if(y.getLp()==null){ | |
| 4033 | +// ccyl=Arith.add(ccyl, y.getCzyl()); | |
| 4034 | +// jcyl=Arith.add(jcyl, y.getJzyl()); | |
| 4035 | +// yh =Arith.add(yh ,y.getYh()); | |
| 4036 | +// jzl =Arith.add(jzl, y.getJzl()); | |
| 4037 | +// zlc =Arith.add(zlc, y.getZlc()); | |
| 4038 | +// }else{ | |
| 4039 | +// if(y.getLp().equals(s.getLpName())){ | |
| 4040 | +// ccyl=Arith.add(ccyl, y.getCzyl()); | |
| 4041 | +// jcyl=Arith.add(jcyl, y.getJzyl()); | |
| 4042 | +// yh =Arith.add(yh ,y.getYh()); | |
| 4043 | +// jzl =Arith.add(jzl, y.getJzl()); | |
| 4044 | +// zlc =Arith.add(zlc, y.getZlc()); | |
| 4045 | +// } | |
| 4046 | +// } | |
| 4047 | +// | |
| 4048 | +// } | |
| 4049 | +// }else{ | |
| 4050 | +// type=1; | |
| 4051 | +// for (int i = 0; i < listDlb.size(); i++) { | |
| 4052 | +// Dlb d=listDlb.get(i); | |
| 4053 | +// if(d.getLp()==null){ | |
| 4054 | +// ccyl=Arith.add(ccyl, d.getCzcd()); | |
| 4055 | +// jcyl=Arith.add(jcyl, d.getJzcd()); | |
| 4056 | +// yh =Arith.add(yh ,d.getHd()); | |
| 4057 | +// jzl =Arith.add(jzl, d.getCdl()); | |
| 4058 | +// zlc =Arith.add(zlc, d.getZlc()); | |
| 4059 | +// }else{ | |
| 4060 | +// if(d.getLp().equals(s.getLpName())){ | |
| 4061 | +// ccyl=Arith.add(ccyl, d.getCzcd()); | |
| 4062 | +// jcyl=Arith.add(jcyl, d.getJzcd()); | |
| 4063 | +// yh =Arith.add(yh ,d.getHd()); | |
| 4064 | +// jzl =Arith.add(jzl, d.getCdl()); | |
| 4065 | +// zlc =Arith.add(zlc, d.getZlc()); | |
| 4066 | +// } | |
| 4067 | +// } | |
| 4068 | +// | |
| 4069 | +// } | |
| 4070 | +// } | |
| 4071 | + | |
| 4072 | + List<Ylxxb> listylxxb=ylxxbRepository.queryListYlxxb(s.getClZbh(), fcrq); | |
| 4073 | + for (int i = 0; i < listylxxb.size(); i++) { | |
| 4074 | + Ylxxb t=listylxxb.get(i); | |
| 4075 | + jzl =Arith.add(jzl, t.getJzl()); | |
| 4076 | + } | |
| 4077 | + map.put("jzl", jzl); | |
| 4078 | + map.put("yh", yh); | |
| 4079 | + map.put("ccyl", ccyl); | |
| 4080 | + map.put("jcyl", jcyl); | |
| 4081 | + map.put("type", type); | |
| 4082 | + map.put("zlc", zlc); | |
| 4083 | + map.put("xlName", s.getXlName()); | |
| 4084 | + map.put("clZbh", s.getClZbh()); | |
| 4085 | + map.put("plate", BasicData.nbbmCompanyPlateMap.get(s.getClZbh())); | |
| 4086 | + map.put("fcsjActual", s.getFcsjActual()); | |
| 4087 | + map.put("zdzName", s.getZdzName()); | |
| 4088 | + map.put("scheduleDate", s.getScheduleDateStr()); | |
| 4089 | + map.put("lpName", s.getLpName()); | |
| 4090 | + String zdp = "", zwdp = "", wdp = ""; | |
| 4091 | + String zdpT = "", zwdpT = "", wdpT = ""; | |
| 4092 | + String dbdp=""; | |
| 4093 | + List<DutyEmployee> list = dutyEmployeeService.getDutyEmployee(xlbm, fcrq + "00:01", fcrq + "23:59"); | |
| 4094 | + try { | |
| 4095 | + Long fcsj1 = sdf.parse(fcrq + " 00:01").getTime(); | |
| 4096 | + Long fcsj2 = sdf.parse(fcrq + " 11:00").getTime(); | |
| 4097 | + Long fcsj3 = sdf.parse(fcrq + " 23:59").getTime(); | |
| 4098 | + for (int i = 0; i < list.size(); i++) { | |
| 4099 | + DutyEmployee t = list.get(i); | |
| 4100 | + if(dbdp.indexOf(t.getuName()) == -1){ | |
| 4101 | + if(!(dbdp.length()>0)){ | |
| 4102 | + dbdp =t.getuName(); | |
| 4103 | + }else{ | |
| 4104 | + dbdp +=","+t.getuName(); | |
| 4105 | + } | |
| 4106 | + } | |
| 4107 | + Long ts = t.getTs(); | |
| 4108 | + if (ts > fcsj1 && ts < fcsj2) { | |
| 4109 | + if (zdp.indexOf(t.getuName()) == -1) { | |
| 4110 | + if (!(zdp.length() > 0)) { | |
| 4111 | + zdpT = t.getuName() + "..."; | |
| 4112 | + } | |
| 4113 | + zdp += t.getuName() + ","; | |
| 4114 | + | |
| 4115 | + } | |
| 4116 | + } else if (ts > fcsj2 && ts < fcsj3) { | |
| 4117 | + if (zwdp.indexOf(t.getuName()) == -1) { | |
| 4118 | + if (!(zwdp.length() > 0)) { | |
| 4119 | + zwdpT = t.getuName() + "..."; | |
| 4120 | + } | |
| 4121 | + zwdp += t.getuName() + ","; | |
| 4122 | + } | |
| 4123 | + } else { | |
| 4124 | + if (wdp.indexOf(t.getuName()) == -1) { | |
| 4125 | + if (!(wdp.length() > 0)) { | |
| 4126 | + wdpT = t.getuName() + "..."; | |
| 4127 | + } | |
| 4128 | + wdp += t.getuName() + ","; | |
| 4129 | + } | |
| 4130 | + } | |
| 4131 | + } | |
| 4132 | + } catch (ParseException e) { | |
| 4133 | + // TODO Auto-generated catch block | |
| 4134 | + e.printStackTrace(); | |
| 4135 | + } | |
| 4136 | + map.put("zdp", zdp); | |
| 4137 | + map.put("zwdp", zwdp); | |
| 4138 | + map.put("wdp", wdp); | |
| 4139 | + map.put("zdpT", zdpT); | |
| 4140 | + map.put("zwdpT", zwdpT); | |
| 4141 | + map.put("wdpT", wdpT); | |
| 4142 | + map.put("dbdp", dbdp); | |
| 4143 | + return map; | |
| 4144 | + } | |
| 4009 | 4145 | |
| 4010 | 4146 | @Override |
| 4011 | 4147 | public List<Map<String, Object>> scheduleDailyQp(String line, String date) { | ... | ... |
src/main/resources/static/pages/forms/statement/waybillQp.html
| ... | ... | @@ -173,7 +173,7 @@ |
| 173 | 173 | |
| 174 | 174 | var id = $("#"+params[0]).val(); |
| 175 | 175 | |
| 176 | - $get('/realSchedule/MapById',{id:id},function(result){ | |
| 176 | + $get('/realSchedule/MapByIdQp',{id:id},function(result){ | |
| 177 | 177 | // result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD"); |
| 178 | 178 | var ludan_1 = template('ludan_1',{map:result}); |
| 179 | 179 | //var ludan_4 = template('ludan_4',result); | ... | ... |