|
|
@ -33,11 +33,10 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder; |
|
|
|
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFile; |
|
|
|
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFileEnum; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.SolutionsDetailsssVo; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesordermodel.BusSalesOrderModel; |
|
|
|
import com.yxt.anrui.buscenter.api.bussolutionschange.*; |
|
|
|
import com.yxt.anrui.buscenter.api.bussolutionschange.app.AppSolutionChangeVo; |
|
|
|
import com.yxt.anrui.buscenter.api.bussolutionschange.app.AppSolutionssChangeDto; |
|
|
|
import com.yxt.anrui.buscenter.api.bussolutionschange.app.AppSubmitSolutionDto; |
|
|
|
import com.yxt.anrui.buscenter.api.bussolutionschange.app.*; |
|
|
|
import com.yxt.anrui.buscenter.api.bussolutionschange.flow.flow.*; |
|
|
|
import com.yxt.anrui.buscenter.biz.buscenterfile.BuscenterFileService; |
|
|
|
import com.yxt.anrui.buscenter.biz.bussalesorder.BusSalesOrderService; |
|
|
@ -60,6 +59,7 @@ 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; |
|
|
|
import com.yxt.anrui.riskcenter.api.loancustomerrecord.app.AppCustomerRecordVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutionsFeign; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.SolutionDetailsDto; |
|
|
@ -214,11 +214,12 @@ public class BusSolutionsChangeService extends MybatisBaseService<BusSolutionsCh |
|
|
|
if (solutions != null) { |
|
|
|
vo.setSolutionsSid(solutions.getSid()); |
|
|
|
} |
|
|
|
ResultBean<SolutionsDetailsVo> solutionsDetailsVoResultBean = loanSolutionsFeign.selectDetailByApplySid(salesOrderSid); |
|
|
|
ResultBean<SolutionsDetailsVo> solutionsDetailsVoResultBean = loanSolutionsFeign.selectDetailss(salesOrderSid); |
|
|
|
if (solutionsDetailsVoResultBean.getData() != null) { |
|
|
|
SolutionsVo solutionsVo = new SolutionsVo(); |
|
|
|
BeanUtil.copyProperties(solutionsDetailsVoResultBean.getData(), solutionsVo); |
|
|
|
vo.setSolutions(solutionsVo); |
|
|
|
SolutionsVo solutionsDetailsssVo = new |
|
|
|
SolutionsVo(); |
|
|
|
BeanUtil.copyProperties(solutionsDetailsVoResultBean.getData(), solutionsDetailsssVo); |
|
|
|
vo.setSolutions(solutionsDetailsssVo); |
|
|
|
} |
|
|
|
//销售订单信息
|
|
|
|
BusSalesOrder salesOrder = busSalesOrderService.fetchBySid(salesOrderSid); |
|
|
@ -284,11 +285,13 @@ public class BusSolutionsChangeService extends MybatisBaseService<BusSolutionsCh |
|
|
|
vo.setOrgPath(busSolutionsChange.getOrgSidPath()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(busSolutionsChange.getSolutionsBusSId())) { |
|
|
|
ResultBean<SolutionsDetailsVo> solutionsDetailsVoResultBean = loanSolutionsFeign.selectDetailByApplySid(busSolutionsChange.getSolutionsBusSId()); |
|
|
|
|
|
|
|
ResultBean<SolutionsDetailsVo> solutionsDetailsVoResultBean = loanSolutionsFeign.selectSolutionsChange(busSolutionsChange.getSolutionsBusSId(),busSolutionsChange.getSalesOrderSid()); |
|
|
|
if (solutionsDetailsVoResultBean.getData() != null) { |
|
|
|
SolutionsVo solutionsVo = new SolutionsVo(); |
|
|
|
BeanUtil.copyProperties(solutionsDetailsVoResultBean.getData(), solutionsVo); |
|
|
|
vo.setSolutions(solutionsVo); |
|
|
|
SolutionsVo solutionsDetailsssVo = new |
|
|
|
SolutionsVo(); |
|
|
|
BeanUtil.copyProperties(solutionsDetailsVoResultBean.getData(), solutionsDetailsssVo); |
|
|
|
vo.setSolutions(solutionsDetailsssVo); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -297,7 +300,13 @@ public class BusSolutionsChangeService extends MybatisBaseService<BusSolutionsCh |
|
|
|
if (!fileList.isEmpty()) { |
|
|
|
List<String> files = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). |
|
|
|
collect(Collectors.toList()); |
|
|
|
vo.setFiles(files); |
|
|
|
List<BusSolutionsChangeFiles> busSolutionsChangeFilesList = new ArrayList<>(); |
|
|
|
for (String file : files) { |
|
|
|
BusSolutionsChangeFiles busSolutionsChangeFiles = new BusSolutionsChangeFiles(); |
|
|
|
busSolutionsChangeFiles.setUrl(file); |
|
|
|
busSolutionsChangeFilesList.add(busSolutionsChangeFiles); |
|
|
|
} |
|
|
|
vo.setFiles(busSolutionsChangeFilesList); |
|
|
|
} |
|
|
|
return rb.success().setData(vo); |
|
|
|
} |
|
|
@ -341,6 +350,15 @@ public class BusSolutionsChangeService extends MybatisBaseService<BusSolutionsCh |
|
|
|
} |
|
|
|
baseMapper.updateById(entity); |
|
|
|
} else { |
|
|
|
if (StringUtils.isNotBlank(dto.getSolutionsSid())) { |
|
|
|
String solutionsSid = dto.getSolutionsSid(); |
|
|
|
BusSolutionsChange busSolutionsChange = baseMapper.selectBySolutionSid(solutionsSid); |
|
|
|
if (null != busSolutionsChange) { |
|
|
|
if (!busSolutionsChange.getNodeState().equals("终止")) { |
|
|
|
return rb.fail().setMsg("请勿重复新增!"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
BusSolutionsChange entity = new BusSolutionsChange(); |
|
|
|
sid = entity.getSid(); |
|
|
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|
|
@ -394,8 +412,12 @@ public class BusSolutionsChangeService extends MybatisBaseService<BusSolutionsCh |
|
|
|
if (StringUtils.isNotBlank(sid)) { |
|
|
|
//删除附件表中关于该linkSid的文件
|
|
|
|
buscenterFileService.deleteByLinkSid(sid); |
|
|
|
List<String> files = dto.getFiles(); |
|
|
|
if (!files.isEmpty()) { |
|
|
|
List<BusSolutionsChangeFiles> filess = dto.getFiles(); |
|
|
|
if (!filess.isEmpty()) { |
|
|
|
List<String> files = new ArrayList<>(); |
|
|
|
for (BusSolutionsChangeFiles file : filess) { |
|
|
|
files.add(file.getUrl()); |
|
|
|
} |
|
|
|
buscenterFileService.saveAll(sid, files, BuscenterFileEnum.JRFABG.getAttachType()); |
|
|
|
} |
|
|
|
} |
|
|
@ -466,9 +488,10 @@ public class BusSolutionsChangeService extends MybatisBaseService<BusSolutionsCh |
|
|
|
String businessSid = ""; |
|
|
|
//新增修改保存
|
|
|
|
ResultBean<String> resultBean = saveSolutions(dto); |
|
|
|
if (resultBean.getSuccess()) { |
|
|
|
businessSid = resultBean.getData(); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
|
} |
|
|
|
businessSid = resultBean.getData(); |
|
|
|
BusSolutionsChange entity = fetchBySid(businessSid); |
|
|
|
String orgSidPath = ""; |
|
|
|
if (StringUtils.isNotBlank(entity.getOrgSidPath())) { |
|
|
@ -1006,8 +1029,9 @@ public class BusSolutionsChangeService extends MybatisBaseService<BusSolutionsCh |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
BusSolutionsChange entity = fetchBySid(sid); |
|
|
|
if (entity != null) { |
|
|
|
vo.setSid(sid); |
|
|
|
if (StringUtils.isNotBlank(entity.getSolutionsBusSId())) { |
|
|
|
SolutionssVo solutionssVo = loanSolutionsFeign.selectDetails2(entity.getSolutionsBusSId()).getData(); |
|
|
|
SolutionssVo solutionssVo = loanSolutionsFeign.selectDetailsChange(entity.getSolutionsBusSId(), entity.getSalesOrderSid()).getData(); |
|
|
|
if (null != solutionssVo) { |
|
|
|
BeanUtil.copyProperties(solutionssVo, vo); |
|
|
|
} |
|
|
@ -1234,4 +1258,38 @@ public class BusSolutionsChangeService extends MybatisBaseService<BusSolutionsCh |
|
|
|
public BusSolutionsChange selectBySolutionSid(String solutionsSid) { |
|
|
|
return baseMapper.selectBySolutionSid(solutionsSid); |
|
|
|
} |
|
|
|
|
|
|
|
public PagerVo<AppSolutionChangeRecordVo> getSolutionsChangeList(PagerQuery<AppSolutionChangeQuery> pq) { |
|
|
|
IPage<AppSolutionChangeRecordVo> page = PagerUtil.queryToPage(pq); |
|
|
|
AppSolutionChangeQuery pagerQuery = pq.getParams(); |
|
|
|
QueryWrapper<BusSolutionsChange> qw = new QueryWrapper<>(); |
|
|
|
//=======================
|
|
|
|
if (StringUtils.isNotBlank(pagerQuery.getName())) { |
|
|
|
// qw.and(wrapper -> wrapper.like("contractId", query.getName()).or().like("customerName", query.getName()));
|
|
|
|
qw.like("customerName", pagerQuery.getName()); |
|
|
|
} |
|
|
|
qw.eq("createBySid", pagerQuery.getUserSid()); |
|
|
|
qw.eq("isDelete", 0); |
|
|
|
qw.orderByDesc("createTime"); |
|
|
|
IPage<AppSolutionChangeRecordVo> pagging = baseMapper.getSolutionsChangeList(page, qw); |
|
|
|
List<AppSolutionChangeRecordVo> records = pagging.getRecords(); |
|
|
|
records.removeAll(Collections.singleton(null)); |
|
|
|
if (!records.isEmpty()) { |
|
|
|
for (AppSolutionChangeRecordVo record : records) { |
|
|
|
record.setShowUpdate(false); |
|
|
|
record.setShowDelete(false); |
|
|
|
if (StringUtils.isNotBlank(record.getApplyName()) && StringUtils.isNotBlank(record.getDept())) { |
|
|
|
record.setPublishAllInfo(record.getDept() + "-" + record.getApplyName()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(record.getState())) { |
|
|
|
if (record.getState().equals("待提交")) { |
|
|
|
record.setShowUpdate(true); |
|
|
|
record.setShowDelete(true); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
PagerVo<AppSolutionChangeRecordVo> p = PagerUtil.pageToVo(pagging, null); |
|
|
|
return p; |
|
|
|
} |
|
|
|
} |