Commit 4ea8f722de5739a2e4b7a406a105c319ca619cdf

Authored by 潘钊
1 parent b0228682

update...

src/main/java/com/bsth/server_ws/util/WSDataConver.java
@@ -619,7 +619,7 @@ public class WSDataConver { @@ -619,7 +619,7 @@ public class WSDataConver {
619 * @param oilList 619 * @param oilList
620 * @return 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 String[] array = new String[0]; 623 String[] array = new String[0];
624 try { 624 try {
625 //按日期分组数据 625 //按日期分组数据
@@ -629,6 +629,10 @@ public class WSDataConver { @@ -629,6 +629,10 @@ public class WSDataConver {
629 ArrayListMultimap<String, OilInfo> oilMultimap = 629 ArrayListMultimap<String, OilInfo> oilMultimap =
630 new ConvertUtil().groupMultiList(oilList, "_", OilInfo.class.getDeclaredField("rq")); 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 int year = Integer.parseInt(fdate.substring(0, 4)); 637 int year = Integer.parseInt(fdate.substring(0, 4));
634 int month = Integer.parseInt(fdate.substring(5, 7)); 638 int month = Integer.parseInt(fdate.substring(5, 7));
@@ -640,9 +644,10 @@ public class WSDataConver { @@ -640,9 +644,10 @@ public class WSDataConver {
640 List<LsLcPb> rs = new ArrayList<>(); 644 List<LsLcPb> rs = new ArrayList<>();
641 LsLcPb lcPb; 645 LsLcPb lcPb;
642 List<ScheduleRealInfo> pbList; 646 List<ScheduleRealInfo> pbList;
  647 + List<SchedulePlanInfo> jhList;
643 List<OilInfo> yhList; 648 List<OilInfo> yhList;
644 String rq,rq2; 649 String rq,rq2;
645 - ScheduleRealInfo outSch; 650 + SchedulePlanInfo outPlan;
646 int currentDay = cal.get(Calendar.DAY_OF_MONTH); 651 int currentDay = cal.get(Calendar.DAY_OF_MONTH);
647 for(int i = 1; i <= maxDate; i++){ 652 for(int i = 1; i <= maxDate; i++){
648 lcPb = new LsLcPb(); 653 lcPb = new LsLcPb();
@@ -651,6 +656,7 @@ public class WSDataConver { @@ -651,6 +656,7 @@ public class WSDataConver {
651 656
652 pbList = schMultimap.get(rq); 657 pbList = schMultimap.get(rq);
653 yhList = oilMultimap.get(rq2); 658 yhList = oilMultimap.get(rq2);
  659 + jhList = planMultimap.get(rq);
654 660
655 if(pbList == null || pbList.size() == 0) 661 if(pbList == null || pbList.size() == 0)
656 lcPb.setType(4);//休息 662 lcPb.setType(4);//休息
@@ -667,12 +673,12 @@ public class WSDataConver { @@ -667,12 +673,12 @@ public class WSDataConver {
667 lcPb.setType(3);//今天 673 lcPb.setType(3);//今天
668 else { 674 else {
669 lcPb.setType(2); 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,9 +734,9 @@ public class WSDataConver {
728 return null; 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 if(sch.getBcType().equals("out")) 740 if(sch.getBcType().equals("out"))
735 return sch; 741 return sch;
736 } 742 }