|
|
|
@ -3,20 +3,24 @@ package com.daqing.financial.guarantee.service.impl; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
|
import com.daqing.financial.guarantee.mapper.DgBusinessProcessStatusMapper; |
|
|
|
|
import com.daqing.financial.guarantee.mapper.DgLoanNoticeMapper; |
|
|
|
|
import com.daqing.financial.guarantee.mapper.DgPaymentConfirmationConsiderMapper; |
|
|
|
|
import com.daqing.financial.guarantee.model.request.LoanNoticeQueryRequest; |
|
|
|
|
import com.daqing.financial.guarantee.model.request.LoanNoticeUpdateRequest; |
|
|
|
|
import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse; |
|
|
|
|
import com.daqing.financial.guarantee.model.response.LoanNoticeListResponse; |
|
|
|
|
import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse; |
|
|
|
|
import com.daqing.financial.guarantee.service.IDgLoanNoticeService; |
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
|
import com.daqing.framework.domain.guarantee.DgBusinessProcessStatus; |
|
|
|
|
import com.daqing.framework.domain.guarantee.DgLoanNotice; |
|
|
|
|
import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider; |
|
|
|
|
import com.daqing.framework.model.StatusCode; |
|
|
|
|
import com.daqing.framework.model.response.PromptSuccess; |
|
|
|
|
import com.daqing.framework.util.RedisUtil; |
|
|
|
|
import com.daqing.framework.utils.PageUtils; |
|
|
|
|
import com.daqing.framework.utils.excel.EasyExcelUtil; |
|
|
|
|
import jdk.nashorn.internal.ir.IfNode; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@ -25,6 +29,8 @@ import org.springframework.web.context.request.RequestContextHolder; |
|
|
|
|
import org.springframework.web.context.request.ServletRequestAttributes; |
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
@ -43,6 +49,8 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL |
|
|
|
|
@Autowired |
|
|
|
|
private DgPaymentConfirmationConsiderMapper paymentConfirmationConsiderMapper; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private DgBusinessProcessStatusMapper businessProcessStatusMapper; |
|
|
|
|
/** |
|
|
|
|
* 获取当前登录用户信息 |
|
|
|
|
*/ |
|
|
|
@ -70,11 +78,17 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL |
|
|
|
|
String[] ids = roleIds.split(","); |
|
|
|
|
List<String> roleIdList = Arrays.asList(ids); |
|
|
|
|
//分页条件查询
|
|
|
|
|
loanNoticeVO = baseMapper.pageByCondition(new Page(page,size),roleIds,userId,status,customerNumberOrName); |
|
|
|
|
loanNoticeVO = baseMapper.pageByCondition(new Page(page,size),roleIdList,userId,status,customerNumberOrName); |
|
|
|
|
} |
|
|
|
|
return new PageUtils(loanNoticeVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void batchExport(HttpServletResponse response, List<String> ids) throws IOException { |
|
|
|
|
List<LoanNoticeListResponse> excelDataList = baseMapper.selectBatchData(ids); |
|
|
|
|
EasyExcelUtil.download(response,LoanNoticeListResponse.class,excelDataList,"LoanNoticeList","第一页"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean updateLoanNotice(LoanNoticeUpdateRequest loanNoticeUpdateRequest) { |
|
|
|
|
// TODO 所有操作待添加业务流程数据
|
|
|
|
@ -95,9 +109,16 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL |
|
|
|
|
loanNotice.setStatus(StatusCode.SP_REVIEWED); |
|
|
|
|
loanNotice.setOperatingStatus(StatusCode.CZ_PROCESSED); |
|
|
|
|
int update = baseMapper.updateById(loanNotice); |
|
|
|
|
//TODO 更新成功更新业务流程已完成
|
|
|
|
|
//更新成功更新业务流程已完成
|
|
|
|
|
if (update > 0){ |
|
|
|
|
return update > 0; |
|
|
|
|
QueryWrapper<DgBusinessProcessStatus> businessProcessStatusQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
businessProcessStatusQueryWrapper.eq("business_id",businessId); |
|
|
|
|
DgBusinessProcessStatus dgBusinessProcessStatus = businessProcessStatusMapper.selectOne(businessProcessStatusQueryWrapper); |
|
|
|
|
dgBusinessProcessStatus.setBusinessStatus(StatusCode.YW_COMPLETED); |
|
|
|
|
int updateById = businessProcessStatusMapper.updateById(dgBusinessProcessStatus); |
|
|
|
|
//更新成功,返回操作结果
|
|
|
|
|
log.info(updateById > 0 ? "业务流程已完成" : "业务流程已完成更新失败"); |
|
|
|
|
return updateById > 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|