BUG优化

dev
xiepeng 2024-04-28 17:57:47 +08:00
parent 17e9aa562d
commit 8a5e062d2c
12 changed files with 157 additions and 124 deletions

View File

@ -1,5 +1,8 @@
package com.zcloud.controller.freighttrailer;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -168,7 +171,7 @@ public class FreighttTrailerController extends BaseController {
}
PageData trailerInfo = taxationManageService.findByTrailerId(pd);
if(!Tools.isEmpty(trailerInfo)) {
trailerInfo.put("PLATE_NUMBER",pd.getString("PLATE_NUMBER"));
BeanUtil.copyProperties(pd,trailerInfo);
trailerInfo.put("FRAMES_NUMBER", pd.getString("VIN"));
trailerInfo.put("VEHICLE_TYPE", pd.getString("TRAILER_TYPE"));
trailerInfo.put("VEHICLEOWNER", pd.getString("CAR_OWNERS"));
@ -176,22 +179,29 @@ public class FreighttTrailerController extends BaseController {
trailerInfo.put("FIRSTSHOW_DATE", pd.getString("INITIAL_REGISTRATION_DATE"));
taxationManageService.edit(trailerInfo);
}
// 挂车 处理 更新 过户信息
PageData vehicleInfo = new PageData();
vehicleInfo.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
vehicleInfo.put("ID", pd.getString("FREIGHTTRAILER_ID"));
PageData trailerAssignedInfo = assignedManageService.findByRawVehicleId(vehicleInfo);
if (!Tools.isEmpty(trailerAssignedInfo)) {
BeanUtil.copyProperties(pd,trailerAssignedInfo);
trailerAssignedInfo.put("FRAMES_NUMBER", pd.getString("VIN"));
trailerAssignedInfo.put("VEHICLE_BRAND", pd.getString("TRAILER_BRAND"));
trailerAssignedInfo.put("VEHICLE_MODEL", pd.getString("TRAILER_MODEL"));
trailerAssignedInfo.put("PLATE_NUMBER", pd.getString("PLATE_NUMBER"));
trailerAssignedInfo.put("RAW_OWNERS", pd.getString("CAR_OWNERS"));
trailerAssignedInfo.put("RAW_CONTACT_NUMBER", pd.getString("CONTACT_PHONE"));
trailerAssignedInfo.put("RAW_OPERATION_CERTIFICATE", pd.getString("OPER_CERTIFICATE_NUM"));
assignedManageService.edit(trailerAssignedInfo);
}
PageData data = scrapManageService.findByScrapVehicleId(vehicleInfo);
if(!ObjectUtil.isEmpty(data)) {
BeanUtil.copyProperties(pd,data);
data.put("FRAMES_NUMBER", pd.getString("VIN"));
data.put("VEHICLEOWNER", pd.getString("CAR_OWNERS"));
data.put("VEHICLEOWNER_NUMBER", pd.getString("CAR_OWNERS_TEL"));
data.put("FIRSTSHOW_DATE", pd.getString("INITIAL_REGISTRATION_DATE"));
data.put("BRAND", pd.getString("TRAILER_BRAND"));
data.put("VEHICLE_MODEL", pd.getString("TRAILER_MODEL"));
scrapManageService.edit(data);
}
freightTrailerService.edit(pd);
map.put("pd", pd);
map.put("result", errInfo);
@ -567,6 +577,7 @@ public class FreighttTrailerController extends BaseController {
page.setPd(pd);
List<PageData> insAnnually = inspectAnnuallyService.annuallyList(page);
// 获取所有的营运车辆
List<PageData> operatings = insAnnually.stream().filter(data -> StringUtils.equals("1",data.getString("VEHICLE_MODEL")))
.collect(Collectors.toList());
@ -580,13 +591,7 @@ public class FreighttTrailerController extends BaseController {
}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"));

View File

@ -1,5 +1,6 @@
package com.zcloud.controller.inspectAnnually;
import cn.hutool.core.bean.BeanUtil;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -22,6 +23,7 @@ import org.springframework.web.servlet.ModelAndView;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
*
@ -160,20 +162,19 @@ public class InspectAnnuallyController extends BaseController {
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
page.setPd(pd);
List<PageData> varList = inspectAnnuallyService.list(page); //列出年检列表
varList.stream().anyMatch(data -> {
varList.stream().anyMatch(InspectAnnuallyController::vehicleType);
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
private static boolean vehicleType (PageData data) {
if ("1".equals(data.getString("OPEAR_ISSCRAP")) || "1".equals(data.getString("FREIGHT_ISSCRAP"))) {
data.put("ARCHIVES_TYPE", "2");
} else if ("1".equals(data.getString("OPEAR_ISASSIGNED")) || "1".equals(data.getString("FREIGHT_ISASSIGNED"))) {
data.put("ARCHIVES_TYPE", "1");
}
return false;
});
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
@ -192,20 +193,19 @@ public class InspectAnnuallyController extends BaseController {
PageData pd = new PageData();
pd = this.getPageData();
pd = inspectAnnuallyService.findById(pd); //根据ID读取
PageData vehicle = new PageData();
if ("1".equals(pd.getString("VEHICLE_MODEL"))) {
PageData opearting = new PageData();
opearting.put("OPERATING_ID", pd.get("VEHICLE"));
opearting.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
PageData pageData = operatingVehiclesService.findById(opearting);
pd.put("VEHICLE_BRAND", pageData.get("VEHICLE_BRAND"));
vehicle.put("OPERATING_ID", pd.get("VEHICLE"));
vehicle.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
PageData pageData = operatingVehiclesService.findById(vehicle);
BeanUtil.copyProperties(pageData,pd);
/*pd.put("VEHICLE_BRAND", pageData.get("VEHICLE_BRAND"));*/
pd.put("VEHICLE_TYPE", pageData.get("VEHICLE_MODEL"));
pd.put("PLATE_NUMBER", pageData.get("PLATE_NUMBER"));
/*pd.put("PLATE_NUMBER", pageData.get("PLATE_NUMBER"));*/
} else {
PageData freight = new PageData();
freight.put("FREIGHTTRAILER_ID", pd.get("VEHICLE"));
freight.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
PageData pageData = freightTrailerService.findById(freight);
vehicle.put("FREIGHTTRAILER_ID", pd.get("VEHICLE"));
vehicle.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
PageData pageData = freightTrailerService.findById(vehicle);
pd.put("VEHICLE_BRAND", pageData.get("TRAILER_BRAND"));
pd.put("VEHICLE_TYPE", pageData.get("TRAILER_MODEL"));
}

View File

@ -1,5 +1,6 @@
package com.zcloud.controller.insure;
import cn.hutool.core.collection.CollectionUtil;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -20,6 +21,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
*
@ -64,6 +66,7 @@ public class InsureController extends BaseController {
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
@ -224,6 +227,7 @@ public class InsureController extends BaseController {
// 过滤掉保险列表中所有的营运车辆
List<PageData> varList = new ArrayList<>();
if (!CollectionUtils.isEmpty(insures)) {
varList = operatingList.stream().parallel()
.filter(operating -> insures.stream()

View File

@ -223,6 +223,7 @@ public class MaintenanceController extends BaseController {
} else {
varList = operatingList;
}
if (pd.containsKey("ID")) {
pd.put("OPERATING_ID", pd.getString("ID"));
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));

View File

@ -1,5 +1,6 @@
package com.zcloud.controller.operatingvehicles;
import cn.hutool.core.bean.BeanUtil;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -12,9 +13,11 @@ import com.zcloud.service.system.ImgFilesService;
import com.zcloud.util.*;
import net.sf.json.JSONArray;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@ -32,9 +35,6 @@ public class OperatingVehiclesController extends BaseController {
@Autowired
private OperatingVehiclesService operatingVehiclesService;
@Autowired
private Smb smb;
@Autowired
private ImgFilesService imgfilesService;
@ -47,7 +47,9 @@ public class OperatingVehiclesController extends BaseController {
@Autowired
private AssignedManageService assignedManageService;
/**
/**
*
*
* @param
* @throws Exception
*/
@ -72,7 +74,9 @@ public class OperatingVehiclesController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@ -86,24 +90,18 @@ public class OperatingVehiclesController extends BaseController {
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
if (Tools.notEmpty(pd.getString("OPERATING_ID"))) {
PageData findPageData = operatingVehiclesService.findById(pd);
findPageData.remove("REMARK");
PageData scrapAddData = new PageData();
BeanUtil.copyProperties(findPageData,scrapAddData);
scrapAddData.put("SCRAP_ID", this.get32UUID());
scrapAddData.put("RECORD_NUMBER", findPageData.get("GOODSSELFNUMBER"));
scrapAddData.put("FRAMES_NUMBER", findPageData.get("FRAMES_NUMBER"));
scrapAddData.put("PLATE_NUMBER", findPageData.get("PLATE_NUMBER"));
scrapAddData.put("SCRAP_VEHICLEMODEL", "运输车辆");
scrapAddData.put("VEHICLEOWNER", findPageData.get("VEHICLEOWNER"));
scrapAddData.put("CONTACT_NUMBER", findPageData.get("CONTACT_NUMBER"));
scrapAddData.put("SCRAP_DATE", DateUtil.date2Str(new Date()));
scrapAddData.put("REGISTRANT", Jurisdiction.getName());
scrapAddData.put("CREATTIME", DateUtil.date2Str(new Date()));
scrapAddData.put("OPERATTIME", DateUtil.date2Str(new Date()));
scrapAddData.put("VEHICLEOWNER_NUMBER", findPageData.get("VEHICLEOWNER_NUMBER"));
scrapAddData.put("FIRSTSHOW_DATE", findPageData.get("FIRSTSHOW_DATE"));
scrapAddData.put("BRAND", findPageData.get("VEHICLE_BRAND"));
scrapAddData.put("VEHICLE_MODEL", findPageData.get("VEHICLE_MODEL"));
scrapAddData.put("TRANSACTION_DATE", DateUtil.date2Str(new Date()));
scrapAddData.put("CORPINFO_ID", findPageData.get("CORPINFO_ID"));
scrapAddData.put("SCRAP_VEHICLE", findPageData.get("PLATE_NUMBER"));
scrapAddData.put("ISDELETE", "0");
scrapManageService.save(scrapAddData);
@ -116,7 +114,9 @@ public class OperatingVehiclesController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@ -136,25 +136,30 @@ public class OperatingVehiclesController extends BaseController {
pageData.put("ID", pd.getString("OPERATING_ID"));
PageData vehicleAssignedInfo = assignedManageService.findByRawVehicleId(pageData);
if (!Tools.isEmpty(vehicleAssignedInfo)) {
vehicleAssignedInfo.put("FRAMES_NUMBER", pd.getString("FRAMES_NUMBER"));
vehicleAssignedInfo.put("VEHICLE_BRAND", pd.getString("VEHICLE_BRAND"));
vehicleAssignedInfo.put("VEHICLE_MODEL", pd.getString("VEHICLE_MODEL"));
vehicleAssignedInfo.put("ENGINE_NUMBER", pd.getString("ENGINE_NUMBER"));
BeanUtil.copyProperties(pd, vehicleAssignedInfo);
vehicleAssignedInfo.put("POWER_TYPE", pd.getString("FUEL_TYPE"));
vehicleAssignedInfo.put("EMISSION_STANDARD", pd.getString("EMISSION_STANDARD"));
vehicleAssignedInfo.put("PLATE_NUMBER", pd.getString("PLATE_NUMBER"));
vehicleAssignedInfo.put("RAW_OWNERS", pd.getString("VEHICLEOWNER"));
vehicleAssignedInfo.put("RAW_CONTACT_NUMBER", pd.getString("CONTACT_NUMBER"));
vehicleAssignedInfo.put("RAW_OPERATION_CERTIFICATE", pd.getString("OPERATING_CERTIFICATE"));
assignedManageService.edit(vehicleAssignedInfo);
}
PageData pd2 = scrapManageService.findByScrapVehicleId(pageData);
if(!ObjectUtils.isEmpty(pd2)) {
BeanUtil.copyProperties(pd,pd2);
pd2.put("VEHICLE_MODEL", pd.getString("VEHICLE_MODEL"));
pd2.put("VEHICLEOWNER_NUMBER", pd.getString("CONTACT_NUMBER"));
pd2.put("BRAND", pd.getString("VEHICLE_BRAND"));
scrapManageService.edit(pd2);
}
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@ -296,10 +301,9 @@ public class OperatingVehiclesController extends BaseController {
}
/**excel
/**
* excel
*
* @param
* @throws Exception
*/

View File

@ -134,7 +134,6 @@ public class SafetyInvestmentUseController extends BaseController {
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
List<PageData> varList = safetyinvestmentuseService.listAll(pd); //列出SafetyInvestmentUse列表
// 计算预提额合计
Double drawingsTotal = varList.stream().
filter(data -> StringUtils.equals(data.getString("USE_TYPE"), "1"))

View File

@ -84,8 +84,10 @@ public class ScrapManageController extends BaseController {
pd2.put("PLATE_NUMBER", pageData.get("PLATE_NUMBER"));
pd2.put("CORPINFO_ID", pageData.get("CORPINFO_ID"));
PageData scrapVehicle = operatingVehiclesService.findByfindByPlateNumber(pd2);
if(!ObjectUtils.isEmpty(scrapVehicle)) {
scrapVehicle.put("ISSCRAP", "0");
operatingVehiclesService.edit(scrapVehicle);
}
}else{
PageData pd2 = new PageData();
pd2.put("PLATE_NUMBER", pageData.get("PLATE_NUMBER"));

View File

@ -34,4 +34,6 @@ public interface ScrapManageMapper{
List<PageData> datalistPage(Page page);
List<PageData> scrapListAll(String corpId);
PageData findByScrapVehicleId(PageData pd);
}

View File

@ -34,4 +34,6 @@ public interface ScrapManageService {
public List<PageData> list(Page page);
List<PageData> scrapListAll(String corpId);
PageData findByScrapVehicleId(PageData pd);
}

View File

@ -48,4 +48,9 @@ public class ScrapManageServiceImpl implements ScrapManageService {
public List<PageData> scrapListAll(String corpId) {
return scrapManageMapper.scrapListAll(corpId);
}
@Override
public PageData findByScrapVehicleId(PageData pd) {
return scrapManageMapper.findByScrapVehicleId(pd);
}
}

View File

@ -198,7 +198,7 @@
INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID
LEFT JOIN bus_traffic_operatingvehicle bto on bto.OPERATING_ID = f.VEHICLE
LEFT JOIN bus_traffic_mechanical_freighttrailer btmf on btmf.FREIGHTTRAILER_ID = f.VEHICLE
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.BASICINFO_LICENSE_PLATE != null and pd.BASICINFO_LICENSE_PLATE != ''">
and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%')
</if>

View File

@ -184,7 +184,7 @@
OPERATTIME = #{OPERATTIME},
DELETOR = #{DELETOR},
DELETORNAME = #{DELETORNAME},
DELETTIME =#{DELETTIME}
DELETTIME =#{DELETTIME},
SCRAPFLAG =#{SCRAPFLAG}
where
SCRAP_ID = #{SCRAP_ID}
@ -413,5 +413,14 @@
where f.SCRAP_ID = '0'
</select>
<select id="findByScrapVehicleId" parameterType="pd" resultType="pd">
select
*
from
<include refid="tableName"></include> f
where f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
AND f.SCRAP_VEHICLE = #{ID}
</select>
</mapper>