首页的本月和今日新建审批数量统计

master
river 4 years ago
parent 4b99ec5302
commit dd8c7ce9da
  1. 6
      dq-financial-crms/src/main/resources/bootstrap.properties
  2. 21
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
  3. 7
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgApplyAmountInfoMapper.java
  4. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgEfficiencyService.java
  5. 27
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
  6. 6
      dq-financial-guarantee/src/main/resources/bootstrap.properties
  7. 23
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountInfoMapper.xml
  8. 6
      dq-financial-hrms-auth/src/main/resources/bootstrap.properties
  9. 6
      dq-financial-hrms/src/main/resources/bootstrap.properties
  10. 29
      dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java
  11. 6
      dq-govern-gateway/src/main/resources/bootstrap.properties

@ -1,7 +1,7 @@
#服务名称
spring.application.name=dq-financial-crms
#配置中心地址
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.server-addr=192.168.31.140:8848
spring.cloud.nacos.config.file-extension=yml
#redis配置
spring.redis.host=127.0.0.1
@ -14,13 +14,13 @@ spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
#线上生产环境
spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
#spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
#请求处理的超时时间
ribbon.ReadTimeout: 120000

@ -44,6 +44,7 @@ public class DgEfficiencyController {
@Autowired
private HrmsFeignService hrmsFeignService;
/**
* 团队效率
*/
@ -73,6 +74,26 @@ public class DgEfficiencyController {
return ResponseResult.SUCCESS(result);
}
/**
* 首页-当前月份每天新建审批数量
*/
@GetMapping("/getNewBusinessCount")
@ApiOperation(value = "当前月份每天新建审批数量")
public ResponseResult getNewBusinessCount() {
return ResponseResult.SUCCESS(dgEfficiencyService.getNewBusinessCount());
}
/**
* 首页-今天新建审批数量并按员工和客户分类
*/
@GetMapping("/getTodayBusinessCount")
@ApiOperation(value = "今天新建审批数量并按员工和客户分类")
public ResponseResult getTodayBusinessCount() {
return ResponseResult.SUCCESS(dgEfficiencyService.getTodayBusinessCount());
}
@ApiOperation(value = "个人效率记录列表")
/**
* 首页-通知

@ -11,6 +11,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* <p>
@ -38,4 +39,10 @@ public interface DgApplyAmountInfoMapper extends BaseMapper<DgApplyAmountInfo> {
int selectBusinessTaday(String dateTime);
String selectMaxBusinessTaday(String dateTime);
List<Map<String, Integer>> getNewBusinessCount(@Param("beginTime") String beginTime, @Param("endTime") String endTime);
/*List<Integer> getNewBusinessDate(@Param("beginTime") String beginTime, @Param("endTime") String endTime);*/
Map<String, Integer> getTodayBusinessCount(@Param("today") String today);
}

@ -25,4 +25,8 @@ public interface IDgEfficiencyService extends IService<DgApplyAmountInfo> {
Map<String, Integer> getBusinessCount();
List<PersonalEfficiencyListResponse> queryPersonalEfficiencyList();
List<Map<String, Integer>> getNewBusinessCount();
Map<String, Integer> getTodayBusinessCount();
}

