|
@ -24,6 +24,8 @@ import com.yxt.anrui.portal.api.sysuser.SysUserVo; |
|
|
import com.yxt.anrui.riskcenter.api.loanoverduefin.UrlQuery; |
|
|
import com.yxt.anrui.riskcenter.api.loanoverduefin.UrlQuery; |
|
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.*; |
|
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.*; |
|
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.flowable.*; |
|
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.flowable.*; |
|
|
|
|
|
import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTrailer; |
|
|
|
|
|
import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTrailerDto; |
|
|
import com.yxt.anrui.riskcenter.biz.loanreturninboundtrailer.LoanReturnInboundTrailerService; |
|
|
import com.yxt.anrui.riskcenter.biz.loanreturninboundtrailer.LoanReturnInboundTrailerService; |
|
|
import com.yxt.common.base.config.component.FileUploadComponent; |
|
|
import com.yxt.common.base.config.component.FileUploadComponent; |
|
|
import com.yxt.common.base.service.MybatisBaseService; |
|
|
import com.yxt.common.base.service.MybatisBaseService; |
|
@ -39,6 +41,7 @@ import org.apache.tomcat.util.threads.ThreadPoolExecutor; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
import java.util.concurrent.*; |
|
|
import java.util.concurrent.*; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
@ -280,6 +283,20 @@ public class LoanReturnInboundApplyService extends MybatisBaseService<LoanReturn |
|
|
if ("是".equals(dto.getTralier())) { |
|
|
if ("是".equals(dto.getTralier())) { |
|
|
loanReturnInboundTrailerService.saveOrInsert(dto.getLoanReturnInboundTrailer(), loanReturnInboundApply.getSid()); |
|
|
loanReturnInboundTrailerService.saveOrInsert(dto.getLoanReturnInboundTrailer(), loanReturnInboundApply.getSid()); |
|
|
} |
|
|
} |
|
|
|
|
|
if (StringUtils.isNotBlank(dto.getCurrentBeMoney())) { |
|
|
|
|
|
List<String> stringList = Arrays.asList(dto.getCurrentBeMoney().split("/")); |
|
|
|
|
|
if (StringUtils.isNotBlank(stringList.get(0))) { |
|
|
|
|
|
loanReturnInboundApply.setCurrentBeMoney(new BigDecimal(stringList.get(0))); |
|
|
|
|
|
} |
|
|
|
|
|
if (StringUtils.isNotBlank(stringList.get(1))) { |
|
|
|
|
|
loanReturnInboundApply.setWheFundOccMoney(new BigDecimal(stringList.get(1))); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (StringUtils.isNotBlank(dto.getNper())) { |
|
|
|
|
|
List<String> stringList = Arrays.asList(dto.getNper().split("/")); |
|
|
|
|
|
loanReturnInboundApply.setNper(stringList.get(0)); |
|
|
|
|
|
loanReturnInboundApply.setCurrentPeriod(stringList.get(1)); |
|
|
|
|
|
} |
|
|
baseMapper.insert(loanReturnInboundApply); |
|
|
baseMapper.insert(loanReturnInboundApply); |
|
|
sid = loanReturnInboundApply.getSid(); |
|
|
sid = loanReturnInboundApply.getSid(); |
|
|
} else { |
|
|
} else { |
|
@ -303,6 +320,28 @@ public class LoanReturnInboundApplyService extends MybatisBaseService<LoanReturn |
|
|
} else { |
|
|
} else { |
|
|
loanReturnInboundTrailerService.deleteByMainSid(sid); |
|
|
loanReturnInboundTrailerService.deleteByMainSid(sid); |
|
|
} |
|
|
} |
|
|
|
|
|
if (StringUtils.isNotBlank(dto.getCurrentBeMoney())) { |
|
|
|
|
|
List<String> stringList = Arrays.asList(dto.getCurrentBeMoney().split("/")); |
|
|
|
|
|
if (StringUtils.isNotBlank(stringList.get(0))) { |
|
|
|
|
|
loanReturnInboundApply.setCurrentBeMoney(new BigDecimal(stringList.get(0))); |
|
|
|
|
|
} else { |
|
|
|
|
|
loanReturnInboundApply.setCurrentBeMoney(new BigDecimal(0)); |
|
|
|
|
|
} |
|
|
|
|
|
if (StringUtils.isNotBlank(stringList.get(1))) { |
|
|
|
|
|
loanReturnInboundApply.setWheFundOccMoney(new BigDecimal(stringList.get(1))); |
|
|
|
|
|
} else { |
|
|
|
|
|
loanReturnInboundApply.setWheFundOccMoney(new BigDecimal(0)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (StringUtils.isNotBlank(dto.getNper())) { |
|
|
|
|
|
List<String> stringList = Arrays.asList(dto.getNper().split("/")); |
|
|
|
|
|
loanReturnInboundApply.setNper(stringList.get(0)); |
|
|
|
|
|
loanReturnInboundApply.setCurrentPeriod(stringList.get(1)); |
|
|
|
|
|
} else { |
|
|
|
|
|
loanReturnInboundApply.setNper(""); |
|
|
|
|
|
loanReturnInboundApply.setCurrentPeriod(""); |
|
|
|
|
|
} |
|
|
|
|
|
baseMapper.updateById(loanReturnInboundApply); |
|
|
} |
|
|
} |
|
|
return rb.success().setData(sid); |
|
|
return rb.success().setData(sid); |
|
|
} |
|
|
} |
|
@ -346,12 +385,34 @@ public class LoanReturnInboundApplyService extends MybatisBaseService<LoanReturn |
|
|
loanReturnInboundApplyDetailsVo.setCreateByName(userVoResultBean.getData().getName()); |
|
|
loanReturnInboundApplyDetailsVo.setCreateByName(userVoResultBean.getData().getName()); |
|
|
loanReturnInboundApplyDetailsVo.setCreatgeDate(DateUtil.today()); |
|
|
loanReturnInboundApplyDetailsVo.setCreatgeDate(DateUtil.today()); |
|
|
//根据交回车辆事前报备申请sid查询数据
|
|
|
//根据交回车辆事前报备申请sid查询数据
|
|
|
|
|
|
loanReturnInboundApplyDetailsVo = baseMapper.selectSidOne(chooseSid); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {//编辑初始化
|
|
|
} else {//编辑初始化
|
|
|
|
|
|
loanReturnInboundApplyDetailsVo = baseMapper.selectDetails(sid); |
|
|
|
|
|
String files = loanReturnInboundApplyDetailsVo.getFiles(); |
|
|
|
|
|
List<UrlQuery> list = new ArrayList<>(); |
|
|
|
|
|
if (StringUtils.isNotBlank(files)) { |
|
|
|
|
|
List<String> fileList = Arrays.asList(files.split(",")).stream().map(c -> fileUploadComponent.getUrlPrefix() + c).collect(Collectors.toList()); |
|
|
|
|
|
for (int i = 0; i < fileList.size(); i++) { |
|
|
|
|
|
UrlQuery urlQuery = new UrlQuery(); |
|
|
|
|
|
urlQuery.setUrl(fileList.get(i)); |
|
|
|
|
|
list.add(urlQuery); |
|
|
|
|
|
} |
|
|
|
|
|
loanReturnInboundApplyDetailsVo.setFilesList(list); |
|
|
|
|
|
} |
|
|
|
|
|
if ("是".equals(loanReturnInboundApplyDetailsVo.getTralier())) { |
|
|
|
|
|
LoanReturnInboundTrailerDto loanReturnInboundTrailerDto = new LoanReturnInboundTrailerDto(); |
|
|
|
|
|
LoanReturnInboundTrailer loanReturnInboundTrailer = loanReturnInboundTrailerService.selectByMainSid(sid); |
|
|
|
|
|
if (loanReturnInboundTrailer != null) { |
|
|
|
|
|
BeanUtil.copyProperties(loanReturnInboundTrailer, loanReturnInboundTrailerDto); |
|
|
|
|
|
} |
|
|
|
|
|
loanReturnInboundApplyDetailsVo.setLoanReturnInboundTrailer(loanReturnInboundTrailerDto); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
return null; |
|
|
return rb.success().setData(loanReturnInboundApplyDetailsVo); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public ResultBean delAllBySids(String[] sids) { |
|
|
public ResultBean delAllBySids(String[] sids) { |
|
|