更新代码

master
chen 4 years ago
parent 5f88f615ea
commit 2e48e77237
  1. 1
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java
  2. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java
  3. 17
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java
  4. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java

@ -38,5 +38,4 @@ public class DgAuditProcessController {
return ResponseResult.SUCCESS();
}
}

@ -20,7 +20,7 @@ import java.util.List;
@Mapper
public interface DgLoanNoticeMapper extends BaseMapper<DgLoanNotice> {
IPage<LoanNoticeListResponse> pageByCondition(Page page, String roleIds, Integer userId, Integer status, String customerNumberOrName);
IPage<LoanNoticeListResponse> pageByCondition(Page page, List<String> roleIdList, Integer userId, Integer status, String customerNumberOrName);
List<LoanNoticeListResponse> selectBatchData(List<String> ids);
}

@ -3,6 +3,7 @@ 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;
@ -12,6 +13,7 @@ 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;
@ -47,6 +49,8 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL
@Autowired
private DgPaymentConfirmationConsiderMapper paymentConfirmationConsiderMapper;
@Autowired
private DgBusinessProcessStatusMapper businessProcessStatusMapper;
/**
* 获取当前登录用户信息
*/
@ -74,7 +78,7 @@ 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);
}
@ -105,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;
}
}

@ -26,12 +26,13 @@ public class AuditProcessUtil{
auditProcessUtil.auditProcessMapper = this.auditProcessMapper;
}
public static void save(Integer businessId, String approver, String deptName, String auditOpinion) {
public static boolean save(Integer businessId, String approver, String deptName, String auditOpinion) {
DgAuditProcess auditProcess = new DgAuditProcess();
auditProcess.setApprover(approver);
auditProcess.setAuditOpinion(auditOpinion);
auditProcess.setBusinessId(businessId);
auditProcess.setDeptName(deptName);
auditProcessUtil.auditProcessMapper.insert(auditProcess);
int insert = auditProcessUtil.auditProcessMapper.insert(auditProcess);
return insert > 0;
}
}

Loading…
Cancel
Save