Merge remote-tracking branch 'origin/master'

master
shijie 4 years ago
commit d46cd7e0ba
  1. 102
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
  2. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/PersonalEfficiencyListRequest.java
  3. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlCollectionListResponse.java
  4. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlCollectionResponse.java
  5. 4
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml

@ -148,6 +148,61 @@ public class DgEfficiencyController {
}
}
}
// 时间筛选(固定时间),先根据固定时间筛选,再根据自选时间筛选
if (personalEfficiencyListRequest.getCreateFixedTime() != null ) {
switch (personalEfficiencyListRequest.getCreateFixedTime()) {
case 0:
personalEfficiencyListRequest.setStartTime(DateUtils.getDayBegin());
personalEfficiencyListRequest.setEndTime(DateUtils.getDayEnd());// 今天
break;
case 1:
personalEfficiencyListRequest.setStartTime(DateUtils.getBeginDayOfYesterday());
personalEfficiencyListRequest.setEndTime(DateUtils.getEndDayOfYesterDay());// 昨天
break;
case 2:
personalEfficiencyListRequest.setStartTime(DateUtils.getBeginDayOfWeek());
personalEfficiencyListRequest.setEndTime(DateUtils.getEndDayOfWeek());// 本周
break;
case 3:
personalEfficiencyListRequest.setStartTime(DateUtils.getBeginDayOfMonth());
personalEfficiencyListRequest.setEndTime(DateUtils.getEndDayOfMonth());// 本月
break;
case 4:
personalEfficiencyListRequest.setStartTime(DateUtils.getBeginDayOfYear());
personalEfficiencyListRequest.setEndTime(DateUtils.getEndDayOfYear());// 本年
break;
}
//自选时间筛选
}else if (personalEfficiencyListRequest.getStartTime() != null && personalEfficiencyListRequest.getEndTime() != null){
personalEfficiencyListRequest.setStartTime(personalEfficiencyListRequest.getStartTime());
personalEfficiencyListRequest.setEndTime(personalEfficiencyListRequest.getEndTime());
}else {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = null;
try {
date = sdf.parse("2020-04-16 00:00:00");
} catch (ParseException e) {
e.printStackTrace();
}
personalEfficiencyListRequest.setStartTime(date);
personalEfficiencyListRequest.setEndTime(new Date());
}
//获取毫秒数
long longStart = personalEfficiencyListRequest.getStartTime().getTime();
long longEnd = personalEfficiencyListRequest.getEndTime().getTime();
//迭代器进行筛选(过滤不在指定范围的时间数据)
Iterator<PersonalEfficiencyListResponse> iterator = responseList.iterator();
while (iterator.hasNext()) {
PersonalEfficiencyListResponse next = iterator.next();
String applicationDate = next.getApplicationDate();
long longDate = getLongDate(applicationDate);
//当前日期小于开始日期或当前日期大于结束日期,删除该元素
if (longDate < longStart || longDate > longEnd) {
iterator.remove();
}
}
String userId = DgApplyAmountInfoController.getUserId();
CopyForMeRequest copyForMeRequest = new CopyForMeRequest();
copyForMeRequest.setUserId(Integer.parseInt(userId));
@ -186,60 +241,15 @@ public class DgEfficiencyController {
// 已发起
if (personalEfficiencyListRequest.getOperatingStatus().equals(StatusCode.CZ_LAUNCH)) {
responseList.removeIf(next -> !next.getOperatingStatus().equals(StatusCode.CZ_LAUNCH));
// responseList = responseList.stream().filter(p -> !p.getOperatingStatus().equals(StatusCode.CZ_LAUNCH)).collect(Collectors.toList());
// 待处理
} else if (personalEfficiencyListRequest.getOperatingStatus().equals(StatusCode.CZ_ON_HAND)) {
responseList.removeIf(next -> !next.getOperatingStatus().equals(StatusCode.CZ_ON_HAND));
// responseList = responseList.stream().filter(p -> !p.getOperatingStatus().equals(StatusCode.CZ_ON_HAND)).collect(Collectors.toList());
// 已处理
} else if (personalEfficiencyListRequest.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)) {
responseList.removeIf(next -> !next.getOperatingStatus().equals(StatusCode.CZ_PROCESSED));
// responseList = responseList.stream().filter(p -> !p.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)).collect(Collectors.toList());
}
}
// 时间筛选(固定时间)
if (personalEfficiencyListRequest.getCreateFixedTime() != null && personalEfficiencyListRequest.getStartTime() == null && personalEfficiencyListRequest.getEndTime() == null) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
switch (personalEfficiencyListRequest.getCreateFixedTime()) {
case 0:
personalEfficiencyListRequest.setStartTime(dateFormat.format(DateUtils.getDayBegin()));
personalEfficiencyListRequest.setEndTime(dateFormat.format(DateUtils.getDayEnd()));// 今天
break;
case 1:
personalEfficiencyListRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfYesterday()));
personalEfficiencyListRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfYesterDay()));// 昨天
break;
case 2:
personalEfficiencyListRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfWeek()));
personalEfficiencyListRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfWeek()));// 本周
break;
case 3:
personalEfficiencyListRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfMonth()));
personalEfficiencyListRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfMonth()));// 本月
break;
case 4:
personalEfficiencyListRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfYear()));
personalEfficiencyListRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfYear()));// 本年
break;
default:
personalEfficiencyListRequest.setStartTime(null);
personalEfficiencyListRequest.setEndTime(null);
}
//获取毫秒数
long longStart = getLongDate(personalEfficiencyListRequest.getStartTime());
long longEnd = getLongDate(personalEfficiencyListRequest.getEndTime());
//迭代器进行筛选
Iterator<PersonalEfficiencyListResponse> iterator = responseList.iterator();
while (iterator.hasNext()) {
PersonalEfficiencyListResponse next = iterator.next();
String applicationDate = next.getApplicationDate();
long longDate = getLongDate(applicationDate);
//当前日期小于开始日期或当前日期大于结束日期,删除该元素
if (longDate < longStart || longDate > longEnd) {
iterator.remove();
}
}
}
//按时间降序排列
List<PersonalEfficiencyListResponse> collect = responseList.stream().sorted((o1, o2) -> {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");

@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.util.Date;
/**
* @Author chen
* @DATE 2020/12/31 15:35
@ -19,11 +21,11 @@ public class PersonalEfficiencyListRequest {
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("起始时间")
private String startTime;
private Date startTime;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("结束时间")
private String endTime;
private Date endTime;
@ApiModelProperty("操作状态")
private Integer operatingStatus;

@ -26,8 +26,8 @@ public class AlCollectionListResponse extends BaseRowModel implements Serializab
@ApiModelProperty("id")
private Integer id;
@ExcelProperty(value = "客户编号", index = 0)
@ApiModelProperty("客户编号")
@ExcelProperty(value = "业务编号", index = 0)
@ApiModelProperty("业务编号")
private String code;
@ExcelProperty(value = "客户名称", index = 1)

@ -25,8 +25,8 @@ public class AlCollectionResponse extends BaseRowModel implements Serializable {
@ApiModelProperty("id")
private Integer id;
@ExcelProperty(value = "客户编号", index = 0)
@ApiModelProperty("客户编号")
@ExcelProperty(value = "业务编号", index = 0)
@ApiModelProperty("业务编号")
private String code;
@ExcelProperty(value = "客户名称", index = 1)

@ -193,8 +193,8 @@
<!-- 根据业务id获取当前业务的信息专员、资产专员以及AB角的用户id -->
<select id="getAttacheAndABByBusinessId" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.po.AttacheAndABUserIdPO">
SELECT (SELECT id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 59) AS a_user_id,
(SELECT id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 60) AS b_user_id,
SELECT (SELECT emp_id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 59) AS a_user_id,
(SELECT emp_id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 60) AS b_user_id,
a.emp_id AS asset_user_id,m.emp_id AS message_user_id
FROM dg_assets_investigation AS a
LEFT JOIN dg_message_investigation AS m

Loading…
Cancel
Save