首页统计

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

@ -25,5 +25,5 @@ public interface DgAuditProcessMapper extends BaseMapper<DgAuditProcess> {
List<String> selectTenDays(Integer userId); 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 org.springframework.stereotype.Service;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map;
/** /**
* @auther River * @auther River
@ -13,6 +14,6 @@ import java.util.HashMap;
*/ */
public interface IDgEfficiencyService extends IService<DgApplyAmountInfo> { public interface IDgEfficiencyService extends IService<DgApplyAmountInfo> {
String approvalNum(); Map approvalNum();
HashMap<Integer, HashMap<Integer, String>> queryList(DgEfficiencyTeamRequest dgEfficiencyTeamRequest); 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 com.daqing.framework.domain.guarantee.po.DgTeamEfficiencyPO;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -140,16 +139,17 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
* @return * @return
*/ */
@Override @Override
public String approvalNum() { public Map approvalNum() {
//获取当前用户id //获取当前用户id
String userId = dgApplyAmountInfoController.getUserId(); //String userId = dgApplyAmountInfoController.getUserId();
String userId = "5";
//近十天的日期数组 //近十天的日期数组
List<String>timeList = dgAuditProcessMapper.selectTenDays(Integer.parseInt(userId)); List<String>timeList = dgAuditProcessMapper.selectTenDays(Integer.parseInt(userId));
System.out.println("timeList============"+timeList);
//近十天审批数目的值的数组 //近十天审批数目的值的数组
List<EfficiencyApprovalResponse>approvalList = dgAuditProcessMapper.selectApprovalNum(Integer.parseInt(userId)); List<Integer>approvalList = dgAuditProcessMapper.selectApprovalNum(Integer.parseInt(userId));
System.out.println("approvalList==========="+approvalList); Map map = new HashMap();
map.put("timeArr",timeList);
return null; map.put("approvalNumArr",approvalList);
return map;
} }
} }

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

Loading…
Cancel
Save