Преглед изворни кода

1.大中型新增错误类型数量统计查询/导出接口

GouGengquan пре 10 месеци
родитељ
комит
1b490a047d

+ 20 - 0
biz-base/src/main/java/com/dayou/controller/MajorStatisticalStatementController.java

@@ -83,6 +83,26 @@ public class MajorStatisticalStatementController extends BaseController{
     }
 
     /**
+     * 查询每种错误类型的数量
+     * @param dto 查询dto
+     * @return List<MajorErrorTypeCountVO>
+     */
+    @GetMapping("/errorType/getMajorErrorTypeCountVO")
+    public RestResponse<List<MajorErrorTypeCountVO>> getMajorErrorTypeCountVO(MajorStatisticalSelectDTO dto) {
+        return RestResponse.data(majorStatisticalStatementService.getMajorErrorTypeCountVO(dto));
+    }
+
+    /**
+     * 导出每种错误类型的数量
+     * @param dto 查询dto
+     */
+    @GetMapping("/errorType/getMajorErrorTypeCountVO/export")
+    public void exportMajorErrorTypeCountVO(MajorStatisticalSelectDTO dto, HttpServletResponse response) throws IOException {
+        List<MajorErrorTypeCountVO> result = majorStatisticalStatementService.getMajorErrorTypeCountVO(dto);
+        exportPlus(response,"错误类型统计数据",result, MajorErrorTypeCountVO.class);
+    }
+
+    /**
      * 根据部门id获取部门绩效扣分
      * @param dto 查询dto
      * @return List<MajorPerformanceDeductionVO>

+ 7 - 0
dao/src/main/java/com/dayou/mapper/MajorStatisticalStatementMapper.java

@@ -46,6 +46,13 @@ public interface MajorStatisticalStatementMapper {
     List<MajorPerformanceDeductionVO> getMajorPerformanceDeductionVOByDepId(@Param("dto") MajorStatisticalSelectDTO dto);
 
     /**
+     * 获取每种错误类型的数量
+     * @param dto 查询dto
+     * @return List<MajorErrorTypeCountVO>
+     */
+    List<MajorErrorTypeCountVO> getMajorErrorTypeCountVO(@Param("dto") MajorStatisticalSelectDTO dto);
+
+    /**
      * 查询错误详情列表
      * @param page 分页
      * @param dto 查询dto

+ 52 - 0
dao/src/main/resources/mapper/MajorStatisticalStatementMapper.xml

@@ -244,6 +244,58 @@
         GROUP BY user.id
     </select>
 
+    <select id="getMajorErrorTypeCountVO" resultType="com.dayou.vo.MajorErrorTypeCountVO">
+        SELECT user.id AS userId,
+               user.departmentId,
+               user.userName,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','委托书界定事项和报告描述不符','%') AND deleted = 0 ) AS errorTypeCount01,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','委托方函重要数据出错','%') AND deleted = 0 ) AS errorTypeCount02,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','假设限制条件错漏','%') AND deleted = 0 ) AS errorTypeCount03,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','地价定义表述有误或不完整','%') AND deleted = 0 ) AS errorTypeCount04,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','大小写有误','%') AND deleted = 0 ) AS errorTypeCount05,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','面积有误','%') AND deleted = 0 ) AS errorTypeCount06,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','报告章节缺漏','%') AND deleted = 0 ) AS errorTypeCount07,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','技术路线错误','%') AND deleted = 0 ) AS errorTypeCount08,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','测算参数取值错误','%') AND deleted = 0 ) AS errorTypeCount09,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','实景图方位图错误','%') AND deleted = 0 ) AS errorTypeCount10,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','报告出具日期错误','%') AND deleted = 0 ) AS errorTypeCount11,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','报告有效期错误','%') AND deleted = 0 ) AS errorTypeCount12,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','估价依据适用不当','%') AND deleted = 0 ) AS errorTypeCount13,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','委托人名称出错','%') AND deleted = 0 ) AS errorTypeCount14,
+               (SELECT COUNT(id) FROM business_production_performance WHERE business_type = 'MAJOR_BUSINESS' AND production_id = orderInfo.production_id AND reason LIKE CONCAT('%','价值时点出错','%') AND deleted = 0 ) AS errorTypeCount15
+        FROM (SELECT DISTINCT user.id AS id,
+                     user.`name` AS userName,
+                     department.id AS departmentId
+              FROM user,post,user_post,sorted_department,department
+              WHERE `user`.id = user_post.user_id
+                AND user_post.post_id = post.id
+                AND post.department_id = sorted_department.department_id
+                AND sorted_department.department_id = department.id
+                AND sorted_department.deleted = 0
+                AND user_post.deleted = 0
+                AND sorted_department.business_type = 'MAJOR_BUSINESS'
+             ) AS user
+        LEFT JOIN (
+            SELECT
+                principal_id,
+                major.created,
+                major_production.id AS production_id
+            FROM
+                major
+                    LEFT JOIN major_production ON major_production.major_id = major.id
+                    AND major_production.deleted = 0
+        ) AS orderInfo ON user.id = orderInfo.principal_id
+        <where>
+            <if test="dto != null and dto.departmentId != null">
+                AND user.departmentId = #{dto.departmentId}
+            </if>
+            <if test="dto != null and dto.userName != null">
+                AND user.userName LIKE CONCAT('%',#{dto.userName},'%')
+            </if>
+        </where>
+        GROUP BY user.id
+    </select>
+
     <!--根据部门id获取部门绩效扣分-->
     <select id="getMajorPerformanceDeductionVOByDepId" resultType="com.dayou.vo.MajorPerformanceDeductionVO">
         SELECT user.id AS userId,

+ 116 - 0
domain/src/main/java/com/dayou/vo/MajorErrorTypeCountVO.java

@@ -0,0 +1,116 @@
+package com.dayou.vo;
+
+import com.dayou.annotation.Excel;
+import lombok.Data;
+
+@Data
+public class MajorErrorTypeCountVO {
+
+    /**
+     * 部门id
+     */
+    private Long departmentId;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 员工姓名
+     */
+    @Excel(name = "员工姓名")
+    private String userName;
+
+    /**
+     * 委托书界定事项和报告描述不符
+     */
+    @Excel(name = "委托书界定事项和报告描述不符")
+    private Integer errorTypeCount01;
+
+    /**
+     * 委托方函重要数据出错
+     */
+    @Excel(name = "委托方函重要数据出错")
+    private Integer errorTypeCount02;
+
+    /**
+     * 假设限制条件错漏
+     */
+    @Excel(name = "假设限制条件错漏")
+    private Integer errorTypeCount03;
+
+    /**
+     * 地价定义表述有误或不完整
+     */
+    @Excel(name = "地价定义表述有误或不完整")
+    private Integer errorTypeCount04;
+
+    /**
+     * 大小写有误
+     */
+    @Excel(name = "大小写有误")
+    private Integer errorTypeCount05;
+
+    /**
+     * 面积有误
+     */
+    @Excel(name = "面积有误")
+    private Integer errorTypeCount06;
+
+    /**
+     * 报告章节缺漏
+     */
+    @Excel(name = "报告章节缺漏")
+    private Integer errorTypeCount07;
+
+    /**
+     * 技术路线错误
+     */
+    @Excel(name = "技术路线错误")
+    private Integer errorTypeCount08;
+
+    /**
+     * 测算参数取值错误
+     */
+    @Excel(name = "测算参数取值错误")
+    private Integer errorTypeCount09;
+
+    /**
+     *
+     */
+    @Excel(name = "实景图方位图错误")
+    private Integer errorTypeCount10;
+
+    /**
+     * 报告出具日期错误
+     */
+    @Excel(name = "报告出具日期错误")
+    private Integer errorTypeCount11;
+
+    /**
+     * 报告有效期错误
+     */
+    @Excel(name = "报告有效期错误")
+    private Integer errorTypeCount12;
+
+    /**
+     * 估价依据适用不当
+     */
+    @Excel(name = "估价依据适用不当")
+    private Integer errorTypeCount13;
+
+    /**
+     * 委托人名称出错
+     */
+    @Excel(name = "委托人名称出错")
+    private Integer errorTypeCount14;
+
+    /**
+     * 价值时点出错
+     */
+    @Excel(name = "价值时点出错")
+    private Integer errorTypeCount15;
+
+
+}

