BUG优化

dev
xiepeng 2024-04-18 17:49:00 +08:00
parent 06395c0c05
commit faabbc8b54
10 changed files with 351 additions and 327 deletions

View File

@ -35,7 +35,9 @@ public class AssignedManageController extends BaseController {
@Autowired
private FreightTrailerService freightTrailerService;
/**
/**
*
*
* @param
* @throws Exception
*/
@ -82,7 +84,9 @@ public class AssignedManageController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@ -126,7 +130,9 @@ public class AssignedManageController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@ -157,7 +163,10 @@ public class AssignedManageController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@ -230,26 +239,6 @@ public class AssignedManageController extends BaseController {
return map;
}
/*@RequestMapping(value = "/getassignedoperationvehiclelist")
@ResponseBody
public Object getAssignedOperationVehicleList() 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> assignedList = assignedManageService.assignedList(corpId);
for (int i = 0; i < assignedList.size(); i++) {
for (int j = 0; j < operationList.size(); j++) {
if(assignedList.get(i).get("RAW_PLATE_NUMBER").equals(operationList.get(j).get("PLATE_NUMBER"))) {
operationList.remove(j);
}
}
}
map.put("varList", operationList);
map.put("result", errInfo);
return map;
}*/
@RequestMapping(value = "/getAssignedVehicleList")
@ResponseBody
public Object getAssignedVehicleList() throws Exception {
@ -260,16 +249,13 @@ public class AssignedManageController extends BaseController {
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
List<PageData> allOperatingVehicleList = operatingVehiclesService.getPulldownVehicleList(pd); // 查询出所有不包括 删除、报废的营运车辆
List<PageData> allAssignedList = assignedManageService.assignedList(corpId); // 所有过户的车辆
List<PageData> varList = new ArrayList<>();
if(!CollectionUtil.isEmpty(allAssignedList)) {
varList = allOperatingVehicleList.stream().filter(operating -> {
for (PageData assigned : allAssignedList) {
if(!StringUtils.equals(operating.getString("OPERATING_ID"),assigned.getString("RAW_PLATE_NUMBER"))) {
return true;
}
}
return false;
}).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(allAssignedList)) {
varList = allOperatingVehicleList.stream().parallel()
.filter(operating -> allAssignedList.stream()
.noneMatch(assigned -> StringUtils.equals(operating.getString("OPERATING_ID"), assigned.getString("RAW_PLATE_NUMBER"))))
.collect(Collectors.toList());
} else {
varList = allOperatingVehicleList;
}
@ -286,19 +272,17 @@ public class AssignedManageController extends BaseController {
String corpId = Jurisdiction.getCORPINFO_ID();
List<PageData> freightList = freightTrailerService.getPulldownVehicleList(corpId);
List<PageData> assignedList = assignedManageService.assignedList(corpId);
List<PageData> varList = new ArrayList<>();
if (!CollectionUtils.isEmpty(assignedList)) {
varList = freightList.stream().filter(freight -> {
for (PageData assigned : assignedList) {
if(!StringUtils.equals(freight.getString("FREIGHTTRAILER_ID"),assigned.getString("RAW_PLATE_NUMBER"))) {
return true;
}
}
return false;
}).collect(Collectors.toList());
varList = freightList.stream().parallel()
.filter(freight -> assignedList.stream()
.noneMatch(assigned -> StringUtils.equals(freight.getString("FREIGHTTRAILER_ID"), assigned.getString("RAW_PLATE_NUMBER"))))
.collect(Collectors.toList());
} else {
varList = freightList;
}
map.put("varList", varList);
map.put("result", errInfo);
return map;

View File

@ -232,7 +232,6 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
PageData contactInfo = trafficSecurityCustomerManagementService.findByContactName(pd2);
if(!ObjectUtil.isEmpty(contactInfo)) {
pd.put("ENTRUST_PERSON", contactInfo.getString("CONTACT_ID"));
}
if(!contactInfo.getString("CONTACTPHONE").equals(pd.getString("CLIENTCONTACTPHONE"))) {
PageData entrust = new PageData();
entrust.put("CONTACTPHONE", pd.getString("CLIENTCONTACTPHONE"));
@ -242,13 +241,13 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
entrust.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
trafficSecurityCustomerManagementService.editContactPhone(entrust);
}
}
PageData pd3 = new PageData();
pd3.put("CONTACT", pd.getString("CONFIRM_PERSON"));
PageData pageData = trafficSecurityCustomerManagementService.findByContactName(pd3);
if(!ObjectUtil.isEmpty(pageData)) {
pd.put("CONFIRM_PERSON", pageData.getString("CONTACT_ID"));
}
if(!pageData.getString("CONTACTPHONE").equals(pd.getString("CONFIRMINGPHONE"))) {
if(!pd.getString("CONFIRMINGPHONE").equals(pageData.getString("CONTACTPHONE"))) {
PageData entrust = new PageData();
entrust.put("CONTACTPHONE", pd.getString("CONFIRMINGPHONE"));
entrust.put("CUSTOMERCONTACT_ID",pageData.getString("CUSTOMERCONTACT_ID"));
@ -257,6 +256,7 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
entrust.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
trafficSecurityCustomerManagementService.editContactPhone(entrust);
}
}
trafficSecurityWaybillRegistrationService.edit(pd);
map.put("result", errInfo);

View File

@ -14,6 +14,7 @@ import com.zcloud.service.taxationManage.TaxationManageService;
import com.zcloud.util.*;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
@ -540,13 +541,27 @@ public class FreighttTrailerController extends BaseController {
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
page.setPd(pd);
List<PageData> insAnnually = inspectAnnuallyService.annuallyList(page);
for (int i = 0; i < insAnnually.size(); i++) {
// 获取所有的营运车辆
List<PageData> operatings = insAnnually.stream().filter(data -> StringUtils.equals("1",data.getString("VEHICLE_MODEL")))
.collect(Collectors.toList());
// 过滤掉年检车辆中已经存在的营运车辆
List<PageData> varList = new ArrayList<>();
if(!CollectionUtils.isEmpty(operatings)) {
varList = operatingList.stream().parallel().filter(operating -> operatings.stream()
.noneMatch(ins -> Objects.equals(operating.getString("OPERATING_ID"), ins.getString("VEHICLE"))))
.collect(Collectors.toList());
}else{
varList = operatingList;
}
/*for (int i = 0; i < insAnnually.size(); i++) {
for (int j = 0; j < operatingList.size(); j++) {
if(operatingList.get(j).get("OPERATING_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
operatingList.remove(j);
}
}
}
}*/
if(pd.containsKey("ID")){
pd.put("OPERATING_ID", pd.getString("ID"));
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
@ -554,10 +569,10 @@ public class FreighttTrailerController extends BaseController {
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
map.put("drivingLicenseImgs", drivingLicenseImgs);
}
operatingList.forEach(operating -> {
varList.forEach(operating -> {
operating.put("ID", operating.getString("OPERATING_ID"));
});
map.put("list", operatingList);
map.put("list", varList);
map.put("result", errInfo);
return map;
}
@ -566,13 +581,28 @@ public class FreighttTrailerController extends BaseController {
List<PageData> freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID"));
page.setPd(pd);
List<PageData> insAnnually = inspectAnnuallyService.annuallyList(page);
for (int i = 0; i < insAnnually.size(); i++) {
// 获取所有的货运挂车
List<PageData> freights = insAnnually.stream().filter(data -> "2".equals(data.getString("VEHICLE_MODEL")))
.collect(Collectors.toList());
// 过滤掉年检列表中的所有货运挂车信息
List<PageData> varList = new ArrayList<>();
if(!CollectionUtils.isEmpty(freights)) {
varList = freightList.stream().parallel().filter(freight -> freights.stream()
.noneMatch(ins -> freight.getString("FREIGHTTRAILER_ID").equals(ins.getString("VEHICLE"))))
.collect(Collectors.toList());
}else{
varList = freightList;
}
/*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"));
@ -580,10 +610,10 @@ public class FreighttTrailerController extends BaseController {
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
map.put("drivingLicenseImgs", drivingLicenseImgs);
}
freightList.forEach(freight -> {
varList.forEach(freight -> {
freight.put("ID", freight.getString("FREIGHTTRAILER_ID"));
});
map.put("list", freightList);
map.put("list", varList);
map.put("result", errInfo);
return map;
}

View File

@ -239,7 +239,9 @@ public class InspectAnnuallyController extends BaseController {
}
/**excel
/**
* excel
*
* @param
* @throws Exception
*/
@ -304,5 +306,4 @@ public class InspectAnnuallyController extends BaseController {
}
}

View File

@ -12,15 +12,14 @@ import com.zcloud.service.system.ImgFilesService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
*
@ -217,13 +216,23 @@ public class InsureController extends BaseController {
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
page.setPd(pd);
List<PageData> insAnnually = insureService.list(page);
for (int i = 0; i < insAnnually.size(); i++) {
for (int j = 0; j < operatingList.size(); j++) {
if(operatingList.get(j).get("OPERATING_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
operatingList.remove(j);
}
}
// 获取保险列表中所有的营运车辆
List<PageData> insures = insAnnually.stream()
.filter(data -> StringUtils.equals(data.getString("VEHICLE_MODEL"), "1"))
.collect(Collectors.toList());
// 过滤掉保险列表中所有的营运车辆
List<PageData> varList = new ArrayList<>();
if (!CollectionUtils.isEmpty(insures)) {
varList = operatingList.stream().parallel()
.filter(operating -> insures.stream()
.noneMatch(ins -> StringUtils.equals(operating.getString("OPERATING_ID"), ins.getString("VEHICLE"))))
.collect(Collectors.toList());
} else {
varList = operatingList;
}
if (pd.containsKey("ID")) {
pd.put("OPERATING_ID", pd.getString("ID"));
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
@ -231,10 +240,10 @@ public class InsureController extends BaseController {
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
map.put("drivingLicenseImgs", drivingLicenseImgs);
}
operatingList.forEach(operating -> {
varList.forEach(operating -> {
operating.put("ID", operating.getString("OPERATING_ID"));
});
map.put("list", operatingList);
map.put("list", varList);
map.put("result", errInfo);
return map;
}
@ -242,14 +251,23 @@ public class InsureController extends BaseController {
// 货运挂车
List<PageData> freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID"));
page.setPd(pd);
List<PageData> insAnnually = insureService.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);
}
}
List<PageData> insureList = insureService.list(page);
// 获取保险列表中所有挂车信息
List<PageData> insures = insureList.stream().filter(data -> StringUtils.equals(data.getString("VEHICLE_MODEL"), "2"))
.collect(Collectors.toList());
// 过滤掉保险列表中所有已存在的挂车
List<PageData> varList = new ArrayList<>();
if (!CollectionUtils.isEmpty(insures)) {
varList = freightList.stream().parallel()
.filter(freight -> insures.stream()
.noneMatch(ins -> StringUtils.equals(freight.getString("FREIGHTTRAILER_ID"), ins.getString("VEHICLE"))))
.collect(Collectors.toList());
} else {
varList = freightList;
}
if (pd.containsKey("ID")) {
pd.put("FREIGHTTRAILER_ID", pd.getString("ID"));
pd.put("FOREIGN_KEY", pd.getString("FREIGHTTRAILER_ID"));
@ -257,10 +275,10 @@ public class InsureController extends BaseController {
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
map.put("drivingLicenseImgs", drivingLicenseImgs);
}
freightList.forEach(freight -> {
varList.forEach(freight -> {
freight.put("ID", freight.getString("FREIGHTTRAILER_ID"));
});
map.put("list", freightList);
map.put("list", varList);
map.put("result", errInfo);
return map;
}

View File

@ -11,15 +11,14 @@ import com.zcloud.service.system.ImgFilesService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
*
@ -206,17 +205,19 @@ public class MaintenanceController extends BaseController {
PageData pd = new PageData();
pd = this.getPageData();
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> insAnnually = maintenanceService.list(page);
for (int i = 0; i < insAnnually.size(); i++) {
for (int j = 0; j < operatingList.size(); j++) {
if(operatingList.get(j).get("OPERATING_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
operatingList.remove(j);
}
}
List<PageData> maintenanceList = maintenanceService.list(page);
List<PageData> varList = new ArrayList<>();
if (!CollectionUtils.isEmpty(maintenanceList)) {
varList = operatingList.stream().parallel()
.filter(operating -> maintenanceList.stream()
.noneMatch(maintenance -> StringUtils.equals(operating.getString("OPERATING_ID"), maintenance.getString("VEHICLE"))))
.collect(Collectors.toList());
} else {
varList = operatingList;
}
if (pd.containsKey("ID")) {
pd.put("OPERATING_ID", pd.getString("ID"));
@ -225,48 +226,10 @@ public class MaintenanceController extends BaseController {
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
map.put("drivingLicenseImgs", drivingLicenseImgs);
}
operatingList.forEach(operating -> {
varList.forEach(operating -> {
operating.put("ID", operating.getString("OPERATING_ID"));
});
map.put("list", operatingList);
map.put("result", errInfo);
return map;
}
if("2".equals(pd.getString("TRAFFIC_TYPE"))) {
// 货运挂车
List<PageData> freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID"));
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);//行驶证照片
map.put("drivingLicenseImgs", drivingLicenseImgs);
}
map.put("list", resData);
map.put("list", varList);
map.put("result", errInfo);
return map;
}

View File

@ -61,7 +61,7 @@ public class OperatingVehiclesController extends BaseController {
pd.put("OPERATING_ID", this.get32UUID()); //运营车辆主键
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("NETWORK_STATUS", "未入网");

View File

@ -11,15 +11,14 @@ import com.zcloud.service.system.ImgFilesService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
*
@ -217,14 +216,23 @@ public class OperationsController extends BaseController {
// 营运车辆
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
page.setPd(pd);
List<PageData> insAnnually = operationsService.list(page);
for (int i = 0; i < insAnnually.size(); i++) {
for (int j = 0; j < operatingList.size(); j++) {
if(operatingList.get(j).get("OPERATING_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
operatingList.remove(j);
}
}
List<PageData> operationsList = operationsService.list(page);
// 获取营运车辆列表中所有的运营车辆
List<PageData> operations = operationsList.stream().filter(data -> StringUtils.equals(data.getString("VEHICLE_MODEL"), "1"))
.collect(Collectors.toList());
// 过滤掉营运管理列表中所有营运车辆信息
List<PageData> varList = new ArrayList<>();
if(!CollectionUtils.isEmpty(operations)) {
varList = operatingList.stream().parallel()
.filter(operating -> operations.stream().
noneMatch(operation -> StringUtils.equals(operating.getString("OPERATING_ID"), operation.getString("VEHICLE"))))
.collect(Collectors.toList());
}else{
varList = operatingList;
}
if(pd.containsKey("ID")){
pd.put("OPERATING_ID", pd.getString("ID"));
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
@ -232,10 +240,10 @@ public class OperationsController extends BaseController {
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
map.put("drivingLicenseImgs", drivingLicenseImgs);
}
operatingList.forEach(operating -> {
varList.forEach(operating -> {
operating.put("ID", operating.getString("OPERATING_ID"));
});
map.put("list", operatingList);
map.put("list", varList);
map.put("result", errInfo);
return map;
}
@ -243,14 +251,23 @@ public class OperationsController extends BaseController {
// 货运挂车
List<PageData> freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID"));
page.setPd(pd);
List<PageData> insAnnually = operationsService.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);
}
}
List<PageData> operationsList = operationsService.list(page);
// 获取营运管理列表中所有的货运挂车
List<PageData> operations = operationsList.stream()
.filter(data -> StringUtils.equals(data.getString("VEHICLE_MODEL"), "2"))
.collect(Collectors.toList());
List<PageData> varList = new ArrayList<>();
if(!CollectionUtils.isEmpty(operations)) {
varList = freightList.stream().parallel()
.filter(freight -> operations.stream()
.noneMatch(operation -> StringUtils.equals(freight.getString("FREIGHTTRAILER_ID"), operation.getString("VEHICLE"))))
.collect(Collectors.toList());
}else{
varList = freightList;
}
if(pd.containsKey("ID")){
pd.put("FREIGHTTRAILER_ID", pd.getString("ID"));
pd.put("FOREIGN_KEY", pd.getString("FREIGHTTRAILER_ID"));
@ -258,10 +275,10 @@ public class OperationsController extends BaseController {
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
map.put("drivingLicenseImgs", drivingLicenseImgs);
}
freightList.forEach(freight -> {
varList.forEach(freight -> {
freight.put("ID", freight.getString("FREIGHTTRAILER_ID"));
});
map.put("list", freightList);
map.put("list", varList);
map.put("result", errInfo);
return map;
}

View File

@ -212,11 +212,20 @@ public class ScrapManageController extends BaseController {
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
List<PageData> operationList = operatingVehiclesService.getScrapPulldownVehicleList(pd); //列出Question列表
List<PageData> scrapList = scrapManageService.scrapListAll(corpId);
List<PageData> varList = new ArrayList<>();
if(!CollectionUtils.isEmpty(scrapList)) {
varList = operationList.stream().parallel()
.filter(operating -> scrapList.stream()
.noneMatch(scrap -> StringUtils.equals(operating.getString("PLATE_NUMBER"), scrap.getString("PLATE_NUMBER"))))
.collect(Collectors.toList());
}else {
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"))) {
if(!StringUtils.equals(operation.getString("PLATE_NUMBER"),scrap.getString("PLATE_NUMBER"))) {
return true;
}
}
@ -224,7 +233,7 @@ public class ScrapManageController extends BaseController {
}).collect(Collectors.toList());
}else {
varList = operationList;
}
}*/
map.put("varList", varList);
map.put("result", errInfo);
return map;
@ -238,16 +247,13 @@ public class ScrapManageController extends BaseController {
String corpId = Jurisdiction.getCORPINFO_ID();
List<PageData> freightList = freightTrailerService.getScrapPulldownVehicleList(corpId);
List<PageData> scrapList = scrapManageService.scrapListAll(corpId);
List<PageData> varList = new ArrayList<>();
if(!CollectionUtils.isEmpty(scrapList)) {
varList = freightList.stream().filter(freight -> {
for (PageData scrap : scrapList) {
if(StringUtils.equals(freight.getString("PLATE_NUMBER"),scrap.getString("PLATE_NUMBER"))){
return true;
}
}
return false;
}).collect(Collectors.toList());
varList = freightList.stream().parallel()
.filter(freight -> scrapList.stream()
.noneMatch(scrap -> StringUtils.equals(freight.getString("PLATE_NUMBER"), scrap.getString("PLATE_NUMBER"))))
.collect(Collectors.toList());
}else{
varList = freightList;
}

View File

@ -41,7 +41,9 @@ public class TaxationManageController extends BaseController {
@Autowired
private FreightTrailerService freightTrailerService;
/**
/**
*
*
* @param
* @throws Exception
*/
@ -75,7 +77,9 @@ public class TaxationManageController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@ -94,7 +98,9 @@ public class TaxationManageController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@ -122,7 +128,10 @@ public class TaxationManageController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@ -185,23 +194,19 @@ public class TaxationManageController extends BaseController {
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
page.setPd(pd);
List<PageData> varList = freightTrailerService.list(page); // 列出所有挂车列表
List<PageData> freightTrailerList = freightTrailerService.list(page); // 列出所有挂车列表
List<PageData> taxationList = taxationManageService.taxationList(pd.getString("CORPINFO_ID")); // 列出车船税列表
List<PageData> pageDataStream = new ArrayList<>();
List<PageData> varList = new ArrayList<>();
if (!CollectionUtils.isEmpty(taxationList)) {
pageDataStream = varList.stream().filter(trailer -> { // 去除车船税类表中已有的车辆
for (PageData taxation : taxationList) {
if (!StringUtils.equals(taxation.getString("PLATE_NUMBER"), trailer.getString("PLATE_NUMBER"))) {
return true;
}
}
return false;
}).collect(Collectors.toList());
}else{
pageDataStream = varList;
varList = freightTrailerList.stream().parallel()
.filter(freight -> taxationList.stream()
.noneMatch(taxation -> StringUtils.equals(freight.getString("PLATE_NUMBER"), taxation.getString("PLATE_NUMBER"))))
.collect(Collectors.toList());
}
// 过滤掉车船税下拉列表中已报废的车辆信息
List<PageData> choiceTrailerList = pageDataStream.stream().filter(data -> !"1".equals(data.get("ISSCRAP"))).collect(Collectors.toList());
List<PageData> choiceTrailerList = varList.stream().filter(data -> !"1".equals(data.get("ISSCRAP"))).collect(Collectors.toList());
map.put("varList", choiceTrailerList);
map.put("page", page);
map.put("result", errInfo);