@ -277,6 +277,9 @@ public class BusHandoverPrepareService extends MybatisBaseService<BusHandoverPre
String sid = query . getSid ( ) ;
AppBusHandoverPrepareInfoVo appBusHandoverPrepareInfoVo = new AppBusHandoverPrepareInfoVo ( ) ;
BusHandoverPrepare busHandoverPrepare = fetchBySid ( sid ) ;
if ( busHandoverPrepare = = null ) {
return rb . setMsg ( "该交车准备记录不存在" ) ;
}
BeanUtil . copyProperties ( busHandoverPrepare , appBusHandoverPrepareInfoVo ) ;
List < AppBusHandoverPrepareVehicleInfoVo > list = busHandoverPrepareVehicleService . selByMainSid ( sid ) ;
appBusHandoverPrepareInfoVo . setCarDataList ( list ) ;
@ -362,7 +365,7 @@ public class BusHandoverPrepareService extends MybatisBaseService<BusHandoverPre
BusTransferRecords busTransferRecords = busTransferRecordsResultBean . getData ( ) ;
vo . setRemarks ( busTransferRecords . getReceiveRemarks ( ) ) ;
}
ResultBean < HandoverCertVo > resultBean = baseVehicleCertificateFeign . getCertificateInfoOne ( busHandoverPrepareVehicle . getVinSid ( ) , busHandoverPrepare . getUseOrgSid ( ) ) ;
ResultBean < HandoverCertVo > resultBean = baseVehicleCertificateFeign . getCertificateInfoOne ( busHandoverPrepareVehicle . getVinSid ( ) ) ;
HandoverCertVo handoverCertVo = resultBean . getData ( ) ;
BeanUtil . copyProperties ( handoverCertVo , vo ) ;
vo . setVinNo ( busHandoverPrepareVehicle . getVinNo ( ) ) ;
@ -377,6 +380,10 @@ public class BusHandoverPrepareService extends MybatisBaseService<BusHandoverPre
* /
public ResultBean < AppPolicyInfoVo > getPolicyInfo ( AppPolicyInfoQuery query ) {
ResultBean < AppPolicyInfoVo > rb = new ResultBean < > ( ) ;
BusHandoverPrepareVehicle busHandoverPrepareVehicle = busHandoverPrepareVehicleService . fetchBySid ( query . getSid ( ) ) ;
if ( busHandoverPrepareVehicle = = null ) {
return rb . setMsg ( "该交车准备的车辆记录不存在" ) ;
}
AppPolicyInfoVo vo = new AppPolicyInfoVo ( ) ;
List < String > policyList = new ArrayList < > ( ) ; // 保单照片
List < String > licenceList = new ArrayList < > ( ) ; // 临时牌照
@ -409,6 +416,12 @@ public class BusHandoverPrepareService extends MybatisBaseService<BusHandoverPre
* /
public ResultBean savePolicyInfo ( AppPolicyDto dto ) {
ResultBean rb = new ResultBean < > ( ) ;
BusHandoverPrepareVehicle busHandoverPrepareVehicle = busHandoverPrepareVehicleService . fetchBySid ( dto . getSid ( ) ) ;
if ( busHandoverPrepareVehicle = = null ) {
return rb . setMsg ( "该交车准备车辆记录不存在" ) ;
}
busHandoverPrepareVehicle . setPolicyState ( 1 ) ;
busHandoverPrepareVehicleService . updateById ( busHandoverPrepareVehicle ) ;
buscenterFile . delByLinkSidOrType ( dto . getSid ( ) , BuscenterFileEnum . HANDOVER_POLICY . getAttachType ( ) ) ;
List < String > policyList = dto . getPolicyList ( ) ;
if ( ! policyList . isEmpty ( ) ) {
@ -432,6 +445,10 @@ public class BusHandoverPrepareService extends MybatisBaseService<BusHandoverPre
* /
public ResultBean < AppOtherDataInfoVo > getOtherDataInfo ( AppOtherDataInfoQuery query ) {
ResultBean < AppOtherDataInfoVo > rb = new ResultBean < > ( ) ;
BusHandoverPrepareVehicle busHandoverPrepareVehicle = busHandoverPrepareVehicleService . fetchBySid ( query . getSid ( ) ) ;
if ( busHandoverPrepareVehicle = = null ) {
return rb . setMsg ( "该交车准备的车辆记录不存在" ) ;
}
AppOtherDataInfoVo vo = new AppOtherDataInfoVo ( ) ;
List < BuscenterFile > otherFiles = buscenterFile . selectByLinkSid ( query . getSid ( ) , BuscenterFileEnum . HANDOVER_OTHRRDATA . getAttachType ( ) ) ;
otherFiles . removeAll ( Collections . singleton ( null ) ) ;
@ -457,6 +474,13 @@ public class BusHandoverPrepareService extends MybatisBaseService<BusHandoverPre
if ( dto . getOtherInfo ( ) . isEmpty ( ) ) {
return rb . setMsg ( "其他资料图片为必填项" ) ;
}
//修改该车辆的状态
BusHandoverPrepareVehicle busHandoverPrepareVehicle = busHandoverPrepareVehicleService . fetchBySid ( dto . getSid ( ) ) ;
if ( busHandoverPrepareVehicle = = null ) {
return rb . setMsg ( "该交车准备的车辆记录不存在" ) ;
}
busHandoverPrepareVehicle . setOtherDataState ( 1 ) ;
busHandoverPrepareVehicleService . updateById ( busHandoverPrepareVehicle ) ;
buscenterFile . delByLinkSidOrType ( dto . getSid ( ) , BuscenterFileEnum . HANDOVER_OTHRRDATA . getAttachType ( ) ) ;
List < String > otherInfoList = dto . getOtherInfo ( ) ;
if ( ! otherInfoList . isEmpty ( ) ) {
@ -610,6 +634,9 @@ public class BusHandoverPrepareService extends MybatisBaseService<BusHandoverPre
public ResultBean saveRemarks ( RemarkDto dto ) {
ResultBean rb = ResultBean . fireFail ( ) ;
BusHandoverPrepareVehicle busHandoverPrepareVehicle = busHandoverPrepareVehicleService . fetchBySid ( dto . getSid ( ) ) ;
if ( busHandoverPrepareVehicle = = null ) {
return rb . setMsg ( "该记录不存在" ) ;
}
busHandoverPrepareVehicle . setRemarks ( dto . getRemarks ( ) ) ;
busHandoverPrepareVehicleService . updateById ( busHandoverPrepareVehicle ) ;
return rb . success ( ) ;
@ -655,6 +682,7 @@ public class BusHandoverPrepareService extends MybatisBaseService<BusHandoverPre
certificateStateQuery . setTransferStateValue ( CertificState . TransferState . TRANSTATE_YYJ . getRemarks ( ) ) ;
baseVehicleCertificateFeign . updateYjState ( certificateStateQuery ) ;
}
busHandoverPrepareVehicleService . updateById ( busHandoverPrepareVehicle ) ;
return rb . success ( ) ;
}
}