Commit 953b0487e9dddc63dfde3225e21306ffc2d967c1
Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing
17 changed files
with
223 additions
and
81 deletions
src/main/java/com/bsth/controller/oil/YlbController.java
| @@ -106,6 +106,7 @@ public class YlbController extends BaseController<Ylb, Integer>{ | @@ -106,6 +106,7 @@ public class YlbController extends BaseController<Ylb, Integer>{ | ||
| 106 | @RequestParam(defaultValue = "DESC") String direction){ | 106 | @RequestParam(defaultValue = "DESC") String direction){ |
| 107 | 107 | ||
| 108 | Direction d; | 108 | Direction d; |
| 109 | + map.put("xlbm_like", map.get("xlbm_like").toString().trim()); | ||
| 109 | // try { | 110 | // try { |
| 110 | String rq=map.get("rq").toString(); | 111 | String rq=map.get("rq").toString(); |
| 111 | if(!(rq=="")){ | 112 | if(!(rq=="")){ |
src/main/java/com/bsth/repository/oil/CylRepository.java
| 1 | package com.bsth.repository.oil; | 1 | package com.bsth.repository.oil; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | +import java.util.List; | ||
| 5 | + | ||
| 6 | +import org.springframework.data.jpa.repository.Modifying; | ||
| 7 | +import org.springframework.data.jpa.repository.Query; | ||
| 4 | import org.springframework.stereotype.Repository; | 8 | import org.springframework.stereotype.Repository; |
| 9 | +import org.springframework.transaction.annotation.Transactional; | ||
| 10 | + | ||
| 5 | import com.bsth.entity.oil.Cyl; | 11 | import com.bsth.entity.oil.Cyl; |
| 6 | import com.bsth.repository.BaseRepository; | 12 | import com.bsth.repository.BaseRepository; |
| 7 | 13 | ||
| 8 | @Repository | 14 | @Repository |
| 9 | public interface CylRepository extends BaseRepository<Cyl, Integer>{ | 15 | public interface CylRepository extends BaseRepository<Cyl, Integer>{ |
| 10 | - | 16 | + @Transactional |
| 17 | + @Modifying | ||
| 18 | + @Query(value="SELECT * FROM bsth_c_cyl ",nativeQuery=true) | ||
| 19 | + List<Cyl> obtainCyl(); | ||
| 11 | } | 20 | } |
src/main/java/com/bsth/repository/oil/YlbRepository.java
| @@ -39,8 +39,8 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -39,8 +39,8 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 39 | 39 | ||
| 40 | @Transactional | 40 | @Transactional |
| 41 | @Modifying | 41 | @Modifying |
| 42 | - @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and nbbm =?2 ",nativeQuery=true) | ||
| 43 | - List<Ylb> queryListYlb(String rq,String nbbm); | 42 | + @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and nbbm =?2 and jsy=?3",nativeQuery=true) |
| 43 | + List<Ylb> queryListYlb(String rq,String nbbm,String jgh); | ||
| 44 | /** | 44 | /** |
| 45 | * 查询当天总的加注量和总里程 | 45 | * 查询当天总的加注量和总里程 |
| 46 | * @param rq | 46 | * @param rq |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| @@ -133,7 +133,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | @@ -133,7 +133,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | ||
| 133 | @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m') = ?2 and s.bcType not in ('in','out') order by s.xlBm") | 133 | @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m') = ?2 and s.bcType not in ('in','out') order by s.xlBm") |
| 134 | List<ScheduleRealInfo> scheduleByDateAndLine3(String line,String date); | 134 | List<ScheduleRealInfo> scheduleByDateAndLine3(String line,String date); |
| 135 | 135 | ||
| 136 | - @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh) from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY xlBm,clZbh,jGh,scheduleDate,jGh ORDER BY realExecDate,fcsj,xlBm,clZbh") | 136 | + @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh) from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY xlBm,clZbh,jGh,scheduleDate,jGh ORDER BY xlBm,clZbh") |
| 137 | List<Map<String,Object>> yesterdayDataList(String line,String date); | 137 | List<Map<String,Object>> yesterdayDataList(String line,String date); |
| 138 | 138 | ||
| 139 | @Query(value="select s from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 ORDER BY xlBm,lpName,clZbh,xlDir") | 139 | @Query(value="select s from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 ORDER BY xlBm,lpName,clZbh,xlDir") |
src/main/java/com/bsth/repository/schedule/SchedulePlanInfoRepository.java
| @@ -43,7 +43,7 @@ public interface SchedulePlanInfoRepository extends BaseRepository<SchedulePlanI | @@ -43,7 +43,7 @@ public interface SchedulePlanInfoRepository extends BaseRepository<SchedulePlanI | ||
| 43 | "group_concat(distinct info.s_name) spyName, " + | 43 | "group_concat(distinct info.s_name) spyName, " + |
| 44 | "group_concat(info.fcno) fcno, " + | 44 | "group_concat(info.fcno) fcno, " + |
| 45 | "max(info.update_date) as updateDate, " + | 45 | "max(info.update_date) as updateDate, " + |
| 46 | - "max(user.name) as updateUserName, " + | 46 | + "max(user.user_name) as updateUserName, " + |
| 47 | "max(info.tt_info_name) as ttInfoName " + | 47 | "max(info.tt_info_name) as ttInfoName " + |
| 48 | "from bsth_c_s_sp_info info left join bsth_c_sys_user user on info.update_by = user.id " + | 48 | "from bsth_c_s_sp_info info left join bsth_c_sys_user user on info.update_by = user.id " + |
| 49 | "where info.xl = ?1 and " + | 49 | "where info.xl = ?1 and " + |
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
| @@ -85,6 +85,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -85,6 +85,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 85 | // List<Ylxxb> ylxxList=ylxxbRepository.obtainYlxx(rq); | 85 | // List<Ylxxb> ylxxList=ylxxbRepository.obtainYlxx(rq); |
| 86 | //前一天所有车辆最后进场班次信息 | 86 | //前一天所有车辆最后进场班次信息 |
| 87 | List<Ylb> ylListBe=repository.obtainYlbefore(rq); | 87 | List<Ylb> ylListBe=repository.obtainYlbefore(rq); |
| 88 | + List<Cyl> clyList=cylRepository.obtainCyl(); | ||
| 88 | //从排班表中计算出行驶的总里程 | 89 | //从排班表中计算出行驶的总里程 |
| 89 | List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList("",rq); | 90 | List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList("",rq); |
| 90 | 91 | ||
| @@ -106,13 +107,21 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -106,13 +107,21 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 106 | try { | 107 | try { |
| 107 | //当日的第一个班次,出场油量等于前一天的最后一个班次的进场油量 | 108 | //当日的第一个班次,出场油量等于前一天的最后一个班次的进场油量 |
| 108 | if(map.get("seqNumber").toString().equals("1")){ | 109 | if(map.get("seqNumber").toString().equals("1")){ |
| 109 | - for (int y = 0; y < ylListBe.size(); y++) { | ||
| 110 | - Ylb ylb=ylListBe.get(y); | ||
| 111 | - if(map.get("clZbh").toString().equals(ylb.getNbbm())){ | ||
| 112 | - t.setCzyl(ylb.getJzyl()); | 110 | + for (int y = 0; y < clyList.size(); y++) { |
| 111 | + Cyl cyl=clyList.get(y); | ||
| 112 | + if(map.get("clZbh").toString().equals(cyl.getNbbm())){ | ||
| 113 | + t.setCzyl(cyl.getCyl()); | ||
| 113 | break; | 114 | break; |
| 114 | }else{ | 115 | }else{ |
| 115 | - t.setCzyl(0.0); | 116 | + for (int i = 0; i < ylListBe.size(); i++) { |
| 117 | + Ylb ylb=ylListBe.get(i); | ||
| 118 | + if(map.get("clZbh").toString().equals(ylb.getNbbm())){ | ||
| 119 | + t.setCzyl(ylb.getJzyl()); | ||
| 120 | + break; | ||
| 121 | + }else{ | ||
| 122 | + t.setCzyl(0.0); | ||
| 123 | + } | ||
| 124 | + } | ||
| 116 | } | 125 | } |
| 117 | } | 126 | } |
| 118 | } | 127 | } |
| @@ -171,6 +180,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -171,6 +180,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 171 | List<Ylxxb> ylxxList=ylxxbRepository.obtainYlxx(rq); | 180 | List<Ylxxb> ylxxList=ylxxbRepository.obtainYlxx(rq); |
| 172 | //前一天所有车辆最后进场班次信息 | 181 | //前一天所有车辆最后进场班次信息 |
| 173 | List<Ylb> ylListBe=repository.obtainYlbefore(rq); | 182 | List<Ylb> ylListBe=repository.obtainYlbefore(rq); |
| 183 | + List<Cyl> clyList=cylRepository.obtainCyl(); | ||
| 174 | //从排班表中计算出行驶的总里程 | 184 | //从排班表中计算出行驶的总里程 |
| 175 | List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList(line,rq); | 185 | List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList(line,rq); |
| 176 | 186 | ||
| @@ -192,13 +202,21 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -192,13 +202,21 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 192 | try { | 202 | try { |
| 193 | //当日的第一个班次,出场油量等于前一天的最后一个班次的进场油量 | 203 | //当日的第一个班次,出场油量等于前一天的最后一个班次的进场油量 |
| 194 | if(map.get("seqNumber").toString().equals("1")){ | 204 | if(map.get("seqNumber").toString().equals("1")){ |
| 195 | - for (int y = 0; y < ylListBe.size(); y++) { | ||
| 196 | - Ylb ylb=ylListBe.get(y); | ||
| 197 | - if(map.get("clZbh").toString().equals(ylb.getNbbm())){ | ||
| 198 | - t.setCzyl(ylb.getJzyl()); | 205 | + for (int y = 0; y < clyList.size(); y++) { |
| 206 | + Cyl cyl=clyList.get(y); | ||
| 207 | + if(map.get("clZbh").toString().equals(cyl.getNbbm())){ | ||
| 208 | + t.setCzyl(cyl.getCyl()); | ||
| 199 | break; | 209 | break; |
| 200 | }else{ | 210 | }else{ |
| 201 | - t.setCzyl(0.0); | 211 | + for (int i = 0; i < ylListBe.size(); i++) { |
| 212 | + Ylb ylb=ylListBe.get(i); | ||
| 213 | + if(map.get("clZbh").toString().equals(ylb.getNbbm())){ | ||
| 214 | + t.setCzyl(ylb.getJzyl()); | ||
| 215 | + break; | ||
| 216 | + }else{ | ||
| 217 | + t.setCzyl(0.0); | ||
| 218 | + } | ||
| 219 | + } | ||
| 202 | } | 220 | } |
| 203 | } | 221 | } |
| 204 | } | 222 | } |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -67,6 +67,7 @@ import java.text.DecimalFormat; | @@ -67,6 +67,7 @@ import java.text.DecimalFormat; | ||
| 67 | import java.text.ParseException; | 67 | import java.text.ParseException; |
| 68 | import java.text.SimpleDateFormat; | 68 | import java.text.SimpleDateFormat; |
| 69 | import java.util.*; | 69 | import java.util.*; |
| 70 | +import java.util.regex.Pattern; | ||
| 70 | import java.util.zip.ZipEntry; | 71 | import java.util.zip.ZipEntry; |
| 71 | import java.util.zip.ZipOutputStream; | 72 | import java.util.zip.ZipOutputStream; |
| 72 | 73 | ||
| @@ -461,6 +462,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -461,6 +462,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 461 | public List<ScheduleRealInfo> queryUserInfoPx(String line, String date, String state,String type) { | 462 | public List<ScheduleRealInfo> queryUserInfoPx(String line, String date, String state,String type) { |
| 462 | // List<ScheduleRealInfo> list=new ArrayList<ScheduleRealInfo>(); | 463 | // List<ScheduleRealInfo> list=new ArrayList<ScheduleRealInfo>(); |
| 463 | state=state+""; | 464 | state=state+""; |
| 465 | + String lpname=state; | ||
| 466 | + String px=type; | ||
| 467 | + if(state.equals("lpName")){ | ||
| 468 | + state =state+"+1"; | ||
| 469 | + type="asc"; | ||
| 470 | + } | ||
| 464 | String sqlPlan="select min(s.id) as id,s.j_Gh as jGh,s.cl_Zbh as clZbh," | 471 | String sqlPlan="select min(s.id) as id,s.j_Gh as jGh,s.cl_Zbh as clZbh," |
| 465 | + " s.lp_Name as lpName,s.j_Name as jName,s.s_Gh as sGh,s.s_Name as sName" | 472 | + " s.lp_Name as lpName,s.j_Name as jName,s.s_Gh as sGh,s.s_Name as sName" |
| 466 | + " from bsth_c_s_sp_info_real s " | 473 | + " from bsth_c_s_sp_info_real s " |
| @@ -482,7 +489,60 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -482,7 +489,60 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 482 | return t; | 489 | return t; |
| 483 | } | 490 | } |
| 484 | }); | 491 | }); |
| 492 | + if(lpname.equals("lpName")){ | ||
| 493 | + List<ScheduleRealInfo> listNew=new ArrayList<ScheduleRealInfo>(); | ||
| 494 | + Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$"); | ||
| 495 | + if(px.equals("desc")){ | ||
| 496 | + int zt=0; | ||
| 497 | + for (int l = 0; l < 3; l++) { | ||
| 498 | + for (int i = 0; i < list.size(); i++) { | ||
| 499 | + ScheduleRealInfo t=list.get(i); | ||
| 500 | + if(t.getLpName().indexOf("+")!=-1){ | ||
| 501 | + if(zt==0){ | ||
| 502 | + listNew.add(t); | ||
| 503 | + } | ||
| 504 | + | ||
| 505 | + }else if(pattern.matcher(t.getLpName()).matches()){ | ||
| 506 | + if(zt==1){ | ||
| 507 | + listNew.add(t); | ||
| 508 | + } | ||
| 509 | + }else{ | ||
| 510 | + if(zt==2){ | ||
| 511 | + listNew.add(t); | ||
| 512 | + } | ||
| 513 | + } | ||
| 514 | + } | ||
| 515 | + zt++; | ||
| 516 | + } | ||
| 517 | + }else{ | ||
| 518 | + int zt=0; | ||
| 519 | + for (int l = 0; l < 3; l++) { | ||
| 520 | + for (int i = 0; i < list.size(); i++) { | ||
| 521 | + ScheduleRealInfo t=list.get(i); | ||
| 522 | + if(t.getLpName().indexOf("+")!=-1){ | ||
| 523 | + if(zt==2){ | ||
| 524 | + listNew.add(t); | ||
| 525 | + } | ||
| 526 | + | ||
| 527 | + }else if(pattern.matcher(t.getLpName()).matches()){ | ||
| 528 | + if(zt==1){ | ||
| 529 | + listNew.add(t); | ||
| 530 | + } | ||
| 531 | + }else{ | ||
| 532 | + if(zt==0){ | ||
| 533 | + listNew.add(t); | ||
| 534 | + } | ||
| 535 | + } | ||
| 536 | + } | ||
| 537 | + zt++; | ||
| 538 | + } | ||
| 539 | + | ||
| 540 | + } | ||
| 541 | + return listNew; | ||
| 542 | + }else{ | ||
| 485 | return list; | 543 | return list; |
| 544 | + } | ||
| 545 | + | ||
| 486 | } | 546 | } |
| 487 | 547 | ||
| 488 | /** | 548 | /** |
| @@ -1226,7 +1286,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1226,7 +1286,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1226 | if (childTaskPlans.isEmpty()) { | 1286 | if (childTaskPlans.isEmpty()) { |
| 1227 | if (scheduleRealInfo.getBcType().equals("in") || | 1287 | if (scheduleRealInfo.getBcType().equals("in") || |
| 1228 | scheduleRealInfo.getBcType().equals("out")) { | 1288 | scheduleRealInfo.getBcType().equals("out")) { |
| 1229 | - jcclc += tempJhlc; | 1289 | + if(scheduleRealInfo.getStatus() != -1){ |
| 1290 | + jcclc += tempJhlc; | ||
| 1291 | + } | ||
| 1292 | + | ||
| 1230 | } | 1293 | } |
| 1231 | //主任务 放空班次属于营运 | 1294 | //主任务 放空班次属于营运 |
| 1232 | // else if(scheduleRealInfo.getBcType().equals("venting")){ | 1295 | // else if(scheduleRealInfo.getBcType().equals("venting")){ |
| @@ -2997,7 +3060,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2997,7 +3060,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2997 | jzl += y.getJzl(); | 3060 | jzl += y.getJzl(); |
| 2998 | } | 3061 | } |
| 2999 | 3062 | ||
| 3000 | - List<Ylb> listYlb=ylbRepository.queryListYlb( fcrq,s.getClZbh()); | 3063 | + List<Ylb> listYlb=ylbRepository.queryListYlb( fcrq,s.getClZbh(),s.getjGh()); |
| 3001 | Double ccyl=0.0; | 3064 | Double ccyl=0.0; |
| 3002 | Double jcyl=0.0; | 3065 | Double jcyl=0.0; |
| 3003 | Double yh=0.0; | 3066 | Double yh=0.0; |
src/main/resources/static/pages/forms/statement/waybill.html
| @@ -207,7 +207,7 @@ | @@ -207,7 +207,7 @@ | ||
| 207 | line = $("#line").val(); | 207 | line = $("#line").val(); |
| 208 | date = $("#date").val(); | 208 | date = $("#date").val(); |
| 209 | $(".hidden").removeClass("hidden"); | 209 | $(".hidden").removeClass("hidden"); |
| 210 | - $get('/realSchedule/queryUserInfoPx',{line:line,date:date,state:"(lpName+1)",type:type},function(result){ | 210 | + $get('/realSchedule/queryUserInfoPx',{line:line,date:date,state:"lpName",type:type},function(result){ |
| 211 | if(type=="desc"){ | 211 | if(type=="desc"){ |
| 212 | type ="asc"; | 212 | type ="asc"; |
| 213 | }else{ | 213 | }else{ |
src/main/resources/static/pages/oil/list_ph.html
| @@ -82,7 +82,7 @@ | @@ -82,7 +82,7 @@ | ||
| 82 | 线路: | 82 | 线路: |
| 83 | </td> | 83 | </td> |
| 84 | <td colspan="3"> | 84 | <td colspan="3"> |
| 85 | - <select class="form-control" name="xlbm_eq" id="xlbm" style="width: 120px;"></select> | 85 | + <select class="form-control" name="xlbm_like" id="xlbm" style="width: 120px;"></select> |
| 86 | | 86 | |
| 87 | </td> | 87 | </td> |
| 88 | <td > | 88 | <td > |
| @@ -231,7 +231,9 @@ | @@ -231,7 +231,9 @@ | ||
| 231 | } | 231 | } |
| 232 | } | 232 | } |
| 233 | }); | 233 | }); |
| 234 | + var i = layer.load(2); | ||
| 234 | $get('/ylb/checkYl', params, function () { | 235 | $get('/ylb/checkYl', params, function () { |
| 236 | + layer.close(i); | ||
| 235 | jsDoQuery(null, true); | 237 | jsDoQuery(null, true); |
| 236 | }); | 238 | }); |
| 237 | } else { | 239 | } else { |
| @@ -255,7 +257,9 @@ | @@ -255,7 +257,9 @@ | ||
| 255 | } | 257 | } |
| 256 | } | 258 | } |
| 257 | }); | 259 | }); |
| 260 | + var i = layer.load(2); | ||
| 258 | $get('/ylb/outAndIn', params, function () { | 261 | $get('/ylb/outAndIn', params, function () { |
| 262 | + layer.close(i); | ||
| 259 | jsDoQuery(null, true); | 263 | jsDoQuery(null, true); |
| 260 | }); | 264 | }); |
| 261 | } else { | 265 | } else { |
| @@ -273,11 +277,12 @@ | @@ -273,11 +277,12 @@ | ||
| 273 | //获取输入的进场存油 | 277 | //获取输入的进场存油 |
| 274 | var jzyl = $('.in_carpark_jzyl[data-id='+id+']', '#ll_oil_list').html(); | 278 | var jzyl = $('.in_carpark_jzyl[data-id='+id+']', '#ll_oil_list').html(); |
| 275 | // $("#jzyl" + id).html(); | 279 | // $("#jzyl" + id).html(); |
| 276 | - console.log(jzyl); | ||
| 277 | var params = {}; | 280 | var params = {}; |
| 278 | params['jzyl'] = jzyl; | 281 | params['jzyl'] = jzyl; |
| 279 | params['id'] = id; | 282 | params['id'] = id; |
| 283 | + var i = layer.load(2); | ||
| 280 | $get('/ylb/sort', params, function () { | 284 | $get('/ylb/sort', params, function () { |
| 285 | + layer.close(i); | ||
| 281 | jsDoQuery(null, true); | 286 | jsDoQuery(null, true); |
| 282 | }); | 287 | }); |
| 283 | 288 | ||
| @@ -302,7 +307,9 @@ | @@ -302,7 +307,9 @@ | ||
| 302 | } | 307 | } |
| 303 | } | 308 | } |
| 304 | }); | 309 | }); |
| 310 | + var i = layer.load(2); | ||
| 305 | $get('/ylb/obtain', params, function () { | 311 | $get('/ylb/obtain', params, function () { |
| 312 | + layer.close(i); | ||
| 306 | jsDoQuery(params, true); | 313 | jsDoQuery(params, true); |
| 307 | }); | 314 | }); |
| 308 | } else { | 315 | } else { |
| @@ -530,7 +537,7 @@ | @@ -530,7 +537,7 @@ | ||
| 530 | //搜索线路 | 537 | //搜索线路 |
| 531 | $.get('/basic/lineCode2Name',function(result){ | 538 | $.get('/basic/lineCode2Name',function(result){ |
| 532 | var data=[]; | 539 | var data=[]; |
| 533 | - | 540 | + data.push({id: " ", text: "全部线路"}); |
| 534 | for(var code in result){ | 541 | for(var code in result){ |
| 535 | data.push({id: code, text: result[code]}); | 542 | data.push({id: code, text: result[code]}); |
| 536 | } | 543 | } |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html
| @@ -55,17 +55,22 @@ | @@ -55,17 +55,22 @@ | ||
| 55 | </div> | 55 | </div> |
| 56 | </div> | 56 | </div> |
| 57 | 57 | ||
| 58 | - <!-- TODO --> | ||
| 59 | <div class="form-group"> | 58 | <div class="form-group"> |
| 60 | <label class="col-md-2 control-label">分公司:</label> | 59 | <label class="col-md-2 control-label">分公司:</label> |
| 61 | <div class="col-md-3"> | 60 | <div class="col-md-3"> |
| 62 | - <select name="brancheCompanyCode" class="form-control"> | ||
| 63 | - <option value="">请选择...</option> | ||
| 64 | - <option value="1">分公司1</option> | ||
| 65 | - <option value="2">分公司1</option> | ||
| 66 | - <option value="3">分公司1</option> | ||
| 67 | - <option value="4">分公司1</option> | ||
| 68 | - </select> | 61 | + <sa-Select5 name="fgs" |
| 62 | + model="ctrl.employeeInfoForSave" | ||
| 63 | + cmaps="{'brancheCompanyCode': 'businessCode', 'brancheCompany': 'businessName'}" | ||
| 64 | + dcname="brancheCompanyCode" | ||
| 65 | + icname="businessCode" | ||
| 66 | + dsparams="{{ {type: 'ajax', param:{'upCode_eq': ctrl.employeeInfoForSave.companyCode }, atype:'gs' } | json }}" | ||
| 67 | + iterobjname="item" | ||
| 68 | + iterobjexp="item.businessName" | ||
| 69 | + searchph="请选择所属分公司..." | ||
| 70 | + searchexp="this.businessName" | ||
| 71 | + > | ||
| 72 | + </sa-Select5> | ||
| 73 | + | ||
| 69 | </div> | 74 | </div> |
| 70 | </div> | 75 | </div> |
| 71 | 76 |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html
| @@ -55,17 +55,22 @@ | @@ -55,17 +55,22 @@ | ||
| 55 | </div> | 55 | </div> |
| 56 | </div> | 56 | </div> |
| 57 | 57 | ||
| 58 | - <!-- TODO --> | ||
| 59 | <div class="form-group"> | 58 | <div class="form-group"> |
| 60 | <label class="col-md-2 control-label">分公司:</label> | 59 | <label class="col-md-2 control-label">分公司:</label> |
| 61 | <div class="col-md-3"> | 60 | <div class="col-md-3"> |
| 62 | - <select name="brancheCompanyCode" class="form-control"> | ||
| 63 | - <option value="">请选择...</option> | ||
| 64 | - <option value="1">分公司1</option> | ||
| 65 | - <option value="2">分公司1</option> | ||
| 66 | - <option value="3">分公司1</option> | ||
| 67 | - <option value="4">分公司1</option> | ||
| 68 | - </select> | 61 | + <sa-Select5 name="fgs" |
| 62 | + model="ctrl.employeeInfoForSave" | ||
| 63 | + cmaps="{'brancheCompanyCode': 'businessCode', 'brancheCompany': 'businessName'}" | ||
| 64 | + dcname="brancheCompanyCode" | ||
| 65 | + icname="businessCode" | ||
| 66 | + dsparams="{{ {type: 'ajax', param:{'upCode_eq': ctrl.employeeInfoForSave.companyCode }, atype:'gs' } | json }}" | ||
| 67 | + iterobjname="item" | ||
| 68 | + iterobjexp="item.businessName" | ||
| 69 | + searchph="请选择所属分公司..." | ||
| 70 | + searchexp="this.businessName" | ||
| 71 | + > | ||
| 72 | + </sa-Select5> | ||
| 73 | + | ||
| 69 | </div> | 74 | </div> |
| 70 | </div> | 75 | </div> |
| 71 | 76 |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html
| @@ -101,6 +101,7 @@ | @@ -101,6 +101,7 @@ | ||
| 101 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> | 101 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> |
| 102 | <a ui-sref="employeeInfoManage_detail({id: info.id})" class="btn btn-info btn-sm"> 详细 </a> | 102 | <a ui-sref="employeeInfoManage_detail({id: info.id})" class="btn btn-info btn-sm"> 详细 </a> |
| 103 | <a ui-sref="employeeInfoManage_edit({id: info.id})" class="btn btn-info btn-sm"> 修改 </a> | 103 | <a ui-sref="employeeInfoManage_edit({id: info.id})" class="btn btn-info btn-sm"> 修改 </a> |
| 104 | + <a ng-click="ctrl.deleteEmp(info.id)" class="btn btn-danger btn-sm"> 删除 </a> | ||
| 104 | </td> | 105 | </td> |
| 105 | </tr> | 106 | </tr> |
| 106 | </tbody> | 107 | </tbody> |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js
| @@ -132,48 +132,56 @@ angular.module('ScheduleApp').controller( | @@ -132,48 +132,56 @@ angular.module('ScheduleApp').controller( | ||
| 132 | ] | 132 | ] |
| 133 | ); | 133 | ); |
| 134 | 134 | ||
| 135 | -angular.module('ScheduleApp').controller('EmployInfoManageToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | ||
| 136 | - var self = this; | ||
| 137 | - | ||
| 138 | - // 关闭窗口 | ||
| 139 | - self.close = function() { | ||
| 140 | - $modalInstance.dismiss("cancel"); | ||
| 141 | - }; | ||
| 142 | - | ||
| 143 | - self.clearInputFile = function() { | ||
| 144 | - angular.element("input[type='file']").val(null); | ||
| 145 | - }; | ||
| 146 | - | ||
| 147 | - // 上传文件组件 | ||
| 148 | - self.uploader = new FileUploader({ | ||
| 149 | - url: "/ee/uploadAndImportFile", | ||
| 150 | - filters: [] // 用于过滤文件,比如只允许导入excel | ||
| 151 | - }); | ||
| 152 | - self.uploader.onAfterAddingFile = function(fileItem) | ||
| 153 | - { | ||
| 154 | - console.info('onAfterAddingFile', fileItem); | ||
| 155 | - console.log(self.uploader.queue.length); | ||
| 156 | - if (self.uploader.queue.length > 1) | ||
| 157 | - self.uploader.removeFromQueue(0); | ||
| 158 | - }; | ||
| 159 | - self.uploader.onSuccessItem = function(fileItem, response, status, headers) | ||
| 160 | - { | ||
| 161 | - if (response.status == "SUCCESS") { | ||
| 162 | - console.info('onSuccessItem', fileItem, response, status, headers); | ||
| 163 | - } else { | ||
| 164 | - fileItem.isSuccess = false; | ||
| 165 | - fileItem.isCancel = false; | ||
| 166 | - fileItem.isError = true; | ||
| 167 | - | ||
| 168 | - alert(response.msg); | ||
| 169 | - } | ||
| 170 | - }; | ||
| 171 | - self.uploader.onErrorItem = function(fileItem, response, status, headers) | ||
| 172 | - { | ||
| 173 | - console.info('onErrorItem', fileItem, response, status, headers); | ||
| 174 | - }; | 135 | +// dataImport.html控制 |
| 136 | +angular.module('ScheduleApp').controller( | ||
| 137 | + 'EmployInfoManageToolsCtrl', | ||
| 138 | + [ | ||
| 139 | + '$modalInstance', | ||
| 140 | + 'FileUploader', | ||
| 141 | + function($modalInstance, FileUploader) { | ||
| 142 | + var self = this; | ||
| 175 | 143 | ||
| 176 | -}]); | 144 | + // 关闭窗口 |
| 145 | + self.close = function() { | ||
| 146 | + $modalInstance.dismiss("cancel"); | ||
| 147 | + }; | ||
| 148 | + | ||
| 149 | + self.clearInputFile = function() { | ||
| 150 | + angular.element("input[type='file']").val(null); | ||
| 151 | + }; | ||
| 152 | + | ||
| 153 | + // 上传文件组件 | ||
| 154 | + self.uploader = new FileUploader({ | ||
| 155 | + url: "/ee/uploadAndImportFile", | ||
| 156 | + filters: [] // 用于过滤文件,比如只允许导入excel | ||
| 157 | + }); | ||
| 158 | + self.uploader.onAfterAddingFile = function(fileItem) | ||
| 159 | + { | ||
| 160 | + console.info('onAfterAddingFile', fileItem); | ||
| 161 | + console.log(self.uploader.queue.length); | ||
| 162 | + if (self.uploader.queue.length > 1) | ||
| 163 | + self.uploader.removeFromQueue(0); | ||
| 164 | + }; | ||
| 165 | + self.uploader.onSuccessItem = function(fileItem, response, status, headers) | ||
| 166 | + { | ||
| 167 | + if (response.status == "SUCCESS") { | ||
| 168 | + console.info('onSuccessItem', fileItem, response, status, headers); | ||
| 169 | + } else { | ||
| 170 | + fileItem.isSuccess = false; | ||
| 171 | + fileItem.isCancel = false; | ||
| 172 | + fileItem.isError = true; | ||
| 173 | + | ||
| 174 | + alert(response.msg); | ||
| 175 | + } | ||
| 176 | + }; | ||
| 177 | + self.uploader.onErrorItem = function(fileItem, response, status, headers) | ||
| 178 | + { | ||
| 179 | + console.info('onErrorItem', fileItem, response, status, headers); | ||
| 180 | + }; | ||
| 181 | + | ||
| 182 | + } | ||
| 183 | + ] | ||
| 184 | +); | ||
| 177 | 185 | ||
| 178 | // list.html控制器 | 186 | // list.html控制器 |
| 179 | angular.module('ScheduleApp').controller( | 187 | angular.module('ScheduleApp').controller( |
| @@ -208,6 +216,16 @@ angular.module('ScheduleApp').controller( | @@ -208,6 +216,16 @@ angular.module('ScheduleApp').controller( | ||
| 208 | }); | 216 | }); |
| 209 | }; | 217 | }; |
| 210 | 218 | ||
| 219 | + self.deleteEmp = function(id) { | ||
| 220 | + Employee.delete({id: id}, function(result) { | ||
| 221 | + if (result.msg) { // 暂时这样做,之后全局拦截 | ||
| 222 | + alert("失败:" + result.msg); | ||
| 223 | + } else { | ||
| 224 | + self.doPage(); | ||
| 225 | + } | ||
| 226 | + }); | ||
| 227 | + }; | ||
| 228 | + | ||
| 211 | self.doPage(); | 229 | self.doPage(); |
| 212 | 230 | ||
| 213 | } | 231 | } |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/info/list_info.html
| @@ -89,7 +89,7 @@ | @@ -89,7 +89,7 @@ | ||
| 89 | <span ng-bind="info.ttInfoName"></span> | 89 | <span ng-bind="info.ttInfoName"></span> |
| 90 | </td> | 90 | </td> |
| 91 | <td> | 91 | <td> |
| 92 | - <span ng-bind="info.updateBy.name"></span> | 92 | + <span ng-bind="info.updateBy.userName"></span> |
| 93 | </td> | 93 | </td> |
| 94 | <td> | 94 | <td> |
| 95 | <span ng-bind="info.updateDate | date: 'yyyy-MM-dd'"></span> | 95 | <span ng-bind="info.updateDate | date: 'yyyy-MM-dd'"></span> |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/list.html
| @@ -90,7 +90,7 @@ | @@ -90,7 +90,7 @@ | ||
| 90 | <span ng-bind="info.scheduleToTime | date: 'yyyy-MM-dd '"></span> | 90 | <span ng-bind="info.scheduleToTime | date: 'yyyy-MM-dd '"></span> |
| 91 | </td> | 91 | </td> |
| 92 | <td> | 92 | <td> |
| 93 | - <span ng-bind="info.updateBy.name"></span> | 93 | + <span ng-bind="info.updateBy.userName"></span> |
| 94 | / | 94 | / |
| 95 | <span ng-bind="info.updateDate | date: 'yyyy-MM-dd HH:mm:ss'"></span> | 95 | <span ng-bind="info.updateDate | date: 'yyyy-MM-dd HH:mm:ss'"></span> |
| 96 | </td> | 96 | </td> |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/report/module.js
| @@ -240,6 +240,21 @@ angular.module('ScheduleApp').controller('SchedulePlanReportManageFormCtrl', [ | @@ -240,6 +240,21 @@ angular.module('ScheduleApp').controller('SchedulePlanReportManageFormCtrl', [ | ||
| 240 | update: self.groupInfo | 240 | update: self.groupInfo |
| 241 | }; | 241 | }; |
| 242 | 242 | ||
| 243 | + // 处理工号,去除 -,如:55-33333,去除55- | ||
| 244 | + var reg = /^(.*?)\-(.*?)$/; | ||
| 245 | + if (self.groupInfo.jsy1Gh) { | ||
| 246 | + self.groupInfo.jsy1Gh = self.groupInfo.jsy1Gh.replace(reg, '$2'); | ||
| 247 | + } | ||
| 248 | + if (self.groupInfo.spy1Gh) { | ||
| 249 | + self.groupInfo.spy1Gh = self.groupInfo.spy1Gh.replace(reg, '$2'); | ||
| 250 | + } | ||
| 251 | + if (self.groupInfo.jsy2Gh) { | ||
| 252 | + self.groupInfo.jsy2Gh = self.groupInfo.jsy2Gh.replace(reg, '$2'); | ||
| 253 | + } | ||
| 254 | + if (self.groupInfo.spy2Gh) { | ||
| 255 | + self.groupInfo.spy2Gh = self.groupInfo.spy2Gh.replace(reg, '$2'); | ||
| 256 | + } | ||
| 257 | + | ||
| 243 | //console.log($scope); | 258 | //console.log($scope); |
| 244 | //console.log(param); | 259 | //console.log(param); |
| 245 | schedulePlanReportManageService.updateDetail(param).then( | 260 | schedulePlanReportManageService.updateDetail(param).then( |
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/list.html
| @@ -58,7 +58,7 @@ | @@ -58,7 +58,7 @@ | ||
| 58 | <span ng-bind="info.xl.name"></span> | 58 | <span ng-bind="info.xl.name"></span> |
| 59 | </td> | 59 | </td> |
| 60 | <td> | 60 | <td> |
| 61 | - <span ng-bind="info.updateBy.name"></span> | 61 | + <span ng-bind="info.updateBy.userName"></span> |
| 62 | / | 62 | / |
| 63 | <span ng-bind="info.updateDate | date: 'yyyy-MM-dd HH:mm:ss'"></span> | 63 | <span ng-bind="info.updateDate | date: 'yyyy-MM-dd HH:mm:ss'"></span> |
| 64 | </td> | 64 | </td> |