From 9f4c7473615a365986c1136a378e8ce26d5382fb Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Mon, 22 Mar 2021 16:45:53 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=A4=84=E7=90=86=E4=BF=9D=E5=90=8E=E7=AE=A1=E7=90=86=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmsCompanyPersonalController.java | 38 ++++---- .../model/request/CompanyCustomerRequest.java | 2 + .../controller/AlInsuranceListController.java | 13 +++ .../AlRepaymentEntryController.java | 12 +++ .../mapper/AlRepaymentEntryMapper.java | 8 ++ .../model/response/AlRepaymentCountRes.java | 67 ++++++++++++++ .../model/response/AlRepaymentEntryRes.java | 68 ++++++++++++++ .../service/IAlInsuranceListService.java | 2 + .../service/IAlRepaymentEntryService.java | 2 + .../impl/AlInsuranceListServiceImpl.java | 35 ++++++++ .../impl/AlRepaymentEntryServiceImpl.java | 58 ++++++++++++ .../guarantee/AlRepaymentEntryMapper.xml | 17 ++++ .../src/main/resources/bootstrap.properties | 88 +++++++++---------- .../domain/crms/CrmsCompanyPersonal.java | 2 +- .../domain/guarantee/AlInsuranceList.java | 2 +- 15 files changed, 349 insertions(+), 65 deletions(-) create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentCountRes.java create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentEntryRes.java diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java index b930b0da..f3689f1c 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java @@ -59,16 +59,16 @@ public class CrmsCompanyPersonalController { @PostMapping("/insertCompanyPersonal") @ApiOperation(value = "新增个人/企业关联人") public ResponseResult insertCompanyPersonal(@RequestBody @Valid CrmsCompanyPersonal crmsCompanyPersonal) { - SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); - String format = sdf.format(crmsCompanyPersonal.getRegisteredTime()); - Date parse = null; - try { - parse = sdf.parse(format); - } catch (ParseException e) { - e.printStackTrace(); - } - - crmsCompanyPersonal.setRegisteredTime(parse); +// SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); +// String format = sdf.format(crmsCompanyPersonal.getRegisteredTime()); +// Date parse = null; +// try { +// parse = sdf.parse(format); +// } catch (ParseException e) { +// e.printStackTrace(); +// } +// +// crmsCompanyPersonal.setRegisteredTime(parse); boolean result = crmsCompanyPersonalService.save(crmsCompanyPersonal); CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated(); crmsCustomerRelated.setRelatedId(crmsCompanyPersonal.getId().intValue());//关联人Id @@ -94,15 +94,15 @@ public class CrmsCompanyPersonalController { @PostMapping("/updateCompanyPersonal") @ApiOperation(value = "编辑个人/企业关联人") public ResponseResult updateCompanyPersonal(@RequestBody CrmsCompanyPersonal crmsCompanyPersonal){ - SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); - String format = sdf.format(crmsCompanyPersonal.getRegisteredTime()); - Date parse = null; - try { - parse = sdf.parse(format); - } catch (ParseException e) { - e.printStackTrace(); - } - crmsCompanyPersonal.setRegisteredTime(parse); +// SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); +// String format = sdf.format(crmsCompanyPersonal.getRegisteredTime()); +// Date parse = null; +// try { +// parse = sdf.parse(format); +// } catch (ParseException e) { +// e.printStackTrace(); +// } +// crmsCompanyPersonal.setRegisteredTime(parse); boolean result = crmsCompanyPersonalService.updateById(crmsCompanyPersonal); return result ? ResponseResult.SUCCESS(crmsCompanyPersonal) : ResponseResult.FAIL(); } diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java index b157596e..a169e6ca 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java @@ -2,6 +2,7 @@ package com.daqing.financial.crms.model.request; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.ToString; @@ -45,6 +46,7 @@ public class CompanyCustomerRequest implements Serializable { @ApiModelProperty(value = "联系电话") private String phone; + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @ApiModelProperty(value = "注册时间") private Date registerTime; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlInsuranceListController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlInsuranceListController.java index c41e66f0..aa94703d 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlInsuranceListController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlInsuranceListController.java @@ -6,11 +6,13 @@ 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.financial.hrauth.model.HrmsAccessRecordsLog; 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.scheduling.annotation.Scheduled; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; @@ -87,4 +89,15 @@ public class AlInsuranceListController { return result>0 ? ResponseResult.SUCCESS("编辑成功!"):ResponseResult.FAIL(60007,"编辑失败!"); } + /** + * 定时任务处理保后管理内容 每隔五秒执行一次 + * @param + * @return + */ + @Scheduled(cron ="*/5 * * * * ?") + @GetMapping("/updateInsuranceList") + public void updateInsuranceList() { + int result = alInsuranceListService.updateInsuranceList(); + } + } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java index 53330e4b..e0cb1387 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java @@ -12,6 +12,7 @@ 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.scheduling.annotation.Scheduled; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; @@ -129,4 +130,15 @@ public class AlRepaymentEntryController { return ResponseResult.SUCCESS(map); } + /** + * 定时任务处理还款记录内容 + * @param + * @return + */ + @Scheduled(cron ="*/5 * * * * ?") + @GetMapping("/updateRepaymentEntry") + public void updateRepaymentEntry() { + int result = alRepaymentEntryService.updateRepaymentEntry(); + } + } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java index d854b895..34fd29a8 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java @@ -3,6 +3,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.financial.guarantee.model.response.AlRepaymentCountRes; +import com.daqing.financial.guarantee.model.response.AlRepaymentEntryRes; import com.daqing.financial.guarantee.model.response.AlRepaymentRes; import com.daqing.framework.domain.guarantee.AlRepaymentEntry; import org.apache.ibatis.annotations.Mapper; @@ -23,4 +25,10 @@ public interface AlRepaymentEntryMapper extends BaseMapper { IPage pageByCondition(Page page, String customerNumberOrName, Integer status); List selectListByIds(List ids); + + List selectRepaymentList(); + + List selectOverDueDays(); + + List selectBind(); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentCountRes.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentCountRes.java new file mode 100644 index 00000000..37dac47e --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentCountRes.java @@ -0,0 +1,67 @@ +package com.daqing.financial.guarantee.model.response; + +import com.alibaba.excel.metadata.BaseRowModel; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import org.apache.poi.hpsf.Decimal; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + *

+ * 还款记录表 + *

+ * + * @author Qyq + * @since 2021-03-17 + */ +@Data +public class AlRepaymentCountRes extends BaseRowModel implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + /** + * 保后外键id + */ + private Integer insuranceId; + + /** + * 还款期数 + */ + private Integer repaymentSum; + + /** + * 担保额度 + */ + private BigDecimal guaranteeAmount; + + /** + * 还款额度 + */ + private BigDecimal alreadyPaymentSum; + + /** + * 剩余额度 + */ + private BigDecimal remainSum; + + /** + * 创建时间 + */ + @TableField(fill= FieldFill.INSERT) + private Date createTime; + + /** + * 修改时间 + */ + @TableField(fill= FieldFill.INSERT_UPDATE) + private Date updateTime; +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentEntryRes.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentEntryRes.java new file mode 100644 index 00000000..95c59142 --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentEntryRes.java @@ -0,0 +1,68 @@ +package com.daqing.financial.guarantee.model.response; + +import com.alibaba.excel.metadata.BaseRowModel; +import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + *

+ * 还款记录表 + *

+ * + * @author Qyq + * @since 2021-03-17 + */ +@Data +public class AlRepaymentEntryRes implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + /** + * 保后外键id + */ + private Integer insuranceId; + + /** + * 应还款日 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date repaymentDate; + + /** + * 逾期天数 + */ + private Integer overdueDays; + + /** + * 实际还款日 + */ + private Date actualRepaymentDate; + + /** + * 剩余额度 + */ + private BigDecimal remainAmount; + + /** + * 创建时间 + */ + @TableField(fill= FieldFill.INSERT) + private Date createTime; + + /** + * 修改时间 + */ + @TableField(fill= FieldFill.INSERT_UPDATE) + private Date updateTime; +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlInsuranceListService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlInsuranceListService.java index aef1b137..e2fb3459 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlInsuranceListService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlInsuranceListService.java @@ -26,4 +26,6 @@ public interface IAlInsuranceListService extends IService { Boolean excelExport(List ids, HttpServletResponse response); int updateStatus(Integer id); + + int updateInsuranceList(); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java index 815edda7..43f81dfd 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java @@ -33,4 +33,6 @@ public interface IAlRepaymentEntryService extends IService { Boolean excelExport(List ids, HttpServletResponse response); Map repaymentStatistics(Integer insuranceId,Double guaranteeAmount); + + int updateRepaymentEntry(); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java index 5bd7bdae..3dda32bf 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java @@ -5,18 +5,24 @@ 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.mapper.AlRepaymentEntryMapper; import com.daqing.financial.guarantee.model.response.AlInsuranceListRes; +import com.daqing.financial.guarantee.model.response.AlRepaymentCountRes; import com.daqing.financial.guarantee.model.response.AlRepaymentRes; 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.domain.guarantee.AlRepaymentEntry; import com.daqing.framework.exception.ExceptionCast; import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.excel.ExcelUtil; +import org.apache.poi.hpsf.Decimal; import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.servlet.http.HttpServletResponse; +import java.math.BigDecimal; import java.util.List; @@ -31,6 +37,8 @@ import java.util.List; @Service public class AlInsuranceListServiceImpl extends ServiceImpl implements IAlInsuranceListService { + @Autowired + private AlRepaymentEntryMapper alRepaymentEntryMapper; @Override public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName) { //分页参数 @@ -72,4 +80,31 @@ public class AlInsuranceListServiceImpl extends ServiceImpl().eq("id",id)); } + + @Override + public int updateInsuranceList() { + //统计保后id,还款额度,还款期数 + List list = alRepaymentEntryMapper.selectRepaymentList(); + + //遍历list计算出剩余额度(剩余额度=担保额度-还款额度) + for (AlRepaymentCountRes res:list) { + BigDecimal guaranteeAmount = res.getGuaranteeAmount(); + BigDecimal alreadyPaymentSum = res.getAlreadyPaymentSum(); + Double remainSum = guaranteeAmount.doubleValue() - alreadyPaymentSum.doubleValue(); + res.setRemainSum(BigDecimal.valueOf(remainSum)); + //额度实时更新 + AlInsuranceList alInsuranceList = new AlInsuranceList(); + + if(remainSum==0.00){//剩余额度为0.00,状态为已还清 + alInsuranceList.setPaymentStatus(3);//已还清 + } + alInsuranceList.setId(res.getInsuranceId()); + alInsuranceList.setRepaymentAmount(res.getAlreadyPaymentSum());//还款额度 + alInsuranceList.setRepaymentTime(res.getRepaymentSum());//还款期数 + alInsuranceList.setRemainAmount(res.getRemainSum());//剩余额度 + this.baseMapper.updateById(alInsuranceList); + } + + return 1; + } } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java index 53e92e5d..b34e9222 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java @@ -5,21 +5,28 @@ 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.AlInsuranceListMapper; import com.daqing.financial.guarantee.mapper.AlRepaymentEntryMapper; import com.daqing.financial.guarantee.model.request.AlRepaymentEntryReq; +import com.daqing.financial.guarantee.model.response.AlRepaymentEntryRes; import com.daqing.financial.guarantee.model.response.AlRepaymentRes; import com.daqing.financial.guarantee.service.IAlRepaymentEntryService; import com.daqing.framework.domain.crms.response.CrmsCode; +import com.daqing.framework.domain.guarantee.AlInsuranceList; 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 io.swagger.models.auth.In; import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -35,6 +42,8 @@ import java.util.Map; @Service public class AlRepaymentEntryServiceImpl extends ServiceImpl implements IAlRepaymentEntryService { + @Autowired + private AlInsuranceListMapper alInsuranceListMapper; @Override public int repaymentEntry(AlRepaymentEntryReq alRepaymentEntryReq) { AlRepaymentEntry alRepaymentEntry = new AlRepaymentEntry(); @@ -144,4 +153,53 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpllist = this.baseMapper.selectOverDueDays(); + //查询所有数据 + //List list = this.baseMapper.selectList(new QueryWrapper<>()); + + Listlist = this.baseMapper.selectBind(); + Date date = new Date(); + long times1 = date.getTime();//当前时间 + + //遍历list取出应还款日,计算逾期天数=当前时间-应还款日 + for (AlRepaymentEntryRes res:list) { + long times2 = res.getRepaymentDate().getTime();//应还款日 + long times3 = res.getActualRepaymentDate().getTime();//实际还款日 + AlRepaymentEntry entry = new AlRepaymentEntry(); + entry.setId(res.getId()); + AlInsuranceList alInsuranceList = new AlInsuranceList(); + alInsuranceList.setId(res.getInsuranceId()); + //如果存在当前日期超过应还款日时的数据,则计算逾期天数,并且状态改为已逾期,同时要处理保后管理模块内容 + if(times1 > times2){ + int days = (int)((times1-times2)/1000/60/60/24); + entry.setOverdueDays(days); + entry.setRepaymentStatus(3);//已逾期 + this.baseMapper.updateById(entry);//更新逾期天数和状态 + + //更新保后管理列表处的状态为已逾期,并且is_overdue设置为0 + alInsuranceList.setPaymentStatus(2);//已逾期 + alInsuranceList.setIsOverdue(0);//是否逾期过:0->是;1->否; + alInsuranceListMapper.updateById(alInsuranceList); + }else if(times1==times2){//应还款日=当前日期,则显示状态为待还款 + entry.setRepaymentStatus(1);//待还款 + this.baseMapper.updateById(entry);//更新状态 + }else if(times3 <= times1){//实际还款日不超过当前日期时,状态为已还款 + entry.setRepaymentStatus(2);//已还款 + this.baseMapper.updateById(entry);//更新状态 + }else if(times1 <= times2){//当前日期未到应还款日,状态为未到期 + entry.setRepaymentStatus(4);//未到期 + this.baseMapper.updateById(entry);//更新状态 + if(res.getRemainAmount().doubleValue()>0){//如果存在剩余额度,保后管理列表状态为还款中 + alInsuranceList.setPaymentStatus(1);//还款中 + alInsuranceListMapper.updateById(alInsuranceList); + } + } + } + + return 1; + } } diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml index ecde8296..cf87e53e 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml @@ -44,4 +44,21 @@ order by create_time desc + + + + + + diff --git a/dq-financial-hrms-auth/src/main/resources/bootstrap.properties b/dq-financial-hrms-auth/src/main/resources/bootstrap.properties index d36b3795..a0715411 100644 --- a/dq-financial-hrms-auth/src/main/resources/bootstrap.properties +++ b/dq-financial-hrms-auth/src/main/resources/bootstrap.properties @@ -1,21 +1,21 @@ #服务名称 -#spring.application.name=dq-financial-hrms-auth -##配置中心地址 -#spring.cloud.nacos.config.server-addr=127.0.0.1:8848 -#spring.cloud.nacos.config.file-extension=yml -##redis配置 -#spring.redis.host=127.0.0.1 -#spring.redis.port=6379 -#spring.redis.password= -#spring.redis.database=0 -#spring.redis.timeout=30000 -#spring.redis.jedis.pool.max-active=8 -#spring.redis.jedis.pool.max-wait=-1 -#spring.redis.jedis.pool.max-idle=8 -#spring.redis.jedis.pool.min-idle=0 -# -##本地测试环境 -#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99 +spring.application.name=dq-financial-hrms-auth +#配置中心地址 +spring.cloud.nacos.config.server-addr=127.0.0.1:8848 +spring.cloud.nacos.config.file-extension=yml +#redis配置 +spring.redis.host=127.0.0.1 +spring.redis.port=6379 +spring.redis.password= +spring.redis.database=0 +spring.redis.timeout=30000 +spring.redis.jedis.pool.max-active=8 +spring.redis.jedis.pool.max-wait=-1 +spring.redis.jedis.pool.max-idle=8 +spring.redis.jedis.pool.min-idle=0 + +#本地测试环境 +spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99 #线上测试环境 #spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128 @@ -33,30 +33,30 @@ ribbon.ConnectTimeout: 30000 #正式环境(prod) -spring.application.name=dq-financial-hrms-auth - -spring.cloud.nacos.config.server-addr=120.78.127.12:8848 -spring.cloud.nacos.config.namespace=b590c830-7ada-44b7-968f-e8d0c81990c4 -#spring.cloud.nacos.config.group=prod - -spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml -spring.cloud.nacos.config.ext-config[0].group=prod -spring.cloud.nacos.config.ext-config[0].refresh=true - -spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml -spring.cloud.nacos.config.ext-config[1].group=prod -spring.cloud.nacos.config.ext-config[1].refresh=true - -spring.cloud.nacos.config.ext-config[2].data-id=other.yml -spring.cloud.nacos.config.ext-config[2].group=prod -spring.cloud.nacos.config.ext-config[2].refresh=true - -spring.redis.host=127.0.0.1 -spring.redis.port=6379 -spring.redis.password=dq123456 -spring.redis.database=0 -spring.redis.timeout=30000 -spring.redis.jedis.pool.max-active=8 -spring.redis.jedis.pool.max-wait=-1 -spring.redis.jedis.pool.max-idle=8 -spring.redis.jedis.pool.min-idle=0 \ No newline at end of file +#spring.application.name=dq-financial-hrms-auth +# +#spring.cloud.nacos.config.server-addr=120.78.127.12:8848 +#spring.cloud.nacos.config.namespace=b590c830-7ada-44b7-968f-e8d0c81990c4 +##spring.cloud.nacos.config.group=prod +# +#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml +#spring.cloud.nacos.config.ext-config[0].group=prod +#spring.cloud.nacos.config.ext-config[0].refresh=true +# +#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml +#spring.cloud.nacos.config.ext-config[1].group=prod +#spring.cloud.nacos.config.ext-config[1].refresh=true +# +#spring.cloud.nacos.config.ext-config[2].data-id=other.yml +#spring.cloud.nacos.config.ext-config[2].group=prod +#spring.cloud.nacos.config.ext-config[2].refresh=true +# +#spring.redis.host=127.0.0.1 +#spring.redis.port=6379 +#spring.redis.password=dq123456 +#spring.redis.database=0 +#spring.redis.timeout=30000 +#spring.redis.jedis.pool.max-active=8 +#spring.redis.jedis.pool.max-wait=-1 +#spring.redis.jedis.pool.max-idle=8 +#spring.redis.jedis.pool.min-idle=0 \ No newline at end of file diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCompanyPersonal.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCompanyPersonal.java index 0ec22ad7..2252dd82 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCompanyPersonal.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCompanyPersonal.java @@ -59,7 +59,7 @@ public class CrmsCompanyPersonal implements Serializable { * 注册时间 */ @ApiModelProperty(value = "注册时间") - //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date registeredTime; /** diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlInsuranceList.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlInsuranceList.java index 379eb2db..25b5947b 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlInsuranceList.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlInsuranceList.java @@ -86,7 +86,7 @@ public class AlInsuranceList implements Serializable { /** * 还款期数 */ - private String repaymentTime; + private Integer repaymentTime; /** * 所属部门 From 0e9681356c588bb53159da20f870163d7cee37b5 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Tue, 23 Mar 2021 09:54:59 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=BF=98=E6=AC=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BF=AE=E6=94=B9=EF=BC=8C=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=83=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AlRepaymentEntryController.java | 4 ++-- .../guarantee/mapper/AlRepaymentEntryMapper.java | 2 +- .../service/IAlRepaymentEntryService.java | 3 ++- .../service/impl/AlRepaymentEntryServiceImpl.java | 4 ++-- .../impl/DgMessageInvestigationServiceImpl.java | 14 +++++++++++++- .../mapper/guarantee/AlRepaymentEntryMapper.xml | 3 +++ 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java index e0cb1387..de950bb4 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java @@ -70,10 +70,10 @@ public class AlRepaymentEntryController { @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, + public ResponseResult repaymentList(@RequestParam(value="page",required=false) Integer page, @RequestParam(value="size",required=false) Integer size,@RequestParam(value = "insuranceId") Integer insuranceId, @RequestParam(value = "CustomerNumberOrName", required = false) String CustomerNumberOrName, @RequestParam(value="status",required=false) Integer status){ - PageUtils data = alRepaymentEntryService.queryPage(page, size, CustomerNumberOrName,status); + PageUtils data = alRepaymentEntryService.queryPage(page, size, CustomerNumberOrName,status,insuranceId); return new ResponseResult().SUCCESS(data); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java index 34fd29a8..62040a60 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java @@ -22,7 +22,7 @@ import java.util.List; @Mapper public interface AlRepaymentEntryMapper extends BaseMapper { - IPage pageByCondition(Page page, String customerNumberOrName, Integer status); + IPage pageByCondition(Page page, String customerNumberOrName, Integer status,Integer insuranceId); List selectListByIds(List ids); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java index 43f81dfd..a5811a31 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java @@ -5,6 +5,7 @@ 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 io.swagger.models.auth.In; import javax.servlet.http.HttpServletResponse; import java.util.List; @@ -24,7 +25,7 @@ public interface IAlRepaymentEntryService extends IService { AlRepaymentEntry repaymentDetail(Integer id); - PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, Integer status); + PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, Integer status, Integer insuranceId); int updateRepayment(AlRepaymentEntryReq alRepaymentEntryReq); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java index b34e9222..5fb3a869 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java @@ -64,7 +64,7 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,status); + IPage positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,status,insuranceId); return new PageUtils(positionVO); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java index e24f0f74..14f5e6d6 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java @@ -292,6 +292,12 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl() + .eq("business_id",messageInvestigation.getBusinessId())); + //修改信息部调查员的审批状态为审核中,操作状态为已处理 DgMessageInvestigation investigation = new DgMessageInvestigation(); investigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//已处理 @@ -349,7 +355,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpllambdaUpdate() .set(DgMessageInvestigation::getEmpId, Integer.parseInt(dgApplyAmountInfoController.getUserId())) - .set(DgMessageInvestigation::getStatus, approvalMessageRequest.getStatus()) + .set(DgMessageInvestigation::getStatus, dgMessageInvestigation.getStatus())//approvalMessageRequest.getStatus() .set(DgMessageInvestigation::getOperatingStatus, StatusCode.CZ_PROCESSED) .set(DgMessageInvestigation::getRemark, approvalMessageRequest.getRemark()) .eq(DgMessageInvestigation::getId, approvalMessageRequest.getId()) @@ -408,6 +414,12 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl() .eq("business_id", messageInvestigation2.getBusinessId()).eq("type", 3)); + DgMessageInvestigation assign = new DgMessageInvestigation(); + assign.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中 + //修改该业务下所有审批状态为审核中 + this.baseMapper.update(assign,new QueryWrapper() + .eq("business_id",messageInvestigation.getBusinessId())); + if(count>0){//资产领导有数据,则直接修改领导状态 DgMessageInvestigation assignUser = new DgMessageInvestigation(); assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中 diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml index cf87e53e..fc47c941 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml @@ -29,6 +29,9 @@ AND repayment_date = #{customerNumberOrName} + + AND insurance_id = #{insuranceId} + order by create_time desc From 5564f76685e1e7c359656f4c4ff217709cd883ac Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Tue, 23 Mar 2021 10:53:22 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=8E=A5=E6=94=B6=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/daqing/framework/domain/crms/CompanyCustomerEntity.java | 2 ++ .../daqing/framework/domain/crms/ext/CustomerCompanyDTO.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java index 44a46267..4b77221e 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -92,6 +93,7 @@ public class CompanyCustomerEntity implements Serializable { @ApiModelProperty(value = "经营地址") private String businessAddr; + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @ApiModelProperty(value = "注册时间") private Date registerTime; diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyDTO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyDTO.java index 3e5d49a9..905a280d 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyDTO.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyDTO.java @@ -1,5 +1,6 @@ package com.daqing.framework.domain.crms.ext; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.ToString; @@ -96,6 +97,7 @@ public class CustomerCompanyDTO implements Serializable { @ApiModelProperty(value = "社会统一代码") private String socialUnifiedCode; + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @ApiModelProperty(value = "注册时间") private Date registerTime; From 92383d0ab19522016ee5c3d94a8ce222dbf24f71 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Tue, 23 Mar 2021 11:43:01 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=8E=A5=E6=94=B6=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../guarantee/model/request/BusinessApplicationRequest.java | 2 +- .../daqing/framework/domain/guarantee/DgBusinessCompany.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java index d0e8af30..37f4af09 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java @@ -261,7 +261,7 @@ public class BusinessApplicationRequest implements Serializable { * 注册时间 */ @ApiModelProperty(value = "注册时间") - private String registerTime; + private Date registerTime; /** * 注册地址 diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBusinessCompany.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBusinessCompany.java index b3ca72d2..38f4fb06 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBusinessCompany.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBusinessCompany.java @@ -77,7 +77,7 @@ public class DgBusinessCompany implements Serializable { /** * 注册时间 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date registerTime; /**