7 changed files with 236 additions and 14 deletions
@ -1,8 +1,16 @@
|
||||
package com.biutag.supervision.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.biutag.supervision.pojo.entity.ModelClueTask; |
||||
import com.biutag.supervision.pojo.model.ModelClueTaskModel; |
||||
import com.biutag.supervision.pojo.model.NegativeWorkModel; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
public interface ModelClueTaskMapper extends BaseMapper<ModelClueTask> { |
||||
|
||||
Page<ModelClueTaskModel> queryPage(@Param("page") Page<ModelClueTask> page, @Param(Constants.WRAPPER) QueryWrapper<ModelClueTask> queryWrapper); |
||||
|
||||
} |
||||
@ -0,0 +1,39 @@
|
||||
package com.biutag.supervision.pojo.dto; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import jakarta.validation.constraints.NotBlank; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
/** |
||||
* @author wxc |
||||
* @date 2024/10/30 |
||||
*/ |
||||
@Setter |
||||
@Getter |
||||
public class PoliceImport { |
||||
|
||||
@NotBlank(message = "姓名为空") |
||||
@ExcelProperty("姓名") |
||||
private String name; |
||||
|
||||
@NotBlank(message = "警号为空") |
||||
@ExcelProperty("警号") |
||||
private String empNo; |
||||
|
||||
@NotBlank(message = "身份证为空") |
||||
@ExcelProperty("身份证") |
||||
private String idCode; |
||||
|
||||
@NotBlank(message = "二级单位为空") |
||||
@ExcelProperty("二级单位") |
||||
private String secondDepartName; |
||||
|
||||
@ExcelProperty("三级单位") |
||||
private String thirdDepartName; |
||||
|
||||
@NotBlank(message = "角色为空") |
||||
@ExcelProperty("角色") |
||||
private String role; |
||||
|
||||
} |
||||
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?> |
||||
<!DOCTYPE mapper |
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.biutag.supervision.mapper.ModelClueTaskMapper"> |
||||
|
||||
<select id="queryPage" resultType="com.biutag.supervision.pojo.model.ModelClueTaskModel"> |
||||
SELECT |
||||
mt.id, |
||||
mt.task_name, |
||||
mt.create_time, |
||||
m.model_name, |
||||
mt.size, |
||||
sum( CASE WHEN n.processing_status = 'completed' THEN 1 ELSE 0 END ) completed_size, |
||||
sum( CASE WHEN n.checkStatus IN ( '1', '2' ) THEN 1 ELSE 0 END ) verify_size, |
||||
count( DISTINCT n.involveDepartId ) depart_size, |
||||
count( DISTINCT nb.blameIdCode ) personal_size |
||||
FROM |
||||
model_clue_task mt |
||||
LEFT JOIN model m ON mt.model_id = m.id |
||||
LEFT JOIN model_clue mc ON mc.task_id = mt.id |
||||
LEFT JOIN negative n ON mc.negative_id = n.id |
||||
LEFT JOIN negative_blame nb ON n.id = nb.negativeId |
||||
AND type = 'personal' |
||||
${ew.getCustomSqlSegment} |
||||
</select> |
||||
|
||||
|
||||
</mapper> |
||||
Binary file not shown.
Loading…
Reference in new issue