Commit 4ea8f722de5739a2e4b7a406a105c319ca619cdf
1 parent
b0228682
update...
Showing
1 changed file
with
16 additions
and
10 deletions
src/main/java/com/bsth/server_ws/util/WSDataConver.java
| ... | ... | @@ -619,7 +619,7 @@ public class WSDataConver { |
| 619 | 619 | * @param oilList |
| 620 | 620 | * @return |
| 621 | 621 | */ |
| 622 | - public static String[] to_getLSLC_PB(String fdate, List<ScheduleRealInfo> schList, List<OilInfo> oilList) { | |
| 622 | + public static String[] to_getLSLC_PB(String fdate, List<ScheduleRealInfo> schList, List<OilInfo> oilList, List<SchedulePlanInfo> planList) { | |
| 623 | 623 | String[] array = new String[0]; |
| 624 | 624 | try { |
| 625 | 625 | //按日期分组数据 |
| ... | ... | @@ -629,6 +629,10 @@ public class WSDataConver { |
| 629 | 629 | ArrayListMultimap<String, OilInfo> oilMultimap = |
| 630 | 630 | new ConvertUtil().groupMultiList(oilList, "_", OilInfo.class.getDeclaredField("rq")); |
| 631 | 631 | |
| 632 | + ArrayListMultimap<String, SchedulePlanInfo> planMultimap = | |
| 633 | + new ConvertUtil().groupMultiList(planList, "_", ScheduleRealInfo.class.getDeclaredField("scheduleDateStr")); | |
| 634 | + | |
| 635 | + | |
| 632 | 636 | //月份有多少天 |
| 633 | 637 | int year = Integer.parseInt(fdate.substring(0, 4)); |
| 634 | 638 | int month = Integer.parseInt(fdate.substring(5, 7)); |
| ... | ... | @@ -640,9 +644,10 @@ public class WSDataConver { |
| 640 | 644 | List<LsLcPb> rs = new ArrayList<>(); |
| 641 | 645 | LsLcPb lcPb; |
| 642 | 646 | List<ScheduleRealInfo> pbList; |
| 647 | + List<SchedulePlanInfo> jhList; | |
| 643 | 648 | List<OilInfo> yhList; |
| 644 | 649 | String rq,rq2; |
| 645 | - ScheduleRealInfo outSch; | |
| 650 | + SchedulePlanInfo outPlan; | |
| 646 | 651 | int currentDay = cal.get(Calendar.DAY_OF_MONTH); |
| 647 | 652 | for(int i = 1; i <= maxDate; i++){ |
| 648 | 653 | lcPb = new LsLcPb(); |
| ... | ... | @@ -651,6 +656,7 @@ public class WSDataConver { |
| 651 | 656 | |
| 652 | 657 | pbList = schMultimap.get(rq); |
| 653 | 658 | yhList = oilMultimap.get(rq2); |
| 659 | + jhList = planMultimap.get(rq); | |
| 654 | 660 | |
| 655 | 661 | if(pbList == null || pbList.size() == 0) |
| 656 | 662 | lcPb.setType(4);//休息 |
| ... | ... | @@ -667,12 +673,12 @@ public class WSDataConver { |
| 667 | 673 | lcPb.setType(3);//今天 |
| 668 | 674 | else { |
| 669 | 675 | lcPb.setType(2); |
| 670 | - outSch = getOutSch(pbList); | |
| 671 | - if(null != outSch){ | |
| 672 | - lcPb.setPbxl(outSch.getXlName()); | |
| 673 | - lcPb.setPblp(outSch.getLpName()); | |
| 674 | - lcPb.setPbbd(minusMinute(outSch.getDfsj(), 15)); | |
| 675 | - lcPb.setPbyc(outSch.getClZbh()); | |
| 676 | + outPlan = getOutSch(jhList); | |
| 677 | + if(null != outPlan){ | |
| 678 | + lcPb.setPbxl(outPlan.getXlName()); | |
| 679 | + lcPb.setPblp(outPlan.getLpName()); | |
| 680 | + lcPb.setPbbd(minusMinute(outPlan.getFcsj(), 15)); | |
| 681 | + lcPb.setPbyc(outPlan.getClZbh()); | |
| 676 | 682 | } |
| 677 | 683 | } |
| 678 | 684 | |
| ... | ... | @@ -728,9 +734,9 @@ public class WSDataConver { |
| 728 | 734 | return null; |
| 729 | 735 | } |
| 730 | 736 | |
| 731 | - private static ScheduleRealInfo getOutSch(List<ScheduleRealInfo> pbList) { | |
| 737 | + private static SchedulePlanInfo getOutSch(List<SchedulePlanInfo> pbList) { | |
| 732 | 738 | |
| 733 | - for(ScheduleRealInfo sch : pbList){ | |
| 739 | + for(SchedulePlanInfo sch : pbList){ | |
| 734 | 740 | if(sch.getBcType().equals("out")) |
| 735 | 741 | return sch; |
| 736 | 742 | } | ... | ... |