wangbo 3 years ago
parent
commit
24d9cf9fec

+ 3 - 3
operation_manager/src/main/java/com/huaxu/order/controller/WorkOrderStatisticsController.java

@@ -136,7 +136,7 @@ public class WorkOrderStatisticsController {
     @ApiOperation(value = "分布统计")
     public AjaxMessage<Map<String,Object>> distributionStatistics(
             @ApiParam(value="统计类型:0-按月统计,1-按年统计,2-自定义统计",required =true) @RequestParam(required = true) int type,
-            @ApiParam(value = "统计时间:月格式(yyyy-MM),年格式(yyyy)", required = true) @RequestParam(required = true) String startDate,
+            @ApiParam(value = "统计时间:月格式(yyyy-MM),年格式(yyyy),自定义统计时间开始日期", required = true) @RequestParam(required = true) String startDate,
             @ApiParam(value = "统计时间:年月统计不用传入此参数,自定义统计截至日期", required = false) @RequestParam(required = false) String endDate) {
         Map<String,Object> result = new HashMap<>();
         //根据用户编号,获取用户的权限
@@ -148,11 +148,11 @@ public class WorkOrderStatisticsController {
         //1是公司,2是公司及以下,3部门,4部门及以下,5自定义
         workOrderManageDto.setPermissonType(loginUser.getPermissonType());
         if(type == 0){
-
+            startDate = String.format("%s-01",startDate);
             workOrderManageDto.setStartDate(startDate);
         }
         else if(type == 1){
-
+            startDate = String.format("%s-01-01",startDate);
             workOrderManageDto.setStartDate(startDate);
         }
         else if(type == 2){

+ 2 - 1
operation_manager/src/main/resources/mapper/order/WorkOrderManageMapper.xml

@@ -1125,7 +1125,8 @@
   <select id="orderTypeStatistics" resultMap="StatisticsMap">
     select  case when t1.order_type_id=1 then '表务工单' when t1.order_type_id=2 then '停通水工单'
     when t1.order_type_id=3 then '抢修工单' when t1.order_type_id=4 then '漏点定位工单'
-    when t1.order_type_id=5 then '测漏工单' when t1.order_type_id=6 then '违章跑水工单' end statistics_name,
+    when t1.order_type_id=5 then '测漏工单' when t1.order_type_id=6 then '违章跑水工单'
+    when t1.order_type_id=10 then '压力调度工单' end statistics_name,
     count(*) statistics_value
     from sc_work_order_manage t1
     <where>