@ -244,6 +244,32 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
return map;
}
/**
* 获取当前月份的每天的新建审批数量
*/
@Override
public List<Map<String, Integer>> getNewBusinessCount() {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
// 本月开始时间
String beginTime = dateFormat.format(DateUtils.getBeginDayOfMonth());
// 本月结束时间
String endTime = dateFormat.format(DateUtils.getEndDayOfMonth());
return applyAmountInfoMapper.getNewBusinessCount(beginTime, endTime);
}
/**
* 获取今天新建审批数量并按申请类型分类
*/
@Override
public Map<String, Integer> getTodayBusinessCount() {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
return applyAmountInfoMapper.getTodayBusinessCount(dateFormat.format(new Date()));
}
@Override
public List<PersonalEfficiencyListResponse> queryPersonalEfficiencyList() {
int size = 100;
@ -621,6 +647,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
/**
* 查询审批数目的值的数组
*
* @return
*/
@Override

@ -1,7 +1,7 @@
#服务名称
spring.application.name=dq-financial-guarantee
#配置中心地址
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.server-addr=192.168.31.140:8848
spring.cloud.nacos.config.file-extension=yml
#redis配置
spring.redis.host=127.0.0.1
@ -15,13 +15,13 @@ spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
#线上生产环境
spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
#spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
#请求处理的超时时间
ribbon.ReadTimeout: 120000

@ -88,4 +88,27 @@
order by id desc limit 1
</select>
<!-- 获取本月每天新建审批数量 -->
<select id="getNewBusinessCount" parameterType="string" resultType="map">
SELECT DATE_FORMAT(create_time,'%d') days,COUNT(id) count
FROM dg_apply_amount_info
WHERE DATE_FORMAT(create_time,'%Y%m%d') &gt;= #{beginTime} AND DATE_FORMAT(create_time,'%Y%m%d') &lt;= #{endTime}
GROUP BY days
</select>
<!-- 获取本月存在新建审批的日期集合(查询两个结果集的时候接收类型只有一个默认只接收第一个) -->
<!--<select id="getNewBusinessDate" parameterType="string" resultType="integer">
SELECT COUNT(id) count,DATE_FORMAT(create_time,'%Y%m%d') days
FROM dg_apply_amount_info GROUP BY days
HAVING days &gt;= #{beginTime} AND days &lt;= #{endTime};
</select>-->
<!-- 今天新建审批数量并按照员工和客户分类 -->
<select id="getTodayBusinessCount" parameterType="string" resultType="map">
SELECT
SUM(CASE WHEN (apply_type = 0) THEN 1 ELSE 0 END) AS 'employee',
SUM(CASE WHEN (apply_type = 1) THEN 1 ELSE 0 END) AS 'customer'
FROM dg_apply_amount_info WHERE DATE_FORMAT(create_time,'%Y%m%d') = #{today}
</select>
</mapper>

@ -1,7 +1,7 @@
#服务名称
spring.application.name=dq-financial-hrms-auth
#配置中心地址
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.server-addr=192.168.31.140:8848
spring.cloud.nacos.config.file-extension=yml
#redis配置
spring.redis.host=127.0.0.1
@ -15,13 +15,13 @@ spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
#线上生产环境
spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
#spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
#请求处理的超时时间
ribbon.ReadTimeout: 120000

@ -1,7 +1,7 @@
##服务名称
spring.application.name=dq-financial-hrms
#配置中心地址
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.server-addr=192.168.31.140:8848
spring.cloud.nacos.config.file-extension=yml
#redis配置
spring.redis.host=127.0.0.1
@ -15,13 +15,13 @@ spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
#线上生产环境
spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
#spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
#请求处理的超时时间
ribbon.ReadTimeout: 120000

@ -33,18 +33,21 @@ public class Md5Util {
//String s = URLEncoder.encode("www.occupationlab.com", "utf-8");
//System.out.println(s);
//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));
System.out.println(md5("Aa12342"));
/* 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 dateFormat = new SimpleDateFormat("yyyyMMdd");
System.out.println(dateFormat.format(new Date()));
}
}

@ -1,7 +1,7 @@
#服务名称
spring.application.name=dq-govern-gateway
#配置中心地址
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.server-addr=192.168.31.140:8848
spring.cloud.nacos.config.file-extension=yml
#redis配置
spring.redis.host=127.0.0.1
@ -15,13 +15,13 @@ spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
#线上生产环境
spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
#spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
spring.servlet.multipart.max-file-size=10MB
spring.servlet.multipart.max-request-size=10MB

Loading…
Cancel
Save