首页统计

master
shijie 4 years ago
parent 814ba6b464
commit d909f94e58
  1. 7
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
  2. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java
  3. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgEfficiencyService.java
  4. 20
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
  5. 5
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml

@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
/**
* 流程效率
@ -47,9 +48,7 @@ public class DgEfficiencyController {
@GetMapping("/approvalNum")
public ResponseResult approvalNum(){
//查询审批数目的值的数组
String result = dgEfficiencyService.approvalNum();
//return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
return new ResponseResult();
Map result = dgEfficiencyService.approvalNum();
return ResponseResult.SUCCESS(result);
}
}

@ -25,5 +25,5 @@ public interface DgAuditProcessMapper extends BaseMapper<DgAuditProcess> {
List<String> selectTenDays(Integer userId);
List<EfficiencyApprovalResponse> selectApprovalNum(int parseInt);
List<Integer> selectApprovalNum(int parseInt);
}

@ -6,6 +6,7 @@ import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
/**
* @auther River
@ -13,6 +14,6 @@ import java.util.HashMap;
*/
public interface IDgEfficiencyService extends IService<DgApplyAmountInfo> {
String approvalNum();
Map approvalNum();
HashMap<Integer, HashMap<Integer, String>> queryList(DgEfficiencyTeamRequest dgEfficiencyTeamRequest);
}

@ -14,9 +14,8 @@ import org.springframework.stereotype.Service;
import com.daqing.framework.domain.guarantee.po.DgTeamEfficiencyPO;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -140,16 +139,17 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
* @return
*/
@Override
public String approvalNum() {
public Map approvalNum() {
//获取当前用户id
String userId = dgApplyAmountInfoController.getUserId();
//String userId = dgApplyAmountInfoController.getUserId();
String userId = "5";
//近十天的日期数组
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;
List<Integer>approvalList = dgAuditProcessMapper.selectApprovalNum(Integer.parseInt(userId));
Map map = new HashMap();
map.put("timeArr",timeList);
map.put("approvalNumArr",approvalList);
return map;
}
}

@ -30,14 +30,15 @@
<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 id="selectTenDays" resultType="java.lang.String">
SELECT
date_format( create_time, '%Y-%m-%d' ) AS create_time
date_format( create_time, '%Y-%m-%d' ) AS create_time2
FROM
dg_audit_process
WHERE
DATE_SUB( CURDATE( ), INTERVAL 10 DAY ) &lt;= date( create_time )
AND user_id=#{userId}
GROUP BY create_time2
</select>
<select id="selectApprovalNum" resultType="java.lang.Integer">

Loading…
Cancel
Save