BUG优化

dev
xiepeng 2024-04-16 16:20:16 +08:00
parent 6544fe9706
commit f922966913
15 changed files with 294 additions and 9 deletions

View File

@ -106,6 +106,20 @@ public class BeidouController extends BaseController {
operatingVehiclesService.edit(resData);
}
beidouService.save(pd);
PageData vehicle = new PageData();
vehicle.put("OPERATING_ID", pd.getString("VEHICLE"));
vehicle.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData pageData = operatingVehiclesService.findById(vehicle);
if (!StringUtils.equals(pageData.getString("VEHICLEOWNER"), pd.getString("CAR_OWNERS"))) {
PageData operation = new PageData();
operation.put("OPERATING_ID", pd.getString("VEHICLE"));
operation.put("VEHICLEOWNER", pd.getString("CAR_OWNERS"));
operation.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
operation.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
operation.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
operation.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
operatingVehiclesService.editInspectVehicleowner(operation);
}
map.put("pd", pd);
map.put("result", errInfo);
return map;

View File

@ -66,6 +66,37 @@ public class InspectAnnuallyController extends BaseController {
pd.put("ARCHIVES_TYPE", "0"); //档案状态
pd.put("VEHICLE",pd.get("PLATE_NUMBER"));
inspectAnnuallyService.save(pd);
if("1".equals(pd.getString("VEHICLE_MODEL"))) {
PageData vehicle = new PageData();
vehicle.put("OPERATING_ID", pd.getString("PLATE_NUMBER"));
vehicle.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData pageData = operatingVehiclesService.findById(vehicle);
if(!StringUtils.equals(pageData.getString("VEHICLEOWNER"), pd.getString("CAR_OWNERS"))) {
PageData operation = new PageData();
operation.put("OPERATING_ID", pd.getString("PLATE_NUMBER"));
operation.put("VEHICLEOWNER", pd.getString("CAR_OWNERS"));
operation.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
operation.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
operation.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
operation.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
operatingVehiclesService.editInspectVehicleowner(operation);
}
}else {
PageData traffic = new PageData();
traffic.put("FREIGHTTRAILER_ID", pd.getString("PLATE_NUMBER"));
traffic.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData trafficInfo = freightTrailerService.findById(traffic);
if(!StringUtils.equals(trafficInfo.getString("CAR_OWNERS"), pd.getString("CAR_OWNERS"))) {
PageData data = new PageData();
data.put("FREIGHTTRAILER_ID", pd.getString("PLATE_NUMBER"));
data.put("CAR_OWNERS", pd.getString("CAR_OWNERS"));
data.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
data.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
data.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
data.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
freightTrailerService.editInspectTreight(data);
}
}
map.put("pd", pd);
map.put("result", errInfo);
return map;
@ -113,6 +144,38 @@ public class InspectAnnuallyController extends BaseController {
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
inspectAnnuallyService.edit(pd);
if("1".equals(pd.getString("VEHICLE_MODEL"))) {
PageData vehicle = new PageData();
vehicle.put("OPERATING_ID", pd.getString("VEHICLE"));
vehicle.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData pageData = operatingVehiclesService.findById(vehicle);
if(!StringUtils.equals(pageData.getString("VEHICLEOWNER"), pd.getString("CAR_OWNERS"))) {
PageData operation = new PageData();
operation.put("OPERATING_ID", pd.getString("VEHICLE"));
operation.put("VEHICLEOWNER", pd.getString("CAR_OWNERS"));
operation.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
operation.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
operation.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
operation.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
operatingVehiclesService.editInspectVehicleowner(operation);
}
}else {
PageData traffic = new PageData();
traffic.put("FREIGHTTRAILER_ID", pd.getString("VEHICLE"));
traffic.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData trafficInfo = freightTrailerService.findById(traffic);
if(!StringUtils.equals(trafficInfo.getString("CAR_OWNERS"), pd.getString("CAR_OWNERS"))) {
PageData data = new PageData();
data.put("FREIGHTTRAILER_ID", pd.getString("VEHICLE"));
data.put("CAR_OWNERS", pd.getString("CAR_OWNERS"));
data.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
data.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
data.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
data.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
freightTrailerService.editInspectTreight(data);
}
}
map.put("pd", pd);
map.put("result", errInfo);
return map;

View File

@ -47,7 +47,6 @@ public class InsureController extends BaseController {
* @throws Exception
*/
@RequestMapping(value = "/add")
// @RequiresPermissions( value = {"question:add" , "courseware:add"}, logical = Logical.OR)
@ResponseBody
@LogAnno(menuType = "机务档案", menuServer = "保险管理", instructionsOperate = "保险管理", instructionsType = "新增")
public Object add() throws Exception {
@ -61,7 +60,38 @@ public class InsureController extends BaseController {
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
pd.put("VEHICLE", pd.getString("PLATE_NUMBER"));
if("1".equals(pd.getString("VEHICLE_MODEL"))) {
PageData vehicle = new PageData();
vehicle.put("OPERATING_ID", pd.getString("PLATE_NUMBER"));
vehicle.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData pageData = operatingVehiclesService.findById(vehicle);
if(!StringUtils.equals(pageData.getString("VEHICLEOWNER"), pd.getString("CAR_OWNERS"))) {
PageData operation = new PageData();
operation.put("OPERATING_ID", pd.getString("VEHICLE"));
operation.put("VEHICLEOWNER", pd.getString("CAR_OWNERS"));
operation.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
operation.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
operation.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
operation.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
operatingVehiclesService.editInspectVehicleowner(operation);
}
}else {
PageData traffic = new PageData();
traffic.put("FREIGHTTRAILER_ID", pd.getString("PLATE_NUMBER"));
traffic.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData trafficInfo = freightTrailerService.findById(traffic);
if(!StringUtils.equals(trafficInfo.getString("CAR_OWNERS"), pd.getString("CAR_OWNERS"))) {
PageData data = new PageData();
data.put("FREIGHTTRAILER_ID", pd.getString("VEHICLE"));
data.put("CAR_OWNERS", pd.getString("CAR_OWNERS"));
data.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
data.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
data.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
data.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
freightTrailerService.editInspectTreight(data);
}
}
insureService.save(pd);
map.put("pd", pd);
map.put("result", errInfo);
@ -110,6 +140,37 @@ public class InsureController extends BaseController {
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
insureService.edit(pd);
if("1".equals(pd.getString("VEHICLE_MODEL"))) {
PageData vehicle = new PageData();
vehicle.put("OPERATING_ID", pd.getString("VEHICLE"));
vehicle.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData pageData = operatingVehiclesService.findById(vehicle);
if(!StringUtils.equals(pageData.getString("VEHICLEOWNER"), pd.getString("CAR_OWNERS"))) {
PageData operation = new PageData();
operation.put("OPERATING_ID", pd.getString("VEHICLE"));
operation.put("VEHICLEOWNER", pd.getString("CAR_OWNERS"));
operation.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
operation.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
operation.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
operation.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
operatingVehiclesService.editInspectVehicleowner(operation);
}
}else {
PageData traffic = new PageData();
traffic.put("FREIGHTTRAILER_ID", pd.getString("VEHICLE"));
traffic.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData trafficInfo = freightTrailerService.findById(traffic);
if(!StringUtils.equals(trafficInfo.getString("CAR_OWNERS"), pd.getString("CAR_OWNERS"))) {
PageData data = new PageData();
data.put("FREIGHTTRAILER_ID", pd.getString("VEHICLE"));
data.put("CAR_OWNERS", pd.getString("CAR_OWNERS"));
data.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
data.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
data.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
data.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
freightTrailerService.editInspectTreight(data);
}
}
map.put("pd", pd);
map.put("result", errInfo);
return map;
@ -179,7 +240,19 @@ public class InsureController extends BaseController {
PageData pd = new PageData();
pd = this.getPageData();
pd = insureService.findById(pd); //根据ID读取
if("1".equals(pd.getString("VEHICLE_MODEL"))) {
PageData operation = new PageData();
operation.put("OPERATING_ID", pd.getString("VEHICLE"));
operation.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData operationInfo = operatingVehiclesService.findById(operation);
pd.put("PLATE_NUMBER", operationInfo.getString("PLATE_NUMBER"));
}else {
PageData trailer = new PageData();
trailer.put("FREIGHTTRAILER_ID", pd.getString("VEHICLE"));
trailer.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData operationInfo = freightTrailerService.findById(trailer);
pd.put("PLATE_NUMBER", operationInfo.getString("PLATE_NUMBER"));
}
pd.put("FOREIGN_KEY", pd.getString("INSURE_ID"));
pd.put("TYPE",125);
List<PageData> insureinfoImgs = imgfilesService.listAll(pd);//保险资料图片

View File

@ -63,6 +63,21 @@ public class MaintenanceController extends BaseController {
pd.put("ARCHIVES_TYPE", "0"); //档案状态
pd.put("VEHICLE", pd.get("PLATE_NUMBER")); //档案状态
maintenanceService.save(pd);
PageData vehicle = new PageData();
vehicle.put("OPERATING_ID", pd.getString("VEHICLE"));
vehicle.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData pageData = operatingVehiclesService.findById(vehicle);
if (!StringUtils.equals(pageData.getString("VEHICLEOWNER"), pd.getString("CAR_OWNERS"))) {
PageData operation = new PageData();
operation.put("OPERATING_ID", pd.getString("VEHICLE"));
operation.put("VEHICLEOWNER", pd.getString("CAR_OWNERS"));
operation.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
operation.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
operation.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
operation.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
operatingVehiclesService.editInspectVehicleowner(operation);
}
map.put("pd", pd);
map.put("result", errInfo);
return map;

View File

@ -63,6 +63,37 @@ public class OperationsController extends BaseController {
pd.put("ARCHIVES_TYPE", "0"); //档案状态
pd.put("VEHICLE", pd.get("PLATE_NUMBER"));
operationsService.save(pd);
if("1".equals(pd.getString("VEHICLE_MODEL"))) {
PageData vehicle = new PageData();
vehicle.put("OPERATING_ID", pd.getString("VEHICLE"));
vehicle.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData pageData = operatingVehiclesService.findById(vehicle);
if(!StringUtils.equals(pageData.getString("VEHICLEOWNER"), pd.getString("CAR_OWNERS"))) {
PageData operation = new PageData();
operation.put("OPERATING_ID", pd.getString("VEHICLE"));
operation.put("VEHICLEOWNER", pd.getString("CAR_OWNERS"));
operation.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
operation.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
operation.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
operation.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
operatingVehiclesService.editInspectVehicleowner(operation);
}
}else {
PageData traffic = new PageData();
traffic.put("FREIGHTTRAILER_ID", pd.getString("VEHICLE"));
traffic.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData trafficInfo = freightTrailerService.findById(traffic);
if(!StringUtils.equals(trafficInfo.getString("CAR_OWNERS"), pd.getString("CAR_OWNERS"))) {
PageData data = new PageData();
data.put("FREIGHTTRAILER_ID", pd.getString("VEHICLE"));
data.put("CAR_OWNERS", pd.getString("CAR_OWNERS"));
data.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
data.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
data.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
data.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
freightTrailerService.editInspectTreight(data);
}
}
map.put("pd", pd);
map.put("result", errInfo);
return map;
@ -110,6 +141,37 @@ public class OperationsController extends BaseController {
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
operationsService.edit(pd);
if("1".equals(pd.getString("VEHICLE_MODEL"))) {
PageData vehicle = new PageData();
vehicle.put("OPERATING_ID", pd.getString("VEHICLE"));
vehicle.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData pageData = operatingVehiclesService.findById(vehicle);
if(!StringUtils.equals(pageData.getString("VEHICLEOWNER"), pd.getString("CAR_OWNERS"))) {
PageData operation = new PageData();
operation.put("OPERATING_ID", pd.getString("VEHICLE"));
operation.put("VEHICLEOWNER", pd.getString("CAR_OWNERS"));
operation.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
operation.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
operation.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
operation.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
operatingVehiclesService.editInspectVehicleowner(operation);
}
}else {
PageData traffic = new PageData();
traffic.put("FREIGHTTRAILER_ID", pd.getString("VEHICLE"));
traffic.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData trafficInfo = freightTrailerService.findById(traffic);
if(!StringUtils.equals(trafficInfo.getString("CAR_OWNERS"), pd.getString("CAR_OWNERS"))) {
PageData data = new PageData();
data.put("FREIGHTTRAILER_ID", pd.getString("VEHICLE"));
data.put("CAR_OWNERS", pd.getString("CAR_OWNERS"));
data.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
data.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
data.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
data.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
freightTrailerService.editInspectTreight(data);
}
}
map.put("pd", pd);
map.put("result", errInfo);
return map;

View File

@ -70,6 +70,20 @@ public class TaxationManageController extends BaseController {
}
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
taxationManageService.save(pd);
PageData traffic = new PageData();
traffic.put("FREIGHTTRAILER_ID", pd.getString("FREIGHTTRAILER_ID"));
traffic.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData trafficInfo = freightTrailerService.findById(traffic);
if(!org.apache.commons.lang.StringUtils.equals(trafficInfo.getString("CAR_OWNERS"), pd.getString("VEHICLEOWNER"))) {
PageData data = new PageData();
data.put("FREIGHTTRAILER_ID", pd.getString("FREIGHTTRAILER_ID"));
data.put("CAR_OWNERS", pd.getString("VEHICLEOWNER"));
data.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
data.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
data.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
data.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
freightTrailerService.editInspectTreight(data);
}
map.put("pd", pd);
map.put("result", errInfo);
return map;

View File

@ -91,5 +91,6 @@ public interface FreightTrailerMapper {
List<PageData> getScrapPulldownVehicleList(String corpId);
void editInspectTreight(PageData pd);
}

View File

@ -51,4 +51,6 @@ public interface OperatingVehiclesMapper {
void setAssinedStatus(PageData operating);
List<PageData> getScrapPulldownVehicleList(PageData pd);
void editInspectVehicleowner(PageData pd);
}

View File

@ -90,5 +90,7 @@ public interface FreightTrailerService {
void setAssinedStatus(PageData freightTrailer);
List<PageData> getScrapPulldownVehicleList(String corpId);
void editInspectTreight(PageData data);
}

View File

@ -142,5 +142,10 @@ public class FreightTrailerServiceImpl implements FreightTrailerService {
public List<PageData> getScrapPulldownVehicleList(String corpId) {
return freightTrailerMapper.getScrapPulldownVehicleList(corpId);
}
@Override
public void editInspectTreight(PageData pd) {
freightTrailerMapper.editInspectTreight(pd);
}
}

View File

@ -51,4 +51,6 @@ public interface OperatingVehiclesService {
void setAssinedStatus(PageData operating);
List<PageData> getScrapPulldownVehicleList(PageData pd);
void editInspectVehicleowner(PageData operation);
}

View File

@ -86,4 +86,9 @@ public class OperatingVehiclesServiceImpl implements OperatingVehiclesService {
public List<PageData> getScrapPulldownVehicleList(PageData pd) {
return operatingVehiclesMapper.getScrapPulldownVehicleList(pd);
}
@Override
public void editInspectVehicleowner(PageData pd) {
operatingVehiclesMapper.editInspectVehicleowner(pd);
}
}

View File

@ -394,6 +394,20 @@
CORPINFO_ID = #{CORPINFO_ID}
</update>
<update id="editInspectTreight">
update
<include refid="tableName"></include>
set
CAR_OWNERS = #{CAR_OWNERS},
OPERATOR = #{OPERATOR},
OPERATTIME = #{OPERATTIME},
OPERATORNAME = #{OPERATORNAME}
where
FREIGHTTRAILER_ID = #{FREIGHTTRAILER_ID}
and
CORPINFO_ID = #{CORPINFO_ID}
</update>
<select id="getScrapPulldownVehicleList" resultType="com.zcloud.entity.PageData">
select

View File

@ -172,8 +172,7 @@
f.DELETEORNAME,
f.DELETTIME
from
<include refid="tableName"></include>
f
<include refid="tableName"></include> f
where
f.INSURE_ID = #{INSURE_ID}
</select>

View File

@ -329,6 +329,20 @@
CORPINFO_ID = #{CORPINFO_ID}
</update>
<update id="editInspectVehicleowner">
update
<include refid="tableName"></include>
set
VEHICLEOWNER = #{VEHICLEOWNER},
OPERATOR = #{OPERATOR},
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME}
where
OPERATING_ID = #{OPERATING_ID}
AND
CORPINFO_ID = #{CORPINFO_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findByfindByPlateNumber" parameterType="pd" resultType="pd">