首页统计

master
shijie 4 years ago
parent 3d35a02d86
commit 7baed70455
  1. 23
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
  2. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java
  3. 24
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/EfficiencyApprovalResponse.java
  4. 1
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgEfficiencyService.java
  5. 29
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
  6. 20
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
  7. 3
      dq-govern-gateway/src/main/resources/jwt.properties

@ -1,8 +1,15 @@
package com.daqing.financial.guarantee.controller;
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.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
/**
* 流程效率
*
@ -12,4 +19,20 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/guarantee/efficiency")
public class DgEfficiencyController {
@Autowired
private IDgEfficiencyService dgEfficiencyService;
/**
* 首页-近十天的审批数目
*/
@GetMapping("/approvalNum")
public ResponseResult approvalNum(){
//查询审批数目的值的数组
String result = dgEfficiencyService.approvalNum();
//return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
return new ResponseResult();
}
}

@ -1,6 +1,7 @@
package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.financial.guarantee.model.response.EfficiencyApprovalResponse;
import com.daqing.framework.domain.guarantee.DgAuditProcess;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -21,4 +22,8 @@ public interface DgAuditProcessMapper extends BaseMapper<DgAuditProcess> {
List<DgAuditProcess> selectAuditProcessList(@Param("businessId") String businessId,@Param("processId") String processId);
List<Integer> selectProcessId(String businessId);
List<String> selectTenDays(Integer userId);
List<EfficiencyApprovalResponse> selectApprovalNum(int parseInt);
}

@ -0,0 +1,24 @@
package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.metadata.BaseRowModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
@Data
@ToString
public class EfficiencyApprovalResponse extends BaseRowModel implements Serializable {
/**
* 审批数量
*/
@ApiModelProperty(value = "审批数量")
private Integer approvalNum;
/**
* 审批日期
*/
@ApiModelProperty(value = "审批日期")
private Integer createTime2;
}

@ -9,4 +9,5 @@ import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
*/
public interface IDgEfficiencyService extends IService<DgApplyAmountInfo> {
String approvalNum();
}

@ -1,14 +1,43 @@
package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
import com.daqing.financial.guarantee.mapper.DgAuditProcessMapper;
import com.daqing.financial.guarantee.mapper.DgEfficiencyMapper;
import com.daqing.financial.guarantee.model.response.EfficiencyApprovalResponse;
import com.daqing.financial.guarantee.service.IDgEfficiencyService;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @auther River
* @date 2020/11/10 11:34
*/
@Service
public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgApplyAmountInfo> implements IDgEfficiencyService {
@Autowired
private DgApplyAmountInfoController dgApplyAmountInfoController;
@Autowired
private DgAuditProcessMapper dgAuditProcessMapper;
/**
* 查询审批数目的值的数组
* @return
*/
@Override
public String approvalNum() {
//获取当前用户id
String userId = dgApplyAmountInfoController.getUserId();
//近十天的日期数组
List<String>timeList = dgAuditProcessMapper.selectTenDays(Integer.parseInt(userId));
System.out.println("timeList============"+timeList);
//近十天审批数目的值的数组
List<EfficiencyApprovalResponse>approvalList = dgAuditProcessMapper.selectApprovalNum(Integer.parseInt(userId));
System.out.println("approvalList==========="+approvalList);
return null;
}
}

@ -30,5 +30,25 @@
<select id="selectProcessId" resultType="java.lang.Integer">
SELECT process_id FROM dg_audit_process WHERE business_id = #{businessId} group by process_id order by process_id asc
</select>
<select id="selectTenDays" resultType="java.lang.Integer">
SELECT
date_format( create_time, '%Y-%m-%d' ) AS create_time
FROM
dg_audit_process
WHERE
DATE_SUB( CURDATE( ), INTERVAL 10 DAY ) &lt;= date( create_time )
AND user_id=#{userId}
</select>
<select id="selectApprovalNum" resultType="java.lang.Integer">
SELECT
count(0),date_format( create_time, '%Y-%m-%d' ) AS create_time2
FROM
dg_audit_process
WHERE
user_id=#{userId}
AND DATE_SUB( CURDATE( ), INTERVAL 10 DAY ) &lt;= date( create_time )
GROUP BY create_time2
</select>
</mapper>

@ -26,7 +26,8 @@ jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\
/api-guarantee/dg-loan-notice/loanNoticeListExport,\
/api-guarantee/dg-loan-notice/exportLoanNotice,\
/api-hrms/hrms/user/uploadFile,\
/apiHrmsAuth/hrms/auth/permission/getUserRoles
/apiHrmsAuth/hrms/auth/permission/getUserRoles,\
/api-hrms/hrms/permission/getPermission

Loading…
Cancel
Save