|
|
@ -44,6 +44,7 @@ import com.yxt.anrui.flowable.api.utils.ProcDefEnum; |
|
|
|
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; |
|
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
|
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserVo; |
|
|
@ -111,6 +112,8 @@ public class LoanCaseCloseApplyService extends MybatisBaseService<LoanCaseCloseA |
|
|
|
@Autowired |
|
|
|
private SysOrganizationFeign sysOrganizationFeign; |
|
|
|
@Autowired |
|
|
|
private SysStaffOrgFeign sysStaffOrgFeign; |
|
|
|
@Autowired |
|
|
|
private LoanCaseCloseVehService loanCaseCloseVehService; |
|
|
|
@Autowired |
|
|
|
private LoanCaseProgressService loanCaseProgressService; |
|
|
@ -205,8 +208,8 @@ public class LoanCaseCloseApplyService extends MybatisBaseService<LoanCaseCloseA |
|
|
|
if (StringUtils.isNotBlank(query.getLenderName())){ |
|
|
|
qw.like("lenderName",query.getLenderName()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(query.getCloseTypeValue())){ |
|
|
|
qw.like("closeTypeValue",query.getCloseTypeValue()); |
|
|
|
if (StringUtils.isNotBlank(query.getCloseTypeKey())){ |
|
|
|
qw.like("closeTypeKey",query.getCloseTypeKey()); |
|
|
|
} |
|
|
|
qw.apply(StringUtils.isNotBlank(query.getCloseStartDate()), "date_format (closeDate,'%Y-%m-%d') >= date_format('" + query.getCloseStartDate() + "','%Y-%m-%d')"). |
|
|
|
apply(StringUtils.isNotBlank(query.getCloseEndDate()), "date_format (closeDate,'%Y-%m-%d') <= date_format('" + query.getCloseEndDate() + "','%Y-%m-%d')" |
|
|
@ -266,6 +269,7 @@ public class LoanCaseCloseApplyService extends MybatisBaseService<LoanCaseCloseA |
|
|
|
this.updateByDto(dto); |
|
|
|
loanCaseCloseVehService.delByMainSid(dtoSid); |
|
|
|
for (LoanCaseCloseVehDto loanCaseCloseVehDto : loanCaseCloseVehList) { |
|
|
|
loanCaseCloseVehDto.setSid(""); |
|
|
|
loanCaseCloseVehDto.setMainSid(dtoSid); |
|
|
|
loanCaseCloseVehService.saveOrUpdateDto(loanCaseCloseVehDto); |
|
|
|
} |
|
|
@ -310,6 +314,11 @@ public class LoanCaseCloseApplyService extends MybatisBaseService<LoanCaseCloseA |
|
|
|
BeanUtil.copyProperties(entity, vo); |
|
|
|
List<LoanCaseCloseVehDetailsVo> loanCaseCloseVehDetailsVos = loanCaseCloseVehService.selByMainSid(sid); |
|
|
|
vo.setLoanCaseCloseVehList(loanCaseCloseVehDetailsVos); |
|
|
|
LoanCaseProgressExecute loanCaseProgressExecute = loanCaseProgressExecuteService.selByMainSid(entity.getBusSid()); |
|
|
|
vo.setReturnMoney(loanCaseProgressExecute.getExecuteAmountAll().toString()); |
|
|
|
vo.setNotReturnMoney(loanCaseProgressExecute.getExecuteNotAmount().toString()); |
|
|
|
List<LoanCaseProgressExecuteMeasure> loanCaseProgressExecuteMeasures = loanCaseProgressExecuteMeasureService.selByMainSid(loanCaseProgressExecute.getSid()); |
|
|
|
vo.setLoanCaseProgressExecuteMeasures(loanCaseProgressExecuteMeasures); |
|
|
|
List<LoanFile> jacl = loanFileService.selectByLinkSid(sid, LoanFileEnum.CLOSE.getAttachType()); |
|
|
|
List<LoanCaseCloseFile> jaclFiles = new ArrayList<>(); |
|
|
|
if (jacl != null && jacl.size() > 0) { |
|
|
@ -633,7 +642,8 @@ public class LoanCaseCloseApplyService extends MybatisBaseService<LoanCaseCloseA |
|
|
|
return rb.success(); |
|
|
|
} |
|
|
|
|
|
|
|
public LoanCaseCloseApplyDetailsVo details(String sid, String userSid, String orgPath) { |
|
|
|
public ResultBean<LoanCaseCloseApplyDetailsVo> details(String sid, String userSid, String orgPath) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
LoanCaseCloseApplyDetailsVo loanCaseCloseApplyDetailsVo = new LoanCaseCloseApplyDetailsVo(); |
|
|
|
SysUserVo sysUserVo = sysUserFeign.fetchBySid(userSid).getData(); |
|
|
|
loanCaseCloseApplyDetailsVo.setCreateBySid(userSid); |
|
|
@ -659,8 +669,24 @@ public class LoanCaseCloseApplyService extends MybatisBaseService<LoanCaseCloseA |
|
|
|
loanCaseCloseApplyDetailsVo.setIsFullLitigation(loanCaseProgress.getFull()); |
|
|
|
loanCaseCloseApplyDetailsVo.setSueMoneyTotal(loanCaseProgress.getSueMoney().toString()); |
|
|
|
loanCaseCloseApplyDetailsVo.setPartProceRemarks(loanCaseProgress.getSueShows()); |
|
|
|
LoanCaseProgressTrial loanCaseProgressTrial = loanCaseProgressTrialService.selByJdAndSid(sid, loanCaseProgress.getCaseStage()); |
|
|
|
loanCaseCloseApplyDetailsVo.setFinalJudgMoney(loanCaseProgressTrial.getVerdictAmount().toString()); |
|
|
|
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData(); |
|
|
|
SysOrganizationVo organizationVo = sysOrganizationFeign.fetchBySid(useOrgSid).getData(); |
|
|
|
loanCaseCloseApplyDetailsVo.setUseOrgSid(useOrgSid); |
|
|
|
loanCaseCloseApplyDetailsVo.setUseOrgName(organizationVo.getName()); |
|
|
|
loanCaseCloseApplyDetailsVo.setOrgPath(orgPath); |
|
|
|
LoanCaseProgressTrial loanCaseProgressTrialZs = loanCaseProgressTrialService.selByJdAndSid(sid, "再审"); |
|
|
|
LoanCaseProgressTrial loanCaseProgressTrialEs = loanCaseProgressTrialService.selByJdAndSid(sid, "二审"); |
|
|
|
LoanCaseProgressTrial loanCaseProgressTrialYs = loanCaseProgressTrialService.selByJdAndSid(sid, "一审"); |
|
|
|
if (loanCaseProgressTrialZs != null && loanCaseProgressTrialZs.getVerdictAmount() != null){ |
|
|
|
loanCaseCloseApplyDetailsVo.setFinalJudgMoney(loanCaseProgressTrialZs.getVerdictAmount().toString()); |
|
|
|
}else if (loanCaseProgressTrialEs != null && loanCaseProgressTrialEs.getVerdictAmount() != null ){ |
|
|
|
loanCaseCloseApplyDetailsVo.setFinalJudgMoney(loanCaseProgressTrialEs.getVerdictAmount().toString()); |
|
|
|
}else if (loanCaseProgressTrialYs != null && loanCaseProgressTrialYs.getVerdictAmount() != null){ |
|
|
|
loanCaseCloseApplyDetailsVo.setFinalJudgMoney(loanCaseProgressTrialYs.getVerdictAmount().toString()); |
|
|
|
}else { |
|
|
|
return rb.setMsg("没有判决金额"); |
|
|
|
} |
|
|
|
loanCaseCloseApplyDetailsVo.setBusSid(sid); |
|
|
|
LoanCaseProgressExecute loanCaseProgressExecute = loanCaseProgressExecuteService.selByMainSid(sid); |
|
|
|
loanCaseCloseApplyDetailsVo.setReturnMoney(loanCaseProgressExecute.getExecuteAmountAll().toString()); |
|
|
|
loanCaseCloseApplyDetailsVo.setNotReturnMoney(loanCaseProgressExecute.getExecuteNotAmount().toString()); |
|
|
@ -678,6 +704,6 @@ public class LoanCaseCloseApplyService extends MybatisBaseService<LoanCaseCloseA |
|
|
|
loanCaseCloseVehDetailsVos.add(loanCaseCloseVehDetailsVo); |
|
|
|
} |
|
|
|
loanCaseCloseApplyDetailsVo.setLoanCaseCloseVehList(loanCaseCloseVehDetailsVos); |
|
|
|
return loanCaseCloseApplyDetailsVo; |
|
|
|
return rb.success().setData(loanCaseCloseApplyDetailsVo); |
|
|
|
} |
|
|
|
} |