保后管理

master
shijie 4 years ago
parent 98ee7624de
commit 9ef519a95a
  1. 74
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlInsuranceListController.java
  2. 116
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java
  3. 22
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java
  4. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlInsuranceListMapper.java
  5. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java
  6. 115
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/AlRepaymentEntryReq.java
  7. 118
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlInsuranceListRes.java
  8. 12
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlInsuranceListService.java
  9. 19
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java
  10. 54
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java
  11. 81
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java
  12. 13
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlInsuranceListMapper.xml
  13. 10
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml
  14. 2
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/enums/OperationUnit.java
  15. 6
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java
  16. 6
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java
  17. 2
      dq-financial-hrms-auth/src/main/resources/mapper/hrauth/UserLoginMapper.xml
  18. 19
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlInsuranceList.java
  19. 21
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlRepaymentEntry.java

@ -1,9 +1,21 @@
package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.daqing.financial.guarantee.model.response.AlInsuranceListRes;
import com.daqing.financial.guarantee.service.IAlInsuranceListService;
import com.daqing.financial.hrauth.annotation.Log;
import com.daqing.financial.hrauth.enums.OperationType;
import com.daqing.financial.hrauth.enums.OperationUnit;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
@ -13,8 +25,66 @@ import org.springframework.web.bind.annotation.RestController;
* @author Qyq
* @since 2021-03-17
*/
@Api(tags = {"保后管理"})
@RestController
@RequestMapping("/al-insurance-list")
public class AlInsuranceListController {
@Autowired
private IAlInsuranceListService alInsuranceListService;
/**
* 保后管理列表
* @param
* @return
*/
@Log(detail = "保后管理列表",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/insuranceList")
@ApiOperation(value = "保后管理列表")
public ResponseResult insuranceList(@RequestParam(value="page",required=false) Integer page, @RequestParam(value="size",required=false) Integer size,
@RequestParam(value = "CustomerNumberOrName", required = false) String CustomerNumberOrName){
PageUtils data = alInsuranceListService.queryPage(page, size, CustomerNumberOrName);
return new ResponseResult<PageUtils>().SUCCESS(data);
}
/**
* 担保详细
* @param id
* @return
*/
@Log(detail = "担保详细",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/insuranceDetail")
@ApiOperation(value = "担保详细")
public ResponseResult insuranceDetail(Integer id){
AlInsuranceListRes response = alInsuranceListService.insuranceDetail(id);
return ResponseResult.SUCCESS(response);
}
/**
* 导出
*/
@Log(detail = "导出保后管理列表",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/excelExport")
@ApiOperation(value = "导出保后管理列表")
public ResponseResult excelExport(@RequestParam("ids") List<String> ids, HttpServletResponse response) {
Boolean result = alInsuranceListService.excelExport(ids,response);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 办理结项
* @param id
* @return
*/
@Log(detail = "办理结项",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.UPDATE)
@GetMapping("/updateStatus")
@ApiOperation(value = "办理结项")
public ResponseResult updateStatus(@RequestParam("id") Integer id){
int result = alInsuranceListService.updateStatus(id);
return result>0 ? ResponseResult.SUCCESS("编辑成功!"):ResponseResult.FAIL(60007,"编辑失败!");
}
}

@ -1,9 +1,23 @@
package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.daqing.financial.guarantee.model.request.AlRepaymentEntryReq;
import com.daqing.financial.guarantee.service.IAlRepaymentEntryService;
import com.daqing.financial.hrauth.annotation.Log;
import com.daqing.financial.hrauth.enums.OperationType;
import com.daqing.financial.hrauth.enums.OperationUnit;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
/**
* <p>
@ -13,8 +27,106 @@ import org.springframework.web.bind.annotation.RestController;
* @author Qyq
* @since 2021-03-17
*/
@Api(tags = {"还款记录"})
@RestController
@RequestMapping("/al-repayment-entry")
public class AlRepaymentEntryController {
@Autowired
private IAlRepaymentEntryService alRepaymentEntryService;
/**
* 还款录入
* @param alRepaymentEntryReq
* @return
*/
@Log(detail = "还款录入",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.INSERT)
@PostMapping("/repaymentEntry")
@ApiOperation(value = "还款录入")
public ResponseResult repaymentEntry(@RequestBody @Valid AlRepaymentEntryReq alRepaymentEntryReq){
int result = alRepaymentEntryService.repaymentEntry(alRepaymentEntryReq);
return result>0 ? ResponseResult.SUCCESS("录入成功"):ResponseResult.FAIL(60006,"录入失败");
}
/**
* 还款详细
* @param id
* @return
*/
@Log(detail = "还款详细",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/repaymentDetail")
@ApiOperation(value = "还款详细")
public ResponseResult repaymentDetail(Integer id){
AlRepaymentEntry response = alRepaymentEntryService.repaymentDetail(id);
return ResponseResult.SUCCESS(response);
}
/**
* 还款记录列表
* @param
* @return
*/
@Log(detail = "还款记录列表",level = 3,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/repaymentList")
@ApiOperation(value = "还款记录列表")
public ResponseResult repaymentList(@RequestParam(value="page",required=false) Integer page, @RequestParam(value="size",required=false) Integer size,
@RequestParam(value = "CustomerNumberOrName", required = false) String CustomerNumberOrName, @RequestParam(value="status",required=false) Integer status){
PageUtils data = alRepaymentEntryService.queryPage(page, size, CustomerNumberOrName,status);
return new ResponseResult<PageUtils>().SUCCESS(data);
}
/**
* 编辑还款信息
* @param alRepaymentEntryReq
* @return
*/
@Log(detail = "编辑还款信息",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.UPDATE)
@PostMapping("/updateRepayment")
@ApiOperation(value = "编辑还款信息")
public ResponseResult updateRepayment(@RequestBody @Valid AlRepaymentEntryReq alRepaymentEntryReq){
int result = alRepaymentEntryService.updateRepayment(alRepaymentEntryReq);
return result>0 ? ResponseResult.SUCCESS("编辑成功!"):ResponseResult.FAIL(60007,"编辑失败!");
}
/**
* 批量删除还款信息
* @param ids
* @return
*/
@Log(detail = "批量删除还款信息",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.DELETE)
@PostMapping("/delRepayment")
@ApiOperation(value = "批量删除还款信息")
public ResponseResult delRepayment(@RequestBody List<Integer> ids){
int result = alRepaymentEntryService.delRepayment(ids);
return result>0 ? ResponseResult.SUCCESS("删除成功!"):ResponseResult.FAIL(60008,"删除失败!");
}
/**
* 导出
*/
@Log(detail = "导出还款记录列表",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/excelExport")
@ApiOperation(value = "导出还款记录列表")
public ResponseResult excelExport(@RequestParam("ids") List<String> ids, HttpServletResponse response) {
Boolean result = alRepaymentEntryService.excelExport(ids,response);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 还款统计
* @param
* @return
*/
@Log(detail = "还款统计",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/repaymentStatistics")
@ApiOperation(value = "还款统计")
public ResponseResult repaymentStatistics(){
Map map = alRepaymentEntryService.repaymentStatistics();
return ResponseResult.SUCCESS(map);
}
}

@ -226,7 +226,7 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
* @param id
* @return
*/
@Log(detail = "业务申请列表",level = 3,operationUnit = OperationUnit.APPLYAMOUNTINFO,operationType = OperationType.SELECT)
@Log(detail = "业务申请详情",level = 3,operationUnit = OperationUnit.APPLYAMOUNTINFO,operationType = OperationType.SELECT)
@GetMapping("/businessApplicationDetail")
@ApiOperation(value = "根据业务id查询业务申请详情")
public ResponseResult businessApplicationDetail(Integer id){
@ -331,6 +331,26 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
return claims.getIssuer();
}
/**
* 获取当前登录用户名称
*/
public static Map getUserIdAndName() {
Map<String,String> map = new HashMap<String,String>();
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String token = request.getHeader("token");
Claims claims = null;
try {
claims = JwtUtils.parseJWT(token);
} catch (Exception e) {
e.printStackTrace();
}
String userId = RedisUtil.get("dq:token:"+token);
map.put("name", claims.getIssuer());
map.put("userId",userId);
return map;
}
/**
* 获取业务申请所有字段

@ -1,6 +1,9 @@
package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.model.response.AlInsuranceListRes;
import com.daqing.framework.domain.guarantee.AlInsuranceList;
import org.apache.ibatis.annotations.Mapper;
@ -15,4 +18,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface AlInsuranceListMapper extends BaseMapper<AlInsuranceList> {
IPage<AlInsuranceListRes> pageByCondition(Page page, String customerNumberOrName);
}

@ -1,6 +1,8 @@
package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
import org.apache.ibatis.annotations.Mapper;
@ -15,4 +17,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface AlRepaymentEntryMapper extends BaseMapper<AlRepaymentEntry> {
IPage<AlRepaymentEntry> pageByCondition(Page page, String customerNumberOrName, Integer status);
}

@ -0,0 +1,115 @@
package com.daqing.financial.guarantee.model.request;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* <p>
* 还款记录表
* </p>
*
* @author Qyq
* @since 2021-03-17
*/
@Data
@TableName("al_repayment_entry")
public class AlRepaymentEntryReq implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 保后外键id
*/
@ApiModelProperty(value = "保后外键id")
private Integer insuranceId;
/**
* 应还款日
*/
@NotNull(message = "应还款日不能为空")
@ApiModelProperty(value = "应还款日")
private Date repaymentDate;
/**
* 实际还款日
*/
@ApiModelProperty(value = "实际还款日")
private Date actualRepaymentDate;
/**
* 逾期天数
*/
@ApiModelProperty(value = "逾期天数")
private Integer overdueDays;
/**
* 还款总额
*/
@ApiModelProperty(value = "还款总额(元)")
private BigDecimal totalRepayment;
/**
* 本次还款
*/
@NotNull(message = "本次还款不能为空")
@ApiModelProperty(value = "本次还款(元)")
private BigDecimal currentRepayment;
/**
* 利息
*/
@NotNull(message = "利息不能为空")
@ApiModelProperty(value = "利息(元)")
private BigDecimal interest;
/**
* 其他费用
*/
@ApiModelProperty(value = "其他费用(元)")
private BigDecimal otherExpenses;
/**
* 减免金额
*/
@ApiModelProperty(value = "减免金额(元)")
private BigDecimal deductionAmount;
/**
* 还款备注
*/
@ApiModelProperty(value = "还款备注")
private String repaymentNotes;
/**
* 还款状态1->待还款2->已还款3->已逾期4->未到期
*/
/* @ApiModelProperty(value = "还款状态:1->待还款;2->已还款;3->已逾期;4->未到期;")
private Integer repaymentStatus;*/
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
@TableField(fill= FieldFill.INSERT)
private Date createTime;
/**
* 修改时间
*/
@ApiModelProperty(value = "修改时间")
@TableField(fill= FieldFill.INSERT_UPDATE)
private Date updateTime;
}

@ -0,0 +1,118 @@
package com.daqing.financial.guarantee.model.response;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* <p>
* 保后管理列表
* </p>
*
* @author Qyq
* @since 2021-03-17
*/
@Data
@ToString
public class AlInsuranceListRes implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@ApiModelProperty(value = "企业id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 业务编号
*/
@ApiModelProperty(value = "业务编号")
private String businessCode;
/**
* 客户名称
*/
@ApiModelProperty(value = "客户名称")
private String customerName;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话")
private String phone;
/**
* 业务类别
*/
@ApiModelProperty(value = "业务类别")
private String businessType;
/**
* 担保额度
*/
@ApiModelProperty(value = "担保额度(元)")
private BigDecimal guaranteeAmount;
/**
* 担保期限
*/
@ApiModelProperty(value = "担保期限")
private String guaranteeTime;
/**
* 申请日期
*/
@ApiModelProperty(value = "申请日期")
private Date applyTime;
/**
* 还款额度
*/
@ApiModelProperty(value = "还款额度(元)")
private BigDecimal repaymentAmount;
/**
* 剩余额度
*/
@ApiModelProperty(value = "剩余额度(元)")
private BigDecimal remainAmount;
/**
* 还款期数
*/
@ApiModelProperty(value = "还款期数")
private String repaymentTime;
/**
* 所属部门
*/
@ApiModelProperty(value = "所属部门")
private String department;
/**
* 还款状态1->还款中2->已逾期3->已还清4->已结项
*/
@ApiModelProperty(value = "还款状态:1->还款中;2->已逾期;3->已还清;4->已结项;")
private Integer paymentStatus;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 修改时间
*/
@ApiModelProperty(value = "修改时间")
private Date updateTime;
}

@ -2,7 +2,12 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.response.AlInsuranceListRes;
import com.daqing.framework.domain.guarantee.AlInsuranceList;
import com.daqing.framework.utils.PageUtils;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* <p>
@ -14,4 +19,11 @@ import com.daqing.framework.domain.guarantee.AlInsuranceList;
*/
public interface IAlInsuranceListService extends IService<AlInsuranceList> {
PageUtils queryPage(Integer page, Integer size, String customerNumberOrName);
AlInsuranceListRes insuranceDetail(Integer id);
Boolean excelExport(List<String> ids, HttpServletResponse response);
int updateStatus(Integer id);
}

@ -2,7 +2,13 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.AlRepaymentEntryReq;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
import com.daqing.framework.utils.PageUtils;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* <p>
@ -14,4 +20,17 @@ import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
*/
public interface IAlRepaymentEntryService extends IService<AlRepaymentEntry> {
int repaymentEntry(AlRepaymentEntryReq alRepaymentEntryReq);
AlRepaymentEntry repaymentDetail(Integer id);
PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, Integer status);
int updateRepayment(AlRepaymentEntryReq alRepaymentEntryReq);
int delRepayment(List<Integer> ids);
Boolean excelExport(List<String> ids, HttpServletResponse response);
Map repaymentStatistics();
}

@ -1,11 +1,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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.mapper.AlInsuranceListMapper;
import com.daqing.financial.guarantee.model.response.AlInsuranceListRes;
import com.daqing.financial.guarantee.service.IAlInsuranceListService;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.AlInsuranceList;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.ExcelUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* <p>
* 保后管理列表 服务实现类
@ -17,4 +30,45 @@ import org.springframework.stereotype.Service;
@Service
public class AlInsuranceListServiceImpl extends ServiceImpl<AlInsuranceListMapper, AlInsuranceList> implements IAlInsuranceListService {
@Override
public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName) {
//分页参数
if (page <= 0) {
page = 1;
}
if (size <= 0) {
size = 10;
}
IPage<AlInsuranceListRes> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName);
return new PageUtils(positionVO);
}
@Override
public AlInsuranceListRes insuranceDetail(Integer id) {
AlInsuranceList alInsuranceList = this.baseMapper.selectById(id);
AlInsuranceListRes res = new AlInsuranceListRes();
BeanUtils.copyProperties(alInsuranceList,res);
return res;
}
@Override
public Boolean excelExport(List<String> ids, HttpServletResponse response) {
List<AlInsuranceList>alInsuranceList = this.baseMapper.selectBatchIds(ids);
try {
ExcelUtil.writeExcelWithSheets(response, alInsuranceList, "还款记录一览表", "repaymentEntry", new AlInsuranceList())
.finish();
return true;
} catch (Exception e) {
ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORT_EXSIT);
return false;
}
}
@Override
public int updateStatus(Integer id) {
AlInsuranceList alInsuranceList = new AlInsuranceList();
alInsuranceList.setPaymentStatus(4);//已结项
return this.baseMapper.update(alInsuranceList,new QueryWrapper<AlInsuranceList>().eq("id",id));
}
}

@ -1,11 +1,24 @@
package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
import com.daqing.financial.guarantee.mapper.AlRepaymentEntryMapper;
import com.daqing.financial.guarantee.model.request.AlRepaymentEntryReq;
import com.daqing.financial.guarantee.service.IAlRepaymentEntryService;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.AlRepaymentEntry;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.ExcelUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* <p>
* 还款记录表 服务实现类
@ -17,4 +30,72 @@ import org.springframework.stereotype.Service;
@Service
public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMapper, AlRepaymentEntry> implements IAlRepaymentEntryService {
@Override
public int repaymentEntry(AlRepaymentEntryReq alRepaymentEntryReq) {
AlRepaymentEntry alRepaymentEntry = new AlRepaymentEntry();
BeanUtils.copyProperties(alRepaymentEntryReq,alRepaymentEntry);
Map map = DgApplyAmountInfoController.getUserIdAndName();
String name = map.get("name").toString();
Integer userId = Integer.parseInt(map.get("userId").toString());
alRepaymentEntry.setSubmitterId(userId);
alRepaymentEntry.setSubmitterName(name);
return this.baseMapper.insert(alRepaymentEntry);
}
@Override
public AlRepaymentEntry repaymentDetail(Integer id) {
AlRepaymentEntry alRepaymentEntry = this.baseMapper.selectById(id);
return alRepaymentEntry;
}
@Override
public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, Integer status) {
//分页参数
if (page <= 0) {
page = 1;
}
if (size <= 0) {
size = 10;
}
IPage<AlRepaymentEntry> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,status);
return new PageUtils(positionVO);
}
@Override
public int updateRepayment(AlRepaymentEntryReq alRepaymentEntryReq) {
AlRepaymentEntry entry = new AlRepaymentEntry();
BeanUtils.copyProperties(alRepaymentEntryReq,entry);
Map map = DgApplyAmountInfoController.getUserIdAndName();
String name = map.get("name").toString();
Integer userId = Integer.parseInt(map.get("userId").toString());
entry.setSubmitterId(userId);
entry.setSubmitterName(name);
return this.baseMapper.updateById(entry);
}
@Override
public int delRepayment(List<Integer> ids) {
return this.baseMapper.deleteBatchIds(ids);
}
@Override
public Boolean excelExport(List<String> ids, HttpServletResponse response) {
List<AlRepaymentEntry>repaymentList = this.baseMapper.selectBatchIds(ids);
try {
ExcelUtil.writeExcelWithSheets(response, repaymentList, "还款记录一览表", "repaymentEntry", new AlRepaymentEntry())
.finish();
return true;
} catch (Exception e) {
ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORT_EXSIT);
return false;
}
}
@Override
public Map repaymentStatistics() {
return null;
}
}

@ -12,6 +12,8 @@
<result column="guarantee_amount" property="guaranteeAmount" />
<result column="guarantee_time" property="guaranteeTime" />
<result column="apply_time" property="applyTime" />
<result column="bank" property="bank" />
<result column="amount_wide" property="amountWide" />
<result column="repayment_amount" property="repaymentAmount" />
<result column="remain_amount" property="remainAmount" />
<result column="repayment_time" property="repaymentTime" />
@ -21,4 +23,15 @@
<result column="update_time" property="updateTime" />
</resultMap>
<select id="pageByCondition" resultType="com.daqing.financial.guarantee.model.response.AlInsuranceListRes">
select * from al_insurance_list
<where>
<if test="customerNumberOrName != null and customerNumberOrName != ''">
(business_code LIKE CONCAT('%',#{customerNumberOrName},'%') OR customer_name LIKE CONCAT('%',#{customerNumberOrName},'%'))
</if>
</where>
order by create_time desc
</select>
</mapper>

@ -20,4 +20,14 @@
<result column="update_time" property="updateTime" />
</resultMap>
<select id="pageByCondition" resultType="com.daqing.framework.domain.guarantee.AlRepaymentEntry">
select * from al_repayment_entry
<where>
<if test="status != null">
repayment_status = #{status}
</if>
</where>
order by create_time desc
</select>
</mapper>

@ -25,6 +25,8 @@ public enum OperationUnit {
EMPLOYEE("员工信息"),
COMPANY("企业信息"),
SYSLOG("日志管理"),
INSURANCE("保后管理"),
COLLECTION("催收管理"),
USER("user"),
LOG("log"),
PERMISSION("permission"),

@ -391,13 +391,15 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
loginRequest.setWechatId(md5UnionId);
loginRequest.setType(2);
loginRequest.setTenDayEffective(2);
//查询员工数据
int count2 = userLoginDao.selectUserEmpCount(md5UnionId);
if(identify==0){//员工小程序登录
if(count<=0){
if(count<=0 || count2<=0){//如果微信绑定的不是员工
return ResponseResult.FAIL(60001,"您的账号没有权限,无法登录!");
}
}else{//客户小程序登录
//如果员工使用客户小程序登录的情况,关联用户表和员工表查询,如果有数据则代表是员工的数据
int count2 = userLoginDao.selectUserEmpCount(md5UnionId);
if(count2>0 || count <=0){//代表员工或者新用户
UserEntity userEntity = new UserEntity();
userEntity.setAccount(userMap.get("nickName").toString());//账号默认为微信名称

@ -87,6 +87,12 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple
userInfo.getCurrentUserInfo().setToken(data.getToken());
new UsernamePasswordAuthenticationToken(userInfo, null, userInfo.getAuthorities());*/
return dbUser;
}else if(dbUser.getPhoneAccount()==null){
try {
response.sendRedirect("https://www.huorantech.cn/index");
} catch (IOException e) {
e.printStackTrace();
}
}
if(dbUser == null){//openId不存在,返回绑定手机号页面,须另写绑定手机号接口

@ -75,7 +75,7 @@
</update>
<select id="selectUserEmpCount" parameterType="string" resultType="integer">
SELECT COUNT(0) FROM hrms_user hu LEFT JOIN hrms_employee he ON he.user_id=hu.id WHERE hu.wechat_id = #{md5UnionId}
SELECT COUNT(0) FROM hrms_user hu INNER JOIN hrms_employee he ON he.user_id=hu.id WHERE hu.wechat_id = #{md5UnionId}
</select>
</mapper>

@ -1,8 +1,7 @@
package com.daqing.framework.domain.guarantee;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.alibaba.excel.metadata.BaseRowModel;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.io.Serializable;
@ -19,7 +18,7 @@ import java.util.Date;
*/
@Data
@TableName("al_insurance_list")
public class AlInsuranceList implements Serializable {
public class AlInsuranceList extends BaseRowModel implements Serializable {
private static final long serialVersionUID = 1L;
@ -64,6 +63,16 @@ public class AlInsuranceList implements Serializable {
*/
private Date applyTime;
/**
* 贷款银行
*/
private String bank;
/**
* 贷款用途
*/
private String amountWide;
/**
* 还款额度
*/
@ -92,10 +101,12 @@ public class AlInsuranceList implements Serializable {
/**
* 创建时间
*/
@TableField(fill= FieldFill.INSERT)
private Date createTime;
/**
* 修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
}

@ -1,8 +1,7 @@
package com.daqing.framework.domain.guarantee;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.alibaba.excel.metadata.BaseRowModel;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.io.Serializable;
@ -19,7 +18,7 @@ import java.util.Date;
*/
@Data
@TableName("al_repayment_entry")
public class AlRepaymentEntry implements Serializable {
public class AlRepaymentEntry extends BaseRowModel implements Serializable {
private static final long serialVersionUID = 1L;
@ -47,7 +46,7 @@ public class AlRepaymentEntry implements Serializable {
/**
* 逾期天数
*/
private String overdueDays;
private Integer overdueDays;
/**
* 还款总额
@ -84,13 +83,25 @@ public class AlRepaymentEntry implements Serializable {
*/
private Integer repaymentStatus;
/**
* 提交人id
*/
private Integer submitterId;
/**
* 提交人名称
*/
private String submitterName;
/**
* 创建时间
*/
@TableField(fill= FieldFill.INSERT)
private Date createTime;
/**
* 修改时间
*/
@TableField(fill= FieldFill.INSERT_UPDATE)
private Date updateTime;
}

Loading…
Cancel
Save