|
|
@ -155,8 +155,8 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon |
|
|
|
qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (la.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')"). |
|
|
|
apply(StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (la.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')" |
|
|
|
); |
|
|
|
if(StringUtils.isNotBlank(query.getArrearsAll())){ |
|
|
|
qw.like("lc.arrearsAll",query.getArrearsAll()); |
|
|
|
if (StringUtils.isNotBlank(query.getArrearsAll())) { |
|
|
|
qw.like("lc.arrearsAll", query.getArrearsAll()); |
|
|
|
} |
|
|
|
//========================================数据授权开始
|
|
|
|
if (StringUtils.isNotBlank(query.getMenuUrl())) { |
|
|
@ -200,7 +200,7 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon |
|
|
|
} |
|
|
|
} |
|
|
|
IPage<LoanSecondarySalesApply> page = PagerUtil.queryToPage(pq); |
|
|
|
IPage<LoanSecondarySalesApplyVo> pagging = baseMapper.selectPageVo(page, qw,query.getVinNo(),query.getVehMark()); |
|
|
|
IPage<LoanSecondarySalesApplyVo> pagging = baseMapper.selectPageVo(page, qw, query.getVinNo(), query.getVehMark()); |
|
|
|
List<LoanSecondarySalesApplyVo> paggingRecords = pagging.getRecords(); |
|
|
|
paggingRecords.removeAll(Collections.singleton(null)); |
|
|
|
if (!paggingRecords.isEmpty()) { |
|
|
@ -497,7 +497,24 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon |
|
|
|
return rb.setMsg("操作失败!提交的数据不一致"); |
|
|
|
} |
|
|
|
//ToDo:验证车辆是否已处置
|
|
|
|
|
|
|
|
List<LoanSecondarySalesVehVo> loanSecondarySalesVehVoList = dto.getLoanSecondarySalesVehVoList(); |
|
|
|
loanSecondarySalesVehVoList.removeAll(Collections.singleton(null)); |
|
|
|
if (loanSecondarySalesVehVoList.isEmpty()) { |
|
|
|
return rb.setMsg("请选择车辆"); |
|
|
|
} |
|
|
|
List<String> vinNoLists = new ArrayList<>(); |
|
|
|
List<String> chooseSidList = loanSecondarySalesVehVoList.stream().map(v -> v.getBusSid()).collect(Collectors.toList()); |
|
|
|
for (int i = 0; i < chooseSidList.size(); i++) { |
|
|
|
String s = chooseSidList.get(i); |
|
|
|
LoanReturnVehLedger loanReturnVehLedger = loanReturnVehLedgerService.fetchBySid(s); |
|
|
|
if (!"未处置".equals(loanReturnVehLedger.getDisposal())) { |
|
|
|
vinNoLists.add(loanReturnVehLedger.getVinNo()); |
|
|
|
} |
|
|
|
} |
|
|
|
vinNoLists.removeAll(Collections.singleton(null)); |
|
|
|
if (!vinNoLists.isEmpty()) { |
|
|
|
return rb.setMsg(String.join(",", vinNoLists) + "车架号处置方式非未处置,不能二次销售"); |
|
|
|
} |
|
|
|
ResultBean<String> resultBean = saveOrUpdateSecondarySales(dto); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
@ -516,6 +533,17 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon |
|
|
|
bv.setBusinessSid(businessSid); |
|
|
|
bv.setUserSid(dto.getUserSid()); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
List<String> orgPathList = Arrays.asList(dto.getOrgPath().split("/")); |
|
|
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(orgPathList.get(orgPathList.size() - 1)).getData(); |
|
|
|
if (sysOrganization == null) { |
|
|
|
return rb.setMsg("当前所在的组织机构不存在"); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(sysOrganization.getManagerSid())) { |
|
|
|
// return rb.setMsg("当前所在的组织机构未设置主管人员");
|
|
|
|
sysOrganization.setManagerSid(ProcDefEnum.DEFAUL_TADMIN_SID.getProDefId()); |
|
|
|
} |
|
|
|
String nextNodeUserSids_ = sysOrganization.getManagerSid(); |
|
|
|
bv.setNextNodeUserSids(nextNodeUserSids_); |
|
|
|
if (r == 1) { |
|
|
|
//ToDo:流程定义id
|
|
|
|
bv.setModelId(ProcDefEnum.LOANSECONDSALEAPPLY.getProDefId()); |
|
|
@ -721,6 +749,7 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon |
|
|
|
loanSecondarySalesVehVo.setModelSid(loanReturnVehLedger.getVehModelSid()); |
|
|
|
loanSecondarySalesVehVo.setConfigSid(loanReturnVehLedger.getConfigSid()); |
|
|
|
loanSecondarySalesVehVo.setBusVinSid(busVinSid); |
|
|
|
loanSecondarySalesVehVo.setBusSid(s); |
|
|
|
loanSecondarySalesVehVo.setVehType(loanReturnVehLedger.getVehType()); |
|
|
|
loanSecondarySalesVehVoList.add(loanSecondarySalesVehVo); |
|
|
|
loanSecondarySalesApplyDetailsVo.setCustomerName(loanReturnVehLedger.getCustomer()); |
|
|
@ -773,6 +802,7 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon |
|
|
|
loanSecondarySalesVehVo.setVehMark(loanReturnVehLedgerT.getVehMark()); |
|
|
|
loanSecondarySalesVehVo.setVinNo(loanReturnVehLedgerT.getVinNo()); |
|
|
|
loanSecondarySalesVehVo.setModelName(loanReturnVehLedgerT.getVehModel()); |
|
|
|
loanSecondarySalesVehVo.setBusSid(s); |
|
|
|
loanSecondarySalesVehVoList.add(loanSecondarySalesVehVo); |
|
|
|
} |
|
|
|
|
|
|
@ -785,6 +815,7 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon |
|
|
|
loanSecondarySalesVehVo.setVehMark(loanReturnVehLedger.getVehMark()); |
|
|
|
loanSecondarySalesVehVo.setVinNo(loanReturnVehLedger.getVinNo()); |
|
|
|
loanSecondarySalesVehVo.setModelName(loanReturnVehLedger.getVehModel()); |
|
|
|
loanSecondarySalesVehVo.setBusSid(s); |
|
|
|
loanSecondarySalesVehVoList.add(loanSecondarySalesVehVo); |
|
|
|
loanSecondarySalesApplyDetailsVo.setCustomerName(loanReturnVehLedger.getCustomer()); |
|
|
|
loanSecondarySalesApplyDetailsVo.setLoanName(loanReturnVehLedger.getBorrowerName()); |
|
|
|