|
|
|
@ -24,6 +24,7 @@ import com.daqing.framework.model.response.PromptSuccess; |
|
|
|
|
import com.daqing.framework.model.response.ResponseResult; |
|
|
|
|
import com.daqing.framework.utils.PageUtils; |
|
|
|
|
import com.daqing.framework.utils.excel.ExcelUtil; |
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
@ -139,16 +140,19 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest |
|
|
|
|
DgAssetsInvestigation assetsInvestigation = this.baseMapper.selectOne(new QueryWrapper<DgAssetsInvestigation>() |
|
|
|
|
.eq("business_id", assetsResponse.getBusinessId()).eq("type", 1)); |
|
|
|
|
|
|
|
|
|
// assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount());
|
|
|
|
|
// assetsResponse.setAmount(assetsInvestigation.getAmount());
|
|
|
|
|
// assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount());
|
|
|
|
|
// assetsResponse.setApplyContent(assetsInvestigation.getApplyContent());
|
|
|
|
|
// assetsResponse.setAssetsCode(assetsInvestigation.getAssetsCode());
|
|
|
|
|
// assetsResponse.setAssetsName(assetsInvestigation.getAssetsName());
|
|
|
|
|
// assetsResponse.setAssetsTime(assetsInvestigation.getAssetsTime());
|
|
|
|
|
// assetsResponse.setAuditAmount(assetsInvestigation.getAuditAmount());
|
|
|
|
|
// assetsResponse.setAuditCode(assetsInvestigation.getAuditCode());
|
|
|
|
|
// assetsResponse.setAuditName(assetsInvestigation.getAuditName());
|
|
|
|
|
if(assetsInvestigation != null){ |
|
|
|
|
BeanUtils.copyProperties(assetsInvestigation,assetsResponse); |
|
|
|
|
} |
|
|
|
|
/* assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount()); |
|
|
|
|
assetsResponse.setAmount(assetsInvestigation.getAmount()); |
|
|
|
|
assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount()); |
|
|
|
|
assetsResponse.setApplyContent(assetsInvestigation.getApplyContent()); |
|
|
|
|
assetsResponse.setAssetsCode(assetsInvestigation.getAssetsCode()); |
|
|
|
|
assetsResponse.setAssetsName(assetsInvestigation.getAssetsName()); |
|
|
|
|
assetsResponse.setAssetsTime(assetsInvestigation.getAssetsTime()); |
|
|
|
|
assetsResponse.setAuditAmount(assetsInvestigation.getAuditAmount()); |
|
|
|
|
assetsResponse.setAuditCode(assetsInvestigation.getAuditCode()); |
|
|
|
|
assetsResponse.setAuditName(assetsInvestigation.getAuditName());*/ |
|
|
|
|
//结束---------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
//根据业务id查询评估价值List
|
|
|
|
@ -217,6 +221,25 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest |
|
|
|
|
assetsInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
|
|
|
|
|
this.baseMapper.update(assets,new QueryWrapper<DgAssetsInvestigation>() |
|
|
|
|
.eq("business_id",dgAssetsInvestigation.getBusinessId()).eq("type",2)); |
|
|
|
|
|
|
|
|
|
DgAssetsMoney money = new DgAssetsMoney(); |
|
|
|
|
money.setBusinessId(dgAssetsInvestigation.getBusinessId()); |
|
|
|
|
money.setHouseMoney(investigateAssetsRequest.getHouseMoney()); |
|
|
|
|
money.setCarMoney(investigateAssetsRequest.getCarMoney()); |
|
|
|
|
money.setEquipmentMoney(investigateAssetsRequest.getEquipmentMoney()); |
|
|
|
|
money.setOtherMoney(investigateAssetsRequest.getOtherMoney()); |
|
|
|
|
dgAssetsMoneyMapper.update(money,new QueryWrapper<DgAssetsMoney>() |
|
|
|
|
.eq("business_id",dgAssetsInvestigation.getBusinessId())); |
|
|
|
|
}else{ |
|
|
|
|
//根据业务id批量新增数据到评估价值列表
|
|
|
|
|
//dgAssetsAssessmentAssetsLogMapper.insertAssetsList(investigateAssetsRequest.getAssessmentList());
|
|
|
|
|
DgAssetsMoney money = new DgAssetsMoney(); |
|
|
|
|
money.setBusinessId(dgAssetsInvestigation.getBusinessId()); |
|
|
|
|
money.setHouseMoney(investigateAssetsRequest.getHouseMoney()); |
|
|
|
|
money.setCarMoney(investigateAssetsRequest.getCarMoney()); |
|
|
|
|
money.setEquipmentMoney(investigateAssetsRequest.getEquipmentMoney()); |
|
|
|
|
money.setOtherMoney(investigateAssetsRequest.getOtherMoney()); |
|
|
|
|
dgAssetsMoneyMapper.insert(money); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//资产部调查员调查,修改审核意见以及状态,修改其他数据
|
|
|
|
@ -244,17 +267,6 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest |
|
|
|
|
dgApplyAmountInfo.setEnGuaranteeMeasures(ArraysUtil.toString(investigateAssetsRequest.getEnGuaranteeMeasures())); |
|
|
|
|
dgApplyAmountInfoMapper.updateById(dgApplyAmountInfo); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//根据业务id批量新增数据到评估价值列表
|
|
|
|
|
//dgAssetsAssessmentAssetsLogMapper.insertAssetsList(investigateAssetsRequest.getAssessmentList());
|
|
|
|
|
DgAssetsMoney money = new DgAssetsMoney(); |
|
|
|
|
money.setBusinessId(dgAssetsInvestigation.getBusinessId()); |
|
|
|
|
money.setHouseMoney(investigateAssetsRequest.getHouseMoney()); |
|
|
|
|
money.setCarMoney(investigateAssetsRequest.getCarMoney()); |
|
|
|
|
money.setEquipmentMoney(investigateAssetsRequest.getEquipmentMoney()); |
|
|
|
|
money.setOtherMoney(investigateAssetsRequest.getOtherMoney()); |
|
|
|
|
dgAssetsMoneyMapper.insert(money); |
|
|
|
|
|
|
|
|
|
//判断资产部调查员是否调查通过,如果通过,修改资产部经理操作状态为待处理
|
|
|
|
|
if(investigateAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW){//状态为审核中
|
|
|
|
|
DgAssetsInvestigation assetsInvestigation2= new DgAssetsInvestigation(); |
|
|
|
@ -276,20 +288,6 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest |
|
|
|
|
//根据主键id查询资产部记录
|
|
|
|
|
DgAssetsInvestigation assetsInvestigation = this.baseMapper.selectById(approvalAssetsRequest.getId()); |
|
|
|
|
|
|
|
|
|
//此处为资产部经理审核的操作
|
|
|
|
|
//如果数据为驳回状态,审核通过,则处理资产部调查下该业务的审批状态为审核中,设置资产部领导的操作状态为待处理
|
|
|
|
|
if(assetsInvestigation.getStatus().equals(StatusCode.SP_REJECT) && approvalAssetsRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && assetsInvestigation.getType()==2){ |
|
|
|
|
DgAssetsInvestigation assets = new DgAssetsInvestigation(); |
|
|
|
|
assets.setStatus(StatusCode.SP_IN_REVIEW);//审核中
|
|
|
|
|
this.baseMapper.update(assets,new QueryWrapper<DgAssetsInvestigation>() |
|
|
|
|
.eq("business_id",assetsInvestigation.getBusinessId())); |
|
|
|
|
|
|
|
|
|
DgAssetsInvestigation assets2 = new DgAssetsInvestigation(); |
|
|
|
|
assets2.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
|
|
|
|
|
this.baseMapper.update(assets2,new QueryWrapper<DgAssetsInvestigation>() |
|
|
|
|
.eq("business_id",assetsInvestigation.getBusinessId()).eq("type",3)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
DgAssetsInvestigation dgAssetsInvestigation = new DgAssetsInvestigation(); |
|
|
|
|
dgAssetsInvestigation.setId(approvalAssetsRequest.getId()); |
|
|
|
|
dgAssetsInvestigation.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId())); |
|
|
|
@ -303,16 +301,12 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest |
|
|
|
|
//根据主键id修改资产部记录
|
|
|
|
|
this.baseMapper.updateById(dgAssetsInvestigation); |
|
|
|
|
|
|
|
|
|
if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
|
|
|
|
|
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus(); |
|
|
|
|
processStatus.setBusinessId(assetsInvestigation.getBusinessId()); |
|
|
|
|
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
|
|
|
|
|
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>() |
|
|
|
|
.eq("business_id",processStatus.getBusinessId())); |
|
|
|
|
} |
|
|
|
|
DgAssetsInvestigation dgAssets = new DgAssetsInvestigation(); |
|
|
|
|
dgAssets.setStatus(StatusCode.SP_REJECT);//驳回
|
|
|
|
|
dgAssets.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
|
|
|
|
|
|
|
|
|
|
//驳回情况
|
|
|
|
|
if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT)){ |
|
|
|
|
//驳回情况
|
|
|
|
|
//修改资产部调查下该业务的所有审批状态为驳回
|
|
|
|
|
DgAssetsInvestigation assets = new DgAssetsInvestigation(); |
|
|
|
|
assets.setStatus(StatusCode.SP_REJECT);//驳回
|
|
|
|
@ -320,24 +314,36 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest |
|
|
|
|
.eq("business_id",assetsInvestigation.getBusinessId())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
DgAssetsInvestigation dgAssets = new DgAssetsInvestigation(); |
|
|
|
|
dgAssets.setStatus(StatusCode.SP_REJECT);//驳回
|
|
|
|
|
dgAssets.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
|
|
|
|
|
//此处为资产部经理审核的操作
|
|
|
|
|
//如果数据为驳回状态,审核通过,则处理资产部调查下该业务的审批状态为审核中,设置资产部领导的操作状态为待处理
|
|
|
|
|
if(assetsInvestigation.getStatus().equals(StatusCode.SP_REJECT) && approvalAssetsRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && assetsInvestigation.getType()==2){ |
|
|
|
|
DgAssetsInvestigation assets = new DgAssetsInvestigation(); |
|
|
|
|
assets.setStatus(StatusCode.SP_IN_REVIEW);//审核中
|
|
|
|
|
this.baseMapper.update(assets,new QueryWrapper<DgAssetsInvestigation>() |
|
|
|
|
.eq("business_id",assetsInvestigation.getBusinessId())); |
|
|
|
|
|
|
|
|
|
DgAssetsInvestigation assets2 = new DgAssetsInvestigation(); |
|
|
|
|
assets2.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
|
|
|
|
|
this.baseMapper.update(assets2,new QueryWrapper<DgAssetsInvestigation>() |
|
|
|
|
.eq("business_id",assetsInvestigation.getBusinessId()).eq("type",3)); |
|
|
|
|
}else if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
|
|
|
|
|
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus(); |
|
|
|
|
processStatus.setBusinessId(assetsInvestigation.getBusinessId()); |
|
|
|
|
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
|
|
|
|
|
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>() |
|
|
|
|
.eq("business_id",processStatus.getBusinessId())); |
|
|
|
|
}else if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==2){ |
|
|
|
|
//资产部经理驳回情况
|
|
|
|
|
if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==2){ |
|
|
|
|
//资产部专员调查审批状态为驳回,操作状态为待处理
|
|
|
|
|
this.baseMapper.update(dgAssets,new QueryWrapper<DgAssetsInvestigation>() |
|
|
|
|
.eq("business_id",assetsInvestigation.getBusinessId()).eq("type",1)); |
|
|
|
|
} |
|
|
|
|
}else if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==3){ |
|
|
|
|
//资产部领导驳回情况
|
|
|
|
|
if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==3){ |
|
|
|
|
//资产部经理审批状态设置为驳回,操作状态设置为待处理
|
|
|
|
|
this.baseMapper.update(dgAssets,new QueryWrapper<DgAssetsInvestigation>() |
|
|
|
|
.eq("business_id",assetsInvestigation.getBusinessId()).eq("type",2)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}else if(approvalAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==2){//资产部经理审核通过
|
|
|
|
|
//如果资产部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核
|
|
|
|
|
if(approvalAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==2){//资产部经理审核通过
|
|
|
|
|
//根据主键id查询业务id
|
|
|
|
|
DgAssetsInvestigation assetsInvestigation2 = this.getBaseMapper().selectById(approvalAssetsRequest.getId()); |
|
|
|
|
|
|
|
|
@ -354,12 +360,12 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest |
|
|
|
|
String account = dgApplyAmountInfoController.getAccount(); |
|
|
|
|
AuditProcessUtil.save(assetsInvestigation.getBusinessId(),account,"资产部经理",approvalAssetsRequest.getApplyContent(),3); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}else if(approvalAssetsRequest.getStatus()==StatusCode.SP_REVIEWED && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==3) {//资产部分管领导审核通过
|
|
|
|
|
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
|
|
|
|
|
//待完善
|
|
|
|
|
if(approvalAssetsRequest.getStatus()==StatusCode.SP_REVIEWED && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==3) {//资产部分管领导审核通过
|
|
|
|
|
|
|
|
|
|
//如果担保部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
|
|
|
|
|
DgAssetsInvestigation investigationAssets = new DgAssetsInvestigation(); |
|
|
|
|
investigationAssets.setStatus(StatusCode.SP_REVIEWED);//已审核
|
|
|
|
|
this.baseMapper.update(investigationAssets,new QueryWrapper<DgAssetsInvestigation>().eq("business_id",assetsInvestigation.getBusinessId())); |
|
|
|
|
//查看担保部分管领导是否审核通过
|
|
|
|
|
int a=dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>() |
|
|
|
|
.eq("business_id",assetsInvestigation.getBusinessId()) |
|
|
|
|