forked from integrated_whb/integrated_whb
BUG优化
parent
faabbc8b54
commit
43abb7c7e0
|
@ -259,6 +259,7 @@ public class AssignedManageController extends BaseController {
|
||||||
} else {
|
} else {
|
||||||
varList = allOperatingVehicleList;
|
varList = allOperatingVehicleList;
|
||||||
}
|
}
|
||||||
|
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
|
@ -268,6 +269,7 @@ public class AssignedManageController extends BaseController {
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object getAssignedFreightTrailerList() throws Exception {
|
public Object getAssignedFreightTrailerList() throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
String corpId = Jurisdiction.getCORPINFO_ID();
|
String corpId = Jurisdiction.getCORPINFO_ID();
|
||||||
List<PageData> freightList = freightTrailerService.getPulldownVehicleList(corpId);
|
List<PageData> freightList = freightTrailerService.getPulldownVehicleList(corpId);
|
||||||
|
|
|
@ -18,16 +18,15 @@ import com.zcloud.util.Smb;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.util.ObjectUtils;
|
import org.springframework.util.ObjectUtils;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
import java.util.stream.Collectors;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 北斗管理
|
* 北斗管理
|
||||||
|
@ -266,13 +265,16 @@ public class BeidouController extends BaseController {
|
||||||
// 营运车辆
|
// 营运车辆
|
||||||
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
|
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> insAnnually = beidouService.list(page);
|
List<PageData> compassList = beidouService.list(page);
|
||||||
for (int i = 0; i < insAnnually.size(); i++) {
|
|
||||||
for (int j = 0; j < operatingList.size(); j++) {
|
List<PageData> varList = new ArrayList<>();
|
||||||
if(operatingList.get(j).get("OPERATING_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
|
if(!CollectionUtils.isEmpty(compassList)) {
|
||||||
operatingList.remove(j);
|
varList = operatingList.stream().parallel()
|
||||||
}
|
.filter(operating -> compassList.stream()
|
||||||
}
|
.noneMatch(compass -> StringUtils.equals(operating.getString("OPERATING_ID"), compass.getString("VEHICLE"))))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}else{
|
||||||
|
varList = operatingList;
|
||||||
}
|
}
|
||||||
if(pd.containsKey("ID")){
|
if(pd.containsKey("ID")){
|
||||||
pd.put("OPERATING_ID", pd.getString("ID"));
|
pd.put("OPERATING_ID", pd.getString("ID"));
|
||||||
|
@ -281,10 +283,10 @@ public class BeidouController extends BaseController {
|
||||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||||
}
|
}
|
||||||
operatingList.forEach(operating -> {
|
varList.forEach(operating -> {
|
||||||
operating.put("ID", operating.getString("OPERATING_ID"));
|
operating.put("ID", operating.getString("OPERATING_ID"));
|
||||||
});
|
});
|
||||||
map.put("list", operatingList);
|
map.put("list", varList);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,31 +205,70 @@ public class MaintenanceController extends BaseController {
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
// 营运车辆
|
if (!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) {
|
||||||
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
|
// 营运车辆
|
||||||
page.setPd(pd);
|
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
|
||||||
List<PageData> maintenanceList = maintenanceService.list(page);
|
page.setPd(pd);
|
||||||
|
List<PageData> maintenanceList = maintenanceService.list(page);
|
||||||
|
|
||||||
List<PageData> varList = new ArrayList<>();
|
List<PageData> varList = new ArrayList<>();
|
||||||
if (!CollectionUtils.isEmpty(maintenanceList)) {
|
if (!CollectionUtils.isEmpty(maintenanceList)) {
|
||||||
varList = operatingList.stream().parallel()
|
varList = operatingList.stream().parallel()
|
||||||
.filter(operating -> maintenanceList.stream()
|
.filter(operating -> maintenanceList.stream()
|
||||||
.noneMatch(maintenance -> StringUtils.equals(operating.getString("OPERATING_ID"), maintenance.getString("VEHICLE"))))
|
.noneMatch(maintenance -> StringUtils.equals(operating.getString("OPERATING_ID"), maintenance.getString("VEHICLE"))))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else {
|
} else {
|
||||||
varList = operatingList;
|
varList = operatingList;
|
||||||
|
}
|
||||||
|
if (pd.containsKey("ID")) {
|
||||||
|
pd.put("OPERATING_ID", pd.getString("ID"));
|
||||||
|
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
|
||||||
|
pd.put("TYPE", 121);
|
||||||
|
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||||
|
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||||
|
}
|
||||||
|
varList.forEach(operating -> {
|
||||||
|
operating.put("ID", operating.getString("OPERATING_ID"));
|
||||||
|
});
|
||||||
|
map.put("list", varList);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
}
|
}
|
||||||
if (pd.containsKey("ID")) {
|
if("2".equals(pd.getString("TRAFFIC_TYPE"))) {
|
||||||
pd.put("OPERATING_ID", pd.getString("ID"));
|
// 货运挂车
|
||||||
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
|
List<PageData> freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID"));
|
||||||
pd.put("TYPE", 121);
|
page.setPd(pd);
|
||||||
|
List<PageData> insAnnually = maintenanceService.list(page);
|
||||||
|
for (int i = 0; i < insAnnually.size(); i++) {
|
||||||
|
for (int j = 0; j < freightList.size(); j++) {
|
||||||
|
if(freightList.get(j).get("FREIGHTTRAILER_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
|
||||||
|
freightList.remove(j);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(pd.containsKey("ID")){
|
||||||
|
pd.put("FREIGHTTRAILER_ID", pd.getString("ID"));
|
||||||
|
pd.put("FOREIGN_KEY", pd.getString("FREIGHTTRAILER_ID"));
|
||||||
|
pd.put("TYPE",121);
|
||||||
|
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||||
|
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||||
|
}
|
||||||
|
freightList.forEach(freight -> {
|
||||||
|
freight.put("ID", freight.getString("FREIGHTTRAILER_ID"));
|
||||||
|
});
|
||||||
|
map.put("list", freightList);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<PageData> resData = freightTrailerService.vehicleList(pd);
|
||||||
|
if(pd.containsKey("ID")){
|
||||||
|
pd.put("FOREIGN_KEY", pd.getString("ID"));
|
||||||
|
pd.put("TYPE",121);
|
||||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||||
}
|
}
|
||||||
varList.forEach(operating -> {
|
map.put("list", resData);
|
||||||
operating.put("ID", operating.getString("OPERATING_ID"));
|
|
||||||
});
|
|
||||||
map.put("list", varList);
|
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,7 +232,7 @@ public class OperatingVehiclesController extends BaseController {
|
||||||
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
|
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
|
||||||
pd.put("TYPE",130);
|
pd.put("TYPE",130);
|
||||||
List<PageData> headstockphoto = imgfilesService.listAll(pd);//车头照片
|
List<PageData> headstockphoto = imgfilesService.listAll(pd);//车头照片
|
||||||
pd.put("TYPE",131);
|
pd.put("TYPE",121);
|
||||||
List<PageData> drivinglicensephoto = imgfilesService.listAll(pd);//行驶证照片
|
List<PageData> drivinglicensephoto = imgfilesService.listAll(pd);//行驶证照片
|
||||||
pd.put("TYPE",132);
|
pd.put("TYPE",132);
|
||||||
List<PageData> operatingcertificatephoto = imgfilesService.listAll(pd);//运营证照片
|
List<PageData> operatingcertificatephoto = imgfilesService.listAll(pd);//运营证照片
|
||||||
|
|
|
@ -182,25 +182,6 @@ public class ScrapManageController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@RequestMapping(value = "/getscrapoperationvehiclelist")
|
|
||||||
@ResponseBody
|
|
||||||
public Object getScrapOperationVehicleList() throws Exception {
|
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
|
||||||
String errInfo = "success";
|
|
||||||
String corpId = Jurisdiction.getCORPINFO_ID();
|
|
||||||
List<PageData> operationList = operatingVehiclesService.operationVehicleList(corpId); //列出Question列表
|
|
||||||
List<PageData> scrapList = scrapManageService.scrapListAll(corpId);
|
|
||||||
for (int i = 0; i < scrapList.size(); i++) {
|
|
||||||
for (int j = 0; j < operationList.size(); j++) {
|
|
||||||
if(scrapList.get(i).get("PLATE_NUMBER").equals(operationList.get(j).get("PLATE_NUMBER"))) {
|
|
||||||
operationList.remove(j);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
map.put("varList", operationList);
|
|
||||||
map.put("result", errInfo);
|
|
||||||
return map;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
@RequestMapping(value = "/getScrapOperationVehicleList")
|
@RequestMapping(value = "/getScrapOperationVehicleList")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@ -222,18 +203,6 @@ public class ScrapManageController extends BaseController {
|
||||||
}else {
|
}else {
|
||||||
varList = operationList;
|
varList = operationList;
|
||||||
}
|
}
|
||||||
/*if(!CollectionUtils.isEmpty(scrapList)) {
|
|
||||||
varList = operationList.stream().filter(operation -> {
|
|
||||||
for (PageData scrap : scrapList) {
|
|
||||||
if(!StringUtils.equals(operation.getString("PLATE_NUMBER"),scrap.getString("PLATE_NUMBER"))) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}).collect(Collectors.toList());
|
|
||||||
}else {
|
|
||||||
varList = operationList;
|
|
||||||
}*/
|
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
|
|
|
@ -203,6 +203,8 @@ public class TaxationManageController extends BaseController {
|
||||||
.filter(freight -> taxationList.stream()
|
.filter(freight -> taxationList.stream()
|
||||||
.noneMatch(taxation -> StringUtils.equals(freight.getString("PLATE_NUMBER"), taxation.getString("PLATE_NUMBER"))))
|
.noneMatch(taxation -> StringUtils.equals(freight.getString("PLATE_NUMBER"), taxation.getString("PLATE_NUMBER"))))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
}else{
|
||||||
|
varList = freightTrailerList;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 过滤掉车船税下拉列表中已报废的车辆信息
|
// 过滤掉车船税下拉列表中已报废的车辆信息
|
||||||
|
|
Loading…
Reference in New Issue