@ -30,19 +30,27 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage ;
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery ;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign ;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigate.* ;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatecustomer.LoanHomevisitInvestigateCustomerDetailsVo ;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatefile.LoanAttachTypeEnum ;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatefile.LoanHomevisitInvestigateFileDetailsVo ;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigateoperations.LoanHomevisitInvestigateOperationsDetailsVo ;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigateorder.LoanHomevisitInvestigateOrderDetailsVo ;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigateproperty.LoanHomevisitInvestigatePropertyDetailsVo ;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatetransport.LoanHomevisitInvestigateTransportDetailsVo ;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrepVo ;
import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigatecustomer.LoanHomevisitInvestigateCustomerService ;
import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigatefile.LoanHomevisitInvestigateFileService ;
import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigateoperations.LoanHomevisitInvestigateOperationsService ;
import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigateorder.LoanHomevisitInvestigateOrderService ;
import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigateproperty.LoanHomevisitInvestigatePropertyService ;
import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigatetransport.LoanHomevisitInvestigateTransportService ;
import org.apache.commons.lang3.StringUtils ;
import com.yxt.common.base.service.MybatisBaseService ;
import com.yxt.common.base.utils.PagerUtil ;
import com.yxt.common.core.query.PagerQuery ;
import com.yxt.common.core.result.ResultBean ;
import com.yxt.common.core.vo.PagerVo ;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigate.LoanHomevisitInvestigate ;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigate.LoanHomevisitInvestigateQuery ;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigate.LoanHomevisitInvestigateVo ;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigate.LoanHomevisitInvestigateDetailsVo ;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigate.LoanHomevisitInvestigateDto ;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigate.LoanHomevisitInvestigateFeign ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.stereotype.Service ;
@ -65,129 +73,274 @@ import java.util.List;
@Service
public class LoanHomevisitInvestigateService extends MybatisBaseService < LoanHomevisitInvestigateMapper , LoanHomevisitInvestigate > {
@Autowired
private SysUserFeign sysUserFeign ;
@Autowired
private SysUserFeign sysUserFeign ;
@Autowired
private LoanHomevisitInvestigateCustomerService loanHomevisitInvestigateCustomerService ;
@Autowired
private LoanHomevisitInvestigateOrderService loanHomevisitInvestigateOrderService ;
@Autowired
private LoanHomevisitInvestigateOperationsService loanHomevisitInvestigateOperationsService ;
@Autowired
private LoanHomevisitInvestigateTransportService loanHomevisitInvestigateTransportService ;
@Autowired
private LoanHomevisitInvestigatePropertyService loanHomevisitInvestigatePropertyService ;
@Autowired
private LoanHomevisitInvestigateFileService loanHomevisitInvestigateFileService ;
public PagerVo < LoanHomevisitInvestigateVo > listPageVo ( PagerQuery < LoanHomevisitInvestigateQuery > pq ) {
LoanHomevisitInvestigateQuery query = pq . getParams ( ) ;
QueryWrapper < LoanHomevisitInvestigate > qw = new QueryWrapper < > ( ) ;
qw . eq ( "li.state" , query . getType ( ) ) ;
qw . eq ( "bb.busNo" , 302 ) ;
if ( StringUtils . isNotBlank ( query . getMenuSid ( ) ) ) {
//=======================
PrivilegeQuery privilegeQuery = new PrivilegeQuery ( ) ;
privilegeQuery . setOrgPath ( query . getOrgSidPath ( ) ) ;
privilegeQuery . setMenuUrl ( query . getMenuSid ( ) ) ;
privilegeQuery . setUserSid ( query . getUserSid ( ) ) ;
ResultBean < String > defaultIdReltBean = sysUserFeign . selectPrivilegeLevel ( privilegeQuery ) ;
if ( StringUtils . isNotBlank ( defaultIdReltBean . getData ( ) ) ) {
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
String orgSidPath = query . getOrgSidPath ( ) ;
orgSidPath = orgSidPath + "/" ;
int i1 = orgSidPath . indexOf ( "/" ) ;
int i2 = orgSidPath . indexOf ( "/" , i1 + 1 ) ;
int i3 = orgSidPath . indexOf ( "/" , i2 + 1 ) ;
int i4 = orgSidPath . indexOf ( "/" , i3 + 1 ) ;
String orgLevelKey = defaultIdReltBean . getData ( ) ;
if ( "1" . equals ( orgLevelKey ) ) {
orgSidPath = orgSidPath . substring ( 0 , i1 ) ;
qw . like ( "bo.orgSidPath" , orgSidPath ) ;
} else if ( "2" . equals ( orgLevelKey ) ) {
orgSidPath = orgSidPath . substring ( 0 , i2 ) ;
qw . like ( "bo.orgSidPath" , orgSidPath ) ;
} else if ( "3" . equals ( orgLevelKey ) ) {
orgSidPath = orgSidPath . substring ( 0 , i3 ) ;
qw . like ( "bo.orgSidPath" , orgSidPath ) ;
} else if ( "4" . equals ( orgLevelKey ) ) {
orgSidPath = orgSidPath . substring ( 0 , i4 ) ;
qw . like ( "bo.orgSidPath" , orgSidPath ) ;
} else if ( "5" . equals ( orgLevelKey ) ) {
qw . eq ( "bo.createBySid" , query . getUserSid ( ) ) ;
} else {
PagerVo < LoanHomevisitInvestigateVo > p = new PagerVo < > ( ) ;
return p ;
}
} else {
PagerVo < LoanHomevisitInvestigateVo > p = new PagerVo < > ( ) ;
return p ;
}
}
if ( StringUtils . isNotBlank ( query . getUseOrgName ( ) ) ) {
qw . like ( "bo.useOrgName" , query . getUseOrgName ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getSaleDeptName ( ) ) ) {
qw . like ( "bo.orgName" , query . getSaleDeptName ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getStaffName ( ) ) ) {
qw . like ( "bo.staffName" , query . getStaffName ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getContractNo ( ) ) ) {
qw . like ( "bo.contractNo" , query . getContractNo ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getLoanPeoName ( ) ) ) {
qw . like ( "bb.borrowerName" , query . getLoanPeoName ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getPolicyName ( ) ) ) {
qw . like ( "bb.policyName" , query . getPolicyName ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getHomeVisStaffName ( ) ) ) {
qw . like ( "li.homeVisStaffName" , query . getHomeVisStaffName ( ) ) ;
}
String orderStartDate = query . getOrderStartDate ( ) ;
String orderEndDate = query . getOrderEndDate ( ) ;
qw . apply ( StringUtils . isNotBlank ( orderStartDate ) , "date_format (bo.createDate,'%Y-%m-%d') >= date_format('" + orderStartDate + "','%Y-%m-%d')" ) .
apply ( StringUtils . isNotBlank ( orderEndDate ) , "date_format (bo.createDate,'%Y-%m-%d') <= date_format('" + orderEndDate + "','%Y-%m-%d')"
) ;
String resHomeVisStartDate = query . getResHomeVisStartDate ( ) ;
String resHomeVisEndDate = query . getResHomeVisEndDate ( ) ;
qw . apply ( StringUtils . isNotBlank ( resHomeVisStartDate ) , "date_format (li.resHomeVisDate,'%Y-%m-%d') >= date_format('" + resHomeVisStartDate + "','%Y-%m-%d')" ) .
apply ( StringUtils . isNotBlank ( resHomeVisEndDate ) , "date_format (li.resHomeVisDate,'%Y-%m-%d') <= date_format('" + resHomeVisEndDate + "','%Y-%m-%d')"
) ;
IPage < LoanHomevisitInvestigate > page = PagerUtil . queryToPage ( pq ) ;
IPage < LoanHomevisitInvestigateVo > pagging = baseMapper . selectPageVo ( page , qw ) ;
PagerVo < LoanHomevisitInvestigateVo > p = PagerUtil . pageToVo ( pagging , null ) ;
return p ;
}
public void saveOrUpdateDto ( LoanHomevisitInvestigateDto dto ) {
public PagerVo < LoanHomevisitInvestigateVo > listPageVo ( PagerQuery < LoanHomevisitInvestigateQuery > pq ) {
LoanHomevisitInvestigateQuery query = pq . getParams ( ) ;
QueryWrapper < LoanHomevisitInvestigate > qw = new QueryWrapper < > ( ) ;
qw . eq ( "li.state" , query . getType ( ) ) ;
qw . eq ( "bb.busNo" , 302 ) ;
if ( StringUtils . isNotBlank ( query . getMenuSid ( ) ) ) {
//=======================
PrivilegeQuery privilegeQuery = new PrivilegeQuery ( ) ;
privilegeQuery . setOrgPath ( query . getOrgSidPath ( ) ) ;
privilegeQuery . setMenuUrl ( query . getMenuSid ( ) ) ;
privilegeQuery . setUserSid ( query . getUserSid ( ) ) ;
ResultBean < String > defaultIdReltBean = sysUserFeign . selectPrivilegeLevel ( privilegeQuery ) ;
if ( StringUtils . isNotBlank ( defaultIdReltBean . getData ( ) ) ) {
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
String orgSidPath = query . getOrgSidPath ( ) ;
orgSidPath = orgSidPath + "/" ;
int i1 = orgSidPath . indexOf ( "/" ) ;
int i2 = orgSidPath . indexOf ( "/" , i1 + 1 ) ;
int i3 = orgSidPath . indexOf ( "/" , i2 + 1 ) ;
int i4 = orgSidPath . indexOf ( "/" , i3 + 1 ) ;
String orgLevelKey = defaultIdReltBean . getData ( ) ;
if ( "1" . equals ( orgLevelKey ) ) {
orgSidPath = orgSidPath . substring ( 0 , i1 ) ;
qw . like ( "bo.orgSidPath" , orgSidPath ) ;
} else if ( "2" . equals ( orgLevelKey ) ) {
orgSidPath = orgSidPath . substring ( 0 , i2 ) ;
qw . like ( "bo.orgSidPath" , orgSidPath ) ;
} else if ( "3" . equals ( orgLevelKey ) ) {
orgSidPath = orgSidPath . substring ( 0 , i3 ) ;
qw . like ( "bo.orgSidPath" , orgSidPath ) ;
} else if ( "4" . equals ( orgLevelKey ) ) {
orgSidPath = orgSidPath . substring ( 0 , i4 ) ;
qw . like ( "bo.orgSidPath" , orgSidPath ) ;
} else if ( "5" . equals ( orgLevelKey ) ) {
qw . eq ( "bo.createBySid" , query . getUserSid ( ) ) ;
} else {
PagerVo < LoanHomevisitInvestigateVo > p = new PagerVo < > ( ) ;
return p ;
}
} else {
PagerVo < LoanHomevisitInvestigateVo > p = new PagerVo < > ( ) ;
return p ;
}
}
if ( StringUtils . isNotBlank ( query . getUseOrgName ( ) ) ) {
qw . like ( "bo.useOrgName" , query . getUseOrgName ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getSaleDeptName ( ) ) ) {
qw . like ( "bo.orgName" , query . getSaleDeptName ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getStaffName ( ) ) ) {
qw . like ( "bo.staffName" , query . getStaffName ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getContractNo ( ) ) ) {
qw . like ( "bo.contractNo" , query . getContractNo ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getLoanPeoName ( ) ) ) {
qw . like ( "bb.borrowerName" , query . getLoanPeoName ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getPolicyName ( ) ) ) {
qw . like ( "bb.policyName" , query . getPolicyName ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getHomeVisStaffName ( ) ) ) {
qw . like ( "li.homeVisStaffName" , query . getHomeVisStaffName ( ) ) ;
}
String orderStartDate = query . getOrderStartDate ( ) ;
String orderEndDate = query . getOrderEndDate ( ) ;
qw . apply ( StringUtils . isNotBlank ( orderStartDate ) , "date_format (bo.createDate,'%Y-%m-%d') >= date_format('" + orderStartDate + "','%Y-%m-%d')" ) .
apply ( StringUtils . isNotBlank ( orderEndDate ) , "date_format (bo.createDate,'%Y-%m-%d') <= date_format('" + orderEndDate + "','%Y-%m-%d')"
) ;
String resHomeVisStartDate = query . getResHomeVisStartDate ( ) ;
String resHomeVisEndDate = query . getResHomeVisEndDate ( ) ;
qw . apply ( StringUtils . isNotBlank ( resHomeVisStartDate ) , "date_format (li.resHomeVisDate,'%Y-%m-%d') >= date_format('" + resHomeVisStartDate + "','%Y-%m-%d')" ) .
apply ( StringUtils . isNotBlank ( resHomeVisEndDate ) , "date_format (li.resHomeVisDate,'%Y-%m-%d') <= date_format('" + resHomeVisEndDate + "','%Y-%m-%d')"
) ;
IPage < LoanHomevisitInvestigate > page = PagerUtil . queryToPage ( pq ) ;
IPage < LoanHomevisitInvestigateVo > pagging = baseMapper . selectPageVo ( page , qw ) ;
PagerVo < LoanHomevisitInvestigateVo > p = PagerUtil . pageToVo ( pagging , null ) ;
return p ;
}
public void saveOrUpdateDto ( LoanHomevisitInvestigateDto dto ) {
String dtoSid = dto . getSid ( ) ;
if ( StringUtils . isBlank ( dtoSid ) ) {
this . insertByDto ( dto ) ;
return ;
}
this . updateByDto ( dto ) ;
}
public void insertByDto ( LoanHomevisitInvestigateDto dto ) {
LoanHomevisitInvestigate entity = new LoanHomevisitInvestigate ( ) ;
BeanUtil . copyProperties ( dto , entity , "id" , "sid" ) ;
baseMapper . insert ( entity ) ;
}
public void updateByDto ( LoanHomevisitInvestigateDto dto ) {
String dtoSid = dto . getSid ( ) ;
return ;
}
this . updateByDto ( dto ) ;
}
public void insertByDto ( LoanHomevisitInvestigateDto dto ) {
LoanHomevisitInvestigate entity = new LoanHomevisitInvestigate ( ) ;
BeanUtil . copyProperties ( dto , entity , "id" , "sid" ) ;
baseMapper . insert ( entity ) ;
}
public void updateByDto ( LoanHomevisitInvestigateDto dto ) {
String dtoSid = dto . getSid ( ) ;
if ( StringUtils . isBlank ( dtoSid ) ) {
return ;
}
LoanHomevisitInvestigate entity = fetchBySid ( dtoSid ) ;
BeanUtil . copyProperties ( dto , entity , "id" , "sid" ) ;
baseMapper . updateById ( entity ) ;
}
public LoanHomevisitInvestigateDetailsVo fetchDetailsVoBySid ( String sid ) {
LoanHomevisitInvestigate entity = fetchBySid ( sid ) ;
LoanHomevisitInvestigateDetailsVo vo = new LoanHomevisitInvestigateDetailsVo ( ) ;
BeanUtil . copyProperties ( entity , vo ) ;
return vo ;
}
}
LoanHomevisitInvestigate entity = fetchBySid ( dtoSid ) ;
BeanUtil . copyProperties ( dto , entity , "id" , "sid" ) ;
baseMapper . updateById ( entity ) ;
}
public LoanHomevisitInvestigateDetailsVo fetchDetailsVoBySid ( String sid ) {
LoanHomevisitInvestigate entity = fetchBySid ( sid ) ;
LoanHomevisitInvestigateDetailsVo vo = new LoanHomevisitInvestigateDetailsVo ( ) ;
BeanUtil . copyProperties ( entity , vo ) ;
return vo ;
}
public ResultBean isPassThrough ( String sid , String pass ) {
ResultBean rb = ResultBean . fireFail ( ) ;
if ( "1" . equals ( pass ) ) { //1通过 2不通过
baseMapper . isPassThrough ( sid , "001" , "通过" ) ;
} else {
baseMapper . isPassThrough ( sid , "002" , "不通过" ) ;
}
return rb . success ( ) ;
}
public ResultBean saveAppointmentInfo ( LoanHomeVisitInvestigateReservationDto dto ) {
ResultBean rb = ResultBean . fireFail ( ) ;
baseMapper . saveAppointmentInfo ( dto . getSid ( ) , dto . getTimes ( ) , dto . getAdress ( ) ) ;
return rb . success ( ) ;
}
public ResultBean < LoanHomeVisitInvestigateInitReportStateVo > getHomeVisitReportInfo ( String sid ) {
ResultBean rb = ResultBean . fireFail ( ) ;
LoanHomeVisitInvestigateInitReportStateVo loanHomeVisitInvestigateInitReportStateVo = new LoanHomeVisitInvestigateInitReportStateVo ( ) ;
//客户信息状态
LoanHomevisitInvestigateCustomerDetailsVo loanHomevisitInvestigateCustomerDetailsVo = loanHomevisitInvestigateCustomerService . selByMainSid ( sid ) ;
if ( loanHomevisitInvestigateCustomerDetailsVo = = null ) {
loanHomeVisitInvestigateInitReportStateVo . setCustomerState ( 0 ) ;
} else {
loanHomeVisitInvestigateInitReportStateVo . setCustomerState ( 1 ) ;
}
//订单信息状态
LoanHomevisitInvestigateOrderDetailsVo loanHomevisitInvestigateOrderDetailsVo = loanHomevisitInvestigateOrderService . selByMainSid ( sid ) ;
if ( loanHomevisitInvestigateOrderDetailsVo = = null ) {
loanHomeVisitInvestigateInitReportStateVo . setOrderState ( 0 ) ;
} else {
loanHomeVisitInvestigateInitReportStateVo . setOrderState ( 1 ) ;
}
//运营经历信息
LoanHomevisitInvestigateOperationsDetailsVo loanHomevisitInvestigateOperationsDetailsVo = loanHomevisitInvestigateOperationsService . selByMainSid ( sid ) ;
if ( loanHomevisitInvestigateOperationsDetailsVo = = null ) {
loanHomeVisitInvestigateInitReportStateVo . setOperationState ( 0 ) ;
} else {
loanHomeVisitInvestigateInitReportStateVo . setOperationState ( 1 ) ;
}
//运输情况信息
LoanHomevisitInvestigateTransportDetailsVo loanHomevisitInvestigateTransportDetailsVo = loanHomevisitInvestigateTransportService . selByMainSid ( sid ) ;
if ( loanHomevisitInvestigateTransportDetailsVo = = null ) {
loanHomeVisitInvestigateInitReportStateVo . setTransportState ( 0 ) ;
} else {
loanHomeVisitInvestigateInitReportStateVo . setTransportState ( 1 ) ;
}
//资产情况信息
LoanHomevisitInvestigatePropertyDetailsVo loanHomevisitInvestigatePropertyDetailsVo = loanHomevisitInvestigatePropertyService . selByMainSid ( sid ) ;
if ( loanHomevisitInvestigatePropertyDetailsVo = = null ) {
loanHomeVisitInvestigateInitReportStateVo . setAssetsState ( 0 ) ;
} else {
loanHomeVisitInvestigateInitReportStateVo . setAssetsState ( 1 ) ;
}
return rb . success ( ) . setData ( loanHomeVisitInvestigateInitReportStateVo ) ;
}
public ResultBean isPassThrough ( String sid , String pass ) {
ResultBean rb = ResultBean . fireFail ( ) ;
if ( "1" . equals ( pass ) ) { //1通过 2不通过
baseMapper . isPassThrough ( sid , "001" , "通过" ) ;
} else {
baseMapper . isPassThrough ( sid , "002" , "不通过" ) ;
}
return rb . success ( ) ;
}
public ResultBean < LoanHomeVisitInvestigateInitInformationStateVo > getHomeVisitDataInfo ( String sid ) {
ResultBean rb = ResultBean . fireFail ( ) ;
LoanHomeVisitInvestigateInitInformationStateVo loanHomeVisitInvestigateInitInformationStateVo = new LoanHomeVisitInvestigateInitInformationStateVo ( ) ;
//定位信息
List < LoanHomevisitInvestigateFileDetailsVo > dwxxImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . DWXX . getAttachType ( ) ) ;
//房屋照片
List < LoanHomevisitInvestigateFileDetailsVo > fwzpImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . FWZP . getAttachType ( ) ) ;
//门口照片
List < LoanHomevisitInvestigateFileDetailsVo > mkzpImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . MKZP . getAttachType ( ) ) ;
//客厅卧室照片
List < LoanHomevisitInvestigateFileDetailsVo > ktwszpImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . KTWSZP . getAttachType ( ) ) ;
//合影照等
List < LoanHomevisitInvestigateFileDetailsVo > hyzdImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . HYZD . getAttachType ( ) ) ;
//贷款人身份证
List < LoanHomevisitInvestigateFileDetailsVo > dkrsfzImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . DKRSFZ . getAttachType ( ) ) ;
//贷款人户口本
List < LoanHomevisitInvestigateFileDetailsVo > dkrhkbImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . DKRHKB . getAttachType ( ) ) ;
//贷款人婚姻证明
List < LoanHomevisitInvestigateFileDetailsVo > dkrhyzmImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . DKRHYZM . getAttachType ( ) ) ;
//贷款人驾驶本
List < LoanHomevisitInvestigateFileDetailsVo > dkrjsbImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . DKRJSB . getAttachType ( ) ) ;
//贷款人银行流水
List < LoanHomevisitInvestigateFileDetailsVo > dkryhlsImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . DKRYHLS . getAttachType ( ) ) ;
//配偶身份证
List < LoanHomevisitInvestigateFileDetailsVo > posfzImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . POSFZ . getAttachType ( ) ) ;
//配偶户口本
List < LoanHomevisitInvestigateFileDetailsVo > pohkbImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . POHKB . getAttachType ( ) ) ;
//担保人身份证
List < LoanHomevisitInvestigateFileDetailsVo > dbrsfzImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . DBRSFZ . getAttachType ( ) ) ;
//担保人户口本
List < LoanHomevisitInvestigateFileDetailsVo > dbrhkbImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . DBRHKB . getAttachType ( ) ) ;
//银行卡
List < LoanHomevisitInvestigateFileDetailsVo > yhkImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . YHK . getAttachType ( ) ) ;
//房产
List < LoanHomevisitInvestigateFileDetailsVo > fcImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . FC . getAttachType ( ) ) ;
//车辆
List < LoanHomevisitInvestigateFileDetailsVo > clImages = loanHomevisitInvestigateFileService . selByMainSidAndTypeKey ( sid , LoanAttachTypeEnum . CL . getAttachType ( ) ) ;
//家访见证类
if ( dwxxImages = = null | | dwxxImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setWitnessState ( 0 ) ;
} else if ( fwzpImages = = null | | fwzpImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setWitnessState ( 0 ) ;
} else if ( mkzpImages = = null | | mkzpImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setWitnessState ( 0 ) ;
} else if ( ktwszpImages = = null | | ktwszpImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setWitnessState ( 0 ) ;
} else if ( hyzdImages = = null | | hyzdImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setWitnessState ( 0 ) ;
} else {
loanHomeVisitInvestigateInitInformationStateVo . setWitnessState ( 1 ) ;
}
//证明文件
if ( dkrsfzImages = = null | | dkrsfzImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setProofState ( 0 ) ;
} else if ( dkrhkbImages = = null | | dkrhkbImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setProofState ( 0 ) ;
} else if ( dkrhyzmImages = = null | | dkrhyzmImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setProofState ( 0 ) ;
} else if ( dkrjsbImages = = null | | dkrjsbImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setProofState ( 0 ) ;
} else if ( dkryhlsImages = = null | | dkryhlsImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setProofState ( 0 ) ;
} else if ( posfzImages = = null | | posfzImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setProofState ( 0 ) ;
} else if ( pohkbImages = = null | | pohkbImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setProofState ( 0 ) ;
} else if ( dbrsfzImages = = null | | dbrsfzImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setProofState ( 0 ) ;
} else if ( dbrhkbImages = = null | | dbrhkbImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setProofState ( 0 ) ;
} else {
loanHomeVisitInvestigateInitInformationStateVo . setProofState ( 1 ) ;
}
//资产类
if ( yhkImages = = null | | yhkImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setAssetsInfo ( 0 ) ;
} else if ( fcImages = = null | | fcImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setAssetsInfo ( 0 ) ;
} else if ( clImages = = null | | clImages . size ( ) = = 0 ) {
loanHomeVisitInvestigateInitInformationStateVo . setAssetsInfo ( 0 ) ;
} else {
loanHomeVisitInvestigateInitInformationStateVo . setAssetsInfo ( 1 ) ;
}
return rb . success ( ) . setData ( loanHomeVisitInvestigateInitInformationStateVo ) ;
}
}