+ 7 - 0
service/src/main/java/com/dayou/service/IMajorStatisticalStatementService.java

@@ -45,6 +45,13 @@ public interface IMajorStatisticalStatementService {
     List<MajorPerformanceDeductionVO> getMajorPerformanceDeductionVOByDepId(MajorStatisticalSelectDTO dto);
 
     /**
+     * 获取每种错误类型的数量
+     * @param dto 查询dto
+     * @return List<MajorErrorTypeCountVO>
+     */
+    List<MajorErrorTypeCountVO> getMajorErrorTypeCountVO(MajorStatisticalSelectDTO dto);
+
+    /**
      * 查询错误详情列表
      * @param page 分页
      * @param dto 查询dto

+ 10 - 0
service/src/main/java/com/dayou/service/impl/MajorStatisticalStatementServiceImpl.java

@@ -87,6 +87,16 @@ public class MajorStatisticalStatementServiceImpl implements IMajorStatisticalSt
     }
 
     /**
+     * 获取每种错误类型的数量
+     * @param dto 查询dto
+     * @return List<MajorErrorTypeCountVO>
+     */
+    @Override
+    public List<MajorErrorTypeCountVO> getMajorErrorTypeCountVO(MajorStatisticalSelectDTO dto) {
+        return majorStatisticalStatementMapper.getMajorErrorTypeCountVO(dto);
+    }
+
+    /**
      * 查询错误详情列表
      * @param page 分页
      * @param dto 查询dto

+ 6 - 0
sql/update_sql.sql

@@ -711,5 +711,11 @@ ALTER TABLE `major_production` ADD minor_worker_no varchar(64) NULL COMMENT '第
 ALTER TABLE `major_production` ADD small_worker varchar(64) NULL COMMENT '第三报告人';
 ALTER TABLE `major_production` ADD small_worker_no varchar(64) NULL COMMENT '第三报告人注册号';
 
+/**
+  以上SQL已同步到测试环境
+  同步日期:2024-09-09
+  操作人:苟耕铨
+ */
+