diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java index 97a9e1d3..a18ba1ef 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java @@ -1,8 +1,5 @@ package com.daqing.financial.guarantee.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.daqing.financial.guarantee.DgApplyAmountInfoControllerApi; import com.daqing.financial.guarantee.feign.CrmsFeignService; @@ -10,18 +7,13 @@ import com.daqing.financial.guarantee.feign.HrmsFeignService; import com.daqing.financial.guarantee.model.request.ApplyAmountListRequest; import com.daqing.financial.guarantee.model.request.ApprovalBusinessRequest; import com.daqing.financial.guarantee.model.request.BusinessApplicationRequest; -import com.daqing.financial.guarantee.model.request.GuaranteeLetterListRequest; import com.daqing.financial.guarantee.model.response.BusinessApplicationDetailResponse; import com.daqing.financial.guarantee.model.response.BusinessApplicationExportResponse; import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse; -import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse; import com.daqing.financial.guarantee.service.IDgApplyAmountInfoService; import com.daqing.financial.guarantee.service.IDgApplyAmountListService; import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest; import com.daqing.framework.domain.guarantee.DgApplyField; -import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse; -import com.daqing.framework.domain.hrms.UserEntity; -import com.daqing.framework.domain.hrms.ext.EmployeeTO; import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.util.JwtUtils; @@ -32,9 +24,7 @@ import io.jsonwebtoken.Claims; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; -import io.swagger.models.auth.In; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.beanutils.ConvertUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.context.request.RequestContextHolder; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java index e8b2877b..fe33eecd 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java @@ -1,13 +1,15 @@ package com.daqing.financial.guarantee.controller; - import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.daqing.financial.guarantee.feign.HrmsFeignService; +import com.daqing.financial.guarantee.model.response.ApprovalNum; +import com.daqing.financial.guarantee.model.response.TodayApprovalRecordResponse; import com.daqing.financial.guarantee.service.IDgAuditProcessService; +import com.daqing.financial.guarantee.util.R; +import com.daqing.financial.guarantee.util.TaskNodeUtil; import com.daqing.framework.domain.guarantee.DgAuditProcess; import com.daqing.framework.domain.guarantee.po.ProcessPO; -import com.daqing.framework.domain.hrms.RoleEntity; import com.daqing.framework.model.response.ResponseResult; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -15,7 +17,6 @@ import io.swagger.annotations.ApiParam; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -82,4 +83,36 @@ public class DgAuditProcessController { return ResponseResult.SUCCESS(processPO); } + @ApiOperation(value = "今日审批记录",response = TodayApprovalRecordResponse.class) + @GetMapping("todayApprovalRecord") + public R nowadaysAuditProcess(){ + List approvalRecords = auditProcessService.todayApprovalRecord(); + ApprovalNum approvalNum = new ApprovalNum(); + //统计状态个数 + approvalRecords.forEach(todayApprovalRecordResponse -> { + if (todayApprovalRecordResponse.getStatus()!=null){ + String taskNode = todayApprovalRecordResponse.getTaskNode(); + if (taskNode!=null){ + String converter = TaskNodeUtil.converter(taskNode); + todayApprovalRecordResponse.setTaskNode(converter); + } + switch (todayApprovalRecordResponse.getStatus()){ + case "0": + approvalNum.setInitiateNum(approvalNum.getInitiateNum()+1); + break; + case "2": + approvalNum.setAgreed(approvalNum.getAgreed()+1); + break; + case "3": + approvalNum.setRejected(approvalNum.getRejected()+1); + break; + case "4": + approvalNum.setTurnDown(approvalNum.getTurnDown()+1); + break; + } + } + }); + return R.ok().data("approvalRecords",approvalRecords).data("approvalNum",approvalNum); + } + } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java index 25eea017..34bf9764 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java @@ -18,11 +18,7 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import com.daqing.financial.guarantee.service.IDgEfficiencyService; -import com.daqing.framework.model.response.ResponseResult; -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; @@ -31,7 +27,6 @@ import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; -import java.util.stream.Collectors; /** * 流程效率 diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java index 579c7e09..6d23a65e 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java @@ -2,9 +2,11 @@ package com.daqing.financial.guarantee.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.daqing.financial.guarantee.model.response.EfficiencyApprovalResponse; +import com.daqing.financial.guarantee.model.response.TodayApprovalRecordResponse; import com.daqing.framework.domain.guarantee.DgAuditProcess; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.springframework.beans.factory.annotation.Autowired; import java.util.List; @@ -26,4 +28,6 @@ public interface DgAuditProcessMapper extends BaseMapper { List selectTenDays(Integer userId); List selectApprovalNum(int parseInt); + + List selectTodayApprovalRecord(@Param("userId")String userId,@Param("startTime")String startTime,@Param("endTime")String endTime); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/ApprovalNum.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/ApprovalNum.java new file mode 100644 index 00000000..1f9e717c --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/ApprovalNum.java @@ -0,0 +1,26 @@ +package com.daqing.financial.guarantee.model.response; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author chen + * @DATE 2021/1/12 17:10 + * @Version 1.0 + */ +@Data +public class ApprovalNum { + + @ApiModelProperty("已发起数") + private Integer initiateNum = 0; + + @ApiModelProperty("已同意数") + private Integer agreed = 0; + + @ApiModelProperty("已拒绝数") + private Integer rejected = 0; + + @ApiModelProperty("已驳回数") + private Integer turnDown = 0; + +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/TodayApprovalRecordResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/TodayApprovalRecordResponse.java new file mode 100644 index 00000000..37c79330 --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/TodayApprovalRecordResponse.java @@ -0,0 +1,40 @@ +package com.daqing.financial.guarantee.model.response; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @Author chen + * @DATE 2021/1/12 14:19 + * @Version 1.0 + */ +@Data +public class TodayApprovalRecordResponse { + + @ApiModelProperty("业务编号") + private String businessNumber; + + @ApiModelProperty("客户名称") + private String clientName; + + @ApiModelProperty("申请金额") + private BigDecimal applicationAmount; + + @ApiModelProperty("申请期限") + private String applicationDeadline; + + @ApiModelProperty("任务节点") + private String taskNode; + + @ApiModelProperty("处理时间") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date processingTime; + + @ApiModelProperty("状态") + private String status; + +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java index b99d6c4b..2f55ce9f 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java @@ -1,6 +1,7 @@ package com.daqing.financial.guarantee.service; import com.baomidou.mybatisplus.extension.service.IService; +import com.daqing.financial.guarantee.model.response.TodayApprovalRecordResponse; import com.daqing.framework.domain.guarantee.DgAuditProcess; import java.util.List; @@ -18,4 +19,6 @@ public interface IDgAuditProcessService extends IService { List queryProcessList(String businessId,String processId); List getProcessId(String businessId); + + List todayApprovalRecord(); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java index a03750ce..e51674ad 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java @@ -250,7 +250,8 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl getProcessId(String businessId) { return baseMapper.selectProcessId(businessId); } + + @Override + public List todayApprovalRecord() { + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String startTime = dateFormat.format(DateUtils.getDayBegin()); + String endTime = dateFormat.format(DateUtils.getDayEnd()); + String userId = this.getUserId(); + return baseMapper.selectTodayApprovalRecord(userId,startTime,endTime); + } + + /** + * 获取当前登录用户信息 + */ + private String getUserId() { + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + String token = request.getHeader("token"); + return RedisUtil.get("dq:token:" + token); + } } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java index b9b8de4d..d490d159 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java @@ -140,7 +140,7 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl 0){ //获取之前指定的a角用户 @@ -241,7 +242,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新a角 @@ -301,7 +303,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //根据业务id查询贷审会数据 @@ -342,7 +345,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新法规部经理数据 @@ -468,7 +473,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新法规部经理数据 @@ -531,7 +537,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -581,7 +588,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -623,7 +631,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新b用户的审核状态为驳回,操作状态为已处理 @@ -673,7 +682,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -724,7 +734,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -766,7 +777,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新a用户的审核状态为驳回,操作状态为已处理 diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java index ebb2c6c3..fbfd9365 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java @@ -148,7 +148,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper businessProcessStatusQueryWrapper = new QueryWrapper<>(); @@ -141,7 +142,8 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl 0){ QueryWrapper queryWrapper = new QueryWrapper<>(); 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 6bd3f0ed..defc13b7 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 @@ -153,7 +153,9 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl() .eq("business_id",messageInvestigation.getBusinessId()).eq("type",2)); - }else if(investigateMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW ){ + }else if(investigateMessageRequest.getStatus().equals(StatusCode.SP_IN_REVIEW)){ //判断信息部专员是否调查通过,如果通过,修改信息部经理操作状态为待处理 DgMessageInvestigation messageInvestigation2 = new DgMessageInvestigation(); messageInvestigation2.setOperatingStatus(StatusCode.CZ_ON_HAND); @@ -309,7 +311,9 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl() .eq("business_id",messageInvestigation.getBusinessId()).eq("type",2)); - }else if(approvalMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==2){//信息部经理审核通过 + }else if(approvalMessageRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==2){//信息部经理审核通过 //根据主键id查询业务id DgMessageInvestigation messageInvestigation2 = this.getBaseMapper().selectById(approvalMessageRequest.getId()); @@ -409,7 +413,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl 0){ @@ -185,7 +186,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper wrapperTemp = new QueryWrapper<>(); @@ -215,7 +217,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ //更新法规部经理数据 @@ -279,7 +282,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ @@ -324,7 +328,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper queryWrapperCwb = new QueryWrapper<>(); @@ -360,7 +365,8 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper queryWrapperT = new QueryWrapper<>(); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java index f36bd107..d0103a53 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java @@ -157,7 +157,7 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl + + + + + + + + + + + + + + diff --git a/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java b/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java index 58fad167..7a6e421f 100644 --- a/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java +++ b/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java @@ -35,16 +35,16 @@ public class Md5Util { //System.out.println(md5("1234564")); System.out.println(md5("Aa123420")); - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - Date date = new Date(); - try { - date = simpleDateFormat.parse("2021-01-06"); - } catch (ParseException e) { - e.printStackTrace(); - } -/* Timestamp time = DateUtils.getDayEndTime(date); - System.out.println(time); - System.out.println(simpleDateFormat.format(time));*/ + // SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); + // SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + // Date date = new Date(); + // try { + // date = simpleDateFormat.parse("2021-01-06"); + // } catch (ParseException e) { + // e.printStackTrace(); + // } + // Timestamp time = DateUtils.getDayEndTime(date); + // System.out.println(time); + // System.out.println(simpleDateFormat.format(time)); } }