细节优化

master
chen 4 years ago
parent fd6fbb270b
commit 63e3d83948
  1. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgCopyUserController.java
  2. 21
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
  3. 12
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/CopyForMeResponse.java
  4. 10
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java
  5. 1
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml

@ -12,6 +12,7 @@ import com.daqing.framework.enums.OperationUnit;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -44,6 +45,10 @@ public class DgCopyUserController {
List<CopyForMeResponse> copyForMeList = copyUserService.queryCopyForMe(copyForMeRequest);
//转换任务节点
copyForMeList.forEach(copyForMeResponse -> {
//提单人为空,默认赋值客户
if (StringUtils.isEmpty(copyForMeResponse.getApplicant())){
copyForMeResponse.setApplicant("客户");
}
String taskNode = copyForMeResponse.getTaskNode();
if (taskNode != null) {
String converter = TaskNodeUtil.converter(taskNode);

@ -19,6 +19,7 @@ import com.daqing.framework.enums.OperationUnit;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.excel.EasyExcelUtil;
import com.daqing.framework.xss.SQLFilter;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -34,6 +35,7 @@ import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* 流程效率
@ -155,6 +157,10 @@ public class DgEfficiencyController {
numResponse.setCopySendNum(size);
//转换任务节点,并统计操作状态个数
responseList.forEach(personalEfficiencyListResponse -> {
//耗时为空,默认为0
if (StringUtils.isEmpty(personalEfficiencyListResponse.getTimeConsuming())){
personalEfficiencyListResponse.setTimeConsuming("0天0小时0分钟");
}
//提单人为空,默认赋值客户
if (StringUtils.isEmpty(personalEfficiencyListResponse.getApplicant())){
personalEfficiencyListResponse.setApplicant("客户");
@ -234,7 +240,20 @@ public class DgEfficiencyController {
}
}
}
return R.ok().data("responseList", responseList).data("statistics", numResponse);
//按时间降序排列
List<PersonalEfficiencyListResponse> collect = responseList.stream().sorted((o1, o2) -> {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
try {
Date dt1 = format.parse(o1.getApplicationDate());
Date dt2 = format.parse(o2.getApplicationDate());
// 默认降序
return Long.compare(dt2.getTime(), dt1.getTime());
} catch (Exception e) {
e.printStackTrace();
}
return 0;
}).collect(Collectors.toList());
return R.ok().data("responseList", collect).data("statistics", numResponse);
}
public static long getLongDate(String stringDate) {

@ -41,17 +41,17 @@ public class CopyForMeResponse {
@ExcelProperty(value = "任务节点",index = 3,converter = TaskNodeConverter.class)
private String taskNode;
@ApiModelProperty("审批人")
@ExcelProperty(value = "审批人",index = 4)
private String approve;
// @ApiModelProperty("审批人")
// @ExcelProperty(value = "审批人",index = 4)
// private String approve;
@ApiModelProperty("审批时间")
@ExcelProperty(value = "审批时间",index = 5)
@ApiModelProperty("完成时间")
@ExcelProperty(value = "完成时间",index = 4)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private String approveDate;
@ApiModelProperty("业务状态")
@ExcelProperty(value = "业务状态",index = 6,converter = BusinessStatusConverter.class)
@ExcelProperty(value = "业务状态",index = 5,converter = BusinessStatusConverter.class)
private Integer businessStatus;
@ExcelIgnore

@ -101,11 +101,11 @@ public class DgCopyUserServiceImpl extends ServiceImpl<DgCopyUserMapper, DgCopyU
if (response.getApplicantId()!=null && response.getApplicantId().equals(res.get("id"))) {//如果提单人id相同情况下,就往对象里面赋值
response.setApplicant(JSONObject.toJSONString(res.get("account")).replace("\"", ""));
}
if (response.getApproveId()!=null){
if (response.getApproveId().equals(res.get("id"))) {//如果审批人id相同情况下,就往对象里面赋值
response.setApprove(JSONObject.toJSONString(res.get("account")).replace("\"", ""));
}
}
// if (response.getApproveId()!=null){
// if (response.getApproveId().equals(res.get("id"))) {//如果审批人id相同情况下,就往对象里面赋值
// response.setApprove(JSONObject.toJSONString(res.get("account")).replace("\"", ""));
// }
// }
}
}
}

@ -46,6 +46,7 @@
<if test="clientName != null and clientName != ''">
AND cc.name LIKE '%' #{clientName} '%'
</if>
order by aai.create_time desc
</select>
</mapper>

Loading…
Cancel
Save